/* ══════════════════════════════════════════════════════════
   ВЬЮН — биолюминесцентная пещера.
   Тёмный органический фон, светящийся бирюзовый червь,
   янтарные споры. Unbounded — дисплей, Manrope — текст.
   ══════════════════════════════════════════════════════════ */

:root {
  --bg0: #060907;
  --bg1: #0b1410;
  --bg2: #10201a;
  --panel: #0d1a14;
  --panel-edge: rgba(87, 230, 168, 0.14);
  --worm: #57e6a8;
  --worm-deep: #1f8f68;
  --worm-glow: rgba(87, 230, 168, 0.35);
  --spore: #ffb347;
  --spore-glow: rgba(255, 179, 71, 0.4);
  --pulse: #7df0ff;
  --text: #d9efe4;
  --dim: #6f8a7d;
  --danger: #ff6b5e;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  position: fixed;
  inset: 0;
}

/* мягкое фоновое свечение всей сцены */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(87, 230, 168, 0.05), transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 100%, rgba(255, 179, 71, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── экраны ─────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  z-index: 1;
}
.screen.active { opacity: 1; visibility: visible; }

.hidden { display: none !important; }

/* ── кнопки ─────────────────────────────────────────────── */
.btn-big {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #05231a;
  background: linear-gradient(160deg, var(--worm), #2fae7e);
  border: none;
  border-radius: 18px;
  padding: 17px 28px;
  cursor: pointer;
  box-shadow: 0 0 24px var(--worm-glow), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-big:active { transform: scale(0.96); }

.btn-ghost {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--dim);
  background: transparent;
  border: 1px solid rgba(111, 138, 125, 0.35);
  border-radius: 16px;
  padding: 13px 24px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:active { color: var(--text); border-color: var(--dim); }

.btn-icon {
  background: rgba(87, 230, 168, 0.08);
  border: 1px solid var(--panel-edge);
  color: var(--dim);
  border-radius: 12px;
  width: 38px;
  height: 34px;
  font-size: 11px;
  cursor: pointer;
}

/* ── общие фишки ────────────────────────────────────────── */
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 26, 20, 0.85);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.spore-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--spore);
  box-shadow: 0 0 8px var(--spore-glow);
  flex: none;
}
.chip-charges { gap: 4px; font-size: 12px; letter-spacing: 2px; }
.chip-charges:empty { display: none; }

.records {
  color: var(--dim);
  font-size: 13px;
  text-align: center;
  min-height: 1.2em;
}

/* ── титульный экран ────────────────────────────────────── */
#screen-title {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 90% 55% at 50% 110%, #0e2018 0%, transparent 65%),
    var(--bg0);
}
.title-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px;
  animation: title-in 0.9s ease both;
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.title-art img {
  width: 132px;
  height: 132px;
  border-radius: 32px;
  box-shadow: 0 0 60px var(--worm-glow);
  animation: art-breathe 4s ease-in-out infinite;
}
@keyframes art-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 45px var(--worm-glow); }
  50% { transform: scale(1.04); box-shadow: 0 0 75px var(--worm-glow); }
}
.game-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 15vw, 64px);
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #a8ffd9 20%, var(--worm) 55%, var(--worm-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px var(--worm-glow));
}
.tagline {
  color: var(--dim);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ── карта пласта ───────────────────────────────────────── */
#screen-map {
  background:
    radial-gradient(ellipse 100% 45% at 50% -10%, #10231b 0%, transparent 70%),
    var(--bg0);
}
.map-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
}
.map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.map-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.04em;
}
.map-sub { color: var(--dim); font-size: 13px; margin-top: 4px; }
.map-head-right { display: flex; align-items: center; gap: 8px; }
#btn-map-hub { font-size: 16px; height: 38px; }

.map-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}
.map-mods:empty { display: none; }
.mod-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--spore);
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.3);
  border-radius: 10px;
  padding: 4px 10px;
}

