/*
 * AVI.
 *
 * Written mobile first: the base rules are the phone layout and the media queries only ever add
 * width, so a narrow screen is the default rather than an afterthought.
 *
 * The look is an instrument panel rather than a card deck. Square corners, hairline rules, flat
 * fills, one warm accent, and colour used only where it carries meaning (amber for the game, jade
 * for a climb, crimson for a crash). No blurred shadows, no gradient furniture.
 */

:root {
  --void: #08090c;
  --panel: #0e1116;
  --panel-2: #131820;
  --rule: #212a34;
  --rule-soft: #171e26;
  --ink: #e4e9ef;
  --dim: #6e7d8e;
  --dimmer: #4a5765;

  --amber: #e0a340;
  --amber-dim: #8a6526;
  --jade: #4fbf95;
  --crimson: #d8434f;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;

  --gut: 14px;
  --tap: 44px; /* minimum comfortable touch target */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* An author-level `display` beats the UA stylesheet's [hidden] rule, and this file sets one on
   nearly everything. Settle it once. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Flex and grid children default to min-width:auto and refuse to shrink below their content, which
   is how one long hex string ends up widening a whole page. Opt out globally. */
.layout,
.stage-col,
.side-col,
.panel,
.panel-body,
.tabs,
.topbar,
.grid-stats,
.cell,
.feed,
.feed-row,
.stage,
.readout,
.stat,
.strip,
.verify-controls,
.facts > div {
  min-width: 0;
}

code,
.feed-addr,
.facts dd,
.vgrid code,
.vcheck span,
.vcheck .detail {
  overflow-wrap: anywhere;
}

canvas,
svg,
img {
  max-width: 100%;
}

a {
  color: var(--amber);
  text-underline-offset: 3px;
}

/* ── top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "brand right"
    "tabs tabs";
  align-items: center;
  gap: 10px var(--gut);
  padding: 10px var(--gut);
  border-bottom: 1px solid var(--rule);
  background: var(--void);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--amber);
  text-decoration: none;
  min-height: var(--tap);
}
.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}
.brand-name {
  font: 700 17px/1 var(--sans);
  letter-spacing: 0.14em;
  color: var(--ink);
}

.tabs {
  grid-area: tabs;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gut) * -1);
  padding: 6px var(--gut) 0;
  border-top: 1px solid var(--rule-soft);
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 0 0 auto;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font: 600 13px/1 var(--sans);
  padding: 12px 12px 10px;
  min-height: var(--tap);
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.topbar-right {
  grid-area: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.net {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font: 500 11.5px/1 var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dimmer);
  flex: none;
}
.dot.ok {
  background: var(--jade);
}
.dot.bad {
  background: var(--crimson);
}

.net-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px var(--gut);
  background: #1b1408;
  border-bottom: 1px solid var(--amber-dim);
  color: var(--amber);
  font-size: 13px;
  text-align: center;
}

/* ── controls ────────────────────────────────────────────────────────────── */

.btn {
  font: 600 14px/1 var(--sans);
  border: 1px solid var(--rule);
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 16px;
  min-height: var(--tap);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover:not(:disabled) {
  border-color: var(--dimmer);
}
.btn:active:not(:disabled) {
  background: var(--panel);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #14100a;
}
.btn-primary:hover:not(:disabled) {
  background: #ecb154;
  border-color: #ecb154;
}
.btn-primary.is-cashout {
  background: var(--jade);
  border-color: var(--jade);
  color: #05201a;
}
.btn-ghost {
  background: transparent;
}
.btn-lg {
  width: 100%;
  min-height: 52px;
  font-size: 15px;
  margin-top: 4px;
}
.btn-wide {
  width: 100%;
}
.btn-sm {
  min-height: 34px;
  font-size: 12.5px;
  padding: 0 12px;
}
.btn-wallet {
  font-size: 12.5px;
  padding: 0 12px;
  min-height: 40px;
  white-space: nowrap;
}

.field {
  display: block;
  margin: 0 0 8px;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.field-input {
  display: flex;
  align-items: stretch;
  background: var(--void);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.field-input:focus-within {
  border-color: var(--amber);
}
.field-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: 600 17px/1 var(--mono);
  padding: 13px 12px;
}
.field-input input:focus {
  outline: none;
}
.field-input em {
  font-style: normal;
  color: var(--dim);
  font: 500 12px/1 var(--mono);
  padding: 0 12px;
  border-left: 1px solid var(--rule);
  display: flex;
  align-items: center;
}
.hint {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10.5px;
  color: var(--jade);
  border-bottom: 1px dotted currentColor;
  cursor: help;
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}
.chips button {
  flex: 1 1 0;
  min-width: 0;
  background: var(--void);
  border: 1px solid var(--rule);
  color: var(--dim);
  border-radius: 3px;
  padding: 0 2px;
  min-height: 40px;
  font: 600 12px/1 var(--mono);
  cursor: pointer;
  white-space: nowrap;
}
.chips button:hover {
  color: var(--ink);
  border-color: var(--dimmer);
}
.chips button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

/* ── layout ──────────────────────────────────────────────────────────────── */

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--gut);
}

.panel-tab {
  display: none;
}
.panel-tab.is-active {
  display: block;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: var(--gut);
}
.side-col {
  display: flex;
  flex-direction: column;
  gap: var(--gut);
  /* On a phone the panel you touch belongs above the chart you watch. */
  order: -1;
}
.stage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── stage ───────────────────────────────────────────────────────────────── */

.stage {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  min-height: 240px;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 0 12px;
}

.phase-pill {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--rule);
  padding: 5px 10px;
  border-radius: 2px;
  background: rgba(8, 9, 12, 0.7);
}
.phase-pill.flying {
  color: var(--jade);
  border-color: #1e4a3b;
}
.phase-pill.crashed {
  color: var(--crimson);
  border-color: #4d1f24;
}
.phase-pill.betting {
  color: var(--amber);
  border-color: var(--amber-dim);
}

