/* Headings, buttons and game titles use Fredoka (SIL Open Font License; see assets/fonts). */
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
:root { --display: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, .btn, .hint-big, #winner, .game-card b, .pick-item b, .plan b, .land-steps strong, .logo { font-family: var(--display); }
/* A player's character on a disc of their colour (see js/avatar.js). */
.av { position: relative; flex: none; display: inline-block; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--c, #94a3b8); box-shadow: inset 0 0 0 0.12em rgba(255, 255, 255, 0.85); vertical-align: middle; }
.av i { position: absolute; inset: 14%; background: url("/assets/kenney/characters.png") 0 0 / 900% 300% no-repeat; image-rendering: pixelated; }
:root { --bg: #0b1024; --panel: #1b2347; --well: rgba(8, 12, 30, 0.6); --line: rgba(255, 255, 255, 0.09); --text: #f8fafc; --muted: #a3b0cf; --accent: #ffc83d; --accent-deep: #b97a00; --danger: #f87171; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: radial-gradient(90vmax 70vmax at 8% -10%, rgba(255, 93, 143, 0.2), transparent 60%), radial-gradient(90vmax 80vmax at 108% 112%, rgba(56, 214, 255, 0.18), transparent 60%), linear-gradient(160deg, #0b1024, #1a1446 55%, #0b1024) var(--bg); background-attachment: fixed; color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); }
.screen { position: absolute; inset: 0; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: min(56px, 12.5vw); font-weight: 900; letter-spacing: 0.06em; line-height: 1; color: var(--text); text-decoration: none; }
.logo-name span { color: var(--accent); }
.logo-name { white-space: nowrap; }
.logo-slogan { font-size: max(0.3em, 11px); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.logo.small { font-size: 26px; flex-direction: row; align-items: baseline; gap: 10px; }
.logo.small .logo-slogan { font-size: 0.5em; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; background: var(--accent); color: #0f172a; }
.badge.free { background: #334155; color: var(--text); }
.paywall { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--accent); border-radius: 14px; padding: 12px; }
.paywall h3 { color: var(--accent); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 0; border-radius: 14px; background: linear-gradient(#ffdc73, #ffb81f); color: #1a1300; box-shadow: 0 4px 0 var(--accent-deep); font: inherit; cursor: pointer; }
.plan:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-deep); }
.plan b { font-size: 20px; }
.plan span { font-size: 13px; font-weight: 700; }
.paywall summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.code-form { display: flex; gap: 8px; margin-top: 8px; }
.code-form input { flex: 1; min-width: 0; font: inherit; font-weight: 700; text-transform: uppercase; padding: 10px 12px; border-radius: 10px; border: 2px solid #334155; background: var(--bg); color: var(--text); }
.code-form .btn { padding: 10px 14px; font-size: 15px; }
.card { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.btn { display: inline-block; border: 0; border-radius: 14px; padding: 14px 20px; font: inherit; font-weight: 800; font-size: 18px; text-align: center; text-decoration: none; cursor: pointer; color: var(--text); }
.btn { transition: transform 0.06s ease, box-shadow 0.06s ease; }
.btn.primary { background: linear-gradient(#ffdc73, #ffb81f); color: #1a1300; box-shadow: 0 5px 0 var(--accent-deep), 0 10px 18px rgba(0, 0, 0, 0.3); }
.btn.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-deep); }
.btn.ghost { background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.32); }
.btn.big { font-size: 22px; padding: 18px 28px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chip { background: var(--panel); color: var(--text); border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.banner { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #b45309; color: #fff; padding: 10px 16px; text-align: center; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.banner button { font: inherit; font-size: 14px; font-weight: 800; padding: 6px 14px; border: 0; border-radius: 999px; background: #fff; color: #7c2d12; }
.note { color: var(--accent); font-weight: 600; }
.home button.btn.ghost { width: 100%; max-width: 340px; }
.error { color: var(--danger); min-height: 1.2em; font-weight: 600; }

/* Phone: home and join */
.home { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 20px 24px; overflow-y: auto; text-align: center; }
/* The link to the other language's site: a quiet line at the foot of the page, after everything else. */
.home .lang { order: 99; margin-top: 6px; padding: 10px 16px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 14px; text-decoration: none; }
.home .lang::before { content: "🌐 "; }
.home .tagline { color: var(--muted); max-width: 340px; }
.home .card { width: 100%; max-width: 340px; text-align: center; }
.home label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.home input { font: inherit; font-size: 22px; font-weight: 700; padding: 12px 14px; border-radius: 12px; border: 2px solid #334155; background: var(--bg); color: var(--text); width: 100%; }
.home #code { text-transform: uppercase; letter-spacing: 0.3em; text-align: center; }
.home #name { text-align: center; }
.home .or, .home .hint, .home .credits { color: var(--muted); font-size: 14px; max-width: 340px; }
.home .btn.ghost { width: 100%; max-width: 340px; }
.lobby { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px 28px; overflow-y: auto; text-align: center; }
.lang-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.lang-row select { font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 10px; border: 2px solid #334155; background: var(--bg); color: var(--text); }
.fields label span { min-width: 0; }
.fields label input[type="range"] { flex: 0 0 55%; }
.lobby .next { font-weight: 800; color: var(--accent); }
.vip h3 { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* The leader's remote for the big screen: a controller held sideways. On a
   phone held upright the whole layout is drawn turned a quarter, so it is
   the right way up once the phone is turned. */
.vip { width: 100%; max-width: 380px; text-align: left; }
.leader-panel { gap: 14px; }
.pad-screen { position: fixed; inset: 0; z-index: 35; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px 18px; padding: 12px 18px 16px; background: linear-gradient(160deg, #0b1024, #1a1446 55%, #0b1024); touch-action: none; user-select: none; -webkit-user-select: none; }
@media (orientation: portrait) {
  .pad-screen { inset: auto; top: 0; left: 0; width: 100vh; width: 100dvh; height: 100vw; transform-origin: top left; transform: translateX(100vw) rotate(90deg); }
  .pad-screen .pad-left { padding-bottom: 34px; } /* the Leave button sits in that corner */
}
@media (orientation: landscape) { .pad-screen .pad-top { padding-left: 70px; } }
.pad-top { grid-column: 1 / 3; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pad-top b { font-family: var(--display); font-size: 22px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad-top .muted { flex: 1; font-size: 14px; white-space: nowrap; }
.pad-top .chip { flex: none; font-size: 15px; padding: 10px 16px; }
.pad-left { min-height: 0; min-width: 0; }
.pad-left .ctl-zone.stick, .pad-left .ctl-zone.swipe { background: var(--well); }
.pad-left .ctl-type { background: var(--well); }
.pad-right { position: relative; min-height: 0; }
.pad-btn { position: absolute; border: 0; border-radius: 50%; font-family: var(--display); font-weight: 700; cursor: pointer; touch-action: manipulation; display: grid; place-items: center; text-align: center; line-height: 1.05; padding: 6px; }
.pad-btn.ok { right: 4%; bottom: 6%; width: min(58%, 78vmin); aspect-ratio: 1; max-height: 86%; font-size: 26px; background: linear-gradient(#ffdc73, #ffb81f); color: #1a1300; box-shadow: 0 7px 0 var(--accent-deep), 0 14px 22px rgba(0, 0, 0, 0.35); }
.pad-btn.ok:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--accent-deep); }
.pad-btn.back { left: 2%; top: 4%; width: min(34%, 44vmin); aspect-ratio: 1; max-height: 52%; font-size: 17px; background: #2a3466; color: var(--text); box-shadow: 0 5px 0 #141a3a, 0 10px 16px rgba(0, 0, 0, 0.3); }
.pad-btn.back:active { transform: translateY(3px); box-shadow: 0 2px 0 #141a3a; }
.pick-item { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--well); color: var(--text); border: 3px solid transparent; border-radius: 16px; padding: 6px 6px 10px; font: inherit; cursor: pointer; min-width: 0; }
.pick-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #0b1120; }
.pick-item .badge { position: absolute; top: 12px; right: 12px; margin: 0; font-size: 10px; }
.pick-item.selected { border-color: var(--accent); }
.pick-item b { display: block; padding: 0 6px; font-size: 16px; line-height: 1.15; }
.pick-item span { font-size: 14px; color: var(--muted); }
.fields { display: flex; flex-direction: column; gap: 8px; }
.fields label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fields select { font: inherit; font-weight: 700; padding: 10px 12px; border-radius: 10px; border: 2px solid #334155; background: var(--bg); color: var(--text); min-width: 120px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.people li { display: flex; align-items: center; gap: 8px; background: var(--well); border-radius: 12px; padding: 8px 10px; }
.people .dot { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.people .av { font-size: 15px; }
.people b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .chip { font-size: 13px; padding: 8px 10px; }
.chip.danger { background: #7f1d1d; }
/* Movement controls on the phone (see js/controls.js) */
.ctl { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ctl-types { display: flex; justify-content: center; gap: 6px; }
.ctl-type { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--panel); color: var(--muted); }
.ctl-type.on { background: var(--accent); color: #0f172a; }
.ctl-zone { position: relative; flex: 1; min-height: 0; border-radius: 20px; touch-action: none; user-select: none; -webkit-user-select: none; }
.ctl-zone.stick, .ctl-zone.swipe { background: var(--panel); border: 3px dashed rgba(255, 255, 255, 0.22); overflow: hidden; }
.ctl-hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 13px; font-weight: 700; opacity: 0.55; pointer-events: none; }
.ctl-base { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.3); pointer-events: none; }
.ctl-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--me, var(--accent)); opacity: 0.6; }
.ctl-zone.active .ctl-knob { opacity: 1; }
.ctl-zone.active .ctl-hint { display: none; }
.ctl-arrow { position: absolute; font-size: 34px; color: rgba(255, 255, 255, 0.22); pointer-events: none; }
.ctl-arrow.up { top: 6%; left: 50%; transform: translateX(-50%); }
.ctl-arrow.down { bottom: 16%; left: 50%; transform: translateX(-50%); }
.ctl-arrow.left { left: 6%; top: 50%; transform: translateY(-50%); }
.ctl-arrow.right { right: 6%; top: 50%; transform: translateY(-50%); }
.ctl-zone.four[data-now="0"] .ctl-arrow.up, .ctl-zone.four[data-now="1"] .ctl-arrow.right, .ctl-zone.four[data-now="2"] .ctl-arrow.down, .ctl-zone.four[data-now="3"] .ctl-arrow.left,
.ctl-zone.walk[data-now="1"] .ctl-arrow.right, .ctl-zone.walk[data-now="-1"] .ctl-arrow.left { color: var(--accent); }
.ctl-zone.walk .ctl-arrow.down { display: none; }
.ctl-zone.buttons { display: grid; gap: 8px; }
.ctl-zone.buttons.four { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); max-width: 420px; width: 100%; margin: 0 auto; }
.ctl-zone.buttons.four .up { grid-column: 2; grid-row: 1; }
.ctl-zone.buttons.four .left { grid-column: 1; grid-row: 2; }
.ctl-zone.buttons.four .down { grid-column: 2; grid-row: 2; }
.ctl-zone.buttons.four .right { grid-column: 3; grid-row: 2; }
.ctl-zone.buttons.walk { grid-template-columns: 1fr 0.8fr 1fr; }
.ctl-zone.buttons button { font-size: 38px; border: 0; border-radius: 18px; background: var(--accent); color: #0f172a; touch-action: none; }
.ctl-zone.buttons button.on { filter: brightness(0.75); transform: scale(0.98); }
.ctl-zone.buttons .ctl-jump { background: #38bdf8; }
.fb { position: fixed; z-index: 60; overflow-y: auto; }
.fb .card { width: 100%; max-width: 380px; text-align: left; font-weight: 400; }
.fb label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.fb input, .fb textarea { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 2px solid #334155; background: var(--bg); color: var(--text); width: 100%; resize: vertical; }
.fb .fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb .error.good { color: #4ade80; }
.fb-open { opacity: 0.8; }
.vip-bar { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 14px; color: var(--muted); }
.vip-bar .chip { background: #7f1d1d; }
.vip-bar { padding-left: 84px; }
.leave { position: fixed; top: 8px; left: 8px; z-index: 40; font: inherit; font-size: 12px; font-weight: 700; padding: 6px 10px; border: 0; border-radius: 999px; background: var(--panel); color: var(--muted); opacity: 0.85; }
.leave[hidden] { display: none; }
.leave-confirm { position: fixed; z-index: 60; }
.consent { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; padding: 14px; border-radius: 16px; border: 2px solid #334155; font-size: 13px; line-height: 1.35; text-align: left; color: var(--muted); }
.vote { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.vote-buttons { display: flex; gap: 16px; }
.vote-buttons button { font-size: 34px; line-height: 1; padding: 12px 20px; border: 3px solid transparent; border-radius: 18px; background: var(--panel); }
.vote-buttons button.chosen { border-color: var(--accent); }
.vote-buttons button:disabled:not(.chosen) { opacity: 0.35; }
.consent a, .credits a, .legal a { color: var(--accent); }
.consent-buttons { display: flex; gap: 8px; }
.consent-buttons .btn { flex: 1; font-size: 15px; padding: 10px 12px; }
.legal { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; line-height: 1.5; }
.land { max-width: 720px; margin: 0 auto; padding: 20px 20px 60px; display: flex; flex-direction: column; gap: 34px; line-height: 1.45; }
.land section { display: flex; flex-direction: column; gap: 14px; }
.land h1 { font-size: clamp(30px, 8.5vw, 46px); line-height: 1.12; font-weight: 900; }
.land h2 { font-size: 22px; color: var(--accent); }
.land h3 { font-size: 18px; margin: 0; }
.land p, .land dd, .land li span { color: #cbd5e1; }
.land-sub { font-size: 18px; }
.land-video, .land-games video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #0b1120; display: block; }
.land .btn { text-align: center; }
.land-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.land-steps li { display: flex; gap: 14px; background: var(--panel); border-radius: 16px; padding: 14px; }
.land-steps li > b { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #0f172a; display: grid; place-items: center; font-weight: 900; }
.land-steps li div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.land-steps strong { font-size: 18px; overflow-wrap: anywhere; }
.land-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Both buttons are as tall as the taller one; their text sits in the middle. */
.land-ways .btn { font-size: 15px; padding: 12px 10px; display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.land-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.land-games article { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-radius: 16px; padding: 10px; }
.land-games video { border-radius: 10px; }
.land-games h3 { font-size: 16px; }
.land-games .badge { margin-left: 6px; }
.land-games p { font-size: 13px; line-height: 1.35; }
html { scroll-behavior: smooth; }
.land .plans { max-width: 420px; }
.land .plan { cursor: default; }
.land-faq { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.land-faq dt { font-weight: 800; margin-top: 8px; }
.land-faq dd { margin: 0; }
.land .credits { color: var(--muted); font-size: 14px; text-align: center; }
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal-head .logo.small { flex-wrap: wrap; }
.legal h1 { font-size: 28px; margin: 18px 0 6px; }
.legal h2 { font-size: 19px; margin: 26px 0 6px; color: var(--accent); }
.legal p, .legal li { color: #cbd5e1; }
.legal ul { padding-left: 20px; }
.legal .muted { color: var(--muted); font-size: 14px; }
.vs-table { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }
.vs-table [role="row"] { display: grid; grid-template-columns: 0.55fr 1fr 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.vs-table .vs-head { background: none; border: 0; padding-bottom: 0; font-family: var(--display); font-size: 18px; color: var(--accent); }
.vs-table [role="rowheader"] { font-weight: 800; color: var(--text); }
.vs-table [role="cell"] { color: #cbd5e1; font-size: 15px; line-height: 1.4; }
.vs h1 { line-height: 1.15; }
@media (max-width: 560px) { .vs-table [role="row"] { grid-template-columns: 1fr 1fr; } .vs-table [role="rowheader"] { grid-column: 1 / 3; } .vs-table .vs-head span { display: none; } }
body.page { overflow: auto; position: static; height: auto; }
/* Phone: while the connection is down, cover the whole screen, so nothing stale shows behind the message. */
.phone .banner { bottom: 0; z-index: 70; flex-direction: column; flex-wrap: nowrap; gap: 22px; padding: 24px; background: var(--bg); font-size: 20px; line-height: 1.3; }
.phone .banner::before { content: ""; width: 44px; height: 44px; border-radius: 50%; border: 5px solid #334155; border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.phone .banner button { font-size: 16px; padding: 12px 22px; background: var(--panel); color: var(--text); }
.btn.busy { display: inline-flex; align-items: center; justify-content: center; gap: 10px; opacity: 1; }
.btn.busy::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(15, 23, 42, 0.3); border-top-color: #0f172a; animation: spin 0.9s linear infinite; }
.spinner { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 4px solid #334155; border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.cast-wait { display: flex; align-items: center; gap: 12px; max-width: 340px; text-align: left; font-weight: 700; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.game-root { position: absolute; inset: 0; }
/* The top strip is always kept free: it holds the Leave button (and the leader's bar). */
.game .game-root { top: 44px; }
/* A game played with the phone held sideways: on a phone held upright its
   whole layout is drawn turned a quarter, below the strip with Leave. */
@media (orientation: portrait) {
  .game.sideways .game-root { top: 44px; left: 0; right: auto; bottom: auto; width: calc(100vh - 44px); width: calc(100dvh - 44px); height: 100vw; transform-origin: top left; transform: translateX(100vw) rotate(90deg); }
}
.overlay { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(2, 6, 23, 0.8); text-align: center; }
.overlay .card { width: 100%; max-width: 320px; font-weight: 700; }
.avatar { flex: none; font-size: 62px; line-height: 0; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.rank { font-size: 32px; font-weight: 900; color: var(--accent); }
.game { touch-action: none; }

/* Big screen */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.topbar .spacer { flex: 1; }
.topbar .room { background: rgba(11, 16, 36, 0.8); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 18px; color: var(--text); }
.topbar a.room { text-decoration: none; font-size: 15px; font-weight: 700; }
/* The header holds many chips: keep each on one line, and drop the slogan when the screen is not wide. */
.tv .topbar { gap: 8px; }
.tv .topbar .room { white-space: nowrap; padding: 6px 12px; }
.tv .topbar button.room, .tv .topbar a.room, .tv .topbar #sound-hint { font-size: 14px; }
@media (max-width: 1500px) { .tv .topbar .logo-slogan { display: none; } }
@media (max-width: 1100px) { .tv .topbar #other-site, .tv .topbar #full-btn { display: none; } }
a.chip { text-decoration: none; display: inline-block; }
.topbar button.room { font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.topbar .room b { color: var(--accent); letter-spacing: 0.04em; }
.topbar .sound-hint { color: var(--muted); font-size: 15px; font-weight: 700; }
.topbar .sound-hint[data-state="blocked"] { color: var(--accent); }
.topbar .sound-hint[data-state="off"] { opacity: 0.6; }
/* Chips whose words change have a set width, so the row never moves. */
.topbar #lock-btn { box-sizing: border-box; width: 10em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar #lock-btn[data-state="on"], .topbar #screens-btn[data-state="on"] { color: var(--accent); }
.topbar #code-btn, .topbar #sound-hint { box-sizing: border-box; width: 10.5em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar #sound-hint[data-state="blocked"] { width: auto; }
.topbar #sound-hint { cursor: pointer; font: inherit; font-size: 15px; font-weight: 700; }
.mix-card { right: auto; width: min(420px, 92vw); }
.mix-row { display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; gap: 12px; font-weight: 700; }
.mix-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.small { font-size: 13px; }
/* More screens: a small card under the header, and the watching screen itself. */
.screens-card { position: fixed; top: 58px; right: 16px; z-index: 30; width: min(440px, 92vw); gap: 10px; font-size: 15px; line-height: 1.4; }
.card-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--well); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; }
.card-close:hover { background: rgba(255, 255, 255, 0.16); }
.screens-card { padding-top: 22px; }
.mix-card { padding-top: 46px; }
.screens-card h3 { margin: 0; font-size: 19px; }
.screens-card .note { min-height: 1.3em; }
.watch-show { background: #000; display: grid; place-items: center; }
.watch-show video { width: 100%; height: 100%; object-fit: contain; }
.watch-show #status { position: absolute; left: 0; right: 0; top: 45%; text-align: center; padding: 0 6vw; }
.watch #ask .card { max-width: 380px; }
.watch #ask input { font: inherit; font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3em; text-align: center; padding: 12px; border-radius: 12px; border: 2px solid #334155; background: var(--bg); color: var(--text); width: 100%; }
.watch #ask label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
/* Streamer mode: the ways into the room are not drawn at all (a blur can be
   read through on a sharp stream). A note stands in their place. */
.hide-code #qr, .hide-code #join-url, .hide-code #room-code, .hide-code #room-chip, .hide-code .join-or { visibility: hidden; }
.code-hidden { display: none; }
.hide-code .tv-lobby .join { position: relative; }
.hide-code .code-hidden { display: grid; place-items: center; position: absolute; inset: 9vh 1.3vw 2vh; padding: 2vh; text-align: center; font-family: var(--display); font-size: 2.6vh; line-height: 1.3; color: var(--muted); border: 0.3vh dashed var(--line); border-radius: 2vh; }
/* The lobby: on the left, how to join and who is in; on the right, every game
   as a page of tiles that scrolls. Sizes follow the screen height, so the
   same page reads well on a laptop and on a TV across the room. */
.tv-lobby { display: grid; grid-template-columns: minmax(0, 23vw) minmax(0, 1fr); gap: 1.6vw; height: 100vh; padding: 8.5vh 1.8vw 2vh; overflow: hidden; }
.side { display: flex; flex-direction: column; gap: 1.8vh; min-height: 0; }
.tv-lobby .card { min-height: 0; overflow: hidden; gap: 1vh; padding: 2vh 1.3vw; font-size: 2.2vh; border-radius: 2.6vh; }
.tv-lobby h2 { font-size: 3.2vh; }
.tv-lobby .join { flex: none; align-items: center; text-align: center; gap: 0.7vh; }
.join-title { font-family: var(--display); font-size: 3.4vh; font-weight: 700; }
.join-or { color: var(--muted); font-size: 1.8vh; }
.tv-lobby .people-card { flex: 1; }
.tv-lobby .url { font-size: min(1.6vw, 3vh); font-weight: 800; overflow-wrap: anywhere; line-height: 1.15; }
/* Sized so that even four of the widest letters fit the card in any font. */
.tv-lobby .code { font-family: var(--display); font-size: min(4.2vw, 9vh); font-weight: 700; letter-spacing: 0.12em; text-indent: 0.12em; white-space: nowrap; color: var(--accent); line-height: 1; max-width: 100%; text-shadow: 0 0.5vh 0 rgba(0, 0, 0, 0.35); }
.qr { background: #fff; padding: 1.3vh; border-radius: 1.8vh; line-height: 0; box-shadow: 0 0.8vh 0 rgba(0, 0, 0, 0.3); }
.qr svg { width: min(13vw, 22vh); height: auto; }
.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.8vh; min-height: 0; }
.players li { display: flex; align-items: center; gap: 0.8vh; font-size: 2.1vh; font-weight: 800; background: var(--well); border-radius: 1.2vh; padding: 0.7vh 1vh; min-height: 0; min-width: 0; animation: stage-pop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.players.many { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6vh; }
.players.many li { font-size: 1.7vh; padding: 0.5vh 0.7vh; gap: 0.5vh; }
.players.many small { display: none; }
.players li.more { justify-content: center; color: var(--muted); }
.detail-extra { align-self: flex-start; color: var(--accent); font-weight: 700; font-size: 2.1vh; }
.players li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .av { font-size: 1.6vh; }
.players small { margin-left: auto; font-size: 1.3vh; color: var(--accent); text-transform: uppercase; }
.stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 1vh; min-width: 0; min-height: 0; }
.shelf, .detail { grid-area: 1 / 1; min-height: 0; min-width: 0; }
.shelf { overflow-y: auto; scrollbar-width: none; padding: 0.4vh 1vw 3vh; scroll-padding: 9vh 0 3vh; -webkit-mask-image: linear-gradient(#000 calc(100% - 4vh), transparent); mask-image: linear-gradient(#000 calc(100% - 4vh), transparent); }
.shelf::-webkit-scrollbar { display: none; }
.shelf.behind { visibility: hidden; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2vw; padding: 0 0.2vw 1.6vh; }
.tv-lobby .shelf-head h2 { font-size: 4.4vh; }
.pass-line { color: var(--muted); font-size: 1.9vh; text-align: right; }
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.4vh 1.1vw; }
.game-card { position: relative; display: flex; flex-direction: column; gap: 0.7vh; min-width: 0; padding: 0.8vh 0.8vh 1vh; background: var(--panel); color: var(--text); border: 0.4vh solid transparent; border-radius: 2.2vh; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.game-card:hover { transform: translateY(-0.5vh); }
.game-card.selected { border-color: var(--accent); transform: scale(1.045); z-index: 1; box-shadow: 0 0 0 0.5vh rgba(255, 200, 61, 0.22), 0 1.8vh 4vh rgba(0, 0, 0, 0.55); }
.tile-art { position: relative; aspect-ratio: 16 / 9; border-radius: 1.5vh; overflow: hidden; background: #0b1120; }
.tile-art img, .tile-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-clip { opacity: 0; transition: opacity 0.25s ease; }
.tile-clip.ready { opacity: 1; }
.game-card b { display: block; padding: 0 0.6vh; font-size: 2.5vh; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .badge { position: absolute; top: 1.6vh; right: 1.6vh; margin: 0; font-size: 1.4vh; box-shadow: 0 0.3vh 0.8vh rgba(0, 0, 0, 0.5); }
.game-card small { padding: 0 0.6vh; color: var(--muted); font-size: 1.7vh; }
/* The chosen game's page lies over the grid. */
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.6vw; padding: 2vh 1.3vw; background: var(--panel); border: 1px solid var(--line); border-radius: 2.6vh; box-shadow: 0 1.6vh 5vh rgba(0, 0, 0, 0.45); animation: detail-in 0.22s ease-out; }
@keyframes detail-in { from { transform: scale(0.97); opacity: 0; } }
.detail-media { display: flex; flex-direction: column; gap: 1.2vh; min-height: 0; min-width: 0; }
.detail-back { align-self: flex-start; font-size: 2vh; padding: 0.9vh 1.8vh; background: var(--well); }
.game-preview { flex: none; min-width: 0; width: 100%; aspect-ratio: 16 / 9; max-height: 62vh; object-fit: cover; border-radius: 1.8vh; background: #0b1120; box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.4); }
.game-preview[hidden] { display: none; }
.detail-info { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; min-width: 0; overflow: hidden; }
#detail-name { font-size: 5.2vh; line-height: 1.05; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 1vh; }
.detail-meta span { background: var(--well); border-radius: 999px; padding: 0.4vh 1.4vh; font-size: 1.8vh; font-weight: 700; color: var(--muted); }
#game-desc { font-size: 2.3vh; color: #cbd5e1; line-height: 1.3; }
.settings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9vh; }
.settings li { display: flex; align-items: center; gap: 1vh; font-size: 2.3vh; background: var(--well); border: 0.3vh solid transparent; border-radius: 1.4vh; padding: 0.7vh 1vh 0.7vh 1.6vh; cursor: pointer; }
.settings li.on { border-color: var(--accent); }
.settings li span { flex: 1; min-width: 0; }
.settings li b { min-width: 8vh; text-align: center; white-space: nowrap; }
.opt-step { flex: none; width: 4vh; height: 4vh; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text); font-size: 2.6vh; line-height: 1; cursor: pointer; }
.opt-step.prev::before { content: "‹"; }
.opt-step.next::before { content: "›"; }
.detail .paywall { gap: 1vh; padding: 1.4vh; border-radius: 1.6vh; font-size: 1.9vh; }
.detail .paywall h3 { margin: 0; font-size: 2.4vh; }
.detail .plan { padding: 1.2vh 0.6vh; border-radius: 1.4vh; }
.detail .plan b { font-size: 2.6vh; }
.detail .plan span { font-size: 1.6vh; }
.detail .code-form { margin: 0; }
.detail .code-form input, .detail .code-form .btn { font-size: 1.8vh; padding: 0.9vh 1.2vh; border-radius: 1.2vh; }
.detail .note { font-size: 1.8vh; }
#screen-start { margin-top: auto; font-size: 3.2vh; padding: 1.8vh; border-radius: 1.8vh; }
#screen-start.on:not(:disabled) { outline: 0.4vh solid #fff; outline-offset: 0.4vh; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.025); } }
.hint-big { font-size: 2.8vh; font-weight: 800; color: var(--accent); line-height: 1.2; }
#start-hint { text-align: center; min-height: 3.4vh; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tv #screen-end > :not(.confetti) { position: relative; }
.tv-game { background: #dff6f5; }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tv #screen-end { height: 100vh; overflow: hidden; gap: 1.4vh; padding: 9vh 4vw 2.5vh; }
.tv #screen-end h2 { font-size: 3vh; }
.end-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1.2vh 3vh; }
.end-actions { display: flex; gap: 1.6vh; }
.end-actions .btn { font-size: 2.2vh; padding: 1vh 2.6vh; border-radius: 1.4vh; }
.results { list-style: none; padding: 0; margin: 0; width: min(70vh, 90vw); display: flex; flex-direction: column; gap: 0.9vh; min-height: 0; }
.results.two { width: min(120vh, 92vw); display: grid; grid-template-columns: 1fr 1fr; }
/* The podium: the best three, rising one after another. */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vh; height: 30vh; flex: none; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 0.8vh; width: 20vh; font-size: 4.2vh; animation: rise 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.podium .step b { font-family: var(--display); font-size: 2.6vh; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .block { width: 100%; border-radius: 1.4vh 1.4vh 0 0; background: var(--panel); border-top: 0.8vh solid var(--c); color: var(--muted); font-family: var(--display); font-size: 5vh; font-weight: 700; display: grid; place-items: center; height: 7vh; box-shadow: inset 0 -3vh 4vh rgba(0, 0, 0, 0.25); }
.podium .rank1 { font-size: 6vh; animation-delay: 0.5s; }
.podium .rank1 .block { height: 14vh; color: var(--accent); }
.podium .rank2 { animation-delay: 0.25s; }
.podium .rank2 .block { height: 10vh; }
.podium .rank1 .av { animation: bob 1.2s ease-in-out 1.2s infinite; }
@keyframes rise { from { transform: translateY(40vh); opacity: 0; } }
.results li { display: flex; align-items: center; gap: 1.4vh; background: var(--panel); border: 1px solid var(--line); border-radius: 1.4vh; padding: 0.6vh 1.8vh; font-size: 2.5vh; font-weight: 800; min-width: 0; }
.results li span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .place { width: 4.5vh; color: var(--muted); }
.results .score { margin-left: auto; }
#winner { font-size: min(6vw, 9vh); color: var(--accent); line-height: 1.1; text-shadow: 0 0.6vh 0 rgba(0, 0, 0, 0.35); }
/* A phone or narrow window used as the big screen: one column, and the whole page scrolls. */
@media (max-width: 900px) {
  .tv-lobby { grid-template-columns: 1fr; height: auto; overflow-y: auto; position: absolute; inset: 0; }
  .tv-lobby .card { overflow: visible; }
  .stage { display: flex; flex-direction: column; }
  .shelf { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .shelf.behind { display: none; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; }
  .qr svg { width: min(46vw, 22vh); }
  .tv-lobby .url { font-size: 3vh; }
  .tv-lobby .code { font-size: 8vh; }
}

/* Buttons set their own font shorthand above, so the display font is named again here. */
.btn, .plan b, .chip { font-family: var(--display); }

a.badge { text-decoration: none; }

.mix-row select { min-height: 36px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--well); color: inherit; font: inherit; }
.mix-note { margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }

.detail-how { margin: 0; font-size: 2.2vh; line-height: 1.35; color: var(--muted); }
.detail-how b { display: block; font-size: 1.5vh; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* The shelves above the grid of games. */
.kinds { display: flex; flex-wrap: wrap; gap: 1vh; padding: 0 0.2vw 1.6vh; }
.kinds[hidden] { display: none; }
.kind { border: 0; border-radius: 999px; padding: 0.7vh 1.8vh; background: var(--well); color: var(--muted); font: inherit; font-size: 2vh; font-weight: 700; cursor: pointer; }
.kind.on { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.kinds.focus .kind.on { background: var(--accent); color: #0f172a; box-shadow: 0 0 0 0.5vh rgba(255, 200, 61, 0.28); }
.kinds-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5vw; }
.find { flex: none; width: 22vh; margin-bottom: 1.6vh; padding: 0.7vh 1.8vh; border-radius: 999px; border: 2px solid transparent; background: var(--well); color: var(--text); font: inherit; font-size: 2vh; font-weight: 700; }
.find::placeholder { color: var(--muted); }
.find:focus { outline: none; border-color: var(--accent); }
.find.none { border-color: #ef4444; }
.find-phone { width: 100%; min-height: 46px; margin-bottom: 10px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--well); color: var(--text); font: inherit; }

/* --- The lobby's bold look (the owner's choice, 28 November 2026). ---
   The join panel is a ticket in the accent colour, the headings are loud
   and the stage has a soft sunburst. ?look=plain shows the plainer look. */
/* The rays are for the big screen only: on a phone and on the pages they look busy. */
.look-bold:not(.phone):not(.page) { background: #0b1024 repeating-conic-gradient(from 0deg at 12% 30%, rgba(255, 200, 61, 0.05) 0deg 6deg, transparent 6deg 12deg); }
.look-bold .tv-lobby .join { position: relative; overflow: visible; background: var(--accent); color: #10142b; border-radius: 3vh; box-shadow: 0 1.2vh 0 #b98207, 0 3vh 5vh rgba(0, 0, 0, 0.45); transform: rotate(-1.2deg); padding-bottom: 2.4vh; }
.look-bold .tv-lobby .join-title { font-family: var(--display); font-size: 4vh; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; color: #10142b; }
.look-bold .tv-lobby .join-or { color: rgba(16, 20, 43, 0.72); font-weight: 700; }
.look-bold .tv-lobby .url { color: #10142b; }
.look-bold .qr { box-shadow: 0 0.8vh 0 rgba(16, 20, 43, 0.35); border-radius: 2.2vh; }
/* The perforation of the ticket, with a notch on each edge. */
.look-bold .tv-lobby .join .url { padding-bottom: 1.6vh; margin-bottom: 0.6vh; width: 100%; border-bottom: 0.45vh dotted rgba(16, 20, 43, 0.45); }
.look-bold .tv-lobby .code { color: #10142b; text-shadow: 0 0.5vh 0 rgba(255, 255, 255, 0.35); font-size: min(4.8vw, 10vh); }
.look-bold .tv-lobby .code-hidden { color: #10142b; }
.look-bold .tv-lobby .shelf-head h2 { font-size: 6vh; line-height: 1; text-transform: uppercase; letter-spacing: 0.01em; -webkit-text-stroke: 0; text-shadow: 0.5vh 0.5vh 0 rgba(255, 200, 61, 0.9); }
.look-bold .tv-lobby .people-card { border: 0.4vh solid var(--line); }
.look-bold .game-card { border-radius: 2.6vh; background: #151b3d; }
.look-bold .game-card b { font-size: 2.3vh; text-transform: uppercase; letter-spacing: 0.01em; }
.look-bold .game-card.selected { border-color: var(--accent); box-shadow: 0.8vh 0.8vh 0 var(--accent), 0 1.8vh 4vh rgba(0, 0, 0, 0.55); transform: scale(1.045) rotate(-0.8deg); }
.look-bold .kind.on { background: var(--accent); color: #10142b; box-shadow: none; }
.look-bold .kinds.focus .kind.on { box-shadow: 0 0 0 0.6vh rgba(255, 255, 255, 0.35); }
.look-bold .detail h1 { text-transform: uppercase; text-shadow: 0.5vh 0.5vh 0 rgba(255, 200, 61, 0.9); }

/* The bold look beyond the lobby: the results, the phone and the pages. */
.look-bold #winner { text-transform: uppercase; letter-spacing: 0.01em; text-shadow: 0.6vh 0.6vh 0 rgba(255, 255, 255, 0.2); }
.look-bold.phone .home #join-form { background: var(--accent); color: #10142b; border-radius: 26px; box-shadow: 0 9px 0 #b98207, 0 22px 34px rgba(0, 0, 0, 0.45); transform: rotate(-1deg); }
.look-bold.phone .home #join-form h2 { text-transform: uppercase; font-size: 26px; color: #10142b; }
.look-bold.phone .home #join-form label { color: rgba(16, 20, 43, 0.78); font-weight: 700; }
.look-bold.phone .home #join-form .btn.primary { background: #10142b; color: #fff; box-shadow: 0 5px 0 #000, 0 10px 18px rgba(0, 0, 0, 0.3); }
.look-bold.phone .home #join-form .note { color: #10142b; }
.look-bold.phone #lobby-in, .look-bold.phone #screen-end > h2 { text-transform: uppercase; letter-spacing: 0.01em; }
.look-bold.phone #end-rank { text-transform: uppercase; text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.2); }
.look-bold.page .land h1 { text-transform: uppercase; letter-spacing: 0.005em; text-shadow: 4px 4px 0 rgba(255, 200, 61, 0.9); }

/* The game suggested for the people in the room. */
.pick-tag { position: absolute; left: 1vh; bottom: 1vh; z-index: 2; padding: 0.4vh 1.2vh; border-radius: 999px; background: var(--accent); color: #10142b; font-family: var(--display); font-style: normal; font-size: 1.7vh; text-transform: uppercase; letter-spacing: 0.03em; box-shadow: 0 0.4vh 0 rgba(0, 0, 0, 0.45); transform: rotate(-3deg); }

/* Pages on a phone: the logo and the link to the other language's site stay on one row. */
@media (max-width: 560px) {
  .legal-head { flex-wrap: nowrap; }
  .legal-head .logo.small .logo-slogan { display: none; }
  .legal-head .chip { flex: none; padding: 8px 12px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 13px; text-decoration: none; }
  .legal-head .chip::before { content: "🌐 "; }
}

/* The big screen opened on a phone-sized screen: only the notice shows. */
.too-small { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 28px 22px; text-align: center; background: var(--bg); overflow-y: auto; }
.too-small[hidden] { display: none; }
.too-small h1 { font-size: 26px; line-height: 1.15; }
.too-small p { margin: 0; max-width: 340px; font-size: 16px; line-height: 1.4; }
.too-small .btn { width: 100%; max-width: 340px; }
.too-small-screen > header, .too-small-screen > main, .too-small-screen > .card { display: none !important; }

/* A phone cannot host (see .too-small): its start page offers no button for it, only the hint. */
@media (max-width: 767px), (max-height: 479px) {
  .home #host-link, .home .or { display: none; }
  .home [data-i18n="home.host_hint"] { margin-top: 14px; }
}

/* "Full screen" sits next to Leave while the phone is not full screen. */
.go-full { left: auto; right: 8px; background: var(--accent); color: #10142b; opacity: 1; }
.can-full .vip-bar { padding-right: 112px; }
@media (orientation: portrait) { .can-full .pad-screen .pad-top { padding-left: 44px; } }
@media (orientation: landscape) { .can-full .pad-screen .pad-top { padding-right: 116px; } }

/* The leader's menu: everything is as wide as the panel, with room between the parts. */
.leader-panel > .btn, .leader-panel #invite, .leader-panel #lobby-start, .leader-panel .find-phone { width: 100%; box-sizing: border-box; }
.leader-panel .step { display: flex; flex-direction: column; gap: 12px; }
.leader-panel .step[hidden] { display: none; }
.leader-panel .step h3 { margin: 6px 0 0; }
.leader-panel .find-phone { margin: 0; }
.leader-panel .fields { gap: 12px; }
.fields .switch-row input { width: 26px; height: 26px; accent-color: var(--accent); flex: none; }
.fields label select { flex: 0 0 55%; min-width: 0; }

/* The controller drawn turned on an upright phone: Leave and Full screen read the same way as the rest. */
@media (orientation: portrait) {
  .pad-on .leave { writing-mode: vertical-rl; top: 8px; left: auto; right: 8px; padding: 10px 6px; }
  .pad-on .go-full { top: auto; bottom: 8px; }
  .pad-on .pad-screen .pad-top { padding-left: 70px; }
  .can-full.pad-on .pad-screen .pad-top { padding-left: 70px; padding-right: 116px; }
}
