/* Advent Cards — one stylesheet, no framework.
   Palette is driven by --bg/--panel/--paper/--accent/--ink/--soft, set per theme. */

:root {
  --bg: #101a2e;
  --panel: #18253d;
  --paper: #f6ead2;
  --accent: #e2a45c;
  --ink: #0d1626;
  --soft: #2b3a57;
  --text: #f2ead9;
  --muted: #a8b2c4;
  --line: rgba(242, 234, 217, 0.14);
  --radius: 10px;
  --max: 1180px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A soft candle glow at the top, like a lamp behind paper. */
body::before {
  content: '';
  position: fixed;
  inset: -20% 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(226, 164, 92, 0.18), transparent 70%),
    radial-gradient(40% 40% at 12% 8%, rgba(140, 168, 214, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; }

p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; height: auto; }

::selection { background: var(--accent); color: var(--ink); }

/* ---------------------------------------------------------------- chrome */

.site-head {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--accent); }

.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.site-nav a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: rgba(242, 234, 217, 0.4); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: #eeb56f; border-color: #eeb56f; }

.btn-quiet { color: var(--muted); }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn-wide { width: 100%; }

.text-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 164, 92, 0.4);
  padding-bottom: 1px;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  font: inherit;
  cursor: pointer;
}
.text-link:hover { border-color: var(--accent); }

.kicker {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ----------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  grid-template-areas: 'copy preview' 'form preview';
  grid-template-rows: auto 1fr;
  gap: 24px 64px;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.hero-copy { grid-area: copy; }
.hero-preview { grid-area: preview; align-self: center; }
.hero-form { grid-area: form; align-self: end; }

.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero h1 span { display: block; color: var(--accent); }

.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin-bottom: 28px; }

.creator { margin: 0 0 14px; }

.creator-row { display: flex; gap: 10px; align-items: flex-end; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; position: relative; }
.field-label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.input::placeholder { color: rgba(168, 178, 196, 0.6); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.themes { border: 0; padding: 16px 0 0; margin: 0; }
.themes legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.theme-row { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-chip input { position: absolute; opacity: 0; pointer-events: none; }
.theme-chip:hover { border-color: rgba(242, 234, 217, 0.35); color: var(--text); }
.theme-chip input:checked + .chip-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.theme-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chip-bg) 45%, var(--chip-paper) 46%, var(--chip-paper) 70%, var(--chip-accent) 71%);
}
.theme-chip.is-locked { opacity: 0.55; cursor: not-allowed; }
.chip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-tag { font-size: 11px; color: var(--accent); border: 1px solid rgba(226, 164, 92, 0.4); border-radius: 999px; padding: 1px 7px; }
.themes-note { font-size: 13px; color: rgba(168, 178, 196, 0.7); margin: 10px 0 0; }

.form-note { font-size: 14px; color: var(--accent); min-height: 1.2em; margin: 10px 0 0; }
.form-note[data-error='1'] { color: #e88a8a; }

.micro { font-size: 14px; color: rgba(168, 178, 196, 0.7); }

/* ----------------------------------------------------------- demo calendar */

.hero-demo { perspective: 1200px; }

.demo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  max-width: 480px;
  margin-left: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.demo-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.demo-head span:first-child { font-family: var(--serif); font-size: 19px; }
.demo-count { font-size: 13px; color: var(--muted); }

.demo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }

.demo-door {
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 8px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.demo-door:hover, .demo-door:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}
.demo-door:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.demo-num { font-family: var(--serif); font-size: 15px; }
.demo-door.has-note {
  background: var(--paper);
  color: var(--ink);
  border-color: transparent;
}
.demo-door.has-note .demo-num { color: rgba(13, 22, 38, 0.55); }