.map-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid var(--panel-edge);
  background:
    radial-gradient(ellipse 90% 30% at 50% 0%, rgba(87, 230, 168, 0.05), transparent 70%),
    rgba(13, 26, 20, 0.35);
}
.map-wrap { position: relative; }
.map-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.map-edge {
  fill: none;
  stroke: rgba(111, 138, 125, 0.25);
  stroke-width: 2;
  stroke-dasharray: 3 5;
}
.map-edge.open {
  stroke: rgba(125, 240, 255, 0.5);
  stroke-dasharray: none;
}
.map-edge.walked {
  stroke: rgba(87, 230, 168, 0.55);
  stroke-dasharray: none;
  stroke-width: 2.5;
}
.map-rows {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 22px 6px 26px;
}
.map-row {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
}
.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 86px;
  -webkit-tap-highlight-color: transparent;
}
.map-node-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(13, 26, 20, 0.9);
  border: 2px solid rgba(111, 138, 125, 0.3);
  color: var(--dim);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.map-node-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dim);
  text-transform: uppercase;
}
.map-node.avail .map-node-icon {
  border-color: var(--pulse);
  color: var(--pulse);
  box-shadow: 0 0 20px rgba(125, 240, 255, 0.25);
  animation: node-pulse 1.6s ease-in-out infinite;
}
.map-node.avail .map-node-label { color: var(--text); }
.map-node.avail:active .map-node-icon { transform: scale(0.92); }
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(125, 240, 255, 0.18); }
  50% { box-shadow: 0 0 30px rgba(125, 240, 255, 0.4); }
}
.map-node.done .map-node-icon {
  border-color: rgba(87, 230, 168, 0.45);
  color: var(--worm);
  background: rgba(87, 230, 168, 0.08);
}
.map-node.current .map-node-icon {
  box-shadow: 0 0 0 3px rgba(87, 230, 168, 0.25), 0 0 24px var(--worm-glow);
}
.map-node.locked { opacity: 0.4; cursor: default; }
.map-hint {
  color: var(--dim);
  font-size: 12.5px;
  text-align: center;
  min-height: 1.2em;
}

/* ── событие толщи ──────────────────────────────────────── */
.event-card { text-align: left; gap: 12px; }
.event-card .goal-kicker { text-align: center; }
.event-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  text-align: center;
}
.event-text {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
}
.event-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-choice {
  font-family: var(--font-body);
  text-align: left;
  background: rgba(87, 230, 168, 0.07);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 13px 16px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease;
}
.event-choice:active { transform: scale(0.97); border-color: var(--worm); }
.event-choice-label { font-weight: 800; font-size: 15px; }
.event-choice-sub { color: var(--dim); font-size: 12.5px; margin-top: 3px; line-height: 1.35; }
.event-result {
  color: var(--worm);
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

/* ── Гнездо ─────────────────────────────────────────────── */
#screen-hub {
  background:
    radial-gradient(ellipse 100% 45% at 50% -10%, #10231b 0%, transparent 70%),
    var(--bg0);
}
.hub-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}
.hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.hub-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.05em;
}
.hub-sub { color: var(--dim); font-size: 13px; margin-top: 4px; }
.chip-bio { font-size: 17px; }

.hub-worm {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(13, 26, 20, 0.6);
  border: 1px solid var(--panel-edge);
  border-radius: 20px;
  padding: 14px;
}
.hub-worm-img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  flex: none;
  animation: art-breathe 5s ease-in-out infinite;
}
.worm-line {
  font-size: 14px;
  line-height: 1.45;
  color: var(--worm);
  font-style: italic;
}

.upgrades {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.upg {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 26, 20, 0.6);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 12px 14px;
}
.upg-icon { font-size: 22px; flex: none; width: 32px; text-align: center; }
.upg-body { flex: 1; min-width: 0; }
.upg-name { font-weight: 800; font-size: 14px; }
.upg-name .upg-lvl { color: var(--dim); font-weight: 700; font-size: 12px; margin-left: 6px; }
.upg-desc { color: var(--dim); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.upg-buy {
  flex: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  color: #05231a;
  background: var(--spore);
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s;
}
.upg-buy:active { transform: scale(0.94); }
.upg-buy:disabled {
  background: rgba(111, 138, 125, 0.15);
  color: var(--dim);
  cursor: default;
}
.upg-buy .spore-dot { width: 8px; height: 8px; box-shadow: none; }
.upg.maxed .upg-buy { background: transparent; color: var(--worm); border: 1px solid var(--panel-edge); }

#btn-dive { width: 100%; }

/* ── игровой экран ──────────────────────────────────────── */
#screen-game { background: var(--bg0); }

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 14px 8px;
  z-index: 3;
}
.hud-depth {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.hud-depth-unit { font-size: 13px; color: var(--dim); font-weight: 500; }
.hud-right { display: flex; align-items: center; gap: 8px; }

.hud-goal { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.hud-goal-bar {
  width: 74px;
  height: 4px;
  border-radius: 2px;
  background: rgba(111, 138, 125, 0.22);
  overflow: hidden;
}
#hud-goal-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--worm-deep), var(--worm));
  box-shadow: 0 0 6px var(--worm-glow);
  transition: width 0.3s ease;
}
.hud-goal-label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.goal-card { gap: 10px; }
.goal-kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--spore);
}
.goal-depth {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  color: var(--text);
  text-shadow: 0 0 24px var(--worm-glow);
}
.goal-sub {
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.field-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 10px;
}
#field {
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--panel-edge), 0 0 40px rgba(0, 0, 0, 0.6);
  max-width: 100%;
  max-height: 100%;
}

/* всплывающие подсказки */
.toast {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(6, 12, 9, 0.92);
  border: 1px solid var(--panel-edge);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  max-width: 84%;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 4;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stratum-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--worm);
  text-shadow: 0 0 24px var(--worm-glow);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  text-align: center;
  white-space: nowrap;
}
.stratum-banner.show { animation: stratum 2.2s ease both; }
@keyframes stratum {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); letter-spacing: 0.05em; }
  20% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.03); letter-spacing: 0.2em; }
}