.multiplier {
  font: 700 clamp(46px, 15vw, 88px) / 1 var(--mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 12px;
}
.multiplier .x {
  font-size: 0.4em;
  color: var(--dim);
  margin-left: 2px;
}
.multiplier.crashed {
  color: var(--crimson);
}
.multiplier.flying {
  color: var(--ink);
}
.multiplier.waiting {
  color: var(--dimmer);
}

.phase-sub {
  margin-top: 8px;
  color: var(--dim);
  font: 500 12px/1.4 var(--mono);
  min-height: 17px;
}

/* ── readout ─────────────────────────────────────────────────────────────── */

.readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
}
.stat {
  padding: 9px 12px;
  border-right: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.stat:nth-child(2n) {
  border-right: 0;
}
.stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.stat-label {
  display: block;
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 5px;
}
.stat-value {
  display: block;
  font: 600 14px/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ── flight strip ────────────────────────────────────────────────────────── */

.strip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  padding: 8px 10px;
}
.strip-label {
  flex: none;
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.history {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.history::-webkit-scrollbar {
  display: none;
}
.hchip {
  flex: 0 0 auto;
  font: 600 12px/1 var(--mono);
  padding: 8px 9px;
  min-height: 40px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--void);
  color: var(--dim);
  cursor: pointer;
  white-space: nowrap;
}
.hchip.low {
  color: #e07782;
}
.hchip.mid {
  color: var(--amber);
}
.hchip.high {
  color: var(--jade);
}
.hchip:hover {
  border-color: var(--dimmer);
}

/* ── panels ──────────────────────────────────────────────────────────────── */

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.panel.grow {
  display: flex;
  flex-direction: column;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.panel-head h2 {
  margin: 0;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.panel-body {
  padding: 14px;
}

.badge {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--dim);
  border: 1px solid var(--rule);
  padding: 5px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.badge.win {
  color: var(--jade);
  border-color: #1e4a3b;
}
.badge.live {
  color: var(--amber);
  border-color: var(--amber-dim);
}
.badge.lost {
  color: var(--crimson);
  border-color: #4d1f24;
}

/* The bet panel is a ticket: the stub below the tear line is what you hold this round. */
.ticket .stub {
  border-top: 1px dashed var(--rule);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--panel-2);
}
.stub-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
}
.stub-row b {
  color: var(--ink);
  font: 600 12px/1 var(--mono);
  text-align: right;
}

.action-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
  min-height: 16px;
  text-align: center;
}
.note {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.55;
  margin: 10px 0 0;
}
/* A note followed by a control needs air between them, or the label reads as part of the note. */
.note + .field,
.note + .chips {
  margin-top: 14px;
}

.figure {
  margin: 0 0 12px;
  font: 700 26px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.figure em {
  font: 500 12px/1 var(--mono);
  font-style: normal;
  color: var(--dim);
}

/* ── feeds ───────────────────────────────────────────────────────────────── */

.feed {
  padding: 6px;
  overflow-y: auto;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.feed-tall {
  max-height: 440px;
}
.feed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 8px;
  border-radius: 2px;
  font-size: 13px;
}
.feed-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.018);
}
.feed-row.me {
  background: rgba(224, 163, 64, 0.08);
  box-shadow: inset 2px 0 0 var(--amber);
}
.feed-row.won {
  color: var(--jade);
}
.feed-row.lost {
  color: var(--dimmer);
}
.feed-addr {
  font: 500 12px/1.3 var(--mono);
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-row.me .feed-addr {
  color: var(--amber);
}
.feed-amt,
.feed-mult {
  font: 600 12px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.feed-empty {
  color: var(--dimmer);
  font-size: 13px;
  padding: 26px 8px;
  text-align: center;
}

.disclosure {
  margin: 20px 0 6px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.65;
  border-left: 2px solid var(--rule);
  padding-left: 12px;
  max-width: 78ch;
}
.disclosure b {
  color: var(--ink);
}

/* ── page furniture shared by the non-play tabs ──────────────────────────── */

.page-title {
  margin: 2px 0 8px;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.page-title.spaced {
  margin-top: 30px;
}
.page-sub {
  max-width: 74ch;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 16px;
}
.spaced {
  margin-top: 18px;
}
.notice {
  border: 1px solid var(--amber-dim);
  background: #17120a;
  border-radius: 3px;
  padding: 13px 14px;
  color: var(--dim);
  font-size: 13px;
}
.notice code,
.note code,
.prose code {
  font: 500 12.5px/1.4 var(--mono);
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--gut);
}
.cell {
  background: var(--panel);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cell span {
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}
.cell b {
  font: 600 17px/1.15 var(--mono);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.cell b.pos {
  color: var(--jade);
}
.cell b.neg {
  color: var(--crimson);
}

.meter {
  position: relative;
  height: 28px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--amber-dim);
  transition: width 0.5s ease;
}
.meter-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--ink);
}

.facts {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}
.facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.facts dt {
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
}
.facts dd {
  margin: 0;
  font: 500 12px/1.5 var(--mono);
}

/* ── verify ──────────────────────────────────────────────────────────────── */

.verify-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.verify-controls input {
  flex: 1 1 160px;
  min-width: 0;
  background: var(--void);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 12px;
  min-height: var(--tap);
  font: 600 14px/1 var(--mono);
}
.verify-controls input:focus {
  outline: none;
  border-color: var(--amber);
}
.verify-controls .note {
  margin: 0;
  flex-basis: 100%;
}

.verify-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vround {
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  padding: 13px 14px;
}
.vround-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.vround-head h3 {
  margin: 0;
  font-size: 15px;
}
.vverdict {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.14em;
  padding: 5px 8px;
  border-radius: 2px;
}
.vverdict.ok {
  color: #05201a;
  background: var(--jade);
}
.vverdict.bad {
  color: #fff;
  background: var(--crimson);
}
.vgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 14px;
  font-size: 13px;
}
.vgrid > span {
  color: var(--dim);
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 9px;
}
.vgrid code,
.vcheck .detail {
  font: 500 11.5px/1.5 var(--mono);
}
.vchecks {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vcheck {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 13px;
  min-width: 0;
}
.vcheck > span:last-child {
  min-width: 0;
}
.vcheck .mark {
  font: 700 10px/1.4 var(--mono);
  flex: none;
}
.vcheck.ok .mark {
  color: var(--jade);
}
.vcheck.bad .mark {
  color: var(--crimson);
}
.vcheck .detail {
  color: var(--dim);
}

/* ── prose ───────────────────────────────────────────────────────────────── */

.prose {
  max-width: 70ch;
}
.prose h3 {
  margin: 26px 0 6px;
  font-size: 15px;
}
.prose p {
  color: #b9c3cf;
  line-height: 1.72;
  font-size: 14.5px;
}
.prose .warn {
  margin-top: 28px;
  border-left: 2px solid var(--crimson);
  padding-left: 12px;
  color: var(--dim);
  font-size: 13px;
}

/* ── toasts ──────────────────────────────────────────────────────────────── */

.toasts {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 50;
  pointer-events: none;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--dimmer);
  border-radius: 3px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.45;
}
.toast.err {
  border-left-color: var(--crimson);
}
.toast.ok {
  border-left-color: var(--jade);
}

