/* BkL: разделы Игры и Рейтинг, нижнее меню, разделители дней. Подключается после style.css. */

/* ---------- разделители по дням ---------- */
.day { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 6px 0 -4px; color: var(--muted); }
.day i { flex: 1; height: 1px; background: var(--line); }
.day b { font-size: 14px; font-weight: 800; letter-spacing: .04em; color: var(--text); padding: 3px 11px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.more { text-align: center; padding: 22px 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.strip .num { width: auto; min-width: 34px; padding: 0 6px; }

/* ---------- нижнее меню разделов ---------- */
.mnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 4px;
  padding: 6px 10px calc(6px + var(--safe-b)); background: var(--glass); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.mnav button, .mnav a {
  position: relative; flex: 1; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px 6px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--muted);
  transition: color .2s, background .2s, transform .15s var(--ease);
}
.mnav a { text-decoration: none; white-space: nowrap; }
.mnav button:active, .mnav a:active { transform: scale(.94); }
.mnav button.on { color: var(--text); font-weight: 800; }
.mnav button.on::before { content: ""; position: absolute; top: -7px; left: 22%; right: 22%; height: 3px; background: var(--red); box-shadow: 0 0 10px var(--red); }
.mnav button.on svg { color: var(--gold); }
:root[data-theme="light"] .mnav button.on svg { color: var(--red); }
/* подсказка новичку: разделы приложения внизу */
.navhint {
  position: fixed; left: 16px; right: 16px; z-index: 31; padding: 13px 16px; border-radius: 14px; text-align: center;
  background: var(--gold); color: var(--gold-ink); font-size: 17px; font-weight: 800; box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.navhint i {
  position: absolute; top: 100%; width: 0; height: 0; margin: 2px 0 0 -13px;
  border: 13px solid transparent; border-bottom: 0; border-top: 15px solid var(--gold); animation: hintdrop .8s ease-in-out infinite;
}
.mnav button.pulse { color: var(--text); animation: hintglow .8s ease-in-out infinite; }
.navhint.fall { animation: hintfall 1.4s linear both; }
@keyframes hintfall {
  0% { transform: translateY(var(--fall)); animation-timing-function: cubic-bezier(.5, 0, .95, .6); }
  86% { transform: translateY(0); animation-timing-function: ease-out; }
  93% { transform: translateY(-10px); animation-timing-function: ease-in; }
  100% { transform: translateY(0); }
}
@keyframes hintdrop { 50% { transform: translateY(7px); } }
@keyframes hintglow { 50% { background: var(--gold); color: var(--gold-ink); } }
@media (prefers-reduced-motion: reduce) { .navhint.fall, .navhint i, .mnav button.pulse { animation: none; } .mnav button.pulse { background: var(--gold); color: var(--gold-ink); } }
@media (min-width: 900px) { .navhint { display: none; } }
main { padding-bottom: calc(96px + var(--safe-b)); }
.toast { bottom: calc(86px + var(--safe-b)); }
@media (min-width: 900px) {
  /* на широком экране меню уходит наверх, в середину шапки */
  .mnav { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); z-index: 25; padding: 9px 0 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mnav button, .mnav a { flex-direction: row; gap: 8px; max-width: none; padding: 10px 18px; font-size: 15px; }
  .mnav button.on::before { top: auto; bottom: -6px; left: 14px; right: 14px; }
  main { padding-bottom: 40px; }
  .toast { bottom: 24px; }
}

/* ---------- игры и рейтинг ---------- */
.sec { animation: rise .35s var(--ease) both; }
.sechead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 2px 14px; flex-wrap: wrap; }
.sechead h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sechead span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.wallet { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 15px; }
.wallet small { font-weight: 700; font-size: 12.5px; opacity: .8; }
.gates { max-width: 440px; margin: 0 auto; text-align: center; padding: 40px 12px; }
.gates h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.gates p { margin: 0 0 20px; color: var(--muted); }
.gamegrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .gamegrid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.gcard {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px; text-align: left; color: inherit;
  background: var(--surface); cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
  transition: transform .25s var(--ease), background .25s;
}
@media (hover: hover) { .gcard:hover { transform: translateY(-3px); background: var(--surface2); } }
.gcard:active { transform: scale(.985); }
.gcard.soon { cursor: default; opacity: .6; }
@media (hover: hover) { .gcard.soon:hover { transform: none; background: var(--surface); } }
.gcard .gico { width: 52px; height: 52px; display: grid; place-items: center; background: var(--gold); color: #000; }
.gcard .gico svg { width: 28px; height: 28px; }
.gcard h3 { margin: 6px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.gcard p { margin: 0; color: var(--muted); font-size: 14px; }
.gcard .gline { height: 4px; margin-top: 6px; background: linear-gradient(90deg, var(--red), var(--orange)); box-shadow: 0 0 14px rgba(229, 37, 45, .7); }
.gcard .gmeta { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--text); }

.melody { max-width: 720px; margin: 0 auto; }
.gback { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 12px; padding: 8px 14px 8px 8px; border-radius: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.stage { position: relative; padding: 22px 18px 20px; background: var(--surface); text-align: center;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); margin-bottom: 14px; }
.stage .state { font-size: 20px; font-weight: 800; letter-spacing: -.015em; min-height: 28px; }
.stage .sub { margin-top: 4px; color: var(--muted); font-size: 14.5px; min-height: 22px; }
.stage .big { font-size: 54px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 6px 0 0; color: var(--gold); letter-spacing: -.03em; }
:root[data-theme="light"] .stage .big { color: var(--red); }
.bars { height: 6px; background: var(--surface2); margin: 14px 0 0; overflow: hidden; }
.bars i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--orange)); }
.playbtn { width: 96px; height: 96px; margin: 8px auto 4px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 10px 30px -8px rgba(229, 37, 45, .8); transition: transform .15s var(--ease), background .2s; }
@media (hover: hover) { .playbtn:hover { background: var(--red-hi); } }
.playbtn:active { transform: scale(.93); }
.playbtn svg { width: 40px; height: 40px; fill: currentColor; stroke: none; margin-left: 5px; }
.spin { width: 44px; height: 44px; margin: 10px auto; border-radius: 50%; border: 4px solid var(--surface2); border-top-color: var(--red); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: stretch; width: 100%; text-align: left; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.opt .n { flex: none; width: 44px; display: grid; place-items: center; background: var(--gold); color: #000; font-weight: 800; font-size: 18px; }
.opt .t { flex: 1; min-width: 0; padding: 12px 14px; font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
@media (hover: hover) { .opt:not(:disabled):hover { background: var(--surface2); } }
.opt:not(:disabled):active { transform: scale(.985); }
.opt:disabled { cursor: default; opacity: .5; }
.opt.right { opacity: 1 !important; background: #1f6b35; color: #fff; box-shadow: none; }
.opt.wrong { opacity: 1 !important; background: #8c1c22; color: #fff; box-shadow: none; }
.opt.right .n, .opt.wrong .n { background: #fff; }
.verdict { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.verdict.ok { color: #2fbf5b; }
.verdict.bad { color: var(--red-hi); }
.gact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; justify-content: center; }
.gact .btn { flex: 1 1 200px; }

.rank { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 720px; }   /* без minmax(0,..) колонка растёт по самому длинному имени и строки уходят за край */
.rank li { min-width: 0; position: relative; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 0; min-height: 52px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rank .pl { flex: none; width: 44px; align-self: stretch; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: color-mix(in srgb, var(--text) 16%, var(--surface)); color: var(--text); font-variant-numeric: tabular-nums; }
.rank li:nth-child(-n+3) .pl { background: var(--gold); color: #000; }
.rank .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .pt { flex: none; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.rank li.me { box-shadow: inset 0 0 0 1px var(--line); }
.rank li.me::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--gold); pointer-events: none; }
.rank li.me .nm b::after { content: " (вы)"; color: var(--muted); font-weight: 600; }

/* ---------- монета БКЛка и кошелёк ---------- */
.coin { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; background: url(assets/coin.png) center / 20px 20px no-repeat; image-rendering: pixelated; flex: none; }
.big .coin { width: 40px; height: 40px; background-size: 40px 40px; vertical-align: -6px; }
.coinfly { position: fixed; left: 0; top: 0; z-index: 70; width: 24px; height: 24px; pointer-events: none; background: url(assets/coin_spin.png) 0 0 / 288px 24px no-repeat; image-rendering: pixelated; animation: coinspin .6s steps(12) infinite; opacity: 0; }
@keyframes coinspin { to { background-position: -288px 0; } }
.whdr { margin-left: auto; margin-right: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; max-width: 58vw; }
.whdr .wn { min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.whdr .wc { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.whdr .wv { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.whdr.flash { animation: wflash .5s ease-out; }
@keyframes wflash { 0% { background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 210, 0, .8); color: var(--gold-ink); } 100% { box-shadow: 0 0 0 12px rgba(255, 210, 0, 0); } }
@media (max-width: 380px) { .whdr .wn { display: none; } }
@media (min-width: 900px) { .whdr { margin-right: 10px; } .whdr .wn { max-width: 180px; } }
.rank .pt { display: inline-flex; align-items: center; gap: 6px; }
.word { white-space: nowrap; }
.brand { flex: none; }
@media (max-width: 460px) {
  .word { font-size: 19px; }
  .brand { gap: 7px; }
  .whdr { padding: 0 9px; gap: 6px; margin-right: 2px; min-width: 0; }
  .whdr .wn { max-width: 56px; }
  .ib { width: 38px; }
}

/* ---------- раунд: выбор подборки, серия, громкость, таблички ---------- */
.sechead .streak { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; font-size: 14px; }
.streak .dots { display: inline-flex; gap: 4px; }
.streak .dots i { width: 12px; height: 12px; border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.streak .dots i.on { background: var(--gold); box-shadow: none; }
.picker { margin-bottom: 12px; }
.picker.hide { display: none; }
.picker .ptitle { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 2px 6px; }
.picker .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.picker .chips + .ptitle { margin-top: 10px; }
.picker .chips::-webkit-scrollbar { display: none; }
.picker.locked .chips { opacity: .5; pointer-events: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.chip.on { background: var(--gold); color: var(--gold-ink); box-shadow: none; }
.vol { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 6px 14px; min-height: 56px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.vol .vi { flex: none; display: grid; place-items: center; color: var(--muted); }
.vol .vi svg { width: 24px; height: 24px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; }
.vol .vp { flex: none; width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.vol input[type=range] { flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.vol input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--orange)); }
.vol input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--orange)); }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.vol input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.opts { perspective: 900px; }
.opt { min-height: 56px; }
.opt.closed:disabled { opacity: 1; }
.opt.closed .t { color: var(--muted); font-size: 22px; text-align: center; letter-spacing: .3em; background: repeating-linear-gradient(115deg, transparent 0 10px, rgba(255, 255, 255, .05) 10px 11px); }
.opt.picked { box-shadow: inset 0 0 0 2px var(--gold); }
.stage.countdown .big { font-size: 96px; color: var(--text); animation: beat 1s ease-out infinite; }
@keyframes beat { 0% { transform: scale(1.25); opacity: .6; } 40% { transform: scale(1); opacity: 1; } }
.stage .big.low { color: var(--red-hi); }
.practicebar { margin: 0 0 10px; padding: 10px 12px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 16px; text-align: center; }
.practicebar[hidden] { display: none; }
.stage .price { margin-top: 8px; font-weight: 800; font-size: 15px; }
.stage .price.up { color: var(--gold); }
.stage .price.down { color: var(--muted); }
.picker .chips + .chips { margin-top: 8px; }
.stage .bonus { margin-top: 10px; padding: 8px 12px; background: var(--gold); color: var(--gold-ink); font-weight: 800; }
.stage .answer { margin: 12px 0 2px; font-size: 18px; }
.seg { display: flex; gap: 0; max-width: 720px; margin: 0 auto 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.segb { flex: 1; min-height: 44px; font-weight: 800; font-size: 15px; color: var(--muted); }
.segb.on { background: var(--gold); color: var(--gold-ink); }
.rank .nm { display: flex; flex-direction: column; justify-content: center; padding: 6px 0; white-space: normal; }
.rank .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .nm small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .stage.countdown .big { animation: none; } }

/* ---------- раунд на одном экране без прокрутки: высота задаётся из game.js (fit), всё делит остаток ---------- */
#gamesView.playing { --stage-h: clamp(208px, 25dvh, 224px); display: flex; flex-direction: column; padding: 6px 12px 6px; overflow: hidden; }
.playing .sechead { flex: none; flex-wrap: nowrap; gap: 6px; margin: 0 0 6px; min-height: 34px; }
.playing .melody { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.playing .gback { margin: 0; min-height: 34px; padding: 4px 10px 4px 4px; font-size: 13.5px; border-radius: 10px; flex: none; }
.playing .gback svg { width: 18px; height: 18px; }
.playing .gback.stop { padding-left: 8px; background: var(--red); color: #fff; box-shadow: none; }
.playing .gback.stop svg { fill: currentColor; stroke: none; margin-right: 4px; }
.playing .practicebar { flex: none; margin: 0 auto 0 0; padding: 3px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; border-radius: 4px; }
.playing .sechead .streak { margin-left: auto; padding: 4px 9px; gap: 6px; font-size: 12.5px; flex: none; min-width: 124px; justify-content: center; white-space: nowrap; box-sizing: border-box; }
.playing .streak .dots i { width: 9px; height: 9px; }
.playing .picker { flex: none; margin: 0; }
.playing .picker .chips { padding-bottom: 0; }
.playing .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.playing .stage { flex: none; margin: 0; padding: 8px 12px; min-height: 104px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.playing .stage .state { font-size: 17px; min-height: 0; line-height: 1.2; }
.playing .stage .sub { margin: 0; font-size: 12.5px; min-height: 0; line-height: 1.3; }
.playing .stage .big { font-size: 30px; line-height: 1.1; margin: 0; }
.playing .big .coin { width: 24px; height: 24px; background-size: 24px 24px; vertical-align: -3px; }
.playing .stage.countdown .big { font-size: 46px; }
.playing .stage .bars { width: 100%; height: 5px; margin: 4px 0 0; }
.playing .stage .spin { width: 28px; height: 28px; border-width: 3px; margin: 2px auto; }
.playing .stage .verdict { font-size: 20px; }
.playing .stage .srow { display: flex; align-items: center; justify-content: center; gap: 14px; }
.playing .stage .answer { margin: 2px 0 0; font-size: 14.5px; line-height: 1.25; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.playing .stage .price, .playing .stage .bonus { margin: 0; padding: 0; font-size: 12.5px; background: none; color: var(--gold); line-height: 1.3; }
:root[data-theme="light"] .playing .stage .price.up, :root[data-theme="light"] .playing .stage .bonus { color: var(--red); }
.playing .stage .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.prow { display: flex; align-items: center; justify-content: center; gap: 14px; }
.prow2 { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.playing .playbtn { width: 64px; height: 64px; margin: 0; flex: none; }
.playing .playbtn svg { width: 28px; height: 28px; margin-left: 4px; }
.stopbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 14.5px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.stopbtn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stopbtn:active { transform: scale(.95); }
.playing .vol { flex: none; margin: 0; padding: 0 12px; min-height: 36px; gap: 8px; }
.playing .vol .vi svg { width: 20px; height: 20px; }
.playing .vol .vp { width: 38px; font-size: 13px; }
.playing .vol input[type=range] { height: 32px; }
.playing .vol input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8px; }
.playing .opts { flex: 1 1 0; min-height: 0; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 6px; }
.playing .opt { min-height: 0; height: 100%; }
.playing .opt .n { width: 34px; font-size: 16px; }
.playing .opt .t { display: flex; align-items: center; padding: 3px 10px; font-size: clamp(13px, 2.3dvh, 16.5px); line-height: 1.2; overflow: hidden; }
.playing .opt .t, .playing .opt.closed .t { justify-content: flex-start; }
.playing .opt.closed .t { justify-content: center; font-size: 20px; }
@media (min-width: 900px) { #gamesView.playing { max-width: 720px; } }
/* итог игры */
.gates.sum { padding: 28px 12px; }
.gates.sum .sumline { margin: 0 0 10px; color: var(--text); font-size: 16px; }
.gates.sum .sumbig { font-size: 48px; font-weight: 800; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .gates.sum .sumbig { color: var(--red); }
.gates.sum .sumbig .coin { width: 40px; height: 40px; background-size: 40px 40px; vertical-align: -6px; }
.gates.sum .sumwal { margin: 8px 0 18px; }

/* ---------- халява: игры, которые раздают бесплатно, кнопка «Забрать» ---------- */
.fintro { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.45; color: var(--muted); }
.fintro b { color: var(--gold); font-size: 16px; font-weight: 800; }
:root[data-theme="light"] .fintro b { color: var(--red); }
.fgames { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.fgame { display: flex; gap: 12px; align-items: stretch; padding: 8px; border-radius: 12px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.fpic { flex: 0 0 42%; max-width: 190px; min-height: 64px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, var(--red), var(--orange)); cursor: pointer; }
.fpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.finfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: space-between; }
.finfo b { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.finfo > span { font-size: 13px; color: var(--muted); }
.fgo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; padding: 9px 14px; border: 0; border-radius: 10px; font: inherit; font-weight: 800; font-size: 15px; background: var(--gold); color: var(--gold-ink); cursor: pointer; }
.fgo:active { transform: scale(.97); }
.fchip { font-style: normal; font-size: 12.5px; padding: 2px 7px; border-radius: 99px; background: rgba(23, 18, 10, .16); }
.fchip[hidden] { display: none; }
.fnote { font-size: 12.5px; color: var(--muted); font-style: italic; }
.fgames.got .fgo { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 380px) { .fgame { flex-direction: column; } .fpic { flex-basis: auto; max-width: none; aspect-ratio: 460 / 215; } }
@media (prefers-reduced-motion: reduce) { .fgo:active { transform: none; } }
.gcard .gico.gimg { width: 64px; height: 64px; background: none; }
.gcard .gico.gimg img { width: 64px; height: 64px; image-rendering: pixelated; display: block; }

/* ---------- тренировка: валюта BkL Coin (зелёная), своя строка прогресса вместо шапки приложения ---------- */
:root { --bc: #3ddc72; --bc-ink: #04210f; }
:root[data-theme="light"] { --bc: #158a3e; }
.coin.green { background-image: url(assets/coin_green.png); }
body.prac-on #top { display: none !important; }
.streak[hidden] { display: none !important; }
.practicebar { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 6px 10px; text-align: left; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--bc); border-radius: 8px; font-size: 13px; }
.practicebar[hidden] { display: none; }
.practicebar .pc { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--bc); transform-origin: left center; }
.practicebar .pc b { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.practicebar .pc em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.practicebar .pc .coin { width: 24px; height: 24px; background-size: 24px 24px; vertical-align: 0; }
.practicebar .pc.pop { animation: pcpop .5s var(--ease, ease-out); }
@keyframes pcpop { 0% { transform: scale(1); } 30% { transform: scale(1.18); filter: brightness(1.4); } 100% { transform: scale(1); } }
.practicebar .pfly { position: absolute; left: 30px; top: -2px; font-weight: 800; font-size: 15px; color: var(--bc); pointer-events: none; animation: pcfly 1s ease-out forwards; }
@keyframes pcfly { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
.practicebar .pm { display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; line-height: 1.1; }
.practicebar .pm b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.practicebar .pm small { font-size: 10px; font-weight: 700; color: var(--muted); }
.playing .practicebar { flex: none; margin: 0 0 6px; padding: 5px 10px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; border-radius: 8px; }
.stage .bonus.green, .playing .stage .bonus.green { color: var(--bc); background: none; padding: 0; }
.gates.sum.prac .sumbig { color: var(--bc); font-size: 38px; }
.gates.sum.prac .sumbig .coin { width: 32px; height: 32px; background-size: 32px 32px; vertical-align: -5px; }
.pstat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.pcell { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 8px; }
.pcell b { font-size: 22px; font-weight: 800; color: var(--bc); font-variant-numeric: tabular-nums; }
.pcell small { font-size: 12px; font-weight: 700; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .practicebar .pc.pop, .practicebar .pfly { animation: none; } }
body.prac-on .stage .big#resBig { color: var(--bc); }

/* ---------- пауза и меню в раунде ---------- */
body.mel-on .mnav, body.mel-on .navhint { display: none !important; }
.sechead .pausebtn { flex: none; width: 44px; height: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; margin-left: 6px; padding: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.sechead .pausebtn svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
body.prac-on .sechead .pausebtn { margin-left: auto; }
.playing .sechead { min-height: 44px; }
#gamesView.playing { position: relative; }
.pauselayer { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 20px; text-align: center; background: var(--bg); }
.pauselayer .ptitle { font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.pauselayer .psub { margin: 0; max-width: 320px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.pauselayer .pbig { width: min(100%, 300px); min-height: 52px; font-size: 18px; }

/* ---------- карточка раунда не меняет размер; фон с полосками ---------- */
#viz { position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; z-index: 0; pointer-events: none; opacity: .5; }
:root[data-theme="light"] #viz { opacity: .38; }
.playing .sechead, .playing .melody, .playing .practicebar { position: relative; z-index: 1; }
.playing .stage { height: var(--stage-h); min-height: var(--stage-h); box-sizing: border-box; overflow: hidden; background: color-mix(in srgb, var(--surface) 94%, transparent); }
.playing .stage .state:empty, .playing .stage .sub:empty { display: none; }
.playing .stage .big { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 112px; height: 48px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.playing .stage.countdown .big { font-size: 44px; height: 48px; }
.playing .stage .big .coin { flex: none; width: 28px; height: 28px; background-size: 28px 28px; vertical-align: 0; }
.playing .stage .answer { margin: 4px 0 0; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.playing .stage .srow { min-height: 48px; }
@media (prefers-reduced-motion: reduce) { #viz { opacity: .2; } }
body.prac-on .stage:not(.countdown) .big:not(.low) { color: var(--bc); }
.playing .opt, .playing .vol { background: color-mix(in srgb, var(--surface) 93%, transparent); }
.playing .opt.right { background: #1f6b35; }
.playing .opt.wrong { background: #8c1c22; }
.playing .gback.stop span { color: #fff; }
:root[data-theme="light"] .gates.sum.prac .sumbig { color: var(--bc); }
.chip:disabled { opacity: .3; cursor: default; }
/* стартовый экран компактно: выбор, ряд Play, табличек до первого Play нет */
.playing .picker .chips { gap: 6px; }
.playing .picker .chips + .ptitle { margin-top: 6px; }
.playing .picker .ptitle { margin-bottom: 4px; }
.playing .chip { min-height: 32px; padding: 0 10px; font-size: 13px; }
.playing .opts.pre { display: none; }
.rules-btn.rules-top { flex: none; margin: 0; padding: 0; width: 34px; min-height: 34px; height: 34px; justify-content: center; border-radius: 10px; gap: 0; }
.duelbtn { min-height: 40px; font-size: 13.5px; }
.playing .stage.lim { height: auto; min-height: 138px; overflow: visible; }
.playing .stage.lim .prow2 { gap: 6px; }

/* ---------- меню «Угадай мелодию» (showMenu): большие плитки с неоном ---------- */
#gamesView.mmenu { position: relative; overflow: hidden; }
#gamesView.mmenu > :not(.fxnotes) { position: relative; z-index: 1; }
.mtop { margin: 2px 0 4px; }
.mtitle { margin: 0 2px 10px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mtile {
  --c: #4fc3ff; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px;
  min-height: 98px; padding: 10px 14px; border: 0; text-align: left; color: var(--text); font: inherit; cursor: pointer;
  background: var(--surface); border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, transparent), 0 0 18px -8px var(--c);
  transition: transform .15s var(--ease, ease), box-shadow .2s;
}
.mtile:active { transform: scale(.97); }
.mtile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mtile .mic { position: absolute; top: 10px; left: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
.mtile .mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mtile.main .mic svg { fill: currentColor; stroke: none; }
.mtile .mt { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.mtile .ms { font-size: 13.5px; font-weight: 700; color: var(--muted); min-height: 1.2em; }
.mtile.main { --c: #ff3b45; grid-column: 1 / -1; justify-content: center; min-height: 88px; background: linear-gradient(120deg, color-mix(in srgb, #e5252d 38%, var(--surface)), var(--surface) 70%); }
.mtile.main .mic { top: 50%; margin-top: -24px; width: 48px; height: 48px; background: #e5252d; color: #fff; box-shadow: 0 0 22px rgba(229, 37, 45, .65); }
.mtile.main .mic svg { width: 26px; height: 26px; }
.mtile.main .mt { font-size: 24px; margin-left: 62px; }
.mtile.main .ms { margin-left: 62px; color: var(--text); }
.mtile.wide { grid-column: 1 / -1; min-height: 66px; justify-content: center; }
.mtile.wide .mic { top: 50%; margin-top: -19px; }
.mtile.wide .mt, .mtile.wide .ms { margin-left: 52px; }
.t-train { --c: #3ecf6a; } .t-duel { --c: #4fc3ff; } .t-race { --c: #ffd200; } .t-chal { --c: #ff4fd8; } .t-songs { --c: #ff7a59; } .t-know { --c: #b388ff; }
:root[data-theme="light"] .mtile { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent), 0 6px 16px -10px color-mix(in srgb, var(--c) 70%, #000); }
:root[data-theme="light"] .mtile.main { background: linear-gradient(120deg, #ffe2e3, var(--surface) 70%); }
:root[data-theme="light"] .t-race { --c: #d99200; }
@media (prefers-reduced-motion: no-preference) {
  .mtile { animation: tilein .45s var(--ease, ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes tilein { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
}
.mtile.dim { opacity: .55; }

/* тег сообщества в общей таблице мелодии: пиксельный SVG перед именем (одинаковый в обоих приложениях и обеих темах) */
.lbb { display: inline-block; vertical-align: middle; margin-right: 7px; line-height: 0; }
.lbb svg { display: block; width: 54px; height: 18px; image-rendering: pixelated; }
.nmrow { display: flex; align-items: center; min-width: 0; }
.nmrow b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nmrow .lbb { flex: none; }
.lbadge { flex: none; margin-left: 5px; font-size: 14px; line-height: 1; }

/* уровень сложности: переключатель и обложки у вариантов */
.picker .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.picker .segb { min-height: 40px; padding: 0 10px; font-weight: 800; font-size: 15px; background: var(--surface); color: var(--muted); border: 0; }
.picker .segb.on { background: var(--gold); color: var(--gold-ink); }
.picker .lvhint { margin: 6px 2px 10px; font-size: 13.5px; color: var(--muted); }
.picker.locked .seg { opacity: .5; pointer-events: none; }
.opt .cover { align-self: center; flex: none; width: 44px; height: 44px; margin: 0 0 0 6px; }
.playing .opt .cover { width: 44px; height: 44px; }
.stage .lvres { color: var(--muted); }

/* ---------- итог раунда: плотно, без обрезки; «В избранное» в верхнем ряду ---------- */
.favslot { flex: none; width: 92px; height: 44px; margin-left: 6px; }   /* ширина фиксирована: ряд не прыгает, место держится и пустым */
.favslot .ms-favtop { box-sizing: border-box; width: 92px; height: 44px; min-height: 44px; margin: 0; padding: 0 2px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10px; font-weight: 700; line-height: 1.15; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); white-space: nowrap; overflow: hidden; }
.sechead .favslot .ms-favtop span { font-size: inherit; font-weight: inherit; color: inherit; display: block; max-width: 100%; overflow: hidden; text-overflow: clip; }
.favslot .ms-favtop.on { color: var(--red-hi, #e5323b); }
.favslot .ms-favtop:disabled { opacity: 1; }
.playing .sechead .streak { flex: 1 1 0; min-width: 0; padding: 4px 1px; gap: 3px; font-size: 11px; overflow: hidden; }
.playing .stage .bigcol { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.playing .stage .bigcol .rline { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.2; text-align: center; }
.playing .stage .bigcol .big { min-width: 0; height: 36px; }
.playing .stage .srow { min-height: 0; }
.playing .stage { justify-content: flex-start; }
.playing .sechead { gap: 3px; }
.playing .sechead .gback.stop { padding-right: 8px; }
.playing .sechead .pausebtn, .playing .sechead .favslot { margin-left: 0; }
/* самый плотный итог (десятилетие, серия, уровень, «Дослушать», длинное «Короткое замыкание!») на 360x640 */
#gamesView.playing { --stage-h: clamp(220px, 27dvh, 240px); }
.playing .stage .aplate { margin: 2px 0 0; gap: 8px; }
.playing .stage .aplate .cover { width: 38px; height: 38px; }
.playing .stage .srow { gap: 8px; }
.playing .stage .srow .state { font-size: 17px; line-height: 1.1; }
.playing .stage .br-listen .btn, .playing .stage .br-listen button { min-height: 34px; padding: 0 14px; }
.playing .stage .br-listen { margin: 2px 0 0; }
.playing .stage .price, .playing .stage .bonus, .playing .stage .sub, .playing .stage .rline { line-height: 1.15; font-size: 12px; }

/* верхний ряд раунда: Стоп, «?», избранное, пауза одной высоты 44 на одной линии; слот избранного тянется между «?» и паузой, отступы равные */
.playing .sechead { align-items: center; gap: 4px; }
.playing .sechead .gback.stop, .playing .sechead .rules-btn.rules-top, .playing .sechead .pausebtn, .playing .sechead .favslot, .playing .sechead .favslot .ms-favtop { box-sizing: border-box; height: 44px; min-height: 44px; margin-top: 0; margin-bottom: 0; align-self: center; }
.playing .sechead .gback.stop { padding-top: 0; padding-bottom: 0; }
.playing .sechead .favslot { flex: 1 1 92px; width: auto; min-width: 92px; max-width: 150px; margin-left: 0; margin-right: 0; display: flex; }
.playing .sechead .streak { flex: 1 1 56px; min-width: 56px; font-size: 10.5px; padding: 0 2px; box-sizing: border-box; height: 44px; min-height: 44px; align-self: center; align-items: center; justify-content: center; border-radius: 10px; line-height: 1.2; }
.playing .sechead .favslot .ms-favtop { width: 100%; padding: 4px 4px; font-size: 10.5px; letter-spacing: -.01em; line-height: 1.2; gap: 2px; }
.playing .sechead .rules-btn.rules-top, .playing .sechead .pausebtn { width: 40px; }

/* ---------- карточка результата (вариант B): размытая обложка на фоне, чёткая слева, справа очки, название, серия, мелкая строка ---------- */
.playing .stage.rcard { display: block; padding: 0; text-align: left; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--red) 70%, #000), color-mix(in srgb, var(--gold) 55%, #000)); }   /* без обложки: фирменный градиент */
.rcard .rc-bg { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity .35s ease; }
.rcard .rc-bg.has { opacity: 1; }
.rcard .rc-bg::before { content: ""; position: absolute; inset: -32px; background: var(--rc-img) center / cover no-repeat; filter: blur(18px) saturate(1.2); }
.rcard.miss .rc-bg::before { filter: blur(18px) saturate(.55); }
.rcard .rc-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 12, 30, .6), rgba(8, 12, 30, .8)); }
.rcard.inv-gold::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px #ffc61a; pointer-events: none; }
.rcard .state.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rcard .rc-in { position: relative; display: flex; align-items: center; gap: 12px; height: 100%; box-sizing: border-box; padding: 12px; }
.rcard .aplate { flex: none; margin: 0; width: min(46%, calc(var(--stage-h) - 24px)); aspect-ratio: 1 / 1; }
.playing .stage.rcard .aplate .cover { width: 100%; height: 100%; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 80%, #000), color-mix(in srgb, var(--gold) 70%, #000)); color: rgba(255, 255, 255, .85);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .6); }
.rcard .aplate .cover svg { width: 42%; height: 42%; }
.rcard .rc-info { flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 2px 0; }
.playing .stage.rcard .big { min-width: 0; height: auto; justify-content: flex-start; gap: 6px; margin: 0; font-size: 36px; line-height: 1; color: #fff !important; }
.playing .stage.rcard .big[hidden] { display: none; }
.playing .stage.rcard .big .coin { width: 28px; height: 28px; background-size: 28px 28px; }
.rcard .rc-tt { font-size: 14px; line-height: 1.18; font-weight: 700; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }
.rcard .rc-tt b { font-weight: 800; }
.rcard .rc-ser { display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; box-sizing: border-box; padding: 0 10px; border-radius: 14px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.rcard .rc-mt { font-size: 11.5px; line-height: 1.25; font-weight: 600; color: rgba(255, 255, 255, .82); overflow-wrap: anywhere; }
.rcard .rc-mt:empty { display: none; }
.rcard:not(.miss) .rc-info { justify-content: space-between; }
.rcard.miss .rc-info { justify-content: center; gap: 10px; }
.playing .stage.rcard .ms-savebtn { display: none; }   /* избранное живёт в верхнем ряду */
@media (prefers-reduced-motion: no-preference) {
  .rcard .aplate .cover { animation: rcin .35s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes rcin { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
}

/* ---------- карточка результата светится, под отсчётом тускнеет и затухает ---------- */
.rcard { --gl-c: var(--gold); }
.rcard.miss { --gl-c: var(--red-hi); }
.rcard .rc-glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gl-c) 92%, #fff), inset 0 0 28px 3px color-mix(in srgb, var(--gl-c) 55%, transparent); }
.rcard .rc-glow::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent); transform: skewX(-18deg); }
.playing .stage.rcard .aplate .cover, .playing .stage .rc-ghost .aplate .cover {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gl-c) 75%, transparent), 0 0 24px 2px color-mix(in srgb, var(--gl-c) 55%, transparent), 0 10px 24px -6px rgba(0, 0, 0, .6); }
@media (prefers-reduced-motion: no-preference) {
  .rcard .rc-glow { animation: rcglow 1.7s ease-in-out infinite alternate; }
  .rcard .rc-glow::after { animation: rcsheen 1.2s .15s ease-out 1 both; }
  @keyframes rcglow { from { opacity: .55; } to { opacity: 1; } }
  @keyframes rcsheen { 0% { opacity: 0; transform: translateX(0) skewX(-18deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(520%) skewX(-18deg); } }
}

/* карточка прошлой песни под отсчётом: тускнеет в начале отсчёта, затухает за время ответа */
.playing .stage > .rc-ghost { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; text-align: left; color: #fff; opacity: 1; transition: opacity .5s ease, filter .5s ease;
  background: linear-gradient(135deg, color-mix(in srgb, var(--red) 70%, #000), color-mix(in srgb, var(--gold) 55%, #000)); }
.playing .stage > .rc-ghost.dim { opacity: .62; filter: blur(1px); }
.rc-ghost.dim .rc-pts { opacity: 0; transition: opacity .4s ease; }
.playing .stage .rc-ghost .aplate { margin: 0; gap: 0; animation: none; }
.playing .stage .rc-ghost .aplate .cover { width: 100%; height: 100%; border-radius: 14px; animation: none; color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, color-mix(in srgb, var(--red) 80%, #000), color-mix(in srgb, var(--gold) 70%, #000)); }
.rc-ghost .rc-glow::after { animation: none; }
.rc-ghost .rc-pts { display: inline-flex; align-items: center; gap: 6px; font-size: 36px; line-height: 1; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.rc-ghost .rc-pts[hidden] { display: none; }
.rc-ghost .rc-pts .coin { width: 28px; height: 28px; background-size: 28px 28px; vertical-align: 0; }

/* отсчёт: цифры по центру карточки, поверх неё */
.playing .stage.cdv.countdown .big { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; width: auto; min-width: 0; height: auto; margin: 0;
  font-weight: 800; letter-spacing: -.03em; color: #fff; pointer-events: none; }
.playing .stage.cdv.countdown .bars { visibility: hidden; }
.stage.cdv { --a: #ffd200; --b: #ff4a50; --h: #e5252d; }
.stage.cdv .cdfx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.stage.cdv .cdfx.go { animation: cdout .45s .2s ease forwards; }
@keyframes cdout { to { opacity: 0; } }

/* 2. Неон в такт: крупные светящиеся цифры, на каждую секунду вспышка, ударные кольца и световые полосы */
.playing .stage.cdv2.countdown .big { font-size: 112px; text-shadow: 0 0 3px #fff, 0 0 14px var(--a), 0 0 34px var(--a), 0 0 66px var(--h); }
.stage.cdv2 .cdfx2 { background: radial-gradient(ellipse 64% 82% at 50% 50%, rgba(3, 6, 18, .76), rgba(3, 6, 18, .36) 60%, rgba(3, 6, 18, .18) 100%); }
.cdfx2 .nb-halo { position: absolute; left: 50%; top: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%; opacity: .4;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--h) 62%, transparent), color-mix(in srgb, var(--a) 16%, transparent) 58%, transparent); }
.cdfx2 .nb-ring { position: absolute; left: 50%; top: 50%; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; box-sizing: border-box; opacity: 0;
  border: 3px solid var(--a); box-shadow: 0 0 18px var(--a), inset 0 0 14px color-mix(in srgb, var(--a) 70%, transparent); }
.cdfx2 .nb-ring.b { border-color: var(--b); box-shadow: 0 0 18px var(--b), inset 0 0 14px color-mix(in srgb, var(--b) 70%, transparent); }
.cdfx2 .nb-line { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; width: calc(50% - 92px); opacity: 0; border-radius: 2px; }
.cdfx2 .nb-line.l { left: 0; transform-origin: 100% 50%; background: linear-gradient(90deg, transparent, var(--a)); box-shadow: 0 0 12px var(--a); }
.cdfx2 .nb-line.r { right: 0; transform-origin: 0 50%; background: linear-gradient(270deg, transparent, var(--a)); box-shadow: 0 0 12px var(--a); }
@media (prefers-reduced-motion: no-preference) {
  .cdfx2.go .nb-ring { animation: nbgo .6s ease-out forwards; }
  .cdfx2.go .nb-ring.b { animation-delay: .09s; }
  .cdfx2.go .nb-halo { animation: nbhalo .5s ease-out forwards; }
  @keyframes nbgo { from { transform: scale(.6); opacity: .95; } to { transform: scale(2.5); opacity: 0; } }
  @keyframes nbhalo { from { transform: scale(1); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
}

/* загрузка следующей песни поверх карточки: карточка остаётся, виден только мягкий кружок */
.rcard .rc-veil { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(3, 6, 18, .42); animation: rcveil .3s ease both; }
.rcard .rc-veil .spin { margin: 0; }
@keyframes rcveil { from { opacity: 0; } to { opacity: 1; } }

/* BkL: заголовок плитки в две строки не лезет под иконку: сверху место под иконку, на узких экранах шрифт меньше */
html:not([data-brand="electro"]) .mtile:not(.main):not(.wide) { padding-top: 54px; }
@media (max-width: 380px) { html:not([data-brand="electro"]) .mtile .mt { font-size: clamp(15px, 5vw, 18px); } }
/* «!» «Что-то не так с вариантом?» (wrong.js, Ритм 1.28): справа на каждой табличке, всегда не ответ. Зона касания 44 px на всю высоту таблички, у самого края; под неё место в строке зарезервировано
   (.hasw .t), поэтому текст варианта под значком не лежит. Закрашенный = отмечено. Без теней и анимаций, поэтому лёгкий режим (html.lite) выглядит так же. */
.opt { position: relative; }
.wmark { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; font-size: 0; }
.wmark::before { content: "!"; box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 800 14px/1 system-ui, sans-serif; color: var(--muted); border: 2px solid var(--muted); background: transparent; }
.wmark.on::before { color: var(--gold-ink, #17120a); background: var(--gold); border-color: var(--gold); }
.opt.right .wmark::before, .opt.wrong .wmark::before { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .85); }
.opt.right .wmark.on::before, .opt.wrong .wmark.on::before { color: var(--gold-ink, #17120a); background: var(--gold); border-color: var(--gold); }
.wmark:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.opt.hasw .t, .playing .opt.hasw .t { padding-right: 48px; }
.wmark.wrow { position: relative; flex: none; width: 44px; height: 44px; }   /* «!» в строке списка песен (избранное, недавние): в потоке, а не поверх текста */
.opts.hw { position: relative; }
.whint { position: absolute; z-index: 6; right: 6px; bottom: calc(100% + 10px); max-width: min(260px, calc(100% - 20px)); padding: 9px 12px; border-radius: 12px; background: var(--gold); color: var(--gold-ink, #17120a); font: 700 13.5px/1.3 system-ui, sans-serif; text-align: left; cursor: pointer; }
.whint::after { content: ""; position: absolute; right: 16px; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
/* Облегчённый режим для слабых телефонов (html.lite ставит game.js: reduced motion или кадр дольше 50 мс).
   Цвета и вёрстка брендов не трогаем, гасим только дорогое: тени, свечение, размытие, частицы и фоновые анимации. */
html.lite :not(.rc-bg) { box-shadow: none !important; text-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; }
html.lite .cdfx, html.lite .tmfx .tm-bg, html.lite .pfly, html.lite .rc-glow { display: none !important; }
html.lite #viz { display: none; }
html.lite .stage *, html.lite .opt, html.lite .opt * { animation-iteration-count: 1 !important; }
html.lite .stage.tmr .big, html.lite .stage.tmr .tmfx, html.lite .stage.tmr .tmfx *, .stage.tmr.calm .big, .stage.tmr.calm .tmfx, .stage.tmr.calm .tmfx * { transition: none !important; }

/* украшения ника (куплены в магазине, видны во всех ботах): цвет читается на тёмной и светлой теме, рамка рисуется стилем бота. B.paintNick в game.js */
.nk.nk-yellow { color: #ffc61a !important; } .nk.nk-cyan { color: #27e3ff !important; } .nk.nk-pink { color: #ff6bd5 !important; } .nk.nk-green { color: #46e08a !important; } .nk.nk-violet { color: #b57bff !important; }
:root[data-theme="light"] .nk.nk-yellow { color: #b8860b !important; } :root[data-theme="light"] .nk.nk-cyan { color: #0b8fa8 !important; } :root[data-theme="light"] .nk.nk-pink { color: #d1338a !important; }
:root[data-theme="light"] .nk.nk-green { color: #13904f !important; } :root[data-theme="light"] .nk.nk-violet { color: #7b3fd6 !important; }
.nk.nk-fr { box-shadow: 0 0 0 1px currentColor; border-radius: 5px; padding: 0 4px !important; }
:root[data-brand="electro"] .nk.nk-fr { border-radius: 2px; box-shadow: 0 0 0 1px currentColor, 2px 2px 0 currentColor; margin-right: 2px; }   /* Ритм: пиксельная рамка со ступенькой */
.nk .lbadge { margin-left: 4px; }
