:root {
  --bg: #0c1110;
  --panel: rgba(16, 24, 22, 0.86);
  --ink: #e7dfcf;
  --muted: #9aa396;
  --gold: #d7b56a;
  --rust: #c45c3e;
  --line: rgba(215, 181, 106, 0.28);
  --sea: #173038;
  font-family: "Segoe UI", "Candara", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.screen { min-height: 100%; }

#setup {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 120px;
}

.masthead h1 {
  font-family: Palatino, "Palatino Linotype", "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  color: var(--gold);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--gold);
  margin: 0 0 8px;
}

.lede {
  max-width: none;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.version-nav {
  margin: 16px 0 0;
  font-size: 13px;
}
.version-nav a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 181, 106, 0.35);
}
.version-nav a:hover { border-bottom-color: var(--gold); }

#setup.simple .setup-foot {
  justify-content: flex-end;
}

.setup-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 16px;
  align-items: center;
}

.weight-panel {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px 12px;
  background: #121917;
}
.weight-panel summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 13px;
  user-select: none;
  padding: 4px 0;
}
.weight-panel > .hint {
  margin: 6px 0 10px;
  font-size: 12px;
}
.weight-subpanel {
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.weight-subpanel > summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
  padding: 4px 0;
}
.weight-subpanel > .hint {
  margin: 4px 0 8px;
  font-size: 12px;
}
.weight-subpanel-main {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}
.weight-subpanel .weight-subpanel {
  margin-left: 8px;
  border-top-style: dashed;
}
.source-editor-sub {
  margin: 10px 0 2px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-editor-color {
  margin: 10px 0 0;
}
.source-editor-color label {
  display: grid;
  grid-template-columns: 8.5em auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.source-editor-color input[type="color"] {
  width: 2.6em;
  height: 2em;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #141c1a;
  cursor: pointer;
}
.source-editor-color-name {
  color: var(--gold);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.weight-grid {
  display: grid;
  gap: 8px;
  max-width: 560px;
}
.weight-grid label {
  display: grid;
  grid-template-columns: 11em 1fr 3.2em;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.weight-scale {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.weight-grid input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}
.settings-flags {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.weight-grid label.settings-flag,
.settings-flags .settings-flag {
  display: flex;
  grid-column: 1 / -1;
  color: var(--ink);
  white-space: normal;
}
.weight-grid label.settings-flag input[type="checkbox"],
.settings-flags .settings-flag input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
}
.weight-step {
  width: 26px;
  height: 26px;
  padding: 0;
  background: #141c1a;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
}
.weight-step:hover:not(:disabled) {
  border-color: var(--gold);
}
.weight-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.weight-val {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.setting-tip {
  cursor: help;
  border-bottom: 1px dotted rgba(201, 164, 90, 0.55);
  width: max-content;
  max-width: 100%;
}
.setting-tip-pop {
  position: fixed;
  z-index: 30;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 10px;
  background: #121917;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}
.weight-reset {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.weight-reset:hover {
  color: var(--gold);
  border-color: var(--gold);
}
#setup.simple .weight-panel {
  margin: 24px 0 0;
  max-width: 600px;
}

#search, select, #begin, #pause, #menu, #addPrime, #saveProgress, #uploadProgress, #uploadProgressSetup, #continueSaved {
  background: #141c1a;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}

#search { flex: 1; min-width: 0; }

.sort-label {
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.limit-continent {
  color: var(--ink);
}
.limit-continent input[type="checkbox"] {
  accent-color: var(--gold);
}

.picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.picker > .hint { grid-column: 1 / -1; }

.card {
  text-align: left;
  background: #121917;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.power-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.card-edit {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(215, 181, 106, 0.35);
  cursor: pointer;
}
.card-edit:hover { border-bottom-color: var(--gold); }

.source-editor {
  position: fixed;
  z-index: 30;
  width: min(360px, calc(100% - 24px));
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.source-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.source-editor-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.source-editor-who b { display: block; }
.source-editor-who small { color: var(--muted); }
.source-editor-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
}
.source-editor-close:hover { color: var(--gold); }
.source-editor-fields {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.source-editor-fields label {
  display: grid;
  grid-template-columns: 8.5em 1fr 4.2em 3.4em;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.source-editor-fields label.edited { color: var(--gold); }
.source-editor-fields input[type="number"] {
  width: 100%;
  min-width: 0;
  background: #141c1a;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--ink);
}
.source-editor-w {
  text-align: right;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.source-editor-d {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.source-editor-d.up { color: var(--gold); }
.source-editor-d.down { color: var(--rust); }
.source-editor-d.flat { color: var(--muted); }
.source-editor-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}
.source-editor-totals {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.source-editor-total {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.source-editor-held {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.source-editor-who small .source-editor-d { font-size: inherit; }

.card:hover, .card.selected { border-color: var(--gold); }
.card.selected { background: #1b2722; }

img.flag {
  display: inline-block;
  width: 16px;
  height: 12px;
  object-fit: cover;
  vertical-align: -1px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.28);
}
.card .flag {
  display: flex;
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  align-items: center;
}
.card .flag img {
  width: 22px;
  height: 16px;
}
.card b { display: block; font-weight: 600; }
.card small { color: var(--muted); }
.power { color: var(--gold); font-variant-numeric: tabular-nums; font-size: 13px; }

.setup-foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(transparent, #0c1110 28%);
}
.choice {
  flex: 1 1 220px;
  min-width: 0;
}
.setup-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

#begin {
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  border: none;
  padding: 12px 18px;
}
#begin:disabled { opacity: 0.4; cursor: not-allowed; }

#play { position: relative; height: 100%; overflow: hidden; }
#play:not(.hidden) {
  position: fixed;
  inset: 0;
  height: auto;
  min-height: 0;
}
#play.picking { cursor: crosshair; }
#map {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #0a1214;
}

body.weakest:has(#play:not(.hidden)) {
  overflow: hidden;
}
body.weakest:has(#setup:not(.hidden)) > #map {
  display: none;
}
body.weakest > #map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}
body.weakest #play {
  position: fixed;
  inset: 0;
  height: auto;
  min-height: 0;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}
body.weakest #play .hud,
body.weakest #play .event-card,
body.weakest #play .step-btn,
body.weakest #play .pause-weights,
body.weakest #play .tooltip {
  pointer-events: auto;
}

.hud {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}
.hud button, .hud ol, .hud label, .hud input, .hud-block, .meters, .hud a { pointer-events: auto; }

.opt-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.opt-ctrl input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
}
.speed-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.speed-ctrl input[type="range"] {
  width: 120px;
  accent-color: var(--gold);
}
.speed-ctrl input[type="number"] {
  width: 4.4em;
  background: #141c1a;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  font-variant-numeric: tabular-nums;
}
.speed-ctrl span {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
}

.hud.left {
  top: 86px;
  left: 16px;
  width: min(280px, 32vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100% - 220px);
  position: relative;
}

#targetsBlock,
#vassalsBlock {
  max-height: 36%;
  flex: 0 1 auto;
}

.hud-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  backdrop-filter: blur(8px);
}

.hud-block h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.hud.left ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hud.left li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hud.left li > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud.left li > span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.hud.left .swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}
.hud.left li.actor { color: inherit; }
.hud.left li.chain-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 8px;
  opacity: 0.85;
}
.hud.left li.chain-label.current { color: var(--gold); opacity: 1; }
.hud.left li.chain-label.retired,
.hud.left li.retired { color: var(--muted); opacity: 0.72; }
.hud.left li.chain-label:first-child { padding-top: 0; }
.hud.left li.pick { color: var(--gold); }
.hud.left li.dead { color: var(--muted); text-decoration: line-through; }
.chain-country[data-country-id] { cursor: help; }

.consumed-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  width: min(240px, 26vw);
  max-height: min(420px, calc(100vh - 220px));
  pointer-events: auto;
}
.consumed-panel::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 0;
  bottom: 0;
  width: 16px;
}
.consumed-panel li {
  display: block !important;
}

.board-block {
  padding: 8px 10px;
  flex: 0 0 auto;
}
.board-block h2 {
  margin-bottom: 4px;
}
#board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
}
#board li {
  font-size: 11px;
  padding: 1px 0;
}

