:root {
  --table: #33372C;          /* the olive drab of the map table itself */
  --table-2: #3D4235;
  --rule: #565C49;
  --chalk: #E7E1CD;
  --chalk-dim: #A9A797;
  --paper: #C9C2AB;          /* the printed sheet */
  --strip: #DED8C4;          /* duplicator stock, a shade lighter than the map */
  --mimeo: #6B4A9B;          /* aniline purple: spirit duplicator ink */
  --mimeo-pale: #8E71B8;
  --blue: #2C4A6B;
  --red: #9B2C22;
  --ink: #2A231A;
  /* The display face carries the personality and is used only where it can be
     read at size: the title, the date, the odds column. Anything a player has
     to read quickly or click on uses the interface face. */
  --face-display: 'Haettenschweiler', 'Arial Narrow', 'Oswald', 'Roboto Condensed', 'Impact', sans-serif;
  --face-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --face-data: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--table);
  color: var(--chalk);
  font-family: var(--face-data);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, .display {
  font-family: var(--face-display);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

button {
  font-family: var(--face-ui);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--chalk);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 7px 13px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--table-2); border-color: var(--chalk-dim); }
button:focus-visible { outline: 2px solid var(--mimeo-pale); outline-offset: 2px; }
button:disabled { opacity: 0.35; cursor: default; }
button.on { background: var(--chalk); color: var(--ink); border-color: var(--chalk); }
button.primary { background: var(--mimeo); border-color: var(--mimeo); color: #fff; }
button.primary:hover { background: var(--mimeo-pale); border-color: var(--mimeo-pale); }

.muted { color: var(--chalk-dim); }
.hint { color: var(--mimeo-pale); }

/* ------------------------------------------------------------- opening */
#opening {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.card {
  width: min(720px, 100%);
  background: var(--table-2);
  border: 1px solid var(--rule);
  padding: 28px 30px 24px;
}
#hero {
  display: block;
  width: 100%;
  height: 180px;
  margin: -28px -30px 18px;
  width: calc(100% + 60px);
  border-bottom: 1px solid var(--rule);
  background: #6E7A81;
}
.card h1 {
  font-size: clamp(38px, 8vw, 68px);
  line-height: 0.92;
  color: var(--chalk);
}
.eyebrow {
  font-family: var(--face-ui);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mimeo-pale);
  font-size: 11px;
  margin-bottom: 6px;
}
.rule { height: 1px; background: var(--rule); margin: 18px 0; }
.field { margin-bottom: 16px; }
.field > .label {
  font-family: var(--face-ui);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--chalk-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 7px;
}
.choices { display: flex; flex-wrap: wrap; gap: 7px; }
#scen-note { margin-top: 8px; color: var(--chalk-dim); }
#resume { margin-right: 8px; }

/* ------------------------------------------------------------- game */
#game { position: absolute; inset: 0; display: flex; flex-direction: column; }

#bar {
  display: flex; align-items: baseline; gap: 18px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--table-2);
  flex-wrap: wrap;
}
#bar .title { font-family: var(--face-display); font-size: 20px; letter-spacing: 0.08em; }
#date { font-family: var(--face-display); font-size: 17px; letter-spacing: 0.05em; }
#turnno, #phase { color: var(--chalk-dim); }
#phase { color: var(--mimeo-pale); }
#bar .spacer { flex: 1; }

#soundwrap { display: flex; align-items: center; gap: 8px; }
#soundwrap input[type=range] { width: 84px; accent-color: var(--mimeo); }
#soundwrap input[type=range]:disabled { opacity: 0.35; }

#body { flex: 1; display: flex; min-height: 0; }

#mapwrap { flex: 1; position: relative; min-width: 0; background: #6E7A81; }
#sheet { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }

#maptools {
  position: absolute; left: 10px; top: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
  background: rgba(51,55,44,0.88);
  border: 1px solid var(--rule);
  padding: 6px;
}
#maptools button { padding: 5px 9px; font-size: 11px; }

#legend {
  position: absolute; left: 10px; top: 52px;
  background: rgba(51,55,44,0.9);
  border: 1px solid var(--rule);
  padding: 5px 9px;
  max-width: 300px;
  color: var(--chalk-dim);
}
#legend .swatches { display: flex; gap: 4px; margin-top: 4px; align-items: center; }
#legend .sw { width: 20px; height: 10px; border: 1px solid rgba(0,0,0,0.35); }

#hexinfo {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(51,55,44,0.9);
  border: 1px solid var(--rule);
  padding: 5px 9px;
  max-width: calc(100% - 20px);
}

