:root {
  --crystal-rose: #d4a0b0;
  --crystal-blush: #e8c4cf;
  --crystal-silver: #c8c0d0;
  --slate-950: #0f0d15;
  --slate-900: #16131f;
  --slate-800: #1e1a2a;
  --slate-700: #2a2538;
  --slate-600: #3d3652;
  --slate-400: #7b728f;
  --slate-300: #a099b4;
  --slate-200: #c8c2d8;
  --slate-100: #e8e4f0;
  --slate-50: #f5f3fa;
  --paper: #f2f0ec;
  --warm-white: #faf8f5;
  --cyan: #40e0d0;
  --blue: #7b8fe8;
  --verdant: #6caa5c;
  --solar: #e8c84a;
  --board-light: #e7dfd3;
  --board-dark: #766c80;
  --danger: #e56b6f;
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: var(--slate-950);
  color: var(--slate-100);
  font-family: Inter, system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(120deg, rgba(212, 160, 176, 0.13), transparent 32%),
    linear-gradient(240deg, rgba(64, 224, 208, 0.09), transparent 36%),
    var(--slate-950);
}

.lab {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(410px, 1fr) minmax(280px, 360px);
  grid-template-rows: 72px 1fr;
  gap: 14px;
  height: 100vh;
  padding: 16px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 6px;
}

.wordmark {
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-decoration: none;
}

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

.experiment-id span,
.panel-heading span,
.panel-subhead span,
.metric-row span,
.bar-row span,
.evidence-box span,
.config-kicker,
.method-drawer span {
  color: var(--crystal-rose);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.experiment-id strong {
  color: var(--slate-200);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.icon-button,
.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--slate-100);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button {
  margin-left: auto;
}

.icon-button:hover,
.control:hover {
  border-color: rgba(212, 160, 176, 0.52);
  background: rgba(212, 160, 176, 0.12);
  transform: translateY(-1px);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.panel,
.match-stage {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(22, 19, 31, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
}

.panel-heading,
.panel-subhead {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-heading strong {
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.55rem, 2.1vw, 2.2rem);
  font-weight: 400;
  line-height: 1.02;
}

.brain-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(212, 160, 176, 0.18), transparent 42%),
    rgba(15, 13, 21, 0.7);
}

#brainCanvas {
  display: block;
  width: 100%;
  height: min(31vh, 310px);
}

.source-summary {
  display: grid;
  gap: 10px;
  min-height: 188px;
  padding: 22px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(64, 224, 208, 0.08), transparent 42%),
    linear-gradient(240deg, rgba(212, 160, 176, 0.08), transparent 46%);
}

.source-summary span {
  color: var(--crystal-rose);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.source-summary strong {
  max-width: 26ch;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.02rem, 1.25vw, 1.22rem);
  line-height: 1.22;
}

.source-summary p {
  max-width: 30ch;
  margin: 0;
  color: var(--slate-300);
  font-size: 0.82rem;
  line-height: 1.5;
}

.brain-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.brain-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brain-meta div:last-child {
  border-right: 0;
}

.brain-meta span {
  color: var(--slate-400);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brain-meta strong {
  color: var(--slate-100);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  font-weight: 600;
  white-space: nowrap;
}

.metric-stack {
  display: grid;
  gap: 8px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.metric-row strong {
  color: var(--slate-50);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.95rem;
  font-weight: 400;
  line-height: 0.85;
}

.metric-row small {
  grid-column: 1 / -1;
  color: var(--slate-300);
  line-height: 1.45;
}

.match-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
}

.score-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.player-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 46%) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  min-height: 162px;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.player-card.is-thinking {
  border-color: rgba(64, 224, 208, 0.58);
  background: rgba(64, 224, 208, 0.065);
  box-shadow: inset 0 0 0 1px rgba(64, 224, 208, 0.14), 0 0 34px rgba(64, 224, 208, 0.1);
}

.ai-card.is-thinking {
  border-color: rgba(212, 160, 176, 0.58);
  background: rgba(212, 160, 176, 0.075);
  box-shadow: inset 0 0 0 1px rgba(212, 160, 176, 0.13), 0 0 34px rgba(212, 160, 176, 0.1);
}

.duel-visual {
  position: relative;
  height: 138px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(15, 13, 21, 0.55);
}

