/*
 * Shared appearance for the BattleClient, the DevClient combat screen and the
 * Replay Viewer. Own layout, responsive sizing, colors, native controls and
 * SVG presentation classes. JavaScript supplies authorized data and state
 * markers; CSS does not decide game rules or information rights. Bundled
 * Atkinson fonts keep offline rendering and PNG export looking the same.
 *
 * Look stylesheets. The @import lines below load one stylesheet per look or
 * panel from /assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/. CSS requires them before every other rule. This
 * list is the one place that names them: the local server reads it and
 * refuses to start when a listed file is missing, because a browser skips a
 * missing stylesheet without any error and the look would break silently.
 * The order matters: a later file wins a tie over an earlier one, and every
 * rule further down this file wins a tie over every imported rule. A look
 * that restyles an existing class must use a more specific selector or have
 * the old rule here removed.
 *
 * BattleClient. The eight src/styles/battleclient/ files come first: they
 * give live play (the BattleClient and the DevClient combat screen) the
 * BattleClient vision's grid, regions and tokens, one region per file, every
 * rule scoped to html[data-product-kind="combat_debugger"] and more specific
 * than the shared rules below, so the Replay Viewer never changes.
 *
 * Color tokens. The :root block is the one owner of the palette. Look files,
 * panels and the DevClient read these custom properties; no JavaScript file
 * holds a second copy. The one exception is the BattleClient's own token set
 * on #bc in src/styles/battleclient/base.css, which live play's chrome reads.
 * The static Matplotlib renderer mirrors the team and class colors
 * (src/marl_battlegrounds/rendering/scene_geometry.py), and
 * tests/palette-parity.test.js keeps the two equal.
 */
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/base.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/topbar.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/layout.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/scorebug.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/arena.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/deck.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/rail.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/battleclient/overlays.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/map-skins.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/obstacles.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/red-zone.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/spawns.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/team-identity.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/atmosphere.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/champions.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/health-text.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/statuses.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/icons.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/movement.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/basics.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/ultimates.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/requiems.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/heralds.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/fog.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/camera.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/hud.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/symbols-ui.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/life-bar.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/ledger.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/panels.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/shell.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/rune-scrubber.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/hotbar.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/champion-frame.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/focus-tally.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/controller-names.css");
@import url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/src/styles/palette.css");

/* The hidden symbol library at the end of index.html (#vision-symbols): the
   deck's class sigils and ability icons. It must never take space. */
#vision-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/assets/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/kamui-decision-live-battleground-2026.11.29-r3/viewer/assets/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
}

/*
 * The palette. Hex values are the Runefield V5 colors. Names say
 * what a color paints. Comments name the main use; look files may use a
 * token anywhere its meaning fits. Never change --export-backdrop or
 * --export-backdrop-grid: PNG export refuses any other backdrop, and the
 * High Contrast palette leaves them alone too.
 */
