/* ============================================================
   Dead Zed's Revenge — application theme.
   Consumes the design tokens (tokens.css) only — never raw
   values. Inline styles from the prototypes live here as
   classes so a strict CSP (no unsafe-inline) stays feasible.
   ============================================================ */

* { box-sizing: border-box; }

html {
  position: relative;
  min-height: 100%;
  /* Guard the full-bleed hero (100vw) against a scrollbar-width horizontal scroll. */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-primary);
  /* Dark gothic arcade: near-black violet base with a radial purple glow up top. */
  background:
    radial-gradient(1100px 600px at 78% -10%, #2a1d3a 0%, #161020 42%, var(--bg-base) 100%),
    var(--bg-base);
  background-attachment: scroll;
}

a {
  color: var(--brand-light);
  text-decoration: none;
}

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

/* ---------- layout shell ---------- */
.page-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-6) clamp(14px, 4vw, 30px) var(--space-10);
}

/* ---------- header ---------- */
.site-header {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-4) clamp(14px, 4vw, 30px) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4) var(--space-5);
  flex-wrap: wrap;
}

/* Morf_ identity chip — circular avatar in a Twitch-purple capsule pill. */
.morf-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  /* Avatar + name sized down by ~a third from the original (46px / --text-display). */
  gap: var(--space-2);
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius-full);
  padding: 6px 22px 6px 7px;
  text-decoration: none;
}

.morf-chip:hover { background: #a855f7; }

.morf-chip__avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  flex: 0 0 auto;
}

.morf-chip__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.morf-chip__name {
  font-weight: var(--weight-semibold);
  font-size: calc(var(--text-display) * 0.66);
  color: var(--text-on-color);
  line-height: 1.05;
}

/* Invisible placeholder keeps the header three-column layout stable when signed out. */
.morf-chip--empty {
  visibility: hidden;
  pointer-events: none;
  min-width: 120px;
}

.site-header__title {
  flex: 1 1 240px;
  text-align: center;
}

.site-header__title-main {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-label);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
}

.site-header__title-sub {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-top: 5px;
  margin-bottom: var(--space-3);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}

.site-header__nav {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

.site-header__nav form {
  margin: 0;
  display: inline-flex;
}

.site-header__user {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
}

.site-header__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--brand);
}

/* Development-only dev sign-in affordance under the landing hero CTAs. */
.landing-hero__dev {
  margin-top: var(--space-4);
}

/* ---------- buttons / nav links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn-brand {
  background: var(--brand-muted);
  border-color: var(--brand-muted);
  color: var(--text-on-color);
}

.btn-brand:hover {
  background: #7d5cb0;
  border-color: #7d5cb0;
  color: #fff;
}

.btn-ghost {
  background: rgba(20, 16, 28, .76);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: #fff;
}

.btn-action {
  background: var(--action);
  border-color: var(--action);
  color: var(--text-on-color);
  font-size: var(--text-body);
  padding: 14px 28px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--action) 40%, transparent);
}

.btn-action:hover { background: var(--action-deep); color: #fff; }

/* ---------- currency glyphs (real PNG art at 1em) ---------- */
.currency-icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
  vertical-align: -0.12em;
}

/* ---------- fan-content disclaimer (above the footer rule) ---------- */
/* Body-sized copy so it reads as ordinary text, not a fine-print box. */
.page-disclaimer {
  width: 100%;
  max-width: 1080px;
  margin: var(--space-10) auto 0;
  padding: 0 clamp(14px, 4vw, 30px);
}

.page-disclaimer__body {
  margin: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}

/* ---------- footer ---------- */
.site-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--surface-2);
  margin-top: var(--space-6);
  padding: var(--space-6) clamp(14px, 4vw, 30px);
}

.site-footer__notice {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  flex-wrap: wrap;
  text-align: center;
  font-size: var(--text-body-sm);
  color: var(--text-faint);
  letter-spacing: var(--tracking-label);
}

.site-footer__link {
  color: var(--brand-light);
  text-decoration: underline;
}

.site-footer__link:hover { color: var(--text-primary); }

.site-footer__credit-link {
  color: var(--brand-light);
  text-decoration: underline;
}

.site-footer__credit-link:hover { color: var(--text-primary); }

/* ============================================================
   LANDING PAGE (Index) — a full-bleed, header-less scrolling
   marketing document on _LandingLayout. Recreated from the
   design handoff (design_handoff_landing_page/) using the repo
   tokens; the prototype's inline styles live here as classes so
   the strict CSP (no unsafe-inline) holds. Motion is driven by
   anim-landing.js, gated on the dzr-anim class (see the GSAP
   pre-hide block lower down).
   ============================================================ */

/* Smooth-scroll for the hero's "See the Crucible" anchor — landing only, motion-respecting. */
@media (prefers-reduced-motion: no-preference) {
  html:has(body.landing) { scroll-behavior: smooth; }
}

/* Shared landing button (hero + final CTA). Self-contained so it doesn't depend on declaration
   order against .btn-twitch. */
.landing-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px 30px;
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.landing-cta-btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 50%, transparent);
}

.landing-cta-btn--primary:hover {
  background: #a855f7;
  border-color: #a855f7;
  color: #fff;
  transform: scale(1.04);
}

.landing-cta-btn--secondary {
  gap: 9px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, .05);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.landing-cta-btn--secondary:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.landing-cta-btn--lg {
  padding: 17px 34px;
  font-size: var(--text-title);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--brand) 50%, transparent);
}

.landing-cta-btn__glyph { width: 22px; height: 22px; object-fit: contain; }
.landing-cta-btn__glyph--lg { width: 24px; height: 24px; }

/* ---------- ambient ember/fog layer (filled by anim-landing.js) ---------- */
.landing-fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Sections sit at z-index 2; lift the shared footer/disclaimer above the fixed FX layer too so the
   embers stay behind the page chrome (matches the prototype's z-ordered footer). */
body.landing .page-disclaimer,
body.landing .site-footer {
  position: relative;
  z-index: 2;
}

/* ---------- generic section ---------- */
.landing-section {
  position: relative;
  z-index: 2;
  padding: clamp(64px, 10vh, 118px) clamp(20px, 5vw, 40px);
  border-top: 1px solid var(--border-subtle);
}

.landing-section--base { background: var(--bg-base); }
.landing-section--deep { background: var(--bg-deep); }
.landing-section--centred { text-align: center; }
.landing-section--roster { overflow: hidden; }

/* Art-backed sections: a token wash (same readability pattern as the hero/final overlays) over a
   gothic background JPEG, with a solid fallback colour. Used in place of --base/--deep so the
   `background` shorthand never clobbers the image. The supplied art is dark-centred, so headlines and
   body copy stay legible under the wash. */
.landing-section--art-library {
  background-color: var(--bg-base);
  background-image:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-base) 90%, transparent),
      color-mix(in srgb, var(--bg-deep) 84%, transparent)),
    url("../img/bg-library.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-section--art-ledger {
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-deep) 88%, transparent),
      color-mix(in srgb, var(--bg-base) 86%, transparent)),
    url("../img/bg-ledger.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-section--art-vignette {
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-deep) 80%, transparent),
      color-mix(in srgb, var(--bg-base) 76%, transparent)),
    url("../img/bg-vignette.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-section__inner { max-width: 1080px; margin: 0 auto; }
.landing-section__inner--wide { max-width: 1180px; }
.landing-section__inner--narrow { max-width: 880px; }
.landing-section__inner--roster { max-width: 1320px; }

#landing-crucible { scroll-margin-top: var(--space-6); }

/* ---------- shared headings ---------- */
.landing-heading {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.landing-heading--centred { margin-bottom: var(--space-12); }

.landing-eyebrow {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--brand-light);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: 18px;
}

.landing-h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 68px);
  line-height: .96;
  margin: 0;
  color: #fff;
}

.landing-h3 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1;
  margin: 0 0 18px;
  color: #fff;
}

.landing-sub {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 22px auto 0;
  max-width: 560px;
}

/* ---------- 1. hero ---------- */
.landing-hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 72px 24px 70px;
}

.landing-hero__art-wrap { position: absolute; inset: 0; overflow: hidden; }

.landing-hero__art {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: center 42%;
  will-change: transform;
}

.landing-hero__wash {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg-base) 28%, transparent);
}

.landing-hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 92% at 50% 40%, transparent 50%, color-mix(in srgb, var(--bg-base) 62%, transparent) 100%);
}

.landing-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-base) 55%, transparent) 0%,
    transparent 26%,
    transparent 48%,
    color-mix(in srgb, var(--bg-base) 55%, transparent) 72%,
    color-mix(in srgb, var(--bg-base) 92%, transparent) 92%,
    var(--bg-base) 100%);
}

.landing-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 55% at 50% 26%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 60%);
  mix-blend-mode: screen;
}

.landing-hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.landing-hero__title {
  font-family: var(--font-display);
  font-size: clamp(46px, 11vw, 128px);
  line-height: .82;
  margin: 0;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .95), 0 0 90px color-mix(in srgb, var(--brand) 45%, transparent);
  letter-spacing: var(--tracking-label);
}

.landing-hero__subhead {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.08;
  color: #fff;
  margin: 24px auto 0;
  max-width: 780px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .7);
}

.landing-hero__lede {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 18px auto 0;
  max-width: 560px;
}

.landing-hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.landing-hero__micro {
  font-size: var(--text-label);
  color: var(--text-faint);
  margin-top: 18px;
  letter-spacing: var(--tracking-label);
}

.landing-hero__cue {
  position: relative;
  z-index: 3;
  padding-top: 38px;
  color: var(--text-faint);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  animation: dzr-cue 1.8s ease-in-out infinite;
}

/* ---------- 2. the 52 survivor crucible ---------- */
.landing-crucible {
  /* Illustrative fill: IndexModel.IllustrativeEscapes (17) over the 52-survivor roster.
     A marketing snapshot, not live data — kept as one constant here and reused below. */
  --crucible-fill: 32.69%;
  --crucible-segments: 52;
  margin: 50px auto 0;
  max-width: 920px;
  background: linear-gradient(135deg, var(--surface-1), var(--bg-deep));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 4vw, 44px);
}

