/* =========================================================
   NEON HUB — стили лаунчера
   Палитра согласована с играми (NEON RUSH / NEON DEFENSE / Нить)
   ========================================================= */
:root {
  --bg: #05010f;
  --bg-2: #0a0220;
  --panel: rgba(12, 3, 32, .78);
  --panel-solid: #0b0322;
  --line: rgba(0, 240, 255, .28);
  --line-2: rgba(255, 255, 255, .12);
  --cyan: #00f0ff;
  --magenta: #ff00e6;
  --violet: #7a00ff;
  --yellow: #ffe600;
  --green: #00ff9d;
  --text: #ffffff;
  --muted: #9aa8c7;
  --muted-2: #6d7a99;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-glow: 0 0 24px rgba(0, 240, 255, .35);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 8%, rgba(122, 0, 255, .28), transparent 45%),
    radial-gradient(circle at 85% 12%, rgba(0, 240, 255, .20), transparent 42%),
    radial-gradient(circle at 50% 105%, rgba(255, 0, 230, .22), transparent 55%),
    var(--bg);
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, .3); border-radius: 4px; }

/* ---------- каркас ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Сверху — высота топбара: экраны лежат поверх #app, иначе заголовок
     уезжает под шапку. По бокам отступ дают сами блоки (14px). */
  padding: calc(66px + var(--top)) 0 calc(96px + var(--bottom));
}
.screen.active { display: flex; animation: screenIn .28s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--top)) 14px 10px;
  background: linear-gradient(180deg, rgba(5, 1, 15, .96), rgba(5, 1, 15, .55) 70%, transparent);
  backdrop-filter: blur(8px);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  box-shadow: 0 0 16px rgba(0, 240, 255, .45);
  flex: 0 0 auto;
}
.who { flex: 1; min-width: 0; }
.who .name { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .no { font-size: 11px; color: var(--cyan); letter-spacing: .08em; text-shadow: 0 0 8px rgba(0, 240, 255, .7); }
.iconbtn {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-2);
}
.iconbtn:active { transform: scale(.93); }
.iconbtn.on { border-color: var(--cyan); box-shadow: 0 0 14px rgba(0, 240, 255, .5); }

/* ---------- кошелёк ---------- */
/* Кристаллы — единственная внутренняя валюта, поэтому карточка одна
   и на всю ширину. Звёзды и TON — внешние способы пополнения (ниже). */
.wallet {
  display: block;
  margin: 0 14px 10px;
}
.wcard {
  position: relative;
  padding: 15px 16px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 20px rgba(122, 0, 255, .22);
  overflow: hidden;
}
.wcard.crystals { border-color: rgba(0, 240, 255, .45); }
.wcard .lbl { font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.wcard .val {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 34px; font-weight: 900; line-height: 1.1; margin-top: 3px;
  text-shadow: 0 0 12px rgba(0, 240, 255, .55);
}
.wcard .cur { font-size: 24px; }
.wcard .wsub { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.wcard .topup {
  width: 100%; margin-top: 13px; padding: 13px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--cyan), #0088ff);
  box-shadow: 0 0 18px rgba(0, 240, 255, .35);
}
.wcard .topup:active { transform: scale(.98); }

/* ---------- внешние способы оплаты ---------- */
.pay-block { margin: 0 14px 4px; }
.pay-cap {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 7px;
}
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-btn {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  border-radius: 12px; text-align: left;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-2);
}
.pay-btn .ic { font-size: 19px; flex: 0 0 auto; }
.pay-btn .txt { display: flex; flex-direction: column; min-width: 0; }
.pay-btn .nm { font-size: 12px; font-weight: 800; white-space: nowrap; }
.pay-btn .sub { font-size: 10px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-btn:active:not([disabled]) { transform: scale(.97); }
.pay-btn[disabled] { opacity: .45; }

/* ---------- заголовки ---------- */
.h1 {
  font-size: 26px; font-weight: 900; letter-spacing: .06em;
  margin: 16px 14px 8px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueShift 6s linear infinite;
}
@keyframes hueShift { to { background-position: 300% 0; } }
.sect-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 14px 8px;
  font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.sect-title .link { color: var(--cyan); font-size: 12px; text-shadow: 0 0 8px rgba(0, 240, 255, .6); }

/* ---------- быстрые действия ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 0 14px; margin-top: 12px; }
.qbtn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 4px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
  font-size: 10px; font-weight: 700; letter-spacing: .03em; text-align: center;
}
.qbtn .ic { font-size: 20px; }
.qbtn:active { transform: scale(.95); }
.qbtn.alert { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255, 230, 0, .45); }

/* ---------- карточки игр ---------- */
/* Вертикальная карточка: иконка, название по центру, крупная кнопка «Играть». */
.games { display: flex; flex-direction: column; gap: 14px; padding: 0 14px; }
.gcard {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 22px rgba(122, 0, 255, .2);
  overflow: hidden;
  text-align: center;
  transition: transform .15s, box-shadow .2s;
}
.gcard::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent, var(--cyan)) 0%, transparent 65%);
  opacity: .16;
  pointer-events: none;
}
.gcard:active { transform: scale(.985); }
.gcard .cover {
  width: 66px; height: 66px; flex: 0 0 auto;
  border-radius: 18px; display: grid; place-items: center;
  font-size: 33px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--accent, var(--cyan));
  box-shadow: 0 0 16px var(--accent, var(--cyan));
}
.gcard .info { position: relative; width: 100%; min-width: 0; }
.gcard .ttl { font-size: 19px; font-weight: 900; letter-spacing: .06em; }
.gcard .gnr { font-size: 11px; color: var(--accent, var(--cyan)); letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.gcard .dsc {
  font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard .meta { font-size: 11px; color: var(--yellow); margin-top: 8px; font-weight: 700; }
.gcard .go {
  position: relative;
  width: 100%; margin-top: 2px; padding: 15px 18px;
  border-radius: 14px;
  font-size: 15px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--magenta), var(--violet) 55%, var(--cyan));
  box-shadow: 0 0 22px rgba(255, 0, 230, .45);
}
.gcard .go:active { transform: scale(.98); }
.gcard .go[disabled] { opacity: .5; box-shadow: none; }
.gcard.disabled { opacity: .55; filter: grayscale(.6); }

