/* ===== base.css — праздничный зимний фон, гирлянда, ёлка, снег, HUD, кнопки, footer ===== */
:root {
  --bg-deep: #060a20;
  --bg: #0a1030;
  --bg-2: #131a44;
  --panel: rgba(18, 26, 60, 0.78);
  --panel-2: rgba(30, 40, 86, 0.6);
  --border: rgba(150, 180, 255, 0.22);
  --border-strong: rgba(170, 200, 255, 0.5);
  --text: #eef3ff;
  --text-muted: #aab4dc;
  --accent: #5ad7ff;       /* зимний циан */
  --accent-2: #b388ff;     /* фиолет */
  --accent-3: #ffd166;     /* золото */
  --good: #4ade80;
  --wrong: #ff5d73;
  --warn: #ffb454;
  --red: #e23b3b;
  --green: #2ec866;
  --shadow: 0 10px 40px rgba(0, 6, 28, 0.6);
  --radius: 18px;
  --radius-sm: 12px;
  --hud-h: 52px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Базовый кегль привязан К ШИРИНЕ И ВЫСОТЕ экрана: min(1.5vw, 1.9vh).
   Так на 2K/4K мониторах интерфейс не разбухает и весь сайт влезает без прокрутки,
   а телефон остаётся компактным (пол 16px). Кап 24px. */
html { -webkit-text-size-adjust: 100%; font-size: clamp(16px, min(1.5vw, 1.9vh), 24px); }
body {
  margin: 0;
  font-family: 'Comfortaa', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(1200px 800px at 80% -10%, rgba(91, 70, 255, 0.20), transparent 60%),
    radial-gradient(1000px 700px at 10% 110%, rgba(0, 200, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #060a20 0%, #0a1030 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.app-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: calc(var(--hud-h) + 16px) 20px 18px;
}
/* На 2K/широких мониторах используем больше ширины — выше клетки доски */
@media (min-width: 1700px) { .app-main { max-width: 1720px; } }

/* ===== Праздничный фон ===== */
.festive-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; animation: auroraShift 16s ease-in-out infinite; }
.aurora-1 { width: 620px; height: 620px; top: -140px; right: -120px;
  background: radial-gradient(circle, rgba(90,215,255,0.5), transparent 65%); }
.aurora-2 { width: 560px; height: 560px; top: -60px; left: -140px;
  background: radial-gradient(circle, rgba(179,136,255,0.45), transparent 65%); animation-delay: -8s; }
@keyframes auroraShift { 0%,100% { transform: translate(0,0) scale(1); opacity: 0.45; } 50% { transform: translate(20px, 30px) scale(1.1); opacity: 0.6; } }

/* Снег — 3 слоя */
.snow { position: absolute; inset: -10% 0 0 0; background-repeat: repeat; pointer-events: none; }
.snow-1 {
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 90px 120px, #eaf3ff, transparent),
    radial-gradient(1px 1px at 160px 80px, #fff, transparent),
    radial-gradient(2px 2px at 230px 200px, #fff, transparent);
  background-size: 260px 260px;
  animation: snowFall 14s linear infinite;
}
.snow-2 {
  background-image:
    radial-gradient(3px 3px at 40px 60px, #fff, transparent),
    radial-gradient(2px 2px at 200px 140px, #d8e8ff, transparent),
    radial-gradient(3px 3px at 120px 220px, #fff, transparent);
  background-size: 340px 340px; opacity: 0.7;
  animation: snowFall 22s linear infinite;
}
.snow-3 {
  background-image: radial-gradient(1px 1px at 50px 90px, #cfe0ff, transparent);
  background-size: 180px 180px; opacity: 0.5;
  animation: snowFall 9s linear infinite;
}
@keyframes snowFall { from { transform: translateY(-200px); } to { transform: translateY(260px); } }

.shooting-star { position: absolute; top: 14%; left: -8%; width: 2px; height: 2px; background: #fff;
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.85); animation: shoot 8s linear infinite; }
.shooting-star.s2 { top: 42%; animation-delay: 4s; animation-duration: 10s; }
@keyframes shoot {
  0% { transform: translate(0,0) rotate(18deg); opacity: 0; }
  6% { opacity: 1; }
  22% { transform: translate(620px, 220px) rotate(18deg); opacity: 0; }
  100% { opacity: 0; }
}

/* Снег на земле (волнистый низ) */
.ground-snow { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(220, 235, 255, 0.18) 60%, rgba(220, 235, 255, 0.35));
  border-radius: 50% 50% 0 0 / 60px 60px 0 0; }
.ground-snow::before { content: ''; position: absolute; left: -5%; right: -5%; bottom: -10px; height: 60px;
  background: radial-gradient(60px 30px at 20% 100%, rgba(230,245,255,0.4), transparent 60%),
    radial-gradient(70px 34px at 60% 100%, rgba(230,245,255,0.4), transparent 60%),
    radial-gradient(50px 26px at 90% 100%, rgba(230,245,255,0.4), transparent 60%); }

@media (prefers-reduced-motion: reduce) {
  .snow, .shooting-star, .aurora { animation: none !important; }
}

/* ===== Гирлянда с лампочками (кликабельные! мин. тач-таргет через padding) ===== */
.garland {
  position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 40;
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px; pointer-events: none;
}
.garland .bulb {
  position: relative; width: 13px; height: 13px; border-radius: 50%;
  box-shadow: 0 0 8px 2px var(--c, #fff);
  background: var(--c, #fff); opacity: 0.55;
  animation: bulbBlink 2.4s ease-in-out infinite;
  pointer-events: auto; cursor: pointer;
  padding: 0; border: 0;
  transition: transform .15s ease, box-shadow .2s ease;
}
/* Провод-хвостик над лампочкой */
.garland .bulb::before {
  content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 6px;
  margin-left: -1px; background: rgba(20,28,58,0.9); border-radius: 1px;
}
/* Расширенная зона клика (тач-таргет ≥44px) без изменения вида */
.garland .bulb::after {
  content: ''; position: absolute; inset: -16px; border-radius: 50%;
}
.garland .bulb:hover { opacity: 1; transform: scale(1.35); filter: brightness(1.2); }
.garland .bulb:active { transform: scale(0.85); }
/* Вспышка при клике (класс .bulb-pop вешает effects.js) */
.garland .bulb.bulb-pop {
  animation: bulbPop .52s ease;
  opacity: 1;
  box-shadow: 0 0 18px 7px var(--c, #fff);
}
@keyframes bulbPop {
  0% { transform: scale(1); filter: brightness(1); }
  25% { transform: scale(2.1); filter: brightness(1.9); }
  55% { transform: scale(0.8); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes bulbBlink { 0%,100% { opacity: 0.35; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.15); } }

/* ===== Ёлка (декор старта — в screens.css) ===== */

/* ===== Footer (sticky bottom) ===== */
.app-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 10px 16px 14px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(6, 10, 32, 0.88));
}

/* ===== HUD ===== */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--hud-h);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 0;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.92rem; max-width: 56vw; backdrop-filter: blur(8px); }
.hud-avatar { font-size: 1.15rem; }
.hud-profile-text { display: flex; flex-direction: column; line-height: 1.15; }
.hud-profile-text b { font-size: 1rem; }
.hud-profile-text i { font-style: normal; font-size: 0.78rem; color: var(--text-muted); }
.hud-spacer { flex: 1 1 auto; }
/* Чип счёта команд «Дети vs Родители» */
.hud-teams { gap: 10px; font-weight: 700; }
.hud-teams .ht { display: inline-flex; align-items: center; gap: 4px; font-size: 0.95rem; white-space: nowrap; }
.hud-teams .ht b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hud-teams .ht-kids b { color: var(--good); }
.hud-teams .ht-parents b { color: var(--accent-3); }
.hud-teams .ht-sep { opacity: 0.45; }
/* 🔥 чип серии верных ответов команды */
.ht-streak {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #ff9f1c, #ff4d67); color: #fff;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255, 77, 103, 0.45);
  animation: streakPulse 1.6s ease-in-out infinite;
}
@keyframes streakPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .ht-streak { animation: none; } }
.hud-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-size: 1.2rem; cursor: pointer; transition: transform .12s ease, border-color .2s, background .2s;
}
.hud-btn:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.hud-btn:active { transform: translateY(1px); }
.hud-btn.off { opacity: 0.4; }

/* ===== Экраны ===== */
.screen { display: none; animation: levelIn .4s ease both; }
.screen.active { display: block; }
@keyframes levelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== Кнопки ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 1.05rem; color: #06121f;
  background: linear-gradient(90deg, var(--accent-3), #ffe07a 50%, var(--accent));
  background-size: 200% auto; box-shadow: 0 8px 24px rgba(255, 209, 102, 0.35);
  transition: transform .12s ease, filter .2s, background-position .6s;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: skewX(-20deg);
}
.btn-primary:hover { filter: brightness(1.08); background-position: right center; }
.btn-primary:active { transform: translateY(2px); }
.btn-primary:hover::after { animation: shine .9s ease; }
@keyframes shine { to { left: 130%; } }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 1rem; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border);
  transition: transform .12s ease, border-color .2s, background .2s;
  text-decoration: none;
}
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--border-strong); background: rgba(40, 54, 110, 0.6); }
.btn-ghost:active { transform: translateY(1px); }
.btn-big { font-size: 1.3rem; padding: 15px 40px; }

