/* Rocket: player-facing site. Dark-only "flight instrument" theme.
   Shape rule: containers 16px, inner blocks 12px, controls 10px, chips/pills fully round.
   One accent (signal orange) for brand + primary actions; green = won/cash out, red = crashed. */

/* ------------------------------------------------------------------ fonts (vendored, OFL) */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geist-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geist-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url(../fonts/martian-mono-latin-standard-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  --bg: #0a0e13;
  --bg-2: #0c1117;
  --surface: #10161e;
  --surface-2: #151c26;
  --surface-3: #1b2430;
  --stage-bg: #080c11;
  --line: #1d2630;
  --line-2: #273240;
  --line-3: #344152;
  --text: #e9eef3;
  --text-2: #a9b4c2;
  --text-3: #7f8b9b;
  --accent: #ef7d4a;
  --accent-hover: #f6915f;
  --accent-ink: #1c0d05;
  --accent-soft: rgb(239 125 74 / 0.12);
  --accent-line: rgb(239 125 74 / 0.38);
  --win: #4cc98c;
  --win-hover: #5fd89c;
  --win-ink: #04140c;
  --win-soft: rgb(76 201 140 / 0.12);
  --win-line: rgb(76 201 140 / 0.4);
  --loss: #ec5b63;
  --loss-soft: rgb(236 91 99 / 0.12);
  --loss-line: rgb(236 91 99 / 0.4);

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-box: 16px;
  --r-inner: 12px;
  --r-ctl: 10px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 64px;
  --gutter: clamp(16px, 2.2vw, 28px);
  --tabbar-h: 0px;

  /* z-index scale */
  --z-header: 20;
  --z-tabbar: 25;
  --z-mini: 30;
}

/* ------------------------------------------------------------------ base */
[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

main {
  flex: 1 0 auto;
  outline: none;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

svg.icon {
  width: 1em;
  height: 1em;
  display: block;
}

.ic {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

.ic svg {
  width: 100%;
  height: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: rgb(239 125 74 / 0.35);
  color: #fff;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--r-ctl);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.noscript {
  padding: 24px;
  text-align: center;
}

/* ------------------------------------------------------------------ skeletons */
.skel {
  display: block;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 6px;
}

.skel-text {
  display: inline-block;
  height: 0.9em;
  vertical-align: middle;
}

.skel-chip {
  width: 58px;
  height: 28px;
  border-radius: var(--r-pill);
  flex: none;
}

.skel-row {
  height: 40px;
  margin: 6px 18px;
  border-radius: 8px;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  font: 600 14px/1 var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.14s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.btn:active:not([disabled]) {
  transform: translateY(1px) scale(0.985);
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn .ic {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.btn-primary:hover:not([disabled]) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
}

.btn-secondary:hover:not([disabled]) {
  background: var(--surface-3);
  border-color: var(--line-3);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text-2);
}

.btn-ghost:hover:not([disabled]) {
  color: var(--text);
  border-color: var(--line-3);
  background: var(--surface-2);
}

.btn-lg {
  height: 52px;
  padding: 0 22px;
  font-size: 16px;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--text);
  text-decoration-color: var(--text-2);
}

.link-btn .ic {
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(10 14 19 / 0.84);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1440px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.015em;
  border-radius: 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.ticker {
  font: 600 11px/1 var(--font-mono);
  color: var(--text-2);
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
}

.nav {
  display: flex;
  gap: 2px;
  height: 100%;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
}

.nav a:hover {
  color: var(--text);
}

.nav a[aria-current='page'] {
  color: var(--text);
}

.nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.conn[data-state='open'] .conn-dot {
  background: var(--win);
  box-shadow: 0 0 0 3px rgb(76 201 140 / 0.16);
}

.conn[data-state='closed'] .conn-dot {
  background: var(--loss);
  box-shadow: 0 0 0 3px rgb(236 91 99 / 0.16);
}

.conn[data-state='connecting'] .conn-dot {
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ------------------------------------------------------------------ banner */
.banner {
  max-width: 1440px;
  margin: 12px auto 0;
  padding: 0 var(--gutter);
  width: 100%;
}

.banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
}

.banner-inner .ic {
  color: var(--accent);
}

.banner-inner[data-tone='loss'] {
  border-color: var(--loss-line);
  background: var(--loss-soft);
}

.banner-inner[data-tone='loss'] .ic {
  color: var(--loss);
}

/* ------------------------------------------------------------------ play layout */
.view-play {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 18px var(--gutter) 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 20px;
  align-items: start;
}

.view-play[hidden],
.view[hidden] {
  display: none;
}

.play-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.play-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 18px);
}

/* history strip */
.history {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: 32px;
}

.history-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}

.history-list {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.history-list::-webkit-scrollbar {
  display: none;
}

.history-empty {
  font-size: 13px;
  color: var(--text-3);
}

.hchip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font: 600 12px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
  transition: transform 0.15s var(--ease), border-color 0.2s;
}

.hchip:hover {
  border-color: var(--line-3);
  transform: translateY(-1px);
}

.hchip[data-tier='low'] {
  color: var(--loss);
  border-color: rgb(236 91 99 / 0.22);
}

.hchip[data-tier='mid'] {
  color: var(--win);
  border-color: rgb(76 201 140 / 0.22);
}

.hchip[data-tier='high'] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.hchip[data-tier='moon'] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.hchip.is-new {
  animation: chip-in 0.6s var(--ease) both;
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateX(-10px) scale(0.92);
  }
}