/* ── зона тапа «Импульс» ────────────────────────────────── */
.impulse {
  position: relative;
  margin: 10px 12px calc(12px + env(safe-area-inset-bottom));
  height: clamp(116px, 20vh, 176px);
  border-radius: 26px;
  border: 1px solid var(--panel-edge);
  background:
    radial-gradient(ellipse 120% 90% at 50% 115%, rgba(87, 230, 168, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(13, 26, 20, 0.5), rgba(13, 26, 20, 0.92));
  color: var(--dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.impulse:active { transform: scale(0.985); }

.impulse-arrow-box {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* шеврон из рамок, направление задаётся --rot */
.impulse-arrow {
  width: 30px;
  height: 30px;
  border-top: 7px solid currentColor;
  border-right: 7px solid currentColor;
  border-radius: 4px;
  transform: rotate(var(--rot, 45deg));
  transition: transform 0.15s ease, opacity 0.2s ease;
  opacity: 0.25;
}
.impulse-caption {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.impulse-window {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(111, 138, 125, 0.18);
  overflow: hidden;
}
#impulse-window-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: var(--pulse);
  box-shadow: 0 0 8px var(--pulse);
  transition: width 0.12s linear;
}

/* состояния зоны тапа */
.impulse.ready {
  border-color: rgba(125, 240, 255, 0.5);
  box-shadow: 0 0 28px rgba(125, 240, 255, 0.12), inset 0 0 40px rgba(125, 240, 255, 0.05);
  color: var(--pulse);
}
.impulse.ready .impulse-arrow { opacity: 1; animation: arrow-pulse 0.9s ease-in-out infinite; }
.impulse.ready .impulse-caption { color: var(--pulse); }
@keyframes arrow-pulse {
  0%, 100% { transform: rotate(var(--rot)) scale(1); }
  50% { transform: rotate(var(--rot)) scale(1.18); }
}
.impulse.urgent {
  border-color: var(--pulse);
  box-shadow: 0 0 42px rgba(125, 240, 255, 0.3), inset 0 0 60px rgba(125, 240, 255, 0.1);
}
.impulse.urgent .impulse-arrow { animation-duration: 0.4s; }
.impulse.locked {
  border-color: rgba(87, 230, 168, 0.6);
  box-shadow: 0 0 30px var(--worm-glow);
  color: var(--worm);
}
.impulse.locked .impulse-arrow { opacity: 1; animation: none; }
.impulse.locked .impulse-caption { color: var(--worm); }

/* рябь при тапе */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 240, 255, 0.35) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
  width: 160px;
  height: 160px;
}
@keyframes ripple {
  to { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

/* ── итог погружения ────────────────────────────────────── */
#screen-summary {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 50% at 50% 115%, #0e2018 0%, transparent 65%),
    var(--bg0);
}
.summary-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  animation: title-in 0.5s ease both;
}
.summary-over { color: var(--dim); font-size: 14px; }
.summary-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.05em;
}
.summary-stats {
  display: flex;
  gap: 10px;
  width: 100%;
  margin: 6px 0;
}
.sstat {
  flex: 1;
  background: rgba(13, 26, 20, 0.7);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.sstat-label { color: var(--dim); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; }
.sstat-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.sstat-val.amber { color: var(--spore); text-shadow: 0 0 16px var(--spore-glow); }
.summary-record {
  color: var(--spore);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  animation: record-blink 1.2s ease-in-out infinite;
}
@keyframes record-blink { 50% { opacity: 0.55; } }
#btn-again { width: 100%; }
#btn-hub { width: 100%; }

/* ── диалоги ────────────────────────────────────────────── */
.dialogue {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 7, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: dlg-in 0.3s ease both;
}
@keyframes dlg-in { from { opacity: 0; } }
.dlg-card {
  width: 100%;
  max-width: 480px;
  margin: 0 14px calc(26px + env(safe-area-inset-bottom));
  background: rgba(10, 20, 15, 0.96);
  border: 1px solid var(--panel-edge);
  border-radius: 22px;
  padding: 20px 22px 14px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
}
.dlg-who {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.dlg-who.vyun { color: var(--worm); }
.dlg-who.mira { color: var(--spore); }
.dlg-who.you { color: var(--pulse); }
.dlg-text {
  font-size: 16.5px;
  line-height: 1.55;
  min-height: 3.1em;
}
.dlg-hint {
  color: var(--dim);
  font-size: 11.5px;
  text-align: right;
  margin-top: 12px;
  animation: record-blink 2s ease-in-out infinite;
}

/* ── пауза ──────────────────────────────────────────────── */
.pause {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 5, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pause-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(320px, 84vw);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 22px;
  padding: 26px 22px;
  text-align: center;
}
.pause-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 8px;
}
