/* =========================================================
   Болотный квиз — экран ведущего и телефон гостя.
   Тёмно-фиолетовая «Маковка»: слива, золото, крем.
   ========================================================= */

:root {
  --bg: #120a22;
  --bg-2: #1b0f30;
  --plum: #2b1745;
  --plum-2: #3b2158;
  --ink: #f6ead9;
  --muted: rgba(246, 234, 217, .55);
  --dim: rgba(246, 234, 217, .28);
  --gold: #f0c46a;
  --gold-2: #d9a945;
  --lime: #cbe97b;
  --rose: #d76f92;
  --line: rgba(246, 234, 217, .14);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hand: "Caveat", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(120, 70, 160, .45), transparent 70%),
    radial-gradient(70% 50% at 100% 100%, rgba(90, 40, 120, .35), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 3px 3px;
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- общие элементы ---------- */

.tag {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.display {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 92px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.display span { color: var(--lime); }

.lead {
  max-width: 640px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(13px, 1.3vw, 17px);
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }

.btn--start {
  border-color: var(--lime);
  background: var(--lime);
  color: #1a2410;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
}
.btn--start:hover { background: #d8f18e; }

.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.fineprint {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: clamp(10px, .9vw, 12px);
}

/* ---------- экран ведущего ---------- */

.hud {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 10, 34, .75);
  backdrop-filter: blur(8px);
}

.hud__brand {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 900;
  letter-spacing: .06em;
}
.hud__brand span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--gold);
  color: #221323;
  font-size: .8em;
}

.hud__mid {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-display);
}
.hud__counter { color: var(--ink); font-size: clamp(14px, 1.4vw, 18px); font-weight: 800; }
.hud__total { font-size: clamp(10px, 1vw, 12px); }

.hud__timer {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 74px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
}
.hud__timer b { font-family: var(--font-display); font-size: clamp(16px, 1.6vw, 22px); }
.hud__timer i { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.hud__timer.is-low { border-color: var(--rose); color: var(--rose); animation: pulse 1s infinite; }

.hud__sound {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.hud__sound:hover { color: var(--ink); }

.host-main {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vh, 56px) clamp(18px, 3vw, 44px) 60px;
}

.host-lobby { max-width: 1100px; }

.join {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 34px);
  margin: 8px 0 20px;
  padding: clamp(14px, 1.6vw, 22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(59, 33, 88, .55), rgba(27, 15, 48, .55));
}

.join__qr {
  flex: 0 0 auto;
  width: clamp(120px, 12vw, 180px);
  height: clamp(120px, 12vw, 180px);
  padding: 10px;
  border-radius: 14px;
  background: #f6ead9;
}
.join__qr svg, .join__qr img { display: block; width: 100%; height: 100%; }

.join__label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.join__url {
  margin: 0 0 12px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(13px, 1.5vw, 20px);
  word-break: break-all;
}
.join__url a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px dashed rgba(203, 233, 123, .35);
}
.join__url a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.join__hint { margin: 0 0 10px; color: var(--dim); font-size: 11px; }
.join__count { margin: 0; color: var(--muted); font-size: 12px; }
.join__count b { color: var(--gold); font-size: 18px; }

.players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  margin: 0 0 22px;
}
.player-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  animation: chipIn .35s ease both;
}
.player-chip b { color: var(--gold); font-weight: 700; }

.qtext {
  max-width: 1200px;
  margin: 0 0 clamp(18px, 3vh, 34px);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  margin-bottom: 22px;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: clamp(64px, 8vh, 96px);
  padding: clamp(12px, 1.4vw, 20px) clamp(14px, 1.6vw, 24px);
  border: 2px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(59, 33, 88, .5), rgba(27, 15, 48, .5));
  color: var(--ink);
  font-size: clamp(14px, 1.5vw, 22px);
  line-height: 1.25;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.opt__key {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(30px, 2.4vw, 40px);
  height: clamp(30px, 2.4vw, 40px);
  border-radius: 10px;
  background: rgba(240, 196, 106, .16);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
}
.opt.is-correct {
  border-color: var(--lime);
  background: rgba(203, 233, 123, .14);
}
.opt.is-correct .opt__key { background: var(--lime); color: #1a2410; }
.opt.is-dim { opacity: .45; }

.bar {
  height: 8px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: rgba(246, 234, 217, .1);
  overflow: hidden;
}
.bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--lime));
  transform-origin: left center;
  transition: transform .12s linear;
}
.bar.is-low i { background: linear-gradient(90deg, var(--rose), #f39a5f); }

.answered-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.answered { margin: 0; color: var(--muted); font-size: clamp(12px, 1.1vw, 15px); }
.answered b { color: var(--gold); }

.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.controls--stack { flex-direction: column; align-items: stretch; }

.live {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  color: var(--dim);
  font-size: 11px;
}
.live span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; }

/* ответы и топ */

.reveal-correct {
  margin: 0 0 20px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 40px);
  font-weight: 800;
  line-height: 1.1;
}