.duel-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.duel-icon {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 58px;
  height: 58px;
  object-fit: contain;
  opacity: 0.86;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.robot-icon {
  filter:
    brightness(0) saturate(100%)
    invert(87%) sepia(12%) saturate(691%) hue-rotate(295deg) brightness(94%) contrast(94%)
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.fly-icon {
  filter:
    brightness(0) saturate(100%)
    invert(79%) sepia(58%) saturate(505%) hue-rotate(122deg) brightness(95%) contrast(88%)
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.duel-copy {
  min-width: 0;
}

.duel-copy span {
  color: var(--slate-400);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.duel-copy strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  font-weight: 700;
  line-height: 1.1;
  word-break: normal;
  overflow-wrap: normal;
}

.duel-copy em {
  display: block;
  margin-top: 5px;
  color: var(--slate-300);
  font-size: 0.78rem;
  font-style: normal;
}

.fly-card {
  border-color: rgba(64, 224, 208, 0.24);
}

.ai-card {
  border-color: rgba(212, 160, 176, 0.24);
}

.versus {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--slate-300);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.board-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(280px, min(64vh, 580px));
  grid-template-rows: minmax(0, auto) auto;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 0;
}

.evaluation-rail {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  width: 12px;
  height: min(50vh, 480px);
  max-height: calc(100vh - 410px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(212, 160, 176, 0.32);
}

#evalFill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 56%;
  background: linear-gradient(180deg, var(--cyan), rgba(64, 224, 208, 0.48));
  transition: height 450ms ease;
}

.chessboard {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, minmax(0, 1fr));
  width: min(50vh, 480px);
  max-width: 100%;
  max-height: calc(100vh - 410px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.square {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.square.light {
  background: var(--board-light);
}

.square.dark {
  background: var(--board-dark);
}

.square.from::after,
.square.to::after {
  position: absolute;
  inset: 10%;
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.square.from::after {
  background: rgba(232, 200, 74, 0.3);
}

.square.to::after {
  outline: 3px solid rgba(64, 224, 208, 0.62);
  outline-offset: -3px;
}

.piece {
  z-index: 1;
  color: #1c1823;
  font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", serif;
  font-size: clamp(1.45rem, 5.8vh, 4.2rem);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.24);
  transition: transform 220ms ease;
}

.piece.black {
  color: #17121d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
}

.piece.white {
  color: #fff7ef;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.square.to .piece {
  transform: scale(1.08);
}

.move-callout {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: min(580px, 100%);
  height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(15, 13, 21, 0.82);
  backdrop-filter: blur(14px);
  box-sizing: border-box;
  overflow: hidden;
}

.move-callout span {
  color: var(--crystal-rose);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.move-callout strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin-top: 5px;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
}

.timeline {
  display: grid;
  grid-template-columns: 42px 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

#scrubber,
#eloSlider {
  width: 100%;
  accent-color: var(--crystal-rose);
}

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 84px;
}

.clock span {
  color: var(--slate-400);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.clock strong {
  color: var(--slate-100);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.comparison-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.bar-row strong {
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

.bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.bar i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--crystal-rose);
  transition: width 400ms ease;
}

.bar-row:nth-child(2) .bar i,
.bar.split i {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.move-list-shell {
  display: flex;
  flex: 0 0 auto;
  min-height: 0;
  max-height: 244px;
  flex-direction: column;
  gap: 10px;
}

.panel-subhead {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.panel-subhead strong {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.move-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  max-height: 204px;
  margin: 0;
  overflow: auto;
  padding: 0 4px 0 0;
  list-style: none;
}

.move-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--slate-200);
  font-size: 0.78rem;
}

.move-list li.active {
  border-color: rgba(64, 224, 208, 0.4);
  background: rgba(64, 224, 208, 0.09);
}

.move-list b {
  color: var(--slate-400);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
}

.move-list em {
  color: var(--crystal-rose);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  font-style: normal;
}

.evidence-box {
  padding: 14px;
  border: 1px solid rgba(212, 160, 176, 0.18);
  border-radius: 8px;
  background: rgba(212, 160, 176, 0.08);
}

.evidence-box p {
  margin: 8px 0 0;
  color: var(--slate-200);
  font-size: 0.82rem;
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(15, 13, 21, 0.86), rgba(15, 13, 21, 0.64)),
    radial-gradient(circle at 50% 40%, rgba(212, 160, 176, 0.18), transparent 46%);
  backdrop-filter: blur(14px);
}

.modal-backdrop.is-open {
  display: grid;
}

.config-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(250, 248, 245, 0.97);
  color: var(--slate-900);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.35);
}

.config-card h1 {
  margin: 10px 0 0;
  color: var(--slate-900);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 400;
  line-height: 0.95;
}

.config-copy {
  max-width: 620px;
  margin: 18px 0 30px;
  color: var(--slate-600);
  font-size: 1rem;
  line-height: 1.62;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(15, 13, 21, 0.11);
  border-radius: 8px;
  background: #fff;
}

legend {
  padding: 0 5px;
  color: var(--slate-400);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segmented label,
.choice,
.toggle-line {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 13, 21, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-700);
}

.mode-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mode-with-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.42;
}

