/* Занос — стили витрины. Графит, электрик-синий, зелёная кнопка. */
:root {
  --bg: #0f1115;
  --side: #15181e;
  --panel: #1c2029;
  --panel2: #242935;
  --border: rgba(42, 48, 60, .9);
  --text: #f2f4f8;
  --muted: #8b93a5;
  --accent: #5b7cff;
  --cta: #2fbf5f;
  --cta-text: #08130c;
  --r: 12px;
  --rp: 999px;
  --fd: 'Unbounded', 'Arial Black', sans-serif;
  --fb: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --fh: 'Manrope', sans-serif;
  --sidebar-w: 250px;
  --tile-w: 128px;
  --tile-h: 170px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(900px 420px at 60% -10%, rgba(91,124,255,.14), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--fb);
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #8aa0ff; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- каркас ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px 16px;
  background: var(--side); border-right: 1px solid var(--border);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 26px; padding: 0 28px 32px; }
.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 20px; height: 64px; margin: 0 -28px; padding: 0 28px;
  background: transparent;
}
.topbar__tabs { display: flex; gap: 6px; }
.topbar__spacer { flex: 1; }
.topbar__auth { display: flex; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--fd); font-weight: 800; font-size: 22px; letter-spacing: .02em; line-height: 1; }
.logo svg { flex: none; }
.logo--small { font-size: 18px; }
.logo--small svg { width: 22px; height: 22px; }
.logo:hover { color: var(--text); }

/* пилюли-табы */
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--rp); background: var(--panel); color: var(--text);
  font-weight: 700; font-size: 14px; white-space: nowrap; border: 0;
}
.tab:hover { background: var(--panel2); color: var(--text); }
.tab.is-active { background: var(--accent); color: #fff; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 0;
  font-family: var(--fb); font-weight: 800; font-size: 14px; white-space: nowrap;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--cta); color: var(--cta-text); box-shadow: 0 6px 18px rgba(47,191,95,.3); }