.landing-crucible__tally {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.landing-crucible__count {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: clamp(64px, 12vw, 112px);
  line-height: .8;
  color: var(--success);
  letter-spacing: -1px;
}

.landing-crucible__caption {
  font-family: var(--font-ui);
  font-weight: var(--weight-regular);
  font-size: clamp(26px, 5vw, 44px);
  color: var(--text-faint);
  line-height: 1.6;
}

.landing-crucible__bar {
  position: relative;
  margin-top: 30px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  overflow: hidden;
  border: 1px solid var(--border);
}

.landing-crucible__fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--crucible-fill);
  z-index: 1;
  background: linear-gradient(90deg, var(--success-deep), var(--success));
}

.landing-crucible__segments {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(90deg,
    transparent 0,
    transparent calc(100% / var(--crucible-segments) - 2px),
    color-mix(in srgb, var(--bg-base) 85%, transparent) calc(100% / var(--crucible-segments) - 2px),
    color-mix(in srgb, var(--bg-base) 85%, transparent) calc(100% / var(--crucible-segments)));
}

.landing-crucible__next {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--crucible-fill);
  width: calc(100% / var(--crucible-segments));
  z-index: 3;
  background: linear-gradient(90deg, var(--action), var(--action-deep));
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--action) 70%, transparent);
  animation: dzr-glow-pulse 1.6s ease-in-out infinite;
}

.landing-crucible__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------- 2b. how it works strip ---------- */
.landing-steps { margin-top: var(--space-12); }

.landing-steps__label {
  font-family: var(--font-name);
  font-weight: var(--weight-bold);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 26px;
}

.landing-steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--space-4);
}

.landing-step {
  position: relative;
  background: linear-gradient(160deg, var(--surface-1), var(--bg-deep));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}

.landing-step__num {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
  color: color-mix(in srgb, var(--brand-light) 70%, var(--text-faint));
}

.landing-step__title {
  font-family: var(--font-name);
  font-weight: var(--weight-bold);
  font-size: var(--text-title);
  color: #fff;
  margin-top: 14px;
  line-height: 1.15;
}

.landing-step__body {
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 8px 0 0;
}

/* ---------- 3. dead zed keeps the books ---------- */
.landing-lore {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 3vw, 52px);
  align-items: center;
}

.landing-lore__portrait {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-base);
  border: 1px solid var(--border);
}

.landing-lore__portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.landing-lore__portrait-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 30%, transparent, color-mix(in srgb, var(--bg-base) 45%, transparent) 78%, color-mix(in srgb, var(--bg-base) 85%, transparent));
}

.landing-lore__nameplate {
  position: absolute;
  left: 24px;
  bottom: 22px;
  font-family: var(--font-name);
  font-weight: var(--weight-bold);
  font-size: clamp(24px, 3.4vw, 38px);
  color: #fff;
  letter-spacing: var(--tracking-eyebrow);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .9);
}

.landing-lore__copy .landing-eyebrow { margin-bottom: 12px; }

.landing-lore__body {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.62;
  margin: 0 0 14px;
}

.landing-lore__body--muted { color: var(--text-muted); margin: 0; }
.landing-lore__body--muted em { color: var(--text-secondary); font-style: italic; }

/* ---------- 4. two ways to suffer (currencies) ---------- */
.landing-currencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-6);
}

.landing-currency {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 34px 32px;
  overflow: hidden;
}

.landing-currency--bones {
  background: linear-gradient(160deg, color-mix(in srgb, var(--success) 9%, var(--surface-1)), var(--bg-deep));
  border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
}

.landing-currency--tears {
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 11%, var(--surface-1)), var(--bg-deep));
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--border));
}

.landing-currency__icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.landing-currency--bones .landing-currency__icon {
  --rot: -12deg;
  animation: dzr-bob 4.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 22px color-mix(in srgb, var(--success) 40%, transparent));
}

.landing-currency--tears .landing-currency__icon {
  --rot: 8deg;
  animation: dzr-bob 5.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 22px color-mix(in srgb, var(--brand) 45%, transparent));
}

.landing-currency__head { margin-top: 20px; }

.landing-currency__name {
  font-family: var(--font-display);
  font-size: var(--text-display);
  color: #fff;
  line-height: 1.12;
}

.landing-currency__sub {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-top: 5px;
}

.landing-currency__sub--bones { color: var(--success); }
.landing-currency__sub--tears { color: var(--brand-light); }

.landing-currency__body {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 16px 0 0;
}

/* ---------- 6. the roster wall ---------- */
.landing-roster { position: relative; }

.landing-roster__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 6px;
}

.landing-roster__face {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  filter: grayscale(.32) brightness(.78) contrast(1.04);
  transition: filter .25s ease, transform .25s ease;
}

.landing-roster__face:hover { filter: none; transform: scale(1.07); }

.landing-roster__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, transparent 52%, color-mix(in srgb, var(--bg-base) 70%, transparent) 88%, var(--bg-base) 100%);
}

/* ---------- 7. final cta ---------- */
.landing-final {
  overflow: hidden;
  text-align: center;
  padding: clamp(80px, 14vh, 160px) clamp(20px, 5vw, 40px);
}

.landing-final__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  opacity: .20;
}

.landing-final__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 65%),
    linear-gradient(180deg, var(--bg-base), transparent 30%, transparent 70%, var(--bg-base));
}

.landing-final__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.landing-final__headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 8.5vw, 98px);
  line-height: .9;
  margin: 0;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .8), 0 0 80px color-mix(in srgb, var(--brand) 38%, transparent);
}

.landing-final__lede {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 22px auto 36px;
  max-width: 520px;
}

.landing-final__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.bones-text { color: var(--success); }
.tears-text { color: var(--brand-light); }

/* ---------- Twitch buttons ---------- */
.btn-twitch {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-size: var(--text-body);
  padding: 14px 28px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent);
  /* Grows a little on hover, settles back on hover-out. Reduced-motion users get the instant state
     change (the global prefers-reduced-motion reset strips the transition). */
  transition: transform .16s ease, background .15s ease, border-color .15s ease;
}

.btn-twitch:hover {
  background: #a855f7;
  border-color: #a855f7;
  color: #fff;
  transform: scale(1.03);
}

.btn-twitch__glyph {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.btn-lg {
  font-size: var(--text-body);
  padding: 14px 28px;
}

/* Full-width Twitch button used inside the auth modal. */
.btn-twitch-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 40%, transparent);
  transition: background .15s ease;
}

.btn-twitch-block:not([disabled]):hover { background: #a855f7; }

.btn-twitch-block[disabled] {
  box-shadow: none;
  cursor: not-allowed;
  opacity: .45;
}

.btn-twitch-block--flex { flex: 1; }

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- auth modal ---------- */
body.modal-open { overflow: hidden; }

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.auth-modal.is-open { display: flex; }

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 12, .82);
  backdrop-filter: blur(8px);
}

.auth-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: linear-gradient(160deg, #1e1630, #14101e);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 36px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, var(--brand) 10%, transparent);
}

.auth-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  color: var(--text-faint);
  font-size: var(--text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.auth-modal__close:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--text-primary);
}

.auth-screen { display: none; }
.auth-screen.is-active { display: block; animation: dzr-fade-in .3s ease; }
.auth-screen--centred { text-align: center; }

.auth-screen__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  color: #fff;
  text-align: center;
  line-height: 1;
  margin: 0;
}

.auth-screen__subtitle {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 0;
  letter-spacing: var(--tracking-label);
}

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}

.auth-field__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--weight-semibold);
}

.auth-field__input {
  width: 100%;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-title);
  letter-spacing: var(--tracking-eyebrow);
  outline: none;
}

.auth-field__input:focus {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.auth-field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-label);
  color: var(--danger);
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border: 1px solid #6a2030;
  border-radius: var(--radius-sm);
  letter-spacing: var(--tracking-label);
}

.auth-field__hint {
  font-size: var(--text-label);
  color: var(--text-muted);
  margin: var(--space-2) 0 var(--space-5);
  text-align: center;
}

.auth-fineprint {
  font-size: var(--text-label);
  color: var(--text-muted);
  text-align: center;
  margin: var(--space-4) 0 0;
  line-height: 1.5;
}

.auth-fineprint--privacy {
  color: var(--text-secondary);
  font-size: var(--text-body);
  line-height: 1.6;
  letter-spacing: 0;
  margin-top: var(--space-8);
  text-align: left;
}

.auth-fineprint--privacy p {
  margin: 0;
}

.auth-fineprint--privacy p + p,
.auth-fineprint--privacy .auth-data-list + p {
  margin-top: var(--space-4);
}

.auth-fineprint__emphasis {
  color: var(--danger);
  font-weight: var(--weight-semibold);
}

.auth-data-list {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.auth-data-list__title {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.auth-data-list ul {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
}

.auth-data-list li::marker {
  color: var(--brand-light);
}

.auth-switch {
  margin: var(--space-5) 0 0;
  text-align: center;
  font-size: var(--text-label);
  color: var(--text-faint);
}

.auth-link {
  background: none;
  border: none;
  color: var(--brand-light);
  font-family: var(--font-ui);
  font-size: var(--text-label);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: var(--space-5) auto;
  animation: dzr-spin 1s linear infinite;
}

.auth-pulse { animation: dzr-pulse 1.5s ease infinite; }

.auth-welcome__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--brand);
  overflow: hidden;
  margin: 0 auto var(--space-4);
}

.auth-welcome__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-wallet {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: var(--space-5);
}

.auth-wallet--standalone {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.auth-wallet__cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.auth-wallet__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.auth-wallet__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-faint);
  text-transform: uppercase;
  text-align: left;
}

.auth-wallet__value {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: var(--text-display);
  line-height: 1;
}

.auth-wallet__divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  margin: 0 6px;
}

.auth-error__badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid var(--danger-deep);
  font-size: var(--text-heading);
  color: var(--danger);
}

.auth-error__actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn-back {
  flex: 0 0 auto;
  padding: 13px 18px;
}

