/* EloTracker World Chess Championship Hubs — world-champ-v3.css */
.wch-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  color: #0f172a;
}
.dark .wch-page { color: #f1f5f9; }

.wch-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}
.dark .wch-topbar { color: #94a3b8; }
.wch-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.wch-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
.dark .wch-breadcrumb a { color: #60a5fa; }
.wch-breadcrumb a:hover { text-decoration: underline; }

.wch-cycle-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.wch-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.dark .wch-nav-pill {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.wch-nav-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.dark .wch-nav-pill:hover {
  border-color: #60a5fa;
  color: #93c5fd;
}

/* Status pills */
.wch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.wch-pill-live {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.38);
}
.dark .wch-pill-live {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.wch-pill-ongoing {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.dark .wch-pill-ongoing {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}
.wch-pill-upcoming {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.32);
}
.dark .wch-pill-upcoming {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}
.wch-pill-era {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.dark .wch-pill-era {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}
.wch-pill-gold {
  background: rgba(234, 179, 8, 0.16);
  color: #a16207;
  border: 1px solid rgba(234, 179, 8, 0.38);
}
.dark .wch-pill-gold {
  background: rgba(234, 179, 8, 0.18);
  color: #fde047;
}
.wch-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: wchPulse 1.6s infinite;
}
@keyframes wchPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero card */
.wch-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbe3eb;
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.dark .wch-hero {
  background: linear-gradient(135deg, #1e293b 0%, #111827 100%);
  border-color: #334155;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.wch-hero-live {
  border-color: rgba(16, 185, 129, 0.45);
}
.wch-hero-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.wch-hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.wch-title {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.wch-subtitle {
  font-size: 0.92rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
.dark .wch-subtitle { color: #94a3b8; }

.wch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.wch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.dark .wch-btn {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.wch-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.dark .wch-btn:hover {
  border-color: #60a5fa;
  color: #93c5fd;
}
.wch-btn-primary {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.wch-btn-primary:hover {
  background: #047857;
  border-color: #047857;
  color: #ffffff;
}
.wch-btn-blue {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.wch-btn-blue:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Scoreboard */
.wch-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 0.9rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.dark .wch-scoreboard {
  background: rgba(15, 23, 42, 0.7);
  border-color: #334155;
}
.wch-player-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.wch-player-card.is-right {
  text-align: right;
  align-items: flex-end;
}
.wch-player-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.wch-player-card.is-right .wch-player-name-row {
  justify-content: flex-end;
}
.wch-player-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}
.wch-player-name:hover {
  color: #2563eb;
  text-decoration: underline;
}
.dark .wch-player-name:hover { color: #60a5fa; }
.wch-player-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.dark .wch-player-meta { color: #94a3b8; }
.wch-player-card.is-right .wch-player-meta {
  justify-content: flex-end;
}
.wch-winner-crown {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
}
.dark .wch-winner-crown {
  background: rgba(234, 179, 8, 0.22);
  color: #fde047;
}
.wch-score-center {
  text-align: center;
  padding: 0.45rem 1rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dbe3eb;
  min-width: 112px;
}
.dark .wch-score-center {
  background: #1e293b;
  border-color: #475569;
}
.wch-score-big {
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}
.wch-score-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.15rem;
}
.dark .wch-score-sub { color: #94a3b8; }

/* Round progression strip */
.wch-prog-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
}
.wch-prog-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.25rem;
}
.dark .wch-prog-label { color: #94a3b8; }
.wch-rd-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.1s, box-shadow 0.12s;
}
.wch-rd-chip:hover { transform: translateY(-1px); }
.wch-rd-win { background: rgba(16, 185, 129, 0.18); color: #047857; border-color: rgba(16, 185, 129, 0.35); }
.dark .wch-rd-win { background: rgba(16, 185, 129, 0.22); color: #34d399; }
.wch-rd-loss { background: rgba(239, 68, 68, 0.14); color: #b91c1c; border-color: rgba(239, 68, 68, 0.3); }
.dark .wch-rd-loss { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.wch-rd-draw { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }
.dark .wch-rd-draw { background: #334155; color: #cbd5e1; border-color: #475569; }
.wch-rd-live { background: #059669; color: #ffffff; border-color: #047857; }
.wch-rd-empty { background: transparent; color: #94a3b8; border-color: #cbd5e1; border-style: dashed; }
.dark .wch-rd-empty { border-color: #475569; color: #64748b; }

/* =========================================================================
   Interactive Match Stage (v3 — Game Switcher + Board + 2-Col Move Sheet)
   ========================================================================= */
.wch-live-stage {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 16px;
  padding: 1rem 1.25rem 1.2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.wch-live-stage.is-archive {
  border-color: #dbe3eb;
}
.dark .wch-live-stage {
  background: #1e293b;
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}
.dark .wch-live-stage.is-archive {
  border-color: #334155;
}

/* Stage Top Bar: Game Switcher + Next Game Countdown */
.wch-stage-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid #e2e8f0;
}
.dark .wch-stage-topbar {
  border-color: #334155;
}
.wch-stage-switcher {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
  max-width: 100%;
  flex: 1 1 auto;
}
.wch-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.62rem;
  border-radius: 8px;
  border: 1px solid #dbe3eb;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dark .wch-stage-pill {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
.wch-stage-pill:hover {
  border-color: #059669;
  color: #047857;
}
.dark .wch-stage-pill:hover {
  border-color: #34d399;
  color: #6ee7b7;
}
.wch-stage-pill.is-active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.wch-stage-pill.is-live:not(.is-active) {
  border-color: rgba(16, 185, 129, 0.55);
  color: #047857;
}
.dark .wch-stage-pill.is-live:not(.is-active) {
  color: #34d399;
}
.wch-sp-res {
  font-weight: 600;
  opacity: 0.85;
  font-size: 0.72rem;
}
.wch-stage-pill.is-active .wch-sp-res {
  opacity: 0.95;
}
.wch-stage-next {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-variant-numeric: tabular-nums;
}
.dark .wch-stage-next {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}
.wch-stage-next strong {
  color: #0f172a;
}
.dark .wch-stage-next strong {
  color: #f1f5f9;
}

/* 2-Column Studio Body — Matched Height */
.wch-stage-body {
  display: grid;
  grid-template-columns: minmax(0, 444px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.wch-board-wrap {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  max-width: 444px;
  width: 100%;
  margin: 0 auto;
}
.wch-board-wrap.no-eval {
  grid-template-columns: minmax(0, 1fr);
  max-width: 412px;
}
.wch-eval-bar {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid #475569;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.wch-eval-bar.is-flipped {
  justify-content: flex-start;
}
.wch-eval-fill {
  width: 100%;
  background: #f8fafc;
  transition: height 0.28s ease;
  height: 50%;
}
.wch-eval-label {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 1px;
  z-index: 2;
  color: #f8fafc;
  top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.wch-eval-label.is-white-adv {
  top: auto;
  bottom: 2px;
  color: #0f172a;
  text-shadow: none;
}
.wch-eval-bar.is-flipped .wch-eval-label {
  top: auto;
  bottom: 2px;
}
.wch-eval-bar.is-flipped .wch-eval-label.is-white-adv {
  top: 2px;
  bottom: auto;
}

.wch-board-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wch-board-mount {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  outline: none;
}
.wch-board-mount:focus-visible {
  box-shadow: 0 0 0 2.5px rgba(5, 150, 105, 0.55);
}
.dark .wch-board-mount { border-color: #475569; }
/* Last-move square highlight inside EloBoard */
.wch-board-mount [data-square].viewer-last-move {
  box-shadow: inset 0 0 0 999px rgba(245, 158, 11, 0.36);
}

.wch-clock-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.34rem 0.65rem;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 32px;
}
.dark .wch-clock-bar { background: #0f172a; }
.wch-clock-bar.is-turn {
  box-shadow: inset 0 0 0 1.5px #10b981;
}
.wch-clock-player {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}
.wch-clock-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wch-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.wch-color-dot.is-white {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
}
.wch-color-dot.is-black {
  background: #1e293b;
  border: 1.5px solid #64748b;
}
.wch-clock-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.48rem;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.dark .wch-clock-time {
  background: #1e293b;
  color: #f8fafc;
}

/* Right Studio Side Panel */
.wch-live-side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
}
.wch-stage-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.wch-stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #059669;
}
.dark .wch-stage-eyebrow { color: #34d399; }
.wch-stage-opening {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}
.dark .wch-stage-opening { color: #f8fafc; }

/* Key Moments (Turning Points) */
.wch-key-moments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.wch-km-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 0.1rem;
}
.dark .wch-km-label { color: #94a3b8; }
.wch-km-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid #fca5a5;
  background: rgba(239, 68, 68, 0.09);
  color: #b91c1c;
  cursor: pointer;
  transition: transform 0.1s, background 0.12s;
}
.wch-km-chip:hover {
  transform: translateY(-1px);
  background: rgba(239, 68, 68, 0.16);
}
.dark .wch-km-chip {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.wch-km-chip.is-good {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.dark .wch-km-chip.is-good {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
.wch-km-chip.is-mistake {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
.dark .wch-km-chip.is-mistake {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
.wch-km-eval {
  font-size: 0.68rem;
  opacity: 0.85;
}

.wch-wdl-bar {
  display: flex;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.dark .wch-wdl-bar { border-color: #475569; }
.wch-wdl-w { background: #f8fafc; }
.wch-wdl-d { background: #94a3b8; }
.wch-wdl-b { background: #1e293b; }
.wch-wdl-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
}
.dark .wch-wdl-legend { color: #94a3b8; }

/* Structured 2-Column Interactive Move Sheet */
.wch-live-moves {
  flex: 1 1 250px;
  min-height: 220px;
  max-height: 315px;
  overflow-y: auto;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  scrollbar-width: thin;
}
.dark .wch-live-moves {
  background: #0f172a;
  border-color: #334155;
}
.wch-moves-loading {
  padding: 1.25rem;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
}
.wch-move-grid {
  display: flex;
  flex-direction: column;
}
.wch-move-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.55);
}
.dark .wch-move-row {
  border-color: rgba(51, 65, 85, 0.45);
}
.wch-move-row:nth-child(even) {
  background: rgba(148, 163, 184, 0.06);
}
.wch-move-num {
  text-align: right;
  padding: 0.28rem 0.5rem 0.28rem 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  user-select: none;
}
.wch-move-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.dark .wch-move-btn {
  color: #e2e8f0;
}
.wch-move-btn:hover {
  background: rgba(37, 99, 235, 0.1);
}
.dark .wch-move-btn:hover {
  background: rgba(59, 130, 246, 0.16);
}
.wch-move-btn.is-active {
  background: #059669;
  color: #ffffff;
}
.wch-move-san {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}
.wch-move-ev {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.dark .wch-move-ev { color: #94a3b8; }
.wch-move-btn.is-active .wch-move-ev {
  color: rgba(255, 255, 255, 0.88);
}
.wch-nag {
  display: inline-block;
  padding: 0 0.28rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35;
}
.wch-nag-blunder { background: rgba(239, 68, 68, 0.18); color: #dc2626; }
.wch-nag-mistake { background: rgba(245, 158, 11, 0.2); color: #d97706; }
.wch-nag-inacc { background: rgba(234, 179, 8, 0.16); color: #a16207; }
.wch-nag-good { background: rgba(16, 185, 129, 0.18); color: #059669; }
.dark .wch-nag-blunder { background: rgba(239, 68, 68, 0.28); color: #fca5a5; }
.dark .wch-nag-mistake { background: rgba(245, 158, 11, 0.28); color: #fcd34d; }
.dark .wch-nag-inacc { background: rgba(234, 179, 8, 0.24); color: #fde047; }
.dark .wch-nag-good { background: rgba(16, 185, 129, 0.26); color: #6ee7b7; }
.wch-move-btn.is-active .wch-nag {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}
.wch-move-result {
  text-align: center;
  padding: 0.42rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #475569;
  background: rgba(148, 163, 184, 0.08);
}
.dark .wch-move-result { color: #cbd5e1; }

/* Unified Board Transport Toolbar */
.wch-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.38rem 0.45rem;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.dark .wch-transport {
  background: #0f172a;
  border-color: #334155;
}
.wch-transport-group,
.wch-transport-right {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.wch-tbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 36px;
  height: 34px;
  padding: 0 0.5rem;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dark .wch-tbtn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.wch-tbtn:hover:not(:disabled) {
  border-color: #059669;
  color: #047857;
}
.dark .wch-tbtn:hover:not(:disabled) {
  border-color: #34d399;
  color: #6ee7b7;
}
.wch-tbtn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.wch-tbtn-play.is-playing {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.wch-tbtn-text {
  padding: 0 0.65rem;
  font-size: 0.78rem;
}
.wch-tbtn-live {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  padding: 0 0.62rem;
  font-size: 0.76rem;
}
.wch-tbtn-live .wch-live-dot {
  background: #ffffff;
}
.wch-kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0.15rem;
}
.wch-kbd-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}
.dark .wch-kbd-hint kbd {
  background: #1e293b;
  border-color: #475569;
  color: #94a3b8;
}
@media (hover: none) {
  .wch-kbd-hint { display: none; }
}

/* Stage Footer */
.wch-stage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.15rem;
}
.wch-ply-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.dark .wch-ply-status { color: #94a3b8; }
.wch-studio-cta {
  padding: 0.5rem 0.92rem;
  font-size: 0.82rem;
}

/* Inline table preview button */
.wch-op-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.wch-row-play {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dark .wch-row-play {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
.wch-row-play:hover {
  border-color: #059669;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.dark .wch-row-play:hover {
  border-color: #34d399;
  color: #6ee7b7;
}

/* KPI Grid */
.wch-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.wch-kpi {
  background: #ffffff;
  border: 1px solid #dbe3eb;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.dark .wch-kpi {
  background: #1e293b;
  border-color: #334155;
}
.wch-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.dark .wch-kpi-label { color: #94a3b8; }
.wch-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.wch-kpi-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}
.dark .wch-kpi-sub { color: #94a3b8; }

/* Sections & Cards */
.wch-card {
  background: #ffffff;
  border: 1px solid #dbe3eb;
  border-radius: 14px;
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.25rem;
}
.dark .wch-card {
  background: #1e293b;
  border-color: #334155;
}
.wch-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.wch-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0;
}
.wch-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

/* Filter bar & tabs */
.wch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.wch-tab {
  padding: 0.36rem 0.78rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: transparent;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.dark .wch-tab {
  border-color: #475569;
  color: #cbd5e1;
}
.wch-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.wch-search-input {
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.85rem;
  min-width: 210px;
}
.dark .wch-search-input {
  background: #0f172a;
  border-color: #475569;
  color: #f1f5f9;
}

/* Tables */
.wch-table-wrap {
  overflow-x: auto;
}
.wch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.wch-table th {
  text-align: left;
  padding: 0.6rem 0.65rem;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.dark .wch-table th {
  color: #94a3b8;
  border-color: #334155;
}
.wch-table td {
  padding: 0.62rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.dark .wch-table td {
  border-color: rgba(51, 65, 85, 0.55);
}
.wch-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}
.dark .wch-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}
.wch-table a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}
.dark .wch-table a { color: #93c5fd; }
.wch-table a:hover { text-decoration: underline; }

.wch-res-badge {
  display: inline-block;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: #f1f5f9;
  color: #0f172a;
}
.dark .wch-res-badge {
  background: #334155;
  color: #f8fafc;
}
.wch-res-badge.is-live {
  background: #059669;
  color: #ffffff;
}
.wch-eco-pill {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  margin-right: 0.35rem;
}
.dark .wch-eco-pill {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

/* Stacked outcome bar & Opening bars */
.wch-outcome-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  margin: 0.4rem 0 0.55rem;
}
.wch-ob-w { background: #3b82f6; }
.wch-ob-d { background: #94a3b8; }
.wch-ob-b { background: #0f172a; }
.dark .wch-ob-b { background: #f59e0b; }

.wch-stat-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.wch-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.86rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed #e2e8f0;
}
.dark .wch-stat-row { border-color: #334155; }
.wch-stat-row:last-child { border-bottom: 0; padding-bottom: 0; }

/* Champions Grid on Index */
.wch-champs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.7rem;
}
.wch-champ-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.12s;
}
.dark .wch-champ-tile {
  background: #0f172a;
  border-color: #334155;
}
.wch-champ-tile:hover {
  border-color: #2563eb;
  transform: translateY(-1px);
}
.wch-champ-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: #d97706;
}
.dark .wch-champ-num { color: #fbbf24; }
.wch-champ-name {
  font-size: 0.92rem;
  font-weight: 700;
}
.wch-champ-reign {
  font-size: 0.78rem;
  color: #64748b;
}
.dark .wch-champ-reign { color: #94a3b8; }

/* FAQ */
.wch-faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 0;
}
.dark .wch-faq-item { border-color: #334155; }
.wch-faq-item:last-child { border-bottom: 0; }
.wch-faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.94rem;
  list-style: none;
}
.wch-faq-item p {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
}
.dark .wch-faq-item p { color: #cbd5e1; }

.wch-flag-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Split-match jump bar */
.wch-split-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .wch-stage-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .wch-live-moves {
    max-height: 230px;
    min-height: 170px;
  }
  .wch-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wch-2col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .wch-page { padding: 0.9rem 0.7rem 2.25rem; }
  .wch-hero { padding: 1.1rem 1rem; }
  .wch-live-stage { padding: 0.85rem 0.85rem 1rem; }
  .wch-tbtn {
    min-width: 40px;
    height: 40px;
  }
  .wch-scoreboard {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
    gap: 0.65rem;
  }
  .wch-player-card.is-right {
    text-align: left;
    align-items: flex-start;
  }
  .wch-player-card.is-right .wch-player-name-row,
  .wch-player-card.is-right .wch-player-meta {
    justify-content: flex-start;
  }
  .wch-score-center {
    width: fit-content;
  }
  .wch-col-hide-sm {
    display: none;
  }
  .wch-search-input {
    width: 100%;
    min-width: 0;
  }
  .wch-row-play {
    display: none;
  }
}
