/* Hallmark · macrostructure: Marquee Hero (3D floor) · genre: atmospheric · tone: playful arcade night · anchor hue: warm orange
 * theme: custom (vibe: "neon arcade at night, glossy cabinets" · paper #0d0a12 · accent #ff7a1a / #ffc93c · Saira + Press Start 2P)
 * nav: N5 floating icons · footer: Ft5 statement · contrast: pass (40-41) · honest: pass (46) · mobile: pass (34, 49, 50-57)
 * Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V5 */
@font-face { font-family: 'Saira'; font-weight: 400; font-display: swap; src: url(/assets/fonts/saira-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Saira'; font-weight: 700; font-display: swap; src: url(/assets/fonts/saira-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Saira'; font-weight: 900; font-display: swap; src: url(/assets/fonts/saira-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-weight: 400; font-display: swap; src: url(/assets/fonts/press-start-2p-latin-400-normal.woff2) format('woff2'); }

:root {
  --stage: #0d0a12;
  --cab: #17121c;
  --deep: #08060b;
  --yellow: #ffc93c;
  --orange: #ff7a1a;
  --pink: #ff3d6e;
  --cream: #ede6d6;
  --dim: #b9aec4;
  --shade: #050307;
  --line: color-mix(in srgb, var(--cream) 16%, transparent);
  --line-2: color-mix(in srgb, var(--cream) 30%, transparent);
  --display: 'Saira', system-ui, sans-serif;
  --pixel: 'Press Start 2P', monospace;
  --pad: clamp(18px, 4vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--stage); color: var(--cream); font-family: var(--display); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-size: 16px; line-height: 1.55; overflow-x: clip; }
body.in-cab { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--yellow); color: var(--stage); padding: 12px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

#floor { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; transform-origin: 50% 50%; }
main { position: relative; z-index: 1; }

/* header */
.bar { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px var(--pad); background: color-mix(in srgb, var(--stage) 72%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.brand img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 6px 30px color-mix(in srgb, var(--orange) 28%, transparent); transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-4deg); }
.bar-r { display: flex; align-items: center; gap: 12px; }
.ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--stage) 55%, transparent); backdrop-filter: blur(8px); cursor: pointer; text-decoration: none; transition: background .25s, border-color .25s, transform .25s var(--ease); }
.ico:hover { background: color-mix(in srgb, var(--orange) 18%, transparent); border-color: var(--orange); }
.ico .mute { display: none; }
.ico.is-off .wave { display: none; }
.ico.is-off .mute { display: inline; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--stage) 55%, transparent); backdrop-filter: blur(8px); cursor: copy; font-weight: 700; font-size: 14px; }
.ca[hidden] { display: none; }
.ca-tk { color: var(--yellow); }
.ca-txt { color: var(--dim); font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .3s var(--ease), background .25s, box-shadow .3s, border-color .25s; white-space: nowrap; }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-buy { background: var(--orange); color: var(--stage); box-shadow: 0 8px 28px color-mix(in srgb, var(--orange) 35%, transparent); }
.btn-buy:hover { background: var(--yellow); }
.btn-play { background: var(--yellow); color: var(--stage); min-height: 58px; padding: 0 32px; font-size: 18px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--yellow) 50%, transparent), 0 12px 50px color-mix(in srgb, var(--orange) 45%, transparent); }
.btn-play:hover { background: var(--cream); }
.btn-ghost { background: color-mix(in srgb, var(--stage) 50%, transparent); border: 1px solid var(--line-2); color: var(--cream); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* hero: the headline splits around the centre cabinet, as MemoryQuest's PRESS START does */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; }
.hero-head { position: absolute; left: var(--pad); right: var(--pad); top: clamp(96px, 12vh, 180px); margin: 0; display: flex; justify-content: space-between; gap: 18vw; font-weight: 900; font-size: clamp(44px, 6.6vw, 200px); line-height: .92; perspective: 600px; pointer-events: none; }
.hero-head > span { white-space: nowrap; color: var(--cream); text-shadow: 0 .055em 0 var(--pink), 0 .1em .6em color-mix(in srgb, var(--shade) 80%, transparent); }
.hero-head .w { display: inline-block; white-space: nowrap; }
.hero-head .ch { display: inline-block; transform-origin: 50% 100%; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) 24px; padding-top: 64px; background: linear-gradient(0deg, color-mix(in srgb, var(--stage) 82%, transparent) 30%, transparent); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.lede { margin: 0; max-width: 38em; color: var(--cream); font-size: clamp(15px, 1.1vw, 20px); text-shadow: 0 2px 18px var(--stage); }
.live { margin: 0; font-size: 14px; color: var(--dim); min-height: 1.5em; }
.live b { color: var(--yellow); }
.rail { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 8px 4px 4px; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, var(--shade) 4%, var(--shade) 96%, transparent); mask: linear-gradient(90deg, transparent, var(--shade) 4%, var(--shade) 96%, transparent); }
.rail::-webkit-scrollbar { display: none; }
.rail-empty { color: var(--dim); font-size: 14px; margin: 0; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--cab) 72%, transparent); backdrop-filter: blur(8px); cursor: pointer; transition: transform .3s var(--ease), border-color .25s, background .25s; }
.tab:hover { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.tab img, .tab-dot { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--cab); }
.tab.is-hot { border-color: var(--yellow); }
.tab-sym { font-weight: 700; font-size: 14px; }
.tab-ch { font-size: 13px; }
.up { color: var(--yellow); }
.dn { color: var(--pink); }

