/* Dogemast — minimal dark casino UI. Flat surfaces, thin borders, sharp corners, one accent. */
:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --bg-2: #0e131c;
  --panel: #111723;
  --card: #151c29;
  --card-2: #1a2231;
  --raise: #212a3a;
  --raise-2: #2a3446;
  --line: #1d2533;
  --line-2: #283244;
  --text: #e6ebf2;
  --muted: #8a96a8;
  --dim: #5b677a;
  --accent: #f2b544;
  --accent-hi: #f7c565;
  --accent-ink: #1a1305;
  --win: #2fd27f;
  --win-ink: #04140b;
  --win-soft: rgba(47, 210, 127, .12);
  --lose: #f0505f;
  --lose-soft: rgba(240, 80, 95, .12);
  --warn: #f0a23c;
  --info: #6aa6f8;
  --r: 6px;
  --r-sm: 4px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .4);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 160ms var(--ease);
  --top: 58px;
  --side: 224px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(242, 181, 68, .3); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.win { color: var(--win); }
.lose { color: var(--lose); }
.hidden, [hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; }

* { scrollbar-width: thin; scrollbar-color: var(--raise) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--raise); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- buttons and fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--raise); color: var(--text); font-weight: 600;
  transition: background var(--t), color var(--t), opacity var(--t), transform var(--t);
  user-select: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--raise-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn-win { background: var(--win); color: var(--win-ink); }
.btn-win:hover:not(:disabled) { background: #48dd92; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--card-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 48px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field-top .val { color: var(--dim); font-weight: 500; }
.input {
  display: flex; align-items: center; height: 40px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); transition: border-color var(--t); overflow: hidden;
}
.input:focus-within { border-color: #4a5a74; }
.input input, .input select {
  flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0 12px; background: transparent; border: 0; outline: none;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.input select { appearance: none; cursor: pointer; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a96a8' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input select option { background: var(--card); color: var(--text); }
.input .suffix { display: flex; align-items: center; padding: 0 10px 0 0; color: var(--dim); font-weight: 600; }
.input .side { display: flex; height: 100%; border-left: 1px solid var(--line-2); }
.input .side button { min-width: 42px; padding: 0 10px; font-weight: 600; color: var(--muted); background: var(--card); transition: background var(--t), color var(--t); }
.input .side button + button { border-left: 1px solid var(--line-2); }
.input .side button:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.input.is-locked { opacity: .6; }
.input.readonly input { color: var(--muted); }

.seg { display: flex; padding: 2px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); gap: 2px; }
.seg button { flex: 1; height: 32px; border-radius: 3px; color: var(--muted); font-weight: 600; font-size: 13px; transition: background var(--t), color var(--t); }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { background: var(--raise); color: var(--text); }
.seg button:disabled { opacity: .5; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 3px; font-size: 11.5px; font-weight: 600; background: var(--raise); color: var(--muted); white-space: nowrap; }
.chip.win { background: var(--win-soft); color: var(--win); }
.chip.lose { background: var(--lose-soft); color: var(--lose); }
.chip.warn { background: rgba(240, 162, 60, .12); color: var(--warn); }
.chip.info { background: rgba(106, 166, 248, .12); color: var(--info); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line-2); border-left-width: 3px; color: var(--muted); font-size: 13px; }
.notice svg { flex: none; margin-top: 1px; color: var(--info); }
.notice strong { color: var(--text); display: block; margin-bottom: 2px; font-weight: 600; }
.notice.warn { border-left-color: var(--warn); }
.notice.warn svg { color: var(--warn); }
.notice.error { border-left-color: var(--lose); }
.notice.error svg { color: var(--lose); }

.skeleton { position: relative; overflow: hidden; background: var(--card-2); border-radius: var(--r-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .04), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------------------------------------------------------------- app shell */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.1px; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.topbar .menu-btn { display: none; }
.topbar .spacer { flex: 1; }
.topbar-center { position: absolute; left: 50%; transform: translateX(-50%); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); transition: background var(--t), color var(--t); }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.badge { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--lose); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg-2); animation: pop .2s var(--ease); }
@keyframes pop { from { transform: scale(.5); } }

