:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-2: #0b1614;
  --panel: rgba(9, 22, 20, 0.9);
  --panel-strong: rgba(12, 31, 28, 0.96);
  --panel-soft: rgba(17, 42, 38, 0.72);
  --ink: #ecfff8;
  --muted: #8baea6;
  --dim: #58766f;
  --line: rgba(132, 255, 226, 0.22);
  --line-soft: rgba(132, 255, 226, 0.12);
  --cyan: #32ffe0;
  --green: #b9ff4b;
  --amber: #ffcb5c;
  --magenta: #ff4fd8;
  --red: #ff5b66;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(50, 255, 224, 0.09), transparent 28%),
    linear-gradient(315deg, rgba(185, 255, 75, 0.07), transparent 34%),
    repeating-linear-gradient(90deg, rgba(132, 255, 226, 0.055) 0, rgba(132, 255, 226, 0.055) 1px, transparent 1px, transparent 76px),
    repeating-linear-gradient(0deg, rgba(132, 255, 226, 0.04) 0, rgba(132, 255, 226, 0.04) 1px, transparent 1px, transparent 76px),
    var(--bg);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(50, 255, 224, 0.12) 50%, transparent 52%),
    linear-gradient(180deg, transparent 0 58%, rgba(255, 203, 92, 0.08) 60%, transparent 62%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 86%);
}

body::after {
  z-index: 5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0, transparent 1px, transparent 5px);
  mix-blend-mode: screen;
  opacity: 0.16;
}

button {
  font: inherit;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2,
.brand-chip,
.reactor-core b {
  font-family: "DIN Condensed", "Avenir Next Condensed", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

.lab-shell {
  width: min(1440px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-console,
.reactor-panel,
.telemetry-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(9, 22, 20, 0.96), rgba(4, 11, 10, 0.92));
  box-shadow: var(--shadow);
}

.model-console::before,
.reactor-panel::before,
.telemetry-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(50, 255, 224, 0.08), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 18px);
  pointer-events: none;
}

.model-console {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto 42px;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.brand-cluster,
.console-strip,
.panel-head,
.status-pill,
.meter-head,
.section-head,
.probability-row,
.history-list li,
.training-log li {
  position: relative;
  z-index: 1;
}

.brand-cluster {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-chip {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 255, 75, 0.78);
  border-radius: var(--radius);
  color: var(--bg);
  background:
    linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 1.18rem;
  line-height: 1;
  box-shadow:
    0 0 24px rgba(50, 255, 224, 0.28),
    inset 0 0 16px rgba(255, 255, 255, 0.32);
}

.system-label,
.eyebrow,
.slot-kicker,
.console-stat span,
.move-card small,
.reactor-core small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  margin-top: 2px;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 0.92;
}

.console-strip {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
}

.console-stat {
  min-height: 42px;
  min-width: 106px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 12, 11, 0.74);
}

.console-stat b {
  color: var(--cyan);
  font-size: 1rem;
  line-height: 1.1;
}

.score-strip {
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 9px;
}

.score-strip span {
  color: var(--muted);
  white-space: nowrap;
}

.score-strip b {
  margin-right: 3px;
  color: var(--green);
  font-size: 1.08rem;
}

.report-button {
  min-height: 42px;
  min-width: 116px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1px solid rgba(185, 255, 75, 0.32);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(4, 12, 11, 0.74);
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.report-button span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.report-button b {
  color: var(--green);
  font-size: 1rem;
  line-height: 1.1;
}

.report-button:hover:not(:disabled),
.report-button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--green);
  background: rgba(16, 45, 39, 0.92);
  outline: none;
}

.report-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.icon-button {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(4, 12, 11, 0.82);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lab-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(380px, 0.98fr);
  gap: 12px;
  min-height: 0;
}