/* Единый класс экшн-кнопок — одинаковые */
.loc-action-btn {
  flex: 1; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  transition: transform .12s ease, filter .2s, border-color .2s, background .2s;
}
.loc-action-btn:hover { transform: translateY(-1px); filter: brightness(1.08); border-color: var(--border-strong); }
.loc-action-btn:active { transform: translateY(1px); }
.loc-action-btn.primary { background: linear-gradient(90deg, var(--accent-3), var(--accent)); color: #06121f; border: 0; }
.loc-action-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ===== Тосты ===== */
#toastLayer { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 12px 22px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); font-size: 1.05rem; max-width: 92vw;
  animation: toastIn .3s ease both;
}
.toast.good { border-color: rgba(74,222,128,0.6); }
.toast.bad { border-color: rgba(255,93,115,0.6); }
.toast.gold { border-color: rgba(255,209,102,0.7); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== Утилиты ===== */
.text-sm { font-size: 0.84rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }

.screen-title { font-size: clamp(1.6rem, min(3.4vw, 5vh), 2.4rem); font-weight: 700; margin: 0 0 8px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.screen-sub { color: var(--text-muted); margin: 0 0 14px; font-size: 1.05rem; }

/* Модалки */
.modal { position: fixed; inset: 0; z-index: 150; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 6, 18, 0.74); backdrop-filter: blur(6px); }
.modal.open { display: flex; animation: levelIn .25s ease; }
.modal-card {
  width: 100%; max-width: 860px; max-height: 86vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative;
}
.modal-card h3 { margin: 0 0 12px; font-size: 1.3rem; color: var(--accent); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 0.95rem; }
.modal-x:hover { border-color: var(--border-strong); }

/* Скроллбар */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(150,180,255,0.25); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(150,180,255,0.45); }

