/* ==========================================================================
   Noella — design system
   Mobile-first. Night blue, pine, cream, champagne gold, a careful ruby.
   ========================================================================== */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/fraunces-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/fraunces-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 600; font-display: swap; src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 600; font-display: swap; src: url("../fonts/fraunces-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night-950: #060a1a;
  --night-900: #0a1029;
  --night-850: #0d1534;
  --night-800: #111b40;
  --night-700: #18244f;
  --night-600: #223164;
  --night-500: #34467f;
  --pine-800: #0f3127;
  --pine-600: #1b5b45;
  --pine-500: #23704f;
  --pine-300: #6aa98c;
  --cream-50: #fffaf1;
  --cream-100: #fbf3e3;
  --cream-200: #f3e6cb;
  --cream-300: #e6d3ad;
  --gold-200: #f6e6bd;
  --gold-300: #f0d495;
  --gold-400: #e7c071;
  --gold-500: #d4a647;
  --gold-600: #ad8131;
  --ruby-300: #f08a98;
  --ruby-400: #df5568;
  --ruby-500: #c8364a;
  --ruby-600: #a2263a;
  --ink-900: #1a1630;
  --ink-700: #3a3552;

  --text: #f5eedf;
  --text-soft: #c9cbe0;
  --text-mute: #9aa1c2;
  --line: rgba(240, 212, 149, .16);
  --line-strong: rgba(240, 212, 149, .3);
  --surface: rgba(19, 29, 68, .72);
  --surface-2: rgba(28, 40, 86, .78);
  --surface-solid: #141f49;
  --focus: #f6e6bd;
  --danger: #ff8d9c;
  --success: #8fd9b6;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 10px 30px -12px rgba(2, 4, 16, .55);
  --shadow-lift: 0 24px 60px -20px rgba(2, 4, 16, .75);
  --glow-gold: 0 0 0 1px rgba(240, 212, 149, .35), 0 10px 40px -10px rgba(231, 192, 113, .45);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --header-h: 64px;
  --page-pad: clamp(16px, 4.5vw, 40px);
  color-scheme: dark;
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--night-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-300); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-200); }
h1, h2, h3, h4 { font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3.4vw, 1.45rem); }
p { margin: 0 0 1em; }
::selection { background: rgba(240, 212, 149, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cream-100); color: var(--ink-900); padding: 10px 16px; border-radius: 999px; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Page backdrop: deep night with a warm horizon ─────────────────── */
.backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(52, 70, 127, .55), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(27, 91, 69, .28), transparent 60%),
    radial-gradient(1000px 520px at 50% 115%, rgba(212, 166, 71, .14), transparent 65%),
    linear-gradient(180deg, var(--night-950) 0%, var(--night-900) 45%, var(--night-850) 100%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 8%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 22%, rgba(255,246,220,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 28%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 9%, rgba(255,246,220,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 42%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 38%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 47%, rgba(255,255,255,.35) 50%, transparent 51%);
  opacity: .9;
}
.snow-canvas { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100%; height: 100%; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--page-pad); }
.container-narrow { max-width: 760px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: center; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
main { display: block; }
.section { padding: clamp(56px, 10vw, 112px) 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.lead { font-size: clamp(1.02rem, 2.6vw, 1.2rem); color: var(--text-soft); max-width: 60ch; }
.muted { color: var(--text-mute); }
.small { font-size: .875rem; }
.center { text-align: center; }
.serif { font-family: var(--font-display); }
.gold-text { color: var(--gold-300); }
em.flourish { font-style: italic; font-weight: 400; color: var(--gold-300); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(6, 10, 26, .82), rgba(6, 10, 26, .55));
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(240, 212, 149, .08);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cream-50); text-decoration: none; font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; letter-spacing: .01em; }
.brand:hover { color: var(--cream-50); }
.brand img, .brand svg { width: 30px; height: 30px; }
.brand em { font-style: italic; color: var(--gold-300); font-weight: 400; }
.nav { display: none; align-items: center; gap: 6px; }
.nav a { color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream-50); background: rgba(240, 212, 149, .08); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--cream-50); }
.menu-toggle .icon { width: 22px; height: 22px; }
@media (min-width: 900px) { .nav { display: flex; } .menu-toggle { display: none; } }
.hide-mobile, .btn.hide-mobile { display: none; }
@media (min-width: 600px) { .hide-mobile, .btn.hide-mobile { display: inline-flex; } }
/* Wide screens show everything in the header; the menu button is for phones and tablets. */
.show-desktop { display: none; }
@media (min-width: 900px) { .show-desktop { display: inline-flex; } .hide-desktop, .btn.hide-desktop { display: none; } }
.header-actions .btn { white-space: nowrap; }