#routeinfo {
  position: absolute; right: 10px; top: 10px; z-index: 20;
  pointer-events: none; min-width: 210px; max-width: min(330px, calc(100% - 20px));
  background: rgba(38,41,33,0.96); border: 1px solid var(--rule);
  border-left: 3px solid var(--mimeo); padding: 8px 10px;
  box-shadow: 0 5px 16px rgba(0,0,0,0.32);
}
#routeinfo > strong { display: block; font-family: var(--face-ui); font-size: 12px; }
.route-details { display: flex; gap: 10px; margin-top: 3px; color: var(--chalk-dim); font-size: 11px; }
.route-details span + span { border-left: 1px solid var(--rule); padding-left: 10px; }
.route-stop { margin-top: 5px; color: #E7B3A8; font-size: 10.5px; }

/* What is standing in this hex, read off the counter under the pointer. */
#tip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  background: rgba(38,41,33,0.97);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--mimeo);
  padding: 7px 10px;
  min-width: 190px;
  max-width: 268px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
#tip .tip-where {
  font-family: var(--face-ui); font-weight: 600;
  font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--chalk-dim); margin-bottom: 5px;
}
#tip .tip-unit + .tip-unit { margin-top: 7px; border-top: 1px solid var(--rule); padding-top: 6px; }
#tip .tip-name { font-family: var(--face-ui); font-weight: 600; font-size: 12.5px; }
#tip .tip-name.axis { color: #B9CBE0; }
#tip .tip-name.sov { color: #E7B3A8; }
#tip .tip-cls { font-size: 11px; color: var(--chalk-dim); }
#tip .tip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; }
#tip .tip-row span:first-child { color: var(--chalk-dim); }
#tip .tip-bar { height: 3px; background: rgba(0,0,0,0.35); margin: 4px 0 3px; }
#tip .tip-bar i { display: block; height: 3px; }
#tip .tip-flag { color: var(--mimeo-pale); font-size: 11px; }

#thinking {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,32,26,0.55);
  font-family: var(--face-ui);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 15px;
}

/* ------------------------------------------------------------- panel */
#panel {
  width: 340px; flex-shrink: 0;
  border-left: 1px solid var(--rule);
  background: var(--table-2);
  overflow-y: auto;
  padding: 12px 14px 20px;
}
.block { margin-bottom: 18px; }
.block > h3 {
  font-family: var(--face-ui); font-weight: 600;
  font-size: 11.5px; letter-spacing: 0.13em; color: var(--chalk-dim);
  border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin-bottom: 9px;
}
.stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat .k { font-size: 10px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--chalk-dim); font-family: var(--face-ui); font-weight: 600; }
.stat .v { font-size: 15px; }

.wx { display: flex; justify-content: space-between; padding: 2px 0; }
.wx-name { color: var(--chalk-dim); }

.order-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.order-stat {
  min-width: 0; padding: 8px 6px; text-align: center;
  border: 1px solid var(--rule); background: rgba(51,55,44,0.45);
}
.order-stat span { display: block; font-family: var(--face-display); font-size: 24px; line-height: 1; color: var(--chalk); }
.order-stat small { display: block; margin-top: 5px; font-family: var(--face-ui); font-size: 9.5px; line-height: 1.15; color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.06em; }
#orders-guidance { margin: 8px 0 0; font-size: 11.5px; }
#orders-status.attention .order-stat:last-child span { color: #E7B3A8; }

.ration { margin-bottom: 9px; }
.ration .top { display: flex; justify-content: space-between; }
.ration .name { font-family: var(--face-ui); font-weight: 600; letter-spacing: 0.02em; font-size: 12.5px; }
.ration input[type=range] { width: 100%; accent-color: var(--mimeo); }

.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th {
  text-align: left; font-weight: 400; color: var(--chalk-dim);
  font-size: 11px; padding: 2px 0; letter-spacing: 0.04em;
}
.ledger-table td { text-align: right; padding: 2px 0; }

