/* NOTOLOVE — оформление интерфейса. Три этапа задают акцентный цвет через body[data-stage]. */

:root {
  --ink: #f7f2e8;
  --ink-dim: #b9aec4;
  --bg: #0b0711;
  --panel: rgba(24, 16, 34, .72);
  --panel-line: rgba(255, 255, 255, .12);
  --accent: #ffd9a0;
  --accent-2: #ff9ec4;
  --good: #8ef7b8;
  --bad: #ff7a9c;
  --radius: 20px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body[data-stage="classic"] { --accent: #ffd9a0; --accent-2: #ff9ec4; }
body[data-stage="folk"]    { --accent: #ffc24d; --accent-2: #ff8a3d; }
body[data-stage="estrada"] { --accent: #6ff2ff; --accent-2: #ff5ec7; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body { touch-action: manipulation; }

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none; /* ведение пальцем не должно уходить в жесты браузера */
}

#scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, .55) 100%);
  opacity: .9;
  transition: opacity .5s ease;
}

/* режим «В ударе»: края экрана пульсируют в такт */
#scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  box-shadow: inset 0 0 140px 34px var(--accent);
  transition: opacity .35s ease;
}

body.is-hot #scrim::after { animation: hotPulse 1.15s ease-in-out infinite; }

@keyframes hotPulse {
  0%, 100% { opacity: .10; }
  50%      { opacity: .34; }
}

/* вырезы экрана читаются из этого пробника */
#safe-probe {
  position: fixed;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body[data-screen="game"] #scrim { opacity: .35; }
body[data-screen="results"] #scrim { opacity: .5; }
body:not([data-screen="game"]):not([data-screen="results"]) #scrim { opacity: .95; }

#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  pointer-events: none;
}

.screen.is-active { display: flex; }
.screen button, .screen input, .screen .stage-card { pointer-events: auto; }

/* ---------------------------------------------------------------- МЕНЮ */

.screen--menu { align-items: center; justify-content: center; padding: 24px; }

.menu-inner {
  width: 100%;
  max-width: 900px;
  text-align: center;
  animation: rise .7s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.kicker {
  margin: 0 0 14px;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1px, .5vw, 6px);
  margin: 0;
  font-size: clamp(38px, 8.4vw, 104px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: uppercase;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .65));
}

.logo-letter {
  display: inline-block;
  background: linear-gradient(180deg, #fff 10%, #ffe9c9 55%, #d8b78c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(255, 214, 160, .18);
}

.logo-o {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.02em;
  height: 1.02em;
  margin: 0 .02em;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 6px 24px rgba(0, 0, 0, .55);
}

.logo-o img { width: 118%; height: 118%; object-fit: contain; }

.logo-o__spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, .16) 85%, transparent 100%);
  opacity: 0;
}