.bell-link { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--cream-100); border: 1px solid var(--line); }
.bell-link .icon { width: 20px; height: 20px; }
.bell-dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ruby-500); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--night-900); }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; visibility: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(3, 5, 14, .6); opacity: 0; transition: opacity .3s var(--ease); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: relative; width: min(86vw, 360px); height: 100%; background: linear-gradient(180deg, var(--night-800), var(--night-900)); border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 6px; transform: translateX(100%); transition: transform .35s var(--ease); overflow-y: auto; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__panel a:not(.btn) { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; color: var(--cream-100); text-decoration: none; font-weight: 600; }
.drawer__panel a:not(.btn):hover { background: rgba(240, 212, 149, .08); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer__panel .btn { margin-top: 8px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: rgba(255, 255, 255, .06);
  --btn-fg: var(--cream-50);
  --btn-border: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; letter-spacing: .005em; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary {
  --btn-fg: #2a1d07;
  --btn-border: transparent;
  background: linear-gradient(180deg, #f8e3b0 0%, var(--gold-400) 55%, #cf9f45 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 28px -10px rgba(231, 192, 113, .7);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 16px 36px -12px rgba(231, 192, 113, .85); }
.btn-ruby { --btn-fg: #fff6f2; --btn-border: transparent; background: linear-gradient(180deg, var(--ruby-400), var(--ruby-600)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 26px -12px rgba(200, 54, 74, .8); }
.btn-ghost { --btn-bg: transparent; --btn-border: var(--line-strong); }
.btn-ghost:hover { --btn-bg: rgba(240, 212, 149, .08); }
.btn-quiet { --btn-bg: transparent; --btn-border: transparent; padding-inline: 12px; color: var(--text-soft); }
.btn-quiet:hover { --btn-bg: rgba(255,255,255,.05); }
.btn-danger { --btn-bg: rgba(200, 54, 74, .12); --btn-border: rgba(240, 138, 152, .45); --btn-fg: #ffc3cb; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 16px 28px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-google { --btn-bg: #fff; --btn-fg: #1f1f1f; --btn-border: #dadce0; font-family: Roboto, var(--font-body); font-weight: 600; }
.btn-google:hover { --btn-bg: #f7f8f8; }
.btn-google svg { width: 20px; height: 20px; }

/* ── Cards & surfaces ───────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(28, 40, 86, .66), rgba(17, 27, 64, .72));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.card-cream { background: linear-gradient(180deg, var(--cream-50), var(--cream-100)); color: var(--ink-900); border-color: rgba(173, 129, 49, .25); }
.card-cream .muted { color: #6b6455; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: rgba(240, 212, 149, .12); color: var(--gold-200); border: 1px solid rgba(240, 212, 149, .2); white-space: nowrap; }
.badge-ruby { background: rgba(200, 54, 74, .16); color: #ffc3cb; border-color: rgba(240, 138, 152, .3); }
.badge-pine { background: rgba(35, 112, 79, .2); color: #a8e3c7; border-color: rgba(106, 169, 140, .35); }
.badge-ice { background: rgba(159, 210, 234, .14); color: #cdebf8; border-color: rgba(159, 210, 234, .3); }

/* ── Forms ──────────────────────────────────────────────────────────── */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 18px; }
.label { font-weight: 700; font-size: .92rem; color: var(--cream-100); }
.hint { font-size: .85rem; color: var(--text-mute); }
.input, .textarea, .select {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(240, 212, 149, .22);
  background: rgba(6, 10, 26, .45);
  color: var(--cream-50);
  font-size: 16px; /* prevents iOS zoom */
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--gold-300) 50%), linear-gradient(135deg, var(--gold-300) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input::placeholder, .textarea::placeholder { color: rgba(201, 203, 224, .55); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--gold-300); box-shadow: 0 0 0 4px rgba(240, 212, 149, .15); background: rgba(6, 10, 26, .6); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--ruby-300); box-shadow: 0 0 0 4px rgba(223, 85, 104, .15); }
.field-error { color: var(--danger); font-size: .86rem; font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.field-error:empty { display: none; }
.counter { font-size: .8rem; color: var(--text-mute); text-align: right; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--gold-300); }
.counter.is-over { color: var(--danger); font-weight: 700; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold-400); }
.radio-cards { display: grid; gap: 10px; }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(6, 10, 26, .3); cursor: pointer; transition: border-color .2s, background .2s; }
.radio-card:has(input:checked) { border-color: var(--gold-300); background: rgba(240, 212, 149, .08); }
.radio-card input { margin-top: 3px; accent-color: var(--gold-400); width: 18px; height: 18px; flex: none; }
.radio-card strong { display: block; }
.input-group { display: flex; align-items: stretch; border-radius: 14px; border: 1px solid rgba(240, 212, 149, .22); background: rgba(6, 10, 26, .45); overflow: hidden; }
.input-group:focus-within { border-color: var(--gold-300); box-shadow: 0 0 0 4px rgba(240, 212, 149, .15); }
.input-group .prefix { display: flex; align-items: center; padding: 0 4px 0 14px; color: var(--text-mute); white-space: nowrap; font-size: .95rem; }
.input-group .input { border: 0; background: transparent; box-shadow: none; padding-left: 2px; min-width: 0; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── Alerts, toasts ─────────────────────────────────────────────────── */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(240, 212, 149, .07); color: var(--cream-100); font-size: .95rem; }
.alert .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-300); }
.alert-error { background: rgba(200, 54, 74, .12); border-color: rgba(240, 138, 152, .35); }
.alert-error .icon { color: var(--ruby-300); }
.alert-success { background: rgba(35, 112, 79, .16); border-color: rgba(106, 169, 140, .4); }
.alert-success .icon { color: var(--success); }
.flash-stack { display: grid; gap: 10px; margin: 16px 0; }
.toast-region { position: fixed; z-index: 90; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: rgba(13, 21, 52, .96); border: 1px solid var(--line-strong); color: var(--cream-50); box-shadow: var(--shadow-lift); font-weight: 600; font-size: .95rem; animation: toast-in .4s var(--ease); }
.toast .icon { width: 20px; height: 20px; color: var(--gold-300); }
.toast.is-error .icon { color: var(--ruby-300); }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 95; background: var(--ruby-600); color: #fff; text-align: center; font-size: .85rem; font-weight: 700; padding: 6px 12px; transform: translateY(-100%); transition: transform .3s; }
.offline-bar.is-visible { transform: none; }

/* ── Sheet / modal (bottom sheet on phones, dialog on desktop) ─────── */
.sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; pointer-events: none; }
.sheet.is-open { visibility: visible; pointer-events: auto; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(3, 5, 14, .66); opacity: 0; transition: opacity .3s var(--ease); }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel {
  position: relative; width: 100%; max-height: 92dvh; max-height: 92vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #17224f, var(--night-850));
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-lift);
  transform: translateY(104%);
  transition: transform .42s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { width: 44px; height: 5px; border-radius: 99px; background: rgba(240, 212, 149, .3); margin: 10px auto 0; flex: none; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 8px; flex: none; }
.sheet__head h2 { font-size: 1.3rem; margin: 0; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; -webkit-overflow-scrolling: touch; }
.sheet__foot { flex: none; padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: rgba(10, 16, 41, .6); }
.sheet__foot .btn { flex: 1; }
.sheet--cream .sheet__panel { background: linear-gradient(180deg, var(--cream-50), var(--cream-100)); color: var(--ink-900); border-color: rgba(173, 129, 49, .3); }
.sheet--cream .sheet__grip { background: rgba(58, 53, 82, .2); }
@media (min-width: 720px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet__panel { max-width: 560px; border-radius: 28px; border-bottom: 1px solid var(--line); transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .25s; }
  .sheet.is-open .sheet__panel { transform: none; opacity: 1; }
  .sheet__grip { display: none; }
  .sheet__head { padding-top: 20px; }
}
body.has-sheet { overflow: hidden; }

/* ── Tabs / segmented ──────────────────────────────────────────────── */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(6, 10, 26, .5); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a, .segmented button { flex: none; border: 0; background: transparent; color: var(--text-soft); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.segmented [aria-current="page"], .segmented [aria-selected="true"] { background: var(--cream-100); color: var(--ink-900); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-soft); border-radius: 999px; padding: 8px 14px; font-size: .88rem; font-weight: 700; min-height: 40px; }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--cream-100); color: var(--ink-900); border-color: var(--cream-100); }