/* ============================================================
   DASHBOARD (Phase 2 — read path)
   Escapes panel, wallet, stats bar, recent-trial cards, the
   start/resume card, first-run/empty + loading skeletons.
   Token-only values so a strict CSP needs no inline styles.
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* Shared small uppercase section label (Escapes, Recent Trials). */
.panel-eyebrow {
  margin: 0;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

/* ---------- dev tools strip (Development only) ---------- */
.dev-tools {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 6%, transparent);
}

.dev-tools__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--warning);
}

.dev-tools form { margin: 0; }

/* ---------- escapes panel ---------- */
.escapes-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--surface-3) 55%, transparent),
    color-mix(in srgb, var(--bg-deep) 55%, transparent));
  padding: 22px 24px;
}

.escapes-panel__glow {
  position: absolute;
  right: -40px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%);
  pointer-events: none;
}

.escapes-panel__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  flex-wrap: wrap;
}

.escapes-tally__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.escapes-tally__count {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: var(--text-counter);
  line-height: var(--leading-counter);
  letter-spacing: -1px;
  color: #fff;
}

.escapes-tally__total {
  font-size: var(--text-display);
  color: var(--text-faint);
}

.escapes-tally__pct {
  font-weight: var(--weight-semibold);
  font-size: var(--text-title);
  color: var(--success-dim);
  white-space: nowrap;
}

.escapes-bar {
  position: relative;
  display: flex;
  gap: 3px;
  margin-top: 22px;
}

.escapes-seg {
  flex: 1;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
}

.escapes-seg--filled {
  background: linear-gradient(180deg, var(--success), var(--success-deep));
}

.escapes-seg--next {
  background: linear-gradient(180deg, var(--action), var(--action-deep));
  box-shadow: 0 0 12px color-mix(in srgb, var(--action) 70%, transparent);
  animation: dzr-live-pulse 1.6s ease infinite;
}

.escapes-foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: var(--text-label);
  color: var(--text-faint);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ---------- wallet readout ---------- */
.wallet {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  white-space: nowrap;
}

.wallet__cell { text-align: right; }

.wallet__label {
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.wallet__label--bones { color: var(--success-dim); }
.wallet__label--tears { color: var(--brand-light); }

.wallet__readout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: 1px;
}

.wallet__icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.wallet__value {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: var(--text-hero);
  line-height: var(--leading-display);
}

/* ---------- stats bar ---------- */
.stats-bar {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: var(--space-1);
  max-width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 10px;
}

.stat {
  padding: var(--space-2) 22px;
  text-align: center;
}

.stat__value {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: var(--text-heading);
  line-height: 1;
  color: var(--text-primary);
}

.stat__value--danger { color: var(--danger); }
.stat__value--success { color: var(--success); }
.stat__value--muted { color: var(--text-secondary); }

.stat__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: var(--space-1);
}

.stat__divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.stats-locked {
  align-self: center;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------- recent trials ---------- */
.recent-trials {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  padding: 20px 22px;
}

.recent-trials__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.recent-trials__jump {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: color-mix(in srgb, var(--action) 12%, transparent);
  border: 1px solid var(--action-deep);
  color: var(--action);
  border-radius: var(--radius-md);
  padding: var(--space-2) 14px;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.recent-trials__jump:hover {
  background: color-mix(in srgb, var(--action) 22%, transparent);
  color: #fff;
}

.trial-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  justify-content: center;
}

/* ---------- survivor trial card ---------- */
.trial-card {
  --tone: var(--success);
  width: 216px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
}

.trial-card--escaped { --tone: var(--success); }
.trial-card--died    { --tone: var(--danger); }
.trial-card--void    { --tone: var(--brand-light); }

.trial-card__portrait {
  position: relative;
  width: 216px;
  height: 216px;
  flex-shrink: 0;
}

.trial-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.trial-card--void .trial-card__img { filter: saturate(.3) brightness(.78); }

.trial-card__num {
  position: absolute;
  top: 9px;
  left: 9px;
  font-weight: var(--weight-bold);
  font-size: var(--text-title);
  color: #fff;
  letter-spacing: var(--tracking-label);
  background: color-mix(in srgb, var(--tone) 30%, var(--bg-base));
  border: 1px solid color-mix(in srgb, var(--tone) 65%, transparent);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.trial-card__last {
  position: absolute;
  top: 10px;
  right: 9px;
  background: var(--action-deep);
  color: #fff;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--action) 50%, transparent);
  animation: dzr-pulse 1.4s ease infinite;
}

.trial-card__stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-weight: var(--weight-bold);
  font-size: var(--text-heading);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tone) 88%, transparent);
  border: 3px solid color-mix(in srgb, var(--tone) 68%, transparent);
  border-radius: var(--radius-xs);
  padding: 2px 10px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}

.trial-card__name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(10, 7, 16, .85));
  font-family: var(--font-name);
  font-weight: var(--weight-semibold);
  font-size: var(--text-body-sm);
  color: #fff;
  text-shadow: 0 1px 6px #000;
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trial-card__info {
  padding: 9px 10px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.trial-card__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.trial-card__result {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--tone);
}

.trial-card__sub {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.trial-card__pts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.trial-card__pts .currency-icon { width: 1.4em; height: 1.4em; vertical-align: -.3em; }

.trial-card__failed {
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  color: var(--danger);
}

/* ---------- perk diamonds + key ---------- */
.perk-row {
  display: flex;
  align-items: center;
  gap: 1px;
  min-height: 42px;
  flex-wrap: wrap;
}

.perk-row__empty {
  font-size: var(--text-label);
  color: var(--text-muted);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.perk-diamond {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perk-diamond::before {
  content: "";
  position: absolute;
  width: 27px;
  height: 27px;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--brand-light) 16%, transparent);
  border: 1.5px solid var(--brand-muted);
  transform: rotate(45deg);
}

.perk-diamond { position: relative; }

.perk-diamond img {
  position: relative;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.perk-diamond--meta::before {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  border-color: var(--warning-deep);
}

.key-badge {
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--success) 18%, transparent);
  border: 1.5px solid var(--success-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-title);
  flex-shrink: 0;
}

/* ---------- start / resume card ---------- */
.start-card {
  position: relative;
  width: 216px;
  /* A low floor only — the grid's align-items:stretch sizes this to match the trial cards in its row.
     A larger min-height made the Resume/Start card tower over the (content-sized) trial cards. */
  min-height: 300px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui);
}

.start-card--action {
  background: linear-gradient(150deg, var(--action), var(--action-deep));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--action) 50%, transparent);
  /* Grows slightly on hover (kept gentle — it is a large card), settles back on hover-out. */
  transition: transform .16s ease;
}

.start-card--action:hover {
  transform: scale(1.02);
}

.start-card--over {
  cursor: default;
  background: linear-gradient(150deg, var(--surface-2), var(--bg-deep));
  border: 1px solid var(--border);
  justify-content: center;
  gap: var(--space-4);
}

.start-card__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: .92;
}

.start-card__foot { margin-top: auto; }

.start-card__cost {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-regular);
  line-height: .95;
  white-space: nowrap;
}

.start-card__note {
  display: block;
  font-size: var(--text-body-sm);
  opacity: .9;
  margin-top: var(--space-2);
  line-height: 1.3;
}

.start-card__newrun {
  align-self: flex-start;
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--action);
  background: color-mix(in srgb, var(--action) 12%, transparent);
  border: 1px solid var(--action-deep);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
}

/* ---------- recent trials empty state ---------- */
.empty-trials {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, .18);
  padding: 40px 24px;
  display: flex;
  align-items: center;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-trials__blurb { max-width: 380px; }

.empty-trials__icon { font-size: var(--text-hero); }

.empty-trials__title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  color: #fff;
  margin-top: 10px;
}

.empty-trials__body {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: var(--space-2) 0 0;
}

.empty-trials__cost {
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.empty-trials__cost .currency-icon { width: 1.2em; height: 1.2em; vertical-align: -.22em; }

.empty-trials__steps {
  display: flex;
  gap: var(--space-2);
  margin-top: 18px;
  flex-wrap: wrap;
}

.step-chip {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
}

.empty-trials .start-card { min-height: 300px; }

/* ---------- loading skeletons ---------- */
.skeleton {
  display: block;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 200% 100%;
  animation: dzr-shimmer 1.4s linear infinite;
}

.skeleton--eyebrow { width: 120px; height: 13px; margin-bottom: 18px; }
.skeleton--tally { width: 220px; height: 54px; margin-top: 14px; }
.skeleton--bar { width: 100%; height: 22px; margin-top: 26px; border-radius: var(--radius-xs); }
.skeleton--wallet { width: 80px; height: 60px; }
.skeleton--portrait { width: 216px; height: 216px; }
.skeleton--line { height: 11px; }
.skeleton--line-60 { width: 60%; }
.skeleton--line-75 { width: 75%; }
.skeleton--line-90 { width: 90%; }

.escapes-panel--skeleton { background: var(--surface-1); }
.trial-card--skeleton .trial-card__info { gap: 9px; }

@keyframes dzr-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes dzr-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ---------- status pages (404 / 500) ---------- */
.status-page {
  max-width: 560px;
  margin: var(--space-12) auto 0;
  text-align: center;
}

/* 404 hero artwork — transparent PNG/WebP on the dark page, sized down from its native 883x964. */
.status-page__art {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto var(--space-6);
}

.status-page__code {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
}

.status-page__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  color: #fff;
  letter-spacing: var(--tracking-label);
  margin: 0 0 var(--space-4);
}

.status-page__body {
  font-size: var(--text-title);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto var(--space-6);
}

.status-page__quote {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-faint);
  margin: 0 0 var(--space-6);
}

.status-page__ref {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  margin: 0 0 var(--space-6);
}

.status-page__cta {
  max-width: 320px;
  margin: 0 auto;
}

.status-page__contact {
  font-size: var(--text-label);
  color: var(--text-faint);
  margin-top: var(--space-4);
}

/* ---------- modal animations ---------- */
@keyframes dzr-spin { to { transform: rotate(360deg); } }
@keyframes dzr-fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dzr-pulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

