@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/cinzel-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/cinzel-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/cinzel-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/cormorant-garamond-italic-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/inter-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/inter-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/gladiator/static/assets/fonts/inter-latin-variable.woff2") format("woff2");
}

:root {
  --sand-50: #f7dfb8;
  --sand-100: #d5b07a;
  --stone-100: #d2b794;
  --stone-200: #9d7d59;
  --ink-900: #100907;
  --ink-800: #1d120d;
  --ink-700: #2d1a12;
  --cream: #f7f1e4;
  --line: rgba(255, 226, 183, 0.24);
  --red-main: #b63a2d;
  --blue-main: #2e587d;
  --gold: #e2aa53;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 216, 156, 0.22), transparent 28%),
    radial-gradient(circle at 15% 18%, rgba(152, 99, 45, 0.14), transparent 34%),
    linear-gradient(180deg, #4a2a18 0%, #19110d 52%, #0f0907 100%);
  color: var(--cream);
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.025;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 244, 224, 0.26) 0,
      rgba(255, 244, 224, 0.26) 1px,
      transparent 1px,
      transparent 4px
    );
}

button,
input,
textarea,
select {
  font: inherit;
}

.game-shell {
  position: relative;
}

.arena-stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 228, 184, 0.1), transparent 26%),
    linear-gradient(180deg, #27160d 0%, #100906 100%);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 1rem;
  align-content: center;
  color: var(--cream);
  text-align: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(231, 171, 88, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(74, 42, 24, 0.88), rgba(16, 9, 6, 0.92));
  opacity: 1;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.loading-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-mark {
  position: relative;
  width: 4.75rem;
  height: 4.75rem;
}

.loading-mark-ring {
  position: absolute;
  inset: 0.38rem;
  border: 2px solid rgba(226, 170, 83, 0.26);
  border-top-color: rgba(255, 230, 178, 0.92);
  border-radius: 50%;
  box-shadow:
    0 0 24px rgba(226, 170, 83, 0.22),
    inset 0 0 18px rgba(0, 0, 0, 0.28);
  animation: loadingSpin 1.15s linear infinite;
}

.loading-mark-blade {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.1rem;
  height: 0.18rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(78, 47, 26, 0), #f1d8a4 28%, #a56e37 78%, rgba(78, 47, 26, 0));
  box-shadow: 0 0 12px rgba(255, 213, 146, 0.18);
  transform-origin: 50% 50%;
}

.loading-mark-blade-a {
  transform: translate(-50%, -50%) rotate(42deg);
}

.loading-mark-blade-b {
  transform: translate(-50%, -50%) rotate(-42deg);
}

.loading-copy {
  display: grid;
  gap: 0.35rem;
}

.loading-title {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
}

.loading-subtitle {
  margin: 0;
  color: rgba(247, 241, 228, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.scene-glow,
.scene-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-glow-left {
  opacity: 0;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 201, 121, 0.12), transparent 24%),
    radial-gradient(circle at 18% 68%, rgba(170, 84, 44, 0.12), transparent 18%);
  mix-blend-mode: screen;
}

.scene-glow-right {
  opacity: 0;
  background:
    radial-gradient(circle at 86% 22%, rgba(123, 177, 255, 0.1), transparent 24%),
    radial-gradient(circle at 82% 70%, rgba(255, 204, 129, 0.08), transparent 18%);
  mix-blend-mode: screen;
}

.scene-frame {
  border: 1px solid rgba(255, 226, 183, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.24),
    inset 0 0 120px rgba(0, 0, 0, 0.18);
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.scene-noise {
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: soft-light;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255, 230, 190, 0.3) 0 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, rgba(255, 200, 140, 0.26) 0 1px, transparent 1px);
  background-size: 18px 18px, 24px 24px, 20px 20px;
  pointer-events: none;
}

.match-strip,
.hud-top,
.telemetry,
.control-dock,
.arena-title-pill,
.decision-feed {
  position: relative;
  z-index: 1;
}

.match-strip {
  display: none;
}

.match-pill,
.match-title,
.match-note {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 227, 190, 0.16);
  background:
    linear-gradient(180deg, rgba(39, 26, 17, 0.76), rgba(16, 10, 7, 0.54)),
    radial-gradient(circle at top, rgba(255, 214, 158, 0.08), transparent 60%);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 202, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.match-pill {
  color: #ffd89f;
  letter-spacing: 0.18em;
}

