:root {
  --bg: #0b0d14;
  --bg2: #12162a;
  --panel: rgba(20, 24, 40, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f1f3ff;
  --muted: #8f96b8;
  --gold: #ffcc4d;
  --gold2: #ff9f1c;
  --green: #3ddc84;
  --red: #ff4d6d;
  --blue: #5b8cff;
  --gram: #7aa2ff; /* GRAM balance accent (Stars use --gold) */
  --purple: #9b6bff;
  --easy: #3ddc84;
  --medium: #ffcc4d;
  --hard: #ff8c42;
  --extreme: #ff4d6d;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1d2452 0%, var(--bg) 55%);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }

#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ───────── top bar ───────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px; gap: 10px;
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, #2b3468, #171c3a); border: 1px solid var(--panel-border);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.who-text .name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.who-text .sub { font-size: 11px; color: var(--muted); }
.bal-wrap { display: flex; align-items: center; gap: 6px; }
.cur-toggle {
  width: 36px; height: 36px; border-radius: 12px; font-size: 15px; font-weight: 800;
  background: rgba(255,255,255,.08); border: 1px solid var(--panel-border); transition: transform .15s;
}
.cur-toggle:active { transform: scale(.92); }
.cur-toggle.gram { background: linear-gradient(135deg, rgba(91,140,255,.25), rgba(155,107,255,.18)); border-color: rgba(120,160,255,.5); }
.balance {
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,204,77,.18), rgba(255,159,28,.10));
  border: 1px solid rgba(255,204,77,.35); font-weight: 800; font-size: 16px;
  box-shadow: 0 0 0 0 rgba(255,204,77,.4); transition: transform .15s;
}
.balance:active { transform: scale(.96); }
.balance .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #2a1a00; display: grid; place-items: center; font-weight: 900; }
.balance.bump { animation: bump .45s ease; }
/* Playing with GRAM: the header balance turns blue so it never reads as Stars */
body.cur-gram .balance { background: linear-gradient(135deg, rgba(91,140,255,.22), rgba(155,107,255,.12)); border-color: rgba(122,162,255,.5); }
body.cur-gram .balance .plus { background: var(--gram); color: #0b1330; }
body.cur-gram .balance.bump { animation-name: bumpGram; }
@keyframes bumpGram { 0% { transform: scale(1); } 30% { transform: scale(1.12); box-shadow: 0 0 24px rgba(122,162,255,.6); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.12); box-shadow: 0 0 24px rgba(255,204,77,.6); } 100% { transform: scale(1); } }

/* ───────── views ───────── */
.view { display: none; flex: 1; min-height: 0; flex-direction: column; }
.view.active { display: flex; }
.scroll { flex: 1; overflow-y: auto; padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 12px; }

/* ───────── stage ───────── */
.stage { position: relative; flex: 1; min-height: 0; margin: 0 10px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--panel-border); box-shadow: 0 10px 40px rgba(0,0,0,.45) inset, 0 6px 30px rgba(0,0,0,.35); background: #090b13; }
#game, #dropCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.overlay-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .12s; }
.overlay-flash.red { background: radial-gradient(circle at 50% 60%, rgba(255,77,109,.0) 30%, rgba(255,40,80,.55) 100%); opacity: 1; }
.overlay-flash.gold { background: radial-gradient(circle at 50% 50%, rgba(255,220,120,.45) 0%, rgba(255,204,77,0) 70%); opacity: 1; }
.big-text {
  position: absolute; left: 0; right: 0; top: 34%; text-align: center; pointer-events: none;
  font-size: 44px; font-weight: 900; letter-spacing: 1px; opacity: 0; transform: scale(.6);
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.big-text.show { animation: pop 1.4s cubic-bezier(.2,.9,.2,1) forwards; }
.big-text.long { font-size: 30px; }
.big-text.win { color: var(--gold); text-shadow: 0 0 30px rgba(255,204,77,.8), 0 4px 24px rgba(0,0,0,.6); }
.big-text.lose { color: var(--red); text-shadow: 0 0 30px rgba(255,77,109,.8), 0 4px 24px rgba(0,0,0,.6); }
@keyframes pop { 0% { opacity: 0; transform: scale(.5) translateY(20px); } 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1) translateY(-30px); } }

.ladder { position: absolute; left: 10px; top: 12px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.ladder .step { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.45); color: var(--muted); border: 1px solid rgba(255,255,255,.06); transition: all .25s; }
.ladder .step.next { color: #fff; background: rgba(91,140,255,.35); border-color: rgba(91,140,255,.6); transform: scale(1.06); }
.ladder .step.done { color: var(--green); }
.depth { position: absolute; right: 10px; top: 12px; display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.06); pointer-events: none; }
.depth .d-label { font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.depth .d-val { font-size: 20px; font-weight: 900; }
.sound-btn { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.06); font-size: 16px; }

