/* ============================================================
   THE 90 — Variant 02 · VOLT ARENA
   Base: reset, typography, shared components.
   Pills, meaty buttons, 2px active borders, one volt hero
   block per screen, fast springy motion.
   ============================================================ */

/* --- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
}
button { cursor: pointer; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }

::selection { background: var(--volt); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- App shell ------------------------------------------------------ */
.app {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--void);
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 480px) {
  .app { border-inline: 1px solid var(--line); }
}
.app > main { flex: 1 0 auto; display: block; }
.px { padding-inline: var(--pad-page); }

/* --- Load reveal (one orchestrated moment, springy) ------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
}
.stagger > * { animation: rise 240ms var(--ease) backwards; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 35ms; }
.stagger > *:nth-child(3) { animation-delay: 70ms; }
.stagger > *:nth-child(4) { animation-delay: 105ms; }
.stagger > *:nth-child(5) { animation-delay: 140ms; }
.stagger > *:nth-child(6) { animation-delay: 175ms; }
.stagger > *:nth-child(7) { animation-delay: 210ms; }
.stagger > *:nth-child(n+8) { animation-delay: 245ms; }

/* --- Status bar (device chrome) ------------------------------------ */
.statusbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--pad-page);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: none;
}
.statusbar .sb-icons { display: flex; align-items: center; gap: 7px; }
.statusbar svg { height: 12px; width: auto; }

/* --- Top bar -------------------------------------------------------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-inline: var(--sp-3);
  flex: none;
}
.topbar-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-spacer { width: var(--tap); flex: none; }

/* --- Type helpers --------------------------------------------------- */
.display { font-family: var(--font-display); font-weight: 400; line-height: 1; }
.h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h1); line-height: 1.04; text-transform: uppercase; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h2); line-height: 1.1; text-transform: uppercase; }
.label {
  font-size: var(--fs-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--text-2);
}
.label--volt { color: var(--volt); }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* --- Wordmark -------------------------------------------------------- */
.wordmark { font-family: var(--font-display); line-height: 1; letter-spacing: 0.01em; }
.wordmark .wm-90 { color: var(--volt); }
.tagline {
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

/* --- Section head ----------------------------------------------------- */
.sec { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); }
.sec-spark {
  width: 7px;
  height: 7px;
  background: var(--volt);
  border-radius: 2px;
  transform: rotate(45deg);
  flex: none;
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sec-fill { flex: 1; }
.sec-aside {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-2);
  white-space: nowrap;
}

/* --- Buttons: meaty pills ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  text-align: center;
  transition: background-color var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.btn--volt { background: var(--volt); color: var(--ink); box-shadow: var(--glow); }
.btn--volt:hover { background: var(--volt-press); }
.btn--volt:active { background: var(--volt-press); box-shadow: var(--glow-soft); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:active { opacity: 0.85; }
.btn--dark { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); }
.btn--dark:active { background: var(--surface-3); }
.btn--ghost { border: 2px solid var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:active { background: var(--surface); }
.btn--full { width: 100%; }
.btn--sm { min-height: 44px; padding: 0 var(--sp-4); font-size: 12px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; cursor: default; box-shadow: none; }

.iconbtn {
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--text);
  flex: none;
  transition: background-color var(--t-fast);
}
.iconbtn:active { background: var(--surface-2); }

/* --- Pills (selectable chips) ------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  transition: background-color var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast);
}
.pill[aria-pressed="true"] {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--ink);
  box-shadow: var(--glow-soft);
}

/* --- Status badges (pill outline) ------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-2);
  white-space: nowrap;
}
.badge--volt { color: var(--volt); border-color: rgba(36, 255, 0, 0.45); }
.badge--white { color: var(--text); border-color: var(--line-strong); }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 10px rgba(36, 255, 0, 0.6);
  flex: none;
  animation: livepulse 1.4s var(--ease) infinite;
}
.live-dot--ink { background: var(--ink); box-shadow: none; }
@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --- Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.card--raised { background: var(--surface-2); }
.card--volt {
  background: var(--volt);
  color: var(--ink);
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--glow);
  position: relative;
  overflow: hidden;
}
.card--volt .muted, .card--volt .faint, .card--volt .label { color: var(--ink-soft); }

/* --- Halftone dust (hero texture) --------------------------------------------- */
.halftone { position: relative; }
.halftone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(circle, currentColor 1px, transparent 1.35px);
  background-size: 9px 9px;
  opacity: 0.05;
  pointer-events: none;
}

/* --- Ambient floodlight (one per screen, hero zones only) ---------------------- */
.ambient { position: relative; }
.ambient::after {
  content: '';
  position: absolute;
  inset: -40px 0 auto 0;
  height: 240px;
  background: radial-gradient(closest-side at 50% 0, rgba(36, 255, 0, 0.09), transparent 75%);
  pointer-events: none;
}

