/* Shared styling for sub-pages (Champions, Leaderboard, etc.). The
   landing page uses frame.css for its hero composition; sub-pages use
   a simpler vertical layout: top nav, main content with vertical
   spacing, footer. */

/* Solid background — sub-pages don't need the 3D arena set piece. */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(91, 63, 192, 0.18), transparent 60%),
    #050309;
}

.page-main {
  position: relative;
  z-index: 10;
  padding: 110px 36px 80px;
  min-height: calc(100vh - 280px);   /* leaves room for footer */
}

.page-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.back-link {
  display: block;
  width: fit-content;
  margin-bottom: 36px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 160ms ease;
}
.back-link:hover { color: var(--violet-2); }

.section-tag {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--violet-1);
  margin-bottom: 14px;
}

.page-title {
  font-family: 'Big Shoulders Display', 'Inter', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(48px, 7vw, 92px);
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: #f5f5f7;
  margin: 0 0 16px;
  text-shadow:
    0 0 24px rgba(167, 139, 250, 0.30),
    0 4px 0 rgba(0, 0, 0, 0.4);
}

.page-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  max-width: 620px;
  margin: 0 0 44px;
}

/* --- Tribes & skins --------------------------------------------------
   Champions are organized by tribe (race). Each .tribe section has a
   header + a grid of .skin-card cards. Per-skin tinting comes from
   data-skin (red / blue / gold / purple / shadow / bob-blue-yellow /
   bob-green-magenta / bob-orange-gym-boss) which maps to a violet-base
   gradient overlay tinted toward the skin color. Locked teaser tribes
   (Buns: zip / zap / munch) carry no per-skin tint — the default
   violet backdrop reads fine under the silhouette blackout.
   Locked tribes get a grayscale / dim treatment via .tribe.is-locked. */

.tribe {
  margin: 0 0 56px;
}
.tribe:last-child { margin-bottom: 0; }

.tribe-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
}
.tribe-name {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(32px, 4.5vw, 48px);
  letter-spacing: 0.03em;
  color: #f5f5f7;
  margin: 0;
  line-height: 1;
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.30);
}
.tribe-blurb {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  max-width: 580px;
}

.tribe-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
  padding: 4px 10px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  top: -6px;
}

.skin-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(14, 10, 26, 0.85), rgba(6, 4, 14, 0.95));
  border: 1px solid rgba(167, 139, 250, 0.30);
  transition: border-color 200ms ease, transform 220ms ease, box-shadow 220ms ease;
}
.skin-card:hover {
  border-color: rgba(167, 139, 250, 0.75);
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(167, 139, 250, 0.20),
    0 14px 28px rgba(0, 0, 0, 0.55);
}

/* Per-skin backdrop tints — color matches the skin's in-game accent.
   The portrait <img> itself is the real per-variant render fetched
   from claw-activity (lobster colors are baked into the artwork; no
   CSS filter needed). The tint is just a soft color-themed glow
   behind the character. */
.skin-card[data-skin="red"]    .skin-portrait { --tint: rgba(239,  68,  68, 0.45); }
.skin-card[data-skin="blue"]   .skin-portrait { --tint: rgba( 59, 130, 246, 0.45); }
.skin-card[data-skin="gold"]   .skin-portrait { --tint: rgba(234, 179,   8, 0.45); }
.skin-card[data-skin="purple"] .skin-portrait { --tint: rgba(168,  85, 247, 0.50); }
.skin-card[data-skin="shadow"] .skin-portrait { --tint: rgba( 80,  60, 110, 0.55); }
/* Bob tribe — accent tints match each Bob's in-game accent color. */
.skin-card[data-skin="bob-blue-yellow"]    .skin-portrait { --tint: rgba(247, 183,  51, 0.45); }
.skin-card[data-skin="bob-green-magenta"]  .skin-portrait { --tint: rgba(255,  79, 216, 0.45); }
.skin-card[data-skin="bob-orange-gym-boss"] .skin-portrait { --tint: rgba(255, 122,  26, 0.45); }

.skin-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, var(--tint, rgba(167, 139, 250, 0.30)), transparent 70%),
    linear-gradient(180deg, #1a1226, #0a0613);
  border: 1px solid rgba(167, 139, 250, 0.20);
  margin-bottom: 12px;
  overflow: hidden;
}
.skin-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Silhouette portraits (Buns + Skrumpets locked tribes). Real
   character PNGs blacked out via brightness(0) so the fighter SHAPE is
   preserved but no detail leaks — Buns (zip / zap / munch) from the
   bun-chaos sprite sheets, Skrumpets (scrumpet-blue / -berry / -skeleton)
   rendered front-on from the idle USDZ models. See scripts-build/. Backdrop
   is slightly lifted so the silhouette outline reads against it. */