.balance { display: flex; align-items: center; height: 38px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; transition: border-color .3s var(--ease); }
.balance-amount { display: flex; align-items: center; gap: 4px; height: 100%; padding: 0 14px; font-weight: 700; font-size: 14.5px; transition: color .3s var(--ease); }
.balance-amount .cur { color: var(--dim); font-weight: 600; }
.balance-plus { width: 38px; height: 100%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transition: background var(--t); }
.balance-plus:hover { background: var(--accent-hi); }
.balance-plus svg { width: 18px; height: 18px; }
.balance.flash-up { border-color: var(--win); }
.balance.flash-up .balance-amount { color: var(--win); }
.balance.flash-down { border-color: var(--lose); }
.balance.flash-down .balance-amount { color: var(--lose); }

/* odometer: each digit is a strip of 0-9 that rolls to its value */
.odo { display: inline-flex; align-items: flex-start; height: 1.25em; line-height: 1.25em; overflow: hidden; font-variant-numeric: tabular-nums; }
.odo-d { display: inline-block; width: 1ch; height: 1.25em; overflow: hidden; }
.odo-s { display: flex; flex-direction: column; transition: transform 750ms cubic-bezier(.16, .9, .24, 1); will-change: transform; }
.odo-s > span { height: 1.25em; text-align: center; }
.odo-c { display: inline-block; }

.user-btn { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 4px; border-radius: var(--r-sm); transition: background var(--t); }
.user-btn:hover { background: var(--card-2); }
.user-btn .name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; flex: none; }
.avatar.lg { width: 60px; height: 60px; font-size: 21px; }

