/* TV layout: everything sized in vh so it scales to any 16:9 screen. */
body.tv { overflow: hidden; font-size: 1.9vh; cursor: none; }
body.tv.mouse { cursor: default; }
#game { display: grid; grid-template-columns: auto 1fr; gap: 3vh; height: 100vh; padding: 2.5vh 3vh 2.5vh 2vh; }

#boardWrap { position: relative; height: 95vh; aspect-ratio: 1; display: grid; grid-template-columns: 2.6vh 1fr; grid-template-rows: 2.6vh 1fr; }
.coords { display: grid; color: var(--b-coord); font-weight: 800; font-size: 1.5vh; opacity: .8; }
.coords span { display: flex; align-items: center; justify-content: center; }
.coords.top { grid-column: 2; grid-row: 1; grid-template-columns: repeat(15, 1fr); padding: 0 .5vh; }
.coords.side { grid-column: 1; grid-row: 2; grid-template-rows: repeat(15, 1fr); padding: .5vh 0; }
#board { grid-column: 2; grid-row: 2; width: 92.4vh; height: 92.4vh; --gap: .18vh; --frame: .5vh; border-radius: .8vh; }
#pausedBanner { position: absolute; inset: 2.6vh 0 0 2.6vh; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); border-radius: .8vh; z-index: 5; backdrop-filter: blur(3px); }
#pausedBanner div { background: var(--card); color: var(--ink); font-size: 5vh; font-weight: 900; padding: 2vh 5vh; border-radius: 2vh; box-shadow: var(--shadow); }

#side { display: flex; flex-direction: column; gap: 1.6vh; min-width: 0; min-height: 0; }
#brand { display: flex; align-items: baseline; justify-content: space-between; gap: 2vh; }
#brand .logo { font-size: 4.2vh; }
#meta { color: var(--muted); font-weight: 700; font-size: 1.8vh; text-align: right; }
#brand { align-items: center; }
#breakHint { flex: 1; min-width: 0; text-align: center; color: var(--muted); font-size: 1.8vh; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#breakHint kbd { display: inline-block; font: 800 1.45vh Mulish, sans-serif; padding: .25vh .6vh; margin-right: .3vh; border-radius: .5vh; border: .15vh solid var(--line); border-bottom-width: .35vh; background: var(--card); color: var(--ink); vertical-align: .1vh; }
#brand .brandEnd { display: flex; align-items: center; gap: 1.4vh; }
#brand .appIcon { width: 5.2vh; height: 5.2vh; }
.lobbyBrand { display: flex; align-items: center; justify-content: space-between; gap: 4vh; }
.lobbyBrand .appIcon { width: 13vh; height: 13vh; }
.card { background: var(--card); border-radius: 1.4vh; box-shadow: var(--shadow); padding: 1.6vh 2vh; }
.cardTitle { text-transform: uppercase; letter-spacing: .18em; color: var(--muted); font-size: 1.4vh; font-weight: 800; margin-bottom: 1vh; }

/* player cards */
#players { display: flex; flex-direction: column; gap: 1.2vh; }
.pcard { position: relative; background: var(--card); border-radius: 1.4vh; padding: 1.6vh 2vh; display: grid; grid-template-columns: auto 1fr auto; gap: 1.8vh; align-items: center;
  box-shadow: var(--shadow); border: .35vh solid transparent; transition: border-color .3s, transform .3s; overflow: hidden; }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .8vh; background: var(--pc); opacity: 0; transition: opacity .3s; }
