/* ============================================================
   css/base.css — база: палитра, reset, экраны, кнопки, модалки
   Палитра Человека-Паука: комикс-красный + ночной город + жёлтый
   ------------------------------------------------------------ */
:root {
  --sp-red: #E23636;
  --sp-red-dark: #B02323;
  --sp-dark: #0E1428;
  --sp-navy: #1B2447;
  --sp-blue: #2E4A9E;
  --sp-yellow: #FFC531;
  --sp-white: #F5F7FF;
  --sp-ok: #2FA84F;
  --sp-bad: #D64545;
  --glass: rgba(14, 20, 40, 0.72);
  --glass-border: rgba(255, 255, 255, 0.16);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---------- Локальный Comfortaa (стандарт §3.5.1: без CDN, работает с флешки) ---------- */
@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/comfortaa-cyrillic-400-normal.woff2') format('woff2'),
       url('../fonts/comfortaa-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/comfortaa-cyrillic-700-normal.woff2') format('woff2'),
       url('../fonts/comfortaa-latin-700-normal.woff2') format('woff2');
}

html, body { height: 100%; }

body {
  font-family: 'Comfortaa', 'Segoe UI', 'Trebuchet MS', Verdana, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #23305e 0%, var(--sp-dark) 55%) fixed,
              var(--sp-dark);
  color: var(--sp-white);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app { position: relative; height: 100vh; height: 100dvh; }

/* ---------- Экраны ---------- */
.screen {
  position: absolute; inset: 0;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  animation: screenIn 0.35s ease;
}
.screen.active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Кнопки ---------- */
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }

/* Атрибут hidden сильнее любых display-правил (баг «призраков», §8-4) */
[hidden] { display: none !important; }

.btn-quest {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  background: linear-gradient(180deg, var(--sp-red) 0%, var(--sp-red-dark) 100%);
  color: #fff; border: none; border-radius: 14px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 6px 0 var(--sp-red-dark), 0 12px 24px rgba(226, 54, 54, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s;
}
.btn-quest:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-2px); }
.btn-quest:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--sp-red-dark); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-white);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px; font-weight: 600;
  transition: background 0.15s, transform 0.12s;
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); transform: translateY(-2px); }

.btn-back {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid var(--glass-border);
  color: var(--sp-white);
  border-radius: 12px; padding: 10px 16px; font-weight: 700; min-height: 48px;
}
.btn-back:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- Стеклянные чипы ---------- */
.glass-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

/* ---------- Модалки ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(5, 8, 18, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 18px;
}
.modal.open { display: flex; }

.modal-card {
  position: relative;
  width: min(560px, 94vw);
  max-height: 86vh; overflow-y: auto;
  background: linear-gradient(170deg, #1d2750 0%, #131b3a 100%);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  animation: modalIn 0.25s ease;
}
.modal-card h3 { font-size: 1.35rem; margin-bottom: 14px; color: var(--sp-yellow); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}

.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  font-size: 1rem; font-weight: 700;
}
.modal-x:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- «Как играть?»: вкладки Ученику/Учителю (§3.6) ---------- */
.howto-tabs {
  display: flex; gap: 8px;
  margin-bottom: 14px;
}
.howto-tab {
  flex: 1; min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--sp-white);
  font-weight: 700; font-size: 0.95rem;
  transition: all 0.15s;
}
.howto-tab:hover { background: rgba(255, 255, 255, 0.14); }
.howto-tab.sel {
  background: linear-gradient(180deg, var(--sp-red), var(--sp-red-dark));
  border-color: #ff8a8a;
  box-shadow: 0 4px 18px rgba(226, 54, 54, 0.45);
}
.howto-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; line-height: 1.45; }
/* Живая иллюстрация в модалке «Как играть» */
.howto-gif {
  display: block; width: min(100%, 300px); margin: 0 auto 12px;
  border-radius: 14px; border: 2px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.howto-list li::marker { color: var(--sp-yellow); }

/* ---------- Тосты ---------- */
#toastLayer {
  /* ниже HUD (top:10px, низ ≈68px) + запас, чтобы не задевать заголовки экранов */
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 950; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(10px);
  color: #fff; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  opacity: 0; transform: translateY(-12px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: none; }

/* ---------- Слой эффектов ---------- */
#fxLayer { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.fx-bit { position: absolute; width: 10px; height: 10px; }
.fx-points {
  position: absolute; transform: translate(-50%, -50%);
  font-weight: 900; font-size: 1.6rem;
  animation: floatUp 1.15s ease forwards;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.fx-good { color: var(--sp-yellow); }
.fx-bad { color: #ff7b7b; }
@keyframes floatUp {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -140%) scale(1.25); }
}

/* ---------- Инпуты ---------- */
.quest-input {
  width: 100%; min-height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--glass-border);
  border-radius: 14px;
  color: #fff; font-size: 1.15rem; font-weight: 600;
  padding: 12px 18px; outline: none;
  transition: border-color 0.15s;
}
.quest-input:focus { border-color: var(--sp-red); }
.quest-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.shake { animation: shake 0.45s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

/* ---------- Печать диплома ---------- */
@media print {
  body { overflow: visible; background: #fff; }
  .screen { display: none !important; }
  #screen-final { display: block !important; overflow: visible; background: #fff; }
  .final-actions, #toastLayer, #fxLayer, .modal { display: none !important; }
  .diploma {
    box-shadow: none; border: 3px solid #B02323;
    color: #111; background: #fff !important;
  }
}

/* ---------- Доступность ---------- */
button:focus-visible, input:focus-visible, .map-pin:focus-visible {
  outline: 3px solid var(--sp-yellow);
  outline-offset: 2px;
}

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 480px) {
  .modal-card { padding: 20px 16px; }
  .fx-points { font-size: 1.3rem; }
}

/* ---------- Кнопка звука ---------- */
.btn-mute {
  position: fixed; top: 12px; right: 12px; z-index: 80;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(10px);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.btn-mute:hover { transform: scale(1.1); }
@media print { .btn-mute { display: none !important; } }

/* Ссылки «Топ»/«Ответы» в строке стартовых кнопок */
a.btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--sp-white); }

