/* ==========================================================================
   Versus - a 3D collectible gallery that happens to keep score.

   Design rules this file holds itself to:
     - one dark, gallery-lit ground; colour comes only from the two sides
     - typography does the shouting, not gradients or glow
     - every object sits on a plinth and casts a shadow
     - no casino cues: no chips, no odds, no flashing, no jackpot type
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */

:root {
  --bg: #0a0a0e;
  --bg-raised: #101016;
  --surface: #16161d;
  --surface-2: #1d1d26;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f2ee;
  --text-dim: #9b99a6;
  --text-faint: #6a6875;

  --a: #5b8cff;
  --b: #ff6b57;

  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  --radius: 14px;
  --radius-lg: 22px;

  --gutter: 20px;
  --measure: 1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, Menlo,
    Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A single soft light source, high and centred, like a display case. */
body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto;
  height: 70vh;
  background: radial-gradient(60% 100% at 50% 0%, rgba(120, 130, 200, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img, svg { max-width: 100%; }
a { color: inherit; }

::selection { background: rgba(91, 140, 255, 0.35); }

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

.container {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

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

/* -------------------------------------------------------------- typography */

.display {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  padding-block: 36px 56px;
  font-size: 13px;
  color: var(--text-faint);
}

.site-footer__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

.site-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }

.disclaimer {
  max-width: 62ch;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 650;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 11px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.12s var(--ease), background 0.15s, border-color 0.15s, opacity 0.15s;
  text-align: center;
}

.btn:hover { background: color-mix(in srgb, var(--btn-bg) 80%, white); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  --btn-bg: var(--text);
  --btn-fg: #0a0a0e;
  border-color: transparent;
}
.btn--primary:hover { background: #fff; }

.btn--ghost { --btn-bg: transparent; }

.btn--block { width: 100%; }

.btn--support {
  --btn-bg: var(--side-accent, var(--a));
  --btn-fg: #0a0a0e;
  border-color: transparent;
  font-weight: 750;
  font-size: 15px;
  padding: 15px 20px;
  letter-spacing: 0.01em;
}
.btn--support:hover { background: color-mix(in srgb, var(--side-accent) 86%, white); }

.btn--danger { --btn-bg: rgba(248, 113, 113, 0.12); --btn-fg: #fca5a5; border-color: rgba(248,113,113,0.3); }

/* -------------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  background: var(--surface);
  white-space: nowrap;
}

.pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill--live { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.pill--live .pill__dot { animation: pulse 2.4s var(--ease) infinite; }
.pill--paused { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pill--sealing { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pill--completed { color: var(--text-dim); }
.pill--cancelled { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.pill--scheduled { color: var(--a); border-color: color-mix(in srgb, var(--a) 35%, transparent); }
.pill--draft { color: var(--text-faint); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* --------------------------------------------------------------- figurines
   The object sits in a lit niche, floats gently, and tilts toward the pointer.
   Everything here is decorative: it degrades to a static SVG with no JS.      */

.stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 900px;
  padding-block: 4px;
}

.stage__glow {
  position: absolute;
  inset: 8% 4% 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--side-accent) 22%, transparent), transparent 68%);
  filter: blur(22px);
  pointer-events: none;
}

.stage__object {
  position: relative;
  width: 100%;
  max-width: 300px;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

.figurine {
  display: block;
  width: 100%;
  height: auto;
  animation: float 7s ease-in-out infinite;
}

.figurine__body { transform-origin: 120px 150px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ------------------------------------------------------------- battle stage */

.battle-hero { padding-block: 34px 12px; }

.battle-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.battle-title {
  font-size: clamp(30px, 8vw, 54px);
  margin-block: 14px 6px;
}

.battle-desc {
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 0 8px;
  font-size: 15px;
}

.arena {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  margin-block: 8px 26px;
}

.fighter {
  --side-accent: var(--a);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 2px;
  padding: 18px 12px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--side-accent) 9%, transparent), transparent 62%),
    var(--bg-raised);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.fighter--leading {
  border-color: color-mix(in srgb, var(--side-accent) 45%, transparent);
}

.fighter__crown {
  position: absolute;
  top: 14px;
  inset-inline: 14px;
  display: flex;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--side-accent);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.fighter--leading .fighter__crown { opacity: 1; transform: none; }

.fighter__name {
  font-size: clamp(24px, 6vw, 36px);
  margin-top: 10px;
}

.fighter__tagline {
  font-size: 13px;
  color: var(--text-faint);
  margin: 4px 0 0;
  min-height: 1.2em;
}

.fighter__total {
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-top: 12px;
  line-height: 1;
  transition: color 0.4s var(--ease);
}

.fighter__meta {
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fighter__share { color: var(--side-accent); }

.fighter__action { width: 100%; margin-top: 18px; }

/* The counter briefly lifts and takes the side's colour when it changes. */
.fighter__total.is-bumped {
  animation: bump 0.9s var(--ease-out);
  color: var(--side-accent);
}

@keyframes bump {
  0% { transform: scale(1); }
  22% { transform: scale(1.09); }
  100% { transform: scale(1); }
}

.vs-mark {
  display: grid;
  place-items: center;
  padding-block: 6px;
}

.vs-mark span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 19px;
  background: var(--bg);
}

@media (min-width: 860px) {
  .arena {
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
  }
  .vs-mark { align-self: center; padding: 0; }
  .fighter { padding: 26px 20px 26px; }
}

/* ---------------------------------------------------------- momentum & lead */

.scoreline {
  display: grid;
  gap: 14px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.momentum {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
}

.momentum__seg {
  height: 100%;
  transition: width 0.85s var(--ease-out);
  position: relative;
}

.momentum__seg--a { background: linear-gradient(90deg, color-mix(in srgb, var(--a) 78%, black), var(--a)); }
.momentum__seg--b { background: linear-gradient(90deg, var(--b), color-mix(in srgb, var(--b) 78%, black)); }

.momentum__labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.momentum__labels b { font-weight: 800; }

.leader-line {
  text-align: center;
  font-size: clamp(15px, 4.2vw, 21px);
  font-weight: 750;
  letter-spacing: -0.01em;
  margin: 0;
}

.leader-line em { font-style: normal; }

/* -------------------------------------------------------------- countdown */

.countdown {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 26px 18px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 255, 255, 0.04), transparent 60%),
    var(--bg-raised);
  margin-block: 18px;
}