/* ===== ПОЛНОЭКРАННЫЙ РЕЖИМ ВОПРОСА (для проектора/доски) =====
   body.q-fullscreen: карточка вопроса растягивается на весь экран,
   HUD/гирлянда/фон скрываются. Управление: кнопка «⛶» или клавиша F, выход — Esc. */
body.q-fullscreen .hud,
body.q-fullscreen .garland,
body.q-fullscreen .app-footer,
body.q-fullscreen .festive-bg { display: none !important; }
body.q-fullscreen .app-main { max-width: none; padding: 0; }
body.q-fullscreen #screen-question .question-wrap {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 300;
  max-width: none; max-height: none; margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
  padding: clamp(18px, 3vw, 44px) clamp(16px, 4vw, 64px) 40px;
  overflow-y: auto;
  animation: fsIn .28s ease both;
}
@keyframes fsIn { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }
body.q-fullscreen #screen-question .q-question { font-size: clamp(1.7rem, min(3vw, 5vh), 3rem); }
body.q-fullscreen #screen-question .pz-opt { font-size: clamp(1.05rem, min(1.8vw, 3vh), 1.9rem); padding: 15px 22px; }
/* Кнопка полноэкранного режима */
.btn-fs { margin-left: auto; }
.btn-fs svg { width: 1.05em; height: 1.05em; }

