:root {
  --bg: var(--tg-theme-bg-color, #09111f);
  --bg2: var(--tg-theme-secondary-bg-color, #101b2f);
  --text: var(--tg-theme-text-color, #eff5ff);
  --hint: var(--tg-theme-hint-color, #90a0bc);
  --line: rgba(255,255,255,.08);
  --soft: rgba(255,255,255,.04);
  --accent: var(--tg-theme-button-color, #6f63ff);
  --accent-2: #4ea7ff;
  --accent-text: var(--tg-theme-button-text-color, #fff);
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(142,91,255,.24), transparent 30%),
    radial-gradient(circle at top right, rgba(77,162,255,.18), transparent 28%),
    radial-gradient(circle at bottom center, rgba(214,73,255,.14), transparent 24%),
    linear-gradient(135deg, #04040a 0%, #0a0720 45%, #180428 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}
body {
  padding: 0 0 calc(env(safe-area-inset-bottom) + 28px);
  position: relative;
  overflow-x: hidden;
}
body::before, body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.46) 1.4px, transparent 1.4px),
    radial-gradient(circle, rgba(255,255,255,.24) 0.9px, transparent 0.9px);
  background-size: 160px 160px, 250px 250px, 320px 320px;
  background-position: 0 0, 90px 50px, 140px 150px;
  opacity: .55;
}
body::after {
  background: radial-gradient(circle at 15% 10%, rgba(152,97,255,.18), transparent 18%),
    radial-gradient(circle at 85% 5%, rgba(91,141,255,.18), transparent 18%),
    radial-gradient(circle at 50% 95%, rgba(191,65,255,.24), transparent 24%);
}
.app-shell, .modal-card, .screen-inner {
  position: relative;
  z-index: 1;
}
.hero {
  background: linear-gradient(135deg, rgba(88,24,143,.85), rgba(31,41,55,.92));
  border-color: rgba(139,92,246,.5);
  box-shadow: 0 24px 70px rgba(75,35,170,.22);
}
.cardish, .panel, .game-card {
  background: rgba(10, 13, 30, 0.86);
  border-color: rgba(255,255,255,.1);
}
.tab {
  background: rgba(255,255,255,.04);
  border-color: rgba(111,99,255,.22);
}
.tab.active {
  background: rgba(111,99,255,.22);
  border-color: rgba(192,132,252,.45);
}
.metric, .stat-box, .summary {
  background: rgba(255,255,255,.04);
}
.button.primary, button.primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}
button, input, select, textarea { font: inherit; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 18px;
  padding: 13px 16px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  transition: transform .2s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
}
button:active { transform: scale(.98); }
button.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-text);
  box-shadow: 0 14px 30px rgba(111,99,255,.28);
}
button.ghost { background: transparent; border: 1px solid var(--line); }
button.small { padding: 8px 12px; border-radius: 14px; }
input, select, textarea {
  width: 100%;
  margin-top: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 13px 15px;
  outline: none;
}
label { display: block; color: var(--hint); font-size: 14px; }
textarea { resize: vertical; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.03; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.app-shell { width: min(1180px, 100%); margin: 0 auto; padding: 16px 14px; display: grid; gap: 16px; }
.cardish, .tab, .modal-card, .game-card, .screen-inner { backdrop-filter: blur(18px); }
.hero {
  display: flex; justify-content: space-between; gap: 18px; padding: 24px;
  border-radius: 30px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(111,99,255,.2), rgba(78,167,255,.08));
}
.hero p { margin-top: 8px; color: var(--hint); }
.hero-metrics { display: grid; gap: 12px; grid-template-columns: 1fr; }
.hero-metrics-main { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; }
.metric { border-radius: 24px; border: 1px solid var(--line); background: var(--soft); padding: 16px; display: grid; gap: 8px; }
.metric span, .hint, .eyebrow { color: var(--hint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { font-size: 30px; }
.tabs { display: flex; gap: 10px; overflow: auto; padding-bottom: 3px; }
.tab { white-space: nowrap; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.tab.active { background: rgba(111,99,255,.18); border-color: rgba(111,99,255,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.section-grid { display: grid; gap: 16px; }
.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.one-col { grid-template-columns: 1fr; }
.full-row { grid-column: 1 / -1; }
.panel, .game-card {
  display: grid; gap: 14px; border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  padding: 18px; box-shadow: 0 14px 34px rgba(0,0,0,.2);
  position: relative; overflow: hidden;
}
.panel::before, .game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.06);
  pointer-events: none;
}
.panel::after, .game-card::after {
  content: '';
  position: absolute;
  inset: auto -10% -50% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(111,99,255,.2), transparent 70%);
  pointer-events: none;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.inline-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.compact-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.compact-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.summary { white-space: pre-wrap; border-radius: 18px; padding: 14px; background: rgba(255,255,255,.035); border: 1px dashed var(--line); }
.coin-panel { padding-bottom: 24px; }
.coin-animation-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 12px 0 8px;
}
.coin-animation {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #fff, #f4d06f 35%, #d4a44f 72%);
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  transition: transform .8s ease, background .4s ease;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  perspective: 900px;
}
.coin-animation::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.35), transparent 50%);
}
.coin-animation-label {
  position: relative;
  z-index: 1;
  color: #09111f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.coin-animation.coin-flip {
  animation: coin-flip 1.2s ease-in-out;
}
.coin-animation.coin-face-eagle { background: linear-gradient(180deg, #fff 0%, #f5c44b 60%, #d49b2f 100%); }
.coin-animation.coin-face-tails { background: linear-gradient(180deg, #eef2ff 0%, #a2b7ff 55%, #4f46e5 100%); }
.coin-animation.coin-face-edge { background: linear-gradient(180deg, #f7f7f7 0%, #d1d5db 50%, #9ca3af 100%); }
@keyframes coin-flip {
  0% { transform: rotateX(0deg) rotateY(0deg) translateY(0); }
  20% { transform: rotateX(180deg) rotateY(120deg) translateY(-18px); }
  45% { transform: rotateX(360deg) rotateY(240deg) translateY(-36px); }
  70% { transform: rotateX(540deg) rotateY(360deg) translateY(-18px); }
  100% { transform: rotateX(720deg) rotateY(540deg) translateY(0); }
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions input { flex: 1 1 280px; }
.stack-list { display: grid; gap: 12px; }
.item-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.03); display: grid; gap: 8px; }
.item-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.badge { border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.badge.pending { background: rgba(245,158,11,.13); color: #fbbf24; }
.badge.confirmed { background: rgba(34,197,94,.13); color: #4ade80; }
.badge.rejected, .badge.error { background: rgba(239,68,68,.13); color: #f87171; }
.empty-state { color: var(--hint); }
.hidden { display: none !important; }
.game-card {
  grid-template-columns: 72px 1fr;
  align-items: center;
  cursor: pointer;
  min-height: 120px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(111,99,255,.42);
  box-shadow: 0 20px 42px rgba(0,0,0,.25);
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
}
.game-icon {
  width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(78,167,255,.26), rgba(111,99,255,.28));
  font-size: 30px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 12px 28px rgba(76, 90, 255, .18);
}
.game-card .game-copy { display: grid; gap: 4px; }
.game-card .game-copy h2 { font-size: 20px; }
.game-card .game-copy p {
  color: var(--hint);
  font-size: 13px;
  line-height: 1.4;
}
.game-card .game-badge {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(111,99,255,.16);
  color: #d8d6ff;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stats-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat-box { border: 1px solid var(--line); border-radius: 20px; padding: 14px; background: rgba(255,255,255,.03); display: grid; gap: 8px; }
.stat-box strong { font-size: 18px; }
.casino-cases, .casino-upgrades {
  display: grid;
  gap: 12px;
}
.case-card, .upgrade-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(17,13,40,.92), rgba(24,18,60,.88));
    box-shadow: 0 18px 56px rgba(0,0,0,.22);
}
  .case-card .case-meta { display: block; }
  .case-card .case-meta strong { font-size: 20px; }
  .case-card .case-meta .hint { color: #c5b0ff; }
  .case-card .case-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .case-card .case-result { grid-column: 1 / -1; margin-top: 10px; color: #d8d6ff; font-size: 15px; font-weight: 600; }
  .case-wheel {
    width: 100%;
    min-height: 134px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(51, 18, 96, .26), rgba(16, 12, 40, .96));
    display: block;
    overflow: hidden;
    position: relative;
    margin: 0 auto 18px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: inset 0 0 24px rgba(119, 84, 255, .14);
  }
  .case-wheel::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 16px solid rgba(255, 255, 255, 0.85);
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
  }
  .case-wheel .wheel-inner {
    display: flex;
    gap: 12px;
    padding: 16px;
    transition: transform 2.2s cubic-bezier(.2,.9,.2,1);
    will-change: transform;
  }
  .case-roll-card {
    min-width: 120px;
    padding: 12px 14px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    display: grid;
    gap: 8px;
    text-align: center;
    color: #eef2ff;
    box-shadow: 0 0 18px rgba(132, 80, 255, .12);
  }
  .case-roll-card.nft {
    background: linear-gradient(180deg, rgba(145, 82, 255, .24), rgba(40, 12, 80, .9));
    border-color: rgba(170, 145, 255, .22);
  }
  .case-roll-image {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
  }
  .case-roll-name {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
  }
  .case-roll-value {
    font-weight: 800;
    color: #ffd55b;
  }
  .case-gift-rail {
    display: none;
  }
  .case-gift-rail.spinning {
    transform: translateX(-4px);
  }
  .case-gift-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 98px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text);
    font-size: 12px;
  }
  .case-gift-chip.nft {
    background: linear-gradient(135deg, rgba(131,58,180,.23), rgba(99,102,241,.18));
    border-color: rgba(192,132,252,.4);
  }
  .chip-icon { font-size: 18px; }
  .chip-label { font-weight: 700; color: #eef2ff; }
  .inventory-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .inventory-card {
    display: grid;
    gap: 10px;
    border-radius: 26px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(83,38,125,.24), rgba(12,13,34,.92));
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 20px 48px rgba(0,0,0,.22);
    transition: transform .2s ease, border-color .2s ease;
  }
  .inventory-card:hover {
    transform: translateY(-2px);
    border-color: rgba(192,132,252,.38);
  }
  .inventory-top { display: flex; align-items: center; gap: 14px; }
  .inventory-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; overflow: hidden; background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
  .inventory-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
  .inventory-label { font-weight: 800; font-size: 16px; }
  .inventory-meta { color: #b8b3f7; font-size: 13px; }
  .inventory-value { font-size: 20px; font-weight: 800; color: #ffd45f; }
  .inventory-empty {
    padding: 20px;
    border-radius: 24px;
    border: 1px dashed rgba(255,255,255,.16);
    color: var(--hint);
    text-align: center;
    background: rgba(255,255,255,.03);
  }
  button.tiny { padding: 10px 14px; border-radius: 18px; font-size: 13px; }
.case-actions, .upgrade-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .two-col, .inline-grid, .compact-2, .compact-3, .stats-cards, .inventory-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-metrics-main {
    grid-template-columns: 1fr;
  }
  .game-card {
    min-height: auto;
  }
}
.racket-stage {
  position: relative;
  height: 200px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  overflow: hidden;
  display: grid;
  place-items: center;
}
.racket-frame {
  position: relative;
  width: 180px;
  height: 160px;
}
.racket-handle {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 16px;
  height: 110px;
  background: linear-gradient(180deg, #f59e0b, #b45309);
  transform: translateX(-50%) rotate(-18deg);
  border-radius: 12px;
}
.racket-head {
  position: absolute;
  left: 50%;
  bottom: 80px;
  width: 110px;
  height: 110px;
  border-radius: 100px 100px 60px 60px;
  background: radial-gradient(circle at top, rgba(255,255,255,.9), rgba(248,113,113,.95));
  transform: translateX(-50%) rotate(-18deg);
}
.racket-ball {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #fde68a, #f97316);
  box-shadow: 0 0 18px rgba(249,115,22,.35);
  animation: racket-bounce 1.4s infinite ease-in-out;
}
@keyframes racket-bounce {
  0%, 100% { transform: translate(-60px, 24px); }
  50% { transform: translate(60px, -54px); }
}
@media (max-width: 980px) {
  .two-col, .compact-2, .compact-3, .stats-cards, .hero-metrics, .inline-grid, .roulette-layout { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .screen-inner { min-height: calc(100vh - 28px); }
}
.modal, .screen {
  position: fixed; inset: 0; background: rgba(4,10,20,.82); padding: 14px; z-index: 50;
}
.modal { display: grid; place-items: center; }
.screen {
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.99);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  pointer-events: none;
}
.screen.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.modal-card, .screen-inner {
  width: min(1240px, 100%); margin: 0 auto; border-radius: 30px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,21,38,.94), rgba(8,14,26,.96));
}
.modal-card { padding: 18px; display: grid; gap: 14px; }
.screen-inner { min-height: calc(100vh - 28px); padding: 18px; display: grid; gap: 18px; }
.screen-topbar { display: flex; align-items: center; gap: 14px; }
.game-view {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  max-height: 0;
  overflow: hidden;
  transition: opacity .22s ease, transform .22s ease, max-height .22s ease, visibility .22s ease;
}
.game-view.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 10000px;
}
.roulette-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: stretch; }
.roulette-stage-panel, .crash-stage-panel { align-content: start; }
.roulette-stage {
  position: relative; display: grid; place-items: center; overflow: hidden;
  padding: 8px 0;
}
.roulette-wheel {
  width: min(72vw, 360px);
  height: min(72vw, 360px);
  border-radius: 50%;
  position: relative;
  box-sizing: border-box;
  border: 10px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 8px rgba(255,255,255,.03), 0 30px 80px rgba(0,0,0,.38);
  transition: transform 5.2s cubic-bezier(.12,.9,.16,1);
  background: conic-gradient(
    #16a34a 0deg 11.6129deg,
    #c81e1e 11.6129deg 23.2258deg,
    #f1f5f9 23.2258deg 34.8387deg,
    #c81e1e 34.8387deg 46.4516deg,
    #f1f5f9 46.4516deg 58.0645deg,
    #c81e1e 58.0645deg 69.6774deg,
    #f1f5f9 69.6774deg 81.2903deg,
    #c81e1e 81.2903deg 92.9032deg,
    #f1f5f9 92.9032deg 104.5161deg,
    #c81e1e 104.5161deg 116.1290deg,
    #f1f5f9 116.1290deg 127.7419deg,
    #c81e1e 127.7419deg 139.3548deg,
    #f1f5f9 139.3548deg 150.9677deg,
    #c81e1e 150.9677deg 162.5806deg,
    #f1f5f9 162.5806deg 174.1935deg,
    #c81e1e 174.1935deg 185.8064deg,
    #f1f5f9 185.8064deg 197.4193deg,
    #c81e1e 197.4193deg 209.0322deg,
    #f1f5f9 209.0322deg 220.6451deg,
    #c81e1e 220.6451deg 232.2580deg,
    #f1f5f9 232.2580deg 243.8709deg,
    #c81e1e 243.8709deg 255.4838deg,
    #f1f5f9 255.4838deg 267.0967deg,
    #c81e1e 267.0967deg 278.7096deg,
    #f1f5f9 278.7096deg 290.3225deg,
    #c81e1e 290.3225deg 301.9354deg,
    #f1f5f9 301.9354deg 313.5483deg,
    #c81e1e 313.5483deg 325.1612deg,
    #f1f5f9 325.1612deg 336.7741deg,
    #c81e1e 336.7741deg 348.387deg,
    #f1f5f9 348.387deg 360deg
  );
}
.roulette-wheel::before {
  content: ''; position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), rgba(10,16,28,.95));
  border: 1px solid rgba(255,255,255,.08);
}
.roulette-pointer {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid #ffd86b;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.roulette-glow {
  position: absolute; inset: 12%; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 100px rgba(111,99,255,.18), inset 0 0 40px rgba(78,167,255,.1);
}
.mines-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.big-board { min-height: 100%; }
.mine-cell {
  aspect-ratio: 1; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); font-size: clamp(20px, 4vw, 26px);
}
.mine-cell.safe { background: rgba(34,197,94,.16); box-shadow: inset 0 0 0 1px rgba(34,197,94,.28); }
.mine-cell.mine { background: rgba(239,68,68,.18); box-shadow: inset 0 0 0 1px rgba(239,68,68,.28); }
.crash-stage {
  position: relative; min-height: 360px; overflow: hidden; border-radius: 24px;
  background: linear-gradient(180deg, rgba(9,18,32,.98), rgba(16,28,46,.96)); border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding: 18px;
}
.crash-chart-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 20% 20%;
  z-index: 10;
}
.crash-graph {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.crash-graph svg {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.04);
}
.crash-graph svg polyline {
  filter: drop-shadow(0 0 14px rgba(78,167,255,.25));
}
.crash-graph svg polyline {
  filter: drop-shadow(0 0 12px rgba(78,167,255,.25));
}
.crash-actions-row {
  display: grid;
  gap: 12px;
}
.crash-actions-row button {
  width: 100%;
  min-width: 0;
}
.crash-multiplier {
  position: absolute; right: 18px; top: 18px; font-size: clamp(34px, 7vw, 56px); font-weight: 800;
  text-shadow: 0 0 24px rgba(111,99,255,.24);
  z-index: 30;
}
.dice-preview { display: grid; place-items: center; }
.dice-box {
  width: 140px; height: 140px; border-radius: 34px; display: grid; place-items: center; font-size: 72px;
  background: linear-gradient(135deg, rgba(78,167,255,.2), rgba(111,99,255,.22)); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.center-text { text-align: center; }
.toast-stack {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 10px);
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(92vw, 560px);
}
.toast {
  background: rgba(15,23,42,.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
}
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error { border-color: rgba(239,68,68,.35); }
@media (max-width: 980px) {
  .two-col, .compact-2, .compact-3, .stats-cards, .hero-metrics, .inline-grid, .roulette-layout { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .screen-inner { min-height: calc(100vh - 28px); }
}