.countdown__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.countdown__days {
  font-size: clamp(48px, 15vw, 92px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.countdown__days-label {
  font-size: clamp(13px, 3vw, 17px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.countdown__clock {
  font-family: var(--mono);
  font-size: clamp(22px, 6.5vw, 34px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.countdown__note {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}

.countdown--ended .countdown__days,
.countdown--ended .countdown__clock { color: var(--text-faint); }

.countdown__track {
  width: 100%;
  max-width: 420px;
  height: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.countdown__track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--a), var(--b));
  transition: width 1s linear;
}

/* --------------------------------------------------------------- verdict */

.verdict {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--side-accent, var(--a)) 35%, transparent);
  background:
    radial-gradient(90% 130% at 50% 0%, color-mix(in srgb, var(--side-accent, var(--a)) 14%, transparent), transparent 65%),
    var(--bg-raised);
  margin-block: 18px;
}

.verdict__winner {
  font-size: clamp(30px, 9vw, 58px);
  color: var(--side-accent, var(--a));
}

.verdict__by { font-size: 15px; color: var(--text-dim); }

/* -------------------------------------------------------------- activity */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 20px 18px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0;
}

.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.activity li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.activity li:last-child { border-bottom: 0; }

.activity__tick {
  width: 3px;
  align-self: stretch;
  min-height: 26px;
  border-radius: 999px;
  background: var(--side-accent);
  flex: none;
}

.activity__who { font-weight: 650; }
.activity__side { color: var(--side-accent); font-weight: 650; }
.activity__amount { margin-left: auto; font-weight: 750; white-space: nowrap; }
.activity__when { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.activity__msg {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}

.activity li.is-new { animation: slide-in 0.6s var(--ease-out); }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.empty-note {
  color: var(--text-faint);
  font-size: 14px;
  padding: 18px 4px;
  text-align: center;
}

/* ------------------------------------------------------------- home / grid */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-block: 44px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 { font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0; font-weight: 700; }

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

@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid--three { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 18px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  background: var(--surface);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card__matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  margin-block: 6px 14px;
}

.card__side { display: grid; justify-items: center; gap: 2px; text-align: center; }
.card__side .stage { width: 100%; }
.card__side .stage__object { max-width: 130px; }
.card__side .figurine { animation-duration: 9s; }

.card__name {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: 2px;
}

.card__total { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }

.card__vs { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: var(--text-faint); }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-dim);
}