.btn--cta:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: #2c3240; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--lg { height: 46px; padding: 0 24px; font-size: 15px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn--icon { width: 40px; padding: 0; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- сайдбар ---------- */
.side-user { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 10px; border-radius: var(--r); background: var(--panel); border: 0; width: 100%; text-align: left; }
.side-user__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.side-user__label { flex: 1; font-weight: 700; }
.side-promo {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-radius: var(--r);
  background: linear-gradient(90deg, var(--panel2), var(--panel)); color: var(--text); border: 0; width: 100%; text-align: left;
}
.side-promo__icon { color: var(--accent); display: flex; }
.side-promo__title { font-size: 13px; font-weight: 700; }
.side-promo__sub { font-size: 11px; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.side-link {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r);
  color: var(--text); font-weight: 600; font-size: 14px; border: 0; background: transparent; width: 100%; text-align: left;
}
.side-link:hover { background: var(--panel); color: var(--text); }
.side-link.is-active { background: var(--panel); }
.side-link__icon { color: var(--muted); display: flex; }
.side-link__label { flex: 1; }
.side-link__badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: #e0323c; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.side-link__chev { color: var(--muted); display: flex; }
.side-sep { height: 0; border-top: 1px solid var(--border); margin: 8px 4px; }
.side-grow { flex: 1; }
.side-app { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--panel); }
.side-app__icon { width: 34px; height: 34px; flex: none; border-radius: var(--r); background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.side-app__title { font-size: 12px; font-weight: 700; }
.side-app__sub { font-size: 11px; color: var(--muted); }
.side-social { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.side-social__btn { width: 32px; height: 32px; border-radius: var(--r); background: var(--panel); border: 0; display: flex; align-items: center; justify-content: center; color: var(--text); flex: none; }
.side-social__spacer { flex: 1; }
.side-lang { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--r); background: var(--panel); font-size: 12px; font-weight: 700; border: 0; color: var(--text); }
.flag-ru { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(180deg, #fff 33%, #2a5bd7 33% 66%, #d52b1e 66%); }
.side-support { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: var(--r); background: var(--panel); font-size: 13px; font-weight: 700; border: 0; width: 100%; color: var(--text); }
.side-support__label { flex: 1; text-align: left; }
.pill { padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }
/* крестик шторки: виден только в режиме шторки (≤1240), стоит справа от кнопки «Вход» */
.side-close { display: none; position: absolute; top: 14px; right: 12px; width: 40px; height: 48px; border: 0; border-radius: var(--r); background: var(--panel); color: var(--text); align-items: center; justify-content: center; z-index: 1; }
.side-close:hover { background: var(--panel2); }

/* ---------- хиро ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; height: 340px; min-width: 0; }
.banner { position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--border); } /* не clip: в мобильном Chrome clip распирает вьюпорт слайдами */
.banner__track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.slide { position: relative; flex: none; width: 100%; height: 100%; }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.slide__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,17,21,.96) 0%, rgba(15,17,21,.78) 42%, rgba(15,17,21,.08) 100%); }
.slide__body { position: relative; height: 100%; padding: 26px 32px; display: flex; flex-direction: column; justify-content: space-between; }
.slide__text { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.kicker { align-self: flex-start; padding: 6px 12px; border-radius: var(--rp); background: rgba(47,191,95,.18); border: 1px solid var(--cta); color: #7fe3a0; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.slide__title { font-family: var(--fd); font-weight: 800; font-size: 40px; line-height: 1.02; text-transform: uppercase; margin: 0; }
.slide__title em { font-style: normal; color: var(--accent); }
.slide__sub { font-size: 15px; line-height: 1.45; color: #c3c9d8; max-width: 400px; margin: 0; font-weight: 500; }
.slide__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stamp { display: none; }
.dots { display: flex; gap: 6px; padding: 8px 10px; border-radius: 999px; background: rgba(0,0,0,.35); }
.dots__dot { position: relative; width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.4); border: 0; padding: 0; transition: width .25s ease, background .25s ease; }
.dots__dot::before { content: ""; position: absolute; inset: -9px -3px; } /* зона нажатия 24px при том же виде */
.dots__dot.is-active { width: 16px; background: #fff; }
.banner__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.banner:hover .banner__arrow, .banner__arrow:focus-visible { opacity: 1; }
.banner__arrow--prev { left: 12px; } .banner__arrow--next { right: 12px; }

.promos { display: flex; flex-direction: column; gap: 16px; }
.promo { position: relative; flex: 1; min-height: 120px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); color: #fff; text-align: left; padding: 0; background: var(--panel); }
.promo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; transition: transform .4s ease; }
.promo:hover .promo__img { transform: scale(1.04); }
.promo__shade { position: absolute; inset: 0; }
.promo--car .promo__shade { background: linear-gradient(90deg, #1f2230 30%, rgba(31,34,48,.85) 55%, transparent 100%); }
.promo--gift .promo__shade { background: linear-gradient(90deg, #1d2a3a 30%, rgba(29,42,58,.85) 55%, transparent 100%); }
.promo__body { position: relative; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; max-width: 62%; }
.promo__title { font-family: var(--fd); font-size: 16px; font-weight: 800; }
.promo__sub { font-size: 12px; line-height: 1.4; color: #c3c9d8; font-weight: 500; }

/* ---------- ряды ---------- */
.row { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row__title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; row-gap: 0; }
.row__icon { color: var(--muted); display: flex; }
.row__name { margin: 0; font-family: var(--fd); font-size: 18px; font-weight: 800; white-space: nowrap; }
.row__count { font-size: 12px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.row__ctl { display: flex; align-items: center; gap: 8px; flex: none; }
.row__more { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--rp); background: var(--panel2); color: var(--text); font-size: 13px; font-weight: 700; flex: none; white-space: nowrap; }
.row__more:hover { background: #2c3240; color: var(--text); }
.row__arrow { width: 34px; height: 34px; border-radius: var(--rp); background: var(--panel2); border: 0; display: flex; align-items: center; justify-content: center; color: var(--text); }
.row__arrow:hover { background: #2c3240; }
.row__arrow[disabled] { color: var(--muted); opacity: .6; }
.row--static .row__arrow { display: none; } /* прокручивать нечего — стрелки не нужны */
.track { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline-start: 4px; scroll-behavior: smooth; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 4px; }
.track::-webkit-scrollbar { display: none; }
/* пока ряд не докручен до конца, правый край мягко гаснет — вместо обрезанной полоски следующей плитки */
.track:not(.is-end) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
/* в ряду плитки растут, чтобы 8 штук ложились ровно в ширину; уже 128px не ужимаются — тогда ряд прокручивается */
.track .tile { width: calc((100% - 7 * 12px) / 8); min-width: var(--tile-w); height: auto; aspect-ratio: 128 / 170; }

/* плитка */
.tile {
  position: relative; flex: none; width: var(--tile-w); height: var(--tile-h);
  border-radius: 14px; overflow: hidden; background: var(--panel2); border: 1px solid var(--border);
  scroll-snap-align: start; padding: 0; text-align: left; color: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover, .tile:focus-within { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.45); }
/* вся плитка — прозрачная кнопка «Играть»; кольцо фокуса внутри, потому что overflow:hidden срезает наружное */
.tile__hit { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 14px; background: transparent; color: inherit; }
.tile__hit:focus-visible, .tile__demo:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 68%; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%); mask-image: linear-gradient(180deg, transparent, #000 35%); }
.tile__icon { position: absolute; left: 0; right: 0; bottom: 14%; display: flex; justify-content: center; color: rgba(255,255,255,.92); }
.tile__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 45%); }
.tile__prov { position: absolute; top: 0; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 0 0 8px 8px; background: rgba(0,0,0,.55); font-size: 10px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.tile__title { position: absolute; left: 6px; right: 6px; top: 26px; font-family: var(--fd); font-weight: 800; font-size: 12px; line-height: 1.1; text-transform: uppercase; letter-spacing: 0; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
/* оверлей не ловит клики (они уходят в .tile__hit = «Играть»), кнопка «Демо» внутри — ловит */
.tile__play { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s; pointer-events: none; }
.tile:hover .tile__play, .tile:focus-within .tile__play { opacity: 1; }
.tile__play span { display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 92px; padding: 0 14px; background: var(--cta); color: var(--cta-text); font-weight: 800; font-size: 12px; border-radius: var(--rp); justify-content: center; }
.tile__demo { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 92px; padding: 0 14px; border-radius: var(--rp); border: 1px solid rgba(255,255,255,.4); background: rgba(15,17,21,.55); color: #fff; font-weight: 800; font-size: 12px; pointer-events: auto; }
.tile__demo:hover { background: rgba(15,17,21,.8); }
.tile--live .tile__prov::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e0323c; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px #e0323c; }

/* ---------- турнир и правила ---------- */
.board { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; min-width: 0; }
.card { min-width: 0; border-radius: var(--r); border: 1px solid var(--border); background: var(--side); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card__title { margin: 0; font-family: var(--fd); font-weight: 800; font-size: 17px; }
.card__note { font-size: 12px; color: var(--muted); }
.lb { display: flex; flex-direction: column; }
.lb__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.lb__row:last-child { border-bottom: 1px solid var(--border); }
.lb__pos { width: 26px; color: var(--muted); font-weight: 600; }
.lb__row.is-top .lb__pos { color: var(--accent); }
.lb__name { flex: 1; }
.lb__sum { font-weight: 600; }
.lb__row.is-top .lb__sum { color: var(--accent); }
.card p { margin: 0; font-size: 13px; line-height: 1.6; color: #c3c9d8; }
.sign { display: none; }
.tour { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: var(--r); background: var(--panel); }
.tour__time { flex: 0 0 auto; width: 12ch; min-width: 0; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--fd); font-size: 20px; font-weight: 800; color: var(--accent); }
.tour__text { flex: 1 1 200px; min-width: 0; font-size: 13px; color: #c3c9d8; }

/* ---------- футер ---------- */
/* margin-top:auto прижимает футер к низу на коротких страницах (каталог на 1920); 4-я колонка с плашками шире, чтобы «Android и iOS» не рвалось */
.footer { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.3fr); gap: 20px; font-size: 13px; min-width: 0; }
.footer__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.footer__col a { color: var(--muted); padding: 5px 0; margin: -5px 0; } /* зона нажатия 28px, визуально то же */
.footer__col a:hover { color: var(--text); }
.footer__head { font-weight: 700; }
.footer__note { color: var(--muted); line-height: 1.5; }
.badges { display: flex; gap: 8px; }
.badge { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); font-weight: 700; }
.footer__box { padding: 12px 14px; border-radius: var(--r); background: var(--panel); display: flex; align-items: center; gap: 10px; }
.footer__box svg { color: var(--muted); flex: none; }
.footer__box .t { font-weight: 700; }
.footer__box .s { color: var(--muted); font-size: 12px; }
.footer__box .btn { margin-left: auto; }
.footer__box > span:nth-child(2) { min-width: 0; }

/* ---------- каталог ---------- */
.catalog-head { display: flex; flex-direction: column; gap: 14px; }
.catalog-head h1 { margin: 0; font-family: var(--fd); font-weight: 800; font-size: 24px; }
.catalog-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border); flex: 1; min-width: 220px; max-width: 420px; }
.search input { flex: 1; background: transparent; border: 0; color: var(--text); font: inherit; outline: none; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 36px; padding: 0 14px; border-radius: var(--rp); border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-w), 1fr)); gap: 12px; }
.grid .tile { width: auto; height: auto; aspect-ratio: 3 / 4; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- модалки, тосты, шторка ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s; touch-action: none; }
.drawer-open .overlay { opacity: 1; pointer-events: auto; }
.modal-open, .drawer-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.72); touch-action: none; }
.modal__box { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; background: var(--side); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal__close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: var(--r); border: 0; background: rgba(0,0,0,.4); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; }
.modal__title { margin: 0; font-family: var(--fd); font-weight: 800; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.field input { height: 44px; padding: 0 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border); color: var(--text); font: inherit; outline: none; }
.field input:focus { border-color: var(--accent); }
.modal__hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 60; padding: 12px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- нижний таб-бар ---------- */
.bottombar { display: none; }
.menu-btn { display: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1240px) {
  .sidebar {
    /* top+bottom вместо 100vh: на телефоне 100vh не учитывает адресную строку, и низ шторки уезжал под неё */
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 45; padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .drawer-open .sidebar { transform: none; }
  .side-close { display: flex; }
  .side-user { width: calc(100% - 48px); }
  .side-social__btn { width: 40px; height: 40px; }
  .side-lang { height: 40px; }
  .menu-btn { display: inline-flex; }
  .main { padding: 0 20px 32px; }
  .topbar { margin: 0 -20px; padding: 0 20px; gap: 12px; }
}
@media (max-width: 1000px) {
  .topbar__tabs { display: none; }
  body { padding-bottom: 82px; }
  .bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 82px;
    padding: 0 env(safe-area-inset-right) max(16px, env(safe-area-inset-bottom)) env(safe-area-inset-left); background: var(--side); border-top: 1px solid var(--border);
  }
  .bottombar__item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); border: 0; background: transparent; }
  .bottombar__item.is-active { color: var(--accent); }
  .toast { bottom: 94px; } /* над таб-баром (82px + 12px), а не поверх него */
  .game-open .toast { bottom: calc(24px + env(safe-area-inset-bottom)); } /* игра открыта — таб-бара нет, тост у нижнего края */
  .hero { grid-template-columns: 1fr; height: auto; }
  .banner { height: 300px; }
  .promos { flex-direction: row; }
  .promo { min-height: 110px; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --tile-w: 112px; --tile-h: 150px; }
  .main { padding: 0 max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); gap: 18px; }
  .topbar { margin: 0 calc(-1 * max(16px, env(safe-area-inset-right))) 0 calc(-1 * max(16px, env(safe-area-inset-left))); padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); height: 60px; gap: 10px; }
  .logo { font-size: 18px; }
  .logo svg { width: 24px; height: 24px; }
  .menu-btn { width: 38px; }
  .btn { height: 38px; padding: 0 12px; font-size: 13px; }
  .btn--lg { height: 46px; padding: 0 20px; font-size: 15px; } /* главные CTA не ниже инпутов (44px) */
  .topbar__auth { gap: 6px; }
  .banner { height: 190px; }
  .slide__body { padding: 16px; }
  .slide__title { font-size: 24px; }
  .slide__sub { display: none; }
  .stamp { display: none; }
  .banner__arrow { display: none; }
  .promos { gap: 10px; }
  .promo { min-height: 96px; }
  .promo__body { padding: 12px; }
  .promo__title { font-size: 15px; }
  .promo__sub { font-size: 11px; }
  .row__name { font-size: 18px; }
  .row__arrow { display: none; }
  .row__more { height: 36px; padding: 0 12px; font-size: 12px; }
  /* ряды и чипсы выкатываются до края экрана — видно, что они прокручиваются */
  .track { margin: 0 -16px; padding: 0 16px 4px; scroll-padding-inline-start: 16px; }
  .chips { flex: 0 0 calc(100% + 32px); margin: 0 -16px; padding: 0 16px; }
  .chip { height: 40px; }
  .grid { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .grid .tile__title { font-size: 12px; }
  .card { padding: 16px; }
  .footer { grid-template-columns: 1fr; gap: 16px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal__box { max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: var(--r) var(--r) 0 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .modal__close { width: 40px; height: 40px; }
}
@media (max-width: 420px) {
  .promos { flex-direction: column; }
  .topbar__auth .btn--ghost { padding: 0 12px; }
}
@media (max-width: 370px) {
  /* на 360 кнопка «Регистрация» упиралась в край экрана */
  .topbar { gap: 8px; }
  .topbar__auth .btn { padding: 0 10px; font-size: 12px; }
}
/* альбомный телефон: баннер ниже, чтобы CTA не уезжала под таб-бар */
@media (max-width: 1000px) and (max-height: 500px) {
  .banner { height: 230px; }
  .slide__sub { display: none; }
}
/* на средних ширинах баннер узкий (590–750px): тёмная зона тени привязана к ширине текста, а не к 42% */
@media (min-width: 1001px) and (max-width: 1400px) {
  .slide__shade { background: linear-gradient(90deg, rgba(15,17,21,.96) 0, rgba(15,17,21,.78) min(72%, 480px), rgba(15,17,21,.08) 100%); }
}
/* широкие экраны: карточки промо растут вместе с баннером, пропорция хиро не перекашивается */
@media (min-width: 1600px) {
  .hero { grid-template-columns: minmax(0, 1fr) clamp(330px, 25%, 400px); height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  .banner__track, .tile, .promo__img { transition: none; }
  .track { scroll-behavior: auto; }
}

/* ======================================================================
   Сайт на API: игрок в каркасе, формы, кошелёк, профиль, заглушки
   ====================================================================== */

/* ---------- игрок в топбаре и сайдбаре ---------- */
.topbar__auth--in { align-items: center; gap: 8px; }
.balance { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: var(--rp); background: var(--panel); border: 1px solid var(--border); color: var(--text); font-weight: 800; font-size: 14px; white-space: nowrap; }
.balance:hover { background: var(--panel2); }
.balance__icon { display: flex; color: var(--muted); }
.balance__bonus { font-size: 11px; font-weight: 700; color: #7fe3a0; padding: 2px 6px; border-radius: 999px; background: rgba(47,191,95,.14); }
.topbar__dep { gap: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-family: var(--fd); font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.avatar:hover { filter: brightness(1.1); }
.avatar[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.umenu { position: relative; }
.umenu__list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; border-radius: var(--r); background: var(--side); border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 35; }
.umenu__head { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.umenu__list [role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-weight: 700; font-size: 13px; text-align: left; }
.umenu__list [role="menuitem"]:hover, .umenu__list [role="menuitem"]:focus-visible { background: var(--panel); outline: none; }
.umenu__list [role="menuitem"] svg { color: var(--muted); }
.side-user--in { height: auto; min-height: 56px; padding: 8px 10px; }
.side-user--in .side-user__avatar { background: var(--accent); color: #fff; font-family: var(--fd); font-weight: 800; font-size: 13px; width: 34px; height: 34px; }
.side-user__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.side-user__meta .side-user__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.side-user__balance { font-size: 12px; font-weight: 700; color: #7fe3a0; }
.side-wallet { display: flex; gap: 8px; }
.side-wallet .btn { flex: 1; height: 38px; gap: 6px; }
.side-link[data-logout] .side-link__icon { color: #ff8a92; }

/* ---------- формы и состояния ---------- */
.modal__form { display: flex; flex-direction: column; gap: 14px; }
.modal__hint--why { padding: 10px 12px; border-radius: 10px; background: rgba(91,124,255,.14); border: 1px solid rgba(91,124,255,.4); color: var(--text); font-size: 13px; margin: 0; }
.field__hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.field__label { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.form__error { padding: 10px 12px; border-radius: 10px; background: rgba(224,50,60,.14); border: 1px solid rgba(224,50,60,.5); color: #ff8a92; font-size: 13px; line-height: 1.45; font-weight: 600; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy svg { visibility: hidden; }
.btn.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--cta.is-busy::after { border-color: rgba(8,19,12,.3); border-top-color: var(--cta-text); }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: spin .7s linear infinite; vertical-align: -2px; }
.spinner--big { width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.preset { height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-weight: 700; font-size: 13px; white-space: nowrap; padding: 0 4px; }
.preset:hover { background: var(--panel2); }
.preset.is-active { border-color: var(--accent); background: rgba(91,124,255,.16); }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.method { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); }
.method input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.method.is-active, .method:has(input:checked) { border-color: var(--accent); color: var(--text); background: rgba(91,124,255,.12); }
.method:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 6px 0; }
.result__icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(47,191,95,.18); color: #7fe3a0; display: flex; align-items: center; justify-content: center; }
.result__icon--wait { background: rgba(255,190,80,.16); color: #ffcf6b; }
.result__sum { font-family: var(--fd); font-size: 26px; font-weight: 800; }
.result__bonus { padding: 10px 12px; border-radius: 10px; background: rgba(91,124,255,.14); border: 1px solid rgba(91,124,255,.4); font-size: 13px; line-height: 1.5; }
.result__bonus svg { vertical-align: -3px; color: var(--accent); }

/* ---------- профиль ---------- */
.modal__box--wide { max-width: 640px; }
.profile__head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.profile__avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-weight: 800; font-size: 18px; }
.profile__info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile__login { font-size: 18px; overflow-wrap: anywhere; }
.profile__meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tag--ok { color: #7fe3a0; border-color: rgba(47,191,95,.5); }
.tag--warn { color: #ffcf6b; border-color: rgba(255,190,80,.5); }
.tag--bad { color: #ff8a92; border-color: rgba(224,50,60,.5); }
.wallet-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wallet-box { padding: 12px 14px; border-radius: var(--r); background: var(--panel); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wallet-box__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.wallet-box__sum { font-family: var(--fd); font-size: 18px; font-weight: 800; white-space: nowrap; }
.profile__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile__actions .btn { gap: 6px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.tabs::-webkit-scrollbar { display: none; }
.tabs__btn { flex: none; height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active { color: var(--text); border-bottom-color: var(--accent); }
.profile__panel { display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.profile__more { align-self: center; }
.list { display: flex; flex-direction: column; }
.list__row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.list__row:last-child { border-bottom: 1px solid var(--border); }
.list__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.list__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list__title { font-weight: 700; }
.list__sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.list__sum { font-weight: 800; white-space: nowrap; }
.list__sum.is-plus { color: #7fe3a0; }
.status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.status--pending { color: #ffcf6b; border-color: rgba(255,190,80,.5); }
.status--completed { color: #7fe3a0; border-color: rgba(47,191,95,.5); }
.status--rejected, .status--cancelled { color: #ff8a92; border-color: rgba(224,50,60,.5); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent); font-weight: 700; font-size: 12px; cursor: pointer; }
.link-btn:hover { color: #8aa0ff; }
.link-btn[disabled] { opacity: .5; cursor: default; }
.bonus-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border); }
.bonus-card__head { display: flex; align-items: center; gap: 12px; }
.bonus-card__head .list__main { flex: 1; }
.bonus-card--promo { flex-direction: row; align-items: center; gap: 12px; }
.bonus-card--promo .list__main { flex: 1; }
.progress { height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8aa0ff); border-radius: 4px; min-width: 2px; }
.promo-form__row { display: flex; gap: 8px; }
.promo-form__row input { flex: 1; min-width: 0; }
.promo-form__row .btn { flex: none; height: 44px; gap: 6px; }
.fair { display: flex; flex-direction: column; gap: 14px; }
.fair__row { display: flex; flex-direction: column; gap: 6px; }
.fair__row--reveal { padding: 12px; border-radius: var(--r); background: rgba(47,191,95,.1); border: 1px solid rgba(47,191,95,.4); }
.fair__label { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.mono { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; background: var(--panel); padding: 8px 10px; border-radius: 8px; color: var(--text); }
.field__hint code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.empty--sm { padding: 18px 0; font-size: 13px; }
.empty--sm .spinner { margin-right: 6px; }

/* ---------- заглушки, скелетоны, ошибки ---------- */
.tile--soon { border: 1px dashed rgba(139,147,165,.6); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; padding: 10px; cursor: default; }
.tile--soon:hover { transform: none; box-shadow: none; }
.tile--skeleton { border-color: transparent; background: linear-gradient(100deg, var(--panel2) 30%, #2c3240 50%, var(--panel2) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tile__play--soon span { background: var(--panel2); color: var(--muted); }
.row__error, .grid__error { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--border); color: #c3c9d8; font-size: 13px; flex: none; }
.grid__error { grid-column: 1 / -1; }
.row__error .btn, .grid__error .btn { gap: 6px; }
.slide--skeleton { background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.slide--info .slide__body { justify-content: center; }
.slide--info .slide__shade { background: var(--panel); }
.banner--single .banner__arrow, .banner--single .dots { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip__count { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.1); color: inherit; }
.chip__count:empty { display: none; }
.lb__row.is-me { background: rgba(91,124,255,.1); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.lb__row.is-me .lb__name { color: #8aa0ff; font-weight: 700; }
.lb__row--empty { color: var(--muted); font-size: 13px; }
.tour__text b { color: var(--text); font-weight: 700; }

/* ---------- адаптив под игрока ---------- */
@media (max-width: 1240px) {
  .side-user--in { width: calc(100% - 48px); }
}
/* 1241–1400: сайдбар ещё на месте, а топбар уже тесный — «Пополнить» иконкой, бонусный чип прячем, зазоры уже */
@media (max-width: 1400px) {
  .balance__bonus { display: none; }
  .topbar__dep { width: 40px; padding: 0; }
  .topbar__dep-label { display: none; }
}
@media (min-width: 1241px) and (max-width: 1400px) {
  .topbar { gap: 14px; }
}
@media (max-width: 760px) {
  .topbar__auth--in { gap: 6px; }
  .balance { height: 38px; padding: 0 10px 0 8px; font-size: 13px; gap: 6px; }
  .topbar__dep { width: 38px; padding: 0; }
  .topbar__dep-label { display: none; }
  .avatar { width: 38px; height: 38px; font-size: 14px; }
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-row { grid-template-columns: 1fr; }
  .list__row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 10px; }
  .list__icon { width: 30px; height: 30px; }
  .bonus-card--promo { flex-wrap: wrap; }
  .promo-form__row { flex-direction: column; }
}
@media (max-width: 370px) {
  .balance { padding: 0 8px; font-size: 12px; }
  .balance__icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile--skeleton, .slide--skeleton { animation: none; }
}

/* ======================================================================
   Игровой фрейм: игра открывается внутри сайта (docs/KLEV.md)
   ====================================================================== */
/* Пока игра открыта, колонка контента = топбар + фрейм ровно в высоту окна: прокрутки страницы нет, прокручивается только игра внутри iframe */
.game-open .layout { height: 100vh; height: 100dvh; min-height: 0; }
.game-open .main { gap: 8px; padding-bottom: 16px; min-height: 0; }
.game-open .main > :not(.topbar):not(.gameframe) { display: none; }
.game-open .bottombar { display: none; }
body.game-open { padding-bottom: 0; }
.gameframe { position: relative; flex: 1; min-height: 360px; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r); border: 1px solid var(--border); background: var(--side); overflow: hidden; }
/* шапка: «← Назад» (пилюля) · обложка + название · тумблер «Демо-режим» · … · баланс (телефон) · иконки «Поделиться» и «На весь экран» */
.gameframe__head { flex: none; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--side); }
.gameframe__head .btn { height: 34px; gap: 6px; flex: none; }
.gameframe__back { padding: 0 14px 0 10px; border-radius: var(--rp); }
.gameframe__thumb { width: 36px; height: 36px; flex: none; border-radius: 8px; object-fit: cover; background: var(--panel2); }
.gameframe__thumb--icon { display: flex; align-items: center; justify-content: center; color: #fff; }
.gameframe__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.15; }
.gameframe__title { font-family: var(--fd); font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gameframe__prov { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gameframe__spacer { flex: 1; }
.gameframe__balance { display: none; height: 34px; }
.gameframe__share, .gameframe__fs { width: 34px; padding: 0; }
/* тумблер «Демо-режим»: подпись + переключатель, зелёный во включённом состоянии */
.switch { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border-radius: var(--rp); border: 1px solid var(--border); background: var(--panel2); color: var(--text); font-family: var(--fb); font-weight: 700; font-size: 12px; white-space: nowrap; cursor: pointer; flex: none; }
.switch:hover { background: #2c3240; }
.switch__track { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #3b4356; transition: background .15s; }
.switch__knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); transition: transform .15s; }
.switch[aria-checked="true"] .switch__track { background: var(--cta); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(14px); }
.switch__short { display: none; }
.gameframe__body { position: relative; flex: 1; min-height: 0; background: #020b10; }
.gameframe__iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
/* скелетон и ошибка — поверх iframe, в цветах сайта */
.gameframe__loader, .gameframe__error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.gameframe__loader { background: linear-gradient(100deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.gameframe__error { background: var(--panel); color: var(--text); font-size: 14px; }
.gameframe__error-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gameframe__error .btn { gap: 6px; }
/* «На весь экран»: настоящий fullscreen и запасной fixed-оверлей выглядят одинаково */
.gameframe:fullscreen { border: 0; border-radius: 0; background: var(--bg); }
.gameframe.is-fs { position: fixed; inset: 0; z-index: 35; margin: 0; border: 0; border-radius: 0; min-height: 0; }
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  /* телефон (и альбомный телефон): фрейм на весь экран поверх сайта, шапка компактная — назад, тумблер «Демо», баланс, поделиться, на весь экран */
  .gameframe { position: fixed; inset: 0; z-index: 35; border: 0; border-radius: 0; min-height: 0; }
  .gameframe__head { height: calc(50px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(10px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); gap: 8px; }
  .gameframe__head .btn, .gameframe__head .switch { height: 36px; }
  .gameframe__thumb, .gameframe__meta { display: none; }
  .gameframe__back span { display: none; } /* «← Занос» с подписью есть в самой игре — тут хватает стрелки */
  .gameframe__back, .gameframe__share, .gameframe__fs { width: 36px; padding: 0; }
  .switch__long { display: none; }
  .switch__short { display: inline; }
  .gameframe__balance { display: inline-flex; height: 36px; padding: 0 10px 0 8px; font-size: 13px; gap: 6px; }
  .gameframe__body { padding-bottom: env(safe-area-inset-bottom); } /* iframe не видит safe-area — отступ снизу даём мы */
  body.game-open { overflow: hidden; }
}
@media (max-width: 370px) {
  .switch__text { display: none; } /* совсем узко: у тумблера остаётся только переключатель (имя — в aria-label) */
  .switch { padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .gameframe__loader { animation: none; }
  .switch__track, .switch__knob { transition: none; }
}

/* ---------- загрузка без мигания: каркас показывается одним кадром после первой отрисовки ---------- */
.layout, .bottombar { transition: opacity .12s ease; }
.js-loading .layout, .js-loading .bottombar { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .layout, .bottombar { transition: none; } }

/* каталог: «Показать ещё» под сеткой (игры агрегатора подгружаем порциями) */
.grid__more { grid-column: 1 / -1; display: flex; justify-content: center; padding: 8px 0 4px; }

/* обложки агрегатора: название и студия уже на картинке — свои подписи показываем только без обложки */
.tile--cover .tile__prov, .tile--cover .tile__title, .tile--cover .tile__shade { opacity: 0; }
.tile--cover.tile--noimg .tile__prov, .tile--cover.tile--noimg .tile__title, .tile--cover.tile--noimg .tile__shade { opacity: 1; }
.tile--cover.tile--noimg .tile__img { visibility: hidden; }

/* фильтр по провайдеру в каталоге */
select.provsel { appearance: none; background: var(--panel2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 32px 10px 14px; font: 700 13px/1 inherit; max-width: 240px; cursor: pointer; }
select.provsel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { select.provsel { width: 100%; max-width: none; } }