/* ------------------------------------------------------------------ stage */
.stage {
  position: relative;
  height: clamp(360px, calc(100dvh - 296px), 660px);
  border-radius: var(--r-box);
  overflow: hidden;
  background: var(--stage-bg);
  border: 1px solid var(--line);
  isolation: isolate;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  inset: 0;
  padding: 20px 24px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

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

.phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgb(14 19 26 / 0.72);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}

.phase-chip[data-tone='live'] {
  color: var(--text);
}

.phase-chip[data-tone='live'] .phase-dot {
  background: var(--accent);
  animation: live 1.4s var(--ease) infinite;
}

.phase-chip[data-tone='count'] .phase-dot {
  background: var(--accent);
}

.phase-chip[data-tone='loss'] {
  color: var(--loss);
  border-color: var(--loss-line);
}

.phase-chip[data-tone='loss'] .phase-dot {
  background: var(--loss);
}

.phase-chip[data-tone='win'] {
  color: var(--win);
  border-color: var(--win-line);
}

.phase-chip[data-tone='win'] .phase-dot {
  background: var(--win);
}

@keyframes live {
  0% {
    box-shadow: 0 0 0 0 rgb(239 125 74 / 0.6);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px rgb(239 125 74 / 0);
  }
}

.flight-link {
  pointer-events: auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font: 500 12px/1 var(--font-mono);
  color: var(--text-3);
  text-decoration: none;
  border: 1px solid transparent;
  background: rgb(14 19 26 / 0.5);
}

.flight-link:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.flight-link .ic {
  width: 13px;
  height: 13px;
}

.readout {
  margin-top: 22px;
  max-width: 62%;
}