/* how: left column over the dolly into the centre cabinet */
.how { position: relative; }
.step { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad); max-width: calc(34rem + var(--pad)); }
.step h2 { margin: 0 0 20px; font-weight: 900; font-size: clamp(34px, 3.4vw, 64px); line-height: 1; text-shadow: 0 .06em 0 var(--pink); }
.step p { margin: 0; color: var(--cream); opacity: .82; font-size: clamp(16px, 1.15vw, 20px); text-shadow: 0 2px 20px var(--stage); }

/* boards: CRT high-score screens */
.boards { position: relative; padding: 18vh var(--pad) 12vh; }
.boards-h { margin: 0; text-align: center; font-weight: 900; font-size: clamp(40px, 5vw, 110px); line-height: 1; text-shadow: 0 .055em 0 var(--pink), 0 0 .5em color-mix(in srgb, var(--orange) 30%, transparent); }
.boards-day { text-align: center; color: var(--dim); margin: 16px 0 44px; }
.crts { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(16px, 2.4vw, 40px); max-width: 1500px; margin: 0 auto; }
.crt { position: relative; background: var(--deep); border: 14px solid var(--cab); border-radius: 34px; padding: 28px 28px 24px; min-height: 420px; box-shadow: inset 0 0 60px color-mix(in srgb, var(--orange) 12%, transparent), 0 30px 80px color-mix(in srgb, var(--shade) 60%, transparent), 0 0 0 1px var(--line); overflow: hidden; }
.crt::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--shade) 22%, transparent) 0 1px, transparent 1px 3px); border-radius: 20px; }
.crt h3 { margin: 0 0 20px; font-family: var(--pixel); font-weight: 400; font-size: clamp(13px, 1vw, 18px); color: var(--yellow); }
.board, .feed { list-style: none; margin: 0; padding: 0; font-family: var(--pixel); font-size: clamp(10px, .78vw, 14px); line-height: 1.4; }
.board li { display: grid; grid-template-columns: 2.4em 1fr auto auto auto; gap: 1em; align-items: center; padding: .85em 0; border-bottom: 1px dashed var(--line); }
.board li.me { color: var(--yellow); }
.b-rank { color: var(--orange); }
.b-sym { color: var(--dim); }
.b-secs { color: var(--dim); }
.b-score { color: var(--yellow); text-align: right; min-width: 5ch; }
.feed li { display: flex; justify-content: space-between; gap: 1em; padding: .85em 0; border-bottom: 1px dashed var(--line); color: var(--dim); }
.feed li b { color: var(--cream); font-weight: 400; }
.feed li.f-score b { color: var(--yellow); }
.f-at { flex: none; color: var(--dim); opacity: .7; }
.board li.empty, .feed li.empty { display: block; color: var(--dim); line-height: 1.9; border: 0; }

