/* White Eagle Reborn — style.css */
:root {
  --paper: #e5e0d3; --paper-2: #d9d2c1; --paper-3: #cbc2ad;
  --ink: #1f2023; --ink-soft: #57554d; --rule: #9b937e;
  --crimson: #a51f37; --crimson-ink: #ffffff; --white: #f7f4ec;
  --steel: #34506a; --brass: #a8822e; --good: #3d6b3a; --bad: #a51f37;
  --map-bg: #25282a; --glass: rgba(229, 224, 211, .94);
  --display: 'Alegreya SC', 'Iowan Old Style', Georgia, serif;
  --serif: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --sans: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #18191b; --paper-2: #222327; --paper-3: #2e2f34;
    --ink: #e9e3d5; --ink-soft: #aaa497; --rule: #4f4b44;
    --crimson: #e05a71; --crimson-ink: #1a0b0f; --white: #f1ece0;
    --steel: #8fb1cc; --brass: #d3ac57; --good: #8cc07f; --bad: #e86b7f;
    --map-bg: #141617; --glass: rgba(24, 25, 27, .93);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #18191b; --paper-2: #222327; --paper-3: #2e2f34;
  --ink: #e9e3d5; --ink-soft: #aaa497; --rule: #4f4b44;
  --crimson: #e05a71; --crimson-ink: #1a0b0f; --white: #f1ece0;
  --steel: #8fb1cc; --brass: #d3ac57; --good: #8cc07f; --bad: #e86b7f;
  --map-bg: #141617; --glass: rgba(24, 25, 27, .93);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
#app { min-height: 100%; }
body.has-bg::before { content: ''; position: fixed; inset: 0; z-index: -2; background: var(--bg-img) center / cover no-repeat; }
body.has-bg::after { content: ''; position: fixed; inset: 0; z-index: -1; background: color-mix(in srgb, var(--paper) var(--bg-veil, 72%), transparent); }
.screen { min-height: 100%; padding: 26px 20px 56px; max-width: 1180px; margin: 0 auto; }
.screen[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
h1, h2, h3, h4 { font-weight: 500; margin: 0; }
p { margin: 0 0 .8em; }
.note { font-size: 15px; color: var(--ink-soft); max-width: 72ch; }
.small { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* buttons */
.btn { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; padding: 10px 16px; min-height: 44px; font-family: var(--sans); font-weight: 500; color: var(--ink); }
.btn:hover:not(:disabled) { background: var(--paper-3); }
.btn.primary { background: var(--crimson); border-color: var(--crimson); color: var(--crimson-ink); }
.btn.primary:hover:not(:disabled) { background: var(--crimson); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; min-height: 38px; font-size: 15px; }
.btn.tiny { padding: 2px 8px; min-height: 30px; font-size: 13px; }
.btn.big { width: 100%; min-height: 52px; font-size: 18px; margin-top: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkback { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--ink-soft); font-family: var(--sans); }
.linkback:hover { color: var(--ink); text-decoration: underline; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.lang button { background: transparent; border: 0; padding: 6px 12px; min-height: 36px; font-family: var(--cond); font-size: 15px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* menu: the diorama is the one bold moment */
#scr-menu { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 44px; align-items: center; min-height: 100vh; max-width: 1280px; }
.diorama { position: relative; aspect-ratio: 1.08; background: var(--map-bg); border-bottom: 10px solid var(--crimson); box-shadow: 0 -10px 0 0 var(--white) inset; }
.diorama canvas { width: 100%; height: calc(100% - 10px); display: block; }
.dio-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #ddd; padding: 20px; text-align: center; }
.menu-title { font-family: var(--display); font-weight: 700; font-size: clamp(52px, 7.6vw, 98px); line-height: .9; letter-spacing: -.005em; }
.flagband { margin: 20px 0 0; max-width: 460px; border: 1px solid var(--rule); background: var(--white); border-bottom: 12px solid var(--crimson); }
.flagband span { display: block; font-family: var(--cond); font-weight: 600; font-size: clamp(17px, 2vw, 22px); padding: 8px 12px; color: #1f2023; }
.menu-sub { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-soft); max-width: 36ch; margin: 22px 0 24px; line-height: 1.5; }
.menu-list { display: grid; gap: 8px; max-width: 380px; }
.menu-list .btn { text-align: left; display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; }
.menu-list .btn small { font-family: var(--cond); opacity: .75; }
.menu-foot { margin-top: 22px; display: flex; gap: 12px; align-items: center; color: var(--ink-soft); font-size: 14px; flex-wrap: wrap; }
.donate { margin-top: 20px; max-width: 380px; border-top: 1px solid var(--rule); padding-top: 14px; }
.donate p { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
.btn.coffee { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: #ffdd00; border-color: #e0c200; color: #1d1a10; }
.btn.coffee:hover { background: #ffdd00; filter: brightness(1.05); }

/* page headers and lists */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin: 6px 0 20px; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--display); font-size: clamp(32px, 5vw, 50px); line-height: 1; flex: 1; }
.theatre { margin: 30px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.theatre h2 { font-family: var(--serif); font-size: 25px; }
.theatre span { font-family: var(--cond); color: var(--ink-soft); }
.theatre::after { content: ''; flex: 1; border-bottom: 1px solid var(--rule); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { position: relative; text-align: left; border: 1px solid var(--rule); background: var(--paper-2); padding: 0; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.card:hover { border-color: var(--ink); }
.card .art { height: 112px; background: var(--map-bg) center / cover no-repeat; }
.card .art canvas { width: 100%; height: 100%; display: block; }
.card .yr { position: absolute; right: 10px; top: 86px; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--ink); text-shadow: 0 0 6px var(--paper-2), 0 0 2px var(--paper-2); }
.card .body { padding: 12px 14px 14px; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.1; margin: 0 0 4px; max-width: 75%; }
.card .meta { font-size: 14px; color: var(--ink-soft); }
.sides { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--cond); font-size: 14px; border: 1px solid var(--rule); padding: 1px 8px; border-left: 5px solid var(--f, var(--rule)); background: var(--paper); color: var(--ink); }
.chip.removable { cursor: pointer; }
.vs { color: var(--ink-soft); }

/* briefing and custom */
.brief, .random-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 34px; }
.dispatch { font-family: var(--serif); font-size: 20px; line-height: 1.55; max-width: 60ch; }
.facts { font-family: var(--cond); font-size: 17px; color: var(--ink-soft); margin: 2px 0 14px; }
.forces { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.force { border-top: 4px solid var(--f); padding-top: 8px; }
.force h4, .objs h4 { font-family: var(--cond); font-size: 18px; font-weight: 600; }
.force .role { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.force ul, .objs ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.force li, .objs li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--rule); padding: 3px 0; }
.force li.reinf { color: var(--steel); }
.objs { margin-bottom: 12px; }
.mapbox canvas { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: var(--map-bg); }
.field { margin: 14px 0; }
.field > label, .field > .lbl { display: block; font-family: var(--cond); font-size: 16px; color: var(--ink-soft); margin-bottom: 6px; }
.field select { width: 100%; padding: 8px 10px; min-height: 44px; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 2px; }
.desc { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; max-width: 56ch; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; padding: 8px 12px; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg button.fc { border-left: 5px solid var(--f); }
.seedrow { display: flex; gap: 8px; }
.seedrow input { width: 150px; padding: 8px 10px; border: 1px solid var(--rule); background: var(--paper); border-radius: 2px; min-height: 42px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--crimson); }
.check small { display: block; color: var(--ink-soft); font-size: 14px; }
.reqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.req { display: flex; justify-content: space-between; gap: 6px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 2px; padding: 6px 10px; min-height: 40px; text-align: left; font-size: 14px; }
.req b { font-family: var(--cond); }
.reqchosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* help, units, look */
.help { columns: 2 340px; column-gap: 40px; }
.help section { break-inside: avoid; margin-bottom: 18px; }
.help h2 { font-family: var(--serif); font-size: 23px; margin-bottom: 4px; }
.help p { font-family: var(--serif); font-size: 17.5px; line-height: 1.6; max-width: 62ch; }
.enc { display: grid; gap: 22px; }
.encitem { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; border-top: 1px solid var(--rule); padding-top: 18px; }
.encmedia canvas { width: 100%; aspect-ratio: 1; display: block; }
.enctext h2 { font-family: var(--serif); font-size: 27px; line-height: 1.1; margin-bottom: 8px; }
.enctext h3 { font-family: var(--cond); font-weight: 600; font-size: 17px; margin: 12px 0 2px; color: var(--ink-soft); }
.enctext p { max-width: 68ch; margin: 0; }
.encmeta { color: var(--ink-soft); font-size: 15px; }
.encstats { display: grid; grid-template-columns: repeat(6, minmax(52px, 64px)); gap: 4px; text-align: center; }
.encstats div { background: var(--paper-2); padding: 4px 0; }
.encstats b { display: block; font-family: var(--cond); font-size: 20px; font-weight: 600; }
.encstats span { font-size: 12px; color: var(--ink-soft); }
.vars { margin: 0; padding-left: 18px; font-size: 15px; }
.look { display: grid; gap: 26px; }
.look h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 4px; }
.bgitem { border: 1px solid var(--rule); background: var(--paper-2); padding: 14px; max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.bgprev { aspect-ratio: 16 / 9; background: var(--paper-3) center / cover no-repeat; border: 1px solid var(--rule); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.favrow { display: flex; align-items: center; gap: 14px; }
.favprev { width: 64px; height: 64px; image-rendering: auto; border: 1px solid var(--rule); background: var(--paper); }
.range { display: flex; gap: 10px; align-items: center; font-family: var(--cond); }
.range input { flex: 1; accent-color: var(--crimson); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gitem { border: 1px solid var(--rule); background: var(--paper-2); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.gitem canvas { width: 100%; aspect-ratio: 1; display: block; }
.gitem .nm { font-weight: 600; font-size: 15px; line-height: 1.2; }
.chktable { border-collapse: collapse; margin: 14px 0; width: 100%; font-size: 15px; }
.chktable td { border-bottom: 1px dotted var(--rule); padding: 6px 4px; }
.chktable td:last-child { text-align: right; font-family: var(--cond); font-size: 16px; }
.chktable .ok { color: var(--good); } .chktable .miss { color: var(--bad); }
.chklist { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); padding: 8px; margin: 4px 0 8px; }

/* ---------- battle ---------- */
#scr-game, #scr-strat { position: fixed; inset: 0; padding: 0; max-width: none; margin: 0; background: var(--map-bg); overflow: hidden; touch-action: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floater { position: absolute; left: 0; top: 0; font-family: var(--cond); font-weight: 600; font-size: 20px; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; white-space: nowrap; }
.floater.bad { color: #ffb0a6; }
.floater.big { font-size: 24px; color: #ffe08a; }
#hud { position: absolute; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--glass); border-bottom: 3px solid var(--crimson); box-shadow: 0 -3px 0 0 var(--white) inset; z-index: 5; flex-wrap: wrap; }
.hud-l, .hud-r, .hud-c { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hud-c small { font-family: var(--cond); color: var(--ink-soft); font-size: 14px; }
.turninfo { display: flex; flex-direction: column; line-height: 1.15; }
.turninfo b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.turninfo span { font-family: var(--cond); font-size: 15px; color: var(--ink-soft); }
.sidechip, .vpchip { font-family: var(--cond); font-weight: 600; border-left: 5px solid var(--f); padding: 0 6px; color: var(--ink); background: var(--paper-2); }
.vpchip { font-size: 17px; padding: 2px 8px; }
.thinking { font-family: var(--cond); font-size: 15px; color: var(--ink-soft); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
#panel { position: absolute; right: 10px; top: 86px; width: 320px; max-height: calc(100% - 150px); overflow: auto; background: var(--glass); border: 1px solid var(--rule); padding: 12px; z-index: 4; font-size: 15px; }
#panel[hidden] { display: none; }
.ucard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; border-left: 5px solid var(--f); padding-left: 10px; }
.ucard canvas { width: 96px; height: 96px; }
.ucard h3, .ccard h3 { font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.ucard .fac { font-size: 14px; color: var(--ink-soft); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 0; font-size: 14.5px; }
dt { color: var(--ink-soft); } dd { margin: 0; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.forecast { margin-top: 12px; border-top: 2px solid var(--crimson); padding-top: 8px; }
.forecast p { margin: 4px 0; }
.hint { border-left: 4px solid var(--steel); padding-left: 10px; margin-bottom: 10px; }
.hint p { margin: 4px 0 0; font-size: 14.5px; }
.ccard .obj { margin-top: 8px; } .ccard .ghost { color: var(--ink-soft); margin-top: 6px; }
#camctl { position: absolute; left: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); display: flex; flex-direction: column; gap: 6px; z-index: 4; }
#camctl button { width: 44px; height: 44px; border: 1px solid var(--rule); background: var(--glass); color: var(--ink); font-size: 19px; border-radius: 2px; }
#toast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; max-width: min(560px, 86vw); font-size: 15px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 7; pointer-events: none; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#intel { position: absolute; right: 0; top: 0; bottom: 0; width: 400px; max-width: 100%; background: var(--paper); border-left: 3px solid var(--crimson); z-index: 6; overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 24px; }
#intel[hidden] { display: none; }
.intel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.intel-head h2 { font-family: var(--display); font-size: 30px; }
#intel h3 { font-family: var(--cond); font-size: 18px; font-weight: 600; margin: 18px 0 6px; }
.sectors { width: 100%; border-collapse: collapse; font-size: 14px; }
.sectors th, .sectors td { padding: 6px 4px; border-bottom: 1px dotted var(--rule); text-align: left; vertical-align: top; }
.sectors thead th { font-family: var(--cond); font-weight: 500; color: var(--ink-soft); }
.sectors tbody th { font-family: var(--cond); font-weight: 600; }
.sectors td { position: relative; }
.sectors td b { position: relative; font-family: var(--cond); font-size: 16px; }
.sectors td small { display: block; color: var(--ink-soft); }
.bar { position: absolute; left: 0; top: 4px; height: 20px; opacity: .3; }
.bar.own { background: var(--steel); } .bar.foe { background: var(--crimson); }
.reinfbox { margin-top: 14px; border: 1px solid var(--steel); padding: 10px; }
.reinfbox p { margin: 0 0 8px; }
.known { list-style: none; margin: 0; padding: 0; }
.known li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dotted var(--rule); font-size: 14.5px; }
.known li.old { color: var(--ink-soft); }
.known .dot { width: 12px; height: 12px; background: var(--f); }
.known .st { font-family: var(--cond); font-size: 16px; font-weight: 600; }
.known .age { font-family: var(--cond); font-size: 14px; }
#overlay { position: absolute; inset: 0; background: rgba(10, 10, 12, .55); display: grid; place-items: center; z-index: 9; padding: 20px; }
#overlay[hidden] { display: none; }
.sheet { background: var(--paper); border-top: 6px solid var(--crimson); padding: 22px; width: min(520px, 100%); max-height: 86vh; overflow: auto; }
.sheet h2 { font-family: var(--display); font-size: 34px; margin-bottom: 12px; }
.sheet .menu-list { max-width: none; margin-bottom: 12px; }
.sheet h3 { font-family: var(--cond); font-size: 18px; margin-top: 12px; }
.pass { text-align: center; border-left: 8px solid var(--f); padding: 10px 0 0 12px; }
.result.lost h2 { color: var(--bad); }
.log { font-size: 14px; padding-left: 20px; max-height: 50vh; overflow: auto; }
.nogl { padding: 40px; color: var(--ink); background: var(--paper); }

/* mobile */
@media (max-width: 860px) {
  #scr-menu { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .diorama { aspect-ratio: 1.3; }
  .brief, .random-grid { grid-template-columns: 1fr; }
  .encitem { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .encstats { grid-template-columns: repeat(3, 1fr); }
  .forces { grid-template-columns: 1fr; }
  #hud { padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 6px; gap: 6px; }
  .hud-c small { display: none; }
  .turninfo b { font-size: 16px; }
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 40vh; border-width: 3px 0 0; border-top-color: var(--crimson); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
  #camctl { left: auto; right: 8px; top: 120px; bottom: auto; }
  #camctl button { width: 40px; height: 40px; }
  #toast { bottom: auto; top: 112px; }
  #intel { width: 100%; }
}

/* ---------- campaign ---------- */
.campsub { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink-soft); margin: -8px 0 18px; }
.layers { list-style: none; counter-reset: layer; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.layers li { counter-increment: layer; padding: 16px 18px 6px 0; border-right: 1px solid var(--rule); margin-right: 18px; }
.layers li:last-child { border-right: 0; margin-right: 0; }
.layers li::before { content: counter(layer); font-family: var(--display); font-size: 44px; line-height: 1; color: var(--crimson); display: block; margin-bottom: 6px; }
.layers h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 6px; }
.layers p { font-family: var(--serif); font-size: 17px; line-height: 1.55; max-width: 44ch; }
.campstart { max-width: 620px; }
.hud-c.res { gap: 14px; }
.hud-c.res span { display: flex; flex-direction: column; line-height: 1.05; position: relative; min-width: 64px; }
.hud-c.res small { font-family: var(--cond); font-size: 13px; color: var(--ink-soft); }
.hud-c.res b { font-family: var(--cond); font-size: 20px; font-weight: 600; }
.hud-c.res .pw i { position: absolute; left: 0; bottom: -4px; height: 3px; background: var(--crimson); }
.ncard { border-left: 5px solid var(--f); padding-left: 10px; margin-bottom: 10px; }
.ncard h3 { font-family: var(--serif); font-size: 22px; }
.acard { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px dotted var(--rule); }
.acard.on { background: color-mix(in srgb, var(--brass) 14%, transparent); }
.acard canvas { width: 64px; height: 64px; }
.acard p { margin: 2px 0 6px; }
.recruit { margin-top: 12px; border-top: 2px solid var(--crimson); padding-top: 8px; }
.recruit h4 { font-family: var(--cond); font-size: 18px; }
.opsheet h2, .dispatch-sheet h2 { font-size: 30px; }
.opsheet h4 { font-family: var(--cond); font-size: 17px; margin: 12px 0 4px; }
.opsheet .forces { margin: 10px 0; }
.reslist .check { margin: 6px 0; }
.dispatch-sheet article { border-left: 4px solid var(--crimson); padding: 2px 0 2px 12px; margin: 12px 0; }
.dispatch-sheet h3 { font-family: var(--serif); font-size: 21px; }
.dispatch-sheet p { font-family: var(--serif); font-size: 17px; line-height: 1.5; margin: 4px 0 0; }
.clog { font-size: 14px; padding-left: 18px; color: var(--ink-soft); max-height: 30vh; overflow: auto; }
.dipl { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 14px; }
.dipl th, .dipl td { border-bottom: 1px dotted var(--rule); padding: 6px 4px; text-align: left; vertical-align: middle; }
.dipl th { font-weight: 600; white-space: nowrap; }
.dipl td:last-child { text-align: right; }
.dipl .btn.tiny { white-space: nowrap; }
#overlay .sheet:has(.dipl) { width: min(640px, 100%); }
.dipl .dot { display: inline-block; width: 11px; height: 11px; background: var(--f); margin-right: 6px; }
.dgen { display: grid; gap: 8px; margin-bottom: 14px; }
.dgen p { margin: 2px 0 0; color: var(--ink-soft); }
.btn.tiny small { opacity: .8; }
.tacbtn { margin-top: 8px; border-color: var(--steel); }
@media (max-width: 860px) {
  .layers { grid-template-columns: 1fr; }
  .layers li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--rule); }
  .hud-c.res { order: 3; width: 100%; justify-content: space-between; }
  .hud-c.res small { display: block; }
}
@media (max-width: 860px) { #scr-strat #camctl { top: 168px; } }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.slot { border: 1px solid var(--rule); background: var(--paper-2); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.slot h3 { font-family: var(--cond); font-size: 18px; font-weight: 600; }
.slot p { margin: 0; font-size: 15px; }
.chance { border-left: 4px solid var(--steel); padding-left: 10px; }
.chance small { display: block; color: var(--ink-soft); }
.threats { border-left: 4px solid #e8862b; padding-left: 10px; margin-bottom: 10px; }
.threats h4 { font-family: var(--cond); font-size: 17px; margin-bottom: 4px; }
.threats ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.threats li { display: flex; gap: 6px; align-items: center; padding: 2px 0; flex-wrap: wrap; }
.threat { color: #b8620f; }
@media (max-width: 860px) { .slots { grid-template-columns: 1fr; } }
.tacprep h2 { font-size: 30px; }
.stakes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 14px; }
.stakes > div { border-top: 3px solid var(--steel); padding-top: 6px; font-size: 14px; }
.stakes > div:last-child { border-top-color: var(--crimson); }
.stakes h4 { font-family: var(--cond); font-size: 16px; margin-bottom: 2px; }
.stakes p { margin: 0; }
.prepgrid { display: grid; gap: 8px; margin-bottom: 12px; }
.prep { text-align: left; border: 1px solid var(--rule); background: var(--paper-2); padding: 10px 12px; border-radius: 2px; display: flex; flex-direction: column; gap: 2px; min-height: 52px; color: var(--ink); }
.prep:hover { border-color: var(--crimson); }
.prep b { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.prep span { font-size: 14px; color: var(--ink-soft); }
.tacline { font-family: var(--cond); font-weight: 600; font-size: 17px; background: var(--crimson); color: var(--crimson-ink); padding: 3px 10px; }
@media (max-width: 860px) { .stakes { grid-template-columns: 1fr; } }
#overlay .sheet:has(.dipl2) { width: min(680px, 100%); }
.dipl2 { margin: 8px 0 14px; }
.drow { border-bottom: 1px dotted var(--rule); padding: 8px 0; }
.dhead { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.dhead .dot { display: inline-block; width: 11px; height: 11px; background: var(--f); }
.dst { color: var(--ink-soft); font-size: 14px; }
.dacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dacts:empty { display: none; }