:root {
  color-scheme: dark;
  font-family:
    "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #0b1020;
  /*
   * Map floor color inside the arena SVG. Effects also use it for dark
   * outlines and backplates that must match the floor.
   */
  --battlefield: #111827;
  /*
   * Arena backdrop behind the SVG (.battlefield-shell): base color and the
   * 1 px grid lines drawn every 2rem. PNG export checks both exactly.
   */
  --export-backdrop: #111827;
  --export-backdrop-grid: rgb(42 58 84 / 17%);
  --surface: #101827;
  --surface-raised: #162134;
  --surface-soft: #1c2940;
  --border: #2a3a54;
  --border-bright: #49617f;
  --text: #f4f7fb;
  --text-muted: #9aa7b8;

  /*
   * Teams. --team-a and --team-b paint each team's ring and name color.
   * Field fills a champion's life, Light draws soft marks such as move
   * traces, Print is the value for light paper. Team B always carries a
   * shape cue as well, so color is never the only cue.
   */
  --team-a: #3d8bff;
  --team-a-field: #11264a;
  --team-a-light: #a9cbff;
  --team-a-print: #1d5fbf;
  --team-b: #ef4b4b;
  --team-b-field: #3b141b;
  --team-b-light: #ffb3ae;
  --team-b-print: #b8322f;

  /* Classes: halo, emblem and ability color of each class. */
  --class-mage: #b99cff;
  --class-warrior: #d8904f;
  --class-hunter: #8cc84b;
  --class-rogue: #3fd0a0;
  --class-priest: #f5c95a;

  /* Neutrals. */
  /* Keylines, outlines and the darkest shadows. */
  --ink: #0a0d14;
  /* Life level line, damage numbers and life text. */
  --life-ivory: #f1e7da;
  /* Empty track behind a life or charge meter. */
  --groove: #0d1119;
  /* Low life warning, at 30% life or less. */
  --cinder: #ff8f5a;
  /* Fallen champions, ash and the Red Zone floor. */
  --ash: #6b7385;
  /* Dark field of a fallen champion's token. */
  --grave-stone: #1a1f29;
  /* Silver of ward marks, Spawn Shield marks and neutral marks. */
  --ward-silver: #9aa6bc;
  /* Spawn Shield veil and the light over a waking spawn pad. */
  --moonward-veil: #dce6ff;
  /* Sight edges, the Agent POV rim and silver interface accents. */
  --moon-silver: #c9d4e8;
  /* Quiet interface text. */
  --ui-muted: #8c97ad;
  /* Main interface text. */
  --ui-text: #e6eaf2;
  /* Panel and card background. */
  --panel: #0f1624;
  /* Panel and card border. */
  --panel-edge: #243049;
  /* Red Zone border, x2 marks and the Home Fall glow. */
  --grave-bone: #d8ccb4;
  /* Grave Bone for light paper. */
  --grave-bone-print: #5a5346;

  /* Materials of class effects. */
  /* Bright center line of Mage bolts and Ultimate strokes. */
  --starcore: #f3eeff;
  /* Hot head of the Warrior's Charge. */
  --forge-white: #ffebd6;
  /* Shaded bronze of Warrior strokes. */
  --bronze-shade: #9c5b2e;
  /* Pale ice of the Hunter's Freezing Trap. */
  --rime: #b8f1ff;
  /* Ice shell around a frozen champion. */
  --frostglass: #7fd7f0;
  /* Cracks in the ice when a trap breaks. */
  --ice-crack: #6fa8d8;
  /* Dark venom of the Rogue's poison. */
  --venom-deep: #0f8f6a;
  /* Steel of Rogue blades. */
  --blade-silver: #c8d3dc;
  /* Bright gold light of Priest heals. */
  --dawnlight: #fff3c4;
  /* Deep amber edges of Priest marks and Freedom wings. */
  --amber-deep: #c8932e;
  /* Rest healing numbers and marks. */
  --moon-dew: #cfe3f0;
  /* Hunter leaves and wood. */
  --umber: #8a6a3a;
  /* Rogue smoke and afterimages. */
  --smoke: #3a404c;
  /*
   * A heal on a champion under Crippling Poison (Healing Reduction): Priest gold mixed 30%
   * toward Venom Deep.
   */
  --withered-gold: #b0b85f;
  /* Pale spines and spark of the Hunter's Shard Fan. */
  --yew-light: #ddf0c2;
  /* Warm gold of a Priest heal's number and the Ready mark. */
  --dawn-gold: #f5c95a;
  /* The faint Lift of the Agent POV sight veil (store Moon Mote). */
  --moon-mote: #cfdaf2;
  /* Alerts: the Oracle View tag in live play, offline and failed saves. */
  --alert: #ffb547;

  --accent: #22d3ee;
  --target: #f472b6;
  --success: #34d399;
  --warning: #facc15;
  --danger: #fb7185;
  --basic: #2dd4bf;
  --ultimate: #a78bfa;
  --unavailable: #64748b;
  --radius: 0.75rem;
  --shadow: 0 18px 40px rgb(0 0 0 / 28%);
}

* {
  box-sizing: border-box;
}

html body [hidden] {
  display: none;
}
html:not([data-product-kind]) [data-live-only],
html:not([data-product-kind]) [data-replay-only],
html:not([data-product-kind]) #battlefield-instructions,
html[data-product-kind="combat_debugger"] [data-replay-only],
html[data-product-kind="replay_viewer"] [data-live-only] {
  display: none;
}

.hud-section h2,
.help-dialog h2 {
  margin: 0;
  letter-spacing: -0.025em;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--text);
  background: rgb(73 97 127 / 18%);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.recording-panel__summary,