/* ── Empty states & skeletons ───────────────────────────────────────── */
.empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 10px; }
.empty img, .empty svg { width: 120px; height: 120px; opacity: .95; }
.empty h3 { margin: 6px 0 0; }
.empty p { color: var(--text-mute); max-width: 42ch; margin: 0; }
.skeleton { position: relative; overflow: hidden; background: rgba(255, 255, 255, .06); border-radius: 12px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid rgba(240, 212, 149, .1); padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); margin-top: 40px; color: var(--text-mute); font-size: .92rem; background: linear-gradient(180deg, transparent, rgba(6, 10, 26, .6)); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 12px; font-weight: 800; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--cream-50); text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(240, 212, 149, .08); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { position: relative; padding: 28px 0 40px; overflow: hidden; }
.hero__grid { display: grid; gap: 24px; align-items: center; }
.hero__copy { position: relative; z-index: 2; text-align: center; animation: rise .9s var(--ease) both; }
.hero__copy h1 { margin-bottom: 18px; font-weight: 400; }
.hero__copy .lead { margin: 0 auto 26px; }
.hero__ctas { display: grid; gap: 12px; justify-content: center; }
.hero__ctas .btn { width: min(100%, 340px); }
.hero__note { margin-top: 18px; font-size: .85rem; color: var(--text-mute); display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hero__note .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-400); opacity: .7; }
.hero__stage { position: relative; display: grid; place-items: center; animation: rise 1.1s .15s var(--ease) both; }
.hero__stage::before { content: ""; position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(231, 192, 113, .22), transparent 62%); filter: blur(10px); }
.hero__tree { position: relative; width: min(92vw, 470px); aspect-ratio: 400 / 560; }
.hero__tree svg { width: 100%; height: 100%; }
.hero__floating { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 18px; background: rgba(255, 250, 241, .95); color: var(--ink-900); box-shadow: var(--shadow-lift); font-size: .82rem; line-height: 1.35; max-width: 210px; animation: float 6s ease-in-out infinite; }
.hero__floating img { width: 44px; height: 44px; flex: none; }
.hero__floating strong { display: block; font-size: .78rem; color: var(--ruby-600); }
.hero__floating.f1 { left: -2%; top: 18%; }
.hero__floating.f2 { right: -2%; bottom: 20%; animation-delay: -3s; }
@media (max-width: 520px) { .hero__floating { display: none; } }
@media (min-width: 960px) {
  .hero { padding: 48px 0 80px; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 40px; }
  .hero__copy { text-align: left; }
  .hero__copy .lead { margin-left: 0; }
  .hero__ctas { justify-content: start; grid-auto-flow: column; }
  .hero__ctas .btn { width: auto; white-space: nowrap; }
  .hero__note { justify-content: flex-start; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes float { 50% { transform: translateY(-10px); } }

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { position: relative; padding: 26px 22px 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(28, 40, 86, .5), rgba(17, 27, 64, .3)); }
.step__num { font-family: var(--font-display); font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--gold-300); margin-bottom: 14px; display: block; }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-soft); }
.step__art { position: absolute; right: 18px; top: 18px; width: 64px; height: 64px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.ribbon { display: flex; gap: 16px; overflow-x: auto; padding: 10px var(--page-pad) 26px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ribbon::-webkit-scrollbar { display: none; }
.wish-card { flex: none; width: min(78vw, 300px); scroll-snap-align: center; padding: 22px 20px 20px; border-radius: 22px; background: linear-gradient(180deg, var(--cream-50), var(--cream-100)); color: var(--ink-900); box-shadow: var(--shadow-soft); position: relative; }
.wish-card:nth-child(even) { transform: rotate(1.2deg); }
.wish-card:nth-child(odd) { transform: rotate(-1deg); }
.wish-card img { width: 76px; height: 76px; margin: -46px 0 6px auto; }
.wish-card p { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.45; margin-bottom: 14px; }
.wish-card .from { font-size: .82rem; font-weight: 700; color: var(--ruby-600); }

.feature-split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .feature-split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.capsule-card { position: relative; padding: 28px; border-radius: 28px; background: linear-gradient(160deg, #1d2a5c, #10183c); border: 1px solid var(--line-strong); overflow: hidden; box-shadow: var(--shadow-lift); }
.capsule-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(231, 192, 113, .3), transparent 65%); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0; }
.countdown div { text-align: center; padding: 12px 4px; border-radius: 14px; background: rgba(6, 10, 26, .45); border: 1px solid var(--line); }
.countdown strong { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 500; color: var(--cream-50); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); }

.trust { display: grid; gap: 14px; }
.trust__item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.trust__item .icon { width: 26px; height: 26px; color: var(--gold-300); margin-top: 2px; }
.trust__item h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 800; margin: 0 0 4px; }
.trust__item p { margin: 0; color: var(--text-soft); font-size: .93rem; }
@media (min-width: 820px) { .trust { grid-template-columns: repeat(3, 1fr); } }