.dist { display: grid; gap: 10px; margin-bottom: 26px; max-width: 1000px; }
.dist__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(59, 33, 88, .35);
}
.dist__row.is-correct { border-color: var(--lime); background: rgba(203, 233, 123, .1); }
.dist__label { display: flex; justify-content: space-between; gap: 10px; font-size: clamp(12px, 1.2vw, 16px); }
.dist__meta { color: var(--muted); font-family: var(--font-display); font-size: 12px; }
.dist__track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(246, 234, 217, .1); overflow: hidden; }
.dist__track i { display: block; height: 100%; background: var(--gold); }
.dist__row.is-correct .dist__track i { background: var(--lime); }


.reveal-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.mini-board { min-width: 260px; }
.mini-board ol { margin: 0; padding: 0; list-style: none; counter-reset: place; }
.mini-board li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.mini-board li b { color: var(--gold); font-family: var(--font-display); }

/* финал */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 2vw, 30px);
  min-height: 260px;
  margin: 10px 0 34px;
}
.podium__place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: clamp(120px, 14vw, 200px);
}
.podium__name { font-family: var(--font-display); font-size: clamp(11px, 1.1vw, 15px); text-align: center; }
.podium__score { color: var(--gold); font-size: clamp(11px, 1vw, 14px); }
.podium__bar {
  width: 100%;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, var(--plum-2), var(--plum));
  transform-origin: bottom;
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
.podium__place--1 .podium__bar { height: clamp(130px, 18vh, 210px); background: linear-gradient(180deg, var(--gold), var(--gold-2)); }
.podium__place--2 .podium__bar { height: clamp(90px, 13vh, 150px); }
.podium__place--3 .podium__bar { height: clamp(70px, 10vh, 120px); }
.podium__place--1 .podium__name { color: var(--gold); }
.podium__medal { font-family: var(--font-display); font-size: clamp(18px, 2vw, 28px); }

.rank { display: grid; gap: 6px; max-width: 780px; margin: 0 auto 34px; }
.rank__row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.rank__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__score { color: var(--gold); font-family: var(--font-display); }
.rank__track { grid-column: 2 / -1; height: 4px; border-radius: 999px; background: rgba(246, 234, 217, .08); overflow: hidden; }
.rank__track i { display: block; height: 100%; background: var(--gold); transform-origin: left; animation: grow .8s ease both; }

.awards { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 26px; }
.award__nav {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.award__nav:hover { border-color: var(--gold); color: var(--gold); }
.award-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(520px, 60vw);
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(59, 33, 88, .65), rgba(27, 15, 48, .75));
  box-shadow: var(--shadow);
  text-align: center;
}
.award-card__emoji { font-size: clamp(28px, 3vw, 44px); }
.award-card__title { color: var(--gold); font-family: var(--font-display); font-size: clamp(11px, 1vw, 14px); letter-spacing: .18em; text-transform: uppercase; }
.award-card__name { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 32px); font-weight: 800; }
.award-card__note { color: var(--muted); font-size: 13px; line-height: 1.4; }

/* ---------- телефон ---------- */

.screen--player {
  display: flex;
  flex-direction: column;
}

.phud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.phud__brand {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.phud__timer {
  min-width: 54px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  text-align: center;
}
.phud__timer.is-low { border-color: var(--rose); color: var(--rose); }

.phone {
  flex: 1;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 22px 16px calc(30px + env(safe-area-inset-bottom));
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(59, 33, 88, .5), rgba(27, 15, 48, .65));
}
.pcard h1, .pcard h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.pcard .lead { margin: 0; font-size: 14px; }