/* ---------- generic content prose (Privacy, Error, etc.) ---------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  color: #fff;
  letter-spacing: var(--tracking-label);
}

.prose h2, .prose h3 {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.prose a { text-decoration: underline; }

.prose p, .prose ul { margin: var(--space-4) 0; }
.prose li { margin: var(--space-2) 0; }

/* Draft / not-yet-in-effect callout (e.g. the provisional privacy notice). */
.draft-banner {
  margin: var(--space-4) 0 var(--space-8);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--warning-deep);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  color: var(--text-secondary);
}

.draft-banner strong { color: var(--warning); }

.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-size: var(--text-body-sm);
}

/* ============================================================
   TRIAL FLOW (Phase 3) — the 13-stage modal.
   Server-authoritative: the body is AJAX-swapped per stage. A
   530px panel, fixed header (step dots + label + live wallet),
   selection-summary bar, then the stage body. Token-only values;
   selection states never reflow (borders are always full-width,
   tints via color-mix).
   ============================================================ */
.trial-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.trial-modal.is-open { display: flex; }

.trial-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 12, .82);
  backdrop-filter: blur(8px);
}

.trial-modal__panel {
  position: relative;
  z-index: 1;
  width: 636px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1a1228;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7), 0 0 0 1px color-mix(in srgb, var(--brand) 8%, transparent);
}

.trial-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text-faint);
  font-size: var(--text-body);
  line-height: 1;
  cursor: pointer;
}

.trial-modal__close:hover { background: rgba(255, 255, 255, .12); color: var(--text-primary); }
.trial-modal.is-busy .trial-modal__panel { opacity: .82; pointer-events: none; }

/* ---------- header: step dots + label + wallet ---------- */
.trial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  /* Extra right padding clears the absolute close button (right:12px + 30px wide) so the wallet
     never runs underneath it. */
  padding: 12px 50px 12px 18px;
  background: rgba(0, 0, 0, .3);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.trial-steps { display: flex; align-items: center; gap: 6px; }

.trial-step {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-xs);
  background: var(--border-subtle);
  transition: width .3s ease, background .3s ease;
}

.trial-step--done { background: var(--brand-muted); }
.trial-step--active { width: 22px; background: var(--brand-light); }

.trial-header__label {
  flex: 1;
  text-align: center;
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.trial-header__wallet { display: flex; align-items: center; gap: 14px; }

.trial-wallet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: var(--weight-bold);
  font-size: var(--text-body);
  white-space: nowrap;
}

.trial-wallet .currency-icon { width: 1.2em; height: 1.2em; vertical-align: -.22em; }

/* ---------- selection summary bar ---------- */
.trial-summary-bar {
  display: flex;
  gap: 7px;
  padding: 9px 14px;
  background: rgba(0, 0, 0, .12);
  border-bottom: 1px solid var(--surface-2);
  flex-shrink: 0;
}

.trial-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .15);
  border: 1px solid var(--surface-2);
  opacity: .4;
}

/* The three summary stages are always equal thirds. */
.trial-summary--survivor,
.trial-summary--loadout,
.trial-summary--challenge { flex: 1 1 0; min-width: 0; }
.trial-summary.is-set { opacity: 1; border-color: var(--brand-deep); background: color-mix(in srgb, var(--brand) 10%, transparent); }

.trial-summary__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.trial-summary__placeholder {
  font-size: var(--text-label);
  color: var(--text-faint);
  min-height: 24px;
  display: flex;
  align-items: center;
}

.trial-summary__survivor { display: flex; align-items: center; gap: 7px; }

.trial-summary__portrait {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: top;
  border: 1.5px solid var(--brand-deep);
}

.trial-summary__name {
  font-family: var(--font-name);
  font-size: var(--text-body-sm);
  color: var(--text-primary);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trial-summary__perks { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-height: 24px; }

.trial-summary__challenge { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.trial-summary__tier {
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.trial-summary--challenge.tier--easy .trial-summary__tier { color: var(--tier-easy); }
.trial-summary--challenge.tier--med .trial-summary__tier { color: var(--tier-med); }
.trial-summary--challenge.tier--hard .trial-summary__tier { color: var(--tier-hard); }

.trial-summary__cname {
  font-family: var(--font-display);
  font-size: var(--text-body-sm);
  color: var(--text-primary);
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- stage body + shared bits ---------- */
.trial-body {
  padding: 22px;
  overflow-y: auto;
  /* Never show a horizontal scrollbar. Set explicitly (not left to compute from overflow-y) so the
     survivor-reveal portrait's scale/shake — which some browsers (Safari) count toward scrollWidth —
     can't trip a stray horizontal bar at the bottom of the modal. */
  overflow-x: hidden;
  /* Stage entrance is driven by GSAP (anim-core enterStage); the old dzr-fade-in is retired so the
     two never double up. Reduced-motion / no-GSAP users simply get the swapped content with no fade. */
}

/* The survivor reveal is a self-contained, centred animation: the portrait grows/shakes/bursts but
   always fits within the body, so clip both axes — no scrollbars can appear during the reveal. */
.trial-body:has(.trial-reveal) {
  overflow: hidden;
}

.trial-eyebrow {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: 10px;
}

.perk-diamond--sm { flex: 0 0 26px; width: 26px; height: 26px; }
.perk-diamond--sm::before { width: 19px; height: 19px; }
.perk-diamond--sm img { width: 15px; height: 15px; }
.key-badge--sm { width: 26px; height: 26px; font-size: var(--text-body-sm); margin-left: 0; }

/* ---------- trial buttons ---------- */
.trial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease, border-color .15s ease;
}

.trial-btn .currency-icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
.trial-btn--block { width: 100%; }
.trial-btn--lg { font-size: var(--text-body); padding: 13px 40px; }
.trial-btn[disabled] { opacity: .42; cursor: not-allowed; }

.trial-btn--brand { background: linear-gradient(135deg, #6d3fa6, #4a2870); color: #fff; }
.trial-btn--brand:not([disabled]):hover { background: linear-gradient(135deg, #7d4fb6, #573080); }

.trial-btn--action {
  background: linear-gradient(135deg, var(--action), var(--action-deep));
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--action) 38%, transparent);
}
.trial-btn--action:not([disabled]):hover { background: var(--action-deep); }

.trial-btn--ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.trial-btn--ghost:hover { background: var(--surface-2); color: var(--text-primary); }

/* ---------- centred stages (confirm / ready / in-progress) ---------- */
.trial-confirm,
.trial-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-5);
  min-height: 220px;
}

.trial-confirm__title,
.trial-centre__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  color: #fff;
}

.trial-confirm__note,
.trial-centre__sub {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  margin: 0;
  max-width: 320px;
}

.trial-confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }

.trial-live {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--action-deep);
  box-shadow: 0 0 16px color-mix(in srgb, var(--action) 60%, transparent);
  animation: dzr-pulse 1s ease infinite;
}

/* ---------- survivor reveal (slot machine) ---------- */
.trial-reveal { text-align: center; }

.trial-reveal__caption {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.trial-reveal__portrait {
  position: relative;
  width: 294px;
  height: 294px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* The plain roster portraits are character renders with no backdrop, so sit them on black. */
  background: #000;
  border: 2.5px solid var(--brand);
  box-shadow: 0 0 32px color-mix(in srgb, var(--brand) 40%, transparent);
  transition: border-color .25s ease, box-shadow .35s ease;
}

.trial-reveal__img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: filter .2s ease; }
.trial-reveal.is-spinning .trial-reveal__portrait { border-color: var(--brand-deep); box-shadow: 0 0 24px color-mix(in srgb, var(--brand-muted) 30%, transparent); }
.trial-reveal.is-spinning .trial-reveal__img { filter: brightness(.75) saturate(.6); }
.trial-reveal.is-revealed .trial-reveal__portrait { border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-light) 35%, transparent), 0 0 60px color-mix(in srgb, var(--brand-light) 45%, transparent); }

.trial-reveal__name {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  color: var(--text-primary);
  letter-spacing: var(--tracking-label);
  min-height: 30px;
  margin-bottom: 14px;
}

.is-hidden { display: none !important; }

/* ---------- trivia ---------- */
.trial-trivia__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.trial-trivia__title { font-family: var(--font-display); font-size: var(--text-heading); color: var(--text-primary); line-height: 1.1; }

.trial-trivia__prize { font-family: var(--font-ui); font-size: var(--text-body-sm); color: var(--text-muted); }
.trial-trivia__prize .currency-icon { width: .9em; height: .9em; vertical-align: -.1em; }

.trial-trivia__question {
  font-size: var(--text-body);
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: var(--weight-semibold);
  margin: 0 0 16px;
}

.trial-trivia__answers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.trial-answer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: rgba(0, 0, 0, .2);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.trial-answer__letter {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
}

.trial-answer__text { font-size: var(--text-body); font-weight: var(--weight-semibold); }
.trial-answer__mark { margin-left: auto; font-size: var(--text-body); }
.trial-answer.is-selected { border-color: var(--brand-light); background: color-mix(in srgb, var(--brand) 18%, transparent); color: #fff; }
.trial-answer--correct { border-color: var(--success-dim); background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); cursor: default; }
.trial-answer--wrong { border-color: var(--danger-deep); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); cursor: default; }

.trial-trivia__result { text-align: center; font-family: var(--font-display); font-size: var(--text-heading); margin: 16px 0; }
.trial-trivia__result.is-correct { color: var(--success); }
.trial-trivia__result.is-wrong { color: var(--danger); }
.trial-trivia__result .currency-icon { width: .9em; height: .9em; }
.trial-trivia__lock { text-align: center; font-size: var(--text-label); color: var(--text-muted); margin: 8px 0 0; }

/* ---------- loadout ---------- */
.trial-loadout__perks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.trial-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.trial-perk__name { flex: 1; font-size: var(--text-body-sm); font-weight: var(--weight-semibold); color: var(--text-faint); }
.trial-perk__check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: var(--text-label); color: transparent; }
.trial-perk.is-selected { border-color: var(--brand-muted); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.trial-perk.is-selected .trial-perk__name { color: var(--text-primary); }
.trial-perk.is-selected .trial-perk__check { border-color: var(--brand); background: var(--brand); color: #fff; }

.trial-loadout__extras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; align-items: stretch; }

.trial-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, .02);
  font-family: var(--font-ui);
  cursor: default;
}

