/* Volt prototype. Layout: Stake-style mobile casino inside a Telegram Mini App —
   top bar with balance + wallet, scrolling lobby/game page, two floating nav pills. */
:root {
  --bg: #0f1016;        /* app ground */
  --s1: #171821;        /* cards, game frame */
  --s2: #1f212d;        /* raised panels */
  --s3: #2c2f3e;        /* secondary buttons, chips */
  --s4: #3a3d4f;        /* hover / active secondary */
  --line: #262838;
  --well: rgba(0,0,0, .32); /* inputs */
  --fg: #efeff4;
  --fg2: #a9acbf;
  --fg3: #6e7187;
  --accent: #d4ff3a;     /* volt: main action and wins */
  --accent-2: #bce61c;
  --on-accent: #0b0c10;  /* text and icons on volt */
  --pick: #8b7bff;       /* spark violet: picks and selections that are not wins */
  --pick-2: #6c5ce7;
  --win: #d4ff3a;
  --loss: #ff5d63;
  --gold: #ffc337;
  --silver: #c8cad7;
  --r-ctl: 12px;
  --r-card: 16px;
  --r-sheet: 28px;
  --font: 'Figtree', 'Inter', -apple-system, system-ui, sans-serif;
  color-scheme: dark;
}
html, body { height: 100%; }
body { background: #07080c; color: var(--fg); font-family: var(--font); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* device */
#device { position: relative; width: 100%; max-width: 430px; height: 100%; margin: 0 auto; background: var(--bg); overflow: hidden; isolation: isolate; }
@media (min-width: 560px) {
  body { display: flex; align-items: center; justify-content: center; padding-block: 24px; }
  #device { width: 390px; height: min(844px, calc(100% - 0px)); border-radius: 44px; box-shadow: 0 0 0 1px #2b2d3b, 0 0 0 10px #13141c, 0 0 0 11px #2b2d3b, 0 40px 90px rgba(0,0,0,.6); }
}

/* telegram capsules */
.tg { position: absolute; left: 0; right: 0; top: 0; height: 48px; padding: 8px 12px 0; display: flex; justify-content: space-between; align-items: center; z-index: 60; pointer-events: none; }
.tg > * { pointer-events: auto; }
.tg-cap { height: 30px; padding: 0 13px; border-radius: 15px; background: rgba(41,43,54, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 600; color: #fff; }
.tg-cap svg { display: block; }

/* top bar */
.topbar { position: absolute; left: 0; right: 0; top: 48px; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 8px; background: var(--bg); z-index: 50; border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.logo { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 19px; letter-spacing: -.3px; font-style: italic; margin-right: auto; }
/* wordmark: Shrikhand, a heavy calligraphic italic (Google Fonts), white like a casino script logo */
.logo .wm { display: block; height: 31px; width: auto; overflow: visible; }
.wallet { display: flex; align-items: stretch; height: 40px; border-radius: var(--r-ctl); overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.wallet-bal { display: flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 700; font-size: 15px; }
.wallet-bal img { width: 18px; height: 18px; }
.wallet-bal .caret { color: var(--fg3); }
.wallet-btn { width: 44px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.avatar { width: 40px; height: 40px; border-radius: var(--r-ctl); background: var(--s3); display: grid; place-items: center; position: relative; }
.avatar .vip-dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 7px; background: #cd8b4a; box-shadow: 0 0 0 2px var(--bg); }

/* screens */
.screens { position: absolute; left: 0; right: 0; top: 104px; bottom: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 0 16px 110px; background: var(--bg); scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen[hidden] { display: none !important; }

/* nav pills */
.nav { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; justify-content: center; z-index: 75; pointer-events: none; }
.pill { pointer-events: auto; display: flex; gap: 4px; padding: 5px; border-radius: 30px; background: rgba(28,30,40, .88); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 10px 30px rgba(0,0,0,.5); }
.nav-btn { width: 50px; height: 50px; border-radius: 25px; display: grid; place-items: center; color: var(--fg2); position: relative; }
.nav-btn.on { background: var(--s4); color: #fff; }
.nav-btn .badge { position: absolute; top: 7px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--loss); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* generic */
.h-sec { display: flex; align-items: center; gap: 8px; margin: 22px 2px 12px; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.h-sec .chev { color: var(--fg3); }
.h-sec .ico { color: var(--fg2); display: grid; }
.h-sec .more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--fg2); }
.h-sec .count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--fg3); }
.card { background: var(--s1); border-radius: var(--r-card); }
.btn { height: 44px; border-radius: var(--r-ctl); padding: 0 16px; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px rgba(212,255,58,.22); }
.btn-accent:active { background: var(--accent-2); }
.btn-sec { background: var(--s3); color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg2); }
.btn[disabled] { opacity: .5; }
/* a dimmed volt reads as olive, so busy main buttons turn neutral instead */
.btn-accent[disabled], .btn-win[disabled] { opacity: 1; background: var(--s3); color: var(--fg3); box-shadow: none; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--fg2); font-size: 13px; font-weight: 600; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: var(--win); box-shadow: 0 0 6px var(--win); }
.coin { width: 1em !important; height: 1em !important; vertical-align: -.14em; flex: none; }
.gold { color: var(--fg); } /* money highlight; GRAM has no gold */
.muted { color: var(--fg2); }
.dim { color: var(--fg3); }
.win-c { color: var(--win); }
.loss-c { color: var(--loss); }

/* lobby */
.promo-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 2px; scroll-padding-left: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-row::-webkit-scrollbar { display: none; }
.promo { flex: none; width: 300px; height: 150px; border-radius: var(--r-card); background: var(--s1); display: grid; grid-template-columns: 112px 1fr; overflow: hidden; scroll-snap-align: start; }
.promo-art { position: relative; display: grid; place-items: center; }
.promo-art img { width: 92px; height: 92px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); }
.promo-body { padding: 14px 14px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.tag { align-self: flex-start; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; background: var(--fg); color: #0c0c11; }
.promo-title { font-size: 18px; line-height: 1.15; font-weight: 800; letter-spacing: -.2px; text-wrap: balance; }
.promo-sub { font-size: 13px; color: var(--fg2); margin-top: auto; }
.search { margin-top: 14px; height: 48px; border-radius: var(--r-ctl); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--fg3); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 15px; color: var(--fg); }
.search input::placeholder { color: var(--fg3); }
.cats { position: sticky; top: 0; z-index: 5; margin: 14px -16px 0; padding: 8px 16px; background: var(--bg); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; height: 40px; padding: 0 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--fg2); }
.cat.on { background: var(--s3); color: #fff; }
.orig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--r-card); overflow: hidden; display: block; text-align: left; isolation: isolate; }
.tile-art { position: absolute; inset: 0; }
.tile-name { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-size: 25px; font-weight: 900; letter-spacing: .5px; font-style: italic; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.tile-brand { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: 1.6px; opacity: .78; }
.tile-meta { margin-top: 7px; padding-left: 2px; }
.soon-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.soon-row::-webkit-scrollbar { display: none; }
.soon { flex: none; width: 104px; }
.soon .tile { aspect-ratio: 3 / 4; background: var(--s1); display: grid; place-items: center; }
.soon .tile span { font-weight: 900; font-style: italic; font-size: 15px; color: var(--fg3); letter-spacing: .4px; }
.soon .lock { position: absolute; top: 8px; right: 8px; color: var(--fg3); }
.race { padding: 14px; display: grid; gap: 12px; }
.race-top { display: flex; align-items: center; gap: 12px; }
.race-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; flex: none; }
.race-t { font-weight: 800; font-size: 16px; }
.race-s { font-size: 13px; color: var(--fg2); margin-top: 2px; }
.race-timer { margin-left: auto; text-align: right; font-weight: 800; font-size: 15px; }
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* bets table */
.seg { display: flex; padding: 4px; border-radius: 26px; background: var(--s1); gap: 4px; }
.seg button { flex: 1; height: 40px; border-radius: 22px; font-weight: 700; font-size: 14px; color: var(--fg2); }
.seg button.on { background: var(--s3); color: #fff; }
.bets { margin-top: 10px; }
.bets-head, .bet-row { display: grid; grid-template-columns: 1fr 86px 92px; align-items: center; gap: 8px; padding: 0 14px; }
.bets-head { height: 44px; border-radius: 12px; background: var(--s1); font-size: 13px; font-weight: 700; color: var(--fg2); }
.bets-head span:nth-child(n+2), .bet-row span:nth-child(n+2) { text-align: right; }
.bet-row { height: 50px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.bet-row .g { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bet-row .g b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.bet-row .g svg { flex: none; color: var(--fg3); }
.bet-row .u { color: var(--fg2); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-row .p { display: inline-flex; justify-content: flex-end; align-items: center; gap: 5px; }
.bet-row .p img { width: 18px; height: 18px; }
.foot { margin: 28px 2px 0; display: grid; gap: 10px; color: var(--fg3); font-size: 12px; line-height: 1.5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--fg2); font-weight: 600; font-size: 13px; }
.age { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 15px; box-shadow: inset 0 0 0 1.5px var(--fg3); font-weight: 800; font-size: 11px; color: var(--fg2); }

/* game frame */
.gframe { margin-top: 4px; background: var(--s1); border-radius: var(--r-card) var(--r-card) 0 0; position: relative; overflow: hidden; }
.gctl { background: var(--s2); border-radius: 0 0 var(--r-card) var(--r-card); padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gctl > *, .sheet-body > *, .ginfo > *, .race > *, .pair > * { min-width: 0; }
.gbar { margin-top: 10px; display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: var(--r-card); background: var(--s1); }
.gbar .icon-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--fg2); }
.gbar .fair { margin-left: auto; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--s3); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
/* newest chip first in the DOM, drawn at the right edge; the oldest fall off the left */
.history { position: absolute; top: 10px; right: 10px; left: 10px; display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: 5px; z-index: 6; height: 28px; overflow: hidden; }
.hchip { flex: none; height: 28px; min-width: 40px; padding: 0 8px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 800; background: var(--s3); color: var(--fg2); }
.hchip.w { background: var(--win); color: var(--on-accent); }
.hchip img { width: 18px; height: 18px; }
.field-lbl { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--fg2); margin-bottom: 6px; }
.amount { display: flex; height: 44px; border-radius: var(--r-ctl); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.amount label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
.amount label img { width: 18px; height: 18px; }
.amount input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-weight: 700; font-size: 16px; }
.amount .mod { width: 48px; background: var(--s3); font-weight: 700; color: var(--fg); border-left: 1px solid rgba(0,0,0,.25); }
.amount .mod:last-child { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ro { height: 44px; border-radius: var(--r-ctl); background: var(--well); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-weight: 700; font-size: 15px; min-width: 0; }
.ro img { width: 22px; height: 22px; flex: none; }
.ro span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode { display: flex; padding: 4px; border-radius: 24px; background: var(--s1); }
.mode button { flex: 1; height: 38px; border-radius: 20px; font-weight: 700; font-size: 14px; color: var(--fg2); }
.mode button.on { background: var(--s3); color: #fff; }
.play { height: 52px; font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.picker { display: flex; gap: 8px; overflow-x: auto; margin: 0 -12px; padding: 2px 12px 4px; scroll-padding-left: 12px; scrollbar-width: none; }
.picker::-webkit-scrollbar { display: none; }
.pick { flex: none; width: 78px; padding: 8px 4px 7px; border-radius: 14px; background: var(--s1); display: grid; justify-items: center; gap: 3px; box-shadow: inset 0 0 0 1.5px transparent; }
.pick img { width: 44px; height: 44px; }
.pick .pn { font-size: 11px; font-weight: 700; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.pick .pp { font-size: 12px; font-weight: 800; color: var(--fg); display: inline-flex; gap: 3px; align-items: center; }
.pick .pc { font-size: 11px; font-weight: 800; color: var(--fg3); }
.pick.on { background: rgba(212,255,58,.10); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pick.on .pc { color: #b5acff; }
.ginfo { margin-top: 10px; padding: 14px; display: grid; gap: 12px; }
.prov { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.prov-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 13px; }
.prov-logo.volt { background: var(--accent); color: var(--on-accent); }
.vmark { font-family: 'Shrikhand', var(--font); font-style: normal; font-weight: 400; font-size: 27px; line-height: 1; padding-top: 6px; }
.prov b { display: block; font-size: 16px; }
.prov small { color: var(--fg2); font-size: 13px; font-weight: 600; }
.heart { margin-left: auto; width: 44px; height: 40px; border-radius: 10px; background: var(--s3); display: grid; place-items: center; }
.gname { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 26px; padding: 0 10px; border-radius: 13px; background: var(--s3); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.desc { font-size: 14px; line-height: 1.55; color: var(--fg2); max-width: 62ch; }

/* claw machine */
.machine { position: relative; height: 330px; }
.glass { position: absolute; left: 14px; right: 14px; top: 46px; bottom: 16px; border-radius: 18px; background: radial-gradient(120% 70% at 50% 100%, rgba(139,123,255,.18), transparent 60%), linear-gradient(180deg, #12131c, #0c0d12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); overflow: hidden; }
.rail { position: absolute; left: 14px; right: 14px; top: 16px; height: 4px; border-radius: 2px; background: linear-gradient(180deg, #d8d9e3, #7f8192); }
.carriage { position: absolute; top: 9px; width: 34px; height: 16px; border-radius: 6px; background: linear-gradient(180deg, #e9eaf0, #8f91a0); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.cable { position: absolute; top: 24px; width: 2px; background: linear-gradient(90deg, #7e808e, #eaebf1, #7e808e); }
.claw { position: absolute; width: 46px; height: 40px; }
.chute { position: absolute; left: 12px; bottom: 10px; width: 70px; height: 96px; border-radius: 12px; background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.55)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); display: grid; place-items: end center; padding-bottom: 10px; }
.chute span { height: 20px; padding: 0 8px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: var(--fg2); display: inline-flex; align-items: center; }
.chute.flash span { background: var(--win); color: #0b0c10; }
.gift { position: absolute; width: 58px; height: 58px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.gift.target { filter: drop-shadow(0 0 3px rgba(255,255,255,.8)) drop-shadow(0 0 12px rgba(139,123,255,.95)); }
.tip { position: absolute; z-index: 8; padding: 6px 10px; border-radius: 10px; background: rgba(21,22,31,.94); box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.08); text-align: center; white-space: nowrap; transform: translateX(-50%); }
.tip b { display: block; font-size: 13px; }
.tip small { font-size: 12px; font-weight: 700; color: #b5acff; }
.result { position: absolute; left: 50%; top: 46%; z-index: 9; min-width: 150px; padding: 12px 16px; border-radius: 16px; background: rgba(17,18,25,.96); box-shadow: inset 0 0 0 2px var(--win), 0 18px 40px rgba(0,0,0,.6); text-align: center; transform: translate(-50%, -50%); }
.result.lose { box-shadow: inset 0 0 0 2px var(--s4), 0 18px 40px rgba(0,0,0,.6); }
.result .big { font-size: 26px; font-weight: 900; color: var(--win); }
.result.lose .big { color: var(--fg); }
.result .small { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--fg2); display: inline-flex; align-items: center; gap: 4px; }
.result img.rg { width: 54px; height: 54px; display: block; margin: 0 auto 4px; }

/* upgrade */
.up-top { display: grid; grid-template-columns: 1fr 36px 1fr; align-items: center; gap: 0; padding: 50px 12px 0; }
.up-card { height: 108px; border-radius: 14px; background: var(--s2); padding: 10px; display: grid; grid-template-rows: auto 1fr auto; position: relative; overflow: hidden; }
.up-card small { font-size: 11px; font-weight: 800; letter-spacing: .8px; color: var(--fg3); }
.up-card b { font-size: 19px; font-weight: 900; display: inline-flex; align-items: center; gap: 5px; align-self: end; }
.up-card img.big { position: absolute; right: 6px; top: 22px; width: 62px; height: 62px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.5)); }
.up-card.lost { box-shadow: inset 0 0 0 1px rgba(255,93,99, .55); }
.up-card.lost small { color: var(--loss); }
.up-card.lost img.big { filter: grayscale(1) brightness(.55); }
.up-card.lost b { color: var(--fg3); }
.up-card .nm { font-size: 12px; font-weight: 700; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-arrow { width: 32px; height: 32px; border-radius: 16px; background: var(--s3); display: grid; place-items: center; margin: 0 2px; z-index: 2; box-shadow: 0 0 0 4px var(--s1); }
.roll { text-align: center; padding: 22px 0 6px; }
.roll .v { font-size: 56px; line-height: 1; font-weight: 900; letter-spacing: -1px; }
.roll .v.w { color: var(--win); }
.roll .v.l { color: var(--loss); }
.roll small { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--fg2); }
.track { position: relative; margin: 26px 18px 30px; height: 14px; border-radius: 7px; background: var(--loss); }
.track .zone { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px 0 0 7px; background: var(--win); }
.track .marker { position: absolute; top: -34px; width: 58px; height: 30px; margin-left: -29px; border-radius: 8px; background: #fff; color: #0c0c11; font-size: 13px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.track .marker::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.track .ticks { position: absolute; left: 0; right: 0; top: 20px; display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--fg3); }
.track-wrap { position: relative; padding: 0 0 14px; }
.inv-toggle { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--fg2); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--s3); position: relative; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; }
.switch.on { background: var(--accent); }
.switch.on i { left: 21px; background: var(--on-accent); }

/* sheets */
.backdrop { position: absolute; inset: 0; background: rgba(4,5,9, .62); z-index: 70; opacity: 0; }
.sheet { position: absolute; left: 6px; right: 6px; bottom: 80px; max-height: calc(100% - 150px); z-index: 71; background: var(--s1); border-radius: var(--r-sheet); box-shadow: 0 -10px 40px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.05); display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.sheet-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.sheet-head .x { margin-left: auto; width: 36px; height: 36px; border-radius: 18px; background: var(--s3); display: grid; place-items: center; }
.sheet-body { overflow-y: auto; padding: 4px 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; gap: 12px; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--s2); text-align: left; box-shadow: inset 0 0 0 1.5px transparent; }
.method.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.method .mi { width: 40px; height: 40px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; flex: none; }
.method .mi img { width: 26px; height: 26px; }
.method b { font-size: 15px; }
.method small { display: block; color: var(--fg2); font-size: 12px; font-weight: 600; margin-top: 2px; }
.method .rt { margin-left: auto; color: var(--fg3); }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.presets button { height: 40px; border-radius: 10px; background: var(--s3); font-weight: 800; font-size: 14px; }
.presets button.on { background: var(--accent); color: var(--on-accent); }
.bonus { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(139,123,255,.22), rgba(139,123,255,.06)); box-shadow: inset 0 0 0 1px rgba(139,123,255,.4); font-size: 14px; font-weight: 700; }
.bonus img { width: 30px; height: 30px; }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-item { border-radius: 14px; background: var(--s2); padding: 10px 6px 8px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.inv-item img { width: 54px; height: 54px; }
.inv-item b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.inv-item .pp { font-size: 13px; font-weight: 800; color: var(--fg); display: inline-flex; gap: 3px; align-items: center; }
.inv-item button { margin-top: 2px; width: 100%; height: 30px; border-radius: 9px; background: var(--s3); font-size: 12px; font-weight: 800; }
.inv-item.new { box-shadow: inset 0 0 0 1.5px var(--win); }
.vip { padding: 14px; border-radius: 16px; background: radial-gradient(120% 90% at 100% 0%, rgba(205,139,74,.28), transparent 60%), var(--s2); display: grid; gap: 10px; }
.vip-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--fg2); }
.vip-level { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; }
.vip-badge { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, #e7a565, #9b5b26); display: grid; place-items: center; }
.reward { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--s2); }
.reward .ri { width: 44px; height: 44px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; flex: none; }
.reward .ri img { width: 30px; height: 30px; }
.reward b { font-size: 15px; display: block; }
.reward small { color: var(--fg2); font-size: 12px; font-weight: 600; }
.reward .btn { margin-left: auto; height: 36px; padding: 0 14px; font-size: 13px; }
.chat-list { display: grid; gap: 8px; }
.msg { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; }
.msg .av { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #0c0c11; }
.msg .bubble { background: var(--s2); border-radius: 4px 14px 14px 14px; padding: 8px 10px; font-size: 14px; line-height: 1.4; }
.msg .bubble b { font-size: 13px; margin-right: 6px; }
.msg .lvl { font-size: 10px; font-weight: 900; padding: 1px 5px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.msg.me .bubble { background: rgba(139,123,255,.2); }
.msg-sys { text-align: center; font-size: 12px; font-weight: 700; color: var(--fg3); }
.chat-in { display: flex; gap: 8px; padding: 10px 16px 16px; border-top: 1px solid var(--line); }
.chat-in input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); border: 0; outline: none; padding: 0 12px; font-size: 15px; }
.chat-meta { display: flex; justify-content: space-between; padding: 0 16px 8px; font-size: 12px; font-weight: 700; color: var(--fg2); }
.menu-sec { font-size: 12px; font-weight: 800; letter-spacing: .6px; color: var(--fg3); text-transform: uppercase; margin: 6px 4px -4px; }
.menu-list { border-radius: 14px; background: var(--s2); overflow: hidden; }
.menu-item { width: 100%; height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 15px; font-weight: 700; text-align: left; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item svg { color: var(--fg2); flex: none; }
.menu-item .rt { margin-left: auto; color: var(--fg3); font-size: 13px; font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--fg2); font-weight: 700; }
.kv code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; color: var(--fg); }

/* toasts, win pop */
.toasts { position: absolute; left: 10px; right: 10px; top: 110px; z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(31,33,45,.97); box-shadow: 0 12px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.07); font-size: 14px; font-weight: 700; }
.toast img { width: 34px; height: 34px; }
.toast small { display: block; color: var(--fg2); font-size: 12px; font-weight: 600; }
.toast.w { box-shadow: 0 12px 30px rgba(0,0,0,.5), inset 0 0 0 1.5px var(--win); }
.dropdown { position: absolute; top: 104px; right: 64px; width: 230px; z-index: 72; border-radius: 16px; background: var(--s2); box-shadow: 0 16px 40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.07); padding: 6px; display: grid; gap: 2px; }
.dd-item { height: 46px; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 700; font-size: 15px; text-align: left; }
.dd-item img { width: 20px; height: 20px; }
.dd-item .rt { margin-left: auto; }
.dd-item.on { background: var(--s3); }
.touch-dot { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 22px; background: rgba(255,255,255,.28); box-shadow: 0 0 0 2px rgba(255,255,255,.55); z-index: 200; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .live::before { box-shadow: none; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- catalogue: tiles, rows, grid ---------- */
.tile { container-type: inline-size; background: var(--s1); }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(180deg, transparent, rgba(6,6,11, .82)); pointer-events: none; }
.tile .tile-name { bottom: 13cqw; font-size: 13.5cqw; line-height: 1.02; padding: 0 6cqw; text-wrap: balance; text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 4px 14px rgba(0,0,0,.5); }
.tile .tile-brand { bottom: 6cqw; font-size: 5.2cqw; letter-spacing: .3em; }
.tcell { min-width: 0; }
.tcell .tile-meta { margin-top: 6px; }
.tcell .live { font-size: 12px; }
.row-tiles { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scroll-padding-left: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.row-tiles::-webkit-scrollbar { display: none; }
.row-tiles .tcell { flex: none; width: calc((100% - 16px) / 3.25); scroll-snap-align: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.h-sec .more { margin-left: auto; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--s1); font-size: 13px; font-weight: 700; color: var(--fg2); display: inline-flex; align-items: center; }
button.search { width: 100%; text-align: left; }
button.search span:first-of-type { flex: 1; font-size: 15px; }
.search-n { font-size: 13px; font-weight: 700; color: var(--fg3); }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 2px 0; }
.cat-head h1 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.4px; }
.btn-win { background: var(--win); color: var(--on-accent); box-shadow: 0 6px 18px rgba(212,255,58,.26); }
.btn.play svg { flex: none; }

/* ---------- full-screen games: page + overlay ---------- */
.lp-frame { aspect-ratio: 4 / 3; }
.lp-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6,6,11,.85)); }
.lp-tag { position: absolute; top: 12px; left: 12px; z-index: 2; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(11,12,17,.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; }
.lp-title { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; }
.lp-title b { display: block; font-size: 28px; font-weight: 900; font-style: italic; letter-spacing: -.3px; line-height: 1.05; text-shadow: 0 3px 14px rgba(0,0,0,.6); }
.lp-title small { font-size: 12px; font-weight: 800; letter-spacing: .2em; color: var(--fg2); }
.lp-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--fg2); }
.ro img + img { margin-left: -10px; }
.fs { position: absolute; inset: 0; z-index: 85; background: #05060b; overflow: hidden; opacity: 0; }
.fs-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) brightness(.45) saturate(1.3); }
.fs-art { position: absolute; left: 50%; top: 50%; width: 118%; max-width: none; transform: translate(-50%, -50%) scale(1.02); filter: drop-shadow(0 20px 40px rgba(0,0,0,.6)); }
.fs-hud { position: absolute; left: 12px; right: 12px; top: 54px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.fs-hud b { font-size: 16px; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.fs-x { width: 38px; height: 38px; border-radius: 19px; background: rgba(11,12,17,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; }
.fs-bal { margin-left: auto; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(11,12,17,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; }
.fs-bal img { width: 16px; height: 16px; }
.fs-load { position: absolute; left: 50px; right: 50px; bottom: 120px; z-index: 3; display: grid; gap: 10px; text-align: center; }
.fs-load small { font-size: 13px; font-weight: 700; color: var(--fg2); }
.fs-ready { position: absolute; left: 16px; right: 16px; bottom: 34px; z-index: 3; padding: 14px 16px; border-radius: 16px; background: rgba(11,12,17,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); display: grid; gap: 4px; }
.fs-ready b { font-size: 15px; }
.fs-ready span { font-size: 13px; line-height: 1.45; color: var(--fg2); }
#device.fs-on .tg { z-index: 96; }

/* ---------- bottom bar: four labelled tabs (Stepan 11-24: Главная, Инвентарь, Профиль, Задания) ---------- */
.nav { left: 12px; right: 12px; }
.pill.tabs { flex: 1; gap: 2px; border-radius: 30px; }
.tabs .nav-btn { flex: 1; width: auto; height: 54px; border-radius: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; letter-spacing: .1px; }
.tabs .nav-btn.on svg { color: var(--accent); }
.tabs .nav-btn .badge { top: 4px; right: auto; left: calc(50% + 7px); }
.nav-btn .badge[hidden] { display: none; }

/* ---------- tab screens ---------- */
.page-title { margin: 16px 2px 12px; font-size: 26px; font-weight: 900; letter-spacing: -.4px; }
.page-note { margin: 12px 2px 0; font-size: 13px; line-height: 1.5; color: var(--fg3); }
.screen .menu-sec { margin: 6px 4px 0; }
.screen .menu-list { margin: 10px 0 16px; }
.inv-sum { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.inv-sum small, .bal-card small { display: block; font-size: 12px; font-weight: 700; color: var(--fg2); }
.inv-sum b { font-size: 20px; font-weight: 900; display: inline-flex; align-items: center; gap: 5px; }
.inv-sum .pair { grid-column: 1 / -1; }
.empty { padding: 22px 16px 16px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.empty img { width: 72px; height: 72px; }
.empty b { font-size: 17px; }
.empty span { font-size: 13px; color: var(--fg2); line-height: 1.5; max-width: 30ch; }
.empty .pair { width: 100%; margin-top: 10px; }
.prof { display: flex; align-items: center; gap: 12px; margin: 16px 2px 14px; }
.pav { width: 56px; height: 56px; border-radius: 28px; background: linear-gradient(140deg, var(--pick), var(--pick-2)); display: grid; place-items: center; font-size: 24px; font-weight: 900; flex: none; }
.prof b { display: block; font-size: 20px; font-weight: 900; }
.prof small { font-size: 13px; font-weight: 600; color: var(--fg2); }
.bal-card { margin-top: 12px; padding: 14px; display: grid; gap: 4px; }
.bal-card b { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 900; }
.bal-card em { font-style: normal; font-size: 15px; font-weight: 800; color: var(--fg2); }
.bal-card .pair { margin-top: 10px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 18px; }
.stats3 > div { padding: 12px 10px; border-radius: 14px; background: var(--s1); }
.stats3 b { display: block; font-size: 20px; font-weight: 900; }
.stats3 small { font-size: 12px; font-weight: 600; color: var(--fg2); }
.tk-list { display: grid; gap: 8px; margin: 10px 0 18px; }
.reward > div { flex: 1; min-width: 0; }
.task small { display: block; margin-top: 1px; }
.task .bar { margin-top: 8px; height: 5px; }
.tk-prize { flex: none; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--s3); display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; }
.tk-ok { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--fg3); }
.task.got b { color: var(--fg2); }
.task.got .bar > i { background: var(--fg3); }

/* ---------- speed: every press answers in the same frame (team chat 11-24: «в стейке всё моментально») ---------- */
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:not([disabled]):active, .tile:active, .nav-btn:active, .pick:active, .menu-item:active, .method:active, .mod:active,
.seg button:active, .icon-btn:active, .presets button:active, .drop:active, .inv-item button:active { transform: scale(.96); }
.gbar .icon-btn.on { color: var(--accent); background: rgba(212,255,58,.1); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--s2); }
.set-row > div { flex: 1; min-width: 0; }
.set-row b { display: block; font-size: 15px; }
.set-row small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--fg2); }
.switch[disabled] { opacity: .45; }

/* ---------- live drops: the NFT-casino strip of gifts just won ---------- */
.drops { display: flex; align-items: center; gap: 8px; margin: 10px -16px 0 0; }
.drops + .promo-row { margin-top: 8px; }
.drops-live { flex: none; width: 44px; display: grid; justify-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--fg2); }
.drops-live i { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 4px rgba(212,255,58,.16); }
.drops-row { flex: 1; min-width: 0; display: flex; gap: 6px; overflow: hidden; padding-right: 16px; }
.drop { flex: none; width: 58px; height: 70px; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, var(--s1)), var(--s1) 70%); box-shadow: inset 0 2px 0 var(--rc); display: grid; justify-items: center; align-content: center; gap: 3px; }
.drop img { width: 36px; height: 36px; }
.drop span { font-size: 11px; font-weight: 800; color: var(--fg); }
.drop.me { box-shadow: inset 0 2px 0 var(--rc), inset 0 0 0 1.5px var(--accent); }
.inv-act { display: flex; gap: 4px; width: 100%; margin-top: 2px; }
.inv-act button { margin-top: 0; }
.inv-act button:first-child { flex: 1; width: auto; }
.inv-act button[data-up] { flex: none; width: 34px; display: grid; place-items: center; color: var(--fg2); }
