:root {
  --walnut: #2b1d12; --walnut2: #3b2819; --paper: #efe6d0; --paper2: #e5d9bd; --ink: #2a2118; --muted: #7a6a55;
  --brass: #c9a24a; --brass2: #e8c66a; --us: #2e4a86; --cs: #8b2a22; --rule: #b9a47e; --bad: #9b2a1f; --warn: #9a6a10;
  --left: 300px; --right: 244px; --top: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--walnut); color: var(--ink); font: 13px/1.4 Georgia, 'Times New Roman', serif; overflow: hidden; }
button { font: inherit; }
#top { height: var(--top); overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: linear-gradient(#3b2819, #24180f); color: #f1e4c4; border-bottom: 2px solid var(--brass); }
.brand { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .5px; font-variant: small-caps; color: #f6e8c4; }
.ver { font-size: 11px; color: var(--walnut); background: var(--brass); border-radius: 3px; padding: 1px 5px; font-family: Georgia, serif; }
.sub { font-style: italic; color: #d9c69c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clock { margin-left: auto; white-space: nowrap; }
.clock .muted { color: #b8a57f; }
.side-pill { padding: 4px 10px; border-radius: 12px; font-weight: bold; white-space: nowrap; border: 1px solid #0006; }
.side-pill.US { background: var(--us); color: #fff; }
.side-pill.CS { background: #9a978c; color: #1b1a16; }
.drawer-toggle { display: none; background: var(--walnut2); color: #f1e4c4; border: 1px solid var(--brass); border-radius: 4px; padding: 5px 9px; cursor: pointer; }
#main { position: absolute; top: calc(var(--top) + 2px); left: 0; right: 0; bottom: 0; overflow: hidden; display: grid; grid-template-columns: var(--left) 1fr var(--right); }
.panel { background: var(--paper); overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--rule); padding: 8px 10px 16px; }
#right { border-right: 0; border-left: 1px solid var(--rule); }
.panel section { margin-bottom: 12px; }
.panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--walnut2); margin: 4px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--rule); font-weight: normal; }
.muted { color: var(--muted); } .small { font-size: 11.5px; } .bad { color: var(--bad); } .warn { color: var(--warn); }
#mapwrap { position: relative; overflow: hidden; background: #b9a988; touch-action: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
#tip { position: absolute; pointer-events: none; background: #f7efdcee; border: 1px solid var(--walnut2); border-radius: 4px; padding: 5px 8px; max-width: 240px; box-shadow: 0 2px 8px #0005; font-size: 12px; }
#tip[hidden] { display: none; }
#banner { position: absolute; top: 14px; left: 50%; transform: translate(-50%, -20px); background: #24180fe6; color: #f6e8c4; padding: 8px 18px; border: 1px solid var(--brass); border-radius: 4px; opacity: 0; transition: all .35s; pointer-events: none; font-size: 15px; max-width: calc(100% - 24px); white-space: normal; text-align: center; }
#banner.on { opacity: 1; transform: translate(-50%, 0); }
button { background: #f8f0dc; border: 1px solid #9c8762; border-radius: 4px; padding: 6px 7px; cursor: pointer; color: var(--ink); }
button:hover:not(:disabled) { background: #fff7e3; border-color: var(--walnut2); }
button:disabled { opacity: .45; cursor: default; }
button.on { background: #f3d58a; border-color: var(--warn); }
button.big { width: 100%; padding: 10px; font-size: 15px; background: linear-gradient(#4a321f, #2b1d12); color: #f6e8c4; border: 1px solid var(--brass); }
button.big:hover:not(:disabled) { background: linear-gradient(#5a3d26, #33231a); }
kbd { font: 10px monospace; color: var(--muted); border: 1px solid #c8b58f; border-radius: 3px; padding: 0 3px; float: right; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.grid2 button { text-align: left; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; margin-top: 7px; font-size: 12px; }
.opts label.wide { grid-column: 1 / -1; }
.opts label { cursor: pointer; }
select { font: inherit; background: #fbf5e6; border: 1px solid #9c8762; border-radius: 3px; }
/* selected card */
.selhead { display: flex; gap: 9px; align-items: center; margin-bottom: 6px; }
.selhead .nm { font-weight: bold; font-size: 14px; }
.chain { font-size: 11.5px; color: var(--muted); font-style: italic; }
.ctr { width: 44px; height: 38px; flex: none; border: 2px solid #111; border-top-width: 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 1px; font-size: 12px; }
.ctr.US { background: var(--us); color: #f4f1e6; border-color: #16284d; border-top-color: #0f1c38; }
.ctr.CS { background: #8d8c83; color: #1c1b18; border-color: #3e3d38; border-top-color: #7a1f1a; }
.ctr.rout { background: #b14a3a; color: #fff; }
.ctr.horses { background: #7a5230; font-size: 20px; justify-content: center; }
.sym { display: block; width: 26px; height: 12px; border: 1.5px solid currentColor; position: relative; margin-bottom: 2px; }
.sym.inf { background: linear-gradient(to top right, transparent 46%, currentColor 48%, currentColor 52%, transparent 54%), linear-gradient(to bottom right, transparent 46%, currentColor 48%, currentColor 52%, transparent 54%); }
.sym.cav { background: linear-gradient(to top right, transparent 46%, currentColor 48%, currentColor 52%, transparent 54%); }
.sym.art::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: currentColor; }
.ldr { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; line-height: 1; }
.ldr.US { background: #dfe6f5; border-color: var(--us); color: var(--us); }
.ldr.CS { background: #efe9dc; border-color: #8d8c83; color: var(--cs); }
.ldr b { font-size: 13px; }
table.kv { width: 100%; border-collapse: collapse; font-size: 12px; }
table.kv th { text-align: left; font-weight: normal; color: var(--muted); padding: 1px 6px 1px 0; vertical-align: top; white-space: nowrap; width: 1%; }
table.kv td { padding: 1px 0; }
.also { margin-top: 5px; font-size: 12px; }
.also a { color: var(--us); }
/* casualty return: the ruled slip */
.slip { background: #fbf6e8; border: 1px solid #b9a47e; box-shadow: inset 0 0 0 3px #fbf6e8, inset 0 0 0 4px #d8c69f; padding: 7px 9px; }
.slip .sh { font-variant: small-caps; letter-spacing: 1px; color: var(--walnut2); border-bottom: 1px double #b9a47e; margin-bottom: 4px; }
.slip .who { font-size: 12.5px; margin-bottom: 4px; }
.sd { display: inline-block; font-size: 9.5px; font-weight: bold; padding: 0 3px; border-radius: 2px; margin-right: 3px; vertical-align: 1px; }
.sd.US { background: var(--us); color: #fff; } .sd.CS { background: #9a978c; color: #1b1a16; }
table.ruled { width: 100%; border-collapse: collapse; font-size: 12px; }
table.ruled td { border-bottom: 1px solid #e3d6b8; padding: 2px 0; background-image: linear-gradient(to right, transparent 0, transparent 100%); }
table.ruled td.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 6px; }
table.ruled tr.sum td { border-top: 1px solid #b9a47e; font-style: italic; }
table.ruled tr.tot td { border-top: 2px solid var(--walnut2); border-bottom: 0; font-weight: bold; font-size: 13px; }
.die { display: inline-block; width: 17px; height: 17px; line-height: 15px; text-align: center; border: 1px solid #5a4630; border-radius: 3px; background: #fffdf6; font-weight: bold; font-size: 11px; margin: 0 1px; }
.morale, .slsub, .out { font-size: 12px; margin-top: 5px; color: var(--ink); }
.out { font-weight: bold; }
ul.ev { margin: 5px 0 0 16px; padding: 0; font-size: 12px; }
/* brigade return */
.bdehead { margin-bottom: 4px; }
.gauge { position: relative; height: 18px; background: #e3d6b8; border: 1px solid #b9a47e; margin: 4px 0 6px; }
.gauge .fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#c05a40, #9b2a1f); }
.gauge .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--walnut); }
.gauge span { position: absolute; left: 6px; top: 1px; font-size: 11px; color: #1b130b; text-shadow: 0 0 3px #f5ecd6; }
table.roster { width: 100%; border-collapse: collapse; font-size: 12px; }
table.roster tr { cursor: pointer; } table.roster tr:hover td { background: #f7eed8; } table.roster tr.cur td { background: #f3dc9e; }
table.roster td { padding: 1px 3px; }
.bar { height: 7px; background: #e3d6b8; min-width: 60px; } .bar div { height: 100%; background: #6f8458; }
td.st { width: 14px; font-weight: bold; text-align: center; } td.st.dis { color: var(--warn); } td.st.rout, td.st.gone { color: var(--bad); }
.farm { font-style: italic; } .obj { color: var(--cs); }
#log { font-size: 11.5px; max-height: 260px; overflow-y: auto; }
#log .l { padding: 1px 0; border-bottom: 1px dotted #d8c9a6; }
#log .t { color: var(--muted); font-size: 10.5px; }
#log .h { font-weight: bold; } #log .lead { color: var(--cs); font-weight: bold; } #log .wreck { color: var(--bad); } #log .cap { color: #6b3c80; } #log .obj { color: var(--us); font-weight: bold; } #log .arr { color: #3a6a2a; }
.vpline { font-size: 16px; }
ul.objs { list-style: none; margin: 5px 0; padding: 0; font-size: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; border: 1px solid #0005; }
.dot.US { background: var(--us); } .dot.CS { background: var(--cs); } .dot.none { background: #e8dcc0; }
.report-launch { width: 100%; margin-top: 6px; text-align: left; }
.obj-jump { width: 100%; text-align: left; margin-top: 3px; padding: 5px; background: transparent; border-color: transparent; }
.obj-jump .muted { display: block; margin-left: 14px; font-size: 11px; }
.command-report h2, .turn-review h2 { font-variant: small-caps; font-size: 26px; margin: 0; }
.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.report-stats > span { border: 1px solid var(--rule); padding: 8px; background: #f8f0dc; }
.report-stats b { display: block; font-size: 23px; color: var(--walnut); }
.report-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.report-filters label { min-width: 0; font-size: 12px; }
.report-filters input, .report-filters select { display: block; width: 100%; min-width: 0; min-height: 40px; margin-top: 4px; padding: 8px; border: 1px solid var(--rule); background: #fffaf0; color: var(--ink); font: inherit; font-size: 14px; }
.report-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.report-tools p { margin: 0 auto 0 0; }
.report-rows { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 3px; }
.report-unit { width: 100%; text-align: left; padding: 10px; }
.report-unit.needs-attention { border-left: 4px solid var(--bad); }
.report-unit-name { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-weight: bold; }
.report-unit-name .small { font-weight: normal; }
.report-chain { display: block; color: #68563d; margin: 3px 0 6px; font-size: 12px; }
.report-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.report-tags span { background: #e7d8b4; padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.report-empty { padding: 20px; text-align: center; border: 1px dashed var(--rule); }
.fire-planner h2, .arrival-planner h2 { margin: 0; font-size: 26px; font-variant: small-caps; }
.planning-label { display: block; font-size: 13px; }
.planning-label select { display: block; width: 100%; max-width: 100%; margin: 6px 0 14px; padding: 10px; font: inherit; color: var(--ink); background: #fffaf0; border: 1px solid var(--rule); }
.planning-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.planning-stats > span { background: #f8f0dc; border: 1px solid var(--rule); padding: 10px; }
.planning-stats b { display: block; color: var(--walnut); font-size: 24px; }
.planning-factors { width: 100%; border-collapse: collapse; }
.planning-factors caption { text-align: left; font-weight: bold; padding: 8px 0; }
.planning-factors th, .planning-factors td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); padding: 6px 4px; }
.planning-factors th { width: 44%; font-weight: normal; }
.planning-empty { padding: 16px; border: 1px dashed var(--rule); background: #f8f0dc; }
.arrival-card { border: 1px solid var(--rule); background: #f8f0dc; padding: 12px; margin: 10px 0; }
.arrival-card summary { cursor: pointer; font-size: 15px; }
.arrival-time { display: block; font-size: 12px; color: #68563d; margin-top: 3px; }
.arrival-roster { padding-left: 20px; max-height: 220px; overflow-y: auto; }
.arrival-roster li { padding: 2px 0; }
@media (max-width: 520px) {
  .planning-stats { grid-template-columns: 1fr; gap: 5px; }
  .planning-stats > span { display: flex; align-items: baseline; gap: 10px; padding: 6px 10px; }
  .planning-stats b { font-size: 21px; }
  .planning-label select { font-size: 16px; }
  .fire-planner .btnrow button { min-height: 44px; }
}
@media (max-width: 600px) {
  .report-stats { grid-template-columns: 1fr 1fr; }
  .report-filters { grid-template-columns: 1fr 1fr; }
  .report-filters label:first-child { grid-column: 1 / -1; }
  .report-filters input, .report-filters select { font-size: 16px; }
  .report-tools button { min-height: 42px; }
}
/* modal sheets */
#modal { position: fixed; inset: 0; background: #140c06b3; display: flex; align-items: flex-start; justify-content: center; z-index: 50; overflow-y: auto; padding: 24px 12px; }
#modal[hidden] { display: none; }
.sheet { background: var(--paper); max-width: 860px; width: 100%; border: 2px solid var(--brass); box-shadow: 0 10px 40px #000a; padding: 18px 22px; }
.title h1 { font-variant: small-caps; margin: 0; font-size: 34px; letter-spacing: 1px; color: var(--walnut); }
.title .ver { font-size: 13px; vertical-align: middle; }
.sheet:has(.title-layout) { max-width: 1200px; }
.title-layout { display: grid; grid-template-columns: minmax(220px, 32%) minmax(0, 1fr); gap: 24px; align-items: start; }
.title-art { position: sticky; top: 0; }
.title-art img { display: block; width: 100%; height: auto; border: 1px solid var(--brass); box-shadow: 0 5px 18px #24180f55; }
.title-setup { min-width: 0; }
@media (max-width: 860px) {
  .title-layout { grid-template-columns: 1fr; gap: 18px; }
  .title-art { position: static; }
  .title-art img { width: auto; max-width: 100%; height: auto; max-height: 55vh; margin: 0 auto; }
}
.epi { font-style: italic; color: var(--muted); margin: 2px 0 8px; }
.lede { margin: 0 0 12px; }
.scs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc { display: flex; gap: 8px; border: 1px solid var(--rule); padding: 8px; cursor: pointer; background: #f8f0dc; }
.sc:has(input:checked) { border-color: var(--walnut2); background: #fff7e3; box-shadow: 0 0 0 2px var(--brass); }
.scn { font-weight: bold; font-size: 14px; } .scsub { font-style: italic; color: var(--muted); font-size: 12px; } .scb { font-size: 12px; margin-top: 3px; }
.size { font-weight: normal; font-size: 10.5px; background: var(--walnut2); color: #f1e4c4; padding: 0 5px; border-radius: 3px; vertical-align: 2px; }
.cmdrow { margin: 12px 0; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.btnrow button.big { width: auto; padding: 10px 22px; }
.rules p { margin: 6px 0; }
.end .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.end h2 { font-variant: small-caps; font-size: 26px; margin: 0; }
.end h3 { font-size: 14px; }
.threat { color: var(--bad); font-weight: bold; }
.course { margin: 10px 0 4px; } .course h3 { margin: 6px 0 2px; } .course svg { width: 100%; height: auto; display: block; background: #fbf6e8; border: 1px solid var(--rule); }
.course .key { font-size: 11.5px; } .course .key i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin: 0 4px 0 10px; }
/* narrower screens */
@media (max-width: 1150px) { :root { --left: 262px; --right: 214px; } .sub { display: none; } }
@media (max-width: 860px) {
  :root { --top: 48px; }
  .drawer-toggle { display: inline-block; }
  .brand h1 { font-size: 16px; }
  .clock .muted, .clock b { display: none; }
  #main { grid-template-columns: 1fr; }
  #mapwrap { grid-column: 1; }
  .panel { position: absolute; top: 0; bottom: 0; z-index: 20; width: min(310px, 86vw); box-shadow: 0 0 24px #000a; transition: transform .25s; }
  #left { left: 0; transform: translateX(-105%); }
  #right { right: 0; transform: translateX(105%); }
  body.show-left #left { transform: none; }
  body.show-right #right { transform: none; }
  .scs, .end .cols { grid-template-columns: 1fr; }
  .title h1 { font-size: 26px; }
}
@media (max-width: 520px) { .side-pill, .clock { display: none; } .drawer-toggle .t { display: none; } .brand h1 { font-size: 15px; } #top { gap: 8px; padding: 0 8px; } .drawer-toggle:last-child { margin-left: auto; } }
@media (prefers-reduced-motion: reduce) { .panel, #banner { transition: none; } }

#mini { width: 100%; max-width: 220px; margin: 0 auto; display: block; border: 1px solid var(--rule); cursor: pointer; background: #d4cd9f; touch-action: none; }
.opts.one { grid-template-columns: 1fr; max-height: 150px; overflow-y: auto; }

#delegBox summary { cursor: pointer; list-style: none; }
#delegBox summary::-webkit-details-marker { display: none; }
#delegBox summary h2::after { content: ' ▸'; }
#delegBox[open] summary h2::after { content: ' ▾'; }
@media (max-height: 860px) and (min-width: 861px) {
  .panel section { margin-bottom: 7px; }
  .panel h2 { margin: 2px 0 4px; }
  #right button { padding: 4px 6px; }
  button.big { padding: 7px; font-size: 14px; }
  .opts { margin-top: 4px; gap: 1px 6px; }
}

button.wide { width: 100%; margin-top: 5px; }
.coord { font-variant: small-caps; color: var(--muted); font-size: 11.5px; }
#opt_volume { width: 70px; vertical-align: middle; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid #c9a24a; outline-offset: 2px; }
.hdrbtn { background: var(--walnut2); color: #f1e4c4; border: 1px solid var(--brass); border-radius: 4px; padding: 3px 8px; font-size: 16px; line-height: 1; }
.hdrbtn:hover:not(:disabled) { background: #4a321f; color: #fff; }

/* Saved battles: compact paper cards that stack on narrow screens. */
.save-browser { max-width: 800px; margin: 0 auto; }
.save-browser h2 { margin-top: 0; font-variant: small-caps; font-size: 26px; }
.save-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.save-card, .save-current { border: 1px solid var(--rule); padding: 14px; background: #fbf6e8; border-radius: 5px; overflow-wrap: anywhere; }
.save-current { margin: 14px 0; border-left: 4px solid var(--brass); }
.save-card { display: flex; flex-direction: column; }
.save-eyebrow { font: 11px/1.5 Georgia, serif; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.save-card h3 { margin: 5px 0; font-size: 18px; }
.save-card p, .save-current p { margin: 6px 0; }
.save-card .btnrow { margin-bottom: 0; margin-top: auto; padding-top: 10px; }
.save-card button { min-height: 36px; }
.save-delete { color: var(--bad); }
.save-label { display: block; margin: 12px 0 5px; font-weight: bold; }
.checkpoint-name { display: block; width: 100%; padding: 9px; font: inherit; background: #fffaf0; color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; }
#saveMessage { min-height: 1.4em; font-weight: bold; }
@media (max-width: 600px) { .save-grid { grid-template-columns: 1fr; } .save-card .btnrow { gap: 6px; } }

/* Headquarters briefing and speculative objective planning. */
.battle-brief { max-width: 880px; margin: 0 auto; }
.brief-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.brief-heading h2 { font-size: 27px; font-variant: small-caps; margin: 2px 0 8px; }
.brief-heading button { flex-shrink: 0; }
.brief-eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; }
.brief-scenario { font-size: 20px; margin-bottom: 4px; }
.brief-live, .brief-projection { background: #fbf6e8; border: 1px solid var(--rule); border-left: 4px solid var(--brass); padding: 12px 15px; margin: 14px 0; }
.battle-brief .report-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.battle-brief .report-stats > span { min-width: 0; overflow-wrap: anywhere; }
.battle-brief .report-stats b { font-size: 20px; }
.brief-live h3, .brief-projection h4 { font-size: 18px; margin: 5px 0 10px; }
.brief-projection { border-left-color: #54735a; background: #f0f1e4; }
.brief-projection p { margin-bottom: 0; }
.brief-projection details { margin-top: 8px; }
.brief-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 10px; }
.brief-nav button { min-height: 38px; }
.brief-nav button[aria-pressed="true"] { background: var(--walnut2); color: #fff2d0; border-color: var(--walnut); }
.battle-brief section[hidden] { display: none; }
#briefNotice:empty { display: none; }
#briefNotice { color: var(--bad); font-weight: bold; }
.objective-grid, .army-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.objective-plan, .corps-card { min-width: 0; border: 1px solid var(--rule); padding: 12px; background: #fbf6e8; border-radius: 4px; overflow-wrap: anywhere; }
.objective-plan.is-planned { border-color: #54735a; box-shadow: inset 3px 0 #54735a; }
.objective-name { font-weight: bold; font-size: 16px; text-align: left; width: 100%; padding: 5px 0; border: 0; background: transparent; }
.objective-name:hover { text-decoration: underline; }
.objective-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; margin: 8px 0; }
.owner-tag { padding: 2px 7px; border-radius: 10px; border: 1px solid var(--rule); }
.owner-tag.US { color: #fff; background: var(--us); border-color: var(--us); }
.owner-tag.CS { color: #fff; background: var(--cs); border-color: var(--cs); }
.owner-tag.none { color: var(--ink); background: var(--paper2); }
.objective-plan label { display: block; font-size: 12px; margin-bottom: 4px; }
.objective-plan select { width: 100%; min-height: 36px; padding: 5px; }
.corps-card h4 { margin: 0; font-size: 18px; }
.readiness-list { margin: 12px 0; }
.readiness-list div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #ded4bc; padding: 3px 0; }
.readiness-list dt { color: var(--muted); }
.readiness-list dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: bold; }
.corps-card button { width: 100%; }
.brief-empty { padding: 20px; background: var(--paper2); border: 1px dashed var(--rule); }
.brief-table-wrap { overflow-x: auto; margin-top: 8px; }
.brief-table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 12px; }
.brief-table th, .brief-table td { border-bottom: 1px solid var(--rule); padding: 6px; text-align: left; }
.brief-table caption { text-align: left; padding: 7px 0; color: var(--muted); }
.battle-brief summary { cursor: pointer; }
@media (max-width: 600px) { .objective-grid, .army-grid { grid-template-columns: 1fr; } .brief-heading { align-items: flex-start; } .brief-heading h2 { font-size: 23px; } .brief-nav button { flex: 1 1 120px; } }

/* March mode remains visible when the mobile orders drawer is closed. */
.route-launch { grid-column: 1 / -1; }
#routeHint, #formationHint, #sightHint { position: absolute; bottom: 12px; left: 12px; right: 12px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #24180fed; color: #fff2d0; border: 1px solid var(--brass); border-radius: 4px; box-shadow: 0 3px 10px #0005; }
#routeHint[hidden], #formationHint[hidden], #sightHint[hidden] { display: none; }
#routeHint button, #formationHint button, #sightHint button { flex-shrink: 0; min-height: 36px; }
#routeHint kbd, #formationHint kbd, #sightHint kbd { margin-left: 8px; }
.march-planner h2 { font-variant: small-caps; font-size: 26px; margin-top: 0; }
.march-planner summary { cursor: pointer; }
.march-threats li, .march-steps li { margin: 5px 0; }
.march-steps { max-height: 220px; overflow-y: auto; padding: 5px 12px 5px 30px; border: 1px solid var(--rule); background: #fbf6e8; }
.march-planner .planning-stats > span { min-width: 0; overflow-wrap: anywhere; }
.march-planner .btnrow button { min-height: 38px; }
@media (max-width: 520px) { #routeHint, #formationHint, #sightHint { left: 8px; right: 8px; bottom: 8px; padding: 7px 9px; font-size: 12px; } }

/* Charge review: shared parchment report styling, readable on narrow screens. */
.assault-planner { overflow-wrap: anywhere; }
.assault-party, .assault-stages { padding-left: 22px; line-height: 1.6; }
.assault-party li, .assault-stages li { margin: 7px 0; }
.assault-outcomes td { white-space: nowrap; }
.assault-planner details { margin: 14px 0; }
.assault-planner summary { cursor: pointer; font-weight: bold; }

/* Brigade volley orders and return. */
.volley-planner { overflow-wrap: anywhere; }
.volley-planner h2 { margin-top: 0; font-size: 26px; font-variant: small-caps; }
.volley-card { background: #fbf6e8; border: 1px solid var(--rule); padding: 12px; margin: 12px 0; }
.volley-card h3 { margin-top: 0; }
.volley-card details { margin: 10px 0; }
.volley-card summary { cursor: pointer; font-weight: bold; }
.volley-card button, .volley-planner .btnrow button { min-height: 42px; }
.volley-concentration, .volley-results { padding-left: 24px; }
.volley-results li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.volley-results p { margin-bottom: 0; }
.volley-actions { position: sticky; bottom: -1px; background: var(--paper, #f8f0dc); padding: 10px 0; border-top: 1px solid var(--rule); }

/* Brigade formation preview. */
.formation-planner { overflow-wrap: anywhere; }
.formation-planner h2 { margin-top: 0; font-size: 26px; font-variant: small-caps; }
.formation-card { border: 1px solid var(--rule); background: #fbf6e8; padding: 12px; margin: 12px 0; }
.formation-card h3 { margin-top: 0; }
.formation-card summary { cursor: pointer; }
.formation-planner .btnrow button { min-height: 42px; }
.formation-actions { position: sticky; bottom: -1px; background: var(--paper, #f8f0dc); padding: 10px 0; border-top: 1px solid var(--rule); }

/* Friendly recovery and command report. */
.readiness-report { overflow-wrap: anywhere; }
.readiness-report h2 { margin-top: 0; font-size: 26px; font-variant: small-caps; }
.readiness-report h3 { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--rule); }
.readiness-report ul { padding-left: 22px; }
.readiness-report li { margin: 7px 0; line-height: 1.5; }
.readiness-report li button { text-align: left; }
.readiness-report .btnrow button { min-height: 42px; }

/* Sight inspection, with textual results as well as map markings. */
.sight-report h2 { margin-top: 0; font-size: 26px; font-variant: small-caps; }
.sight-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.sight-controls label { display: grid; gap: 4px; flex: 1 1 110px; }
.sight-controls input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 7px; background: #fff8e6; color: #281d12; border: 1px solid #826544; font: inherit; }
.sight-controls button, .sight-report .btnrow button { min-height: 40px; }
.sight-report :is(input, button):focus-visible { outline: 3px solid #805d19; outline-offset: 3px; }
.sight-result { padding: 10px; border: 1px solid currentColor; font-weight: bold; }
.sight-table { overflow-x: auto; }
.sight-table table { min-width: 430px; }
.sight-ground { border-top: 1px solid #a38b65; padding-top: 8px; }
#sightHint { flex-wrap: wrap; }
#sightHintText { flex: 1 1 200px; }
.sight-result.good { color: #205246; }

/* Own-army status remains readable without relying on color alone. */
.army-controls { margin: 12px 0; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.army-controls > label { display: block; font-weight: bold; margin-bottom: 5px; }
.army-controls select { box-sizing: border-box; width: 100%; min-height: 38px; background: #fff8e6; color: #281d12; border: 1px solid #826544; padding: 6px; font: inherit; }
.army-controls button { min-height: 38px; }
.army-controls :is(button,select):focus-visible { outline: 3px solid #805d19; outline-offset: 3px; }
#armyLegend { position: absolute; z-index: 3; top: 10px; left: 10px; max-width: min(400px, calc(100% - 20px)); padding: 8px 11px; color: #291f15; background: #fff5ddf2; border: 1px solid #947445; border-radius: 4px; box-shadow: 0 2px 8px #0003; pointer-events: none; font-size: 12px; }
#armyLegend[hidden] { display: none; }
.army-legend-items { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 5px; }
.army-legend-items i { display: inline-block; min-width: 17px; padding: 1px 2px; color: white; font: bold 11px sans-serif; text-align: center; }
.army-legend-note { display: block; margin-top: 5px; line-height: 1.35; }
@media (max-width: 700px) { #armyLegend { top: 6px; left: 6px; max-width: calc(100% - 12px); padding: 6px 8px; font-size: 11px; } #armyLegend .army-legend-note { display: none; } }
