/* ХитЗалп — 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; }
.game-head .gh-exit { width: 36px; height: 36px; flex: none; }
.game-head .gh-exit svg { width: 18px; height: 18px; }
.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; } }

/* Fotostrana: Solo resumed after a reload */
.fs-resume { gap: 14px; animation: fs-rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.fs-resume .stats { width: min(100%, 420px); }
.fs-resume-bar { width: min(100%, 320px); }
.fs-resume-bar i { transition: width .8s cubic-bezier(.2, .8, .2, 1); animation: fs-fill .9s .2s cubic-bezier(.2, .8, .2, 1) both; }
.fs-resume-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.fs-resume-cat svg { width: 16px; height: 16px; }
@keyframes fs-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fs-fill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@media (prefers-reduced-motion: reduce) { .fs-resume, .fs-resume-bar i { animation: none; } }

/* ---------- Fotostrana v2.2: compact layout fitted to the visible window ----------
   --fs-vh = visible height of the app on the Fotostrana page (set by fs.js from the
   library's onWindowResize). The iframe is resized to the content, never below it. */
html.fs-mode body, html.fs-mode #app { min-height: var(--fs-vh, 560px); }
html.fs-mode .page { padding-bottom: 20px; gap: 12px; }
html.fs-mode .topbar { min-height: 44px; }
html.fs-mode .sticky-cta { position: static; padding: 6px 0 0; background: none; }
html.fs-mode .sticky-cta::before { display: none; }
html.fs-mode .sticky-cta > * { max-width: none; }
html.fs-mode .center-screen { min-height: calc(var(--fs-vh, 560px) - 150px); gap: 10px; }
html.fs-mode .splash { min-height: calc(var(--fs-vh, 560px) - 120px); }
html.fs-mode .splash .brand-logo { width: min(300px, 70vw); }
html.fs-mode .brand-logo.sm { width: min(200px, 56vw); }
html.fs-mode .title { font-size: clamp(22px, 4.2vw, 28px); }
html.fs-mode .stage, html.fs-mode .room-grid .stage { aspect-ratio: auto; height: clamp(120px, calc(var(--fs-vh, 560px) * .27), 240px); }
html.fs-mode .stage .prompt { font-size: clamp(20px, 3.6vw, 26px); }
html.fs-mode .answers { grid-template-columns: 1fr 1fr; gap: 8px; }
html.fs-mode .answer { min-height: 54px; padding: 8px 12px; font-size: 15px; }
html.fs-mode .ring.big { width: 120px; height: 120px; }
html.fs-mode .ring.big span { font-size: 50px; }
html.fs-mode .intro-cat { font-size: clamp(32px, 7vw, 52px); }
html.fs-mode .verdict-ic { width: 56px; height: 56px; border-width: 3px; }
html.fs-mode .verdict-ic svg { width: 30px; height: 30px; }
html.fs-mode .verdict { font-size: 28px; }
html.fs-mode .reveal { gap: 8px; }
html.fs-mode .reveal-card, html.fs-mode .room-grid .reveal-card { width: clamp(110px, calc(var(--fs-vh, 560px) * .24), 200px); }
html.fs-mode .song-t { font-size: 21px; }
html.fs-mode .stat { padding: 8px 6px; }
html.fs-mode .stat b { font-size: 19px; }
html.fs-mode .brow { min-height: 48px; }
html.fs-mode .toast { bottom: auto; top: 14px; }
@media (max-width: 420px) { html.fs-mode .answers { grid-template-columns: 1fr; } }
/* wide windows: verdict and cover side by side, so the answer screen stays short */
@media (min-width: 720px) {
  html.fs-mode .reveal { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; row-gap: 6px; text-align: left; justify-items: start; align-items: center; }
  html.fs-mode .reveal > .reveal-card { grid-column: 1; grid-row: 1 / span 6; }
  html.fs-mode .reveal > :not(.reveal-card) { grid-column: 2; }
  html.fs-mode .reveal > .verdict-ic { display: none; }
  html.fs-mode .reveal .stats { max-width: 420px; }
}

/* cover: category art first, the album cover fades in on top */
.reveal-card.rv-ph { background-size: cover; background-position: center; position: relative; }
.reveal-card .rv-img { opacity: 0; transition: opacity .35s ease; }
.reveal-card .rv-img.in { opacity: 1; }

/* «бот» badge */
.bot-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px;
  color: #04121F; background: linear-gradient(90deg, var(--cyan), #8FF4FF); }

/* Fotostrana home: three entries */
html.fs-mode .fsm-home .landing { gap: 18px; }
html.fs-mode .fsm-hero { min-height: 300px; }
@media (min-width: 960px) { html.fs-mode .fsm-hero { min-height: 100%; } html.fs-mode .fsm-home .landing { align-items: stretch; } }
.fsm-hero p { max-width: 40ch; font-size: 16px; }
.fsm-modes { gap: 10px; }
.fsm-mode { min-height: 104px; padding: 16px 18px; animation: fs-rise .5s cubic-bezier(.2, .9, .3, 1.1) both; transition: transform .15s ease, box-shadow .2s ease; }
.fsm-mode:hover { transform: translateY(-2px); }
.fsm-mode .txt { margin-left: 0; padding-left: 58px; padding-right: 44px; }
.fsm-mode h3 { font-size: 19px; }
.fsm-mode p { font-size: 13px; }
.fsm-mode::after { background: linear-gradient(90deg, rgba(11, 16, 38, .94) 0, rgba(11, 16, 38, .82) 55%, rgba(11, 16, 38, .45)); }
.fsm-ic { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.fsm-ic svg { width: 22px; height: 22px; }
.fsm-mode.solo { box-shadow: inset 0 0 0 1px rgba(255, 199, 0, .55); }
.fsm-mode.solo .fsm-ic { background: linear-gradient(135deg, var(--gold), #FF9F1C); color: #1B1030; }
.fsm-mode.friends { box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .55); }
.fsm-mode.friends .fsm-ic { background: linear-gradient(135deg, var(--cyan), #5B7CFF); color: #04121F; }
.fsm-mode.online { box-shadow: inset 0 0 0 1px rgba(255, 45, 154, .6), 0 10px 30px rgba(255, 45, 154, .18); }
.fsm-mode.online .fsm-ic { background: linear-gradient(135deg, var(--pink), var(--violet)); }
.fsm-mode.soon { opacity: .82; }
.fsm-soon { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 3px; background: rgba(255, 255, 255, .14); color: #FFD84D; }
.fsm-live { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; color: #8FF4FF; }
.fsm-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(0, 229, 255, .6); animation: fso-ping 1.6s ease-out infinite; }
html.fs-mode .fs-hello { padding: 14px 16px; gap: 10px; }

/* invite opened after the game ended */
.fs-over .fs-bubble { width: 64px; height: 64px; border-radius: 20px; }
.fs-over .fs-bubble svg { width: 30px; height: 30px; }

/* online: search and line-up */
.fso-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 22px; animation: fs-rise .45s cubic-bezier(.2, .9, .3, 1.1) both;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(130deg, rgba(255, 45, 154, .7), rgba(138, 92, 255, .6), rgba(0, 229, 255, .6)) border-box; border: 1px solid transparent; }
.fso-card .btn { max-width: 360px; }
.fso-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fso-note { font-size: 13px; max-width: 46ch; }
.fso-radar { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
.fso-radar > i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(0, 229, 255, .28); }
.fso-radar .r2 { inset: 22px; border-color: rgba(138, 92, 255, .35); }
.fso-radar .r3 { inset: 44px; border-color: rgba(255, 45, 154, .4); }
.fso-radar.on .r1 { animation: fso-wave 2.4s ease-out infinite; }
.fso-radar.on .r2 { animation: fso-wave 2.4s .5s ease-out infinite; }
.fso-radar .sweep { inset: 0; border: 0; background: conic-gradient(from 0deg, rgba(0, 229, 255, .28), transparent 25%); animation: spin 2.6s linear infinite; }
.fso-core { position: relative; z-index: 2; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; }
.fso-core svg { width: 30px; height: 30px; }
.fso-dot { position: absolute; z-index: 2; animation: fs-pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.fso-dot .av { width: 34px; height: 34px; border-color: var(--navy); }
.fso-dot.d0 { top: 4px; left: 66px; } .fso-dot.d1 { top: 36px; right: 4px; } .fso-dot.d2 { bottom: 30px; right: 8px; } .fso-dot.d3 { bottom: 2px; left: 70px; }
.fso-dot.d4 { bottom: 30px; left: 6px; } .fso-dot.d5 { top: 36px; left: 2px; } .fso-dot.d6 { top: 8px; right: 30px; }
.fso-count { font-size: 16px; }
.fso-slots { display: flex; gap: 6px; }
.fso-slots i { width: 22px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); transition: background .3s; }
.fso-slots i.on { background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.fso-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fso-p { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--slate-2); border: 1px solid var(--line); font-size: 13px; animation: fs-rise .35s ease both; }
.fso-p .av { width: 28px; height: 28px; }
.fso-seats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 640px; }
.fso-seat { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; animation: fs-pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.fso-seat b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fso-seat .bot-badge { margin-left: 0; }
.fso-seat.me .av { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 45, 154, .35); }
.fso-met .prow { gap: 10px; }
.fso-met .icon-btn { width: 38px; height: 38px; color: var(--muted); }
.fs-countdown .intro-cat { animation: fs-pop .5s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes fso-wave { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }
@keyframes fso-ping { 0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, .6); } 100% { box-shadow: 0 0 0 9px rgba(0, 229, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .fso-radar *, .fsm-mode, .fsm-live i { animation: none !important; } }

/* ---------- 2.2.1: iframe = content height; «Вернуться в игру»; «Включить звук» ---------- */
html.fs-mode body, html.fs-mode #app { min-height: 0; }
html.fs-mode .center-screen { min-height: 340px; }
html.fs-mode .splash { min-height: 380px; }
html.fs-mode .boot { min-height: 360px; }
.fsm-resume { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; color: var(--text); cursor: pointer; font: inherit;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, var(--cyan), var(--pink)) border-box; border: 1.5px solid transparent;
  box-shadow: 0 10px 30px rgba(0, 229, 255, .15); animation: fs-rise .45s cubic-bezier(.2, .9, .3, 1.1) both; }
.fsm-resume .fsm-ic { position: static; translate: none; flex: none; background: linear-gradient(135deg, var(--cyan), #5B7CFF); color: #04121F; }
.fsm-resume .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fsm-resume .txt span { font-size: 13px; color: var(--muted); }
.fsm-resume .btn { flex: none; pointer-events: none; }
.sound-gate { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 90px 16px 16px;
  background: rgba(6, 9, 24, .72); backdrop-filter: blur(3px); }
.sound-gate[hidden] { display: none; }
.sg-card { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 24px 22px; border-radius: 22px;
  background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(130deg, var(--pink), var(--violet), var(--cyan)) border-box; border: 1.5px solid transparent;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: fs-pop .4s cubic-bezier(.2, .9, .3, 1.3) both; }
.sg-card b { font-size: 19px; }
.sg-card p { font-size: 13px; color: var(--muted); }
.sg-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); animation: fso-ping 1.6s ease-out infinite; }
.sg-ic svg { width: 30px; height: 30px; }
.sg-btn { width: 100%; font-size: 17px; }
/* the Fotostrana iframe is 830 px wide: two columns on the home screen from 820 px */
@media (min-width: 820px) {
  html.fs-mode .fsm-home .landing { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; align-items: stretch; }
  html.fs-mode .fsm-hero { min-height: 100%; }
  html.fs-mode .fsm-hero h1 { font-size: clamp(34px, 4.6vw, 52px); }
  /* 2.2.7: with «Вернуться в игру» the home still fits 760 px with a margin */
  html.fs-mode .fsm-home .landing > .fsm-resume { grid-column: 1 / -1; padding: 8px 16px; }
  html.fs-mode .has-resume .landing { row-gap: 12px; }
  html.fs-mode .has-resume .fsm-modes { gap: 8px; }
  html.fs-mode .has-resume .fs-hello { padding-top: 12px; padding-bottom: 12px; gap: 8px; }
  html.fs-mode .has-resume .fsm-mode { min-height: 84px; padding-top: 10px; padding-bottom: 10px; }
  html.fs-mode .has-resume .fs-hello .section-label { display: none; }
  html.fs-mode .has-resume .fs-stat { padding-top: 7px; padding-bottom: 7px; }
}
/* online final: is it a win */
.fso-verdict { display: flex; align-items: center; gap: 14px; animation: fs-rise .45s cubic-bezier(.2, .9, .3, 1.1) both; }
.fso-verdict b { font-size: 17px; }
.fso-vic { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--slate-2); color: var(--muted); }
.fso-vic svg { width: 24px; height: 24px; }
.fso-verdict.win { background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, var(--gold), var(--pink)) border-box; border: 1.5px solid transparent; }
.fso-verdict.win .fso-vic { background: linear-gradient(135deg, var(--gold), #FF9F1C); color: #1B1030; }
.fso-verdict.solo .fso-vic { background: linear-gradient(135deg, var(--cyan), #5B7CFF); color: #04121F; }
.fso-vnote { margin-top: 4px; font-size: 12px; color: #8FF4FF; }

/* ---------- 2.2.3: one fixed iframe height (no jumps) ----------
   The iframe keeps FIXED_H (fs.js) on every screen. The game area is exactly the window
   height: a short screen is centred on the usual background, a longer one scrolls inside. */
html.fs-mode, html.fs-mode body { height: 100%; overflow: hidden; }
html.fs-mode #app { height: 100vh; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
html.fs-mode #app > * { flex: none; width: 100%; margin-block: auto; }
html.fs-mode #app::-webkit-scrollbar { width: 8px; }
html.fs-mode #app::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 8px; }
/* the final screen in two columns at the Fotostrana width, so it fits the fixed height */
@media (min-width: 820px) {
  html.fs-mode .fsf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  html.fs-mode .fsf > .stack { gap: 12px; }
}
/* the sizes that used to follow the visible window now follow the fixed game height */
html.fs-mode { --fs-vh: 760px; }
@media (min-width: 820px) {
  html.fs-mode .fsf-solo { max-width: 860px; }
  html.fs-mode .fsf-solo .fsf { align-items: center; }
}
html.fs-mode .fsf { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 820px) { html.fs-mode .fsf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } }
/* 2.2.5: the answer block always has the same height (with or without «+очки», one- or
   two-line title), so «Следующий вопрос» below stays in one place from question to question */
@media (min-width: 720px) {
  html.fs-mode .reveal { min-height: 276px; align-content: center; }
  html.fs-mode .reveal .song-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}

/* 2.2.6: «Следующий вопрос» in one place on every answer screen. The answer rows are taller
   after a wrong answer (two marks, «Верно» and «Ваш ответ», take room from the song names,
   which then wrap), and the centred screen moved the button by up to 40 px. Now the answer
   screen fills the game area: the button stands at its bottom, as on phones, and the rest is
   centred above it. */
html.fs-mode #app > :has(> .solo-rv) { min-height: 100%; display: flex; flex-direction: column; }
html.fs-mode .solo-rv { flex: 1 0 auto; display: flex; flex-direction: column; }
html.fs-mode .solo-rv > :first-child { margin-top: auto; }
html.fs-mode .solo-rv > .answers { margin-bottom: auto; }

/* 2.2.6: hint before the Fotostrana friends window (it opens with «Выбрать всех» ticked) */
.fs-pick-hint { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 229, 255, .1); border: 1px solid rgba(0, 229, 255, .35); animation: fs-rise .35s cubic-bezier(.2, .9, .3, 1.1) both; }
.fs-pick-hint[hidden] { display: none; }
/* 2.2.7: the hint covers the card header instead of adding a row (no taller lobby, no iframe scroll) */
.fs-invite > .fs-pick-hint { position: absolute; z-index: 2; inset: 10px 10px auto 10px; align-items: center;
  background: linear-gradient(rgba(0, 229, 255, .12), rgba(0, 229, 255, .12)), var(--slate); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.fs-pick-hint .ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 229, 255, .18); color: var(--cyan); }
.fs-pick-hint .ic svg { width: 18px; height: 18px; }
.fs-pick-hint b { display: block; font-size: 15px; }
.fs-pick-hint .muted { font-size: 13px; margin-top: 2px; }

/* 2.2.6: narrow Fotostrana column (~470 px with the left menu and ads): compact hero on the
   home screen, so the three ways to play fit into the iframe height (fs.js NARROW_H) */
@media (max-width: 819px) {
  html.fs-mode .fsm-hero { min-height: 0; padding: 16px 18px; }
  html.fs-mode .fsm-hero .brand-logo.hero-logo { width: min(230px, 62%); margin-bottom: 2px; }
  html.fs-mode .fsm-hero h1 { font-size: clamp(28px, 7.4vw, 36px); }
  html.fs-mode .fsm-hero p { display: none; }
  html.fs-mode .fsm-home .landing { gap: 12px; }
  html.fs-mode .fs-stat { padding-top: 8px; padding-bottom: 8px; }
  html.fs-mode .fsm-mode { min-height: 84px; padding-top: 12px; padding-bottom: 12px; }
  /* 2.2.7: with «Вернуться в игру» on top the narrow home keeps its height too */
  html.fs-mode .has-resume .fsm-resume { padding: 10px 14px; margin-bottom: 12px; }
  html.fs-mode .has-resume .fsm-hero .brand-logo.hero-logo { width: min(180px, 50%); }
  html.fs-mode .has-resume .fsm-mode { min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
  html.fs-mode .has-resume .fsm-hero h1 { display: none; }
  html.fs-mode .has-resume .fs-hello .section-label { display: none; }
  /* answers in two narrow columns: «Верно» / «Ваш ответ» as an icon only, so song names keep their words */
  html.fs-mode .answer .mark { font-size: 0; gap: 0; }
  html.fs-mode .answer .mark svg { width: 18px; height: 18px; }
  /* final: a lower podium (the full results still scroll inside the game area) */
  html.fs-mode .podium .av.xl { width: 76px; height: 76px; }
  html.fs-mode .podium .av.lg { width: 52px; height: 52px; }
  html.fs-mode .pod.p1 .blk { height: 84px; } html.fs-mode .pod.p2 .blk { height: 64px; } html.fs-mode .pod.p3 .blk { height: 52px; }
}

/* ---------- 2.3.0: «Рейтинг» (top players by points) ----------
   The screen is exactly the game area high inside Fotostrana: the list scrolls inside its
   card, the player's own place stays under it, the page itself never scrolls. */
.fsm-top svg { width: 18px; height: 18px; color: var(--gold); }
.fst { max-width: 600px; }
html.fs-mode .fst { height: 100vh; padding-bottom: 16px; gap: 10px; }
.fst-note { font-size: 13px; margin-top: 4px; }
.fst-list { flex: 1 1 auto; min-height: 160px; overflow-y: auto; overscroll-behavior: contain; padding: 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.fst-list::-webkit-scrollbar { width: 8px; }
.fst-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 8px; }
.fst-board { gap: 6px; }
.fst-row { grid-template-columns: minmax(30px, auto) auto 1fr auto; animation: fs-rise .35s cubic-bezier(.2, .9, .3, 1.1) both; }
html.fs-mode .fst-row { min-height: 50px; }
.fst-row .av { width: 36px; height: 36px; }
.fst-row.p1 { background: linear-gradient(var(--slate-2), var(--slate-2)) padding-box, linear-gradient(120deg, var(--gold), var(--pink)) border-box; border-color: transparent; }
.fst-row.p2 .rk { color: #E3E6F5; }
.fst-row.p3 .rk { color: #E7A46B; }
.fst-row.me { border-color: rgba(138, 92, 255, .7); background: rgba(138, 92, 255, .14); }
.fst-row .tt { min-width: 64px; }
.fst-state { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px 12px; }
.fst-foot { flex: none; display: flex; flex-direction: column; gap: 6px; }
.fst-foot[hidden] { display: none; }
.fst-mine .btn { flex: none; }
@media (prefers-reduced-motion: reduce) { .fst-row { animation: none; } }
/* 2.3.0: the profile numbers wait for the server instead of showing old ones */
.fs-stat b.fs-ph { color: var(--muted-2); animation: fs-ph-pulse 1.1s ease-in-out infinite alternate; }
@keyframes fs-ph-pulse { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fs-stat b.fs-ph { animation: none; } }

/* ---------- 2.5.0: «Серия дней» and «Мелодия дня» ----------
   Home: two compact cards under the hero in the left column (830×760 without scrolling; the
   hero gives up its paragraph). #/daily: the same blocks as a normal question and final. */
.fsm-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fsm-main > .fsm-hero { flex: 1 1 auto; }
.fsd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fsd-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 12px; border-radius: 18px; text-align: left; color: var(--text); text-decoration: none; cursor: pointer; font: inherit;
  background: var(--slate); border: 1px solid var(--line); animation: fs-rise .45s cubic-bezier(.2, .9, .3, 1.1) both; transition: transform .15s ease; }
.fsd-card:hover { transform: translateY(-2px); }
.fsd-ic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--slate-2); color: var(--muted); }
.fsd-ic svg { width: 22px; height: 22px; }
.fsd-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.fsd-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fsd-big { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.fsd-big b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.fsd-big span { font-size: 13px; color: var(--muted); }
.fsd-sub { font-size: 12px; line-height: 1.25; color: #C9CDE6; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-height: 2.5em; }
.fsd-streak .fsd-ic { color: #FF9F1C; }
.fsd-streak.hot { background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, var(--gold), var(--pink)) border-box; border-color: transparent; }
.fsd-streak.hot .fsd-ic { background: linear-gradient(135deg, var(--gold), #FF9F1C); color: #1B1030; }
.fsd-daily { background: linear-gradient(var(--slate), var(--slate)) padding-box, linear-gradient(120deg, var(--violet), var(--cyan)) border-box; border-color: transparent; }
.fsd-daily .fsd-ic { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; }
.fsd-daily.done { background: var(--slate); border-color: var(--line); }
.fsd-daily.done .fsd-ic { background: rgba(53, 230, 140, .16); color: #5CF0A6; }
.fsd-card.loading .fsd-big b { color: var(--muted-2); }
@media (min-width: 820px) {
  html.fs-mode .has-day .fsm-hero { min-height: 0; }
  html.fs-mode .has-day .fsm-hero p { display: none; }
  html.fs-mode .has-day .fsm-hero .brand-logo.hero-logo { width: min(320px, 82%); }
  html.fs-mode .has-day .fsm-hero h1 { font-size: clamp(32px, 4.2vw, 46px); }
}
@media (max-width: 819px) {
  html.fs-mode .has-day .fsm-main { gap: 12px; }
  html.fs-mode .has-day .fsd-card { padding: 10px; }
  html.fs-mode .has-day .fsd-ic { width: 34px; height: 34px; }
  html.fs-mode .has-day .fsd-big b { font-size: 19px; }
}
/* the streak explanation sheet */
.fsd-info p { font-size: 14px; text-align: left; }
/* #/daily */
.fsd { max-width: 860px; }
.fsd-hero { align-items: center; text-align: center; }
.fsd-hero p { font-size: 14px; }
.fsd-go { width: 100%; font-size: 17px; }
.fsd-small { font-size: 13px; color: #8FF4FF; }
.fsd-yday .row { gap: 12px; align-items: center; margin-top: 8px; }
.fsd-yday b { display: block; font-size: 16px; }
.fsd-cover { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.fsd-res { text-align: center; align-items: center; }
.fsd-verdict { display: flex; align-items: center; gap: 10px; }
.fsd-res .reveal-card, .fsd-res .rv-card { max-width: 180px; }
.fsd-next b { display: block; }
.fsd-next .muted { font-size: 13px; margin-top: 2px; }
@media (min-width: 820px) { html.fs-mode .fsd .fsf { align-items: center; } }
@media (prefers-reduced-motion: reduce) { .fsd-card { animation: none; } }
/* 2.5.0: the narrow Fotostrana column keeps NARROW_H without scrolling with the day cards */
@media (max-width: 819px) {
  html.fs-mode .has-day .fs-hello .section-label { display: none; }
  html.fs-mode .has-day .fs-hello { padding-top: 12px; padding-bottom: 12px; }
  html.fs-mode .has-day .fs-stat { padding-top: 6px; padding-bottom: 6px; }
  html.fs-mode .has-day .fsd-sub { -webkit-line-clamp: 1; min-height: 1.25em; white-space: nowrap; text-overflow: ellipsis; display: block; }
  html.fs-mode .has-day .fsd-label { font-size: 10px; }
  html.fs-mode .has-day .fsm-mode { min-height: 80px; padding-top: 10px; padding-bottom: 10px; }
  html.fs-mode .has-day .fsm-hero .brand-logo.hero-logo { width: min(200px, 54%); }
  html.fs-mode .fsd-res .reveal-card { width: 120px; height: 120px; }
  html.fs-mode .fsd-done .fsd-next { display: none; }
}
@media (max-width: 819px) {
  /* with «Вернуться в игру» too: the hero picture gives way (the logo stays in the top bar) */
  html.fs-mode .has-resume.has-day .fsm-hero { display: none; }
}
/* 2.5.1: points for the guessed «Мелодия дня» */
.fsd-res .fsd-pts { font-size: 26px; margin: -4px 0 -2px; }
@media (max-width: 819px) { html.fs-mode .fsd-res .fsd-pts { font-size: 22px; } }

/* 2.6.2: the game sits ~60 px higher at the Fotostrana width (830 px). On 13" laptops the
   Fotostrana header leaves only the top ~650–700 px of our 760 px iframe on the first screen,
   and the main buttons went below it. Only spacing changes (no sizes, fonts or colours), and
   the narrow column (max-width: 819px) is untouched.
   * a centred screen is centred 60 px above the middle: a spacer below it (120 px) that
     shrinks first when a screen is tall, so it never makes a screen scroll;
   * the answer screen (button at its bottom, 2.2.6) ends 60 px above the iframe bottom;
   * tall screens (home, settings, lobby) lose some top padding and gaps. */
@media (min-width: 820px) {
  html.fs-mode #app::after { content: ''; flex: 0 1 120px; min-height: 0; }
  html.fs-mode #app > :has(> .solo-rv) { min-height: calc(100% - 60px); }
  html.fs-mode .page { padding-top: 6px; gap: 8px; }
  html.fs-mode .sticky-cta { padding-top: 0; }
  html.fs-mode .page > .card.stack { padding-top: 14px; padding-bottom: 14px; gap: 8px; }
  /* home: the right column (hello card + three ways to play) */
  html.fs-mode .fsm-side { gap: 8px; }
  html.fs-mode .fsm-mode { min-height: 96px; padding-top: 12px; padding-bottom: 12px; }
}
