/* SkyRush layout
   >= 1200px : bets | game | chat        (three columns, side panels fill the viewport height)
   900-1199  : bets | game, chat slides in from the right
   < 900     : one column (game, then bets), chat opens as a full-screen sheet
   < 640     : compact bet slots, second slot folds away                               */

:root {
  --bg: #0e1118;
  --panel: #171b25;
  --panel-2: #1f2430;
  --line: #2a3040;
  --text: #e8ecf3;
  --muted: #8b94a7;
  --accent: #ffb300;
  --green: #22c55e;
  --green-d: #16a34a;
  --red: #ef4444;
  --red-d: #b91c1c;
  --blue: #3b82f6;
  --purple: #a855f7;
  --gold: #f59e0b;
  --radius: 12px;
  --gap: 16px;
  --header-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button {
  font: inherit; color: inherit; cursor: pointer; border: 0; background: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
button:disabled { cursor: not-allowed; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; word-break: break-all; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l));
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font-weight: 800; letter-spacing: 2px; font-size: 18px; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; overflow: hidden; white-space: nowrap; }
.me { flex: 0 0 auto; }
.logo { flex: none; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo { color: var(--accent); font-size: 22px; transform: rotate(-20deg); display: inline-block; }
.badge { font-size: 10px; letter-spacing: 1px; font-weight: 600; color: var(--bg); background: var(--accent); border-radius: 999px; padding: 2px 8px; }
.me { display: flex; align-items: center; gap: 8px; min-width: 0; }
.name { color: var(--muted); padding: 6px 8px; border-radius: 8px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name:hover { background: var(--panel-2); color: var(--text); }
.wallet { display: flex; align-items: center; gap: 6px; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.conn.off { background: var(--red); }
.balance {
  font-weight: 700; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--panel-2); padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line);
}
.topup { font-size: 12px; font-weight: 600; color: var(--green); border: 1px solid var(--green-d); border-radius: 10px; padding: 8px 10px; white-space: nowrap; }
.topup:hover { background: rgba(34,197,94,.12); }
.topup-short { display: none; }
.icon-btn {
  position: relative; width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn svg { width: 18px; height: 18px; }
.count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; border: 2px solid var(--panel);
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800; line-height: 1;
}
.count[hidden] { display: none; }
.chat-toggle, .chat-close { display: none; }
.exit-btn {
  display: none; align-items: center; gap: 6px; height: 38px; padding: 0 12px; flex: 0 0 auto;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px;
}
.exit-btn svg { width: 16px; height: 16px; }
.exit-btn:hover { border-color: var(--red); color: #fecaca; }

/* modes: demo (free play money), session (funded by the main app), spectator (watch only) */
body.mode-session .exit-btn { display: inline-flex; }
body.mode-session .badge, body.mode-spectator .badge { display: none; } /* not play money: funded by the main app */
body.mode-session .topup, body.mode-session .name,
body.mode-spectator .topup, body.mode-spectator .name { display: none; }
body.mode-session .chat-as button { pointer-events: none; text-decoration: none; color: var(--text); }
body.mode-spectator .slots, body.mode-closing .slot .action:not(.cashout) { opacity: .45; pointer-events: none; }
body.mode-spectator .slot-toggle { display: none; }
.mode-banner {
  padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
.mode-banner[hidden] { display: none; }
.mode-banner.warn { border-color: #a16207; background: rgba(245,158,11,.10); color: #fde68a; }
.mode-banner.info { border-color: #1d4ed8; background: rgba(59,130,246,.10); color: #bfdbfe; }

/* ---------- layout ---------- */
.main {
  display: grid; gap: var(--gap); align-items: start;
  padding: var(--gap) calc(var(--gap) + var(--safe-r)) var(--gap) calc(var(--gap) + var(--safe-l));
  max-width: 1680px; margin: 0 auto;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(280px, 340px);
  grid-template-areas: "bets game chat";
}
.col-game { grid-area: game; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.col-bets { grid-area: bets; }
.col-chat { grid-area: chat; }
.col-bets, .col-chat {
  position: sticky; top: calc(var(--header-h) + var(--gap));
  height: calc(100vh - var(--header-h) - 2 * var(--gap));
  height: calc(100dvh - var(--header-h) - 2 * var(--gap));
  min-height: 360px; min-width: 0;
  display: flex; flex-direction: column;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; min-height: 28px; }
.panel-h .stat { font-weight: 500; font-size: 12px; text-align: right; }
.online { font-weight: 500; font-size: 12px; margin-left: 4px; }

/* ---------- history strip ---------- */
.history {
  display: flex; gap: 6px; flex-wrap: nowrap; min-height: 26px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.history::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); font-variant-numeric: tabular-nums; }
.chip.lo { color: var(--blue); } .chip.mid { color: var(--purple); } .chip.hi { color: var(--gold); } .chip.bust { color: var(--red); }

/* ---------- stage ---------- */
.stage-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 8; min-height: 240px; max-height: 60vh;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 20% 100%, #1c2436 0%, #0f131c 60%, #0b0e14 100%);
  container-type: inline-size;
}
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.big {
  font-size: clamp(40px, 9vw, 88px); font-size: clamp(38px, 13cqw, 96px);
  font-weight: 800; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.big.crashed { color: var(--red); }
.big.small { font-size: clamp(15px, 3.2cqw, 24px); font-weight: 700; letter-spacing: 0; text-align: center; max-width: 86%; line-height: 1.35; color: var(--muted); }
.sub { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sub.crashed { color: var(--red); }
.bar { width: 180px; height: 6px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; display: none; }
.bar i { display: block; height: 100%; width: 100%; background: var(--accent); transition: width .1s linear; }
.round { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--muted); }

/* plane picker (top-left of the stage) */
.planes {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: flex; align-items: center; gap: 3px; padding: 3px;
  background: rgba(10,13,20,.74); border: 1px solid var(--line); border-radius: 12px;
}
.plane-opt {
  width: 50px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid transparent; opacity: .55; transition: opacity .15s, background .15s, border-color .15s;
}
.plane-opt canvas { width: 46px; height: 26px; display: block; pointer-events: none; }
.plane-opt:hover { opacity: .9; background: rgba(255,255,255,.06); }
.plane-opt.on { opacity: 1; border-color: var(--acc); background: rgba(255,255,255,.06); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.plane-opt:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.plane-name { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--acc); padding: 0 8px 0 5px; min-width: 52px; }

/* ---------- bet slots ---------- */
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.slot {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
  display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "amount" "chips" "autorow" "action" "status";
}
.slot > .row:first-child { display: contents; }
.slot.locked .amount, .slot.locked .chips, .slot.locked .auto { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.amount {
  grid-area: amount; display: flex; align-items: center; width: 100%;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.amount .amt {
  flex: 1; min-width: 0; width: auto; height: 42px; background: transparent; border: 0; outline: none;
  text-align: center; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.amount .amt::-webkit-outer-spin-button, .amount .amt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { width: 44px; height: 42px; flex: 0 0 auto; font-size: 20px; color: var(--muted); }
.step:hover { color: var(--text); background: rgba(255,255,255,.05); }
.chips { grid-area: chips; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chips button {
  height: 36px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.chips button:hover { color: var(--text); border-color: var(--muted); }
.auto { grid-area: autorow; } /* not "auto": grid-area: auto is the auto-placement keyword */
.switch { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch span { width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: rgba(34,197,94,.25); border-color: var(--green-d); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--green); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.autox { display: flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.autox input { width: 64px; height: 38px; background: transparent; border: 0; text-align: right; font-weight: 700; font-size: 16px; outline: none; }
.autox input:disabled { color: var(--muted); }
.action {
  grid-area: action; width: 100%; min-height: 62px; padding: 8px 12px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #fff; line-height: 1.15; transition: transform .05s, filter .15s;
}
.action .l1 { font-size: 16px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.action .l2 { font-size: 14px; font-weight: 700; opacity: .92; font-variant-numeric: tabular-nums; }
.action:active:not(:disabled) { transform: scale(.985); }
.action.bet { background: linear-gradient(180deg, var(--green), var(--green-d)); }
.action.next { background: linear-gradient(180deg, #2f6fe4, #2451b3); }
.action.cancel { background: linear-gradient(180deg, var(--red), var(--red-d)); }
.action.cashout { background: linear-gradient(180deg, #ffc233, #e39a00); color: #1a1200; animation: pulse 1s ease-in-out infinite; }
.action.done { background: var(--panel-2); color: var(--green); border: 1px solid var(--green-d); }
.action.lost { background: var(--panel-2); color: var(--red); border: 1px solid var(--red-d); }
.action:disabled { filter: saturate(.7); }
@keyframes pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
.slot-status { grid-area: status; font-size: 12px; color: var(--muted); min-height: 16px; text-align: center; }
.slot-toggle, .slot-toggle[hidden] { display: none; }

/* ---------- live bets ---------- */
.bets { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.bets-head, .bet-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); gap: 6px; }
.bets-head { position: sticky; top: 0; z-index: 1; padding: 2px 8px 6px; font-size: 11px; color: var(--muted); background: var(--panel); }
.bets-head span:nth-child(2), .bets-head span:nth-child(4) { text-align: right; }
.bets-head span:nth-child(3) { text-align: center; }
.bet-row { padding: 7px 8px; border-radius: 8px; font-size: 12px; background: var(--panel-2); align-items: center; }
.bet-row.me { outline: 1px solid var(--accent); }
.bet-row.cashed { background: rgba(34,197,94,.14); }
.bet-row.lost { background: rgba(239,68,68,.10); color: var(--muted); }
.bet-row .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bet-row .n.bot { color: var(--muted); font-weight: 500; }
.bet-row .a, .bet-row .p { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bet-row .x { text-align: center; font-weight: 700; }
.bet-row.cashed .x, .bet-row.cashed .p { color: var(--green); }
.bets-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 8px; }

/* ---------- chat ---------- */
.chat {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px; padding-right: 2px;
}
.msg { font-size: 13px; line-height: 1.4; word-break: break-word; }
.msg .t { color: var(--muted); font-size: 10px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.msg .n { color: var(--accent); font-weight: 700; margin-right: 6px; }
.msg.me .n { color: var(--green); }
.msg.system { color: var(--muted); font-style: italic; }
.msg.system .n { color: var(--muted); }
.chat:empty::before { content: 'No messages yet. Say hi 👋'; margin: auto; color: var(--muted); font-size: 13px; }
.chat-form { display: grid; gap: 6px; margin-top: 8px; }
.chat-as { font-size: 11px; color: var(--muted); }
.chat-as button { color: var(--accent); font-weight: 700; padding: 2px 0; text-decoration: underline dotted; text-underline-offset: 2px; }
.chat-row { display: flex; gap: 6px; }
.chat-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; font-size: 16px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.chat-row input:focus { border-color: var(--muted); }
.send { height: 44px; padding: 0 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.send:hover { border-color: var(--accent); color: var(--accent); }

/* drawer / sheet backdrop (never shown when chat is docked) */
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }

/* ---------- provably fair dialog ---------- */
dialog.sheet {
  padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text);
  width: min(560px, calc(100vw - 32px)); max-width: none; max-height: min(85vh, 760px); overflow: auto; overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: rgba(0,0,0,.55); }
.sheet-body { padding: 16px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sheet-h h2 { margin: 0; font-size: 17px; }
.sheet-lead { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
body:has(dialog[open]) { overflow: hidden; }
.fair { margin: 0; display: grid; gap: 4px; }
.fair dt { font-size: 11px; color: var(--muted); margin-top: 6px; }
.fair dd { margin: 0; background: var(--panel-2); padding: 8px; border-radius: 8px; }
.summary { margin: 4px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary .total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text); }
.summary dd.total { color: var(--green); }
.sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet-actions > * { flex: 1; height: 46px; border-radius: 10px; font-weight: 800; display: grid; place-items: center; text-decoration: none; color: var(--text); }
.btn-ghost { border: 1px solid var(--line); background: var(--panel-2); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: linear-gradient(180deg, var(--red), var(--red-d)); color: #fff !important; }
.btn-primary { background: linear-gradient(180deg, var(--green), var(--green-d)); color: #fff !important; }
.fair-link { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--accent); }
.fair dd a { color: var(--accent); }
.btn-wide { width: 100%; height: 44px; margin-top: 12px; border-radius: 10px; font-weight: 700; border: 1px solid var(--line); background: var(--panel-2); }
.btn-wide:hover { border-color: var(--accent); color: var(--accent); }
.fair-result { margin-top: 8px; font-size: 12px; display: grid; gap: 3px; }
.fair-result .ok { color: var(--green); } .fair-result .bad { color: var(--red); }
.how { margin-top: 10px; font-size: 12px; color: var(--muted); }
.how summary { cursor: pointer; padding: 6px 0; }
.how pre { font-size: 11px; white-space: pre-wrap; background: var(--panel-2); padding: 8px; border-radius: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px);
  background: #2b1d1d; color: #ffd5d5; border: 1px solid var(--red-d); border-radius: 10px; padding: 10px 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-size: 13px; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: #15261b; color: #c8f5d6; border-color: var(--green-d); }

/* ================= 900-1199: chat becomes a right-hand drawer ================= */
@media (max-width: 1199px) {
  .main { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); grid-template-areas: "bets game"; }
  .chat-toggle, .chat-close { display: grid; }
  .col-chat {
    position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; height: auto; min-height: 0;
    width: min(380px, 100vw); border-radius: 0; border-width: 0 0 0 1px;
    padding: 12px calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) 12px;
    box-shadow: -16px 0 40px rgba(0,0,0,.45);
    transform: translateX(100%); visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  body.chat-open .col-chat { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
  body.chat-open .scrim { opacity: 1; pointer-events: auto; }
  body.chat-open { overflow: hidden; }
}

/* ================= < 900: single column, chat as a full-screen sheet ================= */
@media (max-width: 899px) {
  :root { --gap: 12px; --header-h: 56px; }
  .main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "game" "bets"; padding-bottom: calc(var(--gap) + var(--safe-b)); }
  .col-bets { position: static; height: auto; min-height: 0; }
  .bets { overflow: visible; }
  .bets-head { position: static; }
  .stage-wrap { aspect-ratio: 16 / 10; min-height: 210px; max-height: 46vh; }
  .col-chat {
    width: 100%; top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100dvh);
    border-width: 0; box-shadow: none; padding-top: calc(10px + env(safe-area-inset-top, 0px));
    transform: translateY(100%);
  }
}

/* ================= < 640: compact header and bet slots ================= */
@media (max-width: 639px) {
  .top { gap: 6px; padding: 0 calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l)); }
  .brand { font-size: 14px; letter-spacing: .5px; gap: 5px; }
  .logo { font-size: 19px; }
  .badge, .name { display: none; }
  .me { gap: 5px; }
  .balance { font-size: 14px; padding: 7px 9px; }
  .topup { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; font-size: 20px; font-weight: 700; line-height: 1; }
  .topup-long { display: none; }
  .topup-short { display: inline; }
  .icon-btn { width: 36px; height: 36px; }
  .exit-btn { height: 36px; width: 36px; padding: 0; justify-content: center; }
  .exit-btn span { display: none; }

  .planes { top: 6px; left: 6px; gap: 2px; padding: 2px; }
  .plane-opt { width: 40px; height: 30px; }
  .plane-opt canvas { width: 38px; height: 22px; }
  .plane-name { display: none; }
  .round { top: 14px; }

  .slots { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .slots.one .slot[data-slot="1"] { display: none; }
  .slot {
    padding: 10px; gap: 8px 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "amount action" "chips action" "autorow autorow" "status status";
  }
  .step { width: 40px; }
  .chips button { height: 40px; font-size: 12px; }
  .chips { gap: 4px; }
  .action { min-height: 0; height: 100%; }
  .slot-status:empty { display: none; }
  .slot-toggle {
    display: block; width: 100%; height: 44px; border-radius: 10px; font-weight: 700; font-size: 13px;
    color: var(--muted); border: 1px dashed var(--line); background: transparent;
  }
  .slot-toggle:hover { color: var(--text); border-color: var(--muted); }
  .slot-toggle[hidden] { display: none; }

  /* provably fair: bottom sheet within thumb reach */
  dialog.sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; border-width: 1px 0 0;
    max-height: 88vh; max-height: 88dvh;
  }
  dialog.sheet[open] { animation: sheet-up .22s ease-out; }
  .sheet-body { padding-bottom: calc(16px + var(--safe-b)); }
  .sheet-body::before { content: ''; display: block; width: 40px; height: 4px; margin: -4px auto 10px; border-radius: 999px; background: var(--line); }
}

@media (max-width: 374px) {
  .brand-name { display: none; }
}

@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  dialog.sheet[open] { animation: none; }
  .action.cashout { animation: none; }
  .col-chat, .scrim, .toast { transition: none !important; }
}
