:root {
  --gold:#FFD700; --amber:#FF8C00; --dark:#0D1117; --darker:#080C10;
  --green:#2EC4B6; --red:#E63946; --stone:#4A7C9E;
  --text:rgba(255,255,255,.88); --muted:rgba(255,255,255,.42); --faint:rgba(255,255,255,.22);
  --panel:rgba(255,255,255,.035); --line:rgba(255,215,0,.12);
  --tabbar-h:64px;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { background:var(--darker); font-family:var(--font-app); }
body {
  font-family:var(--font-app); font-variant-numeric:tabular-nums; color:var(--text);
  min-height:100vh; overflow-x:hidden;
}
body::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(76,175,80,.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(255,215,0,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(74,124,158,.12) 0%, transparent 45%);
}
body::after {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(rgba(255,215,0,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,215,0,.015) 1px, transparent 1px);
  background-size:40px 40px;
}
button, input { font-family:inherit; }
button { font:inherit; color:inherit; background:none; border:none; cursor:pointer; }

.app { position:relative; z-index:1; max-width:440px; margin:0 auto; padding-bottom:calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }

/* ── HEADER ── */
.header { padding:14px 20px 10px; display:flex; align-items:center; justify-content:space-between; }
.logo {
  font-weight:900; font-size:26px; letter-spacing:2px;
  background:linear-gradient(135deg,#FFD700,#FF8C00); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; filter:drop-shadow(0 0 12px rgba(255,215,0,.4));
}
.logo-sub { font-size:11px; color:rgba(255,255,255,.4); font-weight:700; letter-spacing:1px; text-transform:uppercase; margin-top:-4px; padding-left:2px; }
.balance-pill {
  background:rgba(255,215,0,.10); border:1px solid rgba(255,215,0,.25); border-radius:20px;
  padding:6px 8px 6px 14px; font-size:14px; font-weight:800; color:var(--gold);
  display:flex; align-items:center; gap:6px;
}
.balance-pill .plus {
  width:22px; height:22px; border-radius:50%; background:linear-gradient(135deg,#FFD700,#FF8C00);
  color:var(--dark); display:grid; place-items:center; font-weight:900; font-size:15px; line-height:1;
}

/* ── SCREENS ── */
.screen { display:none; animation:fadeIn .2s ease; }
.screen.active { display:block; }
@keyframes fadeIn { from { opacity:.6; transform:translateY(4px); } to { opacity:1; transform:none; } }
.title { font-weight:900; font-size:22px; color:var(--gold); padding:4px 20px 12px; }

/* ── RTP BAR ── */
.rtp-bar {
  margin:0 20px 10px; background:rgba(255,215,0,.06); border:1px solid rgba(255,215,0,.18);
  border-radius:10px; padding:6px 14px; display:flex; justify-content:space-between; align-items:center;
  font-size:11px; color:rgba(255,255,255,.5);
}
.rtp-bar strong { color:var(--gold); font-size:13px; }

/* ── FIELD ── */
.field-outer { position:relative; padding-bottom:56px; }
.game-field { display:flex; flex-direction:column; padding:0 16px; }
.level-row { display:flex; align-items:center; gap:8px; padding:4px 0; transition:opacity .3s ease; }
.level-num { width:22px; font-size:11px; font-weight:900; color:var(--faint); text-align:center; flex-shrink:0; }
.level-row.active .level-num { color:var(--gold); }
.level-row.passed .level-num { color:var(--green); }
.level-row.future { opacity:.75; }
.cells { flex:1; display:flex; gap:8px; }
.level-divider { height:1px; margin:0 24px; background:linear-gradient(90deg,transparent,rgba(255,215,0,.06),transparent); }

.cell {
  flex:1; height:50px; border-radius:14px; display:flex; align-items:center; justify-content:space-between;
  padding:0 11px; position:relative; overflow:hidden; transition:transform .18s ease, background-color .18s ease, border-color .18s ease; border:1.5px solid transparent;
}
.cell.normal { border-color:rgba(74,124,158,.25); background:rgba(74,124,158,.12); }
.cell.gold   { border-color:rgba(255,215,0,.28); background:rgba(255,140,0,.10); }
.level-row.active .cell { cursor:pointer; }
.level-row.active .cell.normal { border-color:rgba(74,124,158,.7); background:rgba(74,124,158,.28); box-shadow:0 0 14px rgba(74,124,158,.2); }
.level-row.active .cell.gold   { border-color:rgba(255,215,0,.8); background:rgba(255,140,0,.22); box-shadow:0 0 16px rgba(255,215,0,.25); }
.level-row.active .cell:active { transform:scale(.97); }
.cell.passed-safe   { background:rgba(46,196,182,.12)!important; border-color:rgba(46,196,182,.45)!important; }
.cell.passed-danger { background:rgba(230,57,70,.08)!important; border-color:rgba(230,57,70,.25)!important; }
.cell.selected-win  { background:rgba(46,196,182,.22)!important; border-color:var(--green)!important; box-shadow:0 0 20px rgba(46,196,182,.4)!important; }
.cell.selected-lose { background:rgba(230,57,70,.25)!important; border-color:var(--red)!important; box-shadow:0 0 20px rgba(230,57,70,.5)!important; }

.cell-icon-wrap { position:relative; width:32px; height:32px; display:flex; align-items:center; justify-content:center; }
.cell-icon { font-size:20px; line-height:1; }
.cell.gold .coin-float { position:absolute; top:50%; left:50%; font-size:11px; pointer-events:none; animation:coinRise 2.2s ease-in-out infinite; opacity:0; }
.cell.gold .coin-float:nth-child(2) { animation-delay:.7s; }
.cell.gold .coin-float:nth-child(3) { animation-delay:1.4s; }
@keyframes coinRise {
  0% { transform:translate(-50%,4px) scale(.6); opacity:0; } 20% { opacity:.85; }
  80% { opacity:.4; } 100% { transform:translate(-50%,-22px) scale(.9); opacity:0; }
}
.cell-info { display:flex; flex-direction:column; align-items:flex-end; gap:1px; }
.cell-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; opacity:.52; }
.cell.normal .cell-label { color:#6DB8F7; }
.cell.gold .cell-label { color:var(--gold); }
.cell-mult { font-weight:900; font-size:16px; line-height:1; }
.cell.normal .cell-mult { color:#A8D8F0; }
.cell.gold .cell-mult { color:var(--gold); }
.cell-mult .step-l { font-size:10px; font-weight:700; opacity:.55; margin-right:3px; text-transform:uppercase; letter-spacing:.3px; }
.cell-prob { font-size:9px; opacity:.4; color:#fff; }

/* ── CHARACTERS ── */
.char {
  position:absolute; transform:translate(-50%,-50%); line-height:1; pointer-events:none; user-select:none;
  transition:left .44s cubic-bezier(.34,1.3,.64,1), top .44s cubic-bezier(.34,1.3,.64,1);
}
#human { font-size:26px; z-index:21; filter:drop-shadow(0 0 10px rgba(255,215,0,.9)); }
#dino  { font-size:30px; z-index:20; filter:drop-shadow(0 0 10px rgba(76,175,80,.7));
  transition:left .52s cubic-bezier(.25,1.1,.5,1), top .52s cubic-bezier(.25,1.1,.5,1); }
@keyframes humanIdle { 0%,100% { transform:translate(-50%,-50%) rotate(-4deg); } 50% { transform:translate(-50%,-68%) rotate(4deg) scale(1.08); } }
@keyframes dinoIdle  { 0%,100% { transform:translate(-50%,-50%) rotate(4deg); } 50% { transform:translate(-50%,-38%) rotate(-4deg) scale(1.04); } }
#human.idle { animation:humanIdle 1.3s ease-in-out infinite; }
#dino.idle  { animation:dinoIdle 1.8s ease-in-out infinite; }
@keyframes humanHop {
  0% { transform:translate(-50%,-50%); } 28% { transform:translate(-50%,-98%) scale(1.22) rotate(-12deg); }
  62% { transform:translate(-50%,-50%) scale(1.06) rotate(6deg); } 100% { transform:translate(-50%,-50%); }
}
#human.hop { animation:humanHop .42s ease both; }
@keyframes dinoMiss {
  0% { transform:translate(-50%,-50%); } 20% { transform:translate(-50%,-88%) scale(1.35) rotate(-20deg); }
  55% { transform:translate(-50%,-50%) scale(1.1) rotate(10deg); } 80% { transform:translate(-50%,-50%) scale(.97) rotate(-3deg); }
  100% { transform:translate(-50%,-50%); }
}
#dino.miss { animation:dinoMiss .55s ease both; }
@keyframes dinoCatch {
  0% { transform:translate(-50%,-50%); } 28% { transform:translate(-50%,-95%) scale(1.5) rotate(-22deg); }
  58% { transform:translate(-50%,-50%) scale(1.22) rotate(12deg); } 82% { transform:translate(-50%,-50%) scale(1.04) rotate(-2deg); }
  100% { transform:translate(-50%,-50%); }
}
#dino.catch { animation:dinoCatch .58s ease both; }
@keyframes flashFade { from { opacity:1; } to { opacity:0; } }
.gold-coin-anim { position:fixed; pointer-events:none; z-index:200; font-size:24px; animation:coinFly 1.2s ease-out forwards; }
@keyframes coinFly {
  0% { transform:translate(0,0) scale(1) rotate(0); opacity:1; }
  100% { transform:translate(var(--tx),var(--ty)) scale(.3) rotate(360deg); opacity:0; }
}

/* ── STATS / BET ── */
.stats-row { display:flex; gap:8px; padding:6px 20px 0; }
.stat-pill { flex:1; background:rgba(255,215,0,.05); border:1px solid var(--line); border-radius:10px; padding:7px 10px; text-align:center; }
.s-label { font-size:9px; color:rgba(255,255,255,.3); text-transform:uppercase; letter-spacing:.5px; font-weight:700; }
.s-value { font-weight:900; font-size:14px; color:rgba(255,255,255,.8); margin-top:1px; }
.gold { color:var(--gold)!important; } .green { color:var(--green)!important; } .red { color:var(--red)!important; }

.bottom-panel { padding:10px 20px 0; display:flex; flex-direction:column; gap:10px; }
.bet-row { display:flex; align-items:center; gap:10px; }
.bet-row.locked { opacity:.4; pointer-events:none; }
.bet-label { font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.chips { display:flex; gap:6px; flex:1; }
.chips .chip { flex:1; padding:7px 0; text-align:center; font-size:13px; }
.bet-chips { display:flex; gap:6px; flex:1; }
.bet-chips .chip { flex:1; padding:7px 0; text-align:center; font-size:13px; }
.chip {
  background:rgba(255,215,0,.07); border:1.5px solid rgba(255,215,0,.18); border-radius:8px;
  padding:5px 10px; font-size:12px; font-weight:800; color:rgba(255,215,0,.6); transition:background-color .14s, border-color .14s, color .14s;
}
.chip.active { background:rgba(255,215,0,.2); border-color:var(--gold); color:var(--gold); }

.action-row { display:flex; gap:10px; }
.btn-primary {
  flex:1; height:52px; border-radius:14px; background:linear-gradient(135deg,#FFD700,#FF8C00);
  color:var(--dark); font-weight:900; font-size:18px; letter-spacing:.5px;
  box-shadow:0 4px 22px rgba(255,215,0,.35); display:flex; align-items:center; justify-content:center; gap:8px; transition:transform .2s, opacity .2s;
}
.btn-primary:active:not(:disabled) { transform:scale(.98); }
.btn-primary:disabled { opacity:.5; cursor:default; }
.btn-primary.sm, .btn-ghost.sm { height:42px; font-size:15px; flex:1; }
.btn-primary.sm { flex:0 0 auto; padding:0 18px; }
.action-row .btn-primary.sm { flex:1; }
.btn-ghost { border-radius:12px; border:1.5px solid rgba(255,215,0,.3); color:var(--gold); font-weight:900; }
.btn-cashout {
  flex:1; height:52px; border-radius:14px; border:2px solid var(--green); background:rgba(46,196,182,.12);
  color:var(--green); font-weight:900; font-size:16px; display:none; align-items:center; justify-content:center; gap:6px;
}
.btn-cashout.on { display:flex; }
.btn-cashout:disabled { opacity:.45; }

/* ── CARDS / LISTS ── */
.card { margin:0 16px 12px; background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:14px; }
.field-label { font-size:11px; color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.6px; margin-bottom:8px; }
.field-label.pad { padding:6px 20px 0; }
.amount-input { display:flex; align-items:center; gap:8px; background:rgba(0,0,0,.3); border:1.5px solid rgba(255,215,0,.25); border-radius:12px; padding:0 14px; margin-bottom:10px; }
.amount-input input { flex:1; min-width:0; background:none; border:none; outline:none; color:var(--gold); font-weight:900; font-size:26px; height:52px; }
.amount-input span { font-size:22px; }
.methods { display:flex; flex-direction:column; gap:8px; padding:0 16px 12px; }
.method {
  display:flex; align-items:center; gap:12px; padding:14px; border-radius:14px; text-align:left;
  background:var(--panel); border:1.5px solid rgba(255,215,0,.2); transition:transform .15s, border-color .15s, opacity .15s;
}
.method:not(:disabled):active { transform:scale(.98); border-color:var(--gold); }
.method:disabled { opacity:.45; cursor:default; }
.method .m-icon { font-size:26px; }
.method .m-title { font-weight:800; font-size:15px; }
.method .m-sub { font-size:12px; color:var(--muted); }
.method .m-badge { margin-left:auto; font-size:10px; font-weight:800; text-transform:uppercase; padding:3px 8px; border-radius:6px; background:rgba(255,255,255,.08); color:var(--muted); }

.list { padding:0 16px 12px; display:flex; flex-direction:column; gap:6px; }
.row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--panel); border:1px solid rgba(255,255,255,.05); border-radius:12px; }
.row .r-ico { font-size:20px; width:28px; text-align:center; }
.row .r-main { flex:1; min-width:0; }
.row .r-title { font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row .r-sub { font-size:11px; color:var(--muted); }
.row .r-val { font-weight:900; font-size:15px; white-space:nowrap; }
.row.clickable { cursor:pointer; }
.row-details { font-size:11px; color:var(--muted); padding:8px 12px 10px; margin-top:-4px; border-radius:0 0 12px 12px; background:rgba(0,0,0,.25); word-break:break-all; display:none; }
.row-details.on { display:block; }
.empty { text-align:center; color:var(--faint); font-size:13px; padding:18px 0; }

.hero { display:flex; align-items:center; gap:14px; background:linear-gradient(135deg,rgba(255,215,0,.12),rgba(255,140,0,.05)); }
.hero-emoji { font-size:40px; }
.hero-text { font-size:14px; line-height:1.35; }
.hero-text b { color:var(--gold); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 16px 12px; }
.stat-card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:12px; }
.big { font-weight:900; font-size:22px; margin-top:2px; }
.ref-link { font-size:13px; font-weight:700; color:var(--gold); background:rgba(0,0,0,.3); border-radius:10px; padding:10px 12px; margin-bottom:10px; word-break:break-all; }

.profile-head { display:flex; align-items:center; gap:14px; padding:4px 20px 14px; }
.avatar {
  width:62px; height:62px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,#FFD700,#FF8C00) center/cover;
  display:grid; place-items:center; font-weight:900; font-size:26px; color:var(--dark);
  box-shadow:0 0 0 3px rgba(255,215,0,.25);
}
.p-name { font-weight:900; font-size:21px; }
.p-sub { font-size:12px; color:var(--muted); }
/* Баланс сверху в одну строку, под ним две одинаковые кнопки */
.balance-card { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
.balance-card #pBalance { white-space:nowrap; display:flex; align-items:center; gap:6px; }
.bal-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.bal-actions .btn-ghost.sm, .bal-actions .btn-primary.sm { width:100%; padding:0 10px; }
/* ── Вывод ── */
.wd-cur { display:flex; align-items:center; gap:10px; padding:10px 12px; margin-bottom:12px; border-radius:12px; background:rgba(0,152,234,.12); border:1px solid rgba(0,152,234,.35); }
.wd-cur-ico { font-size:22px; }
/* Подсказка «Нет звёзд? Купите…» под кнопкой оплаты звёздами */
.stars-buy { display:flex; align-items:center; gap:10px; margin-top:10px; padding:10px 12px; border-radius:12px; text-decoration:none;
  background:rgba(255,200,40,.08); border:1px solid rgba(255,200,40,.25); color:var(--muted); font-size:13px; line-height:1.35; }
.stars-buy[hidden] { display:none; }
/* ── СБП через Stars: кнопка и пошаговая инструкция ── */
.sbp-open { display:flex; align-items:center; gap:12px; width:100%; margin-top:10px; padding:12px 14px; border-radius:14px; text-align:left; font-family:inherit; }
.sbp-logo { flex:none; width:32px; height:32px; object-fit:contain; }
.sbp-open-text { flex:1; display:flex; flex-direction:column; gap:2px; }
.sbp-open-text b { font-size:15px; color:#fff; }
.sbp-open-text small { font-size:12px; font-weight:600; color:var(--muted); }
.sbp-open-go { font-size:22px; color:var(--muted); }
.sbp { position:fixed; inset:0; z-index:300; display:flex; align-items:flex-end; justify-content:center; background:rgba(0,0,0,.6); animation:fadeIn .2s ease; }
.sbp[hidden] { display:none; }
.sbp-card { width:100%; max-width:440px; max-height:100%; overflow-y:auto; padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius:20px 20px 0 0; background:#202020; border:1px solid #383838; border-bottom:0; animation:sbpUp .28s cubic-bezier(.22,.61,.36,1); }
@keyframes sbpUp { from { transform:translateY(40px); opacity:0; } to { transform:none; opacity:1; } }
.sbp-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.sbp-title { font-weight:900; font-size:18px; }
.sbp-icon-btn { flex:none; width:36px; height:36px; border-radius:50%; font-size:20px; line-height:1; display:grid; place-items:center; padding:0; }
.sbp-icon-btn:disabled { opacity:.35; }
.sbp-nav { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.sbp-dots { flex:1; display:flex; justify-content:center; gap:6px; }
.sbp-dots i { width:6px; height:6px; border-radius:6px; background:#555; transition:width .25s ease, background .25s ease; }
.sbp-dots i.on { width:20px; background:#ffd24a; }
.sbp-count { font-size:13px; font-weight:800; color:var(--muted); }
.sbp-shot { height:min(42vh, 320px); padding:6px; border-radius:14px; background:#181818; border:1px solid #333; overflow:hidden; }
.sbp-shot img { width:100%; height:100%; object-fit:contain; display:block; }   /* картинка целиком вписывается в рамку */
.sbp-step { display:flex; align-items:center; gap:10px; margin:14px 0 6px; font-size:16px; }
.sbp-num { flex:none; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:#ffd24a; color:#2a1f00; font-weight:900; font-size:14px; }
.sbp-text { margin:0 0 14px; font-size:14px; line-height:1.45; color:var(--muted); min-height:40px; }
.sbp-go { margin-top:0; }
/* «1 монета = 1 ₽» под заголовком пополнения */
.rate-note { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; margin:-4px 16px 12px; padding:10px 12px; border-radius:12px;
  background:rgba(255,200,40,.08); border:1px solid rgba(255,200,40,.25); font-size:14px; }
.rate-note b { color:#ffd24a; }
.rate-note .rate-sub { flex-basis:100%; font-size:12px; color:var(--muted); }
.stars-buy b { color:#ffd24a; }
.stars-buy .sb-ico { font-size:20px; }
.stars-buy .sb-text { flex:1; }
.stars-buy .sb-go { font-size:22px; color:#ffd24a; }
.wd-wager { margin-bottom:12px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); font-size:13px; }
.wd-wager .wd-wager-top { display:flex; justify-content:space-between; gap:8px; margin-bottom:8px; }
.wd-wager .bar { height:8px; border-radius:6px; background:rgba(255,255,255,.08); overflow:hidden; }
.wd-wager .bar i { display:block; height:100%; border-radius:6px; background:#f5c12e; transition:width .5s ease; }
.wd-wager.done .bar i { background:#2fbf63; }
.wd-wager .r-sub { margin-top:6px; }
.wd-addr input { font-size:14px !important; font-weight:700; }
.wd-addr .link-btn { white-space:nowrap; }
.wd-note { margin-top:10px; font-size:12px; line-height:1.45; color:var(--muted); text-align:center; }
.wd-hist-label { margin:4px 16px 8px; }
.seg { display:flex; margin:0 16px 10px; background:var(--panel); border-radius:12px; padding:3px; }
.seg button { flex:1; height:34px; border-radius:9px; font-weight:800; font-size:13px; color:var(--muted); }
.seg button.active { background:rgba(255,215,0,.15); color:var(--gold); }

/* ── TABBAR ── */
.tabbar {
  position:fixed; left:0; right:0; bottom:0; z-index:50; display:flex; justify-content:center;
  background:rgba(8,12,16,.92); backdrop-filter:blur(12px); border-top:1px solid rgba(255,215,0,.1);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar button { flex:1; max-width:110px; height:var(--tabbar-h); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:11px; font-weight:800; color:var(--faint); transition:color .15s; }
.tabbar button span { font-size:22px; filter:grayscale(1) opacity(.6); transition:filter .15s; }
.tabbar button.active { color:var(--gold); }
.tabbar button.active span { filter:none; }

/* ── OVERLAY / TOAST ── */
.overlay { display:none; position:fixed; inset:0; z-index:100; align-items:center; justify-content:center; background:rgba(0,0,0,.8); backdrop-filter:blur(8px); }
.overlay.on { display:flex; }
.rcard { background:var(--dark); border:2px solid; border-radius:24px; padding:30px 30px 24px; text-align:center; animation:popIn .4s cubic-bezier(.34,1.56,.64,1); max-width:300px; width:90%; }
@keyframes popIn { from { transform:scale(.5); opacity:0; } to { transform:scale(1); opacity:1; } }
.rcard.win  { border-color:var(--gold); box-shadow:0 0 50px rgba(255,215,0,.4); }
.rcard.lose { border-color:var(--red); box-shadow:0 0 40px rgba(230,57,70,.4); }
.r-emoji { font-size:60px; margin-bottom:10px; }
.r-title { font-weight:900; font-size:26px; margin-bottom:8px; }
.rcard.win .r-title { color:var(--gold); } .rcard.lose .r-title { color:var(--red); }
.r-amount { font-weight:900; font-size:36px; color:var(--gold); margin-bottom:6px; }
.rcard.lose .r-amount { color:var(--red); }
.r-sub { font-size:13px; color:var(--muted); margin-bottom:20px; }
.rcard .btn-primary { width:100%; height:46px; font-size:17px; }
.toast {
  position:fixed; left:50%; bottom:calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform:translate(-50%,20px);
  background:#1b222c; border:1px solid rgba(255,215,0,.25); color:var(--text); font-size:13px; font-weight:700;
  padding:10px 16px; border-radius:12px; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:300; max-width:90%; text-align:center;
}
.toast.on { opacity:1; transform:translate(-50%,0); }
.toast.error { border-color:var(--red); }
.fatal { display:none; position:fixed; inset:0; z-index:400; background:var(--darker); align-items:center; justify-content:center; text-align:center; padding:30px; font-size:15px; color:var(--muted); flex-direction:column; gap:12px; }
.fatal.on { display:flex; }

/* ── TON ── */
.ton-hint { font-size:12px; color:var(--muted); margin-top:10px; }
.ton-hint b { color:#6DB8F7; }
.wallet-card { display:flex; align-items:center; gap:12px; }
.wallet-card[hidden] { display:none; }
.wallet-card .m-icon { font-size:26px; }
.wallet-card .m-title { font-weight:800; font-size:15px; }
.wallet-card .m-sub { font-size:12px; color:var(--muted); }
.wallet-card .r-main { flex:1; min-width:0; }
.wallet-btn { flex:0 0 auto!important; padding:0 14px; }
.row .r-sub .pending { color:var(--gold); }

/* ── ADMIN ── */
.tabbar button[hidden] { display:none; }
.pad-x { padding:0 16px 12px; }
.search { display:flex; align-items:center; gap:8px; margin:0 16px 10px; padding:0 12px; background:rgba(0,0,0,.3); border:1.5px solid rgba(255,215,0,.2); border-radius:12px; }
.search input { flex:1; min-width:0; height:42px; background:none; border:none; outline:none; color:var(--text); font-size:14px; font-weight:700; }
.filters { display:flex; gap:8px; align-items:center; padding:0 16px 8px; }
.select { background:rgba(255,215,0,.07); color:var(--gold); border:1.5px solid rgba(255,215,0,.18); border-radius:8px; height:33px; padding:0 6px; font:inherit; font-size:12px; font-weight:800; }
.select option { background:var(--dark); }
.list-meta { padding:0 20px 6px; font-size:11px; color:var(--muted); font-weight:700; }
.wide { width:100%; }
.badge { display:inline-block; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.3px; padding:2px 6px; border-radius:5px; margin-left:4px; vertical-align:2px; }
.badge.red { background:rgba(230,57,70,.18); color:var(--red)!important; }
.badge.gold { background:rgba(255,215,0,.15); }
.badge.muted { background:rgba(255,255,255,.08); color:var(--muted); }
.row .r-right { text-align:right; }
.row .r-right .r-sub { white-space:nowrap; }
.mini-av { width:34px; height:34px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,#FFD700,#FF8C00) center/cover; display:grid; place-items:center; font-weight:900; color:var(--dark); font-size:15px; }

.sheet { position:fixed; inset:0; z-index:150; background:var(--darker); display:none; flex-direction:column; }
.sheet.on { display:flex; animation:fadeIn .2s ease; }
.sheet-head { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); }
.sheet-close { width:34px; height:34px; border-radius:10px; background:var(--panel); font-size:15px; color:var(--muted); }
.sheet-title { font-weight:900; font-size:17px; }
.sheet-body { flex:1; overflow-y:auto; padding:14px 0 30px; max-width:440px; width:100%; margin:0 auto; }
.section-title { font-size:11px; color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.6px; padding:10px 20px 8px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:0 16px 12px; }
.grid3 .stat-card { padding:10px; }
.grid3 .big, .grid2 .big.sm { font-size:16px; }
.input { width:100%; height:44px; background:rgba(0,0,0,.3); border:1.5px solid rgba(255,215,0,.2); border-radius:10px; color:var(--text); padding:0 12px; font-size:15px; font-weight:800; outline:none; }
.input:focus { border-color:var(--gold); }
.btn-row { display:flex; gap:6px; margin-top:8px; }
.btn-row button { flex:1; height:38px; border-radius:10px; font-weight:900; font-size:13px; }
.b-green { background:rgba(46,196,182,.15); color:var(--green); border:1.5px solid rgba(46,196,182,.4); }
.b-red { background:rgba(230,57,70,.12); color:var(--red); border:1.5px solid rgba(230,57,70,.4); }
.b-gold { background:rgba(255,215,0,.1); color:var(--gold); border:1.5px solid rgba(255,215,0,.35); }
.toggle-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-top:1px solid rgba(255,255,255,.05); }
.toggle-row:first-child { border-top:none; padding-top:0; }
.toggle-row .t-title { font-weight:800; font-size:14px; }
.toggle-row .t-sub { font-size:11px; color:var(--muted); }
.toggle-row button { flex:0 0 auto; height:36px; padding:0 14px; border-radius:10px; font-weight:900; font-size:12px; }

/* Финансы */
.hero-num { margin:0 16px 12px; padding:16px; border-radius:16px; background:var(--panel); border:1px solid var(--line); }
.hero-num .big { font-size:34px; }
.hero-num .h-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.pl { margin:0 16px 12px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:4px 14px; }
.pl-row { display:flex; justify-content:space-between; gap:10px; padding:9px 0; font-size:13px; border-top:1px solid rgba(255,255,255,.05); }
.pl-row:first-child { border-top:none; }
.pl-row span:first-child { color:var(--muted); font-weight:700; }
.pl-row b { font-weight:900; white-space:nowrap; }
.pl-row.total { border-top:1.5px solid rgba(255,215,0,.25); }
.pl-row.total span:first-child { color:var(--text); }
.chart-card { margin:0 16px 12px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:12px 12px 8px; position:relative; }
.chart-card .c-title { font-size:13px; font-weight:800; }
.chart-card .c-sub { font-size:11px; color:var(--muted); margin-bottom:8px; }
.chart-card svg { display:block; width:100%; height:150px; overflow:visible; }
.chart-card .axis { font-size:9px; fill:rgba(255,255,255,.35); font-weight:700; }
.chart-tip { position:absolute; pointer-events:none; background:#1b222c; border:1px solid rgba(255,255,255,.12); border-radius:8px; padding:6px 8px; font-size:11px; line-height:1.4; white-space:nowrap; display:none; z-index:2; box-shadow:0 4px 14px rgba(0,0,0,.4); }
.chart-tip b { font-weight:900; }
#admFilter { flex:0 0 auto; }
#admFilter .chip { flex:0 0 auto; padding:7px 10px; white-space:nowrap; font-size:12px; }
.filters .select { flex:1; min-width:0; }

/* ── STARS ── */
#starsPanel[hidden], #coinsCard[hidden] { display:none; }
.stars-hint { text-align:center; font-size:13px; color:var(--muted); margin:12px 0; }
.stars-hint b { color:var(--text); font-weight:900; }
#starsPanel .btn-primary { width:100%; height:48px; font-size:17px; }
.method.selected { border-color:var(--gold); background:rgba(255,215,0,.08); }

/* ── PAY TABS (депозит) ── */
.pay-tabs { display:flex; gap:6px; margin:0 16px 12px; padding:5px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06); border-radius:16px; }
.pay-tab { position:relative; flex:1; min-width:0; height:62px; border-radius:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  background:rgba(255,255,255,.04); color:var(--muted); font-size:12px; font-weight:800; transition:background-color .15s, border-color .15s, color .15s; }
.pay-tab .pt-ico { font-size:20px; line-height:1; filter:grayscale(.6); transition:filter .15s; }
.pay-tab.active { background:linear-gradient(135deg,#FFD700,#FF8C00); color:var(--dark); box-shadow:0 4px 16px rgba(255,215,0,.3); }
.pay-tab.active .pt-ico { filter:none; }
.pay-tab.off { opacity:.45; }
.pay-tab .pt-badge { position:absolute; top:-7px; right:-3px; background:linear-gradient(135deg,#FF8C00,#E63946); color:#fff; font-size:9px; font-weight:900;
  letter-spacing:.4px; padding:2px 6px; border-radius:6px; box-shadow:0 2px 8px rgba(230,57,70,.4); }
.pay-hint { text-align:center; font-size:13px; color:var(--muted); margin:12px 0; line-height:1.45; }
.pay-hint b { color:var(--text); font-weight:900; }
.btn-pay { width:100%; height:50px; border-radius:14px; display:flex; align-items:center; justify-content:center; gap:8px;
  background:linear-gradient(135deg,#FFD700,#FF8C00); color:var(--dark); font-weight:900; font-size:16px; box-shadow:0 4px 18px rgba(255,215,0,.3); }
.btn-pay.ton { background:#0098EA; color:#fff; box-shadow:0 4px 18px rgba(0,152,234,.35); }
.btn-pay.cryptobot { background:#2AABEE; color:#fff; box-shadow:0 4px 18px rgba(42,171,238,.35); }
.btn-pay:disabled { opacity:.5; }
.btn-pay:active:not(:disabled) { transform:scale(.98); }
.wallet-row { display:flex; align-items:center; gap:8px; margin:-2px 0 10px; padding:8px 12px; border-radius:10px; background:rgba(0,152,234,.1); border:1px solid rgba(0,152,234,.3); font-size:13px; font-weight:800; }
.wallet-row[hidden], #coinsPanel[hidden], #offPanel[hidden] { display:none; }
.wallet-addr { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.link-btn { color:#6DB8F7; font-size:12px; font-weight:800; }
.off-panel { text-align:center; color:var(--muted); font-size:14px; padding:26px 14px; }
.off-emoji { font-size:34px; margin-bottom:8px; }

/* После ухода со стартового острова его место занимают ряды островов (fitLevelWindow покажет больше уровней) */
.field-outer.climbing { padding-bottom:18px; }

/* Депозит подарками: шаги инструкции */
.gift-how { display:flex; flex-direction:column; gap:10px; margin-bottom:6px; }
.gift-step { display:flex; align-items:center; gap:12px; font-size:14px; line-height:1.35; }
.gift-step b { flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-size:14px;
  background:#ffffff14; border:1px solid #ffffff2a; }
.gift-acc { color:#7fc4ff; font-weight:800; text-decoration:none; }
.gift-panel .list { margin-top:4px; }
.gift-ton { width:90px; height:36px; border-radius:10px; border:1px solid #ffffff2a; background:#ffffff10; color:#fff; padding:0 10px; font:inherit; font-weight:800; }
.gift-adm .action-row { display:flex; gap:8px; margin-top:8px; align-items:center; flex-wrap:wrap; }
.gift-adm .r-sub.red { color:#ff8f9c; }