/* ───────── panel ───────── */
.panel {
  margin: 10px 10px calc(8px); padding: 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -6px 30px rgba(0,0,0,.35);
}
.controls { display: flex; flex-direction: column; gap: 10px; }
.bet-row { display: flex; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.field label { font-size: 11px; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; font-weight: 700; }
.field input, .inline input {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--panel-border); background: rgba(0,0,0,.35); outline: none; font-weight: 700; font-size: 16px;
}
.field input:focus, .inline input:focus { border-color: var(--blue); }
.bet-input { display: flex; align-items: center; gap: 6px; }
.bet-input input { text-align: center; -moz-appearance: textfield; }
.bet-input input::-webkit-inner-spin-button { display: none; }
.mini { width: 40px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 20px; font-weight: 800; flex-shrink: 0; }
.mini:active { background: rgba(255,255,255,.16); }
.chips { display: flex; gap: 6px; padding-bottom: 1px; }
.chip { padding: 0 10px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); font-weight: 800; font-size: 13px; }
.chip:active { background: rgba(255,255,255,.16); }
.risk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.risk { display: flex; flex-direction: column; align-items: center; padding: 7px 4px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid transparent; transition: all .18s; }
.risk b { font-size: 12px; }
.risk small { font-size: 10px; color: var(--muted); }
.risk.easy.active { background: rgba(61,220,132,.16); border-color: var(--easy); box-shadow: 0 0 16px rgba(61,220,132,.35); }
.risk.medium.active { background: rgba(255,204,77,.16); border-color: var(--medium); box-shadow: 0 0 16px rgba(255,204,77,.35); }
.risk.hard.active { background: rgba(255,140,66,.16); border-color: var(--hard); box-shadow: 0 0 16px rgba(255,140,66,.35); }
.risk.extreme.active { background: rgba(255,77,109,.16); border-color: var(--extreme); box-shadow: 0 0 16px rgba(255,77,109,.35); }

.btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 13px 16px; border-radius: 14px; font-weight: 900; font-size: 15px; letter-spacing: .5px;
  background: rgba(255,255,255,.1); transition: transform .12s, filter .12s; overflow: hidden;
}
.btn:active { transform: scale(.97); filter: brightness(1.1); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.big { padding: 16px; font-size: 17px; }
.btn.small { padding: 10px 14px; font-size: 13px; flex-shrink: 0; }
.btn.ghost { background: rgba(255,255,255,.06); }
.btn.primary { background: linear-gradient(135deg, #5b8cff, #9b6bff); color: #fff; box-shadow: 0 8px 26px rgba(91,140,255,.35); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 8px 26px rgba(91,140,255,.35); } 50% { box-shadow: 0 8px 34px rgba(155,107,255,.6); } }
.btn.primary::after, .btn.cash::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-20deg); animation: shine 2.8s linear infinite; }
@keyframes shine { 0% { left: -80%; } 40%, 100% { left: 130%; } }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.dig { background: linear-gradient(135deg, #3a4a8a, #23305f); color: #fff; border: 1px solid rgba(91,140,255,.4); padding: 16px 10px; }
.btn.cash { background: linear-gradient(135deg, #ffcc4d, #ff9f1c); color: #2a1a00; padding: 12px 10px; box-shadow: 0 8px 26px rgba(255,190,60,.35); }
.btn.cash small { font-size: 12px; font-weight: 800; opacity: .85; }

.mult-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px; }
.mult-now { font-size: 38px; font-weight: 900; line-height: 1; color: var(--gold); text-shadow: 0 0 20px rgba(255,204,77,.45); transition: transform .15s; }
.mult-now.bump { animation: multBump .4s ease; }
@keyframes multBump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.mult-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); text-align: right; }
.mult-meta b { color: var(--text); }

/* ───────── cards ───────── */
.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card p { margin: 0; line-height: 1.4; }
.card.hero { background: linear-gradient(135deg, rgba(255,204,77,.15), rgba(155,107,255,.15)); border-color: rgba(255,204,77,.3); }
.card.hero .hero-label, .card.hero .hero-sub { text-align: center; }
body.cur-gram .card.hero { background: linear-gradient(135deg, rgba(91,140,255,.16), rgba(155,107,255,.15)); border-color: rgba(122,162,255,.35); }
.bal-list { display: flex; flex-direction: column; gap: 8px; }
.bal-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.28);
  border: 1px solid transparent; transition: all .15s; width: 100%;
}
.bal-row:active { transform: scale(.985); }
.bal-row.active { border-color: var(--gold); background: rgba(255,204,77,.12); box-shadow: 0 0 18px rgba(255,204,77,.18); }
.br-cur { font-size: 13px; font-weight: 800; color: var(--muted); }
.bal-row.active .br-cur { color: var(--text); }
.br-amt { font-size: 22px; font-weight: 900; color: var(--gold); }
/* The GRAM row is blue: its amount always, its frame when it is the balance in play */
.bal-row[data-cur="gram"] .br-amt { color: var(--gram); }
.bal-row[data-cur="gram"].active { border-color: var(--gram); background: rgba(91,140,255,.12); box-shadow: 0 0 18px rgba(91,140,255,.2); }
.hero-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.hero-amount { font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 0 24px rgba(255,204,77,.4); }
.hero-sub { font-size: 12px; color: var(--muted); }
.hist-cur.gram { background: rgba(91,140,255,.18); color: var(--gram); }
.hist-cur.star { background: rgba(255,204,77,.15); color: var(--gold); }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(61,220,132,.15); color: var(--green); font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt { padding: 12px 6px; border-radius: 12px; background: rgba(255,255,255,.07); font-weight: 800; border: 1px solid transparent; transition: all .15s; }
.opt:active { transform: scale(.96); border-color: var(--gold); }
.inline { display: flex; gap: 8px; align-items: center; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row code { flex: 1; font-size: 12px; word-break: break-all; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.35); }
.copy { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.1); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.seg { display: flex; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.06); }
.seg button { flex: 1; padding: 10px; border-radius: 11px; font-weight: 800; color: var(--muted); }
.seg button.active { background: rgba(255,255,255,.12); color: var(--text); }
.wd-from { margin: 4px 0 10px; }
.wd-from button { font-size: 14px; padding: 9px 6px; }
.wd-preview { font-size: 13px; }
.wallet-chip { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: rgba(61,220,132,.1); border: 1px solid rgba(61,220,132,.35); }
.wallet-chip code { flex: 1; font-size: 11.5px; word-break: break-all; color: var(--green); }
.wc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex-shrink: 0; }
.manual { margin-top: 2px; }
.manual summary { cursor: pointer; padding: 6px 0; }
.manual > *:not(summary) { margin-top: 8px; }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid transparent; }
.gift:active { border-color: var(--gold); }
.gift .e { font-size: 28px; }
.gift .s { font-size: 12px; font-weight: 800; color: var(--gold); }
.gift.disabled { opacity: .4; }
.list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.25); gap: 8px; }
.row .l { display: flex; flex-direction: column; gap: 2px; }
.row .r { font-weight: 800; white-space: nowrap; }
.row .r.win { color: var(--green); }
.row .r.lose { color: var(--red); }
.row small { color: var(--muted); font-size: 11px; }
.row button { font-size: 11px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.1); }
.verify-box { font-size: 11px; color: var(--muted); padding: 8px 10px; background: rgba(0,0,0,.3); border-radius: 10px; word-break: break-all; line-height: 1.5; }

/* ───────── nav ───────── */
.nav { display: flex; padding: 6px 14px calc(8px + var(--safe-bottom)); gap: 6px; }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; font-size: 11px; font-weight: 700; color: var(--muted); }
.nav button span { font-size: 18px; }
.nav button.active { color: var(--text); background: rgba(255,255,255,.08); }