.pcard.turn { border-color: var(--pc); }
.pcard.turn::before { opacity: 1; }
.pcard .avatar { width: 7vh; height: 7vh; font-size: 3.4vh; }
.pcard .who { min-width: 0; }
.pcard .name { font-size: 3vh; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .meta { color: var(--muted); font-size: 1.8vh; margin-top: .5vh; display: flex; gap: 1.2vh; align-items: center; font-weight: 700; }
.pcard .turnTag { color: var(--pc); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.pcard .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .6vh; }
.pcard .score { font-size: 7vh; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.pcard .timer { font-size: 2.4vh; }
.thinking i { display: inline-block; width: .7vh; height: .7vh; border-radius: 50%; background: currentColor; margin-left: .3vh; animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* bag */
#bagCard { padding: 1.2vh 2vh; }
.bagHead { font-size: 2vh; font-weight: 700; } #bagNum { font-size: 2.8vh; font-weight: 900; }
#bagBar { height: .8vh; background: var(--bg2); border-radius: 1vh; margin-top: .8vh; overflow: hidden; }
#bagBar div { height: 100%; background: var(--primary); border-radius: 1vh; transition: width .8s; }

/* scorecard */
#logCard { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#log { list-style: none; margin: 0; padding: 0; flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: .5vh; }
#log li { display: grid; grid-template-columns: 3.4vh 1fr auto 6vh; gap: 1.2vh; align-items: center; padding: .8vh 1vh; border-radius: .8vh; font-size: 2vh; }
#log li.alt { background: var(--card2); }
#log li .avatar { width: 3.2vh; height: 3.2vh; font-size: 1.5vh; }
#log li .w { font-family: "Roboto Mono", monospace; font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#log li.quiet .w { font-family: inherit; color: var(--muted); letter-spacing: 0; }
#log li .d { color: var(--muted); font-size: 1.6vh; font-weight: 700; }
#log li .s { font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
#log li .t { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; }
#log li.bingo .w { color: var(--secondary); }
#log li.bingo .w::after { content: " ★"; color: var(--warn); }
#log li.newest { animation: slidein .5s ease-out; box-shadow: inset 0 0 0 .25vh var(--primary); }
@keyframes slidein { from { transform: translateX(4vh); opacity: 0; } }

/* bottom row: now playing on the left (truncated if long), the QR code in the bottom-right corner */
#footRow { display: flex; align-items: center; gap: 2vh; min-width: 0; }
#joinMini { flex: none; margin-left: auto; text-align: right; display: flex; align-items: center; gap: 1.4vh; color: var(--muted); font-size: 1.6vh; font-weight: 700; }
#joinMini img { width: 8vh; height: 8vh; background: white; border-radius: .8vh; padding: .4vh; }
#joinMini .code { font-size: 2.2vh; }
/* the time of day, in the space under the "TV code" label; this TV's own time zone and setting */
#joinMini .codeRow { display: flex; align-items: center; justify-content: space-between; gap: 1.6vh; margin-top: .4vh; }
#clock { font-family: "Roboto Mono", monospace; font-weight: 700; font-size: 2.2vh; letter-spacing: .04em; color: var(--ink); line-height: 1;
  font-variant-numeric: tabular-nums; padding: .5vh 1vh; border: .22vh solid color-mix(in srgb, var(--primary) 55%, transparent); border-radius: .8vh;
  background: color-mix(in srgb, var(--primary) 10%, transparent); box-shadow: 0 0 1.2vh color-mix(in srgb, var(--primary) 18%, transparent); }
#clock small { font-size: .62em; margin-left: .35em; color: var(--muted); letter-spacing: .08em; }
#clock.hidden { display: none; }

/* floating score pop */
#scorePop { position: fixed; z-index: 8; pointer-events: none; transform: translate(-50%, -50%); font-weight: 900; font-size: 6vh; color: #fff;
  background: var(--primary); padding: .6vh 2.4vh; border-radius: 1.4vh; box-shadow: 0 1vh 3vh rgba(0,0,0,.35); animation: pop 2.4s ease-out forwards; white-space: nowrap; }
#scorePop.bingo { background: linear-gradient(90deg, var(--secondary), var(--primary)); font-size: 8vh; }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 12% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  22% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { transform: translate(-50%, -140%) scale(.9); opacity: 0; } }

/* overlays */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; backdrop-filter: blur(6px); }
.lobbyCard { display: grid; grid-template-columns: 1fr auto; gap: 6vh; background: var(--card); border-radius: 3vh; padding: 6vh 7vh; box-shadow: 0 2vh 8vh rgba(0,0,0,.25); max-width: 92vw; align-items: center; }
.logo.big { font-size: 10vh; }
.lobbyLeft .sub { color: var(--muted); font-size: 2.8vh; margin: 2vh 0 3vh; font-weight: 600; max-width: 70vh; }
.steps { margin: 0 0 3vh; padding: 0; list-style: none; counter-reset: s; font-size: 2.6vh; display: flex; flex-direction: column; gap: 1.4vh; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 1.6vh; }
.steps li::before { content: counter(s); display: inline-flex; width: 4.4vh; height: 4.4vh; border-radius: .7vh; align-items: center; justify-content: center;
  background: var(--t-bg); color: var(--t-ink); font-family: "Roboto Mono", monospace; font-weight: 700; }
