:root {
  --midnight: #101B2D; --black: #080C14; --red: #C91F36; --green: #164D36; --gold: #E9C679;
  --frost: #EAF4FF; --pink: #ED5690; --lime: #D9FF00;
  --mute: #A9B9D0; --line: rgba(233, 198, 121, .28);
  --disp: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--frost); font-family: var(--body); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--black); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------ top bar */
.topbar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 14px 20px 28px; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 12, 20, .92) 0%, rgba(8, 12, 20, .6) 60%, rgba(8, 12, 20, 0) 100%); }
.topbar > * { pointer-events: auto; }
.brand h1 { margin: 0; font-family: var(--disp); font-weight: 800; font-size: clamp(18px, 2.4vw, 30px); letter-spacing: .01em; line-height: 1; }
.brand h1 span { color: var(--gold); text-shadow: 0 0 18px rgba(233, 198, 121, .45); }
.brand .sub { margin: 6px 0 0; font-size: 14px; color: var(--gold); font-style: italic; }
.brand .tag { margin: 3px 0 0; font-size: 12.5px; color: var(--mute); }
.status { text-align: right; min-width: 220px; }
.progress-line { font-size: 13px; color: var(--mute); }
.progress-line b { color: var(--frost); font-family: var(--mono); font-size: 15px; }
.bar { margin: 6px 0 0 auto; width: 220px; height: 6px; border-radius: 3px; background: rgba(234, 244, 255, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 3px; transition: width .8s ease; }
.next { margin-top: 6px; font-size: 12px; color: var(--mute); font-family: var(--mono); }
.next b { color: var(--gold); font-weight: 600; }

/* ------------------------------------------------------------ viewport */
#viewport { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background:
  radial-gradient(ellipse at 50% 30%, #17243b 0%, #0b1220 55%, #05080f 100%); }
#viewport.dragging { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#art { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; pointer-events: none;
  filter: saturate(var(--sat, .9)) brightness(var(--bri, .92)); transition: filter 1.5s ease; }
#fx, #fx-top, #doors, #eggs { position: absolute; inset: 0; }
#fx, #fx-top { pointer-events: none; }
#fx-top { z-index: 3; }
#doors { z-index: 2; }
#eggs { z-index: 1; }

/* ------------------------------------------------------------ doors */
.door { position: absolute; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; perspective: 900px; outline: none; }
.door:focus-visible::after { content: ''; position: absolute; inset: -5px; border: 3px solid var(--frost); border-radius: 8px; box-shadow: 0 0 0 3px var(--black); }
.door.shape-circle:focus-visible::after { border-radius: 50%; }
.door .comp { position: absolute; inset: 0; overflow: hidden; border-radius: 3px;
  background: radial-gradient(ellipse at 50% 35%, #4a2a12 0%, #1d0f08 70%, #0c0604 100%);
  box-shadow: inset 0 0 10px 3px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(0, 0, 0, .8); }
.door .glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(255, 214, 140, .95) 0%, rgba(233, 160, 70, .5) 40%, rgba(0, 0, 0, 0) 75%); opacity: 0; transition: opacity .9s ease; }
.door .reveal { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; opacity: 0; transform: scale(1.15) translateY(6%); transition: opacity .7s ease .1s, transform 1s cubic-bezier(.2, .8, .2, 1) .1s; }
.door .play { position: absolute; right: 6%; bottom: 6%; width: max(12px, 26%); aspect-ratio: 1; max-width: 26px; border-radius: 50%; background: rgba(8, 12, 20, .72); border: 1px solid var(--gold); display: grid; place-items: center; opacity: 0; transition: opacity .4s ease .9s; }
.door .play::before { content: ''; width: 0; height: 0; margin-left: 12%; border-left: 7px solid var(--gold); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; transform: scale(var(--ps, 1)); }
.door .flap { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.15s cubic-bezier(.25, .9, .25, 1); will-change: transform; }
.door .face, .door .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; border-radius: 3px; }
.door .face img { position: absolute; max-width: none; pointer-events: none; user-select: none; filter: saturate(var(--sat, .9)) brightness(var(--bri, .92)); }
.door .face::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1.4px dashed rgba(255, 236, 196, .62);
  box-shadow: inset 0 0 0 .6px rgba(0, 0, 0, .55), inset 1px 1px 0 rgba(255, 255, 255, .12); pointer-events: none; }