.demo-reveal {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  min-height: 92px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  animation: rise 0.35s ease both;
}
.demo-reveal[hidden] { display: none; }
.demo-reveal-sticker { color: var(--accent); width: 26px; height: 26px; display: inline-flex; }
.demo-reveal-sticker svg { width: 100%; height: 100%; }
.demo-reveal p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.demo-reveal-name { grid-column: 2; font-size: 13px; color: var(--muted); }
.demo-hint { font-size: 13px; color: rgba(168, 178, 196, 0.7); margin: 12px 0 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- sections */

section { padding: 88px 24px; }
.section-head { max-width: var(--max); margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.1; }
.section-head p { color: var(--muted); margin-top: 12px; }

.how { max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); }
.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step-num { font-family: var(--serif); font-size: 40px; color: rgba(226, 164, 92, 0.45); line-height: 1; }
.steps h3 { font-size: 22px; margin: 12px 0 8px; }
.steps p { color: var(--muted); margin: 0; }

.cards {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.cards h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin-bottom: 20px; }
.cards p { color: var(--muted); max-width: 30em; }
.cards .text-link { display: inline-block; margin-top: 8px; }

.card-demo { margin: 0; position: relative; }
.note-bubble {
  margin: 0 0 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  max-width: 330px;
  position: relative;
}
.note-bubble p { font-family: var(--serif); font-size: 18px; line-height: 1.45; color: var(--text); margin: 6px 0 10px; }
.note-bubble cite { font-style: normal; font-size: 13px; color: var(--muted); }
.note-sticker { width: 22px; height: 22px; display: inline-flex; color: var(--accent); }
.note-sticker svg { width: 100%; height: 100%; }