/* ===== ПОЛНОЭКРАННЫЙ РЕЖИМ ДОСКИ (для проектора/доски) =====
   body.board-fullscreen: доска растягивается на весь экран,
   HUD/гирлянда/фон скрываются. Управление: кнопка «⛶» или клавиша B, выход — Esc. */
body.board-fullscreen .hud,
body.board-fullscreen .garland,
body.board-fullscreen .app-footer,
body.board-fullscreen .festive-bg { display: none !important; }
body.board-fullscreen .app-main { max-width: none; padding: 0; }
body.board-fullscreen #screen-board .board-wrap {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 300;
  max-width: none; margin: 0; border-radius: 0;
  border-left: 0; border-right: 0; border-top: 0; border-bottom: 0;
  padding: clamp(18px, 3vw, 44px) clamp(16px, 4vw, 64px) clamp(14px, 2vw, 30px);
  overflow-y: auto;
  display: flex; flex-direction: column;
  animation: fsIn .28s ease both;
}
body.board-fullscreen .board-mascot { display: none; } /* больше места доске */
body.board-fullscreen .board-info .b-grade { font-size: clamp(1.4rem, min(2.4vw, 3.6vh), 2.2rem); }
body.board-fullscreen .board-info .b-students { font-size: clamp(1rem, min(1.5vw, 2.2vh), 1.4rem); }
body.board-fullscreen .board-progress { margin-bottom: clamp(10px, 1.4vw, 18px); }
body.board-fullscreen .bp-bar { height: clamp(10px, 1.3vw, 16px); }
body.board-fullscreen .bp-text { font-size: clamp(0.95rem, min(1.4vw, 2vh), 1.3rem); }
body.board-fullscreen .jeopardy-grid {
  flex: 1 1 0%;        /* база 0 + min-height:0 — grid строго вписывается в высоту, ряды сжимаются */
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
  grid-template-rows: auto repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  overflow: hidden;
}
body.board-fullscreen .jcell { aspect-ratio: auto; font-size: clamp(2rem, min(4.4vw, 7vh), 5rem); }
body.board-fullscreen .jcell .pts-label { font-size: clamp(0.85rem, min(1.2vw, 1.8vh), 1.3rem); }
body.board-fullscreen .jcat-head { font-size: clamp(1rem, min(1.9vw, 3.2vh), 2rem); padding: clamp(10px, 1.4vw, 18px) 10px; }
body.board-fullscreen .jcat-head .cat-ic svg { width: clamp(36px, min(4.4vw, 7vh), 66px); height: clamp(36px, min(4.4vw, 7vh), 66px); }
body.board-fullscreen .btn-bfs svg, .btn-bfs svg { width: 1.05em; height: 1.05em; }

/* Вспышка экрана на большой праздник (доска пройдена) */
.ny-flash {
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 40%, rgba(255,244,200,0.95), rgba(255,209,102,0.5) 45%, transparent 75%);
  animation: nyFlash 1.1s ease-out forwards;
}
@keyframes nyFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ny-flash { display: none; } }

/* Золотой дождь (усиленный праздник) */
.firework.gold-drop {
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #ffe9a8, #ffd166 55%, #d99a1f);
  box-shadow: 0 0 6px 1px rgba(255, 209, 102, 0.55);
}

@media (max-width: 480px) {
  .app-main { padding: calc(var(--hud-h) + 12px) 10px 18px; }
  .hud-chip { max-width: 46vw; font-size: 0.8rem; }
  .btn-primary, .btn-ghost { padding: 11px 18px; font-size: 0.95rem; }
}