.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100vh - var(--top)); }
.sidebar { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 12px 10px; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.nav-label { padding: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.nav-item { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; transition: background var(--t), color var(--t); position: relative; width: 100%; text-align: left; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--card-2); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 2px; background: var(--accent); }
.nav-item .gi { width: 18px; height: 18px; color: var(--dim); transition: color var(--t); }
.nav-item:hover .gi, .nav-item.active .gi { color: var(--text); }
.nav-item .tag { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: var(--raise); color: var(--muted); }
.nav-item.is-blocked, .nav-item.is-off { opacity: .5; }
.nav-item.is-blocked .tag { background: var(--lose-soft); color: var(--lose); }
.live-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--win); animation: blink 1.6s ease-in-out infinite; }
.sidebar .grow { flex: 1; }
.side-foot { display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--line); }
.content { min-width: 0; padding: 24px clamp(14px, 3vw, 32px) 56px; }
.view { animation: view-in .22s var(--ease); max-width: 1220px; margin: 0 auto; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
.scrim { display: none; }

/* ---------------------------------------------------------------- lobby */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-radius: var(--r); margin-bottom: 28px; background: var(--panel); border: 1px solid var(--line); }
.hero h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.hero p { margin: 0; color: var(--muted); }
.hero p b { color: var(--text); }
.hero .hero-actions { display: flex; gap: 8px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.section-title svg { width: 16px; height: 16px; }
.grid-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.game-card { position: relative; aspect-ratio: 1 / 1.08; border-radius: var(--r); overflow: hidden; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.game-card:hover { border-color: var(--line-2); background: var(--card); transform: translateY(-2px); }
.game-card .art { position: absolute; inset: 0 0 34px; display: grid; place-items: center; }
.game-card .art svg { width: 34%; height: 34%; color: var(--muted); stroke-width: 1.6; transition: color .2s var(--ease), transform .25s var(--ease); }
.game-card:hover .art svg { color: var(--accent); transform: scale(1.05); }
.game-card .gname { font-size: 15px; font-weight: 600; }
.game-card .gmeta { font-size: 12px; color: var(--dim); font-weight: 500; margin-top: 1px; }
.game-card .corner { position: absolute; top: 12px; left: 12px; }
.game-card .corner.chip.win { background: transparent; padding: 0; height: auto; font-weight: 600; }
.game-card .corner .st-dot { width: 6px; height: 6px; animation: blink 1.6s ease-in-out infinite; }
.game-card .lock { position: absolute; inset: 0; background: rgba(11, 15, 23, .82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.game-card.is-blocked:hover, .game-card.is-off:hover { transform: none; }
.art-crash, .art-mines, .art-plinko, .art-dice, .art-limbo, .art-keno, .art-blackjack { background: transparent; }

/* ---------------------------------------------------------------- game frame */
.game-wrap { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.game { display: grid; grid-template-columns: 300px 1fr; min-height: 570px; }
.game-panel { background: var(--card); padding: 16px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.game-panel .grow { flex: 1; }
.game-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; min-width: 0; overflow: hidden; background: var(--panel); }
.game-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; font-weight: 500; }
.game-foot .gtitle { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.game-foot .gtitle svg { width: 15px; height: 15px; color: var(--muted); }
.game-foot .sep { width: 1px; height: 12px; background: var(--line-2); }
.game-foot .grow { flex: 1; }
.fair-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); padding: 5px 8px; border-radius: var(--r-sm); font-weight: 500; transition: background var(--t), color var(--t); }
.fair-btn:hover { background: var(--card-2); color: var(--text); }
.fair-btn svg { width: 14px; height: 14px; color: var(--win); }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.stat-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-bet { height: 48px; font-size: 15px; }
.btn-bet.cash { background: var(--win); color: var(--win-ink); }
.btn-bet.cash:hover:not(:disabled) { background: #48dd92; }
.history { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; justify-content: flex-end; gap: 4px; overflow: hidden; pointer-events: none; z-index: 2; }
.history .pill { flex: none; height: 26px; min-width: 56px; padding: 0 9px; border-radius: 3px; display: grid; place-items: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--card-2); color: var(--muted); border: 1px solid var(--line); animation: pill-in .25s var(--ease); }
.history .pill.win { background: var(--win-soft); color: var(--win); border-color: transparent; }
@keyframes pill-in { from { opacity: 0; transform: translateX(-8px); } }
.gate { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 420px; padding: 30px; }
.gate .gate-icon { width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center; background: var(--card-2); color: var(--muted); border: 1px solid var(--line-2); margin-bottom: 6px; }
.gate .gate-icon svg { width: 24px; height: 24px; }
.gate h2 { margin: 0; font-size: 19px; font-weight: 600; }
.gate p { margin: 0 0 8px; color: var(--muted); max-width: 380px; }
.result-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.94); opacity: 0; min-width: 140px; padding: 14px 22px; border-radius: var(--r); text-align: center; background: var(--bg-2); border: 1px solid var(--win); box-shadow: var(--shadow); pointer-events: none; transition: opacity .18s var(--ease), transform .2s var(--ease); z-index: 5; }
.result-pop.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.result-pop .rm { font-size: 26px; font-weight: 700; color: var(--win); font-variant-numeric: tabular-nums; }
.result-pop .ra { color: var(--muted); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.result-pop.lose { border-color: var(--lose); }
.result-pop.lose .rm { color: var(--lose); }

/* ---------------------------------------------------------------- dice */
.dice-stage { width: 100%; max-width: 740px; display: flex; flex-direction: column; gap: 40px; }
.dice-track-wrap { position: relative; padding: 26px 22px 16px; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); }
.dice-ticks { display: flex; justify-content: space-between; margin: 0 0 14px; color: var(--dim); font-weight: 600; font-size: 12px; }
.dice-track { position: relative; height: 8px; border-radius: 2px; background: var(--lose); }
.dice-track .wfill { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--win); transition: left .12s, width .12s; }
.dice-range { position: absolute; left: 22px; right: 22px; bottom: 9px; height: 26px; width: calc(100% - 44px); margin: 0; appearance: none; background: transparent; cursor: grab; }
.dice-range::-webkit-slider-thumb { appearance: none; width: 22px; height: 28px; border-radius: 3px; background: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.dice-range::-moz-range-thumb { width: 22px; height: 28px; border: 0; border-radius: 3px; background: var(--text); }
.dice-range:disabled { cursor: not-allowed; }
.dice-marker { position: absolute; top: -38px; left: 0; transform: translateX(-50%); transition: left .45s cubic-bezier(.2, .9, .2, 1), opacity .2s; opacity: 0; pointer-events: none; }
.dice-marker.show { opacity: 1; }
.dice-marker .hex { padding: 5px 10px; border-radius: 3px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--raise-2); color: var(--text); position: relative; }
.dice-marker .hex::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.dice-marker.win .hex { background: var(--win); color: var(--win-ink); }
.dice-marker.lose .hex { background: var(--lose); color: #fff; }
.dice-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.dice-dir { cursor: pointer; }
.dice-dir .input { cursor: pointer; }
.dice-dir .input:hover { border-color: #4a5a74; }

/* ---------------------------------------------------------------- limbo */
.limbo-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.limbo-number { font-size: clamp(60px, 11vw, 120px); font-weight: 700; letter-spacing: -2px; font-variant-numeric: tabular-nums; line-height: 1; transition: color .2s; }
.limbo-number.win { color: var(--win); }
.limbo-number.lose { color: var(--lose); }
.limbo-sub { color: var(--dim); font-weight: 600; font-size: 13px; }

/* ---------------------------------------------------------------- plinko */
.plinko-stage { padding: 52px 18px 18px; }
.plinko-canvas { width: 100%; max-width: 740px; height: auto; display: block; }

/* ---------------------------------------------------------------- keno */
.keno-board { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: 100%; max-width: 640px; }
.keno-tile { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line-2); font-weight: 600; font-size: clamp(13px, 1.5vw, 16px); color: var(--muted); transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.keno-tile:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.keno-tile.picked { background: var(--raise-2); border-color: var(--accent); color: var(--text); }
.keno-tile.drawn { background: var(--bg-2); border-color: var(--line); color: var(--lose); }
.keno-tile.hit { background: var(--win); border-color: var(--win); color: var(--win-ink); animation: hit .3s var(--ease); }
.keno-tile:disabled { cursor: default; }
@keyframes hit { 50% { transform: scale(1.06); } }
.keno-pays { display: flex; gap: 4px; width: 100%; max-width: 640px; margin-top: 16px; }
.keno-pays .kp { flex: 1; min-width: 0; padding: 7px 4px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); text-align: center; transition: background .2s, border-color .2s; }
.keno-pays .kp .m { font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.keno-pays .kp .h { font-size: 11px; color: var(--dim); }
.keno-pays .kp.on { background: var(--win-soft); border-color: var(--win); }
.keno-pays .kp.on .m { color: var(--win); }
.keno-empty { color: var(--dim); padding: 12px; text-align: center; width: 100%; }

/* ---------------------------------------------------------------- mines */
.mines-board { display: grid; gap: 8px; width: min(100%, 540px); aspect-ratio: 1; }
.mine-tile { position: relative; border-radius: var(--r-sm); perspective: 600px; }
.mine-tile .face { position: absolute; inset: 0; border-radius: var(--r-sm); display: grid; place-items: center; backface-visibility: hidden; transition: transform .34s cubic-bezier(.3, .8, .3, 1); }
.mine-tile .front { background: var(--raise); border: 1px solid var(--raise-2); }
.mine-tile .back { transform: rotateY(180deg); background: var(--bg-2); border: 1px solid var(--line-2); }
.mine-tile.open .front { transform: rotateY(-180deg); }
.mine-tile.open .back { transform: rotateY(0deg); }
.mine-tile:not(.open):not(:disabled):hover .front { background: var(--raise-2); transform: translateY(-2px); }
.mine-tile .back svg { width: 54%; height: 54%; }
.mine-tile.gem .back { border-color: rgba(47, 210, 127, .5); }
.mine-tile.mine .back { border-color: rgba(240, 80, 95, .6); background: #1c1117; }
.mine-tile.dimmed .back { opacity: .4; border-color: var(--line); }
.mine-tile.boom .back { animation: boom .4s var(--ease); }
@keyframes boom { 35% { transform: scale(1.1); } }
.mine-tile:disabled { cursor: default; }
.mines-info { display: flex; gap: 8px; }
.mines-info > div { flex: 1; padding: 9px 12px; background: var(--bg-2); border-radius: var(--r-sm); border: 1px solid var(--line-2); }
.mines-info .k { font-size: 11.5px; color: var(--dim); font-weight: 600; }
.mines-info .v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- blackjack */
.bj-table { position: relative; width: 100%; max-width: 800px; min-height: 500px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 16px 0; }
.bj-felt-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; text-align: center; color: var(--dim); opacity: .55; font-weight: 600; letter-spacing: .14em; font-size: 11px; text-transform: uppercase; line-height: 2; pointer-events: none; }
.bj-shoe { position: absolute; right: 8px; top: 8px; width: 56px; height: 78px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line-2); }
.bj-row { position: relative; display: flex; justify-content: center; gap: 36px; min-height: 166px; width: 100%; z-index: 1; }
.bj-hand { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .2s; }
.bj-hand.idle { opacity: .5; }
.bj-cards { position: relative; height: 126px; }
.bj-total { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 3px; background: var(--raise); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.bj-total.win { background: var(--win); color: var(--win-ink); }
.bj-total.lose { background: var(--lose); color: #fff; }
.bj-total.push { background: var(--raise-2); color: var(--text); }
.bj-total.active { box-shadow: 0 0 0 1px var(--accent); }
.bj-label { font-size: 12px; color: var(--muted); font-weight: 500; min-height: 18px; }
.card { position: absolute; top: 0; width: 88px; height: 126px; perspective: 800px; transition: transform .4s cubic-bezier(.2, .8, .25, 1); }
.card .cin { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.3, .8, .3, 1); }
.card.down .cin { transform: rotateY(180deg); }
.card .cf, .card .cb { position: absolute; inset: 0; border-radius: var(--r); backface-visibility: hidden; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.card .cf { background: #f4f6f9; color: #161c26; padding: 7px 8px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #d9dee6; }
.card .cf.red { color: #c8303f; }
.card .cf .r { font-weight: 700; font-size: 18px; line-height: 1; }
.card .cf .s { font-size: 15px; line-height: 1; }
.card .cf .big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%); font-size: 40px; line-height: 1; }
.card .cf .br { align-self: flex-end; transform: rotate(180deg); text-align: center; }
.card .cb { transform: rotateY(180deg); background: var(--raise); border: 1px solid var(--raise-2); }
.card .cb::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.bj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bj-actions .btn { height: 44px; }
.bj-actions .btn svg { width: 16px; height: 16px; }
.insurance { padding: 12px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); display: flex; flex-direction: column; gap: 10px; animation: view-in .2s var(--ease); }
.insurance p { margin: 0; font-size: 13px; color: var(--muted); }
.insurance p strong { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- crash */
.crash-stage { padding: 50px 18px 18px; align-items: stretch; justify-content: flex-start; gap: 12px; }
.crash-graph { position: relative; width: 100%; height: 370px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.crash-graph canvas { width: 100%; height: 100%; display: block; }
.crash-mult { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.crash-mult .big { font-size: clamp(44px, 7.5vw, 78px); font-weight: 700; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1; transition: color .15s; }
.crash-mult .sub { margin-top: 8px; color: var(--muted); font-weight: 500; font-size: 13px; }
.crash-mult.crashed .big { color: var(--lose); }
.crash-mult.cashed .big { color: var(--win); }
.crash-progress { width: 200px; height: 3px; border-radius: 2px; background: var(--raise); margin: 14px auto 0; overflow: hidden; }
.crash-progress > i { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.crash-players { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.crash-players .head, .crash-players .row { display: grid; grid-template-columns: 1.6fr 1fr .9fr 1fr; gap: 8px; padding: 8px 14px; align-items: center; font-size: 13px; }
.crash-players .head { color: var(--dim); font-weight: 600; font-size: 11.5px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.crash-players .head .count { color: var(--muted); }
.crash-players .list { max-height: 220px; overflow-y: auto; }
.crash-players .row { font-weight: 500; animation: view-in .2s var(--ease); }
.crash-players .row + .row { border-top: 1px solid var(--line); }
.crash-players .row .p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crash-players .row .p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crash-players .row .avatar { width: 20px; height: 20px; font-size: 8.5px; }
.crash-players .row.cashed .c, .crash-players .row.cashed .w { color: var(--win); }
.crash-players .row.busted { color: var(--dim); }
.crash-players .row.busted .w { color: var(--lose); text-decoration: line-through; }
.crash-players .row.me .p span { color: var(--accent); }
.crash-players .empty { padding: 18px; color: var(--dim); text-align: center; }
.history.crash-history { pointer-events: auto; justify-content: flex-start; }
.history.crash-history .pill { cursor: pointer; transition: border-color var(--t); }
.history.crash-history .pill:hover { border-color: var(--line-2); }
.history .pill.hot, .history .pill.mid { background: var(--win-soft); color: var(--win); border-color: transparent; }
.history .pill.cold { background: var(--card-2); color: var(--muted); }

/* ---------------------------------------------------------------- overlays: screens, modals, drawers, toasts */
.screen { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: var(--bg); animation: fade-in .25s var(--ease); overflow-y: auto; }
.screen.leaving { animation: fade-out .3s var(--ease) forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.screen-card { width: min(100%, 480px); padding: 32px 28px 26px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); text-align: center; animation: card-in .3s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.screen-card .logo { justify-content: center; margin-bottom: 24px; font-size: 17px; }
.screen-card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.screen-card .lead { margin: 0 auto 22px; color: var(--muted); max-width: 380px; }
.screen-icon { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: var(--r); display: grid; place-items: center; background: var(--card-2); color: var(--muted); border: 1px solid var(--line-2); }
.screen-icon svg { width: 26px; height: 26px; }
.screen-icon.red { color: var(--lose); border-color: rgba(240, 80, 95, .35); }
.screen-icon.green { color: var(--win); border-color: rgba(47, 210, 127, .35); }
.live-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--dim); font-size: 12.5px; font-weight: 500; }
.live-check i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.code { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 4px 0 18px; }
.code .ch { width: 40px; height: 50px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2); font: 700 24px/1 var(--mono); color: var(--text); transition: background .25s, border-color .25s, color .25s; animation: ch-in .3s var(--ease) backwards; }
.code .dash { color: var(--dim); }
.code .ch.ok { background: var(--win-soft); border-color: var(--win); color: var(--win); }
@keyframes ch-in { from { opacity: 0; transform: translateY(5px); } }
.code-actions { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 18px; }
.countdown { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown svg { width: 22px; height: 22px; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke-width: 3; }
.countdown .track { stroke: var(--raise); }
.countdown .bar { stroke: var(--accent); transition: stroke-dashoffset 1s linear, stroke .3s; }
.countdown.low .bar { stroke: var(--lose); }
.waiting { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: 13px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.hint { margin: 18px 0 0; font-size: 12.5px; color: var(--dim); }
.screen-msg { margin: -6px 0 20px; text-align: left; }
.linked { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: card-in .3s var(--ease); }
.linked .avatar { animation: avatar-in .45s var(--ease); box-shadow: 0 0 0 4px var(--win-soft); }
@keyframes avatar-in { from { transform: scale(.6); opacity: 0; } }
.linked h1 { margin: 0; }
.linked .chk { color: var(--win); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }

.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(5, 8, 13, .72); display: grid; place-items: center; padding: 18px; animation: fade-in .16s var(--ease); }
.modal-back.leaving { animation: fade-out .16s var(--ease) forwards; }
.modal { width: min(100%, 460px); max-height: calc(100vh - 36px); display: flex; flex-direction: column; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: modal-in .2s var(--ease); overflow: hidden; }
.modal.wide { width: min(100%, 620px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 0 18px; }
.modal-head h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.modal-head h2 svg { color: var(--muted); width: 17px; height: 17px; }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; gap: 0; margin: 12px 18px 0; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; height: 38px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--t), border-color var(--t); }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

.drawer-back { position: fixed; inset: 0; z-index: 85; background: rgba(5, 8, 13, .55); animation: fade-in .16s var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 86; width: min(100%, 380px); background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: drawer-in .22s var(--ease); }
.drawer.leaving { animation: drawer-out .18s var(--ease) forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; }
.drawer-list { flex: 1; overflow-y: auto; }
.msg { display: flex; gap: 12px; padding: 13px 18px; transition: background var(--t); cursor: pointer; position: relative; border-bottom: 1px solid var(--line); }
.msg:hover { background: var(--card); }
.msg .mi { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--card-2); color: var(--muted); border: 1px solid var(--line-2); }
.msg .mi svg { width: 15px; height: 15px; }
.msg.t-success .mi, .msg.t-win .mi { color: var(--win); }
.msg.t-error .mi { color: var(--lose); }
.msg.t-warning .mi { color: var(--warn); }
.msg.t-info .mi { color: var(--info); }
.msg .mt { font-weight: 600; font-size: 13.5px; }
.msg .mb { color: var(--muted); font-size: 13px; margin-top: 2px; }
.msg .mtime { color: var(--dim); font-size: 11.5px; margin-top: 4px; }
.msg.unread::after { content: ""; position: absolute; right: 16px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.msg.unread .mt { padding-right: 14px; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state svg { width: 28px; height: 28px; opacity: .6; }

.toasts { position: fixed; top: calc(var(--top) + 10px); right: 14px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 28px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 11px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line-2); border-left: 3px solid var(--info); box-shadow: var(--shadow); animation: toast-in .26s var(--ease); position: relative; overflow: hidden; }
.toast.leaving { animation: toast-out .22s var(--ease) forwards; }
@keyframes toast-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(24px); opacity: 0; } }
.toast .ti { display: grid; place-items: center; flex: none; color: var(--info); margin-top: 1px; }
.toast .ti svg { width: 17px; height: 17px; }
.toast.success, .toast.win { border-left-color: var(--win); }
.toast.success .ti, .toast.win .ti { color: var(--win); }
.toast.error { border-left-color: var(--lose); }
.toast.error .ti { color: var(--lose); }
.toast.warning { border-left-color: var(--warn); }
.toast.warning .ti { color: var(--warn); }
.toast .tt { font-weight: 600; font-size: 13.5px; }
.toast .tb { color: var(--muted); font-size: 13px; margin-top: 2px; }
.toast .tx { margin-left: auto; color: var(--dim); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 3px; flex: none; }
.toast .tx:hover { background: var(--raise); color: var(--text); }
.toast .tx svg { width: 14px; height: 14px; }
.toast .tbar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--line-2); animation: tbar linear forwards; }
@keyframes tbar { from { width: 100%; } to { width: 0; } }

.net-pill { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; font-size: 13px; animation: toast-up .2s var(--ease); }
.net-pill i { width: 12px; height: 12px; border: 2px solid var(--warn); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes toast-up { from { transform: translate(-50%, 10px); opacity: 0; } }

.pop { position: absolute; z-index: 60; min-width: 200px; padding: 4px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: modal-in .14s var(--ease); }
.pop .item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; transition: background var(--t), color var(--t); }
.pop .item svg { width: 16px; height: 16px; }
.pop .item:hover { background: var(--card-2); color: var(--text); }
.pop .item.danger:hover { color: var(--lose); }
.pop .head { padding: 10px 10px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop .head .n { font-weight: 600; }
.pop .head .s { color: var(--dim); font-size: 12px; }
.vol { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--muted); }
.vol input[type=range] { flex: 1; accent-color: var(--accent); }

/* wallet */
.send-to { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2); }
.send-to .who { flex: 1; min-width: 0; }
.send-to .who .k { font-size: 12px; color: var(--dim); font-weight: 500; }
.send-to .who .v { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.steps li { display: flex; gap: 10px; color: var(--muted); font-size: 13.5px; }
.steps li::before { counter-increment: s; content: counter(s); width: 20px; height: 20px; border-radius: 3px; background: var(--raise); color: var(--text); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.steps li b { color: var(--text); font-weight: 600; }
.deposit-wait { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-2); font-weight: 500; transition: background .3s, border-color .3s, color .3s; }
.deposit-wait .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.4s infinite; flex: none; }
.deposit-wait.got { background: var(--win-soft); border-color: var(--win); color: var(--win); }
.deposit-wait.got .pulse { background: var(--win); animation: none; }
.list-title { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin: 4px 0 -4px; }
.rows { display: flex; flex-direction: column; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; }
.rows .r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13.5px; }
.rows .r + .r { border-top: 1px solid var(--line); }
.rows .r .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.rows .r .sub { color: var(--dim); font-size: 12px; }
.rows .r .grow { flex: 1; min-width: 0; }
.rows .empty { padding: 16px; text-align: center; color: var(--dim); font-size: 13px; }
.wager { padding: 13px 14px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 9px; }
.wager .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.wager .top b { color: var(--text); font-weight: 600; }
.bar { height: 4px; border-radius: 2px; background: var(--raise); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.bar.done > i { background: var(--win); }
.wd { display: flex; flex-direction: column; gap: 5px; }
.wd .line { display: flex; align-items: center; gap: 10px; }
.wd .st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.wd .msgline { font-size: 12.5px; color: var(--muted); }
.wd .prog { height: 3px; border-radius: 2px; background: var(--raise); overflow: hidden; }
.wd .prog > i { display: block; height: 100%; background: var(--win); transition: width .4s var(--ease); }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-dot.spin { width: 10px; height: 10px; background: none; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.pos { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 3px; background: var(--raise); color: var(--muted); }

/* fairness */
.kv { display: flex; flex-direction: column; gap: 6px; }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.kv .k span + span { color: var(--dim); font-weight: 500; }
.mono-box { display: flex; align-items: center; gap: 6px; padding: 0 5px 0 12px; min-height: 38px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line-2); font: 500 12.5px var(--mono); color: var(--muted); }
.mono-box span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-box input { flex: 1; min-width: 0; height: 36px; background: transparent; border: 0; outline: none; font: 500 12.5px var(--mono); color: var(--text); }
.copy-btn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px; color: var(--dim); flex: none; transition: background var(--t), color var(--t); }
.copy-btn:hover { background: var(--raise); color: var(--text); }
.copy-btn.ok { color: var(--win); }
.copy-btn svg { width: 14px; height: 14px; }
.fair-bets .gtag { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; background: var(--card-2); border: 1px solid var(--line-2); }
.fair-bets .gtag svg { width: 15px; height: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .game { grid-template-columns: 280px 1fr; }
}
@media (max-width: 900px) {
  :root { --side: 260px; }
  .layout { grid-template-columns: 1fr; }
  .topbar { padding: 0 10px; gap: 6px; }
  .topbar .menu-btn { display: grid; }
  .topbar-center { position: static; transform: none; margin-left: auto; }
  .logo .word { display: none; }
  .user-btn .name { display: none; }
  .user-btn { padding: 0 4px; }
  .sidebar { position: fixed; z-index: 70; left: 0; top: var(--top); bottom: 0; height: auto; width: var(--side); transform: translateX(-100%); transition: transform .22s var(--ease); }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; z-index: 65; background: rgba(5, 8, 13, .6); animation: fade-in .2s; }
  .game { grid-template-columns: 1fr; min-height: 0; }
  .game-panel { border-right: 0; border-top: 1px solid var(--line); order: 2; }
  .game-stage { order: 1; min-height: 360px; padding: 48px 12px 16px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .grid-games { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .content { padding: 14px 12px 48px; }
  .crash-graph { height: 290px; }
  .bj-table { min-height: 430px; }
  .bj-felt-label { font-size: 9.5px; letter-spacing: .1em; }
  .card { width: 70px; height: 100px; }
  .bj-cards { height: 100px; }
  .card .cf .big { font-size: 30px; }
  .card .cf .r { font-size: 15px; }
  .bj-row { gap: 18px; min-height: 136px; }
  .dice-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dice-fields .dice-dir { grid-column: span 2; order: -1; }
}
@media (max-width: 520px) {
  .balance-amount { padding: 0 10px; font-size: 14px; }
  .top-actions .icon-btn { width: 34px; }
  .code .ch { width: 31px; height: 42px; font-size: 19px; }
  .code { gap: 2px; }
  .screen-card { padding: 24px 16px 20px; }
  .keno-board { gap: 4px; }
  .mines-board { gap: 6px; }
  .crash-players .head, .crash-players .row { grid-template-columns: 1.4fr 1fr .8fr .9fr; padding: 8px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