.mult {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(60px, 8.6vw, 144px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-shadow: 0 4px 30px rgb(8 12 17 / 0.55);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.3s;
}

.mult .x {
  font-weight: 500;
  font-size: 0.6em;
  margin-left: 0.06em;
  opacity: 0.55;
}

.stage[data-phase='idle'] .mult,
.stage[data-phase='countdown'] .mult,
.stage[data-phase='connecting'] .mult {
  color: var(--text-3);
  opacity: 0.38;
}

.stage[data-result='lost'] .mult {
  color: var(--loss);
}

.stage[data-result='won'] .mult {
  color: var(--win);
}

.stage[data-result='lost'] .mult.is-hit {
  animation: hit 0.5s var(--ease) both;
}

@keyframes hit {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

.mult-sub {
  margin-top: 12px;
  font: 500 14px/1.35 var(--font-mono);
  color: var(--text-2);
  min-height: 1.35em;
  text-shadow: 0 1px 12px rgb(8 12 17 / 0.95), 0 0 2px rgb(8 12 17 / 0.9);
}

.mult-sub strong {
  color: var(--text);
  font-weight: 600;
}

/* overlays inside the stage */
.stage-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 24px;
}

.stage-center > * {
  pointer-events: auto;
}

.idle-card {
  max-width: 380px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 28px;
  border-radius: var(--r-box);
  background: rgb(10 14 19 / 0.66);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: rise 0.5s var(--ease) both;
}

.idle-card h3 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.idle-card p {
  color: var(--text-2);
  font-size: 14px;
}

.idle-card .btn {
  margin-top: 8px;
}

.idle-card.is-quiet {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* countdown */
.countdown {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.cd-dial {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
}

.cd-dial svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.cd-track {
  fill: rgb(8 12 17 / 0.72);
  stroke: var(--line-2);
  stroke-width: 3;
}

.cd-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.cd-num {
  position: relative;
  font: 700 88px/1 var(--font-sans);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cd-num.is-tick {
  animation: tick 0.9s var(--ease) both;
}

@keyframes tick {
  0% {
    opacity: 0;
    transform: scale(1.35);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
}

.cd-caption {
  font-size: 15px;
  color: var(--text-2);
}

.cd-caption strong {
  color: var(--text);
  font-weight: 600;
}

.countdown.is-mine .cd-caption {
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}

.countdown.is-mine .cd-progress {
  stroke: var(--win);
}

/* stamp */
.stamp {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 26px 14px;
  border-radius: var(--r-inner);
  border: 2px solid var(--win);
  color: var(--win);
  background: rgb(8 12 17 / 0.7);
  box-shadow: inset 0 0 0 4px rgb(8 12 17 / 0.7), inset 0 0 0 5px rgb(76 201 140 / 0.45);
  transform: rotate(-6deg);
  animation: stamp-in 0.55s var(--ease-spring) both;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  text-align: center;
}

.stamp-label {
  font: 700 12px/1 var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stamp-value {
  font: 700 50px/1 var(--font-sans);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.stamp-amount {
  font: 600 14px/1.2 var(--font-mono);
  color: var(--text);
}

@keyframes stamp-in {
  0% {
    opacity: 0;
    transform: rotate(-6deg) scale(1.6);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
  }
}

/* cash out: under the readout on wide screens, pinned to the stage bottom on phones */
.stage-action {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  animation: rise 0.35s var(--ease) both;
}

.btn-cashout {
  height: 66px;
  min-width: 280px;
  padding: 0 30px;
  flex-direction: column;
  gap: 5px;
  background: var(--win);
  color: var(--win-ink);
  border-radius: var(--r-ctl);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 14px 34px -14px rgb(76 201 140 / 0.7);
}

.btn-cashout:hover:not([disabled]) {
  background: var(--win-hover);
}

.btn-cashout .cashout-label {
  font: 700 19px/1 var(--font-sans);
  letter-spacing: -0.01em;
}

.btn-cashout .cashout-amount {
  font: 600 13px/1 var(--font-mono);
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.btn-cashout[data-state='ready'] {
  background: var(--surface-3);
  color: var(--text-2);
  box-shadow: none;
  border-color: var(--line-3);
  opacity: 1;
}

.btn-cashout[data-state='pending'] {
  opacity: 0.85;
}

.cashout-hint {
  font-size: 13px;
  color: var(--text-3);
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 10px rgb(8 12 17 / 0.9);
}

.cashout-hint kbd {
  font: 600 11px/1 var(--font-mono);
  padding: 3px 6px;
  border: 1px solid var(--line-3);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--text-2);
}

.cashout-hint.is-error {
  color: var(--loss);
  font-weight: 600;
}

/* pilot strip */
.pilot {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  min-height: 74px;
}

.pilot-cell {
  padding: 14px 18px;
  min-width: 0;
  border-left: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 4px;
}

.pilot-cell:first-child {
  border-left: 0;
}

.pilot-k {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.pilot-v {
  font: 600 15px/1.25 var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pilot-v small {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  margin-left: 4px;
}

.pilot-v.is-win {
  color: var(--win);
}

.pilot-v.is-loss {
  color: var(--loss);
}

.pilot-who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pilot-who .pilot-meta {
  gap: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
}

.pilot-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pilot-addr {
  font: 600 15px/1.2 var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pilot-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pilot-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text-2);
  font-size: 14px;
}

.pilot-empty strong {
  color: var(--text);
  font-weight: 600;
  display: block;
}

.pilot-empty .ic {
  width: 22px;
  height: 22px;
  color: var(--text-3);
}

/* tags */
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-you {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.card-head h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-head-meta {
  font: 500 12px/1 var(--font-mono);
  color: var(--text-3);
}

/* queue */
.queue-body {
  padding: 0 8px 10px;
}

.qhead,
.qrow {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.qhead {
  height: 28px;
  font-size: 11.5px;
  color: var(--text-3);
}

.qhead span:nth-child(3) {
  text-align: right;
}

.qrow {
  height: 44px;
  border-radius: var(--r-ctl);
  font-size: 13.5px;
  transition: background-color 0.2s;
}

.qrow + .qrow {
  margin-top: 2px;
}

.qrow:hover {
  background: var(--surface-2);
}

.qrow.is-you {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.qrow.is-new {
  animation: rise 0.45s var(--ease) both;
}

.qpos {
  font: 600 12px/1 var(--font-mono);
  color: var(--text-3);
  text-align: center;
}

.qrow.is-you .qpos {
  color: var(--accent);
}

.qwho {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.qwho .avatar {
  width: 22px;
  height: 22px;
}

.qaddr {
  font: 500 13px/1 var(--font-mono);
  white-space: nowrap;
  flex: none;
}

.qstake {
  font: 500 13px/1 var(--font-mono);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.queue-empty {
  margin: 4px 10px 8px;
  padding: 18px;
  border: 1px dashed var(--line-3);
  border-radius: var(--r-inner);
  color: var(--text-2);
  font-size: 13.5px;
  text-align: center;
}

.queue-more {
  padding: 10px 10px 2px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* my ticket */
.myticket-body {
  padding: 0 18px 18px;
  display: grid;
  gap: 14px;
}

.my-empty {
  display: grid;
  gap: 12px;
}

.my-empty p {
  color: var(--text-2);
  font-size: 14px;
}

.my-empty strong {
  color: var(--text);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

.status[data-tone='accent'] {
  background: var(--accent-soft);
  color: var(--accent);
}

.status[data-tone='win'] {
  background: var(--win-soft);
  color: var(--win);
}

.status[data-tone='loss'] {
  background: var(--loss-soft);
  color: var(--loss);
}

.status .ic {
  width: 13px;
  height: 13px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.step {
  display: grid;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}

.step::before {
  content: '';
  height: 3px;
  border-radius: 3px;
  background: var(--line-2);
}

.step.is-done::before {
  background: var(--text-3);
}

.step.is-done {
  color: var(--text-2);
}

.step.is-current::before {
  background: var(--accent);
}

.step.is-current {
  color: var(--text);
  font-weight: 600;
}

.step.is-win::before {
  background: var(--win);
}

.step.is-loss::before {
  background: var(--loss);
}

.my-headline {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.my-big {
  font: 700 32px/1.05 var(--font-sans);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.my-big.is-win {
  color: var(--win);
}

.my-big.is-loss {
  color: var(--loss);
}

.kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  font-size: 13.5px;
}

.kv dt {
  color: var(--text-3);
}

.kv dd {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv dd a {
  color: var(--text);
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}

.my-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-timer {
  font: 600 13px/1 var(--font-mono);
  color: var(--accent);
}

.my-note {
  font-size: 12.5px;
  color: var(--text-3);
}

.my-note.is-ok {
  color: var(--win);
}

.my-note.is-error {
  color: var(--loss);
}

.my-others {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 4px;
}

.my-others h3 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 4px;
}

.other {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
}

.other-amt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ forms */
.field {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.help {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-3);
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line-3);
  background: var(--bg-2);
  color: var(--text);
  font: 600 17px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}

.input:hover {
  border-color: #415064;
}

.input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(239 125 74 / 0.22);
}

.input[aria-invalid='true'] {
  border-color: var(--loss);
}

.input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .input {
  padding-right: 64px;
}

.input-suffix {
  position: absolute;
  right: 14px;
  font: 600 13px/1 var(--font-mono);
  color: var(--text-3);
  pointer-events: none;
}

.input-sm {
  height: 40px;
  font-size: 13px;
}

.field-error {
  font-size: 13px;
  color: var(--loss);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-error:empty {
  display: none;
}

.field-error .ic {
  width: 14px;
  height: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font: 600 12px/1 var(--font-mono);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.chip-btn:hover {
  color: var(--text);
  border-color: var(--line-3);
}

.chip-btn[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  cursor: pointer;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 6px;
  border: 1.5px solid var(--line-3);
  background: var(--bg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.check input::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.15s var(--ease);
}

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked::after {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* network: one, stated (never picked) */
.net-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-3);
  color: var(--text-2);
}

.net-mark svg {
  width: 11px;
  height: 11px;
}

.net-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.net-row .net-mark {
  width: 34px;
  height: 34px;
  color: var(--text);
}

.net-row .net-mark svg {
  width: 16px;
  height: 16px;
}

.net-row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.net-row-name {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.3;
}

.net-row-note {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ dialog */
.dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: min(94dvh, 900px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-box);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 120px -24px rgb(0 0 0 / 0.75);
  overflow: hidden;
}

.dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.35s var(--ease) both;
}

.dialog::backdrop {
  background: rgb(4 7 10 / 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.dlg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.dlg-head h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-right: auto;
}

.dlg-body {
  padding: 20px;
  overflow-y: auto;
  display: grid;
  gap: 20px;
  overscroll-behavior: contain;
}

.dlg-foot {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.form-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--loss-soft);
  border: 1px solid var(--loss-line);
  font-size: 13.5px;
  color: var(--text);
}

.form-error .ic {
  color: var(--loss);
  margin-top: 2px;
}

.form-error:empty {
  display: none;
}

.cap-info {
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.cap-info .ic {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--text-3);
}

details.adv {
  border: 1px solid var(--line-2);
  border-radius: var(--r-inner);
  background: var(--bg-2);
}

details.adv summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-inner);
}

details.adv summary::-webkit-details-marker {
  display: none;
}

details.adv summary .ic:last-child {
  margin-left: auto;
  transition: transform 0.2s var(--ease);
}

details.adv[open] summary .ic:last-child {
  transform: rotate(180deg);
}

details.adv .adv-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
}

.seed-row {
  display: flex;
  gap: 8px;
}

.seed-row .input {
  font-size: 13px;
  height: 40px;
}

/* pay screen */
.pay-amount {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r-inner);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}

.pay-amount-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-2);
}

.pay-amount-top strong {
  color: var(--text);
  font-weight: 600;
}

.amount-big {
  font: 700 clamp(28px, 6.4vw, 40px)/1.1 var(--font-mono);
  font-stretch: 87.5%;
  letter-spacing: -0.03em;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.amount-big .suffix {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.amount-big .sym {
  font-size: 0.5em;
  color: var(--text-3);
  margin-left: 0.3em;
  letter-spacing: 0;
}

.pay-hint {
  font-size: 12.5px;
  color: var(--text-3);
}

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 20px;
  align-items: start;
}

.addr-box {
  display: grid;
  gap: 10px;
  align-content: start;
}

.addr-box .warns {
  margin-top: 8px;
}

.addr {
  font: 500 13.5px/1.55 var(--font-mono);
  word-break: break-all;
  padding: 12px 14px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  user-select: all;
}

.qr {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.qr-box {
  width: 168px;
  height: 168px;
  padding: 8px;
  border-radius: var(--r-inner);
  background: #eef2f6;
}

.qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-cap {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-3);
  text-align: center;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.seg button {
  height: 26px;
  padding: 0 10px;
  white-space: nowrap;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}

.seg button[aria-pressed='true'] {
  background: var(--surface-3);
  color: var(--text);
}

.timer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-ring {
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
  flex: none;
}

.timer-ring .track {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 3.5;
}

.timer-ring .bar {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear;
}

.timer.is-low .timer-ring .bar {
  stroke: var(--loss);
}

.timer-text {
  display: grid;
  gap: 2px;
}

.timer-k {
  font-size: 11.5px;
  color: var(--text-3);
}

.timer-v {
  font: 700 20px/1 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.timer.is-low .timer-v {
  color: var(--loss);
}

.warns {
  display: grid;
  gap: 8px;
}

.warn {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  border: 1px solid rgb(239 125 74 / 0.22);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.warn .ic {
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 1px;
}

.warn strong {
  font-weight: 650;
}

.pay-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.pay-status-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
}

.pay-status-icon .ic {
  width: 24px;
  height: 24px;
}

.pay-status-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.pay-status-text strong {
  font-size: 15px;
  font-weight: 650;
}

.pay-status-text span {
  font-size: 13px;
  color: var(--text-2);
}

.pay-status .timer {
  margin-left: auto;
}

.pay-status[data-tone='win'] {
  border-color: var(--win-line);
  background: var(--win-soft);
}

.pay-status[data-tone='win'] .pay-status-icon {
  color: var(--win);
}

.pay-status[data-tone='loss'] {
  border-color: var(--loss-line);
  background: var(--loss-soft);
}

.pay-status[data-tone='loss'] .pay-status-icon {
  color: var(--loss);
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-3);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.pay-instr {
  display: grid;
  gap: 18px;
}

.pay-result:empty {
  display: none;
}

.pay-result .kv {
  padding: 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.qr-side {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.dialog.is-wide {
  width: min(680px, calc(100vw - 32px));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.copy-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn.is-copied {
  color: var(--win);
  border-color: var(--win-line);
}

/* ------------------------------------------------------------------ mini bar */
.mini {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--tabbar-h));
  transform: translateX(-50%);
  z-index: var(--z-mini);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--r-box);
  background: rgb(16 22 30 / 0.94);
  border: 1px solid var(--line-3);
  box-shadow: 0 20px 50px -18px rgb(0 0 0 / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: rise 0.35s var(--ease) both;
  width: max-content;
  max-width: calc(100vw - 24px);
}

.mini[hidden] {
  display: none;
}

.mini-info {
  display: grid;
  gap: 2px;
}

.mini-label {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.mini-mult {
  font: 700 24px/1 var(--font-sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.btn-cashout-mini {
  height: 50px;
  min-width: 150px;
  padding: 0 18px;
}

.btn-cashout-mini .cashout-amount {
  font-size: 11.5px;
}

.mini-open {
  height: 50px;
}

/* ------------------------------------------------------------------ docs (fairness, rules) */
.view-doc {
  width: 100%;
}

.doc {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px var(--gutter) 72px;
  display: grid;
  gap: 36px;
}

.doc-head {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.doc-head h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.doc-head p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 64ch;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  padding: 22px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.panel > p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.hash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  font: 500 13px/1.55 var(--font-mono);
  word-break: break-all;
}

.hash code {
  flex: 1;
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  padding: 12px 14px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.stat-k {
  font-size: 12px;
  color: var(--text-3);
}

.stat-v {
  font: 650 17px/1.2 var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.how {
  counter-reset: how;
  display: grid;
  gap: 12px;
}

.how li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}

.how li::before {
  content: counter(how);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 12px/1 var(--font-mono);
  color: var(--text);
  background: var(--surface-3);
}

.how code,
.formula {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--text);
}

.formula {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

.verify-form {
  display: grid;
  gap: 14px;
}

.verify-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.verify-form .input {
  height: 42px;
  font-size: 13px;
  font-weight: 500;
}

.load-row {
  display: flex;
  gap: 8px;
}

.load-row .input {
  width: 140px;
}

.result {
  display: grid;
  gap: 2px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  overflow: hidden;
}

.result-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
  font-size: 13px;
  align-items: center;
}

.result-row dt {
  color: var(--text-3);
}

.result-row dd {
  font-family: var(--font-mono);
  word-break: break-all;
}

.result-row dd.lines .line {
  display: block;
  white-space: nowrap;
}

.result-big {
  font: 700 28px/1.1 var(--font-sans);
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12.5px/1.3 var(--font-sans);
  margin-left: 10px;
  vertical-align: middle;
}

.verdict .ic {
  width: 15px;
  height: 15px;
}

.verdict.is-ok {
  color: var(--win);
}

.verdict.is-bad {
  color: var(--loss);
}

.verdict.is-skip {
  color: var(--text-3);
}

.walk {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-inner);
  border: 1px dashed var(--line-3);
}

.walk p {
  font-size: 13px;
  color: var(--text-2);
}

.walk-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  overflow: hidden;
}

.walk-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 720px;
}

table.data th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: 11px 16px;
  white-space: nowrap;
}

table.data tbody tr:nth-child(even) td {
  background: rgb(255 255 255 / 0.015);
}

table.data td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

table.data td.seed {
  font-family: var(--font-mono);
  color: var(--text-2);
  font-size: 12.5px;
}

.crash-val {
  font-family: var(--font-mono);
  font-weight: 650;
}

.crash-val[data-tier='low'] {
  color: var(--loss);
}

.crash-val[data-tier='mid'] {
  color: var(--win);
}

.crash-val[data-tier='high'],
.crash-val[data-tier='moon'] {
  color: var(--accent);
}

.link-ok {
  color: var(--win);
}

.link-bad {
  color: var(--loss);
}

.link-gap {
  color: var(--text-3);
}

.link-ok .ic,
.link-bad .ic,
.link-gap .ic {
  width: 16px;
  height: 16px;
}

.callout {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--r-box);
  border: 1px solid var(--loss-line);
  background: linear-gradient(180deg, rgb(236 91 99 / 0.12), rgb(236 91 99 / 0.05));
}

.callout .ic {
  width: 26px;
  height: 26px;
  color: var(--loss);
}

.callout h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.callout p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 80ch;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.rules-grid .panel.is-wide {
  grid-column: 1 / -1;
}

.bullets {
  display: grid;
  gap: 10px;
}

.bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.bullets strong {
  color: var(--text);
  font-weight: 600;
}

.odds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.odd {
  padding: 12px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.odd-x {
  font: 700 18px/1 var(--font-mono);
}

.odd-p {
  font: 500 12.5px/1.2 var(--font-mono);
  color: var(--text-2);
}

/* ------------------------------------------------------------------ footer + tabbar */
.footer {
  border-top: 1px solid var(--line);
  padding-bottom: var(--tabbar-h);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-risk {
  font-size: 13px;
  color: var(--text-3);
}

.footer-nav {
  display: flex;
  gap: 18px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.tabbar {
  display: none;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .view-play {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .pilot {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  }

  .pilot-cell.is-optional {
    display: none;
  }

  .qwho .avatar {
    display: none;
  }

  .qhead,
  .qrow {
    gap: 8px;
    padding: 0 8px;
  }
}

@media (max-width: 980px) {
  .view-play {
    grid-template-columns: minmax(0, 1fr);
  }

  .play-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .doc-grid,
  .rules-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage {
    height: clamp(340px, 58vh, 560px);
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 56px;
    --tabbar-h: calc(60px + env(safe-area-inset-bottom));
  }

  body {
    font-size: 14.5px;
  }

  .topbar-inner {
    gap: 12px;
  }

  .nav,
  .conn-label {
    display: none;
  }

  .brand {
    font-size: 16px;
  }

  .ticker {
    display: none;
  }

  .topbar-right {
    gap: 10px;
  }

  .btn-join {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .view-play {
    padding: 12px 12px 24px;
    gap: 12px;
  }

  .play-side {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .history {
    height: 30px;
    gap: 10px;
  }

  .history-title {
    display: none;
  }

  .stage {
    height: clamp(300px, 50dvh, 420px);
    border-radius: 14px;
  }

  .hud {
    padding: 14px 14px;
  }

  .readout {
    margin-top: 14px;
    max-width: 78%;
  }

  .mult {
    font-size: clamp(50px, 15vw, 72px);
  }

  .mult-sub {
    font-size: 12.5px;
    margin-top: 8px;
  }

  .stage-action {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    margin: 0;
    flex-direction: column;
    gap: 6px;
  }

  .btn-cashout {
    width: 100%;
    min-width: 0;
    height: 62px;
  }

  .cashout-hint {
    display: none;
  }

  .cashout-hint.is-error {
    display: flex;
    max-width: none;
  }

  .cd-dial {
    width: 132px;
    height: 132px;
  }

  .cd-num {
    font-size: 64px;
  }

  .stamp-value {
    font-size: 38px;
  }

  /* Keep the overlays clear of the multiplier labels drawn at the right edge of the canvas. */
  .stage-center {
    padding: 16px 52px 16px 14px;
  }

  .idle-card {
    padding: 16px;
    gap: 8px;
  }

  .idle-card h3 {
    font-size: 17px;
  }

  .idle-card p {
    font-size: 13px;
  }

  .pilot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-cell {
    padding: 12px 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .pilot-cell:first-child {
    grid-column: 1 / -1;
    border-top: 0;
  }

  .pilot-cell:nth-child(odd):not(:first-child) {
    border-left: 1px solid var(--line);
  }

  /* An odd number of cells under the pilot: the last one takes the whole row. */
  .pilot-cell:nth-child(even):last-child {
    grid-column: 1 / -1;
  }

  .pilot-cell.is-optional {
    display: grid;
  }

  .qwho .avatar {
    display: block;
  }

  .pilot-v {
    font-size: 14px;
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-tabbar);
    height: var(--tabbar-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgb(10 14 19 / 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }

  .tabbar a {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-3);
    text-decoration: none;
  }

  .tabbar a[aria-current='page'] {
    color: var(--text);
  }

  .tabbar a[aria-current='page'] .tab-icon {
    color: var(--accent);
  }

  .tab-icon {
    width: 22px;
    height: 22px;
    display: block;
  }

  .tab-icon svg {
    width: 100%;
    height: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mini {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    bottom: calc(10px + var(--tabbar-h));
  }

  .mini .btn-cashout-mini {
    flex: 1;
    min-width: 0;
  }

  .mini-open {
    display: none;
  }

  .dialog,
  .dialog.is-wide {
    width: 100vw;
    max-width: 100vw;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }

  .pay-status-text .is-optional {
    display: none;
  }

  .dialog[open] {
    animation: sheet-in 0.4s var(--ease) both;
  }

  @keyframes sheet-in {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
  }

  .dlg-body {
    padding: 16px;
    gap: 18px;
  }

  .dlg-head,
  .dlg-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dlg-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .pay-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr {
    grid-template-columns: 132px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 12px;
  }

  .qr-box {
    width: 132px;
    height: 132px;
  }

  .qr-cap {
    text-align: left;
  }

  .doc {
    padding: 28px 16px 48px;
    gap: 24px;
  }

  .panel {
    padding: 18px;
  }

  .verify-row {
    grid-template-columns: minmax(0, 1fr);
  }

  table.data {
    min-width: 0;
  }

  table.data .col-opt {
    display: none;
  }

  /* "won at 1.88x" under the address, so the Verify button fits on a phone. */
  table.data .res {
    display: block;
    font-size: 12px;
  }

  table.data th,
  table.data td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .qr-side {
    justify-items: start;
  }

  .result-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 380px) {
  .btn-join {
    padding: 0 10px;
  }
}

/* ------------------------------------------------------------------ review fixes (UX audit) */

/* History strip: after the stage in the DOM (Cash out comes first in tab order), shown above it. */
.history {
  order: -1;
}

/* Headings focused by the router or after a dialog: no orange box, they are not controls. */
h1[tabindex='-1']:focus,
h2[tabindex='-1']:focus,
#main:focus {
  outline: none;
}

/* HUD chip: "You're next" for me, else the revealed crash point after a cash-out. */
.hud-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgb(14 19 26 / 0.72);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font: 600 12.5px/1 var(--font-mono);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hud-pill[hidden] {
  display: none;
}

.hud-pill[data-tone='next'] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-family: var(--font-sans);
  animation: next-pulse 1.6s var(--ease) infinite;
}

@keyframes next-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(239 125 74 / 0.5);
  }
  60% {
    box-shadow: 0 0 0 6px rgb(239 125 74 / 0);
  }
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Countdown: the caption reads into the number ("Your turn — takeoff in" 3 s). */
.cd-val {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.cd-unit {
  font: 600 22px/1 var(--font-sans);
  color: var(--text-2);
}

.idle-card.is-pending {
  border-color: var(--accent-line);
}

.idle-card.is-pending p {
  color: var(--text);
}

/* A win: the stamp sits lower, clear of the big readout. */
.stage[data-result='won'] .stage-center {
  align-items: end;
  padding-bottom: 14%;
}

.pilot-v.is-loss {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

/* My ticket */
.my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.my-k {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: -10px;
}

.my-profit {
  font: 600 14px/1.3 var(--font-mono);
  color: var(--win);
  margin-top: -8px;
}

.my-note .ic {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.my-note.is-warn {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  border: 1px solid rgb(239 125 74 / 0.22);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.my-note.is-warn .ic {
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-top: 2px;
}

.kv dd.dd-wide {
  overflow: visible;
  white-space: normal;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kv dd.dd-copy {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  overflow: visible;
}

.dd-copy .dd-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-sm {
  width: 32px;
  height: 32px;
  flex: none;
}

.btn-copy-sm .ic {
  width: 15px;
  height: 15px;
}

.tx-rows {
  display: grid;
  gap: 8px;
}

.tx-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}

.tx-what {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tx-k {
  font-size: 12px;
  color: var(--text-3);
}

.tx-v {
  font: 500 13px/1.3 var(--font-mono);
  overflow-wrap: anywhere;
}

.btn-notify {
  justify-self: start;
}

/* Join form */
.preflight {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.preflight-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 650;
}

.preflight-title .ic {
  color: var(--accent);
}

.preflight ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}

.cap-info.is-warn,
.help.is-warn {
  color: var(--accent);
}

.cap-info.is-warn {
  font-weight: 600;
}

.cap-info.is-warn .ic {
  color: var(--accent);
}

/* Pay screen */
.pay-network {
  font-size: 13px;
  color: var(--text-2);
}

.token-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.label-k {
  color: var(--text-3);
}

.token-v {
  font-family: var(--font-mono);
}

.token-v a {
  color: var(--text);
  text-underline-offset: 3px;
}

.pay-late {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  background: var(--loss-soft);
  border: 1px solid var(--loss-line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.pay-late[hidden] {
  display: none;
}

.pay-late .ic {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--loss);
}

.pay-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-inner);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.pay-note .ic {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--text-2);
}

.pay-summary {
  display: grid;
  gap: 8px;
}

.foot-links {
  display: flex;
  justify-content: center;
}

.qr-details {
  border: 1px solid var(--line-2);
  border-radius: var(--r-inner);
  background: var(--bg-2);
}

.qr-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}

.qr-details summary::-webkit-details-marker {
  display: none;
}

.qr-details summary .ic:last-child {
  margin-left: auto;
  transition: transform 0.2s var(--ease);
}

.qr-details[open] summary .ic:last-child {
  transform: rotate(180deg);
}

.qr-details .qr {
  padding: 0 14px 14px;
}

/* Fairness page */
.panel-limits h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-limits h2 .ic {
  color: var(--accent);
}

.link-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

td.is-flagged,
td.is-flagged a {
  color: var(--loss);
}

.flight-id {
  color: inherit;
  text-decoration: none;
}

.flight-id:hover {
  text-decoration: underline;
}

/* Rules: bets, max win and bankroll as tiles (rows on phones). */
.limit-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.limit-stats .stat-v {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Touch targets */
.link-btn,
.footer-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

/* Compact bar, ticket variant (phones): "Pay · 1:52 left · Details" / "In queue · #2 · Details". */
.mini[data-kind='ticket'] .mini-mult {
  font: 600 16px/1.1 var(--font-mono);
}

.mini-details {
  height: 44px;
}

.mini-details[hidden],
.btn-cashout-mini[hidden],
.mini-open[hidden] {
  display: none;
}

/* HUD row: chips never wrap; the pill gives way first. */
.phase-chip,
.flight-link {
  flex: none;
  white-space: nowrap;
}

.hud-pill {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-short,
.pill-short {
  display: none;
}

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

/* Short desktop windows: a smaller readout leaves the curve visible. */
@media (max-height: 760px) and (min-width: 761px) {
  .mult {
    font-size: clamp(56px, 7vw, 104px);
  }

  .readout {
    margin-top: 12px;
  }
}

/* 761-1180 px: the Cash out button sits at the stage bottom, never over the curve and the rocket. */
@media (max-width: 1180px) and (min-width: 761px) {
  .stage-action {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 18px;
    margin: 0;
  }
}

@media (max-width: 760px) {
  /* The idle card would cover a dimmed 1.00x. */
  .stage[data-phase='idle'] .readout {
    visibility: hidden;
  }

  .countdown {
    gap: 8px;
  }

  .cd-dial {
    width: 112px;
    height: 112px;
  }

  .cd-num {
    font-size: 54px;
  }

  .cd-unit {
    font-size: 18px;
  }

  .cd-caption {
    padding: 6px 10px;
    border-radius: 10px;
    background: rgb(8 12 17 / 0.7);
  }

  .stage[data-result='won'] .stage-center {
    padding-bottom: 22%;
  }

  /* 16 px inputs: iOS does not zoom on focus. */
  .verify-form .input,
  .seed-row .input,
  .load-row .input {
    font-size: 16px;
  }

  .fair-table .col-verify {
    display: none;
  }

  .limit-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .limit-stats .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .limit-stats .stat-k {
    font-size: 13px;
  }

  .limit-stats .stat-v {
    font-size: 15px;
  }

  .tx-row {
    min-height: 40px;
  }

  .hud-pill {
    height: 26px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .fl-long,
  .pill-long {
    display: none;
  }

  .fl-short,
  .pill-short {
    display: inline;
  }

  .hud-top {
    gap: 6px;
  }

  /* Pay status: a one-line timer on top, the explanation over the full width below. */
  .pay-status {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .pay-status .timer {
    order: -1;
    flex: 1 0 100%;
    margin-left: 0;
    gap: 8px;
  }

  .pay-status .timer-ring {
    width: 28px;
    height: 28px;
  }

  .pay-status .timer-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .pay-status .timer-v {
    font-size: 18px;
  }

  .pay-status:not([data-tone]) .pay-status-icon {
    display: none;
  }

  .dlg-foot .btn-lg {
    height: 48px;
    font-size: 16px;
  }

  .dlg-foot {
    gap: 6px;
  }
}

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .stamp {
    transform: rotate(-6deg);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .tabbar,
  .mini,
  .phase-chip,
  .idle-card,
  .stamp {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar,
  .tabbar {
    background: var(--bg);
  }
}

@media (forced-colors: active) {
  .btn,
  .card,
  .stage {
    border: 1px solid CanvasText;
  }
}

.tx-link {
  display: inline-flex;
  vertical-align: -2px;
  color: var(--text-2);
}

.tx-link:hover {
  color: var(--text);
}

.tx-link .ic {
  width: 14px;
  height: 14px;
}