.section-head { margin-bottom: 36px; }
.section-head h2 { max-width: 22ch; margin-inline: auto; }
.trust--single { list-style: none; padding: 0; margin: 22px 0 0; grid-template-columns: 1fr !important; }
.capsule-quote { font-family: var(--font-display); font-style: italic; font-size: 1.12rem; line-height: 1.5; color: var(--cream-100); margin: 0 0 20px; position: relative; z-index: 1; }
.capsule-card > * { position: relative; z-index: 1; }
.brand-mark-center { width: 64px; height: 64px; margin: 0 auto 16px; }
.center-block { margin-inline: auto; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.final-cta { text-align: center; padding: clamp(40px, 8vw, 72px) 22px; border-radius: 34px; border: 1px solid var(--line-strong); background: radial-gradient(600px 300px at 50% 0%, rgba(231, 192, 113, .18), transparent 70%), linear-gradient(180deg, rgba(28, 40, 86, .7), rgba(13, 21, 52, .7)); }
.final-cta h2 { max-width: 20ch; margin-inline: auto; }

/* ==========================================================================
   Tree scene (shared by public page, editor, previews)
   ========================================================================== */
.tree-scene { position: relative; width: 100%; aspect-ratio: 400 / 560; border-radius: 28px; overflow: hidden; isolation: isolate; box-shadow: var(--shadow-lift); background: var(--night-800); }
.tree-scene > svg { width: 100%; height: 100%; }
.tree-scene .scene-snow { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; }
.tree-svg .orn-msg { cursor: pointer; }
.tree-svg .orn-msg:focus { outline: none; }
.tree-svg .orn-msg:focus-visible .orn-ring, .tree-svg .orn-msg:hover .orn-ring { opacity: 1; }
.tree-svg .orn-ring { opacity: 0; transition: opacity .2s; }
.tree-svg .orn-body { transition: transform .25s var(--ease); transform-box: fill-box; transform-origin: 50% 0%; }
.tree-svg .orn-msg:hover .orn-body, .tree-svg .orn-msg:focus-visible .orn-body { transform: scale(1.12) rotate(-3deg); }
.tree-svg .orn-swing { transform-box: fill-box; transform-origin: 50% 0%; animation: swing 5s ease-in-out infinite; }
/* Neon glow behind every wish ornament */
.tree-svg .orn-halo { opacity: .5; mix-blend-mode: screen; pointer-events: none; }
.tree-svg .orn-halo.is-live { transform-box: fill-box; transform-origin: center; animation: orn-neon 3.2s ease-in-out infinite; }
.tree-svg .orn-spark { opacity: .85; pointer-events: none; }
.tree-svg .orn-spark.is-live { transform-box: fill-box; transform-origin: center; animation: orn-twinkle 4s ease-in-out infinite; opacity: 0; }
.tree-svg .orn-msg:hover .orn-halo, .tree-svg .orn-msg:focus-visible .orn-halo { opacity: 1; }
@keyframes orn-neon { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .8; transform: scale(1.08); } }
@keyframes orn-twinkle { 0%, 70%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 82% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
.tree-svg .orn-new { animation: orn-drop .9s var(--ease) both; transform-box: fill-box; transform-origin: 50% 0%; }
.tree-svg .bulb { animation: twinkle 3.2s ease-in-out infinite; }
.tree-svg .bulb-glow { animation: glow 3.2s ease-in-out infinite; }
.tree-svg .topper-glow { animation: glow 4s ease-in-out infinite; }
.tree-svg .slot-hint { fill: rgba(255, 246, 220, .12); stroke: rgba(255, 246, 220, .7); stroke-width: 1.5; stroke-dasharray: 3 3; cursor: pointer; transition: fill .2s; }
.tree-svg .slot-hint:hover, .tree-svg .slot-hint:focus-visible { fill: rgba(255, 246, 220, .35); outline: none; }
.tree-svg .orn-selected .orn-ring { opacity: 1; }
.tree-svg .unread-dot { animation: pulse 1.8s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes orn-drop { 0% { opacity: 0; transform: translateY(-40px) scale(.6); } 60% { opacity: 1; transform: translateY(4px) scale(1.06); } 100% { transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes glow { 0%, 100% { opacity: .9; } 50% { opacity: .45; } }
@keyframes pulse { 50% { opacity: .35; } }

/* Public tree page */
.tree-page { padding-top: 12px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.tree-page__layout { display: grid; gap: 22px; align-items: start; }
.tree-head { text-align: center; padding: 6px 0 4px; }
.tree-head h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); margin-bottom: 6px; overflow-wrap: anywhere; font-weight: 400; }
.tree-head p { color: var(--text-soft); margin: 0 auto 12px; max-width: 44ch; overflow-wrap: anywhere; }
.tree-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tree-stage { position: relative; width: min(100%, 520px); margin: 0 auto; }
.tree-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; color: var(--text-soft); font-size: .9rem; font-weight: 700; }
.tree-actions-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px var(--page-pad) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(6, 10, 26, 0), rgba(6, 10, 26, .9) 35%); display: flex; gap: 10px; justify-content: center; }
.tree-actions-bar .btn-primary { flex: 1; max-width: 420px; }
.tree-side { display: none; }
@media (min-width: 1000px) {
  .tree-page { padding-bottom: 48px; }
  .tree-page__layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
  .tree-side { display: block; position: sticky; top: calc(var(--header-h) + 20px); }
  .tree-actions-bar { position: static; background: none; padding: 0; margin-top: 18px; }
  .tree-head { text-align: left; }
  .tree-meta { justify-content: flex-start; }
}
.owner-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: rgba(240, 212, 149, .08); border: 1px solid var(--line); margin-bottom: 14px; font-size: .9rem; }

/* In-app browser hint */
.iab-hint { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255, 250, 241, .96); color: var(--ink-900); margin: 10px 0 6px; box-shadow: var(--shadow-soft); font-size: .88rem; line-height: 1.4; }
.iab-hint strong { display: block; font-size: .92rem; }
.iab-hint .btn { --btn-fg: var(--ink-900); --btn-border: rgba(26, 22, 48, .2); min-height: 38px; padding: 8px 12px; font-size: .84rem; flex: none; }
.iab-hint__close { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-700); display: grid; place-items: center; }