.card .momentum { height: 8px; }

/* -------------------------------------------------------------- the sheet
   Support form. A bottom sheet on phones, a centred dialog on wide screens.  */

.sheet[hidden] { display: none !important; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: end;
  justify-items: stretch;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(3px);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.sheet__panel {
  --side-accent: var(--a);
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  max-height: 92vh;
  overflow-y: auto;
  animation: sheet-up 0.32s var(--ease-out);
}

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

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.sheet__title { font-size: 24px; margin: 0; }
.sheet__for { color: var(--side-accent); }

.sheet__close {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.sheet__close:hover { color: var(--text); }

@media (min-width: 620px) {
  .sheet { align-items: center; justify-items: center; }
  .sheet__panel {
    width: min(480px, calc(100vw - 40px));
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--line-strong);
    padding: 26px 26px 28px;
  }
}

/* --------------------------------------------------------------- the form */

.field { display: grid; gap: 7px; margin-top: 16px; }

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.input, .select, .textarea {
  appearance: none;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color 0.15s;
}

.input:focus, .select:focus, .textarea:focus { border-color: var(--side-accent, var(--a)); outline: none; }
.textarea { resize: vertical; min-height: 76px; }

.amount-input {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px 14px;
}

.amount-input span { font-size: 28px; font-weight: 800; color: var(--text-faint); }

.amount-input input {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  width: 100%;
  padding: 8px 2px;
  outline: none;
}

.amount-input input::-webkit-outer-spin-button,
.amount-input input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.chip {
  appearance: none;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.chip:hover { color: var(--text); border-color: var(--text-faint); }

.chip[aria-pressed="true"] {
  background: var(--side-accent);
  border-color: transparent;
  color: #0a0a0e;
}

.form-error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fca5a5;
  font-size: 13px;
}

.form-error[hidden] { display: none; }

.fine-print {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-faint);
  margin-top: 14px;
}

.fine-print a { color: var(--text-dim); }

/* -------------------------------------------------------------- notices */

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-dim);
  margin-block: 16px;
}

.notice--good { border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.notice--warn { border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice--bad { border-color: color-mix(in srgb, var(--bad) 30%, transparent); }

/* ----------------------------------------------------------------- prose */

.prose { max-width: 68ch; padding-block: 20px 40px; }
.prose h1 { font-size: clamp(30px, 7vw, 44px); letter-spacing: -0.04em; margin-bottom: 8px; }
.prose h2 { font-size: 19px; margin-top: 34px; margin-bottom: 8px; letter-spacing: -0.015em; }
.prose p, .prose li { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose a { color: var(--a); }

/* ------------------------------------------------------------------ admin */

.admin-shell { padding-block: 26px 60px; }

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.admin-head h1 { font-size: 28px; letter-spacing: -0.035em; margin: 0; }
.admin-head .spacer { margin-left: auto; }

.stat-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 24px;
}

@media (min-width: 760px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 15px 16px;
}

.stat__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stat__value { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin-top: 5px; }
.stat__sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

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

table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }

thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-dim);
  white-space: nowrap;
}

.tag--succeeded { background: rgba(74, 222, 128, 0.14); color: #86efac; }
.tag--pending { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.tag--failed { background: rgba(148, 148, 160, 0.14); color: var(--text-dim); }
.tag--late, .tag--mismatched { background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.tag--refunded { background: rgba(167, 139, 250, 0.14); color: #c4b5fd; }

.admin-form { display: grid; gap: 4px; max-width: 760px; }

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 780px) { .split { grid-template-columns: 1fr 1fr; gap: 26px; } }

.side-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--bg-raised);
}

.side-editor__preview { display: grid; place-items: center; margin-bottom: 6px; }
.side-editor__preview .stage__object { max-width: 190px; }

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 7px;
  max-height: 240px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.asset-swatch {
  appearance: none;
  border: 1px solid transparent;
  background: var(--bg-raised);
  border-radius: 9px;
  padding: 3px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.asset-swatch svg { display: block; }
.asset-swatch:hover { background: var(--surface-2); }
.asset-swatch[aria-pressed="true"] { border-color: var(--side-accent, var(--a)); background: var(--surface-2); }

.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] {
  appearance: none;
  width: 44px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  padding: 3px;
  cursor: pointer;
}

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

.inline-form { display: inline; }

/* --------------------------------------------------------- accessibility */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .stage__object { transform: none !important; }
}