.trial-extra--buy { cursor: pointer; flex-direction: column; align-items: flex-start; gap: 3px; }
.trial-extra--buy:not([disabled]):hover { border-color: var(--brand-muted); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.trial-extra[disabled] { opacity: .5; cursor: not-allowed; }
.trial-extra--meta { grid-column: 1; flex-direction: column; align-items: flex-start; gap: 8px; }
.trial-extra--meta.is-set { flex-direction: row; align-items: center; border-color: var(--warning-deep); background: color-mix(in srgb, var(--warning) 8%, transparent); }
.trial-extra--key.is-set { border-color: var(--success-deep); background: color-mix(in srgb, var(--success) 8%, transparent); }
.trial-extra__name { font-size: var(--text-body-sm); font-weight: var(--weight-semibold); }
.trial-extra__note { font-size: var(--text-micro); color: var(--text-muted); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.trial-extra__glyph { font-size: var(--text-heading); }

.trial-meta-choice { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.trial-meta-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--text-primary);
  cursor: pointer;
}
.trial-meta-option:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.trial-meta-option__name { font-size: var(--text-body-sm); font-weight: var(--weight-semibold); }

/* ---------- challenge tier ---------- */
.trial-challenge__title { font-family: var(--font-display); font-size: var(--text-heading); color: #fff; margin-bottom: 4px; }
.trial-challenge__sub { font-size: var(--text-body-sm); color: var(--text-muted); margin: 0 0 16px; }

.trial-tiers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.trial-tier {
  --tier: var(--text-secondary);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.trial-tier--easy { --tier: var(--tier-easy); }
.trial-tier--med { --tier: var(--tier-med); }
.trial-tier--hard { --tier: var(--tier-hard); }
.trial-tier__icon { font-size: var(--text-title); }
.trial-tier__label { font-size: var(--text-title); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); color: var(--text-secondary); }
.trial-tier__reward { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--weight-bold); color: var(--border-strong); white-space: nowrap; }
.trial-tier__reward .currency-icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }
.trial-tier > span:first-of-type { display: inline-flex; align-items: center; gap: 8px; }
.trial-tier.is-selected { border-color: var(--tier); background: color-mix(in srgb, var(--tier) 13%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--tier) 22%, transparent); }
.trial-tier.is-selected .trial-tier__label,
.trial-tier.is-selected .trial-tier__reward { color: var(--tier); }

.trial-challenge__card {
  --tier: var(--brand-light);
  border: 1.5px solid color-mix(in srgb, var(--tier) 50%, transparent);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, .35);
  padding: 16px;
  margin-bottom: 14px;
}

.trial-challenge__card.tier--easy { --tier: var(--tier-easy); }
.trial-challenge__card.tier--med { --tier: var(--tier-med); }
.trial-challenge__card.tier--hard { --tier: var(--tier-hard); }
.trial-challenge__tier { font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--tier); margin-bottom: 4px; }
.trial-challenge__name { font-family: var(--font-display); font-size: var(--text-heading); color: var(--text-primary); line-height: 1.1; margin-bottom: 5px; }
.trial-challenge__desc { font-size: var(--text-body-sm); color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ---------- result (outcome grid) ---------- */
.trial-result__title { font-family: var(--font-display); font-size: var(--text-heading); color: #fff; margin-bottom: 14px; }
.trial-result__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: start; margin-bottom: 14px; }
.trial-result__col { --tone: var(--text-secondary); display: flex; flex-direction: column; gap: 7px; }
.trial-result__col--escaped { --tone: var(--success); }
.trial-result__col--died { --tone: var(--danger); }
.trial-result__col--void { --tone: var(--brand-light); }

.trial-result__heading {
  font-size: var(--text-micro);
  font-weight: var(--weight-bold);
  color: var(--tone);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding-bottom: 5px;
  border-bottom: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
}

.trial-outcome {
  --tone: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: color-mix(in srgb, var(--tone) 5%, transparent);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.trial-outcome--escaped { --tone: var(--success); }
.trial-outcome--died { --tone: var(--danger); }
.trial-outcome--void { --tone: var(--brand-light); }
.trial-outcome__label { font-size: var(--text-body-sm); font-weight: var(--weight-bold); color: var(--tone); line-height: 1.15; }
.trial-outcome__pts { display: inline-flex; align-items: baseline; gap: 2px; font-family: var(--font-display); font-size: var(--text-title); color: var(--tone); }
.trial-outcome__pts .currency-icon { width: .8em; height: .8em; align-self: center; }
.trial-outcome__note { font-size: var(--text-micro); color: var(--text-muted); }
.trial-outcome.is-selected { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 26%, transparent); }

/* ---------- challenge complete (yes / no) ---------- */
.trial-challenge-result__title { font-family: var(--font-display); font-size: var(--text-heading); color: #fff; margin-bottom: 10px; }
.trial-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.trial-yesno__btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
}

.trial-yesno__btn--yes.is-selected { border-color: var(--success-dim); background: color-mix(in srgb, var(--success) 10%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--success) 26%, transparent); }
.trial-yesno__btn--no.is-selected { border-color: #6a2030; background: color-mix(in srgb, var(--danger) 6%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--danger) 20%, transparent); }
.trial-yesno__word { font-family: var(--font-display); font-size: var(--text-display); letter-spacing: var(--tracking-label); line-height: 1; }
.trial-yesno__btn--yes .trial-yesno__word { color: var(--success); }
.trial-yesno__btn--no .trial-yesno__word { color: var(--danger); }
.trial-yesno__reward { display: inline-flex; align-items: baseline; gap: 4px; font-weight: var(--weight-bold); font-size: var(--text-heading); }
.trial-yesno__btn--yes .trial-yesno__reward { color: var(--success); }
.trial-yesno__btn--no .trial-yesno__reward { color: var(--danger); }
.trial-yesno__reward .currency-icon { width: .8em; height: .8em; align-self: center; }

/* ---------- grace bingo ---------- */
.trial-bingo__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.trial-bingo__title { font-family: var(--font-display); font-size: var(--text-heading); color: var(--danger-deep); }
.trial-bingo__tally {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  /* The tally counts Bones, so it wears the Bones colour, not the death red. */
  border: 1px solid var(--success-deep);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  font-weight: var(--weight-bold);
  color: var(--success);
}
.trial-bingo__tally .currency-icon { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.trial-bingo__sub { font-size: var(--text-body-sm); color: var(--text-muted); margin: 0 0 14px; }
.trial-bingo__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 16px; }

.trial-tile {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px 5px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.trial-tile__name { font-family: var(--font-display); font-size: var(--text-body); font-weight: var(--weight-bold); color: var(--text-primary); line-height: 1.15; letter-spacing: var(--tracking-label); }
.trial-tile__desc { display: block; font-size: var(--text-body-sm); color: var(--text-muted); margin-top: 4px; line-height: 1.3; font-weight: var(--weight-regular); letter-spacing: 0; text-transform: none; }
.trial-tile.is-selected { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--warning) 28%, transparent); }
.trial-tile.is-selected .trial-tile__name { color: var(--warning); }

/* ---------- the foxmother (high-fidelity cinematic — README §7) ----------
   A bespoke near-black "collection" screen, the one place the trial flow adds dark vignette literals
   (#0e0709 / rgba(9,4,6,…)) — the same licence as the Run Over death palette. The three accents map to
   tokens where they exist (amber → --warning, the cut red → --danger, the remaining teal → --success,
   the CTA purple → --brand-muted); only the warm fox-light quote colour and the felt/parchment greys
   stay literals. The full-bleed art fades up; her line and the on-table ledger sit over the felt; the
   CTA sits in the dark panel below the bottom blend. Entrance motion is in anim-foxmother.js, gated by
   dzr-anim — never always-on CSS (plan §8). */
.fox-page { width: 100%; margin: 0 auto; }
/* Cinematic blackout — covers the page's violet glow with near-black behind every layer (fixed +
   z-index:-1 sits above the body background, below the header/fox/footer) so her card blends into a
   void. anim-foxmother.js fades it in with her entrance; it stays black at rest for reduced motion /
   no GSAP (the dzr-anim pre-hide below only hides it when motion is allowed). Scoped to this page, so
   leaving — a normal full page load — reverts to the violet ramp automatically. */
