/* ХитЗалп — UI kit (Hitzalp Brand Guide v1.0: Midnight Navy + Cyan / Hot Pink / Gold / Electric Purple, Montserrat) */
:root {
  --navy: #0B1020;
  --navy-2: #0E1430;
  --slate: #151A33;
  --slate-2: #1C2244;
  --slate-3: #252C55;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --violet: #8A5CFF;
  --violet-2: #B39BFF;
  --cyan: #00E5FF;
  --pink: #FF2D9A;
  --green: #00E5FF;
  --amber: #FFC700;
  --gold: #FFC700;
  --white: #FFFFFF;
  --text: #F7F8FC;
  --muted: #A3A8C7;
  --muted-2: #7B81A6;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(3, 6, 20, .55);
  --glow-violet: 0 0 0 1px rgba(138, 92, 255, .6), 0 10px 30px rgba(138, 92, 255, .35);
  --glow-cyan: 0 0 0 2px var(--cyan), 0 0 24px rgba(0, 229, 255, .45);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 15% 0%, rgba(138, 92, 255, .22), transparent 70%),
    radial-gradient(50% 40% at 100% 20%, rgba(0, 229, 255, .10), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(255, 45, 154, .14), transparent 70%),
    var(--navy);
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.grad-text { background: linear-gradient(90deg, var(--violet-2), var(--violet) 40%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- layout ---------- */
#app { min-height: 100dvh; }
.page { width: 100%; max-width: 520px; margin: 0 auto; padding: 12px var(--gutter) 120px; display: flex; flex-direction: column; gap: 16px; }
.page.wide { max-width: 1180px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.topbar .back { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--slate); border: 1px solid var(--line); }
.title { font-size: clamp(24px, 6vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.subtitle { color: var(--muted); font-size: 15px; margin-top: 4px; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 22px var(--gutter) calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(11, 16, 32, 0) 0, rgba(11, 16, 32, .96) 26px, #0B1020 100%); }
.sticky-cta > * { max-width: 488px; margin: 0 auto; }
.sticky-cta .hint { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; text-decoration: none; color: var(--text); }
.logo img { width: 32px; height: 32px; }
.badge-v { font-size: 13px; font-weight: 700; color: var(--cyan); border: 1.5px solid var(--cyan); border-radius: 8px; padding: 1px 7px; }

/* ---------- buttons ---------- */
.btn { min-height: 54px; padding: 0 20px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; width: 100%; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 10px 28px rgba(138, 92, 255, .35); }
.btn-primary:hover:not([disabled]) { background: #7A49F5; }
.btn-cta { background: var(--cyan); color: #04121F; box-shadow: 0 10px 28px rgba(0, 229, 255, .3); }
.btn-secondary { background: var(--slate); border: 1px solid var(--line-2); color: var(--text); }
.btn-secondary:hover:not([disabled]) { background: var(--slate-2); }
.btn-ghost { background: transparent; color: var(--muted); min-height: 44px; }
.btn-sm { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 12px; width: auto; }
.btn .chev { margin-left: auto; opacity: .7; }
.btn.left { justify-content: flex-start; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--slate); border: 1px solid var(--line); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- cards / surfaces ---------- */
.card { background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.card.tight { padding: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--slate-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.chip.violet { background: rgba(138, 92, 255, .18); border-color: rgba(138, 92, 255, .45); color: #DCD0FF; }
.chip.cyan { background: rgba(0, 229, 255, .12); border-color: rgba(0, 229, 255, .4); color: #B3F7FF; }
.chip svg { width: 15px; height: 15px; }
.pill-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.notice { border-radius: 14px; padding: 12px 14px; background: rgba(255, 199, 0, .12); border: 1px solid rgba(255, 199, 0, .35); color: #FFE9A3; font-size: 14px; }
.error { background: rgba(255, 45, 154, .12); border-color: rgba(255, 45, 154, .4); color: #FFC2E2; }

/* segmented options (settings) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { min-height: 46px; border-radius: 12px; background: var(--slate-2); border: 1px solid var(--line); font-weight: 600; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { color: #fff; border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); background: rgba(0, 229, 255, .12); }
.setting { display: flex; flex-direction: column; gap: 10px; }
.setting > label, .setting > .lbl { font-size: 14px; font-weight: 600; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch { width: 52px; height: 30px; border-radius: 999px; background: var(--slate-3); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--violet); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }

/* inputs */
.input { width: 100%; min-height: 54px; border-radius: 14px; background: var(--slate-2); border: 1px solid var(--line-2); padding: 0 16px; font-size: 18px; font-weight: 600; color: var(--text); }
.input:focus { outline: none; border-color: var(--violet); box-shadow: var(--glow-violet); }
.code-input { text-align: center; font-size: 30px; letter-spacing: .38em; text-transform: uppercase; font-weight: 800; padding-left: .38em; min-height: 72px; font-variant-numeric: tabular-nums; }
.code-boxes { display: flex; gap: 8px; justify-content: center; }
.code-boxes span { width: 46px; height: 58px; display: grid; place-items: center; border-radius: 12px; background: var(--slate-2); border: 1px solid var(--line-2); font-size: 26px; font-weight: 800; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--slate); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tabs button { min-height: 42px; border-radius: 10px; font-weight: 600; color: var(--muted); font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--slate-3); color: #fff; }

/* ---------- landing ---------- */
.hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 470px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; isolation: isolate; }
.hero > img:not(.brand-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 16, 38, .1) 20%, rgba(11, 16, 38, .75) 60%, var(--navy) 100%); }
.hero h1 { font-size: clamp(36px, 10vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.hero p { color: #D4D7EC; font-size: 16px; margin-top: 12px; max-width: 36ch; }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.feature b { display: block; color: var(--text); font-size: 13px; }
.feature .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feature .ic svg { width: 17px; height: 17px; }
.presets { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.presets::-webkit-scrollbar { display: none; }
.preset { flex: none; width: 150px; border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 1 / 1.1; text-align: left; }
.preset img { width: 100%; height: 100%; object-fit: cover; }
.preset span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 12px; font-weight: 700; font-size: 15px; background: linear-gradient(transparent, rgba(11, 16, 38, .95)); }
@media (min-width: 960px) {
  .landing { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
  .hero { min-height: 640px; }
}

/* ---------- mode cards ---------- */
.mode { position: relative; display: block; width: 100%; text-align: left; border-radius: 20px; overflow: hidden; min-height: 150px; padding: 20px; border: 1px solid var(--line-2); isolation: isolate; }
.mode img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.mode::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 16, 38, .2), rgba(11, 16, 38, .55) 45%, rgba(11, 16, 38, .92)); }
.mode .txt { margin-left: 38%; }
.mode h3 { font-size: 22px; font-weight: 800; }
.mode p { color: #D4D7EC; font-size: 14px; margin-top: 4px; }
.mode .go { position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.mode.party { box-shadow: inset 0 0 0 1px rgba(255, 45, 154, .5); }
.mode.team { box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .5); }
.mode.solo { box-shadow: inset 0 0 0 1px rgba(255, 199, 0, .5); }

/* ---------- categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1; border: 2px solid transparent; text-align: left; isolation: isolate; }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .3s; }
.cat::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(11, 16, 38, .92)); }
.cat .name { position: absolute; left: 10px; right: 10px; bottom: 8px; font-weight: 700; font-size: 14px; line-height: 1.15; }
.cat .cnt { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.cat[aria-pressed="true"] { border-color: var(--violet); box-shadow: var(--glow-violet); }
.cat[aria-pressed="true"] img { transform: scale(1.05); }
.cat .check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); display: none; place-items: center; border: 2px solid #fff; }
.cat[aria-pressed="true"] .check { display: grid; }
.cat .check svg { width: 14px; height: 14px; }
.soon { display: flex; flex-wrap: wrap; gap: 8px; }
.soon .chip { opacity: .65; }

/* ---------- avatars ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--slate-3); border: 2px solid rgba(255, 255, 255, .12); }
.av.lg { width: 64px; height: 64px; }
.av.xl { width: 104px; height: 104px; border-width: 3px; }
.av-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.av-pick { border-radius: 50%; aspect-ratio: 1; padding: 0; border: 3px solid transparent; overflow: hidden; }
.av-pick img { width: 100%; height: 100%; object-fit: cover; }
.av-pick[aria-pressed="true"] { border-color: var(--violet); box-shadow: var(--glow-violet); }
.av-stack { display: flex; }
.av-stack .av { width: 30px; height: 30px; margin-left: -8px; border-color: var(--navy); }
.av-stack .av:first-child { margin-left: 0; }

/* ---------- room / lobby ---------- */
.qr-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: 132px; height: 132px; display: grid; place-items: center; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.room-code { font-size: 34px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; text-align: left; }
.share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-row button, .share-row a { min-height: 64px; border-radius: 14px; background: var(--slate-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; }
.share-row .copy { background: var(--cyan); color: #04121F; border: 0; }
.share-row .solovo { background: #fff; color: #0B1020; border: 0; }
.share-row .solovo svg { color: #0B1020; }
.share-row svg { width: 20px; height: 20px; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 14px; background: var(--slate-2); border: 1px solid var(--line); }
.prow.me { border-color: rgba(138, 92, 255, .6); background: rgba(138, 92, 255, .12); }
.prow .pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .sub { font-size: 12px; color: var(--muted); }
.status { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.status.ok { color: var(--green); }
.status.wait { color: var(--muted-2); }
.status svg { width: 14px; height: 14px; }
.offline { opacity: .5; }
.kick { margin-left: 4px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted-2); }
.kick svg { width: 16px; height: 16px; }

/* team selection */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-card { border-radius: 18px; min-height: 120px; padding: 14px; text-align: left; position: relative; border: 2px solid transparent; background: var(--slate-2); overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.team-card .tname { font-size: 20px; font-weight: 800; }
.team-card .tcount { font-size: 13px; color: rgba(255, 255, 255, .8); }
.team-card[aria-pressed="true"] { border-color: #fff; }
.team-card .av-stack { margin-top: 12px; }
.t-neon { background: linear-gradient(135deg, rgba(255, 45, 154, .55), rgba(255, 45, 154, .15)); }
.t-pulse { background: linear-gradient(135deg, rgba(0, 229, 255, .45), rgba(0, 229, 255, .12)); }
.t-vinyl { background: linear-gradient(135deg, rgba(255, 199, 0, .5), rgba(255, 199, 0, .14)); }
.t-scratch { background: linear-gradient(135deg, rgba(138, 92, 255, .55), rgba(138, 92, 255, .15)); }
.tc-neon { color: #FF8CCB; } .tc-pulse { color: #8FF4FF; } .tc-vinyl { color: #FFD84D; } .tc-scratch { color: #C9B8FF; }
.bd-neon { border-color: #FF2D9A !important; } .bd-pulse { border-color: #00E5FF !important; } .bd-vinyl { border-color: #FFC700 !important; } .bd-scratch { border-color: #8A5CFF !important; }
.team-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.team-score { border-radius: 12px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border: 2px solid; background: rgba(11, 16, 38, .6); font-weight: 700; }
.team-score .s { font-variant-numeric: tabular-nums; }

/* ---------- game ---------- */
.game-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-head .grow { text-align: right; color: var(--muted); font-size: 13px; }
.stage { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 11; isolation: isolate; background: var(--slate); }
.stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(1.1); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 16, 38, .15), rgba(11, 16, 38, .85)); }
.stage .prompt { position: absolute; left: 18px; right: 96px; bottom: 16px; font-size: clamp(22px, 6vw, 28px); font-weight: 800; line-height: 1.1; }
.stage .tr { position: absolute; right: 14px; bottom: 12px; }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.wave i { display: block; width: 4px; border-radius: 3px; background: linear-gradient(var(--pink), var(--violet) 60%, var(--cyan)); height: 20%; transition: height .2s; }
.wave.on i { animation: eq 1.1s ease-in-out infinite; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 100%; } }
.stage .wave { position: absolute; left: 18px; top: 18px; }
.audio-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(11, 16, 38, .75); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.audio-bar .icon-btn { width: 36px; height: 36px; background: var(--violet); border: 0; }
.ring { position: relative; width: 74px; height: 74px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .bg { stroke: rgba(255, 255, 255, .14); }
.ring .fg { stroke: var(--violet); stroke-linecap: round; transition: stroke .3s; }
.ring.warn .fg { stroke: var(--pink); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.ring.big { width: 150px; height: 150px; }
.ring.big span { font-size: 64px; }
.answers { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .answers { grid-template-columns: 1fr 1fr; } }
.answer { min-height: 62px; border-radius: 16px; background: var(--slate); border: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; font-weight: 600; font-size: 16px; line-height: 1.25; transition: border-color .15s, box-shadow .15s, background .15s; }
.answer .lt { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 15px; }
.answer .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.answer .mark { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.answer .mark svg { width: 16px; height: 16px; }
.answer:hover:not([disabled]) { border-color: rgba(0, 229, 255, .55); }
.answer.sel { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet), 0 0 24px rgba(138, 92, 255, .5); background: rgba(138, 92, 255, .14); }
.answer.sel .lt { background: var(--violet); color: #fff; border-color: var(--violet); }
.answer.ok { border-color: var(--green); background: rgba(0, 229, 255, .16); box-shadow: 0 0 0 2px var(--green); }
.answer.ok .lt { background: var(--green); border-color: var(--green); color: #04121F; }
.answer.bad { border-color: var(--pink); background: rgba(255, 45, 154, .12); }
.answer.bad .lt { background: var(--pink); border-color: var(--pink); }
.answer.dim { opacity: .45; }
.answer[disabled] { cursor: default; }
.answer .votes { font-size: 12px; color: var(--muted); font-weight: 700; }
.waitbar { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--slate); border: 1px solid var(--line); }
.waitbar .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(138, 92, 255, .2); display: grid; place-items: center; color: var(--violet-2); flex: none; }
.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width .3s; }

/* intro */
.center-screen { min-height: 70dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.intro-cat { font-size: clamp(38px, 11vw, 64px); font-weight: 800; letter-spacing: -.02em; line-height: 1; }

/* reveal */
.reveal { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 6px; }
.verdict-ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; border: 4px solid currentColor; }
.verdict-ic svg { width: 44px; height: 44px; }
.verdict { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.ok-c { color: var(--green); } .bad-c { color: var(--pink); } .wait-c { color: var(--amber); }
.reveal-card { width: min(260px, 70vw); aspect-ratio: 1; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.reveal-card img { width: 100%; height: 100%; object-fit: cover; }
.song-t { font-size: 24px; font-weight: 800; line-height: 1.15; }
.song-a { color: var(--muted); font-size: 16px; }
.pts-big { font-size: 30px; font-weight: 800; color: #fff; padding: 6px 22px; border-radius: 16px; background: rgba(0, 229, 255, .16); border: 1px solid rgba(0, 229, 255, .5); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.stat { background: var(--slate); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 105vh, 0) rotate(540deg); opacity: .9; } }

/* leaderboard */
.board { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 30px auto 1fr auto auto; align-items: center; gap: 10px; min-height: 56px; padding: 6px 12px; border-radius: 14px; background: var(--slate); border: 1px solid var(--line); }
.brow.me { border-color: rgba(138, 92, 255, .7); background: rgba(138, 92, 255, .14); }
.brow .rk { font-weight: 800; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.brow .rk svg { width: 22px; height: 22px; color: var(--amber); }
.brow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .dl { font-size: 13px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.brow .tt { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.mv { font-size: 11px; font-weight: 800; }
.mv.up { color: var(--green); } .mv.down { color: var(--pink); }

/* podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-top: 8px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; max-width: 140px; }
.pod .blk { width: 100%; border-radius: 16px 16px 6px 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pod .medal { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #1A1300; margin-top: -24px; border: 2px solid var(--navy); }
.pod.p1 .blk { height: 120px; background: linear-gradient(180deg, rgba(255, 199, 0, .55), rgba(255, 199, 0, .12)); }
.pod.p2 .blk { height: 90px; background: linear-gradient(180deg, rgba(148, 163, 184, .45), rgba(148, 163, 184, .1)); }
.pod.p3 .blk { height: 70px; background: linear-gradient(180deg, rgba(217, 119, 6, .45), rgba(217, 119, 6, .1)); }
.pod.p1 .medal { background: #FFD84D; } .pod.p2 .medal { background: #CBD5E1; } .pod.p3 .medal { background: #FFC700; }
.pod .pn { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { color: #FFD84D; width: 30px; height: 30px; margin-bottom: -6px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 50; background: #fff; color: var(--navy); font-weight: 700; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); font-size: 14px; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: var(--amber); color: #241500; text-align: center; font-size: 13px; font-weight: 700; padding: 6px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(6, 9, 24, .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
.overlay .card { max-width: 420px; width: 100%; text-align: center; }

/* ---------- desktop player view: game + sidebar ---------- */
@media (min-width: 1024px) {
  .room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .room-aside { position: sticky; top: 16px; }
}
@media (max-width: 1023px) { .room-aside { display: none; } }

/* ---------- big screen (TV) ---------- */
.tv { min-height: 100dvh; padding: clamp(16px, 2.2vw, 36px); display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 24px); font-size: clamp(14px, 1.15vw, 22px); }
.tv .topbar .logo { font-size: 1.4em; }
.tv-main { flex: 1; display: grid; gap: clamp(14px, 2vw, 32px); align-items: center; }
.tv-split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.tv .stage { aspect-ratio: 1; border-radius: 28px; }
.tv .q-title { font-size: 3em; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.tv .answers { grid-template-columns: 1fr 1fr; gap: 1em; }
.tv .answer { min-height: 3.6em; font-size: 1.35em; border-radius: 20px; }
.tv .answer .lt { width: 1.8em; height: 1.8em; font-size: .9em; }
.tv .ring { width: 6em; height: 6em; }
.tv .ring span { font-size: 2.2em; }
.tv .ring.big { width: 12em; height: 12em; }
.tv .ring.big span { font-size: 5em; }
.tv .qr { width: 15em; height: 15em; padding: 1em; border-radius: 24px; }
.tv .room-code { font-size: 4.6em; }
.tv .card { border-radius: 26px; padding: 1.4em; }
.tv .brow { min-height: 3.2em; font-size: 1.1em; }
.tv .wave { height: 3.4em; }
.tv .wave i { width: .4em; }
.tv-players { display: flex; flex-wrap: wrap; gap: 1em; }
.tv-player { display: flex; flex-direction: column; align-items: center; gap: .3em; width: 6em; font-size: .9em; }
.tv-player .av { width: 4.4em; height: 4.4em; }
.tv-player.done .av { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 229, 255, .5); }
.tv-player .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tv h1 { font-size: 3.6em; line-height: 1.02; font-weight: 800; letter-spacing: -.03em; }
.tv .chip { font-size: .85em; min-height: 2em; }
.tv .btn { min-height: 3.2em; font-size: 1em; }
@media (max-width: 900px) { .tv-split { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .confetti { display: none; }
}

/* ---------- polish ---------- */
.qr { flex: none; }
.pod .medal { margin-top: 0; margin-bottom: 4px; }
.pod .blk { padding-top: 8px; }
.pod .pn { margin-bottom: 2px; }
.chip.ok-chip { background: var(--green); color: #fff; border-color: var(--green); font-weight: 800; }
.mode .txt { padding-right: 44px; }
@media (max-width: 420px) { .hide-sm { display: none; } }
.muted svg, .card > svg { vertical-align: -3px; color: var(--amber); }
.card.row > svg { width: 28px; height: 28px; }

/* ---------- ХитЗалп brand: logo & splash screens ---------- */
.logo { gap: 9px; }
.logo .mark { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 4px 14px rgba(255,45,154,.25); }
.wordmark { font-weight: 800; font-style: italic; letter-spacing: -.02em; font-size: 21px; background: linear-gradient(95deg, #fff 0%, var(--cyan) 30%, var(--pink) 62%, var(--gold, #FFC700) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 2px; }
.brand-logo { display: block; width: min(440px, 92%); height: auto; margin: 0 auto;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 46%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 60% 62% at 50% 46%, #000 62%, transparent 100%); }
.slogan { font-weight: 800; font-size: clamp(26px, 7vw, 44px); line-height: 1.08; letter-spacing: -.02em; text-align: center; }
.slogan .grad-text, .grad-text { background: linear-gradient(90deg, var(--cyan), var(--pink) 55%, #FFC700); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { text-transform: uppercase; letter-spacing: .32em; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.splash { min-height: 78dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; position: relative; }
.splash::before { content: ''; position: absolute; inset: 10% 0 auto; height: 60%; z-index: -1; background: radial-gradient(40% 50% at 50% 40%, rgba(255,45,154,.22), transparent 70%), radial-gradient(35% 45% at 35% 50%, rgba(0,229,255,.18), transparent 70%), radial-gradient(30% 40% at 65% 55%, rgba(255,199,0,.12), transparent 70%); }
.splash .brand-logo { width: min(380px, 86vw); animation: splash-in .6s cubic-bezier(.2,.9,.3,1.2) both; }
.splash .spin-disc { animation: disc 2.2s linear infinite; }
@keyframes splash-in { from { opacity: 0; transform: scale(.86) rotate(-3deg); } }
@keyframes disc { to { transform: rotate(360deg); } }
.eq-bar { display: flex; gap: 4px; align-items: flex-end; height: 26px; }
.eq-bar i { width: 5px; border-radius: 3px; background: linear-gradient(var(--cyan), var(--pink)); animation: eq 1s ease-in-out infinite; }
.loadbar { width: 220px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.loadbar > i { display: block; height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--pink)); animation: load 1.3s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.tv .brand-logo { width: min(34vw, 560px); }
.tv .splash .brand-logo { width: min(42vw, 640px); }
.tv .slogan { font-size: 3.2em; }
.btn-primary { background: linear-gradient(95deg, var(--pink), var(--violet)); box-shadow: 0 10px 28px rgba(255,45,154,.35); }
.btn-primary:hover:not([disabled]) { background: linear-gradient(95deg, #ff4aa9, #9670ff); }
.btn-cta { background: var(--cyan); color: #04121F; }
.crown, .brow .rk svg { color: #FFC700; }
.pts-big { background: rgba(255, 199, 0, .14); border-color: rgba(255, 199, 0, .55); color: #FFE27A; }
.brand-logo.sm { width: min(250px, 66vw); }
.brand-logo.hero-logo { width: min(360px, 88%); margin: 0 0 6px; -webkit-mask-image: radial-gradient(ellipse 62% 64% at 50% 46%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 62% 64% at 50% 46%, #000 58%, transparent 100%); }
.tv .brand-logo.tv-lobby { width: min(30vw, 460px); margin: 0; }
.tv .brand-logo.tv-intro { width: min(24vw, 380px); margin: 0; }
.hero { justify-content: flex-end; }

.tv .room-code { font-size: clamp(2.2em, 3.6vw, 4.2em); letter-spacing: .1em; }
.tv .card.row { min-width: 0; }
.tv .card.row > .stack { min-width: 0; }
.tv .brand-logo.tv-lobby { width: min(24vw, 380px); }
.landing > * { min-width: 0; }
@media (min-width: 960px) { .hero .brand-logo.hero-logo { width: min(400px, 80%); } }

/* buttons are flex boxes: make text-only buttons/cards align like the design */
.cat, .mode, .preset, .prow, .answer { -webkit-tap-highlight-color: transparent; }
.qr-card .stack { align-items: flex-start; min-width: 0; }
/* desktop: the CTA sits at the bottom of the main column instead of the viewport */
@media (min-width: 1024px) {
  .room-grid .sticky-cta { position: sticky; left: auto; right: auto; margin: 4px -4px 0; padding: 18px 4px 16px; border-radius: 0 0 18px 18px; }
  .room-grid .sticky-cta > * { max-width: none; }
}
@media (min-width: 1024px) {
  .room-grid .stage { aspect-ratio: auto; height: clamp(220px, 34vh, 340px); }
  .room-grid .reveal-card { width: min(220px, 26vh); }
}
/* sticky CTA: solid panel with a short fade above, so hints never sit on top of content */
.sticky-cta { background: #0B1020; padding-top: 12px; }
.sticky-cta::before { content: ''; position: absolute; left: 0; right: 0; top: -28px; height: 28px; background: linear-gradient(rgba(11, 16, 32, 0), #0B1020); pointer-events: none; }
@media (min-width: 1024px) { .room-grid .sticky-cta { padding-top: 12px; } }
/* segmented controls: long labels wrap instead of overflowing */
.seg { gap: 6px; }
.seg button { white-space: normal; line-height: 1.15; padding: 6px 4px; overflow-wrap: normal; word-break: keep-all; font-size: 14px; }

/* ---------- Fotostrana mode (only rendered inside the Fotostrana iframe) ---------- */
@property --fs-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.fs-ring { position: relative; display: inline-grid; place-items: center; border-radius: 50%; padding: 3px; flex: none;
  background: conic-gradient(from var(--fs-angle), var(--cyan), var(--pink), var(--gold), var(--violet), var(--cyan));
  animation: fs-spin 6s linear infinite; box-shadow: 0 6px 22px rgba(255, 45, 154, .28); }
.fs-ring .av { border: 3px solid var(--navy); margin: 0; }
.fs-ring.lg .av { width: 60px; height: 60px; }
@keyframes fs-spin { to { --fs-angle: 360deg; } }
.av.photo { background: var(--slate-3); }

.fs-hello { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; isolation: isolate;
  background: linear-gradient(160deg, rgba(138, 92, 255, .20), rgba(255, 45, 154, .08) 55%, rgba(0, 229, 255, .08)), var(--slate);
  border-color: rgba(138, 92, 255, .38); animation: fs-rise .55s cubic-bezier(.2, .9, .3, 1.1) both; }
.fs-hello::after { content: ''; position: absolute; inset: -40% -10% auto auto; width: 220px; height: 220px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, .18), transparent 65%); animation: fs-float 7s ease-in-out infinite alternate; }
.fs-hello-top { display: flex; align-items: center; gap: 14px; }
.fs-hello-name { font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; overflow-wrap: anywhere; }
.fs-edit { background: rgba(255, 255, 255, .06); transition: transform .15s ease, background .2s; }
.fs-edit:hover { background: rgba(255, 255, 255, .12); transform: rotate(-8deg); }
.fs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fs-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: rgba(11, 16, 32, .45); border: 1px solid var(--line); text-align: center; animation: fs-rise .5s cubic-bezier(.2, .9, .3, 1.1) both; }
.fs-stat:nth-child(2) { animation-delay: .07s; }
.fs-stat:nth-child(3) { animation-delay: .14s; }
.fs-stat .ic { color: var(--gold); display: grid; place-items: center; }
.fs-stat .ic svg { width: 18px; height: 18px; }
.fs-stat b { font-size: 20px; }
.fs-stat span:last-child { font-size: 11px; color: var(--muted); }

.fs-btn { position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(100deg, var(--pink), var(--violet) 55%, #5B7CFF); box-shadow: 0 10px 28px rgba(255, 45, 154, .32); }
.fs-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .28) 50%, transparent 80%); animation: fs-shine 3.2s ease-in-out infinite; }
.fs-btn:hover:not([disabled]) { box-shadow: 0 12px 34px rgba(255, 45, 154, .45); transform: translateY(-1px); }
.fs-btn.done { background: linear-gradient(100deg, #00C6E0, var(--cyan)); color: #04121F; box-shadow: 0 10px 28px rgba(0, 229, 255, .35); animation: fs-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
.fs-btn.done::after, .fs-btn.busy::after { display: none; }
.fs-btn[disabled] { opacity: .85; }
.fs-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; flex: none; }

.fs-invite, .fs-share { position: relative; display: flex; flex-direction: column; gap: 14px; border: 1px solid transparent; animation: fs-rise .5s cubic-bezier(.2, .9, .3, 1.1) both;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, rgba(255, 45, 154, .7), rgba(138, 92, 255, .6), rgba(0, 229, 255, .6)) border-box; }
.fs-share { background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, rgba(255, 199, 0, .75), rgba(255, 45, 154, .6), rgba(138, 92, 255, .6)) border-box; }
.fs-bubble { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 6px 18px rgba(255, 45, 154, .35); }
.fs-bubble.gold { background: linear-gradient(135deg, var(--gold), var(--pink)); color: #1B1030; }
.fs-bubble::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(255, 45, 154, .55); animation: fs-ripple 2.4s ease-out infinite; }
.fs-bubble.gold::before { border-color: rgba(255, 199, 0, .6); }
.fs-bubble svg { width: 22px; height: 22px; }

.prow .fs-rename { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--violet-2); background: rgba(138, 92, 255, .14); border: 1px solid rgba(138, 92, 255, .35); flex: none; transition: transform .15s ease, background .2s; }
.prow .fs-rename:hover { background: rgba(138, 92, 255, .26); transform: scale(1.06); }
.prow .fs-rename svg { width: 16px; height: 16px; }

.fs-sheet-wrap { animation: fs-fade .2s ease both; }
.fs-sheet-wrap.closing { animation: fs-fade .2s ease reverse both; }
.fs-sheet { animation: fs-sheet-in .32s cubic-bezier(.2, .9, .3, 1.15) both; }
.fs-sheet-wrap.closing .fs-sheet { animation: fs-sheet-in .22s ease reverse both; }
.fs-sheet .notice.error { text-align: left; }
@media (max-width: 560px) {
  .fs-sheet-wrap { place-items: end center; padding: 0; }
  .fs-sheet { max-width: none; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

.fs-pop { animation: fs-pop .6s .15s cubic-bezier(.2, .9, .3, 1.4) both; }
.fs-record { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #1B1030;
  background: linear-gradient(90deg, var(--gold), #FFE27A, var(--gold)); background-size: 200% 100%; animation: fs-pop .5s cubic-bezier(.2, .9, .3, 1.4) both, fs-gold 2.4s linear infinite; }
.fs-record svg { width: 16px; height: 16px; }

@keyframes fs-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fs-fade { from { opacity: 0; } }
@keyframes fs-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fs-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes fs-ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes fs-float { from { transform: translate(0, 0); } to { transform: translate(-30px, 24px); } }
@keyframes fs-sheet-in { from { opacity: 0; transform: translateY(28px) scale(.98); } }
@keyframes fs-gold { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fs-ring, .fs-btn::after, .fs-bubble::before, .fs-hello::after { animation: none !important; } }