/* footer */
.foot { position: relative; display: flex; align-items: center; gap: clamp(24px, 4vw, 70px); padding: 10vh var(--pad) 8vh; max-width: 1500px; margin: 0 auto; }
.foot-logo { width: clamp(110px, 12vw, 200px); height: auto; border-radius: 26px; box-shadow: 0 20px 70px color-mix(in srgb, var(--orange) 30%, transparent); }
.foot h2 { margin: 0 0 12px; font-weight: 900; font-size: clamp(32px, 3.6vw, 72px); line-height: 1; text-shadow: 0 .06em 0 var(--pink); }
.foot p { margin: 0 0 24px; color: var(--dim); max-width: 40em; }
.foot-l { display: flex; flex-wrap: wrap; gap: 12px; }

/* the cabinet overlay */
.cab { position: fixed; inset: 0; z-index: 30; background: radial-gradient(60% 50% at 50% 10%, color-mix(in srgb, var(--orange) 16%, transparent), transparent 70%), radial-gradient(50% 50% at 90% 90%, color-mix(in srgb, var(--pink) 14%, transparent), transparent 70%), var(--stage); display: flex; flex-direction: column; padding: 12px var(--pad) 16px; }
.cab[hidden] { display: none; }
.cab-top { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; }
.cab-title { flex: 1; min-width: 0; }
.cab-title h2 { margin: 0; font-weight: 900; font-size: clamp(24px, 2.4vw, 40px); line-height: 1; text-shadow: 0 .06em 0 var(--pink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-title p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }
.cab-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr clamp(260px, 22vw, 380px); gap: 20px; }
.bezel { position: relative; min-height: 0; background: var(--cab); border-radius: 30px; padding: 16px; box-shadow: 0 0 0 1px var(--line), 0 30px 90px color-mix(in srgb, var(--shade) 70%, transparent), 0 0 120px color-mix(in srgb, var(--orange) 12%, transparent); transform-origin: 50% 50%; }
.bezel::after { content: ''; position: absolute; inset: 16px; border-radius: 18px; pointer-events: none; background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--shade) 16%, transparent) 0 1px, transparent 1px 3px), radial-gradient(120% 90% at 50% 50%, transparent 60%, color-mix(in srgb, var(--shade) 55%, transparent)); }
#game { width: 100%; height: 100%; display: block; border-radius: 18px; background: var(--deep); touch-action: none; cursor: pointer; }
.hud { position: absolute; top: 28px; left: 32px; right: 32px; display: flex; gap: clamp(16px, 3vw, 44px); font-family: var(--pixel); font-size: clamp(9px, .8vw, 13px); color: var(--dim); pointer-events: none; z-index: 2; }
.hud b { color: var(--yellow); font-weight: 400; margin-left: .5em; }
.cab-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 40px; margin: 0; font-size: 18px; color: var(--cream); z-index: 3; }
.over { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; width: min(560px, calc(100% - 40px)); padding: 32px; border-radius: 24px; background: color-mix(in srgb, var(--deep) 86%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(10px); text-align: center; }
.over[hidden] { display: none; }
.over h3 { margin: 0; font-weight: 900; font-size: clamp(34px, 3.4vw, 56px); line-height: 1; color: var(--cream); text-shadow: 0 .06em 0 var(--pink); }
.over > p { margin: 12px 0 0; color: var(--cream); }
.over-n { display: flex; justify-content: center; gap: 40px; margin: 24px 0; }
.over-n span { display: block; font-family: var(--pixel); font-size: 11px; color: var(--dim); margin-bottom: 8px; }
.over-n b { font-family: var(--pixel); font-weight: 400; font-size: clamp(22px, 2.2vw, 34px); color: var(--yellow); }
.over-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.over-b .btn-play { min-height: 46px; font-size: 16px; padding: 0 24px; }
.post-st { margin: 16px 0 0; min-height: 1.5em; font-size: 14px; color: var(--dim); }
.post-st b { color: var(--yellow); }
.post-st a { color: var(--yellow); }
.cab-side { background: var(--deep); border-radius: 24px; padding: 24px; box-shadow: 0 0 0 1px var(--line); overflow: auto; }
.cab-side h3 { margin: 0 0 16px; font-family: var(--pixel); font-weight: 400; font-size: 12px; color: var(--yellow); line-height: 1.6; }
.cab-side .board li { grid-template-columns: 2em 1fr auto auto; }
body.flash .bezel { animation: hi .9s var(--ease); }
@keyframes hi { 0%, 100% { box-shadow: 0 0 0 1px var(--line), 0 0 120px color-mix(in srgb, var(--orange) 12%, transparent); } 30% { box-shadow: 0 0 0 4px var(--yellow), 0 0 160px color-mix(in srgb, var(--yellow) 60%, transparent); } }

@media (max-width: 900px) {
  .crts { grid-template-columns: 1fr; }
  .cab-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .cab-side { max-height: 30vh; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .ca .ca-txt { display: none; }
  .bar-r { gap: 8px; }
  .ico { width: 38px; height: 38px; }
  .btn-buy { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .brand img { width: 46px; height: 46px; }
  .hero-head { flex-direction: column; align-items: center; gap: 0; top: 84px; font-size: clamp(40px, 13.2vw, 72px); text-align: center; }
  .btn-play { min-height: 52px; font-size: 16px; }
  .step { min-height: 90vh; justify-content: flex-end; padding-bottom: 12vh; }
  .crt { padding: 20px 16px; border-width: 10px; min-height: 0; }
  .board li { grid-template-columns: 2em 1fr auto auto; }
  .board .b-sym { display: none; }
  .cab { padding: 12px 12px 12px; }
  .bezel { padding: 8px; border-radius: 22px; }
  .bezel::after { inset: 8px; }
  .hud { top: 20px; left: 20px; right: 20px; }
  .over { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.nw { white-space: nowrap; }
.how { background: linear-gradient(90deg, color-mix(in srgb, var(--stage) 78%, transparent), color-mix(in srgb, var(--stage) 35%, transparent) 38%, transparent 60%); }
@media (max-width: 760px) { .how { background: linear-gradient(0deg, color-mix(in srgb, var(--stage) 85%, transparent), transparent 55%); } }
.cab-msg[hidden] { display: none; }
@media (min-width: 1800px) {
  .step { max-width: calc(min(40vw, 50rem) + var(--pad)); }
  .step h2 { font-size: clamp(64px, 3.6vw, 104px); }
  .step p, .lede { font-size: clamp(20px, 1.05vw, 28px); }
  .live, .rail-empty, .cab-title p, .post-st, .foot p, .boards-day { font-size: clamp(16px, .8vw, 22px); }
  .btn { min-height: 54px; padding: 0 28px; font-size: clamp(16px, .85vw, 22px); }
  .btn-play { min-height: 68px; padding: 0 38px; font-size: clamp(18px, 1vw, 26px); }
  .ico { width: 50px; height: 50px; }
  .ca { height: 50px; font-size: 17px; }
  .brand img { width: 68px; height: 68px; }
  .tab { height: 50px; } .tab img, .tab-dot { width: 34px; height: 34px; } .tab-sym { font-size: 17px; } .tab-ch { font-size: 15px; }
  .crt h3, .cab-side h3 { font-size: clamp(16px, .8vw, 24px); }
  .board, .feed { font-size: clamp(13px, .62vw, 18px); }
  .hud { font-size: clamp(13px, .62vw, 18px); top: 34px; left: 40px; }
  .over { width: clamp(560px, 30vw, 860px); padding: 44px; }
  .over h3 { font-size: clamp(56px, 3vw, 84px); }
  .over > p { font-size: clamp(16px, .85vw, 22px); }
  .over-n span { font-size: 14px; } .over-n b { font-size: clamp(34px, 1.9vw, 52px); }
  .over-b .btn-play { min-height: 54px; font-size: clamp(16px, .85vw, 22px); }
  .cab-body { grid-template-columns: 1fr clamp(380px, 20vw, 520px); }
  .crts { max-width: 2100px; } .foot { max-width: 2100px; }
}

.btn:active, .tab:active, .ico:active { transform: translateY(1px); }
.tab:disabled, .ico:disabled { opacity: .55; cursor: not-allowed; }
h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; }