.fox-blackout { position: fixed; inset: 0; z-index: -1; background: #0e0709; pointer-events: none; }
.fox {
  display: grid;
  position: relative;
  background: #0e0709;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.fox-cinematic.is-busy { opacity: .82; pointer-events: none; }

.fox__stage { grid-area: 1 / 1; position: relative; }
.fox__art { width: 100%; display: block; }
.fox__blend {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 75%;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(14, 7, 9, 0) 0%,
    rgba(14, 7, 9, .28) 35%,
    rgba(14, 7, 9, .84) 65%,
    #0e0709 85%);
}

.fox__quote {
  margin: 0 auto 18px;
  width: 90%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(22px, 5.2vw, 32px);
  line-height: 1.14;
  color: #ffc6b6;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .95), 0 0 32px rgba(0, 0, 0, .9);
}

.fox__ledger {
  /* In-flow inside fox__panel, centred between the quote and the CTA. */
  width: 372px;
  max-width: 86%;
  margin: 0 auto 24px;
  padding: 15px 22px 17px;
  border: 1.5px solid color-mix(in srgb, var(--warning) 50%, transparent);
  border-radius: 13px;
  background: rgba(9, 4, 6, .85);
  backdrop-filter: blur(4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.fox__ledger-head {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--warning);
  text-align: center;
}
.fox__ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 16px;
  color: #e9ded7;
}
.fox__ledger-row + .fox__ledger-row { margin-top: 6px; }
.fox__ledger-label { color: #b7a8a1; }
.fox__ledger-value { font-weight: var(--weight-bold); color: #e9ded7; white-space: nowrap; }
.fox__ledger-value--cut { color: var(--danger); }
.fox__ledger-row--cut .fox__ledger-label { color: var(--danger); }
.fox__ledger-rule {
  height: 0;
  margin: 11px 0;
  border-top: 1.5px dashed color-mix(in srgb, var(--warning) 55%, transparent);
}
.fox__ledger-row--total { margin-top: 0; }
.fox__ledger-label--total { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: 21px; color: #fff; }
.fox__ledger-value--total { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: 27px; color: var(--success); }
.fox__ledger .currency-icon { width: 1em; height: 1em; vertical-align: -.12em; }

.fox__panel { grid-area: 1 / 1; align-self: end; position: relative; z-index: 1; padding: 24px 24px 30px; text-align: center; background: transparent; }
.fox__cta {
  font-family: var(--font-display);
  font-size: 22px;
  padding: 14px 50px;
  border: 2.5px solid #2b2926;
  border-radius: 12px;
  background: var(--brand-muted);
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55), 3px 4px 0 rgba(40, 38, 34, .3);
  transition: transform .12s ease, background .15s ease;
}
.fox__cta:hover { background: color-mix(in srgb, var(--brand-muted) 80%, #fff); transform: translateY(-1px); }
.fox__cta:active { transform: translateY(0); }

/* ---------- summary ---------- */
.trial-summary-view { text-align: center; }
.trial-summary-view__stamp {
  --tone: var(--success);
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--tone);
  border: 2px solid color-mix(in srgb, var(--tone) 65%, transparent);
  border-radius: var(--radius-xs);
  padding: 2px 14px;
}

.trial-summary-view__stamp--escaped { --tone: var(--success); }
.trial-summary-view__stamp--died { --tone: var(--danger); }
.trial-summary-view__stamp--void { --tone: var(--brand-light); }
.trial-summary-view__survivor { font-family: var(--font-name); font-size: var(--text-title); color: var(--text-primary); margin: 10px 0 16px; }

.trial-ledger { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-bottom: 16px; }
.trial-ledger__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
}
.trial-ledger__row .currency-icon { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.trial-ledger__row--tax { color: var(--danger); }
.trial-ledger__row--note { color: var(--text-muted); font-weight: var(--weight-regular); font-size: var(--text-label); }

.trial-summary-view__wallet { display: flex; align-items: center; justify-content: center; gap: var(--space-5); margin-bottom: 14px; }
.trial-summary-view__escapes { font-size: var(--text-label); color: var(--text-muted); letter-spacing: var(--tracking-label); text-transform: uppercase; }

.trial-summary-view__ended {
  font-family: var(--font-display);
  font-size: var(--text-title);
  margin-bottom: 16px;
}
.trial-summary-view__ended.is-won { color: var(--success); }
.trial-summary-view__ended.is-bankrupt { color: var(--danger); }

/* ============================================================
   RUN HISTORY (Phase 4)
   Summary strip + a horizontally-scrollable run table. The
   "Notes" column is screen-only (the CSV has no Notes). Token-
   only values plus a few prototype table shades.
   ============================================================ */
.run-history {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.run-history__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-5);
  flex-wrap: wrap;
}

.run-history__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  color: #fff;
  line-height: 1;
  letter-spacing: var(--tracking-label);
}

.run-history__sub {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: var(--space-1);
}

.run-history__actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- empty state ---------- */
.run-history__empty {
  text-align: center;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, .18);
  padding: var(--space-12) var(--space-6);
}

.run-history__empty-icon { font-size: var(--text-hero); }

.run-history__empty-title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  color: #fff;
  margin-top: 10px;
}

.run-history__empty-body {
  font-size: var(--text-body-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: var(--space-2) auto var(--space-6);
  max-width: 420px;
}

/* ---------- summary strip ---------- */
.summary-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-card {
  flex: 1 1 140px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.summary-card__value {
  font-family: var(--font-ui);
  font-weight: var(--weight-bold);
  font-size: var(--text-display);
  color: var(--text-primary);
  line-height: 1;
}

.summary-card__value--success { color: var(--success); }
.summary-card__value--danger { color: var(--danger); }
.summary-card__value--brand { color: var(--brand-light); }
.summary-card__value--muted { color: var(--text-secondary); }

.summary-card__label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 5px;
}

/* ---------- run table ---------- */
.run-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}

.run-table {
  min-width: 900px;
  /* Cap + centre so the columns stay roomy and Notes doesn't balloon on very wide screens. */
  max-width: 1240px;
  margin-inline: auto;
  background: #12101a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.run-table__head,
.run-row {
  display: grid;
  /* Run · Date · Progress · Deaths · Challenges · Currency · Notes */
  grid-template-columns: 80px 124px 150px 100px 230px 168px 1fr;
  padding: 0 20px;
  align-items: center;
}

.run-table__head {
  background: #191325;
  border-bottom: 1px solid var(--border-subtle);
}

.run-table__col-head {
  padding: 12px 8px 10px;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.run-table__col-head .currency-icon { width: 1.4em; height: 1.4em; vertical-align: -.32em; }

.run-table__cell {
  padding: 0 8px;
  font-size: var(--text-body-sm);
  color: var(--text-primary);
}

.run-row {
  min-height: 52px;
  border-bottom: 1px solid #1a1528;
  background: #12101a;
}

.run-row:nth-child(odd) { background: #110e18; }
.run-row:last-child { border-bottom: none; }
.run-row.run-row--active { background: color-mix(in srgb, var(--brand) 5%, transparent); }

.run-row__id { font-weight: var(--weight-semibold); color: #7a6e9a; }

.run-row__escapes { font-family: var(--font-ui); font-weight: var(--weight-bold); font-size: var(--text-title); }
.run-row__escapes-total { font-size: var(--text-label); color: var(--border-strong); margin-left: 3px; }

/* outcome badge */
.run-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  white-space: nowrap;
  border: 1px solid transparent;
}

.run-badge--win { background: color-mix(in srgb, var(--success) 14%, transparent); border-color: var(--success-deep); color: var(--success); }
.run-badge--fail { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: #8b3a32; color: var(--danger); }
.run-badge--active { background: color-mix(in srgb, var(--brand) 12%, transparent); border-color: var(--brand-muted); color: var(--brand-light); }

/* challenges cell */
.run-row__challenges { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.run-tiers { display: flex; flex-direction: column; gap: 1px; width: 150px; }

.run-tier {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: 1.3;
}

.run-tier__count { color: var(--text-secondary); }

/* currency cell — Bones + Tears, text + icon, in their currency colours */
.run-row__currency {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.run-row__currency .currency-icon { width: 1.2em; height: 1.2em; vertical-align: -.22em; }

.run-row__note { font-size: var(--text-label); color: var(--text-muted); font-style: italic; }
.run-row__note.run-cell--muted { font-style: normal; }

/* tone modifiers (kept last so they win over the structural colour) */
.run-cell--brand { color: var(--brand-light); }
.run-cell--muted { color: var(--text-muted); }
.run-cell--secondary { color: var(--text-secondary); }
.run-cell--success { color: var(--success); }
.run-cell--danger { color: var(--danger); }
.run-cell--warning { color: var(--warning); }

/* ============================================================
   CINEMATIC LAYOUT + RUN OVER (Phase 4)
   The full-screen run-ended screen. Two variants: blood-red
   death (bankrupt) and on-token victory (52/52). Shared
   structure; the variant scope drives the palette.
   ============================================================ */
body.cinematic { background: var(--bg-base); }

.cinematic-chip {
  position: fixed;
  top: 18px;
  left: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 16, 28, .76);
  border: 1px solid var(--brand-deep);
  border-radius: var(--radius-full);
  padding: 6px 13px;
  backdrop-filter: blur(5px);
}

.cinematic-chip__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brand-muted);
  flex: 0 0 auto;
}

.cinematic-chip__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cinematic-chip__name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
}

.run-over {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px 48px;
  overflow: hidden;
}

.run-over__bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.run-over__bg-img { position: absolute; inset: 0; width: 100%; height: 100%; }

.run-over__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* eyebrow / headline / taunt / divider */
.run-over__eyebrow {
  font-size: var(--text-body-sm);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: 16px;
}

.run-over__headline {
  font-family: var(--font-display);
  line-height: .85;
  letter-spacing: var(--tracking-eyebrow);
}

.run-over__taunt {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.2vw, 22px);
  font-style: italic;
  line-height: 1.4;
  max-width: 520px;
}

.run-over__taunt-by {
  display: block;
  margin-top: 6px;
  font-size: var(--text-body-sm);
  font-family: var(--font-ui);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}

.run-over__divider { width: 200px; height: 1px; margin: 36px auto; }

/* victory banner (the custom Survived art) */
.run-over__banner {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 8px 0 24px;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 0 60px color-mix(in srgb, var(--brand) 30%, transparent), 0 18px 50px rgba(0, 0, 0, .6);
}

/* final stats grid */
.run-over__stats { width: 100%; max-width: 560px; margin: 0 auto; }

.run-over__stats-label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: 18px;
}

.run-over__stats-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid transparent;
}

.run-over__stat { padding: 22px 16px; }
.run-over__stat-value { font-family: var(--font-display); font-size: var(--text-hero); line-height: .9; }

.run-over__stat-label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: var(--weight-semibold);
}

.run-over__stats-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  gap: 1px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid transparent;
  margin-top: 10px;
}

.run-over__substat { padding: 14px 12px; }
.run-over__substat-value { font-family: var(--font-ui); font-weight: var(--weight-bold); font-size: var(--text-heading); }

.run-over__substat-label {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-top: 3px;
}

.run-over__stat-label .currency-icon,
.run-over__substat-label .currency-icon { width: 1.5em; height: 1.5em; vertical-align: -.34em; }

/* actions */
.run-over__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.run-over__actions form { margin: 0; }