.match-title {
  font-weight: 700;
  flex: 1 1 auto;
  text-align: center;
}

.match-note {
  color: rgba(247, 241, 228, 0.72);
  max-width: 28rem;
}

.match-pill-test {
  color: #fff0c8;
  border-color: rgba(255, 196, 108, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 219, 0.12),
    0 0 0 1px rgba(255, 196, 108, 0.1),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.hud-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 3;
  width: min(96vw, 104rem);
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.player-panel,
.match-core,
.telemetry-card,
.control-line,
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 15, 14, 0.7), rgba(9, 9, 9, 0.52));
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 36px rgba(0, 0, 0, 0.22);
}

.player-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.42rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.player-panel::before {
  content: none;
}

.player-panel-right::before {
  content: none;
}

.player-panel-left {
  justify-self: stretch;
  text-align: right;
}

.player-panel-right {
  justify-self: stretch;
  text-align: left;
}

.player-tag {
  display: none;
}

.player-name {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-family: "Cinzel", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.28rem, 2.7vw, 2.65rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 0.95;
  text-transform: uppercase;
  color: rgba(255, 250, 235, 0.96);
  text-shadow:
    0 2px 0 rgba(91, 54, 25, 0.56),
    0 6px 18px rgba(0, 0, 0, 0.4);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brain-line,
.decision-line,
.status-line {
  margin: 0.42rem 0 0;
  color: rgba(247, 241, 228, 0.76);
  line-height: 1.4;
}

.brain-line {
  display: none;
}

.brain-line.not-live {
  color: rgba(255, 196, 138, 0.85);
}

.brain-line.api-down {
  color: #ff6b57;
  font-weight: 800;
  animation: apiDownPulse 1.1s ease-in-out infinite;
}

@keyframes apiDownPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.player-panel.api-down {
  filter: drop-shadow(0 0 10px rgba(255, 96, 70, 0.35));
}

.health-track {
  position: relative;
  height: clamp(2rem, 4.2vw, 3.15rem);
  border: 3px solid #dcae48;
  border-radius: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.86), rgba(30, 22, 13, 0.64)),
    radial-gradient(circle at 50% 0, rgba(255, 218, 145, 0.12), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 180, 0.24),
    inset 0 -12px 22px rgba(0, 0, 0, 0.36),
    0 7px 16px rgba(0, 0, 0, 0.34);
}

.player-panel-left .health-track {
  clip-path: polygon(2.8% 0, 100% 0, 97.2% 100%, 0 100%);
}

.player-panel-right .health-track {
  clip-path: polygon(0 0, 97.2% 0, 100% 100%, 2.8% 100%);
}

.health-ghost {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: rgba(255, 232, 175, 0.2);
  transition: none;
}

.player-panel-left .health-ghost {
  right: 0;
  left: auto;
}

.player-panel-right .health-ghost {
  right: auto;
  left: 0;
}

.health-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  border-radius: 0;
  transition: width 90ms linear;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -12px 18px rgba(0, 0, 0, 0.26);
}

.health-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.22) 42%, transparent 58%);
  background-size: 220% 100%;
  animation: healthShine 3.2s linear infinite;
}

@keyframes healthShine {
  0% {
    background-position: 160% 0;
  }
  100% {
    background-position: -60% 0;
  }
}

.health-fill.health-low {
  animation: healthPulse 0.7s ease-in-out infinite;
}

@keyframes healthPulse {
  0%,
  100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.55) saturate(1.4);
  }
}