.reactor-panel {
  min-height: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(280px, 1fr) auto;
  gap: 10px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2,
.verdict-box h2 {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.status-pill {
  max-width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(2, 8, 8, 0.68);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.signal-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 203, 92, 0.16), 0 0 18px rgba(255, 203, 92, 0.54);
}

.signal-dot.ready {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(185, 255, 75, 0.15), 0 0 18px rgba(185, 255, 75, 0.54);
}

.signal-dot.error {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 91, 102, 0.16), 0 0 18px rgba(255, 91, 102, 0.54);
}

.training-pipeline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.phase-node {
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.74);
  color: var(--muted);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.phase-node span {
  color: var(--dim);
  font-size: 0.72rem;
}

.phase-node b {
  font-size: 0.84rem;
  line-height: 1.2;
}

.phase-node.active {
  transform: translateY(-2px);
  border-color: rgba(50, 255, 224, 0.62);
  color: var(--ink);
  background: linear-gradient(135deg, rgba(50, 255, 224, 0.16), rgba(185, 255, 75, 0.08));
  box-shadow: inset 0 0 28px rgba(50, 255, 224, 0.08), 0 0 18px rgba(50, 255, 224, 0.1);
}

.phase-node.done {
  border-color: rgba(185, 255, 75, 0.42);
}

.reactor-stage {
  position: relative;
  z-index: 1;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, rgba(50, 255, 224, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(3, 10, 9, 0.1), rgba(2, 7, 7, 0.72));
}

.reactor-stage::after {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px solid rgba(185, 255, 75, 0.12);
  border-radius: var(--radius);
  pointer-events: none;
}

.neural-map {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  background:
    linear-gradient(25deg, transparent 0 42%, rgba(50, 255, 224, 0.32) 43%, transparent 44%),
    linear-gradient(145deg, transparent 0 48%, rgba(185, 255, 75, 0.24) 49%, transparent 50%),
    linear-gradient(90deg, transparent 0 36%, rgba(255, 79, 216, 0.18) 37%, transparent 38%),
    repeating-linear-gradient(90deg, transparent 0, transparent 42px, rgba(132, 255, 226, 0.08) 43px);
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(50, 255, 224, 0.78);
  animation: pulse 2.2s ease-in-out infinite;
}

.node-a { left: 11%; top: 24%; }
.node-b { left: 24%; top: 70%; animation-delay: 0.2s; }
.node-c { left: 45%; top: 18%; animation-delay: 0.4s; }
.node-d { right: 32%; top: 66%; animation-delay: 0.6s; }
.node-e { right: 13%; top: 32%; animation-delay: 0.8s; }
.node-f { right: 17%; bottom: 17%; animation-delay: 1s; }

.duel-board {
  position: relative;
  z-index: 2;
  width: min(100%, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.duel-slot {
  min-height: 220px;
  display: grid;
  grid-template-rows: auto minmax(96px, 1fr) auto;
  place-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(132, 255, 226, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(11, 28, 26, 0.82), rgba(2, 7, 7, 0.72));
  box-shadow: inset 0 0 38px rgba(50, 255, 224, 0.055);
}

.duel-slot img {
  width: min(132px, 62%);
  aspect-ratio: 1;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(50, 255, 224, 0.22))
    drop-shadow(0 18px 22px rgba(0, 0, 0, 0.34));
}

.duel-slot strong {
  min-height: 28px;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.reactor-core {
  position: relative;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(50, 255, 224, 0.4);
  border-radius: 50%;
  background: rgba(2, 7, 7, 0.82);
  box-shadow:
    0 0 34px rgba(50, 255, 224, 0.24),
    inset 0 0 28px rgba(185, 255, 75, 0.1);
}

.reactor-core b {
  color: var(--green);
  font-size: 1.65rem;
}

.reactor-core small {
  position: absolute;
  bottom: 15px;
  color: var(--cyan);
}

.core-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(185, 255, 75, 0.54);
  animation: spin 8s linear infinite;
}

.move-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.move-card {
  min-height: 94px;
  display: grid;
  grid-template-rows: 46px auto auto;
  place-items: center;
  gap: 5px;
  padding: 9px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(4, 13, 12, 0.86);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.move-card img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.move-card span {
  font-size: 1.05rem;
  line-height: 1.1;
}

.move-card small {
  color: var(--dim);
  text-align: center;
}

.move-card:hover:not(:disabled),
.move-card:focus-visible:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--green);
  background: rgba(16, 45, 39, 0.92);
  box-shadow: 0 0 24px rgba(185, 255, 75, 0.13);
  outline: none;
}