/* ============================================================
   ПОЛИРОВКА 2.0: скроллбары, selection, reduced-motion,
   фокус-навигация, микродвижения кнопок
   ============================================================ */

/* ---------- Кастомные скроллбары (webkit + firefox) ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 9, 20, 0.55) rgba(255, 255, 255, 0.06);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.65), rgba(140, 6, 12, 0.65));
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.85), rgba(140, 6, 12, 0.85));
}

/* ---------- Выделение текста ---------- */
::selection {
  background: rgba(229, 9, 20, 0.55);
  color: #fff;
  text-shadow: none;
}

/* ---------- Доступный фокус ---------- */
:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
  border-radius: 6px;
}
.btn-quest:focus-visible,
.pz-opt:focus-visible,
.pz-numin-check:focus-visible {
  outline-offset: 3px;
}

/* ---------- Микродвижения кнопок ---------- */
.btn-quest {
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn-quest:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.btn-quest:active { transform: translateY(0) scale(0.98); }
.pz-opt { transition: transform 0.1s ease, border-color 0.12s ease, background 0.12s ease; }
.pz-opt:hover { transform: translateX(3px); }
.pz-numin-check:hover { transform: translateY(-2px); }

/* ---------- Уважение к reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .confetti-piece, .fx-confetti, [class*="confetti"] { display: none !important; }
}

/* ============================================================
   ДОСТИЖЕНИЯ АГЕНТА (чип на карте, тост, панель)
   ============================================================ */
.chip-ach {
  cursor: pointer;
  font-weight: 800;
  color: var(--sp-white);
  transition: transform 0.13s, border-color 0.13s, box-shadow 0.13s;
}
.chip-ach:hover {
  transform: translateY(-2px);
  border-color: #ffd166;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.chip-ach:focus-visible { outline-color: #ffd166; }

.ach-toast {
  position: fixed;
  top: 16px; left: 50%;
  transform: translate(-50%, -90px);
  display: flex; gap: 12px; align-items: center;
  padding: 12px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.97), rgba(28, 150, 78, 0.97));
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  z-index: 210;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.3s;
}
.ach-toast.show { transform: translate(-50%, 0); opacity: 1; }
.ach-toast-icon { font-size: 1.7rem; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35)); }
.ach-toast-text b {
  display: block; font-size: 0.68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.9;
}
.ach-toast-text i { display: block; font-style: normal; font-weight: 800; font-size: 1rem; }

