/* The stream page of a game played live: a 16 by 9 picture that fills the window and never scrolls. Every size is in
   --u, a hundredth of the picture's height (set by stream.js), so it is the same picture at any size. Text on it is
   sized against the picture: a spoken line's height is 8% of its window's (7 to 9 is the broadcast range), two lines,
   smaller only when the words need it; everything keeps 5% from the picture's edge. */
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { display: grid; place-items: center; font-family: -apple-system, system-ui, 'Helvetica Neue', Arial, sans-serif; color: #f4f1e8; }
.stage { position: relative; width: calc(var(--u) * 177.78); height: calc(var(--u) * 100); background: #0b0e14; overflow: hidden; }
.wins { position: absolute; left: calc(var(--u) * 5); top: calc(var(--u) * 5); width: calc(var(--u) * 128); height: calc(var(--u) * 90); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: calc(var(--u) * 2); }
.win { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border: calc(var(--u) * 0.5) solid var(--c); border-radius: calc(var(--u) * 1); background: #000; overflow: hidden; }
.wins.big .win { display: none; } .wins.big .win.on { display: flex; grid-column: 1 / 3; grid-row: 1 / 3; }
.win .pic { position: relative; flex: 1; min-height: 0; background: #000; }
.win .pic > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.win .name { flex: none; display: flex; align-items: center; gap: calc(var(--u) * 1.2); height: calc(var(--u) * 5.4); padding: 0 calc(var(--u) * 1.2); background: var(--c); color: #0b0e14; font-weight: 700; font-size: calc(var(--u) * 3); white-space: nowrap; }
.win .name .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.win .name .by { flex: none; font-size: calc(var(--u) * 2.5); font-weight: 600; }
.win .pic .where { position: absolute; left: 2%; top: 3%; z-index: 1; background: rgba(8, 10, 16, 0.86); color: #fff; font-size: calc(var(--u) * 2.5); font-weight: 600; padding: 0.15em 0.5em; border-radius: 0.3em; white-space: nowrap; }
.win .pic .where:empty { display: none; }
/* what the character is doing, written right below the car in the empty foot of the window: one line, two when it needs them */
.win .pic .act { position: absolute; left: 2%; right: 2%; bottom: 2.5%; z-index: 1; text-align: center; color: #fff; font-weight: 600; line-height: 1.2; text-shadow: 0 0 0.35em #000, 0 0.08em 0 #000, 0 0 0.6em #000; pointer-events: none; }
.win .pic .act:empty { display: none; }
/* private: the window shows a big ? in place of the carriage */
.win .pic .secret { position: absolute; inset: 0; z-index: 4; display: none; align-items: center; justify-content: center; background: #080a10; color: var(--c); font-weight: 800; font-size: calc(var(--u) * 14); line-height: 1; }
.win.private .pic .secret { display: flex; }
/* what is said: a bubble over the one speaking, in their window; two lines at a time, each part held long enough to read */
.win .line { position: absolute; z-index: 2; display: none; max-width: 72%; }
.win .line.on { display: block; }
.win .line span { display: block; background: #fffdf4; color: #14181d; border: calc(var(--u) * 0.35) solid #14181d; border-radius: 0.5em; font-weight: 600; line-height: 1.2; padding: 0.2em 0.55em; }
.win .line b { display: block; font-size: 1em; color: #0b4f8a; }
.side { position: absolute; right: calc(var(--u) * 5); top: calc(var(--u) * 5); width: calc(var(--u) * 37.8); height: calc(var(--u) * 90); display: flex; flex-direction: column; gap: calc(var(--u) * 3); }
.side .lab { display: block; font-size: calc(var(--u) * 2.6); font-weight: 600; color: #cfd6e0; }
.side b { display: block; font-weight: 700; }
.side .clock b { font-size: calc(var(--u) * 9); line-height: 1.2; font-variant-numeric: tabular-nums; }
.side .stop b { font-size: calc(var(--u) * 3.6); line-height: 1.2; min-height: 2.4em; }
/* how to join: the code to scan (an invite into the game's Discord channel), white with its own quiet edge, and the words beside it */
.side .join { flex: none; display: flex; align-items: center; gap: calc(var(--u) * 2); }
.side .join img { flex: none; width: calc(var(--u) * 13); height: calc(var(--u) * 13); background: #fff; border-radius: calc(var(--u) * 0.6); image-rendering: pixelated; }
.side .join b { font-size: calc(var(--u) * 3.6); line-height: 1.2; }
.card #cardqr { display: block; margin: 0 auto calc(var(--u) * 3); width: calc(var(--u) * 28); height: calc(var(--u) * 28); background: #fff; border-radius: calc(var(--u) * 0.8); image-rendering: pixelated; }
.card #cardqr[hidden] { display: none; }
.side .poll { flex: 1; min-height: 0; }
.poll .row { margin-top: calc(var(--u) * 1.4); }
.poll .row .t { display: flex; justify-content: space-between; gap: calc(var(--u) * 1); font-size: calc(var(--u) * 2.8); font-weight: 600; white-space: nowrap; }
.poll .row .t span:first-child { overflow: hidden; text-overflow: ellipsis; }
.poll .row .word { font-size: calc(var(--u) * 2.5); color: #cfd6e0; }
.poll .bar { height: calc(var(--u) * 1.6); background: #232a36; border-radius: calc(var(--u) * 0.8); overflow: hidden; margin-top: calc(var(--u) * 0.4); }
.poll .bar i { display: block; height: 100%; background: var(--c); width: 0; }
/* the cut scene: the railway, the whole picture, over the windows and the side (under the card); the station's name in
   its lower left corner, one line, inside the 5% margin, a line 7% of the picture's height */
.cut { position: absolute; inset: 0; z-index: 10; background: #000; }
.cut[hidden] { display: none; }
.cut img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cut img[hidden], .splash img[hidden] { display: none; }
.cut .cap { position: absolute; left: calc(var(--u) * 5); bottom: calc(var(--u) * 5); max-width: calc(var(--u) * 120); font-size: calc(var(--u) * 5.6); line-height: 1.25; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 0.35em #000, 0 0.06em 0 #000, 0 0 0.8em #000; }
.cut .cap:empty { display: none; }
/* the splash (the opener, while the game is closed or counting down): the game's name in the picture's upper left, one line
   8% of the picture's height, at most 68% of its width, and a line under it at 4.5%; both inside the 5% margin */
/* the splash: the title screen, over the windows and the side (under the card, which is a panel over it while no game is open). The
   title is one line 8% of the picture tall (type 6.4, line 1.25) at most 68% wide, the line under it; the note at the foot inside the 5%
   margin; the words are shaded to read over any picture. */
.splash { position: absolute; inset: 0; z-index: 15; background: #000; }
.splash[hidden] { display: none; }
.splash img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.7)); pointer-events: none; }
.splash .words, .splash .note { position: absolute; left: 16%; width: 68%; text-align: center; color: #fff; z-index: 1; text-shadow: 0 0 0.35em #000, 0 0.06em 0 #000, 0 0 0.8em #000; }
.splash .words { top: calc(var(--u) * 9); }
.splash .words b { display: block; font-size: calc(var(--u) * 6.4); line-height: 1.25; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.splash .words span { display: block; font-size: calc(var(--u) * 3.6); line-height: 1.25; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: calc(var(--u) * 0.6); }
.splash .words span:empty { display: none; }
.splash .note { bottom: calc(var(--u) * 5); font-size: calc(var(--u) * 2.8); line-height: 1.3; font-weight: 600; }
/* the card lies over everything in the windows (their action lines, bubbles and pickers have their own order beneath it);
   over the splash it is a panel in the middle, the railway seen round it */
.card { position: absolute; inset: 0; z-index: 20; background: rgba(8, 10, 16, 0.97); display: grid; place-items: center; }
.card[hidden] { display: none; }
.card .in { max-width: 80%; text-align: center; padding: calc(var(--u) * 3) calc(var(--u) * 4); border-radius: calc(var(--u) * 1.5); }
.card.over { background: transparent; pointer-events: none; }      /* (see-through round the panel: only the panel counts as what is on top) */
.card.over .in { background: rgba(8, 10, 16, 0.86); pointer-events: auto; }
.card h1 { margin: 0; font-size: calc(var(--u) * 9); line-height: 1.1; font-variant-numeric: tabular-nums; }
.card p { margin: calc(var(--u) * 2) 0 0; font-size: calc(var(--u) * 4.4); line-height: 1.25; font-weight: 600; }
.card #cardrows { margin-top: calc(var(--u) * 3); display: grid; gap: calc(var(--u) * 1.2); justify-items: center; }
.card #cardrows div { font-size: calc(var(--u) * 3.4); font-weight: 600; }
.poll[hidden] { display: none; }
.vote .row .t span { white-space: normal; overflow: visible; }
.vote .row .n { display: flex; gap: calc(var(--u) * 4); white-space: pre; font-size: calc(var(--u) * 2.6); font-weight: 600; }
.vote .row .n .up { color: #9be08a; } .vote .row .n .down { color: #ff8a7a; }
.vote .done { margin-top: calc(var(--u) * 1.4); font-size: calc(var(--u) * 3); font-weight: 700; line-height: 1.25; }
/* choosing what to say: the picker covers that player's window, so everyone watching sees the choices: the one talked
   with, large, their name, and the things to say, lettered. The one chosen is lit before the answer comes. */
.win .pick { position: absolute; inset: 0; z-index: 3; display: none; flex-direction: column; gap: 0.35em; padding: 3% 4%; background: #080a10; color: #fff; box-sizing: border-box; }
.win .pick.on { display: flex; }
.win .pick .head { display: flex; align-items: center; gap: 0.6em; font-weight: 700; flex: none; }
.win .pick .head canvas { width: 4.2em; height: 4.2em; image-rendering: pixelated; background: #1a1f2b; border: 0.12em solid var(--c); border-radius: 0.3em; flex: none; }
.win .pick .opt { display: flex; gap: 0.5em; font-weight: 600; line-height: 1.2; padding: 0.15em 0.4em; border: 0.1em solid #4a5561; border-radius: 0.35em; }
.win .pick .opt b { color: var(--c); flex: none; }
.win .pick .opt.on { background: var(--c); color: #0b0e14; border-color: var(--c); } .win .pick .opt.on b { color: #0b0e14; }
.win .pick.tight .head canvas { width: 2.2em; height: 2.2em; }