.move-card:disabled {
  cursor: wait;
  opacity: 0.48;
}

.telemetry-panel {
  min-height: 0;
  height: min(650px, calc(100vh - 104px));
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.telemetry-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.telemetry-tab {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(2, 8, 8, 0.7);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.telemetry-tab:hover,
.telemetry-tab:focus-visible,
.telemetry-tab.active {
  border-color: rgba(185, 255, 75, 0.64);
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  outline: none;
}

.telemetry-tab.active {
  transform: translateY(-1px);
}

.telemetry-tab-panel[hidden] {
  display: none;
}

.telemetry-tab-panel {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 2px;
}

.verdict-box {
  position: relative;
  z-index: 1;
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.verdict-box p {
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.meter-block,
.challenge-card,
.distribution-panel,
.matrix-panel,
.training-lab,
.inference-panel,
.process-log-panel,
.log-panel,
.history-block {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
}

.meter-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meter-head span,
.section-head strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.meter-head b {
  color: var(--green);
}

.meter-track {
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(3, 11, 10, 0.9);
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber), var(--magenta));
  box-shadow: 0 0 18px rgba(50, 255, 224, 0.24);
  transition: width 240ms ease;
}

.insight-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.insight-card,
.readout-grid > div {
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.74);
}

.insight-card strong {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 1.55rem;
  line-height: 1;
}

.insight-card p,
.readout-grid p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.probability-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 9px;
  min-height: 30px;
}

.probability-row span,
.probability-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.probability-row em {
  text-align: right;
}

.probability-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(132, 255, 226, 0.1);
}

.probability-track b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 220ms ease;
}

.transition-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.matrix-cell {
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(4, 13, 12, 0.62);
  font-size: 0.78rem;
  text-align: center;
}

.matrix-cell.hot {
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.readout-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.challenge-card {
  padding: 10px;
  border: 1px solid rgba(185, 255, 75, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(185, 255, 75, 0.08), rgba(50, 255, 224, 0.055)),
    rgba(4, 13, 12, 0.72);
}

.challenge-card h3 {
  margin: 0;
  color: var(--green);
  font-size: 1.12rem;
  line-height: 1.1;
}

.challenge-card p,
.challenge-meta {
  color: var(--muted);
  line-height: 1.42;
}

.challenge-meter {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(2, 8, 8, 0.78);
}

.challenge-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--magenta), var(--amber), var(--green));
  transition: width 220ms ease;
}

.challenge-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
}

.challenge-meta b {
  color: var(--cyan);
  font-weight: 600;
  text-align: right;
}