.door .back { background: repeating-linear-gradient(115deg, #c8ac7a 0 3px, #bea06c 3px 5px), #c4a673;
  box-shadow: inset 0 0 0 1px rgba(80, 50, 20, .55), inset 0 0 14px rgba(70, 40, 10, .35); }
.door .back::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .25), transparent 60%); }
.door.hy .back { transform: rotateY(180deg); }
.door.hx .back { transform: rotateX(180deg); }
.door.hinge-left .flap, .door .flap.l { transform-origin: 0 50%; }
.door.hinge-right .flap, .door .flap.r { transform-origin: 100% 50%; }
.door.hinge-top .flap { transform-origin: 50% 0; }
.door.hinge-bottom .flap { transform-origin: 50% 100%; }
.door .flap.l { right: 50%; }
.door .flap.r { left: 50%; }
.door.shape-circle .comp, .door.shape-circle .face, .door.shape-circle .back { border-radius: 50%; }
.door .num { position: absolute; z-index: 2; font-family: var(--mono); font-weight: 600; color: #fff; line-height: 1; letter-spacing: .02em; pointer-events: none;
  text-shadow: 0 0 2px #000, 0 0 5px rgba(0, 0, 0, .9), 0 1px 1px #000; transition: opacity .25s ease; }
.door .num.np-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.door .num.np-tl { left: 7%; top: 7%; }
.door .num.np-tr { right: 7%; top: 7%; }
.door .num.np-bl { left: 7%; bottom: 7%; }
.door .num.np-br { right: 7%; bottom: 7%; }
.door .num i { font-style: normal; display: inline-block; padding: .12em .28em; border-radius: .3em; background: rgba(8, 12, 20, .38); border: 1px solid rgba(233, 198, 121, .55); }
.door.special .num i { background: rgba(201, 31, 54, .78); border-color: var(--gold); }

/* today's door: golden glow along the perforation */
.door.today:not(.opened)::before { content: ''; position: absolute; inset: -2px; border-radius: 5px; pointer-events: none; z-index: 3;
  box-shadow: 0 0 0 1.5px rgba(233, 198, 121, .9), 0 0 10px 3px rgba(233, 198, 121, .75), 0 0 26px 6px rgba(233, 198, 121, .35);
  animation: todayGlow 2.4s ease-in-out infinite; }
.door.today.shape-circle:not(.opened)::before { border-radius: 50%; }
@keyframes todayGlow { 50% { box-shadow: 0 0 0 1.5px rgba(233, 198, 121, .55), 0 0 5px 1px rgba(233, 198, 121, .45), 0 0 12px 3px rgba(233, 198, 121, .18); } }
.door:hover:not(.opened) .face::after { border-color: rgba(255, 236, 196, .95); }

/* tearing + opening */
.door.tearing .flap { animation: tear .38s steps(6) 1; }
@keyframes tear { 0%, 100% { translate: 0 0; } 20% { translate: .6px -.4px; } 40% { translate: -.5px .5px; } 60% { translate: .5px .3px; } 80% { translate: -.3px -.5px; } }
.door.tearing .face::after { border-color: #fff6e0; border-style: dotted; }
.door.opened .num { opacity: 0; }
.door.opened.hinge-left .flap { transform: rotateY(-118deg); }
.door.opened.hinge-right .flap { transform: rotateY(118deg); }
.door.opened.hinge-top .flap { transform: rotateX(112deg); }
.door.opened.hinge-bottom .flap { transform: rotateX(-112deg); }
.door.opened .flap.l { transform: rotateY(-118deg); }
.door.opened .flap.r { transform: rotateY(118deg); }
.door.opened .comp { box-shadow: inset 0 0 10px 3px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .5); }
.door.opened .glow { opacity: .55; }
.door.revealed .reveal { opacity: 1; transform: none; }
.door.revealed .glow { opacity: .35; }
.door.revealed .play { opacity: 1; }
.door.instant .flap, .door.instant .reveal, .door.instant .glow, .door.instant .play { transition: none !important; }
.door.shake .flap { animation: shake .5s cubic-bezier(.36, .07, .19, .97) 1; }
@keyframes shake { 10%, 90% { translate: -1px 0; } 20%, 80% { translate: 2px 0; } 30%, 50%, 70% { translate: -3px 0; } 40%, 60% { translate: 3px 0; } }
.door.opening .glow { opacity: 1; }
.shard { position: absolute; width: 3px; height: 2px; background: #d9c094; border-radius: 1px; pointer-events: none; z-index: 4; animation: shard .7s ease-out forwards; }
@keyframes shard { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ------------------------------------------------------------ eggs */
.egg { position: absolute; padding: 0; border: 0; background: transparent; cursor: help; border-radius: 10px; }
.egg:hover, .egg:focus-visible { background: radial-gradient(ellipse, rgba(234, 244, 255, .1), transparent 70%); outline: none; }
.egg:focus-visible { box-shadow: 0 0 0 2px var(--frost); }

/* ------------------------------------------------------------ living building */
.fxe { position: absolute; pointer-events: none; }
.neon { mix-blend-mode: screen; background: radial-gradient(ellipse, rgba(255, 92, 200, .55), rgba(255, 92, 200, 0) 65%); animation: neon 7s infinite; }
@keyframes neon { 0%, 18%, 22%, 25%, 100% { opacity: .75; } 20%, 24% { opacity: .2; } 60% { opacity: .9; } }
.flame { mix-blend-mode: screen; background: radial-gradient(ellipse at 50% 70%, rgba(255, 170, 60, .7), rgba(255, 90, 20, 0) 70%); animation: flame 1.3s ease-in-out infinite alternate; }
@keyframes flame { 0% { opacity: .55; transform: scale(1, .95); } 40% { opacity: .9; transform: scale(1.04, 1.06); } 100% { opacity: .65; transform: scale(.97, 1); } }
.twinkle { width: 5px; height: 5px; border-radius: 50%; background: #fff3c4; box-shadow: 0 0 6px 2px rgba(255, 220, 140, .9); animation: tw 2.6s ease-in-out infinite; mix-blend-mode: screen; }
.twinkle.r { background: #ffb3c1; box-shadow: 0 0 6px 2px rgba(255, 80, 110, .85); }
.twinkle.g { background: #c9ffb8; box-shadow: 0 0 6px 2px rgba(90, 230, 120, .8); }
@keyframes tw { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.beam { mix-blend-mode: screen; opacity: .45; transform-origin: 50% 0; background: conic-gradient(from 160deg at 50% 0, transparent 0deg, rgba(255, 70, 200, .55) 8deg, transparent 18deg, transparent 40deg, rgba(200, 120, 255, .5) 48deg, transparent 58deg); animation: beam 6s ease-in-out infinite alternate; }
.beam.b2 { animation-duration: 4.4s; animation-direction: alternate-reverse; background: conic-gradient(from 150deg at 50% 0, transparent 0deg, rgba(217, 255, 0, .35) 6deg, transparent 14deg, transparent 50deg, rgba(255, 90, 160, .45) 58deg, transparent 66deg); }
@keyframes beam { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.disco { border-radius: 50%; mix-blend-mode: screen; background: radial-gradient(circle, rgba(255, 255, 255, .85) 0 6%, rgba(255, 190, 255, .35) 20%, transparent 62%); animation: disco 1.9s linear infinite; }
@keyframes disco { 0%, 100% { opacity: .55; transform: rotate(0) scale(1); } 50% { opacity: .95; transform: rotate(180deg) scale(1.08); } }
.floor { mix-blend-mode: screen; background: linear-gradient(0deg, rgba(255, 60, 190, .5), transparent); animation: beat .47s ease-out infinite; }
@keyframes beat { 0% { opacity: .75; } 100% { opacity: .15; } }
.screen { mix-blend-mode: screen; background: linear-gradient(180deg, rgba(160, 120, 255, .25), rgba(255, 80, 200, .12)); animation: scr 3.3s steps(2) infinite; }
@keyframes scr { 50% { opacity: .35; } }
.chand { mix-blend-mode: screen; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 225, 150, .65), transparent 65%); animation: tw 3.8s ease-in-out infinite; }
.paper { width: 12px; height: 9px; background: #fbf5e6; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); animation: paper 9s ease-in-out infinite; }
@keyframes paper { 0%, 12% { transform: translate(0, 0) rotate(-6deg); opacity: 0; } 18% { opacity: 1; } 55% { transform: translate(var(--px), -14px) rotate(8deg); opacity: 1; } 62%, 100% { transform: translate(var(--px), 0) rotate(2deg); opacity: 0; } }
.spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px 2px var(--c); animation: spark 1.5s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes spark { 0% { transform: translate(0, 0); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 22px)); opacity: 0; } }
.warmth { inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(255, 190, 100, .0), rgba(255, 190, 100, 0)); mix-blend-mode: soft-light; transition: background 2s ease; }
.tree-tint { mix-blend-mode: hue; border-radius: 40% 40% 10% 10%; opacity: 0; transition: opacity .6s ease; }
body.party .beam { opacity: .95; animation-duration: .9s; }
body.party .floor { animation-duration: .23s; }
body.party .disco { animation-duration: .6s; }
body.celebrate #art { animation: celebrate 1.2s ease-in-out infinite alternate; }
@keyframes celebrate { to { filter: saturate(1.35) brightness(1.12); } }
body.no-anim .fxe, body.no-anim .spark { animation-play-state: paused !important; }
body.no-anim .twinkle, body.no-anim .spark, body.no-anim .paper, body.no-anim .beam { display: none; }
body.no-anim .door.today:not(.opened)::before { animation: none; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ------------------------------------------------------------ controls */
.controls { position: fixed; z-index: 25; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px;
  border-radius: 999px; background: rgba(12, 18, 32, .82); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.controls button { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 11px; justify-content: center; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--frost); }
.controls button:hover { background: rgba(234, 244, 255, .08); }
.controls button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.controls button.primary { background: linear-gradient(180deg, #d6283f, #a8172b); padding: 0 16px 0 13px; font-weight: 600; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(233, 198, 121, .6); }
.controls button[aria-pressed="false"] { opacity: .5; }
#btn-sound .on { display: none; }
#btn-sound.is-on .on { display: inline; }
#btn-sound.is-on .off { display: none; }
.panel { position: fixed; z-index: 26; bottom: calc(76px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: rgba(12, 18, 32, .96); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 250px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 12px; background: #2a3550; position: relative; transition: background .2s; flex-shrink: 0; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--frost); transition: transform .2s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.panel .hint { margin: 6px 0 0; font-size: 12px; color: var(--mute); }

#minimap { position: fixed; z-index: 21; right: 16px; bottom: calc(84px + var(--safe-b)); width: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); background: #000; }
#minimap img { display: block; width: 100%; opacity: .75; }
#minimap .view { position: absolute; border: 2px solid var(--gold); border-radius: 3px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }

#preview-banner { position: fixed; z-index: 30; top: 0; left: 50%; transform: translateX(-50%); background: var(--lime); color: #111; font: 600 12px var(--mono); padding: 5px 12px; border-radius: 0 0 8px 8px; }

/* ------------------------------------------------------------ toast */
#toast { position: fixed; z-index: 40; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); max-width: min(92vw, 440px); padding: 14px 18px 14px 16px;
  background: rgba(14, 20, 36, .97); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .6); font-size: 15px; line-height: 1.4; }
#toast.gold { border-left-color: var(--gold); }
#toast .t-kicker { font: 600 11px var(--mono); letter-spacing: .12em; color: var(--gold); margin-bottom: 4px; }
#toast .t-count { margin-top: 6px; font: 600 13px var(--mono); color: var(--mute); }
#toast .t-count b { color: var(--frost); }
#toast.in { animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ------------------------------------------------------------ player */
dialog { color: var(--frost); }
dialog::backdrop { background: rgba(4, 6, 12, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#player { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100dvh; margin: 0; overflow: hidden; }
#player[open] { display: grid; place-items: center; }
.player-snow { position: absolute; inset: 0; pointer-events: none; background-image:
  radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(1.5px 1.5px at 80px 120px, #fff, transparent), radial-gradient(2.5px 2.5px at 150px 60px, #fff, transparent),
  radial-gradient(1.5px 1.5px at 210px 190px, #fff, transparent), radial-gradient(2px 2px at 260px 90px, #fff, transparent);
  background-size: 300px 220px; opacity: .55; animation: psnow 14s linear infinite; }
@keyframes psnow { to { background-position: 40px 220px; } }
.player-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 26px 18px; max-height: 100dvh;
  border-radius: 28px; background: radial-gradient(ellipse at 50% 0%, rgba(233, 198, 121, .22), transparent 60%), linear-gradient(180deg, rgba(22, 32, 54, .96), rgba(10, 15, 27, .97));
  box-shadow: 0 0 0 2px rgba(233, 198, 121, .75), 0 0 0 8px rgba(234, 244, 255, .1), 0 0 0 10px rgba(234, 244, 255, .25), 0 0 60px 10px rgba(233, 198, 121, .25), 0 30px 80px rgba(0, 0, 0, .7); }
.player-wrap::before { content: ''; position: absolute; inset: -10px; border-radius: 34px; pointer-events: none; border: 3px dotted rgba(234, 244, 255, .45); }
.ornaments { position: absolute; top: -14px; left: 0; right: 0; display: flex; justify-content: space-evenly; pointer-events: none; }
.ornaments i { width: 18px; height: 18px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--red); box-shadow: 0 0 10px rgba(201, 31, 54, .6); }
.ornaments i:nth-child(2n) { background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--gold); width: 14px; height: 14px; margin-top: 6px; box-shadow: 0 0 10px rgba(233, 198, 121, .7); }
.ornaments i:nth-child(3) { background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), #2fa36b; }
.ornaments i::before { content: ''; position: absolute; left: 50%; top: -7px; width: 6px; height: 6px; margin-left: -3px; background: #c9a24f; border-radius: 1px; }
.player-head { text-align: center; }
.player-day { font: 600 12px var(--mono); letter-spacing: .16em; color: var(--gold); }
.player-head h2 { margin: 4px 0 0; font-family: var(--disp); font-weight: 800; font-size: clamp(20px, 3.2vw, 30px); line-height: 1.1; }
.player-body { display: flex; align-items: center; gap: 18px; min-height: 0; }
.player-costume { margin: 0; width: 130px; flex-shrink: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 0 24px rgba(233, 198, 121, .25); }
.player-costume img { display: block; width: 100%; aspect-ratio: 33 / 64; object-fit: cover; }
.frame { position: relative; height: min(68dvh, 720px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 3px rgba(234, 244, 255, .85), 0 0 0 6px rgba(233, 198, 121, .8), 0 0 30px 6px rgba(233, 198, 121, .45); }
.frame video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.big-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--gold); background: rgba(8, 12, 20, .7); cursor: pointer; display: grid; place-items: center; }
.big-play svg { width: 36px; height: 36px; fill: var(--gold); stroke: none; margin-left: 5px; }
.player-desc { margin: 0; max-width: 460px; text-align: center; color: var(--mute); font-size: 14px; }
.player-desc:empty { display: none; }
.player-controls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.player-controls button { height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(234, 244, 255, .06); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.player-controls button:hover { background: rgba(234, 244, 255, .12); }
.player-controls button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.player-controls .back { background: linear-gradient(180deg, #d6283f, #a8172b); border-color: rgba(233, 198, 121, .6); font-weight: 600; font-size: 14px; }
#pc-play .i-play { display: none; }
#pc-play.paused .i-play { display: inline; }
#pc-play.paused .i-pause { display: none; }
#pc-mute .off { display: none; }
#pc-mute.muted .off { display: inline; }
#pc-mute.muted .on { display: none; }

/* ------------------------------------------------------------ list */
#list { border: 1px solid var(--line); border-radius: 20px; background: #0d1422; padding: 0; width: min(560px, 94vw); max-height: 86dvh; }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
.list-head h2 { margin: 0; font-family: var(--disp); font-size: 24px; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 24px; cursor: pointer; }
.list-sub { margin: 6px 20px 10px; color: var(--mute); font-size: 14px; }
#list ol { list-style: none; margin: 0; padding: 0 12px 16px; overflow: auto; max-height: calc(86dvh - 110px); }
#list li button { width: 100%; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; min-height: 48px; }
#list li button:hover, #list li button:focus-visible { background: rgba(234, 244, 255, .06); outline: none; }
#list li .d { font: 600 14px var(--mono); color: var(--gold); }
#list li .t { font-weight: 600; }
#list li .s { font-size: 12px; color: var(--mute); font-family: var(--mono); text-align: right; }
#list li.locked .t { color: var(--mute); font-weight: 500; }
#list li.opened .s { color: #7fd6a4; }
#list li.available .s { color: var(--gold); }

/* ------------------------------------------------------------ finale + notice */
#finale { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(ellipse, rgba(8, 12, 20, .55), rgba(8, 12, 20, .85)); }
#finale[hidden] { display: none; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.finale-card { position: relative; text-align: center; padding: 34px 30px; max-width: 92vw; border-radius: 26px; background: rgba(12, 18, 32, .92); box-shadow: 0 0 0 2px var(--gold), 0 0 80px 20px rgba(233, 198, 121, .35); }
.finale-kicker { font: 600 12px var(--mono); letter-spacing: .14em; color: var(--gold); }
.finale-card h2 { margin: 10px 0 8px; font-family: var(--disp); font-weight: 800; font-size: clamp(30px, 6vw, 62px); line-height: 1; color: var(--gold); text-shadow: 0 0 30px rgba(233, 198, 121, .6); }
.finale-card p { margin: 0 0 20px; font-size: 18px; font-style: italic; }
.finale-card button, #notice button { height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; background: linear-gradient(180deg, #d6283f, #a8172b); box-shadow: inset 0 0 0 1px rgba(233, 198, 121, .6); }
#notice { position: fixed; z-index: 45; left: 16px; top: 50%; transform: translateY(-50%); max-width: 280px; padding: 14px 16px; border-radius: 14px; background: rgba(12, 18, 32, .96); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13.5px; line-height: 1.45; }
#notice p { margin: 0 0 10px; }
#notice b { color: var(--gold); }
#notice button { height: 40px; font-size: 14px; }
#notice[hidden] { display: none; }

/* ------------------------------------------------------------ mobile */
@media (max-width: 700px) {
  .topbar { padding: 10px 12px 22px; }
  .brand .tag { display: none; }
  .brand .sub { font-size: 12px; margin-top: 4px; }
  .status { min-width: 0; }
  .progress-line .lbl { display: none; }
  .progress-line::before { content: 'Progress '; }
  .bar { width: 110px; }
  .next { font-size: 11px; max-width: 150px; margin-left: auto; }
  .controls { gap: 0; padding: 4px; max-width: calc(100vw - 16px); }
  .controls button { min-width: 42px; padding: 0 8px; }
  .controls button.primary span { display: none; }
  .controls button.primary { padding: 0 10px; }
  #btn-fs { display: none; }
  #minimap { width: 56px; right: 10px; top: 92px; bottom: auto; }
  .player-wrap { padding: 26px 12px 12px; border-radius: 22px; gap: 8px; }
  .player-costume { display: none; }
  .frame { height: min(62dvh, 640px); }
  .player-controls button.back span { display: none; }
  #notice { left: 12px; right: 12px; top: 150px; transform: none; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .player-snow { animation: none; }
  #toast.in { animation: none; }
}