/* ---- the signature: the duplicated action ledger ---------------------- */
#ledgerwrap { position: relative; }
#ledgerwrap.flash .lg:first-child { animation: pull 420ms ease-out; }
@keyframes pull { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.lg {
  background: var(--strip);
  color: var(--mimeo);
  margin-bottom: 6px;
  padding: 6px 9px 6px 15px;
  position: relative;
  /* the sprocket margin of a duplicator strip */
  background-image: radial-gradient(circle at 6px 6px, rgba(43,35,26,0.28) 1.6px, transparent 1.7px);
  background-size: 100% 11px;
  background-repeat: repeat-y;
}
.lg-own { box-shadow: inset 3px 0 0 var(--mimeo); }
.lg-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lg-turn { font-size: 10px; letter-spacing: 0.1em; color: rgba(43,35,26,0.62); text-transform: uppercase; font-family: var(--face-ui); font-weight: 600; }
.lg-target { font-size: 12px; color: var(--ink); text-align: right; }
.lg-line { display: flex; gap: 7px; align-items: baseline; flex-wrap: wrap; margin-top: 3px; }
.lg-odds { font-family: var(--face-display); font-size: 19px; letter-spacing: 0.04em; }
.lg-shift, .lg-roll {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid rgba(107,74,155,0.5); padding: 1px 4px;
}
.lg-code {
  margin-left: auto;
  font-family: var(--face-display); font-size: 19px;
  color: #fff; background: var(--mimeo); padding: 0 7px;
}
.lg-foot { font-size: 10.5px; color: rgba(43,35,26,0.72); margin-top: 3px; }

#log p { margin: 0 0 5px; color: var(--chalk-dim); }

#toast {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--mimeo); color: #fff; padding: 8px 14px; z-index: 40;
}

#verdict-wrap {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24,26,20,0.86); padding: 20px; overflow-y: auto;
}
#verdict { width: min(460px, 100%); background: var(--table-2); border: 1px solid var(--rule); padding: 24px; }
#verdict h2 { font-size: 34px; color: var(--chalk); margin-bottom: 4px; }
#verdict .ledger-table { margin: 14px 0 18px; }

/* ------------------------------------------------------ command briefing */
.modal-wrap {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto; background: rgba(24,26,20,0.9);
}
.modal {
  width: min(860px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--table-2); border: 1px solid var(--rule); padding: 24px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.5);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.modal h2 { font-size: clamp(28px, 5vw, 44px); line-height: 1; }