.ach-card { width: min(560px, 94vw); max-height: min(80vh, 720px); overflow-y: auto; }
.ach-title { margin: 0 0 4px; font-size: 1.3rem; color: var(--sp-yellow); }
.ach-subtitle { margin: 0 0 14px; color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; }
.ach-list { display: flex; flex-direction: column; gap: 8px; }
.ach-row {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--glass-border);
  animation: achRowIn 0.3s both;
}
.ach-row:nth-child(2) { animation-delay: 0.04s; }
.ach-row:nth-child(3) { animation-delay: 0.08s; }
.ach-row:nth-child(4) { animation-delay: 0.12s; }
.ach-row:nth-child(5) { animation-delay: 0.16s; }
.ach-row:nth-child(6) { animation-delay: 0.2s; }
.ach-row:nth-child(7) { animation-delay: 0.24s; }
.ach-row:nth-child(8) { animation-delay: 0.28s; }
.ach-row:nth-child(9) { animation-delay: 0.32s; }
@keyframes achRowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
.ach-row.locked { opacity: 0.5; filter: grayscale(0.75); }
.ach-row-icon { font-size: 1.5rem; line-height: 1; }
.ach-row-name { display: block; font-weight: 800; color: var(--sp-white); }
.ach-row-desc { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); }
.ach-row-date { margin-left: auto; font-size: 0.72rem; color: rgba(255, 255, 255, 0.5); white-space: nowrap; }

/* ============================================================
   ЧИПЫ КАРТЫ: лёгкий hover-lift
   ============================================================ */
.map-chips .glass-chip { transition: transform 0.14s ease, border-color 0.14s ease; }
.map-chips .glass-chip:hover { transform: translateY(-2px); }

/* ============================================================
   HUD (фиксированная панель, §3.5.3-6 / §3.6): профиль · очки · серия · звук
   ============================================================ */
.hud {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 900;
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 20px);
  padding: 6px 10px;
  background: var(--glass);
  border: 1.5px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: hudIn 0.4s ease;
}
@keyframes hudIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.hud-spacer { flex: 0 0 6px; }
.hud-chip, .hud-btn {
  border: 1.5px solid var(--glass-border);
  border-radius: 999px;
  color: var(--sp-white);
  background: rgba(255, 255, 255, 0.07);
  transition: transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.hud-chip:hover, .hud-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.13); }
.hud-chip:active, .hud-btn:active { transform: translateY(1px) scale(0.97); }

.hud-profile {
  display: flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 4px 14px 4px 5px;
}
.hud-avatar {
  display: grid; place-items: center;
  width: 34px; height: 34px; font-size: 1.15rem; line-height: 1;
  background: linear-gradient(145deg, rgba(255, 197, 49, 0.95), rgba(255, 179, 0, 0.95));
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.hud-profile-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.hud-profile-text b { font-size: 0.86rem; }
.hud-profile-text i { font-style: normal; font-size: 0.68rem; color: rgba(255, 255, 255, 0.65); }

.hud-score {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 4px 16px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(255, 197, 49, 0.28), rgba(255, 179, 0, 0.16));
  border-color: rgba(255, 197, 49, 0.55);
}
.hud-score b { font-size: 1.05rem; color: var(--sp-yellow); }

.hud-streak {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 42px; padding: 4px 14px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(230, 74, 74, 0.3), rgba(178, 36, 36, 0.18));
  border-color: rgba(255, 120, 100, 0.55);
  animation: streakIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes streakIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

.hud-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.05rem;
}
.hud-btn.off { filter: grayscale(1); opacity: 0.55; }

/* ============================================================
   ШАПКИ ЭКРАНОВ ПОД HUD (QA BUG-1/BUG-3): резерв верхних 76px —
   фиксированный HUD (top:10px, низ ≈68px) больше не наезжает
   на «← На карту» / панель класс-режима; sticky-шапка липнет
   НИЖЕ HUD, а не под неё.
   ============================================================ */
#screen-level, #screen-classroom { padding-top: 76px; }
#screen-level .lvl-top { top: 76px; }

/* ---------- Фоновые иллюстрации экранов (детализация по фидбеку) ---------- */
/* Экран уровня: ночная улочка с паутиной + тёмный градиент для читаемости задач */
#screen-level {
  background-image:
    linear-gradient(to bottom, rgba(9, 12, 30, 0.72) 0%, rgba(9, 12, 30, 0.55) 40%, rgba(7, 9, 24, 0.82) 100%),
    url('../img/level-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
/* Бонусный бункер — свой злодейский фон */
#screen-level.on-bonus {
  background-image:
    linear-gradient(to bottom, rgba(8, 14, 12, 0.74) 0%, rgba(8, 14, 12, 0.55) 40%, rgba(5, 10, 8, 0.84) 100%),
    url('../img/bonus-bg.jpg');
}