.pcard input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 10, 34, .6);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}
.pcard input:focus { outline: none; border-color: var(--gold); }

.pgrid { display: grid; gap: 10px; }
.pbtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 10, 34, .5);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
}
.pbtn b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(240, 196, 106, .16);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
}
.pbtn.is-picked { border-color: var(--gold); background: rgba(240, 196, 106, .1); }
.pbtn.is-correct { border-color: var(--lime); background: rgba(203, 233, 123, .12); }
.pbtn.is-wrong { border-color: var(--rose); background: rgba(215, 111, 146, .1); opacity: .8; }
.pbtn:disabled { cursor: default; }

.pscore { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.pscore b { color: var(--gold); font-family: var(--font-display); font-size: 22px; }

.pulse {
  width: 46px;
  height: 46px;
  margin: 12px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lime), transparent 65%);
  animation: pulse 1.6s ease-in-out infinite;
}

.pawards { display: grid; gap: 10px; }
.pawards .award-card { width: 100%; padding: 16px; }
.pawards .award-card__name { font-size: 18px; }

.qtoast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  max-width: min(520px, calc(100% - 32px));
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(27, 15, 48, .95);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.qtoast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- анимации ---------- */

@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (max-width: 860px) {
  .opt-grid { grid-template-columns: 1fr; }
  .join { flex-direction: column; align-items: flex-start; }
  .join__qr { width: 140px; height: 140px; }
  .answered-row { flex-direction: column; align-items: flex-start; }
  .podium { min-height: 200px; }
  .award-card { width: min(520px, 78vw); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* финал: подиум слева, награды справа — чтобы влезало в телевизор без скролла */
.host-final {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  grid-template-areas:
    "tag awards"
    "title awards"
    "podium awards"
    "rank awards"
    "controls awards";
  column-gap: clamp(24px, 3vw, 48px);
  align-content: start;
}
.host-final > .tag { grid-area: tag; }
.host-final > .display { grid-area: title; margin-bottom: 8px; font-size: clamp(30px, 4vw, 64px); }
.host-final > .podium { grid-area: podium; min-height: 190px; margin: 4px 0 14px; }
.host-final > .rank { grid-area: rank; margin: 0 0 14px; }
.host-final > .awards { grid-area: awards; align-self: center; flex-direction: column; }
.host-final > .controls { grid-area: controls; }
.host-final .award-card { width: 100%; }
.host-final .podium__place { width: clamp(100px, 11vw, 160px); }
.host-final .podium__place--1 .podium__bar { height: clamp(100px, 14vh, 170px); }
.host-final .podium__place--2 .podium__bar { height: clamp(70px, 10vh, 120px); }
.host-final .podium__place--3 .podium__bar { height: clamp(54px, 8vh, 96px); }

@media (max-width: 1000px) {
  .host-final {
    grid-template-columns: 1fr;
    grid-template-areas: "tag" "title" "podium" "rank" "awards" "controls";
  }
}

/* ---------- атмосфера: свечение, луна, споры ---------- */

.deco {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.deco__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: floatGlow 18s ease-in-out infinite alternate;
}
.deco__glow--one {
  top: -160px;
  left: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(124, 72, 176, .55), transparent 70%);
}
.deco__glow--two {
  right: -240px;
  bottom: -200px;
  width: 660px;
  height: 660px;
  background: radial-gradient(circle, rgba(240, 196, 106, .18), transparent 70%);
  animation-delay: -7s;
}
.deco__moon {
  position: absolute;
  top: 7vh;
  right: 9vw;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, rgba(246, 234, 217, .9), rgba(246, 234, 217, .06) 58%, transparent 70%);
  opacity: .07;
  filter: blur(2px);
}
.deco__spores i {
  position: absolute;
  bottom: 12%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(240, 196, 106, .9);
  opacity: 0;
  animation: sporeRise 10s linear infinite;
}
.deco__spores i:nth-child(1) { left: 8%; animation-delay: 0s; }
.deco__spores i:nth-child(2) { left: 16%; animation-delay: 2.4s; }
.deco__spores i:nth-child(3) { left: 24%; animation-delay: 5.1s; }
.deco__spores i:nth-child(4) { left: 33%; animation-delay: 1.2s; }
.deco__spores i:nth-child(5) { left: 42%; animation-delay: 6.6s; }
.deco__spores i:nth-child(6) { left: 51%; animation-delay: 3.3s; }
.deco__spores i:nth-child(7) { left: 60%; animation-delay: 7.8s; }
.deco__spores i:nth-child(8) { left: 68%; animation-delay: 4.2s; }
.deco__spores i:nth-child(9) { left: 75%; animation-delay: .9s; }
.deco__spores i:nth-child(10) { left: 83%; animation-delay: 5.7s; }
.deco__spores i:nth-child(11) { left: 90%; animation-delay: 2.9s; }
.deco__spores i:nth-child(12) { left: 96%; animation-delay: 8.4s; }

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(30px, 26px, 0) scale(1.08); }
}
@keyframes sporeRise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { opacity: .7; }
  80% { opacity: .25; }
  100% { transform: translateY(-78vh) scale(1.15); opacity: 0; }
}