/* Message reader card */
.reader { position: relative; padding: 26px 22px 22px; border-radius: 22px; background: linear-gradient(180deg, var(--cream-50), #f8edd6); color: var(--ink-900); box-shadow: inset 0 0 0 1px rgba(173, 129, 49, .2); }
.reader__sticker { width: 104px; height: 104px; margin: -10px auto 8px; }
.reader__body { font-family: var(--font-display); font-size: clamp(1.1rem, 4.4vw, 1.3rem); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; }
.reader__from { font-weight: 800; color: var(--ruby-600); font-size: .92rem; overflow-wrap: anywhere; }
.reader__date { font-size: .8rem; color: #7a7262; }
.reader__locked { text-align: center; padding: 10px 0; }
.reader__locked .lock { width: 64px; height: 64px; margin: 0 auto 10px; color: var(--gold-600); }
.reader__locked h3 { color: var(--ink-900); }
.reader__locked p { color: #5f584b; margin: 0; }

/* Message composer */
.composer { display: grid; gap: 18px; }
.composer .textarea { min-height: 130px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.sticker-btn { position: relative; aspect-ratio: 1; border-radius: 18px; border: 2px solid transparent; background: rgba(255,255,255,.04); padding: 6px; display: grid; place-items: center; transition: border-color .15s, background .15s, transform .15s; }
.sticker-btn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sticker-btn:hover { background: rgba(255,255,255,.08); }
.sticker-btn[aria-pressed="true"] { border-color: var(--gold-300); background: rgba(240, 212, 149, .12); transform: scale(1.03); }
.sticker-btn[aria-pressed="true"]::after { content: ""; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a1d07' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.sticker-none { font-size: .78rem; font-weight: 700; color: var(--text-mute); text-align: center; line-height: 1.2; }
.ornament-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; padding-bottom: 6px; }
.orn-opt { width: 100%; aspect-ratio: 1; height: auto; border-radius: 16px; border: 2px solid var(--line); background: rgba(6, 10, 26, .35); display: grid; place-items: center; padding: 6px; }
.orn-opt svg { width: 40px; height: 40px; }
.orn-opt[aria-pressed="true"] { border-color: var(--gold-300); background: rgba(240, 212, 149, .12); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); position: relative; box-shadow: inset 0 -6px 10px rgba(0,0,0,.25), inset 0 4px 8px rgba(255,255,255,.35); }
.swatch[aria-pressed="true"] { border-color: var(--cream-50); box-shadow: 0 0 0 3px var(--gold-400), inset 0 -6px 10px rgba(0,0,0,.25); }
.preview-card { border-radius: 20px; padding: 18px; background: linear-gradient(180deg, var(--cream-50), #f8edd6); color: var(--ink-900); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.preview-card p { font-family: var(--font-display); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; font-size: 1.05rem; line-height: 1.5; }
.preview-card .from { font-weight: 800; color: var(--ruby-600); font-size: .85rem; overflow-wrap: anywhere; }
.preview-card img { width: 72px; height: 72px; }
.success-burst { text-align: center; padding: 18px 6px 6px; }
.success-burst svg { width: 140px; height: 140px; margin: 0 auto 6px; }
.success-burst h2 { margin-bottom: 8px; }
.composer-steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 4px; }
.composer-steps span { width: 28px; height: 4px; border-radius: 4px; background: rgba(240, 212, 149, .2); transition: background .3s; }
.composer-steps span.is-active { background: var(--gold-300); }

/* List fallback for ornaments (accessibility) */
.wish-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wish-list button { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--cream-50); min-height: 52px; }
.wish-list svg { width: 30px; height: 30px; flex: none; }

/* ==========================================================================
   Panel (signed-in area)
   ========================================================================== */
.panel-shell { padding-top: 20px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin: 0; font-weight: 400; }
.panel-head p { margin: 4px 0 0; color: var(--text-soft); }
.panel-tabs { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: rgba(8, 13, 34, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.panel-tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; padding: 6px 1px; color: var(--text-mute); text-decoration: none; font-size: .66rem; font-weight: 700; border-radius: 12px; min-height: 52px; position: relative; min-width: 0; }
.panel-tabs a > span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-tabs a .icon { width: 22px; height: 22px; }
.panel-tabs a[aria-current="page"] { color: var(--gold-200); }
.panel-tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -6px; width: 26px; height: 3px; border-radius: 3px; background: var(--gold-300); }
.panel-tabs .count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ruby-500); color: #fff; font-size: .66rem; display: grid; place-items: center; }
@media (min-width: 900px) {
  .panel-shell { padding-bottom: 48px; }
  .panel-tabs { position: static; display: flex; gap: 6px; background: transparent; border: 0; padding: 0 0 24px; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .panel-tabs a { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; padding: 10px 16px; min-height: 44px; border: 1px solid transparent; }
  .panel-tabs a .icon { width: 18px; height: 18px; }
  .panel-tabs a[aria-current="page"] { background: rgba(240, 212, 149, .1); border-color: var(--line); }
  .panel-tabs a[aria-current="page"]::before { display: none; }
  .panel-tabs .count { position: static; }
}
.dash-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.dash-grid > *, .stack > * { min-width: 0; }
.card .segmented { display: flex; width: 100%; }
.card .segmented button, .card .segmented a { flex: 1 0 auto; justify-content: center; }
@media (min-width: 960px) { .dash-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 12px; border-radius: 16px; background: rgba(6, 10, 26, .35); border: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; line-height: 1.1; color: var(--cream-50); }
.stat span { font-size: .78rem; color: var(--text-mute); font-weight: 700; }
.share-box { display: grid; gap: 10px; }
.share-url { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(6, 10, 26, .5); border: 1px solid var(--line); min-width: 0; }
.share-url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-body); font-size: .9rem; color: var(--gold-200); }
.mini-tree { width: 100%; max-width: 300px; margin: 0 auto; }

.msg-list { display: grid; gap: 12px; }
.msg-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(28, 40, 86, .55), rgba(17, 27, 64, .55)); border: 1px solid var(--line); position: relative; }
.msg-item.is-unread { border-color: rgba(240, 212, 149, .45); box-shadow: inset 3px 0 0 var(--gold-400); }
.msg-item__orn { width: 44px; height: 44px; }
.msg-item__body { min-width: 0; }
.msg-item__text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 10px; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; color: var(--cream-50); }
.msg-item__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--text-mute); }
.msg-item__from { font-weight: 800; color: var(--gold-200); overflow-wrap: anywhere; }
.msg-item__sticker { float: right; width: 64px; height: 64px; margin: -4px 0 6px 10px; }
.msg-item__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-item.is-removing { animation: remove .35s var(--ease) forwards; }
@keyframes remove { to { opacity: 0; transform: translateX(20px); } }
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Capsules */
.capsule-list { display: grid; gap: 12px; }
.capsule-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.capsule-item__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(240, 212, 149, .12); color: var(--gold-300); }
.capsule-item__icon .icon { width: 24px; height: 24px; }
.capsule-item h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 800; margin: 0 0 2px; overflow-wrap: anywhere; }
.capsule-item p { margin: 0; font-size: .85rem; color: var(--text-mute); }
.capsule-letter { padding: clamp(24px, 6vw, 44px); border-radius: 26px; background: linear-gradient(180deg, var(--cream-50), #f6ead1); color: var(--ink-900); box-shadow: var(--shadow-lift); position: relative; }
.capsule-letter__body { font-family: var(--font-display); font-size: clamp(1.1rem, 4vw, 1.35rem); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.capsule-letter__meta { color: #7a7262; font-size: .88rem; margin-top: 20px; }

/* Editor */
.editor { display: grid; gap: 0; }
.editor__preview { position: sticky; top: var(--header-h); z-index: 5; padding: 10px 0 12px; background: linear-gradient(180deg, var(--night-900) 80%, transparent); }
.editor__preview .tree-scene { max-width: 340px; margin: 0 auto; }
.editor__panel { background: linear-gradient(180deg, rgba(28, 40, 86, .66), rgba(17, 27, 64, .72)); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; }
.editor__tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 0; }
.editor__tabs::-webkit-scrollbar { display: none; }
.editor__tabs button { flex: none; border: 0; background: transparent; color: var(--text-soft); padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; min-height: 40px; }
.editor__tabs button[aria-selected="true"] { background: var(--cream-100); color: var(--ink-900); }
.editor__pane { padding: 18px; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.option { border: 2px solid var(--line); background: rgba(6, 10, 26, .35); border-radius: 18px; padding: 8px; display: grid; gap: 6px; justify-items: center; color: var(--text-soft); font-weight: 700; font-size: .8rem; text-align: center; line-height: 1.25; min-height: 44px; transition: border-color .15s, background .15s; }
.option svg { width: 100%; height: 72px; border-radius: 12px; }
.option[aria-pressed="true"] { border-color: var(--gold-300); background: rgba(240, 212, 149, .1); color: var(--cream-50); }
.editor__save { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(10, 16, 41, .95); border-top: 1px solid var(--line); flex-wrap: wrap; }
.editor__save .status { flex: 1; min-width: 140px; font-size: .85rem; color: var(--text-mute); display: flex; gap: 8px; align-items: center; }
.editor__save .status.is-dirty { color: var(--gold-200); }
.editor__save .status.is-dirty::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); }
.placed-list { display: grid; gap: 8px; margin-top: 12px; }
.placed-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: .88rem; }
.placed-item svg { width: 28px; height: 28px; }
.placed-item .grow { flex: 1; }
@media (min-width: 960px) {
  .editor { grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: start; }
  .editor__preview { position: sticky; top: calc(var(--header-h) + 16px); background: none; padding: 0; }
  .editor__preview .tree-scene { max-width: 520px; }
  .editor__save { position: static; }
  .panel-shell.has-editor { padding-bottom: 32px; }
}

/* Share studio */
.story-frame { width: min(70vw, 280px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lift); background: var(--night-800); }
.story-frame canvas, .story-frame img { width: 100%; height: 100%; }
.howto { counter-reset: how; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.howto li { counter-increment: how; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.howto li::before { content: counter(how); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 212, 149, .14); color: var(--gold-200); font-weight: 800; font-size: .9rem; }

/* Auth & onboarding */
.auth-wrap { min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; padding: 28px var(--page-pad) 60px; }
.auth-card { width: 100%; max-width: 440px; text-align: center; }
.auth-card .brand-mark { width: 72px; height: 72px; margin: 0 auto 14px; }
.legal-note { font-size: .82rem; color: var(--text-mute); margin-top: 18px; }

/* Legal / prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; font-family: var(--font-body); font-weight: 800; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.notice { padding: 14px 16px; border-left: 3px solid var(--gold-400); background: rgba(240, 212, 149, .07); border-radius: 0 12px 12px 0; color: var(--cream-100); font-size: .92rem; }

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.error-page .code { font-family: var(--font-display); font-size: clamp(4rem, 20vw, 7rem); font-style: italic; color: var(--gold-300); line-height: 1; margin-bottom: 10px; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .snow-canvas, .scene-snow { display: none; }
}

.sticker-xl { width: 140px; height: 140px; }
.cluster-center { justify-content: center; }


/* Onboarding & misc */
.onboarding { padding: 28px var(--page-pad) 60px; }
.onboarding__head { text-align: center; margin-bottom: 22px; }
.onboarding__head .lead { margin-inline: auto; }
.fieldset-reset { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.fieldset-reset legend { margin-bottom: 10px; padding: 0; }
.option-radio { cursor: pointer; }
.option-radio:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.auth-title { font-size: clamp(1.7rem, 6vw, 2.2rem); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: rgba(240, 212, 149, .1); padding: 2px 6px; border-radius: 6px; }

.h3 { font-size: 1.3rem; }
.dash-tree { display: grid; gap: 20px; align-items: center; }
@media (min-width: 620px) { .dash-tree { grid-template-columns: 220px 1fr; } }
.dash-tree .mini-tree { max-width: 220px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recent-list li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list .grow { flex: 1; min-width: 0; display: grid; }
.recent-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list small { color: var(--text-mute); font-size: .8rem; }
.recent-orn { width: 34px; height: 34px; flex: none; }
.grow { flex: 1; min-width: 0; }

.editor__hint { text-align: center; margin: 10px auto 0; max-width: 340px; padding: 8px 14px; border-radius: 999px; background: rgba(240, 212, 149, .14); color: var(--gold-200); font-size: .85rem; font-weight: 700; }
.placed-item.is-selected { border-color: var(--gold-300); background: rgba(240, 212, 149, .1); }
.placed-item .btn { min-height: 34px; padding: 6px 10px; font-size: .82rem; }
.textarea-sm { min-height: 88px; }
#editor-tree { touch-action: none; }

/* Tree page details */
.reader-skel-1 { height: 96px; width: 96px; margin: 0 auto 16px; border-radius: 50%; background: rgba(26, 22, 48, .08); }
.reader-skel-2 { height: 18px; margin-bottom: 10px; background: rgba(26, 22, 48, .08); }
.reader-skel-3 { height: 18px; width: 60%; background: rgba(26, 22, 48, .08); }
.reader__orn { display: grid; place-items: center; margin: -4px auto 10px; }
.reader__flag { margin: 14px 0 0; font-size: .84rem; color: #8a3a12; background: #fde6c8; padding: 10px 12px; border-radius: 12px; }
.reader__note { margin: 0 0 14px; font-size: .84rem; color: #24456b; background: #e3eef9; padding: 10px 12px; border-radius: 12px; text-align: left; }
.reader-title { color: var(--ink-900); font-size: 1.15rem; }
.sheet--cream .sheet__head h2 { color: var(--ink-900); }
.sheet--cream .btn-quiet { color: var(--ink-700); }
.sheet__foot--cream { background: rgba(243, 230, 203, .6); border-top-color: rgba(173, 129, 49, .2); }
.sheet__foot--cream .btn-ghost { --btn-fg: var(--ink-900); --btn-border: rgba(26, 22, 48, .25); }
.sheet__foot--cream .btn-quiet { --btn-fg: var(--ink-700); }
.sheet__foot:empty { display: none; }
.growth-card { margin-top: 18px; text-align: center; }
.growth-card h3 { color: var(--ink-900); margin-bottom: 4px; }
.side-points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; font-size: .92rem; color: var(--text-soft); }
.side-points li { display: flex; gap: 10px; align-items: flex-start; }
.side-points .icon { color: var(--gold-300); margin-top: 3px; }
.iab-hint { flex-wrap: wrap; position: relative; padding-right: 48px; }
.iab-hint .grow { flex: 1 1 220px; }
.iab-hint__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.iab-hint__close { position: absolute; top: 6px; right: 6px; }
.tree-svg.is-loading { opacity: .6; transition: opacity .2s; }
.composer[hidden] { display: none; }

/* Capsule, settings, notifications */
.eyebrow-ink { color: var(--ruby-600); }
.capsule-letter__title { color: var(--ink-900); font-size: clamp(1.6rem, 6vw, 2.3rem); margin-bottom: 18px; }
.sealed-card .countdown { max-width: 420px; margin: 22px auto 0; }
.h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
.mt-0 { margin-top: 0; }
.nowrap { white-space: nowrap; }
.profile-row { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--line-strong); }
.avatar-fallback { display: grid; place-items: center; background: var(--night-600); font-weight: 800; font-size: 1.3rem; color: var(--gold-200); }
.danger-zone { border-color: rgba(240, 138, 152, .3); }
.notif-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.notif-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--cream-50); text-decoration: none; }
.notif-list a:hover { background: rgba(240, 212, 149, .06); }
.notif-list .grow { display: grid; gap: 2px; }
.notif-list .is-unread a { border-color: rgba(240, 212, 149, .4); background: rgba(240, 212, 149, .06); }
.notif-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(240, 212, 149, .12); color: var(--gold-300); flex: none; }
.dot-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--ruby-400); flex: none; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.check-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); }
.check-list li.ok .icon { color: var(--success); }
.check-list li.bad { background: rgba(200, 54, 74, .12); }
.check-list li.bad .icon { color: var(--ruby-300); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; border: 1px solid var(--line); }
.simple-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
.simple-table th, .simple-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-soft); }
.simple-table th { color: var(--cream-100); font-weight: 800; background: rgba(255,255,255,.03); }
.prose ol.howto { padding: 0; }