/* Мобильный HUD: компактнее (§3.5.3-6) */
@media (max-width: 600px) {
  .hud { gap: 6px; padding: 5px 8px; }
  .hud-profile-text i { display: none; }
  .hud-profile { padding-right: 10px; }
  .hud-profile-text b { font-size: 0.78rem; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hud-score { padding: 4px 12px; }
}
@media print { .hud { display: none !important; } }

/* ============================================================
   ПРОФИЛЬ ИГРОКА (§3.7-9): статы + медальница
   ============================================================ */
.profile-card { max-width: 420px; width: min(92vw, 420px); }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-avatar {
  display: grid; place-items: center;
  width: 64px; height: 64px; font-size: 2rem; line-height: 1;
  background: linear-gradient(145deg, rgba(255, 197, 49, 0.95), rgba(255, 179, 0, 0.95));
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(255, 179, 0, 0.35);
}
.profile-head-text h3 { margin-bottom: 2px; }
.profile-sub { font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }
.profile-stats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.pf-ico { font-size: 1.1rem; }
.pf-name { color: rgba(255, 255, 255, 0.75); font-size: 0.86rem; }
.pf-val { margin-left: auto; font-weight: 800; color: var(--sp-yellow); }
.profile-medal-title { font-size: 0.95rem; margin-bottom: 8px; color: var(--sp-yellow); }
.profile-medals {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 14px;
}
.pf-medal {
  display: grid; place-items: center;
  width: 44px; height: 44px; font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}
.pf-medal.got {
  background: linear-gradient(180deg, rgba(255, 197, 49, 0.25), rgba(255, 179, 0, 0.12));
  border-color: rgba(255, 197, 49, 0.6);
  box-shadow: 0 0 12px rgba(255, 197, 49, 0.25);
}
.pf-medal:not(.got) { filter: grayscale(0.6); opacity: 0.55; }
.pf-medal-count { margin-left: auto; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.profile-ach-btn { margin-bottom: 10px; }

/* ============================================================
   ПОПАП ГРОМКОСТИ (§3.9): два независимых ползунка
   ============================================================ */
.vol-card { max-width: 360px; width: min(92vw, 360px); }
.vol-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.vol-label { flex: 0 0 112px; font-size: 0.9rem; white-space: nowrap; }
.vol-val { flex: 0 0 44px; text-align: right; color: var(--sp-yellow); }
.vol-row input[type='range'] {
  flex: 1; appearance: none; -webkit-appearance: none;
  height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}
.vol-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe08a, var(--sp-yellow) 60%, #d99e00);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.vol-row input[type='range']::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe08a, var(--sp-yellow) 60%, #d99e00);
  border: 2px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
}
.vol-note { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 12px; }

/* ============================================================
   ТУМБЛЕР ВЕРСИИ: html.no-workshop прячет лабораторию (учебная сборка)
   ============================================================ */
html.no-workshop .ws-link { display: none !important; }

/* ============================================================
   Task 27 — АДАПТИВ И ВИДИМЫЕ СЛАЙДЕРЫ (прокрутка)
   Жалобы QA: «нет адаптивности, нужные кнопки пропадают,
   нет слайдеров, чтобы опустить сайт вниз».
   1) Скроллбар виден ВЕЗДЕ, где есть прокрутка (десктоп+Firefox;
      на тач-устройствах прокрутка нативная, «резинка» не выходит
      за пределы экранов благодаря overscroll-behavior).
   2) Крупные медиа не разрывают узкие экраны.
   3) На телефонах инпуты ≥16px — iOS не влючает авто-зум при
      фокусе (из-за него «пропадали» кнопки за краем экрана).
   ============================================================ */
* { scrollbar-width: thin; scrollbar-color: rgba(226, 54, 54, 0.6) rgba(255, 255, 255, 0.08); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(226, 54, 54, 0.65);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(226, 54, 54, 0.9); }
::-webkit-scrollbar-corner { background: transparent; }

img, video { max-width: 100%; }

.screen, .modal-card, .ans-gate { overscroll-behavior: contain; }

@media (max-width: 640px) {
  input, select, textarea { font-size: 1rem; } /* ≥16px: без авто-зума iOS */
  .pin-input { font-size: 1.2rem; }            /* исключение: PIN остаётся крупным */
}
