@font-face {
  font-family: "RuneScape UF";
  src: url("/static/runescape_uf.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RuneScape UF";
  src: url("/static/runescape_uf.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #04060c;
  --panel: #0c1528;
  --panel-2: #14305a;
  --ink: #07101c;
  --line: #2f9bff;
  --cream: #f3f7ff;
  --muted: #a9c0dc;
  --dim: #6e88aa;
  --green: #3ddc84;
  --red: #ff4d5a;
  --gold: #e4b34a;
  --silver: #e7eef8;
  --glow: transparent;
}

* { box-sizing: border-box; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}
body { height: 100%; }
#app { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 16px/1.4 "RuneScape UF", "Segoe UI", sans-serif;
  font-synthesis: none;
}

button, input { font: inherit; color: inherit; }

.shell { max-width: 1080px; margin: 0 auto; padding: 18px 16px 36px; }

.layout {
  display: block;
  margin-top: 16px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.game-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 148px;
  padding: 12px 8px 10px;
  border: 1px solid rgba(212, 175, 90, 0.82);
  border-radius: 10px;
  background: linear-gradient(180deg, #17243a 0%, #0c1526 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  appearance: none;
}

.game-tile:hover,
.game-tile:focus-visible,
.game-tile.on {
  border-color: #f3d78a;
  background: linear-gradient(180deg, #243656 0%, #122038 100%);
  box-shadow: 0 0 16px rgba(224, 180, 70, 0.38), inset 0 0 0 1px rgba(243, 215, 138, 0.35);
  outline: none;
}

.game-face {
  flex: 1;
  width: 100%;
  min-height: 78px;
  display: grid;
  place-items: center;
}

.game-art {
  width: 100%;
  height: 100%;
  max-height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
}

.game-name {
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
  color: #f4efe4;
  text-align: center;
  line-height: 1.15;
}

.mini-card {
  width: 52px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f7fb;
  color: #172033;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.mini-card.red { color: #d21f3c; }

.mini-pair { position: relative; width: 92px; height: 92px; }
.mini-pair .mini-card { position: absolute; top: 8px; }
.mini-pair .mini-card:first-child { left: 2px; transform: rotate(-10deg); }
.mini-pair .mini-card:last-child { right: 2px; transform: rotate(8deg); }

.die {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f4f7fb;
  color: #d21f3c;
  font-size: 36px;
  font-weight: 800;
  box-shadow: inset 0 0 0 3px #d7e2f2;
}

.pay-mark {
  font-size: 34px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
}

.crash-icon { width: 78px; height: 78px; }

.audit-corner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4;
}
.lobby { padding-bottom: 56px; }

.shell.hall {
  max-width: none;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  padding: 14px max(16px, 6vw) 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.12), rgba(4, 8, 16, 0.28)),
    url("/assets/Crash/ui_background.png?v=3") center / cover no-repeat;
  background-color: #07101c;
}

.hall-bar,
.hall-board,
.hall-stats { width: min(1040px, 100%); }

.hall-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.hall-mid {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 3px 3px 3px 10px;
  border: 1px solid rgba(212, 175, 90, 0.9);
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.78);
}
.hall-mid:hover,
.hall-mid:focus-within {
  border-color: #f3d78a;
}

.hall-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: center;
  justify-content: center;
}

.hall-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(212, 175, 90, 0.75);
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.72);
  color: #f4efe4;
  cursor: pointer;
  appearance: none;
}

.hall-btn.on,
.hall-btn:hover,
.hall-btn:focus-visible {
  border-color: #f3d78a;
  background: rgba(28, 40, 68, 0.92);
  outline: none;
}

.hall-btn:disabled,
.hall-btn:disabled:hover {
  opacity: 0.45;
  cursor: default;
  background: rgba(8, 12, 22, 0.72);
}

.hall-ico { width: 16px; height: 16px; flex: none; }