.skin-portrait--silhouette {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(167, 139, 250, 0.22), transparent 75%),
    linear-gradient(180deg, #281e3a, #0e0820);
}
.skin-portrait--silhouette img {
  filter: brightness(0);
  /* contrast bump optional but helps thin features (bunny ears) read */
  filter: brightness(0) contrast(1.1);
}

.skin-name {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #f5f5f7;
  margin: 0 0 4px;
  line-height: 1;
}
.skin-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* --- Locked tribe state ---------------------------------------------
   The silhouette portraits already convey "locked", so we don't apply
   a heavy grayscale filter that would darken them further. Just a
   diagonal LOCKED stamp on each card and a not-allowed cursor.
   Unlock by removing .is-locked from the tribe element. */
.tribe.is-locked {
  position: relative;
}
.tribe.is-locked .skin-card {
  cursor: not-allowed;
}
.tribe.is-locked .skin-card:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(167, 139, 250, 0.30);
}
.tribe.is-locked .skin-name,
.tribe.is-locked .skin-tagline {
  color: rgba(255, 255, 255, 0.55);
}
.tribe.is-locked .skin-card::after {
  content: 'LOCKED';
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  z-index: 2;
}

/* --- Leaderboard ------------------------------------------------------ */

.lb-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.lb-meta-cell {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: rgba(14, 10, 26, 0.65);
  border: 1px solid rgba(167, 139, 250, 0.22);
}
.lb-meta-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}
.lb-meta-value {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: #f5f5f7;
  letter-spacing: 0.04em;
  line-height: 1;
}

.lb-table-wrap {
  background: rgba(14, 10, 26, 0.60);
  border: 1px solid rgba(167, 139, 250, 0.22);
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
}
.lb-table thead th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-1);
  border-bottom: 1px solid rgba(167, 139, 250, 0.30);
  background: rgba(167, 139, 250, 0.05);
}
.lb-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 160ms ease;
}
.lb-table tbody tr:hover {
  background: rgba(167, 139, 250, 0.06);
}
.lb-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}
.lb-table .lb-rank { width: 64px; font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-style: italic; font-size: 18px; color: var(--violet-2); }
.lb-table .lb-trader { font-weight: 600; color: #fff; }
.lb-table .lb-champ { color: rgba(255, 255, 255, 0.65); }
.lb-table .lb-record { color: rgba(255, 255, 255, 0.55); }
.lb-table .lb-elo { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 17px; color: #f5f5f7; }

.lb-empty {
  display: none;
  padding: 38px 24px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

/* --- How to Play walkthrough ----------------------------------------
   Single-stage walkthrough with auto-advancing steps. .wt is the
   container, .wt-stage holds all 6 step panels stacked on top of
   each other; only the .wt-step.is-active panel is visible. The JS
   in how-to-play.html handles step rotation; CSS handles the
   per-step animations triggered by .is-active. */

.wt {
  position: relative;
  margin: 0 0 56px;
  background: linear-gradient(180deg, rgba(14, 10, 26, 0.85), rgba(6, 4, 14, 0.95));
  border: 1px solid rgba(167, 139, 250, 0.30);
  overflow: hidden;
}
.wt-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(167, 139, 250, 0.10);
  z-index: 4;
  pointer-events: none;
}
.wt-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #a78bfa, #fff);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.7);
}

.wt-stage {
  position: relative;
  /* Fixed-ish height so the stage doesn't reflow on step swap and the
     progress bar / nav stay anchored. */
  min-height: 480px;
}
.wt-step {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 36px 36px 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 420ms ease,
    transform 420ms cubic-bezier(.2, .8, .2, 1),
    visibility 0s linear 420ms;
}
.wt-step.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 480ms ease,
    transform 480ms cubic-bezier(.2, .8, .2, 1),
    visibility 0s linear 0s;
  z-index: 2;
}