.challenge-badges {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.challenge-badges li {
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(2, 8, 8, 0.56);
  font-size: 0.74rem;
  text-align: center;
}

.challenge-badges li.complete {
  border-color: rgba(185, 255, 75, 0.68);
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.inference-replay {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.inference-replay li {
  min-height: 50px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.68);
}

.inference-replay code {
  color: var(--amber);
  font-family: "DIN Condensed", "Avenir Next Condensed", monospace;
  font-size: 0.98rem;
}

.inference-replay span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inference-replay b {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.15;
}

.inference-replay em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.compact-log li {
  min-height: 36px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 7px 8px;
}

.report-tab-card {
  position: relative;
  z-index: 1;
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(185, 255, 75, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(185, 255, 75, 0.09), rgba(50, 255, 224, 0.06)),
    rgba(4, 13, 12, 0.76);
  box-shadow: inset 0 0 32px rgba(50, 255, 224, 0.045);
}

.report-tab-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.1;
}

.report-tab-card p {
  color: var(--muted);
  line-height: 1.58;
}

.report-tab-button {
  min-height: 42px;
  border: 1px solid rgba(185, 255, 75, 0.32);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(2, 8, 8, 0.72);
  cursor: pointer;
}

.report-tab-button.ready,
.report-tab-button:hover:not(:disabled),
.report-tab-button:focus-visible:not(:disabled) {
  border-color: var(--green);
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  outline: none;
}

.report-tab-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.training-lab {
  overflow: hidden;
  border: 1px solid rgba(50, 255, 224, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(50, 255, 224, 0.09), rgba(185, 255, 75, 0.055)),
    rgba(4, 13, 12, 0.76);
  box-shadow: inset 0 0 32px rgba(50, 255, 224, 0.045);
}

.training-lab::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(185, 255, 75, 0.08), transparent),
    repeating-linear-gradient(90deg, transparent 0, transparent 28px, rgba(132, 255, 226, 0.07) 29px);
  opacity: 0.64;
  pointer-events: none;
}

.training-lab-toggle,
.training-lab-body,
.sandbox-output {
  position: relative;
  z-index: 1;
}

.training-lab-toggle {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.training-lab-toggle:hover,
.training-lab-toggle:focus-visible {
  outline: none;
  background: rgba(50, 255, 224, 0.055);
}

.training-lab-toggle span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.training-lab-toggle b {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.1;
}

.training-lab-toggle em {
  max-width: 132px;
  color: var(--amber);
  font-style: normal;
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: right;
}

.training-lab-body[hidden] {
  display: none;
}

.training-lab-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lab-control,
.lab-slider {
  display: grid;
  gap: 7px;
}

.lab-control label,
.lab-slider label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.lab-slider label b {
  min-width: 34px;
  color: var(--green);
  text-align: right;
}

.lab-control select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(2, 8, 8, 0.86);
  padding: 0 10px;
  font: inherit;
}

.lab-control select:focus-visible {
  border-color: var(--green);
  outline: none;
}

.lab-slider input {
  width: 100%;
  accent-color: var(--green);
}

.lab-slider input[type="range"] {
  height: 18px;
  margin: 0;
  background: transparent;
}

.lab-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(50, 255, 224, 0.24), rgba(185, 255, 75, 0.24));
}

.lab-slider input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 1px solid rgba(185, 255, 75, 0.9);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 16px rgba(185, 255, 75, 0.34);
  appearance: none;
}

.style-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.style-switch button {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(2, 8, 8, 0.72);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.style-switch button:hover,
.style-switch button:focus-visible,
.style-switch button.active {
  border-color: rgba(185, 255, 75, 0.62);
  color: var(--bg);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  outline: none;
}

.style-switch button.active {
  transform: translateY(-1px);
}

.sandbox-output {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.sandbox-status {
  min-height: 34px;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 203, 92, 0.2);
  border-radius: 6px;
  color: var(--amber);
  background: rgba(255, 203, 92, 0.055);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sandbox-bars {
  display: grid;
  gap: 8px;
}

.sandbox-bars > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.sandbox-bars span,
.sandbox-bars em,
.sandbox-recommendation span {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.sandbox-bars b {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(132, 255, 226, 0.1);
}

.sandbox-bars i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--magenta), var(--cyan), var(--green));
  box-shadow: 0 0 16px rgba(50, 255, 224, 0.18);
  transition: width 220ms ease;
}

.sandbox-bars em {
  text-align: right;
}

.sandbox-recommendation {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(185, 255, 75, 0.2);
  border-radius: 6px;
  background: rgba(2, 8, 8, 0.58);
}

.sandbox-recommendation strong {
  color: var(--green);
  font-size: 1.12rem;
  line-height: 1.1;
  text-align: right;
  overflow-wrap: anywhere;
}

.sandbox-explanations {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.58;
}

.sandbox-explanations li + li {
  margin-top: 5px;
}

