/* ============================================================
   Halloween ’26 · layout. Colours, fonts and shapes are tokens;
   themes.css overrides them per palette, [data-version] picks the hero.
   ============================================================ */
:root {
  --bg: #0a0a0b;
  --bg-2: #101013;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3efe9;
  --muted: #8f8a84;
  --accent: #ff6a00;
  --accent-2: #ffa040;
  --accent-soft: rgba(255, 106, 0, 0.18);
  --accent-ink: #120700;
  --pumpkin: #ff6a00;
  --rim: #6d5bff;
  --radius: 22px;
  --radius-sm: 12px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 40px var(--accent-soft);
  --title-weight: 700;
  --title-tracking: -0.04em;
  --title-case: uppercase;
  --header-h: 64px;
  --tab-h: 64px;
  --maxw: 1120px;
  --pad: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-top: var(--header-h);
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 5vw, 52px); font-weight: var(--title-weight); }
h3 { font-size: 22px; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- background layers (z 0 and 1 sit behind main at z 2) ---------- */
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.9; }
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-glow i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  filter: blur(40px); opacity: 0.7; animation: drift 26s var(--ease) infinite alternate;
}
.bg-glow i:nth-child(1) { top: -30vmax; left: -20vmax; }
.bg-glow i:nth-child(2) { bottom: -35vmax; right: -25vmax; animation-duration: 34s; animation-delay: -8s; }
.bg-glow i:nth-child(3) { top: 30vh; left: 40vw; width: 30vmax; height: 30vmax; opacity: 0.35; animation-duration: 40s; animation-delay: -20s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
.bg-fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--pad); padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid transparent; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.top.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom-color: var(--border); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.top-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px var(--accent); transition: width 0.15s linear; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; font-size: 17px; }
.logo-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-soft)); border-radius: 11px; background: linear-gradient(145deg, var(--accent-soft), rgba(255, 255, 255, 0.03)); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: transform 0.3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.06); }
.logo-text em { font-style: normal; color: var(--accent); margin-left: 4px; }
.nav { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.nav-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px; background: var(--accent); box-shadow: var(--glow); }
.nav-ind.ready { transition: left 0.4s var(--ease), width 0.4s var(--ease); }
.nav a { position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.3s; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent-ink); }
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 18px; line-height: 1; display: grid; place-items: center; transition: transform 0.3s var(--ease), border-color 0.2s; }
.icon-btn:hover { transform: rotate(180deg); border-color: var(--accent); }
.cta {
  position: relative; overflow: hidden; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; white-space: nowrap;
  box-shadow: var(--glow); transition: transform 0.2s var(--ease);
}
.cta span { position: relative; z-index: 1; }
.cta::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.cta:hover { transform: translateY(-1px) scale(1.03); }