.health-fill-left {
  margin-left: auto;
  background: linear-gradient(90deg, #5b1110, #a92e24 48%, #df5636);
}

.health-fill-right {
  margin-right: auto;
  background: linear-gradient(90deg, #76b8e4, #3c82bd 44%, #13375e);
}

.health-text {
  position: absolute;
  top: 50%;
  z-index: 2;
  margin: 0;
  padding: 0 0.65rem;
  transform: translateY(-50%);
  font-family: "Cinzel", "Inter", sans-serif;
  font-size: clamp(0.66rem, 1vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 241, 202, 0.88);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

.player-panel-left .health-text {
  right: 1.35rem;
}

.player-panel-right .health-text {
  left: 1.35rem;
}

.decision-line {
  display: none;
}

.plan-readout {
  display: none;
}

.plan-intent,
.plan-read {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 240, 214, 0.82);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-read {
  color: rgba(247, 241, 228, 0.58);
  font-size: 0.7rem;
}

.plan-read[data-outcome="correct"] {
  color: rgba(170, 255, 189, 0.78);
}

.plan-read[data-outcome="miss"] {
  color: rgba(255, 145, 122, 0.82);
}

.status-line {
  display: none;
}

.match-core {
  position: relative;
  padding: 2.42rem 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  overflow: visible;
}

.match-core::before {
  content: none;
}

.eyebrow {
  display: none;
}

.match-core h1 {
  margin: 0;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d7a947;
  text-shadow:
    0 2px 0 rgba(69, 35, 13, 0.7),
    0 6px 16px rgba(0, 0, 0, 0.38);
}

.round-copy {
  display: none;
}

.match-actions {
  display: none;
}

.primary-action,
.secondary-action {
  min-height: 3rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.primary-action {
  background: linear-gradient(135deg, #f1c06f 0%, #cf6428 100%);
  color: #1a120c;
  box-shadow: 0 18px 40px rgba(156, 73, 20, 0.3);
}

.secondary-action {
  background: rgba(255, 246, 228, 0.06);
  border-color: rgba(255, 226, 183, 0.24);
  color: var(--cream);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.telemetry {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.telemetry-card {
  padding: 0.85rem 0.95rem;
  position: relative;
  overflow: hidden;
}

.telemetry-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 153, 0.55), transparent);
}

.telemetry-label {
  display: block;
  color: rgba(245, 222, 187, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.telemetry-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.control-dock {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.3rem;
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(255, 226, 183, 0.2);
  background:
    linear-gradient(180deg, rgba(28, 18, 12, 0.8), rgba(11, 7, 5, 0.66)),
    radial-gradient(circle at 50% 0%, rgba(255, 215, 144, 0.12), transparent 55%);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 189, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.opening-book-dock {
  gap: 0.85rem;
}

.opening-book-header,
.opening-book-footnote {
  border: 1px solid rgba(255, 226, 183, 0.2);
  background:
    linear-gradient(180deg, rgba(28, 18, 12, 0.72), rgba(11, 7, 5, 0.5)),
    radial-gradient(circle at 50% 0%, rgba(255, 215, 144, 0.12), transparent 56%);
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 189, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.16);
}

.opening-book-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
}

.opening-book-badge {
  align-self: start;
  padding: 0.68rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 153, 0.24);
  background: linear-gradient(135deg, rgba(241, 192, 111, 0.2), rgba(207, 100, 40, 0.28));
  color: #ffe5b8;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.opening-book-copy {
  display: grid;
  gap: 0.18rem;
}

.opening-book-copy strong {
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opening-book-copy span {
  color: rgba(247, 241, 228, 0.72);
  line-height: 1.45;
}

.opening-book-progress {
  display: grid;
  justify-items: end;
  gap: 0.18rem;
  text-align: right;
}

.opening-book-progress span {
  color: rgba(245, 222, 187, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.opening-book-progress strong {
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opening-book-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.opening-lane {
  position: relative;
  overflow: hidden;
  padding: 1rem;
}

.opening-lane::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  background: linear-gradient(180deg, rgba(255, 208, 132, 0.9), rgba(182, 58, 45, 0.9));
}

.opening-lane-right::before {
  left: auto;
  right: 0;
  background: linear-gradient(180deg, rgba(120, 192, 255, 0.95), rgba(46, 88, 125, 0.95));
}

.opening-lane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.opening-lane-head strong {
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.opening-lane-head span {
  color: rgba(247, 241, 228, 0.62);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.move-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.move-chip {
  display: grid;
  gap: 0.12rem;
  align-content: start;
  min-height: 3.25rem;
  padding: 0.72rem 0.72rem 0.68rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 226, 183, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(13, 8, 6, 0.34)),
    radial-gradient(circle at top, rgba(255, 214, 158, 0.1), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 219, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.move-chip-left {
  border-color: rgba(255, 198, 138, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 178, 88, 0.12), rgba(13, 8, 6, 0.34)),
    radial-gradient(circle at top, rgba(255, 214, 158, 0.12), transparent 70%);
}

.move-chip-right {
  border-color: rgba(130, 191, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(120, 192, 255, 0.12), rgba(13, 8, 6, 0.34)),
    radial-gradient(circle at top, rgba(120, 192, 255, 0.12), transparent 70%);
}

.move-chip-done {
  opacity: 0.84;
}

.move-chip-current {
  transform: translateY(-2px);
  border-color: rgba(255, 232, 196, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 219, 0.12),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.move-chip-left.move-chip-current {
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 219, 0.12),
    0 18px 36px rgba(123, 33, 17, 0.22);
}

.move-chip-right.move-chip-current {
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 219, 0.12),
    0 18px 36px rgba(28, 66, 112, 0.22);
}

.move-chip-queued {
  opacity: 0.62;
}

.move-chip-empty {
  min-height: 2.8rem;
  align-content: center;
  opacity: 0.84;
}

.move-chip-index {
  color: rgba(247, 241, 228, 0.52);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.move-chip-label {
  color: var(--cream);
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.opening-book-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  padding: 0.85rem 1rem;
  color: rgba(247, 241, 228, 0.76);
  line-height: 1.5;
}

.opening-book-footnote span {
  max-width: 32rem;
}

.control-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  position: relative;
  overflow: hidden;
}

.control-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.22rem;
  background: linear-gradient(180deg, rgba(255, 206, 126, 0.86), rgba(255, 255, 255, 0.08));
}

.control-line strong {
  min-width: 7rem;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-line span {
  color: rgba(247, 241, 228, 0.74);
}

.control-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
}

.control-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 226, 183, 0.22);
  background: rgba(255, 214, 153, 0.08);
  color: #ffd89f;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.control-title {
  margin: 0.55rem 0 0;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: clamp(1.35rem, 2.8vw, 2.05rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control-summary {
  margin: 0.45rem 0 0;
  max-width: 42rem;
  color: rgba(247, 241, 228, 0.8);
  line-height: 1.55;
}

.control-progress {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 214, 153, 0.14), rgba(92, 40, 18, 0.2)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 226, 183, 0.18);
  color: var(--cream);
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.opening-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.opening-lane {
  position: relative;
  padding: 0.95rem 1rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 226, 183, 0.16);
  background:
    linear-gradient(180deg, rgba(36, 23, 16, 0.74), rgba(12, 8, 6, 0.58)),
    radial-gradient(circle at 50% 0%, rgba(255, 218, 160, 0.08), transparent 60%);
  overflow: hidden;
}

.opening-lane::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 153, 0.38), transparent);
}

.opening-lane-left::before,
.opening-lane-right::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.22rem;
}

.opening-lane-left::before {
  left: 0;
  background: linear-gradient(180deg, rgba(255, 206, 126, 0.9), rgba(182, 58, 45, 0.9));
}

.opening-lane-right::before {
  right: 0;
  background: linear-gradient(180deg, rgba(120, 192, 255, 0.9), rgba(46, 88, 125, 0.9));
}

.opening-lane-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
}