.painted-card {
  aspect-ratio: 1;
  max-width: 360px;
  margin-left: auto;
  border-radius: 4px;
  background:
    radial-gradient(70% 60% at 30% 25%, #f0c98a 0%, transparent 60%),
    radial-gradient(60% 50% at 75% 70%, #a9555f 0%, transparent 65%),
    linear-gradient(160deg, #1d3350 0%, #2c4766 100%);
  border: 1px solid rgba(226, 164, 92, 0.5);
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.4deg);
}
.painted-frame { position: absolute; inset: 12px; border: 1px solid rgba(242, 234, 217, 0.35); }
.painted-scene {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 62%, rgba(246, 234, 210, 0.95) 0 8%, transparent 8.4%),
    radial-gradient(circle at 50% 62%, rgba(226, 164, 92, 0.5) 0 14%, transparent 14.4%);
  opacity: 0.7;
}
.painted-caption {
  position: absolute; left: 24px; bottom: 20px;
  font-size: 12px; letter-spacing: 0.04em; color: rgba(242, 234, 217, 0.8);
}

.send {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.send h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin-bottom: 18px; }
.send p { color: var(--muted); max-width: 30em; }
.ticks { list-style: none; padding: 0; margin: 18px 0 26px; color: var(--muted); }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.ticks li::before {
  content: '';
  position: absolute; left: 4px; top: 9px;
  width: 10px; height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.phone {
  justify-self: center;
  width: 270px;
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #16233b, #0d1626);
  padding: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}
.phone-screen {
  height: 100%;
  border-radius: 24px;
  background:
    radial-gradient(80% 50% at 50% 8%, rgba(226, 164, 92, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(246, 234, 210, 0.06), transparent 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.phone-kicker { font-size: 12px; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.phone-name { font-family: var(--serif); font-size: 24px; line-height: 1.15; }
.phone-sub { font-size: 13px; color: var(--muted); }
.phone-code {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.18em;
  border: 1px dashed rgba(226, 164, 92, 0.55);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--accent);
}

.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 34px 20px 0;
  font-family: var(--serif);
  font-size: 20px;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 18px;
  font-family: var(--sans);
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding: 0 40px 20px 0; margin: 0; }

.cta-final {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta-final h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin-bottom: 14px; }
.cta-final p { color: var(--muted); margin-bottom: 28px; }

/* --------------------------------------------------------------- footer */

.site-foot { border-top: 1px solid var(--line); padding: 56px 24px 40px; max-width: var(--max); margin: 0 auto; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 0.8fr); gap: 40px; }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 22em; margin-top: 12px; }
.foot-col h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.foot-col a:hover { color: var(--text); }
.foot-note { color: rgba(168, 178, 196, 0.6); font-size: 13px; margin-top: 40px; }

/* --------------------------------------------------------- prose pages */

.prose-main { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.prose-main h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.05; margin-bottom: 18px; }
.prose-main h2 { font-size: 28px; margin: 44px 0 12px; }
.prose-main h3 { font-size: 22px; margin: 28px 0 8px; }
.prose-main p, .prose-main li { color: var(--muted); }
.prose-main strong { color: var(--text); }
.prose-main a { color: var(--accent); }
.prose-main ul, .prose-main ol { padding-left: 22px; margin: 0 0 1.2em; }
.prose-main li { margin-bottom: 6px; }
.prose-main .lede { font-size: 20px; color: var(--text); }
.prose-main .btn { margin-top: 10px; }
.fine { font-size: 13px; color: rgba(168, 178, 196, 0.65); }

.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 32px 0; }
.price-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.price-card.is-featured { border-color: rgba(226, 164, 92, 0.6); background: rgba(226, 164, 92, 0.06); }
.price-card h2 { margin: 0 0 6px; font-size: 22px; }
.price-card .price { font-family: var(--serif); font-size: 34px; color: var(--text); margin: 0 0 14px; }
.price-card .price small { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.price-card li { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.price-card li:last-child { border-bottom: 0; }

/* ----------------------------------------------------------- calendar page */

.cal-page { background: var(--bg); }

.cal-head { max-width: var(--max); }

.cal-main { max-width: 960px; margin: 0 auto; padding: 16px 20px 80px; }

.cal-intro { text-align: center; padding: 28px 0 36px; }
.cal-kicker { color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.cal-intro h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; }
.cal-meta { color: var(--muted); margin: 12px 0 6px; font-size: 15px; }
.cal-code { color: rgba(168, 178, 196, 0.7); font-size: 13px; margin: 14px 0 0; }
.cal-code strong { color: var(--text); letter-spacing: 0.12em; font-weight: 600; }

.plan-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(226, 164, 92, 0.5);
  color: var(--accent);
}
.plan-badge.plan-2 { background: rgba(226, 164, 92, 0.12); }

.share-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

.doors {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.door {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 10px 10px;
  border: 1px solid transparent;
  background: var(--soft);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 6px 8px;
  gap: 3px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.door:hover, .door:focus-visible { transform: translateY(-3px); outline: none; box-shadow: 0 0 0 2px var(--accent); }
.door-number { font-family: var(--serif); font-size: 17px; opacity: 0.75; line-height: 1.1; }
.door-motif { width: 20px; height: 20px; color: var(--accent); margin-top: 4px; }
.door-motif svg { width: 100%; height: 100%; display: block; }
.door-art { width: 24px; height: 24px; display: none; margin-top: 2px; }
.door-art svg { width: 100%; height: 100%; }
.door-who {
  font-size: 11px;
  color: inherit;
  opacity: 0.72;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: auto;
  padding-bottom: 2px;
}

.door[data-state='empty'] { border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--soft) 82%, transparent); }
.door[data-state='empty'] .door-motif { color: color-mix(in srgb, var(--accent) 75%, transparent); }
.door[data-state='empty']:hover { background: var(--soft); }

.door[data-state='sealed'] { background: var(--soft); color: var(--paper); }
.door[data-state='sealed'] .door-motif { display: none; }
.door[data-state='sealed'] .door-art { display: block; color: color-mix(in srgb, var(--paper) 62%, transparent); }

.door[data-state='open'] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.door[data-state='open'] .door-motif { display: none; }
.door[data-state='open'] .door-art { display: block; color: var(--accent); }
.door[data-state='open'] .door-number { color: var(--ink); opacity: 0.6; }
.door[data-state='open'] .door-who { color: var(--ink); opacity: 0.75; }

.door[data-ai='1']::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-foot { display: grid; gap: 18px; }
.owner-panel, .guest-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.02);
}
.owner-panel h2, .guest-panel h2 { font-size: 24px; margin-bottom: 10px; }
.owner-panel p, .guest-panel p { color: var(--muted); max-width: 46em; }
.owner-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 16px 0 10px; }
.theme-select { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.theme-select select {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
}
.owner-tip { font-size: 13px; color: rgba(168, 178, 196, 0.65); }

/* ------------------------------------------------------------- dialogs */

.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 560px;
  width: calc(100% - 24px);
  margin: auto;
  color: var(--text);
}
.sheet::backdrop { background: rgba(6, 10, 18, 0.72); backdrop-filter: blur(3px); }
.sheet-inner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  position: relative;
  animation: rise 0.22s ease both;
}
.sheet h2 { font-size: 26px; margin-bottom: 6px; }
.sheet-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.sheet-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sheet-close:hover { color: var(--text); }