/* ───────── game picker ───────── */
.backbtn { width: 30px; height: 38px; font-size: 30px; font-weight: 300; line-height: 1; color: var(--muted); margin-left: -6px; }
.backbtn:active { color: var(--text); }
.game-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-border); background: var(--panel); transition: transform .15s; }
.game-card:active { transform: scale(.985); }
.gc-art { position: relative; height: 132px; overflow: hidden; display: grid; place-items: center; }
.gc-drop { background: radial-gradient(circle at 50% 120%, #4a2410 0%, #1a1026 60%, #0d0a18 100%); }
.gc-classic { background: radial-gradient(circle at 50% 0%, #1d2452 0%, #0d0f1c 70%); }
.gc-blocks { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 44px; gap: 3px; padding: 3px; opacity: .85; }
.gc-blocks i { border-radius: 3px; background: #4a4e5c; }
.gc-blocks i:nth-child(3n) { background: linear-gradient(160deg, #ffd54a, #c99a10); }
.gc-blocks i:nth-child(4n) { background: linear-gradient(160deg, #2ee88a, #17a35c); }
.gc-blocks i:nth-child(5n) { background: linear-gradient(160deg, #c4362a, #8c2b21); }
.gc-blocks i:nth-child(7n) { background: linear-gradient(160deg, #7fe9ff, #2fa8c7); }
.gc-shaft { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.gc-shaft i { width: 62px; height: 30px; border-radius: 6px; background: linear-gradient(180deg, #7c7f8a, #5d606a); }
.gc-pick { position: relative; font-size: 52px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.65)); animation: gcbob 2.4s ease-in-out infinite; }
@keyframes gcbob { 0%,100% { transform: translateY(-6px) rotate(-8deg); } 50% { transform: translateY(6px) rotate(8deg); } }
.gc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.gc-title { font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.gc-sub { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.gc-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.gc-meta b { color: var(--text); }
.badge { font-size: 9.5px; padding: 2px 7px; border-radius: 999px; font-weight: 900; letter-spacing: .5px; }
.badge.hot { background: linear-gradient(135deg, #ff4d3d, #ff9f1c); color: #fff; }

/* ───────── drop game HUD ───────── */
.drop-stage { overflow: hidden; }
.drop-hud { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.hp-box { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 10px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.08); }
.hp-label { font-size: 9px; letter-spacing: 2px; color: var(--muted); font-weight: 800; }
.hp-pips { display: flex; gap: 3px; }
.hp-pips i { width: 9px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #ff5d6e, #c22b3c); box-shadow: 0 0 8px rgba(255,80,100,.6); transition: all .3s; }
.hp-pips i.gone { background: #33353f; box-shadow: none; transform: scaleY(.55); opacity: .5; }
.hp-pips i.heal { animation: hpHeal .6s ease; }
@keyframes hpHeal {
  0% { transform: scale(.5); box-shadow: 0 0 0 rgba(255,80,100,0); }
  45% { transform: scale(1.5); box-shadow: 0 0 22px rgba(255,80,100,.95); }
  100% { transform: scale(1); }
}
.gold-box { padding: 5px 10px; border-radius: 10px; font-size: 11px; font-weight: 900; color: #3a2a00;
  background: linear-gradient(135deg, #ffd54a, #ff9f1c); box-shadow: 0 0 18px rgba(255,190,60,.5); animation: goldPulse 1.1s ease-in-out infinite; }
@keyframes goldPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.win-box { position: absolute; left: 50%; transform: translateX(-50%); top: 10px; text-align: center; padding: 7px 18px; border-radius: 12px;
  background: rgba(8,10,16,.72); border: 1px solid rgba(255,204,77,.4); pointer-events: none; backdrop-filter: blur(6px); }
.wb-label { font-size: 8.5px; letter-spacing: 2.5px; color: var(--muted); font-weight: 800; }
.wb-amount { font-size: 20px; font-weight: 900; color: var(--gold); line-height: 1.15; text-shadow: 0 0 18px rgba(255,204,77,.5); }
.wb-mult { font-size: 11px; font-weight: 800; color: var(--muted); }
.win-box.pop { animation: wbPop .35s ease; }
@keyframes wbPop { 0% { transform: translateX(-50%) scale(1); } 45% { transform: translateX(-50%) scale(1.13); } 100% { transform: translateX(-50%) scale(1); } }
.mladder { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column-reverse; gap: 3px; pointer-events: none; }
.mladder .ms { min-width: 42px; text-align: center; font-size: 10.5px; font-weight: 900; padding: 3px 6px; border-radius: 6px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.07); color: #6f7590; transition: all .25s; }
.mladder .ms.lit { color: #fff; transform: scale(1.1); }
.mladder .ms:nth-child(1).lit { background: #8c2b21; border-color: #ff6a4d; }
.mladder .ms:nth-child(2).lit { background: #8a4a12; border-color: #ffa63d; }
.mladder .ms:nth-child(3).lit { background: #8a7412; border-color: #ffd54a; }
.mladder .ms:nth-child(4).lit { background: #4a7a1c; border-color: #8ede3c; }
.mladder .ms:nth-child(5).lit { background: #177a4e; border-color: #2ee88a; }
.mladder .ms:nth-child(6).lit { background: #146b7a; border-color: #45d6f0; }
.mladder .ms:nth-child(7).lit { background: #1f3f96; border-color: #5b8cff; }
.mladder .ms:nth-child(8).lit { background: #5a2596; border-color: #b06bff; }
.mladder .ms:nth-child(9).lit { background: #8c1f6e; border-color: #ff5bd0; }
.col-hint { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.col-hint.chosen { color: var(--green); }

/* ───────── toast ───────── */
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%) translateY(20px); padding: 10px 16px; border-radius: 12px; background: rgba(20,24,40,.95); border: 1px solid var(--panel-border); font-size: 13px; font-weight: 700; opacity: 0; transition: all .25s; pointer-events: none; max-width: 90vw; text-align: center; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--red); color: #ffb3c0; }
.toast.ok { border-color: var(--green); color: #b8ffd6; }

@media (max-height: 640px) {
  .mult-now { font-size: 30px; }
  .btn.big { padding: 13px; }
}