.hud.top {
  top: 16px; left: 16px; right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.status-line { font-size: 18px; max-width: 70ch; }
.meters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--muted);
}
.meters-counts {
  display: flex;
  gap: 18px;
}
.meters span { color: var(--ink); font-variant-numeric: tabular-nums; }
.meters-run-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.run-bar {
  margin-top: 5px;
  height: 6px;
  background: #141c1a;
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.run-bar i {
  display: block;
  font-style: normal;
  height: 100%;
  width: 0;
  background: var(--gold);
  border-radius: inherit;
}

.match-card {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
}
.match-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.match-block + .match-block {
  padding-top: 10px;
  border-top: 1px solid rgba(201, 164, 90, 0.22);
}
.match-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.match-side {
  min-width: 0;
}
.match-foe {
  text-align: right;
}
.match-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.match-foe .match-head {
  flex-direction: row-reverse;
}
.match-who {
  min-width: 0;
}
.match-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-meta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.match-power {
  margin-top: 6px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.match-vs {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 12px;
  padding-top: 8px;
}
.event-card.underdog {
  border-color: var(--rust);
}
.match-card.underdog .match-vs,
.match-block.underdog .match-vs {
  color: var(--rust);
}
.match-card img.flag {
  width: 36px;
  height: 27px;
  flex-shrink: 0;
  vertical-align: middle;
}
.match-card .event-kind { color: var(--gold); margin-bottom: 8px; }
.match-card.underdog .event-kind { color: var(--rust); }
.match-result { margin-top: 10px; }
.match-meter {
  height: 8px;
  border-radius: 99px;
  background: rgba(196, 92, 62, 0.42);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.match-meter-actor {
  display: block;
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, #c9a45a, var(--gold));
  border-radius: 99px 0 0 99px;
}
.match-card.underdog .match-meter-actor,
.match-block.underdog .match-meter-actor {
  background: linear-gradient(90deg, #8a6a3a, #b89a62);
}

.event-card {
  --aside: calc(min(280px, 32vw) + 32px);
  position: absolute;
  left: var(--aside);
  right: 16px;
  bottom: 78px;
  width: min(720px, calc(100% - var(--aside) - 16px));
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px 14px;
  z-index: 5;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.event-kind {
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  margin-bottom: 6px;
}

#eventText {
  margin: 0 0 12px;
  font-family: Palatino, "Palatino Linotype", "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.35;
}
#eventText .reach-note {
  color: var(--gold);
  font-style: italic;
}

.event-targets {
  display: none;
  margin: 0 0 12px;
}
.event-targets ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 132px;
  overflow: auto;
}
.event-targets li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.event-targets li.pick { color: var(--gold); }

.bar {
  height: 3px;
  background: rgba(215,181,106,0.15);
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

.hud.bottom {
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.hud.bottom button { pointer-events: auto; }
#addPrime.armed {
  border-color: var(--gold);
  color: var(--gold);
}
#play.paused::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 12, 0.42);
  pointer-events: none;
  z-index: 2;
}
.pause-overlay {
  display: none;
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 7;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(600px, calc(100% - 32px));
  pointer-events: none;
}
#play.paused .pause-overlay {
  display: flex;
}
.pause-row {
  display: flex;
  align-items: center;
  gap: 28px;
}
.pause-title {
  font-family: Palatino, "Palatino Linotype", "Times New Roman", serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.55);
  user-select: none;
}
.pause-weights {
  pointer-events: auto;
  width: 100%;
  max-height: min(460px, 52vh);
  overflow: auto;
}
.pause-weights .weight-panel {
  margin: 0;
  background: var(--panel);
  backdrop-filter: blur(8px);
}
.pause-weights .weight-panel + .weight-panel {
  margin-top: 8px;
}
.pause-weights .weight-grid {
  max-width: none;
}
.step-btn {
  pointer-events: auto;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--panel);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.step-btn:hover:not(:disabled) {
  background: var(--gold);
  color: #1a1408;
}
.step-btn:disabled {
  opacity: 0.28;
  cursor: default;
}
.step-btn-play {
  width: 64px;
  border-radius: 32px;
  letter-spacing: -0.22em;
  padding-left: 2px;
}
#play.paused #pause {
  background: var(--gold);
  color: #1a1408;
  border-color: var(--gold);
}
#play.halted #pause {
  background: var(--gold);
  color: #1a1408;
  border-color: var(--gold);
}
#play.paused #phase::after {
  content: " · Paused";
}
#play.paused .bar i {
  opacity: 0.45;
}
.hint { color: var(--muted); font-size: 12px; }
.log-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 181, 106, 0.35);
  font-size: 13px;
  white-space: nowrap;
}
.log-link:hover { border-bottom-color: var(--gold); }

.tooltip {
  position: absolute;
  z-index: 6;
  background: #121917;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: auto;
  max-width: 300px;
}
.tooltip b { display: inline-flex; align-items: center; gap: 6px; }
.tip-break {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 2px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.tip-h {
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tip-pts {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tip-break i {
  font-style: normal;
  color: var(--gold);
}
.tip-none {
  grid-column: 1 / -1;
}
.tip-edit {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(215, 181, 106, 0.35);
  color: var(--gold);
  font: inherit;
  cursor: pointer;
}
.tip-edit:hover { border-bottom-color: var(--gold); }

@media (max-width: 860px) {
  .hud.left { display: none; }
  .event-card {
    --aside: 12px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    bottom: 70px;
  }
  #eventText { font-size: 18px; }
  .event-targets:not(.hidden) { display: block; }
  .match-card {
    padding: 0 0 10px;
  }
  .match-card img.flag {
    width: 28px;
    height: 21px;
  }
  .match-name { font-size: 13px; }
  .match-power { font-size: 14px; }
  .pause-overlay { gap: 12px; }
  .pause-row { gap: 12px; }
  .pause-title { font-size: clamp(28px, 8vw, 42px); }
  .step-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}