.story-frame[data-kind="og"] { width: min(100%, 520px); aspect-ratio: 1200 / 630; }
.story-frame[data-kind="tree"] { width: min(76vw, 300px); aspect-ratio: 400 / 560; }
.story-frame { position: relative; }
.story-skeleton { position: absolute; inset: 0; border-radius: 0; }
.story-frame img { object-fit: cover; }

/* Link sticker (NGL-style) preview and the save sheet */
.ig-sticker-demo { display: grid; place-items: center; padding: 26px 16px; border-radius: 18px; border: 2px dashed rgba(240, 212, 149, .55); background: radial-gradient(240px 120px at 50% 50%, rgba(240, 212, 149, .12), transparent 70%), rgba(6, 10, 26, .45); }
.ig-sticker { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 18px; border-radius: 12px; background: #fff; color: #2f6fed; font-weight: 800; font-size: 1rem; letter-spacing: .01em; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.ig-sticker .icon { flex: none; width: 20px; height: 20px; }
.ig-sticker span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.save-preview { position: relative; width: min(56vw, 220px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 18px; overflow: hidden; background: var(--night-800); box-shadow: var(--shadow-lift); }
.save-preview[data-kind="og"] { width: min(100%, 420px); aspect-ratio: 1200 / 630; }
.save-preview[data-kind="tree"] { width: min(60vw, 240px); aspect-ratio: 1200 / 1680; }
/* The image must stay a real <img> so a long press offers "Save image" */
.save-preview img { width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: default; user-select: auto; }

@media (min-width: 1000px) { .tree-head p { margin-left: 0; } }
.owner-strip > span:first-child { display: flex; gap: 8px; align-items: center; }
.tree-side .btn-primary { margin-top: 4px; }

.howto li { display: block; position: relative; padding-left: 44px; min-height: 32px; padding-top: 4px; }
.howto li::before { position: absolute; left: 0; top: 0; }

.wish-card--sticker { display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; }
.wish-card--sticker img { width: 96px; height: 96px; }
.footer-social { display: flex; width: fit-content; max-width: 100%; overflow-wrap: anywhere; align-items: center; gap: 8px; margin-top: 10px; color: var(--gold-200); text-decoration: none; font-weight: 700; }
.footer-legal-id { font-size: .8rem; color: var(--text-mute); margin-top: 10px; }

.kunye { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; margin: 0 0 14px; font-size: .92rem; }
.kunye dt { color: var(--text-mute); font-weight: 700; }
.kunye dd { margin: 0; overflow-wrap: anywhere; }

/* Growing tree: zoom & pan inside the frame */
.tree-zoom { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.tree-zoom.is-zoomed { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tree-zoom > svg { width: 100%; height: auto; display: block; max-width: none; }
.zoom-controls { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: grid; gap: 6px; }
.zoom-controls button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(240, 212, 149, .35); background: rgba(6, 10, 26, .72); color: var(--cream-50); display: grid; place-items: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.zoom-controls button:disabled { opacity: .4; }
.zoom-controls .icon { width: 18px; height: 18px; }

/* Photo picker in the composer and photos in the reader */
.photo-pick { border: 1.5px dashed rgba(240, 212, 149, .35); border-radius: 16px; background: rgba(6, 10, 26, .3); }
.photo-pick__empty { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px; cursor: pointer; font-weight: 700; color: var(--gold-200); }
.photo-pick__empty:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 16px; }
.photo-pick__busy { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; color: var(--text-soft); font-size: .9rem; }
.photo-pick__filled { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.photo-pick__filled img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: none; }
.photo-pick--locked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-style: solid; border-color: rgba(255, 255, 255, .12); background: rgba(6, 10, 26, .45); cursor: not-allowed; }
.photo-pick--locked .grow { display: flex; flex-direction: column; gap: 2px; color: var(--text-soft); font-size: .9rem; }
.photo-pick--locked strong { color: var(--text); font-size: .92rem; }
.photo-pick--locked .btn { cursor: pointer; flex: none; }
.photo-pick__lock { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(240, 212, 149, .12); color: var(--gold-300); }
.photo-pick__lock svg { width: 20px; height: 20px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.reader__photo { margin: 0 0 14px; }
.reader__photo img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: 16px; background: #efe4cb; }
.preview-card__photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.preview-card img.preview-card__photo { width: 100%; height: auto; }
.msg-photo { display: block; margin: 8px 0 10px; max-width: 260px; }
.msg-photo img { width: 100%; height: auto; border-radius: 14px; }

/* Auth forms */
.auth-form { text-align: left; margin-top: 8px; }
.auth-card .center, .auth-card p.center { text-align: center; }
.auth-form .check { font-size: .9rem; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; color: var(--text-mute); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 52px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-mute); display: grid; place-items: center; }
.password-toggle[aria-pressed="true"] { color: var(--gold-300); }
.strength { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--ruby-400); transition: width .25s, background .25s; }
.strength[data-level="2"] span { background: var(--gold-400); }
.strength[data-level="3"] span, .strength[data-level="4"] span { background: var(--success); }
.side-points.left { text-align: left; margin: 18px 0; }
.cf-turnstile { min-height: 65px; }

/* Settings */
.settings-jump { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.settings-jump::-webkit-scrollbar { display: none; }
.settings-jump a { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-soft); text-decoration: none; font-size: .82rem; font-weight: 700; }
.settings-jump a:hover { color: var(--cream-50); background: rgba(240, 212, 149, .08); }
.session-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.session-list li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.session-list__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(240, 212, 149, .12); color: var(--gold-300); flex: none; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.block { display: block; }
.min-w-0 { min-width: 0; }
.text-break { overflow-wrap: anywhere; }
.card[id], section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Dashboard: time capsule spotlight & reminder opt-in */
.capsule-spot { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 28px); border: 1px solid rgba(240, 212, 149, .38);
  background: radial-gradient(420px 220px at 100% 0%, rgba(231, 192, 113, .28), transparent 70%), radial-gradient(360px 240px at 0% 100%, rgba(185, 163, 227, .2), transparent 70%), linear-gradient(160deg, #2a2457, #151d47 60%, #0f1638);
  box-shadow: var(--glow-gold); }
.capsule-spot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1.5px 1.5px at 18% 22%, rgba(255,246,220,.9) 50%, transparent 51%), radial-gradient(1px 1px at 72% 30%, rgba(255,255,255,.7) 50%, transparent 51%), radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.5) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 70%, rgba(255,246,220,.8) 50%, transparent 51%); }
.capsule-spot > * { position: relative; z-index: 1; }
.capsule-spot__row { display: flex; gap: 16px; align-items: center; }
.capsule-spot__art { width: 84px; height: 84px; flex: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); animation: float 5s ease-in-out infinite; }
.capsule-spot h2 { margin: 0 0 4px; font-size: clamp(1.25rem, 4.6vw, 1.55rem); }
.capsule-spot p { color: var(--text-soft); margin: 0; }
.capsule-spot .countdown { margin-top: 16px; }
.capsule-spot .btn { margin-top: 16px; }
.capsule-spot__badge { display: inline-flex; gap: 6px; align-items: center; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 6px; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-2deg); } }
.optin-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.optin-card .grow { flex: 1 1 240px; }
.optin-card form { display: flex; gap: 8px; flex-wrap: wrap; }