.recording-facts,
.recording-save-as {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.recording-panel__summary {
  align-items: flex-start;
  justify-content: space-between;
}

.recording-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.recording-facts {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
}

.recording-facts div {
  display: grid;
  min-width: 8rem;
  gap: 0.05rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: rgb(8 13 24 / 52%);
}

.recording-facts dt,
.recording-save-as label {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recording-facts dd {
  margin: 0;
  font-size: 0.78rem;
}

.recording-save-as {
  flex: 1 1 28rem;
}

.recording-save-as label {
  white-space: nowrap;
}

.recording-save-as input {
  min-width: min(23rem, 50vw);
  min-height: 2.25rem;
  flex: 1;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  background: var(--surface-raised);
  font: inherit;
}

.recording-save-as input:focus-visible {
  outline: 3px solid rgb(34 211 238 / 62%);
  outline-offset: 2px;
}

.recording-save-as input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.recording-panel__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.replay-timeline__transport,
.replay-artifact-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.replay-artifact-actions {
  justify-content: flex-end;
  min-inline-size: 0;
  padding: 0;
  border: 0;
  margin: 0;
}

.replay-artifact-actions button {
  min-height: 2rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.75rem;
}

.replay-timeline__transport {
  min-inline-size: 0;
  padding: 0;
  border: 0;
  margin: 0;
}

.replay-timeline__transport {
  display: grid;
  grid-template-columns:
    repeat(7, max-content) minmax(8rem, 1fr) max-content
    max-content;
}

.replay-timeline__transport button {
  min-width: 4rem;
}

.replay-timeline__slider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.replay-timeline__slider input {
  width: 100%;
  accent-color: var(--accent);
}

.replay-timeline__rate {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.replay-timeline__rate select {
  min-height: 2.15rem;
  padding-block: 0.3rem;
  font-variant-numeric: tabular-nums;
}

#replay-frame-position {
  min-width: 6.5rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: end;
}

#replay-transport-status {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.semantic-inspector {
  border-color: rgb(34 211 238 / 38%);
  background: linear-gradient(145deg, rgb(34 211 238 / 5%), rgb(16 24 39 / 92%));
}

.semantic-explanation__section {
  display: grid;
  gap: 0.55rem;
}

.semantic-explanation__summary,
.semantic-explanation__section-summary {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.semantic-explanation__rows {
  display: grid;
  grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
  gap: 0.25rem 0.65rem;
  margin: 0;
}

.semantic-explanation__rows dt {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.semantic-explanation__rows dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.semantic-explanation__heading {
  margin: 0.3rem 0 0;
  color: var(--text);
  font-size: 0.82rem;
}

.semantic-inspector[data-tone="warning"] {
  border-color: rgb(250 204 21 / 45%);
}

.semantic-inspector[data-tone="danger"] {
  border-color: rgb(251 113 133 / 55%);
}

.button--danger {
  border-color: rgb(251 113 133 / 55%);
  color: var(--danger);
  background: rgb(251 113 133 / 8%);
}

.hud-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(16 24 39 / 92%);
  box-shadow: var(--shadow);
}

.hud-section h2 {
  font-size: 1rem;
}

.battlefield-shell {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background:
    linear-gradient(var(--export-backdrop-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--export-backdrop-grid) 1px, transparent 1px),
    var(--export-backdrop);
  background-size: 2rem 2rem;
}

.battlefield-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(90%, 30rem);
  margin: 0;
  color: var(--text-muted);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#visual-tooltip.visual-tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(20rem, calc(100vw - 1rem));
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-bright);
  border-radius: 0.5rem;
  color: var(--text);
  background: rgb(8 13 24 / 98%);
  box-shadow: 0 10px 28px rgb(0 0 0 / 42%);
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
  overflow: auto;
}

#visual-tooltip.visual-tooltip::before {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border: solid var(--border-bright);
  background: rgb(8 13 24 / 98%);
  content: "";
  transform: rotate(45deg);
}

#visual-tooltip.visual-tooltip[data-tooltip-placement="right-below"]::before {
  top: -0.34rem;
  left: 0.8rem;
  border-width: 1px 0 0 1px;
}

#visual-tooltip.visual-tooltip[data-tooltip-placement="left-below"]::before {
  top: -0.34rem;
  right: 0.8rem;
  border-width: 1px 0 0 1px;
}

#visual-tooltip.visual-tooltip[data-tooltip-placement="right-above"]::before {
  bottom: -0.34rem;
  left: 0.8rem;
  border-width: 0 1px 1px 0;
}

#visual-tooltip.visual-tooltip[data-tooltip-placement="left-above"]::before {
  right: 0.8rem;
  bottom: -0.34rem;
  border-width: 0 1px 1px 0;
}

#visual-tooltip.visual-tooltip[hidden] {
  display: none;
}

/* A tip's text wraps at the tip's intended 20rem width. src/tooltip.js sets
   the box's max-width to the window when it places the tip, so the cap sits
   on the box's children instead. The Champion Card draws its own box. */
#visual-tooltip.visual-tooltip:not([data-tooltip-kind="champion"]) > * {
  max-inline-size: 20rem;
}

