/* Secret Santa DIB — winter night theme. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.eb2486760f75.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night-1: #07140f;
  --night-2: #0d241b;
  --night-3: #143528;
  --snow: #f6f1e7;
  --snow-dim: rgb(246 241 231 / 0.72);
  --paper: #fbf6ec;
  --paper-2: #f2e9d8;
  --ink: #1b2620;
  --ink-soft: #55625a;
  --line: #e3d7c2;
  --red: #d8402f;
  --red-deep: #a92b1f;
  --gold: #e9b44c;
  --gold-soft: #f6d68f;
  --mint: #5fc39a;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 18px 40px -18px rgb(0 0 0 / 0.55), 0 4px 12px -6px rgb(0 0 0 / 0.35);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
/* Safety net: nothing may widen the page sideways (that makes phones zoom out and unpins fixed bars). */
html, body { overflow-x: clip; }
/* No grey/blue tap rectangle on mobile: every tappable thing gets its own press feedback below. */
a, button, summary, label, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--snow);
  font: 16px/1.55 var(--body);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgb(233 180 76 / 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgb(216 64 47 / 0.16), transparent 60%),
    linear-gradient(180deg, var(--night-2), var(--night-1) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
:focus:not(:focus-visible) { outline: none; }

/* Press feedback: a quick, springy squeeze on anything tappable. */
a.card, .timeline a, .door-cell, .reaction, .poll-option, .q-choice, .person,
.sheet-close, .lang-switch button, .link-btn, .picker-menu button, .nav-desktop a, .nav-desktop button {
  transition: transform .2s var(--ease-spring), background .2s, color .2s, border-color .2s, filter .2s;
}
a.card:active, .timeline a:active { transform: scale(.98); filter: brightness(.97); }
.door-cell:active, .bubble:active .avatar, .reaction:active, .picker-menu button:active { transform: scale(.92); }
.poll-option:active, .sheet-close:active, .lang-switch button:active, .nav-desktop a:active { transform: scale(.96); }
.link-btn:active, .person:active { opacity: .6; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.topbar, main, footer, .tabbar { position: relative; z-index: 1; }

/* ───────── Header & navigation ───────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  background: linear-gradient(180deg, rgb(7 20 15 / .85), rgb(7 20 15 / .55));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
}
.topbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; color: var(--snow); text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 1rem;
  background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 6px 14px -6px var(--red);
}
.brand-name { font: 700 1.05rem/1 var(--display); white-space: nowrap; }
.brand-tag {
  font: 800 .62rem/1 var(--body); letter-spacing: .12em; padding: 4px 6px 3px; border-radius: 6px;
  color: #2a1d05; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.pill-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px;
  font: 650 .85rem var(--body); text-decoration: none; color: #2a1d05;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 6px 14px -8px rgb(0 0 0 / .8);
  transition: transform .18s var(--ease-spring);
}
.pill-btn:active { transform: scale(.95); }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); }
.lang-switch button {
  min-width: 30px; min-height: 30px; padding: 0 6px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .72rem var(--body); letter-spacing: .08em; color: var(--snow-dim); background: none;
  transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { color: var(--night-1); background: var(--snow); }
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a, .nav-desktop button {
  color: var(--snow-dim); text-decoration: none; font: 500 0.95rem var(--body);
  padding: 8px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer;
  transition: color .2s, background .2s;
}
.nav-desktop a:hover, .nav-desktop button:hover { color: var(--snow); background: rgb(255 255 255 / 0.07); }
.nav-desktop a[aria-current="page"] { color: var(--night-1); background: var(--gold); }
@media (max-width: 340px) { .brand-tag { display: none; } .brand-mark { width: 28px; height: 28px; } }

.tabbar { position: relative; z-index: 1; }

/* ───────── Header & navigation ───────── */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px; border-radius: 22px;
  background: rgb(10 28 21 / 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgb(255 255 255 / 0.08);
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.8);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 52px;
  color: var(--snow-dim); text-decoration: none; font-size: .7rem; font-weight: 600; border-radius: 16px;
  transition: color .2s, background .25s var(--ease-out), transform .2s var(--ease-spring);
}
.tabbar a:active { transform: scale(.92); }
.tabbar a[aria-current="page"] { color: var(--night-1); background: var(--gold); }
.tabbar svg { width: 22px; height: 22px; }
body.has-tabbar main { padding-bottom: 110px; }

@media (min-width: 760px) {
  .nav-desktop { display: flex; }
  .tabbar { display: none; }
  body.has-tabbar main { padding-bottom: 56px; }
}

main.container { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px 16px 56px; flex: 1; }
main.wide { max-width: 960px; }
footer { text-align: center; color: rgb(246 241 231 / 0.4); font-size: .8rem; padding: 0 16px 24px; }
body.has-tabbar footer { padding-bottom: 110px; }
@media (min-width: 760px) { body.has-tabbar footer { padding-bottom: 24px; } }

/* ───────── Surfaces ───────── */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card a { color: var(--red-deep); }
.card a.btn { color: var(--fg); text-decoration: none; }  /* buttons keep their own colors inside cards */
.card h1, .card h2, .card h3 { color: var(--ink); }
.card.glass {
  background: rgb(255 255 255 / 0.05); color: var(--snow);
  border: 1px solid rgb(255 255 255 / 0.1); box-shadow: none;
  backdrop-filter: blur(6px);
}
.card.glass h1, .card.glass h2, .card.glass h3 { color: var(--snow); }
.card.glass a { color: var(--gold-soft); }
.card.ribbon { overflow: hidden; }
.card.ribbon { padding-top: 34px; }
.card.ribbon::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--paper) 12px 18px, var(--red) 18px 30px, var(--gold) 30px 34px);
}
.card.ribbon::after { content: "🎀"; position: absolute; top: -4px; right: 18px; font-size: 1.9rem; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .3)); }
.card.ribbon > * { position: relative; z-index: 1; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 4px 12px; }
.section-title h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.card .eyebrow { color: var(--red); }
.muted { color: var(--ink-soft); }
.glass .muted, .on-night .muted { color: var(--snow-dim); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid-2 { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-2 > .card { margin-bottom: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; list-style: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgb(255 255 255 / 0.65); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 500;
}
.chips li.chip-link { padding: 0; border-color: var(--gold); background: rgb(233 180 76 / .14); }
.chips li.chip-link a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 36px;
  color: inherit; text-decoration: none; font-weight: 650; border-radius: 999px;
  transition: transform .2s var(--ease-spring), background .2s;
}
.chips li.chip-link a:hover { background: rgb(233 180 76 / .22); }
.chips li.chip-link a:active { transform: scale(.95); }
.glass .chips li, .hero .chips li { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.14); }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.badge.ok { background: var(--mint); border-color: var(--mint); color: #062216; }

/* ───────── Avatars ───────── */
.avatar {
  --h: 140; --size: 40px;
  width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  font: 700 calc(var(--size) * .38)/1 var(--body); letter-spacing: -.02em; color: #fff;
  background: radial-gradient(circle at 30% 25%, hsl(var(--h) 70% 62%), hsl(var(--h) 55% 38%));
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.85), 0 6px 14px -6px hsl(var(--h) 60% 25%);
  text-decoration: none;
}
.card a.avatar, a.avatar { color: #fff; text-decoration: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.lg { --size: 84px; }
.avatar.sm { --size: 30px; }
.person { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 600; }

/* ───────── Buttons & forms ───────── */
.btn {
  --bg: var(--paper); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); font: 650 1rem var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / .5) inset, 0 8px 20px -10px rgb(0 0 0 / .6);
  transition: transform .18s var(--ease-spring), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { --bg: linear-gradient(180deg, #e9553f, var(--red-deep)); --fg: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 12px 24px -10px var(--red); }
.btn.gold { --bg: linear-gradient(180deg, var(--gold-soft), var(--gold)); --fg: #2a1d05; }
.btn.ghost { --bg: transparent; --fg: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.card .btn.ghost { --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink-soft); font: 500 .9rem var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font: 16px var(--body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px; transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgb(233 180 76 / .25); }
input[type=file] { font: .9rem var(--body); max-width: 100%; }
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.field .help { color: var(--ink-soft); font-size: .82rem; margin-top: 6px; }
.field .help ul { margin: 4px 0 0; padding-left: 18px; }
.errorlist { color: var(--red-deep); list-style: none; padding: 0; margin: 6px 0 0; font-size: .88rem; font-weight: 600; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li {
  padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 8px; font-weight: 600;
  background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12);
  animation: rise .5s var(--ease-out) both;
}
.messages .success { border-color: var(--mint); }
.messages .error { border-color: var(--red); }

/* ───────── Hero ───────── */
.hero { text-align: center; padding: 28px 4px 12px; }
.hero h1 { font-size: clamp(2.2rem, 10vw, 4.4rem); line-height: 1.05; margin-bottom: 16px; }
.hero h1 em {
  /* italic glyphs overhang their box and background-clip would cut them: give them room,
     on every line fragment when the words wrap (clone), not only at the very start and end */
  padding: 0 .14em 0 .04em; margin: 0 -.1em 0 -.04em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  font-style: italic; font-weight: 500;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold), #ff9e7a, var(--gold-soft));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
.hero p.lead { color: var(--snow-dim); font-size: 1.1rem; max-width: 34ch; margin: 0 auto 22px; }
.hero .chips { justify-content: center; }
.hero .row { justify-content: center; }
.gift-float { font-size: 4rem; display: inline-block; margin-bottom: 8px; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 12px 20px rgb(0 0 0 / .5)); }

.countdown { display: flex; justify-content: center; gap: 8px; margin: 6px 0 22px; }
.countdown div {
  flex: 1 1 0; max-width: 84px; min-width: 0; padding: 10px 6px; border-radius: 16px; text-align: center;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12);
}
.countdown strong { display: block; font: 600 1.9rem/1 var(--display); color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--snow-dim); }
.card .countdown div { background: rgb(0 0 0 / .04); border-color: var(--line); }
.card .countdown strong { color: var(--red); }
.card .countdown span { color: var(--ink-soft); }

/* ───────── Envelope reveal ───────── */
.envelope-stage { display: grid; place-items: center; padding: 8px 0; perspective: 1200px; }
.envelope { position: relative; width: min(320px, 86vw); aspect-ratio: 1.55; margin-top: 120px; }
.envelope .back, .envelope .front, .envelope .flap { position: absolute; inset: 0; border-radius: 14px; }
.envelope .back { background: linear-gradient(160deg, #c3372a, #8e2117); box-shadow: 0 24px 50px -20px rgb(0 0 0 / .8); }
.envelope .front {
  z-index: 3; border-radius: 14px;
  background:
    linear-gradient(to top right, #b52f22 49.5%, transparent 50%) left / 50.5% 100% no-repeat,
    linear-gradient(to top left, #b52f22 49.5%, transparent 50%) right / 50.5% 100% no-repeat,
    linear-gradient(to top, #a8291d 0 52%, transparent 52%);
}
.envelope .flap {
  z-index: 4; transform-origin: top center; transition: transform .8s var(--ease-out) .1s, z-index 0s .5s;
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  background: linear-gradient(180deg, #d84535, #b02c20);
}
.envelope .seal {
  position: absolute; z-index: 5; left: 50%; top: 52%; translate: -50% -50%;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold) 55%, #b9852a);
  box-shadow: 0 6px 14px -4px rgb(0 0 0 / .6); font-size: 1.4rem; transition: opacity .3s, transform .4s var(--ease-spring);
}
.envelope .letter {
  position: absolute; z-index: 2; left: 7%; right: 7%; top: 8%; height: 86%;
  border-radius: 10px; padding: 18px 14px; text-align: center; color: var(--ink);
  background: linear-gradient(180deg, #fffdf7, var(--paper-2));
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .6);
  transition: transform 1s var(--ease-out) .55s;
  display: flex; flex-direction: column; justify-content: center;
}
.envelope .letter .eyebrow { margin-bottom: 4px; }
.envelope .letter .giftee { font: 700 clamp(1.5rem, 7vw, 2rem)/1.05 var(--display); color: var(--red-deep); margin: 0; }
.envelope.open .flap { transform: rotateX(180deg); z-index: 1; }
.envelope.open .seal { opacity: 0; transform: scale(.4); }
.envelope.open .letter { transform: translateY(-58%); z-index: 4; }

/* ───────── Gift ring (history) ───────── */
.ring-wrap { position: relative; width: min(100%, 620px); margin: 0 auto; aspect-ratio: 1; }
.ring { width: 100%; height: 100%; overflow: visible; }
.ring .spin { transform-box: view-box; transform-origin: 500px 500px; animation: spin 140s linear infinite; }
.ring .glow { fill: none; stroke: rgb(233 180 76 / .12); stroke-width: 70; }
.ring .link { fill: none; stroke: rgb(246 241 231 / .55); stroke-width: var(--stroke, 5px); stroke-dasharray: 1 15; stroke-linecap: round; animation: flow 1.6s linear infinite; }
.ring .link.active { stroke: var(--gold); stroke-width: calc(var(--stroke, 5px) * 1.3); stroke-dasharray: none; filter: drop-shadow(0 0 8px var(--gold)); }
.ring .node { cursor: pointer; }
.ring .node .upright { transform-box: fill-box; transform-origin: center; animation: spin 140s linear infinite reverse; }
.ring .node circle {
  fill: hsl(var(--h) 52% 42%); stroke: rgb(255 255 255 / .85); stroke-width: calc(var(--node, 26px) * .11);
  transform-box: fill-box; transform-origin: center; transition: transform .4s var(--ease-spring), fill .3s;
}
.ring .node text { fill: #fff; font: 700 var(--font, 17px) var(--body); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.ring .node.giver circle { fill: var(--red); transform: scale(1.3); }
.ring .node.receiver circle { fill: var(--gold); transform: scale(1.3); }
.ring .node.receiver text { fill: #2a1d05; }
.ring-center {
  position: absolute; inset: 22%; border-radius: 50%; display: grid; place-content: center; text-align: center; padding: 8%;
  background: radial-gradient(circle, rgb(255 255 255 / .06), transparent 70%);
}
.ring-center .year { font: 600 clamp(2.4rem, 12vw, 4.6rem)/1 var(--display); color: var(--snow); }
.ring-center .count { color: var(--snow-dim); font-size: .85rem; margin-bottom: 12px; }
.ring-center .pair { min-height: 3.6em; font-weight: 600; line-height: 1.35; font-size: clamp(.85rem, 3.4vw, 1.05rem); }
.ring-center .pair .from { color: #ff9a8a; }
.ring-center .pair .to { color: var(--gold-soft); }
.ring-center .pair .what { display: block; margin-top: 6px; font: italic 500 .9em var(--display); color: var(--snow-dim); }
.ring-center .pair .gift { display: block; font-size: 1.2em; animation: pop .5s var(--ease-spring); }
.ring-center a { color: inherit; text-decoration: none; }

.timeline { display: grid; gap: 12px; }
.timeline a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 22px; border-radius: var(--radius); text-decoration: none; color: var(--snow);
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1);
  transition: transform .25s var(--ease-spring), background .2s;
}
.timeline a:hover { transform: translateY(-3px); background: rgb(255 255 255 / .09); }
.timeline .y { font: 600 2.2rem/1 var(--display); }
.timeline .n { color: var(--snow-dim); font-size: .9rem; }
.mini-ring { width: 64px; height: 64px; flex: none; }
.mini-ring circle { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 3 7; animation: spin 20s linear infinite; transform-origin: center; }


/* ───────── Profile ───────── */
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.3rem); }
.wish-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wish-list li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); background: rgb(255 255 255 / .6); border: 1px solid var(--line); }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: none; }
.history-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.history-list li { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.history-list li:last-child { border-bottom: 0; }
.history-list li > .stack > * + * { margin-top: 6px; }
.history-list em.gift { font-style: normal; font-weight: 650; color: var(--red-deep); background: #fff0dc; padding: 1px 8px; border-radius: 999px; }
.gift-edit { margin-top: 4px; font-size: .85rem; }
.gift-edit summary { cursor: pointer; color: var(--ink-soft); list-style: none; }
.gift-edit summary::-webkit-details-marker { display: none; }
.gift-edit form { margin-top: 6px; }
.history-list .y { padding-top: 2px; font: 600 1.6rem/1 var(--display); color: var(--red); text-decoration: none; }

/* ───────── Feed ───────── */
.composer textarea { min-height: 56px; }
.composer .row { justify-content: space-between; }
.composer .file-pick {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font: 650 .95rem var(--body); color: var(--ink); transition: transform .2s var(--ease-spring), border-color .2s;
}
.composer .file-pick:hover { border-color: var(--gold); }
.composer .file-pick:active { transform: scale(.95); }
.composer .file-pick svg { width: 20px; height: 20px; color: var(--red-deep); }
.composer .file-pick:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.photo-preview { position: relative; margin-top: 12px; width: fit-content; animation: pop .35s var(--ease-spring); }
.photo-preview img { display: block; max-height: 180px; max-width: 100%; border-radius: 14px; box-shadow: 0 8px 18px -10px rgb(0 0 0 / .6); }
.photo-remove {
  position: absolute; top: -10px; right: -10px; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-size: .9rem; box-shadow: 0 4px 10px -4px rgb(0 0 0 / .6);
}
.composer .file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.post { animation: rise .55s var(--ease-out) both; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .when { margin-left: auto; color: var(--ink-soft); font-size: .8rem; }
.post-text { font-size: 1.05rem; margin-bottom: 8px; white-space: pre-line; overflow-wrap: anywhere; }
.post-image { border-radius: 16px; margin: 8px 0 4px; width: 100%; }
.event-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px;
  border-radius: 999px; color: var(--snow); font-size: .92rem;
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08);
  animation: rise .55s var(--ease-out) both;
}
.event-card .names { font-weight: 600; }
.event-card .when { color: var(--snow-dim); font-size: .78rem; margin-left: auto; white-space: nowrap; }
.event-card.drawn { border-radius: var(--radius); background: linear-gradient(135deg, rgb(216 64 47 / .35), rgb(233 180 76 / .25)); font-weight: 650; }
.reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.reaction {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font: 600 .9rem var(--body); color: var(--ink);
  transition: transform .2s var(--ease-spring), background .2s;
}
.reaction:hover { transform: scale(1.08); }
.reaction.mine { background: #fff1e4; border-color: var(--red); animation: pop .45s var(--ease-spring); }
.picker { position: relative; }
.picker summary { list-style: none; }
.picker summary::-webkit-details-marker { display: none; }
.picker[open] .picker-menu { display: flex; }
.picker-menu {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 5; gap: 2px; padding: 6px;
  background: #fff; border-radius: 999px; box-shadow: 0 12px 30px -8px rgb(0 0 0 / .45);
  animation: pop .35s var(--ease-spring);
}
.picker-menu button { font-size: 1.35rem; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 50%; transition: transform .2s var(--ease-spring); }
.picker-menu button:hover { transform: scale(1.3) translateY(-3px); }
.replies { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.reply { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }
.reply-bubble { color: var(--ink); background: rgb(0 0 0 / .045); border-radius: 4px 16px 16px 16px; padding: 7px 12px; }
.reply-bubble b { margin-right: 6px; }
.reply-form { display: flex; gap: 8px; }
.reply-form input { flex: 1; min-width: 0; min-height: 42px; border-radius: 999px; padding: 8px 16px; }
.reply-form .btn { min-height: 42px; padding: 8px 16px; }

/* ───────── Santa questions ───────── */
.question-card .question-text { font: 600 1.35rem/1.25 var(--display); margin-bottom: 16px; }
.options { display: grid; gap: 10px; }
.options .btn { justify-content: flex-start; text-align: left; }
.answer-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #e5f5ec; color: #11492f; font-weight: 650; animation: pop .45s var(--ease-spring); }
.q-choices { display: grid; gap: 10px; }
.q-choice { display: block; cursor: pointer; margin: 0; }
.q-choice input { position: absolute; opacity: 0; }
.q-choice .q-body {
  display: block; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; font-weight: 600;
  transition: border-color .2s, transform .2s var(--ease-spring), box-shadow .2s;
}
.q-choice .q-body small { display: block; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }
.q-choice input:checked + .q-body { border-color: var(--red); box-shadow: 0 0 0 4px rgb(216 64 47 / .15); transform: scale(1.01); }
.q-choice input:focus-visible + .q-body { outline: 3px solid var(--gold); }
.asked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.asked-list li { display: grid; gap: 6px; }

/* ───────── Staff ───────── */
.review-card legend { font-weight: 650; margin-bottom: 8px; }
.review-card fieldset { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

/* ───────── Entrance animation ───────── */
.reveal > * { animation: rise .7s var(--ease-out) both; }
.reveal > *:nth-child(2) { animation-delay: .07s; }
.reveal > *:nth-child(3) { animation-delay: .14s; }
.reveal > *:nth-child(4) { animation-delay: .21s; }
.reveal > *:nth-child(5) { animation-delay: .28s; }
.reveal > *:nth-child(n+6) { animation-delay: .35s; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes wiggle { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-2.5deg); } 92% { transform: rotate(2.5deg); } 95% { transform: rotate(-1.5deg); } }
@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -32; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  #snow { display: none; }
}

.auth-card { max-width: 460px; margin: 24px auto; animation: rise .6s var(--ease-out) both; }
.auth-card::before {
  content: "🎁"; position: absolute; top: -26px; left: 50%; translate: -50% 0;
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 10px 20px -8px var(--red);
}
.auth-card h1 { margin-top: 18px; text-align: center; font-size: 1.9rem; }

/* ───────── Editions list ───────── */
.timeline a.current { background: linear-gradient(135deg, rgb(216 64 47 / .28), rgb(233 180 76 / .18)); border-color: rgb(233 180 76 / .35); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffb4a8; }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgb(216 64 47 / .7); animation: pulse 1.8s infinite; }
.mini-float { font-size: 2.2rem; animation: float 4s ease-in-out infinite; }

/* ───────── Live edition: floating participants ───────── */
.live-head { text-align: center; padding: 4px 0 12px; }
.live-head h1 { margin: 10px 0 8px; }
.live-head .lead { color: var(--snow-dim); margin: 0 auto; max-width: 36ch; }
.cloud {
  position: relative; margin: 16px 0; min-height: 300px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 18px;
  border-radius: 28px; border: 1px solid rgb(255 255 255 / .08);
  background: radial-gradient(circle at 50% 40%, rgb(233 180 76 / .08), transparent 70%), rgb(255 255 255 / .02);
}
.cloud.js { display: block; height: min(58dvh, 620px); padding: 0; overflow: hidden; }
.cloud-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bubble {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 76px;
  color: var(--snow); text-decoration: none; font-size: .78rem; font-weight: 600; text-align: center;
}
.cloud.js .bubble { position: absolute; left: 0; top: 0; will-change: transform; }
.bubble .avatar { --size: 48px; transition: transform .25s var(--ease-spring); }
a.bubble:hover .avatar, a.bubble:focus-visible .avatar { transform: scale(1.18); }
.bubble-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 6px rgb(0 0 0 / .7); }
.cloud-empty { margin: auto; color: var(--snow-dim); }
.guess path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 6 7; stroke-linecap: round; animation: flow 1s linear infinite; }
.guess circle { fill: var(--red); stroke: var(--paper); stroke-width: 2; }
.guess text { fill: #fff; font: 800 15px var(--body); text-anchor: middle; dominant-baseline: central; }
.guess { animation: guess 3.2s var(--ease-out) both; }

/* ───────── Grinch ───────── */
.grinch-face { font-size: 5rem; display: inline-block; animation: sneak 2.6s ease-in-out infinite; filter: drop-shadow(0 12px 20px rgb(0 0 0 / .5)); }
.grinch h1 { color: #9be37a; text-shadow: 0 0 30px rgb(155 227 122 / .35); }
.grinch-note { text-align: left; max-width: 520px; margin: 18px auto 0; transform: rotate(-1.2deg); }
.grinch-note h2 { color: #2e6b1d; }

@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(216 64 47 / 0); } 100% { box-shadow: 0 0 0 0 rgb(216 64 47 / 0); } }
@keyframes guess { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sneak { 0%, 100% { transform: translateX(-14px) rotate(-6deg); } 50% { transform: translateX(14px) rotate(6deg); } }

/* ───────── Secret letter ───────── */
.letter-teaser { gap: 14px; }
.teaser-env { font-size: 2.2rem; flex: none; animation: wiggle 3.2s ease-in-out infinite; display: inline-block; }
.ritual { position: relative; min-height: 360px; overflow: hidden; border-radius: 26px; }
.step {
  position: absolute; inset: 0; text-align: center; padding: 22px 18px; border-radius: 26px;
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1);
  opacity: 0; transform: translateX(40px) scale(.97); pointer-events: none;
  transition: opacity .45s var(--ease-out), transform .55s var(--ease-out);
}
.step.active { opacity: 1; transform: none; pointer-events: auto; }
.step.done { opacity: 0; transform: translateX(-40px) scale(.97); }
.letter-gate.ready .ritual { display: none; }
.step h2 { font-size: 1.6rem; margin-bottom: 14px; }
.muted-night { color: var(--snow-dim); }
.eyes { display: flex; justify-content: center; gap: 14px; margin: 6px 0 14px; }
.eye { width: 54px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: inset 0 -6px 0 rgb(0 0 0 / .08); animation: blink 4s infinite; }
.pupil { width: 22px; height: 22px; border-radius: 50%; background: var(--night-1); transition: transform .45s var(--ease-spring); }
.eyes[data-look="left"] .pupil { transform: translateX(-14px); }
.eyes[data-look="right"] .pupil { transform: translateX(14px); }
.projector { font-size: 4rem; margin: 4px 0 10px; transition: filter .5s, transform .5s var(--ease-spring); }
.projector.off { filter: grayscale(1) brightness(.35); transform: scale(.85); }
.power {
  position: relative; width: 120px; height: 120px; margin: 4px auto 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0; cursor: pointer; background: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  transition: transform .3s var(--ease-spring);
}
.power svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.power-track { fill: rgb(255 255 255 / .06); stroke: rgb(255 255 255 / .14); stroke-width: 6; }
.power-ring {
  fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px rgb(233 180 76 / .7));
  transition: stroke-dashoffset .4s var(--ease-out);
}
.power-icon {
  position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.2rem; color: #2a1d05; background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold));
  box-shadow: 0 10px 24px -10px rgb(0 0 0 / .8), inset 0 -4px 0 rgb(0 0 0 / .12);
  transition: transform .3s var(--ease-spring), background .4s, color .4s;
}
.power-icon svg { position: static; width: 38px; height: 38px; transform: none; }
.power.holding { transform: scale(.94); }
.power.holding .power-ring, .power.complete .power-ring { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s linear; }
.power.holding .power-icon { transform: scale(.92); }
.power.complete .power-ring { stroke: var(--mint); filter: drop-shadow(0 0 8px rgb(95 195 154 / .8)); transition: stroke .3s; }
.power.complete .power-icon { background: radial-gradient(circle at 35% 30%, #3a4a42, #18221c); color: var(--mint); }
.hold-label { color: var(--snow-dim); margin-top: 10px; }
.dimmer {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 42%, rgb(0 0 0 / .3), rgb(0 0 0 / .88) 75%);
  transition: opacity .5s var(--ease-out);
}
.dimmer.dimming { opacity: 1; transition: opacity 1.5s linear; }
.dimmer.on { opacity: 1; }
.shh { font-size: 4.5rem; background: none; border: 0; cursor: pointer; margin: 4px 0 6px; animation: float 3s ease-in-out infinite; }
.shh.promised { animation: pop .5s var(--ease-spring); }
.shh.promised::after { content: "Shhh…"; display: block; font: italic 600 1.2rem var(--display); color: var(--gold-soft); }
.letter-gate:not(.ready) .unlock-zone { display: none; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.envelope.sealed { margin-top: 28px; transition: filter .4s, opacity .4s; }
.letter-gate.ready .envelope.sealed { animation: rise .6s var(--ease-out) both, wiggle 3.2s ease-in-out .6s infinite; }
.envelope.unsealing .seal { transform: scale(1.4) rotate(20deg); opacity: 0; }
.slider {
  position: relative; height: 64px; margin: 22px 0 8px; border-radius: 999px; overflow: hidden;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .14);
  transition: opacity .3s;
}
.slider[aria-disabled="true"] { opacity: .4; }
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, rgb(216 64 47 / .35), rgb(233 180 76 / .5)); }
.slider:not(.dragging) .slider-fill, .slider:not(.dragging) .slider-knob { transition: width .45s var(--ease-spring), transform .45s var(--ease-spring); }
.slider-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; color: var(--snow-dim); letter-spacing: .02em; pointer-events: none; }
.letter-gate.ready .slider-label { background: linear-gradient(90deg, var(--snow-dim) 30%, #fff 50%, var(--snow-dim) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.6s linear infinite; }
.slider-knob {
  position: absolute; left: 4px; top: 4px; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: grab; touch-action: none;
  font-size: 1.4rem; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .7);
}
.slider[aria-disabled="true"] .slider-knob { cursor: not-allowed; }
.slider.dragging .slider-knob { cursor: grabbing; }
.slider-hint { text-align: center; color: var(--snow-dim); }
.letter-open { animation: rise .5s var(--ease-out) both; }
.letter-actions { opacity: 0; animation: rise .6s var(--ease-out) 1.4s both; }
.autoclose { height: 4px; border-radius: 999px; background: rgb(255 255 255 / .1); margin-top: 18px; overflow: hidden; }
.autoclose-bar { height: 100%; background: var(--gold); transform-origin: left; }

/* ───────── Advent calendar ───────── */
.advent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 640px) { .advent { grid-template-columns: repeat(6, 1fr); gap: 14px; } }
.door-cell {
  position: relative; aspect-ratio: .8; padding: 0; border: 0; background: none; cursor: pointer; perspective: 700px;
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i) * 25ms);
}
.door-inside {
  position: absolute; inset: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 1.7rem;
  background: radial-gradient(circle at 50% 40%, #2b1a10, #120a06); box-shadow: inset 0 0 0 2px rgb(0 0 0 / .4), inset 0 8px 18px rgb(0 0 0 / .6);
}
.inside-num { font: 700 .8rem var(--body); color: rgb(246 241 231 / .55); }
.door-panel {
  position: absolute; inset: 0; border-radius: 14px; transform-origin: left center; backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 8px 10px; text-align: left;
  background: linear-gradient(160deg, var(--red), var(--red-deep));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .12), 0 10px 18px -10px rgb(0 0 0 / .8);
  transition: transform .9s var(--ease-out), filter .3s;
}
.door-cell:nth-child(3n+2) .door-panel { background: linear-gradient(160deg, #2f7d5b, #18513a); }
.door-cell:nth-child(4n+3) .door-panel { background: linear-gradient(160deg, var(--gold-soft), #c68f2c); color: #2a1d05; }
.door-cell:nth-child(5n+4) .door-panel { background: linear-gradient(160deg, #fbf6ec, #e6d9bf); color: var(--red-deep); }
.door-panel::after { content: ""; position: absolute; right: 9px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / .7); box-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.door-num { font: 700 clamp(1.5rem, 6vw, 2rem)/1 var(--display); }
.door-date { font-size: .68rem; font-weight: 600; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.door-cell.open .door-panel, .door-cell.missed .door-panel { transform: rotateY(-108deg); filter: brightness(.7); }
.door-cell.missed { opacity: .5; }
.door-cell.locked .door-panel { filter: saturate(.55) brightness(.75); }
.door-cell.locked:active .door-panel { animation: wiggle .5s; }
.door-cell.today .door-panel { box-shadow: 0 0 0 3px var(--gold), 0 0 26px 2px rgb(233 180 76 / .55); animation: glow 2.2s ease-in-out infinite; }
.door-cell.today.answered .door-panel { transform: rotateY(-35deg); }
.door-cell.opening .door-panel { transform: rotateY(-108deg); }
.door-today {
  position: absolute; left: 50%; bottom: -8px; translate: -50% 0; z-index: 2; white-space: nowrap;
  font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--gold); color: #2a1d05; padding: 2px 8px; border-radius: 999px;
}
.teaser-door { font-size: 2rem; display: inline-block; animation: wiggle 3.2s ease-in-out infinite; }
.badge.new { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.8s infinite; }

/* Bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .55); opacity: 0; transition: opacity .35s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow: auto;
  margin: 0 auto; max-width: 640px; padding: 28px 22px max(28px, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; color: var(--ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  transform: translateY(105%); transition: transform .5s var(--ease-out);
  box-shadow: 0 -20px 40px -20px rgb(0 0 0 / .7);
}
.sheet-panel::before { content: ""; position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 44px; height: 5px; border-radius: 999px; background: var(--line); }
.sheet:not(.show) .sheet-panel { visibility: hidden; transition: transform .5s var(--ease-out), visibility 0s .5s; }
.sheet.show { pointer-events: auto; }
.sheet.show .sheet-backdrop { opacity: 1; }
.sheet.show .sheet-panel { transform: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .06); cursor: pointer; font-size: 1rem; color: var(--ink); }
.sheet-content h2 { color: var(--ink); }
.sheet-content .question-text { font: 600 1.5rem/1.25 var(--display); margin: 4px 0 18px; }
.sheet-icon { font-size: 3rem; margin: 6px 0 8px; }
.sheet-content .options .btn { justify-content: center; }
.bars { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 7.5rem) 1fr auto; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.bar { height: 14px; border-radius: 999px; background: rgb(0 0 0 / .06); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red), var(--gold)); transform-origin: left; animation: grow 1s var(--ease-out) both; }
.bar-n { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.who { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.who li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.who li:last-child { border-bottom: 0; }
.who .person { font-size: .95rem; }
.who li > span { font-size: .9rem; color: var(--ink-soft); text-align: right; }
.advent-answers { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.advent-answers li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.advent-answers li:last-child { border-bottom: 0; padding-bottom: 0; }

@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--gold-soft), 0 0 40px 6px rgb(233 180 76 / .75); } }
@keyframes grow { from { transform: scaleX(0); } }

/* Poll for tomorrow's question */
.poll { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.poll h3 { font-size: 1.2rem; margin-bottom: 12px; }
.poll-options { display: grid; gap: 8px; }
.poll-option {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 48px; padding: 10px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  font: 600 .95rem var(--body); color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease-spring);
}
.poll-option:hover { transform: translateY(-1px); border-color: var(--gold); }
.poll-option.mine { border-color: var(--red); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgb(233 180 76 / .35), rgb(216 64 47 / .18)); transform-origin: left; animation: grow .8s var(--ease-out) both; }
.poll-option.mine .poll-fill { background: linear-gradient(90deg, rgb(216 64 47 / .3), rgb(233 180 76 / .35)); }
.poll-text, .poll-pct { position: relative; }
.poll-text { flex: 1; }
.poll-pct { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.poll-option.mine .poll-text::after { content: " ✓"; color: var(--red); }

/* Edition phases */
.countdown-label { text-align: center; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--gold); margin: 6px 0 8px; }
.card .countdown-label { color: var(--red); }
.phase-note { text-align: center; color: var(--snow-dim); margin-top: -8px; }
.card .phase-note { color: var(--ink-soft); }
.preparing { display: flex; justify-content: center; gap: 4px; height: 70px; margin: 10px 0 6px; font-size: 2.4rem; }
.preparing span { display: inline-block; animation: shuffle 2.4s var(--ease-out) infinite; }
.preparing span:nth-child(2) { animation-delay: .25s; }
.preparing span:nth-child(3) { animation-delay: .5s; }
.preparing-title { text-align: center; font: italic 600 1.35rem var(--display); margin-bottom: 4px; }
@keyframes shuffle { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-16px) rotate(-10deg); } 40% { transform: translateY(0) rotate(8deg); } }

/* Why? */
.why { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgb(255 255 255 / .08); }
.why h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); max-width: 22ch; }
.why-lead { color: var(--snow-dim); font-size: 1.05rem; max-width: 60ch; }
.why-grid { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .why-grid { grid-template-columns: 1fr 1fr; } }
.why-item { padding: 18px; border-radius: var(--radius); background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); }
.why-item h3 { font-size: 1.15rem; margin: 8px 0 6px; color: var(--snow); }
.why-item p { margin: 0; color: var(--snow-dim); font-size: .95rem; }
.why-icon { font-size: 1.8rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy h2 { font-size: 1.2rem; margin-top: 4px; }
.privacy ul { margin: 0 0 12px; padding-left: 20px; }
.privacy li { margin-bottom: 6px; }
.consent { font-weight: 500; font-size: .92rem; margin: 4px 0 16px; align-items: flex-start; }
.consent input { margin-top: 2px; }

/* App & notifications card */
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.app-row:last-of-type { border-bottom: 0; }
.app-row .btn { flex: none; min-height: 42px; padding: 8px 16px; }
.ios-hint { background: var(--paper-2); border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 0; }

/* Inside jokes */
.letter-rules { margin: 8px 0 0; font: 700 .58rem/1.2 ui-monospace, monospace; letter-spacing: .08em; color: var(--ink-soft); opacity: .7; }
.read-the-rules {
  margin: 10px auto 0; max-width: 34ch; text-align: center; font: 700 .62rem/1.6 ui-monospace, monospace;
  letter-spacing: .12em; color: rgb(233 180 76 / .45);
}

/* Santa <-> receiver signals */
.santa-card h3 { font-size: 1.05rem; margin: 20px 0 10px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.step-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; min-height: 76px;
  border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font: 600 .72rem/1.2 var(--body); color: var(--ink-soft); text-align: center;
  transition: transform .2s var(--ease-spring), background .2s, border-color .2s;
}
.step-btn:active { transform: scale(.94); }
.step-btn .step-icon { font-size: 1.5rem; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s; }
.step-btn.done { border-color: var(--gold); background: #fff6e2; color: var(--ink); }
.step-btn.done .step-icon { filter: none; opacity: 1; }
.step-btn.current { border-color: var(--red); box-shadow: 0 0 0 3px rgb(216 64 47 / .15); }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emoji-grid button {
  aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 1.5rem; cursor: pointer;
  transition: transform .2s var(--ease-spring);
}
.emoji-grid button:hover { transform: scale(1.1); }
.emoji-grid button:active { transform: scale(.88); }
.sent-today { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; }
.big-emoji { font-size: 2.4rem; line-height: 1; }
.big-emoji.pop, .sent-today .big-emoji { animation: pop .5s var(--ease-spring); }
.spy { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--paper-2); }
.spy-eyes { font-size: 2rem; display: inline-block; animation: peek 3s ease-in-out infinite; }
.spy strong { font: 700 1.3rem var(--display); color: var(--red-deep); }
.progress-track { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.progress-track::before, .progress-track::after {
  content: ""; position: absolute; top: 22px; left: 12.5%; height: 4px; border-radius: 999px;
}
.progress-track::before { right: 12.5%; background: var(--line); }
.progress-track::after {
  width: calc((var(--step) - 1) / 3 * 75%); background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width .8s var(--ease-out);
}
.progress-track li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.progress-track .step-icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: #fff; border: 2px solid var(--line); filter: grayscale(1); opacity: .6;
}
.progress-track li.done .step-icon { border-color: var(--gold); filter: none; opacity: 1; }
.progress-track li.current .step-icon { border-color: var(--red); animation: pop .6s var(--ease-spring); }
.step-label { font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.emoji-collection { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-collection li { display: flex; flex-direction: column; align-items: center; padding: 8px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.emoji-collection span { font-size: 1.6rem; }
.emoji-collection small { font-size: .65rem; color: var(--ink-soft); }
@keyframes peek { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

/* Demo */
.demo-banner {
  display: block; position: relative; z-index: 25; padding: 6px 12px; text-align: center; text-decoration: none;
  font: 700 .78rem var(--body); color: #2a1d05; background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, var(--gold-soft) 14px 28px);
}
.demo-role { padding: 0; }
.demo-role button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 20px; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--radius);
  transition: transform .2s var(--ease-spring);
}
.demo-role button:active { transform: scale(.98); }
.demo-role button > span:nth-child(2) { flex: 1; }
.demo-icon { font-size: 2rem; }
.withdraw-link { text-align: center; font-size: .85rem; margin-top: 24px; }
.withdraw-link a { color: var(--snow-dim); }
.rules-box { background: rgb(255 255 255 / .6); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.rules-box p:last-child { margin: 0; }
.invite-banner {
  display: block; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); text-align: center;
  font-weight: 700; text-decoration: none; color: #2a1d05; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 10px 20px -12px rgb(0 0 0 / .8); transition: transform .2s var(--ease-spring);
}
.invite-banner:active { transform: scale(.98); }

/* Lost edition: rebuilt chain fragments */
.fragments { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fragments li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / .6); border: 1px dashed var(--line); }
.frag-name { font-weight: 650; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.frag-arrow { color: var(--red); font-weight: 800; }
.fragments .gap { opacity: .55; }
.conflict { color: var(--red-deep); font-weight: 600; }