/* ---------- рейтинг ---------- */
.tabs { display: flex; gap: 8px; padding: 0 14px 10px; overflow-x: auto; }
.tab {
  padding: 8px 14px; border-radius: 11px; white-space: nowrap;
  font-size: 12px; font-weight: 800;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2);
}
.tab.active { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 14px rgba(0, 240, 255, .45); }
.rows { display: flex; flex-direction: column; gap: 7px; padding: 0 14px; }
.row-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-2);
}
.row-item.me { border-color: var(--yellow); box-shadow: 0 0 16px rgba(255, 230, 0, .35); }
.row-item .pos { width: 30px; font-weight: 900; font-size: 14px; color: var(--muted); text-align: center; }
.row-item .pos.top1 { color: #ffd700; text-shadow: 0 0 10px #ffd700; }
.row-item .pos.top2 { color: #d8e4ff; }
.row-item .pos.top3 { color: #ff9d5c; }
.row-item .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .sc { font-size: 14px; font-weight: 900; color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, .5); }

/* ---------- задания ---------- */
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-2);
  margin: 0 14px 8px;
}
.task .ic { font-size: 22px; }
.task .body { flex: 1; min-width: 0; }
.task .ttl { font-size: 13px; font-weight: 700; }
.task .bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 6px; }
.task .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width .4s; }
.task .pg { font-size: 10px; color: var(--muted); margin-top: 3px; }
.task .rw { font-size: 12px; font-weight: 900; color: var(--yellow); white-space: nowrap; }
.task .act {
  padding: 8px 12px; border-radius: 10px; font-size: 11px; font-weight: 900;
  background: linear-gradient(135deg, var(--green), #0088ff);
  box-shadow: 0 0 14px rgba(0, 230, 160, .45);
}
.task .act.done { background: rgba(255, 255, 255, .08); box-shadow: none; color: var(--muted); }

/* ---------- партнёрские задания ---------- */
.partner-task { align-items: flex-start; }
.partner-task .ic { margin-top: 2px; }
.partner-task .dsc { font-size: 11px; line-height: 1.35; color: var(--muted-2); margin-top: 3px; }
.partner-task .act { align-self: center; }
.partner-note { margin: 0 14px 8px; }
.partner-bonus.alert { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 230, 0, .28); }