/* ── wider than a phone ──────────────────────────────────────────────────── */

@media (min-width: 560px) {
  :root {
    --gut: 18px;
  }
  .readout {
    grid-template-columns: repeat(4, 1fr);
  }
  .stat {
    border-bottom: 0;
    border-right: 1px solid var(--rule-soft);
  }
  .stat:last-child {
    border-right: 0;
  }
  .stage {
    aspect-ratio: 16 / 10;
  }
  .facts {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
  }
  .toasts {
    left: auto;
    right: 18px;
    max-width: 360px;
  }
  .vgrid {
    grid-template-columns: 130px minmax(0, 1fr);
  }
  .vgrid > span {
    margin-top: 0;
  }
}

@media (min-width: 900px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand tabs right";
    padding: 0 var(--gut);
    gap: 0 22px;
  }
  .tabs {
    margin: 0;
    padding: 0;
    border-top: 0;
    overflow: visible;
  }
  .tab {
    padding: 20px 13px 18px;
  }
  .brand {
    min-height: 58px;
  }
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    /* Stretch, not start: the chart column sets the height and the side column fills it, instead
       of leaving a slab of empty page under whichever column happens to be shorter. */
    align-items: stretch;
  }
  .side-col {
    order: 0;
  }
  /* The chart is the flexible element: the side column decides the height and the chart takes
     whatever is left, so neither column ends in a slab of empty page. */
  .stage {
    aspect-ratio: auto;
    flex: 1;
    min-height: 380px;
  }
  /* The bet panel and winnings size to their content; the manifest takes what is left. */
  .side-col .panel.grow {
    flex: 1;
    min-height: 180px;
  }
  .side-col .panel.grow .feed {
    flex: 1;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── wallet picker ───────────────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(4, 5, 7, 0.72);
  padding: 0;
}
.modal-box {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  width: 100%;
  max-width: 420px;
  padding: 4px 0 14px;
  animation: sheet-up 0.18s ease;
}
@keyframes sheet-up {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.modal-head h2 {
  margin: 0;
  font-size: 15px;
}
.modal-close {
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 3px;
}
.modal-close:hover {
  color: var(--ink);
}
.modal-close:focus-visible {
  outline: 2px solid var(--amber);
}

.wallet-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}
.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
  font: 600 14px/1 var(--sans);
  cursor: pointer;
  text-align: left;
}
.wallet-option:hover {
  border-color: var(--amber);
}
.wallet-option:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.wallet-option img {
  border-radius: 6px;
  flex: none;
}
.wallet-blank {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--void);
  border: 1px solid var(--rule);
  flex: none;
}
.wallet-empty {
  padding: 6px 16px 4px;
}
.wallet-empty p {
  margin: 0 0 8px;
  font-size: 13.5px;
}
.modal-foot {
  padding: 0 16px;
  margin-top: 8px;
}

@media (min-width: 560px) {
  .modal {
    align-items: center;
  }
  .modal-box {
    border-bottom: 1px solid var(--rule);
    border-radius: 6px;
  }
}

/* ── bet panel finish ────────────────────────────────────────────────────── */

.payout-preview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 0;
  padding: 9px 11px;
  background: var(--void);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.payout-preview b {
  font: 600 13px/1 var(--mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  text-align: right;
}
.payout-preview b.warn {
  color: var(--amber);
}

/* The cash-out button carries the number that matters, so it gets three lines of hierarchy
   rather than one string that changes length every frame. */
#action.is-cashout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  padding: 8px 12px;
  min-height: 62px;
}
.cash-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}
.cash-amount {
  font: 700 19px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.cash-mult {
  font: 600 11px/1 var(--mono);
  opacity: 0.75;
}

.btn-wallet.is-connected {
  border-color: var(--amber-dim);
  color: var(--amber);
  font-family: var(--mono);
}

/* A live round should look live. Only while flying, and only on the pill. */
.phase-pill.flying::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