/* --- Lists / rows ------------------------------------------------------------ */
.list > * + * { border-top: 1px solid var(--line); }
.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 60px;
  padding-block: var(--sp-3);
}
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-weight: 500;
  font-size: var(--fs-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub { font-size: var(--fs-small); color: var(--text-2); margin-top: 3px; }

/* --- Monogram (club / user badge, no crests) ---------------------------------- */
.monogram {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  flex: none;
}
.monogram--sm { width: 34px; height: 34px; font-size: 11px; border-radius: 11px; }
.monogram--lg { width: 60px; height: 60px; font-size: 19px; border-radius: 18px; }
.monogram--volt { background: var(--volt); border-color: var(--volt); color: var(--ink); }
.monogram--ink {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
}

/* --- Stat pills row ------------------------------------------------------------- */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-small);
  font-weight: 700;
}
.stat-pill svg { width: 16px; height: 16px; color: var(--volt); }

/* --- Segmented control (pill) ---------------------------------------------------- */
.seg {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 4px;
  background: var(--surface);
}
.seg-btn {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-2);
  border-radius: var(--r-pill);
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.seg-btn[aria-selected="true"] {
  background: var(--volt);
  color: var(--ink);
  box-shadow: var(--glow-soft);
}

/* --- Tab bar ------------------------------------------------------------------------ */
.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex: none;
}
.tabbar-row { display: flex; padding: 8px var(--sp-2) 0; }
.tab {
  flex: 1;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-3);
}
.tab-ico {
  width: 46px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.tab-ico svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .tab-ico {
  background: var(--volt);
  color: var(--ink);
  box-shadow: var(--glow-soft);
}

/* --- Device home indicator ------------------------------------------------------------ */
.home-indicator {
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.22;
  margin: 8px auto;
}

/* --- Sticky footer bar (detail screens) ------------------------------------------------- */
.footbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin-top: auto;
  background: var(--void);
  border-top: 1px solid var(--line);
  padding: var(--sp-3) var(--pad-page) 0;
  flex: none;
}

/* --- Prediction tiles ------------------------------------------------------------------- */
.tile-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: var(--sp-2);
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: var(--r-cell);
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.tile-label {
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-2);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
}
.tile-val { font-family: var(--font-display); font-size: 19px; line-height: 1; transition: color var(--t-fast); }
.tile[aria-pressed="true"] {
  border-color: var(--volt);
  background: rgba(36, 255, 0, 0.07);
  box-shadow: var(--glow-soft);
}
.tile[aria-pressed="true"] .tile-val { color: var(--volt); }
.tile[aria-pressed="true"] .tile-label { color: var(--text); }

/* --- Stepper (pill) ----------------------------------------------------------------------- */
.stepper {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.step-btn {
  width: 48px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background-color var(--t-fast);
}
.step-btn:active { background: var(--surface-3); }
.step-val {
  width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
}

/* --- Ring timer (live window) ----------------------------------------------------------------- */
.ring-box { position: relative; width: 52px; height: 52px; flex: none; }
.ring-box svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 4; }
.ring-fill {
  fill: none;
  stroke: var(--volt);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(36, 255, 0, 0.5));
}
.ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--volt);
}

/* --- Progress ----------------------------------------------------------------------------- */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--r-pill);
  overflow: hidden;
  flex: 1;
}
.progress-fill {
  height: 100%;
  background: var(--volt);
  border-radius: var(--r-pill);
  transition: width var(--t-med);
}

/* --- Input ----------------------------------------------------------------------------------- */
.input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0 var(--sp-5);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--t-fast);
}
.input::placeholder { color: var(--text-3); }
.input:focus-visible { outline-offset: 0; border-color: var(--volt); }

/* --- Chat bubbles -------------------------------------------------------------------------------- */
.msg { display: flex; flex-direction: column; gap: 6px; }
.msg-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--text-2);
  padding-inline: 4px;
}
.bubble {
  max-width: 82%;
  padding: 11px 16px;
  background: var(--surface-2);
  border-radius: 18px;
  border-top-left-radius: 6px;
  font-size: var(--fs-body);
  line-height: 1.5;
  width: fit-content;
}
.msg--out { align-items: flex-end; }
.msg--out .bubble {
  background: var(--volt);
  color: var(--ink);
  border-radius: 18px;
  border-top-right-radius: 6px;
  box-shadow: var(--glow-soft);
}
.trans-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-block: -9px;
  font-size: var(--fs-nano);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-chip);
  color: var(--volt);
}
.trans-toggle svg { width: 13px; height: 13px; }

/* --- Transactions ------------------------------------------------------------------------------------- */
.tx-amt { font-weight: 700; white-space: nowrap; }
.tx-amt--plus { color: var(--volt); }

/* --- Pinned rank row ------------------------------------------------------------------------------------ */
.pin-row {
  position: sticky;
  bottom: var(--tabbar-h);
  z-index: 30;
  background: var(--surface-2);
  border: 2px solid var(--volt);
  border-radius: var(--r-cell);
  box-shadow: var(--glow-soft), 0 0 0 6px var(--void);
}

/* --- Scroll strips ---------------------------------------------------------------------------------------- */
.hstrip {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.hstrip::-webkit-scrollbar { display: none; }
