:root {
  --bg: #080c14;
  --navy: #0a101c;
  --panel: rgba(8, 12, 22, 0.78);
  --panel-solid: #0c121e;
  --cyan: #2adce8;
  --cyan-hot: #7af6ff;
  --cyan-dim: #1488a0;
  --teal: #1ec8c0;
  --pink: #e85a8a;
  --pink-hot: #ff7aa8;
  --magenta: #c04088;
  --crimson: #e04060;
  --gold: #f0c430;
  --gold-hot: #ffe060;
  --green: #4ade80;
  --green-dim: #8db820;
  --orange: #f08840;
  --purple: #a060e8;
  --ink: #e8eef8;
  --muted: #6a8098;
  --board: #f7f4e4;
  --hp: #3dcc7a;
  --enemy-hp: #e05070;
  --end: #e45a7a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Rajdhani", "Exo 2", "Segoe UI", sans-serif;
  user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  background: var(--bg);
}

#c {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hidden { display: none !important; }

button { font-family: inherit; cursor: pointer; }

/* ========== FLOATING WORLD LABELS ========== */
#float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.floater {
  position: absolute;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  pointer-events: none;
  font-family: "Exo 2", "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.floater.dmg {
  font-size: 15px;
  color: #ff9ad0;
  text-shadow: 0 0 10px #ff40a0;
}
.floater.heal {
  font-size: 14px;
  color: #7affb0;
  text-shadow: 0 0 10px #30e080;
}
.floater.score {
  font-size: 15px;
  color: #ffe060;
  text-shadow: 0 0 12px #f0c430;
}
.floater.ink {
  font-size: 13px;
  color: #7af6ff;
  text-shadow: 0 0 10px #2adce8;
}