/* ---------- прогресс вопросов ---------- */

.hud__progress {
  display: flex;
  gap: 3px;
  padding: 0 clamp(18px, 3vw, 44px) 10px;
}
.hud__progress i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(246, 234, 217, .1);
  transition: background .35s ease, box-shadow .35s ease;
}
.hud__progress i.is-done { background: var(--gold); }
.hud__progress i.is-current {
  background: var(--lime);
  box-shadow: 0 0 10px rgba(203, 233, 123, .75);
}

/* ---------- кольцо таймера ---------- */

.hud__timer { position: relative; --p: 100; }
.hud__timer::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  padding: 2px;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(246, 234, 217, .12) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background .2s linear;
}
.hud__timer.is-low::before {
  background: conic-gradient(var(--rose) calc(var(--p) * 1%), rgba(246, 234, 217, .12) 0);
}

/* ---------- вход экранов и мелкие акценты ---------- */

.phase-in { animation: phaseIn .38s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes phaseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.host-lobby { position: relative; isolation: isolate; }
.host-lobby::after {
  content: "30";
  position: absolute;
  right: 0;
  bottom: -34px;
  z-index: -1;
  color: rgba(246, 234, 217, .035);
  font-family: var(--font-display);
  font-size: clamp(180px, 26vw, 380px);
  font-weight: 900;
  line-height: .7;
  pointer-events: none;
}

.opt {
  box-shadow: inset 0 0 0 1px rgba(246, 234, 217, .02);
}
.opt:hover { border-color: rgba(240, 196, 106, .4); }
.opt.is-correct { animation: correctPop .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes correctPop {
  0% { transform: scale(.985); }
  55% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

.dist__track i {
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}
.mini-board li { animation: chipIn .4s ease both; }

.podium__bar { position: relative; overflow: hidden; }
.podium__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, .22) 50%, transparent 78%);
  transform: translateX(-130%);
  animation: barShine 3s ease-in-out infinite;
}
@keyframes barShine {
  0%, 55% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}

.award-card {
  border: 1px solid transparent;
  background:
    linear-gradient(150deg, rgba(59, 33, 88, .78), rgba(27, 15, 48, .9)) padding-box,
    linear-gradient(130deg, rgba(240, 196, 106, .65), rgba(203, 233, 123, .22), rgba(240, 196, 106, .55)) border-box;
}
.award-card.is-swap { animation: cardSwap .35s ease both; }
@keyframes cardSwap {
  from { transform: translateY(8px) scale(.99); }
  to { transform: none; }
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fineprint--keys {
  margin-top: 4px;
  color: rgba(246, 234, 217, .28);
  letter-spacing: .05em;
}

.pbtn { transition: transform .12s ease, border-color .2s ease, background .2s ease; }
.pbtn:active { transform: scale(.985); }
.pbtn.is-picked::after {
  content: "✓";
  margin-left: auto;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
}
.pcard { animation: phaseIn .32s ease both; }

@media (prefers-reduced-motion: reduce) {
  .deco__glow, .deco__spores i, .podium__bar::after { animation: none !important; }
}

/* ---------- сгенерированный фон и картинки ---------- */

.deco__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .34;
  filter: saturate(.9) brightness(.68);
}
.deco__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(18, 10, 34, .35), rgba(18, 10, 34, .82) 78%),
    linear-gradient(180deg, rgba(18, 10, 34, .7), rgba(18, 10, 34, .35) 40%, rgba(18, 10, 34, .85));
}
.deco__moon { display: none; }