/* Mobile editor: compact sticky preview, save bar above the fixed tab bar */
@media (max-width: 959px) {
  .editor__preview .tree-scene { width: auto; height: min(40vh, 380px); max-width: none; aspect-ratio: 400 / 560; border-radius: 22px; }
  .editor__pane *, .editor__save *, .editor__tabs * { scroll-margin-top: calc(var(--header-h) + 44vh); scroll-margin-bottom: 170px; }
  .editor__save { bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 4; }
  .panel-shell.has-editor { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}


/* Home: live totals (trees created, wishes left) */
.hero-stats { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-stat {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  border-radius: 18px; border: 1px solid rgba(240, 212, 149, .22);
  background: linear-gradient(135deg, rgba(240, 212, 149, .1), rgba(17, 27, 64, .55));
  box-shadow: 0 10px 30px rgba(3, 5, 14, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  opacity: 0; transform: translateY(14px); animation: stat-in .7s var(--ease) .35s forwards;
}
.hero-stat + .hero-stat { animation-delay: .55s; }
.hero-stat__icon { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(240, 212, 149, .14); color: var(--gold-300); }
.hero-stat__icon svg { width: 22px; height: 22px; }
.hero-stat__icon--ruby { background: rgba(223, 85, 104, .16); color: var(--ruby-300); }
.hero-stat__pulse { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: stat-pulse 1.8s ease-out infinite; }
.hero-stat__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.hero-stat__num { font-family: var(--font-display, inherit); font-size: 1.7rem; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--gold-200), var(--gold-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stat__num.is-done { animation: stat-pop .45s var(--ease); }
.hero-stat__text > span { font-size: .85rem; color: var(--text-mute); }
@media (max-width: 599px) {
  .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
  .hero-stat { padding: 10px 12px 10px 10px; gap: 10px; }
  .hero-stat__icon { width: 38px; height: 38px; border-radius: 12px; }
  .hero-stat__num { font-size: 1.45rem; }
  .hero-stat__text > span { font-size: .78rem; }
}
@media (min-width: 960px) { .hero-stats { justify-content: flex-start; } }
@keyframes stat-in { to { opacity: 1; transform: none; } }
@keyframes stat-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } }
@keyframes stat-pop { 50% { transform: scale(1.12); } }
.hero-stat__num { display: inline-block; transform-origin: left center; }

/* Tree page: "make your own tree" pop-up after a wish */
.sheet--cta { align-items: center; padding: 16px; }
.sheet--cta .sheet__panel {
  max-width: 420px; border-radius: 28px; border: 1px solid rgba(240, 212, 149, .3);
  background: radial-gradient(120% 70% at 50% 0%, rgba(240, 212, 149, .18), transparent 60%), linear-gradient(180deg, #1a2758, var(--night-850));
  transform: translateY(24px) scale(.94); opacity: 0; transition: transform .45s var(--ease), opacity .3s;
}
.sheet--cta.is-open .sheet__panel { transform: none; opacity: 1; }
.cta-pop { padding: 30px 24px 22px; text-align: center; overflow-y: auto; }
.cta-pop h2 { font-size: 1.55rem; margin: 6px 0 8px; }
.cta-pop .muted { margin-bottom: 20px; }
.cta-pop__close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.cta-pop__art { position: relative; width: 130px; height: 130px; margin: 0 auto 8px; display: grid; place-items: center; }
.cta-pop__art img { position: relative; width: 112px; height: 112px; animation: cta-float 3.2s ease-in-out infinite; }
.cta-pop__ring { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 212, 149, .35), transparent 68%); animation: cta-glow 2.4s ease-in-out infinite; }
.cta-pop__spark { position: absolute; color: var(--gold-300); font-size: 18px; opacity: 0; }
.sheet--cta.is-open .cta-pop__spark { animation: cta-spark 2.2s ease-in-out infinite; }
.cta-pop__spark--1 { top: 6px; left: 8px; }
.cta-pop__spark--2 { top: 22px; right: 0; animation-delay: .7s !important; font-size: 14px; }
.cta-pop__spark--3 { bottom: 10px; left: 0; animation-delay: 1.3s !important; }
.cta-pop__ok { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; color: #86efac; background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .25); }
.cta-pop__ok svg { width: 15px; height: 15px; }
@keyframes cta-float { 50% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes cta-glow { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes cta-spark { 0%, 100% { opacity: 0; transform: scale(.5); } 40% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .hero-stat { opacity: 1; transform: none; }
}