.training-log,
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.training-log {
  display: grid;
  gap: 7px;
}

.training-log li {
  min-height: 42px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.68);
}

.training-log code {
  color: var(--green);
  font-family: "DIN Condensed", "Avenir Next Condensed", monospace;
  font-size: 1rem;
}

.training-log span {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.history-block {
  min-height: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.history-list {
  min-height: 120px;
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.history-list li {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.68);
}

.report-modal[hidden] {
  display: none;
}

.report-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.report-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(50, 255, 224, 0.18), transparent 38%),
    rgba(1, 5, 5, 0.82);
  cursor: pointer;
}

.report-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(900px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(50, 255, 224, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(10, 27, 24, 0.98), rgba(3, 9, 9, 0.98)),
    var(--bg);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.64),
    inset 0 0 80px rgba(50, 255, 224, 0.055);
}

.report-dialog::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(90deg, rgba(132, 255, 226, 0.04) 0, rgba(132, 255, 226, 0.04) 1px, transparent 1px, transparent 54px),
    repeating-linear-gradient(0deg, rgba(132, 255, 226, 0.035) 0, rgba(132, 255, 226, 0.035) 1px, transparent 1px, transparent 54px);
  pointer-events: none;
}

.report-header,
.report-rank-card,
.report-summary,
.report-grid {
  position: relative;
  z-index: 1;
}

.report-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.report-header h2 {
  margin: 3px 0 0;
  font-size: 2.1rem;
  line-height: 1;
}

.report-close {
  flex: 0 0 auto;
}

.report-rank-card {
  margin: 16px 18px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(185, 255, 75, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(185, 255, 75, 0.12), rgba(50, 255, 224, 0.07)),
    rgba(4, 13, 12, 0.78);
  box-shadow: inset 0 0 36px rgba(50, 255, 224, 0.05);
}

.report-rank-card h3 {
  margin: 3px 0 0;
  color: var(--green);
  font-size: 1.75rem;
  line-height: 1;
}

.report-rank-card p {
  color: var(--muted);
  line-height: 1.48;
}

.rank-score {
  min-height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(2, 8, 8, 0.62);
}

.rank-score span {
  color: var(--muted);
  font-size: 0.74rem;
}

.rank-score b {
  color: var(--cyan);
  font-size: 2.25rem;
  line-height: 1;
}

.rank-breakdown {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.rank-breakdown li {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(2, 8, 8, 0.54);
}

.rank-breakdown span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.rank-breakdown b {
  color: var(--green);
  font-size: 1.05rem;
  line-height: 1;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 0;
}

.report-summary > div,
.report-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(4, 13, 12, 0.76);
}

.report-summary > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
}

.report-summary span,
.report-kpis span,
.prediction-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.report-summary b,
.report-kpis b,
.prediction-strip b {
  color: var(--green);
  font-size: 1.45rem;
  line-height: 1;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.report-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.report-card-wide {
  grid-column: 1 / -1;
}

.report-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.1;
}

.report-card p {
  color: var(--muted);
  line-height: 1.58;
}

.report-bars {
  display: grid;
  gap: 9px;
}

.report-bars > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 9px;
}

.report-bars span,
.report-bars em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.report-bars b {
  height: 10px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(50, 255, 224, 0.16);
  transition: width 220ms ease;
}

.report-kpis,
.prediction-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-kpis > div,
.prediction-strip > div {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(2, 8, 8, 0.58);
}

.report-findings {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.65;
}

.report-findings li + li {
  margin-top: 7px;
}

body.report-open {
  overflow: hidden;
}

.round-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--bg);
  background: var(--cyan);
  font-family: "DIN Condensed", "Avenir Next Condensed", sans-serif;
}