.wt-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 4, 14, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.20);
  overflow: hidden;
  min-height: 320px;
}
.wt-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.wt-num {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.32em;
  color: rgba(167, 139, 250, 0.85);
}
.wt-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: #f5f5f7;
  margin: 0;
}
.wt-title .ticker {
  color: var(--violet-1);
  text-shadow: 0 0 14px rgba(167, 139, 250, 0.55);
}
.wt-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 460px;
}
.rule-tag {
  display: inline-block;
  padding: 1px 8px;
  font-weight: 700;
  letter-spacing: 0.10em;
  font-size: 12px;
  border: 1px solid currentColor;
  vertical-align: 1px;
}
.rule-tag--long  { color: #34d399; }
.rule-tag--short { color: var(--violet-1); }
.rule-tag--close { color: var(--violet-2); }

/* --- Walkthrough nav ------------------------------------------------- */
.wt-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  z-index: 5;
}
.wt-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.40);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.wt-arrow:hover {
  background: rgba(167, 139, 250, 0.15);
  color: #fff;
  border-color: rgba(167, 139, 250, 0.85);
}
.wt-dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.wt-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(167, 139, 250, 0.30);
  color: rgba(255, 255, 255, 0.50);
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.10em;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.wt-dot:hover { color: #fff; border-color: rgba(167, 139, 250, 0.65); }
.wt-dot.is-active {
  color: #fff;
  background: rgba(167, 139, 250, 0.22);
  border-color: rgba(167, 139, 250, 0.85);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
}

/* --- Per-step visuals + animations ----------------------------------- */

/* 01 — chart */
.wt-visual--chart {
  padding: 12px;
}
.wt-visual--chart .tradingview-widget-container,
.wt-visual--chart .tradingview-widget-container__widget {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

/* 02 — long / short — two big trade-action button mocks. No avatars;
   the buttons are the UI primitive the game actually shows. */
.wt-visual--longshort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 24px;
}
.ls-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 14px 18px;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid currentColor;
  cursor: default;
  pointer-events: none;
  transition: transform 200ms ease;
}
.ls-btn--long  { color: #34d399; }
.ls-btn--short { color: #a78bfa; }
.ls-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 10px currentColor);
}
.ls-btn-label {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: 0.06em;
  color: #fff;
}
.ls-btn-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: currentColor;
}

/* Pulse the LONG glow on the first half of the cycle, SHORT on the
   second — visually says "you can pick either side". LONG = green
   (up = profit), SHORT = brand violet (matches the rest of the
   palette; trading red felt off against the rest of the page). */
@keyframes ls-pulse-long {
  0%, 49%, 100% { box-shadow: 0 0 0 rgba(52, 211, 153, 0); transform: translateY(0); }
  20%, 32%      { box-shadow: 0 0 28px rgba(52, 211, 153, 0.55), inset 0 0 28px rgba(52, 211, 153, 0.20); transform: translateY(-2px); }
}
@keyframes ls-pulse-short {
  0%, 49%, 100% { box-shadow: 0 0 0 rgba(167, 139, 250, 0); transform: translateY(0); }
  70%, 82%      { box-shadow: 0 0 28px rgba(167, 139, 250, 0.65), inset 0 0 28px rgba(167, 139, 250, 0.22); transform: translateY(-2px); }
}
.wt-step.is-active .ls-btn--long  { animation: ls-pulse-long  2.6s ease-in-out infinite; }
.wt-step.is-active .ls-btn--short { animation: ls-pulse-short 2.6s ease-in-out infinite; }

/* 03 — multiplier gauge */
.wt-visual--gauge { padding: 24px; }
.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.gauge-value {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(56px, 7vw, 84px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: #f5f5f7;
}
.gauge-value strong {
  color: var(--violet-1);
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.55);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 1.6ch;
  text-align: left;
}
.gauge-bar {
  width: 86%;
  max-width: 320px;
  height: 10px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  position: relative;
  overflow: hidden;
}
.gauge-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a78bfa, #c4b5fd, #fff);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}
.wt-step.is-active .gauge-bar > span { width: 68%; }
.gauge-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* 04 — close button + cursor */
.wt-visual--close {
  padding: 24px;
}
.close-btn {
  position: relative;
  padding: 18px 32px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.20em;
  color: #fff;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.22), rgba(91, 63, 192, 0.22));
  border: 1px solid rgba(167, 139, 250, 0.75);
  box-shadow:
    0 0 22px rgba(167, 139, 250, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  pointer-events: none;
  cursor: default;
  text-align: center;
}
.close-btn-label { display: block; }
.close-btn-pnl {
  display: block;
  margin-top: 10px;
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
}
.close-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  opacity: 0;
}
@keyframes close-press {
  0%, 100% { transform: translateY(0) scale(1);    box-shadow: 0 0 22px rgba(167, 139, 250, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.10); }
  50%      { transform: translateY(2px) scale(.98); box-shadow: 0 0 36px rgba(167, 139, 250, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
}
@keyframes close-cursor-tap {
  0%   { opacity: 0; transform: translate(120px, -120px) scale(1.4); }
  40%  { opacity: 1; transform: translate( 30px,  -40px) scale(1.0); }
  55%  { opacity: 1; transform: translate( 10px,    0px) scale(0.7); }
  62%  { opacity: 0; transform: translate( 10px,    0px) scale(2.0); }
  100% { opacity: 0; transform: translate( 10px,    0px) scale(2.0); }
}
.wt-step.is-active .close-btn   { animation: close-press 2.6s ease-in-out infinite 0.2s; }
.wt-step.is-active .close-cursor {
  animation: close-cursor-tap 2.6s ease-in-out infinite 0.0s;
  top: 50%;
  left: 50%;
}

/* 05 — health bars */
.wt-visual--healthbars {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  width: 100%;
}
.hb-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 14px;
}
.hb-row img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: rgba(167, 139, 250, 0.10);
  border: 1px solid rgba(167, 139, 250, 0.30);
}
.hb-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hb-name {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.hb-bar {
  height: 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.20);
  position: relative;
  overflow: hidden;
}
.hb-bar > span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444, #fca5a5);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  transition: width 1.4s cubic-bezier(.4, 0, .15, 1);
}
.hb-bar--player > span {
  background: linear-gradient(90deg, #34d399, #6ee7b7);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}
/* When step is active, drop the enemy bar to its target width and the
   player bar to its (lighter) target. */
.wt-step.is-active .hb-row--enemy  .hb-bar > span { width: 38%; }
.wt-step.is-active .hb-row--player .hb-bar > span { width: 84%; }
@keyframes hb-flash {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
  20%      { box-shadow: 0 0 28px rgba(239, 68, 68, 1.0); }
}
.wt-step.is-active .hb-row--enemy .hb-bar > span {
  animation: hb-flash 1.5s ease-out 0.4s 1;
}

/* 06 — round + timer */
.wt-visual--match {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 20px;
}
.round-track {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.round-pip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.45);
}
.round-pip.is-active {
  color: #fff;
  background: rgba(167, 139, 250, 0.20);
  border-color: rgba(167, 139, 250, 0.85);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
}
.round-pip.is-won {
  color: #fff;
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.75);
}
@keyframes round-pip-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(167, 139, 250, 0.45); }
  50%      { box-shadow: 0 0 24px rgba(167, 139, 250, 0.95); }
}
.wt-step.is-active .round-pip.is-active { animation: round-pip-pulse 1.8s ease-in-out infinite; }

