/* «Крик усталости» — синяя тема: темно-синий фон, сияние, стекло, светящиеся контуры. */
:root {
  --bg: #04083a;
  --bg-deep: #02041f;
  --glass: rgba(26, 34, 110, 0.42);
  --glass-2: rgba(40, 52, 150, 0.5);
  --line: rgba(120, 140, 255, 0.22);
  --line-2: rgba(255, 255, 255, 0.85);
  --ink: #ffffff;
  --ink-2: #c9cff5;
  --muted: #8d95cf;
  --blue: #2a46ff;
  --blue-2: #4f6bff;
  --cyan: #12b4ff;
  --violet: #8a4cf0;
  --pink: #ff3fae;
  --mint: #3fe0c0;
  --red: #ff5d75;
  --tg: #2aabee;
  --grad-1: linear-gradient(135deg, #e04ad6, #8a3cf0);
  --grad-2: linear-gradient(135deg, #b14cf0, #6a40f5);
  --grad-3: linear-gradient(135deg, #7a5cff, #3a5cf5);
  --display: "Manrope", "Inter", -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font: "Manrope", "Inter", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg) 0%, #03062e 55%, var(--bg-deep) 100%) fixed;
  color: var(--ink);
  font: 500 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* сияние сверху, за шаром */
.glow {
  position: fixed;
  inset: -10vh -30vw auto;
  height: 95vh;
  background:
    radial-gradient(42% 46% at 50% 26%, rgba(42, 70, 255, 0.95) 0%, rgba(26, 52, 230, 0.6) 38%, rgba(14, 30, 160, 0.25) 62%, transparent 78%),
    radial-gradient(30% 30% at 50% 22%, rgba(18, 140, 255, 0.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body[data-screen="game"] .glow { opacity: 0; }
.app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(36px, 11vw, 54px); line-height: 1.04; }
h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.1; margin: 8px 0 12px; }
h3 { font-size: 18px; margin: 28px 0 12px; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* шапка */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 0 14px;
}
.brand { display: inline-flex; padding: 6px 0; }
.brand img { height: 26px; width: auto; display: block; }
.bar-nav { display: flex; align-items: center; gap: 8px; }
.chip {
  border: 1.5px solid var(--line-2);
  background: rgba(4, 8, 58, 0.25);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.chip:hover { background: rgba(255, 255, 255, 0.08); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: var(--grad-1);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
.in-tg .bar { padding-top: 10px; }

.banner {
  background: rgba(255, 93, 117, 0.15);
  border: 1px solid rgba(255, 93, 117, 0.45);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}

.screen { animation: enter 0.45s var(--ease) both; }
@keyframes enter { from { transform: translateY(12px); opacity: 0.4; } }

.text { color: var(--ink-2); font-size: 16px; }
.small { font-size: 13px; line-height: 1.45; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fc4ff;
  margin-bottom: 10px;
}

/* загрузка */
.loader {
  width: 44px;
  height: 44px;
  margin: 30vh auto 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* первый экран */
.hero { text-align: center; padding: 4px 0 0; }
.hero .lead { font-size: 19px; line-height: 1.4; color: #e6e9ff; margin: 14px auto 0; max-width: 26ch; font-weight: 500; }
.orb-wrap {
  position: relative;
  width: min(56vw, 230px);
  aspect-ratio: 1;
  margin: 6px auto 34px;
  display: grid;
  place-items: center;
}
/* стеклянный шар */
.orb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(150, 190, 255, 0.35) 72%, rgba(190, 215, 255, 0.55) 100%),
    radial-gradient(circle at 50% 38%, rgba(140, 185, 255, 0.92) 0%, rgba(95, 145, 255, 0.82) 45%, rgba(70, 120, 255, 0.72) 100%);
  box-shadow: 0 0 40px rgba(80, 140, 255, 0.55), 0 0 120px rgba(40, 90, 255, 0.45);
  will-change: transform;
}
.idle .orb { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); } }

.invite {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid rgba(143, 196, 255, 0.5);
  font-size: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.invite b { color: #8fc4ff; }

/* карточки режимов */
.modes-pick { display: grid; gap: 18px; margin-top: 36px; }
.mode-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 24px 26px 26px;
  border-radius: 38px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.mode-card.pink {
  border: 2px solid #ff4fbe;
  background: radial-gradient(120% 140% at 50% 120%, rgba(150, 20, 110, 0.75), rgba(70, 8, 70, 0.92) 70%), #3d0a4a;
  box-shadow: 0 0 22px rgba(255, 63, 174, 0.75), 0 0 60px rgba(255, 63, 174, 0.35), inset 0 0 26px rgba(255, 90, 200, 0.55);
}
.mode-card.blue {
  border: 2px solid #8794ff;
  background: radial-gradient(120% 140% at 50% 120%, rgba(50, 70, 255, 0.85), rgba(22, 32, 150, 0.95) 70%), #17208f;
  box-shadow: 0 0 22px rgba(90, 110, 255, 0.8), 0 0 60px rgba(70, 90, 255, 0.35), inset 0 0 26px rgba(140, 160, 255, 0.55);
}
.mode-card b { font: 800 clamp(26px, 7.4vw, 32px)/1.1 var(--display); }
.mode-card span { font-size: 16px; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.mode-card:hover { transform: translateY(-1px); }
.mode-card:active { transform: scale(0.985); }
.mode-card:disabled { opacity: 0.45; pointer-events: none; }

/* шкала скидок: линия с делениями */
.scale { margin: 46px 8px 0; }
.scale-line { position: relative; height: 18px; display: flex; justify-content: space-between; }
.scale-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; translate: 0 -50%; background: #fff; border-radius: 2px; }
.scale-line i { position: relative; width: 2px; height: 100%; background: #fff; border-radius: 2px; }
.scale-labels { display: flex; justify-content: space-between; margin: 10px -12px 0; font: 800 18px var(--display); }
.scale-labels span { width: 48px; text-align: center; }

/* шаги */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 44px 0 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: s;
  position: relative;
  display: grid;
  gap: 4px;
  padding: 20px 20px 20px 84px;
  min-height: 112px;
  align-content: center;
  border-radius: 28px;
  background: rgba(18, 24, 80, 0.55);
  border: 1px solid rgba(110, 125, 220, 0.35);
  backdrop-filter: blur(10px);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 20px;
  top: 50%;
  translate: 0 -50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 20px var(--display);
  color: #fff;
  background: var(--grad-1);
  box-shadow: 0 0 18px rgba(200, 70, 240, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.35);
}
.steps li:nth-child(2)::before { background: var(--grad-2); box-shadow: 0 0 18px rgba(150, 70, 240, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.35); }
.steps li:nth-child(3)::before { background: var(--grad-3); box-shadow: 0 0 18px rgba(80, 100, 255, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.35); }
.steps b { font: 800 19px/1.25 var(--display); }
.steps span { color: #d7dbf7; font-size: 16px; line-height: 1.4; }

.state-note { margin-top: 20px; text-align: center; color: #8fc4ff; font-weight: 700; }

/* кнопки */
.actions { display: grid; gap: 12px; margin-top: 26px; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: 800 19px/1.1 var(--display);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), opacity 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.is-loading { opacity: 0.45; pointer-events: none; }
/* главная кнопка — белая */
.btn-hot { background: #fff; color: #0a0f5a; box-shadow: 0 0 30px rgba(140, 170, 255, 0.35); }
.btn-hot:hover { box-shadow: 0 0 40px rgba(160, 190, 255, 0.55); }
/* второстепенная — белый контур */
.btn-ghost { background: rgba(4, 8, 58, 0.2); color: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-tg { background: var(--tg); color: #fff; box-shadow: 0 0 26px rgba(42, 171, 238, 0.45); }
/* Основная кнопка VK ID: цвет #0077FF и белый логотип по правилам VK ID */
.btn-vk { background: #0077ff; color: #fff; gap: 12px; box-shadow: 0 0 26px rgba(0, 119, 255, 0.45); }
.btn-vk svg { flex: none; }
/* акцент — промокод: розовое свечение, как у «Покричать» */
.btn-gold {
  background: linear-gradient(135deg, #ff4fbe, #8a4cf0);
  color: #fff;
  box-shadow: 0 0 22px rgba(255, 63, 174, 0.6), inset 0 0 14px rgba(255, 255, 255, 0.25);
}
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.link { background: none; border: 0; padding: 4px 0; color: #8fc4ff; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.wait { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 14px; padding: 4px 4px 0; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--cyan); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ник */
.nick-form { margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 700; }
.field input, .copy-row input {
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border-radius: 20px;
  border: 1.5px solid rgba(143, 160, 255, 0.45);
  background: rgba(18, 24, 80, 0.6);
  color: var(--ink);
  font: 700 18px var(--font);
  outline: none;
}
.field input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(120, 150, 255, 0.3); }
.err { color: #ff9aac; font-size: 14px; margin-top: 8px; }

/* шкала громкости на проверке микрофона */
.meter {
  position: relative;
  height: 16px;
  margin-top: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(143, 160, 255, 0.35);
}
.meter-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a46ff, #12b4ff 70%, #ffffff);
  box-shadow: 0 0 16px rgba(18, 180, 255, 0.6);
  transform-origin: left center;
  transform: scaleX(0);
}
.meter-mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #fff; border-radius: 2px; }
.meter-mark span { position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; white-space: nowrap; font-size: 11px; color: var(--muted); }
.mic-status { margin-top: 34px; text-align: center; color: var(--ink-2); min-height: 24px; font-size: 15px; }
.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 93, 117, 0.12);
  border: 1px solid rgba(255, 93, 117, 0.45);
  font-size: 15px;
  display: grid;
  gap: 12px;
}
.tips { margin: 22px 0 0; padding: 18px 20px; list-style: none; display: grid; gap: 10px; border-radius: 24px; background: rgba(18, 24, 80, 0.55); border: 1px solid rgba(110, 125, 220, 0.35); }
.tips li { position: relative; padding-left: 22px; font-size: 15px; color: #d7dbf7; }
.tips li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* экран записи: кольцо сияния, точечный таймер, белая кнопка */
.game {
  position: relative;
  min-height: calc(100dvh - 80px);
  display: grid;
  grid-template-rows: auto 1fr;
  text-align: center;
}
.game .rec-foot { align-self: end; }
body[data-screen="game"] .bar { visibility: hidden; }
.rec-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210vw;
  max-width: 1400px;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    rgba(4, 8, 60, 1) 0%,
    rgba(8, 14, 110, 0.95) 11%,
    rgba(20, 36, 230, 0.95) 22%,
    rgba(26, 60, 255, 1) 31%,
    rgba(14, 130, 255, 0.95) 40%,
    rgba(8, 180, 255, 0.85) 47%,
    rgba(20, 70, 240, 0.4) 60%,
    transparent 78%
  );
  filter: blur(6px);
  transform: scale(var(--s, 0.92));
  opacity: var(--o, 0.85);
  transition: transform 0.12s linear, opacity 0.12s linear;
  pointer-events: none;
  z-index: -1;
}
.rec-stage { position: relative; display: grid; place-content: center; justify-items: center; gap: 18px; min-height: 50dvh; padding-top: 2dvh; }
.dots { display: flex; justify-content: center; }
.dots svg { height: clamp(64px, 20vw, 104px); width: auto; fill: #fff; overflow: visible; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(150, 190, 255, 0.7)); }
.dots.pop { animation: pop 0.9s var(--ease) both; }
@keyframes pop { from { transform: scale(1.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { transform: scale(0.94); opacity: 0.5; } }
.rec-label { font-size: clamp(22px, 6.4vw, 28px); font-weight: 500; color: #fff; }
.rec-foot { display: grid; gap: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.rec-foot .btn { width: min(100%, 360px); justify-self: center; }
.zone, .next-tier { font: 700 clamp(18px, 5vw, 22px)/1.3 var(--font); color: #fff; font-variant-numeric: tabular-nums; }

/* результат */
.result { text-align: center; }
.score { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 4px; }
.score .dots svg { height: clamp(78px, 24vw, 120px); }
.score small { color: var(--ink-2); font-size: 16px; font-weight: 600; }
.pill {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid #ff4fbe;
  background: rgba(80, 8, 80, 0.75);
  box-shadow: 0 0 18px rgba(255, 63, 174, 0.6), inset 0 0 14px rgba(255, 90, 200, 0.45);
  color: #fff;
  font: 800 21px var(--display);
}
.pill.none { border-color: rgba(255, 255, 255, 0.5); background: rgba(18, 24, 80, 0.6); box-shadow: none; color: var(--ink-2); }
.reaction { margin: 18px auto 6px; font-size: 19px; font-weight: 700; max-width: 30ch; }
.compare { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.claim { display: grid; gap: 12px; margin-top: 24px; text-align: left; }
.claim-note { font-size: 14px; color: var(--muted); text-align: center; }
.code-card {
  padding: 20px;
  border-radius: 26px;
  background: rgba(18, 24, 80, 0.65);
  border: 1.5px dashed rgba(143, 196, 255, 0.8);
  box-shadow: 0 0 24px rgba(42, 70, 255, 0.35);
  display: grid;
  gap: 12px;
  text-align: center;
}
.code-card .label { color: #8fc4ff; }
.code { font: 700 26px/1.2 var(--mono); letter-spacing: 0.06em; word-break: break-all; user-select: all; }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.code-actions .btn { min-height: 50px; font-size: 16px; padding: 0 12px; }

/* таблица */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(18, 24, 80, 0.6); border: 1px solid rgba(110, 125, 220, 0.4); }
.tabs button { border: 0; background: none; padding: 11px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.tabs button.on { background: #fff; color: #0a0f5a; }
.tabs.scopes { margin-top: 10px; }
#boardHint { margin-top: 10px; }
.board { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.board li {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 20px;
  background: rgba(18, 24, 80, 0.55);
  border: 1px solid rgba(110, 125, 220, 0.3);
  font-variant-numeric: tabular-nums;
}
.board .pl { font: 800 15px var(--display); color: var(--muted); text-align: center; }
.board .nk { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .sc { font: 800 16px var(--display); }
.board .dc { font-size: 13px; font-weight: 700; color: #8fc4ff; min-width: 38px; text-align: right; }
.board li.t1, .board li.t2, .board li.t3 { padding: 17px 16px; border-width: 2px; }
.board li.t1 { border-color: #ff4fbe; background: rgba(70, 8, 70, 0.7); box-shadow: 0 0 16px rgba(255, 63, 174, 0.45), inset 0 0 14px rgba(255, 90, 200, 0.3); }
.board li.t2 { border-color: #a46cff; background: rgba(50, 20, 120, 0.7); box-shadow: 0 0 14px rgba(160, 100, 255, 0.4), inset 0 0 12px rgba(180, 130, 255, 0.25); }
.board li.t3 { border-color: #8794ff; background: rgba(22, 32, 150, 0.7); box-shadow: 0 0 14px rgba(90, 110, 255, 0.45), inset 0 0 12px rgba(140, 160, 255, 0.3); }
.board li.t1 .pl, .board li.t2 .pl, .board li.t3 .pl { color: #fff; font-size: 19px; }
.board li.me { outline: 2px solid var(--cyan); outline-offset: 2px; }
.board .empty { display: block; text-align: center; color: var(--muted); }
.me-row {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 20px;
  background: #0b1260;
  border: 1.5px solid var(--cyan);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 22px rgba(18, 180, 255, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4);
}
.winners { margin-top: 24px; display: grid; gap: 10px; }
.winners .day { padding: 16px 18px; border-radius: 22px; background: rgba(18, 24, 80, 0.55); border: 1px solid rgba(110, 125, 220, 0.3); }
.winners .day b { display: block; margin-bottom: 6px; font-size: 14px; color: #8fc4ff; }
.winners .day div { font-size: 14px; color: var(--ink-2); }

/* профиль */
.card { padding: 18px; border-radius: 24px; background: rgba(18, 24, 80, 0.55); border: 1px solid rgba(110, 125, 220, 0.35); backdrop-filter: blur(10px); }
.card.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.card b { font: 800 19px var(--display); display: block; margin-top: 2px; word-break: break-word; }
.label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-radius: 18px; background: rgba(18, 24, 80, 0.55); border: 1px solid rgba(110, 125, 220, 0.3); font-size: 14px; }
.list .code { font-size: 16px; }
.list .empty { color: var(--muted); justify-content: center; }
.invite-card { display: grid; gap: 10px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-row input { min-height: 44px; font: 500 14px var(--mono); padding: 0 12px; border-radius: 14px; }

/* подвал */
.foot { margin-top: 30px; text-align: center; font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.foot nav { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* шторка и уведомления */
.sheet { position: fixed; inset: 0; z-index: 20; display: grid; align-items: end; }
.sheet-back { position: absolute; inset: 0; background: rgba(2, 4, 31, 0.65); backdrop-filter: blur(4px); animation: fade 0.25s both; }
.sheet-body {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: #0b1158;
  border: 1px solid rgba(143, 160, 255, 0.45);
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(42, 70, 255, 0.3);
  animation: up 0.35s var(--ease) both;
  display: grid;
  gap: 14px;
}
.sheet-body h3 { margin: 0; }
.sheet-list { display: grid; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  border-radius: 18px;
  background: #fff;
  color: #0a0f5a;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 0 30px rgba(140, 170, 255, 0.4), 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: up 0.3s var(--ease) both;
}

@media (min-width: 720px) {
  .actions.row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* результат: одна главная кнопка, две второстепенные в ряд, ссылка на другой режим */
.res-place { margin-top: 6px; background: none; border: 0; padding: 4px 8px; color: #8fc4ff; font-size: 15px; font-weight: 700; cursor: pointer; }
.res-actions { display: grid; gap: 6px; margin-top: 18px; }
.res-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-row .btn { padding: 0 12px; }
.res-other { justify-self: center; font-size: 16px; padding: 10px; }
.result .reaction { margin-top: 14px; }
.result .claim { margin-top: 18px; }
.result .score { padding-top: 6px; }

/* ачивка на экране результата: картинка 9:16, рядом — балл и скидка */
.ach { margin: 10px auto 0; width: min(100%, 300px); }
.ach img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); background: #f3eee4; }
.result:has(.ach:not([hidden])) .score { padding-top: 14px; gap: 6px; }
.result:has(.ach:not([hidden])) .score .dots svg { height: clamp(48px, 14vw, 64px); }
.result:has(.ach:not([hidden])) .reaction { display: none; }
.code-card .btn-hot { width: 100%; }
.code-card .link { justify-self: center; }
.list li.has-apply { flex-wrap: wrap; }
.list li.has-apply .apply { flex: 1 0 100%; min-height: 48px; font-size: 16px; margin-top: 4px; }

/* шкала скидки на экране записи */
.tier-bar { width: min(100%, 420px); justify-self: center; display: grid; gap: 8px; padding: 0 14px; }
.tb-now { margin: 0; text-align: center; font: 800 clamp(18px, 5vw, 22px)/1.2 var(--display); color: #fff; }
.tb-track { position: relative; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); overflow: hidden; }
.tb-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #6f8bff, #ff4fbe); box-shadow: 0 0 16px rgba(255, 79, 190, 0.6); transition: width 0.2s linear; }
.tb-marks { position: relative; height: 40px; }
.tb-mark { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; line-height: 1.1; color: rgba(255, 255, 255, 0.55); font-size: 12px; white-space: nowrap; }
.tb-mark::before { content: ""; width: 2px; height: 8px; margin-top: -22px; margin-bottom: 14px; background: currentColor; border-radius: 1px; }
.tb-mark b { font: 800 15px var(--display); }
.tb-mark.tb-base { transform: none; justify-items: start; }
.tb-mark.tb-base::before { display: none; }
.tb-mark.on { color: #fff; }
.tb-mark.on b { color: #ff8ad6; }
.tb-hint { margin: 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.sheet-ach { display: block; width: min(100%, 280px); height: auto; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 18px; }
.sheet-list a.btn { text-decoration: none; }
.sheet-body { max-height: 100dvh; overflow-y: auto; }
.sheet-ach { width: auto; height: min(58dvh, 500px); max-width: 100%; }
