/* Empire Rumble home board (private candidate v2). docs/LOOK-DIRECTION.md furniture: 0 px corners, Midnight plates,
   side bars, no pills, no glass blur, no glow, bundled weights only (Barlow 400, Barlow Condensed 600). */
.er-board {
  --er-deep: #0b1824; --er-mid: #102331; --er-paper: #f5f1e8; --er-muted: #b5c6c8; --er-slate: #344c5a;
  --er-teal: #58c9c0; --er-coral: #ff9a80; --er-orange: #f26729;
  position: relative; background: var(--er-deep); color: var(--er-paper);
  font-synthesis: none; border-bottom: 3px solid var(--er-orange);
}
.er-board button, .er-board select, .er-board input, .er-board textarea { font: inherit; color: inherit; }
.er-bar { display: flex; align-items: stretch; background: var(--er-deep); }
.er-switch { display: flex; width: 100%; }
.er-switch [role="tab"] {
  appearance: none; flex: 1 1 50%; min-height: 46px; padding: 0 10px; border: 0; background: var(--er-mid);
  color: var(--er-muted); font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .04em;
  white-space: nowrap; cursor: pointer; border-bottom: 4px solid transparent;
}
.er-switch [role="tab"] + [role="tab"] { border-left: 2px solid var(--er-deep); }
.er-switch [role="tab"][aria-selected="true"] { background: var(--er-deep); color: var(--er-paper); border-bottom-color: var(--er-orange); }
.er-switch [role="tab"]:focus-visible, .er-theaters button:focus-visible, .er-zoom button:focus-visible,
.er-dossier button:focus-visible, .er-dossier summary:focus-visible, .er-pick select:focus-visible {
  outline: 3px solid var(--er-paper); outline-offset: -3px;
}
.er-theaters {
  position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; background: var(--er-deep);
  padding: 6px var(--gutter, 16px) 6px; -webkit-overflow-scrolling: touch;
}
.er-theaters::-webkit-scrollbar { display: none; }
.er-theaters button {
  appearance: none; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 0; background: var(--er-mid);
  color: var(--er-muted); font-family: var(--body); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
}
.er-theaters button[aria-pressed="true"] { background: var(--er-paper); color: var(--er-deep); }
.er-pick { position: relative; flex: 0 0 auto; display: flex; margin-left: 6px; }
.er-pick select {
  appearance: none; min-height: 36px; max-width: 190px; padding: 0 28px 0 10px; border: 0; background: var(--er-mid);
  color: var(--er-paper); font-size: 13px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--er-muted) 50%), linear-gradient(135deg, var(--er-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.er-stage { position: relative; height: 72vh; height: 72svh; min-height: 400px; overflow: hidden; background: #0e1f2d; }
@media (min-width: 900px) { .er-stage { height: min(78vh, 860px); } }
.er-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.er-stage canvas:active { cursor: grabbing; }
.er-stage canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--er-paper); }
.er-loading, .er-error {
  position: absolute; left: 16px; top: 16px; margin: 0; padding: 8px 12px; background: var(--er-mid); color: var(--er-muted);
  font-size: 14px;
}
.er-error a { color: var(--er-paper); }
.er-legend {
  position: absolute; left: 12px; top: 12px; margin: 0; display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: var(--er-deep); color: var(--er-muted); font-size: 12px; pointer-events: none; white-space: nowrap;
  max-width: none;                                      /* the site's paragraph cap (488 px) squeezed the key icons to 0 */
}
.er-key-hatch, .er-key-star, .er-key-line { flex: 0 0 auto; }
@media (max-width: 600px) { .er-state { display: none; } .er-legend { max-width: calc(100% - 24px); overflow: hidden; } }
.er-key-hatch {
  width: 14px; height: 10px; background: repeating-linear-gradient(135deg, #9e9d98 0 2px, #c6c5c0 2px 6px);
}
.er-key-star { width: 12px; height: 12px; margin-left: 6px; background: #f3c45f;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.er-state { margin-left: 8px; padding-left: 8px; border-left: 2px solid var(--er-slate); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.er-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.er-zoom button {
  appearance: none; width: 44px; height: 44px; border: 0; background: var(--er-mid); color: var(--er-paper);
  font-family: var(--head); font-weight: 600; font-size: 24px; line-height: 1; cursor: pointer;
}
.er-hint {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; padding: 8px 12px;
  background: var(--er-deep); color: var(--er-paper); font-size: 13px; pointer-events: none; white-space: nowrap;
}
.er-board.is-na .er-theaters { display: none; }
.er-na-map { position: relative; height: 72vh; height: 72svh; min-height: 400px; display: flex; flex-direction: column; background: var(--er-deep); }
@media (min-width: 900px) { .er-na-map { height: min(78vh, 860px); } }
.er-na-map .er-na-figure { flex: 1 1 auto; min-height: 0; margin: 0; display: flex; flex-direction: column; }
.er-na-map .er-na-figure > a { flex: 1 1 auto; min-height: 0; display: flex; justify-content: center; }
.er-na-map .er-na-figure img { width: 100%; height: 100%; object-fit: contain; }
.er-na-map .er-na-figure figcaption { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; color: var(--er-muted); font-size: 13px; }
.er-na-map .er-na-cta { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }

/* the dossier: a hard-edged bottom sheet */
.er-dossier {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; max-height: 56vh; max-height: 56svh; overflow-y: auto;
  overscroll-behavior: contain; background: var(--er-mid); color: var(--er-paper); padding: 16px 16px 20px 28px;
  border-top: 3px solid var(--er-deep); transform: translateY(102%); transition: transform .22s ease-out;
}
.er-dossier::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--er-team, var(--er-orange)); }
.er-dossier.is-open { transform: none; }
@media (min-width: 900px) {
  .er-dossier { position: absolute; left: 24px; right: auto; bottom: 84px; width: 452px; max-height: calc(100% - 196px); }
}
@media (prefers-reduced-motion: reduce) { .er-dossier { transition: none; } }
.er-d-head { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: start; }
.er-d-head img { width: 72px; height: 48px; display: block; background: var(--er-deep); }
.er-l1 { margin: 0; color: var(--er-muted); font-family: var(--body); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.er-d-head h2 { margin: 2px 0 0; font-family: var(--head); font-weight: 600; font-size: 30px; line-height: .98; letter-spacing: 0; }
.er-d-head h2:focus { outline: none; }
.er-d-line { margin: 10px 0 0; color: var(--er-muted); font-size: 14px; line-height: 1.35; }
.er-d-close {
  appearance: none; border: 0; background: var(--er-deep); color: var(--er-paper); min-height: 40px; padding: 0 12px;
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.er-d-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 14px 0 0; }
.er-d-facts > div { background: var(--er-deep); padding: 10px 12px 11px; min-width: 0; }
.er-d-facts dt { color: var(--er-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.er-d-facts dd { margin: 3px 0 0; font-family: var(--head); font-weight: 600; font-size: 24px; line-height: 1.05; overflow-wrap: anywhere; }
.er-d-facts dd span { display: block; margin-top: 3px; font-family: var(--body); font-weight: 400; font-size: 12.5px; line-height: 1.3; color: var(--er-muted); }
.er-berth { margin-top: 14px; padding: 12px; background: var(--er-deep); }
.er-route { margin-top: 10px; }
.er-route-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.er-route-name { font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.er-route-tag { color: var(--er-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.er-cells { display: grid; grid-template-columns: repeat(46, 1fr); gap: 1px; margin-top: 6px; height: 14px; }
.er-cell { background: var(--er-slate); }
.er-cell.is-berth { background: #6f8794; }
.er-cell.is-tied { background: #4d6878; }
.er-cell.is-berth.is-tied { background: #7d96a3; }
.er-cell:nth-child(2) { box-shadow: 3px 0 0 0 var(--er-paper); }          /* the cut: two berths per route */
.er-cell.is-here { background: var(--er-paper); }
.er-cells.is-flat .er-cell { background: var(--er-slate); }
.er-cells.is-flat .er-cell.is-berth { background: #6f8794; }
.er-route-val { margin: 5px 0 0; font-size: 13px; line-height: 1.35; color: var(--er-paper); }
.er-d-wide { grid-column: 1 / -1; }
.er-d-tapped { margin: 10px 0 0; display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--er-deep);
  box-shadow: inset 4px 0 0 var(--er-paper); }
.er-d-tapped[hidden] { display: none; }
.er-d-tapped b { font-family: var(--head); font-weight: 600; font-size: 20px; }
.er-arrow { display: inline-block; width: 22px; height: 14px; margin: 0 8px; vertical-align: 0.05em; fill: currentColor; }
.er-d-regionlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.er-d-regionlist li { position: relative; padding-left: 12px; font-family: var(--body); font-weight: 400; font-size: 13px; line-height: 1.3; color: var(--er-paper); }
.er-d-regionlist li::before { content: ''; position: absolute; left: 0; top: .42em; width: 6px; height: 6px; background: var(--er-team, var(--er-orange)); }
.er-d-regionlist li.is-tapped { box-shadow: inset 0 -2px 0 var(--er-paper); }
.er-hq-tag { margin-left: 6px; padding: 0 4px; background: #f3c45f; color: var(--er-deep); font-size: 10.5px; letter-spacing: .06em; }
.er-key-line { width: 14px; height: 0; margin-left: 6px; border-top: 2px solid rgba(14, 20, 32, .9); box-shadow: 0 0 0 1px #c6c5c0; }
@media (max-width: 420px) { .er-d-regionlist { grid-template-columns: 1fr; } .er-key-line, .er-key-line-label { display: none; } }
.er-note { margin: 8px 0 0; color: var(--er-muted); font-size: 12.5px; line-height: 1.4; }
.er-actions { margin-top: 14px; }
.er-back {
  appearance: none; width: 100%; min-height: 48px; border: 0; background: var(--er-orange); color: #1a0b03;
  font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer;
}
.er-back[aria-pressed="true"] { background: var(--er-paper); color: var(--er-deep); box-shadow: inset 8px 0 0 var(--er-team, var(--er-orange)); }
.er-lore { margin-top: 12px; background: var(--er-deep); }
.er-lore summary {
  list-style: none; cursor: pointer; padding: 12px; font-family: var(--head); font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.er-lore summary::-webkit-details-marker { display: none; }
.er-lore summary::after { content: 'OPEN'; font-family: var(--body); font-weight: 400; font-size: 11px; letter-spacing: .08em; color: var(--er-muted); }
.er-lore[open] summary::after { content: 'CLOSE'; }
.er-lore form { padding: 0 12px 12px; }
.er-lore label { display: block; margin-top: 8px; color: var(--er-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.er-lore input, .er-lore textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px; border: 0; background: var(--er-mid);
  color: var(--er-paper); font-size: 15px; letter-spacing: 0; text-transform: none;
  box-shadow: inset 0 -2px 0 var(--er-slate);
}
.er-lore input:focus, .er-lore textarea:focus { outline: none; box-shadow: inset 0 -3px 0 var(--er-paper); }
.er-lore textarea { min-height: 96px; resize: vertical; }
.er-lore button[type="submit"] {
  appearance: none; margin-top: 10px; min-height: 44px; padding: 0 14px; border: 0; background: var(--er-paper);
  color: var(--er-deep); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
/* the launchpad heading moved from h1 to h2 (the board now leads the page); same look as before */
.show-launchpad .er-launch-title { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; margin: 0 0 10px; max-width: none; }
@media (max-width: 700px) { .show-launchpad .er-launch-title { font-size: 34px; } }
.er-d-facts dd b { font-weight: 600; }

/* Frosted Obsidian polish + Power Scaling & Rules UI */
.er-theaters button, .er-pick select { border-radius: 8px; border: 1px solid rgba(255,255,255,.10); }
.er-rules-btn {
  appearance: none; flex: 0 0 auto; margin-left: auto; min-height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid rgba(255, 138, 88, 0.72) !important;
  background: linear-gradient(180deg, rgba(242, 103, 41, 0.28), rgba(16, 35, 49, 0.92)) !important;
  color: #ffd8c4 !important; font-family: var(--head) !important; font-weight: 600 !important;
  font-size: 14.5px !important; letter-spacing: .04em !important; text-transform: uppercase; cursor: pointer;
}
.er-rules-btn:hover { background: linear-gradient(180deg, rgba(242, 103, 41, 0.44), rgba(22, 44, 62, 0.96)) !important; color: #fff !important; }
.er-dossier {
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(22, 39, 58, 0.93), rgba(10, 19, 30, 0.97));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.16); box-shadow: 0 20px 44px rgba(0,0,0,.62);
}
@media (min-width: 900px) { .er-dossier { border-radius: 16px; width: 472px; } }
.er-d-head img { border-radius: 6px; border: 1px solid rgba(255,255,255,.22); }
.er-d-close, .er-zoom button { border-radius: 8px; border: 1px solid rgba(255,255,255,.14); }
.er-d-facts > div, .er-berth, .er-lore { border-radius: 10px; border: 1px solid rgba(255,255,255,.07); }
.er-back { border-radius: 10px; }

/* 5-Category Power Breakdown inside Dossier */
.er-cats { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.er-cat { background: rgba(7, 15, 24, 0.68); border: 1px solid rgba(255,255,255,.09); border-radius: 8px; overflow: hidden; }
.er-cat summary {
  list-style: none; cursor: pointer; padding: 8px 10px; display: grid;
  grid-template-columns: minmax(112px, 1.1fr) 1fr auto; gap: 10px; align-items: center;
}
.er-cat summary::-webkit-details-marker { display: none; }
.er-cat-name { font-family: var(--body); font-size: 12.5px; color: var(--er-paper); font-weight: 600; white-space: nowrap; }
.er-cat-wt { color: var(--er-muted); font-weight: 400; font-size: 11px; margin-left: 4px; }
.er-cat-track { height: 8px; background: rgba(255,255,255,.10); border-radius: 99px; overflow: hidden; }
.er-cat-fill { height: 100%; background: var(--er-team, var(--er-orange)); border-radius: 99px; }
.er-cat-val { font-family: var(--head); font-size: 17px; font-weight: 600; color: var(--er-paper); min-width: 34px; text-align: right; }
.er-cat-reason {
  margin: 0; padding: 0 10px 10px; font-family: var(--body); font-size: 12.5px; line-height: 1.45;
  color: var(--er-muted); border-top: 1px solid rgba(255,255,255,.06); padding-top: 8px;
}
.er-inline-rules {
  appearance: none; margin-top: 10px; width: 100%; min-height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1px solid rgba(255, 138, 88, 0.48); background: rgba(242, 103, 41, 0.14); color: #ffcbb0;
  font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}

/* Rules & All-46 Power Leaderboard Modal */
.er-rules-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(5, 11, 18, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.er-rules-backdrop[hidden] { display: none; }
.er-rules-card {
  width: min(980px, 100%); max-height: 88vh; max-height: 88svh; overflow-y: auto; border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 39, 58, 0.96), rgba(10, 19, 30, 0.98));
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 28px 64px rgba(0,0,0,.75); padding: 20px 22px 24px;
}
.er-rules-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.10); }
.er-rules-head h2 { margin: 2px 0 0; font-family: var(--head); font-size: clamp(26px, 4vw, 36px); line-height: 1.02; }
.er-rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.er-rule-box { background: rgba(7, 15, 24, 0.65); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; padding: 12px 14px; }
.er-rule-box h3 { margin: 0 0 6px; font-family: var(--head); font-size: 18px; color: #ffb391; letter-spacing: .02em; }
.er-rule-box p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--er-muted); max-width: none; }
.er-rule-box code { font-size: 12px; color: var(--er-paper); background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }
.er-lb-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.10); }
.er-lb-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.er-lb-bar h3 { margin: 0; font-family: var(--head); font-size: 22px; }
.er-lb-sort { font-size: 12.5px; color: var(--er-muted); display: flex; align-items: center; gap: 8px; }
.er-lb-sort select { background: var(--er-deep); color: var(--er-paper); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.er-lb-wrap { margin-top: 10px; overflow-x: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(7,15,24,.55); }
.er-lb-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.er-lb-table th { text-align: right; padding: 9px 10px; background: rgba(16,35,49,.9); color: var(--er-muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.10); }
.er-lb-table th:nth-child(1), .er-lb-table th:nth-child(2), .er-lb-table td:nth-child(1), .er-lb-table td:nth-child(2) { text-align: left; }
.er-lb-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.er-lb-row { cursor: pointer; transition: background .12s; }
.er-lb-row:hover { background: rgba(242, 103, 41, 0.16); }
.er-lb-emp { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--er-paper); }
.er-lb-emp img { width: 27px; height: 18px; border-radius: 3px; flex: 0 0 auto; }
.er-lb-yr { color: var(--er-muted); font-weight: 400; font-size: 11.5px; }
.er-lb-pwr { font-family: var(--head); font-size: 17px; font-weight: 600; color: #ffab84; }
.er-d-commander {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(10, 20, 32, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.er-d-commander img {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: 0 0 auto;
  border: 1.5px solid var(--er-team, rgba(255,255,255,.35)); box-shadow: 0 6px 16px rgba(0,0,0,.45);
}
.er-d-cmd-name { display: block; font-family: var(--head); font-size: 23px; line-height: 1.05; color: #ffd996; letter-spacing: .01em; }
.er-d-cmd-sub { display: block; font-size: 12.5px; color: var(--er-muted); margin-top: 2px; }
.er-inline-lore {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 36px;
  margin: 4px 0 10px; padding: 0 12px; border-radius: 8px; text-decoration: none;
  border: 1px solid rgba(110, 168, 255, 0.42); background: rgba(110, 168, 255, 0.12); color: #cde2ff;
  font-family: var(--head); font-size: 14.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.er-inline-lore:hover { background: rgba(110, 168, 255, 0.22); color: #fff; }