.run-over__newrun {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: var(--radius-md);
  padding: 18px 40px;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  letter-spacing: var(--tracking-label);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.run-over__history {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 24px;
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- death variant ---------- */
.run-over--death { background: #0d0608; }
/* Featured Dead Zed art — kept legible (its own dark purple tones show; no heavy red sepia), with
   the bottom-darkening gradient below carrying the headline/stats over it. */
.run-over--death .run-over__bg-img { object-fit: cover; object-position: center center; opacity: .9; filter: saturate(.95) brightness(.9); }
.run-over--death .run-over__bg-fade { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 60% at 50% 0%, rgba(160, 10, 10, .32) 0%, transparent 60%), linear-gradient(180deg, rgba(13, 6, 8, .15) 0%, rgba(13, 6, 8, .5) 45%, rgba(13, 6, 8, .9) 72%, #0d0608 100%); }
.run-over--death .run-over__bg-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 180px rgba(140, 0, 0, .5); }

.run-over--death .run-over__eyebrow { color: #d05058; }
.run-over--death .run-over__headline { font-size: clamp(56px, 13vw, 160px); color: var(--danger-blood); animation: dzr-blood-pulse 2.4s ease infinite; }
.run-over--death .run-over__taunt { color: #a07080; }
.run-over--death .run-over__taunt-by { color: #5a3040; }
.run-over--death .run-over__divider { background: linear-gradient(90deg, transparent, #6a1e22, transparent); }

.run-over--death .run-over__stats-label { color: #9a6a70; }
.run-over--death .run-over__stats-primary,
.run-over--death .run-over__stats-secondary { background: #2a1018; border-color: #3a1820; }
.run-over--death .run-over__stat { background: #1a0c10; }
.run-over--death .run-over__stat--bordered { border-left: 1px solid #2a1018; border-right: 1px solid #2a1018; }
.run-over--death .run-over__stat-value--escapes { color: var(--danger-blood); }
.run-over--death .run-over__stat-value--deaths { color: #e05060; }
.run-over--death .run-over__stat-value--bones { color: var(--bones); }
.run-over--death .run-over__stat-label { color: #9a6a70; }
.run-over--death .run-over__substat { background: #160a0e; }
.run-over--death .run-over__substat-value { color: #8a4050; }
.run-over--death .run-over__substat-value--tears { color: var(--tears); }
.run-over--death .run-over__substat-label { color: #8a5a62; }

.run-over--death .run-over__newrun { background: linear-gradient(135deg, var(--danger-blood), var(--danger-blood-deep)); box-shadow: 0 8px 32px rgba(160, 10, 20, .5); }
.run-over--death .run-over__newrun:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(160, 10, 20, .7); }
.run-over--death .run-over__history { border-color: #3a1820; color: #6a3a40; }
.run-over--death .run-over__history:hover { border-color: #6a2030; color: #a05060; }

/* ---------- victory variant ---------- */
.run-over--victory { background: var(--bg-base); }
.run-over--victory .run-over__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, color-mix(in srgb, var(--brand) 35%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 110%, color-mix(in srgb, var(--success) 16%, transparent) 0%, transparent 60%),
    var(--bg-base);
}

.run-over__headline--victory { font-size: clamp(40px, 9.5vw, 112px); color: var(--success); animation: dzr-win-pulse 2.6s ease infinite; }
.run-over__taunt--victory { color: var(--text-secondary); }
.run-over__taunt--victory .run-over__taunt-by { color: var(--text-faint); }
.run-over__divider--victory { background: linear-gradient(90deg, transparent, var(--brand-deep), transparent); }

.run-over--victory .run-over__stats-label { color: var(--text-muted); }
.run-over--victory .run-over__stats-primary,
.run-over--victory .run-over__stats-secondary { background: var(--border-subtle); border-color: var(--brand-deep); }
.run-over--victory .run-over__stat { background: var(--surface-1); }
.run-over--victory .run-over__stat--bordered { border-left: 1px solid var(--bg-deep); border-right: 1px solid var(--bg-deep); }
.run-over--victory .run-over__stat-value--escapes { color: var(--success); }
.run-over--victory .run-over__stat-value--deaths { color: var(--danger); }
.run-over--victory .run-over__stat-value--bones { color: var(--bones); }
.run-over--victory .run-over__stat-label { color: var(--text-muted); }
.run-over--victory .run-over__substat { background: var(--surface-1); }
.run-over--victory .run-over__substat-value { color: var(--text-secondary); }
.run-over--victory .run-over__substat-value--tears { color: var(--tears); }
.run-over--victory .run-over__substat-label { color: var(--text-muted); }

.run-over__newrun--victory { background: linear-gradient(135deg, var(--action), var(--action-deep)); box-shadow: 0 8px 32px color-mix(in srgb, var(--action) 45%, transparent); }
.run-over__newrun--victory:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 40px color-mix(in srgb, var(--action) 62%, transparent); }
.run-over__history--victory { border-color: var(--brand-deep); color: var(--brand-light); }
.run-over__history--victory:hover { border-color: var(--brand-muted); color: var(--text-primary); }

@keyframes dzr-blood-pulse {
  0%, 100% { text-shadow: 0 0 40px rgba(200, 20, 20, .6), 0 4px 32px rgba(0, 0, 0, .9); }
  50% { text-shadow: 0 0 80px rgba(220, 40, 40, .9), 0 4px 48px rgba(0, 0, 0, .9); }
}

@keyframes dzr-win-pulse {
  0%, 100% { text-shadow: 0 0 40px color-mix(in srgb, var(--success) 50%, transparent), 0 4px 32px rgba(0, 0, 0, .8); }
  50% { text-shadow: 0 0 80px color-mix(in srgb, var(--success) 78%, transparent), 0 4px 48px rgba(0, 0, 0, .8); }
}

/* Landing ambient + accents. The drifting embers (dzr-ember), the bobbing scroll cue (dzr-cue),
   the currency-icon bob (dzr-bob, reading a per-card --rot), the slow fog drift (dzr-fog), and the
   "next survivor" segment's glow pulse (dzr-glow-pulse). All disabled under reduced-motion below. */
@keyframes dzr-ember {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: .9; }
  90% { opacity: .5; }
  100% { transform: translateY(-120vh) translateX(var(--drift, 20px)); opacity: 0; }
}

@keyframes dzr-bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}

@keyframes dzr-fog {
  0% { transform: translateX(-3%); }
  100% { transform: translateX(3%); }
}

@keyframes dzr-cue {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(8px); opacity: 1; }
}

@keyframes dzr-glow-pulse {
  0%, 100% { box-shadow: 0 0 18px 2px color-mix(in srgb, var(--action) 60%, transparent); opacity: .9; }
  50% { box-shadow: 0 0 30px 6px color-mix(in srgb, var(--action) 80%, transparent); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ========================================================================
   GSAP animation pass (#25)
   ------------------------------------------------------------------------
   Pre-hidden entrance states for the JS-driven intros. Gated on the
   `dzr-anim` class ALONE — anim-boot.js adds it to <html> only when motion
   is allowed, and anim-core.js drops it if GSAP failed to load. So reduced-
   motion, no-JS, and no-GSAP users never match these rules and never get
   stuck behind hidden content; GSAP animates each element in and clears the
   inline styles, falling back to the stylesheet values below.
   ======================================================================== */

/* Landing scroll-reveal (anim-landing.js). Every [data-reveal] element starts hidden + nudged down
   and transitions in when the observer adds .is-revealed (hero elements fire on load; the rest on
   scroll-in). The crucible bar fill (collapsed → its --crucible-fill) and the pulsing "next" segment
   (faded → shown) animate on the same reveal. */
html.dzr-anim [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

html.dzr-anim [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

html.dzr-anim .landing-crucible__fill {
  width: 0;
  transition: width 1.4s cubic-bezier(.22, 1, .36, 1);
}

html.dzr-anim .landing-crucible__fill.is-filled { width: var(--crucible-fill); }

html.dzr-anim .landing-crucible__next {
  opacity: 0;
  transition: opacity .4s ease;
}

html.dzr-anim .landing-crucible__next.is-shown { opacity: 1; }

/* Run Over cinematic entrance (anim-runover.js) */
html.dzr-anim .cinematic-chip,
html.dzr-anim .run-over__eyebrow,
html.dzr-anim .run-over__banner,
html.dzr-anim .run-over__headline,
html.dzr-anim .run-over__taunt,
html.dzr-anim .run-over__divider,
html.dzr-anim .run-over__stats,
html.dzr-anim .run-over__actions { opacity: 0; }

/* The Foxmother cinematic entrance (anim-foxmother.js) */
html.dzr-anim .fox-blackout,
html.dzr-anim .fox__art,
html.dzr-anim .fox__quote,
html.dzr-anim .fox__ledger,
html.dzr-anim .fox__cta { opacity: 0; }

/* Dashboard load intro (anim-dashboard.js) */
html.dzr-anim .escapes-tally,
html.dzr-anim .escapes-panel .wallet,
html.dzr-anim .trial-card,
html.dzr-anim .start-card { opacity: 0; }
html.dzr-anim .escapes-seg--filled { transform: scaleX(0); transform-origin: left center; }

/* Floating payout chip — the "+N 🦴 / −N 💧" that arcs to the wallet (anim-core flyReward). Positioned
   and moved entirely via GSAP CSSOM writes; this is just its resting look. */
.dzr-fly {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-ui);
  font-weight: var(--weight-bold, 700);
  font-size: 19px;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.dzr-fly--gain { color: var(--success); text-shadow: 0 0 12px color-mix(in srgb, var(--success) 60%, transparent); }
.dzr-fly--loss { color: var(--danger); text-shadow: 0 0 12px color-mix(in srgb, var(--danger) 60%, transparent); }

/* ============================================================
   TRIAL SCREENS (multi-page trial flow)
   The modal wizard is retired; the 13 stages are now grouped
   onto full-page screens (Prep / Match / Result / Bingo /
   Summary) sharing a page band. These rules add the page chrome
   and the two new layouts (Prep's two halves, the Results
   progressive picker) plus the pre-pay dialog; the stage bodies
   reuse the .trial-* components above (reveal, perks, tiers,
   challenge card, trivia, bingo tiles, yes/no, ledger, summary).
   Selection states never reflow — borders always present, tints
   via color-mix, dimming via opacity.
   ============================================================ */
.trial-screen-page {
  position: relative; /* positioning context for the flying payout chip */
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

/* ---------- page band (replaces the modal header) ---------- */
.trial-band {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border-subtle);
}
.trial-band__id { display: flex; flex-direction: column; gap: 2px; }
.trial-band__num { font-family: var(--font-display); font-size: var(--text-title); color: var(--text-primary); line-height: 1; }
.trial-band__eyebrow {
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}
.trial-band__wallet { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.trial-band__back { font-size: var(--text-label); color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.trial-band__back:hover { color: var(--text-primary); }

/* ---------- screen body shell ---------- */
.trial-screen {
  background: #1a1228;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--card-pad);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.trial-screen.is-busy { opacity: .82; pointer-events: none; }

/* ---------- ① Prep ---------- */
.prep { display: flex; flex-direction: column; gap: var(--space-5); }
.prep-reveal { text-align: center; }
.prep-reveal__next { margin-top: 4px; }
.prep-reveal--settled .prep-survivor { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prep-survivor__portrait {
  width: 196px; height: 196px;
  border-radius: var(--radius-lg);
  object-fit: cover; object-position: top center;
  background: #000;
  border: 2.5px solid var(--brand);
  box-shadow: 0 0 28px color-mix(in srgb, var(--brand) 35%, transparent);
}
.prep-survivor__name { font-family: var(--font-display); font-size: var(--text-heading); color: var(--text-primary); letter-spacing: var(--tracking-label); }

.prep-halves { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.prep-half { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.prep-hint { font-size: var(--text-label); color: var(--text-muted); text-align: center; margin: 8px 0 0; }
.prep-lockin { margin-top: 4px; }

/* meta/key inline confirm */
.trial-extra__buy-row { display: flex; align-items: flex-start; gap: 8px; width: 100%; }
.trial-extra__open {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  flex: 1; text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit;
}
.trial-extra__open[disabled] { opacity: .5; cursor: not-allowed; }
.trial-extra__confirm { display: none; gap: 6px; width: 100%; }
.trial-extra.is-confirming .trial-extra__buy-row { display: none; }
.trial-extra.is-confirming .trial-extra__confirm { display: flex; }
.trial-btn--sm { flex: 1; padding: 7px 10px; font-size: var(--text-label); letter-spacing: var(--tracking-label); white-space: nowrap; }

/* meta perk info tooltip */
.trial-extra__info {
  position: relative; flex: 0 0 auto;
  font-size: var(--text-title); color: var(--text-muted);
  cursor: default; user-select: none; line-height: 1;
  padding-top: 2px;
}
.trial-extra__info-panel {
  display: none;
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  width: 220px; max-height: 300px; overflow-y: auto;
  background: #1e1630; border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .7);
}
.trial-extra__info:hover .trial-extra__info-panel,
.trial-extra__info:focus .trial-extra__info-panel,
.trial-extra__info:focus-within .trial-extra__info-panel { display: block; }
.trial-extra__info-title { font-family: var(--font-display); font-size: var(--text-body-sm); color: var(--brand-light); margin-bottom: 8px; }
.trial-extra__info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.trial-extra__info-row { display: flex; align-items: center; gap: 6px; font-size: var(--text-label); color: var(--text-secondary); }
.trial-extra__info-icon { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }

/* ---------- ② Match & Wait ---------- */
.match { display: flex; flex-direction: column; gap: var(--space-5); }
.match-receipt {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: var(--radius-md);
  background: rgba(0, 0, 0, .2); border: 1px solid var(--surface-2);
}
.match-receipt__row { display: flex; align-items: center; gap: var(--space-3); }
.match-receipt__label {
  flex: 0 0 84px;
  font-size: var(--text-label); letter-spacing: var(--tracking-label);
  color: var(--text-muted); text-transform: uppercase; font-weight: var(--weight-semibold);
}
.match-receipt__value { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.match-receipt__portrait { width: 34px; height: 34px; border-radius: var(--radius-sm); object-fit: cover; object-position: top; border: 1.5px solid var(--brand-deep); }
.match-receipt__name { font-family: var(--font-name); font-size: var(--text-body-sm); color: var(--text-primary); }
.match-receipt__muted { font-size: var(--text-label); color: var(--text-faint); }
.match-receipt__tier { font-size: var(--text-label); font-weight: var(--weight-bold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--brand-light); }
.match-receipt__challenge.tier--easy .match-receipt__tier { color: var(--tier-easy); }
.match-receipt__challenge.tier--med .match-receipt__tier { color: var(--tier-med); }
.match-receipt__challenge.tier--hard .match-receipt__tier { color: var(--tier-hard); }
.match-receipt__cname { font-family: var(--font-display); font-size: var(--text-body-sm); color: var(--text-primary); }
.match-live { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: var(--space-6) 0; }
.match-live__title { font-family: var(--font-display); font-size: var(--text-display); color: #fff; }
.match-live__sub { font-size: var(--text-body-sm); color: var(--text-muted); margin: 0; }

/* ---------- ③ Results progressive picker ---------- */
.result { display: flex; flex-direction: column; gap: var(--space-5); }
.result__head { display: flex; align-items: center; gap: 10px; }
.result__portrait { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; object-position: top; border: 1.5px solid var(--brand-deep); }
.result__name { font-family: var(--font-name); font-size: var(--text-title); color: var(--text-primary); }

.result-picker { display: flex; flex-direction: column; gap: var(--space-5); }
.result-step { display: flex; flex-direction: column; gap: 10px; }
.result-step__title { font-family: var(--font-display); font-size: var(--text-heading); color: var(--text-primary); }

.result-cats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.result-cat {
  --tone: var(--text-secondary);
  padding: 16px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: color-mix(in srgb, var(--tone) 5%, transparent);
  color: var(--tone);
  font-family: var(--font-display); font-size: var(--text-title);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.result-cat--escaped { --tone: var(--success); }
.result-cat--died { --tone: var(--danger); }
.result-cat--void { --tone: var(--brand-light); }
.result-cat.is-selected { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 26%, transparent); }
.result-cat[disabled] { cursor: default; }
.result-cats:has(.is-selected) .result-cat:not(.is-selected) { opacity: .36; }

/* stage 2: stacks below once a category is chosen; only the chosen group shows */
@keyframes dzr-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.result-step--sub { display: none; }
.result-picker[data-cat] .result-step--sub { display: flex; animation: dzr-fade-up .25s ease both; }
.result-step--challenge { display: none; }
.result-picker:is([data-cat="escaped"],[data-cat="died"]) .result-step--challenge { display: flex; }
.result-picker[data-outcome]:not([data-cat="void"]) .result-step--challenge { display: flex; animation: dzr-fade-up .25s ease both; }
@media (prefers-reduced-motion: reduce) {
  .result-picker[data-cat] .result-step--sub,
  .result-picker[data-outcome]:not([data-cat="void"]) .result-step--challenge { animation: none; }
}
.result-sub { display: none; gap: 10px; }
.result-picker[data-cat="escaped"] .result-sub[data-sub="escaped"] { display: grid; grid-template-columns: 1fr 1fr; }
.result-picker[data-cat="died"] .result-sub[data-sub="died"] { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.result-picker[data-cat="void"] .result-sub[data-sub="void"] { display: grid; grid-template-columns: 1fr; }

.result-out {
  --tone: var(--text-secondary);
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; padding: 14px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--tone) 40%, transparent);
  background: color-mix(in srgb, var(--tone) 5%, transparent);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.result-out--escaped { --tone: var(--success); }
.result-out--died { --tone: var(--danger); }
.result-out__label { font-family: var(--font-display); font-size: var(--text-title); font-weight: var(--weight-bold); color: var(--tone); }
.result-out__pts { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-display); font-size: var(--text-title); font-weight: var(--weight-bold); color: var(--tone); white-space: nowrap; }
.result-out__pts .currency-icon { width: .8em; height: .8em; align-self: center; }
.result-out.is-selected { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 26%, transparent); }
.result-out[disabled] { cursor: default; }
.result-sub:has(.is-selected) .result-out:not(.is-selected) { opacity: .36; }

.result-refund {
  --tone: var(--brand-light);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px; border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  color: var(--tone);
}
.result-refund .result-out__pts { color: var(--success); }

/* stage 3: challenge — shown once an outcome is set (never for void) — reveal declared above */
.result-step--challenge .trial-yesno__btn { cursor: pointer; transition: opacity .15s ease, box-shadow .15s ease; }
.result-step--challenge .trial-yesno:has(.is-selected) .trial-yesno__btn:not(.is-selected) { opacity: .36; }
.result-lockin { margin-top: 4px; }

/* ---------- bingo / summary page wrappers (reuse .trial-bingo* / .trial-summary-view*) ---------- */
.bingo { display: flex; flex-direction: column; gap: 4px; }

/* ---------- pre-pay dialog (dashboard) ---------- */
.prepay { display: none; position: fixed; inset: 0; z-index: 120; align-items: center; justify-content: center; padding: var(--space-5); }
.prepay.is-open { display: flex; }
.prepay__backdrop { position: absolute; inset: 0; background: rgba(6, 4, 12, .82); backdrop-filter: blur(8px); }
.prepay__panel {
  position: relative; z-index: 1;
  width: 380px; max-width: 92vw;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  text-align: center;
  padding: var(--space-8) var(--space-6);
  background: #1a1228;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.prepay.is-busy .prepay__panel { opacity: .82; pointer-events: none; }
.prepay__title { font-family: var(--font-display); font-size: var(--text-display); color: #fff; }
.prepay__note { font-size: var(--text-body-sm); color: var(--text-muted); margin: 0; }
.prepay__wallet {
  display: flex;
  justify-content: center;
  margin: var(--space-4) 0;
  padding: 16px 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.prepay__pay-icon { width: 1em; height: 1em; vertical-align: -.15em; }
.prepay__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: var(--space-3); }

/* Narrow screens: stack the Prep halves so neither column is crushed. */
@media (max-width: 560px) {
  .prep-halves { grid-template-columns: 1fr; }
}