.unit-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 110px;
}
.unit-tag .name-chip {
  font-family: "Exo 2", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px 2px;
  border-radius: 3px 8px 3px 3px;
  color: #fff;
  display: flex;
  gap: 6px;
  align-items: center;
}
.unit-tag .name-chip.kuro { background: #123038; border: 1px solid #2adce8; color: #d8ffff; }
.unit-tag .name-chip.kuro .ap { color: #7af6ff; }
.unit-tag .name-chip.beni { background: #3a1824; border: 1px solid #e85a8a; color: #ffd0dc; }
.unit-tag .name-chip.tengu { background: #2a1030; border: 1px solid #c060b0; color: #ffd0f0; }
.unit-tag .name-chip.tengu .elite {
  background: #e04070;
  color: #fff;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.12em;
}
.unit-tag .name-chip.golem { background: #222018; border: 1px solid #c8b070; color: #f0e0b0; }
.unit-tag .name-chip.golem .def {
  background: #5a5040;
  color: #ffe9a0;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 2px;
}
.unit-tag .name-chip.larva { background: #241430; border: 1px solid #a060e8; color: #e8d0ff; }
.unit-tag .hp-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #b8e0c8;
  text-shadow: 0 1px 4px #000;
}
.unit-tag .hp-chip .ink { color: #7af6ff; }
.unit-tag .hpbar {
  width: 78px;
  height: 5px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.unit-tag .hpbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c04060, #e07088);
}
.unit-tag .hpbar.ally i {
  background: linear-gradient(90deg, #2aa868, #4ade80);
}

.crit-preview {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: none;
  text-align: center;
}
.crit-preview .box {
  background: #f0c430;
  color: #2a1800;
  font-family: "Exo 2", sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 10px 3px;
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(240, 196, 48, 0.55);
}
.crit-preview .sub {
  background: #3a2a08;
  color: #f0c430;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  margin-top: 2px;
  border-radius: 3px;
}
.crit-preview .atk {
  color: #ffd080;
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
  text-shadow: 0 1px 4px #000;
}

.tile-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: "Exo 2", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
}
.tile-chip.corrosive { background: #6a2030; border: 1px solid #c04050; }
.tile-chip.kiwell { background: #3a3010; color: #ffe060; border: 1px solid #f0c430; }
.tile-chip.link {
  background: rgba(20, 30, 40, 0.7);
  color: #7af6ff;
  border: 1px solid #2adce8;
  font-size: 9px;
}

/* ========== HUD ========== */
#hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

#hud button, #hud .abil { pointer-events: auto; }

#title-block {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 8;
}

.title-seal {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(200, 50, 80, 0.45);
  flex: 0 0 42px;
}
.title-seal.lg { width: 56px; height: 56px; border-radius: 10px; }

.title-name {
  font-family: "Outfit", "Exo 2", sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 2.05vw, 28px);
  color: #f2f6fb;
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow: 0 0 16px rgba(42, 220, 232, 0.25);
}
.title-name.lg { font-size: 36px; }
.title-sub {
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-top: 3px;
  text-shadow: 0 0 10px rgba(42, 220, 232, 0.4);
}

/* TIMELINE */
#timeline {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 620px;
  z-index: 8;
}
.tl-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding: 0 8px 4px;
}
.tl-head span:last-child { color: #c8d0e0; letter-spacing: 0.12em; }
.tl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 16, 28, 0.72);
  border: 1px solid rgba(42, 220, 232, 0.18);
  border-radius: 20px;
  padding: 6px 10px;
}
.tl-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tl-chip .badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
}
.tl-chip .who { display: flex; flex-direction: column; line-height: 1.05; }
.tl-chip .who b { font-size: 11px; }
.tl-chip .who em { font-size: 8px; font-style: normal; letter-spacing: 0.12em; opacity: 0.85; }
.tl-chip.kuro { background: #123038; border-color: #2adce8; color: #d8ffff; box-shadow: 0 0 10px rgba(42, 220, 232, 0.35); }
.tl-chip.kuro .badge { background: #1aa8c0; }
.tl-chip.tengu { background: #3a1830; border-color: #e05080; color: #ffd0dc; }
.tl-chip.tengu .badge { background: #e05080; }
.tl-chip.beni { background: #3a2010; border-color: #e08040; color: #ffd8b0; }
.tl-chip.beni .badge { background: #e07030; }
.tl-chip.golem { background: #1e2810; border-color: #8db820; color: #d8f0a0; }
.tl-chip.golem .badge { background: #6a9020; }
.tl-chip.larva { background: #241438; border-color: #9050d0; color: #e8d0ff; }
.tl-chip.larva .badge { background: #8040c8; }
.tl-arrow { color: #4a6078; font-size: 10px; }

/* SCORE */
#score-block {
  position: absolute;
  top: 10px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  z-index: 8;
}
.score-col { text-align: right; }
.score-lab {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.score-num {
  font-family: "Outfit", "Exo 2", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #f4f7fb;
  line-height: 1;
  letter-spacing: 0.02em;
}
.wave-num {
  font-family: "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #f4f7fb;
  line-height: 1.1;
}
.fps-badge {
  background: linear-gradient(180deg, #14d8d0, #0aa8b0);
  color: #041418;
  border-radius: 6px;
  padding: 6px 10px 5px;
  min-width: 88px;
  text-align: center;
  box-shadow: 0 0 14px rgba(20, 216, 208, 0.4);
}
.fps-eng { font-family: "Exo 2", sans-serif; font-weight: 900; font-size: 11px; letter-spacing: 0.08em; }
.fps-sub { font-size: 9px; font-weight: 800; letter-spacing: 0.04em; }

/* LEFT / RIGHT COLUMNS */
#left-col {
  position: absolute;
  top: 78px;
  left: 14px;
  width: 292px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 7;
  pointer-events: auto;
}
#right-col {
  position: absolute;
  top: 78px;
  right: 14px;
  width: 292px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 7;
  pointer-events: auto;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(42, 220, 232, 0.22);
  border-radius: 10px;
  padding: 10px 12px 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.inspect-panel { border-color: rgba(232, 90, 138, 0.4); }
.tether-panel { border-color: rgba(30, 200, 192, 0.3); }
.log-panel { border-color: rgba(42, 220, 232, 0.22); }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}
.panel-head.cyan { color: var(--cyan); }
.panel-head.pink { color: var(--pink-hot); }
.panel-head.teal { color: var(--teal); }
.panel-head.dim { color: var(--cyan-dim); opacity: 0.95; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.dot.cyan { background: var(--cyan); }
.dot.pink { background: var(--pink-hot); }

.avatar-card {
  border-radius: 8px;
  padding: 8px 10px 10px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.avatar-card.kuro {
  border-color: rgba(42, 220, 232, 0.55);
  background: linear-gradient(180deg, rgba(18, 48, 58, 0.55), rgba(10, 18, 28, 0.4));
  box-shadow: inset 0 0 0 1px rgba(42, 220, 232, 0.12);
}
.avatar-card.beni {
  border-color: rgba(232, 90, 138, 0.55);
  background: linear-gradient(180deg, rgba(58, 20, 36, 0.5), rgba(10, 18, 28, 0.4));
}
.avatar-card.active-glow.kuro { box-shadow: 0 0 14px rgba(42, 220, 232, 0.35); }
.avatar-card.active-glow.beni { box-shadow: 0 0 14px rgba(232, 90, 138, 0.35); }

.av-row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.portrait {
  width: 48px; height: 48px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.portrait span {
  position: relative;
  z-index: 1;
  font-family: "Exo 2", sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px #000;
}
.portrait.kuro { background: #0a1820; border: 1.5px solid #2adce8; color: #7af6ff; }
.portrait.beni { background: #201018; border: 1.5px solid #e08040; color: #ffd080; }

.av-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f0f4f8;
}
.avatar-card.kuro .av-name { color: #d8ffff; }
.avatar-card.beni .av-name { color: #ffd8c8; }
.av-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 1px 6px;
  border-radius: 2px;
  background: #1aa0b8;
  color: #041418;
  margin: 2px 0;
}
.av-tag.pink { background: #e07090; color: #1a0810; }
.av-stance {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat-line {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 4px 0 2px;
}
.stat-line b { color: #c8d4e0; font-weight: 700; }

.bar {
  height: 7px;
  background: rgba(4, 10, 18, 0.85);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.bar i { display: block; height: 100%; border-radius: 4px; }
.bar.hp i {
  width: 87%;
  background: linear-gradient(90deg, #2aa060, #4ade80);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.45);
}
.bar.hp.enemy i {
  background: linear-gradient(90deg, #a02840, #e05070);
  box-shadow: 0 0 8px rgba(224, 80, 112, 0.4);
  width: 59%;
}
.bar.ink.kuro i {
  width: 85%;
  background: linear-gradient(90deg, #1488b0, #2adce8);
}
.bar.ink.beni i {
  width: 40%;
  background: linear-gradient(90deg, #c06030, #e88840);
}

.swap-pill {
  display: block;
  width: 100%;
  margin: 2px 0 10px;
  background: #1a1808;
  border: 1.5px solid #f0c430;
  color: #f0c430;
  font-family: "Exo 2", sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: 18px;
  box-shadow: 0 0 12px rgba(240, 196, 48, 0.25);
}
.swap-pill:hover { background: #2a240c; }

.max-lvl {
  font-size: 9px;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.tether-pips { display: flex; gap: 8px; margin: 6px 0 8px; }
.tether-pips i {
  flex: 1;
  height: 10px;
  border-radius: 3px;
  background: #123038;
  border: 1px solid #1a6070;
}
.tether-pips i.on { background: linear-gradient(90deg, #1aa8b8, #2adce8); box-shadow: 0 0 8px rgba(42, 220, 232, 0.5); }
.tether-pips i.on.gold { background: linear-gradient(90deg, #d0a020, #f0c430); box-shadow: 0 0 8px rgba(240, 196, 48, 0.5); }
.tether-blurb {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 4px;
}
.tether-ready {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--green);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}
.tether-ready.off { color: var(--muted); text-shadow: none; }

/* INSPECT */
.insp-name {
  font-family: "Outfit", "Exo 2", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}
.insp-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--pink);
  margin: 2px 0 8px;
}
.aff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.aff-box {
  background: rgba(8, 10, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
}
.aff-lab { font-size: 8px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); }
.aff-val { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; margin-top: 2px; }
.aff-val.crimson { color: #e86080; }
.aff-val.resist { color: #9098a8; }
.next-act {
  background: #2a1020;
  border: 1px solid #803050;
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
}
.next-lab { font-size: 8px; font-weight: 800; letter-spacing: 0.1em; color: #c07090; }
.next-val { font-size: 11px; font-weight: 700; color: #ffd0dc; margin-top: 2px; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}
.status-pill.bleed { background: #4a1828; color: #ff90b0; border: 1px solid #e05080; }
.status-pill.tether { background: #103038; color: #7af6ff; border: 1px solid #2adce8; }
.status-pill.stun { background: #3a3010; color: #f0c430; border: 1px solid #c0a030; }

/* LOG */
#combat-log {
  font-family: "Share Tech Mono", "Rajdhani", monospace;
  font-size: 10.5px;
  line-height: 1.55;
  color: #6a90b0;
  min-height: 92px;
  max-height: 120px;
  overflow: hidden;
}
#combat-log .lg { color: #40c8e0; }
#combat-log .ly { color: #e8c040; }
#combat-log .lgd { color: #40e070; }
#combat-log .lp { color: #e070a0; }
#combat-log .hint { color: #7af6ff; }

.hint-box {
  background: rgba(6, 10, 16, 0.82);
  border: 1px solid rgba(80, 100, 130, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8aa0b8;
  line-height: 1.45;
}

/* ACTION BAR */
#action-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid rgba(42, 220, 232, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 8;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.ap-block {
  width: 132px;
  padding: 4px 8px 4px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ap-lab { font-size: 9px; font-weight: 800; letter-spacing: 0.16em; color: var(--muted); }
.ap-pips { display: flex; gap: 6px; margin: 8px 0 6px; }
.ap-pips i {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #1a6070;
  color: #4a7080;
  background: #0a1218;
}
.ap-pips i.on {
  border-color: #2adce8;
  color: #041418;
  background: radial-gradient(circle at 40% 35%, #7af6ff, #1aa8c0);
  box-shadow: 0 0 10px rgba(42, 220, 232, 0.55);
}
.ap-avail { font-size: 10px; font-weight: 800; color: var(--cyan); letter-spacing: 0.06em; }
.ap-active { font-size: 9px; color: var(--muted); margin-top: 2px; }

.abil {
  width: 148px;
  background: #0c1420;
  border: 1.5px solid #1e3048;
  border-radius: 8px;
  color: #d0dce8;
  padding: 6px 8px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.abil:hover { border-color: #3a6080; transform: translateY(-1px); }
.abil.selected {
  border-color: #2adce8;
  background: #0c2838;
  box-shadow: 0 0 16px rgba(42, 220, 232, 0.35);
}
.abil.vortex { border-color: #403060; }
.abil.vortex.selected { border-color: #a060e8; background: #1c1430; }
.abil.dual { border-color: #806018; }
.abil.dual.selected { border-color: #f0c430; background: #2a220c; box-shadow: 0 0 16px rgba(240, 196, 48, 0.3); }
.abil.swap { border-color: #803050; }
.abil.end {
  width: 128px;
  background: linear-gradient(180deg, #e07090, #c04068);
  border: none;
  color: #fff;
  text-align: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(224, 80, 112, 0.4);
}
.abil.end:hover { filter: brightness(1.08); }

.abil-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.abil.selected .abil-top { color: var(--cyan-hot); }
.abil.dual .abil-top { color: #f0c430; }
.abil.swap .abil-top { color: #e07090; }
.abil-icon {
  width: 28px; height: 28px;
  object-fit: contain;
  margin: 2px auto 0;
  filter: drop-shadow(0 0 6px rgba(42, 220, 232, 0.4));
}
.abil-name {
  font-family: "Exo 2", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  margin-top: 2px;
}
.abil.selected .abil-name { color: #7af6ff; }
.abil.dual .abil-name { color: #f0c430; }
.abil.swap .abil-name { color: #ff90b0; }
.abil.vortex .abil-name { color: #c8a0ff; }
.abil-desc {
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
  color: #7a90a8;
}
.abil-desc em { font-style: normal; color: #4ade80; }
.abil.selected .abil-desc b { color: #7af6ff; }

.end-title {
  font-family: "Outfit", "Exo 2", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.end-key {
  display: inline-block;
  background: #8a2848;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 4px auto;
}
.end-sub { font-size: 9px; line-height: 1.3; opacity: 0.92; }

/* MENUS */
#menu, #pause, #results {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(12, 24, 40, 0.55), rgba(4, 8, 14, 0.88));
  pointer-events: auto;
}
.menu-card {
  width: min(640px, 92vw);
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(42, 220, 232, 0.3);
  border-radius: 16px;
  padding: 28px 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(42, 220, 232, 0.08);
}
.menu-card.slim { width: min(360px, 90vw); text-align: center; }
.menu-title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.menu-blurb {
  font-size: 14px;
  line-height: 1.5;
  color: #a8b8c8;
  margin: 8px 0 16px;
}
.menu-blurb b { color: #7af6ff; }
.menu-art {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 10px 0 18px;
}
.menu-art img {
  height: 88px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(42, 220, 232, 0.35));
}
.menu-btns { display: flex; gap: 10px; }
.menu-card button, .menu-card.slim button {
  flex: 1;
  background: linear-gradient(180deg, #2adce8, #1498a8);
  color: #041418;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: "Exo 2", sans-serif;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 13px;
}
.menu-card button.ghost {
  background: transparent;
  border: 1.5px solid #2adce8;
  color: #7af6ff;
}
.menu-card button:disabled { opacity: 0.45; cursor: wait; }
.menu-controls {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
kbd {
  display: inline-block;
  background: #1a2434;
  border: 1px solid #3a5068;
  border-radius: 3px;
  padding: 0 5px;
  font-family: "Share Tech Mono", monospace;
  font-size: 10px;
  color: #c8e0f0;
}
.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 18px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.res-grid b { display: block; color: #fff; font-size: 22px; font-family: "Outfit", sans-serif; }

#toast {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
  background: rgba(8, 16, 28, 0.82);
  border: 1px solid var(--cyan);
  color: var(--cyan-hot);
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(42, 220, 232, 0.35);
}

@media (max-width: 1280px) {
  #left-col, #right-col { width: 250px; }
  .abil { width: 124px; }
  #timeline { min-width: 520px; transform: translateX(-50%) scale(0.92); }
}
@media (max-width: 1100px) {
  #left-col, #right-col { transform: scale(0.86); transform-origin: top left; }
  #right-col { transform-origin: top right; }
}