.round-timer {
  position: relative;
  width: 110px;
  height: 110px;
}
.round-timer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Center the "32s" pair using absolute positioning + a transform-based
   center, then baseline-align the digit and the "s" so they line up
   typographically (digit's baseline matches "s"'s baseline) without
   any vertical offset. The 52% top is a slight downward optical shift
   to compensate for the italic display digit's visual weight sitting
   above the geometric centerline. */
.round-timer-text {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
  line-height: 1;
}
.round-timer-text strong {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 34px;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.round-timer-suffix {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
  margin-left: 2px;
}
/* Sweep the SVG arc as the timer counts down (via stroke-dashoffset) */
@keyframes round-arc-sweep {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 263.9; }
}
.wt-step.is-active .round-timer-arc {
  animation: round-arc-sweep 4.2s linear forwards;
}

/* Bottom CTA — App Store badge → TestFlight (the only working CTA;
   the live arena is in the iOS app, not on the web). */
.howto-cta {
  margin-top: 56px;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid rgba(167, 139, 250, 0.20);
}
.howto-cta-line {
  font-family: 'Big Shoulders Display', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
  color: #f5f5f7;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.howto-cta-badge {
  display: inline-block;
  transition: transform 200ms ease, filter 200ms ease;
  filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.35));
}
.howto-cta-badge img {
  display: block;
  height: 56px;
  width: auto;
}
.howto-cta-badge:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.65));
}
.howto-cta-note {
  margin: 12px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* --- Mobile ----------------------------------------------------------- */
@media (max-width: 768px) {
  .page-main { padding: 90px 16px 60px; }
  .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .skin-card { padding: 10px; }
  .skin-name { font-size: 19px; }
  .skin-tagline { font-size: 11px; }
  .tribe-name { font-size: clamp(28px, 7vw, 38px); }
  .tribe-blurb { font-size: 13px; }
  .lb-table th, .lb-table td { padding: 11px 12px; font-size: 12px; }
  .lb-table .lb-rank { width: 44px; font-size: 16px; }

  /* Walkthrough: stack visual above copy. Stage gets a bit taller to
     accommodate the vertical layout. */
  .wt-stage { min-height: 620px; }
  .wt-step {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
    padding: 24px 20px 20px;
  }
  .wt-visual { min-height: 240px; }
  .wt-title { font-size: clamp(24px, 6.4vw, 32px); }
  .wt-text  { font-size: 14px; }
  .wt-nav { padding: 12px 14px; gap: 10px; }
  .wt-dots { gap: 4px; }
  .wt-dot  { min-width: 32px; padding: 5px 8px; font-size: 11px; }
}
@media (max-width: 540px) {
  .wt-stage { min-height: 560px; }
  .wt-visual--match { gap: 22px; }
  .ls-side img { max-width: 110px; }
  .gauge-value { font-size: 48px; }
  .close-btn { padding: 14px 22px; font-size: 12px; }
  .close-btn-pnl { font-size: 18px; }
}
@media (max-width: 420px) {
  .skin-grid { grid-template-columns: 1fr; gap: 12px; }
}
