
:root {
  /* Mondo Lobra a tutta pagina: notte blu, bagliori corallo, cerchi e "occhio" del logo ovunque */
  --navy: #0b1e3b;
  --navy-deep: #071429;
  --navy-2: #13294d;
  --red: #ff203c;
  --coral: #f65058;
  --blush: #f7a1a6;
  --steel: #8fa3c8;
  --ink: #0b1e3b;
  --display: "Rubik", "Dubai", "Segoe UI", system-ui, sans-serif;
  --serif: "Bodoni Moda", "Bodoni MT", Didot, Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--display); font-size: 16px; line-height: 1.55; color: #fff;
  background:
    radial-gradient(900px 500px at 85% 115%, rgba(246,80,88,.35), transparent 60%),
    radial-gradient(700px 420px at 0% 70%, rgba(143,163,200,.16), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  overflow-x: hidden;
}
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.page { position: relative; z-index: 1; }

.rail { position: absolute; left: 0; top: 0; bottom: 0; width: 220px; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 380px, rgba(0,0,0,.35) 55%, transparent 90%); mask-image: linear-gradient(180deg, #000 0, #000 380px, rgba(0,0,0,.35) 55%, transparent 90%); }
.rail i { position: absolute; inset: 0; background: url("/img/tile.webp") 0 0 / 220px 244px repeat-y; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.page > header, .page > main, .page > footer { position: relative; z-index: 1; }
/* Copertina */
.cover { position: relative; display: grid; grid-template-columns: 220px 1fr auto; min-height: 520px; align-items: center; }
.texture { align-self: stretch; }
.cover-text { padding: 92px 28px 44px; display: grid; gap: 14px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--coral); }
h1 { margin: 0; font-weight: 900; text-transform: uppercase; font-size: clamp(40px, 6.4vw, 78px); line-height: .92; letter-spacing: -.015em; text-wrap: balance; }
h1 .o { display: inline-block; width: .78em; height: .78em; border-radius: 50%; background: #fff; vertical-align: -.02em; position: relative; margin: 0 .02em; }
h1 .o::after { content: ""; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: var(--red); right: 20%; top: 32%; transition: transform .2s ease; transform: translate(var(--px, 0), var(--py, 0)); }
.lede { margin: 0; max-width: 52ch; color: #c9d3e3; }
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }
.dots { display: grid; grid-template-columns: repeat(24, 10px); gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); transition: background .4s ease, transform .4s ease; }
.dots i.on { background: var(--coral); transform: scale(1.15); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 12px; border-radius: 0 999px 999px 0; background: var(--coral); color: #fff; font-size: 13px; font-weight: 500; }
.pill.dark { background: rgba(255,255,255,.1); }
.house { --w: 260px; position: relative; width: var(--w); aspect-ratio: 748 / 1086; align-self: end; justify-self: end; margin-top: 140px; }
.logo { position: absolute; inset: 0; z-index: 2; background: url("/img/logo.webp") right top / 100% 100% no-repeat; -webkit-mask-image: radial-gradient(circle calc(var(--w) * .695) at 72.6% 52.1%, #000 99.4%, transparent 100%); mask-image: radial-gradient(circle calc(var(--w) * .695) at 72.6% 52.1%, #000 99.4%, transparent 100%); filter: drop-shadow(0 0 50px rgba(255,32,60,.35)); }
.chimney { position: absolute; z-index: 1; left: 141px; top: -26px; width: 40px; height: 62px; }
.chimney svg, .pop svg { display: block; width: 100%; height: auto; }
.pop { position: absolute; z-index: 0; left: 125px; top: -118px; width: 72px; height: 98px; overflow: hidden; }
.pop .santa { position: absolute; left: 4px; bottom: -32px; width: 64px; transform: translateY(105%); animation: popup 8s cubic-bezier(.3,1.3,.5,1) infinite; }
.pop .santa svg { animation: wobble .6s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes popup { 0%, 18% { transform: translateY(105%); } 28% { transform: translateY(-3%); } 32%, 70% { transform: translateY(0); } 80%, 100% { transform: translateY(105%); } }
@keyframes wobble { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.smoke { position: absolute; z-index: 0; left: 152px; top: -40px; width: 12px; height: 12px; border-radius: 50%; background: rgba(230,235,243,.5); animation: smoke 8s ease-out infinite; opacity: 0; }
.smoke.s2 { left: 160px; animation-delay: .5s; width: 16px; height: 16px; }
@keyframes smoke { 0%, 10% { opacity: 0; transform: none; } 14% { opacity: .7; } 26% { opacity: 0; transform: translate(-14px, -60px) scale(2.4); } 100% { opacity: 0; } }

/* Calendario */
main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 56px; display: grid; gap: 20px; }
.bar { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px; }
.bar h2 { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .01em; }
.bar h2 span { color: var(--coral); }
.hint { margin: 0; color: var(--steel); font-size: 14px; }
.grid { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 64px 26px; padding-top: 34px; }
.strings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.strings path { fill: none; stroke: rgba(201,211,227,.55); stroke-width: 2; stroke-linecap: round; }
.door { z-index: 1; }
.door {
  appearance: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: #fff;
  aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #1d3866, #0e2347 70%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 14px 30px -14px rgba(0,0,0,.7);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .25s ease, background .3s ease;
}
.door .num { font-weight: 800; font-size: clamp(26px, 4vw, 42px); line-height: 1; opacity: .9; }
.door .tag { position: absolute; bottom: 17%; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.door .eye { position: absolute; top: 13%; right: 15%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--navy); opacity: 0; transform: scale(.2); transition: opacity .3s ease, transform .4s cubic-bezier(.3,1.6,.5,1); }
.door .eye::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: var(--red); right: 20%; top: 30%; }
.door:hover { transform: translateY(-4px) scale(1.04); }
.door:focus-visible { outline: 3px solid var(--coral); outline-offset: 5px; }
.door.ready { box-shadow: inset 0 0 0 3px var(--coral), 0 0 0 0 rgba(246,80,88,.6); animation: pulse 2.2s ease-out infinite; }
.door.ready .tag { color: var(--coral); }
@keyframes pulse { 0% { box-shadow: inset 0 0 0 3px var(--coral), 0 0 0 0 rgba(246,80,88,.55); } 80%, 100% { box-shadow: inset 0 0 0 3px var(--coral), 0 0 0 18px rgba(246,80,88,0); } }
.door.opened { background: radial-gradient(circle at 32% 26%, #ff5a6a, var(--red) 70%); box-shadow: 0 16px 34px -14px rgba(255,32,60,.7); }
.door.opened .tag { color: #fff; }
.door.opened .eye { opacity: 1; transform: scale(1); }
.door.locked .num { opacity: .55; }
.door.shake { animation: shake .4s ease; }
@keyframes shake { 20% { transform: translateX(-6px) rotate(-3deg); } 45% { transform: translateX(6px) rotate(3deg); } 70% { transform: translateX(-3px); } }
.door.popping, .door.ready.popping { animation: popdoor .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes popdoor { 0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(-6deg); } 100% { transform: scale(1); } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #fff; color: var(--ink); padding: 10px 18px 10px 14px; border-radius: 0 999px 999px 0; font-weight: 500; font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.4); transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .2s ease; opacity: 0; visibility: hidden; z-index: 5; max-width: calc(100% - 32px); border-left: 5px solid var(--red); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

footer { position: relative; z-index: 1; }
footer .inner { max-width: 1120px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--steel); border-top: 1px solid rgba(255,255,255,.08); }
footer p { margin: 0; }
footer strong { color: #fff; font-weight: 500; }

/* Apertura: tendina corallo che parte dal cerchio */
.wipe { position: fixed; inset: 0; z-index: 3; pointer-events: none; clip-path: circle(0px at 50% 50%);
  background:
    radial-gradient(circle at 12% 18%, transparent 0 60px, rgba(255,255,255,.08) 61px 86px, transparent 87px),
    radial-gradient(circle at 88% 82%, transparent 0 120px, rgba(11,30,59,.14) 121px 170px, transparent 171px),
    radial-gradient(circle at 92% 10%, rgba(255,255,255,.07) 0 90px, transparent 91px),
    radial-gradient(circle at 6% 92%, rgba(11,30,59,.16) 0 140px, transparent 141px),
    var(--coral); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

/* Scheda */
dialog { border: 0; padding: 0; background: transparent; width: min(620px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: visible; color: var(--ink); }
dialog::backdrop { background: transparent; }
.card { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 90px rgba(11,30,59,.55); }
.card.in { animation: cardin .6s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes cardin { from { opacity: 0; transform: translateY(40px) scale(.85) rotate(-2deg); } to { opacity: 1; transform: none; } }
.card-top { position: relative; background: var(--navy); color: #fff; padding: 22px 26px 26px; min-height: 210px; overflow: hidden; }
.card-top .tex { position: absolute; right: 0; top: 0; bottom: 0; width: 42%; background: url("/img/texture.webp") left center / cover; opacity: .35; -webkit-mask-image: linear-gradient(270deg, #000 30%, transparent); mask-image: linear-gradient(270deg, #000 30%, transparent); }
.bignum { position: absolute; left: 18px; bottom: -34px; font-weight: 900; font-size: 190px; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(246,80,88,.3); letter-spacing: -.04em; pointer-events: none; }
.biscuit { position: relative; display: inline-flex; align-items: baseline; gap: 5px; background: var(--coral); color: #fff; padding: 5px 18px 6px 26px; margin-left: -26px; border-radius: 0 999px 999px 0; font-weight: 800; font-size: 15px; }
.biscuit em { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.mascot { position: absolute; right: 30px; top: 40px; width: 92px; height: 92px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px var(--red), 0 0 40px rgba(255,32,60,.5); }
.mascot .pupil { position: absolute; z-index: 0; width: 30%; height: 30%; border-radius: 50%; background: var(--red); left: 35%; top: 35%; transition: transform .12s linear; }
.mascot.blink { animation: blink .22s ease; }
@keyframes blink { 50% { transform: scaleY(.1); } }
.dayline { position: relative; margin: 26px 120px 0 0; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--blush); }
.card-top h3 { position: relative; margin: 6px 120px 0 0; font-weight: 900; text-transform: uppercase; font-size: clamp(26px, 5vw, 36px); line-height: 1; text-wrap: balance; }
.card-body { padding: 22px 26px 22px; display: grid; gap: 16px; }
.card-body p { margin: 0; font-size: 17px; max-width: 60ch; }
.challenge { position: relative; background: var(--coral); color: #fff; border-radius: 0 18px 18px 0; padding: 16px 18px 16px 20px; margin-left: -26px; padding-left: 26px; display: grid; gap: 10px; overflow: hidden; }
.challenge::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; border: 18px solid rgba(255,255,255,.14); }
.challenge strong { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); }
.challenge .txt { font-size: 17px; font-weight: 500; line-height: 1.4; position: relative; z-index: 1; }
.accept { justify-self: start; position: relative; z-index: 1; appearance: none; font: inherit; font-weight: 700; font-size: 14px; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; background: #fff; color: var(--red); transition: transform .15s ease, background .25s ease, color .25s ease; }
.accept:hover { transform: scale(1.04); }
.accept.done { background: var(--navy); color: #fff; }
.accept:focus-visible, .btn:focus-visible, .nav:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.navs { display: flex; gap: 8px; }
.nav { appearance: none; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: inherit; font-weight: 800; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.nav:disabled { opacity: .25; cursor: default; }
.btn { appearance: none; font: inherit; font-weight: 500; font-size: 14px; border-radius: 999px; padding: 10px 18px; cursor: pointer; border: 2px solid var(--navy); background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); }
.rise { animation: rise .55s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i) * 90ms + 200ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.bignum.rise { animation-name: numin; }
@keyframes numin { from { opacity: 0; transform: translateX(-40px) scale(1.3); } to { opacity: 1; transform: none; } }

/* Natale */
.garland { position: absolute; left: 0; right: 0; top: 0; height: 110px; z-index: 2; pointer-events: none; }
.garland svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.garland path { fill: none; stroke: rgba(201,211,227,.55); stroke-width: 2; }
.bauble { position: absolute; top: var(--y); left: var(--x); transform: translateX(-50%); }
.bauble > span { display: block; transform-origin: 50% 0; animation: swing var(--t) ease-in-out infinite alternate; }
.bauble > span::before { content: ""; display: block; width: 2px; height: 6px; margin: 0 auto; background: rgba(201,211,227,.55); }
.bauble i { display: block; position: relative; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); margin-top: 5px; box-shadow: inset -4px -5px 0 rgba(0,0,0,.12); }
.bauble i::before { content: ""; position: absolute; left: 50%; top: -6px; width: 40%; height: 7px; transform: translateX(-50%); border-radius: 2px; background: #c9d3e3; }
.bauble.eye i { background: #fff; box-shadow: 0 0 0 3px var(--navy); }
.bauble.eye i::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: var(--red); right: 20%; top: 30%; }
@keyframes swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
h1 .o .hat { position: absolute; width: 74%; left: 26%; top: -48%; transform: rotate(14deg); }
h1 .o .hat svg, .mascot .hat svg { display: block; width: 100%; height: auto; }
.forest { position: relative; height: 230px; margin-top: 10px; }
.forest svg { display: block; width: 100%; height: 100%; }
.twinkle { animation: twinkle var(--d, 1.8s) ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.starglow { animation: starshine 2.4s ease-in-out infinite alternate; filter: drop-shadow(0 0 4px rgba(255,212,94,.7)); }
@keyframes starshine { from { opacity: .8; } to { opacity: 1; } }
.door::before { content: ""; position: absolute; top: -5%; left: 50%; width: 20%; height: 9%; transform: translateX(-50%); border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, #9fb0cc, #e6ebf3 50%, #9fb0cc); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.door::after { content: ""; position: absolute; top: -13%; left: 50%; width: 11%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; border: 2px solid #c9d3e3; }
.door { transform-origin: 50% -10%; }
/* L'oscillazione parte via JS al passaggio del mouse e finisce sempre il suo giro */
.door.swing { animation: dangle 1.1s ease-in-out; }
.door.ready.swing { animation: dangle 1.1s ease-in-out, pulse 2.2s ease-out infinite; }
@keyframes dangle { 0% { transform: rotate(0); } 18% { transform: rotate(-8deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
.mascot .hat { position: absolute; width: 96%; left: 22%; top: -46%; transform: rotate(16deg); z-index: 1; }
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sleigh { position: absolute; top: 12%; left: 0; width: 440px; animation: fly 34s linear 4s infinite both; }
.sleigh .bob { animation: bob 2.2s ease-in-out infinite alternate; }
.sleigh svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes fly { 0% { transform: translateX(calc(100vw + 60px)) translateY(40px); } 45% { transform: translateX(-520px) translateY(-30px); } 100% { transform: translateX(-520px) translateY(-30px); } }
@keyframes bob { from { transform: translateY(-6px) rotate(-1.5deg); } to { transform: translateY(6px) rotate(1.5deg); } }
.deer { animation: deerbob .42s ease-in-out infinite alternate; }
.deer.d2 { animation-delay: -.14s; } .deer.d3 { animation-delay: -.28s; }
@keyframes deerbob { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
.leg { transform-box: fill-box; transform-origin: 50% 0; animation: gallop .42s ease-in-out infinite alternate; }
.leg.b { animation-direction: alternate-reverse; }
@keyframes gallop { from { transform: rotate(-28deg); } to { transform: rotate(24deg); } }
.trail circle { animation: twinkle .9s ease-in-out infinite alternate; }
@media (max-width: 960px) { .cover { grid-template-columns: 1fr auto; } .texture, .rail { display: none; } .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) {
  .sleigh { width: 260px; }
  .cover { grid-template-columns: 1fr; min-height: 0; }
  .house { --w: 150px; order: -1; margin-top: 60px; }
  .pop, .chimney, .smoke { display: none; }
  .cover-text { padding: 4px 20px 26px; }
  .dots { grid-template-columns: repeat(12, 10px); }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 54px 16px; }
  .mascot { width: 64px; height: 64px; right: 18px; }
  .dayline, .card-top h3 { margin-right: 80px; }
  .bignum { font-size: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Schermata di apertura ---------- */
html { scrollbar-gutter: stable; }
.splash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(800px 500px at 50% 110%, rgba(246,80,88,.35), transparent 60%), var(--navy); color: #fff; clip-path: circle(150% at 50% 50%); }
.splash.out { animation: splash-out .8s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes splash-out { to { clip-path: circle(0% at 50% 50%); } }
.splash-in { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 20px; }
.splash-eye { position: relative; width: 120px; height: 120px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 8px var(--red), 0 0 60px rgba(255,32,60,.55); animation: splash-in .7s cubic-bezier(.3,1.5,.5,1) both; }
.splash-eye i { position: absolute; width: 30%; height: 30%; border-radius: 50%; background: var(--red); left: 35%; top: 35%; animation: look 1.6s ease-in-out infinite; }
.splash-eye .hat { position: absolute; width: 96%; left: 22%; top: -46%; transform: rotate(16deg); }
.splash-eye .hat svg { display: block; width: 100%; height: auto; }
@keyframes look { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(60%, -20%); } 50% { transform: translate(-50%, 10%); } 75% { transform: translate(30%, 40%); } }
@keyframes splash-in { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.splash-title { margin: 0; font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 5vw, 44px); letter-spacing: -.01em; animation: rise .6s .2s both; }
.splash-sub { margin: 0; color: #c9d3e3; font-size: 14px; animation: rise .6s .35s both; }
.splash-dots { display: grid; grid-template-columns: repeat(24, 8px); gap: 4px; }
.splash-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.15); animation: dot-on .2s ease forwards; }
@keyframes dot-on { to { background: var(--coral); transform: scale(1.2); } }
@media (max-width: 480px) { .splash-dots { grid-template-columns: repeat(12, 8px); } }

/* ---------- v3: giocatore, pannelli, finestre di dialogo ---------- */
.me { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.me .pill { font-size: 14px; padding: 7px 16px 7px 14px; }
.pill.join { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; padding: 10px 22px 10px 18px; background: var(--red); box-shadow: 0 10px 30px -10px rgba(255,32,60,.8); }
.pill.join:hover { filter: brightness(1.08); }
.pill b { font-weight: 800; }
.pill.user { background: #fff; color: var(--navy); }
button.pill { appearance: none; border: 0; cursor: pointer; font: inherit; }
.bar-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-lb { font-weight: 700; font-size: 14px; padding: 8px 16px 8px 14px; }
.door .tag.score { color: #fff; font-weight: 700; letter-spacing: .04em; font-size: 12px; }
.door .x2 { position: absolute; top: 18%; left: 16%; font-size: 11px; font-weight: 800; color: var(--navy); background: #ffd45e; border-radius: 999px; padding: 1px 6px; }
.door .let { position: absolute; top: 18%; left: 16%; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.14); color: #ffd45e; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.panel { background: rgba(19,41,77,.72); border: 1px solid rgba(255,255,255,.08); border-radius: 0 22px 22px 22px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; backdrop-filter: blur(4px); }
.panel h3 { margin: 0; font-weight: 800; text-transform: uppercase; font-size: 16px; letter-spacing: .04em; color: var(--coral); }
.panel-sub { margin: 0; font-size: 14px; color: #c9d3e3; }
.meter { height: 14px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--coral), #ffd45e); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.meter-label { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.slots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.slots span { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.35); border: 2px dashed rgba(255,255,255,.18); }
.slots span.on { background: #fff; color: var(--red); border: 0; box-shadow: 0 0 0 3px var(--navy), 0 0 18px rgba(255,212,94,.5); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; flex-direction: column; padding: 8px 12px; border-radius: 0 14px 14px 14px; background: #fff; color: var(--navy); }
.badge b { font-size: 13px; font-weight: 800; }
.badge small { font-size: 12px; color: #5b6b85; }

.tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags span { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.tags .gold { background: #ffd45e; color: var(--navy); }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }
.actions .timer + .btn, .card-body > .actions { margin-top: 2px; }
.card-body { gap: 14px; }

dialog.sheet { border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100% - 28px)); background: #fff; color: var(--ink); box-shadow: 0 40px 90px rgba(7,20,41,.6); }
dialog.sheet.wide { width: min(560px, calc(100% - 28px)); }
dialog.sheet::backdrop { background: rgba(7,20,41,.78); }
.sheet-in { padding: 24px 24px 20px; display: grid; gap: 14px; }
.sheet-in h3 { margin: 0; font-weight: 900; text-transform: uppercase; font-size: 24px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #eef1f6; border-radius: 999px; padding: 4px; }
.seg button { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; cursor: pointer; color: var(--navy); }
.seg button.on { background: var(--navy); color: #fff; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: #5b6b85; }
.field input, .gi { font: inherit; font-size: 16px; color: var(--ink); padding: 11px 14px; border-radius: 12px; border: 2px solid #d5dbe5; background: #fff; }
.field input:focus, .gi:focus { outline: none; border-color: var(--navy); }
.form-note { margin: 0; font-size: 13px; color: #5b6b85; }
.form-err { margin: 0; min-height: 1em; font-size: 14px; font-weight: 600; color: #c0182e; }
.codebox { font-size: 30px; font-weight: 900; letter-spacing: .2em; text-align: center; padding: 14px; border-radius: 14px; background: #eef1f6; color: var(--red); }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.lb li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: #f5f7fb; font-variant-numeric: tabular-nums; }
.lb li .r { font-weight: 900; color: var(--navy); text-align: center; }
.lb li:nth-child(1) .r, .lb li:nth-child(2) .r, .lb li:nth-child(3) .r { color: #fff; background: var(--red); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.lb li .n { font-weight: 600; }
.lb li .n small { display: block; color: #5b6b85; font-weight: 400; font-size: 12px; }
.lb li .p { font-weight: 800; }
.lb li.me { background: #ffe6e9; box-shadow: inset 0 0 0 2px var(--coral); }
.lb .empty { background: none; display: block; color: #5b6b85; }

@media (max-width: 860px) { .panels { grid-template-columns: 1fr; } }
