:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --border: #e3ddd0;
  --text: #2a2620;
  --muted: #7a7266;
  --accent: #2f6f5e;
  --accent-text: #ffffff;
  --danger: #b3412f;
  --ok: #2f7d4a;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 4px 16px rgba(40, 30, 10, .06);
  --radius: 12px;
  /* seat colours */
  --p0: #d64541;
  --p1: #2f6fd6;
  --p2: #2f9e57;
  --p3: #e0a314;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17191c;
  --surface: #212429;
  --surface-2: #1b1e22;
  --border: #33373e;
  --text: #ece8e0;
  --muted: #9b968c;
  --accent: #5fb39c;
  --accent-text: #0f1a17;
  --danger: #e0705e;
  --ok: #63c28a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --p0: #ef6a62;
  --p1: #5d93f0;
  --p2: #4fc07a;
  --p3: #f2c043;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; }

/* ---------- top bar */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--accent); }
.title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.title h1 { margin: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-icon { font-size: 22px; }
.prefs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pref { display: flex; align-items: center; gap: 4px; }
.pref select { max-width: 210px; }
.clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
select, input[type=text], input:not([type]), .code-input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.conn-banner { background: var(--danger); color: #fff; text-align: center; padding: 6px; font-size: 14px; }

/* ---------- layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 16px 20px; max-width: 1500px; margin: 0 auto; }
.main { min-width: 0; }
.side { width: 320px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .side { width: auto; position: static; max-height: none; }
}

.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.panel { padding: 12px; }
.panel h3, .card h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; width: 100%; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 13px; color: var(--muted); }
.inline { display: inline-flex; gap: 6px; align-items: center; }

.btn {
  border: 1px solid var(--border); background: var(--surface-2); padding: 8px 14px; border-radius: 9px; cursor: pointer;
  font-weight: 500; transition: transform .05s, background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { padding: 12px 18px; font-size: 17px; }
a.btn { display: inline-block; text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-text); }
.btn.danger { border-color: var(--danger); color: var(--danger); }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.chip.waiting { border-color: var(--ok); color: var(--ok); }
.chip.playing { border-color: var(--p3); }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); vertical-align: middle; }
.tag.me { border-color: var(--accent); color: var(--accent); }
.tag.warn { border-color: var(--danger); color: var(--danger); }

/* ---------- lobby */
.room-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.room-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.room-item-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.empty { text-align: center; padding: 24px 0; }
.code-input { text-transform: uppercase; letter-spacing: .15em; width: 140px; font-family: ui-monospace, Consolas, monospace; }
.rules summary { cursor: pointer; font-weight: 600; }
.rules-body { white-space: pre-line; margin-top: 10px; }

/* ---------- waiting room */
.room-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-code b { font-size: 26px; letter-spacing: .2em; font-family: ui-monospace, Consolas, monospace; }
.wait-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); font-weight: 500; }
.wait-status.starting { border-style: solid; border-color: var(--ok); color: var(--ok); font-size: 18px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.room-name { max-width: 320px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 2px solid var(--pc, var(--border)); background: var(--surface-2); }
.slot.empty { border-style: dashed; border-color: var(--border); }
.slot.offline { opacity: .6; }
.slot-body { flex: 1; min-width: 0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--pc, var(--border)); color: #fff; flex: none; }
.slot.empty .avatar { background: transparent; border: 2px dashed var(--border); color: var(--muted); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- side panels */
.plist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plist li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; }
.plist li.turn { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.plist li.gone, .plist li.offline { opacity: .55; }
.plist .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); flex: none; }
.plist .pname { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .pextra { font-variant-numeric: tabular-nums; font-weight: 600; }
.plist .ptz { width: 100%; padding-left: 18px; }
.log { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; font-size: 13px; }
.log li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.log time, .chat-list time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-list { list-style: none; margin: 0 0 8px; padding: 0; height: 220px; overflow: auto; font-size: 13.5px; overflow-wrap: anywhere; }
.chat-list li { padding: 2px 0; }
.chat-list li.sys { color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: 6px; }
.chat-form input { flex: 1; min-width: 0; }

/* ---------- game area */
.turn-banner { text-align: center; font-weight: 600; padding: 8px; margin-bottom: 12px; border-radius: 10px; background: var(--surface); border: 2px solid var(--pc, var(--border)); }
.turn-banner.mine { background: var(--pc); color: #fff; animation: glow 1.5s ease-in-out infinite; }
.turn-banner.hidden { display: none; }
.turn-banner.over { border-color: var(--accent); }
@keyframes glow { 50% { filter: brightness(1.15); } }
.game-root { min-height: 300px; }
.error { color: var(--danger); white-space: pre-wrap; }

/* ---------- overlay */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; padding: 24px; max-width: 520px; width: 100%; text-align: center; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h2 { margin: 4px 0; }
.modal-icon { font-size: 54px; }
.big-text { font-size: 19px; font-weight: 600; }

/* ---------- toasts */
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 10px; box-shadow: var(--shadow); transition: opacity .5s; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; }

/* ---------- reusable game bits */
.die { width: 56px; height: 56px; border-radius: 12px; background: var(--surface); border: 2px solid var(--border); display: inline-grid; place-items: center; font-size: 30px; font-weight: 700; box-shadow: var(--shadow); }
.dice-stage { position: fixed; z-index: 30; display: grid; place-items: center; overflow: hidden; perspective: 900px; background: radial-gradient(closest-side, rgba(0, 0, 0, .32), rgba(0, 0, 0, .1)); border-radius: var(--radius); transition: opacity .18s ease-out; }
.dice-stage.leaving { opacity: 0; pointer-events: none; }
.dice-row { display: flex; gap: 18px; transform: rotateX(-14deg) rotateY(14deg); transform-style: preserve-3d; }
.die3d { width: var(--size); height: var(--size); transform-style: preserve-3d; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .4)); }
.die3d-cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.die3d-face { position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12%; border-radius: 16%; background: linear-gradient(145deg, #fffdf7, #e6dfd0); box-shadow: inset 0 0 0 max(2px, calc(var(--size) * .04)) var(--dc, #cfc6b4); backface-visibility: hidden; }
.die3d-face span { place-self: center; width: 76%; aspect-ratio: 1; border-radius: 50%; }
.die3d-face span.on { background: radial-gradient(circle at 35% 30%, #4a4640, #16140f); }
.die3d-f1 { transform: translateZ(calc(var(--size) / 2)); }
.die3d-f6 { transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); }
.die3d-f2 { transform: rotateY(90deg) translateZ(calc(var(--size) / 2)); }
.die3d-f5 { transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); }
.die3d-f3 { transform: rotateX(90deg) translateZ(calc(var(--size) / 2)); }
.die3d-f4 { transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); }
.sound-btn { flex: none; padding: 4px 8px; font-size: 16px; line-height: 1.2; }
.controls { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }

/* ---------- hero card (portal + game lobby) */
.hero-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 22px; border-radius: 18px; color: #fff; text-decoration: none;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--h1) 90%, #fff) 0%, var(--h1) 35%, var(--h2) 100%);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--h2) 70%, transparent), var(--shadow);
  isolation: isolate; transition: transform .15s, box-shadow .15s;
}
a.hero-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--h2) 80%, transparent), var(--shadow); }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.hc-watermark { position: absolute; right: -18px; bottom: -34px; font-size: 170px; opacity: .14; transform: rotate(-12deg); z-index: -1; pointer-events: none; line-height: 1; }
.hc-head { display: flex; gap: 16px; align-items: center; }
.hc-icon { font-size: 46px; width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 20px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px) rotate(-3deg); } }
.hc-titles { min-width: 0; }
.hc-titles h2 { margin: 0; font-size: 26px; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hc-titles p { margin: 4px 0 0; opacity: .92; }
.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-chips span { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.22); white-space: nowrap; }
.hc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hc-stat { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); min-width: 0; }
.hc-stat b { font-size: 20px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.hc-stat span { font-size: 11.5px; line-height: 1.2; opacity: .85; overflow-wrap: anywhere; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #5dff9b; box-shadow: 0 0 0 0 rgba(93,255,155,.7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(93,255,155,0); } 100% { box-shadow: 0 0 0 0 rgba(93,255,155,0); } }
.hc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hc-champ { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hc-champ .crown { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.hc-champ > span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hc-champ small { font-size: 11.5px; opacity: .85; }
.hc-champ b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-none { font-size: 13px; opacity: .9; font-style: italic; }
.hc-play { padding: 8px 16px; border-radius: 999px; background: #fff; color: color-mix(in srgb, var(--h2) 75%, #000); font-weight: 700; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
a.hero-card:hover .hc-play { background: color-mix(in srgb, #fff 88%, var(--h1)); }
#hero-slot .hero-card { margin-bottom: 4px; }
.hero-card.compact { padding: 18px; gap: 12px; }
.hero-card.compact .hc-titles h2 { font-size: 21px; }
.hero-card.compact .hc-icon { width: 60px; height: 60px; font-size: 36px; border-radius: 16px; }
.hero-card.compact .hc-stat b { font-size: 17px; }
@media (max-width: 520px) {
  .hc-stats { grid-template-columns: repeat(2, 1fr); }
  .hc-titles h2 { font-size: 21px; }
  .hc-icon { width: 60px; height: 60px; font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .hc-icon, .live-dot { animation: none; } }

/* ---------- pill tabs (portal + leaderboard) */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; cursor: pointer; }
.tab:hover { border-color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* ---------- leaderboard */
.lb-card { margin-top: 16px; }
.lb-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lb-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-table .rank { text-align: center; width: 44px; font-weight: 700; font-size: 20px; }
.lb-table .strong { font-weight: 700; }
.lb-table .pl { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 150px; }
.lb-table .pl .tag { margin-left: 0; white-space: nowrap; }
.lb-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.lb-table tr.top1 .lb-avatar { background: #f2c043; border-color: #d9a520; color: #4a3600; }
.lb-table tr.top2 .lb-avatar { background: #c9d1da; border-color: #a9b3bf; color: #2a313a; }
.lb-table tr.top3 .lb-avatar { background: #e0a074; border-color: #c27f50; color: #3e2210; }
.lb-table tr.me td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lb-games { white-space: nowrap; letter-spacing: 2px; }
.rate { display: inline-block; min-width: 58px; padding: 1px 6px; border-radius: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 28%, transparent) var(--rate), transparent var(--rate)); }
.tag.hot { border-color: #e8772e; color: #e8772e; }
.lb-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lb-recent li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.lb-recent li:last-child { border-bottom: 0; }
.lb-recent time { font-variant-numeric: tabular-nums; min-width: 120px; }
.lb-gicon { font-size: 18px; }

/* ---------- seasonal skins (shared/theme.js sets data-season and the colours) */
:root[data-season] body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 4px; background: var(--season-stripe); pointer-events: none; }
.season-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-text); font-weight: 600; text-align: left; box-shadow: var(--shadow); }
.season-banner > span { flex: 1; min-width: 0; }
.season-banner button { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.season-banner button:hover { background: color-mix(in srgb, var(--accent-text) 18%, transparent); }
.season-fx { position: fixed; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; opacity: .35; }
.season-fx span { position: absolute; top: -40px; animation: season-fall linear infinite; }
.season-fx .season-chip { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
@keyframes season-fall { to { transform: translateY(calc(100vh + 80px)) rotate(200deg); } }
body[data-screen="game"] .season-fx, body[data-screen="room"] .season-fx { display: none; }
@media (prefers-reduced-motion: reduce) { .season-fx { display: none; } }
.theme-menu { position: relative; }
.theme-menu summary { list-style: none; cursor: pointer; }
.theme-menu summary::-webkit-details-marker { display: none; }
.theme-panel { position: absolute; right: 0; z-index: 40; display: flex; flex-direction: column; gap: 10px; width: 280px; margin-top: 6px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; }
.theme-panel .pref { flex-direction: column; align-items: stretch; gap: 3px; font-size: 13px; color: var(--muted); }
.theme-panel .pref select { width: 100%; max-width: none; color: var(--text); }
@media (max-width: 520px) { .prefs { gap: 6px 8px; } .prefs > .pref select { max-width: 142px; font-size: 13px; padding-left: 4px; padding-right: 2px; }
  .theme-panel { position: fixed; left: 16px; right: 16px; width: auto; } }

/* ---------- spectators: body[data-role="spectator"], TV mode: body[data-tv] */
.watch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.watch-actions { display: flex; gap: 6px; margin-left: auto; }
.watch-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.watch-wait { align-items: center; text-align: center; }
.watch-code { margin: 0; font-size: 48px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.reveal-panel { margin-top: 14px; }
body[data-role="spectator"] #game-root button { pointer-events: none; }
body[data-tv] .topbar, body[data-tv] .side .chat { display: none; }
body[data-tv] .layout { max-width: none; padding: 16px; grid-template-columns: minmax(0, 1fr) 340px; }
body[data-tv] { font-size: 18px; }
body[data-tv] .turn-banner { font-size: 26px; padding: 12px; }
body[data-tv] .plist, body[data-tv] .log { font-size: 17px; }
body[data-tv] .watch-code { font-size: 96px; }
body[data-tv] .ptz { display: none; }
@media (max-width: 900px) { body[data-tv] .layout { grid-template-columns: minmax(0, 1fr); } }
