/* Shared chrome for landing + create pages. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Caveat:wght@400;600&display=swap');

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: radial-gradient(ellipse at top, #fdf6e6 0%, #f4ead4 60%, #e8dcc0 100%);
  color: #3d2e1f;
  min-height: 100vh;
  min-height: 100dvh;
}
.grain {
  position: fixed;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 22px 48px;
}

.h-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #5a3a2a;
}
.h-hand {
  font-family: 'Caveat', cursive;
  color: #a88a5a;
}

.brand {
  text-align: center;
  margin-bottom: 22px;
}
.brand .name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(36px, 7vw, 56px);
  color: #5a3a2a;
  line-height: 1;
}
.brand .tag {
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 3vw, 24px);
  color: #a88a5a;
  margin-top: 4px;
}

.card-panel {
  background: #fffdf6;
  border: 1px solid #d9c9a8;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 1px 0 #e8d9b6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 24px;
  border: 1px solid #c9b89a;
  background: #fffdf6;
  color: #5a3a2a;
  font-family: 'Caveat', cursive;
  font-size: 19px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.btn:hover { background: #f7f1e6; }
.btn.primary {
  background: #5a3a2a;
  color: #f7f1e6;
  border-color: #5a3a2a;
}
.btn.primary:hover { background: #6b4838; color: #fffdf6; }
.btn.danger {
  color: #a85a5a;
  border-color: #d9b8b8;
  background: #fffdf6;
}
.btn.ghost {
  background: transparent;
  border: 1px dashed #c9b89a;
  color: #8a6a4a;
}
.btn[disabled], .btn:disabled { opacity: 0.4; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%;
  border: none;
  border-bottom: 1px dotted #c9b89a;
  background: transparent;
  outline: none;
  font-family: inherit;
  color: #3d2e1f;
  font-size: 18px;
  padding: 6px 2px;
  resize: none;
}
.textarea {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 20px;
}
.input:focus, .select:focus, .textarea:focus { border-bottom-color: #8a6a4a; }
.select {
  font-family: 'Caveat', cursive;
  font-size: 19px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8a6a4a 50%), linear-gradient(135deg, #8a6a4a 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
}

.field-label {
  display: block;
  font-family: 'Caveat', cursive;
  color: #8a6a4a;
  font-size: 17px;
  margin-bottom: 4px;
}

.code-input {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 6vw, 40px);
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
  border: 1px solid #d9c9a8;
  background: #fffdf6;
  border-radius: 6px;
  padding: 14px 12px 14px 22px;
  width: 100%;
  color: #3d2e1f;
}
.code-input:focus { outline: none; border-color: #8a6a4a; }

.muted { color: #a88a5a; }
.center { text-align: center; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

.divider {
  height: 1px;
  background: #e6d6b8;
  margin: 22px 0;
}

.theme-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.theme-swatch {
  flex: 1 1 130px;
  min-width: 110px;
  border: 2px solid #d9c9a8;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: 'Caveat', cursive;
  color: #3d2e1f;
  position: relative;
  transition: all 0.15s;
}
.theme-swatch:hover { border-color: #8a6a4a; }
.theme-swatch.selected {
  border-color: #5a3a2a;
  box-shadow: 0 0 0 1px #5a3a2a inset;
}
.theme-swatch .theme-name {
  font-size: 18px;
  margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.theme-swatch .theme-dots {
  display: flex;
  gap: 5px;
}
.theme-swatch .theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.theme-swatch .check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5a3a2a;
  color: #f7f1e6;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.theme-swatch.selected .check { display: inline-flex; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #5a3a2a;
  color: #fffdf6;
  padding: 10px 18px;
  border-radius: 24px;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
