/* TV host: fixed 1920x1080 stage, scaled to fit. Title-safe margins of 5%
   (96px x 54px) keep everything visible on TVs with overscan. */
#viewport { position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
/* Centred by position, not by the grid: a grid item bigger than the screen
   (1920px stage in a 960px Fire TV WebView) overflows from the top-left. */
#stage { position: absolute; left: 50%; top: 50%; margin: -540px 0 0 -960px; width: 1920px; height: 1080px; flex: none; transform-origin: center center; overflow: hidden; }
/* Windows that aren't 16:9 (ultrawide monitors, resized browsers): the home
   screen's stage art continues past the stage as mirrored copies, so the
   edges join seamlessly and there are no black bars. */
#bleed { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 0.5s ease; }
#viewport:has(.home) #bleed { opacity: 1; }
.bleed-art { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px; transform-origin: center center; }
/* Each side stretches only the art's outermost strip (mirrored at the seam),
   so the backdrop's colour and light carry on but the scene doesn't repeat. */
.bleed-art i { position: absolute; width: 1920px; height: 1080px; background-image: var(--art, none); background-repeat: no-repeat; filter: blur(4px); transition: filter 0.5s ease; }
.bleed-art .m-l { left: -1920px; top: 0; transform: scaleX(-1); background-size: 23040px 1080px; background-position: left top; }
.bleed-art .m-r { left: 1920px; top: 0; transform: scaleX(-1); background-size: 23040px 1080px; background-position: right top; }
.bleed-art .m-t { left: 0; top: -1080px; transform: scaleY(-1); background-size: 1920px 12960px; background-position: left top; }
.bleed-art .m-b { left: 0; top: 1080px; transform: scaleY(-1); background-size: 1920px 12960px; background-position: left bottom; }
#bleed.soon i { filter: blur(4px) grayscale(0.85) brightness(0.7); }
/* The same bottom scrim as the stage, carried across the full width, and a
   gentle fade into the outer edges. */
.bleed-scrim { position: absolute; left: -1920px; width: 5760px; top: 720px; height: 360px;
  background: linear-gradient(to bottom, rgba(11, 11, 16, 0) 0%, rgba(11, 11, 16, 0.45) 50%, rgba(11, 11, 16, 0.8) 100%); }
.bleed-scrim::after { content: ''; position: absolute; left: 0; right: 0; top: 360px; height: 1080px; background: rgba(11, 11, 16, 0.8); }
.bleed-fade { position: absolute; left: -1920px; width: 5760px; top: -1080px; height: 3240px;
  background: linear-gradient(to right, rgba(11, 11, 16, 0.6), rgba(11, 11, 16, 0) 33.34%, rgba(11, 11, 16, 0) 66.66%, rgba(11, 11, 16, 0.6)); }
#screen { position: absolute; top: 54px; bottom: 54px; left: 96px; right: 96px; }
#screen > section { width: 100%; height: 100%; }

.tv { font-size: 36px; }
.tv .btn { font-size: 40px; }
.tv .btn-xl { font-size: 54px; padding: 0.5em 1.6em; }
/* Remote focus: dark gap + lime ring + a little scale. Readable from 3 metres. */
.tv [data-focus] { outline: none; transition: transform 0.14s ease, box-shadow 0.14s ease, width 0.2s ease, height 0.2s ease; }
.tv [data-focus]:focus { box-shadow: 0 0 0 5px var(--bg), 0 0 0 10px var(--action); transform: scale(1.05); }

.sound-hint { position: absolute; right: 96px; bottom: 18px; font-size: 24px; color: var(--ink-mute); }
.tv .toast { position: absolute; font-size: 34px; }

.tv .brand { font-size: 32px; }

/* ---- home ------------------------------------------------------------------ */
/* The whole screen is the selected game's world: its key art runs edge to
   edge on its own colour, and moving to another game crossfades the world.
   The copy sits on the art's plain left third; the tile row sits on a dark
   band at the bottom. */
.home { position: absolute; top: -54px; bottom: -54px; left: -96px; right: -96px; width: auto !important; height: auto !important; background: var(--bg); color: #fff; }
.home-world { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; }
.world-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 0.55s ease; }
.world-layer.on { opacity: 1; }
.world-layer.top { z-index: 1; }
.world-layer { background: var(--bg); }
/* Stage art is drawn for this exact frame (art/stage.js): the scene sits right
   of the copy and above the tile row, so nothing important is covered. */
.world-layer img { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; display: block; }
.world-layer.on img { animation: world-in 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes world-in { from { transform: scale(1.05); } }
.world-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 360px; z-index: 2;
  background: linear-gradient(to bottom, rgba(11, 11, 16, 0) 0%, rgba(11, 11, 16, 0.45) 50%, rgba(11, 11, 16, 0.8) 100%); }

.home-head { position: absolute; z-index: 3; top: 54px; left: 96px; right: 96px; height: 64px; display: flex; justify-content: space-between; align-items: center; }