.qrBox { background: #fff; padding: .5vh; border-radius: 2vh; box-shadow: inset 0 0 0 .4vh var(--line); }
#qr { width: 40vh; height: 40vh; display: block; image-rendering: pixelated; }
.manual { text-align: center; color: var(--muted); font-size: 2.2vh; margin: 2vh 0 0; line-height: 1.6; }
.manual .code.big { display: block; font-size: 6vh; margin: .3vh 0 1vh; }
.manual .small { font-size: 1.8vh; line-height: 1.5; }
.manual .host { color: var(--ink); }
#lobbySeats { display: flex; gap: 2vh; }
.lseat { display: flex; align-items: center; gap: 1.4vh; background: var(--card2); border: .25vh solid var(--line); border-radius: 1.4vh; padding: 1.4vh 2.4vh; font-size: 2.6vh; font-weight: 800; min-width: 26vh; }
.lseat .avatar { width: 4.6vh; height: 4.6vh; font-size: 2.2vh; }
.lseat.empty { border-style: dashed; color: var(--muted); font-weight: 600; }
.lseat.empty .avatar { background: var(--line); }
.hint { color: var(--muted); font-size: 2.3vh; font-weight: 600; }
#lobbyHint.ready { color: var(--good); font-weight: 800; }
.lobbyFoot { margin-top: 3vh; font-size: 1.8vh; }

.overCard { background: var(--card); border-radius: 3vh; padding: 5vh 8vh; text-align: center; box-shadow: 0 2vh 8vh rgba(0,0,0,.3); animation: rise .6s cubic-bezier(.2,1.3,.4,1); }
@keyframes rise { from { transform: translateY(6vh) scale(.95); opacity: 0; } }
#trophy { font-size: 10vh; animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-1.5vh) rotate(-6deg); } }
#over h2 { font-size: 7vh; margin: 1vh 0 0; font-weight: 900; }
#reason { font-size: 2.4vh; margin: 1vh 0 3vh; }
#finals { display: flex; gap: 4vh; justify-content: center; }
.final { background: var(--card2); border-radius: 2vh; padding: 3vh 5vh; min-width: 34vh; border: .4vh solid transparent; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.final .avatar { width: 7vh; height: 7vh; font-size: 3.4vh; }
.final .n { font-size: 3vh; font-weight: 800; } .final .s { font-size: 10vh; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.final .r { color: var(--muted); font-size: 2vh; font-weight: 700; }
.final.win { border-color: var(--warn); }

.menuCard { background: var(--card); border-radius: 2vh; padding: 3vh; min-width: 60vh; display: flex; flex-direction: column; gap: 1vh; box-shadow: 0 2vh 8vh rgba(0,0,0,.3); }
.mitem { text-align: left; padding: 1.8vh 2.4vh; border-radius: 1.2vh; font-size: 2.6vh; font-weight: 700; background: var(--card2); border: .3vh solid transparent; }
.msub { display: block; margin-top: .4vh; font-size: 1.9vh; font-weight: 600; color: var(--muted); }
#menu, #gamesMenu, #switchAsk, #stillAsk { z-index: 20; } /* above the "now playing" card */
.mitem.offpage { display: none; }
.mitem .more { float: right; color: var(--muted); font-weight: 900; }
.menuCard { max-height: 94vh; overflow-y: auto; } /* a last resort: the pages are short enough for a 720p TV */
.mitem:focus, .mitem.focus { outline: none; border-color: var(--primary); background: var(--primary-soft); }

#soundHint { position: fixed; left: 50%; bottom: 2vh; transform: translateX(-50%); background: var(--card); color: var(--muted); padding: 1vh 2vh; border-radius: 1vh; font-weight: 700; z-index: 30; box-shadow: var(--shadow); }
#conn { position: fixed; right: 2vh; bottom: 2vh; background: var(--bad); color: #fff; padding: 1vh 2vh; border-radius: 1vh; font-weight: 800; z-index: 40; }
body.tv #toasts { top: 6vh; left: calc(2vh + 49vh); }
body.tv .toast { font-size: 2.6vh; padding: 1.4vh 3vh; }
#castWait { background: var(--bg); backdrop-filter: none; }
#bingo { font-size: 3.4vh; }
#bingo .btitle { font-size: 4.2em; }
.menuCard.wide { min-width: 80vh; max-width: 90vw; }
#gamesList { display: flex; flex-direction: column; gap: 1vh; max-height: 64vh; overflow-y: auto; }
.gitem { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2vh; }
.gitem .gn { font-size: 2.6vh; font-weight: 800; }
.gitem .gs { font-size: 1.8vh; color: var(--muted); font-weight: 700; margin-top: .4vh; }
.gitem .gsc { font-size: 3vh; font-weight: 900; font-variant-numeric: tabular-nums; }
.gitem .tag { display: inline-block; font-size: 1.5vh; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: .2vh .8vh; border-radius: .6vh; margin-right: .8vh; background: var(--card); }
.gitem .tag.live { background: var(--timer-bg); color: var(--timer-ink); }
.gitem .tag.now { background: var(--primary); color: var(--primary-ink); }
.grow { display: flex; gap: 1vh; } .grow > .gitem { flex: 1; min-width: 0; }
.gx { flex: none; width: auto; min-width: 7vh; display: grid; place-items: center; font-weight: 900; color: var(--muted); }
.gx.armed { background: var(--bad) !important; color: #fff !important; }

/* word definition (double-tap a word in a phone's scorecard) */
#defCard { position: fixed; left: 50%; bottom: 5vh; transform: translateX(-50%); z-index: 80; width: min(80vw, 110vh); background: var(--card); color: var(--ink);
  border-radius: 2vh; box-shadow: 0 2vh 6vh rgba(0,0,0,.45); padding: 2.6vh 3.4vh; display: flex; flex-direction: column; gap: 1vh; border-left: 1vh solid var(--primary);
  animation: defIn .35s cubic-bezier(.2,1.4,.4,1); }
#defCard.p0 { border-left-color: var(--p0); } #defCard.p1 { border-left-color: var(--p1); }
@keyframes defIn { from { opacity: 0; transform: translate(-50%, 4vh); } }
#defCard .dw { display: flex; align-items: baseline; gap: 2vh; flex-wrap: wrap; }
#defCard .dw b { font-family: "Roboto Mono", monospace; font-size: 5.6vh; letter-spacing: .08em; }
#defCard .dw span { color: var(--muted); font-size: 2.4vh; font-weight: 700; }
#defCard ol { margin: 0; padding-left: 3.4vh; display: flex; flex-direction: column; gap: .6vh; font-size: 3vh; line-height: 1.3; }
#defCard ol:has(> li:only-child) { list-style: none; padding-left: 0; }
#defCard i { color: var(--muted); font-size: .8em; margin-right: 1vh; }
#defCard .none { color: var(--muted); font-size: 2.8vh; }
#defCard small { color: var(--muted); font-size: 1.9vh; }

/* background music: "now playing" (a row in the side panel during a game, in the lobby card, a corner card when paused or over) */
.np { display: flex; align-items: center; gap: 1.4vh; min-width: 0; }
.np img { flex: none; object-fit: cover; background: var(--card2); }
.np .npt { display: flex; flex-direction: column; min-width: 0; }
.np .npt > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np .ar, .np small { color: var(--muted); font-weight: 700; }
#npMini { flex: 1; color: var(--ink); font-size: 1.7vh; }
#npMini img { width: 4.6vh; height: 4.6vh; border-radius: .6vh; }
#npMini b::before { content: "♪ "; color: var(--primary); }
#npBig { position: fixed; right: 3vh; bottom: 3vh; z-index: 15; max-width: 60vh; background: var(--card); border-radius: 1.8vh; box-shadow: var(--shadow);
  padding: 1.4vh 2.4vh 1.4vh 1.4vh; animation: npIn .5s ease-out; }
#npBig img { width: 10vh; height: 10vh; border-radius: 1vh; }
#npBig small { font-size: 1.5vh; text-transform: uppercase; letter-spacing: .12em; }
#npBig b { font-size: 2.8vh; font-weight: 900; margin: .3vh 0; }
#npBig .ar { font-size: 2.1vh; }
#npLobby { margin-top: 2.4vh; padding-top: 2.4vh; border-top: .2vh solid var(--line); }
#npLobby img { width: 7vh; height: 7vh; border-radius: .8vh; }
#npLobby small { font-size: 1.4vh; text-transform: uppercase; letter-spacing: .12em; }
#npLobby b { font-size: 2.4vh; font-weight: 900; }
#npLobby .ar { font-size: 1.9vh; }
@keyframes npIn { from { opacity: 0; transform: translateY(3vh); } }

/* ---- game review (post-game analysis) ---- */
body.reviewing #players, body.reviewing #bagCard, body.reviewing #logCard { display: none; }
#rvPanel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.4vh; }
#rvPanel .rvHead { display: flex; justify-content: space-between; align-items: baseline; }
#rvPanel .rvHead .cardTitle { margin: 0; font-size: 1.8vh; color: var(--primary); }
#rvCount { font-weight: 800; font-size: 2.4vh; }
#rvBody { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1.6vh; padding: 2.2vh 2.4vh; }
#rvProg { color: var(--muted); font-weight: 700; font-size: 1.8vh; min-height: 2.2vh; }
#rvHelp { font-size: 1.7vh; font-weight: 700; }
.rvWho { display: flex; align-items: center; gap: 1.6vh; flex-wrap: wrap; }
.rvWho .nm { font-size: 3vh; font-weight: 900; }
.rvRack { display: inline-flex; gap: .4vh; }
.rvRack .tile { position: relative; inset: auto; display: inline-flex; width: 3.6vh; height: 3.6vh; font-size: 2.2vh; }
.rvRack .tile .tl-val { font-size: 1vh; }
.rvSc { margin-left: auto; color: var(--muted); font-weight: 800; font-size: 1.9vh; font-variant-numeric: tabular-nums; }
.rvPrev { color: var(--muted); font-size: 2vh; font-weight: 600; }
.rvPrev b { color: var(--ink); font-family: "Roboto Mono", monospace; }
.rvVerdict { display: flex; align-items: center; gap: 1.2vh; font-size: 3.4vh; font-weight: 900; padding: 1.2vh 1.8vh; border-radius: 1.2vh;
  background: color-mix(in srgb, var(--vc) 18%, transparent); color: var(--vc); border: .3vh solid color-mix(in srgb, var(--vc) 55%, transparent); }
.rvVerdict .ico { display: inline-grid; place-items: center; min-width: 4.4vh; height: 4.4vh; padding: 0 .8vh; border-radius: 99px; background: var(--vc); color: var(--card); font-size: 2.4vh; }
.rvVerdict .tag { margin-left: auto; font-size: 1.8vh; padding: .5vh 1.2vh; border-radius: 99px; background: var(--vc); color: var(--card); }
.rvVerdict .tag + .tag { margin-left: .8vh; }
.rvVerdict.wait { --vc: var(--muted); font-size: 2.6vh; }
.v-best { --vc: var(--good); } .v-small { --vc: var(--warn); } .v-medium { --vc: color-mix(in srgb, var(--warn) 45%, var(--bad)); } .v-large { --vc: var(--bad); }
.spin { width: 2.4vh; height: 2.4vh; border-radius: 50%; border: .4vh solid currentColor; border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.rvMoves, .rvAlts { display: flex; flex-direction: column; gap: .8vh; }
.rvMove { display: grid; grid-template-columns: 9vh 1fr auto auto; gap: 1.4vh; align-items: baseline; padding: 1vh 1.4vh; border-radius: 1vh; background: var(--card2);
  border: .3vh solid transparent; font-size: 2.4vh; transition: border-color .3s, background .3s; }
.rvMove .lbl { text-transform: uppercase; letter-spacing: .12em; font-size: 1.5vh; font-weight: 900; color: var(--muted); }
.rvMove .mv b { font-family: "Roboto Mono", monospace; letter-spacing: .04em; }
.rvMove .pos { color: var(--muted); font-weight: 800; font-size: 1.8vh; }
.rvMove .pts { font-weight: 900; font-variant-numeric: tabular-nums; }
.rvMove .out { white-space: nowrap; min-width: 12vh; text-align: right; color: var(--muted); font-weight: 800; font-size: 2vh; font-variant-numeric: tabular-nums; }
.rvMove .keep { grid-column: 2 / -1; color: var(--muted); font-size: 1.7vh; font-weight: 700; margin-top: -.4vh; }
.rvMove.played.onBoard { border-color: var(--secondary); }
.rvMove.best { background: color-mix(in srgb, var(--good) 12%, var(--card2)); }
.rvMove.best .lbl { color: var(--good); }
.rvMove.best.onBoard { border-color: var(--good); }
.rvAlts .cap { text-transform: uppercase; letter-spacing: .14em; font-size: 1.4vh; font-weight: 900; color: var(--muted); }
.rvMove.alt { font-size: 2vh; padding: .6vh 1.4vh; background: transparent; }
.rvLine { display: flex; flex-wrap: wrap; gap: .7vh; }
.rvDot { width: 2.2vh; height: 2.2vh; border-radius: 50%; background: var(--vc, var(--line)); border: .3vh solid var(--card); box-shadow: 0 0 0 .2vh var(--pc); padding: 0; }
.rvDot.todo { background: var(--card2); }
.rvDot.on { transform: scale(1.45); box-shadow: 0 0 0 .3vh var(--ink); }
.rvOver { display: flex; flex-direction: column; gap: 2vh; }
.rvPlayer { display: grid; grid-template-columns: auto 1fr auto; gap: 2vh; align-items: center; background: var(--card2); border-radius: 1.4vh; padding: 2vh; }
.rvPlayer .avatar { width: 7vh; height: 7vh; font-size: 3.4vh; }
.rvPlayer .name { font-size: 3vh; font-weight: 900; }
.rvPlayer .score { font-size: 6vh; font-weight: 900; font-variant-numeric: tabular-nums; }
.rvChips { display: flex; flex-wrap: wrap; gap: .8vh; margin-top: 1vh; }
.rvChips .chip { padding: .5vh 1.2vh; border-radius: 99px; font-size: 1.9vh; font-weight: 700; background: color-mix(in srgb, var(--vc) 16%, transparent); color: var(--vc); }
.rvNote { color: var(--muted); font-weight: 700; font-size: 1.9vh; margin-top: .8vh; }
/* the move on the board: what was played, then the best move */
.tile.rvPlayed { box-shadow: 0 0 0 .35vh var(--secondary), 0 .4vh 1vh rgba(0,0,0,.35); z-index: 2; }
.tile.rvBest { background: color-mix(in srgb, var(--good) 55%, var(--t-bg)); box-shadow: 0 0 0 .35vh var(--good), 0 .4vh 1vh rgba(0,0,0,.35); z-index: 2; }

/* "Getting ready for a new game in 0:42": the last minute before an idle result moves on */
#idleNote { position: fixed; left: 50%; bottom: 4vh; transform: translateX(-50%); z-index: 21; background: var(--card); color: var(--ink);
  font-size: 2.6vh; font-weight: 700; padding: 1.4vh 3vh; border-radius: 99px; box-shadow: var(--shadow); white-space: nowrap; }
#idleNote b:first-child { font-family: 'Roboto Mono', monospace; }

/* ---- idle screen ("lounge"): big time of day, now playing, the game at a glance ---- */
#lounge { position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); animation: lgIn 1.2s ease; }
@keyframes lgIn { from { opacity: 0; } to { opacity: 1; } }
#lounge .lgGlow { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(9vh) saturate(1.4); opacity: .35; pointer-events: none; }
#lounge .lgBody { position: relative; display: flex; align-items: center; gap: 16vh; max-width: 92vw; transition: transform 4s ease; }
#lounge .lgMain { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
#lounge .lgTime { font-family: 'Fjalla One', sans-serif; font-size: 22vh; line-height: 1; letter-spacing: .02em; color: var(--ink); }
#lounge .lgTime small { font-size: .32em; margin-left: .25em; color: var(--muted); }
#lounge .lgDate { font-size: 3.4vh; font-weight: 700; color: var(--muted); margin: 1vh 0 4vh .6vh; }
#lounge .lgGame { background: var(--card); border-radius: 2.4vh; padding: 2.6vh 3.2vh; box-shadow: 0 2vh 8vh rgba(0,0,0,.25); min-width: 62vh; }
#lounge .lgRow { display: flex; align-items: center; gap: 2vh; padding: 1vh 1.4vh; border-radius: 1.4vh; border: .3vh solid transparent; }
#lounge .lgRow.turn { border-color: var(--primary); background: var(--primary-soft); }
#lounge .lgRow .avatar { width: 6.4vh; height: 6.4vh; font-size: 3vh; }
#lounge .lgRow .nm { flex: 1; min-width: 0; font-size: 3.2vh; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lounge .lgRow .nm small { display: block; font-size: 1.9vh; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
#lounge .lgRow .sc { font-size: 5vh; font-weight: 900; min-width: 10vh; text-align: right; }
#lounge .lgRow .timer { font-size: 3.2vh; padding: .4vh 1.2vh; border-radius: 1vh; }
#lounge .lgFacts { margin-top: 1.6vh; padding-top: 1.6vh; border-top: .2vh solid var(--line); font-size: 2.3vh; color: var(--muted); font-weight: 600; display: flex; align-items: flex-end; gap: 2vh; }
#lounge .lgFacts .lgLines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .6vh; }
#lounge .lgFacts .appIcon { width: 8.4vh; height: 8.4vh; flex-shrink: 0; }
#lounge .lgFacts b { color: var(--ink); }
#lounge .lgPaused { color: var(--bad); font-weight: 900; }
#lounge .lgQR { display: flex; align-items: center; gap: 3vh; }
#lounge .lgQR img { width: 22vh; height: 22vh; border-radius: 1.2vh; background: #fff; padding: 1vh; }
#lounge .lgQR .code { font-family: 'Roboto Mono', monospace; font-size: 4.4vh; font-weight: 900; letter-spacing: .12em; color: var(--primary); }
#lounge .lgWin { font-size: 4vh; font-weight: 900; margin-bottom: 1vh; }
#lounge .lgNow { display: flex; flex-direction: column; align-items: flex-start; width: 46vh; }
#lounge .lgCover { width: 46vh; height: 46vh; object-fit: cover; border-radius: 2.4vh; box-shadow: 0 3vh 9vh rgba(0,0,0,.35); margin-bottom: 2.6vh; background: var(--card2); }
#lounge .lgNow small { font-size: 1.9vh; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
#lounge .lgNow b { font-size: 4vh; font-weight: 900; margin: .6vh 0 .3vh; line-height: 1.15; }
#lounge .lgNow .ar { font-size: 2.8vh; color: var(--muted); font-weight: 600; }
#lounge .lgHint { position: absolute; bottom: 3.4vh; left: 0; right: 0; text-align: center; font-size: 2.2vh; color: var(--muted); font-weight: 600; }
#lounge .lgHint b { color: var(--ink); }