.segmented input,
.choice input {
  appearance: none;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 13, 21, 0.42);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}

.segmented input:checked,
.choice input:checked {
  background: var(--slate-900);
}

.segmented input:disabled {
  border-color: rgba(15, 13, 21, 0.16);
  background: var(--slate-100);
  box-shadow: none;
}

.segmented label:has(input:checked),
.choice:has(input:checked) {
  border-color: var(--slate-900);
  box-shadow: inset 0 0 0 1px var(--slate-900);
}

.segmented label:has(input:disabled) {
  color: var(--slate-300);
  cursor: help;
}

.coming-soon:hover::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 2;
  width: 240px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--slate-900);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.74rem;
  line-height: 1.4;
}

.choice-stack {
  display: grid;
  gap: 8px;
}

.choice span,
.toggle-line span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.choice strong,
.toggle-line strong {
  color: var(--slate-900);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
}

.choice em,
.toggle-line em {
  color: var(--slate-400);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

.slider-row {
  display: grid;
  gap: 16px;
}

.slider-row span {
  color: var(--slate-600);
  font-family: "Space Grotesk", sans-serif;
}

.slider-row strong {
  color: var(--slate-950);
  font-family: "JetBrains Mono", monospace;
}

.toggle-line {
  justify-content: space-between;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--slate-300);
  transition: background 180ms ease;
}

.switch i::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + i {
  background: var(--slate-900);
}

.switch input:checked + i::after {
  transform: translateX(22px);
}

.config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--slate-900);
  background: var(--slate-900);
  color: #fff;
}

.secondary-button {
  border: 1px solid rgba(15, 13, 21, 0.18);
  background: #fff;
  color: var(--slate-700);
}

.method-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  pointer-events: none;
}

.method-drawer > div {
  width: min(460px, 100%);
  height: 100%;
  padding: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 13, 21, 0.96);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.36);
  transform: translateX(100%);
  transition: transform 260ms ease;
}

.method-drawer.is-open {
  pointer-events: auto;
}

.method-drawer.is-open > div {
  transform: translateX(0);
}

.drawer-close {
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: transparent;
  color: var(--slate-200);
}

.method-drawer h2 {
  clear: both;
  margin: 20px 0 12px;
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
}

.method-drawer p {
  color: var(--slate-200);
  line-height: 1.65;
}

.method-drawer dl {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.method-drawer dl div {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.method-drawer dt {
  color: var(--crystal-rose);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.method-drawer dd {
  margin: 4px 0 0;
  color: var(--slate-100);
}

@media (max-width: 1150px) {
  body {
    overflow: auto;
  }

  .app-shell,
  .lab {
    min-height: 100vh;
    height: auto;
  }

  .lab {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .topbar {
    grid-column: 1;
  }

  .left-panel,
  .right-panel,
  .match-stage {
    min-height: auto;
  }

  .left-panel {
    order: 2;
  }

  .match-stage {
    order: 1;
  }

  .right-panel {
    order: 3;
  }

  .board-wrap {
    grid-template-columns: 14px minmax(280px, 1fr);
  }

  .chessboard,
  .evaluation-rail {
    width: min(86vw, 640px);
    height: auto;
    max-height: none;
  }

  .evaluation-rail {
    height: min(86vw, 640px);
  }
}

  @media (max-width: 720px) {
  .lab {
    padding: 10px;
  }

  .topbar {
    gap: 12px;
  }

  .experiment-id strong {
    font-size: 0.78rem;
  }

  .score-strip {
    grid-template-columns: 1fr;
  }

  .player-card {
    grid-template-columns: minmax(124px, 38%) minmax(0, 1fr);
    min-height: 132px;
  }

  .duel-visual {
    height: 108px;
  }

  .versus {
    width: 34px;
    height: 34px;
    justify-self: center;
  }

  .board-wrap {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .evaluation-rail {
    display: none;
  }

  .chessboard {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
  }

  .move-callout {
    grid-column: 1;
    max-width: none;
    margin-top: 10px;
  }

  .timeline {
    grid-template-columns: 42px 42px 1fr;
  }

  .clock {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .config-actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