.round-moves {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.round-result {
  min-width: 40px;
  padding: 4px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.78rem;
}

.round-result.win {
  color: var(--bg);
  background: var(--green);
}

.round-result.lose {
  color: var(--ink);
  background: var(--red);
}

.round-result.draw {
  color: var(--bg);
  background: var(--amber);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .model-console {
    grid-template-columns: 1fr 42px;
  }

  .console-strip {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .telemetry-panel {
    min-height: auto;
    height: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .lab-shell {
    width: min(100% - 20px, 720px);
    padding: 10px 0 18px;
  }

  .model-console,
  .reactor-panel,
  .telemetry-panel {
    padding: 12px;
  }

  .brand-chip {
    width: 42px;
    height: 42px;
    font-size: 1.08rem;
  }

  h1 {
    font-size: 1.65rem;
  }

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

  .console-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-pipeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .phase-node {
    min-height: 52px;
    padding: 7px 5px;
    text-align: center;
  }

  .phase-node b {
    font-size: 0.76rem;
  }

  .score-strip {
    grid-template-columns: repeat(3, auto);
  }

  .telemetry-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .report-modal {
    padding: 10px;
    align-items: stretch;
  }

  .report-dialog {
    max-height: calc(100vh - 20px);
  }

  .report-header {
    min-height: 78px;
    padding: 13px;
  }

  .report-header h2 {
    font-size: 1.55rem;
  }

  .report-summary,
  .report-grid {
    grid-template-columns: 1fr;
    padding-inline: 13px;
  }

  .report-rank-card {
    margin-inline: 13px;
    grid-template-columns: 1fr;
  }

  .rank-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-card-wide {
    grid-column: auto;
  }

  .report-kpis,
  .prediction-strip {
    grid-template-columns: 1fr;
  }

  .training-lab-toggle {
    align-items: flex-start;
    flex-direction: column;
  }

  .training-lab-toggle em {
    max-width: none;
    text-align: left;
  }

  .panel-head {
    flex-direction: column;
  }

  .panel-head h2,
  .verdict-box h2 {
    font-size: 1.55rem;
  }

  .reactor-panel {
    min-height: auto;
  }

  .reactor-stage {
    min-height: 280px;
  }

  .duel-board {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .reactor-core {
    width: 58px;
    height: 58px;
    justify-self: center;
  }

  .reactor-core b {
    font-size: 1.16rem;
  }

  .reactor-core small {
    bottom: 9px;
  }

  .duel-slot {
    min-height: 82px;
    grid-template-rows: auto minmax(32px, 1fr) auto;
    gap: 5px;
    padding: 8px;
  }

  .duel-slot img {
    width: min(60px, 34%);
  }

  .duel-slot strong {
    min-height: 20px;
    font-size: 1rem;
  }

  .move-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .move-card {
    min-height: 92px;
    grid-template-columns: 1fr;
    grid-template-rows: 42px auto auto;
    justify-items: center;
    text-align: center;
  }

  .move-card img {
    grid-row: auto;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .brand-cluster {
    gap: 10px;
  }

  h1 {
    font-size: 1.65rem;
  }

  .system-label,
  .eyebrow,
  .slot-kicker,
  .console-stat span,
  .move-card small,
  .reactor-core small {
    font-size: 0.68rem;
  }

  .console-stat {
    min-width: 0;
  }

  .training-log li {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .inference-replay li {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .rank-breakdown {
    grid-template-columns: 1fr;
  }

  .style-switch {
    grid-template-columns: 1fr;
  }

  .training-pipeline {
    gap: 5px;
  }

  .phase-node {
    min-height: 48px;
  }

  .move-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .move-card {
    min-height: 72px;
    grid-template-columns: 1fr;
    grid-template-rows: 30px auto auto;
    gap: 3px;
    padding: 7px 4px;
    justify-items: center;
    text-align: center;
  }

  .move-card span {
    font-size: 0.92rem;
  }

  .move-card img {
    grid-row: auto;
    width: 30px;
    height: 30px;
  }

  .sandbox-recommendation {
    align-items: flex-start;
    flex-direction: column;
  }

  .sandbox-recommendation strong {
    text-align: left;
  }

  .history-list li {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
}