.crest {
  grid-area: crest;
  position: static;
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crest .crown {
  width: 46px;
  height: 34px;
  margin-bottom: -12px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.crest-ribbon {
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 36px 12px;
  background: linear-gradient(180deg, #5b92ff 0%, #1d4ed8 48%, #163a9c 100%);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.crest-ribbon .cozy { color: #f7f9ff; text-shadow: 0 2px 0 rgba(12, 32, 84, 0.45); }
.crest-ribbon .bets { color: #b9dcff; text-shadow: 0 0 12px rgba(150, 200, 255, 0.75); }

.hall-purse {
  grid-area: purse;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hall-balance {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.hall-balance[data-full]:hover::after,
.hall-balance[data-full]:focus-visible::after {
  content: attr(data-full);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  padding: 6px 10px;
  border: 1px solid rgba(212, 175, 90, 0.9);
  border-radius: 6px;
  background: #060a12;
  color: #f0c14a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.hall-balance:hover,
.hall-balance:focus-visible,
.hall-balance.on {
  border-color: #f3d78a;
  outline: none;
}

.hall-balance .balance {
  color: #f0c14a;
  font-weight: 700;
  font-size: 22px;
}

.win-float {
  position: fixed;
  z-index: 40;
  margin: 0;
  color: #b6f5c2;
  font: 700 18px/1 "RuneScape UF", "Segoe UI", sans-serif;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  animation: win-float 900ms ease-out forwards;
}

@keyframes win-float {
  0% { opacity: 0; transform: translate(-50%, 26px); }
  18% { opacity: 1; transform: translate(-50%, 14px); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

.stake-float {
  position: fixed;
  z-index: 40;
  margin: 0;
  color: #ff8d96;
  font: 700 18px/1 "RuneScape UF", "Segoe UI", sans-serif;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  animation: stake-float 900ms ease-out forwards;
}

@keyframes stake-float {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 36px); }
}

.hall-balance .coin-stack { width: 30px; height: 22px; }

.hall-plus {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.hall-plus:hover,
.hall-plus:focus-visible { background: #3ddc84; outline: none; }

.hall-avatar {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: #123a78;
  color: white;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}

.hall-avatar.on { border-color: #f3d78a; }
.hall-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hall-board {
  flex: 1;
  padding: 14px;
  border: 2px solid rgba(212, 175, 90, 0.9);
  border-radius: 12px;
  background: rgba(7, 12, 24, 0.8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(90, 68, 28, 0.65);
}

.hall-sheet {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 90, 0.7);
  border-radius: 10px;
  background: rgba(8, 14, 26, 0.94);
}

.hall-sheet h2 {
  margin: 0 0 6px;
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.hall-sheet p { margin: 4px 0; color: var(--muted); }
.hall-sheet .hall-btn { margin-top: 8px; margin-right: 8px; }

.hall-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(212, 175, 90, 0.85);
  border-radius: 12px;
  background: #060a12;
  overflow: hidden;
}

.hall-stat {
  padding: 8px 10px 10px;
  text-align: center;
  border-left: 1px solid rgba(212, 175, 90, 0.35);
}

.hall-stat:first-child { border-left: none; }

.hall-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f4efe4;
  font-variant-numeric: tabular-nums;
}

.hall-stat span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
}

.hall .hint,
.hall .banner { margin: 0 0 10px; }

.shell.hall.play {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.arcade-header {
  flex: none;
  display: flex;
  justify-content: center;
  width: min(1040px, 100%);
}
.arcade-header .crest { align-items: center; }
.shell.hall.play .arcade-header { flex: none; }
.box-identity {
  display: flex;
  justify-content: center;
  width: 100%;
  flex: none;
  margin: 0 0 8px;
}
.stage-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.stage-top .stage-nav { width: 100%; }

.shell.hall.play .hall-sheet { width: min(1040px, 100%); }

.hall-board {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hall-board .game-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-auto-rows: minmax(0, 1fr);
}
.hall-board .game-tile {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  justify-content: stretch;
  gap: 2px;
}
.hall-board .game-face {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.hall-board .game-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.hall-board .game-name {
  flex: none;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-play {
  position: relative;
  width: min(1040px, 100%);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 2px solid rgba(212, 175, 90, 0.9);
  border-radius: 12px;
  background: rgba(7, 12, 24, 0.8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(90, 68, 28, 0.65);
}

.hall-play .stage {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app:has(.hall) {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#app:has(.hall.play) {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

@media (max-width: 980px) {
  .hall-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
  }
  .crest .crown { width: 34px; height: 26px; margin-bottom: -8px; }
  .crest-ribbon { font-size: 20px; padding: 7px 18px 8px; }
  .hall-balance {
    min-width: 0;
    max-width: 100%;
  }
  .hall-balance .balance {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .play-split {
    display: flex;
    flex-direction: column;
  }
  .play-board { order: 0; }
  .bet-side { order: 1; overflow: hidden; }
}
.stage-nav {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  width: 100%;
  gap: 8px;
}
.stage-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  justify-self: start;
  overflow: hidden;
}
.stage-stake {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.stage-stake b { color: var(--cream); }
.stage-stake .number-progress { margin-left: 8px; }
.stage-nav .back { justify-self: start; flex: none; }
.stage-nav .nav-audit {
  justify-self: end;
  margin: 0;
  padding: 6px 10px;
  font-weight: inherit;
  text-align: center;
}
.stage-name {
  min-width: 0;
  max-width: min(560px, 100%);
  justify-self: center;
  text-align: center;
}
.stage-name h2 {
  margin: 0;
  text-align: center;
}
.stage-name .id { margin: 2px 0 0; color: var(--dim); font-size: 12px; text-align: center; }
.stage-name .blurb {
  margin: 4px auto 0;
  max-width: 460px;
  text-align: center;
}
.bet-limits {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.stage-side { justify-self: end; display: flex; align-items: center; gap: 6px; }
.info-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 90, 0.9);
  background: rgba(7, 12, 24, 0.9);
  color: #f3d78a;
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
  cursor: pointer;
}
.home-btn {
  display: grid;
  place-items: center;
  font-style: normal;
}
.home-btn .home-ico { width: 14px; height: 14px; display: block; }
.info-btn:hover,
.info-btn.on,
.info-btn:focus-visible {
  background: #f3d78a;
  color: #1a1408;
  outline: none;
}
.help-pop {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 8, 16, 0.72);
}
.help-card {
  width: min(460px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(212, 175, 90, 0.9);
  background: #07101c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.help-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-top h2 { margin: 0; font-size: 22px; }
.help-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 90, 0.9);
  background: transparent;
  color: #f3d78a;
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
}
.help-close:hover,
.help-close:focus-visible { background: #f3d78a; color: #1a1408; outline: none; }
.help-card h3 {
  margin: 14px 0 6px;
  color: #f3d78a;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.help-card ul { margin: 0; padding-left: 18px; }
.help-card li { margin: 4px 0; color: var(--cream); font-size: 14px; line-height: 1.45; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.content { min-width: 0; }

.nav-game {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(47, 155, 255, 0.45);
  border-radius: 4px;
  background: var(--panel);
  color: var(--cream);
  cursor: pointer;
}

.nav-game:hover { background: var(--panel-2); }

.nav-game.on {
  background: #1a6dff;
  border-color: #8ecbff;
  color: #f3f7ff;
  box-shadow: none;
}

.nav-audit {
  margin-top: 8px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #8a4038;
  border-radius: 4px;
  background: #3a221c;
  color: #f0c2b8;
  font-weight: 700;
  cursor: pointer;
}

.nav-audit:hover { background: #4a2c24; color: #f6ddd6; }

.nav-audit.on {
  background: #a8483c;
  border-color: #e7b2a8;
  color: #1a120c;
  box-shadow: none;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  max-height: 68vh;
  overflow: auto;
}

.audit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.28);
  background: #07101c;
}

.audit-row.win { border-color: rgba(61, 220, 132, 0.5); }
.audit-row.loss { border-color: rgba(255, 77, 90, 0.5); }
.audit-row.push { border-color: rgba(228, 179, 74, 0.5); }

.audit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: var(--dim);
}

.audit-row.win .audit-dot { background: var(--green); }
.audit-row.loss .audit-dot { background: var(--red); }
.audit-row.push .audit-dot { background: var(--gold); }

.audit-main { min-width: 0; flex: 1; }
.audit-main > b { display: block; }
.audit-main > span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-money {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.audit-money .up { color: var(--green); }
.audit-money .down { color: var(--red); }
.audit-money .flat { color: var(--gold); }

.audit-result { flex: none; font-size: 14px; }
.audit-row.win .audit-result { color: var(--green); }
.audit-row.loss .audit-result { color: var(--red); }
.audit-row.push .audit-result { color: var(--gold); }

.audit-filters { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.audit-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.audit-seg .choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 4px;
  text-align: center;
}
.audit-seg .label { font-size: 13px; font-weight: 700; }
.audit-seg .count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.audit-seg .choice.on .count { color: inherit; }
.staff-tools .choice.on.win,
.audit-filters .choice.on.win {
  background: #2f8f52;
  border-color: #8ddeaf;
  color: #10210f;
  box-shadow: none;
}
.staff-tools .choice.on.loss,
.audit-filters .choice.on.loss {
  background: #a8483c;
  border-color: #e7b2a8;
  color: #1a120c;
  box-shadow: none;
}
.staff-tools .choice.on.push,
.audit-filters .choice.on.push {
  background: #c4922a;
  border-color: #e4b34a;
  color: #1a120c;
  box-shadow: none;
}
.audit-game { display: flex; align-items: center; gap: 10px; }
.audit-game span { flex: none; color: var(--muted); font-size: 14px; }
.audit-row.deposit { border-color: rgba(61, 220, 132, 0.5); }
.audit-row.withdraw { border-color: rgba(255, 77, 90, 0.5); }
.audit-row.refund { border-color: rgba(228, 179, 74, 0.5); }
.audit-row.bonus { border-color: rgba(47, 155, 255, 0.5); }
.audit-row.deposit .audit-dot { background: var(--green); }
.audit-row.withdraw .audit-dot { background: var(--red); }
.audit-row.refund .audit-dot { background: var(--gold); }
.audit-row.bonus .audit-dot { background: var(--line); }
.audit-row.deposit .audit-result { color: var(--green); }
.audit-row.withdraw .audit-result { color: var(--red); }
.audit-row.refund .audit-result { color: var(--gold); }
.audit-row.bonus .audit-result { color: var(--line); }
.audit-row.transfer { border-color: rgba(228, 179, 74, 0.5); }
.audit-row.transfer .audit-dot { background: var(--gold); }
.audit-row.transfer .audit-result { color: var(--gold); }
.audit-row.referral { border-color: rgba(47, 155, 255, 0.5); }
.audit-row.referral .audit-dot { background: var(--line); }
.audit-row.referral .audit-result { color: var(--line); }

.staff-tools { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.staff-tools input.staff-search {
  width: 100%;
  min-height: 44px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
  padding: 0 12px;
}
.staff-kind { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staff-kind .label { font-size: 12px; }
.staff-status { margin: 8px 0 0; }

.audit-game select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
  color: var(--cream);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(47, 155, 255, 0.45);
}

.brand {
  margin: 0;
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--silver);
}
.brand .cozy {
  color: var(--silver);
  text-shadow: 0 0 16px rgba(231, 238, 248, 0.55);
}
.brand .bets {
  color: #3aa6ff;
  text-shadow: 0 0 18px rgba(58, 166, 255, 0.9);
}

.lobby-top {
  align-items: center;
  border-bottom-color: rgba(212, 168, 74, 0.8);
}

.lobby-top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lobby-top .brand .cozy {
  color: #f4e7c4;
  text-shadow: none;
}

.crown {
  width: 30px;
  height: 24px;
  flex: none;
}

.purse {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-stack {
  width: 34px;
  height: 24px;
  flex: none;
}

.lobby-top .balance {
  color: #f0c14a;
  font-weight: 700;
}

.who { margin: 0; color: var(--cream); font-weight: 700; }

.account { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.player { display: flex; align-items: center; gap: 8px; }
.avatar, .avatar.fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(142, 203, 255, 0.7);
}
.avatar.fallback {
  display: grid;
  place-items: center;
  background: #123a78;
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.balance { font-size: 28px; font-variant-numeric: tabular-nums; }

.hint, .footer { color: var(--dim); }

.stake-row, .actions, .picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.stake-row { margin: 16px 0; }

.bet-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 155, 255, 0.28);
}

.bet-line {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.stake-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(220px, 100%);
  flex: 0 0 auto;
}
.stake-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 2px;
}
.stake-head label {
  margin: 0;
  color: var(--cream);
  font-weight: 800;
}
.stake-head .bet-limits {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}
.stake-main {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.stake-main .stake-row {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.stake-quick {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 84px;
  flex: none;
  align-self: stretch;
}
.stake-quick-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  flex: 1 1 0;
  min-height: 0;
}
.stake-quick-btn {
  min-height: 0;
  height: 100%;
  padding: 0;
  border-radius: 3px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: transparent;
  color: var(--cream);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.stake-quick-btn.stake-max {
  flex: 1 1 0;
  height: auto;
}
.stake-quick-btn:hover { background: rgba(47, 155, 255, 0.16); }
.stake-quick-btn:disabled { opacity: 0.35; cursor: default; }

.bet-dock .stake-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  flex: 0 0 auto;
  width: auto;
  gap: 0;
  min-height: 40px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
  container-type: inline-size;
}

.bet-dock .stake-row .stake-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
}
.bet-dock .stake-row label { flex: none; margin: 0; }
.bet-dock .stake-row .stake-amount {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  gap: 2px;
}
.bet-dock .stake-row .stake-currency { flex: none; }
.bet-dock .stake-row .stake-amount input[type="text"] {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  -webkit-user-select: text;
  user-select: text;
}
@container (max-width: 170px) {
  .bet-dock .stake-row .stake-amount input[type="text"] {
    font-size: 13px;
  }
}
@container (max-width: 120px) {
  .bet-dock .stake-row .stake-amount input[type="text"] {
    font-size: 11px;
  }
}
.bet-dock .stake-row .stake-step {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.bet-dock .stake-row .stake-step:first-child {
  border-right: 1px solid rgba(47, 155, 255, 0.35);
}
.bet-dock .stake-row .stake-step:last-child {
  border-left: 1px solid rgba(47, 155, 255, 0.35);
}
.bet-dock .stake-row .stake-step:hover { background: rgba(47, 155, 255, 0.16); }
.bet-dock .stake-row .stake-step:disabled { opacity: 0.35; cursor: default; }

.bet-dock .stake-row input[type="text"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bet-dock .extra-field { display: flex; flex-direction: column; gap: 4px; }
.bet-dock .extra-field .hint { margin: 0; font-size: 12px; }
.bet-dock .extra-field input:disabled { opacity: 0.45; cursor: default; }

.bet-dock .picks { width: 100%; }
.bet-dock .picks .choice { flex: 1; min-height: 44px; text-align: center; }

.bet-line .play {
  flex: 0 0 112px;
  min-height: 48px;
}
.bet-line .play:disabled { opacity: 0.45; cursor: default; }

.play-split {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  overflow: hidden;
}
.bet-side {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.35);
  background: var(--panel);
  overflow: hidden;
  z-index: 2;
}
.hall-play .stage { container-type: size; container-name: stage; }
.play-board {
  order: 0;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: size;
  container-name: board;
}
.play-board > .playfield,
.play-board > .keno-wrap,
.play-board > .plinko-wrap,
.play-board > .dice-wrap,
.play-board > .limbo-wrap,
.play-board > .crash-wrap,
.play-board > .pot {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.play-board .live { margin: 0; }
.bet-side .bet-dock {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.bet-side .bet-dock > .extra-field,
.bet-side .bet-dock > .keno-tools {
  display: contents;
}
.bet-side .bet-line {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex: 1 0 100%;
  width: min(360px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.bet-side .stake-block { width: 100%; }
.bet-side .stake-main .stake-row {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
}
.bet-side .stake-head {
  flex-wrap: wrap;
  row-gap: 0;
}
.bet-side .bet-dock > .extra-field.labeled-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
}
.bet-side .bet-dock > .extra-field.labeled-field:has(.step-row) {
  flex: 0 0 auto;
  width: calc(min(360px, 100%) - 90px);
  max-width: calc(min(360px, 100%) - 90px);
  margin-left: max(0px, calc((100% - min(360px, 100%)) / 2));
  margin-right: auto;
}
.bet-side .labeled-field .auto-row {
  display: flex;
  width: 100%;
  padding: 0;
}
.bet-side .labeled-field .auto-row input[type="text"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  text-align: center;
}
.bet-side .extra-field .stake-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  gap: 8px;
  padding: 0 10px;
  box-sizing: border-box;
}
.bet-side .labeled-field .step-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  width: 100%;
  gap: 0;
  padding: 0;
}
.bet-side .labeled-field .step-row .stake-step {
  position: relative;
  z-index: 1;
  width: 36px;
  min-width: 36px;
}
.bet-side .labeled-field .step-row .stake-field {
  min-width: 0;
  overflow: hidden;
}
.bet-side .bet-dock .stake-row input[type="text"],
.bet-side .extra-field .stake-row input[type="text"] {
  flex: 1 1 0;
  width: 0;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.bet-side .extra-field .stake-row input[type="text"] {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: none;
}
.bet-side .bet-dock .stake-row .stake-amount input[type="text"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.bet-side .bet-line .play {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 10px;
}
.bet-side .picks,
.bet-side .actions,
.bet-side .auto-modes,
.bet-side .keno-tools,
.bet-side .keno-risks {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: auto;
  gap: 8px;
}
.bet-side .keno-risks {
  flex: 1 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.bet-side .keno-risk,
.bet-side .keno-tool,
.bet-side .actions .action {
  width: auto;
  min-width: 108px;
}
.bet-side .keno-risk {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 4px;
  text-align: center;
}
.bet-side .plinko-rows select { flex: 0 0 72px; width: 72px; }
.bet-side .hint,
.bet-side .error,
.bet-side .stand-clock {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  text-align: center;
}
.bet-side .actions {
  width: 100%;
  flex: 0 0 auto;
  justify-content: center;
}
.bet-side .crash-players {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 56px;
  padding: 0;
  background: transparent;
}
.play-split:has(.crash-wrap) .bet-side { gap: 4px; padding: 6px 8px; }
.play-split:has(.crash-wrap) .labeled-field .hint { display: none; }
.play-split:has(.crash-wrap) .bet-side .bet-line { gap: 4px; }
.play-split:has(.crash-wrap) .bet-dock .stake-row,
.play-split:has(.crash-wrap) .labeled-field .step-row { min-height: 32px; }
.play-split:has(.crash-wrap) .bet-side .bet-line .play { min-height: 32px; padding: 4px 8px; }
.play-split:has(.crash-wrap) .fair-hash p,
.play-split:has(.crash-wrap) .bet-side .hint,
.play-split:has(.crash-wrap) .crash-hash {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}
.play-split:has(.crash-wrap) .stake-quick { width: 72px; gap: 2px; }
.play-split:has(.crash-wrap) .stake-quick-btn { font-size: 10px; }
.bet-side .action.cash {
  width: auto;
  min-width: 140px;
  margin: 0;
  background: #2f8f52;
  border-color: #8ddeaf;
  color: #10210f;
}

.actions { width: 100%; }
.stand-clock {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.stand-clock.urgent { color: var(--red); }
.actions .action { flex: 1; min-height: 44px; text-align: center; }
.action.hit {
  background: #2f8f52;
  border-color: #8ddeaf;
  color: #10210f;
}
.action.stand {
  background: #d64550;
  border-color: #ffb0b6;
  color: #2a0c10;
}
.action.double {
  background: #e08a1e;
  border-color: #ffd18a;
  color: #2a1804;
}
.action.hit:hover { background: #3aa864; }
.action.stand:hover { background: #e25560; }
.action.double:hover { background: #f09a2e; }

label { color: var(--muted); }

input[type="text"] {
  width: 120px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--ink);
  box-shadow: none;
}

.choice, .action, .back {
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--panel);
  box-shadow: none;
  border-radius: 4px;
  cursor: pointer;
}

.stage h2 { display: block; color: var(--cream); margin: 0; }
.stage-top { width: 100%; }
.stage-top .back { flex: none; padding: 6px 10px; }
.blurb { color: var(--muted); font-size: 14px; }
.choice:hover, .action:hover, .back:hover { background: var(--panel-2); }
.choice.on { outline: 1px solid #8ecbff; }

.stage {
  margin-top: 0;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: #07101c;
  box-shadow: none;
}

.stage.tone-win { border-color: var(--green); }
.stage.tone-loss { border-color: var(--red); }
.stage.tone-tie, .stage.tone-mixed { border-color: var(--gold); }

.back, .choice, .action {
  padding: 10px 14px;
  background: var(--ink);
}

.action.primary, .choice.on {
  background: #1a6dff;
  border-color: #8ecbff;
  color: #f3f7ff;
  box-shadow: none;
}
.picks .choice.hot { border-color: #a86830; }
.picks .choice.cold { border-color: rgba(47, 155, 255, 0.45); }
.picks .choice.hot.on {
  background: #c45a22;
  border-color: #f0c08a;
  color: #1a120c;
  outline-color: #f0c08a;
  box-shadow: none;
}
.picks .choice.cold.on {
  background: #3d6ea8;
  border-color: #b7cbe0;
  color: #f3f7ff;
  outline-color: #b7cbe0;
  box-shadow: none;
}

.shot {
  width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 12px;
  background: #05070e;
}

.win-pop {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 22px 28px;
  border-radius: 8px;
  border: 2px solid rgba(47, 155, 255, 0.8);
  background: rgba(7, 16, 28, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  text-align: center;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.win-pop.tone-win { border-color: var(--green); }
.win-pop.tone-loss { border-color: var(--red); }
.win-pop.tone-tie,
.win-pop.tone-mixed { border-color: var(--gold); }
.play-board:has(.win-pop) .limbo-result { visibility: hidden; }
.win-pop .pay-won {
  color: var(--cream);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.win-pop .pay-won b {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1;
  text-shadow: 0 2px 0 #000;
}
.win-pop .result-detail {
  max-width: 280px;
  color: var(--cream);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 0 #000;
}
.win-pop .result-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.win-pop .result-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 280px;
}
.win-pop .result-chip {
  padding: 4px 7px;
  border-radius: 4px;
  background: #10192a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.win-pop .result-chip.high { color: var(--green); }
.win-pop .result-chip.mid { color: var(--gold); }
.win-pop .result-chip.low { color: #ff8aa0; }
.win-pop .result-credit {
  color: var(--cream);
  font-size: 18px;
  font-weight: 800;
}

.playfield { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.playfield:not(:has(.live, .bj-table)) { min-height: 0; }

.error {
  color: #ffd0cc;
  background: #4a1614;
  border-radius: 4px;
  padding: 10px 12px;
}

.restart-note {
  width: min(1040px, 100%);
  flex: none;
  margin: 0;
  color: #ffd0cc;
  background: #4a1614;
  border-radius: 4px;
  padding: 10px 12px;
  text-align: center;
}

.shell.locked > :not(.restart-note) {
  pointer-events: none;
  user-select: none;
}

.banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.hand { margin-top: 8px; }
.hand p { margin: 4px 0; }

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.boot .brand {
  font-size: 56px;
  animation: logo-glow 1.35s ease-in-out infinite;
}

.loader {
  width: 240px;
  height: 8px;
  border-radius: 999px;
  background: #163056;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(47, 155, 255, 0.45);
}

.loader span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #d7ecff, #2f9bff);
  box-shadow: 0 0 16px #2f9bff;
  animation: load-slide 1.15s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(47, 155, 255, 0.2)); opacity: 0.78; }
  50% { filter: drop-shadow(0 0 22px rgba(58, 166, 255, 0.95)); opacity: 1; }
}

@keyframes load-slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(280%); }
}

.outside, .blocked {
  max-width: 640px;
  margin: 8vh auto;
  padding: 8px 16px 28px;
}

.outside h1, .blocked h1 {
  font-family: "RuneScape UF", Georgia, "Times New Roman", serif;
}

.id { color: var(--dim); letter-spacing: 0.08em; }

.live { margin: 14px 0; }
.live-note { margin: 0; color: var(--muted); text-align: center; }

.coin-frame {
  width: min(200px, 100%);
  height: auto;
  max-height: 100%;
  aspect-ratio: 1;
  margin: 8px auto 4px;
  display: grid;
  place-items: center;
}
.coin-face {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
}

.lane { display: grid; grid-template-columns: 110px 1fr 48px; gap: 8px; align-items: center; margin: 8px 0; }
.lane-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.race-track, .arena {
  position: relative;
  width: min(100%, 720px);
  max-height: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #070b12;
}
.playfield:has(.race-track),
.playfield:has(.arena),
.playfield:has(.race-track) > .live,
.playfield:has(.arena) > .live {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.race-track { aspect-ratio: 768 / 480; }
.arena-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1774 / 887;
  overflow: hidden;
}
.race-board, .arena-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.runner {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.jogger { height: 100%; width: auto; display: block; }
.runner.you .jogger { filter: drop-shadow(0 0 3px #3aa6ff); }
.runner.house .jogger { filter: drop-shadow(0 0 4px #e8b83a); }
.runner-name {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  color: #fff8dc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000, 0 0 4px #000;
}
.fighter {
  position: absolute;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
.bones {
  position: absolute;
  z-index: 4;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}
.hitsplat {
  position: absolute;
  width: 4%;
  height: auto;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}
.hit-log {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px 8px;
  background: rgba(8, 6, 4, 0.78);
  pointer-events: none;
}
.hit-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 0;
  height: 36px;
}
.hit-row + .hit-row { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); padding-top: 4px; }
.hit-row .who {
  width: 78px;
  flex: none;
  overflow: hidden;
  color: #fff8ea;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000;
}
.hit-row .splats {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}
.log-splat {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 36px;
  height: 32px;
  margin: 0;
  object-fit: contain;
  object-position: center;
}
.meter {
  position: absolute;
  width: 12%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, calc(-100% - 18px));
  pointer-events: none;
}
.meter-name {
  max-width: 100%;
  overflow: hidden;
  color: #fff8ea;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 #000, 0 0 4px #000;
}
.stem {
  position: relative;
  width: 100%;
  height: 18px;
  margin: 0;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  padding: 2px;
  background: #e8b83a;
  border-radius: 3px;
}
.meter .hp {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding-top: 3px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px #000;
}
.meter.poison .stem { background: #3ddc6e; }
.meter.poison .hp { color: #e9ffe9; }
.juice {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(#3a0610, #9a1420 42%, #d0222c);
  border-radius: 1px;
}
.juice::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}
.stem i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  display: block;
  width: 0;
  height: auto;
  background: linear-gradient(#f4ffe8, #46eb5a 18%, #149433 62%, #04601a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.throws, .fan, .chips, .hits { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.throws { justify-content: center; margin: 8px 0 4px; }
.throw {
  width: clamp(72px, 42cqb, 168px);
  min-height: 0;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  text-transform: capitalize;
  background: transparent;
}
.throw .art { width: clamp(64px, 38cqb, 150px); height: clamp(64px, 38cqb, 150px); object-fit: contain; display: block; margin: 0 auto; }
.throw span { display: block; color: var(--muted); }
.live.motion .throw { animation: pop-in 0.6s ease both; }
.live.rps.motion .throw { animation: none; }
.throw.landed .art { animation: pop-in 0.28s ease both; }

.playing-card {
  width: 64px;
  height: 90px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff8ea;
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.playing-card.red { color: #c0392b; }
.playing-card.back { background: repeating-linear-gradient(45deg, #123a78, #123a78 8px, #071428 8px, #071428 16px); }
.playing-card.flip { animation: deal-card 0.35s ease both; }
.card-row, .bloom { margin: 8px 0; }
.card-title { margin: 0 0 6px; color: var(--muted); }
.war {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 12px 0 6px;
}
.war .seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: auto;
  min-width: 168px;
  padding: 12px 12px 16px;
  border-radius: 4px;
  background: #07101c;
}
.war .seat.you { box-shadow: inset 0 0 0 2px #3aa6ff; }
.war .seat.house { box-shadow: inset 0 0 0 2px var(--gold); }
.war .seat.won {
  background: #1c3324;
  box-shadow: inset 0 0 0 2px var(--green);
}
.war .lane-name {
  max-width: 144px;
  color: var(--cream);
  font-weight: 700;
  text-align: center;
}
.war .seat.won .lane-name,
.war .seat.won .card-title,
.war .seat.won .throw span { color: var(--green); }
.seat .throw { width: auto; min-height: 0; padding: 0; }
.playfield:has(.bj-table) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.bj-table {
  flex-direction: column;
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  gap: 8px;
}
.bj-table .seat {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  justify-content: flex-start;
}
.bj-table .card-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.bj-table .seat.you:has(.card-row + .card-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 6px;
}
.bj-table .seat.you:has(.card-row + .card-row) > .lane-name {
  grid-column: 1 / -1;
  max-width: none;
}
.bj-table .seat.you:has(.card-row + .card-row) > .card-row {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
}
.bj-table .fan {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.bj-table .playing-card {
  flex: 1 1 0;
  width: auto;
  max-width: 108px;
  height: auto;
  max-height: min(150px, 100%);
  aspect-ratio: 5 / 7;
  min-width: 0;
  min-height: 0;
  container-type: inline-size;
  overflow: hidden;
}
.bj-table .playing-card.dealt {
  position: relative;
  display: flex;
  container-type: size;
  background: #fffdf8;
  color: #1b130c;
  font-family: Georgia, "Times New Roman", serif;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.38);
}
.bj-table .playing-card.dealt.red { color: #c4162c; }
.bj-table .playing-card.back {
  background:
    radial-gradient(circle at 50% 46%, #e4b34a 0 8%, transparent 9%),
    repeating-linear-gradient(45deg, #1a4388 0 6px, #0c244c 6px 12px);
  box-shadow:
    inset 0 0 0 5px #0c244c,
    inset 0 0 0 6px #e4b34a,
    inset 0 0 0 10px #0c244c,
    0 8px 16px rgba(0, 0, 0, 0.38);
}
.bj-table .face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
  width: 100%;
  height: 100%;
}
.bj-table .face b {
  font-size: clamp(16px, 34cqh, 48px);
  font-weight: 700;
  line-height: 0.9;
}
.bj-table .face.wide b {
  font-size: clamp(14px, 26cqh, 36px);
  letter-spacing: -0.03em;
}
.bj-table .suit {
  width: clamp(16px, 32cqh, 46px);
  height: clamp(16px, 32cqh, 46px);
  display: block;
}
.bj-table .card-row.won .card-title { color: var(--green); }
.bj-table .card-row.lost .card-title { color: var(--red); }
.bj-table .card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.bj-table .card-title b { color: var(--cream); font-variant-numeric: tabular-nums; }
.bj-table .hand-mark {
  padding: 3px 8px;
  border-radius: 4px;
  background: #1a6dff;
  color: #f3f7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bj-table .card-row.playing {
  padding: 8px 10px 12px;
  border-radius: 4px;
  background: #10284a;
  box-shadow: inset 0 0 0 2px #2f9bff;
}
.bj-table .card-row.playing .card-title { color: var(--cream); font-weight: 800; }
.bj-table .card-row.wait { opacity: 0.38; }
.bet-side .hand-now {
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #2f9bff;
  background: #10284a;
  color: #f3f7ff;
  font-weight: 800;
  text-align: center;
}
.war-stack { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.war-ties { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.war .playing-card.showdown {
  width: 112px;
  height: 156px;
  border-radius: 14px;
  font-size: 36px;
}
.war .playing-card.earlier {
  width: 48px;
  height: 68px;
  border-radius: 8px;
  font-size: 14px;
}
.live.motion .playing-card { animation: deal-card 0.45s ease both; }

.death-note, .death-open { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.death-open { color: var(--cream); font-weight: 700; }
.death-turns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}
.death-turn {
  display: grid;
  grid-template-columns: minmax(72px, 1.1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  background: #07101c;
  border: 1px solid rgba(47, 155, 255, 0.28);
}
.death-turn.you { border-color: #3aa6ff; }
.death-turn .who { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.death-turn .range { color: var(--muted); font-size: 13px; white-space: nowrap; }
.death-turn b { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.death-turn .tag { min-width: 46px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.death-turn.dead { border-color: rgba(255, 77, 90, 0.75); background: rgba(90, 16, 24, 0.55); }
.death-turn.dead b { color: var(--red); }
.flower {
  width: clamp(36px, 16cqb, 72px);
  height: clamp(36px, 16cqb, 72px);
  object-fit: contain;
  background: none;
  border: 0;
  padding: 0;
}
.flower-slot {
  display: inline-grid;
  border-radius: 18px;
}
.flower-slot.match {
  box-shadow: inset 0 0 0 3px var(--match);
}
.play-split:has(.pot) { align-items: stretch; }
.play-board:has(.pot) {
  display: flex;
  flex-direction: column;
}
.play-board:has(.pot) .playfield,
.play-board:has(.pot) > .pot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
}
.live.hotcold {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pot {
  width: min(100%, 320px);
  max-width: 100%;
  max-height: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.pot-flower {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.live.motion .pot-flower.planting {
  opacity: 0;
  animation: plant-flower 0.42s ease forwards;
}
.live.flowers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.live.flowers .bloom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name hand" "chips chips";
  row-gap: 6px;
  column-gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border-radius: 4px;
  box-sizing: border-box;
}
.live.flowers .lane-name {
  grid-area: name;
  max-width: none;
  min-width: 0;
}
.live.flowers .chips {
  grid-area: chips;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 8px;
  min-width: 0;
}
.live.flowers .bloom b {
  grid-area: hand;
  min-width: 0;
  min-height: 1.2em;
  margin: 0;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}
.live.flowers .chips > .flower,
.live.flowers .chips > .flower-slot {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  justify-self: stretch;
  box-sizing: border-box;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(142, 203, 255, 0.35);
  border-radius: 10px;
  background: rgba(7, 16, 28, 0.72);
}
.live.flowers .flower {
  width: 100%;
  height: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
}
.bloom {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bloom.won {
  background: #1c3324;
  box-shadow: inset 0 0 0 2px var(--green);
}
.bloom.won .lane-name,
.bloom.won b { color: var(--green); }
.flower-slot.blue { --match: #4696ff; }
.flower-slot.orange { --match: #ff9620; }
.flower-slot.pastel { --match: #ff96d2; }
.flower-slot.rainbow { --match: #ff46a0; }
.flower-slot.red { --match: #e63737; }
.flower-slot.yellow { --match: #f5d228; }
.flower-slot.purple { --match: #ba46f0; }
.live.motion .flower.planting {
  animation: flower-appear 0.35s ease both;
}
@keyframes flower-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
.live.motion .flower-slot.match.pending {
  box-shadow: none;
  animation: match-glow 0.35s ease forwards;
}
.bloom b { margin-left: auto; }

.number-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
.number-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.playfield:has(.number-wrap),
.playfield:has(.number-wrap) > .live {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.number-wrap .number-board { flex: none; margin: 0; }
.number-wrap .number-rolls {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: flex-start;
}
.play-count {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
}
.pick-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: max-content;
  max-width: 100%;
}
.pick-block > label {
  margin: 0;
  color: var(--cream);
  font-weight: 800;
}
.pick-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 72px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
}
.pick-row.stepped {
  display: grid;
  grid-template-columns: 28px minmax(3.2ch, 1fr) 28px;
  padding: 0;
  width: 132px;
  min-width: 132px;
  overflow: hidden;
}
.pick-row.stepped input[type="text"] {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 6px 0;
  text-align: center;
}
.pick-row.stepped .stake-step {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pick-row.stepped .stake-step:first-child { border-right: 1px solid rgba(47, 155, 255, 0.35); }
.pick-row.stepped .stake-step:last-child { border-left: 1px solid rgba(47, 155, 255, 0.35); }
.pick-row.stepped .stake-step:hover { background: rgba(47, 155, 255, 0.16); }
.pick-row.stepped .stake-step:disabled { opacity: 0.35; cursor: default; }
.auto-modes { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.mode-check {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}
.mode-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1a6dff;
  cursor: pointer;
}
.mode-check.win input { accent-color: #e08a1e; }
.mode-check:has(input:disabled) { opacity: 0.45; cursor: default; }
.number-rolls { display: flex; flex-wrap: wrap; gap: 6px; }
.number-roll {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 2px;
  background: rgba(225, 90, 74, 0.18);
  color: #ffb4bc;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.number-roll.hit {
  background: rgba(61, 220, 132, 0.18);
  color: #8dffc0;
}
.number-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 18px;
  border-radius: 4px;
  background: #07101c;
  border: 1px solid rgba(47, 155, 255, 0.45);
}
.number-card b {
  font-size: clamp(36px, 8vw, 56px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.number-card.hit {
  border-color: var(--green);
  box-shadow: none;
}
.number-card.hit .lane-name,
.number-card.hit b { color: var(--green); }
.number-card.miss {
  border-color: rgba(255, 77, 90, 0.75);
  background: rgba(90, 16, 24, 0.45);
}
.number-card.miss b { color: var(--red); }

.crash-wrap { margin: 12px 0 4px; }
.crash-history { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 8px; }
.crash-chart .crash-history {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 8px;
  z-index: 2;
  margin: 0;
  pointer-events: none;
}
.crash-chart .crash-pill { background: transparent; padding: 0 2px; font-size: 13px; }
.crash-pill {
  flex: none;
  padding: 4px 8px;
  border-radius: 2px;
  background: #07101c;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.crash-pill.low { color: var(--red); }
.crash-pill.mid { color: var(--gold); }
.crash-pill.high { color: var(--green); }
.crash-players {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 88px;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
}
.crash-players-label {
  margin: 0 4px 8px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crash-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.crash-chart {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}
.crash-chart canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #07101c;
}

.dice-wrap, .limbo-wrap { margin: 12px 0 4px; }
.limbo-wrap { width: 100%; min-width: 0; max-width: 100%; }
.dice-track {
  position: relative;
  height: 14px;
  margin: 36px 8px 8px;
  border-radius: 999px;
  background: #07101c;
}
.dice-lose, .dice-win {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}
.dice-lose { background: var(--red); }
.dice-win { background: var(--green); }
.dice-thumb, .dice-marker { position: absolute; pointer-events: none; }
.dice-thumb {
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid #070b12;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.dice-marker {
  top: -28px;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  color: var(--cream);
}
.dice-marker.in-win { color: var(--green); }
.dice-marker.in-lose { color: var(--red); }
.dice-range {
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  width: 100%;
  height: 48px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}
.dice-scale {
  display: flex;
  justify-content: space-between;
  margin: 0 4px;
  color: var(--dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.quote-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.bet-side .quote-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  flex: 1 0 100%;
  width: 100%;
  gap: 6px;
  margin: 0;
}
.bet-side .quote-row .labeled-field {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  gap: 2px;
}
.bet-side .quote-row .stake-head {
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  gap: 4px;
  padding: 0;
}
.bet-side .quote-row .stake-head label {
  font-size: 12px;
  line-height: 1;
}
.bet-side .quote-row .step-row {
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  min-height: 32px;
}
.bet-side .quote-row .step-row .stake-step {
  width: 22px;
  min-width: 22px;
  font-size: 16px;
}
.bet-side .quote-row .stake-amount input[type="text"] {
  font-size: 13px;
  padding: 4px 0;
}
@container (max-width: 120px) {
  .bet-side .quote-row .stake-amount input[type="text"] {
    font-size: 11px;
  }
}
.dice-flip {
  flex: none;
  margin-left: auto;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(47, 155, 255, 0.55);
  border-radius: 4px;
  background: rgba(26, 109, 255, 0.16);
  color: #8ecbff;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  cursor: pointer;
}
.dice-flip:hover { background: rgba(26, 109, 255, 0.32); }
.limbo-wrap, .dice-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.limbo-result {
  position: relative;
  z-index: 7;
  margin: 8px 0 0;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(28px, min(12vw, 34cqb), 84px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.limbo-result.won { color: var(--green); }
.limbo-result.lost { color: var(--red); }
.limbo-target { text-align: center; color: var(--muted); margin: 8px 0 0; }
.keno-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.keno-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
}
.keno-spot {
  aspect-ratio: auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  font-size: clamp(11px, 3.2cqb, 16px);
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: #0c1528;
  color: var(--cream);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.keno-spot:hover { background: var(--panel-2); }
.keno-spot.on {
  background: #1a6dff;
  border-color: #8ecbff;
  color: #f3f7ff;
}
.keno-spot.drawn {
  background: #3a221c;
  border-color: #8a4038;
  color: #f0c2b8;
}
.keno-spot.hit {
  background: #1c3324;
  border-color: var(--green);
  color: var(--green);
}
.keno-spot:disabled { cursor: default; }
.keno-pay {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 8px;
}
.keno-pay-cell {
  flex: 1 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.35);
  background: #07101c;
  color: var(--muted);
  font-size: 12px;
}
.keno-pay-cell b { color: var(--cream); font-size: 13px; }
.keno-pay-cell.on { border-color: var(--green); color: var(--green); }
.keno-pay-cell.on b { color: var(--green); }
.keno-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.keno-risks { display: flex; flex: 1 1 240px; gap: 6px; }
.keno-risk, .keno-tool {
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
  color: var(--cream);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.keno-risk { flex: 1; }
.keno-risk.on, .keno-tool:hover, .keno-risk:hover {
  background: var(--panel-2);
}
.keno-risk.on {
  background: #1a6dff;
  border-color: #8ecbff;
  color: #f3f7ff;
}
.plinko-wrap {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.plinko-board {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
  background: #07101c;
}
.play-board:has(.plinko-wrap),
.playfield:has(.plinko-wrap) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.playfield:has(.plinko-wrap) > .live {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.plinko-rows {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plinko-rows select {
  width: 72px;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  background: var(--ink);
  color: var(--cream);
}
.plinko-balls {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border: 1px solid rgba(47, 155, 255, 0.45);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
}
.plinko-step {
  width: 28px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.plinko-step:hover { background: rgba(47, 155, 255, 0.16); }
.plinko-step:disabled { opacity: 0.35; cursor: default; }
.plinko-count {
  min-width: 22px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.crash-mult {
  position: absolute;
  left: 46%;
  top: 42%;
  transform: translate(-50%, -50%);
  color: #f7f9ff;
  text-shadow: 0 2px 14px rgba(8, 12, 32, 0.55);
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.crash-mult.bust { color: var(--red); }
.crash-mult.cashed { color: var(--green); }
.crash-count {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #f7f9ff;
  text-shadow: 0 2px 14px rgba(8, 12, 32, 0.55);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
.crash-bets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
}
.crash-bets li {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  background: #07101c;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 13px;
}
.crash-bets li.empty { color: var(--dim); background: transparent; padding-left: 0; }
.crash-bets li.you { outline: 1px solid rgba(143, 164, 97, 0.8); }
.crash-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crash-stake { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.crash-mark { flex: none; margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crash-mark.cashed { color: var(--green); }
.crash-mark.bust { color: var(--red); }
.crash-mark.in { color: var(--gold); }
.crash-hash { margin: 8px 0 0; color: var(--dim); font-size: 11px; word-break: break-all; }
.action.cash {
  width: 100%;
  background: #2f8f52;
  border-color: #8ddeaf;
  color: #10210f;
}

.hits span { color: var(--muted); font-size: 14px; }

@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } }
@keyframes deal-card { from { transform: translateY(12px); opacity: 0; } }
@keyframes plant-flower {
  0% { transform: translateY(16px) scale(0.35); opacity: 0; }
  70% { transform: translateY(-6px) scale(1.06); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes match-glow {
  from { box-shadow: inset 0 0 0 0 var(--match); }
  to { box-shadow: inset 0 0 0 3px var(--match); }
}

@media (max-width: 720px) {
  html, body, #app { height: 100%; }
  body { overflow: hidden; }
  #app:has(.hall) {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  #app:has(.hall.play) { overflow: hidden; }
  .shell.hall { height: 100%; max-height: 100%; min-height: 0; overflow: hidden; }
  .shell.hall.play { height: 100%; min-height: 0; overflow: hidden; }
  .shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    overflow: hidden;
    max-width: 100%;
  }
  .top {
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    min-width: 0;
  }
  .top > * { min-width: 0; }
  .brand { font-size: 22px; }
  .balance { font-size: 16px; }
  .account, .player, .purse { min-width: 0; }
  .who {
    max-width: 22vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .avatar, .avatar.fallback { width: 26px; height: 26px; }
  .layout {
    flex: 1;
    min-height: 0;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .content {
    flex: 1;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: auto;
  }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .game-tile { min-height: 0; padding: 8px 6px 6px; }
  .game-face { min-height: 0; }
  .game-art { max-height: 100%; }
  .game-name { font-size: 13px; }
  .crown { width: 22px; height: 18px; }
  .coin-stack { width: 26px; height: 18px; }
  .lobby-top .brand { gap: 6px; }
  .shell.hall { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .crest .crown { width: 32px; height: 24px; margin-bottom: -8px; }
  .crest-ribbon { font-size: 22px; padding: 7px 22px 8px; }
  .hall-balance .balance { font-size: 16px; }
  .hall-btn { padding: 6px 9px; font-size: 13px; }
  .hall-board { padding: 8px; }
  .hall-play { padding: 8px; }
  .hall-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-stat span { font-size: 11px; }
  .mini-card { width: 36px; height: 50px; font-size: 16px; }
  .mini-pair { width: 64px; height: 64px; }
  .mini-pair .mini-card { top: 6px; }
  .die { width: 52px; height: 52px; font-size: 26px; }
  .pay-mark { font-size: 24px; }
  .crash-icon { width: 56px; height: 56px; }
  .stage { padding: 10px; max-width: 100%; }
  .stage, .play-split, .play-board, .playfield, .live, .bet-side { max-width: 100%; min-width: 0; }
  .stage h2 { font-size: 18px; }
  .stage p { margin: 6px 0; }
  .stage-name h2 { font-size: 16px; }
  .stage-name .blurb { font-size: 13px; }
  .stage-stake { font-size: 13px; }
  .blurb, .footer, .hint { font-size: 13px; }
  .stake-row { margin: 8px 0; }
  .bet-dock { margin-top: 10px; padding-top: 10px; }
  .bet-dock .stake-row { padding: 0; gap: 0; }
  .bet-dock .extra-field .stake-row input[type="text"] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .stake-row .hint { flex: 1 0 100%; }
  .bet-line .play { flex-basis: 92px; min-height: 44px; padding: 10px 8px; }
  .actions, .picks { width: 100%; }
  .actions .action, .picks .choice {
    flex: 1;
    min-height: 44px;
    text-align: center;
  }
  .war { gap: 8px; margin: 8px 0 4px; }
  .war .seat {
    min-width: 0;
    flex: 1 1 0;
    gap: 6px;
    padding: 8px 6px 10px;
  }
  .war .lane-name { max-width: 100%; font-size: 13px; }
  .keno-board { gap: 4px; }
  .keno-spot { min-height: 0; font-size: 12px; }
  .throw { width: auto; max-width: 100%; }
  .war { width: 100%; min-width: 0; }
  .throw .art {
    width: min(120px, 32vw);
    height: min(120px, 32vw);
  }
  .war .playing-card.showdown {
    width: min(92px, 28vw);
    height: auto;
    aspect-ratio: 112 / 156;
    font-size: clamp(18px, 6vw, 28px);
  }
  .war .playing-card.earlier {
    width: 34px;
    height: 48px;
    font-size: 11px;
  }
  .bj-table { gap: 6px; }
  .bj-table .seat { padding: 8px; gap: 6px; }
  .bj-table .fan { gap: 4px; }
  .bj-table .playing-card { max-width: 84px; }
  .playing-card {
    width: 44px;
    height: 62px;
    border-radius: 8px;
    font-size: 12px;
  }
  .fan { justify-content: center; }
  .live.flowers { gap: 8px; }
  .live.flowers .bloom { row-gap: 4px; }
  .live.flowers .lane-name { font-size: 13px; }
  .live.flowers .chips { gap: 6px; }
  .live.flowers .bloom b { font-size: 13px; }
  .live.flowers .chips > .flower,
  .live.flowers .chips > .flower-slot {
    padding: 2px;
    border-radius: 8px;
  }
  .coin-frame, .coin-face {
    width: min(148px, 40vw);
    height: min(148px, 40vw);
  }
  .number-card { padding: 10px 8px 12px; }
  .number-card b { font-size: clamp(28px, 10vw, 44px); }
  .hall-play:has(.play-split) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .hall-play:has(.play-split) .stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .play-split {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
  }
  .play-board {
    order: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .bet-side {
    order: 1;
    min-height: 0;
    overflow: hidden;
    padding: 6px;
    gap: 4px;
  }
  .play-board:has(.pot) .playfield,
  .play-board:has(.pot) > .pot { min-height: 0; }
  .pot { width: min(100%, 240px); }
  .win-pop { top: 46%; padding: 18px 16px; }
  .win-pop .pay-won { font-size: 16px; }
  .win-pop .pay-won b { font-size: clamp(36px, 11vw, 52px); }
  .win-pop .result-detail { font-size: 17px; }
  .bet-side .crash-players,
  .crash-players { min-height: 0; max-height: 48px; }
  .crash-chart canvas { height: 100%; }
  .limbo-result { font-size: clamp(48px, 16vw, 72px); }
  .quote-row { grid-template-columns: 1fr; gap: 6px; }
  .crash-mult { font-size: clamp(28px, 10vw, 44px); }
  .death-turns { max-height: 220px; }
  .death-turn {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 6px;
    padding: 6px 8px;
  }
  .death-turn .range { font-size: 12px; }
  .death-turn b { font-size: 18px; min-width: 24px; }
  .death-turn .tag { min-width: 0; }
  .playfield:has(.arena) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .playfield:has(.arena) > .live {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  .arena {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
  }
  .arena-stage {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100% - 76px);
    min-height: 0;
    aspect-ratio: 1774 / 887;
    margin: 0;
    overflow: hidden;
  }
  .hit-log {
    position: static;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .meter {
    width: 86px;
    transform: translate(-50%, calc(-100% - 4px));
  }
  .meter-name { font-size: 11px; }
  .stem { height: 16px; }
  .meter .hp { font-size: 11px; padding-top: 1px; }
  .hit-row { height: 32px; gap: 6px; }
  .hit-row .who { width: 64px; font-size: 11px; }
  .log-splat { height: 28px; max-width: 28px; }
  .audit-list { max-height: none; }
  .audit-seg .label { font-size: 12px; }
  .staff-kind { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .staff-kind .label { font-size: 11px; }
  .boot { min-height: 100%; }
  .boot .brand { font-size: 42px; }
  .outside, .blocked { margin: 4vh auto; }
}

.bet-dock .fair-hash {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(232, 224, 208, 0.62);
  word-break: break-all;
}
.bet-dock .fair-hash p { margin: 0 0 4px; }