/* =============================================================
   FIT-TO-VIEWPORT (десктоп ≥900px): доска и вопрос вписываются
   в высоту экрана без прокрутки страницы. На планшетах/телефонах
   остаётся прежнее поведение (aspect-ratio + скролл).
   В фуллскрин-режимах (B/F) эти правила не действуют — там свои. */
@media (min-width: 900px) {
  .app-main { display: flex; flex-direction: column; }

  /* Доска: grid растягивается на всю доступную высоту.
     Жёсткий кап: секция не выше экрана — grid точно вписывается, прокрутки нет. */
  body:not(.board-fullscreen) #screen-board.active {
    display: flex; flex-direction: column;
    flex: 1 1 auto; min-height: 0;
    max-height: calc(100dvh - var(--hud-h) - 78px); /* 78 = футер (44) + вертикальные паддинги app-main (86) − hud (52) */
    overflow: hidden;
  }
  body:not(.board-fullscreen) #screen-board .board-wrap {
    flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column;
    padding: 16px 20px;
  }
  body:not(.board-fullscreen) #screen-board .jeopardy-grid {
    flex: 1 1 auto; min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
    grid-template-rows: auto repeat(5, minmax(0, 1fr)); /* шапка категорий — auto, клетки делят остальное */
    gap: 10px;
  }
  body:not(.board-fullscreen) #screen-board .jcell {
    aspect-ratio: auto;
    font-size: clamp(1.15rem, min(2.6vw, 4.8vh), 2.8rem);
  }
  body:not(.board-fullscreen) #screen-board .jcell .pts {
    font-size: clamp(1.15rem, min(2.6vw, 4.8vh), 2.8rem);
  }
  body:not(.board-fullscreen) #screen-board .jcell .pts-label {
    font-size: clamp(0.7rem, min(0.85vw, 1.5vh), 0.95rem);
  }
  body:not(.board-fullscreen) #screen-board .jcat-head {
    font-size: clamp(0.8rem, min(1.2vw, 2.1vh), 1.4rem);
    padding: 10px 8px;
  }
  body:not(.board-fullscreen) #screen-board .jcat-head .cat-ic svg {
    width: clamp(26px, min(2.8vw, 4.6vh), 46px);
    height: clamp(26px, min(2.8vw, 4.6vh), 46px);
  }

  /* Вопрос: карточка не выше экрана, скролл внутри карточки */
  body:not(.q-fullscreen) #screen-question .question-wrap {
    max-height: calc(100dvh - var(--hud-h) - 48px);
    overflow-y: auto;
  }
}

/* Низкие окна (ноутбуки ~768px): прячем маскота — доске больше места */
@media (min-width: 900px) and (max-height: 999px) {
  body:not(.board-fullscreen) #screen-board .board-mascot { display: none; }
}

/* ===== Селектор громкости музыки в HUD ===== */
.hud-vol { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  backdrop-filter: blur(8px); }
.hud-vol .vol-ico { font-size: 1rem; opacity: 0.8; line-height: 1; }
.hud-vol input[type="range"] { width: 82px; height: 18px; margin: 0; padding: 0;
  accent-color: var(--accent-3); cursor: pointer; background: transparent; border: 0; }
@media (max-width: 760px) { .hud-vol { padding: 5px 8px; } .hud-vol input[type="range"] { width: 56px; } }

/* 👑 индикатор ведущей команды в HUD */
.hud-teams .ht { transition: filter .3s ease; }
.hud-teams .ht.leading { filter: drop-shadow(0 0 7px rgba(255,209,102,0.65)); }
.hud-teams .crown { font-size: 0.85rem; animation: crownBob 2.4s ease-in-out infinite; display: inline-block; }
@keyframes crownBob { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .hud-teams .crown { animation: none; } }

/* фокус-кольцо доступности для слайдера громкости */
.hud-vol input[type="range"]:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; border-radius: 4px; }