.host-final { position: relative; isolation: isolate; }
.host-final::before {
  content: "";
  position: absolute;
  inset: -36px -24px -30px;
  z-index: -1;
  background: url("assets/quiz/quiz-podium.webp") center 72% / cover no-repeat;
  opacity: .2;
  filter: saturate(.85) brightness(.7);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 20%, transparent 72%);
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 20%, transparent 72%);
  pointer-events: none;
}

.q-illus {
  float: right;
  width: clamp(88px, 9vw, 128px);
  aspect-ratio: 1;
  margin: 0 14px 14px 20px;
  border: 3px solid rgba(240, 196, 106, .55);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  animation: illusIn .4s ease both;
}
.q-illus img { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes illusIn {
  from { opacity: 0; transform: scale(.92) rotate(-3deg); }
  to { opacity: 1; transform: none; }
}

.award-card__icon {
  width: clamp(54px, 5.6vw, 78px);
  height: clamp(54px, 5.6vw, 78px);
  border: 2px solid rgba(246, 234, 217, .6);
  border-radius: 50%;
  background: var(--cream);
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}

@media (max-width: 860px) {
  .q-illus { display: none; }
}

/* ---------- сцена наград ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b0618;
}
.stage__bg {
  position: absolute;
  inset: -20px;
  background: url("assets/quiz/quiz-podium.webp") center 60% / cover no-repeat;
  filter: blur(7px) brightness(.38) saturate(.85);
  transform: scale(1.04);
}
.stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(18, 10, 34, .15), rgba(11, 6, 24, .9) 78%),
    linear-gradient(180deg, rgba(11, 6, 24, .85), transparent 30%, rgba(11, 6, 24, .9));
}
.stage__curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15vw;
  min-width: 120px;
  background:
    repeating-linear-gradient(90deg, #2a0818 0 14px, #4a1029 14px 34px, #330a1f 34px 52px);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .7);
}
.stage__curtain::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: linear-gradient(180deg, rgba(240, 196, 106, .75), rgba(120, 80, 20, .65));
}
.stage__curtain--left { left: 0; border-radius: 0 0 60% 0 / 0 0 100% 0; }
.stage__curtain--right { right: 0; border-radius: 0 0 0 60% / 0 0 0 100%; }
.stage__spotlight {
  position: absolute;
  top: -14vh;
  left: 50%;
  width: 54vw;
  height: 96vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(240, 196, 106, .35), rgba(240, 196, 106, .08) 45%, transparent 70%);
  clip-path: polygon(43% 0, 57% 0, 82% 100%, 18% 100%);
  filter: blur(14px);
  animation: spotPulse 5s ease-in-out infinite alternate;
}
@keyframes spotPulse {
  from { opacity: .7; }
  to { opacity: 1; }
}
.stage__topline {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 60px);
  color: rgba(246, 234, 217, .55);
  font-family: var(--font-display);
  font-size: clamp(10px, .9vw, 13px);
  letter-spacing: .2em;
}
.stage__center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px 70px;
  text-align: center;
}
.stage__category {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 54px);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(240, 196, 106, .35);
  animation: stageFade .45s ease both;
}
.stage__actor {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: actorIn .9s cubic-bezier(.18, .9, .22, 1) both;
}
@keyframes actorIn {
  0% { transform: translateX(-130%) rotate(-9deg); opacity: 0; }
  55% { opacity: 1; }
  78% { transform: translateX(4%) rotate(2deg); }
  100% { transform: translateX(0) rotate(0); opacity: 1; }
}
.stage__portrait {
  width: clamp(220px, 23vw, 330px);
  aspect-ratio: 1;
  border: 5px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    0 0 0 10px rgba(240, 196, 106, .12),
    0 30px 70px rgba(0, 0, 0, .6),
    0 0 90px rgba(240, 196, 106, .28);
  animation: actorBob 3.4s ease-in-out .9s infinite;
}
.stage__char { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes actorBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(-1.2deg); }
}
.stage__shadow {
  position: absolute;
  bottom: -4px;
  width: 55%;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  filter: blur(8px);
  animation: shadowPulse 3.4s ease-in-out .9s infinite;
}
@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: .55; }
  50% { transform: scaleX(.86); opacity: .35; }
}
.stage__role {
  padding: 6px 18px;
  border: 1px solid rgba(240, 196, 106, .5);
  border-radius: 999px;
  background: rgba(18, 10, 34, .65);
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(11px, 1.1vw, 15px);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.stage__text {
  opacity: 0;
  transform: translateY(14px);
}
.stage__text.is-shown { animation: stageTextIn .55s ease both; }
@keyframes stageTextIn {
  to { opacity: 1; transform: none; }
}
.stage__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 64px);
  font-weight: 800;
  line-height: 1;
}
.stage__meta {
  margin: 8px 0 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.1vw, 17px);
  letter-spacing: .06em;
}
.stage__note {
  margin: 8px 0 0;
  color: rgba(246, 234, 217, .6);
  font-size: clamp(12px, 1vw, 15px);
}
.stage__controls {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stage__controls button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(246, 234, 217, .22);
  border-radius: 50%;
  background: rgba(18, 10, 34, .7);
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
}
.stage__controls button:hover { border-color: var(--gold); color: var(--gold); }
.stage__controls .stage__close {
  width: auto;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stage__counter {
  min-width: 60px;
  color: rgba(246, 234, 217, .6);
  font-family: var(--font-display);
  font-size: 12px;
  text-align: center;
}
.stage-launch { white-space: nowrap; }

@media (max-width: 760px) {
  .stage__actor { transform-origin: center bottom; }
  .stage__portrait { width: 62vw; }
  .stage__curtain { width: 18vw; }
  .stage__topline { display: none; }
}

.award-card__role {
  margin-top: -4px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.stage__winner {
  padding: 5px 18px;
  border: 1px solid rgba(203, 233, 123, .55);
  border-radius: 999px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(10px, .9vw, 13px);
  letter-spacing: .24em;
  text-transform: uppercase;
  animation: stageFade .5s ease both;
}
.stage__progress {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: min(360px, 46vw);
  height: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: rgba(246, 234, 217, .14);
  overflow: hidden;
}
.stage__progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--lime));
}
.stage__progress i.is-run { animation: stageProgress linear forwards; }
@keyframes stageProgress { from { width: 0; } to { width: 100%; } }
.stage__controls .stage__auto {
  width: auto;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stage__controls .stage__auto.is-off { color: rgba(246, 234, 217, .45); }

/* ---------- блиц ---------- */

.host-blitz {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 160px);
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.host-blitz::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: repeating-linear-gradient(115deg, transparent 0 34px, rgba(215, 111, 146, .08) 34px 36px);
  animation: blitzLines 1.2s linear infinite;
  pointer-events: none;
}
@keyframes blitzLines { to { transform: translateX(36px); } }
.blitz__title {
  position: relative;
  margin: 0;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: clamp(90px, 16vw, 240px);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.03em;
  text-shadow: 0 0 80px rgba(215, 111, 146, .55);
  animation: blitzPulse 1s ease-in-out infinite alternate;
}
.blitz__title span {
  color: var(--gold);
  font-size: .42em;
  vertical-align: top;
  margin-left: 18px;
}
@keyframes blitzPulse {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}
.blitz__sub {
  position: relative;
  margin: 0;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 24px);
  letter-spacing: .06em;
}
.blitz__count {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 8px;
  color: rgba(246, 234, 217, .6);
}
.blitz__count b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 86px);
  line-height: 1;
}
.blitz__count span { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.blitz-card { text-align: center; }
.blitz__mini {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(44px, 12vw, 68px);
  line-height: .9;
  color: var(--cream);
}
.blitz__mini span { color: var(--gold); font-size: .5em; vertical-align: top; }