.opening-kicker {
  margin: 0;
  color: rgba(247, 241, 228, 0.64);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.opening-status {
  color: #ffd89f;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.opening-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
  min-height: 3.25rem;
}

.opening-move {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 226, 183, 0.14);
  background: rgba(255, 248, 234, 0.05);
  color: rgba(247, 241, 228, 0.9);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.opening-move-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
}

.opening-move-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opening-move-done {
  border-color: rgba(255, 214, 153, 0.22);
  background: rgba(255, 214, 153, 0.1);
  opacity: 0.82;
}

.opening-move-current {
  transform: translateY(-1px);
  border-color: rgba(255, 222, 174, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 208, 132, 0.2), rgba(255, 128, 76, 0.14)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.opening-move-current .opening-move-index {
  background: rgba(255, 229, 187, 0.18);
  color: #fff0d0;
}

.opening-move-queued {
  opacity: 0.62;
}

.opening-move-empty {
  opacity: 0.84;
}

.control-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.control-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 226, 183, 0.14);
  background: rgba(255, 248, 234, 0.035);
}

.control-spec strong {
  min-width: 8rem;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: 0.96rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-spec span {
  color: rgba(247, 241, 228, 0.74);
  font-size: 0.92rem;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 1.4rem 2rem;
  background:
    linear-gradient(180deg, rgba(12, 8, 6, 0.9), rgba(15, 10, 7, 1)),
    radial-gradient(circle at top, rgba(255, 210, 141, 0.06), transparent 34%);
}

.info-card {
  padding: 1.15rem 1.2rem 1.2rem;
}

.info-kicker {
  margin: 0;
  color: #ffd89f;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.info-card h2 {
  margin: 0.55rem 0 0.7rem;
  font-family: "Cinzel", "Avenir Next Condensed", "Franklin Gothic Medium", serif;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.info-card p {
  margin: 0;
  color: rgba(247, 241, 228, 0.76);
  line-height: 1.65;
}

.rule-list {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(247, 241, 228, 0.76);
  line-height: 1.8;
}

.info-card:first-child {
  border-top: 1px solid rgba(255, 214, 153, 0.24);
}

.info-card:last-child {
  border-top: 1px solid rgba(120, 192, 255, 0.16);
}

@media (max-width: 1100px) {
  .hud-top {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 10rem) minmax(0, 1fr);
    width: min(97vw, 68rem);
    gap: 0.44rem;
  }

  .player-panel-left,
  .player-panel-right {
    justify-self: stretch;
  }

  .player-name {
    font-size: clamp(1rem, 2.6vw, 1.7rem);
    letter-spacing: 0.12em;
  }

  .health-track {
    height: clamp(1.55rem, 3.7vw, 2.3rem);
    border-width: 2px;
  }

  .match-core {
    padding-top: 1.9rem;
  }

  .match-core h1 {
    font-size: clamp(1rem, 2.7vw, 1.45rem);
    letter-spacing: 0.18em;
  }

  .telemetry {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 1rem 1.4rem 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-dock {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 1rem 1.4rem 1.4rem;
  }

  .opening-grid,
  .control-specs {
    grid-template-columns: 1fr;
  }

  .opening-book-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .opening-book-progress {
    justify-items: start;
    text-align: left;
  }

  .opening-book-lanes {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .match-strip,
  .hud-top,
  .telemetry,
  .control-dock,
  .info-band {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .match-strip {
    width: calc(100% - 2rem);
    transform: translateX(-50%);
  }

  .hud-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    top: 0.65rem;
    gap: 0.35rem;
    width: calc(100vw - 0.8rem);
    padding: 0;
  }

  .match-core {
    position: absolute;
    top: 1.62rem;
    left: 50%;
    width: 8rem;
    padding: 0;
    transform: translateX(-50%);
  }

  .player-name {
    font-size: clamp(0.82rem, 3.8vw, 1.05rem);
    letter-spacing: 0.08em;
  }

  .health-track {
    height: 1.35rem;
  }

  .health-text {
    display: none;
  }

  .match-core h1 {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
  }

  .telemetry {
    grid-template-columns: 1fr;
    margin-inline: 1rem;
  }

  .control-dock {
    margin-inline: 1rem;
  }

  .info-band {
    grid-template-columns: 1fr;
  }

  .control-header,
  .opening-lane-head {
    align-items: flex-start;
  }

  .opening-book-header,
  .opening-lane,
  .opening-book-footnote {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .move-track {
    grid-template-columns: 1fr 1fr;
  }

  .match-title {
    order: 3;
    flex-basis: 100%;
  }

  .match-note {
    max-width: none;
  }

  .control-progress,
  .control-spec strong {
    width: 100%;
  }

  .control-line strong {
    min-width: 100%;
  }
}


@media (max-width: 760px) {
  .scene-glow-left,
  .scene-glow-right {
    opacity: 0;
  }
}

/* ── Cinematic overlays ─────────────────────────────────────────── */

.fight-flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding-bottom: 30vh;
  pointer-events: none;
  font-family: "Cinzel", "Avenir Next Condensed", serif;
  font-size: clamp(2.1rem, 5.4vw, 4.4rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffe6ae;
  text-shadow:
    0 0 4px rgba(255, 178, 84, 0.38),
    0 0 10px rgba(255, 132, 40, 0.18),
    0 3px 0 rgba(60, 18, 4, 0.9);
  opacity: 0;
}

.fight-flash.visible {
  animation: fightFlash 1.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fightFlash {
  0% {
    opacity: 0;
    transform: scale(1.5);
    filter: blur(1.5px);
  }
  18% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  68% {
    opacity: 1;
    transform: scale(0.97);
  }
  100% {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(1px);
  }
}

.winner-overlay {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 420ms ease, transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
  background:
    radial-gradient(ellipse at 50% 46%, transparent 0%, transparent 38%, rgba(16, 7, 3, 0.35) 70%, rgba(10, 4, 2, 0.6) 100%);
}

.winner-overlay.visible {
  opacity: 1;
  transform: scale(1);
}



/* ══ Pass 2 — Spectator HUD redesign ════════════════════════════ */

.game-shell {
  min-height: 100svh;
}

/* Non-spectator scaffolding stays hidden in the broadcast overlay */
.match-strip,
.match-core,
.telemetry,
.control-dock,
.info-band {
  display: none;
}

.hud-top {
  position: absolute;
  top: 3.45rem;
  right: 1.55rem;
  left: 1.55rem;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(18rem, 44vw) minmax(18rem, 44vw);
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(5rem, 16vw, 24rem);
  width: auto;
  padding: 0;
  transform: none;
  pointer-events: none;
}

/* ── Player panels — crisp near-black, gilded, perfect mirrors ── */
.player-panel {
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}

.player-panel-right {
  justify-self: end;
  text-align: right;
}

.player-panel-left {
  justify-self: start;
}

.player-panel::before {
  display: none;
}

.player-panel-right::before {
  display: none;
}

.player-tag {
  display: none;
}

.player-name {
  margin: 0 0 0.42rem;
  font-family: "Inter", sans-serif;
  font-weight: 750;
  font-size: clamp(1.05rem, 1.45vw, 1.72rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
  color: #fff2d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72);
}

.brain-line,
.decision-line,
.status-line {
  display: none;
}

.brain-line {
  display: none;
}

.brain-line.not-live {
  color: rgba(245, 193, 121, 0.92);
}

.brain-line.api-down {
  color: #ff6b57;
  font-weight: 700;
  animation: apiDownPulse 1.1s ease-in-out infinite;
}

/* ── Health bar — the star element ── */
.health-track {
  position: relative;
  height: 1.32rem;
  margin-top: 0;
  border-radius: 1px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.56)),
    linear-gradient(90deg, rgba(44, 31, 19, 0.92), rgba(11, 10, 9, 0.86));
  box-shadow:
    inset 0 0 0 2px rgba(223, 171, 77, 0.96),
    inset 0 0 0 4px rgba(21, 13, 8, 0.82),
    0 5px 11px rgba(0, 0, 0, 0.34);
  transform: skewX(-12deg);
  transform-origin: center;
}

.health-ghost {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 3px;
  background: rgba(255, 236, 198, 0.5);
}

.player-panel-left .health-ghost {
  inset: 0 0 0 auto;
}

.player-panel-right .health-ghost {
  inset: 0 auto 0 0;
}

.health-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 0;
  transition: width 110ms linear;
}

.player-panel-left .health-fill {
  margin-left: auto;
}

.player-panel-right .health-fill {
  margin-right: auto;
}

.health-fill-left {
  background: linear-gradient(90deg, #842717 0%, #d64d36 58%, #f1a064 100%);
  box-shadow: inset 0 0 12px rgba(255, 128, 84, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.health-fill-right {
  background: linear-gradient(90deg, #8cc6f1 0%, #4b8dca 45%, #234a76 100%);
  box-shadow: inset 0 0 12px rgba(90, 160, 232, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* keeps existing low-health pulse (healthPulse @keyframes already defined) */
.health-fill.health-low {
  animation: healthPulse 0.7s ease-in-out infinite;
}

/* damage flash overlay (toggled by JS via .health-hit) */
.health-track::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  pointer-events: none;
}

.health-track.health-hit::after {
  animation: healthHit 280ms ease-out;
}

@keyframes healthHit {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}

/* numeric value integrated INTO the bar */
.health-text {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #fff8ec;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.84);
  pointer-events: none;
  transform: skewX(12deg);
}

.player-panel-right .health-text {
  justify-content: flex-end;
}

/* ── Plan / Read stats (data face, single-line, no wrap) ── */
.plan-readout {
  display: none;
}

.plan-intent,
.plan-read {
  min-width: 0;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(238, 228, 210, 0.82);
}

.plan-read {
  color: rgba(238, 228, 210, 0.6);
  font-weight: 500;
}

.plan-read[data-outcome="correct"] {
  color: rgba(126, 226, 154, 0.85);
}

.plan-read[data-outcome="miss"] {
  color: rgba(255, 180, 77, 0.9);
}

/* ── Arena title plate ── */
.arena-title-pill {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  max-width: min(28rem, max(12rem, calc(100vw - 38rem)));
  padding: 0.55rem 1.18rem 0.5rem;
  border: 1px solid rgba(238, 207, 154, 0.42);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(18, 15, 13, 0.9), rgba(8, 7, 6, 0.84));
  color: rgba(255, 238, 206, 0.95);
  font-family: "Cinzel", serif;
  font-size: clamp(0.72rem, 1.05vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.78);
  pointer-events: none;
  backdrop-filter: blur(4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 198, 0.14),
    0 12px 30px rgba(0, 0, 0, 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Live Decisions feed ── */
.decision-feed {
  position: absolute;
  right: 1.1rem;
  bottom: 1rem;
  z-index: 2;
  width: min(23rem, calc(100vw - 2.2rem));
  padding: 0.75rem 0.8rem 0.55rem;
  border: 1px solid rgba(238, 207, 154, 0.34);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(18, 15, 13, 0.88), rgba(8, 7, 6, 0.84));
  color: rgba(238, 228, 210, 0.84);
  pointer-events: none;
  backdrop-filter: blur(5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 198, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.45);
}

.decision-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(238, 207, 154, 0.18);
}

.decision-feed-title {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(221, 184, 124, 0.9);
}

.decision-feed-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(238, 207, 154, 0.35);
  border-radius: 4px;
  background: rgba(238, 207, 154, 0.1);
  color: rgba(248, 230, 190, 0.92);
  pointer-events: auto;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.decision-feed-toggle-icon {
  display: block;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transition: transform 180ms ease;
}

.decision-feed-toggle:hover,
.decision-feed-toggle:focus-visible {
  border-color: rgba(255, 218, 151, 0.66);
  background: rgba(238, 207, 154, 0.18);
  color: #ffe7b8;
  transform: translateY(-1px);
}

.decision-feed-toggle:focus-visible {
  outline: 2px solid rgba(255, 196, 100, 0.55);
  outline-offset: 2px;
}

.decision-feed.is-collapsed {
  width: auto;
  min-width: min(14rem, calc(100vw - 2.2rem));
  padding: 0.62rem 0.68rem;
}

.decision-feed.is-collapsed .decision-feed-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.decision-feed.is-collapsed .decision-feed-toggle-icon {
  transform: translateY(0.1rem) rotate(-135deg);
}

.decision-feed.is-collapsed .decision-feed-list {
  display: none;
}

.decision-feed-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision-card {
  position: relative;
  display: grid;
  gap: 0.15rem;
  padding: 0.4rem 0.55rem 0.42rem 0.72rem;
  border-radius: 3px;
  background: rgba(255, 245, 228, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 228, 0.05);
  opacity: calc(1 - var(--age, 0) * 0.16);
}

.decision-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.decision-card-left::before {
  background: #e0552f;
  box-shadow: 0 0 5px rgba(224, 85, 47, 0.28);
}

.decision-card-right::before {
  background: #4f93d6;
  box-shadow: 0 0 5px rgba(79, 147, 214, 0.28);
}

.decision-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.decision-card-action {
  flex: none;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.decision-card-left .decision-card-action {
  color: #ff8a63;
}

.decision-card-right .decision-card-action {
  color: #86bdf2;
}

/* type overrides MUST follow the side rules (equal specificity) */
.decision-card-read-correct .decision-card-action {
  color: #7ee29a;
}

.decision-card-read-miss .decision-card-action {
  color: #ffb44d;
  text-shadow: 0 0 4px rgba(255, 150, 40, 0.25);
}

.decision-card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}

.decision-card-fighter {
  min-width: 0;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(238, 228, 210, 0.58);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.decision-card-count {
  flex: none;
  padding: 0.04rem 0.34rem;
  border-radius: 999px;
  background: rgba(238, 207, 154, 0.14);
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  color: #eac886;
  font-variant-numeric: tabular-nums;
}

.decision-card-detail {
  min-width: 0;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(238, 228, 210, 0.58);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.decision-card.is-newest {
  animation: cardIn 260ms ease-out;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: calc(1 - var(--age, 0) * 0.16);
    transform: translateY(0);
  }
}

/* ── Winner overlay (kicker/title Cinzel, sub Inter — no Cormorant) ── */
.winner-kicker {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(0.85rem, 1.4vw, 1.15rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(244, 224, 176, 0.9);
}

.winner-kicker::before,
.winner-kicker::after {
  content: "⚔";
  margin: 0 0.9em;
  opacity: 0.7;
}

.winner-title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffe9b8;
  text-shadow:
    0 0 26px rgba(255, 188, 96, 0.65),
    0 0 80px rgba(255, 140, 50, 0.35),
    0 5px 0 rgba(54, 16, 3, 0.95);
}

.winner-title::before,
.winner-title::after {
  content: "";
  display: block;
  width: min(42vw, 34rem);
  height: 1px;
  margin: 0.32rem auto;
  background: linear-gradient(90deg, transparent, rgba(235, 186, 104, 0.8), transparent);
}

.winner-overlay[data-side="p1"] .winner-title {
  color: #ffd2b0;
  text-shadow:
    0 0 26px rgba(255, 120, 84, 0.7),
    0 0 80px rgba(214, 64, 36, 0.4),
    0 5px 0 rgba(54, 10, 3, 0.95);
}

.winner-overlay[data-side="p2"] .winner-title {
  color: #cfe7ff;
  text-shadow:
    0 0 26px rgba(120, 190, 255, 0.7),
    0 0 80px rgba(56, 120, 214, 0.42),
    0 5px 0 rgba(8, 22, 44, 0.95);
}

.winner-sub {
  margin: 0.5rem 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(233, 226, 212, 0.82);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ── Mobile ── */
@media (max-width: 760px) {
  .hud-top {
    top: 0.6rem;
    right: 0.6rem;
    left: 0.6rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem;
    width: auto;
    transform: none;
  }
  .player-panel {
    width: 100%;
    max-width: none;
    padding: 0.55rem 0.6rem 0.6rem;
  }
  .player-name {
    font-size: 0.92rem;
  }
  .brain-line {
    display: none;
  }
  .plan-readout {
    display: none;
  }
  .arena-title-pill {
    display: none;
  }
  .health-track {
    height: 1rem;
  }
  .health-text {
    font-size: 0.66rem;
    padding: 0 0.35rem;
  }
  .decision-feed {
    right: 0.6rem;
    bottom: 0.6rem;
    width: min(19rem, calc(100vw - 1.2rem));
    padding: 0.6rem;
  }
  .decision-card-fighter {
    display: none;
  }
}

/* Compact reference HUD: one model/status line per side plus life bars. */
.hud-top {
  top: 3.45rem;
  right: 1.55rem;
  left: 1.55rem;
  z-index: 3;
  grid-template-columns: minmax(18rem, 44vw) minmax(18rem, 44vw);
  justify-content: space-between;
  gap: clamp(5rem, 16vw, 24rem);
  width: auto;
  padding: 0;
  transform: none;
}

.player-panel {
  max-width: none;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.player-panel-left {
  text-align: left;
}

.player-panel-right {
  text-align: right;
}

.player-tag,
.brain-line,
.decision-line,
.status-line,
.plan-readout {
  display: none;
}

.player-name {
  margin: 0 0 0.42rem;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.05rem, 1.45vw, 1.72rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
  color: #fff3dd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.58);
}

.health-track {
  height: 1.32rem;
  margin: 0;
  border-radius: 1px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.58)),
    linear-gradient(90deg, rgba(44, 31, 19, 0.92), rgba(11, 10, 9, 0.86));
  box-shadow:
    inset 0 0 0 2px rgba(223, 171, 77, 0.96),
    inset 0 0 0 4px rgba(21, 13, 8, 0.82),
    0 5px 11px rgba(0, 0, 0, 0.34);
  transform: skewX(-12deg);
}

.health-fill,
.health-ghost {
  border-radius: 0;
}

.health-text {
  display: flex;
  font-size: 0.78rem;
  transform: skewX(12deg);
}

.arena-title-pill {
  top: 0.9rem;
  z-index: 4;
  padding: 0.56rem 1.42rem 0.52rem;
  font-size: clamp(0.78rem, 1.08vw, 1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .hud-top {
    top: 3.25rem;
    right: 0.7rem;
    left: 0.7rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem;
  }

  .player-name {
    font-size: clamp(0.66rem, 3.1vw, 0.86rem);
  }

  .health-track {
    height: 1rem;
  }

  .health-text {
    display: none;
  }

  .arena-title-pill {
    display: block;
    top: 0.55rem;
    max-width: min(20rem, calc(100vw - 1.4rem));
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }
}