/* «О» — это 2-й, 4-й и 6-й span: nth-of-type считает все span-ы, а не только .logo-o */
.logo-o:nth-of-type(2) img { animation: spin 6s linear infinite; }
.logo-o:nth-of-type(4) img { animation: swing 3.4s ease-in-out infinite; }
.logo-o:nth-of-type(6) img { animation: spin 3.2s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swing {
  0%, 100% { transform: rotate(-7deg) scale(1); }
  50%      { transform: rotate(7deg) scale(1.03); }
}

.tagline {
  margin: 18px 0 0;
  font-size: clamp(15px, 2.2vw, 24px);
  letter-spacing: .04em;
  color: #ffe8c9;
}

.menu-actions {
  margin-top: clamp(28px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.menu-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------- КНОПКИ */

.btn {
  appearance: none;
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(14px, 1.6vw, 17px);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  backdrop-filter: blur(6px);
}

.btn:hover { transform: translateY(-2px) scale(1.02); background: rgba(255, 255, 255, .12); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn--primary {
  background: linear-gradient(180deg, #a9ffcf, #45d98f 60%, #23b877);
  color: #052c1c;
  border-color: rgba(255, 255, 255, .35);
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(60, 220, 150, .28), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.btn--primary:hover { box-shadow: 0 14px 38px rgba(60, 220, 150, .42); }

.btn--big {
  font-size: clamp(20px, 2.6vw, 28px);
  padding: 18px 64px;
  letter-spacing: .12em;
}

.btn--big:hover { transform: translateY(-2px) scale(1.1); }

.btn--ghost { background: rgba(255, 255, 255, .05); }

.btn--round {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn[disabled] { opacity: .4; cursor: default; transform: none; }

.hint-line {
  margin: clamp(22px, 4vh, 44px) 0 0;
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(240, 232, 255, .45);
}

/* ---------------------------------------------------------------- ВЫБОР ЭТАПА */

.screen--stages { padding: 20px clamp(16px, 4vw, 54px) 28px; }

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(10px, env(safe-area-inset-top));
}

.screen-head h2 {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
}

.head-spacer { width: 46px; }

.stage-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
  align-content: center;
  padding: clamp(18px, 3vh, 40px) 0;
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: clamp(240px, 42vh, 420px);
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: #17101f;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .25s ease, border-color .25s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.stage-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-art);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform .5s ease;
}

.stage-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 5, 12, .1) 0%, rgba(8, 5, 12, .35) 45%, rgba(8, 5, 12, .92) 100%);
}

.stage-card:hover { transform: translateY(-6px); box-shadow: 0 26px 54px rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .3); }
.stage-card:hover::before { transform: scale(1.07); }

.stage-card > * { position: relative; z-index: 2; }

.stage-card__art {
  position: absolute;
  top: 16px;
  right: 16px;
  width: clamp(64px, 9vw, 104px);
  height: clamp(64px, 9vw, 104px);
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 72%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6));
  transition: transform .4s ease;
}

.stage-card:hover .stage-card__art { transform: rotate(-8deg) scale(1.06); }

.stage-card__num {
  font-size: 12px;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
}

.stage-card__name {
  margin: 0;
  font-size: clamp(19px, 2.3vw, 28px);
  line-height: 1.1;
  font-weight: 800;
}

