/* «Табло» поверх общих стилей FUNBASE */
#game { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.media-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.mp { text-align: left; border: 2px solid transparent; background: var(--surface-2); border-radius: 10px; padding: 10px; cursor: pointer; display: grid; gap: 2px; }
.mp b { font-size: 13px; }
.mp span { font-size: 11.5px; color: var(--muted); }
.mp.active { border-color: var(--accent); }

.tstage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
.side { grid-column: 1; grid-row: 1 / 3; width: 400px; background: var(--surface); border-radius: 14px; padding: 20px; overflow: auto; }
.side h2 { margin: 18px 0 10px; font-size: 17px; }
.side h2:first-child { margin-top: 0; }
.side .modes { grid-template-columns: 1fr 1fr; }
.side .mode span { font-size: 12px; }
.board-area { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.host-panel { grid-column: 3; grid-row: 1 / 3; width: 330px; background: var(--surface); border-radius: 14px; padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.podium { grid-column: 2; grid-row: 2; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Пак в лобби */
.pack-pick .picked { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border: 2px solid var(--accent); border-radius: 12px; padding: 10px; }
.pack-logo { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-3); flex: none; display: grid; place-items: center; font: 900 20px var(--font); color: var(--muted); }
.pack-pick b { display: block; }
.pack-pick .meta-line, .pack-row .meta-line { color: var(--muted); font-size: 12px; }
.pack-search { display: flex; gap: 8px; margin: 10px 0 8px; }
.pack-search input { flex: 1; min-width: 0; }
.pack-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.pack-row { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border: 0; border-radius: 10px; padding: 8px; text-align: left; cursor: pointer; }
.pack-row:hover { background: var(--surface-3); }
.pack-row .pack-logo { width: 40px; height: 40px; font-size: 15px; }
.pack-row .t { font-weight: 700; -webkit-line-clamp: 1; }
.badge.draft { background: var(--warn); color: #111; }
.seat-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Экран */
.screen-box { flex: 1; min-height: 0; position: relative; background: radial-gradient(80% 90% at 50% 30%, #2a0a10 0%, #151417 70%); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.screen-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 16px; text-align: center; }
.big-title { font: 900 clamp(34px, 6vw, 80px)/1 var(--font); text-transform: uppercase; letter-spacing: -.03em; }
.eyebrow-big { color: var(--accent); font: 900 16px/1 var(--font); text-transform: uppercase; letter-spacing: .12em; }
.sub { color: #c9c9cf; font-size: 18px; max-width: 760px; }
.who-line { font-size: 18px; color: #d4d4d8; }
.who-line b { color: #fff; }

/* Табло */
.board { width: 100%; height: 100%; display: grid; gap: 6px; padding: 14px 14px 44px; min-height: 0; }
.board .theme { background: var(--surface); border-radius: 10px; display: flex; align-items: center; padding: 4px 12px; font-weight: 800; font-size: clamp(11px, 1.25vw, 16px); line-height: 1.15; overflow: hidden; min-height: 0; }
.board .cell { border: 2px solid transparent; background: #1f1d24; border-radius: 10px; font: 900 var(--cell-font, clamp(18px, 2.6vw, 38px))/1 var(--font); color: #ffd21f; min-height: 0; cursor: default; display: grid; place-items: center; transition: transform .1s, border-color .15s, background .15s; }
.board .cell.empty { background: #141316; color: transparent; }
.board.can-pick .cell:not(.empty) { cursor: pointer; }
.board.can-pick .cell:not(.empty):hover { border-color: var(--accent); background: #2a1016; transform: scale(1.03); }
.round-themes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 900px; }
.round-themes span { background: var(--surface-2); padding: 8px 14px; border-radius: 99px; font-weight: 700; animation: fadein .4s both; }
.chooser-line { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(17,17,19,.85); padding: 6px 14px; border-radius: 99px; font-size: 14px; white-space: nowrap; }
.chooser-line b { color: var(--accent); }

/* Вопрос */
.q-head { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 10px; font-weight: 800; color: #d4d4d8; z-index: 2; pointer-events: none; }
.q-head .price { color: #ffd21f; font: 900 22px var(--font); }
.q-type { background: var(--accent); color: #fff; font: 900 12px var(--font); text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; }
.q-content { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 54px 24px 24px; min-height: 0; }
.q-text { font: 800 clamp(22px, 3.2vw, 46px)/1.2 var(--font); max-width: 1000px; text-wrap: balance; }
.q-caption { font: 700 clamp(16px, 1.8vw, 24px)/1.2 var(--font); color: #e6e6ea; max-width: 1000px; }
.q-media { max-width: 100%; max-height: 100%; min-height: 0; flex: 1; object-fit: contain; border-radius: 10px; background: #000; }
img.q-media, video.q-media { width: auto; }
.q-html-slot { width: min(100%, 1000px); flex: 1; min-height: 240px; }
.screen-content { position: absolute; inset: 0; display: grid; place-items: center; min-height: 0; }
.html-layer { position: absolute; z-index: 3; }
.html-layer iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #0d0d10; display: block; }
.q-audio { display: grid; place-items: center; gap: 14px; }
.q-audio .note { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.q-audio .note svg { width: 60px; height: 60px; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(224,40,60,.18); } }
.replic { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 80%; background: #fff; color: #111; font-weight: 700; padding: 10px 16px; border-radius: 14px 14px 14px 4px; z-index: 3; animation: fadein .2s; }
.replic::before { content: 'Ведущий: '; color: var(--accent); font-weight: 900; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; width: min(100%, 900px); }
.aopt { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 2px solid transparent; border-radius: 12px; padding: 14px; font: 700 18px var(--font); text-align: left; color: var(--text); }
.aopt .k { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-weight: 900; }
.aopt img { max-height: 90px; border-radius: 6px; }
.aopt.clickable { cursor: pointer; }
.aopt.clickable:hover { border-color: var(--accent); }
.aopt.right { border-color: var(--ok); }
.point-wrap { position: relative; display: inline-block; max-height: 100%; }
.point-wrap img { max-height: 60vh; max-width: 100%; display: block; border-radius: 10px; cursor: crosshair; }
.point-mark { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(0,0,0,.5); }
.point-mark.right { background: var(--ok); }

.answer-box { display: flex; gap: 8px; width: min(100%, 640px); }
.answer-box input { flex: 1; font-size: 18px; padding: 14px; }
.right-answer { font: 900 clamp(24px, 3.4vw, 48px)/1.1 var(--font); color: #fff; }
.right-answer::before { content: 'Ответ'; display: block; font-size: 14px; color: var(--ok); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.results { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 900px; }
.res { background: var(--surface); border-radius: 10px; padding: 8px 12px; border-left: 4px solid var(--muted); text-align: left; }
.res.ok { border-color: var(--ok); }
.res.bad { border-color: var(--accent); }
.res b { display: block; }
.res span { color: var(--muted); font-size: 13px; }
.res .d { font-weight: 900; }
.res.ok .d { color: var(--ok); }
.res.bad .d { color: var(--accent); }

/* Кнопка */
.press-row { display: flex; gap: 12px; align-items: center; }
.timer-bar { flex: 1; height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.timer-bar div { height: 100%; width: 0; background: #fff; border-radius: inherit; }
.timer-bar.low div { background: var(--accent); }
.press-btn { flex: none; width: 260px; height: 62px; border-radius: 14px; border: 0; font: 900 22px var(--font); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); cursor: default; transition: transform .06s, background .15s; }
.press-btn.open { background: var(--accent); color: #fff; cursor: pointer; box-shadow: 0 0 0 0 rgba(224,40,60,.6); animation: glow 1s infinite; }
.press-btn.open:active { transform: scale(.97); }
.press-btn.blocked { background: #3a0d14; color: #ff6b7a; }
.press-btn.me { background: #fff; color: #111; }
@keyframes glow { 70% { box-shadow: 0 0 0 14px rgba(224,40,60,0); } }

/* Подиум */
.ptile { position: relative; width: 150px; background: var(--surface); border-radius: 12px; overflow: hidden; border: 2px solid transparent; transition: border-color .2s, opacity .2s; }
.ptile .cam { aspect-ratio: 4/3; background: #0d0d0f; display: grid; place-items: center; position: relative; }
.ptile video { width: 100%; height: 100%; object-fit: cover; }
.ptile.me video { transform: scaleX(-1); }
.ptile .cam .ava { --s: 64px; }
.ptile .info { padding: 6px 8px; display: grid; gap: 2px; }
.ptile .nm { font-weight: 800; font-size: 13px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ptile .sc { font: 900 22px/1 var(--font); font-variant-numeric: tabular-nums; }
.ptile .sc.neg { color: var(--accent); }
.ptile .tag { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.7); z-index: 1; }
.ptile .tag.chooser { background: #ffd21f; color: #111; }
.ptile .tag.host { background: var(--accent); }
.ptile .mark { position: absolute; top: 6px; right: 6px; font: 900 11px var(--font); padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.7); z-index: 1; }
.ptile.answering { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224,40,60,.35); }
.ptile.tried { opacity: .55; }
.ptile.offline { opacity: .35; }
.ptile.host-tile { width: 170px; border-color: #3a0d14; }
.ptile.flash-ok { border-color: var(--ok); }
.ptile.flash-bad { border-color: var(--accent); animation: shake .4s; }
.ptile .tile-actions { top: auto; bottom: 34px; }
.spectators { width: 100%; text-align: center; color: var(--muted); font-size: 12.5px; }

/* Панель ведущего */
.hp-sec { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.hp-sec h3 { margin: 0; font-size: 12px; }
.hp-right { font-weight: 800; color: var(--ok); }
.hp-right li { margin-bottom: 2px; }
.hp-given { font: 800 18px var(--font); }
.hp-hint { font-size: 12.5px; }
.hp-hint.ok { color: var(--ok); } .hp-hint.bad { color: var(--accent); }
.hp-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-row .btn { flex: 1; }
.btn.ok { background: var(--ok); color: #06200f; }
.btn.ok:hover:not(:disabled) { background: #57e0a6; }
.judge-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 8px; padding: 6px 8px; }
.judge-row .n { flex: 1; min-width: 0; }
.judge-row .n b { display: block; font-size: 13px; }
.judge-row .n span { font-size: 13px; color: #d4d4d8; }
.judge-row button { width: 34px; height: 30px; border-radius: 6px; border: 0; cursor: pointer; font-weight: 900; background: var(--surface-3); color: var(--muted); }
.judge-row button.on.ok { background: var(--ok); color: #06200f; }
.judge-row button.on.bad { background: var(--accent); color: #fff; }
.score-adjust { display: grid; gap: 4px; }
.score-adjust .sa { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.score-adjust .sa span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-adjust .sa button { border: 0; border-radius: 6px; padding: 3px 7px; background: var(--surface-3); cursor: pointer; font-weight: 800; font-size: 12px; }

/* Ставки, финал */
.stake-box { display: grid; gap: 10px; justify-items: center; }
.stake-box .bid { font: 900 44px var(--font); color: #ffd21f; }
.stake-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.stake-ctrl input[type=number] { width: 140px; font-size: 18px; text-align: center; }
.stake-ctrl input[type=range] { width: 260px; }
.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pick-grid .btn { min-width: 120px; }
.final-themes { display: grid; gap: 8px; width: min(100%, 560px); }
.final-themes button { background: var(--surface); border: 2px solid transparent; border-radius: 10px; padding: 12px 16px; font: 800 17px var(--font); color: var(--text); cursor: default; text-align: left; }
.final-themes button.can { cursor: pointer; }
.final-themes button.can:hover { border-color: var(--accent); }
.final-themes button.removed { opacity: .3; text-decoration: line-through; }
.standings { display: grid; gap: 8px; width: min(100%, 520px); counter-reset: s; }
.standings div { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 10px; padding: 10px 14px; counter-increment: s; }
.standings div::before { content: counter(s); font: 900 18px var(--font); color: var(--muted); width: 22px; }
.standings div.win { border: 2px solid #ffd21f; }
.standings .n { flex: 1; font-weight: 800; display: flex; align-items: center; }
.standings .s { font: 900 20px var(--font); }

/* ---------- Планшеты и телефоны: всё в одну колонку ---------- */
@media (max-width: 1100px) {
  #game { height: auto; min-height: 100dvh; }
  .tstage { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
  .side, .host-panel { width: auto; }
  .side { order: 0; }
  .board-area { order: 1; }
  .podium { order: 2; }
  .host-panel { order: 3; overflow: visible; }
  /* Экран растёт по содержимому, а не режет его */
  .screen-box { display: block; min-height: 0; }
  .screen-content { position: relative; inset: auto; min-height: min(62vh, 640px); }
  .qwrap { min-height: min(62vh, 640px); }
  .q-media { max-height: 48vh; }
  .board { min-height: min(62vh, 640px); }
  .press-btn { width: 200px; }
  .ptile { width: 120px; }
}
@media (max-width: 760px) {
  .tstage { padding: 8px 8px 96px; gap: 8px; }
  .side { padding: 16px; border-radius: 12px; }
  .screen-box { border-radius: 12px; }
  .screen-content, .qwrap, .board { min-height: 56vh; }
  .qwrap { padding: 10px 10px 12px; gap: 10px; }
  .q-head .price { font-size: 18px; }
  .q-text { font-size: clamp(19px, 5.4vw, 26px); }
  .q-media { max-height: 40vh; }
  .big-title { font-size: clamp(28px, 9vw, 44px); }
  .sub { font-size: 15px; }
  .screen-inner { padding: 20px 14px; }
  /* Табло: тема отдельной строкой, цены под ней */
  .board { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)) !important; grid-template-rows: none !important;
    grid-auto-rows: auto; align-content: center; gap: 5px; padding: 10px 10px 48px; height: auto; }
  .board .theme { grid-column: 1 / -1; background: none; padding: 8px 2px 0; font-size: 13px; min-height: 0; }
  .board .cell { height: 46px; font-size: 18px !important; border-radius: 8px; }
  .board.can-pick .cell:not(.empty):hover { transform: none; }
  .chooser-line { font-size: 13px; }
  .options { grid-template-columns: 1fr 1fr; gap: 6px; }
  .aopt { padding: 10px; font-size: 15px; gap: 8px; }
  .aopt .k { width: 28px; height: 28px; }
  .answer-box input { font-size: 16px; padding: 12px; }
  .stake-ctrl input[type=range] { width: 100%; }
  .stake-box .bid { font-size: 34px; }
  .right-answer { font-size: clamp(22px, 7vw, 32px); }
  /* Кнопка всегда под пальцем — внизу экрана */
  .press-row { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(17,17,19,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); flex-direction: column-reverse; gap: 8px; }
  .press-row .timer-bar { width: 100%; flex: none; height: 6px; }
  .press-btn { width: 100%; height: 58px; font-size: 20px; }
  /* Игроки — лентой с прокруткой */
  .podium { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .ptile, .ptile.host-tile { width: 104px; flex: none; scroll-snap-align: start; }
  .ptile .cam .ava { --s: 46px; }
  .ptile .sc { font-size: 18px; }
  .ptile .nm { font-size: 12px; }
  .spectators { flex: none; width: auto; align-self: center; padding: 0 8px; white-space: nowrap; }
  .host-panel { padding: 12px; border-radius: 12px; }
  .settings { grid-template-columns: 1fr 1fr; }
  .side .modes { grid-template-columns: 1fr; }
  .pack-list { max-height: 40vh; }
  /* Верхняя панель */
  .topbar .pack-chip, .topbar .status { display: none; }
  .topbar .chip { padding: 6px 9px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
}
@media (max-width: 520px) { .media-pick { grid-template-columns: 1fr; } }

/* Экран вопроса: заголовок, содержимое и поле ответа идут друг под другом и не наезжают */
.qwrap { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; min-height: 0; }
.qwrap .q-head { position: static; }
.qwrap .q-content { flex: 1; padding: 0; min-height: 0; }
.qwrap.no-media .q-content { display: none; }
.qwrap.no-media .q-extra { flex: 1; align-content: center; }
.q-extra { display: grid; justify-items: center; gap: 10px; flex: none; position: relative; z-index: 4; }
/* Показ ответа «точкой» */
.point-reveal { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.point-reveal img { display: block; max-width: 100%; max-height: calc(100vh - 420px); min-height: 200px; border-radius: 10px; }
.point-reveal .pt { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #000; }
.point-reveal .pt.right { border-color: var(--ok); width: 34px; height: 34px; margin: -17px 0 0 -17px; box-shadow: 0 0 0 3px #000, 0 0 24px var(--ok); }
.point-reveal .pt.ok { background: var(--ok); }
.point-reveal .pt.bad { background: var(--accent); }

/* ---------- Камера, громкость, чат ---------- */
#camBtn .on, #camBtn[aria-pressed="true"] .off { display: none; }
#camBtn[aria-pressed="true"] .on { display: block; color: var(--ok); }
#camBtn .off { color: var(--muted); }
#chatBtn { position: relative; }
.badge-dot { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font: 900 10px/16px var(--font); text-align: center; }
.vol-wrap { position: relative; }
.vol-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.vol-pop label { margin-bottom: 10px; font-size: 12.5px; }
.vol-pop label:last-child { margin-bottom: 0; }
.vol-pop input { width: 100%; }
.timer-bar.nolimit div { background: repeating-linear-gradient(90deg, var(--surface-3) 0 12px, #2c2c33 12px 24px); }

.chat { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 340px; height: min(480px, calc(100dvh - 90px)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
.chat-msg { background: var(--surface-2); border-radius: 10px 10px 10px 3px; padding: 6px 10px; max-width: 88%; align-self: flex-start; font-size: 14px; overflow-wrap: anywhere; }
.chat-msg b { display: flex; align-items: center; font-size: 12px; color: var(--accent); }
.chat-msg.mine { align-self: flex-end; background: #3a0d14; border-radius: 10px 10px 3px 10px; }
.chat-msg.mine b { color: #ff9aa6; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; }
.chat-form .btn { padding: 0 14px; }
.appeal-sec { border: 2px solid var(--warn); }
#appealBtn { margin-top: 4px; }

@media (max-width: 760px) {
  .chat { left: 0; right: 0; bottom: 0; width: auto; height: 62dvh; border-radius: 16px 16px 0 0; }
  .chat-form { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  body.chat-open .press-row { display: none; }
  .vol-pop { position: fixed; left: 10px; right: 10px; top: 56px; width: auto; }
  .topbar .logo.small { display: none; }
  .topbar #copyLink { font-size: 0; gap: 4px; }
  .topbar #copyLink b { font-size: 13px; }
  .topbar #copyLink svg { width: 14px; }
  .topbar { gap: 4px; overflow-x: auto; scrollbar-width: none; }
}

@media (max-width: 1100px) {
  /* Жалоба и «выгнать» — по тапу на игрока, иначе закрывают имя */
  .ptile .tile-actions { opacity: 0; pointer-events: none; bottom: auto; top: 4px; right: 4px; flex-direction: column; align-items: flex-end; }
  .ptile.touch .tile-actions { opacity: 1; pointer-events: auto; }
}
.create-modes { margin: 0 0 14px; }
.create-modes .mode { background: var(--surface-2); padding: 12px; }
.create-modes .mode span { font-size: 12.5px; }
@media (max-width: 420px) { .create-modes { grid-template-columns: 1fr 1fr; } .create-modes .mode span { display: none; } }

/* Игрок ушёл из вкладки или окна */
.ptile.away { border-color: var(--warn); box-shadow: 0 0 0 4px rgba(255,176,32,.28); animation: awaypulse 1.6s ease-in-out infinite; }
@keyframes awaypulse { 50% { box-shadow: 0 0 0 8px rgba(255,176,32,.12); } }
.away-badge { position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-80%); z-index: 2; background: var(--warn); color: #1a1000;
  font: 900 11px/1.2 var(--font); text-align: center; border-radius: 8px; padding: 5px 4px; box-shadow: 0 6px 18px rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; }
.away-sec { border: 2px solid var(--warn); }
.away-row { display: grid; gap: 2px; font-size: 13px; }
.away-row span { color: #d4d4d8; }
.away-row .live { font-style: normal; color: var(--warn); font-weight: 800; margin-right: 6px; }
.standings .aw { flex-basis: 100%; order: 3; font-size: 12px; color: var(--warn); font-weight: 700; margin-left: 34px; }
.standings div { flex-wrap: wrap; }
@media (max-width: 760px) { .away-badge { font-size: 10px; padding: 4px; } }

/* Варианты ответа — на всю ширину экрана, а не узким столбиком по центру */
.q-extra > * { max-width: 100%; }
.q-extra .options { justify-self: stretch; width: auto; max-width: 900px; margin: 0 auto; }
.q-extra .answer-box { justify-self: stretch; margin: 0 auto; }
/* Планшет: клетки табло по высоте содержимого, без вытянутых столбов */
@media (max-width: 1100px) and (min-width: 761px) {
  .board { grid-template-rows: none !important; grid-auto-rows: minmax(64px, 96px); align-content: center; }
}
.qwrap > * { min-width: 0; }
.q-extra { width: 100%; }
.q-extra .options { width: 100%; }
.screen-content { grid-template-columns: minmax(0, 1fr); }
.q-extra { grid-template-columns: minmax(0, 1fr); } .q-extra .options { min-width: 0; }

/* Светлая тема: экран с табло остаётся тёмным, остальное — светлое */
:root[data-theme="light"] .screen-box { background: radial-gradient(80% 90% at 50% 25%, #ffd9df 0%, #fff1f3 55%, #fff 100%); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="light"] :is(.sub, .who-line, .q-head, .q-caption) { color: var(--soft); }
:root[data-theme="light"] :is(.who-line b, .right-answer) { color: var(--text); }
:root[data-theme="light"] .board .theme { background: var(--surface-2); }
:root[data-theme="light"] .board .cell { background: #fff; color: var(--accent); box-shadow: 0 4px 12px -6px rgba(0,0,0,.25); }
:root[data-theme="light"] .board .cell.empty { background: rgba(0,0,0,.04); box-shadow: none; }
:root[data-theme="light"] .board.can-pick .cell:not(.empty):hover { background: #ffe9ec; }
:root[data-theme="light"] .chooser-line { background: rgba(255,255,255,.94); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
:root[data-theme="light"] .q-head .price { color: var(--accent); }
:root[data-theme="light"] .replic { box-shadow: 0 6px 20px rgba(0,0,0,.15); }
:root[data-theme="light"] .press-btn.blocked { background: #fde2e5; color: #c0162b; }
:root[data-theme="light"] .press-btn.me { background: var(--text); color: var(--bg); }
:root[data-theme="light"] .timer-bar div { background: var(--text); }
:root[data-theme="light"] .timer-bar.nolimit div { background: repeating-linear-gradient(90deg, var(--surface-3) 0 12px, #cfcfd8 12px 24px); }
:root[data-theme="light"] .stake-box .bid { color: #a86f00; }
:root[data-theme="light"] .standings div.win { border-color: #e0b100; }
:root[data-theme="light"] .ptile.host-tile { border-color: #f3b8c0; }
:root[data-theme="light"] :is(.judge-row .n span, .away-row span) { color: var(--soft); }
@media (max-width: 900px) { :root[data-theme="light"] .press-row { background: rgba(255,255,255,.94); } }
html[lang="en"] .replic::before { content: 'Host: '; }
html[lang="en"] .right-answer::before { content: 'Answer'; }