/* ---------- buttons & cards ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent;
  box-shadow: var(--glow); transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

/* ---------- pages ---------- */
main { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) calc(var(--tab-h) + 40px); }
.page { animation: page-in 0.5s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.section-head { padding: 48px 0 28px; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 17px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; } .reveal:nth-child(3) { transition-delay: 0.16s; } .reveal:nth-child(4) { transition-delay: 0.24s; } .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 12px 0 36px;
}
.hero-stage { position: relative; width: min(94vw, 640px); height: clamp(240px, 40vh, 420px); z-index: 1; }
.hero-glow { position: absolute; inset: 8% 14%; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%); filter: blur(28px); animation: breathe 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.12); opacity: 1; } }
.hero-3d { position: absolute; inset: 0; }
.hero-3d canvas { width: 100% !important; height: 100% !important; display: block; cursor: pointer; touch-action: pan-y; }
.hero-3d .fallback { font-size: 140px; line-height: 1; display: grid; place-items: center; height: 100%; filter: drop-shadow(0 0 40px var(--accent-soft)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
.hero-title {
  position: relative; z-index: 2; margin-top: -0.2em;
  font-size: clamp(60px, 15vw, 190px); font-weight: var(--title-weight); letter-spacing: var(--title-tracking); text-transform: var(--title-case); line-height: 0.9;
  background: linear-gradient(180deg, var(--text) 30%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-date { margin-top: 18px; font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
.hero-place { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-size: 14px; color: var(--text); transition: border-color 0.3s, transform 0.3s var(--ease); }
.hero-place i { font-style: normal; line-height: 0; color: var(--accent); }
.hero-place .ic svg { width: 18px; height: 18px; }
.hero-place span { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hero-place:hover { border-color: var(--accent); transform: translateY(-2px); }
.faq details p a { color: var(--accent); font-weight: 600; text-decoration: none; }
.faq details p a:hover { text-decoration: underline; }
.countdown { display: flex; gap: 10px; margin-top: 24px; }
.cd { min-width: 72px; padding: 14px 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.cd b { display: block; font-family: var(--font-display); font-size: clamp(30px, 6vw, 48px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.cd b.tick { animation: tick 0.4s var(--ease); }
@keyframes tick { 0% { transform: translateY(-6px); opacity: 0.3; color: var(--accent); } 100% { transform: none; opacity: 1; } }
.cd span { display: block; margin-top: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.hero-live { margin-top: 24px; font-family: var(--font-display); font-size: 22px; color: var(--accent); }

/* the four facts, inside the hero */
.facts { list-style: none; margin: 34px 0 0; padding: 0; width: 100%; max-width: 1000px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: left; }
.facts li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: border-color 0.3s, transform 0.3s var(--ease); }
.facts li:hover { border-color: var(--accent); transform: translateY(-3px); }
.facts i { grid-row: 1 / 3; font-style: normal; line-height: 0; color: var(--accent); filter: drop-shadow(0 0 10px var(--accent-soft)); }
.ic svg { width: 24px; height: 24px; display: block; }
.logo-mark svg { width: 22px; height: 22px; display: block; }
.facts b { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; line-height: 1.15; }
.facts li:nth-child(1) b, .facts li:nth-child(4) b { color: var(--accent); }
.facts p { grid-column: 2; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* versions without the 3D stage get a taller title */
[data-version="skeleton"] .hero-stage, [data-version="bats"] .hero-stage, [data-version="eyes"] .hero-stage { display: none; }
[data-version="skeleton"] .hero-title, [data-version="bats"] .hero-title, [data-version="eyes"] .hero-title { margin-top: 0; font-size: clamp(64px, 17.5vw, 230px); }
[data-version="bats"] .hero::before {
  content: ""; position: absolute; z-index: 0; top: 4%; right: 6%; width: clamp(150px, 24vw, 290px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fff7e4, #f3d9a2 50%, #b8863f 100%);
  box-shadow: 0 0 60px rgba(255, 210, 140, 0.35), 0 0 180px rgba(255, 150, 60, 0.18); opacity: 0.9; animation: moonrise 50s ease-in-out infinite alternate;
}
@keyframes moonrise { from { transform: translateY(0); } to { transform: translateY(-5vh); } }
[data-version="eyes"] .hero-title { text-shadow: 0 0 60px var(--accent-soft); }

/* ---------- quick links ---------- */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.link { position: relative; display: block; padding: 24px 24px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; overflow: hidden; transition: border-color 0.3s, transform 0.35s var(--ease); }
.link::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 65%); opacity: 0; transition: opacity 0.4s; }
.link:hover { border-color: var(--accent); transform: translateY(-4px); }
.link:hover::before { opacity: 1; }
.link-top { display: flex; align-items: center; gap: 10px; }
.link b { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; }
.link em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); }
.link em.open { background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.link p { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 26ch; }
.link .arrow { position: absolute; right: 22px; top: 20px; font-size: 24px; color: var(--accent); transition: transform 0.3s var(--ease); }
.link:hover .arrow { transform: translateX(6px); }

/* ---------- FAQ ---------- */
.faq { margin-top: 72px; }
.faq h2 { margin-bottom: 18px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 24px); font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--accent); font-weight: 400; transition: transform 0.35s var(--ease), background 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }
.faq details p { padding: 0 0 22px; color: var(--muted); font-size: 17px; max-width: 60ch; animation: page-in 0.4s var(--ease); }

/* ---------- rules ---------- */
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rules li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.3s, transform 0.3s var(--ease); }
.rules li:hover { border-color: var(--accent); transform: translateX(6px); }
.rules li span { font-family: var(--font-display); font-size: clamp(40px, 7vw, 72px); font-weight: var(--title-weight); line-height: 0.85; color: var(--accent); letter-spacing: -0.04em; }
.rules li b { display: block; font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px); line-height: 1.15; margin: 4px 0 8px; letter-spacing: -0.01em; }
.rules li p { color: var(--muted); font-size: 16px; }

/* ---------- the wall ---------- */
.wall { margin-top: 56px; }
.wall .section-head { padding-top: 24px; }
.wall-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; }
.wall-form input { min-width: 0; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.wall-form input:focus { outline: none; border-color: var(--accent); }
.wall-form .btn { padding: 12px 22px; }
.wall-list { margin-top: 18px; display: grid; gap: 10px; }
.wall-post { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); animation: page-in 0.4s var(--ease); }
.wall-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.wall-meta b { color: var(--accent-2); font-family: var(--font-display); font-size: 14px; }
.wall-post p { margin-top: 4px; font-size: 16px; overflow-wrap: anywhere; }

/* ---------- vote ---------- */
.soon { min-height: calc(100dvh - var(--header-h) - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 0; }
.soon-mark { font-size: 72px; line-height: 1; margin-bottom: 14px; filter: drop-shadow(0 0 24px var(--accent-soft)); animation: bob 5s ease-in-out infinite; }
.soon h2 { font-size: clamp(44px, 9vw, 88px); letter-spacing: var(--title-tracking); text-transform: var(--title-case); }
.soon p { font-size: clamp(17px, 2.4vw, 22px); max-width: 32ch; }
.soon .muted { margin-top: 18px; font-size: 15px; }
.vote-head { padding: 48px 0 20px; }
.vote-head p { color: var(--muted); margin-top: 8px; font-size: 17px; }
.vote-step { margin-top: 36px; }
.vote-step h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; font-size: clamp(22px, 3vw, 30px); }
.vote-step h3 i { font-style: normal; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); letter-spacing: 0.08em; }
.vote-step > p { color: var(--muted); margin-bottom: 18px; }
.costumes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .costumes { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 960px) { .costumes { grid-template-columns: repeat(4, 1fr); } }
.costume {
  position: relative; padding: 0; overflow: hidden; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface);
  text-align: left; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; -webkit-tap-highlight-color: transparent;
}
.costume img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--bg-2); transition: transform 0.5s var(--ease); }
.costume:hover img { transform: scale(1.04); }
.costume .name { display: block; padding: 12px 14px; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.costume .rank { position: absolute; top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; background: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); transform: scale(0); transition: transform 0.3s var(--ease); }
.costume.picked { border-color: var(--accent); box-shadow: var(--glow); }
.costume.picked .rank { transform: scale(1); }
.costumes.has-picks .costume:not(.picked) img { filter: saturate(0.6) brightness(0.8); }
.costume .rank.r1 { background: #ffd166; } .costume .rank.r2 { background: #d9dde3; } .costume .rank.r3 { background: #d79a63; }
.costume.worst-pick { border-color: #8b5cf6; box-shadow: 0 0 30px rgba(139, 92, 246, 0.35); }
.costume.worst-pick .rank { background: #8b5cf6; color: #fff; transform: scale(1); box-shadow: none; }
.reason { width: 100%; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); resize: vertical; min-height: 84px; }
.reason:focus { outline: none; border-color: var(--accent); }
.vote-bar { position: sticky; bottom: calc(var(--tab-h) + 12px); margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 5; }
.vote-bar .sum { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-bar .sum b { color: var(--text); }
.vote-bar .btn { flex: none; white-space: nowrap; padding: 12px 20px; font-size: 15px; }
.vote-done { min-height: calc(100dvh - var(--header-h) - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.vote-done .soon-mark { animation: none; }
.vote-done h2 { font-size: clamp(40px, 8vw, 80px); letter-spacing: var(--title-tracking); text-transform: var(--title-case); }
.vote-done .sumlist { margin-top: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 16px; }
.vote-done .sumlist b { color: var(--text); }
.vote-done .sumlist em { color: var(--accent); font-style: normal; font-family: var(--font-display); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 20px); transform: translate(-50%, 20px); z-index: 90; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; transition: 0.3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tab bar (mobile) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-top: 1px solid var(--border);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); transition: color 0.2s; }
.tabbar a i { font-style: normal; line-height: 0; transition: transform 0.25s var(--ease), color 0.2s; color: var(--muted); }
.tabbar a i svg { width: 22px; height: 22px; display: block; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active i { transform: translateY(-2px) scale(1.1); color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-soft)); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade 0.3s both; }
@keyframes fade { from { opacity: 0; } }
.modal-box { position: relative; width: 100%; max-width: 480px; padding: 36px 32px 28px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); box-shadow: var(--shadow); animation: pop 0.45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); display: grid; place-items: center; }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.offer { text-align: center; overflow: hidden; }
.offer::before { content: ""; position: absolute; inset: -50% -20% auto; height: 80%; background: radial-gradient(ellipse at top, var(--accent-soft), transparent 60%); pointer-events: none; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; animation: badge-pulse 2.5s infinite; }
@keyframes badge-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 10px transparent; } }
.offer h2 { margin-top: 16px; font-size: clamp(32px, 6vw, 44px); letter-spacing: -0.03em; }
.offer-big { margin: 18px 0 12px; display: flex; flex-direction: column; gap: 2px; }
.offer-big b { font-family: var(--font-display); font-size: clamp(56px, 12vw, 84px); line-height: 1; letter-spacing: -0.04em; color: var(--accent); text-shadow: 0 0 40px var(--accent-soft); }
.offer-big span { color: var(--muted); font-size: 15px; }
.offer > p { color: var(--muted); }
.offer .btn { margin-top: 22px; width: 100%; }
.offer .small { margin-top: 14px; }
.sheet { max-width: 560px; }
.sheet h3 { margin-bottom: 14px; }
.sheet-sub { margin: 18px 0 10px !important; font-size: 12px !important; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-align: left; transition: border-color 0.2s; }
.theme-opt:hover, .theme-opt.active { border-color: var(--accent); }
.theme-opt .sw { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 18px; }
.theme-opt b { display: block; font-family: var(--font-display); font-size: 14px; }
.theme-opt span { display: block; font-size: 12px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .tabbar { display: none; } body { --tab-h: 0px; } }
@media (max-width: 759px) {
  .nav { display: none; }
  .cta { padding: 9px 14px; font-size: 13px; }
  :root { --pad: 16px; --radius: 18px; }
  .logo { font-size: 15px; }
  .card { padding: 20px; }
  .cd { min-width: 0; flex: 1; padding: 12px 6px 10px; }
  .countdown { width: 100%; max-width: 420px; }
  .hero { padding-bottom: 28px; }
  .hero-place { font-size: 13px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
  .hero-stage { height: clamp(220px, 34vh, 360px); }
  .facts { margin-top: 26px; gap: 8px; }
  .facts li { padding: 12px 14px; }
  .facts b { font-size: 15px; }
  .facts p { font-size: 12px; }
  .links { grid-template-columns: 1fr; }
  .link { padding: 20px; }
  .rules li { padding: 20px; gap: 14px; }
  .wall-form { grid-template-columns: 1fr; }
  .wall-form .btn { width: 100%; }
  .modal { padding: 0; align-items: end; }
  .modal-box { max-width: none; border-radius: var(--radius) var(--radius) 0 0; padding: 32px 22px calc(24px + env(safe-area-inset-bottom)); animation-name: slide; max-height: 88dvh; overflow: auto; }
  @keyframes slide { from { transform: translateY(40px); opacity: 0; } }
  .themes { grid-template-columns: 1fr; }
  [data-version="bats"] .hero::before { top: 2%; right: auto; left: 50%; transform: translateX(-50%); width: clamp(140px, 44vw, 200px); animation: none; }
}
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