.stage-card__meta {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.stage-card__best {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.stage-card__best b { font-size: clamp(20px, 2.4vw, 28px); color: var(--card-accent, #ffd9a0); }
.stage-card__best span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

.stage-card.is-locked { cursor: not-allowed; }
.stage-card.is-locked::before { filter: saturate(.45) brightness(.45); }
.stage-card.is-locked:hover { transform: none; }

.stage-card__lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: inherit;
  background: radial-gradient(120% 120% at 50% 40%, rgba(8, 5, 14, .82), rgba(8, 5, 14, .95));
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffe0b0;
  text-align: center;
}

/* содержимое запертой карточки приглушаем — иначе подпись замка спорит с названием танца */
.stage-card.is-locked > *:not(.stage-card__lock) {
  opacity: .16;
  filter: blur(2px);
}

.stage-card__lock b { font-size: 20px; letter-spacing: 0; }

.stage-card--classic { --card-art: radial-gradient(120% 90% at 50% 0%, #7c2440, #3a0f22 55%, #150610); --card-accent: #ffd9a0; }
.stage-card--folk    { --card-art: radial-gradient(120% 90% at 50% 0%, #8a4a1f, #4a2410 55%, #1a0d05); --card-accent: #ffc24d; }
.stage-card--estrada { --card-art: radial-gradient(120% 90% at 50% 0%, #46236f, #181033 55%, #06040f); --card-accent: #6ff2ff; }

/* ---------------------------------------------------------------- ИГРА / HUD */

.screen--game { justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 30px) max(14px, env(safe-area-inset-bottom)); }

.hud { display: flex; align-items: center; gap: 12px; pointer-events: none; }
.hud--top { justify-content: space-between; }
.hud--bottom { flex-direction: column; align-items: stretch; gap: 6px; }

.hud-hearts { display: flex; gap: 5px; }

.heart {
  /* clip-path задан в координатах 24×24 — размер обязан совпадать, иначе сердце обрезается */
  width: 24px;
  height: 24px;
  background: radial-gradient(circle at 35% 30%, #fff, #ff5f8a 45%, #b3123f 100%);
  clip-path: path("M12 21s-8-5.1-8-11a4.6 4.6 0 0 1 8-2.9A4.6 4.6 0 0 1 20 10c0 5.9-8 11-8 11z");
  filter: drop-shadow(0 0 8px rgba(255, 80, 130, .55));
  transition: transform .18s ease, opacity .3s ease, filter .3s ease;
}

.heart.is-empty { background: rgba(255, 255, 255, .12); filter: none; opacity: .5; transform: scale(.86); }
.heart.is-full-pulse { animation: heartPulse .5s ease; }

@keyframes heartPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.hud-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.hud-score__value {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 0 22px rgba(255, 255, 255, .25);
}

.hud-score__mult {
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  transition: transform .18s ease;
}

.hud-score__mult.is-bump { transform: scale(1.45); }

.btn--pause {
  position: absolute;
  left: 50%;
  top: calc(10px + env(safe-area-inset-top));
  transform: translateX(-50%);
  margin: 0;
}

.btn--pause:hover { transform: translateX(-50%) scale(1.06); }
.btn--pause:active { transform: translateX(-50%) scale(.96); }

.hud--phase {
  position: absolute;
  left: 50%;
  top: calc(70px + env(safe-area-inset-top));
  transform: translateX(-50%);
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
  transition: color .4s ease, text-shadow .4s ease;
  justify-content: center;
}

.hud--phase.is-hot { color: rgba(255, 255, 255, .8); text-shadow: 0 0 24px var(--accent); }

.combo-pop {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) scale(.8);
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0, 0, 0, .8);
  opacity: 0;
  pointer-events: none;
}

.combo-pop.is-show { animation: comboIn .7s cubic-bezier(.2, .9, .3, 1) forwards; }

@keyframes comboIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  70%  { opacity: .95; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(.96); }
}

.track-title {
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
  text-align: center;
}

.progress {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  overflow: visible;
}

.progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 16px var(--accent);
  transition: width .12s linear;
}

.progress__mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 11px;
  background: rgba(255, 255, 255, .5);
  border-radius: 2px;
  transform: translateX(-1px);
}

/* подписи по центрам зон фаз: 3 → 0–30 %, 5 → 30–70 %, 7 → 70–85 %, ультра → 85–100 % */
.progress__legend {
  position: relative;
  height: 12px;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .28);
  text-transform: uppercase;
}

.progress__legend span { position: absolute; top: 0; white-space: nowrap; }
.progress__legend span:nth-child(1) { left: 15%; transform: translateX(-50%); }
.progress__legend span:nth-child(2) { left: 50%; transform: translateX(-50%); }
.progress__legend span:nth-child(3) { left: 77.5%; transform: translateX(-50%); }
.progress__legend span:nth-child(4) { right: 0; }

.toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(12, 8, 18, .72);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffe8c9;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.is-on { opacity: 1; }

/* ---------------------------------------------------------------- РЕЗУЛЬТАТЫ */

.screen--results { align-items: center; justify-content: center; padding: 24px; }

.results-card {
  width: min(680px, 100%);
  padding: clamp(24px, 4vw, 44px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(30, 20, 42, .92), rgba(14, 9, 20, .96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  text-align: center;
  animation: rise .5s cubic-bezier(.2, .8, .3, 1) both;
}

.results-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.results-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .04em;
  background: linear-gradient(180deg, #fff, #ffd9a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.results-sub { margin: 10px 0 0; color: rgba(255, 255, 255, .7); font-size: clamp(13px, 1.6vw, 16px); }

.results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: clamp(20px, 3vh, 32px) 0;
}

.stat {
  padding: 14px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
}

.stat__label { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.stat__value { display: block; margin-top: 6px; font-size: clamp(20px, 2.8vw, 30px); font-weight: 800; font-variant-numeric: tabular-nums; }

.record-badge {
  display: none;
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #052c1c;
  background: linear-gradient(180deg, #fff3a8, #ffcf4d);
  border-radius: 999px;
  padding: 8px 14px;
  animation: badgeBlink 1.1s ease-in-out infinite;
}

.record-badge.is-on { display: inline-block; }

@keyframes badgeBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 92, .5); }
  50%      { box-shadow: 0 0 26px 6px rgba(255, 214, 92, .35); }
}

.results-note { margin: 0 0 18px; font-size: 12.5px; color: rgba(255, 255, 255, .55); min-height: 1em; }

.results-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- МОДАЛКИ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 10, .72);
  backdrop-filter: blur(8px);
  animation: fade .25s ease both;
}

.modal[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal__box {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(32, 22, 44, .98), rgba(16, 10, 24, .98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
}

.modal__box--wide { width: min(460px, 100%); }

.modal__box h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
}

.slider { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 8px 12px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.slider span { grid-column: 1; grid-row: 1; }
.slider input { grid-column: 1 / -1; grid-row: 2; width: 100%; accent-color: var(--accent); }
.slider output { grid-column: 2; grid-row: 1; text-align: right; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 12px; }

.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; font-size: 13px; color: rgba(255, 255, 255, .78); }

.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.segmented button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  font-family: inherit;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.segmented button.is-on { background: var(--accent); color: #201408; font-weight: 700; }

.track-list { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 12px; }

.track-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, background .2s ease, border-color .2s ease;
}

.track-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.track-btn:active { transform: scale(.99); }
.track-btn__name { font-weight: 700; letter-spacing: .02em; }
.track-btn__meta { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }

/* поражение: экран обесцвечивается, как в ТЗ */
body[data-result="lose"] #stage { filter: grayscale(.85) brightness(.72) contrast(.95); }

.records { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }

.records__row { display: grid; grid-template-columns: 1fr repeat(3, auto); gap: 10px; align-items: baseline; font-size: 14px; }
.records__row + .records__row { border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 9px; }
.records__name { color: rgba(255, 255, 255, .75); font-size: 13px; }
.records__val { font-variant-numeric: tabular-nums; color: var(--accent); min-width: 42px; text-align: right; }
.records__val--muted { color: rgba(255, 255, 255, .22); }

/* ---------------------------------------------------------------- АДАПТИВ */

@media (max-width: 760px) {
  .stage-cards { grid-template-columns: 1fr; }
  .stage-card { min-height: 132px; padding: 16px; }
  .stage-card__art { width: 74px; height: 74px; top: 12px; right: 12px; }
  .logo { font-size: clamp(30px, 11.5vw, 64px); }
  .hud--phase { display: none; }
  .results-stats { gap: 6px; }
  .stat { padding: 10px 4px; }
}

@media (max-height: 520px) {
  .menu-actions { margin-top: 18px; }
  .kicker, .hint-line { display: none; }
  .stage-card { min-height: 150px; }
  .logo { font-size: clamp(28px, 7vw, 56px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------
   Вставка в «Синтез»: станция «Деми плие» открывает игру в рамке зала.
   Меню прячем — остаются сцена и карточка запуска.
   ------------------------------------------------------------------ */
body.is-embed .menu-inner { display: none; }

/* В рамке зала сцена просвечивает сильнее: карточка не в пустоте. */
body.is-embed[data-screen="menu"] #scrim { opacity: .55; }

.embed-launch {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(120% 90% at 50% 40%, rgba(11, 7, 17, .62) 0%, rgba(11, 7, 17, .92) 72%);
}
.embed-launch:not([hidden]) { display: flex; }

.embed-launch__card {
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(32, 22, 44, .98), rgba(16, 10, 24, .98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  text-align: center;
}
.embed-launch__kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent, #ffd9a0);
  opacity: .92;
}
.embed-launch__title { margin: 0; font-size: clamp(24px, 6vw, 34px); }
.embed-launch__sub { margin: 0; font-size: 14px; color: rgba(246, 233, 212, .74); }
.embed-launch__note { margin: 4px 0 6px; font-size: 13px; line-height: 1.45; color: rgba(246, 233, 212, .62); }
.embed-launch__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.embed-launch__actions .btn { min-height: 46px; }