.sheet .field { margin-bottom: 14px; }
.counter { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: rgba(168, 178, 196, 0.6); }
textarea.input { resize: vertical; min-height: 84px; padding-bottom: 24px; }

.stickers { border: 0; padding: 0; margin: 0 0 14px; }
.stickers legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sticker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sticker-option {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sticker-option svg { width: 22px; height: 22px; }
.sticker-option.is-selected { border-color: var(--accent); color: var(--accent); background: rgba(226, 164, 92, 0.1); }
.sticker-option input { position: absolute; opacity: 0; pointer-events: none; }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }

.reveal-inner { background: var(--panel); }
.reveal-card { text-align: center; padding: 8px 4px 4px; }
.reveal-art {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 18px;
  border-radius: 4px;
  border: 1px solid rgba(226, 164, 92, 0.35);
}
.reveal-sticker { color: var(--accent); width: 30px; height: 30px; display: inline-flex; margin-bottom: 8px; }
.reveal-sticker svg { width: 100%; height: 100%; }
.reveal-text { font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--text); margin: 0 0 12px; }
.reveal-name { font-size: 14px; color: var(--accent); margin: 0 0 4px; }
.reveal-day { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.draw-status { font-size: 14px; color: var(--muted); min-height: 1.2em; }

.link-row { display: flex; gap: 8px; margin-bottom: 14px; }
.link-row .input { font-size: 14px; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.plans { display: grid; gap: 12px; }
.plan {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}
.plan:hover { border-color: rgba(226, 164, 92, 0.6); }
.plan-name { font-family: var(--serif); font-size: 20px; }
.plan-price { font-family: var(--serif); font-size: 20px; color: var(--accent); }
.plan-list { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

#story-canvas {
  width: 100%;
  max-width: 300px;
  margin: 4px auto 16px;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'preview' 'form'; gap: 26px; padding-top: 16px; }
  .hero-form { align-self: stretch; }
  .hero-demo { order: 2; }
  .demo { margin: 0 auto; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .cards, .send { grid-template-columns: 1fr; gap: 40px; }
  .painted-card { margin: 0 auto; transform: rotate(-1deg); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .price-cards { grid-template-columns: 1fr; }
  .doors { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  section { padding: 64px 20px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .site-head { padding: 16px; }
  .creator-row { flex-direction: column; align-items: stretch; }
  .creator-row .btn { width: 100%; }
  .demo { padding: 14px; }
  .demo-grid { gap: 6px; }
  .hero h1 { font-size: 2.45rem; }
  .doors { gap: 8px; }
  .door { padding-top: 10px; border-radius: 999px 999px 8px 8px; }
  .door-number { font-size: 15px; }
  .door-art { width: 20px; height: 20px; }
  .door-who { font-size: 10px; }
  .sheet { width: 100%; max-width: none; margin: 0; position: fixed; inset: auto 0 0 0; }
  .sheet-inner { border-radius: 18px 18px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .cal-intro { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------ generated artwork (v2) */

.brand-img { width: 30px; height: 30px; display: block; }

.hero-art { margin: 0; position: relative; }
.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 45%;
  border-radius: 18px;
  border: 1px solid rgba(226, 164, 92, 0.35);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}
.hero-art figcaption { position: absolute; left: 16px; bottom: 16px; }
.hero-chip {
  display: inline-block;
  background: rgba(13, 22, 38, 0.72);
  border: 1px solid rgba(226, 164, 92, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text);
  backdrop-filter: blur(6px);
}

.demo-section {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.demo-copy h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.08; margin-bottom: 14px; }
.demo-copy p { color: var(--muted); }
.demo-small { font-size: 14px; color: rgba(168, 178, 196, 0.7); }
.demo-section .demo { margin: 0; max-width: none; width: 100%; }

.cards { display: block; border-top: 1px solid var(--line); }
.cards-head { max-width: 760px; margin-bottom: 34px; }
.cards-head h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin-bottom: 14px; }
.cards-head p { color: var(--muted); }
.card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.sample { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.sample .note-bubble { max-width: none; margin: 0; }
.sample-card {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(226, 164, 92, 0.3);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}
.cards-foot { margin-top: 26px; }

.worlds { max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.theme-card {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.theme-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.theme-card:hover img { transform: scale(1.03); }
.theme-card figcaption {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-family: var(--serif);
  font-size: 16px;
}
.theme-card figcaption em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(226, 164, 92, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
}
.theme-card.is-pro { border-color: rgba(226, 164, 92, 0.28); }

@media (max-width: 960px) {
  .demo-section { grid-template-columns: 1fr; gap: 32px; }
  .card-row { grid-template-columns: 1fr; gap: 32px; }
  .theme-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .theme-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-art img { aspect-ratio: 1 / 1; }
}

/* ------------------------------------------ live theme preview in the hero */

.hero-preview {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(226, 164, 92, 0.3);
  background: var(--panel, #18253d);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}
.preview-world {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.preview-cal { padding: 16px 18px 12px; background: var(--panel, #18253d); }
.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--paper, #f6ead2);
}
.preview-head span:first-child { font-family: var(--serif); font-size: 17px; }
.preview-head span:last-child { opacity: 0.6; }
.preview-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.preview-door {
  height: 54px;
  border-radius: 999px 999px 5px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid transparent;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.preview-door.is-light { background: var(--paper, #f6ead2); color: var(--ink, #0d1626); }
.preview-door.is-dark { background: var(--soft, #2b3a57); color: var(--paper, #f6ead2); }
.preview-door.is-filled { box-shadow: inset 0 0 0 1.5px var(--accent, #e2a45c); }
.preview-num { font-family: var(--serif); font-size: 12px; opacity: 0.7; line-height: 1; }
.preview-motif { width: 14px; height: 14px; color: var(--accent, #e2a45c); }
.preview-motif svg { width: 100%; height: 100%; display: block; }
.preview-caption {
  display: block;
  padding: 10px 18px 12px;
  font-size: 12px;
  color: rgba(242, 234, 217, 0.6);
  background: var(--panel, #18253d);
}
.preview-caption span { color: var(--accent, #e2a45c); }

/* ------------------------------------------------------- closing art band */

.cta-final {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-align: center;
}
.cta-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(0.9);
}
.cta-final::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.55), rgba(16, 26, 46, 0.92));
}
.cta-inner { position: relative; z-index: 1; padding: 72px 24px; }
.cta-inner h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; margin-bottom: 14px; }
.cta-inner p { color: var(--muted); margin-bottom: 26px; }

/* ------------------------------------------------------------ my calendars */

.mine-main { max-width: 860px; margin: 0 auto; padding: 32px 24px 80px; }
.mine-group { margin-top: 44px; }
.mine-group h2 { font-size: 22px; margin-bottom: 14px; }
.mine-list { display: grid; gap: 10px; }
.mine-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mine-card:hover { border-color: rgba(226, 164, 92, 0.5); transform: translateY(-1px); }
.mine-name { font-family: var(--serif); font-size: 20px; }
.mine-meta { grid-column: 1; font-size: 13px; color: var(--muted); }
.mine-badge {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(226, 164, 92, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
}
@media (max-width: 640px) {
  .cta-inner { padding: 56px 20px; }
}

/* --------------------------------------------------------- quick steps */

.quicksteps { max-width: var(--max); margin: 0 auto; padding: 34px 24px 26px; border-top: 1px solid var(--line); }
.quicksteps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.quicksteps li { display: flex; gap: 12px; align-items: flex-start; }
.qs-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  margin-top: 2px;
}
.quicksteps strong { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.quicksteps p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------- first run */

.firstrun {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 16px;
  padding: 20px;
  margin: 0 0 22px;
}
.firstrun-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.firstrun-head h2 { font-size: 22px; }
.firstrun-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.firstrun-steps { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 8px; }
.firstrun-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.firstrun-steps span {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}
.firstrun .share-bar { justify-content: flex-start; margin-top: 0; }

.guest-hint { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 16px; }

@media (max-width: 960px) {
  .quicksteps ol { grid-template-columns: 1fr; gap: 14px; }
  .quicksteps { padding-top: 24px; }
}

/* -------------------------------------------------------- one-line flow */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
  font-size: 14px;
  color: var(--text);
  margin: -8px 0 22px;
}
.flow-step + .flow-step::before {
  content: '→';
  color: var(--accent);
  margin: 0 8px;
}

/* ------------------------------------------------- mobile refinements */

@media (max-width: 640px) {
  .site-head { padding: 14px 18px; gap: 12px; }
  .hero { padding: 10px 18px 44px; gap: 28px; }
  .hero h1 { font-size: 2.05rem; line-height: 1.06; margin-bottom: 14px; }
  .lede { font-size: 16px; margin-bottom: 14px; }
  .flow { font-size: 12.5px; margin: -2px 0 18px; row-gap: 4px; }
  .flow-step + .flow-step::before { margin: 0 5px; }
  .theme-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .theme-chip { justify-content: flex-start; padding: 8px 10px; }
  .themes-note { margin-top: 8px; }
  section { padding: 48px 18px; }
  .preview-door { height: 46px; }
  .preview-num { font-size: 11px; }
  .preview-motif { width: 12px; height: 12px; }
  .cta-inner { padding: 48px 18px; }
  .mine-main { padding: 20px 18px 64px; }
  .sample .note-bubble p { font-size: 16px; }
  .faq-item summary { font-size: 18px; padding-right: 28px; }
}

@media (max-width: 640px) {
  /* keep the preview compact so the form stays near the first screen */
  .hero-preview { border-radius: 14px; }
  .preview-world { aspect-ratio: 2.4 / 1; object-position: 50% 55%; }
  .preview-door { height: 40px; }
  .preview-cal { padding: 12px 14px 10px; }
  .preview-head { margin-bottom: 8px; font-size: 11px; }
  .preview-head span:first-child { font-size: 15px; }
  .preview-caption { padding: 8px 14px 10px; font-size: 11px; }
}

@media (max-width: 379px) {
  .theme-row { grid-template-columns: 1fr; }
  .theme-chip { min-width: 0; }
}

/* --------------------------------------------------- locked Pro theme */

.theme-lock {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 20px;
}
.theme-lock p { margin: 0; font-size: 14px; color: var(--muted); max-width: 56ch; }
.theme-lock strong { color: var(--text); }

.theme-lock-art { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 64px; }
.theme-lock-copy { flex: 1 1 220px; display: grid; gap: 10px; }
.theme-lock-copy p { margin: 0; }
@media (max-width: 640px) {
  .theme-lock { align-items: flex-start; }
  .theme-lock-art { width: 52px; height: 52px; flex-basis: 52px; }
}

/* ------------------------------------------------------------- ad slots */

.ad-slot {
  max-width: 860px;
  margin: 8px auto 0;
  padding: 0 24px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.ad-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(168, 178, 196, 0.5);
}
.ad-frame {
  width: 100%;
  min-height: 100px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.ad-frame:empty { display: none; }
@media (max-width: 640px) {
  .ad-slot { padding: 0 18px; }
  .ad-frame { min-height: 100px; }
}