.visual-tooltip__title {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.visual-tooltip__details {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.visual-tooltip .semantic-explanation__summary,
.visual-tooltip .semantic-explanation__section-summary {
  font-size: 0.76rem;
}

.visual-tooltip .semantic-explanation__rows {
  grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr);
  margin-top: 0.35rem;
  font-size: 0.74rem;
}

/* Each team's Red Zone floor: a subtle deep-red tint under obstacles and bodies. */

.range-ring {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.range-ring-hit,
.pending-route-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 10;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.range-ring[data-kind="observation"] {
  stroke: var(--text);
  stroke-dasharray: 1 5;
}

.range-ring[data-kind="basic"] {
  stroke: var(--basic);
  stroke-width: 2;
  stroke-dasharray: 8 5;
}

.range-ring[data-kind="basic"][data-class="mage"] {
  stroke: var(--class-mage);
}

.range-ring[data-kind="basic"][data-class="warrior"] {
  stroke: var(--class-warrior);
}

.range-ring[data-kind="basic"][data-class="hunter"] {
  stroke: var(--class-hunter);
}

.range-ring[data-kind="basic"][data-class="rogue"] {
  stroke: var(--class-rogue);
}

.range-ring[data-kind="basic"][data-class="priest"] {
  stroke: var(--class-priest);
}

.range-ring[data-kind="ultimate"] {
  stroke: var(--ultimate);
  stroke-width: 2;
  stroke-dasharray: 10 4 2 4;
}

.pending-route {
  fill: none;
  stroke: var(--basic);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.pending-route[data-lane="1"] {
  stroke: var(--ultimate);
}

.pending-route[data-legal="false"] {
  stroke: var(--danger);
}

.combat-choreography,
.combat-choreography-connectors,
.combat-choreography-routes,
.combat-connector-effect,
.combat-route-effect,
.combat-effect {
  pointer-events: none;
}

.combat-choreography,
.combat-choreography-connectors,
.combat-choreography-routes {
  isolation: isolate;
}

.combat-effect,
.combat-connector-effect,
.combat-route-effect {
  color: var(--ultimate);
}

.combat-connector-effect[data-outcome="damage"] {
  color: var(--danger);
}

.combat-connector-effect[data-token-id="basic_damage"][data-source-class="mage"],
.combat-connector-effect[data-token-id="mage_burst"] {
  color: var(--class-mage);
}

.combat-connector-effect[data-token-id="basic_damage"][data-source-class="warrior"],
.combat-connector-effect[data-token-id="warrior_charge"],
.combat-connector-effect[data-token-id="stun_warrior_charge"],
.combat-connector-effect[data-token-id="slow_warrior_charge"] {
  color: var(--class-warrior);
}

.combat-connector-effect[data-token-id="basic_damage"][data-source-class="hunter"],
.combat-connector-effect[data-token-id="hunter_trap"],
.combat-connector-effect[data-token-id="stun_hunter_trap"],
.combat-connector-effect[data-token-id="slow_hunter_basic"] {
  color: var(--class-hunter);
}

.combat-connector-effect[data-token-id="basic_damage"][data-source-class="rogue"],
.combat-connector-effect[data-token-id="rogue_poison"],
.combat-connector-effect[data-token-id="stun_rogue_poison"],
.combat-connector-effect[data-token-id="slow_rogue_poison"],
.combat-connector-effect[data-token-id="anti_heal_rogue_poison"] {
  color: var(--class-rogue);
}

.combat-connector-effect[data-token-id="basic_heal"],
.combat-connector-effect[data-token-id="holy_word"],
.combat-connector-effect[data-outcome="healing"],
.combat-connector-effect[data-event-type="health_regenerated"] {
  color: var(--success);
}

.combat-connector-effect[data-token-id="priest_freedom"] {
  color: var(--class-priest);
}

.combat-connector-effect[data-outcome="unchanged"] {
  color: var(--text);
}

.combat-connector-effect[data-lifecycle="expired"] {
  color: var(--text-muted);
}

.combat-connector-effect[data-token-id="in_combat"] {
  color: #fff;
}

.combat-connector-effect[data-lifecycle="cleared_by_death"] {
  color: var(--danger);
}

.combat-connector-effect[data-lifecycle="cleared_unclassified"] {
  color: var(--unavailable);
}

.combat-effect[data-outcome="damage"] {
  color: var(--danger);
}

.combat-effect[data-token-id="holy_word"],
.combat-route-effect[data-token-id="holy_word"],
.combat-effect[data-outcome="healing"] {
  color: var(--success);
}

.combat-effect[data-token-id="mage_burst"],
.combat-route-effect[data-token-id="mage_burst"] {
  color: var(--class-mage);
}

.combat-effect[data-token-id="warrior_charge"],
.combat-route-effect[data-token-id="warrior_charge"] {
  color: var(--class-warrior);
}

.combat-effect[data-token-id="hunter_trap"],
.combat-route-effect[data-token-id="hunter_trap"] {
  color: var(--class-hunter);
}

.combat-effect[data-token-id="rogue_poison"],
.combat-route-effect[data-token-id="rogue_poison"] {
  color: var(--class-rogue);
}

.combat-effect[data-token-id="stun_warrior_charge"],
.combat-effect[data-token-id="slow_warrior_charge"] {
  color: var(--class-warrior);
}

.combat-effect[data-token-id="stun_hunter_trap"],
.combat-effect[data-token-id="slow_hunter_basic"] {
  color: var(--class-hunter);
}

.combat-effect[data-token-id="stun_rogue_poison"],
.combat-effect[data-token-id="slow_rogue_poison"],
.combat-effect[data-token-id="anti_heal_rogue_poison"] {
  color: var(--class-rogue);
}

.combat-effect[data-token-id="priest_freedom"] {
  color: var(--class-priest);
}

.combat-route__path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.combat-route__path {
  stroke-width: 2.5;
}

.combat-route__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 10;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
}

.combat-route__bridge-backplate {
  fill: var(--battlefield);
  stroke: var(--battlefield);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.combat-net__hit,
.combat-regeneration__hit {
  fill: transparent;
  stroke: none;
  pointer-events: fill;
}

.combat-impact__hit {
  fill: transparent;
  stroke: none;
  pointer-events: fill;
}

.combat-route-effect[data-token-id="holy_word"] .combat-route__path {
  stroke-width: 5;
  filter: drop-shadow(0 0 5px currentColor);
}

.combat-route-effect[data-token-id="warrior_charge"] .combat-route__path {
  stroke-width: 5;
  stroke-dasharray: 12 4;
}

.combat-route-effect[data-token-id="hunter_trap"] .combat-route__path {
  stroke-width: 3;
  stroke-dasharray: 3 4;
}

.combat-route-effect[data-token-id="rogue_poison"] .combat-route__path {
  stroke-width: 2;
  stroke-dasharray: 10 5 2 5;
}

.combat-impact__ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.combat-impact__core {
  fill: currentColor;
  opacity: 0.28;
}

.combat-impact__semantic {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.combat-impact__semantic--damage {
  stroke: var(--danger);
}

.combat-impact__semantic--healing {
  stroke: var(--success);
}

.combat-impact__semantic--neutral {
  stroke: var(--text-muted);
}

.combat-impact__icon {
  overflow: visible;
  color: currentColor;
}

.combat-cue__leader {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-dasharray: 2 4;
  opacity: 0.46;
  vector-effect: non-scaling-stroke;
}

.combat-effect[data-outcome="unchanged"] {
  color: var(--text);
}

.combat-effect[data-lifecycle="expired"] {
  color: var(--text-muted);
}

.combat-effect[data-token-id="in_combat"] {
  color: #fff;
}

.combat-effect[data-token-id="spawn_shield"] {
  color: #fff;
}

.combat-effect[data-lifecycle="cleared_by_death"] {
  color: var(--danger);
}

.combat-effect[data-lifecycle="cleared_unclassified"] {
  color: var(--unavailable);
}

.combat-semantic-pulse {
  color: var(--accent);
}

.combat-semantic-pulse__hit {
  fill: transparent;
  stroke: none;
  pointer-events: fill;
}

.combat-semantic-pulse__ring,
.combat-semantic-pulse__core,
.combat-semantic-pulse__mark {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.combat-semantic-pulse__ring {
  opacity: 0.72;
  stroke-dasharray: 3 3;
}

.combat-semantic-pulse__core {
  fill: rgb(8 15 29 / 82%);
  opacity: 0.92;
}

.combat-semantic-pulse__value {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}

.combat-semantic-pulse--cooldown-ready {
  color: var(--success);
}

.combat-lifecycle-ring__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 8;
  pointer-events: stroke;
}

.pov-observed-body {
  cursor: help;
}

.pov-observed-body__label {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-anchor: middle;
  pointer-events: none;
}

.pov-observed-body__statuses {
  pointer-events: all;
}

.pov-observed-status {
  cursor: help;
}

.pov-observed-status[data-effect-class="mage"] {
  color: var(--class-mage);
}

.pov-observed-status[data-effect-class="warrior"] {
  color: var(--class-warrior);
}

.pov-observed-status[data-effect-class="hunter"] {
  color: var(--class-hunter);
}

.pov-observed-status[data-effect-class="rogue"] {
  color: var(--class-rogue);
}

.pov-observed-status[data-effect-class="priest"] {
  color: var(--class-priest);
}

.pov-observed-status__box {
  fill: rgb(8 13 24 / 94%);
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pov-observed-status__icon {
  color: currentColor;
  pointer-events: none;
}

.pov-observed-status__duration {
  fill: var(--text);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 850;
  text-anchor: middle;
  pointer-events: none;
}

.controlled-halo,
.selected-reticle {
  fill: none;
  pointer-events: none;
}

.controlled-halo {
  stroke: #f4f7fb;
  stroke-width: 3;
  filter: drop-shadow(0 0 5px var(--accent));
  vector-effect: non-scaling-stroke;
}

.selected-reticle {
  stroke: var(--target);
  stroke-width: 3;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

.controlled-halo[hidden],
.selected-reticle[hidden] {
  display: none;
}

.legality-dock,
.status-dock,
.cooldown-dock,
.modifier-dock {
  pointer-events: none;
}

.status-cell,
.status-overflow,
.modifier-cell,
.modifier-overflow {
  pointer-events: all;
}

.dock-leader {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.status-cell__box,
.modifier-cell__box {
  fill: rgb(8 13 24 / 94%);
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.status-cell__value,
.modifier-cell__value,
.status-overflow__label,
.modifier-overflow__label {
  fill: var(--text);
  font-weight: 800;
  dominant-baseline: central;
  pointer-events: none;
}

.status-cell,
.status-overflow {
  color: var(--text-muted);
}

.status-cell[data-source-class="mage"] {
  color: var(--class-mage);
}

.status-cell[data-source-class="warrior"] {
  color: var(--class-warrior);
}

.status-cell[data-source-class="hunter"] {
  color: var(--class-hunter);
}

.status-cell[data-source-class="rogue"] {
  color: var(--class-rogue);
}

.status-cell[data-source-class="priest"] {
  color: var(--class-priest);
}

.status-cell[data-token-id="in_combat"],
.pov-observed-status[data-token-id="in_combat"] {
  color: #fff;
}

.modifier-cell {
  color: var(--accent);
}

.status-overflow,
.modifier-overflow {
  color: var(--text-muted);
}

.modifier-cell[data-token="warrior-mitigation"] {
  color: var(--class-warrior);
}

.modifier-cell[data-token="rogue-anti-heal"] {
  color: var(--class-rogue);
}

.modifier-cell[data-token="priest-freedom"] {
  color: var(--class-priest);
}

.modifier-cell[data-token="mage-burst"] {
  color: var(--class-mage);
}

.status-cell__icon,
.modifier-cell__icon {
  color: currentColor;
  pointer-events: none;
}

.status-cell__icon,
.roster-fact-token__icon {
  stroke-width: 2.6;
}

.status-cell__icon-compartment,
.status-cell__value-compartment {
  fill: none;
  stroke: none;
  pointer-events: none;
}

.status-cell__value {
  font-size: 10px;
  text-anchor: end;
}

.modifier-cell__value {
  font-size: 9px;
  letter-spacing: -0.02em;
  text-anchor: end;
}

.status-cell[data-icon-suppressed="true"] .status-cell__value,
.modifier-cell[data-icon-suppressed="true"] .modifier-cell__value {
  text-anchor: middle;
}

.status-cell[data-numeric-fallback="true"],
.modifier-cell[data-numeric-fallback="true"] {
  color: var(--text-muted);
}

.status-cell[data-numeric-fallback="true"] .status-cell__value,
.modifier-cell[data-numeric-fallback="true"] .modifier-cell__value,
.status-overflow__label,
.modifier-overflow__label {
  fill: currentColor;
}

.status-cell[data-visible-value-abbreviated="true"] .status-cell__value,
.modifier-cell[data-visible-value-abbreviated="true"] .modifier-cell__value {
  font-size: 8px;
  letter-spacing: -0.02em;
}

.status-overflow__label,
.modifier-overflow__label {
  font-size: 10px;
  text-anchor: middle;
}

.match-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.2rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--battlefield);
  font-size: 0.8rem;
}

.match-scoreboard__task {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.match-scoreboard__team {
  display: grid;
  grid-template: "label score" auto "policy result" auto / minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--team-a);
}

.match-scoreboard__team--b {
  border-left-color: var(--team-b);
}

.match-scoreboard__team-label {
  grid-area: label;
}

.match-scoreboard__team--a .match-scoreboard__team-label {
  color: #7db9ff;
}
.match-scoreboard__team--b .match-scoreboard__team-label {
  color: #ff9292;
}
.match-scoreboard__policy {
  grid-area: policy;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.match-scoreboard__score {
  grid-area: score;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.match-scoreboard__result {
  grid-area: result;
  justify-self: end;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
}
.match-scoreboard__result--victory {
  color: #89e5a8;
  background: #153c26;
}
.match-scoreboard__result--draw {
  color: #d5d9e1;
  background: #343b46;
}
.match-scoreboard__result--defeat {
  color: #fff;
  background: #721f2b;
}

.disclosure-body {
  min-width: 0;
  max-width: 100%;
  max-height: min(20rem, 30vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-block: contain;
  scrollbar-color: var(--border-bright) transparent;
  scrollbar-gutter: stable;
  scroll-padding-block: 0.45rem;
}

.hud-section {
  padding: 0.75rem;
  box-shadow: none;
}

.hud-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  list-style: none;
}

.hud-section > summary::-webkit-details-marker {
  display: none;
}

.hud-section > summary::after {
  flex: none;
  margin-left: auto;
  color: var(--text-muted);
  content: "▸";
  font-size: 0.85rem;
}

.hud-section[open] > summary::after {
  content: "▾";
}

.hud-section > summary .section-title {
  font-size: inherit;
}

.section-heading {
  justify-content: space-between;
}

.count-badge {
  min-height: 1.4rem;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.roster {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.roster-team {
  min-width: 0;
}

.roster-team__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.roster-team__heading h3 {
  margin: 0;
  color: var(--team-a);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roster-team[data-team="team-b"] .roster-team__heading h3 {
  color: var(--team-b);
}

.roster-team__rows {
  display: grid;
  gap: 0.42rem;
}

.roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-left: 0.25rem solid var(--team-a);
  border-radius: 0.5rem;
  background: #0b1220;
}

.roster-row[data-team="team-b"] {
  border-left-color: var(--team-b);
}

.roster-row[data-selected="true"] {
  box-shadow: inset 0 0 0 1px var(--target);
}

.roster-row--authorized {
  grid-template-columns: minmax(0, 1fr);
}

.roster-primary-action {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 0.16rem;
  border-color: transparent;
  color: inherit;
  background: transparent;
  text-align: left;
}

.roster-primary-action:hover:not(:disabled) {
  border-color: var(--border-bright);
  background: rgb(255 255 255 / 3%);
}

.roster-primary-action__summary {
  display: grid;
  min-width: 0;
}

.roster-row__facts {
  min-width: 0;
}

.roster-identity {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.roster-id {
  font-weight: 800;
}

.roster-id[data-class="mage"] {
  color: var(--class-mage);
}

.roster-id[data-class="warrior"] {
  color: var(--class-warrior);
}

.roster-id[data-class="hunter"] {
  color: var(--class-hunter);
}

.roster-id[data-class="rogue"] {
  color: var(--class-rogue);
}

.roster-id[data-class="priest"] {
  color: var(--class-priest);
}

.roster-class,
.roster-health {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.roster-health {
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.roster-fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.25rem;
}

.roster-fact-token,
.roster-fact-empty {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.12rem 0.32rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgb(17 24 39 / 78%);
  font-size: 0.66rem;
  line-height: 1.1;
}

.roster-fact-token--status {
  gap: 0.2rem;
  border-color: currentColor;
}

.roster-fact-token--status[data-source-class="mage"] {
  color: var(--class-mage);
}

.roster-fact-token--status[data-source-class="warrior"] {
  color: var(--class-warrior);
}

.roster-fact-token--status[data-source-class="hunter"] {
  color: var(--class-hunter);
}

.roster-fact-token--status[data-source-class="rogue"] {
  color: var(--class-rogue);
}

.roster-fact-token--status[data-source-class="priest"] {
  color: var(--class-priest);
}

.roster-fact-token__icon {
  width: 0.78rem;
  height: 0.78rem;
  flex: 0 0 0.78rem;
  color: currentColor;
  pointer-events: none;
}

.roster-fact-token__duration {
  min-width: 0.62rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}

.roster-fact-token--modifier {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  color: #a5f3fc;
}

.roster-fact-empty {
  border-color: transparent;
  padding-left: 0;
  background: transparent;
}

.fact-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
}

#selection-card {
  grid-template-columns: minmax(0, 1fr);
}

.semantic-inspector__details {
  grid-column: 1 / -1;
}

.fact {
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: #0b1220;
}

.fact span {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.action-card {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 0.55rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #080d18;
}

.accepted-action-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accepted-action-row {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-left: 0.25rem solid var(--team-a);
  border-radius: 0.45rem;
  background: #0b1220;
}

.accepted-action-row[data-team="team-b"] {
  border-left-color: var(--team-b);
}

.accepted-action-row__title,
.accepted-action-tuple h4,
.accepted-action-tuple__value {
  margin: 0;
}

.accepted-action-row__title {
  font-size: 0.8rem;
}

.accepted-action-row__title[data-class="mage"] {
  color: var(--class-mage);
}

.accepted-action-row__title[data-class="warrior"] {
  color: var(--class-warrior);
}

.accepted-action-row__title[data-class="hunter"] {
  color: var(--class-hunter);
}

.accepted-action-row__title[data-class="rogue"] {
  color: var(--class-rogue);
}

.accepted-action-row__title[data-class="priest"] {
  color: var(--class-priest);
}

.accepted-action-row__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.accepted-action-row__comparison[data-layout="single"] {
  grid-template-columns: minmax(0, 1fr);
}

.accepted-action-tuple {
  min-width: 0;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}

.accepted-action-tuple[data-kind="accepted"] {
  border-color: color-mix(in srgb, var(--success) 55%, var(--border));
}

.accepted-action-tuple h4 {
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.accepted-action-tuple__value {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.section-note {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.diagnostics-card {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.visual-filters__fieldset {
  min-inline-size: 0;
  margin: 0.65rem 0 0;
  padding: 0;
  border: 0;
}

.visual-filters__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.4rem;
  min-width: 0;
}

.visual-filters__option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  min-width: 0;
  padding: 0.42rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  color: var(--text);
  background: rgb(8 13 24 / 42%);
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1.3;
}

.visual-filters__option:hover {
  border-color: var(--border-bright);
  background: rgb(28 41 64 / 62%);
}

.visual-filters__option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.visual-filters__option input {
  width: 1rem;
  height: 1rem;
  margin: 0.05rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.visual-filters__option input:focus-visible {
  outline: 3px solid rgb(34 211 238 / 62%);
  outline-offset: 2px;
}

.visual-filters__ranges {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  margin-top: 0.4rem;
  padding: 0.48rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  color: var(--text);
  background: rgb(8 13 24 / 42%);
  font-size: 0.75rem;
}

.visual-filters__ranges > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.visual-filters__ranges span {
  color: var(--text-muted);
  line-height: 1.35;
}

.visual-filters__ranges button {
  flex: none;
  min-height: 1.9rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

.visual-filters__ranges button[aria-pressed="true"] {
  border-color: rgb(34 211 238 / 58%);
  color: #a5f3fc;
  background: rgb(34 211 238 / 12%);
}

.visual-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

fieldset.visual-filters__actions {
  min-inline-size: 0;
  margin-inline: 0;
  margin-bottom: 0;
  padding: 0;
  border: 0;
}

.visual-filters__actions button {
  min-height: 1.9rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

.diagnostics summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
}

.visual-tooltip[data-tooltip-accent="mage"] .visual-tooltip__title,
.semantic-inspector[data-accent="mage"] summary {
  color: var(--class-mage);
}

.visual-tooltip[data-tooltip-accent="warrior"] .visual-tooltip__title,
.semantic-inspector[data-accent="warrior"] summary {
  color: var(--class-warrior);
}

.visual-tooltip[data-tooltip-accent="hunter"] .visual-tooltip__title,
.semantic-inspector[data-accent="hunter"] summary {
  color: var(--class-hunter);
}

.visual-tooltip[data-tooltip-accent="rogue"] .visual-tooltip__title,
.semantic-inspector[data-accent="rogue"] summary {
  color: var(--class-rogue);
}

.visual-tooltip[data-tooltip-accent="priest"] .visual-tooltip__title,
.semantic-inspector[data-accent="priest"] summary {
  color: var(--class-priest);
}

.empty-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.help-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(0 0 0 / 58%);
}

.help-dialog::backdrop {
  background: rgb(3 7 18 / 76%);
  backdrop-filter: blur(3px);
}

.help-grid {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 0.4rem 0.9rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #0b1220;
}

.help-grid dt {
  color: var(--accent);
  font-weight: 750;
}

.help-grid dd {
  margin: 0;
  color: var(--text-muted);
}

.help-note {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.noscript {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid var(--danger);
  color: #fecdd3;
  background: var(--surface);
}

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

@media (max-width: 70rem) {
  .replay-timeline__transport {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .replay-timeline__transport button {
    min-width: 0;
  }

  .replay-timeline__slider {
    grid-column: 1 / -2;
  }

  .replay-timeline__rate {
    grid-column: 1 / 3;
  }

  #replay-transport-status {
    grid-column: 3 / -1;
    text-align: end;
  }
}

@media (max-width: 42rem) {
  .replay-artifact-actions {
    justify-content: flex-start;
  }

  .recording-panel__summary {
    align-items: stretch;
    flex-direction: column;
  }

  .recording-facts {
    justify-content: stretch;
  }

  .recording-facts div {
    flex: 1 1 9rem;
  }

  .recording-save-as {
    align-items: stretch;
    flex-direction: column;
  }

  .recording-save-as input {
    width: 100%;
    min-width: 0;
  }

  .fact-card {
    grid-template-columns: 1fr;
  }

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

  .visual-filters__options {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 40rem) and (min-width: 42.0625rem) {
  .hud-section h2 {
    font-size: 0.9rem;
  }
}

.metric-table {
  display: block;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}

.metric-table thead,
.metric-table tbody {
  display: block;
  scrollbar-gutter: stable;
}

.metric-table thead {
  overflow: hidden;
}

.metric-table tbody {
  max-height: min(30rem, 55vh);
  overflow: auto;
}

.metric-table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.metrics-progress {
  inline-size: 8rem;
  block-size: 0.5rem;
  accent-color: #7db9ff;
}

.metric-preparation {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.metric-preparation small {
  flex-basis: 100%;
  color: var(--text-muted);
}

.metric-table th,
.metric-table td {
  padding: 0.5rem 0.35rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.metric-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 400;
}

.metric-table td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

.metric-table small {
  color: var(--text-muted);
}

#evaluation-metrics select {
  width: 100%;
  margin: 0.3rem 0 0.7rem;
}

/* Metric controls stay outside the scrolling measurement table. */
#evaluation-metrics .disclosure-body {
  max-height: none;
  overflow: visible;
}

#metric-rows {
  border-top: 1px solid var(--border);
}

.metric-search {
  margin-bottom: 0.75rem;
}

#metric-search {
  width: 100%;
  box-sizing: border-box;
  margin-block: 0.3rem;
  padding: 0.45rem 0.7rem;
}

.metric-search-results {
  list-style: none;
  margin: 0.4rem 0;
  padding: 0;
  max-height: min(20rem, 40vh);
  overflow: auto;
}

.metric-search-results button {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 0.6rem;
  text-align: left;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  white-space: normal;
  overflow-wrap: anywhere;
}

.metric-search-results code,
.metric-search-results small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.metric-search-results button[aria-selected="true"] {
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.metric-search-definition {
  margin-top: 0.6rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.metric-search-definition dt {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.metric-search-definition dd {
  margin: 0.15rem 0 0;
}

.metric-table tr.metric-search-match {
  background: rgb(240 255 79 / 10%);
  outline: 2px solid #f0ff4f;
  outline-offset: -2px;
}

.metric-table th:first-child,
.metric-table td:first-child {
  width: 30%;
  color: var(--text-muted);
}

.metric-table th:nth-child(2),
.metric-table td:nth-child(2) {
  width: 43%;
}

.metric-table small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
}

.metric-table .metric-value,
.metric-table th:last-child {
  text-align: right;
  width: 27%;
}

.metric-table .metric-section th {
  width: 100%;
  text-align: left;
  padding-top: 0.7rem;
  color: var(--text);
  font-weight: 600;
}

.metric-measure {
  cursor: help;
  text-decoration: underline dotted var(--text-muted);
  text-underline-offset: 0.2em;
}

.metric-measure:focus-visible {
  outline: 1px solid var(--text-muted);
  outline-offset: 3px;
  border-radius: 2px;
}

.metric-condition {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Controller labels use the existing roster layout, including long local names. */
.roster-controller {
  color: var(--text-muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