/* ---------- магазин ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 14px; }
.shop-item {
  display: flex; flex-direction: column; gap: 7px;
  padding: 13px 12px; border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-2);
  text-align: left;
}
.shop-item.hot { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 230, 0, .3); }
.shop-item .ic { font-size: 26px; }
.shop-item .ttl { font-size: 13px; font-weight: 800; }
.shop-item .dsc { font-size: 11px; color: var(--muted); line-height: 1.3; flex: 1; }
.shop-item .price {
  align-self: flex-start;
  padding: 6px 11px; border-radius: 10px;
  font-size: 12px; font-weight: 900;
  background: rgba(0, 240, 255, .14);
  border: 1px solid var(--line);
  color: var(--cyan);
}
.shop-item .price.stars { background: rgba(255, 230, 0, .14); border-color: rgba(255, 230, 0, .4); color: var(--yellow); }
.shop-item.owned { opacity: .6; }

/* ---------- кабинет ---------- */
.card {
  margin: 0 14px 12px;
  padding: 15px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 0 20px rgba(122, 0, 255, .18);
}
.card h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; }
.kv .v.hi { color: var(--cyan); text-shadow: 0 0 8px rgba(0, 240, 255, .5); }
.note { font-size: 11px; line-height: 1.45; color: var(--muted-2); margin-top: 8px; }
.shop-note { margin: 0 14px 10px; }

.list-btn {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 13px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 700;
  margin-bottom: 8px;
}
.list-btn .ic { font-size: 17px; }
.list-btn .arw { margin-left: auto; color: var(--muted-2); }
.list-btn:active { transform: scale(.98); }

/* ---------- переключатели ---------- */
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .12); transition: .2s;
  border: 1px solid var(--line-2);
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: .2s;
}
.switch input:checked + span { background: linear-gradient(90deg, var(--cyan), var(--violet)); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(20px); }

.seg { display: flex; gap: 6px; }
.seg button {
  padding: 7px 13px; border-radius: 9px; font-size: 12px; font-weight: 800;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2);
}
.seg button.active { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(0, 240, 255, .4); }

/* ---------- нижняя навигация ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + var(--bottom));
  background: rgba(6, 1, 18, .92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.nav button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: 11px;
  font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--muted-2);
}
.nav button .ic { font-size: 19px; filter: grayscale(.6); transition: .2s; }
.nav button.active { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, .7); }
.nav button.active .ic { filter: none; transform: translateY(-1px); }

/* ---------- игровой экран ---------- */
#gameView { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
#gameFrame { flex: 1; width: 100%; border: 0; background: #000; }
#gameBar {
  position: absolute; top: calc(6px + var(--top)); right: 8px; z-index: 3;
  display: flex; gap: 7px;
}
#gameBar button {
  padding: 9px 13px; border-radius: 11px;
  font-size: 12px; font-weight: 800;
  background: rgba(10, 0, 30, .8);
  border: 1px solid var(--line);
  box-shadow: 0 0 14px rgba(0, 240, 255, .3);
}
#gameLoading {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(122, 0, 255, .25), rgba(3, 0, 14, .95));
  font-size: 13px; letter-spacing: .14em; color: var(--muted);
}