.briefing-lede { max-width: 720px; color: var(--chalk-dim); font-size: 14px; margin: 16px 0; }
.briefing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.briefing-grid article { border: 1px solid var(--rule); padding: 13px 14px; background: rgba(51,55,44,0.5); }
.briefing-grid h3 { font-family: var(--face-ui); font-size: 12px; letter-spacing: 0.08em; color: var(--mimeo-pale); margin: 0 0 6px; }
.briefing-grid p { margin: 0; color: var(--chalk-dim); font-size: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.doc-link {
  display: inline-block; padding: 7px 13px; border: 1px solid var(--rule);
  color: var(--chalk); text-decoration: none; font-family: var(--face-ui); font-weight: 600;
}
.doc-link:hover, .doc-link:focus-visible { background: var(--table); border-color: var(--chalk-dim); }
.modal-actions .primary { margin-left: auto; }
.end-review-warning {
  margin: 0; padding: 12px 14px; border-left: 3px solid var(--mimeo);
  background: rgba(175, 81, 62, 0.13); color: var(--chalk); line-height: 1.45;
}
.end-review-note { margin: 10px 0 0; font-size: 12px; }

/* ------------------------------------------------------- campaign record */
.record-lede { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin: 16px 0 8px; }
.record-lede strong { font-family: var(--face-display); font-size: 24px; font-weight: 400; color: var(--chalk); }
.record-progress { height: 7px; background: rgba(0,0,0,0.28); margin-bottom: 16px; overflow: hidden; }
.record-progress i { display: block; height: 100%; background: var(--mimeo); }
.record-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.record-card { border: 1px solid var(--rule); padding: 10px; background: rgba(51,55,44,0.5); }
.record-card span { display: block; font-family: var(--face-display); font-size: 28px; line-height: 1; }
.record-card small { display: block; margin-top: 5px; color: var(--chalk-dim); font-family: var(--face-ui); font-size: 9.5px; line-height: 1.2; letter-spacing: 0.07em; text-transform: uppercase; }
.record-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.record-columns article { border: 1px solid var(--rule); padding: 12px 14px; }
.record-columns h3, .record-history h3 { font-family: var(--face-ui); font-size: 11px; letter-spacing: 0.1em; color: var(--mimeo-pale); margin: 0 0 8px; text-transform: uppercase; }
.record-columns .ledger-table td { color: var(--chalk); }
.record-trend { display: flex; align-items: center; gap: 3px; height: 74px; padding: 6px 0; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.record-trend i { flex: 1; min-width: 3px; max-width: 18px; align-self: center; background: var(--mimeo); }
.record-trend i.behind { background: #A45A4D; }
.record-scroll { max-height: 210px; overflow: auto; }
.record-history .ledger-table { font-size: 11px; }
.record-history .ledger-table th, .record-history .ledger-table td { padding: 4px 6px; border-bottom: 1px solid rgba(86,92,73,0.45); white-space: nowrap; }
.record-history .ledger-table th:not(:first-child) { text-align: right; }

/* -------------------------------------------------------- combat journal */
.journal-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.journal-controls button.on { background: var(--mimeo); border-color: var(--mimeo-pale); color: #fff; }
.journal-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.journal-summary > div { border: 1px solid var(--rule); padding: 9px 10px; background: rgba(51,55,44,0.5); }
.journal-summary span { display: block; font-family: var(--face-display); font-size: 25px; line-height: 1; }
.journal-summary small { display: block; margin-top: 5px; color: var(--chalk-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.journal-scroll { max-height: 390px; overflow: auto; border-top: 1px solid var(--rule); }
.journal-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.journal-table th, .journal-table td { padding: 6px; border-bottom: 1px solid rgba(86,92,73,0.45); text-align: left; vertical-align: top; }
.journal-table th { position: sticky; top: 0; z-index: 1; background: var(--table-2); color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.journal-table td.num { text-align: right; white-space: nowrap; }
.journal-table .journal-own td:first-child { border-left: 3px solid var(--mimeo); }
.journal-map { padding: 3px 7px; white-space: nowrap; }
.journal-empty { padding: 24px; text-align: center; color: var(--chalk-dim); border: 1px solid var(--rule); }

/* ---------------------------------------------------------- force forecast */
.force-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.force-controls button.on { background: var(--mimeo); border-color: var(--mimeo-pale); color: #fff; }
.force-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.force-summary > div { border: 1px solid var(--rule); padding: 9px 10px; background: rgba(51,55,44,0.5); }
.force-summary span { display: block; font-family: var(--face-display); font-size: 23px; line-height: 1; }
.force-summary small { display: block; margin-top: 5px; color: var(--chalk-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.force-production { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 11px; }
.force-scroll { max-height: 390px; overflow: auto; border-top: 1px solid var(--rule); }
.force-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.force-table th, .force-table td { padding: 6px; border-bottom: 1px solid rgba(86,92,73,0.45); text-align: left; vertical-align: top; }
.force-table th { position: sticky; top: 0; z-index: 1; background: var(--table-2); color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.force-table .force-own td:first-child { border-left: 3px solid var(--mimeo); }
.force-detail { white-space: nowrap; }
.force-status { white-space: nowrap; }
.force-status.delayed { color: #E7B3A8; font-weight: 700; }
.force-map { padding: 3px 7px; white-space: nowrap; }
.force-empty { padding: 24px; text-align: center; color: var(--chalk-dim); border: 1px solid var(--rule); }

/* ------------------------------------------------------------- order queue */
.wide-button { width: 100%; margin-top: 4px; }
.order-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.order-controls button.on { background: var(--mimeo); border-color: var(--mimeo-pale); color: #fff; }
.queue-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.queue-summary > div { border: 1px solid var(--rule); padding: 9px 10px; background: rgba(51,55,44,0.5); }
.queue-summary span { display: block; font-family: var(--face-display); font-size: 24px; line-height: 1; }
.queue-summary small { display: block; margin-top: 5px; color: var(--chalk-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.queue-summary.end-review-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 10px; }
.queue-scroll { max-height: 400px; overflow: auto; border-top: 1px solid var(--rule); }
.queue-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.queue-table th, .queue-table td { padding: 6px; border-bottom: 1px solid rgba(86,92,73,0.45); text-align: left; vertical-align: top; }
.queue-table th { position: sticky; top: 0; z-index: 1; background: var(--table-2); color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.queue-table td.num { text-align: right; white-space: nowrap; }
.order-tags span { display: inline-block; padding: 2px 5px; margin: 0 3px 3px 0; border: 1px solid var(--rule); white-space: nowrap; }
.order-tags span.alert { color: #E7B3A8; border-color: #A45A4D; }
.order-tags span.contact { color: var(--mimeo-pale); border-color: var(--mimeo); }
.order-tags span.quiet { color: var(--chalk-dim); }
.queue-map { padding: 3px 7px; white-space: nowrap; }
.queue-empty { padding: 24px; text-align: center; color: var(--chalk-dim); border: 1px solid var(--rule); }

/* ------------------------------------------------------ strategic objectives */
.objective-controls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.objective-controls button.on { background: var(--mimeo); border-color: var(--mimeo-pale); color: #fff; }
.objective-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.objective-summary > div { border: 1px solid var(--rule); padding: 9px 10px; background: rgba(51,55,44,0.5); }
.objective-summary span { display: block; font-family: var(--face-display); font-size: 24px; line-height: 1; }
.objective-summary small { display: block; margin-top: 5px; color: var(--chalk-dim); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
.objective-scroll { max-height: 400px; overflow: auto; border-top: 1px solid var(--rule); }
.objective-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.objective-table th, .objective-table td { padding: 6px; border-bottom: 1px solid rgba(86,92,73,0.45); text-align: left; vertical-align: top; }
.objective-table th { position: sticky; top: 0; z-index: 1; background: var(--table-2); color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.objective-table td.num { text-align: right; white-space: nowrap; }
.objective-table .objective-directive td:first-child { border-left: 3px solid var(--mimeo); }
.objective-detail { white-space: nowrap; }
.objective-threatened { color: #E7B3A8; font-weight: 700; }
.objective-map { padding: 3px 7px; white-space: nowrap; }
.objective-empty { padding: 24px; text-align: center; color: var(--chalk-dim); border: 1px solid var(--rule); }

.compact-modal { width: min(720px, 100%); }
.combat-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 15px 0; }
.combat-values > div, .outcome-band > div {
  padding: 10px 8px; text-align: center; border: 1px solid var(--rule);
  background: rgba(51,55,44,0.5);
}
.combat-values span, .outcome-band span { display: block; font-family: var(--face-display); font-size: 27px; line-height: 1; }
.combat-values small, .outcome-band small { display: block; margin-top: 5px; color: var(--chalk-dim); font-family: var(--face-ui); font-size: 9.5px; line-height: 1.2; letter-spacing: 0.07em; text-transform: uppercase; }
.combat-values .combat-odds { background: var(--mimeo); border-color: var(--mimeo); }
.combat-values .combat-odds small { color: rgba(255,255,255,0.78); }
.forecast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.forecast-grid article { border: 1px solid var(--rule); padding: 12px 14px; }
.forecast-grid h3 { font-family: var(--face-ui); font-size: 11px; letter-spacing: 0.1em; color: var(--chalk-dim); margin: 0 0 8px; text-transform: uppercase; }
.forecast-list .forecast-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid rgba(86,92,73,0.45); }
.forecast-list .forecast-row:last-child { border-bottom: 0; }
.forecast-row span:first-child { color: var(--chalk-dim); }
.forecast-row strong { color: var(--chalk); font-weight: 400; text-align: right; }
.outcome-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.forecast-note { margin: 10px 0 0; color: var(--chalk-dim); font-size: 11px; }

@media (max-width: 820px) {
  #body { flex-direction: column; }
  #panel { width: auto; max-height: 46%; border-left: none; border-top: 1px solid var(--rule); }
  #mapwrap { min-height: 40%; }
  #soundwrap input[type=range] { display: none; }
  #bar { gap: 10px; padding: 6px 10px; }
  #bar .title { font-size: 15px; }
  #maptools { padding: 4px; gap: 4px; left: 6px; top: 6px; flex-wrap: nowrap; }
  #maptools button { padding: 4px 6px; font-size: 10px; letter-spacing: 0.04em; }
  #legend { top: 40px; left: 6px; font-size: 11px; max-width: calc(100% - 12px); }
  #hexinfo { font-size: 11px; }
  #routeinfo { top: 46px; right: 6px; min-width: 0; }
  #hero { height: 128px; }
  .briefing-grid { grid-template-columns: 1fr; }
  .record-cards { grid-template-columns: repeat(2, 1fr); }
  .record-columns { grid-template-columns: 1fr; }
  .journal-summary { grid-template-columns: repeat(2, 1fr); }
  .force-summary { grid-template-columns: repeat(2, 1fr); }
  .queue-summary { grid-template-columns: repeat(2, 1fr); }
  .objective-summary { grid-template-columns: repeat(2, 1fr); }
  .force-production { flex-direction: column; gap: 3px; }
  .journal-table th:nth-child(3), .journal-table td:nth-child(3),
  .journal-table th:nth-child(6), .journal-table td:nth-child(6) { display: none; }
  .force-table th:nth-child(2), .force-table td:nth-child(2),
  .force-table th:nth-child(4), .force-table td:nth-child(4) { display: none; }
  .queue-table th:nth-child(2), .queue-table td:nth-child(2),
  .queue-table th:nth-child(4), .queue-table td:nth-child(4) { display: none; }
  .objective-table th:nth-child(2), .objective-table td:nth-child(2),
  .objective-table th:nth-child(6), .objective-table td:nth-child(6) { display: none; }
  .forecast-grid { grid-template-columns: 1fr; }
  .combat-values { grid-template-columns: repeat(2, 1fr); }
  .outcome-band { grid-template-columns: 1fr; }
  .modal { padding: 18px; }
  .modal-actions .primary { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
