:root {
  --bg: #090f19;
  --panel: #101b29;
  --panel2: #172332;
  --line: #2b3a4a;
  --text: #e9edf3;
  --muted: #9aabbf;
  --gold: #e3b46f;
  --cyan: #65cfdf;
  --red: #f09287;
  --own: var(--cyan);
  font:
    16px 'Trebuchet MS',
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
select,
input {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #182637;
  color: var(--text);
  padding: 10px 13px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover:not(:disabled) {
  background: #2a3b4e;
  border-color: #7392a8;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #101a26;
  font-weight: 700;
}
.primary:hover:not(:disabled) {
  background: #f0c88d;
}
.ghost {
  background: transparent;
}
.small {
  padding: 7px 10px;
  font-size: 13px;
}
.active {
  border-color: var(--own);
  background: #234452;
  color: var(--own);
}
.danger {
  color: var(--red);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Georgia, serif;
  font-weight: 400;
}
h1 {
  font-size: 25px;
}
h2 {
  font-size: 31px;
}
h3 {
  font-size: 24px;
}
a {
  color: var(--cyan);
}
.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: 'Courier New', monospace;
}
.gold {
  color: var(--gold);
}
.cyan {
  color: var(--cyan);
}
.red {
  color: var(--red);
}
.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #0c1521;
}
.brand {
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.mark {
  color: var(--gold);
  font-size: 32px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.4px;
  color: #8c9db1;
  margin-top: 5px;
}
.resources {
  display: flex;
  gap: 26px;
  flex: 1;
  justify-content: center;
}
.resource b {
  display: block;
  font-size: 20px;
  margin-top: 5px;
  font-family: 'Courier New', monospace;
  font-weight: 400;
}
.resource b small {
  font:
    11px Arial,
    sans-serif;
  color: var(--muted);
}
.top-actions {
  display: flex;
  gap: 7px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  height: calc(100dvh - 144px);
}
.theater {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #08121f;
}
.theater-head {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 15px;
  border-bottom: 1px solid #253444;
  background: #0d1824;
  z-index: 2;
}
.theater-head h2 {
  font-size: 24px;
  margin-top: 6px;
}
.objective {
  font-size: 13px;
  line-height: 1.5;
  color: #b1bdcd;
  text-align: right;
  max-width: 360px;
}
.map-wrap {
  position: relative;
  flex: 1;
  min-height: 250px;
  overflow: hidden;
}
.map-wrap canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  touch-action: none;
  outline: none;
}
.map-tools {
  position: absolute;
  right: 17px;
  top: 15px;
  display: flex;
  gap: 4px;
  z-index: 3;
}
.map-tools button {
  background: #101c2eef;
  min-width: 34px;
  padding: 7px;
  font-size: 14px;
}
.map-legend {
  position: absolute;
  left: 22px;
  bottom: 15px;
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #94a8bb;
  pointer-events: none;
}
.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
  border: 1px solid currentColor;
  background: currentColor;
  opacity: 0.8;
}
.map-banner {
  position: absolute;
  top: 15px;
  left: 22px;
  padding: 8px 12px;
  border: 1px solid #415a68;
  background: #0d1b2ddf;
  font-size: 12px;
  color: #bad4df;
  z-index: 3;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 43px;
  padding: 10px 22px;
  background: #0d1824;
  border-top: 1px solid #263747;
  font-size: 12px;
  color: #b0bfd0;
  gap: 10px;
}
.side {
  border-left: 1px solid var(--line);
  background: #101a28;
  overflow-y: auto;
  padding: 23px;
  scrollbar-width: thin;
  scrollbar-color: #435164 transparent;
}
.side > section {
  margin-bottom: 24px;
}
.side-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.side-title h3 {
  font-size: 26px;
}
.chip {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #243244;
  padding: 5px 7px;
  white-space: nowrap;
  border-radius: 3px;
  color: var(--own);
}
.unit-name {
  font:
    25px Georgia,
    serif;
  line-height: 1.2;
  margin: 12px 0;
}
.description {
  font-size: 13px;
  line-height: 1.65;
  color: #a9b9cc;
  margin: 10px 0;
}
.hp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin: 14px 0 7px;
}
.bar {
  background: #2e3c4e;
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
}
.bar > i {
  height: 100%;
  display: block;
  background: var(--own);
  transition: width 0.25s;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 17px 10px;
  margin: 22px 0;
}
.stat-grid b {
  display: block;
  font:
    19px 'Courier New',
    monospace;
  margin-top: 6px;
}
.stat-grid .label {
  font-size: 10px;
  letter-spacing: 1px;
}
.status-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.status {
  font-size: 11px;
  border: 1px solid #3b4a5e;
  padding: 5px 7px;
  color: #b2c3d5;
  border-radius: 3px;
}
.status.ready {
  border-color: #65cfdf65;
  color: var(--cyan);
}
.status.spent {
  opacity: 0.5;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 17px;
}
.actions button {
  font-size: 13px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.actions small {
  font-size: 11px;
  color: var(--muted);
}
.admiral-card {
  border: 1px solid #6b5b43;
  background: #252b32;
  padding: 13px;
  margin: 17px 0;
  border-radius: 4px;
}
.admiral-card b {
  display: block;
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 7px;
}
.admiral-card p {
  font-size: 12px;
  line-height: 1.6;
  color: #c1c4c9;
}
.section-divider {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.dispatch {
  border-left: 2px solid #495b6e;
  margin-top: 13px;
  padding-left: 10px;
  font-size: 12px;
  color: #aabbd0;
  line-height: 1.6;
}
.dispatch b {
  font-weight: 400;
  color: #e0e6f0;
}
.target-box {
  padding: 17px;
  background: #362731;
  border: 1px solid #7a4849;
  border-radius: 5px;
  margin: 18px 0;
}
.target-box .label {
  color: #f1a297;
}
.auto-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  font-size: 12px;
  line-height: 1.45;
  color: #c9d3df;
}
.auto-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--own);
}
[aria-label='Production Command'] input.select {
  width: 100%;
  box-sizing: border-box;
}
[aria-label='Production Command'] .brief-block .actions {
  margin-top: 12px;
}
.target-box h3 {
  font-size: 23px;
  margin: 8px 0;
}
.target-box p {
  font-size: 12px;
  line-height: 1.7;
  color: #d0bbc0;
}
.damage-grid {
  display: flex;
  gap: 25px;
  margin: 15px 0;
}
.damage-grid b {
  font: 24px 'Courier New';
  display: block;
  color: #f1b1a3;
}
.damage-grid small {
  font-size: 11px;
  color: #c6aeb4;
}
.target-box button {
  width: 100%;
  margin-top: 10px;
  background: #de9585;
  color: #241b1b;
  border-color: #de9585;
  font-weight: 700;
}
.footer {
  height: 64px;
  padding: 12px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: #0c1521;
  gap: 20px;
}
.footer-actions {
  display: flex;
  gap: 8px;
}
.footer .end {
  min-width: 210px;
}
.turn-status {
  font-size: 14px;
  color: var(--own);
}
.turn-status small {
  font-size: 11px;
  color: var(--muted);
  margin-left: 12px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #020810cb;
  backdrop-filter: blur(9px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.dialog {
  width: min(1020px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  position: relative;
  padding: 34px;
  background: linear-gradient(125deg, #1c2a3a, #0c1624 70%);
  border: 1px solid #4a5b70;
  border-radius: 7px;
  box-shadow: 0 30px 100px #0009;
  scrollbar-width: thin;
  scrollbar-color: #465972 transparent;
}
.dialog.narrow {
  max-width: 630px;
}
.dialog.wide {
  width: min(1150px, 100%);
}
.dialog h1 {
  font-size: 46px;
  line-height: 1.1;
  margin-bottom: 15px;
}
.dialog > p {
  font-size: 15px;
  line-height: 1.7;
  color: #acbed0;
  max-width: 720px;
  margin-top: 12px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.dialog-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.close {
  flex-shrink: 0;
  align-self: start;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 25px 0;
}
.faction {
  padding: 23px;
  text-align: left;
  background: #111e2f;
  border-top: 3px solid var(--gold);
}
.faction h3 {
  margin: 12px 0;
  font-size: 28px;
}
.faction p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.faction.active {
  background: #263e4d;
  border-color: var(--cyan);
}
.faction.britannia {
  border-top-color: #e34b4b;
}
.faction.eu {
  border-top-color: #4f8cff;
}
.faction.cf {
  border-top-color: #ff8c6e;
}
.faction .select-mark {
  font-size: 13px;
  color: #c7d9e6;
  margin-top: 18px;
  display: block;
}
.setup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.setup-row label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.select {
  background: #101d2c;
  border: 1px solid #53657a;
  color: #e3edf7;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 25px;
}
.dialog-footer small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 270px;
}
.dialog-footer > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.tabs button {
  font-size: 14px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.unit-card {
  padding: 19px;
  border: 1px solid #3c4d61;
  border-radius: 5px;
  background: #122032;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.unit-card.locked {
  opacity: 0.5;
}
.unit-card h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 12px 0 9px;
  min-height: 50px;
}
.unit-card p {
  font-size: 12px;
  line-height: 1.6;
  color: #b1c1d4;
  flex: 1;
}
.unit-card .unit-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font: 12px 'Courier New';
  color: #cadae8;
  margin: 14px 0;
}
.unit-card .cost {
  font-size: 14px;
  color: var(--gold);
  margin: 3px 0 13px;
}
.unit-card button {
  width: 100%;
  font-size: 13px;
}
.unit-code {
  font: 14px 'Courier New';
  border: 1px solid #628194;
  color: var(--cyan);
  padding: 5px 8px;
  width: fit-content;
  background: #243a4a;
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar-row label {
  font-size: 13px;
  color: var(--muted);
}
.toolbar-row select {
  max-width: 180px;
}
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.tech-card {
  padding: 25px;
  border: 1px solid var(--line);
  background: #142234;
  border-radius: 5px;
}
.tech-card h3 {
  font-size: 24px;
  margin: 13px 0;
}
.tech-card p {
  color: #b6c6d8;
  font-size: 14px;
  line-height: 1.6;
  min-height: 70px;
}
.tech-levels {
  display: flex;
  gap: 5px;
  margin: 20px 0;
}
.tech-levels i {
  height: 4px;
  flex: 1;
  background: #37485e;
}
.tech-levels i.unlocked {
  background: var(--gold);
}
.tech-card button {
  font-size: 13px;
  width: 100%;
  margin-top: 8px;
}
.admiral-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.officer {
  border: 1px solid #4b4b48;
  background: #1c2834;
  padding: 23px;
  border-radius: 5px;
}
.officer h3 {
  font-size: 24px;
  margin: 10px 0;
}
.officer p {
  font-size: 13px;
  line-height: 1.7;
  color: #afc0d4;
  min-height: 70px;
  margin: 12px 0;
}
.officer button {
  width: 100%;
  font-size: 13px;
}
.stars {
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 12px;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 23px 0;
}
.help-grid b {
  color: var(--gold);
  font-size: 15px;
}
.help-grid p {
  font-size: 14px;
  line-height: 1.7;
  color: #b3c4d7;
  margin-top: 8px;
}
.info-strip {
  padding: 12px 15px;
  background: #213347;
  border: 1px solid #3f5b73;
  font-size: 13px;
  line-height: 1.6;
  margin: 15px 0;
  color: #c6d9e8;
}
.badge-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.badge {
  font-size: 11px;
  padding: 6px 8px;
  border: 1px solid #41536c;
  color: #b6cbdc;
  border-radius: 3px;
}
.kbd {
  font: 10px monospace;
  border: 1px solid #4e6279;
  border-radius: 2px;
  padding: 2px 4px;
  margin-right: 3px;
}
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 13px 20px;
  background: #304254;
  color: #fff;
  border: 1px solid #758da5;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  border-radius: 5px;
  transition: 0.2s;
  font-size: 14px;
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.empty-panel {
  padding: 10px 0 20px;
}
.empty-panel h3 {
  font-size: 29px;
  line-height: 1.25;
  margin: 12px 0;
}
.resource-inline {
  font-family: 'Courier New';
  color: var(--gold);
}
.unit-select {
  margin: 12px 0;
  font-size: 12px;
  width: 100%;
}
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}
.station-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.station-buttons button {
  font-size: 12px;
}
.result-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 26px 0;
}
.result-numbers b {
  font: 30px Georgia;
  display: block;
  color: var(--gold);
}
.result-numbers small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
@media (min-width: 1700px) {
  .workbench {
    grid-template-columns: 1fr 355px;
  }
  .side {
    padding: 28px;
  }
  .topbar {
    height: 90px;
  }
  .workbench {
    height: calc(100dvh - 154px);
  }
}
@media (max-width: 1150px) {
  .topbar {
    gap: 12px;
    padding: 0 18px;
  }
  .brand {
    min-width: 215px;
  }
  .brand h1 {
    font-size: 23px;
  }
  .resources {
    gap: 16px;
  }
  .top-actions {
    gap: 4px;
  }
  .top-actions button {
    padding: 7px;
    font-size: 12px;
  }
  .resource .label {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .resource b {
    font-size: 18px;
  }
  .resource b small {
    display: none;
  }
  .workbench {
    grid-template-columns: 1fr 280px;
  }
  .side {
    padding: 18px;
  }
  .objective {
    max-width: 260px;
    font-size: 12px;
  }
  .theater-head {
    padding: 16px 20px;
  }
  .theater-head h2 {
    font-size: 22px;
  }
}
@media (max-width: 850px) {
  body {
    overflow: auto;
  }
  .topbar {
    height: auto;
    min-height: 100px;
    flex-wrap: wrap;
    padding: 15px;
    gap: 15px;
  }
  .brand {
    flex: 1;
  }
  .resources {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
  }
  .top-actions button {
    font-size: 12px;
  }
  .top-actions .nav-word {
    display: none;
  }
  .workbench {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .theater {
    height: 65dvh;
    min-height: 480px;
  }
  .theater-head {
    padding: 14px 16px;
  }
  .theater-head h2 {
    font-size: 21px;
  }
  .objective {
    max-width: 230px;
    font-size: 11px;
  }
  .map-legend {
    left: 15px;
    gap: 10px;
    font-size: 10px;
  }
  .map-banner {
    left: 14px;
    top: 13px;
    font-size: 11px;
    max-width: 60%;
    padding: 7px 9px;
  }
  .map-tools {
    right: 10px;
  }
  .map-caption {
    font-size: 11px;
    padding: 9px 15px;
  }
  .map-caption > span:last-child {
    display: none;
  }
  .side {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-height: none;
    overflow: visible;
    padding: 20px;
  }
  .side > section {
    margin: 0;
  }
  .side .dispatches {
    grid-column: 1/-1;
  }
  .footer {
    position: sticky;
    bottom: 0;
    z-index: 9;
    padding: 10px 15px;
    height: 64px;
  }
  .footer .end {
    min-width: 140px;
    font-size: 13px;
  }
  .turn-status {
    font-size: 12px;
  }
  .turn-status small {
    display: none;
  }
  .footer-actions button {
    font-size: 12px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .dialog {
    padding: 25px;
    max-height: 94dvh;
  }
  .dialog h1 {
    font-size: 38px;
  }
  .dialog h2 {
    font-size: 28px;
  }
  .dialog-footer {
    gap: 14px;
  }
  .dialog-footer small {
    max-width: 180px;
  }
  .help-grid p {
    font-size: 13px;
  }
  .unit-card {
    padding: 17px;
  }
}
@media (max-width: 540px) {
  .top-actions {
    gap: 4px;
  }
  .top-actions button {
    font-size: 11px;
    padding: 7px;
  }
  .brand {
    min-width: 180px;
  }
  .brand h1 {
    font-size: 21px;
  }
  .brand small {
    font-size: 7px;
  }
  .mark {
    font-size: 25px;
  }
  .resource b {
    font-size: 17px;
  }
  .resource .label {
    font-size: 9px;
  }
  .objective {
    max-width: 160px;
    font-size: 10px;
  }
  .theater-head h2 {
    font-size: 20px;
  }
  .theater-head .label {
    font-size: 10px;
  }
  .theater {
    height: 61dvh;
    min-height: 425px;
  }
  .side {
    display: block;
  }
  .side > section {
    margin-bottom: 22px;
  }
  .side .stat-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }
  .stat-grid b {
    font-size: 16px;
  }
  .stat-grid .label {
    font-size: 9px;
  }
  .dialog {
    padding: 23px 18px;
  }
  .overlay {
    padding: 12px;
  }
  .choice-grid {
    gap: 10px;
    margin: 20px 0;
  }
  .faction {
    padding: 16px;
  }
  .faction h3 {
    font-size: 23px;
  }
  .faction p {
    font-size: 12px;
  }
  .faction .label {
    font-size: 9px;
  }
  .dialog h1 {
    font-size: 34px;
  }
  .setup-row {
    gap: 12px;
  }
  .select {
    font-size: 12px;
  }
  .dialog-footer {
    flex-direction: column;
    align-items: start;
  }
  .dialog-footer small {
    max-width: none;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .unit-card {
    min-height: 0;
  }
  .unit-card h3 {
    min-height: 0;
  }
  .tech-grid,
  .admiral-grid {
    grid-template-columns: 1fr;
  }
  .tech-card p,
  .officer p {
    min-height: 0;
  }
  .tech-card {
    padding: 20px;
  }
  .tabs button {
    font-size: 12px;
    padding: 8px;
  }
  .tabs {
    gap: 5px;
  }
  .help-grid {
    grid-template-columns: 1fr;
  }
  .map-legend span:last-child {
    display: none;
  }
  .footer-actions .small {
    padding: 8px;
  }
  .footer .end {
    min-width: 125px;
  }
  .turn-status {
    max-width: 95px;
  }
  .footer-actions {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Scenario-select: strategic preview and compact three-power chooser. */
.scenario-select .scenario-preview-map {
  display: block;
  width: 100%;
  height: clamp(260px, 37vh, 390px);
  border: 1px solid #48647b;
  border-radius: 8px;
  background: #0d2b40;
  margin: 15px 0 8px;
}
.scenario-select .choice-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0 20px;
}
.scenario-select .choice-grid.two {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.scenario-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.scenario-select .faction.eb {
  border-top-color: #a77be8;
}
.scenario-select .faction {
  padding: 14px;
}
.scenario-select .faction h3 {
  font-size: 18px;
  margin: 8px 0;
}
.scenario-select .faction p {
  font-size: 12px;
}
.scenario-select .faction.bk {
  border-top-color: #f0c94a;
}
@media(max-width: 760px) {
  .scenario-select .choice-grid,
  .scenario-select .choice-grid.two {
    grid-template-columns: 1fr;
  }
  .scenario-select .scenario-preview-map {
    height: 245px;
  }
}

/* Authentic U.F.N. standard in the 2018 conquest card and city thumbnails. */
.faction.ufn-2018 { border-top-color: #f8cf32; }
.ufn-start-flag { display: block; width: 108px; max-width: 44%; margin: 9px 0 6px; line-height: 0; border: 1px solid #d2a82b; box-shadow: 0 2px 7px #0007; }
.ufn-start-flag svg, .ufn-city-flag svg { display: block; width: 100%; height: auto; }

/* Persistent, non-interrupting War Report */
.war-report{max-width:min(1140px,96vw)}
.war-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.war-content{max-height:min(64vh,680px);overflow-y:auto;padding-right:4px}
.war-content h3{margin:18px 0 10px}
.war-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.war-metric{padding:14px;background:rgba(255,255,255,.045);border:1px solid rgba(220,205,170,.17);border-radius:8px}
.war-metric span{display:block;font-size:.78rem;opacity:.78;margin-bottom:6px}
.war-metric b{font-size:1.5rem;font-variant-numeric:tabular-nums}
.war-events{padding-left:22px;margin:8px 0}.war-events li{padding:7px 0;border-bottom:1px solid rgba(220,205,170,.12)}
.war-event-turn{font-variant-numeric:tabular-nums;opacity:.72;margin-right:8px}
.war-scroll{overflow-x:auto}
.war-table{border-collapse:collapse;width:100%;font-size:.84rem;font-variant-numeric:tabular-nums}
.war-table th,.war-table td{padding:9px 12px;text-align:left;white-space:nowrap;border-bottom:1px solid rgba(220,205,170,.14)}
.war-table thead th{position:sticky;top:0;background:#142737}
.war-table tbody tr:hover{background:rgba(255,255,255,.045)}

/* Faction standards reuse the city-banner vectors instead of colored initials. */
.faction-banner {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: block;
  width: 74px;
  max-width: 29%;
  aspect-ratio: 5 / 3;
  line-height: 0;
  border: 1px solid #d5c398b3;
  box-shadow: 0 4px 9px #0008;
  pointer-events: none;
}
.faction-banner svg, .city-faction-flag svg { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) {
  .faction-banner { width: 56px; top: 9px; right: 9px; }
}

/* The Black Knights source standard is square; preserve that exact silhouette. */
.faction.bk .faction-banner { width: 66px; aspect-ratio: 1 / 1; }


/* Field Manual: complete, scan-friendly keyboard reference. */
.shortcut-reference { margin: 22px 0 26px; }
.shortcut-reference h3 { color: var(--gold); font-size: 20px; margin: 0 0 8px; }
.shortcut-reference .shortcut-note { font-size: 13px; line-height: 1.55; color: #b3c4d7; margin: 9px 0 14px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shortcut-group { min-width: 0; padding: 15px; border: 1px solid #3f526b; border-radius: 6px; background: #122235; }
.shortcut-group h4 { color: var(--gold); font-size: 14px; margin: 0 0 9px; }
.shortcut-group dl { margin: 0; }
.shortcut-group dl > div { display: grid; grid-template-columns: minmax(72px, auto) 1fr; align-items: start; gap: 12px; padding: 7px 0; border-top: 1px solid #31445b; }
.shortcut-group dt, .shortcut-group dd { font-size: 13px; line-height: 1.5; margin: 0; }
.shortcut-group dd { color: #c5d4e2; }
.shortcut-group kbd { display: inline-block; padding: 1px 6px; border: 1px solid #60738a; border-bottom-width: 2px; border-radius: 4px; background: #22354a; color: #edf3f9; font-size: 12px; font-weight: 600; line-height: 1.5; font-family: inherit; white-space: nowrap; }
@media (max-width: 700px) {
  .shortcut-grid { grid-template-columns: minmax(0, 1fr); }
  .shortcut-group { padding: 12px; }
  .shortcut-group dl > div { grid-template-columns: minmax(72px, auto) 1fr; gap: 10px; }
}