/* ---------- доступ по инвайту ---------- */
#access {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(122, 0, 255, .3), rgba(3, 0, 14, .95));
}
#access .logo {
  font-size: clamp(34px, 11vw, 54px); font-weight: 900; letter-spacing: .08em;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow), var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueShift 4s linear infinite;
  filter: drop-shadow(0 0 16px rgba(255, 0, 230, .55));
}
#access .sub { font-size: 13px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.codebox { display: flex; gap: 8px; width: min(340px, 88vw); }
.codebox input {
  flex: 1; min-width: 0;
  padding: 13px 14px; border-radius: 13px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  outline: none;
}
.codebox input:focus { border-color: var(--cyan); box-shadow: 0 0 16px rgba(0, 240, 255, .35); }
.bigbtn {
  padding: 14px 30px; border-radius: 14px;
  font-size: 15px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--magenta), var(--violet) 55%, var(--cyan));
  box-shadow: 0 0 22px rgba(255, 0, 230, .5);
}
.bigbtn:active { transform: scale(.96); }
.bigbtn.alt { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); box-shadow: none; }
.err { color: #ff6b81; font-size: 12px; min-height: 16px; }

/* ---------- экран гостя (страница открыта вне Telegram) ---------- */
#guest {
  position: fixed; inset: 0; z-index: 95;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: calc(28px + var(--top)) 20px calc(28px + var(--bottom));
  text-align: center; overflow-y: auto;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 0, 230, .28), transparent 55%),
    radial-gradient(circle at 50% 88%, rgba(0, 240, 255, .18), transparent 60%),
    var(--bg);
}
#guest .g-badge {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cyan); padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, .35);
  background: rgba(0, 240, 255, .07);
}
#guest .g-logo {
  font-size: clamp(36px, 12vw, 60px); font-weight: 900; letter-spacing: .08em;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow), var(--cyan));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueShift 4s linear infinite;
  filter: drop-shadow(0 0 20px rgba(255, 0, 230, .6));
}
#guest .g-lead {
  font-size: 14px; line-height: 1.55; color: #e8e4ff;
  max-width: 340px; font-weight: 600;
}
#guest .g-card {
  width: min(360px, 90vw);
  padding: 16px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-2);
  text-align: left;
}
#guest .g-cap {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 12px;
}
#guest .g-list { display: flex; flex-direction: column; gap: 11px; }
#guest .g-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; line-height: 1.4; color: #ddd8f5;
}
#guest .g-ic {
  flex: 0 0 26px; height: 26px; display: grid; place-items: center;
  border-radius: 9px; background: rgba(255, 255, 255, .07); font-size: 14px;
}
#guest .g-note {
  font-size: 12px; line-height: 1.55; color: var(--muted);
  max-width: 330px;
  padding: 12px 14px; border-radius: 14px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, .025);
}
#guest .g-wait {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- спиннер ---------- */
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(0, 240, 255, .2);
  border-top-color: var(--cyan);
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- тосты и модалки ---------- */
#toasts {
  position: fixed; top: calc(70px + var(--top)); left: 0; right: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
}
.toast {
  max-width: 88vw;
  padding: 11px 17px; border-radius: 12px;
  background: rgba(10, 0, 30, .94);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, .45);
  font-size: 13px; font-weight: 700; text-align: center;
  animation: toastIn 2.8s ease forwards;
}
.toast.warn { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 230, 0, .45); }
.toast.err { border-color: #ff2d55; box-shadow: 0 0 18px rgba(255, 45, 85, .45); }
@keyframes toastIn {
  0% { opacity: 0; transform: translateY(-14px) scale(.94); }
  10% { opacity: 1; transform: none; }
  86% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}

#modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: rgba(3, 0, 12, .72); }
#modal .sheet {
  width: 100%; max-width: 520px;
  max-height: 82vh; overflow-y: auto;
  padding: 18px 16px calc(20px + var(--bottom));
  border-radius: 20px 20px 0 0;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(122, 0, 255, .4);
  animation: sheetIn .25s ease both;
}
@keyframes sheetIn { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
#modal h2 { font-size: 17px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; text-align: center; }
.grabber { width: 42px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 0 auto 14px; }

/* ---------- пустое состояние ---------- */
.empty { text-align: center; padding: 26px 18px; color: var(--muted-2); font-size: 13px; }

/* ---------- плашка «награда за забег» поверх игры ---------- */
.game-reward {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: grIn .3s ease both;
}
.game-reward.out { animation: grOut .5s ease both; }
.game-reward .gr-card {
  min-width: 210px;
  padding: 20px 26px;
  border-radius: 20px;
  text-align: center;
  background: rgba(10, 0, 30, .92);
  border: 1px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0, 240, 255, .5), inset 0 0 24px rgba(255, 0, 230, .18);
  backdrop-filter: blur(6px);
}
.game-reward .gr-icon { font-size: 34px; line-height: 1; }
.game-reward .gr-val {
  font-size: 42px; font-weight: 900; line-height: 1.05; margin-top: 4px;
  background: linear-gradient(135deg, #00f0ff, #ff00e6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.game-reward .gr-cap { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.game-reward .gr-best { font-size: 13px; color: var(--yellow); margin-top: 8px; font-weight: 700; }
.game-reward .gr-ach {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed rgba(0, 240, 255, .35);
  text-align: left;
}
.game-reward .gr-ach-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--text);
  margin-top: 4px;
}
.game-reward .gr-ach-row .gr-ach-rw {
  margin-left: auto; color: var(--yellow); white-space: nowrap;
}
@keyframes grIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes grOut { to { opacity: 0; transform: scale(1.06); } }

/* ---------- полоса над игрой: язык/звук/пауза ---------- */
#gameBar .grow { flex: 1; }
#gameBar .chip {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 6px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--text);
}

@media (max-width: 360px) {
  .quick { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .qbtn { font-size: 9px; }
  .shop-grid { grid-template-columns: 1fr; }
}