/* Sundown wordmark */
.sd-brand { display: flex; align-items: center; gap: 14px; color: #fff; letter-spacing: -0.01em; font-weight: 900; }
.sd-brand span { color: inherit; }
.tv .sd-brand { font-size: 38px; }
.sd-sun { width: 46px; height: 27px; fill: #FF8A3D; margin-top: -4px; }

.home-tools { display: flex; align-items: center; gap: 16px; }
.btn-gear, .home .btn-pass { font-size: 26px !important; font-weight: 800; padding: 0.5em 1.3em; background: rgba(11, 11, 16, 0.78); color: #fff; box-shadow: none; }
/* Phone remote: a small QR beside Settings. Once a phone has it, just its name. */
.remote-card { display: flex; align-items: center; gap: 16px; font-size: 22px; line-height: 1.25; font-weight: 800; color: #fff; text-align: right; flex-direction: row-reverse; padding: 8px 8px 8px 22px; border-radius: 20px; background: rgba(11, 11, 16, 0.78); }
.remote-card img { width: 100px; height: 100px; border-radius: 12px; background: #fff; padding: 6px; image-rendering: pixelated; }
.remote-card.on img { display: none; }
.remote-card.on { padding: 0.5em 1.1em; border-radius: 999px; font-size: 24px; font-weight: 700; }
.remote-card.on::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--action); order: 2; }
.watching .remote-card { display: none; }

.hero { position: absolute; z-index: 3; top: 150px; left: 96px; height: 560px; width: 760px; }
.hero-copy { position: absolute; top: 0; left: 0; bottom: 0; right: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.hero.swap .hero-copy > * { animation: copy-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero.swap .hero-copy > :nth-child(2) { animation-delay: 0.04s; }
.hero.swap .hero-copy > :nth-child(3) { animation-delay: 0.08s; }
.hero.swap .hero-copy > :nth-child(4) { animation-delay: 0.12s; }
@keyframes copy-in { from { opacity: 0; transform: translateX(-30px); } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; order: 2; margin-bottom: 18px; }
.hero-title { order: 1; } .hero-tag { order: 3; } .hero-actions { order: 4; }
.hero-meta span { font-size: 24px; font-weight: 900; padding: 8px 20px; border-radius: 999px; background: rgba(11, 11, 16, 0.85); color: #fff; }
.hero-title { font-size: 176px; line-height: 0.9; margin: 22px 0 18px; }
.hero-title.long { font-size: 138px; }
.hero-title.has-logo { margin: 6px 0 14px -30px; line-height: 0; }
.hero-logo { display: block; max-width: 700px; max-height: 300px; width: auto; height: auto; }
.hero.swap .hero-logo { animation: logo-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes logo-in { from { opacity: 0; transform: scale(0.85) rotate(-3deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-tag { font-size: 32px; font-weight: 700; color: rgba(255, 255, 255, 0.9); line-height: 1.32; margin: 0 0 36px; max-width: 720px; }
.hero-actions { display: flex; gap: 20px; white-space: nowrap; }
.btn-hero { background: var(--hero, #fff); color: var(--hero-ink, var(--bg)); font-size: 42px !important; padding: 0.45em 1.7em; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35); }
.btn-hero-ghost { background: rgba(11, 11, 16, 0.35); color: #fff; font-size: 36px !important; padding: 0.5em 1.3em; box-shadow: inset 0 0 0 4px currentColor; }
.btn-hero.is-soon { background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.8); box-shadow: none; }
.btn-hero.nudge { animation: pulse 0.5s ease 2; }
/* Home focus: a white ring on an ink gap reads on every game's colour. */
.tv .home [data-focus]:focus { box-shadow: 0 0 0 5px var(--bg), 0 0 0 11px #fff; }
.tv .home .btn-hero-ghost:focus { box-shadow: inset 0 0 0 4px currentColor, 0 0 0 5px var(--bg), 0 0 0 11px #fff; }

/* The row: art tiles on the dark band; the selected one grows. */
.shelf { position: absolute; z-index: 3; left: 96px; top: 752px; height: 270px; display: flex; align-items: flex-end; gap: 28px; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tile { position: relative; flex: none; width: 352px; height: 198px; padding: 0; border: 0; border-radius: 20px; cursor: pointer; overflow: hidden;
  background: var(--tile); color: var(--tile-ink); text-align: left; }
.tv .tile:focus { width: 480px; height: 270px; transform: none; }
.tile-art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; border-radius: inherit; }
/* Art tiles: no coloured fill behind the image, so the rounded corners stay clean. */
.tile.has-art { background: transparent; }
.tile-name { position: absolute; left: 14px; bottom: 14px; right: 14px; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: 0.02em; transition: font-size 0.2s ease; }
.tile-name span { display: inline-block; padding: 9px 14px; border-radius: 10px; background: rgba(11, 11, 16, 0.86); color: #fff; }
.tile:focus .tile-name { font-size: 26px; }
/* Art tiles carry the game's logo, so the text name is for screen readers. */
.tile.has-art .tile-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tile:not(.has-art) .tile-name { font-family: var(--display); text-transform: uppercase; font-size: 48px; }
.tile:not(.has-art) .tile-name span { background: none; color: inherit; padding: 0; }
.soon-pill { position: absolute; left: 14px; top: 14px; font-size: 18px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 12px; border-radius: 8px; background: rgba(11, 11, 16, 0.86); color: #fff; }

/* ---- lobby ----------------------------------------------------------------- */
.lobby { display: grid; grid-template-rows: auto auto 1fr auto; }
.lobby-head { display: flex; align-items: center; gap: 30px; }
.now-playing { display: flex; align-items: center; gap: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.16em; font-size: 24px; font-weight: 900; }
.now-playing .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--game); animation: pulse 1.2s ease-in-out infinite; }
.game-title { font-size: 170px; line-height: 0.9; margin: 8px 0 40px; color: var(--game); }
.lobby-body { display: grid; grid-template-columns: 860px minmax(0, 1fr); gap: 64px; min-height: 0; }

.lobby-left { display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.join-card { background: var(--panel); border-radius: 32px; padding: 44px 46px 46px; }
.join-grid { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; }
.join-step { color: var(--ink-dim); font-size: 30px; }
.join-url { font-size: 48px; font-weight: 900; margin: 4px 0 22px; overflow-wrap: anywhere; line-height: 1.1; }
.join-url.long { font-size: 40px; }
.code { display: flex; gap: 16px; margin-top: 14px; }
.code span { width: 118px; height: 140px; display: grid; place-items: center; font-family: var(--display); font-size: 116px; line-height: 1;
  background: var(--action); color: var(--action-ink); border-radius: 18px; transform: rotate(var(--r)); box-shadow: 0 8px 0 var(--action-deep); }
.qr-wrap { text-align: center; }
.qr { width: 240px; height: 240px; display: block; border-radius: 18px; background: #fff; padding: 10px; image-rendering: pixelated; }
.qr-cap { font-size: 24px; color: var(--ink-dim); margin-top: 10px; }

.roster { display: flex; flex-direction: column; gap: 28px; min-height: 0; }
.roster-title { font-family: var(--display); text-transform: uppercase; font-size: 60px; line-height: 1; }
.roster-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 12px; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slot .avatar { width: 128px; height: 128px; font-family: var(--display); font-size: 72px; font-weight: 400; }
.slot.drop .avatar { animation: pop 0.45s ease-out both; }
.slot.away { opacity: 0.35; }
.slot .vip { position: absolute; top: -10px; right: 6px; font-size: 20px; --k: var(--action); }
.slot .pname { font-size: 30px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.empty .avatar { background: transparent; box-shadow: inset 0 0 0 4px var(--panel-2); }
.lobby-foot { display: flex; align-items: center; gap: 36px; }
.lobby-foot .ready:not(:focus) { animation: pulse 1.4s ease-in-out infinite; }
.foot-hint { color: var(--ink-dim); font-size: 28px; margin-left: auto; }

/* lobby game settings: OK cycles a value */
.settings { display: flex; gap: 16px; }
.setting { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 22px; border: 0; border-radius: 22px; background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; }
.s-label { font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim); }
.s-value { font-family: var(--display); text-transform: uppercase; font-size: 46px; line-height: 1; }
.setting:focus .s-value { color: var(--action); }
.tv .setting:focus { transform: scale(1.03); }
/* Sits under the player slots, level with the settings row, so a long
   description has the width it needs and never runs into the footer. */
.setting-hint { margin-top: auto; padding-left: 22px; border-left: 6px solid var(--game); font-size: 28px; line-height: 1.35; color: var(--ink-dim); }
.setting-hint:empty { visibility: hidden; }
.setting-hint b { color: var(--ink); margin-right: 8px; }
.setting.off .s-label { text-decoration: line-through; opacity: 0.6; }
.setting.off .s-value { color: var(--ink-mute, #6B6B78); }

/* overlays sit above the whole stage */
.overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 40; animation: fadein 0.2s ease-out; }
@keyframes fadein { from { opacity: 0; } }

/* How to play: a rules sheet, split screen: game colour on the left, numbered steps on the right */
.howto { display: grid; grid-template-columns: 700px 1fr; background: var(--bg); }
.howto-side { background: var(--g); color: var(--g-ink); padding: 110px 80px 80px 96px; display: flex; flex-direction: column; }
.howto-kicker { font-size: 28px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.75; }
.howto-title { font-size: 170px; line-height: 0.9; margin: 20px 0 20px; }
.howto-meta { font-size: 32px; font-weight: 800; opacity: 0.85; }
.howto-actions { margin-top: auto; display: flex; gap: 22px; }
.howto-steps { list-style: none; margin: 0; padding: 96px 120px 96px 110px; display: flex; flex-direction: column; justify-content: center; gap: 64px; }
.howto-steps li { display: flex; gap: 40px; align-items: baseline; opacity: 0; animation: rise 0.35s ease-out forwards; animation-delay: var(--d); }
.hs-num { flex: none; width: 56px; font-family: var(--display); font-size: 64px; line-height: 1; color: var(--g); }
.howto-steps b { display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 64px; line-height: 1; }
.howto-steps p { margin: 14px 0 0; font-size: 32px; font-weight: 600; line-height: 1.3; color: var(--ink-dim); }
.howto-steps.n5 li { padding: 18px 30px; } .howto-steps.n5 b { font-size: 40px; } .howto-steps.n5 p { font-size: 25px; }
.howto .btn-hero { background: var(--bg); color: #fff; }
.howto .btn-hero-ghost { background: transparent; color: var(--g-ink); box-shadow: inset 0 0 0 4px currentColor; }

/* Settings sheet */
.settings-sheet { background: rgba(11, 11, 16, 0.92); display: grid; place-items: center; }
.sheet { width: 1100px; background: var(--panel); border-radius: 40px; padding: 60px 70px; }
.sheet-title { font-size: 110px; line-height: 1; margin: 0 0 34px; }
.sheet-rows { display: flex; flex-direction: column; gap: 14px; }
.pref-row { display: flex; justify-content: space-between; align-items: center; padding: 24px 34px; border: 0; border-radius: 24px; background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 38px; font-weight: 800; }
.pr-value { font-family: var(--display); text-transform: uppercase; font-size: 50px; line-height: 1; color: var(--action); }
.tv .pref-row:focus { transform: scale(1.02); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 34px; gap: 30px; }
.sheet-info { font-size: 26px; color: var(--ink-dim); }
.sheet-info b { color: var(--ink); }

/* Animations: Reduced (TV setting) */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }

/* Back-button confirm */
.confirm-sheet .sheet { width: 1000px; }
.confirm-sheet .sheet-title { font-size: 96px; }
.confirm-body { font-size: 34px; font-weight: 600; color: var(--ink-dim); margin: 0 0 44px; }
.confirm-actions { display: flex; gap: 24px; align-items: center; }
.confirm-actions .btn { white-space: nowrap; }

/* ---- browser play (laptop as the host screen, friends over the internet) ---- */
.browser-only { display: none; }
.browser-host .browser-only { display: inline-block; }
/* A watcher's copy of the screen can't be pressed or focused. */
.watching #screen { pointer-events: none; }
.watching .lobby-foot .btn, .watching .home-tools { visibility: hidden; }
.watch-gone { display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.watch-gone h1 { font-family: var(--display); text-transform: uppercase; font-size: 120px; line-height: 1; margin: 0; }
.watch-gone p { color: var(--ink-dim); font-size: 40px; margin: 0; }
.lobby-foot .btn { white-space: nowrap; }
.browser-host .lobby-foot .foot-hint { display: none; }
/* How to play: small trademark note under the steps */
.howto-legal { position: absolute; left: 770px; right: 96px; bottom: 26px; margin: 0; font-size: 20px; font-weight: 600; color: var(--ink-mute); }

/* ---- mode cards (Start pressed in a game with meta.modes) --------------------
   Poster cards on a slab of the game's colour. The focused card lifts and the
   rest step back, so from the couch it's obvious what OK will do. */
.modes { position: absolute; top: -54px; bottom: -54px; left: -96px; right: -96px; width: auto !important; height: auto !important; background: var(--bg); overflow: hidden; }
.modes-slab { position: absolute; left: 0; right: 0; top: 0; height: 430px; background: var(--game); }
.modes-head { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 54px 96px 0; color: var(--game-ink); }
.modes-head .brand, .modes-head .brand span { color: inherit; opacity: 0.85; }
.modes-game { font-size: 28px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; background: var(--bg); color: #fff; padding: 10px 26px; border-radius: 999px; }
.modes-title { position: relative; margin: 26px 96px 0; font-size: 150px; line-height: 0.9; color: var(--game-ink); animation: rise 0.35s ease-out both; }
.mode-row { position: absolute; left: 96px; right: 96px; top: 318px; height: 650px; display: flex; justify-content: center; align-items: stretch; gap: 40px; }
.mode-card { position: relative; flex: 0 1 760px; min-width: 0; display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 36px; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--panel); color: var(--ink); box-shadow: 0 0 0 4px var(--bg); animation: card-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d); }
.modes.n3 .mode-card, .modes.n4 .mode-card { flex-basis: 420px; }
.modes.n4 .mode-row { gap: 30px; }
@keyframes card-in { from { opacity: 0; transform: translateY(80px) scale(0.92); } }
.tv .mode-card[data-focus] { transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; }
.tv .mode-row:focus-within .mode-card:not(:focus) { transform: scale(0.95); filter: brightness(0.5) saturate(0.7); }
.tv .mode-card:focus { transform: translateY(-26px) scale(1.05); box-shadow: 0 0 0 6px var(--bg), 0 0 0 14px var(--action), 0 30px 0 -6px rgba(0, 0, 0, 0.5); z-index: 1; }
.mc-art { position: relative; flex: none; height: 250px; background: var(--m); color: var(--m-ink); display: grid; place-items: center; }
.modes.n4 .mc-art { height: 220px; }
.mode-glyph { width: 300px; height: 210px; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modes.n4 .mode-glyph { width: 260px; height: 182px; }
.mode-card:focus .mode-glyph { transform: scale(1.1) rotate(-3deg); }
.mc-badge { position: absolute; bottom: -22px; left: 32px; z-index: 1; background: var(--bg); color: #fff; font-size: 22px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; padding: 8px 18px; border-radius: 999px; }
.mc-body { flex: 1; display: flex; flex-direction: column; padding: 42px 38px 30px; }
.mc-name { margin: 0; font-size: 86px; line-height: 0.95; color: var(--m); }
.modes.n4 .mc-name { font-size: 68px; }
.mc-desc { margin: 14px 0 0; font-size: 30px; font-weight: 600; line-height: 1.3; color: #D6D6E2; }
.modes.n4 .mc-desc { font-size: 27px; }
.mc-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; }
.mc-chip { font-size: 22px; font-weight: 900; padding: 7px 16px; border-radius: 999px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.22); color: var(--ink-dim); }
.mc-go { margin-left: auto; font-size: 26px; font-weight: 900; padding: 8px 20px; border-radius: 999px; background: var(--action); color: var(--action-ink); opacity: 0; transform: translateX(-10px); transition: opacity 0.2s ease, transform 0.2s ease; }
.mode-card:focus .mc-go { opacity: 1; transform: none; }
.mc-insp { margin-top: 10px; font-size: 22px; font-weight: 700; color: var(--ink-mute); }
.modes-foot { position: absolute; left: 96px; right: 96px; bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.modes-hint { font-size: 26px; font-weight: 800; color: var(--ink-dim); white-space: nowrap; }
.modes-legal { font-size: 19px; font-weight: 600; color: var(--ink-mute); text-align: right; max-width: 900px; }
/* ---- free tier / Party Pass ------------------------------------------------ */
.lobby-head .access-chip { margin-left: auto; }
.access-chip { font-size: 24px; font-weight: 900; letter-spacing: 0.04em; padding: 10px 22px; border-radius: 999px; background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 3px var(--panel-2); }
.access-chip.free { color: var(--ink); }
.access-chip.adpass { background: var(--common); color: var(--bg); box-shadow: none; }
.access-chip.pass { background: var(--action); color: var(--action-ink); box-shadow: none; }
.btn-pass { font-size: 26px !important; padding: 0.4em 1.2em; background: var(--action); color: var(--action-ink); box-shadow: none; }
.hero .btn-pass:focus { box-shadow: 0 0 0 5px var(--bg), 0 0 0 10px var(--action) !important; }

/* Paywall and sign-in: a calm streaming-app screen. Headline, one line, buttons. */
.pw { background: #000; display: flex; align-items: center; justify-content: center; font-family: var(--font); }
.pw-inner { width: 1280px; display: flex; align-items: center; justify-content: center; gap: 140px; }
.pw-inner.with-side { justify-content: space-between; }
.pw-main { width: 760px; display: flex; flex-direction: column; }
.pw-inner:not(.with-side) .pw-main { align-items: center; text-align: center; }
.pw-title { font-family: var(--font); font-weight: 700; font-size: 72px; line-height: 1.1; letter-spacing: -0.01em; text-transform: none; margin: 0; }
.pw-sub { font-size: 32px; line-height: 1.4; color: #9a9aa6; margin: 20px 0 56px; font-weight: 400; }
.pw-buttons { display: flex; flex-direction: column; gap: 20px; width: 640px; }
.pw-btn { font-family: var(--font); font-size: 32px; font-weight: 600; padding: 26px 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; text-align: center; }
.pw-btn.primary { background: #fff; color: #000; }
.tv .pw [data-focus]:focus { transform: scale(1.03); box-shadow: 0 0 0 4px #000, 0 0 0 8px #fff; }
.tv .pw .pw-btn:not(.primary):focus { background: rgba(255, 255, 255, 0.22); }
.pw-out { margin-top: 28px; align-self: center; font-family: var(--font); font-size: 26px; font-weight: 500; color: #8a8a96; background: none; border: 0; padding: 10px 24px; border-radius: 8px; cursor: pointer; }
.tv .pw .pw-out:focus { color: #fff; box-shadow: 0 0 0 3px #fff; transform: none; }
.pw-input { width: 640px; font-family: var(--font); font-size: 36px; font-weight: 500; padding: 26px 32px; margin: 0 0 32px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: #fff; outline: none; }
.tv .pw .pw-input:focus { border-color: #fff; box-shadow: none; transform: none; }
.pw-input.code { font-size: 64px; letter-spacing: 0.5em; text-align: center; padding: 18px 32px; }
.pw-side { display: flex; flex-direction: column; align-items: center; }
.pw-qr-box { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pw-qr { width: 340px; height: 340px; background: #fff; border-radius: 16px; padding: 16px; }
.pw-code { font-size: 26px; color: #9a9aa6; letter-spacing: 0.06em; }

/* House ad: black, a quiet line, a timer and a thin bar. */
.ad-break { background: #000; color: #fff; z-index: 60; display: flex; align-items: center; justify-content: center; font-family: var(--font); }
.ad-count { position: absolute; top: 56px; right: 72px; font-size: 26px; color: #9a9aa6; letter-spacing: 0.04em; }
.ad-body { text-align: center; }
.ad-title { font-family: var(--font); font-weight: 700; font-size: 80px; line-height: 1.1; letter-spacing: -0.01em; text-transform: none; margin: 0; }
.ad-copy { font-size: 32px; color: #9a9aa6; margin: 22px 0 0; }
.ad-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, 0.12); }
.ad-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width 0.2s linear; }

/* ---- home: coming-soon games read as not ready yet ---------------------------- */
.tile.soon .tile-art { filter: grayscale(1) brightness(0.75); }
.tile.soon { opacity: 0.8; }
.tv .tile.soon:focus { opacity: 1; }
.home.is-soon .world-layer.top img { filter: grayscale(0.85) brightness(0.7); }
.soon-pill { color: #fff; background: rgba(11, 11, 16, 0.9); }

/* ---- home: Suggest a game ------------------------------------------------------ */
.world-layer.suggest { background: #1A0B24; }
.world-layer.suggest::after { content: ''; position: absolute; left: 1360px; top: 420px; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.75) 0%, rgba(255, 46, 99, 0.35) 40%, rgba(26, 11, 36, 0) 70%); }
.home.is-suggest .hero-title { font-size: 150px; }
.suggest-tile { background: #22102E; box-shadow: inset 0 0 0 3px rgba(255, 138, 61, 0.6); }
.suggest-plus { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center; background: #FF8A3D; color: var(--bg); font-family: var(--display); font-size: 80px; line-height: 1; }
.tv .suggest-tile:focus .suggest-plus { width: 120px; height: 120px; font-size: 100px; }
.suggest-tile .tile-name { text-align: center; }
.suggest-body { display: flex; align-items: center; justify-content: space-between; gap: 50px; margin-bottom: 40px; }
.suggest-body .confirm-body { margin: 0 0 14px; }
.suggest-email { font-size: 46px; font-weight: 900; color: #FF8A3D; }
.suggest-sheet .qr { width: 260px; height: 260px; flex: none; }
.suggest-tile .tile-name { color: #fff; font-size: 40px; }
.tv .suggest-tile:focus .tile-name { font-size: 48px; }

/* ---- lobby: big Start, one Options button, a one-line summary ---------------- */
.lobby-foot .btn-start { font-size: 66px; padding: 0.42em 1.7em; letter-spacing: -0.01em; }
.btn-opts { display: inline-flex; align-items: center; gap: 18px; }
.opts-icon { width: 34px; height: 26px; display: inline-block; background:
  linear-gradient(currentColor, currentColor) 0 0 / 100% 5px no-repeat,
  linear-gradient(currentColor, currentColor) 0 50% / 70% 5px no-repeat,
  linear-gradient(currentColor, currentColor) 0 100% / 40% 5px no-repeat; border-radius: 2px; }
.lobby-summary { margin-top: auto; font-size: 28px; line-height: 1.4; color: var(--ink-dim); padding-left: 22px; border-left: 6px solid var(--game); }
.lobby-summary:empty { visibility: hidden; }

/* ---- options screen --------------------------------------------------------- */
.optscreen { display: grid; grid-template-rows: auto 1fr auto; gap: 40px; position: relative; }
.optscreen::before { content: ''; position: absolute; inset: -54px -96px auto; height: 330px; background: linear-gradient(180deg, color-mix(in srgb, var(--game) 30%, transparent), transparent); pointer-events: none; }
.opt-head { position: relative; }
.opt-game { font-size: 30px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--game); }
.opt-title { font-size: 128px; line-height: 0.92; margin: 6px 0 0; }
.opt-body { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 64px; min-height: 0; }
.opt-list { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow-y: auto; scrollbar-width: none; scroll-padding-block: 24px; mask-image: linear-gradient(transparent, #000 18px, #000 calc(100% - 18px), transparent); padding: 20px; margin: -20px; /* room for the focus ring and scale */ }
.opt-list::-webkit-scrollbar { display: none; }
.optscreen .setting { flex: none; }
.opt-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 30px; padding: 22px 26px 22px 34px; border-radius: 26px; }
.opt-row .s-label { font-size: 26px; color: var(--ink); letter-spacing: 0.1em; }
.opt-chips { display: flex; gap: 10px; }
.opt-chip { min-width: 120px; padding: 14px 26px; border-radius: 16px; text-align: center; font-size: 32px; font-weight: 900; color: var(--ink-dim); box-shadow: inset 0 0 0 3px var(--panel-2); }
.opt-chip.on { background: var(--game); color: var(--game-ink); box-shadow: none; }
.tv .optscreen .setting:focus { transform: scale(1.02); }
.opt-group { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.opt-group-head { display: flex; align-items: baseline; gap: 18px; padding-left: 8px; }
.opt-group-head .s-label { font-size: 26px; }
.opt-count { font-size: 26px; color: var(--ink-dim); }
.opt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.opt-tog { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 20px 22px; border-radius: 20px; font-size: 28px; font-weight: 900; color: var(--ink-mute, #6B6B78); text-decoration: line-through; }
.opt-tog::before { content: ''; width: 26px; height: 26px; flex: none; border-radius: 8px; box-shadow: inset 0 0 0 3px currentColor; }
.opt-tog.on { color: var(--ink); text-decoration: none; }
.opt-tog.on::before { background: var(--game); box-shadow: none; }
.opt-hint { align-self: start; background: var(--panel); border-radius: 28px; padding: 34px 38px; border-top: 8px solid var(--game); }
.opt-hint:empty { visibility: hidden; }
.opt-hint .s-label { font-size: 22px; }
.opt-hint-v { font-family: var(--display); text-transform: uppercase; font-size: 64px; line-height: 1; margin: 10px 0 14px; }
.opt-hint p { margin: 0; font-size: 30px; line-height: 1.4; color: var(--ink-dim); font-weight: 600; }
.opt-foot { display: flex; align-items: center; gap: 40px; }
.opt-foot .btn-done { font-size: 56px; padding: 0.42em 2em; }
.opt-keys { margin-left: auto; font-size: 28px; color: var(--ink-dim); }
.lobby { grid-template-columns: minmax(0, 1fr); }
.lobby-foot { gap: 24px; min-width: 0; }
.lobby-foot .btn-ghost { font-size: 34px; padding: 0.55em 1.2em; }
.lobby-summary { margin-top: 8px; }
.opt-tog { font-size: 26px; padding: 20px 18px; }
.lobby-foot .btn-small { font-size: 28px; padding: 0.55em 1em; }
/* Each game's lobby wears its own colour: Start, the code tiles, the host pill. */
.lobby .btn-primary, .optscreen .btn-primary { background: var(--game); color: var(--game-ink); box-shadow: 0 8px 0 color-mix(in srgb, var(--game) 60%, #000); }
.lobby .code span { background: var(--game); color: var(--game-ink); box-shadow: 0 8px 0 color-mix(in srgb, var(--game) 60%, #000); }
.lobby .slot .vip { --k: var(--game); color: var(--game-ink); background: var(--game); }
/* Mode cards with a chip row for one more setting (Buzzline difficulty) */
.modes.has-extra .mode-row { height: 560px; }
.mode-extra { position: absolute; left: 96px; right: 96px; top: 912px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.mx-label { font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-dim); margin-right: 8px; }
.mx-chip { font: inherit; font-size: 28px; font-weight: 900; padding: 10px 28px; border: 0; border-radius: 999px; background: var(--panel); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 3px var(--panel-2); }
.mx-chip.on { background: var(--game); color: var(--game-ink); box-shadow: none; }
.tv .mx-chip:focus { outline: none; box-shadow: 0 0 0 4px var(--bg), 0 0 0 9px var(--action); transform: scale(1.06); }
.mx-hint { font-size: 22px; font-weight: 700; color: var(--ink-mute); margin-left: 8px; min-width: 320px; }
.modes.has-extra .mc-art { height: 190px; }
.modes.has-extra .mode-glyph { width: 240px; height: 168px; }
.modes.has-extra .mc-body { padding: 36px 34px 24px; }
.modes.has-extra .mc-name { font-size: 76px; }
.modes.has-extra .mc-desc { font-size: 27px; margin-top: 10px; }
.modes.has-extra .mc-foot { flex-wrap: nowrap; padding-top: 12px; }
.mc-chip, .mc-go { white-space: nowrap; }
.modes.has-extra .mc-chip { font-size: 20px; padding: 6px 14px; }
.modes.has-extra .mc-go { font-size: 22px; padding: 7px 16px; }
/* Long option lists (Deep Cut time) drop under their label instead of squashing. */
.opt-row { flex-wrap: wrap; row-gap: 14px; }
.opt-row .s-label { white-space: nowrap; }
.opt-chips { flex-wrap: wrap; justify-content: flex-end; }
.opt-chip { white-space: nowrap; min-width: 96px; padding: 14px 20px; }
.opt-body { grid-template-columns: minmax(0, 1fr) 500px; }

/* Captions for sound cues (Settings > Captions): subtitle-style, bottom centre,
   inside the title-safe area. */
.tv .caption { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 90; pointer-events: none;
  background: rgba(0, 0, 0, 0.86); color: #fff; font-size: 40px; font-weight: 800; padding: 12px 30px; border-radius: 14px; white-space: nowrap; }

/* Streamer mode: the code and QR are covered until someone asks to see them.
   The note takes the code's place, so the card keeps its height. */
.join-card .code.hidden-code { display: none; }
.join-card .qr-wrap.hidden-code .qr { filter: blur(22px); opacity: 0.25; }
.streamer-note { height: 140px; margin-top: 14px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; font-size: 28px; color: var(--ink-dim); }
.streamer-note .btn { font-size: 30px; padding: 14px 34px; }
.lobby-flags { display: flex; gap: 12px; }
.lobby-flag { font-size: 22px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; background: var(--panel-2); color: var(--ink); }
.setting.locked .s-value { opacity: 0.6; }

/* Audience */
.crowd-line { font-size: 30px; font-weight: 800; color: var(--action); margin: -6px 0 18px; }
.tv .crowd-banner { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 12px;
  background: var(--panel); border-radius: 999px; padding: 4px 22px 4px 6px; font-size: 26px; box-shadow: 0 0 0 3px var(--action); animation: fadein 0.4s ease-out; }
.crowd-banner .avatar { width: 38px; height: 38px; font-size: 22px; }
.crowd-banner .cb-kicker { order: -1; padding-left: 16px; font-size: 22px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--action); }
.crowd-banner .cb-votes { color: var(--ink-dim); font-size: 24px; }

/* Settings: full screen. A flat colour block per section on the left, the
   section's settings on the right, every option visible as a chip. */
.tv .set2 { background: var(--bg); display: grid; grid-template-columns: 620px 1fr; --sec: var(--hype); --sec-ink: var(--bg); }
.set2-side { background: var(--sec); color: var(--sec-ink); padding: 84px 70px 64px 96px; display: flex; flex-direction: column; transition: background 0.25s ease; }
.set2-kicker { font-size: 26px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.set2-tabs { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 40px; }
.set2-tab { border: 0; background: transparent; color: inherit; font-family: var(--display); font-size: 120px; line-height: 1.02; text-transform: uppercase; padding: 0 18px; margin-left: -18px; border-radius: 18px; opacity: 0.38; cursor: pointer; }
.set2-tab.on { opacity: 1; }
.tv .set2-tab:focus { outline: none; opacity: 1; transform: none; box-shadow: inset 0 0 0 6px var(--sec-ink); }
.set2-server { margin-top: auto; font-size: 22px; font-weight: 700; opacity: 0.7; }
.set2-main { padding: 120px 96px 64px 90px; display: flex; flex-direction: column; }
.set2-rows { display: flex; flex-direction: column; gap: 46px; }
.set2-row { display: flex; align-items: center; gap: 40px; }
.set2-text { flex: 1; min-width: 0; }
.set2-label { font-size: 44px; font-weight: 800; }
.set2-desc { font-size: 26px; color: var(--ink-dim); margin-top: 6px; min-height: 1.2em; }
.set2-opts { display: flex; gap: 12px; }
.set2-opt { border: 0; border-radius: 999px; padding: 16px 30px; font-size: 30px; font-weight: 800; background: var(--panel); color: var(--ink-dim); cursor: pointer; white-space: nowrap; }
.set2-opt.on { background: var(--sec); color: var(--sec-ink); }
.set2-done { margin-top: auto; align-self: flex-end; }
.optscreen .setting.locked { opacity: 0.55; }
.modes.has-extra .mc-name { font-size: 68px; }

/* Options: join code + QR stay up so people can still join; "More options". */
.opt-side { display: flex; flex-direction: column; gap: 24px; align-self: start; }
.opt-side .opt-hint { align-self: stretch; }
.opt-join { display: flex; align-items: center; gap: 26px; background: var(--panel); border-radius: 28px; padding: 26px 28px; }
.opt-join-text { flex: 1; min-width: 0; }
.opt-join-text .s-label { font-size: 20px; }
.opt-join-url { font-size: 30px; font-weight: 900; margin: 4px 0 8px; overflow-wrap: anywhere; line-height: 1.1; }
.opt-join-code { font-family: var(--display); font-size: 84px; line-height: 1; letter-spacing: 0.06em; color: var(--game); }
.opt-qr { width: 170px; height: 170px; border-radius: 14px; background: #fff; padding: 8px; image-rendering: pixelated; flex: none; }
.opt-more { display: flex; flex-direction: row; align-items: center; gap: 22px; padding: 20px 30px 20px 34px; border-radius: 26px; }
.opt-more .s-label { font-size: 26px; color: var(--ink); letter-spacing: 0.1em; white-space: nowrap; }
.opt-more-sum { flex: 1; min-width: 0; font-size: 24px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.opt-more-x { font-size: 44px; line-height: 1; color: var(--ink-dim); transition: transform 0.2s ease; }
.opt-more.open .opt-more-x { transform: rotate(45deg); }
.opt-more-list { display: flex; flex-direction: column; gap: 18px; }
.opt-join-url { font-size: 26px; word-break: normal; overflow-wrap: anywhere; }
