/*
 * Повторюшка — дизайн-система.
 * Светлый тёплый фон, белые карточки, сочные акценты, объёмные «нажимаемые» кнопки.
 * Заголовки — Unbounded, текст — Rubik (обе с кириллицей).
 */
:root {
  --bg: #fff4e6;
  --bg-2: #ffe6cc;
  --surface: #ffffff;
  --surface-2: #fff9f2;
  --ink: #1f1a2e;
  --muted: #7a7189;
  --line: #f0e4d6;

  --primary: #ff5a3c;
  --primary-d: #d13c20;
  --violet: #7c5cff;
  --violet-d: #5a3ed6;
  --yellow: #ffc83d;
  --yellow-d: #e0a41a;
  --mint: #22c99a;
  --mint-d: #12977a;
  --pink: #ff6fae;
  --sky: #38b6ff;
  --bad: #ef4444;

  --wave: #ff5a3c;
  --wave-ref: #b9b0c6;
  --melody: #1f1a2e;

  --r-sm: 14px;
  --r: 22px;
  --r-lg: 30px;
  --shadow: 0 12px 32px rgba(31, 26, 46, 0.08), 0 2px 6px rgba(31, 26, 46, 0.05);
  --shadow-lg: 0 24px 60px rgba(31, 26, 46, 0.14);
  --font-display: 'Unbounded', 'Rubik', system-ui, sans-serif;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(60vmax 60vmax at 110% -10%, rgba(255, 111, 174, 0.22), transparent 60%),
    radial-gradient(55vmax 55vmax at -15% 20%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(60vmax 60vmax at 50% 120%, rgba(255, 200, 61, 0.28), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
body.has-reactions { padding-bottom: calc(200px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
small { font-size: 0.8em; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.center { text-align: center; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.01em; }

/* ───── кнопки ───── */
.btn {
  --c: var(--surface);
  --cd: #e6dccf;
  --tc: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px;
  border: 0; border-radius: 18px;
  background: var(--c); color: var(--tc);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  box-shadow: 0 5px 0 var(--cd);
  transform: translateY(0);
  transition: transform 0.12s var(--spring), box-shadow 0.12s, filter 0.2s, opacity 0.2s;
  user-select: none;
}
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { --c: var(--primary); --cd: var(--primary-d); --tc: #fff; }
.btn.violet { --c: var(--violet); --cd: var(--violet-d); --tc: #fff; }
.btn.mint { --c: var(--mint); --cd: var(--mint-d); --tc: #fff; }
.btn.yellow { --c: var(--yellow); --cd: var(--yellow-d); }
.btn.tg { --c: #2aabee; --cd: #1a86bd; --tc: #fff; }
.btn.vk { --c: #0077ff; --cd: #0059c0; --tc: #fff; }
.btn.big { width: 100%; min-height: 64px; font-size: 1.15rem; font-family: var(--font-display); font-weight: 700; border-radius: 22px; }
.btn.small { min-height: 42px; padding: 8px 16px; font-size: 0.92rem; border-radius: 14px; box-shadow: 0 4px 0 var(--cd); }
.btn.ghost { --c: transparent; --cd: transparent; color: var(--muted); box-shadow: none; font-weight: 600; }
.btn.ghost:active { transform: scale(0.97); }
.btn.icon { width: 52px; padding: 0; }
.btn .ico { font-size: 1.2em; line-height: 1; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.input, .field input, .field textarea, .field select {
  width: 100%; padding: 15px 18px;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface-2); font-size: 1.05rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus, .field input:focus, .field textarea:focus { border-color: var(--violet); background: #fff; box-shadow: 0 0 0 5px rgba(124, 92, 255, 0.14); }

/* ───── каркас ───── */
.stage { max-width: 560px; margin: 0 auto; padding: 12px 16px 24px; }
.stage.wide { max-width: 560px; }
.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 16px;
}
.card h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.card h2 small { color: var(--muted); font-family: var(--font); font-weight: 500; }
.notice {
  background: #fff7d6; border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px;
  font-weight: 600; text-align: center; box-shadow: var(--shadow);
}
.enter > * { animation: rise 0.45s var(--spring) both; }
.enter > *:nth-child(2) { animation-delay: 0.05s; }
.enter > *:nth-child(3) { animation-delay: 0.1s; }
.enter > *:nth-child(4) { animation-delay: 0.15s; }
.enter > *:nth-child(5) { animation-delay: 0.2s; }
.enter > *:nth-child(n+6) { animation-delay: 0.25s; }

/* ───── аватары ───── */
.ava {
  --s: 56px;
  position: relative; flex: 0 0 auto;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--ava-bg, #ffe1d6);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.06);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava .ava-emoji { font-size: calc(var(--s) * 0.56); line-height: 1; }
.ava.xs { --s: 34px; }
.ava.sm { --s: 44px; }
.ava.lg { --s: 92px; }
.ava.xl { --s: 150px; box-shadow: 0 18px 40px rgba(31, 26, 46, 0.18), inset 0 -6px 0 rgba(0, 0, 0, 0.06); }
.ava.off { filter: grayscale(1); opacity: 0.45; }

/* ───── верхняя панель ───── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  max-width: 560px; margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px 8px;
}
.tb-pill {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 999px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow);
}
.tb-code { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 2px; color: var(--violet); }
.tb-phase { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-round { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.timer { position: relative; width: 44px; height: 44px; flex: 0 0 auto; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.timer .track { stroke: #f1eaf9; }
.timer .bar { stroke: var(--violet); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 0.85rem; }
.timer.hurry .bar { stroke: var(--bad); }
.timer.hurry b { color: var(--bad); animation: pulse 0.5s infinite alternate; }
.home-btn, .sound-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); font-size: 1.1rem; flex: 0 0 auto; }

/* полоска игроков */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 6px; max-width: 560px; margin: 0 auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 62px; position: relative; padding-top: 2px; }
.chip .ava { --s: 46px; transition: transform 0.3s var(--spring); border: 3px solid transparent; }
.chip.me .ava { border-color: var(--violet); }
.chip.done .ava { border-color: var(--mint); }
.chip.active .ava { border-color: var(--yellow); transform: scale(1.1); }
.chip.off { opacity: 0.4; }
.chip-name { font-size: 0.7rem; font-weight: 600; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-score { position: absolute; top: 0; right: 2px; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.chip-badge { position: absolute; left: 0; top: 0; font-size: 0.9rem; }
.chip.done::after { content: '✓'; position: absolute; bottom: 18px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; animation: pop 0.35s var(--spring); }

/* ───── главный экран ───── */
.home { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4px; }
.hero-media {
  width: min(60vw, 250px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #fff, #ffd9c4); box-shadow: var(--shadow-lg);
  display: grid; place-items: center; animation: floaty 4s ease-in-out infinite;
}
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media .hero-emoji { font-size: 7.5rem; animation: wobble 2.6s ease-in-out infinite; }
.logo {
  margin: 18px 0 4px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 10vw, 3.3rem); line-height: 1; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--primary) 0%, var(--pink) 45%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 1.02rem; }
.av-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.av-pick { border: 0; padding: 0; background: none; border-radius: 50%; transition: transform 0.25s var(--spring); }
.av-pick .ava { --s: 100%; aspect-ratio: 1; width: 100%; height: auto; border: 3px solid transparent; }
.av-pick.on { transform: scale(1.12); }
.av-pick.on .ava { border-color: var(--violet); box-shadow: 0 6px 16px rgba(124, 92, 255, 0.35); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 8px; text-align: center; font-family: var(--font-display); font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.step { background: var(--surface); border-radius: var(--r); padding: 14px 10px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.step i { font-style: normal; font-size: 1.8rem; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.step:nth-child(1) i { background: #ffe1d6; }
.step:nth-child(2) i { background: #e7e0ff; }
.step:nth-child(3) i { background: #d6f6ec; }
.step b { font-size: 0.85rem; }
.step span { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }

/* ───── лобби ───── */
.invite { align-items: center; text-align: center; background: linear-gradient(135deg, var(--violet), #a55cff); color: #fff; }
.invite-label { opacity: 0.85; font-size: 0.85rem; }
.invite-code { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; letter-spacing: 12px; margin-right: -12px; line-height: 1; cursor: pointer; }
.invite-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.invite .btn { --c: rgba(255, 255, 255, 0.95); --cd: rgba(0, 0, 0, 0.18); --tc: var(--violet-d); }
.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 12px; }
.pl { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; animation: pop 0.4s var(--spring) both; }
.pl .ava { --s: 64px; }
.pl-name { font-size: 0.82rem; font-weight: 600; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-name small { color: var(--violet); }
.pl .crown { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 1.3rem; z-index: 3; pointer-events: none; }
.pl .x { position: absolute; top: -4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); color: var(--muted); font-size: 0.7rem; }
.pl.off { opacity: 0.4; }
.pl-empty .ava { background: transparent; border: 2px dashed #e2d6c8; box-shadow: none; }
.pl-empty .ava-emoji { font-size: 1.4rem; color: #cdbfb0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  text-align: left; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--spring);
}
.mode i { font-style: normal; font-size: 1.6rem; }
.mode b { font-size: 0.98rem; }
.mode span { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.mode.on { border-color: var(--violet); background: #f3efff; transform: translateY(-2px); }
.mode:disabled { cursor: default; }
.packs { display: flex; gap: 12px; overflow-x: auto; margin: 0 -20px; padding: 4px 20px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.packs::-webkit-scrollbar { display: none; }
.pack {
  flex: 0 0 132px; scroll-snap-align: start; border: 0; padding: 0; background: none; text-align: left;
  display: flex; flex-direction: column; gap: 8px; transition: transform 0.25s var(--spring);
}
.pack-cover {
  position: relative; width: 132px; height: 132px; border-radius: var(--r); overflow: hidden;
  display: grid; place-items: center; font-size: 3rem;
  box-shadow: var(--shadow); border: 3px solid transparent; transition: border-color 0.2s;
}
.pack-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pack-title { font-weight: 700; font-size: 0.88rem; line-height: 1.2; }
.pack-meta { font-size: 0.75rem; color: var(--muted); }
.pack.on { transform: translateY(-4px); }
.pack.on .pack-cover { border-color: var(--violet); box-shadow: 0 10px 24px rgba(124, 92, 255, 0.3); }
.pack.on .pack-cover::after { content: '✓'; position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }
.pro { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--yellow); padding: 3px 8px; border-radius: 8px; font-size: 0.65rem; font-weight: 800; letter-spacing: 1px; z-index: 1; }
.pack:disabled { cursor: default; }
.settings-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #fff; font-weight: 800; box-shadow: 0 2px 0 var(--line); }
.stepper b { min-width: 52px; text-align: center; font-family: var(--font-display); font-size: 0.9rem; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 14px; background: #e6dccf; position: relative; transition: background 0.2s; flex: 0 0 auto; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); transition: transform 0.25s var(--spring); }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { transform: translateX(20px); }
.lobby-links { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }

/* закреплённая кнопка действия внизу */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, rgba(255, 244, 230, 0));
}
.dock-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.dock .hint { text-align: center; font-size: 0.85rem; color: var(--muted); }
.has-reactions .dock { bottom: calc(68px + env(safe-area-inset-bottom)); padding-bottom: 8px; background: none; }

/* ───── раунд ───── */
.play { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.play.wait { text-align: center; align-items: center; padding-top: 12px; }
.title { margin: 0; text-align: center; font-size: clamp(1.35rem, 6vw, 1.75rem); font-weight: 800; line-height: 1.15; }
.sub { margin: -8px 0 0; text-align: center; color: var(--muted); }
.prompt {
  position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
}
.prompt-cover { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; font-size: 1.8rem; }
.prompt-cover img { width: 100%; height: 100%; object-fit: cover; }
.prompt-label { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.prompt b { font-size: 1.18rem; line-height: 1.25; }
.prompt.secret b { color: var(--muted); }

.listen {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 14px 18px 14px 14px;
  box-shadow: var(--shadow); text-align: left; transition: transform 0.2s var(--spring);
}
.listen:active:not(:disabled) { transform: scale(0.98); }
.listen:disabled { opacity: 0.55; }
.listen .play-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 4px 0 var(--violet-d); flex: 0 0 auto; }
.listen.playing .play-ico { animation: pulse 0.6s infinite alternate; }
.listen b { display: block; font-size: 1.02rem; }
.listen small { color: var(--muted); }
.plays-left { display: flex; gap: 4px; margin-left: auto; }
.plays-left i { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.plays-left i.used { background: #e6dccf; }

/* запись */
.rec { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 18px 20px; }
.rec-btn {
  --lvl: 0;
  position: relative; width: 148px; height: 148px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #ff8a6e, var(--primary) 60%);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 8px 0 var(--primary-d), 0 20px 40px rgba(255, 90, 60, 0.35);
  transition: transform 0.15s var(--spring), box-shadow 0.15s;
}
.rec-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 var(--primary-d), 0 10px 20px rgba(255, 90, 60, 0.3); }
.rec-btn:disabled { filter: grayscale(0.7); opacity: 0.45; cursor: default; }
.rec-btn .mic { display: block; font-size: 2.6rem; line-height: 1; margin-bottom: 4px; }
.rec-ring, .rec-ring2 { position: absolute; inset: -12px; border-radius: 50%; border: 4px solid var(--primary); opacity: 0; pointer-events: none; }
.rec-btn.on { background: radial-gradient(circle at 35% 30%, #ff6b6b, var(--bad) 60%); }
.rec-btn.on .rec-ring { opacity: calc(0.25 + var(--lvl)); transform: scale(calc(1 + var(--lvl) * 0.22)); transition: transform 0.06s; }
.rec-btn.on .rec-ring2 { animation: ripple 1.4s infinite; }
.rec-btn:not(:disabled):not(.on) { animation: breathe 2.4s ease-in-out infinite; }
.rec-hint { margin: 0; color: var(--muted); text-align: center; font-size: 0.92rem; min-height: 1.3em; }
.rec-progress { width: 100%; max-width: 260px; height: 8px; border-radius: 4px; background: #f3ece4; overflow: hidden; }
.rec-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--pink)); border-radius: 4px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.rec-actions .btn.primary { flex: 1 1 100%; }
.wave { width: 100%; height: auto; background: var(--surface-2); border-radius: 16px; }
.waiting { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wait-chip { display: flex; align-items: center; gap: 6px; background: var(--surface); box-shadow: var(--shadow); padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; transition: background 0.3s; }
.wait-chip .ava { --s: 30px; }
.wait-chip.ok { background: #d6f6ec; }
.wait-art { position: relative; display: grid; place-items: center; }
.wait-art .ava { animation: floaty 2.6s ease-in-out infinite; }
.dots-typing { display: inline-flex; gap: 5px; margin-top: 8px; }
.dots-typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); animation: typing 1.2s infinite; }
.dots-typing i:nth-child(2) { animation-delay: 0.15s; }
.dots-typing i:nth-child(3) { animation-delay: 0.3s; }

.chain { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.chain .ava { --s: 40px; opacity: 0.4; transition: transform 0.3s var(--spring), opacity 0.3s; }
.chain .past .ava { opacity: 1; }
.chain .now .ava { opacity: 1; transform: scale(1.3); box-shadow: 0 0 0 4px var(--yellow); }
.chain .arrow { color: var(--muted); font-weight: 800; }

/* ───── шоу ───── */
.progress-dots { display: flex; gap: 6px; justify-content: center; }
.progress-dots i { width: 8px; height: 8px; border-radius: 4px; background: #e6dccf; transition: width 0.3s var(--spring), background 0.3s; }
.progress-dots i.past { background: var(--violet); opacity: 0.5; }
.progress-dots i.now { width: 26px; background: var(--violet); }
.spot {
  position: relative; border-radius: var(--r-lg); padding: 18px 16px 18px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #3b2d72 0%, #1f1a2e 70%); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: var(--shadow-lg);
}
.spot::before { content: ''; position: absolute; top: -40%; left: 50%; width: 120%; height: 120%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 220, 140, 0.35), transparent); pointer-events: none; }
.spot .who { position: relative; display: grid; place-items: center; }
.spot .ava.xl { --s: 116px; }
.show .prompt { padding: 10px 14px; }
.show .prompt-cover { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 12px; }
.show .prompt b { font-size: 1rem; }
.show .prompt-label { display: none; }
.eq { position: absolute; inset: -22px; pointer-events: none; }
/* Лучи «солнцем» вокруг аватарки: каждый повёрнут и вынесен на --ray от центра. */
.eq { position: absolute; inset: 0; pointer-events: none; }
.eq i { position: absolute; left: 50%; top: 50%; width: 6px; height: 18px; margin: -9px -3px; border-radius: 3px; background: var(--yellow); opacity: 0; }
.who { --ray: 82px; }
.guess-spot .who { --ray: 70px; }
.singing .eq i { opacity: 0.9; animation: eq 0.5s ease-in-out infinite alternate; }
.spot h2 { margin: 0; font-size: 1.25rem; text-align: center; position: relative; }
.spot .kind { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--yellow); font-weight: 700; position: relative; }
.spot .wave { background: rgba(255, 255, 255, 0.07); position: relative; }
.score-box { position: relative; min-height: 150px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.listening { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.75); font-weight: 600; margin-top: 16px; }
.ring { position: relative; width: 116px; height: 116px; animation: pop 0.5s var(--spring); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: rgba(255, 255, 255, 0.12); }
.ring .bar { stroke: url(#scoreGrad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; }
.ring b small { font-size: 0.45em; margin: 0.5em 0 0 2px; }
.sticker {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); border-radius: 18px; padding: 8px 16px 8px 8px;
  font-weight: 800; font-family: var(--font-display); font-size: 0.95rem;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25); transform: rotate(-3deg);
  animation: stamp 0.55s var(--spring) both 0.5s;
}
.sticker img, .sticker .st-emoji { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; font-size: 2rem; }
.parts { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 6px; animation: rise 0.4s ease both 0.8s; }
.part { display: grid; grid-template-columns: 84px 1fr 30px; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); }
.part i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); position: relative; overflow: hidden; }
.part i::after { content: ''; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, var(--yellow), var(--primary)); border-radius: 4px; animation: grow 1s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.9s; }
.part b { text-align: right; color: #fff; }

/* ───── голосование ───── */
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vcard {
  position: relative; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 14px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  border: 3px solid transparent; transition: transform 0.25s var(--spring), border-color 0.2s;
}
.vcard .ava { --s: 72px; }
.vcard-name { font-weight: 700; font-size: 0.88rem; line-height: 1.2; }
.vcard-score { font-family: var(--font-display); font-size: 0.8rem; color: var(--primary); }
.vcard-score.orig { color: var(--muted); font-family: var(--font); }
.vcard .wave { height: 36px; }
.vcard-btns { display: flex; gap: 6px; width: 100%; }
.vcard-btns .btn { flex: 1; }
.vcard-btns .btn.icon { flex: 0 0 42px; width: 42px; }
.vcard.on { border-color: var(--pink); transform: translateY(-3px); }
.vcard.on::after { content: '❤️'; position: absolute; top: -12px; right: -8px; font-size: 1.8rem; animation: pop 0.4s var(--spring); }
.vote-count { text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ───── итоги ───── */
.results { list-style: none; margin: 0; padding: 6px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.results li { display: grid; grid-template-columns: 44px 1fr auto 56px 48px; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 16px; animation: slidein 0.45s var(--spring) both; }
.results li:nth-child(odd) { background: var(--surface-2); }
.results li.head { animation: none; background: none; font-size: 0.72rem; color: var(--muted); padding-bottom: 2px; }
.results li .ava { --s: 40px; }
.r-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-votes { font-size: 0.85rem; color: var(--pink); font-weight: 700; }
.r-pts { font-family: var(--font-display); font-weight: 700; color: var(--mint-d); text-align: right; }
.r-total { font-family: var(--font-display); font-weight: 700; text-align: right; }
.results li.head span:nth-child(4), .results li.head span:nth-child(5) { text-align: right; }

/* ───── финал ───── */
.final-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: linear-gradient(160deg, #3b2d72, #1f1a2e); color: #fff; padding: 20px 14px 0; }
.final-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.final-hero h2 { position: relative; margin: 0 0 8px; text-align: center; font-size: 1.6rem; }
.podium { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 31%; max-width: 160px; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.pod .pts { font-family: var(--font-display); font-size: 0.85rem; color: var(--yellow); }
.pod .ava { --s: 64px; animation: hop 1.4s ease-in-out infinite; }
.pod1 .ava { --s: 92px; box-shadow: 0 0 0 4px var(--yellow), 0 0 40px rgba(255, 200, 61, 0.6); }
.pod2 .ava { animation-delay: 0.2s; }
.pod3 .ava { animation-delay: 0.4s; }
.pod .step-block { width: 100%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--ink); border-radius: 16px 16px 0 0; animation: growup 0.7s var(--spring) both; }
.pod1 .step-block { height: 120px; background: linear-gradient(var(--yellow), #ffb300); animation-delay: 0.3s; }
.pod2 .step-block { height: 86px; background: linear-gradient(#eef0f6, #c9cedb); animation-delay: 0.15s; }
.pod3 .step-block { height: 62px; background: linear-gradient(#ffcf9e, #e0995a); }
.titles { display: grid; gap: 10px; }
.title-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); animation: slidein 0.5s var(--spring) both; }
.title-card:nth-child(2) { animation-delay: 0.1s; }
.title-card:nth-child(3) { animation-delay: 0.2s; }
.title-card:nth-child(4) { animation-delay: 0.3s; }
.t-emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: #fff3d1; flex: 0 0 auto; }
.title-card div { display: flex; flex-direction: column; min-width: 0; }
.title-card b { font-size: 0.95rem; }
.title-card div > span { color: var(--muted); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.title-card .ava { --s: 22px; }
.rest { margin: 0; padding: 0 0 0 20px; color: var(--muted); }

/* ───── реакции, тосты, оверлеи ───── */
.reactions {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 26;
  display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  background: rgba(31, 26, 46, 0.92); backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
}
.reactions button { width: 50px; height: 50px; border: 0; border-radius: 50%; background: none; font-size: 1.6rem; transition: transform 0.2s var(--spring), background 0.2s; }
.reactions small { display: none; }
.reactions button:active { transform: scale(1.35); background: rgba(255, 255, 255, 0.12); }
.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.floater { position: absolute; bottom: 90px; font-size: 2.6rem; animation: float 2.6s ease-out forwards; display: flex; flex-direction: column; align-items: center; }
.floater .ava { --s: 26px; margin-top: -6px; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; } /* без размера холст шириной в пиксели экрана ×3 — страница ездила вбок */
.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -30px); z-index: 50;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none; transition: 0.3s var(--spring); text-align: center; font-weight: 600; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: var(--bad); color: #fff; text-align: center; padding: 8px; font-weight: 600; }
.unmute { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 45; }
.sheet-bg { position: fixed; inset: 0; z-index: 44; background: rgba(31, 26, 46, 0.35); animation: fade 0.2s; }
.mictest {
  position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45; max-width: 420px; margin: 0 auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; animation: rise 0.35s var(--spring);
}
.mictest p { margin: 0; font-weight: 600; }
.meter { width: 100%; height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--yellow), var(--primary)); transition: width 0.05s; border-radius: 7px; }

/* видео внутри аватаров и обложек ведут себя как картинки */
.ava video, .pack-cover video, .prompt-cover video, .inter-media video, .hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pack-cover video { position: absolute; inset: 0; }

/* выбор героя на главном экране */
.hero-pick { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.hero-arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 1.6rem; font-weight: 700; color: var(--violet); line-height: 1; flex: 0 0 auto; }
.hero-arrow:active { transform: scale(0.9); }
.hero-media { cursor: pointer; }
.hero-media .ava.hero { --s: 100%; width: 100%; height: 100%; }
.hero-media .ava.hero .ava-emoji { font-size: 7rem; }
.hero-media.swap { animation: pop 0.45s var(--spring); }
.hero-name { margin: 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.hero .logo { margin-top: 4px; }

/* герой над кнопкой записи и у кнопки «послушать» */
.rec-who { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; }
.rec-who .ava.xl { --s: 104px; }
.rec-name { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.listen-who { position: relative; flex: 0 0 auto; }
.listen-who .ava.lg { --s: 60px; }
.listen-who .play-ico { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; font-size: 0.75rem; box-shadow: 0 3px 0 var(--violet-d); }
.vcard .puppet { --s: 80px; }

/* «кукла»: рот под звук и позы */
.puppet { --lvl: 0; transform: translateY(calc(var(--lvl) * -8px)) scale(calc(1 + var(--lvl) * 0.07), calc(1 - var(--lvl) * 0.04)); transition: transform 0.07s linear; }
.puppet .mf { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.puppet[data-m="0"] .mf0, .puppet[data-m="1"] .mf1, .puppet[data-m="2"] .mf2 { opacity: 1; }
.puppet .pose { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.15s; }
.puppet.posed .pose { opacity: 1; }
.puppet.pose-win { animation: victory 0.9s var(--spring) 2; }
.puppet.pose-shrug { animation: shrug 1.1s ease-in-out 1; }
.puppet.pose-fail { animation: droop 1.2s ease-in-out forwards; }
@keyframes victory { 0% { transform: none; } 30% { transform: translateY(-26px) rotate(-8deg) scale(1.08); } 55% { transform: translateY(0) rotate(6deg) scale(0.96, 1.04); } 75% { transform: translateY(-10px) rotate(-3deg); } 100% { transform: none; } }
@keyframes shrug { 0%, 100% { transform: none; } 25% { transform: rotate(-9deg) translateY(-4px); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }
@keyframes droop { 0% { transform: none; } 30% { transform: rotate(10deg) translateY(4px); } 60% { transform: rotate(-6deg) translateY(10px) scale(0.95, 1.02); } 100% { transform: rotate(4deg) translateY(10px) scale(0.94); filter: saturate(0.6); } }

/* заставка между раундами */
.inter {
  position: fixed; inset: 0; z-index: 48; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(124, 92, 255, 0.92), rgba(31, 26, 46, 0.96));
  animation: fade 0.25s ease both; cursor: pointer;
}
.inter.out { animation: fadeout 0.35s ease forwards; }
.inter-card { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; padding: 24px; }
.inter-media {
  width: min(62vw, 260px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #fff, #ffd9c4); font-size: 6rem;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.15), 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: zoomin 0.6s var(--spring) both;
}
.inter-media img { width: 100%; height: 100%; object-fit: cover; }
.inter h2 { margin: 6px 0 0; font-size: clamp(2rem, 10vw, 3rem); font-weight: 800; animation: zoomin 0.55s var(--spring) both 0.12s; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.inter p { margin: 0; font-size: 1.15rem; font-weight: 600; opacity: 0.9; animation: rise 0.45s var(--spring) both 0.25s; }

/* медленно плывущие пятна на фоне */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(60px); opacity: 0.35; pointer-events: none;
}
body::before { background: #ff9bc6; top: -25vmax; right: -20vmax; animation: drift 22s ease-in-out infinite alternate; }
body::after { background: #b6a4ff; bottom: -30vmax; left: -25vmax; animation: drift 28s ease-in-out infinite alternate-reverse; }

/* ───── анимации ───── */
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }
@keyframes zoomin { 0% { transform: scale(0.2) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vmax, 8vmax) scale(1.15); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
@keyframes stamp { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 60% { transform: scale(0.92) rotate(-2deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes ripple { from { transform: scale(1); opacity: 0.6; } to { transform: scale(1.6); opacity: 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } 60% { transform: translateY(0); } }
@keyframes eq { from { height: 10px; margin-top: -5px; } to { height: 30px; margin-top: -15px; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
@keyframes grow { from { width: 0; } }
@keyframes growup { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@keyframes slidein { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes float { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { transform: translateY(-20px) scale(1.15); opacity: 1; } 100% { transform: translateY(-60vh) rotate(18deg); opacity: 0; } }

@media (max-width: 420px) {
  .av-grid { gap: 6px; }
  .invite-code { font-size: 2.6rem; letter-spacing: 9px; margin-right: -9px; }
  .seg { grid-template-columns: 1fr; }
  .results li { grid-template-columns: 38px 1fr auto 44px 40px; gap: 6px; }
  .results li .ava { --s: 34px; }
  .tb-round { display: none; }
}
@media (min-width: 700px) {
  .vgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* экраны записи компактнее, чтобы кнопка была видна без прокрутки */
.play:has(.rec) { gap: 12px; }
.play:has(.rec) .prompt { padding: 12px 16px; }
.play:has(.rec) .prompt-cover { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 12px; }
.play:has(.rec) .prompt b { font-size: 1.02rem; }
.play:has(.rec) .title { font-size: clamp(1.2rem, 5vw, 1.5rem); }
.rec-btn { width: 132px; height: 132px; }

/* сцена прямого эфира */
.perf .score-box { min-height: 0; }
.perf .score-box:not(:empty) { min-height: 150px; }
.onair {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  background: var(--bad); color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: 999px; opacity: 0; transform: scale(0.6); transition: 0.25s var(--spring);
}
.spot.on-air .onair { opacity: 1; transform: none; animation: pulse 0.8s ease-in-out infinite alternate; }
.spot.on-air { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.55), var(--shadow-lg); }
.spot .who:not(.singing) .eq i { opacity: 0; }
.spot:not(.on-air) .who.singing .eq i { animation-play-state: paused; opacity: 0.25; }
.spot h2 small { font-size: 0.7em; opacity: 0.7; }
.perf .rec { padding: 18px; }

.perf .spot .who { margin: 34px 0 30px; }

/* три режима и группы звуков */
.seg3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .seg3 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  border: 2px solid var(--line); background: var(--surface-2); border-radius: 999px;
  padding: 9px 14px; font-weight: 600; font-size: 0.92rem; transition: 0.2s var(--spring);
}
.chip-btn small { color: var(--muted); font-weight: 500; }
.chip-btn.on { border-color: var(--violet); background: #f3efff; transform: translateY(-2px); }
.chip-btn:disabled { cursor: default; }

.next-up { display: inline-flex; align-items: center; gap: 8px; }
.next-up .ava { --s: 28px; }


/* «Угадай, откуда»: 4 картинки-варианта */
.seg4 { grid-template-columns: 1fr 1fr; }
.guess-spot { padding: 14px 16px 26px; }
.guess-spot .ava.xl { --s: 96px; }
.gopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.gopt { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 10px; border: 3px solid transparent; border-radius: 18px; background: var(--card, #fff); box-shadow: 0 6px 18px rgba(31, 26, 46, 0.08); font: inherit; color: var(--ink); cursor: pointer; text-align: center; transition: transform 0.15s, border-color 0.2s, opacity 0.3s; }
.gopt:not([disabled]):active { transform: scale(0.96); }
.gopt b { font-size: 0.88rem; line-height: 1.2; padding: 0 4px; }
.gpic { display: grid; place-items: center; aspect-ratio: 8 / 5; border-radius: 13px; overflow: hidden; background: linear-gradient(135deg, #ffe9c7, #ffd0e0); }
.gpic img { width: 100%; height: 100%; object-fit: cover; }
.gemoji { font-size: 2.4rem; }
.gopt.mine { border-color: var(--violet, #7c5cff); }
.gopt[disabled] { cursor: default; }
.gopt.right { border-color: #22c55e; animation: pop 0.45s ease both; }
.gopt.right::after { content: '✓'; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; font-weight: 800; }
.gopt.wrong { border-color: #ef4444; opacity: 0.75; }
.gwho { display: flex; justify-content: center; gap: 2px; }
.gwho .ava { --s: 26px; }
.gres { text-align: center; font-weight: 700; margin-top: 10px; color: var(--muted); }
.gres.ok { color: #16a34a; font-size: 1.15rem; animation: pop 0.4s ease both; }
.gres.bad { color: #dc2626; }

/* ── Главное меню: три больших кнопки ── */
.menu { display: grid; gap: 12px; }
.menu-btn {
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  padding: 16px 18px; border: 0; border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  font: inherit; cursor: pointer; transition: transform 0.15s var(--spring);
}
.menu-btn:active { transform: scale(0.97); }
.menu-btn i { grid-row: span 2; font-style: normal; font-size: 2rem; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); }
.menu-btn b { font-family: var(--font-display); font-size: 1.05rem; }
.menu-btn span { color: var(--muted); font-size: 0.85rem; }
.menu-btn.primary { background: linear-gradient(135deg, var(--primary), #ff8a3c); color: #fff; }
.menu-btn.violet { background: linear-gradient(135deg, var(--violet), #a07cff); color: #fff; }
.menu-btn.primary span, .menu-btn.violet span { color: rgba(255, 255, 255, 0.85); }
.menu-btn.primary i, .menu-btn.violet i { background: rgba(255, 255, 255, 0.2); }
.home-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.link-btn { border: 0; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.age-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.age-chips .chip-btn { flex: 1; min-width: 72px; }
.shake { animation: wobble 0.15s 3; }

/* ── Подстраницы: вход, лидеры, приглашение ── */
.subpage { display: grid; gap: 14px; }
.back-btn { justify-self: start; border: 0; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.sub-title { font-size: 1.05rem; margin: 6px 0 0; }
.sub-title small { color: var(--muted); font-weight: 500; }
.rooms { display: grid; gap: 10px; }
.room-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.room-card .ava { --s: 46px; }
.room-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.room-info span { color: var(--muted); font-size: 0.85rem; }
.room-n { font-family: var(--font-display); font-weight: 700; color: var(--violet); }
.empty { text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; padding: 18px 0; }
.tabs { display: flex; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.tab { flex: 1; border: 0; background: none; border-radius: 999px; padding: 10px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--ink); color: #fff; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.lb li.me { outline: 3px solid var(--violet); }
.lb .ava { --s: 38px; }
.lb-place { width: 28px; text-align: center; font-family: var(--font-display); font-weight: 700; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-name small { color: var(--violet); }
.lb-pts { font-family: var(--font-display); }
.lb-me { text-align: center; color: var(--muted); margin-top: 6px; }
.invite-card p { margin: 0 0 12px; line-height: 1.45; }
.ref-link { padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 2px dashed var(--line); font-weight: 600; word-break: break-all; text-align: center; cursor: pointer; margin-bottom: 12px; }
.invited { margin-top: 14px; text-align: center; color: var(--muted); }
.invited b { color: var(--ink); }

/* ── Лобби: одиночная игра, настройки комнаты ── */
.solo-head { text-align: center; display: grid; gap: 8px; justify-items: center; }
.solo-head h2, .solo-head p { margin: 0; }
.room-opts { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 12px; }

/* ── Оценка звука ── */
.rate { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-weight: 600; color: var(--muted); }
.rate button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); font-size: 1.3rem; cursor: pointer; transition: transform 0.15s var(--spring); }
.rate button.on { border-color: var(--violet); background: #efe9ff; transform: scale(1.12); }
.spot .rate { color: rgba(255, 255, 255, 0.75); }

/* ── Главный экран v2 ── */
.home { display: grid; gap: 14px; }
.logo.small { font-size: 2.6rem; margin: 0; text-align: center; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.me-card .ava { --s: 64px; }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.me-info b { font-family: var(--font-display); font-size: 1.1rem; }
.me-info span { color: var(--muted); font-size: 0.88rem; }
.me-edit { font-style: normal; opacity: 0.6; }
.home-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.home-nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 0; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.75); box-shadow: var(--shadow); font: inherit; font-weight: 600; font-size: 0.85rem; color: var(--ink); cursor: pointer; }
.home-nav i { font-style: normal; font-size: 1.5rem; }
.badge { position: absolute; top: 6px; right: 14%; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 0.72rem; display: grid; place-items: center; animation: pop 0.4s var(--spring); }

/* вызов по ссылке и напоминание о реванше */
.ch-card { display: grid; gap: 10px; padding: 18px; border-radius: var(--r); color: #fff; background: radial-gradient(120% 90% at 0% 0%, #7c5cff, #3b2d72); box-shadow: var(--shadow-lg); animation: rise 0.4s var(--spring); }
.ch-kicker { font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.82rem; color: var(--yellow); }
.ch-who { display: flex; align-items: center; gap: 10px; }
.ch-who .ava { --s: 48px; }
.ch-label { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.ch-card .btn.ghost { color: rgba(255, 255, 255, 0.8); }
.remind { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: var(--r); background: #fff3c9; box-shadow: var(--shadow); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.remind .ava { --s: 44px; }
.remind .rm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.remind .rm-text span { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remind i { font-style: normal; font-size: 1.4rem; color: var(--muted); }

/* профиль */
.profile-page .hero-pick { margin-top: 4px; }

.hero-name .lock { display: block; font-size: 0.85rem; color: var(--violet); font-weight: 700; }

/* друзья и награды */
.reward-head { text-align: center; display: grid; gap: 6px; justify-items: center; }
.big-num { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--violet); }
.progress { width: 100%; height: 12px; border-radius: 6px; background: #efe9ff; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--pink)); transition: width 0.3s; }
.rewards { display: grid; gap: 8px; }
.reward { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); opacity: 0.75; }
.reward.on { opacity: 1; outline: 3px solid var(--mint); }
.reward .ava { --s: 46px; }
.reward:not(.on) .ava { filter: grayscale(0.8); }
.rw-info { flex: 1; display: flex; flex-direction: column; }
.rw-info span { color: var(--muted); font-size: 0.85rem; }
.rw-state { font-size: 1.3rem; }
.invite-label { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; text-align: center; }

/* вызовы */
.ch-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.ch-row .ava { --s: 42px; }
.ch-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-info span { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-sent { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 8px; }
.ch-sent-head { display: flex; align-items: center; gap: 10px; }
.ch-sent-head > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-sent-head > span span { color: var(--muted); font-size: 0.85rem; }
.ch-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ch-results li { display: flex; align-items: center; gap: 8px; }
.ch-results .ava { --s: 30px; }
.ch-results span { flex: 1; }
.ch-results em { font-style: normal; font-size: 0.8rem; font-weight: 700; }
.ch-results em.ok { color: var(--mint-d); }
.ch-results em.bad { color: var(--bad); }
.ch-btn { margin-top: 10px; }

/* дуэль в итогах вызова */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 14px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-lg); animation: rise 0.4s var(--spring); }
.duel.win { outline: 3px solid var(--mint); }
.duel.lose { outline: 3px solid var(--bad); }
.duel-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.duel-side .ava { --s: 64px; }
.duel-side b { font-family: var(--font-display); font-size: 1.6rem; }
.duel-side span { color: var(--muted); font-size: 0.85rem; }
.duel-vs { display: flex; flex-direction: column; align-items: center; font-size: 2rem; }
.duel-vs span { font-size: 0.85rem; font-weight: 800; }
.duel .btn { grid-column: 1 / -1; }

/* видео-открытка */
.postcard { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(31, 26, 46, 0.65); backdrop-filter: blur(6px); }
.postcard[hidden] { display: none; }
.pc-card { width: min(420px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); text-align: center; animation: pop 0.35s var(--spring); }
.pc-card h2 { margin: 0; }
.pc-card video { width: 100%; max-height: 62vh; border-radius: var(--r); background: #000; }
.pc-btns { display: grid; gap: 8px; }
.hero-media .ava.hero { display: grid; place-items: center; }
.hero-media .ava.hero .ava-emoji { line-height: 1; }
.age-chips .chip-btn { min-width: 0; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.profile-page .hero-name { text-align: center; margin: 0; }

/* ── Уровень и опыт ── */
.lvl { display: flex; align-items: center; gap: 10px; width: 100%; }
.lvl-n { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 6px 14px rgba(124, 92, 255, 0.35); }
.lvl-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.lvl-body b { font-size: 0.95rem; }
.lvl-xp { font-size: 0.75rem; color: var(--muted); }
.lvl.mini .lvl-n { width: 28px; height: 28px; border-radius: 9px; font-size: 0.8rem; }
.lvl.mini .lvl-body b { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.lvl.mini .progress { height: 8px; }
.lvl.mini .lvl-xp { display: none; }
.lvl.big { padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.lvl.big .lvl-n { width: 54px; height: 54px; border-radius: 16px; font-size: 1.4rem; }

/* ── «Сегодня»: звук дня + задания ── */
.today { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.today-head { display: flex; align-items: center; justify-content: space-between; }
.today-head b { font-family: var(--font-display); font-size: 1.05rem; }
.streak { padding: 4px 10px; border-radius: 999px; background: #fff0e0; color: var(--primary-d); font-weight: 700; font-size: 0.82rem; }
.daily-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: linear-gradient(135deg, #fff6d8, #ffe9f2); }
.daily-ico { font-size: 1.8rem; }
.daily-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.daily-info span { font-size: 0.82rem; color: var(--muted); }
.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.quests li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; }
.quests .q-title { flex: 1; }
.quests .q-prog { font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.quests li.ok .q-title { text-decoration: line-through; color: var(--muted); }
.quests li.ok .q-prog { color: var(--mint-d); }
.q-foot { font-size: 0.78rem; color: var(--muted); text-align: center; }

/* ── Мой профиль ── */
.me-hero { display: grid; justify-items: center; gap: 6px; text-align: center; }
.me-hero .title { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.stats b { font-family: var(--font-display); font-size: 1.05rem; }
.stats span { font-size: 0.72rem; color: var(--muted); }
.achs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 0; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; }
.ach i { font-style: normal; font-size: 1.8rem; filter: grayscale(1); opacity: 0.35; }
.ach.on { color: var(--ink); outline: 2px solid var(--yellow); }
.ach.on i { filter: none; opacity: 1; }
.acc-form, .acc-ok { display: grid; gap: 10px; }
.acc-ok b { color: var(--violet); }

/* ── Окно наград ── */
.news h2 { font-family: var(--font-display); }
.nw-check { display: grid; gap: 6px; }
.nw-check b { font-size: 1.2rem; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 4px; }
.week i { font-style: normal; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #f3eee8; color: var(--muted); font-weight: 700; }
.week i.on { background: linear-gradient(135deg, var(--primary), var(--yellow)); color: #fff; }
.nw-up { font-size: 1.15rem; font-weight: 700; color: var(--violet); animation: pop 0.5s var(--spring); }
.nw-xp { font-family: var(--font-display); font-size: 2rem; color: var(--mint-d); animation: pop 0.5s var(--spring); }
.nw-achs { display: grid; gap: 8px; }
.nw-ach { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: #fff8e6; text-align: left; animation: rise 0.4s var(--spring) both; }
.nw-ach i { font-style: normal; font-size: 2rem; }
.nw-ach > span { display: flex; flex-direction: column; }
.nw-ach > span span { color: var(--muted); font-size: 0.85rem; }

/* Выбор героя: в полный рост, рот двигается так же */
.hero-media:has(.full) { width: min(calc(100vw - 150px), 280px); aspect-ratio: 1; border-radius: 36px; background: #fcd8bb; }
.ava.puppet.full { --s: 100%; width: 100%; height: 100%; border-radius: 0; background: transparent; box-shadow: none; }
.ava.puppet.full .mf, .ava.puppet.full .pose { object-fit: contain; object-position: center bottom; }

/* Поле имени с волшебной палочкой */
.field > label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.name-wrap { position: relative; }
.name-wrap input { width: 100%; padding-right: 58px; }
.wand { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #efe9ff, #ffe4f1); font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 10px rgba(124, 92, 255, 0.18); }
.wand:active { transform: translateY(-50%) scale(0.9); }
.wand.spin { animation: wand 0.5s var(--spring); }
@keyframes wand { 0% { transform: translateY(-50%) rotate(0); } 50% { transform: translateY(-50%) rotate(-25deg) scale(1.15); } 100% { transform: translateY(-50%) rotate(0); } }
input.flash { animation: flashin 0.5s ease; }
@keyframes flashin { 0% { background: #efe9ff; } 100% { background: var(--surface-2); } }
/* В эфире: подпись слева, значок «В ЭФИРЕ» справа — не наезжают друг на друга */
.spot.on-air:has(.onair) .kind { align-self: flex-start; }
.guess-spot .who { margin: 28px 0 24px; }

/* Эталон: круг с живыми столбиками звука вместо лица */
.ava.wave-ball { display: flex; align-items: center; justify-content: center; gap: 6%; padding: 0 16%;
  background: radial-gradient(circle at 50% 35%, #a07cff, #5a3ed6 70%); box-shadow: 0 0 0 6px rgba(255, 200, 61, 0.35), 0 14px 30px rgba(90, 62, 214, 0.45); }
.ava.wave-ball i { flex: 1; height: 62%; border-radius: 99px; background: linear-gradient(#fff, #ffe3a3); transform: scaleY(0.14); transition: transform 0.07s linear; }
.spot:not(.on-air) .ava.wave-ball i, .who:not(.singing) .ava.wave-ball i { animation: idlebar 1.2s ease-in-out infinite alternate; }
.ava.wave-ball i:nth-child(2n) { animation-delay: 0.3s; }
.ava.wave-ball i:nth-child(3n) { animation-delay: 0.6s; }
@keyframes idlebar { from { transform: scaleY(0.14); } to { transform: scaleY(0.3); } }

/* ═════════════ Дизайн v3: всё помещается в один экран ═════════════ */
:root {
  --bg: #fff3e6;
  --ink: #1f1a2e;
  --muted: #6e6580;
  --primary: #e8432a;
  --primary-d: #b8301b;
  --violet: #5b3fe0;
  --violet-d: #4128b8;
  --night: #241d3d;
  --night-2: #3a2f5e;
  --night-ink: #d7d0ee;
  --line: #efe6db;
  --surface-2: #f6f1ea;
  --shadow: 0 8px 24px rgba(31, 26, 46, 0.07);
}
html { background: var(--bg); }
body::before, body::after { display: none; }
.ic { display: block; flex: 0 0 auto; }
.home-btn, .sound-btn, .sq-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.08); flex: 0 0 auto; cursor: pointer;
}
.tb-pill { border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.08); }
.tb-code { color: var(--violet); }

/* главная */
body.has-tabbar { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.home { gap: 12px; padding-top: max(2px, env(safe-area-inset-top)); }
.home-top { display: flex; align-items: center; gap: 8px; height: 44px; }
.logo-h { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; color: var(--primary); }
.me-card { gap: 12px; padding: 12px 14px; border-radius: 22px; }
.me-card .me-ava { --s: 54px; box-shadow: 0 0 0 3px var(--yellow); }
.me-info { gap: 6px; }
.me-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.me-row b { font-family: var(--font); font-weight: 700; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-streak { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: #c2410c; white-space: nowrap; }
.me-sub { color: var(--muted); font-size: 13px; }
.lvl.mini { gap: 8px; }
.lvl.mini .lvl-n { color: #fff; width: auto; height: auto; padding: 3px 7px; border-radius: 8px; font-size: 12px; background: var(--violet); box-shadow: none; }
.lvl.mini .lvl-body { display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; }
.lvl.mini .lvl-body b { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.lvl.mini .progress { flex: 1; height: 8px; background: #eee8ff; }
.lvl.mini .progress i { background: var(--violet); }

.today { gap: 12px; padding: 14px; border-radius: 22px; }
.daily-row { padding: 0; background: none; gap: 12px; }
.daily-ico { width: 48px; height: 48px; border-radius: 16px; background: var(--night); display: flex; align-items: center; justify-content: center; gap: 3px; flex: 0 0 auto; }
.daily-ico i { display: block; width: 4px; border-radius: 2px; background: var(--yellow); animation: dbar 1.1s ease-in-out infinite alternate; }
@keyframes dbar { from { transform: scaleY(0.55); } to { transform: scaleY(1); } }
.daily-ico i:nth-child(1), .daily-ico i:nth-child(5) { height: 11px; }
.daily-ico i:nth-child(2), .daily-ico i:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.daily-ico i:nth-child(3) { height: 28px; background: #fff; animation-delay: 0.6s; }
.daily-info b { font-size: 16px; }
.daily-info span { font-size: 13px; }
.pill-btn { height: 44px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--primary); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; flex: 0 0 auto; }
.pill-btn.ghost { background: var(--surface-2); color: var(--ink); }
.pill-btn:active { transform: scale(0.96); }
.quests { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quests li { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 7px 9px; border-radius: 14px; background: var(--surface-2); font-size: 11.5px; }
.quests li b { color: var(--muted); font-size: 12px; }
.quests li span { line-height: 1.2; }
.quests li.ok { background: #eaf8f1; }
.quests li.ok b { color: #1f6b4a; }

.banner {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 10px;
  width: 100%; border: 0; overflow: hidden; cursor: pointer;
  border-radius: 26px; color: #fff; text-align: left; font: inherit; text-decoration: none;
  transition: transform 0.15s var(--spring);
}
.banner:active { transform: scale(0.98); }
.bn-text { position: relative; display: flex; flex-direction: column; gap: 4px; }
.bn-text b { font-family: var(--font-display); font-weight: 800; line-height: 1.05; }
.bn-text span { font-size: 13px; line-height: 1.3; }
.bn-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 14px; background: #fff; font-weight: 700; font-size: 15px; }
.banner-solo { min-height: 138px; padding: 16px 168px 16px 18px; background: var(--primary); box-shadow: 0 14px 30px rgba(232, 67, 42, 0.35); }
.banner-solo .bn-hero { position: absolute; right: -16px; bottom: -34px; width: 176px; height: 176px; border-radius: 50%; object-fit: cover; object-position: center 8%;
  background: #fcd8bb; box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.2); }
.banner-solo .ava.bn-hero { --s: 176px; }
.banner-solo .bn-text b { font-size: 24px; }
.banner-solo .bn-text span { color: #ffe9e3; }
.banner-solo .bn-btn { color: #c2321b; }
.banner-friends { min-height: 132px; padding: 14px 14px 14px 166px; background: var(--violet); box-shadow: 0 14px 30px rgba(91, 63, 224, 0.35); }
.bn-crew { position: absolute; left: 0; top: 0; width: 160px; height: 100%; }
.bn-crew .ava { position: absolute; box-shadow: 0 0 0 4px var(--violet); }
.bn-crew .crew0 { --s: 64px; left: 10px; top: 10px; }
.bn-crew .crew1 { --s: 56px; left: 70px; top: 4px; }
.bn-crew .crew2 { --s: 58px; left: 92px; top: 58px; }
.bn-crew .crew3 { --s: 60px; left: 36px; top: 68px; }
.bn-crew .crew4 { --s: 48px; left: -14px; top: 76px; }
.banner-friends .bn-text b { font-size: 21px; }
.banner-friends .bn-text span { color: #e3dcff; }
.banner-friends .bn-btn { color: #4a31c9; }
.banner-join { height: 104px; padding: 0; background: var(--yellow); color: var(--night); box-shadow: 0 14px 30px rgba(230, 160, 20, 0.35); }
.bj-find { position: absolute; left: 12px; top: 10px; bottom: 10px; width: 120px; border-radius: 20px; background: var(--night); color: var(--yellow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transform: rotate(-4deg); }
.bj-find b { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: 0.04em; }
.bj-find .bj-code { font-size: 26px; letter-spacing: 4px; }
.banner-join .bn-text { position: absolute; left: 148px; top: 24px; right: 14px; }
.banner-join .bn-text b { font-size: 19px; }
.banner-join .bn-text span { color: #5c4a12; }
.bj-side { position: absolute; left: 146px; top: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.bj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.bj-head b { font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj-head small { font-size: 11px; font-weight: 700; color: #5c4a12; white-space: nowrap; }
.bj-rooms { display: flex; flex-direction: column; gap: 4px; }
.bj-room { height: 28px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.55); display: flex; align-items: center; gap: 6px; padding: 0 8px 0 3px; font: inherit; color: var(--night); cursor: pointer; text-align: left; }
.bj-room .ava { --s: 22px; }
.bj-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj-name i { font-style: normal; font-weight: 500; color: #5c4a12; }
.bj-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.bj-n i { width: 6px; height: 6px; border-radius: 50%; background: #1fbf84; }
.bj-empty { font-size: 13px; line-height: 1.3; color: #5c4a12; }

/* нижнее меню */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  max-width: 560px; margin: 0 auto; height: calc(70px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
  background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 24px rgba(31, 26, 46, 0.06);
}
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 6px 0; }
.tabbar button.on { color: var(--primary); font-weight: 700; }
.tabbar .badge { top: 0; right: 22%; background: var(--primary); }
.has-tabbar .subpage .back-btn { display: none; }
.has-tabbar .stage { padding-bottom: 8px; }
.has-tabbar .home { gap: 10px; }

/* лобби */
.lobby { display: flex; flex-direction: column; gap: 12px; }
.lobby .card { padding: 14px; gap: 10px; margin: 0; border-radius: 22px; }
.card-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.code-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--night); color: #fff; }
.cc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.cc-label { font-size: 12px; color: #c9c0e8; font-weight: 600; }
.cc-code { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: 6px; color: var(--yellow); line-height: 1.1; }
.cc-solo { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--yellow); }
.cc-icon { width: 48px; height: 48px; border-radius: 16px; border: 0; background: var(--night-2); color: #fff; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.cc-btn { height: 48px; padding: 0 16px; border-radius: 16px; border: 0; background: var(--yellow); color: var(--night); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; flex: 0 0 auto; }
.open-row { height: 52px; border-radius: 18px; background: #fff; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); padding: 0 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.open-row > .ic { color: #1f9d6b; }
.or-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.or-text b { font-size: 15px; }
.or-text span { font-size: 12px; color: var(--muted); }
.lobby .players { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lobby .pl { gap: 4px; }
.lobby .pl .ava { --s: 60px; border: 3px solid #fff; }
.lobby .pl.me .ava { border-color: var(--yellow); }
.lobby .pl .crown { top: -8px; left: auto; right: 6px; transform: none; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 13px; }
.lobby .pl-name { font-size: 13px; }
.lobby .pl-empty { cursor: pointer; }
.lobby .pl-empty .ava { border: 2px dashed #e2d6c8; }
.mode-card { position: relative; z-index: 3; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode-wrap { position: relative; }
.lobby .mode { width: 100%; height: 60px; flex-direction: row; align-items: center; gap: 8px; padding: 0 28px 0 10px; border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lobby .mode .ic { color: var(--muted); }
.lobby .mode b { font-size: 13.5px; line-height: 1.2; }
.lobby .mode.on { border-color: var(--violet); background: #f1edff; transform: none; }
.lobby .mode.on .ic { color: var(--violet); }
.mode-i { position: absolute; top: 0; right: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; }
.mode-i span { width: 20px; height: 20px; border-radius: 50%; background: #b7aec4; color: #fff; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.mode-i.on span { background: var(--primary); }
.mode-tip { position: absolute; left: 10px; right: 10px; top: calc(100% - 4px); z-index: 5; background: var(--night); color: #fff; border-radius: 18px; padding: 14px 44px 14px 16px; box-shadow: 0 16px 34px rgba(31, 26, 46, 0.35); display: flex; flex-direction: column; gap: 4px; animation: rise 0.25s var(--spring); }
.tip-arrow { position: absolute; top: -7px; width: 14px; height: 14px; background: var(--night); transform: rotate(45deg); }
.mode-tip b { font-size: 15px; color: var(--yellow); }
.mode-tip > span { font-size: 14px; line-height: 1.4; color: #e7e2f7; }
.tip-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #c9c0e8; cursor: pointer; font-size: 14px; }
.lobby .chips { gap: 8px; flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
.lobby .chips::-webkit-scrollbar { display: none; }
.lobby .chip-btn { flex: 0 0 auto; white-space: nowrap; }
.lobby .chip-btn { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--surface-2); font-size: 14px; transform: none; }
.lobby .chip-btn.on { background: var(--night); color: #fff; }
.lobby .chip-btn.on small { color: #c9c0e8; }
.lobby .packs { margin: 0 -14px; padding: 2px 14px 4px; gap: 10px; }
.lobby .pack { flex: 0 0 auto; display: grid; grid-template-columns: 52px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 16px; border: 2px solid var(--line); background: #fff; transform: none; }
.lobby .pack.on { border-color: var(--violet); background: #f1edff; transform: none; }
.lobby .pack-cover { grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 12px; font-size: 1.6rem; border: 0; box-shadow: none; }
.lobby .pack.on .pack-cover { border: 0; box-shadow: none; }
.lobby .pack.on .pack-cover::after { display: none; }
.lobby .pack-title { font-size: 13px; white-space: nowrap; align-self: end; }
.lobby .pack-meta { font-size: 12px; align-self: start; }
.lobby .pro { left: 2px; top: 2px; padding: 1px 4px; font-size: 9px; }
.lobby-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lobby .stepper { height: 48px; background: #fff; border-radius: 16px; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); padding: 0; }
.lobby .stepper button { width: 44px; height: 48px; background: none; box-shadow: none; font-size: 22px; }
.lobby .stepper b { font-family: var(--font); font-weight: 700; font-size: 15px; min-width: 76px; }
.lobby-row .pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 48px; background: #fff; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); }
.lobby-row .stepper { flex: 1; justify-content: space-between; }
.sq-btn.on { background: var(--night); color: #fff; }
.more-card { animation: rise 0.25s var(--spring); }
.start-btn { gap: 10px; border-radius: 20px; min-height: 60px; font-weight: 800; }
.dock { background: linear-gradient(transparent, var(--bg) 30%); }

/* верхняя панель в игре: заголовок фазы, под ним раунд и код */
.topbar { padding-bottom: 6px; }
.tb-pill { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 44px; padding: 4px 6px 4px 14px; border-radius: 16px; }
.tb-phase { grid-column: 1 / 3; grid-row: 1; font-size: 15px; line-height: 1.2; }
.tb-round { grid-column: 1; grid-row: 2; display: block !important; font-size: 12px; line-height: 1.2; }
.tb-round:empty { display: none !important; }
.tb-code { grid-column: 2; grid-row: 2; font-size: 11px; letter-spacing: 1px; line-height: 1.2; }
.tb-pill .timer { grid-column: 3; grid-row: 1 / 3; width: 40px; height: 40px; }
.strip:empty { display: none; }
.stage { padding-top: 6px; }

/* ── сцена: всё в один экран ── */
body.no-dock:not(.has-tabbar):not(.has-reactions) { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.play { gap: 12px; }
.play.perf { min-height: calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.perf .prompt, .show .prompt { padding: 12px 16px; border-radius: 20px; }
.perf .prompt-cover { display: none; }
.perf .prompt b { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.15; }
.perf .prompt-label { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.perf .spot { flex: 1; justify-content: center; gap: 10px; border-radius: 28px; background: var(--night); padding: 16px; }
.perf .spot::before { display: none; }
.perf .spot .who { margin: 26px 0 22px; }
.perf .spot .kind { position: absolute; top: 14px; left: 16px; }
.perf .spot h2 { font-size: 22px; }
.perf .listening { margin-top: 0; text-align: center; font-size: 15px; color: var(--night-ink); font-weight: 500; justify-content: center; }
.spot.on-air { box-shadow: 0 0 0 4px var(--primary); }
.onair { background: var(--primary); }
.eq i { background: var(--yellow); }
.ava.wave-ball { background: var(--violet); box-shadow: 0 0 0 8px rgba(255, 200, 61, 0.3), 0 18px 40px rgba(91, 63, 224, 0.5); }

/* оценка прямо на сцене: герой меньше, кольцо рядом */
.perf .spot.revealed { justify-content: flex-start; padding-top: 40px; gap: 8px; }
.perf .spot.revealed .who { margin: 0; }
.perf .spot.revealed .ava.xl { --s: 92px; }
.perf .spot.revealed .eq { display: none; }
.perf .spot.revealed h2 { font-size: 18px; }
.perf .spot.revealed .score-box { min-height: 0; gap: 10px; }
.perf .spot.revealed .listening { display: none; }
.perf .spot.revealed .score-box .listening { display: flex; font-size: 13px; }
.ring { width: 104px; height: 104px; }
.sticker { font-size: 15px; padding: 6px 14px 6px 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.sticker img, .sticker .st-emoji { width: 42px; height: 42px; }
.part { font-size: 13px; grid-template-columns: 84px 1fr 30px; color: var(--night-ink); }
.part i { height: 10px; border-radius: 5px; background: var(--night-2); }
.part i::after { background: var(--yellow); }
.rate button { background: var(--night-2); border-color: #4a3f70; }
.spot .rate button.on { border-color: var(--yellow); background: var(--night-2); }

/* очередь выступлений */
.chain { gap: 12px; flex-wrap: nowrap; overflow-x: auto; justify-content: center; scrollbar-width: none; padding: 4px 2px 0; }
.turn { display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: 0.55; flex: 0 0 auto; }
.turn small { font-size: 11px; font-weight: 600; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain .turn .ava { --s: 40px; opacity: 1; transform: none; box-shadow: none; }
.turn.past { opacity: 0.8; }
.turn.now { opacity: 1; }
.chain .turn.now .ava { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--primary); }
.turn.now small { color: #c2321b; font-weight: 700; }

/* запись: широкая кнопка + секунды */
.rec, .perf .rec { flex-direction: column; align-items: stretch; gap: 8px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.rec-hint { font-size: 13px; min-height: 1.2em; }
.rec-row { display: flex; align-items: center; gap: 12px; }
.rec-btn { flex: 1; width: auto; height: 72px; border-radius: 24px; background: var(--primary); box-shadow: 0 0 0 6px rgba(232, 67, 42, 0.18), 0 14px 30px rgba(232, 67, 42, 0.35);
  font-family: var(--font-display); font-weight: 800; font-size: 18px; animation: none !important; }
.rec-btn:active:not(:disabled) { transform: scale(0.98); box-shadow: 0 0 0 6px rgba(232, 67, 42, 0.18); }
.rec-label { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.rec-btn .mic { display: inline; font-size: 22px; margin: 0; }
.rec-btn .count { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--primary); font-size: 22px; animation: pop 0.45s var(--spring); }
.rec-ring, .rec-ring2 { inset: -6px; border-radius: 28px; }
.rec-btn.on { background: var(--primary); }
.rec-side { width: 72px; height: 72px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto; }
.rec-sec { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.rec-side span { font-size: 11px; color: var(--muted); }
.rec-progress { max-width: none; height: 6px; background: #efe6db; }
.rec-progress i { background: var(--primary); }

/* финал */
.final { gap: 10px; }
.final-hero { border-radius: 28px; background: var(--night); padding: 14px 14px 0; }
.final-hero h2 { font-size: 22px; margin: 0 0 6px; }
.final .pod .ava { --s: 60px; }
.final .pod1 .ava { --s: 82px; }
.final .pod1 .step-block { height: 96px; }
.final .pod2 .step-block { height: 70px; }
.final .pod3 .step-block { height: 50px; }
.titles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.title-card { flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 18px; }
.t-label { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.title-card b { font-size: 14px; }
.acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.act { min-height: 52px; padding: 6px 10px; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow); font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; line-height: 1.2; }
.act.wide { grid-column: 1 / -1; }
.act.hot { background: var(--violet); color: #fff; }
.act.violet { background: var(--night); color: #fff; }
.act:active { transform: scale(0.97); }
.rec-wait { flex: 1; height: 72px; border-radius: 24px; background: #e9e1d6; color: #8a8196; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; }
.spot { background: var(--night); border-radius: 28px; }
.spot::before { display: none; }
.achs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ach { padding: 8px 3px; font-size: 10.5px; overflow-wrap: anywhere; border-radius: 14px; line-height: 1.2; }
.ach i { font-size: 1.5rem; }
.stats div { border-radius: 16px; }

/* Выступающий на сцене — в полный рост в рамке, как в выборе героя; рамка светится в такт голосу */
.hero-frame { --lvl: 0; position: relative; width: min(70vw, 280px); aspect-ratio: 1; border-radius: 32px; overflow: hidden; background: #fcd8bb;
  box-shadow: 0 0 0 calc(4px + var(--lvl) * 8px) rgba(255, 200, 61, calc(0.35 + var(--lvl) * 0.5)), 0 18px 40px rgba(0, 0, 0, 0.35); transition: box-shadow 0.08s linear; }
.hero-frame .ava.puppet { --s: 100%; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.hero-frame .ava.puppet:not(.full) img { object-fit: cover; }
.perf .spot .who.hero-frame, .spot .who.hero-frame { margin: 8px 0; }
.spot.on-air .hero-frame { box-shadow: 0 0 0 calc(4px + var(--lvl) * 10px) rgba(232, 67, 42, calc(0.55 + var(--lvl) * 0.45)), 0 18px 40px rgba(0, 0, 0, 0.35); }
.perf .spot.revealed .hero-frame { width: 120px; border-radius: 22px; }
.show .hero-frame { width: min(48vw, 190px); }
.rec-btn.on .rec-ring2 { animation: none; opacity: 0; }
.rec-btn.on .rec-ring { transform: none; inset: calc(-3px - var(--lvl) * 5px); }

/* Реакции: панель у правого края экрана, открыта сразу; крестик сворачивает в кнопку 😂 */
.react-rail { position: fixed; right: 0; top: 50%; transform: translateY(-40%); z-index: 27; display: flex; flex-direction: column; align-items: center;
  padding: 4px 3px 4px 4px; border-radius: 24px 0 0 24px; background: rgba(36, 29, 61, 0.94); box-shadow: -6px 10px 26px rgba(0, 0, 0, 0.25); }
.rr-x { width: 30px; height: 30px; margin: 2px 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px; cursor: pointer; }
.rr-list { display: flex; flex-direction: column; }
.rr-list button { width: 40px; height: 40px; border: 0; background: none; font-size: 23px; cursor: pointer; border-radius: 50%; }
.rr-list button.hit { animation: pop 0.35s var(--spring); }
.rr-tab { display: none; width: 40px; height: 44px; border: 0; background: none; font-size: 24px; cursor: pointer; }
.react-rail.closed .rr-x, .react-rail.closed .rr-list { display: none; }
.react-rail.closed .rr-tab { display: block; }
/* На компьютере панель — снаружи колонки игры (колонка до 560px), а не поверх неё */
@media (min-width: 720px) { .react-rail { right: calc(50vw - 280px - 72px); border-radius: 24px; } }

/* «Во что играем дальше?» */
.next-card { display: grid; gap: 6px; padding: 12px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.nx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 2px; }
.nx-head b { font-family: var(--font-display); font-size: 15px; }
.nx-head span { font-size: 12px; color: var(--muted); }
.nx-opt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 16px; border: 2px solid var(--line); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.nx-opt.mine { border-color: var(--violet); background: #f1edff; }
.nx-opt.lead .nx-votes i { background: var(--primary); }
.nx-emoji { font-size: 24px; width: 32px; text-align: center; flex: 0 0 auto; }
.nx-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.nx-text small { font-size: 10.5px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.04em; }
.nx-text b { font-size: 14px; }
.nx-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-votes { display: flex; align-items: center; }
.nx-votes .ava { --s: 22px; margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.nx-votes i { font-style: normal; margin-left: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--night); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nx-go { width: 40px; height: 40px; border-radius: 14px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; flex: 0 0 auto; cursor: pointer; }
.final:has(.next-card) .final-hero h2 { display: none; }
.final:has(.next-card) .pod .ava { --s: 48px; }
.final:has(.next-card) .pod1 .ava { --s: 64px; }
.final:has(.next-card) .pod1 .step-block { height: 64px; }
.final:has(.next-card) .pod2 .step-block { height: 46px; }
.final:has(.next-card) .pod3 .step-block { height: 34px; }
.nx-same { border: 0; background: var(--surface-2); border-radius: 12px; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.final:has(.next-card) .acts { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.final:has(.next-card) .act { min-height: 42px; font-size: 12px; padding: 4px 6px; border-radius: 14px; }
.final:has(.next-card) .title-card { padding: 8px 10px; }

/* ═════ v4: экраны из макета ═════ */
.subpage { display: flex; flex-direction: column; gap: 12px; }
.sub-top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sub-top h1 { flex: 1; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.page-title { margin: 0; min-height: 44px; display: flex; align-items: center; font-family: var(--font-display); font-weight: 800; font-size: 24px; }

/* знакомство / профиль */
.profile-page { min-height: calc(100dvh - 46px); }
.pf-head { text-align: center; padding-top: 4px; }
.pf-head h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.pf-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.hero-stage { position: relative; height: min(350px, 42dvh); border-radius: 32px; overflow: hidden; background: #fcd3b0; box-shadow: var(--shadow); touch-action: pan-y; user-select: none; }
.hs-media { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.hs-media .ava.puppet { --s: 100%; width: 100%; height: 100%; border-radius: 0; box-shadow: none; background: transparent; }
.hs-media .ava.puppet .mf, .hs-media .ava.puppet .pose { object-fit: contain; object-position: center bottom; }
.hs-media.swap { animation: pop 0.4s var(--spring); }

.hs-peek { position: absolute; bottom: 70px; opacity: 0.55; }
.hs-peek .ava { --s: 90px; }
.hs-peek.left { left: -54px; }
.hs-peek.right { right: -54px; }
.hs-lock { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--violet); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hs-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.hs-arrow { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.88); color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.12); cursor: pointer; }
.hs-hint { height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(36, 29, 61, 0.75); color: #fff; font-size: 12px; font-weight: 600; display: none; align-items: center; }
@media (hover: none) and (pointer: coarse) {
  .hs-arrow { visibility: hidden; }
  .hs-hint { display: inline-flex; }
}
.hs-name { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hs-name b { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.hs-dots { display: flex; gap: 5px; }
.hs-dots i { width: 6px; height: 6px; border-radius: 3px; background: #d9d0c4; }
.hs-dots i.on { width: 16px; background: var(--violet); }
.hs-dots i.far { opacity: 0.5; }
.pf-card { padding: 14px; gap: 10px; margin: 0; border-radius: 22px; }
.pf-card .field > label, .pf-card .field > span { font-size: 13px; font-weight: 700; }
.pf-space { flex: 1; }
.age-chips .chip-btn { height: 44px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; transform: none; }
.age-chips .chip-btn.on { border-color: var(--violet); background: #f1edff; transform: none; }

/* мой профиль */
.me-page .card, .subpage .card { margin: 0; padding: 14px; gap: 10px; border-radius: 22px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-head .muted { font-size: 13px; }
.me-top { display: flex; align-items: center; gap: 14px; }
.me-ava { position: relative; border: 0; padding: 0; background: none; cursor: pointer; flex: 0 0 auto; }
.me-ava .ava { --s: 84px; box-shadow: 0 0 0 3px var(--yellow); }
.me-ava .me-gear { position: absolute; right: -4px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(31, 26, 46, 0.2); }
.me-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.me-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-lvl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.me-lvl i { font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 12px; color: #fff; background: var(--violet); border-radius: 8px; padding: 3px 7px; }
.me-bar { height: 8px; border-radius: 4px; background: #eee8ff; overflow: hidden; }
.me-bar i { display: block; height: 100%; border-radius: 4px; background: var(--violet); }
.me-xp { font-size: 11px; color: var(--muted); }
.stats { gap: 8px; }
.stats div { background: #fff; padding: 10px 4px; }
.stats b { font-size: 17px; }
.ach { background: var(--surface-2); box-shadow: none; }
.ach.on { background: #fff; }
.link-more { align-self: center; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--violet); cursor: pointer; padding: 2px 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; }
.acc-ico { width: 44px; height: 44px; border-radius: 14px; background: #f1edff; color: var(--violet); display: grid; place-items: center; flex: 0 0 auto; }
.acc-ico.ok { background: #eaf8f1; color: #1f9d6b; }
.acc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-text > span { font-size: 13px; color: var(--muted); }
.btn.violet, .btn.primary, .btn.yellow, .subpage .btn { box-shadow: none; }

/* вход */
.login-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0; }
.login-hero > span { width: 72px; height: 72px; border-radius: 24px; background: #f1edff; color: var(--violet); display: grid; place-items: center; }
.login-hero b { font-family: var(--font-display); font-size: 20px; }
.login-hero p { margin: 0; font-size: 14px; color: var(--muted); max-width: 300px; }
.acc-form .input { padding: 13px 16px; }
.or { font-size: 13px; }

/* лидеры, звук дня */
.tabs { background: #fff; padding: 4px; border-radius: 24px; }
.tab { height: 40px; padding: 0; border-radius: 20px; }
.tab.on { background: var(--night); }
.lb { gap: 8px; }
.lb li { height: 54px; padding: 0 14px; border-radius: 16px; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); }
.lb li.me { outline: 0; background: var(--night); color: #fff; }
.lb li.me .lb-pts { color: var(--yellow); }
.lb .ava { --s: 36px; }
.lb-place { width: 26px; font-size: 15px; }
.lb-pts { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.daily-page .lb li { height: 50px; }
.dl-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 26px; background: var(--night); color: #fff; }
.dl-head .daily-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--violet); }
.dl-head .daily-ico i { background: #fff; }
.dl-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-meta { font-size: 12px; color: #c9c0e8; }
.dl-head b { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.15; }
.dl-me { font-size: 13px; color: var(--yellow); margin-top: 2px; }
.daily-page, .join-page { min-height: calc(100dvh - 46px); }

/* друзья */
.fr-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 26px; background: var(--violet); color: #fff; }
.fr-head > b { font-family: var(--font-display); font-weight: 800; font-size: 44px; color: var(--yellow); line-height: 1; }
.fr-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fr-t { font-weight: 700; }
.fr-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.fr-bar i { display: block; height: 100%; border-radius: 4px; background: var(--yellow); }
.fr-sub { font-size: 12px; color: #e3dcff; }
.reward { height: 60px; padding: 0 12px; border-radius: 18px; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); opacity: 1; }
.reward.on { outline: 3px solid #1f9d6b; }
.reward .ava { --s: 42px; }
.reward .rw-state { color: var(--muted); }
.reward.on .rw-state { color: #1f9d6b; }
.ref-link { margin: 0; height: 46px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-btns .btn { min-height: 46px; padding: 0 10px; border-radius: 14px; font-size: 15px; }
.two-btns .btn:not(.violet) { background: var(--surface-2); }

/* вызовы */
.ch-in { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--night); color: #fff; }
.ch-kick { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--yellow); text-transform: uppercase; }
.ch-in .ch-who { display: flex; align-items: center; gap: 10px; }
.ch-in .ch-who .ava { --s: 46px; }
.ch-in .ch-who > span { color: #d7d0ee; }
.ch-in .ch-who b { color: #fff; }
.ch-in .ch-who em { display: block; font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff; margin-top: 2px; }
.ch-in .btn { min-height: 48px; border-radius: 14px; }
.remind { height: 60px; border-radius: 18px; }
.ch-sent { box-shadow: var(--shadow); }
.ch-sent-head .pill-btn { height: 38px; padding: 0 12px; font-size: 14px; }
.ch-results li { font-size: 14px; }
.ch-results em { font-size: 14px; }
.ch-empty b { font-size: 15px; }
.ch-empty span { font-size: 13px; color: var(--muted); }

/* присоединиться */
.code-in { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 24px; background: var(--night); color: #fff; }
.code-input { height: 60px; border: 0; border-radius: 16px; background: var(--night-2); color: var(--yellow); text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: 18px; text-transform: uppercase; outline: none; padding-left: 18px; }
.code-input::placeholder { color: #6e64a0; }
.code-in .btn { min-height: 48px; border-radius: 14px; }
.room-card { height: 60px; padding: 0 12px; border-radius: 18px; box-shadow: 0 4px 14px rgba(31, 26, 46, 0.06); }
.room-card .ava { --s: 40px; }
.room-n { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-family: var(--font); font-size: 14px; }
.room-n i { width: 7px; height: 7px; border-radius: 50%; background: #1fbf84; }

/* соло-лобби и темы звуков */
.solo-head { min-height: 132px; cursor: default; }
.solo-head .bn-text b { font-size: 24px; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme { position: relative; }
.th-main { width: 100%; height: 78px; border-radius: 18px; border: 2.5px solid transparent; background: var(--bg, #f6f1ea); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.theme.on .th-main { border-color: var(--violet); }
.th-main:disabled { cursor: default; }
.th-emoji { font-size: 24px; line-height: 1.1; }
.th-main b { font-size: 12.5px; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-main span:last-child { font-size: 11px; color: var(--muted); }
.th-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; pointer-events: none; }
.th-play { position: absolute; top: 5px; left: 5px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 2px 6px rgba(31, 26, 46, 0.15); cursor: pointer; padding: 0; }
.th-play.on { background: var(--primary); }
.th-play i { width: 3px; height: 11px; border-radius: 2px; background: #fff; animation: dbar 0.5s ease-in-out infinite alternate; }
.th-play i:nth-child(2) { animation-delay: 0.15s; } .th-play i:nth-child(3) { animation-delay: 0.3s; } .th-play i:nth-child(4) { animation-delay: 0.1s; }
.th-sum { font-size: 12px; font-weight: 700; color: var(--violet); }
.th-more { height: 40px; border: 0; border-radius: 14px; background: var(--surface-2); font: inherit; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink); }
.lobby .chips { display: none; }
.start-btn.huge { min-height: 72px; font-size: 21px; border-radius: 24px; }
.invite-btn { min-height: 48px; background: #fff; box-shadow: var(--shadow); border-radius: 16px; }
.lobby-row .stepper { flex: 1; }

/* v4: заставка раунда — тёмный экран, герой в рамке, режим, точки прогресса */
.inter { background: radial-gradient(circle at 50% 30%, #3a2f63, var(--night) 70%); }
.inter-kicker { font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffc83d; background: rgba(255,200,61,.12); padding: 6px 14px; border-radius: 99px; animation: rise .4s var(--spring) both; }
.inter-media.hero { border-radius: 32px; width: min(66vw, 270px); background: #fcd8bb; box-shadow: 0 0 0 6px rgba(255,200,61,.35), 0 30px 80px rgba(0,0,0,.5); }
.inter-media.hero img, .inter-media.hero video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.inter-dots { display: flex; gap: 8px; margin-top: 6px; animation: rise .45s var(--spring) both .3s; }
.inter-dots i { width: 10px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.22); }
.inter-dots i.done { background: rgba(255,255,255,.7); }
.inter-dots i.cur { width: 28px; background: var(--primary); }

/* v4: финал соло */
.solo-final { gap: 12px; }
.sf-head { position: relative; display: flex; align-items: center; gap: 14px; background: var(--night); color: #fff; border-radius: 28px; padding: 16px 18px; overflow: hidden; }
.sf-head .sf-hero { width: 96px; height: 110px; object-fit: cover; object-position: top; border-radius: 20px; background: #fcd8bb; flex: none; }
.sf-head small { display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #ffc83d; }
.sf-total { display: block; font-size: 3.6rem; line-height: 1; font-weight: 900; }
.sf-rec { display: inline-block; margin-top: 4px; font-size: .8rem; font-weight: 800; color: #fff; background: var(--primary); padding: 3px 10px; border-radius: 99px; }
.sf-sub { font-size: .85rem; opacity: .7; }
.sf-rounds { display: flex; gap: 6px; }
.sf-rounds i { flex: 1; font-style: normal; text-align: center; font-weight: 800; padding: 8px 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: .9rem; }
.sf-rounds i.hi { background: #dff6ec; color: #138a5e; }
.sf-rounds i.mid { background: #fff2cc; color: #9a6b00; }
.sf-rounds i.lo { background: #ffe1db; color: #c2321b; }
.sf-rounds i.none { opacity: .5; }
.sf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sf-card { background: var(--surface); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sf-card span { font-size: .78rem; font-weight: 700; color: var(--muted); }
.sf-card b { font-size: .95rem; }
.sf-xp { background: var(--surface); border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; display: grid; gap: 6px; }
.sf-bar { height: 8px; border-radius: 99px; background: #eee6da; overflow: hidden; }
.sf-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--primary)); border-radius: 99px; }
.sf-pc { display: flex; gap: 12px; background: var(--surface); border-radius: 24px; padding: 10px; box-shadow: var(--shadow); }
.sf-pc-pv { position: relative; width: 104px; aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; background: linear-gradient(170deg, #3a2f63, var(--night)); flex: none; cursor: pointer; }
.sf-pc-pv :is(img, video) { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; object-fit: cover; object-position: top; }
.sf-pc-logo { position: absolute; top: 6px; left: 8px; color: #fff; font-weight: 900; font-size: .8rem; }
.sf-pc-lbl { position: absolute; top: 24px; left: 6px; right: 6px; color: #fff; font-size: .62rem; font-weight: 700; line-height: 1.15; }
.sf-pc-lbl b { display: block; font-size: 1.1rem; color: #ffc83d; }
.sf-pc-play { position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--primary); display: grid; place-items: center; }
.sf-pc-txt { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.sf-pc-txt span { font-size: .82rem; color: var(--muted); }
.sf-pc-txt .btn { justify-content: center; display: inline-flex; align-items: center; gap: 6px; }
.sf-pc-pv :is(img, video) { height: 56%; }
.sf-pc-lbl { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sf-pc-score { position: absolute; top: 52px; left: 6px; color: #ffc83d; font-size: 1.1rem; font-weight: 900; }
.nx-host { display: flex; gap: 6px; flex: none; }
.nx-gear { display: grid; place-items: center; padding: 0 10px; }

/* v4: очередь выступающих внутри сцены */
.rail { position: relative; align-self: stretch; display: flex; justify-content: space-between; gap: 6px; margin: 30px 4px 4px; padding: 0 6px; }
.rail-line { position: absolute; left: 30px; right: 30px; top: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.rail-line i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #ffc83d 0 12px, var(--primary) 12px 24px); background-size: 40px 4px; animation: oru-flow 1s linear infinite; }
.rail .turn { position: relative; z-index: 1; opacity: .5; padding-top: 18px; }
.rail .turn small { color: rgba(255,255,255,.8); }
.rail .turn.past, .rail .turn.now { opacity: 1; }
.rail .turn.now small { color: #ffc83d; }
.rail-ava { position: relative; display: block; border-radius: 50%; }
.rail .turn .ava { --s: 44px; box-shadow: 0 0 0 3px var(--night); }
.rail .turn.now .ava { --s: 48px; box-shadow: 0 0 0 3px var(--night), 0 0 0 6px var(--primary); }
.rail .turn.talking .rail-ava::before, .rail .turn.talking .rail-ava::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--primary); animation: oru-ring 1.2s ease-out infinite; }
.rail .turn.talking .rail-ava::after { animation-delay: .6s; }
.rail-sc { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: #fff; background: rgba(255,255,255,.14); padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
@keyframes oru-ring { 0% { transform: scale(1); opacity: .8 } 100% { transform: scale(1.6); opacity: 0 } }
@keyframes oru-flow { 0% { background-position: 0 0 } 100% { background-position: 40px 0 } }
.perf .spot:has(.rail) .hero-frame { width: min(60vw, 240px); }

/* Реакции теперь сбоку — снизу резервируем ровно высоту панели действий */
body.has-reactions { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.has-reactions .dock { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
body:not(.has-tabbar) { padding-bottom: calc(var(--dock-h, 130px) + 6px); }
body.no-dock:not(.has-tabbar) { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.play.perf { min-height: calc(100dvh - 82px - var(--dock-h, 0px) - env(safe-area-inset-top)); }
.perf .spot:has(.rail) { justify-content: flex-start; }
.perf .spot:has(.rail) .who { margin: auto 0 12px; }
.perf .spot:has(.rail) .listening { margin-bottom: auto; }
@media (max-width: 719px) { body:has(#reactions:not([hidden]):not(.closed)) .rail { padding-right: 34px; } }
.play.perf { min-height: calc(100dvh - 112px - var(--dock-h, 0px) - env(safe-area-inset-top)); }
.perf .spot:has(.rail) .hero-frame { width: min(66vw, 270px); }

/* v4: итоги раунда и голосование — один список */
.rs { gap: 10px; }
.rs-best { display: flex; align-items: center; gap: 12px; background: var(--night); color: #fff; border-radius: 24px; padding: 12px 16px; }
.rs-best .ava { --s: 56px; box-shadow: 0 0 0 3px #ffc83d; }
.rs-best small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ffc83d; }
.rs-best b { font-size: 1.05rem; line-height: 1.2; }
.rs-call { display: flex; align-items: center; gap: 10px; background: #efeaff; border-radius: 20px; padding: 10px 14px; color: var(--violet); }
.rs-call > span:first-child { font-size: 1.6rem; }
.rs-call b { display: block; color: var(--ink, #241d3d); }
.rs-call small { font-size: .8rem; font-weight: 600; }
.rs-call em { margin-left: auto; font-style: normal; font-weight: 800; font-size: .85rem; white-space: nowrap; }
.rs-headrow { display: grid; grid-template-columns: 1fr 58px 44px 44px; gap: 6px; padding: 0 14px 0 60px; font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rs-headrow span:not(:first-child) { text-align: center; }
.rs-headrow:not(:has(span:nth-child(4))) { grid-template-columns: 1fr 44px 44px; }
.rs-list, .rs-list.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rs-list li { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 20px; padding: 8px 12px; box-shadow: var(--shadow); animation: slidein .45s var(--spring) both; grid-template-columns: none; }
.rs-list li.me { box-shadow: 0 0 0 2px var(--violet), var(--shadow); }
.rs-list li.on { background: #fff0ee; }
.rs-place { width: 18px; text-align: center; font-weight: 900; color: var(--muted); }
.rs-ava .ava { --s: 44px; }
.rs-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rs-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-name small { font-size: .78rem; color: var(--muted); font-weight: 600; }
.rs-heart { width: 58px; height: 44px; border-radius: 14px; border: 2px solid #f1d6d0; background: #fff; color: var(--primary); font-size: 1.4rem; display: grid; place-items: center; cursor: pointer; flex: none; }
.rs-heart.on { background: var(--primary); color: #fff; border-color: var(--primary); animation: zoomin .35s var(--spring); }
.rs-heart.off { border: 0; background: none; font-size: .95rem; font-weight: 800; color: var(--muted); cursor: default; }
.rs-heart.got { color: var(--primary); }
.rs-pts { width: 44px; text-align: center; font-weight: 800; color: #138a5e; flex: none; }
.rs-total { width: 44px; text-align: center; font-size: 1.15rem; flex: none; }
.rs-list.results { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.rs-list.results li:nth-child(odd) { background: var(--surface); }
.rs-list.results li.me { background: #f4f0ff; }
.rs-call em b { display: inline; color: inherit; }
/* Открытая панель реакций справа — сдвигаем от неё списки и кнопки */
@media (max-width: 719px) { body:has(#reactions:not([hidden]):not(.closed)) :is(.rs-list, .rs-headrow, .next-card, .final .titles, .final .acts, .rate, .ch-btn, .gopts, .gres) { margin-right: 52px; } }

/* «Сохрани прогресс» */
.save-box { display: grid; gap: 8px; margin: 12px 0 4px; padding-top: 12px; border-top: 1px dashed #e6dccd; text-align: left; }
.save-card .save-box { margin-top: 0; padding-top: 0; border: 0; }
.save-head { display: flex; gap: 10px; align-items: flex-start; }
.save-head .save-t { display: block; font-size: 1.05rem; }
.save-head small b { color: var(--ink, #241d3d); }
.save-head small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.save-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #efeaff; color: var(--violet); }
.save-box .btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.save-hero { display: block; width: 120px; height: 120px; object-fit: cover; object-position: top; border-radius: 28px; background: #fcd8bb; margin: 0 auto 12px; }
.save-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 20px; padding: 10px 12px; box-shadow: var(--shadow); border: 2px solid #e3dbff; }
.sb-text { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; }
.sb-text small { font-size: .78rem; color: var(--muted); }
.sb-x { border: 0; background: none; color: var(--muted); font-size: 1rem; width: 32px; height: 32px; cursor: pointer; flex: none; }
.rs-headrow { gap: 10px; padding: 0 12px 0 84px; grid-template-columns: 1fr 58px 44px 44px; }
.rs-headrow:not(:has(span:nth-child(4))) { grid-template-columns: 1fr 44px 44px; }
.rs-headrow span:first-child { visibility: hidden; }
.save-head small { display: block; margin-top: 2px; }
.save-bar { padding: 8px 10px; }
.save-bar .save-ico { width: 32px; height: 32px; }

/* ── монеты и магазин ── */
.coin-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 8px; border: 0; border-radius: 99px; background: var(--surface);
  box-shadow: var(--shadow); font: 800 1rem var(--font-display, inherit); color: var(--ink, #241d3d); cursor: pointer; margin-left: auto; }
.coin-chip i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff2cc; font-size: 1rem; }
.home-top .coin-chip + .sq-btn, .home-top .coin-chip + button { margin-left: 8px; }
.home-top { gap: 8px; }
.sub-top .coin-chip { margin-left: auto; }
.shop-card { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.sc-coin { width: 44px; height: 44px; border-radius: 14px; background: #fff2cc; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.sc-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sc-txt span { font-size: .82rem; color: var(--muted); }
.sc-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--violet); font-size: .9rem; }
.sh-tabs { display: flex; gap: 6px; background: var(--surface); padding: 4px; border-radius: 16px; box-shadow: var(--shadow); }
.sh-tab { flex: 1; border: 0; background: none; padding: 10px 0; border-radius: 12px; font: 800 .9rem inherit; color: var(--muted); cursor: pointer; }
.sh-tab.on { background: var(--night); color: #fff; }
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sh-hero { background: var(--surface); border-radius: 18px; padding: 8px 6px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.sh-hero .sh-img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 14px; background: #fcd8bb; }

.sh-hero b { font-size: .75rem; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
.sh-hero small { font-size: .65rem; color: var(--muted); }
.sh-buy { border: 0; border-radius: 99px; padding: 7px 12px; background: var(--primary); color: #fff; font: 800 .85rem inherit; cursor: pointer; white-space: nowrap; }
.sh-own { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 800; color: #138a5e; }
.sh-list { display: grid; gap: 8px; }
.sh-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow); }
.sh-emoji { width: 44px; height: 44px; border-radius: 14px; background: #f4efe6; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.sh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-txt small { font-size: .78rem; color: var(--muted); }
.sh-ways { display: grid; gap: 6px; }
.sh-way { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.sh-way i { font-style: normal; width: 24px; text-align: center; }
.sh-way span { flex: 1; }
.sh-way b { color: #9a6b00; font-size: .82rem; }
.sh-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-pack { position: relative; border: 0; border-radius: 20px; padding: 14px 10px 12px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: inherit; }
.sh-pack em { position: absolute; top: -8px; right: 10px; font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 99px; }
.sp-ico { font-size: 1.8rem; }
.sp-n { font-size: .82rem; color: var(--muted); font-weight: 700; }
.sh-pack small { font-size: .72rem; color: var(--muted); text-align: center; }
.sp-price { margin-top: 6px; font-weight: 900; background: #fff2cc; color: #7a5200; padding: 5px 12px; border-radius: 99px; }
.sh-pack.plus { grid-column: 1 / -1; background: linear-gradient(135deg, var(--violet), #8a5cff); color: #fff; }
.sh-pack.plus small, .sh-pack.starter small { color: inherit; opacity: .85; }
.sh-pack.starter { grid-column: 1 / -1; background: linear-gradient(135deg, #ffe08a, #ffc83d); }
.hs-buy { border: 0; cursor: pointer; font: inherit; }
.theme.locked .th-main { opacity: .75; }
.theme.locked .th-main > span:last-child { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #7a5200; }
.buy-card p { color: var(--muted); }
.buy-bal { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; margin: 6px 0; }
.buy-bal .coin-chip { margin: 0; }
.nw-coins { display: inline-block; margin-left: 6px; color: #9a6b00; background: #fff2cc; padding: 2px 10px; border-radius: 99px; font-size: .9em; }
.retry-btn { background: #fff2cc; color: #7a5200; }

/* «Поделиться»: превью картинки и кнопки */
.share-sheet { display: grid; gap: 10px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.ss-img { display: block; width: min(100%, 300px); aspect-ratio: 4 / 5; margin: 0 auto; border-radius: 20px; box-shadow: 0 12px 30px rgba(0,0,0,.25); background: var(--night); }
.ss-img.loading { display: grid; place-items: center; color: #fff; }
.ss-text { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; line-height: 1.35; }
.ss-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ss-app { display: grid; place-items: center; height: 44px; border-radius: 14px; color: #fff; font-weight: 800; font-size: .9rem; text-decoration: none; }
.ss-app.tg { background: #2aabee; }
.ss-app.wa { background: #25d366; }
.ss-app.vk { background: #0077ff; }
.ss-row { display: flex; gap: 8px; }
.ss-row > * { flex: 1; text-align: center; text-decoration: none; }
.share-sheet .btn.big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Лобби гостя: кто выбирает и пожелания */
.host-hint { display: flex; align-items: center; gap: 12px; background: #fff7e0; border: 2px dashed #ffd56b; border-radius: 20px; padding: 10px 14px; font-size: .85rem; color: #6b5200; }
.host-hint b { display: block; font-size: .95rem; color: var(--ink, #241d3d); }
.hh-ava { position: relative; flex: none; }
.hh-ava .ava { --s: 40px; }
.hh-ava i { position: absolute; top: -10px; right: -6px; font-style: normal; font-size: 18px; }
.wish-avas { position: absolute; top: -8px; right: -6px; display: flex; align-items: center; z-index: 2; }
.wish-avas .ava { --s: 26px; margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.wish-avas i { font-style: normal; font-size: 11px; font-weight: 800; background: var(--violet); color: #fff; border-radius: 99px; padding: 1px 6px; margin-left: 2px; }
.mode, .pack-cover, .theme { position: relative; }
.mode.wished, .pack.wished .pack-cover, .theme.wished { box-shadow: 0 0 0 3px #ffc83d; }
.theme.wished .th-main { box-shadow: none; }
.wish-avas { top: auto; right: auto; bottom: -10px; left: 12px; }

/* Листалка героев: лента из трёх слайдов, едет за пальцем */
.hs-track { position: absolute; inset: 0; will-change: transform; }
.hs-track .hs-media, .hs-slide { position: absolute; top: 0; bottom: 0; width: 100%; }
.hs-track .hs-media { left: 0; }
.hs-slide.prev { left: -100%; }
.hs-slide.next { left: 100%; }
.hs-slide { display: grid; place-items: center; pointer-events: none; }
.hs-slide .ava.puppet { --s: 100%; width: 100%; height: 100%; border-radius: 0; box-shadow: none; background: transparent; }
.hs-slide .ava.puppet .mf, .hs-slide .ava.puppet .pose { object-fit: contain; object-position: center bottom; }

.hero-stage .hs-peek, .hero-stage .hs-lock, .hero-stage .hs-bar { transition: opacity .15s; }
.hero-stage.dragging .hs-peek, .hero-stage.dragging .hs-lock { opacity: 0; }

/* Живые герои: анимация, пока молчит; кадры рта — когда говорит */
.puppet .idle { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .12s; pointer-events: none; }
.hs-media .ava.puppet .idle, .hs-slide .ava.puppet .idle { object-fit: contain; object-position: center bottom; }
.puppet.has-idle:not(.talking):not(.posed) .mf { opacity: 0; }
.puppet.has-idle.talking .idle, .puppet.has-idle.posed .idle { opacity: 0; }

/* Корона хоста — на углу кружка, а не ячейки */
.lobby .pl .crown { left: calc(50% + 14px); right: auto; top: -6px; }

/* Закрытый герой — в цвете, без затемнения; о замке говорят плашка и окно при сохранении */
.sh-hero { position: relative; }
.locked-hero p { margin: 4px 0 8px; }
.lh-ways { display: grid; gap: 4px; text-align: left; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.lh-ways b { color: var(--ink, #241d3d); font-size: .85rem; }
.lh-ways i { font-style: normal; margin-right: 6px; }
.lh-ways em { font-style: normal; font-weight: 800; color: #9a6b00; }
.pc-card .save-hero { width: 140px; height: 140px; object-fit: cover; object-position: top; border-radius: 28px; display: block; margin: 0 auto 12px; }
.lobby .pl .x { left: calc(50% + 14px); right: auto; top: -6px; }
.locked-hero { position: relative; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1ebe2; color: var(--muted); font-size: 15px; cursor: pointer; z-index: 2; }
.next-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.next-cd { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: .95em; }
.hint .next-cd { min-width: 26px; height: 26px; background: #f1ebe2; color: var(--ink, #241d3d); }

/* Оценка: герой во всю ширину, поверх — процент (угол), вердикт (низ), имя (слева сверху) */
.spot .hero-frame:has(.ov) { overflow: hidden; }
.perf .spot.revealed .hero-frame, .perf .spot.revealed:has(.rail) .hero-frame { width: 100%; aspect-ratio: auto; height: min(330px, 40dvh); border-radius: 26px; margin: 0; }
.perf .spot.revealed .hero-frame .ava.puppet { --s: 100%; }
.perf .spot.revealed .hero-frame .ava.puppet :is(.mf, .pose, .idle) { object-fit: contain; object-position: center bottom; }
.perf .spot.revealed h2 { display: none; }
.hero-frame .ov { position: absolute; z-index: 4; }
.ov-ring { top: 10px; right: 10px; width: 104px; height: 104px; border-radius: 50%; background: rgba(36, 29, 61, .88); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.ov-ring .ring { width: 96px; height: 96px; }
.ov-ring .ring b { font-size: 2rem; }
.ov-sticker { left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: 92%; }
.ov-sticker .sticker { margin: 0; }
.ov-name { top: 12px; left: 12px; background: rgba(36, 29, 61, .82); color: #fff; font-weight: 800; font-size: 15px; padding: 6px 12px; border-radius: 99px; }
.ov-name small { opacity: .7; font-weight: 600; }
/* В шоу (пародист/телефон) карточка меньше — и наклейки меньше */
.show .hero-frame:has(.ov) { width: 100%; aspect-ratio: auto; height: min(300px, 36dvh); }
.show .hero-frame .ava.puppet :is(.mf, .pose, .idle) { object-fit: contain; object-position: center bottom; }
.show .spot:has(.ov) h2 { display: none; }
#rounds-val { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.rv-cap { font-size: 11px; font-weight: 700; color: var(--muted); }

/* Профиль игрока во всплывашке */
.player-card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.player-card h2 { margin: 2px 0 0; }
.pp-hero { width: 150px; height: 150px; object-fit: cover; object-position: top; border-radius: 30px; background: #fcd8bb; display: block; }
.pc-card .pp-hero { width: 150px; height: 150px; }
.pp-lvl { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--violet); }
.pp-lvl b { width: 28px; height: 28px; border-radius: 9px; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: 14px; }
.pp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; margin-top: 4px; }
.pp-stats div { background: #f6f1ea; border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; }
.pp-stats b { font-size: 1.1rem; }
.pp-stats span { font-size: .7rem; color: var(--muted); font-weight: 700; }
.pp-achs { width: 100%; text-align: left; }
.pp-achs > span { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pp-achs div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pp-achs i { font-style: normal; width: 36px; height: 36px; border-radius: 12px; background: #fff2cc; display: grid; place-items: center; font-size: 1.2rem; }
.pp-btns { display: grid; gap: 6px; width: 100%; margin-top: 4px; }
.pp-btns .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pp-rel { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; color: var(--violet); padding: 10px; border-radius: 14px; background: #efeaff; }
.pp-rel.ok { color: #138a5e; background: #dff6ec; }
[data-action="player"] { cursor: pointer; }
/* Друзья и заявки */
.fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f1ebe2; }
.fr-row:first-of-type { border-top: 0; }
.fr-row .ava { --s: 44px; }
.fr-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-name small { color: var(--muted); font-size: .78rem; }
.fr-x { border: 0; background: #f1ebe2; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.fr-req { border: 2px solid #ffd56b; }
.save-card { position: relative; }

/* Лента друзей */
.fd .card-label { display: flex; justify-content: space-between; align-items: center; }
.fd .card-label a { color: var(--violet); text-decoration: none; text-transform: none; letter-spacing: 0; }
.fd-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f1ebe2; }
.fd-item:first-of-type { border-top: 0; }
.fd-item.fresh .fd-text b:first-child { color: var(--primary); }
.fd-item.direct { background: #fff7e0; margin: 0 -10px; padding: 9px 10px; border-radius: 14px; border-top: 0; }
.fd-ava { position: relative; flex: none; }
.fd-ava .ava { --s: 42px; }
.fd-ava i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 16px; }
.fd-text { flex: 1; min-width: 0; font-size: .86rem; line-height: 1.3; }
.fd-text small { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.fd-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.fd-acts .pill-btn { padding: 0 12px; height: 34px; font-size: .8rem; }
.fd-cheer { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1ebe2; font-size: 16px; cursor: pointer; }
.fd-cheer.on { background: #ffe1db; animation: pop .35s var(--spring); }
.fd-note { font-size: .72rem; color: var(--muted); }
.fr-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

/* Быстрые фразы: 💬 в панели реакций открывает список слева от неё; фраза летит вверх облачком */
.rr-say { width: 40px; height: 40px; margin-top: 2px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); font-size: 21px; cursor: pointer; }
.rr-say.on { background: var(--accent, #e8432a); }
.rr-phrases { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px;
  width: max-content; max-width: min(62vw, 230px); max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 20px;
  background: rgba(36, 29, 61, 0.96); box-shadow: -6px 10px 26px rgba(0, 0, 0, 0.3); animation: pop 0.25s var(--spring); }
.rr-phrases[hidden] { display: none; }
.rr-phrases button { border: 0; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: #241d3d; font: 800 15px/1.15 inherit; font-family: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.rr-phrases button:active { transform: scale(0.95); }
.react-rail.closed .rr-say, .react-rail.closed .rr-phrases { display: none; }
.floater.phrase { font-size: 1rem; animation: floatp 3.4s ease-out forwards; align-items: flex-start; max-width: 200px; }
.fp-bubble { padding: 9px 14px; border-radius: 18px 18px 18px 4px; background: #fff; color: #241d3d; font-weight: 900; font-size: 17px; line-height: 1.15;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); white-space: nowrap; }
.fp-who { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.fp-who .ava { --s: 26px; margin: 0; }
.fp-who small { padding: 2px 7px; border-radius: 10px; background: rgba(36, 29, 61, 0.8); color: #fff; font-weight: 800; font-size: 11px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Включить уведомления */
.card.push-card { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px 12px; }
.push-card .pill-btn { grid-column: 1 / -1; grid-row: 2; width: 100%; }
.push-card .fr-x { grid-column: 3; grid-row: 1; }
.push-card .pc-bell { font-size: 28px; animation: wobble 1.6s ease-in-out infinite; }
.push-card .pc-txt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.push-card .pc-txt small { color: var(--muted, #776f93); font-size: 12.5px; line-height: 1.25; }
.push-ask { text-align: center; display: grid; gap: 10px; }
.push-ask .pa-bell { font-size: 54px; animation: wobble 1.6s ease-in-out infinite; }
.push-ask h3 { margin: 0; }
.push-ask .hint { margin: 0; }
@keyframes floatp { 0% { transform: translateY(0) scale(0.5); opacity: 0; } 12% { transform: translateY(-24px) scale(1.08); opacity: 1; } 20% { transform: translateY(-34px) scale(1); } 80% { opacity: 1; } 100% { transform: translateY(-55vh) rotate(-5deg); opacity: 0; } }

/* Профиль: сменить аккаунт / выйти */
.acc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc-btns .btn { min-height: 46px; padding: 0 10px; font-size: 14.5px; white-space: nowrap; background: var(--surface-2, #f4efe8); color: var(--ink); box-shadow: none; }
.acc-btns [data-action=acc-logout] { color: #e8432a; }
.acc-out { display: grid; gap: 10px; text-align: center; }
.acc-out h3 { margin: 0; }
.acc-out .hint { margin: 0; }

/* ═════════ Новый дизайн «Ночная сцена» (html.night, по ссылке ?design=night) ═════════
   body.nt — экран уже перенесён: ночной фон, всё лежит прямо на нём. Остальные экраны пока прежние. */
html.night { --n-bg: #17122b; --n-glow: #6c55ff; --n-mid: #3a2f8a; --n-ink: #ffffff; --n-muted: rgba(255, 255, 255, 0.66); --n-line: rgba(255, 255, 255, 0.14); --n-yellow: #ffc83d; }
html.night .sound-btn, html.night #home-sound { display: none !important; }
html.night:has(body.nt) { background: var(--n-bg); }
html.night body.nt { background: radial-gradient(circle at 50% 22%, var(--n-glow) 0%, var(--n-mid) 42%, var(--n-bg) 100%) fixed; color: var(--n-ink); }

/* Главная: логотип, монеты, «я» — на фоне, без карточек */
.logo-h span { color: inherit; }
html.night body.nt .logo-h { color: #fff; font-size: 28px; }
html.night body.nt .logo-h span { color: var(--n-yellow); }
html.night body.nt .home-top .coin-chip { background: transparent; box-shadow: none; color: var(--n-yellow); padding: 0 4px; }
html.night body.nt .home-top .coin-chip i { background: rgba(255, 200, 61, 0.16); }
html.night body.nt .home-top .sq-btn { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
html.night body.nt .me-card { background: transparent; box-shadow: none; color: #fff; padding: 6px 0; }
html.night body.nt .me-card .me-row b { color: #fff; }
html.night body.nt .me-card .me-sub, html.night body.nt .me-card .lvl.mini .lvl-body b { color: var(--n-muted); }
html.night body.nt .me-card .lvl.mini .lvl-n { background: rgba(255, 200, 61, 0.18); color: var(--n-yellow); }
html.night body.nt .me-card .lvl.mini .progress { background: rgba(255, 255, 255, 0.16); height: 5px; }
html.night body.nt .me-card .lvl.mini .progress i { background: var(--n-yellow); }
html.night body.nt .me-streak { color: #ffb08a; }
html.night body.nt .home > .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5); }
html.night body.nt .today, html.night body.nt .ch-card, html.night body.nt .remind, html.night body.nt .fd-teaser { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25); }

/* Нижнее меню — тоже на фоне, с тонкой линией */
/* Вариант C: только иконки на фоне, без панели; активная — жёлтая со светящейся точкой, профиль — своя аватарка */
html.night body.nt .tabbar { background: none; border-radius: 0; box-shadow: none; padding-left: 18px; padding-right: 18px; }
html.night body.nt .tabbar button { color: rgba(255, 255, 255, 0.72); height: 62px; padding: 0 0 6px; justify-content: center; gap: 3px; }
html.night body.nt .tabbar .tb-l { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; }
html.night body.nt .tabbar button.on .tb-l { font-weight: 700; }
html.night body.nt .tabbar button .ic { stroke-width: 1.8; }
html.night body.nt .tabbar button.on { color: var(--n-yellow); }
html.night body.nt .tabbar button.on .ic { stroke-width: 2.2; }
html.night body.nt .tabbar .tb-dot { position: absolute; bottom: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--n-yellow); box-shadow: 0 0 10px var(--n-yellow); opacity: 0; }
html.night body.nt .tabbar button.on .tb-dot { opacity: 1; }
html.night body.nt .tabbar .tb-ava { --s: 25px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }
html.night body.nt .tabbar button.on .tb-ava { box-shadow: 0 0 0 2px var(--n-yellow); }
html.night body.nt .tabbar .badge { top: 2px; right: 50%; margin-right: -24px; min-width: 18px; height: 18px; font-size: 11px; box-shadow: 0 0 0 2px #1b1535; }
.tabbar .tb-dot { display: none; }
html.night body.nt .tabbar .tb-dot { display: block; }
/* Белые карточки на ночном фоне — со своим тёмным текстом */
html.night body.nt :is(.ch-card, .remind, .fd-teaser, .save-bar, .card) { color: var(--ink); }
/* «Звук дня» — полупрозрачный, почти сливается с фоном */
html.night body.nt .today { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .today .daily-info span { color: var(--n-muted); }
html.night body.nt .today .daily-ico { background: rgba(255, 255, 255, 0.1); }
html.night body.nt .today .quests li { background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.86); }
html.night body.nt .today .quests li b { color: var(--n-yellow); }
html.night body.nt .today .quests li.ok { background: rgba(34, 201, 154, 0.16); }
html.night body.nt .today .quests li.ok b { color: #5fe0b8; }
html.night body.nt .today .pill-btn.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
/* «Играть одному» — приглушённый тёплый красный вместо яркого */
html.night body.nt .banner-solo { background: linear-gradient(135deg, #b5392c 0%, #8a2944 100%); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28); }
html.night body.nt .banner-solo .bn-btn { color: #a0322d; }

/* Задания дня: заголовок и награды */
.quests-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; }
.quests-head b { font-size: 13px; white-space: nowrap; }
.quests-head b i { font-style: normal; color: var(--muted); margin-left: 4px; }
html.night body.nt .today .quests-head b i { color: var(--n-muted); }
.quests-head span { font-size: 11.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.qh-bonus { color: #b07a00; }
.qh-ok { color: var(--mint-d, #12977a); }
.quests .q-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; white-space: nowrap; }
.quests .q-rw { font-size: 9.5px; font-weight: 700; color: #b07a00; white-space: nowrap; letter-spacing: -0.02em; }
.quests li { padding: 6px 7px; min-width: 0; }
.quests .q-top b { font-size: 12px; }
.quests li.ok .q-rw { color: #1f6b4a; }
html.night body.nt .today .quests-head b { color: #fff; }
html.night body.nt .today .qh-bonus, html.night body.nt .today .quests .q-rw { color: var(--n-yellow); }
html.night body.nt .today .qh-ok, html.night body.nt .today .quests li.ok .q-rw { color: #5fe0b8; }

/* Главная на невысоком экране телефона — компактнее, чтобы всё помещалось без прокрутки (на ПК — как было) */
@media (max-width: 600px) and (max-height: 820px) {
  html.night body.nt .home { gap: 8px; }
  html.night body.nt .home-top { height: 40px; }
  html.night body.nt .me-card { padding: 0; }
  html.night body.nt .me-card .me-ava { --s: 44px; }
  html.night body.nt .today { padding: 10px 12px; gap: 8px; }
  html.night body.nt .today .daily-ico { width: 40px; height: 40px; border-radius: 13px; }
  html.night body.nt .today .pill-btn { height: 38px; }
  html.night body.nt .banner { border-radius: 22px; gap: 6px; }
  html.night body.nt .bn-text span { font-size: 12px; }
  html.night body.nt .bn-btn { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
  html.night body.nt .banner-solo { min-height: 100px; padding: 12px 136px 12px 16px; }
  html.night body.nt .banner-solo .bn-hero { width: 136px; height: 136px; right: -12px; bottom: -30px; }
  html.night body.nt .banner-solo .ava.bn-hero { --s: 136px; }
  html.night body.nt .banner-solo .bn-text b { font-size: 20px; }
  html.night body.nt .banner-friends { min-height: 96px; padding: 12px 12px 12px 130px; }
  html.night body.nt .bn-crew { transform: scale(0.76); transform-origin: 0 0; height: 131%; }
  html.night body.nt .banner-friends .bn-text b { font-size: 18px; }
  html.night body.nt .banner-join { height: 86px; }
  html.night body.nt .bj-find { left: 10px; top: 8px; bottom: 8px; width: 98px; border-radius: 18px; }
  html.night body.nt .bj-find .ic { width: 32px; height: 32px; }
  html.night body.nt .bj-find b { font-size: 15px; }
  html.night body.nt .bj-side { left: 122px; top: 9px; bottom: 8px; }
  html.night body.nt .bj-room { height: 25px; }
}
/* Совсем низкий экран — убираем подзаголовки баннеров */
@media (max-width: 600px) and (max-height: 700px) {
  html.night body.nt .banner-solo .bn-text span, html.night body.nt .banner-friends .bn-text span { display: none; }
  html.night body.nt .banner-solo, html.night body.nt .banner-friends { min-height: 86px; }
  html.night body.nt .banner-solo .bn-hero { width: 116px; height: 116px; bottom: -24px; }
  html.night body.nt .banner-solo .ava.bn-hero { --s: 116px; }
}
.quests .q-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Три баннера: содержимое по центру по вертикали, равные отступы сверху и снизу */
html.night body.nt .banner-solo, html.night body.nt .banner-friends { justify-content: center; gap: 10px; padding-top: 16px; padding-bottom: 16px; min-height: 128px; }
html.night body.nt .banner-join { height: 128px; }
html.night body.nt .bj-side { top: 0; bottom: 0; justify-content: center; }
html.night body.nt .banner-join .bn-text { top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) and (max-height: 820px) {
  html.night body.nt .banner-solo, html.night body.nt .banner-friends { min-height: 98px; padding-top: 12px; padding-bottom: 12px; gap: 8px; }
  html.night body.nt .banner-join { height: 98px; }
  html.night body.nt .bj-find { top: 10px; bottom: 10px; }
  html.night body.nt .bj-side { top: 0; bottom: 0; }
}
@media (max-width: 600px) and (max-height: 700px) {
  html.night body.nt .banner-solo, html.night body.nt .banner-friends { min-height: 88px; }
  html.night body.nt .banner-join { height: 88px; }
}
/* Меню без фона: лёгкая тень у иконок и подписей, чтобы читались поверх контента */
html.night body.nt .tabbar button { filter: drop-shadow(0 1px 3px rgba(10, 6, 30, 0.7)); }
/* Без точки под активным пунктом; меню ниже, ближе к краю экрана */
html.night body.nt .tabbar .tb-dot { display: none; }
html.night body.nt .tabbar { height: calc(56px + env(safe-area-inset-bottom)); align-items: end; }
html.night body.nt .tabbar button { height: 52px; padding: 0 0 4px; justify-content: flex-end; }
html.night body.nt.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

/* ═════════ Ночная сцена · шаг 2: Комната (лобби) ═════════ */
/* Верхняя панель: круглая «назад» с обводкой, по центру «КОМНАТА · 2 ИЗ 12» */
html.night body.nt .topbar::after { content: ''; width: 44px; flex: 0 0 auto; }
html.night body.nt .home-btn { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); }
html.night body.nt .tb-pill { display: flex; justify-content: center; gap: 6px; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
html.night body.nt .tb-phase, html.night body.nt .tb-round { flex: 0 1 auto; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-muted); }
html.night body.nt .tb-round:not(:empty)::before { content: '· '; }

.nl-label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.nl-code .nl-label { color: var(--n-yellow); }
html.night body.nt .lobby { gap: 12px; }
html.night body.nt .lobby .open-row { height: 48px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .lobby .open-row > .ic { color: #5fe0b8; }
html.night body.nt .or-text b { font-size: 14px; }
html.night body.nt .or-text span { color: var(--n-muted); }
html.night body.nt .switch input { background: rgba(255, 255, 255, 0.22); }
html.night body.nt .switch input:checked { background: #22c99a; }

/* Игроки: аватарки на фоне, у себя — жёлтое кольцо, корона хоста — жёлтая */
html.night body.nt .lobby .pl .ava { --s: 56px; border: 0; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
html.night body.nt .lobby .pl.me .ava { box-shadow: 0 0 0 3px var(--n-yellow); }
html.night body.nt .lobby .pl-name { color: #fff; font-weight: 700; }
html.night body.nt .lobby .pl-name.muted { color: rgba(255, 255, 255, 0.6); font-weight: 400; }
html.night body.nt .lobby .pl .crown.nl-crown { top: -10px; right: 6px; width: auto; height: auto; background: none; color: var(--n-yellow); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
html.night body.nt .lobby .pl-empty .ava { background: transparent; border: 2px dashed rgba(255, 255, 255, 0.35); box-shadow: none; }
html.night body.nt .lobby .pl-empty .ava-emoji { color: rgba(255, 255, 255, 0.6); }
html.night body.nt .lobby .pl .x { background: rgba(255, 255, 255, 0.9); color: #6e6580; }

/* Режимы — цветные блоки 2×2 с картинкой и коротким описанием */
.nl-sec { margin: 4px 0 -4px; }
.nmodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nmode { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 128px; box-sizing: border-box; padding: 9px 12px 10px; border: 0; border-radius: 22px; overflow: hidden; background: var(--c); color: #fff; text-align: left; font: inherit; cursor: pointer; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22); transition: transform 0.15s; }
.nmode:active { transform: scale(0.97); }
.nmode.on { box-shadow: 0 0 0 3px var(--n-yellow, #ffc83d), 0 12px 26px rgba(0, 0, 0, 0.28); }
.nmode.wished { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), 0 12px 26px rgba(0, 0, 0, 0.22); }
.nm-pic { height: 54px; flex: 0 0 auto; border-radius: 14px; background: rgba(0, 0, 0, 0.16); display: flex; align-items: center; justify-content: center; gap: 6px; }
.nm-pic .ava.nm-ava { --s: 40px; box-shadow: 0 0 0 2px #fff; }
.nm-pic .ava.nm-ava.sm { --s: 32px; }
.nm-pic:has(.sm) { gap: 2px; }
.nm-bars { display: flex; align-items: center; gap: 2px; height: 34px; }
.nm-bars i { width: 3px; border-radius: 2px; background: #fff; }
.nm-pct { padding: 3px 7px; border-radius: 8px; background: #ffc83d; color: #241d3d; font-family: var(--font-display); font-size: 12px; }
.nm-abcd { display: grid; grid-template-columns: repeat(2, 30px); gap: 3px; }
.nm-abcd i { height: 18px; border-radius: 5px; background: rgba(255, 255, 255, 0.3); font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.nm-abcd i.on { background: #ffc83d; color: #241d3d; }
.nm-hearts { display: flex; flex-direction: column; gap: 2px; }
.nm-t { font-family: var(--font-display); font-size: 14px; font-weight: 800; line-height: 1.1; }
.nm-sub { font-size: 11.5px; line-height: 1.25; color: rgba(255, 255, 255, 0.86); }
.nm-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #ffc83d; color: #241d3d; display: grid; place-items: center; }
.nmode .wish-avas { top: 14px; left: 18px; right: auto; bottom: auto; }
.nmode .wish-avas .ava { --s: 24px; }

/* Темы и колоды — без белой карточки, прямо на фоне; плитки тем остаются цветными */
html.night body.nt .lobby .card { background: none; box-shadow: none; padding: 0; color: #fff; }
html.night body.nt .lobby .card-label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
html.night body.nt .lobby .th-sum { color: var(--n-yellow); }
html.night body.nt .lobby .theme { color: var(--ink); }
html.night body.nt .lobby .theme.on .th-main { border-color: var(--n-yellow); box-shadow: 0 0 0 1px var(--n-yellow); }
html.night body.nt .lobby .th-more { background: rgba(255, 255, 255, 0.1); color: #fff; }
html.night body.nt .lobby .pack { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
html.night body.nt .lobby .pack.on { background: rgba(255, 200, 61, 0.14); border-color: var(--n-yellow); }
html.night body.nt .lobby .pack-meta { color: var(--n-muted); }
html.night body.nt .lobby .field > span { color: var(--n-muted); }
html.night body.nt .lobby textarea { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
html.night body.nt .lobby textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
html.night body.nt .host-hint { background: rgba(255, 200, 61, 0.1); border-color: rgba(255, 200, 61, 0.5); color: rgba(255, 255, 255, 0.75); }
html.night body.nt .host-hint b { color: #fff; }

/* Нижняя панель лобби: слева — сколько раундов, справа — «Играть» */
html.night body.nt .dock { background: linear-gradient(rgba(27, 21, 52, 0), #1b1534 22px); }
html.night body.nt.has-reactions .dock { background: none; }
html.night body.nt .dock-inner { gap: 10px; }
html.night body.nt .dock .hint { color: var(--n-muted); }
html.night body.nt .start-btn { --c: #ff5a3c; --cd: #ff5a3c; border-radius: 30px; min-height: 60px; box-shadow: 0 14px 30px rgba(255, 90, 60, 0.4); }
html.night body.nt .start-btn:disabled { --c: rgba(255, 255, 255, 0.14); --cd: transparent; --tc: rgba(255, 255, 255, 0.6); box-shadow: none; }
/* В лобби шапка прозрачная — пусть уезжает вместе со страницей, а не висит поверх аватарок */
html.night body.nt:has(.lobby) .topbar { position: relative; }
/* Колоды прокручиваются до края экрана, рамка выбранной не обрезается */
html.night body.nt .lobby .packs { margin: 0 -16px; padding: 4px 16px 6px; }
.nl-dock-row { display: flex; align-items: center; gap: 10px; }
.nl-dock-row .start-btn { flex: 1; min-width: 0; }
.nl-dock-row .hint { flex: 1; margin: 0; text-align: left; }
.nl-rounds { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; height: 60px; padding: 0 16px 0 18px; border: 0; border-radius: 30px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); color: #fff; font: inherit; cursor: pointer; }
.nl-rounds b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.nl-rounds .ic { transform: rotate(90deg); transition: transform 0.2s; opacity: 0.8; }
.nl-rounds.on .ic { transform: rotate(-90deg); }
.nl-rounds:disabled { cursor: default; background: none; box-shadow: none; padding: 0 4px; }
.nl-rmenu { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 10px; border-radius: 20px; background: rgba(36, 29, 61, 0.97); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 -10px 30px rgba(0, 0, 0, 0.3); animation: rise 0.2s var(--spring); }
.nl-rmenu button { height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.nl-rmenu button:first-child { grid-column: 1 / -1; font-size: 15px; }
.nl-rmenu button.on { background: var(--n-yellow, #ffc83d); color: #241d3d; }
.nl-rmenu button:disabled { opacity: 0.3; cursor: default; }
html.night body.nt .invite-btn { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn.ghost.pp-kick { --tc: #c2321b; color: #c2321b; }
/* Всплывающие окна поверх ночного экрана — со своим тёмным текстом */
html.night body.nt .pc-card { color: var(--ink); }
/* Выбор героя в комнате (по своей аватарке) */
.hero-pick h2 { margin: 0 0 4px; }
.hp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: min(60vh, 520px); overflow-y: auto; padding: 4px 2px 2px; }
.hp-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid transparent; border-radius: 16px; background: var(--surface-2); font: inherit; color: var(--ink); cursor: pointer; }
.hp-item .ava { --s: 56px; }
.hp-item span { font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hp-item.on { border-color: var(--violet); background: #f1edff; }
/* Лобби: вместо «КОМНАТА · 1 ИЗ 12» наверху сразу код комнаты, «Ссылка» и «Позвать друзей»; слева — только кнопка «назад» */
html.night body.nt:has(.lobby) .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none; }
html.night body.nt:has(.lobby) .topbar .home-btn { pointer-events: auto; }
html.night body.nt:has(.lobby) .tb-pill { visibility: hidden; }
html.night body.nt .lobby { padding-top: max(4px, env(safe-area-inset-top)); gap: 10px; }
/* Компактный верх лобби: [назад] КОД КОМНАТЫ 2QNM · [ссылка] [Позвать] — одной строкой */
.nl-top { display: flex; align-items: center; gap: 8px; min-height: 44px; padding-left: 52px; }
.nl-code { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.nl-code .nl-label { font-size: 10px; letter-spacing: 0.12em; }
.nl-code-v { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: 0.1em; line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22); }
.nl-ic { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); display: grid; place-items: center; cursor: pointer; }
.nl-invite { height: 44px; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--n-yellow, #ffc83d); color: #241d3d; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
html.night body.nt .lobby .open-row { height: 44px; }
html.night body.nt .lobby .pl .ava { --s: 52px; }
/* Пожелание гостя на теме: обводка повторяет скругление плитки; в ночном — белая, как у режимов (жёлтая — у выбранной) */
.theme { border-radius: 18px; }
html.night body.nt .lobby .theme.wished { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75); }

/* ═════════ Ночная сцена: знакомство (привет → возраст → герой и имя; аккаунт по желанию) ═════════ */
.ob { display: flex; flex-direction: column; min-height: calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); /* 44 = отступы сцены 6+24 и низа страницы 14 */ padding-top: max(6px, env(safe-area-inset-top)); color: #fff; }
.ob-space { flex: 1; min-height: 16px; }
.ob .start-btn { width: 100%; flex: 0 0 auto; }
.ob .start-btn .ic { flex: 0 0 auto; }
.ob-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px; }
.ob-back { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); display: grid; place-items: center; cursor: pointer; }
.ob-dots { display: flex; justify-content: center; gap: 6px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); transition: width 0.25s; }
.ob-dots i.on { width: 22px; background: var(--n-yellow); }
.ob-head { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.ob-head h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.ob-head p { margin: 0; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, 0.72); }
.ob-cap { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.ob-link { border: 0; background: none; padding: 6px 2px; color: var(--n-yellow); font: inherit; font-weight: 700; cursor: pointer; }
.ob-loading { margin: 40vh 0 0; text-align: center; color: var(--n-muted); }

/* Привет */
.ob-crew { position: relative; height: 290px; margin-top: 8px; }
.ob-crew .ava { position: absolute; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3); }
.ob-crew .ob-c0 { --s: 132px; left: calc(50% - 66px); top: 52px; box-shadow: 0 0 0 5px var(--n-yellow), 0 18px 40px rgba(0, 0, 0, 0.35); z-index: 2; }
.ob-crew .ob-c1 { --s: 84px; left: 4%; top: 22px; transform: rotate(-8deg); }
.ob-crew .ob-c2 { --s: 92px; right: 3%; top: 8px; transform: rotate(7deg); }
.ob-crew .ob-c3 { --s: 78px; left: 9%; top: 168px; transform: rotate(6deg); }
.ob-crew .ob-c4 { --s: 86px; right: 7%; top: 160px; transform: rotate(-6deg); }
.ob-pct { position: absolute; left: calc(50% + 14px); top: 206px; z-index: 3; padding: 6px 12px; border-radius: 14px; background: var(--n-yellow); color: #241d3d; font-family: var(--font-display); font-weight: 800; font-size: 18px; transform: rotate(-4deg); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3); }
.ob-hello { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ob-logo { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 48px; letter-spacing: -0.02em; line-height: 1; color: #fff; }
.ob-logo span { color: var(--n-yellow); }
.ob-hello p { margin: 0; max-width: 320px; font-size: 17px; line-height: 1.4; color: rgba(255, 255, 255, 0.86); }
.ob-ghost { margin-top: 10px; height: 56px; border: 0; border-radius: 28px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); color: #fff; font: inherit; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.ob-small { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--n-muted); }

/* Привет: звуковые волны вокруг героя, ноты, крики, сравнение «оригинал / ты» */
@keyframes ob-ring { 0% { transform: scale(0.75); opacity: 0.75; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes ob-bar { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
@keyframes ob-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.ob-ring { position: absolute; left: calc(50% - 90px); top: 28px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid rgba(255, 200, 61, 0.7); animation: ob-ring 2.4s ease-out infinite; }
.ob-ring.r2 { animation-delay: 0.8s; }
.ob-ring.r3 { animation-delay: 1.6s; border-color: rgba(255, 255, 255, 0.5); }
.ob-note { position: absolute; width: 24px; height: 24px; color: var(--n-yellow); animation: ob-float 3s ease-in-out infinite; }
.ob-note svg { width: 100%; height: 100%; }
.ob-note.n1 { left: calc(50% - 76px); top: 6px; rotate: -12deg; }
.ob-note.n2 { left: calc(50% + 50px); top: 0; width: 20px; height: 20px; color: rgba(255, 255, 255, 0.85); rotate: 10deg; animation-delay: 0.5s; }
.ob-note.n3 { left: 2%; top: 120px; color: #ff8fb8; animation-delay: 1s; }
.ob-shout { position: absolute; z-index: 3; padding: 6px 10px; border-radius: 14px 14px 14px 4px; background: #fff; color: #241d3d; font-family: var(--font-display); font-weight: 800; font-size: 12px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25); animation: ob-float 3.2s ease-in-out infinite; }
.ob-shout.s1 { right: 0; top: 104px; rotate: 6deg; }
.ob-shout.s2 { left: 0; top: 250px; border-radius: 14px 14px 4px 14px; rotate: -5deg; animation-delay: 0.7s; }
.ob-wave { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 22px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.ob-wave-rows { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ob-wave-rows > div { display: flex; align-items: center; gap: 8px; }
.ob-wave-rows span:first-child { width: 58px; font-size: 11px; font-weight: 700; color: var(--n-yellow); }
.ob-wave-rows > div + div span:first-child { color: rgba(255, 255, 255, 0.8); }
.ob-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 26px; }
.ob-bars i { flex: 1; border-radius: 2px; background: var(--n-yellow); }
.ob-bars.live i { background: #fff; animation: ob-bar 1s ease-in-out infinite; }
.ob-wave-pct { display: flex; flex-direction: column; align-items: center; }
.ob-wave-pct b { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; color: var(--n-yellow); }
.ob-wave-pct span { font-size: 11px; color: rgba(255, 255, 255, 0.7); }

/* Возраст */
.ob-ages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.ob-agec { position: relative; height: 180px; padding: 14px; border: 0; border-radius: 26px; overflow: hidden; background: var(--c); color: #fff; font: inherit; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; cursor: pointer; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22); transition: transform 0.15s; }
.ob-agec:active { transform: scale(0.97); }
.ob-agec.on { box-shadow: 0 0 0 4px var(--n-yellow), 0 14px 30px rgba(0, 0, 0, 0.3); }
.ob-agec .ob-age-ava { --s: 112px; position: absolute; right: -14px; top: -10px; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.22); }
.ob-agec b { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; }
.ob-agec span { position: relative; font-size: 15px; font-weight: 600; line-height: 1.3; color: rgba(255, 255, 255, 0.9); }

/* Герой и имя: большая карусель (листаются все), имя поверх; ниже — подходящие и закрытые */
.ob-card { position: relative; margin-top: 10px; }
.ob-hero .hero-stage { height: min(430px, 52dvh); border-radius: 30px; background: #fcd8bb; box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.9), 0 18px 40px rgba(0, 0, 0, 0.35); }
.ob-hero .hero-stage.locked { background: #4a4366; }
.ob-hero .hs-peek, .ob-hero .hs-hint, .ob-hero .hs-dots { display: none; }
.ob-hero .hs-bar { top: 38%; bottom: auto; left: 10px; right: 10px; }
.ob-hero .hs-arrow { display: grid; background: rgba(23, 18, 43, 0.45); color: #fff; box-shadow: none; width: 44px; height: 44px; }
.ob-hero .hs-lock { top: 12px; left: auto; right: 12px; transform: none; background: rgba(23, 18, 43, 0.75); color: var(--n-yellow); }
.hs-count { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 10px; border-radius: 12px; background: rgba(23, 18, 43, 0.55); color: var(--n-yellow); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.ob-hero .hs-name { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; padding: 0 16px 76px; border-radius: 0 0 30px 30px; align-items: flex-start; justify-content: flex-end; gap: 2px; background: linear-gradient(rgba(23, 18, 43, 0), rgba(23, 18, 43, 0.88) 55%); pointer-events: none; }
.ob-hero .hs-name b { font-size: 20px; color: #fff; }
.ob-hero .hs-name::after { content: '⇆ листай · нажми на героя — скажет «привет»'; font-size: 12px; color: rgba(255, 255, 255, 0.7); }
.ob-name { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ob-name input { flex: 1; min-width: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 16px; font-weight: 500; outline: none; }
.ob-name input::placeholder, .ob-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.ob-name input.flash { animation: pop 0.3s; }
.ob-wand { width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 13px; background: rgba(255, 200, 61, 0.2); font-size: 20px; cursor: pointer; }
.ob-cap-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.ob-all { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: rgba(255, 200, 61, 0.16); color: var(--n-yellow); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ob-hero > .ob-cap { margin-top: 10px; }
.ob-row { display: flex; gap: 10px; margin: 8px -16px 0; padding: 4px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.ob-row::-webkit-scrollbar { display: none; }
.ob-h { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.ob-h .ava { --s: 52px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22); }
.ob-h.on .ava { box-shadow: 0 0 0 3px var(--n-yellow); }
.ob-h.lk .ava { --s: 44px; filter: grayscale(0.7) brightness(0.7); }
.ob-h i, .ob-sh i { display: flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); font-style: normal; font-size: 10px; font-weight: 700; color: var(--n-yellow, #ffc83d); white-space: nowrap; }
/* Окно «Все герои» */
.ob-sheet { background: #241d3d !important; color: #fff !important; max-height: 82dvh; display: flex; flex-direction: column; }
.ob-sheet-top { display: flex; align-items: center; justify-content: space-between; }
.ob-sheet-top h2 { margin: 0; font-family: var(--font-display); font-size: 20px; color: #fff; }
.ob-sheet .modal-x { position: static; }
.ob-sheet > p { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.ob-sheet-grid { flex: 1; overflow-y: auto; margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; align-content: start; }
.ob-sh { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, 0.86); font: inherit; cursor: pointer; }
.ob-sh .ava { --s: 58px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22); }
.ob-sh.on .ava { box-shadow: 0 0 0 3px var(--n-yellow, #ffc83d); }
.ob-sh.lk .ava { filter: grayscale(0.7) brightness(0.7); }
.ob-sh span { font-size: 10.5px; font-weight: 600; line-height: 1.15; text-align: center; max-width: 80px; }

/* Аккаунт / вход */
.ob-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 22px 0 18px; padding: 4px; border-radius: 18px; background: rgba(255, 255, 255, 0.08); }
.ob-tabs button { height: 44px; border: 0; border-radius: 14px; background: transparent; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ob-tabs button.on { background: #fff; color: #241d3d; }
.ob-auth .ob-cap { margin-bottom: 6px; }
.ob-input { height: 54px; margin-bottom: 12px; padding: 0 16px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); color: #fff; font: inherit; font-size: 17px; font-weight: 500; outline: none; }
.ob-input:focus, .ob-name:focus-within { box-shadow: inset 0 0 0 1.5px var(--n-yellow); }
.ob-note { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 200, 61, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.3); font-size: 13.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.86); }
.ob-note b { color: var(--n-yellow); }
.ob-skip { margin-top: 8px; color: var(--n-muted); font-weight: 600; font-size: 15px; }

/* Невысокий телефон: компактнее */
@media (max-height: 760px) {
  .ob-crew { height: 240px; transform: scale(0.85); transform-origin: 50% 0; margin-bottom: -36px; }
  .ob-agec { height: 150px; }
  .ob-agec .ob-age-ava { --s: 92px; }
  .ob-hero .hero-stage { height: min(380px, 48dvh); }
}
.ob .start-btn { font-family: var(--font); font-size: 18px; font-weight: 700; white-space: nowrap; }

/* ═════════ Ночная сцена · шаг 3: заставка раунда, «Слушаем», запись ═════════ */
/* Шапка в игре: «РАУНД 2 ИЗ 5» мелко сверху, под ним — что происходит; таймер — справа на месте пустой кнопки */
html.night body.nt .tb-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 44px; position: static; }
html.night body.nt .tb-round { order: -1; font-size: 12px; letter-spacing: 0.12em; }
html.night body.nt .tb-round:not(:empty)::before { content: none; }
html.night body.nt .tb-phase { font-size: 15px; letter-spacing: 0; text-transform: none; color: #fff; }
html.night body.nt .tb-code { display: none; }
html.night body.nt .topbar { position: sticky; }
html.night body.nt .tb-pill .timer { position: absolute; right: 16px; top: max(10px, env(safe-area-inset-top)); width: 44px; height: 44px; }
html.night body.nt .timer .track { stroke: rgba(255, 255, 255, 0.18); }
html.night body.nt .timer .bar { stroke: var(--n-yellow); }
html.night body.nt .timer b { color: #fff; }
html.night body.nt .dock .btn.ghost { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }

/* Заставка раунда */
.inter.n { background: radial-gradient(circle at 50% 38%, #6c55ff 0%, #3a2f8a 42%, #17122b 100%); }
.inter.n h2 { display: flex; align-items: flex-start; justify-content: center; gap: 16px; font-family: var(--font-display); font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.inter-n { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.inter-n small { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0.02em; color: var(--n-yellow, #ffc83d); text-shadow: none; }
.inter.n p { font-size: 18px; color: rgba(255, 255, 255, 0.88); }
.inter.n .inter-dots i.cur { background: #ff5a3c; }

/* Слушаем оригинал / в эфире */
.nplay { display: flex; flex-direction: column; min-height: calc(100dvh - 90px - var(--dock-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom)); color: #fff; }
.nl-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.nl-kick { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-yellow); }
.nl-title { margin: 0; max-width: 340px; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.15; }
@keyframes nl-fill { to { background: var(--n-yellow, #ffc83d); } }
.nl-wave { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 110px; margin: 22px 0 6px; }
.nl-wave i { width: 5px; flex: 0 0 auto; border-radius: 3px; background: rgba(255, 255, 255, 0.35); animation: nl-fill 0.08s linear forwards; }
.nl-time { display: flex; justify-content: space-between; width: 100%; max-width: 300px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.nl-sub { margin: 4px 0 0; font-size: 15px; color: rgba(255, 255, 255, 0.75); }
/* Очередь */
.nq { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 12px; margin-top: 12px; }
.nq-cap { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.nq-row { display: flex; gap: 16px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.nq-p { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0.75; }
.nq-p .ava { --s: 46px; }
.nq-p small { font-size: 12px; white-space: nowrap; }
.nq-p.now { opacity: 1; }
.nq-p.now .ava { box-shadow: 0 0 0 3px #ff5a3c; }
.nq-p.now small { font-weight: 700; }
.nq-p.past { opacity: 0.55; }
.nq-p b { position: absolute; top: -6px; right: -10px; padding: 1px 5px; border-radius: 8px; background: var(--n-yellow); color: #241d3d; font-size: 10.5px; }

/* Твоя очередь: герой с красным свечением, «Повтори!», запись */
.np-hero { position: relative; width: 210px; height: 210px; border-radius: 50%; background: #fcd8bb; overflow: hidden; box-shadow: 0 0 0 8px rgba(255, 90, 60, 0.35), 0 0 0 22px rgba(255, 90, 60, 0.12), 0 30px 70px rgba(0, 0, 0, 0.45); }
.np-hero .ava.puppet { --s: 210px; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.np-hero .ava.puppet .mf, .np-hero .ava.puppet .pose, .np-hero .ava.puppet img, .np-hero .ava.puppet video { object-fit: cover; object-position: center top; }
.np-onair { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 4px 10px; border-radius: 10px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; display: none; }
.nperf:not(.mine) .np-onair, .nperf .on-air .np-onair { display: block; }
.np-verb { margin: 22px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.22); }
.np-verb.np-who { font-size: 30px; }
.nrec { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; margin-top: 14px; background: none; box-shadow: none; padding: 0; }
.nrec .rec-progress { width: 220px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.nrec .rec-progress i { display: block; height: 100%; width: 0; border-radius: 6px; background: #ff5a3c; }
.nrec .rec-hint { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.nrec .rec-row { position: relative; display: flex; justify-content: center; margin-top: 12px; }
.nrec .rec-btn { width: 112px; height: 112px; border-radius: 50%; border: 0; background: #ff5a3c; color: #fff; box-shadow: 0 0 0 12px rgba(255, 90, 60, 0.25), 0 0 0 26px rgba(255, 90, 60, 0.1), 0 20px 50px rgba(0, 0, 0, 0.4); }
.nrec .rec-label { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.nrec .rec-label .mic { font-size: 0; line-height: 0; }
.nrec .rec-label .count { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.nrec .rec-btn.on .rec-label { font-size: 0; }
.nrec .rec-side { position: absolute; left: calc(100% + 18px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; color: rgba(255, 255, 255, 0.75); }
.nrec .rec-sec { font-family: var(--font-display); font-size: 22px; color: #fff; }
.nrec .rec-side span { font-size: 11px; }
.nrec .rec-side { width: auto; height: auto; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.nrec .rec-label .count { width: auto; height: auto; background: none; color: #fff; }
.nrec .rec-ring, .nrec .rec-ring2 { border-radius: 50%; }
.nrec .rec-side span { color: rgba(255, 255, 255, 0.6); }
/* Кнопка «домой» — круглая, как в макете; в соло-лобби баннер «Серия на очки» — ниже неё */
html.night body.nt .home-btn { border-radius: 50%; }
/* Соло: шапка одной строкой — «ИГРАЕШЬ ОДИН / Серия на очки» и свой герой справа */
.nl-solo-t { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.nl-me { flex: 0 0 auto; display: grid; place-items: center; }
.nl-me .ava { --s: 48px; cursor: pointer; box-shadow: 0 0 0 3px var(--n-yellow); }
/* Кружок эфира — без нажатия: в покое приглушён, во время отсчёта и эфира — ярко-красный */
.nrec .rec-btn { display: grid; place-items: center; cursor: default; background: rgba(255, 90, 60, 0.55); }
.nrec .rec-btn.on, .nrec .rec-btn:has(.count) { background: #ff5a3c; }
.nrec .rec-btn.on .rec-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
/* Живое сравнение на записи: оригинал полупрозрачный, поверх — твой голос по ходу записи */
.nr-wave { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; max-width: 320px; height: 72px; }
.nr-wave span { position: relative; flex: 1 1 0; max-width: 6px; height: 100%; }
.nr-wave i { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); border-radius: 3px; }
.nr-wave .ref { background: rgba(255, 255, 255, 0.22); }
.nr-wave .live { height: 0; background: var(--n-yellow, #ffc83d); transition: height 0.08s linear, background 0.2s; }
.nr-wave .live.ok { background: #5fe0b8; }
.nr-legend { display: flex; gap: 14px; font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.nr-legend span { display: flex; align-items: center; gap: 5px; }
.nr-legend i { width: 10px; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }
.nr-legend i.you { background: linear-gradient(90deg, var(--n-yellow, #ffc83d) 50%, #5fe0b8 50%); }
/* Своя запись: герой чуть меньше — помещается волна сравнения */
.nperf.mine .np-hero { width: 180px; height: 180px; }
.nperf.mine .np-hero .ava.puppet { --s: 180px; }
.nperf.mine .np-verb { margin-top: 16px; }
.nperf.mine .nrec { margin-top: 8px; }

/* ═════════ Ночная сцена · шаг 4: оценка, угадайка, итоги раунда, финал ═════════ */
html.night body.nt #strip { display: none; }
.ng-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-top: 8px; }
.nv-ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; margin-top: 10px; border: 0; border-radius: 26px; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
html.night body.nt .rate { justify-content: center; margin-top: 12px; color: rgba(255, 255, 255, 0.7); }
html.night body.nt .rate button { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }
html.night body.nt .rate button.on { background: rgba(255, 200, 61, 0.2); border-color: var(--n-yellow); }
html.night body.nt .dock .next-btn .next-cd { background: rgba(255, 255, 255, 0.22); }

/* Оценка: герой крупно, процент справа сверху, вердикт снизу */
.nv-card { position: relative; height: min(400px, 48dvh); margin: 4px -16px 0; overflow: hidden; }
.nv-hero { position: absolute; inset: 0; background: #fcd8bb; }
.nv-hero .ava.puppet { --s: 100%; width: 100%; height: 100%; border-radius: 0; box-shadow: none; background: transparent; }
.nv-hero .ava.puppet .mf, .nv-hero .ava.puppet .pose, .nv-hero .ava.puppet img, .nv-hero .ava.puppet video { object-fit: cover; object-position: center top; }
.nv-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 18, 43, 0.35) 0%, rgba(23, 18, 43, 0) 30%, rgba(23, 18, 43, 0) 50%, #241d52 100%); pointer-events: none; }
.nv-chip { position: absolute; z-index: 2; top: 14px; left: 16px; padding: 7px 12px; border-radius: 99px; background: rgba(23, 18, 43, 0.55); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nv-pct { position: absolute; z-index: 2; top: 10px; right: 16px; font-family: var(--font-display); font-weight: 800; font-size: 64px; line-height: 0.9; color: var(--n-yellow); text-shadow: 0 6px 0 rgba(0, 0, 0, 0.3); }
.nv-verdict { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; }
.nv-verdict span { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-yellow); }
.nv-verdict h1 { margin: 2px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.1; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.nv-parts { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.np-part { display: grid; grid-template-columns: 96px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.np-part span { font-size: 15px; font-weight: 600; }
.np-part i { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.np-part b { display: block; width: 0; height: 100%; border-radius: 6px; background: var(--n-yellow); transition: width 1s cubic-bezier(.2, .8, .3, 1); }
.np-part em { font-style: normal; font-weight: 700; text-align: right; }
.nreveal .nl-sub { margin-top: 12px; text-align: center; }

/* Угадай, откуда */
.ng-play { width: 86px; height: 86px; border: 0; border-radius: 50%; background: #fff; color: #4b33d6; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.12), 0 20px 50px rgba(0, 0, 0, 0.4); }
.ng-play .ic { margin-left: 4px; }
.nguess .nl-title { margin-top: 8px; }
.ng-opts { display: flex; flex-direction: column; margin-top: 22px; }
.ng-opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); background: transparent; color: #fff; text-align: left; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.ng-opt:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.ng-opt:disabled { cursor: default; }
.ng-l { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); display: grid; place-items: center; font-family: var(--font-display); font-size: 14px; }
.ng-t { flex: 1; min-width: 0; }
.ng-opt small { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.ng-opt.mine { color: var(--n-yellow); }
.ng-opt.mine .ng-l { background: var(--n-yellow); color: #241d52; box-shadow: none; }
.ng-opt.right { color: #5fe0b8; }
.ng-opt.right .ng-l { background: #22c99a; color: #fff; box-shadow: none; }
.ng-opt.wrong { color: #ff8a7a; }
.ng-opt.wrong .ng-l { background: #ff5a3c; color: #fff; box-shadow: none; }
.ng-who { display: flex; }
.ng-who .ava { --s: 26px; margin-left: -6px; box-shadow: 0 0 0 2px #2a2160; }
.ng-res { margin-top: 14px; text-align: center; font-size: 16px; font-weight: 700; color: rgba(255, 255, 255, 0.8); }
.ng-res.ok { color: #5fe0b8; }
.ng-res.bad { color: #ff8a7a; }
.ng-wait { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.ng-wait i { flex: 1; }
.ng-avas { display: flex; }
.ng-avas .ava { --s: 34px; margin-left: -8px; box-shadow: 0 0 0 2px #2a2160; }
.ng-avas .ava:first-child { margin-left: 0; }

/* Итоги раунда */
.nt-head, .nt-list li { display: grid; grid-template-columns: 28px 48px minmax(0, 1fr) 44px 48px; align-items: center; gap: 10px; }
.nt-head { margin-top: 20px; padding-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.nt-head span:first-child { grid-column: 1 / 3; }
.nt-head span:nth-child(3), .nt-head span:nth-child(4) { text-align: right; }
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-list li { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); animation: rise 0.4s var(--spring) both; }
.nt-list li .ava { --s: 48px; }
.nt-place { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: rgba(255, 255, 255, 0.5); }
.nt-place.top { color: var(--n-yellow); }
.nt-name { display: flex; flex-direction: column; min-width: 0; }
.nt-name b { font-size: 16px; }
.nt-name small { font-size: 13px; color: rgba(255, 255, 255, 0.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-pts { text-align: right; font-weight: 700; color: var(--n-yellow); }
.nt-total { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.nt-list li.me .nt-name b { color: var(--n-yellow); }
.nt-fun { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-size: 15px; }

/* Финал */
.nf-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.05; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.nf-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin-top: 24px; text-align: center; }
.nf-podium:has(.nf-pod:only-child) { grid-template-columns: 1fr; }
.nf-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: default; }
.nf-pod .ava.puppet { --s: 80px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45); }
.nf-pod.pod1 .ava.puppet { --s: 120px; box-shadow: 0 0 0 5px var(--n-yellow), 0 20px 50px rgba(0, 0, 0, 0.45); }
.nf-pod.pod3 .ava.puppet { --s: 72px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3); }
.nf-crown { margin-bottom: -6px; }
.nf-pod b { font-size: 15px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-place { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: rgba(255, 255, 255, 0.7); }
.nf-pod.pod1 .nf-place { font-size: 60px; color: var(--n-yellow); }
.nf-pod.pod3 .nf-place { font-size: 34px; color: rgba(255, 255, 255, 0.55); }
.nf-pod small { font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.nf-titles { display: flex; flex-direction: column; margin-top: 22px; }
.nf-t { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 15px; }
.nf-t:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.nf-t > span:nth-child(2) { flex: 1; min-width: 0; }
.nf-te { font-size: 20px; width: 24px; text-align: center; }
.nf-rest { margin: 14px 0 0; padding-left: 22px; color: rgba(255, 255, 255, 0.8); font-size: 14px; }
.nf-acts { display: flex; flex-direction: column; margin-top: 8px; }
html.night body.nt .next-card { margin-top: 18px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .nx-head span, html.night body.nt .nx-text span { color: rgba(255, 255, 255, 0.6); }
html.night body.nt .nx-opt { border-color: rgba(255, 255, 255, 0.14); }
html.night body.nt .nx-opt.mine { border-color: var(--n-yellow); background: rgba(255, 200, 61, 0.12); }
html.night body.nt .nx-text small { color: var(--n-yellow); }
html.night body.nt .nx-votes .ava { box-shadow: 0 0 0 2px #2a2160; }
html.night body.nt .nx-same { background: rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .duel { background: rgba(255, 255, 255, 0.07); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
html.night body.nt .duel-side span { color: rgba(255, 255, 255, 0.6); }
/* Финал соло на ночном фоне: карточки полупрозрачные, текст светлый */
html.night body.nt .solo-final :is(.sf-card, .sf-xp, .sf-pc) { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .solo-final .sf-card span, html.night body.nt .solo-final .sf-xp span, html.night body.nt .solo-final .sf-pc-txt span { color: rgba(255, 255, 255, 0.7); }
html.night body.nt .solo-final .sf-card b, html.night body.nt .solo-final .sf-pc-txt b { color: #fff; }
html.night body.nt .solo-final .sf-bar { background: rgba(255, 255, 255, 0.14); }
html.night body.nt .solo-final .sf-bar i { background: var(--n-yellow); }
/* Пьедестал: старое .pod { width: 31% } сжимало колонку — аватарка уезжала за край; на двоих — тоже по центру */
.nf-podium { display: flex; justify-content: center; }
.nf-podium .nf-pod { flex: 0 1 33.333%; width: auto; max-width: none; min-width: 0; }
/* Угадайка: перебиваем старые карточки .gopt — в новом дизайне это строки списка */
.nguess .gopt.ng-opt { flex-direction: row; align-items: center; gap: 14px; padding: 10px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0; background: transparent; box-shadow: none; color: #fff; text-align: left; opacity: 1; }
.nguess .gopt.ng-opt:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.nguess .gopt.ng-opt.mine { color: var(--n-yellow); }
.nguess .gopt.ng-opt.right { color: #5fe0b8; animation: none; }
.nguess .gopt.ng-opt.wrong { color: #ff8a7a; }
.nguess .gopt.ng-opt::after { content: none; }

/* ═════════ Ночная сцена: все всплывающие окна (у всех) ═════════
   Большинство стилей окон берёт цвета из переменных — переопределяем их внутри окна, остальное — точечно. */
html.night .postcard { background: rgba(10, 7, 24, 0.72); }
html.night :is(.pc-card, .mictest) {
  --ink: #fff; --muted: rgba(255, 255, 255, 0.62); --surface: rgba(255, 255, 255, 0.09); --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.16); --card: rgba(255, 255, 255, 0.08); --night: #17122b;
  background: radial-gradient(circle at 50% 0%, #3a2f8a 0%, #241d3d 62%); color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 80px rgba(0, 0, 0, 0.55);
}
html.night .pc-card h2 { font-family: var(--font-display); color: #fff; }
html.night .pc-card .hint, html.night .mictest .hint { color: rgba(255, 255, 255, 0.62); }
html.night .modal-x { background: rgba(255, 255, 255, 0.12); color: #fff; }
/* кнопки: главная — красная, остальные — полупрозрачные с обводкой */
html.night :is(.pc-card, .mictest) .btn { --cd: transparent; box-shadow: none; border-radius: 26px; }
html.night :is(.pc-card, .mictest) .btn:not(.primary):not(.violet):not(.mint):not(.yellow):not(.tg) { --c: rgba(255, 255, 255, 0.1); --tc: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
html.night :is(.pc-card, .mictest) .btn.primary { --c: #ff5a3c; box-shadow: 0 12px 26px rgba(255, 90, 60, 0.35); }
html.night :is(.pc-card, .mictest) .btn.violet { --c: #5b3fe0; }
html.night :is(.pc-card, .mictest) .btn.yellow { --c: var(--n-yellow, #ffc83d); --tc: #241d3d; }
html.night .pc-card .btn.ghost.pp-kick { --tc: #ff8a7a; color: #ff8a7a; }
/* поля ввода */
html.night .pc-card :is(.input, input, textarea, select) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
html.night .pc-card :is(.input, input, textarea)::placeholder { color: rgba(255, 255, 255, 0.45); }
html.night .pc-card :is(.input, input):focus { background: rgba(255, 255, 255, 0.12); border-color: var(--n-yellow, #ffc83d); box-shadow: none; }
/* ежедневный бонус, уровень, ачивки */
html.night .week i { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6); }
html.night .week i.on { background: linear-gradient(135deg, #ff5a3c, #ffc83d); color: #fff; }
html.night .nw-up { color: var(--n-yellow, #ffc83d); }
html.night .nw-xp { color: #5fe0b8; }
html.night .nw-coins { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow, #ffc83d); }
html.night .nw-ach { background: rgba(255, 200, 61, 0.1); }
html.night .pc-card .lvl-n { background: var(--n-yellow, #ffc83d); color: #241d3d; }
html.night .pc-card .progress { background: rgba(255, 255, 255, 0.14); }
html.night .pc-card .progress i { background: var(--n-yellow, #ffc83d); }
/* карточка игрока */
html.night .pp-lvl { color: var(--n-yellow, #ffc83d); }
html.night .pp-lvl b { background: var(--n-yellow, #ffc83d); color: #241d3d; }
html.night .pp-stats div { background: rgba(255, 255, 255, 0.08); }
html.night .pp-achs i { background: rgba(255, 200, 61, 0.14); }
html.night .pp-rel { color: var(--n-yellow, #ffc83d); background: rgba(255, 200, 61, 0.12); }
html.night .pp-rel.ok { color: #5fe0b8; background: rgba(34, 201, 154, 0.14); }
/* сохранить прогресс, магазин, закрытый герой */
html.night .save-box { border-top-color: rgba(255, 255, 255, 0.16); }
html.night .save-ico { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow, #ffc83d); }
html.night .save-head small b, html.night .lh-ways b { color: #fff; }
html.night .lh-ways em { color: var(--n-yellow, #ffc83d); }
html.night .pc-card .coin-chip { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow, #ffc83d); box-shadow: none; }
/* «Поделиться» и выбор героя — уже тёмные; проверка микрофона — тоже тёмная */
html.night .ss-text { color: rgba(255, 255, 255, 0.62); }
html.night .sheet-bg { background: rgba(10, 7, 24, 0.6); }
html.night .hero-pick .hp-item { background: rgba(255, 255, 255, 0.08); color: #fff; }
html.night .hero-pick .hp-item.on { background: rgba(255, 200, 61, 0.14); border-color: var(--n-yellow, #ffc83d); }
/* на ночных экранах раньше окнам ставили тёмный текст — теперь окна сами тёмные */
html.night body.nt .pc-card { color: #fff; }
/* Финал соло: раунды строками с полосками, как опыт уровня */
.sf-rlist { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
.sf-r { display: grid; grid-template-columns: 72px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.sf-r span { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.sf-r i { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.sf-r i b { display: block; height: 100%; border-radius: 8px; background: var(--n-yellow, #ffc83d); animation: sf-grow 0.9s cubic-bezier(.2, .8, .3, 1) both; transform-origin: left; }
.sf-r.hi i b { background: #22c99a; }
.sf-r.lo i b { background: #ff7a5c; }
.sf-r em { font-style: normal; font-weight: 800; text-align: right; }
.sf-r.none { opacity: 0.5; }
@keyframes sf-grow { from { transform: scaleX(0); } }
/* Видеооткрытка: превью 9:16 слева, справа — заголовок, пояснение и две ровные кнопки той же высоты, что превью */
.sf-vc { display: flex; gap: 14px; padding: 12px; border-radius: 22px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
.sf-vc .sf-pc-pv { width: 118px; flex: 0 0 auto; background: radial-gradient(circle at 50% 30%, #6c55ff, #3a2f8a 55%, #17122b); box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.6); }
.sf-vc .sf-pc-logo { font-family: var(--font-display); font-size: 13px; }
.sf-vc .sf-pc-logo i { font-style: normal; color: var(--n-yellow, #ffc83d); }
.sf-vc .sf-pc-play { color: #4b33d6; }
.sf-vc-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sf-vc-k { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-yellow, #ffc83d); }
.sf-vc-r > b { font-family: var(--font-display); font-size: 17px; line-height: 1.15; }
.sf-vc-t { font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, 0.66); }
.sf-vc-btns { margin-top: auto; display: grid; gap: 8px; }
.sf-vc-btns .btn { min-height: 44px; padding: 0 12px; border-radius: 22px; font-size: 14px; --cd: transparent; box-shadow: none; }
.sf-vc-btns .btn.primary { --c: #ff5a3c; }
.sf-vc-btns .btn:not(.primary) { --c: rgba(255, 255, 255, 0.1); --tc: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
/* Очередь: место под красное кольцо и значок процента — аватарки не обрезаются прокруткой */
.nq-row { padding: 10px 14px 4px 4px; margin: 0 -14px 0 -4px; }
/* Финал: без шапки «Финал» — подпись в верхней строке рядом с «домой», как в лобби */
html.night body.nt:has(.final, .nfinal) .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none; }
html.night body.nt:has(.final, .nfinal) .topbar .home-btn { pointer-events: auto; }
html.night body.nt:has(.final, .nfinal) .tb-pill { visibility: hidden; }
html.night body.nt :is(.final, .nfinal) { padding-top: max(4px, env(safe-area-inset-top)); }
html.night body.nt .nf-top .nl-label { color: var(--n-yellow); }
html.night body.nt .nf-top .nl-solo-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.night body.nt .nfinal .nf-podium { margin-top: 18px; }
/* Кнопки-плитки в финале (когда нет видеооткрытки) — полупрозрачные, «вызов» — фиолетовый */
html.night body.nt .acts .act { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); border: 0; }
html.night body.nt .acts .act.violet { background: #5b3fe0; box-shadow: none; }
html.night body.nt .acts .act.hot { background: #ff5a3c; box-shadow: none; }
/* Плашки-уведомления («Сервер обновился…», «Слишком мало игроков…») — жёлтые на ночном фоне */
html.night body.nt .notice { background: rgba(255, 200, 61, 0.14); color: #fff; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.4); }
/* Финал соло: раунды — в блоке «Твой результат», справа под суммой */
html.night .sf-head { align-items: stretch; }
html.night .sf-head .sf-hero { height: auto; min-height: 110px; align-self: stretch; }
.sf-head-r { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sf-head-r .sf-rlist { margin-top: 10px; padding: 0; gap: 6px; background: none; box-shadow: none; }
.sf-head-r .sf-r { grid-template-columns: 58px minmax(0, 1fr) 38px; gap: 8px; }
.sf-head-r .sf-r span { font-size: 12px; }
.sf-head-r .sf-r i { height: 6px; }
.sf-head-r .sf-r em { font-size: 13px; }

/* ═════════ Ночная сцена · шаг 5: профиль и разделы ═════════ */
/* Разделы (лидеры, друзья, вызовы, магазин, звук дня, присоединиться, вход, редактирование профиля):
   карточки — полупрозрачные на фоне, цвета — через переменные, как у окон */
html.night body.nt .subpage {
  --ink: #fff; --muted: rgba(255, 255, 255, 0.62); --surface: rgba(255, 255, 255, 0.07); --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.14); --card: rgba(255, 255, 255, 0.07); --night: rgba(255, 255, 255, 0.1); --night-2: rgba(255, 255, 255, 0.14);
  color: #fff;
}
html.night body.nt .subpage .card { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .subpage :is(.sub-top h1, .page-title) { color: #fff; }
html.night body.nt .subpage .sub-top .sq-btn { border-radius: 50%; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); }
html.night body.nt .subpage .hint, html.night body.nt .subpage .muted { color: rgba(255, 255, 255, 0.62); }
html.night body.nt .subpage .card-label { color: rgba(255, 255, 255, 0.55); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
html.night body.nt .subpage .btn { --cd: transparent; box-shadow: none; border-radius: 26px; }
html.night body.nt .subpage .btn:not(.primary):not(.violet):not(.mint):not(.yellow):not(.tg) { --c: rgba(255, 255, 255, 0.1); --tc: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
html.night body.nt .subpage .btn.primary { --c: #ff5a3c; box-shadow: 0 12px 26px rgba(255, 90, 60, 0.35); }
html.night body.nt .subpage .btn.violet { --c: #5b3fe0; }
html.night body.nt .subpage .btn.yellow { --c: var(--n-yellow); --tc: #241d3d; }
html.night body.nt .subpage :is(.input, input, textarea, select) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; }
html.night body.nt .subpage :is(.input, input, textarea)::placeholder { color: rgba(255, 255, 255, 0.45); }
html.night body.nt .subpage :is(.input, input):focus { background: rgba(255, 255, 255, 0.12); border-color: var(--n-yellow); box-shadow: none; }
html.night body.nt .subpage .coin-chip { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow); box-shadow: none; }
html.night body.nt .subpage .link-more { color: var(--n-yellow); }

/* Профиль по макету */
.nme { gap: 0; padding-top: 6px; }
.nm-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.nm-ava { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.nm-ava .ava { --s: 124px; box-shadow: 0 0 0 4px var(--n-yellow), 0 20px 50px rgba(0, 0, 0, 0.4); }
.nm-edit { position: absolute; right: -2px; bottom: 2px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #241d52; display: grid; place-items: center; }
.nm-hero h1 { margin: 14px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: #fff; }
.nm-lvl { font-size: 14px; color: rgba(255, 255, 255, 0.72); }
.nm-bar { width: 220px; height: 4px; margin-top: 10px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.nm-bar i { display: block; height: 100%; border-radius: 4px; background: var(--n-yellow); }
.nm-xp { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.nm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; text-align: center; }
.nm-stats div { display: flex; flex-direction: column; gap: 2px; }
.nm-stats div + div { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.nm-stats b { font-family: var(--font-display); font-size: 22px; }
.nm-stats b.hot { color: var(--n-yellow); }
.nm-stats span { font-size: 12px; color: rgba(255, 255, 255, 0.66); }
.nm-cap { display: flex; align-items: baseline; justify-content: space-between; margin-top: 24px; }
.nm-cap span { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.nm-cap button { border: 0; background: none; padding: 6px 0; color: var(--n-yellow); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.nm-achs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 8px; margin-top: 10px; }
.nm-ach { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; opacity: 0.45; }
.nm-ach.on { opacity: 1; }
.nm-ach i { width: 52px; height: 52px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6); display: grid; place-items: center; font-style: normal; font-size: 24px; filter: grayscale(1); }
.nm-ach.on i { box-shadow: inset 0 0 0 1.5px var(--n-yellow); filter: none; }
.nm-ach span { font-size: 11px; line-height: 1.15; text-align: center; }
.nm-list { display: flex; flex-direction: column; margin-top: 20px; }
.nm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); background: none; color: #fff; text-align: left; font: inherit; cursor: pointer; }
div.nm-row { cursor: default; }
.nm-list > .nm-row:last-of-type { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.nm-ic { flex: 0 0 auto; color: rgba(255, 255, 255, 0.8); display: grid; place-items: center; }
.nm-ic.ok { color: #22c99a; }
.nm-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nm-row-t b { font-size: 16px; }
.nm-row-t small { font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.nm-go { color: var(--n-yellow); font-weight: 700; font-size: 15px; white-space: nowrap; }
.nm-links { display: flex; gap: 22px; padding: 10px 0; }
.nm-links button { border: 0; background: none; padding: 6px 0; color: var(--n-yellow); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.nm-links button.out { color: #ff8a73; }
.nm-auth { margin-top: 12px; }
/* Переключатели (лидеры: неделя / всё время и т. п.) — как в знакомстве: полупрозрачная подложка, выбранный — белый */
html.night body.nt .tabs { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
html.night body.nt .tab { color: rgba(255, 255, 255, 0.8); }
html.night body.nt .tab.on { background: #fff; color: #241d3d; }
/* Кнопки возраста и волшебная палочка в редактировании профиля */
html.night body.nt .subpage .chip-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; transform: none; }
html.night body.nt .subpage .chip-btn.on { background: #fff; border-color: #fff; color: #241d3d; }
html.night body.nt .subpage .wand { background: rgba(255, 200, 61, 0.2); box-shadow: none; }
html.night body.nt .profile-page .hero-stage { box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.9), 0 18px 40px rgba(0, 0, 0, 0.35); }
html.night body.nt .profile-page .hs-dots i { background: rgba(255, 255, 255, 0.3); }
html.night body.nt .profile-page .hs-dots i.on { background: var(--n-yellow); }
/* Вход: значок замка */
html.night body.nt .login-hero > span { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow); }
/* Профиль: отступ сверху */
.nme .nm-hero { margin-top: max(14px, env(safe-area-inset-top)); }
/* Главная: плашки «Авторизуйся…», напоминания — полупрозрачные, текст светлый */
html.night body.nt .save-bar { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .save-bar small, html.night body.nt .save-bar .muted { color: rgba(255, 255, 255, 0.62); }
html.night body.nt .save-bar .save-ico { background: rgba(255, 200, 61, 0.16); color: var(--n-yellow); }
html.night body.nt .remind { background: rgba(255, 200, 61, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.35); color: #fff; }
html.night body.nt .remind .rm-text span, html.night body.nt .remind i { color: rgba(255, 255, 255, 0.66); }
html.night body.nt :is(.save-bar, .remind) { color: #fff; }
html.night body.nt .save-bar { border-color: rgba(255, 200, 61, 0.35); }
html.night body.nt .save-bar :is(.sb-text small, .sb-x) { color: rgba(255, 255, 255, 0.62); }
/* Реакции на профиль игрока и «Пожаловаться» */
.pp-reacts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; width: 100%; margin-top: 4px; }
.pp-react { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; transition: transform 0.15s var(--spring); }
.pp-react i { font-style: normal; font-size: 20px; line-height: 1.1; }
.pp-react b { font-size: 12px; }
.pp-react.on { background: rgba(255, 200, 61, 0.22); box-shadow: inset 0 0 0 1.5px var(--n-yellow, #ffc83d); transform: scale(1.05); }
.pp-react.zero { opacity: 0.4; }
span.pp-react { cursor: default; }
.pp-report { margin-top: 2px; padding: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.nme .pp-reacts { margin-top: 10px; }
.nme .pp-react { background: rgba(255, 255, 255, 0.07); color: #fff; }
/* Голосование «Кто смешнее всех?» — строки как в итогах, справа сердечко */
.nv-list { margin-top: 18px; }
.nv-list li.nv-row { grid-template-columns: 48px minmax(0, 1fr) 48px; }
.nv-row.on .nt-name b { color: #ff8fb8; }
.nv-heart { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); display: grid; place-items: center; cursor: pointer; }
.nv-heart svg { fill: none; stroke: #fff; stroke-width: 2; }
.nv-heart.on { background: #ff6fae; box-shadow: 0 8px 20px rgba(255, 111, 174, 0.4); animation: pop 0.35s var(--spring); }
.nv-heart.on svg { fill: #fff; stroke: #fff; }
span.nv-heart.off { background: none; box-shadow: none; font-size: 13px; color: rgba(255, 255, 255, 0.5); cursor: default; }
.nvote .nl-sub b { color: var(--n-yellow); }
/* Шоу попыток: карточка задания и точки прогресса — в ночных цветах */
html.night body.nt .show .prompt { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
html.night body.nt .progress-dots i { background: rgba(255, 255, 255, 0.25); }
html.night body.nt .progress-dots i.past { background: var(--n-yellow); opacity: 0.5; }
html.night body.nt .progress-dots i.now { background: var(--n-yellow); }
html.night body.nt .show .spot { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
/* Заблокирован модератором */
.banned { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 30%, #6c55ff 0%, #3a2f8a 44%, #17122b 100%); color: #fff; text-align: center; }
.bn-box { max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bn-ic { font-size: 64px; line-height: 1; }
.banned h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; }
.banned p { margin: 0; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.banned .bn-sm { font-size: 14px; color: rgba(255, 255, 255, 0.6); }

/* ───── Поддержка: значок в шапке и окно переписки (тёмное в любом дизайне, поверх «Доступ закрыт») ───── */
.sup-btn { position: relative; border-radius: 50% !important; }
.sup-dot { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px var(--bg, #17122b); }
html.night body.nt .sup-dot { box-shadow: 0 0 0 2px #2a2163; }
.sup-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #ff3b30; color: #fff; font: 700 13px var(--font-body, Rubik, sans-serif); display: inline-grid; place-items: center; }
.bn-sup { margin-top: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.sup { position: fixed; inset: 0; z-index: 300; background: radial-gradient(circle at 50% 0%, #5a46d6 0%, #2b2270 42%, #120e24 100%); color: #fff; font-family: Rubik, system-ui, sans-serif; }
.sup-in { width: 100%; max-width: 560px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; }
.sup-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
.sup-top .sq-btn { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
.sup-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sup-title b { font-family: Unbounded, Rubik, sans-serif; font-weight: 800; font-size: 20px; line-height: 1.1; }
.sup-title small { font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.sup-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.sup-msg { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-msg.me { align-self: flex-end; background: #ff5a3c; border-bottom-right-radius: 6px; }
.sup-msg.adm { align-self: flex-start; background: rgba(255, 255, 255, 0.12); border-bottom-left-radius: 6px; }
.sup-who { display: block; font-size: 12px; font-weight: 700; color: #ffc83d; margin-bottom: 2px; }
.sup-msg small { display: block; margin-top: 4px; font-size: 11px; text-align: right; color: rgba(255, 255, 255, 0.6); }
.sup-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
.sup-form textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 120px; box-sizing: border-box; padding: 13px 18px; border: 0; border-radius: 24px; resize: none;
  background: rgba(255, 255, 255, 0.12); color: #fff; font: 16px/1.35 Rubik, system-ui, sans-serif; outline: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14); }
.sup-form textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
.sup-form textarea:focus { box-shadow: inset 0 0 0 1.5px #ffc83d; }
.sup-send { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #ff5a3c; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(255, 90, 60, 0.35); }
.sup-send:active { transform: scale(0.94); }

/* ───── Переезд на oru.su: плашка в установленной на телефон версии (прежний адрес) ───── */
.moved-bar { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 400; max-width: 536px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 20px; background: #ff5a3c; color: #fff; text-decoration: none;
  font: 15px/1.35 Rubik, system-ui, sans-serif; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.moved-bar b { font-family: Unbounded, Rubik, sans-serif; font-weight: 800; font-size: 17px; }
.moved-bar span { color: rgba(255, 255, 255, 0.9); }

/* ───── Первый экран: четыре режима схемами вместо волн (только посмотреть) ───── */
.ob-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ob-mode { min-height: 0; gap: 4px; padding: 8px 10px 9px; border-radius: 18px; cursor: default; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2); }
.ob-mode:active { transform: none; }
.ob-mode .nm-pic { height: 44px; border-radius: 12px; }
.ob-mode .nm-pic .ava.nm-ava { --s: 34px; }
.ob-mode .nm-pic .ava.nm-ava.sm { --s: 28px; }
.ob-mode .nm-t { font-size: 13px; }
.ob-mode .nm-sub { font-size: 11px; }
/* Под режимами герои сверху мельче — экран помещается в телефон без прокрутки */
.ob-welcome .ob-crew { height: 290px; transform: scale(0.72); transform-origin: 50% 0; margin-bottom: -81px; }
.ob-welcome .ob-hello { gap: 6px; }
.ob-welcome .ob-space { min-height: 8px; }
.ob-welcome .ob-logo { font-size: 42px; }
.ob-welcome .ob-hello p { font-size: 15px; }
@media (max-height: 760px) {
  .ob-welcome .ob-crew { transform: scale(0.56); margin-bottom: -128px; }
  .ob-welcome .ob-mode .nm-sub { display: none; }
}

/* ───── Финал игры с друзьями: «Как вам звуки?» — оценка всех звуков партии разом ───── */
.frate { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 4px; padding: 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; }
.frate-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 2px 2px; }
.frate-head b { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.frate-head span { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.frate-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.frate-play { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; }
.frate-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.frate-t b { font-weight: 600; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frate-t small { font-size: 11.5px; color: var(--n-yellow, #ffc83d); }
.frate-v { flex: none; display: flex; gap: 6px; }
.frate-v button { width: 40px; height: 36px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.08); font-size: 18px; filter: grayscale(0.6); opacity: 0.75; }
.frate-v button.on { background: rgba(255, 200, 61, 0.22); box-shadow: inset 0 0 0 1.5px var(--n-yellow, #ffc83d); filter: none; opacity: 1; }
html:not(.night) .frate { background: var(--surface, #fff); color: var(--ink, #241d3d); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
html:not(.night) .frate-head span { color: var(--muted, #777); }
html:not(.night) .frate-play, html:not(.night) .frate-v button { background: rgba(0, 0, 0, 0.06); color: inherit; }
/* Справа на телефоне висит кнопка реакций — 👎 под неё не прячем */
@media (max-width: 620px) { body:has(#reactions:not([hidden])) .frate { padding-right: 52px; } }

/* ───── Плашка про cookies и Яндекс.Метрику (один раз, вне партии) ───── */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; max-width: 536px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 18px;
  background: rgba(30, 23, 62, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.12); font: 13px/1.35 Rubik, system-ui, sans-serif; }
.cookie-bar span { flex: 1; min-width: 0; color: rgba(255, 255, 255, 0.86); }
.cookie-bar .cb-more { padding: 0; border: 0; background: none; color: #ffc83d; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.cookie-bar .cb-ok { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 19px; background: #ffc83d; color: #241d3d; font: 700 14px Rubik, system-ui, sans-serif; cursor: pointer; }
body.has-tabbar .cookie-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }
body.has-cookie:not(.has-tabbar) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.cookie-card ul { margin: 0; padding-left: 18px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.cookie-card p, .cookie-card li { text-align: left; font-size: 14px; line-height: 1.4; }
.cookie-card .btn { margin-top: 6px; width: 100%; }

/* ───── «Нужен микрофон»: без разрешения в голосовые режимы не пускаем ───── */
.mic-card { text-align: center; }
.mic-card .mic-ic { font-size: 44px; line-height: 1; margin-bottom: 4px; }
.mic-card .mic-how { padding: 10px 12px; border-radius: 14px; background: rgba(255, 200, 61, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.35); font-size: 14px; line-height: 1.4; text-align: left; }
.mic-card .btn { width: 100%; margin-top: 8px; }

/* ───── Текст до загрузки игры (его же читают поисковики) ───── */
.seo-intro { max-width: 520px; margin: 18vh auto 0; padding: 0 20px; text-align: center; color: rgba(255, 255, 255, 0.8); font: 15px/1.5 Rubik, system-ui, sans-serif; }
.seo-intro h1 { margin: 0 0 12px; color: #fff; font: 800 24px/1.2 Unbounded, Rubik, sans-serif; }
.seo-intro a { color: #ffc83d; }
