:root {
  --bg: #0f141b; --panel: #151b24; --panel2: #1b2330; --line: #2a3442;
  --fg: #e6e1d6; --muted: #8a94a3; --warden: #4f86d6; --colonial: #5aa865; --neutral: #a9afb8;
  --salv: #7a5a2e; --comp: #6a6e74; --sulf: #7c7a16; --coal: #1a1a1a; --oil: #9c4c1f;
  --hot: #e0a040;                  /* palette (README "Colour rule"): amber = activity / heat only */
  --dead: #c8553d;                 /* red = scorched / destroyed only */
  --err: #e0553d;   /* status only (the recorder health chip, stale): red, never a side colour */
  --display: Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;
  --pw: 400px;                     /* side panel width */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--display); overflow: hidden; }
button { font: inherit; color: inherit; }
img { display: block; }

/* ---------------------------------------------------------------- map */
#map { position: fixed; inset: 0; background: var(--bg); }
.leaflet-container { background: var(--bg); font-family: var(--display); }
.leaflet-tile-pane { filter: brightness(.58) saturate(.75) contrast(1.05); }
.leaflet-control-attribution { background: rgba(15, 20, 27, .8) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a { background: var(--panel); color: var(--fg); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--panel2); color: var(--fg); }
.leaflet-tooltip.tip { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; font-family: var(--display);
  font-size: 13px; font-weight: 600; padding: 3px 8px; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.leaflet-tooltip.tip::before { display: none; }
.leaflet-tooltip.tip small { font-family: var(--mono); font-weight: 400; color: var(--muted); }

/* hex labels: sized in em so one font-size (set per zoom on #map) scales them */
.hl { pointer-events: none; }
.hl > div { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: flex; gap: .25em; align-items: flex-start;
  font-size: var(--ls, 10px); white-space: nowrap; }
.chip { display: flex; flex-direction: column; align-items: center; gap: .1em; }
.chip .ci { width: 2.2em; height: 2.2em; border-radius: .45em; box-shadow: 0 0 0 1px rgba(0,0,0,.45); background-size: cover; }
.chip b { font-family: var(--mono); font-size: 1.05em; font-weight: 700; color: var(--fg); text-shadow: 0 0 3px #000, 0 0 2px #000; line-height: 1; }
.chip.zero b { color: var(--muted); }
.pill { font-family: var(--mono); font-weight: 700; font-size: 1.5em; background: rgba(15, 20, 27, .82); border-radius: .35em; padding: .1em .35em;
  color: var(--fg); line-height: 1.1; }
.compact .chip b { display: none; }
.compact .pill { font-size: max(8px, 1.5em); padding: 0 .2em; }
.pill .w { color: #8db4ee; } .pill .c { color: #8fd29a; } .pill .n { color: var(--muted); }

/* combined summary: the four chips, smaller, on a dark backing so they read over the share fill */
.cmb { display: flex; gap: .2em; font-size: var(--ks, 10px); background: rgba(15, 20, 27, .62); border-radius: .5em; padding: .25em .3em .2em; }
.cmb .chip .ci { width: 1.8em; height: 1.8em; }
.compact .cmb .chip b { display: block; }
.narrow .cmb .chip b { display: none; }
.narrow .cmb { padding: .15em; }
/* REVIEW_UI cycle 3 item 55: forecast chips: digits in the display font (a plain zero, not the mono dotted one), at least 10 px; the
   share's side mark is a thin bar under the block (Warden blue for its share, Colonial green for the rest) */
.fcm .cmb .chip b { font: 700 max(10px, 1.1em)/1 var(--display); }
.fcm .chip.zero b { color: var(--muted); font-weight: 400; }
.cmb.shb { position: relative; margin-bottom: 4px; }
.cmb.shb::after { content: ""; position: absolute; left: .4em; right: .4em; bottom: -4px; height: 3px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.6);
  background: linear-gradient(90deg, var(--warden) 0 var(--sh), var(--colonial) var(--sh) 100%); }
/* REVIEW_UI cycle 3 item 56: the count chips step aside while the events feed is open (the hex names take their place) */
.feed-on .hl .cnt { display: none; } .feed-on .hl .hxn.alt { display: block; }
.feed-on .hl .hst:not(:has(.ich)) { display: none; }
/* live node counts: icon + number, 3 columns (compact: the scarce four, 2 x 2) */
.cnt { display: grid; grid-template-columns: repeat(3, auto); gap: .2em .45em; font-size: var(--cs, 10px); background: rgba(15, 20, 27, .5);
  border-radius: .45em; padding: .3em .4em; }
.cnt span { display: inline-flex; align-items: center; gap: .2em; }
.cnt i { transition: none; }
.cnt i { width: 1.5em; height: 1.5em; border-radius: .3em; background-size: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.cnt b { font-family: var(--mono); font-weight: 700; color: var(--fg); line-height: 1; min-width: 1.2em; }
.cnt .z { opacity: .35; } .cnt .z b { color: var(--muted); }
.cnt .sv b { color: var(--muted); font-weight: 600; }
.cnt2 .cnt { grid-template-columns: repeat(2, auto); gap: .1em .25em; padding: .15em .2em; }
.cnt2 .cnt .xtra { display: none; }
.tiny .cnt b, .tiny .cnt .z { display: none; }
.tiny .cnt { gap: .15em; padding: .15em; }
/* industry / defence count chips (zoomed out): stacked under the resource chips in one block, thin dividers; the structure icons
   replace them where they draw (.struct-on) */
.hsk { display: flex; flex-direction: column; align-items: center; gap: .25em; }
.hst { display: flex; flex-direction: column; align-items: center; gap: .25em; font-size: var(--cs, 10px); background: rgba(15, 20, 27, .55);
  border-radius: .45em; padding: .3em .4em; }
.hst > .cnt { background: none; padding: 0; }
.hst.stk { font-size: calc(var(--cs, 10px) * .72); } .hst.stk > .cnt { font-size: inherit; }   /* two or more blocks: smaller, to stay inside the hex */
.hst.stk3 { font-size: calc(var(--cs, 10px) * .6); }                                                 /* resources + industry + defences */
.struct-on .hst.stk { font-size: var(--cs, 10px); }
.hdv { display: block; align-self: stretch; height: 1px; background: rgba(230, 225, 214, .3); }
.ich { display: flex; flex-direction: column; align-items: center; gap: .2em; }
.ich > div { display: flex; justify-content: center; align-items: center; gap: .35em; }
.ich span { display: inline-flex; align-items: center; gap: .15em; }
.ich i { display: block; width: 1.45em; height: 1.45em; filter: drop-shadow(0 0 1px #000); }
.ich b { font-family: var(--mono); font-weight: 700; color: var(--fg); line-height: 1; }
.ich b .w { color: #8db4ee; } .ich b .c { color: #8fd29a; } .ich b .n { color: var(--muted); }
.ich b span + span::before { content: "·"; color: var(--muted); }
.struct-on .hst .ich, .struct-on .hst .hdv, .struct-on .hst.only { display: none; }
.cnt2 .hst { gap: .15em; padding: .15em .2em; } .cnt2 .ich { gap: .1em .2em; }
.tiny .ich b { display: none; } .tiny .hst { padding: .15em; }
.ich.ikey { display: inline-flex; flex-direction: row; gap: 6px; font-size: 12px; vertical-align: middle; background: rgba(15, 20, 27, .55); border-radius: 5px; padding: 2px 5px; }
.leaflet-tooltip.tip .tipn { display: flex; gap: 8px; margin-top: 3px; font-family: var(--mono); font-size: 12px; }
.tipn span { display: inline-flex; align-items: center; gap: 2px; }
.tipn img { width: 18px; height: 18px; }
img.rg { background: var(--oil); border-radius: 4px !important; }
#legend { position: fixed; left: 52px; bottom: 12px; z-index: 990; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: rgba(21, 27, 36, .92); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--muted);
  max-width: calc(100vw - 70px); }
#legend[hidden] { display: none; }
/* one row per active layer; a row that does not fit hides its tail behind "+n more" (capLegend) */
#legend { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 3px; }
.lgr { display: flex; align-items: center; gap: 4px 8px; white-space: nowrap; overflow: hidden; max-width: 100%; min-width: 0; }
.lgr .more { flex: none; font: 600 10.5px var(--mono); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; cursor: help; }
@media (min-width: 721px) { #panel:not([hidden]) ~ #legend { max-width: calc(100vw - var(--pw) - 80px); } }
.fgrad { display: inline-block; width: 46px; height: 12px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, rgba(230, 225, 214, 0), rgba(230, 225, 214, .85)), #1b2330; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.zk { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); color: var(--fg); }
.zk i { width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.zk img { width: 16px; height: 16px; }
.zt { font-size: 11px; }
.zk.lgk i { height: 6px; border-radius: 3px; box-shadow: none; }   /* supply flow: one glow swatch per side */
.zt.lgt small { display: block; font-size: 10px; opacity: .75; }   /* its second key row under the first */

/* official map icons: neutral PNG x owner colour (multiply), masked by the icon's own alpha; no canvas */
.mi { width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center;
  background-blend-mode: multiply; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center; }
.tw { position: absolute; width: var(--tis, 14px); height: var(--tis, 14px); transform: translate(-50%, -50%); filter: drop-shadow(0 0 1px #000); }
.tw.sp { width: calc(var(--tis, 14px) * .9); height: calc(var(--tis, 14px) * .9); }
.tw.st { width: calc(var(--tis, 14px) * .8); height: calc(var(--tis, 14px) * .8); opacity: .92; }
.tw::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: rgba(15, 20, 27, .72); z-index: -1; }
.tw.st::before { inset: -1px; background: rgba(15, 20, 27, .55); }
.tw.key::before { display: none; }
.tw .mi { position: relative; }
.tw.vp::after, .tw.sc::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--fg); }
.tw.sc::after { border-color: #c0603a; }
.tw.key { position: relative; display: inline-block; transform: none; width: 18px; height: 18px; }
.tw.sd { width: calc(var(--tis, 14px) * .56); height: calc(var(--tis, 14px) * .56); opacity: .85; }   /* defences under industry */
/* roads: bridges as small cream diamonds (from a 1-ring zoom) */
.br i { position: absolute; width: 7px; height: 7px; transform: translate(-50%, -50%) rotate(45deg); background: var(--fg);
  box-shadow: 0 0 0 1px #000; }
/* layer panel (replaces the summary dropdown) */
.lp { min-width: 280px; width: max-content; max-width: calc(100vw - 20px); padding: 4px 8px 6px; max-height: calc(100vh - 80px); overflow: auto; }
/* two columns on a desktop (base + control + resources | map items), one on a phone / narrow window and in forecast */
.lcols { display: grid; grid-template-columns: auto auto; gap: 0 14px; align-items: start; }
.lcols.one { grid-template-columns: auto; }
.lcol { min-width: 0; }
/* a narrow window: the menu hangs from the layers button (~210 px in) and is ~780 px wide with two columns, so under 1040 px one column */
@media (max-width: 1040px) { .lcols { grid-template-columns: auto; } }
/* group headers: a thin rule with the name on it (no separate header line) */
.lh { display: flex; align-items: center; gap: 6px; font-size: 9.5px; line-height: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 4px 2px 1px; }
.lh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lr { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 5px; cursor: pointer; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.lr:hover { background: var(--panel2); }
.lr.on { color: var(--fg); }
.lr.off { opacity: .4; cursor: not-allowed; } .lr.off:hover { background: none; } .lr.off input, .lr.off .fp { pointer-events: none; }   /* LAYER_CAP: cannot work in this view (history), the setting is kept */
.lr > span:not(.oi):not(.fp) { white-space: nowrap; }
.lr input { margin: 0; accent-color: var(--warden); }
.lr .oi { min-width: 50px; }
.lr.none .oi { min-width: 50px; }
.lr small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.lr small ~ .fp { margin-left: 4px; }   /* "auto" and the picker share the right end of the row */
.lsv svg { width: 18px; height: 18px; color: var(--fg); }
.stp { width: 6px !important; height: 18px !important; border-radius: 2px !important; }
.fgrad.sm { width: 26px; height: 12px; }
.sd.pipe { color: var(--oil); font-size: 10.5px; border: 1px solid var(--oil); border-radius: 3px; padding: 0 3px; }
.sn .cc { flex-basis: 100%; color: var(--muted); font-size: 10.5px; }
.thr { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--fg); background: rgba(230, 225, 214, .12); }
.thr.det { border-style: dashed; background: none; } .thr.air { border-style: dashed; background: rgba(230, 225, 214, .06); }
.fp select { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; padding: 1px 2px; max-width: 120px; }
.fp .dv { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); margin-left: 4px; }
.fline { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.fline b { color: var(--fg); } .fline small { font-size: 10.5px; }
.fline .bl { color: #10151c; background: var(--muted); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.fp button[data-fday] { font-size: 11px; color: var(--muted); padding: 1px 4px; font-family: var(--mono); } .fp button[data-fday].on { color: var(--fg); }
/* live stats */
#vp { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; padding: 0 4px; }
#vp[hidden] { display: none; }
#vp .vrow { display: flex; align-items: center; gap: 5px; }
#vp.two { flex-direction: column; align-items: stretch; gap: 2px; font-size: 11px; line-height: 1; }
#vp.two .vb { height: 7px; } #vp .vpr .vb { overflow: visible; }
#vp .w { color: #8db4ee; } #vp .c { color: #8fd29a; } #vp small { color: var(--muted); }
#vp .vb { position: relative; width: 110px; height: 10px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
#vp .vw { position: absolute; left: 0; top: 0; bottom: 0; background: var(--warden); } #vp .vc { position: absolute; right: 0; top: 0; bottom: 0; background: var(--colonial); }
#vp .vm { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--fg); opacity: .5; }
#hotb { display: flex; align-items: center; justify-content: center; color: var(--hot); } .fl svg { vertical-align: -1px; color: var(--hot); } #hotb.on { background: var(--panel2); border-color: var(--muted); }
.spk { display: inline-block; vertical-align: middle; }
.hr { display: grid; grid-template-columns: 22px 1fr auto 74px 40px; gap: 8px; align-items: center; padding: 4px 4px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: 12.5px; }
.hr:hover { background: var(--panel2); }
.hr.hh { cursor: default; padding-top: 0; padding-bottom: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; } .hr.hh:hover { background: none; } .hr.hh .hs { text-align: center; }
.hr small { color: var(--muted); } .hr .hn2 { font-family: var(--display); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr .en { color: var(--muted); text-align: right; }
.tl { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.tt { display: inline-flex; align-items: center; gap: 4px; } .tt small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
/* partisan targets */
.ptr { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); border-radius: 50%; border: 2px solid var(--fg); box-shadow: 0 0 0 1.5px #000, inset 0 0 0 1px #000;
  background: rgba(15, 20, 27, .55); display: flex; align-items: center; justify-content: center; }
.ptr .tw.key { filter: drop-shadow(0 0 1px #000); }
.ptk { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--fg); box-shadow: 0 0 0 1px #000; vertical-align: -2px; }
.ptr.cap, .ptk.cap { border-radius: 3px; }
.ptr.raid, .ptk.raid { border-style: dashed; }
/* backline: partisan activity (disc), civil war (swords), poorly guarded (opportunity chip); one row per hex */
.blm .blr { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); display: flex; align-items: center; gap: 3px; }
.bld, .blc, .blo { display: inline-flex; align-items: center; justify-content: center; font: 700 10px/1 var(--mono); white-space: nowrap; box-sizing: border-box; }
.bld { border-radius: 50%; color: #10151c; box-shadow: 0 0 0 1px #000; }
.bld.h { background: rgba(15, 20, 27, .55); border: 1.5px solid; box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); opacity: .8; font-weight: 600; }
.bldw { display: inline-flex; align-items: center; gap: 2px; } .bldw.h { opacity: .85; }   /* raid disc: ☠ in the disc, the number beside it */
.bldn { font: 700 11px/1 var(--mono); text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; } .bldw.h .bldn { font-size: 10px; font-weight: 600; }
.blo svg { margin-right: 2px; flex: none; }
.qh { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } .qh small { font: 10.5px var(--mono); color: var(--muted); }
.qhs { display: inline-flex; gap: 0; height: 9px; } .qhs i { width: 2px; height: 9px; background: var(--fg); }
.qhs i.q { background: #8fd2ff; } .qhs i.n { box-shadow: 0 2px 0 0 #fff; }   /* the least-active window lit, the current UTC hour ticked */
.qhs i.u { background: none; box-shadow: inset 0 -1px 0 rgba(230, 225, 214, .45); opacity: 1; }   /* no backline time that hour: unknown, an empty gap on a faint baseline (2 px cells are too thin to hatch) */
.qhw { position: relative; display: inline-flex; flex-direction: column; padding-bottom: 9px; }   /* strip + its 00 · 12 scale (REVIEW_UI cycle 2 item 45) */
.qhx { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; } .qhx b { position: absolute; top: 0; transform: translateX(-1px); font: 400 8px/1 var(--mono); color: var(--muted); }
.qhx::before { content: ""; position: absolute; left: 50%; top: -2px; width: 1px; height: 2px; background: var(--muted); }
.bld.r1 { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--hot), 0 0 0 4px #000; }
.bld.r2 { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--hot), 0 0 0 4px #000, 0 0 10px 5px rgba(224, 160, 64, .7); }
/* the biggest civil wars / raids (history panel) */
.cwl { max-height: 400px; overflow-y: auto; }
.cwr { display: grid; grid-template-columns: 74px 26px 1fr 12px 78px; gap: 6px; align-items: center; padding: 1px 4px; border-radius: 4px; font: 12px/18px var(--mono); cursor: pointer; }
.cwr:hover { background: var(--panel2); } .cwr.on { background: var(--panel2); box-shadow: inset 2px 0 0 var(--fg); }
.cwr.hh { cursor: default; color: var(--muted); font-size: 10.5px; } .cwr.hh:hover { background: none; }
.cwr .hn2 { font-family: var(--display); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwr .n { text-align: right; color: var(--muted); } .cwr .tq { width: 10px; height: 10px; }
.bhr { display: inline-flex; align-items: center; gap: 2px; font: 700 11px/1 var(--mono); filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000); }
.bhr svg { display: block; } .bhr span { text-shadow: 0 0 2px #000; }
.bhc { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px dashed; box-sizing: border-box; background: rgba(15, 20, 27, .55); }
.zk .bhc { width: 17px; height: 17px; border-radius: 50%; box-shadow: none; }
.opl b { position: absolute; transform: translate(-50%, -135%) scale(var(--iz, 1)); font: 700 11px/1 var(--mono); white-space: nowrap; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; }
.hpl b { transform: translate(-50%, 0) scale(var(--iz, 1)); transform-origin: 50% 0; color: #f3ecd8; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 4px #000, 1px 1px 1px #000; }   /* players per hex: hangs BELOW its anchor (under the hex name) */
/* a players number (REVIEW_UI cycle 1 item 11): cream on a dark pill, the edge in the side's colour; a hex pair = two pills */
.ppl { display: inline-block; padding: 0 4px; border: 1.5px solid; border-radius: 8px; background: rgba(12, 16, 22, .9); color: #f3ecd8; font: 700 11px/13px var(--mono); text-shadow: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); }
.hpl b { display: inline-flex; gap: 3px; } .zk.opl { display: inline-flex; gap: 3px; } .zk.opl .ppl { font-size: 10px; line-height: 12px; }
.hl.plh .hxn { visibility: hidden; }   /* L23: the faint hex name under a players label */
.apl b { transform: translate(-50%, -50%) scale(var(--iz, 1)); display: flex; flex-direction: column; align-items: center; gap: 1px; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 4px #000, 1px 1px 1px #000; }   /* players on an offensive / a contest head (centred on its anchor) */
.bls { display: inline-flex; gap: 1px; padding: 1px; border-radius: 4px; border: 1.5px solid; background: rgba(15, 20, 27, .82); box-shadow: 0 0 0 1px #000; }
.bls.r1 { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--hot); } .bls.r2 { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--hot), 0 0 10px 5px rgba(224, 160, 64, .7); }
.bls i { display: inline-flex; flex-direction: column; align-items: center; min-width: 20px; padding: 1px 2px; font-style: normal; }
.bls small { font: 600 8px/1 var(--mono); color: var(--muted); } .bls b { font: 700 11px/1.1 var(--mono); } .bls b.z { color: var(--muted); font-weight: 400; }
.blm .bls small { font-size: 9.5px; color: #b3bcc6; } .blm .bls b { font-size: 12px; } .blm .bls i { min-width: 23px; }   /* the on-map 10m · 1h · 6h · 24h table: no type under 9 px (REVIEW_UI cycle 2 item 46) */
.bhr { white-space: nowrap; }   /* "a ⚔ b": two sides' deaths either side of the swords */
.blr > span + span, .blk > .bhr + .bhr { margin-left: 7px; }   /* two "a ⚔ b" markers in one row: keep "45 44" apart */
.blc { gap: 2px; padding: 2px 4px; border-radius: 3px; border: 1.5px solid; background: #0f141b; box-shadow: 0 0 0 1px #000; }
.blo { padding: 2px 3px; border-radius: 3px; background: rgba(15, 20, 27, .8); color: var(--muted); font-weight: 600; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.blk { display: inline-flex; align-items: center; gap: 3px; } .zk.blk .ptk { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px #000; margin-right: 1px; } .zk.blk .ptk.cap { border-radius: 3px; }
.hr.blh { grid-template-columns: 34px 1fr 14px auto auto; }
.hr.blh .blm1 { display: inline-flex; justify-content: center; } .hr.blh .sdm { width: 14px; height: 14px; } .hr.blh small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.sl .bld, .sl .blc { margin-left: 4px; }
.pr { display: grid; grid-template-columns: 28px 20px 1fr auto; gap: 8px; align-items: center; padding: 4px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.pr:hover { background: var(--panel2); }
.pr .sc { font-family: var(--mono); font-weight: 700; color: var(--fg); text-align: right; }
.pr .sii { width: 18px; height: 18px; display: inline-block; }
.pr small { color: var(--muted); font-size: 10.5px; }
.pr .tv { font-family: var(--mono); color: var(--fg); white-space: nowrap; }
/* who is awake */
.clkm .clk { position: absolute; width: 56px; height: 56px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 2px #000); }
#hourr { width: 120px; accent-color: var(--hot); }
.hr2 { font-family: var(--mono); color: var(--fg); font-size: 12px; }
/* history scrubber (bottom bar) */
#histb { display: flex; align-items: center; justify-content: center; } #histb.on { color: var(--fg); background: var(--panel2); border-color: var(--muted); }
#scrub { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 995; display: flex; align-items: center; gap: 10px;
  background: rgba(21, 27, 36, .95); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; width: min(760px, calc(100vw - 20px)); flex-wrap: wrap; row-gap: 6px; }
#scrub[hidden] { display: none; }
/* REVIEW_UI cycle 3 item 51: with the side panel open (desktop) the time bar fits the map area left of it, so the slider's last days,
   "☰ biggest" and × stay reachable at 1366 px; item 61: × sits in the card's top-right corner, never alone on a row */
@media (min-width: 721px) { #panel:not([hidden]) ~ #scrub { left: calc((100vw - var(--pw)) / 2); width: min(760px, calc(100vw - var(--pw) - 24px)); } }
#scrub { padding-right: 42px; } #scrub #scrubx { position: absolute; top: 6px; right: 8px; }
#scrubrw { flex: 1 1 160px; display: flex; flex-direction: column; min-width: 0; }
#scrubr { width: 100%; margin: 0; accent-color: #c9c3b5; }   /* a control, not activity: neutral (palette rule) */
/* day ticks under the slider: one per war day, a number every 5th (inset by the thumb's half width so a tick sits under its poll) */
#scrubt { position: relative; height: 11px; margin: 0 8px; }
#scrubt i { position: absolute; top: 0; width: 1px; height: 3px; background: var(--muted); opacity: .6; }
#scrubt i.l { height: 5px; opacity: 1; } #scrubt b { position: absolute; top: 4px; transform: translateX(-50%); font: 9px/1 var(--mono); color: var(--muted); }
.dot.h { background: none; box-shadow: inset 0 0 0 1.5px var(--fg); } [data-mode="live"].on .dot.h { animation: none; }
#scrubd { font-family: var(--mono); font-size: 12px; color: var(--fg); white-space: nowrap; }
#scrubp { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; width: 30px; height: 26px; cursor: pointer; font-size: 11px; }
#scrubx { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; }
#scrubw, #scrubv { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; height: 26px; font-family: var(--mono); font-size: 11px; max-width: 210px; }
#scrubw { max-width: 330px; }   /* the live war's "from 27 Oct · live, replay to 23 Nov 09:00" in full (phones: the bar wraps) */
#scrub .stg { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 6px; height: 26px; padding: 0 8px; cursor: pointer; font-size: 11px; white-space: nowrap; }
#scrub .stg.on { color: var(--fg); background: var(--panel2); border-color: var(--muted); }
#scrub .stg[hidden] { display: none; }
#scrub #scrubn { background: var(--fg); color: #10151c; border-color: var(--fg); font-weight: 700; }   /* "→ latest": an action (to the replay's last poll), not a layer pill (REVIEW_UI cycle 2 item 50) */
#scrub .stg.na { opacity: 0.55; border-style: dashed; }
.hsi { pointer-events: none; } .hsi .mi { filter: drop-shadow(0 0 1px #000); }
.sbadge { pointer-events: none; } .sbadge b { display: inline-block; background: #070a0e; color: #e6e1d6; font: 700 9px/11px var(--mono); padding: 0 2px; border-radius: 2px; white-space: nowrap; }
.logic { position: absolute; left: 0; top: 0; pointer-events: none; }
@media (max-width: 720px) { #scrub { bottom: 8px; flex-wrap: wrap; } #scrubd { font-size: 11px; } }
@media (max-width: 720px) {   /* phone: the time bar in 4 rows, not 5 (REVIEW_UI cycle 2 item 38): small toggles share one row */
  #scrub { gap: 6px; row-gap: 5px; padding: 5px 36px 5px 8px; } #scrub #scrubx { top: 5px; right: 6px; } #scrub .stg { height: 24px; padding: 0 6px; font-size: 10.5px; } #scrubx { width: 24px; height: 24px; }
  #scrubw { max-width: 100%; } #scrub .stx { display: none; }
  #scrub .stg:not(#scrubn) { order: 2; } #scrubx { order: 1; }   /* × on the time row, the toggles on one row below */
}
.fp button[data-thrside], .fp button[data-airside] { font-size: 10.5px; color: var(--muted); padding: 1px 4px; font-family: var(--mono); }
.fp button[data-thrside].on, .fp button[data-airside].on { color: var(--fg); }
/* item 3 (25 Nov): the threat / air side pickers use the toolbar's emblems; "both" = the two overlapped */
.fp button.sdp { width: 26px; height: 22px; padding: 1px; display: inline-flex; align-items: center; justify-content: center; }
.fp button.sdp img { width: 17px; height: 17px; border-radius: 0; }
.fp .sdb { display: inline-flex; } .fp .sdb img { width: 13px; height: 13px; } .fp .sdb img + img { margin-left: -5px; }
/* events feed */
#feedb { display: flex; align-items: center; justify-content: center; } #feedb.on { color: var(--fg); background: var(--panel2); border-color: var(--muted); }
.evm div { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); filter: drop-shadow(0 0 1px #000); }
.evm svg { display: block; }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 4px; }
.fchips button { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 5px; padding: 2px 6px; font: 600 11.5px var(--mono); cursor: pointer; }
.fchips button.on { color: var(--fg); border-color: var(--muted); background: var(--panel2); }
.fchips small { color: var(--muted); }
.evr { display: grid; grid-template-columns: 44px 26px 1fr auto auto; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 5px; font-size: 12.5px; }
.evh { width: 22px; height: 22px; padding: 0; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; }
.evh:hover { color: var(--fg); border-color: var(--muted); }   /* ⟲: open the history at this event's poll (REVIEW_UI cycle 2 feature 1) */
.vpm { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px 1px 3px; border-radius: 8px; border: 1.5px solid;
  background: #0f141b; color: #f3ecd8; font: 700 11px/1 var(--mono); white-space: nowrap; box-shadow: 0 0 0 1px #000; cursor: pointer; }
.vpm small { font: 700 10px/1 var(--mono); padding: 1px 3px; border-radius: 4px; } .vpm small.un { font-style: italic; font-weight: 400; }
.vpm.on { background: var(--fg); color: #10151c; }   /* a victory town of the open list (REVIEW_UI cycle 2 feature 3), lit while its row is hovered */
/* REVIEW_UI cycle 3 item 60: the depot board's dots (whole-map zoom; the official icons take over from the icon zoom) */
.dpdm { position: relative; } .dpdm .dpd { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px #000; }
.dpd.dn { background: #10151c; color: var(--dead); font: 900 10px/10px var(--display); text-align: center; }
.dpd.th { box-shadow: 0 0 0 1.5px #000, 0 0 0 3.5px var(--hot); }
.dpdm.on .dpd { transform: scale(1.7); box-shadow: 0 0 0 1.5px #000, 0 0 0 3px var(--fg); }
.zk.dpdm { width: 14px; height: 14px; } .zk.dpdm .dpd { left: 2px; top: 2px; }
.struct-on .dpdm { display: none; }
/* item 57: an airfield of the air-threat envelope: its map icon in a ring of the side's colour */
.afm b { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid; background: rgba(16, 21, 28, .85); box-shadow: 0 0 0 1px #000; }
.afm b .mi, .afm b img, .afm b svg { width: 14px; height: 14px; }
.zk.afm { position: relative; width: 22px; height: 20px; } .zk.afm b { left: 11px; top: 10px; }
/* REVIEW_TOOL cycle 3 features: the rebuild list (events feed) and the raid history (hex panel) */
.rbd { margin: 6px 0 2px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.rbd > summary { cursor: pointer; font: 600 12px var(--mono); color: var(--fg); } .rbd > summary b { color: var(--hot); margin-left: 4px; }
.rbd[open] > summary { margin-bottom: 4px; } .rbd .km { font-family: var(--mono); }
.rhh { font-size: 12.5px; margin: 2px 0 4px; }
.rhl { display: grid; gap: 2px; margin-top: 4px; }
.rhr { display: grid; grid-template-columns: 92px 1fr auto 26px; gap: 6px; align-items: center; font-size: 12px; }
.rhr small { font-family: var(--mono); color: var(--muted); } .rhr .en { font: 600 12px var(--mono); }
.dthr { position: absolute; left: 0; top: 0; width: calc(var(--tis, 14px) * 1.7); height: calc(var(--tis, 14px) * 1.7); transform: translate(-50%, -50%); border: 2px dashed var(--hot); border-radius: 50%;
  box-shadow: 0 0 0 1px #000, 0 0 8px 2px rgba(224, 160, 64, .45); pointer-events: auto; }   /* a standing depot in a raided backline hex (REVIEW_TOOL cycle 2 feature 2) */
.dthk { color: var(--hot); font-weight: 700; font-size: 10px; }
.rrisk { margin-top: 6px; padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--hot); background: rgba(224, 160, 64, .12); color: var(--hot); font: 600 11.5px/1.4 var(--mono); }
.rrisk b { color: var(--fg); } .rrisk small { color: var(--muted); font-weight: 400; }   /* route risk: partisans on this road (REVIEW_TOOL cycle 2 feature 1) */
.evr[data-ex] { cursor: pointer; } .evr:hover { background: var(--panel2); }
.evr > small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.evr .en2 small { color: var(--muted); font-size: 10.5px; } .evr .eh { color: var(--muted); font-size: 10.5px; text-align: right; }
.evr .eg { display: flex; justify-content: center; }
/* deep strikes + air ops */
.dsm div { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); filter: drop-shadow(0 0 1px #000); }
.dsm b, .dsb { font: 700 9px/1 var(--mono); color: #fff; background: var(--dead); border-radius: 3px; padding: 1px 3px; }   /* a destruction: red */
.dsm b { position: absolute; left: 11px; top: -8px; }
.dsm div > svg { display: block; } .dsr, .dsmk .dsr { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%); border: 1.5px solid; border-radius: 50%; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; pointer-events: none; }   /* deep strike: red ✕, the loser's ring (item 43) */
.dsmk { position: relative; display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
.chev i { position: absolute; width: 7px; height: 7px; border-top: 2px solid; border-right: 2px solid; }
.chev i { transform-origin: center; } .chev i { margin: 0; }
.plane div { position: absolute; filter: drop-shadow(0 0 1px #000); }
/* site finder */
.sfm i { position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: var(--fg); color: #10151c;
  font: 700 11px/20px var(--mono); text-align: center; font-style: normal; box-shadow: 0 0 0 2px #000, 0 0 0 3px rgba(230, 225, 214, .5); cursor: pointer; }
.sfm.key { position: relative; display: inline-block; width: 18px; height: 18px; } .sfm.key i { width: 16px; height: 16px; line-height: 16px; font-size: 10px; left: 50%; top: 50%; box-shadow: 0 0 0 1.5px #000; }
/* whole-map zoom: the candidates of one hex beyond its best two share one cluster marker ("3,5,8") */
.compact .sfm:not(.key) i { width: 15px; height: 15px; line-height: 15px; font-size: 9.5px; }   /* REVIEW_UI cycle 3 item 64: phone whole map */
.sfm.cl i { width: auto; min-width: 20px; padding: 0 5px; border-radius: 10px; font-size: 10px; }
.sfr { display: grid; grid-template-columns: 26px 1fr auto 20px; gap: 8px; align-items: center; padding: 4px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.sfr:hover { background: var(--panel2); } .sfr small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.sfn { font-family: var(--mono); color: var(--fg); text-align: right; } .sfs { font-family: var(--mono); font-weight: 700; } .sfl { color: var(--muted); }
/* site finder, hex-aware: hollow dashed numbered ring = best in the selected hex only (dimmer than the solid "best in hex + ring") */
.sfm.f i { background: rgba(16,21,28,.72); color: var(--fg); border: 2px dashed var(--fg); box-shadow: 0 0 0 1px #000; line-height: 16px; opacity: .82; }
.sfm.key.f i { line-height: 13px; border-width: 1.5px; box-shadow: none; }
.sh.sfg { margin: 8px 0 4px; text-transform: none; letter-spacing: 0; } .sh.sfg .sfm.key { flex: none; }
.sfr.f .sfn { color: var(--muted); } .sfr.f .sfs { font-weight: 400; }
.ddm .fp button { width: auto; }   /* not the menu rows' full width (.ddm button): a wrapped picker row would stack them in a column */
.fp button[data-sind] .mi { width: 16px; height: 16px; }
.fp button[data-thrt] .mi, .fp button[data-tpk] .mi { width: 16px; height: 16px; }
.fp button[data-thrt], .fp button[data-tpk] { width: 24px; height: 22px; padding: 2px; }
.fp button[data-thrt]:not(.on) .mi, .fp button[data-tpk]:not(.on) .mi { opacity: .35; }
/* map-item type pickers, two levels: category buttons on the item's row (lit = all its types, half-lit = some), "…" expands a block
   under the row with each category over its types */
.fp button[data-tcat] .mi { width: 15px; height: 15px; }
.fp button[data-tcat] { width: 22px; height: 21px; padding: 2px; }
.fp button[data-tcat]:not(.on):not(.part) .mi { opacity: .35; }
.fp button[data-tcat].part { opacity: .8; border-color: var(--muted); border-style: dashed; background: linear-gradient(90deg, var(--panel2) 50%, transparent 50%); }
.lr:not(.on) .fp.tcs { opacity: .45; }   /* item off: the categories show what a click would bring back, dimmed */
.fp button.tmore { width: 20px; height: 21px; padding: 0; font: 700 12px/1 var(--mono); color: var(--fg); opacity: .8; }
.fp button.tmore.on { background: var(--panel2); }
/* width 0 + min-width 100 %: the block wraps inside the column the other rows set, so expanding never widens the menu (no "…" jump) */
.fp.tpx { display: flex; flex-wrap: wrap; gap: 3px 6px; margin: 0 0 3px; padding-left: 24px; width: 0; min-width: 100%; box-sizing: border-box; }
.tcg { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding-left: 4px; border-left: 1px solid var(--line); }
.tts { display: inline-flex; gap: 1px; }
.fp button[data-sind] { width: 24px; height: 22px; }
/* hex compare */
.cmpb { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font-size: 15px; }
.cmpb.on { color: var(--bg); background: var(--fg); border-color: #000; }
.cmpg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; align-items: center; font-family: var(--mono); font-size: 12px; margin-top: 8px; }
.cmpg > b { font-family: var(--display); font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--line); padding-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.cmpg > b .tq { flex: 0 0 auto; }
.cmpg > small { grid-column: 1 / -1; color: var(--muted); font-size: 10.5px; margin-top: 6px; }   /* the row label above its two values (REVIEW_UI cycle 2 item 39) */
.cmpg .cv { white-space: nowrap; display: inline-block; }   /* icon + number never split */
.cmpd { margin-top: 8px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 600 11px var(--mono); cursor: pointer; }
.cmpg img.sm { width: 13px; height: 13px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 1px; }
/* polish: population, help, bookmarks, copy link */
#pop { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 4px; }
#pop[hidden] { display: none; } #pop b { color: var(--fg); } #pop .q { color: var(--hot); }
/* one clock: the top bar's data time; panels with older data say their own time (.age, amber when over an hour older) */
#dt { display: flex; align-items: baseline; gap: 3px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 4px; cursor: help; }
#dt[hidden] { display: none; } #dt b { color: var(--fg); } #dt small { font-size: 10px; }
#top .ib.capoff { opacity: .32; cursor: not-allowed; }   /* a live-war panel's button while a past war is in the history (LAYER_CAP 'war') */
.lvt { margin: -2px 0 8px; padding: 3px 8px; border-radius: 6px; background: rgba(224,160,64,.16); border-left: 3px solid var(--hot); color: var(--hot); font: 700 12px/1.3 var(--mono); }
.lvt small { color: var(--muted); font-weight: 400; }
#dt.old::after { content: "•"; color: var(--hot); margin-left: 1px; }
/* stale data (age against now): amber over 30 min, red over 2 h; the age itself shows as "10 h old" (also on a phone) */
#dt .dage { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 3px; padding: 0 5px; border-radius: 8px; white-space: nowrap; }
#dt.st1 b { color: var(--hot); } #dt.st1 .dage { background: var(--hot); color: #10151c; }
#dt.st2 b { color: var(--err); } #dt.st2 .dage { background: var(--err); color: #10151c; }
/* recorder health chip (data/health.json): quiet muted text when fine, a red chip when stale, a grey chip when unknown */
#hlth { flex: none; font-family: var(--mono); font-size: 11px; font-style: normal; white-space: nowrap; margin: 0 4px 0 -2px; padding: 1px 6px; border-radius: 9px; cursor: help; }
#hlth[hidden] { display: none; } #hlth.ok { color: var(--muted); padding: 0 2px; }
#hlth.stale { background: var(--err); color: #10151c; font-weight: 600; } #hlth.unk { background: #3a414c; color: var(--fg); }
@media (max-width: 720px) { #hlth.ok, #hlth .hl-l { display: none; } }
.age { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; text-transform: none; letter-spacing: 0; } .age.old { color: var(--hot); }
@media (max-width: 720px) { #dt small { display: none; } }
#linkb, #helpb { display: flex; align-items: center; justify-content: center; } #linkb.ok { color: #8fd29a; border-color: #8fd29a; }
#help { position: fixed; top: calc(var(--topb, 52px) + 6px); right: 10px; z-index: 1004; width: min(520px, calc(100vw - 20px)); max-height: calc(100vh - 80px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.5); font-size: 12.5px; }
#help[hidden] { display: none; }
#help .sh { margin-top: 10px; } #help .sh small { text-transform: none; letter-spacing: 0; }
.hk { display: flex; flex-wrap: wrap; gap: 4px 12px; } .hk span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
kbd { font: 700 11px var(--mono); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }
.hl2 { display: flex; flex-direction: column; gap: 3px; color: var(--muted); } .hl2 b { color: var(--fg); font-weight: 600; }
.bml { display: flex; flex-direction: column; gap: 3px; } .bmr { display: flex; align-items: center; gap: 8px; }
.bmr a { color: var(--fg); text-decoration: none; } .bmr a:hover { text-decoration: underline; } .bmr small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.bmr button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
.star { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font-size: 15px; }
.star.on { color: var(--bg); background: var(--fg); border-color: #000; }
@media (max-width: 720px) { #pop .spk { display: none; } #help { top: 56px; left: 8px; right: 8px; width: auto; } }
/* momentum + projection */
.mar svg { position: absolute; left: 0; top: 0; overflow: visible; }
.frb b { position: absolute; transform: translate(-50%, -50%); font: 700 10px/1 var(--mono); color: #10151c; background: #f0d890; border-radius: 3px; padding: 2px 3px; box-shadow: 0 0 0 1px #000; white-space: nowrap; }
.frb b.hi { background: var(--hot); }
/* the analyses' badge rows (pressure number, momentum ±%, flip risk): one row per hex position, side by side */
.frb .frr { position: absolute; transform: translate(-50%, -50%); display: flex; gap: 3px; }
.frb .frr b { position: static; transform: none; }
.hr.mv { grid-template-columns: 30px 1fr auto auto 40px; } .hr.mv > small:first-child { white-space: nowrap; font-weight: 700; } .hr .en.hot { color: var(--hot); font-weight: 700; }
.lsep { display: inline-block; width: 1px; height: 14px; background: var(--line); margin: 0 4px; }
.fp button[data-ia] { font-size: 11px; color: var(--muted); padding: 1px 5px; }
.fp button[data-ia].on { color: var(--fg); }
/* access fields, supply map, need mixer: added as light over the zone / share fills (Chrome, Firefox and Safari support it) */
.leaflet-image-layer.field { mix-blend-mode: screen; }
/* the replay heat PNGs are drawn red-orange by the exporter; turned to amber here (palette: amber = heat, red = destroyed only) */
.leaflet-image-layer.heat { mix-blend-mode: normal; filter: hue-rotate(24deg) saturate(1.35) brightness(1.1); }
.fp { display: inline-flex; gap: 2px; margin-left: auto; }
.fp button { border: 1px solid transparent; background: transparent; padding: 1px; border-radius: 5px; cursor: pointer; opacity: .5; }
.fp button.on { opacity: 1; border-color: var(--muted); }
.fp img { width: 16px; height: 16px; border-radius: 3px; }
.sl { display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: var(--mono); font-size: 12.5px; }
.si { display: inline-flex; align-items: center; gap: 4px; }
.si .sii { width: 20px; height: 20px; display: inline-block; }
.si small { color: var(--muted); font-size: 10.5px; margin-left: 2px; }

/* route planner */
#routeb { display: flex; align-items: center; justify-content: center; } #routeb.on { color: var(--fg); border-color: var(--muted); background: var(--panel2); }
.rtm i { position: absolute; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 50%; background: var(--fg); color: #10151c;
  font: 700 11px/18px var(--mono); text-align: center; font-style: normal; box-shadow: 0 0 0 2px #000; }
.br.rb i { width: 9px; height: 9px; background: var(--fg); box-shadow: 0 0 0 1.5px #000; }   /* the route's bridges: user-placed white */
.rsum { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.rsum b { color: var(--fg); font-size: 15px; }
.br.key { position: relative; display: inline-block; width: 12px; height: 12px; } .br.key i { left: 50%; top: 50%; box-shadow: 0 0 0 1px #000; }
.rsum .warn b { text-decoration: underline; text-underline-offset: 3px; }   /* exposure: in the enemy's colour (.W / .C), never red */
.rsum .warn.W b { color: #8db4ee; } .rsum .warn.C b { color: #8fd29a; }
/* route panel: A → B named places, the two avoid toggles side by side */
.rends { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0 8px; font-size: 13px; }
.rend { display: inline-flex; align-items: center; gap: 5px; min-width: 0; } .rend small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.rarr { color: var(--muted); }
.rtm.key { position: relative; display: inline-block; width: 16px; height: 16px; flex: none; } .rtm.key i { left: 50%; top: 50%; width: 15px; height: 15px; font-size: 9.5px; line-height: 15px; box-shadow: 0 0 0 1.5px #000; }
.ropt { display: flex; flex-wrap: wrap; gap: 0 16px; }
/* route mode toggle (road / ship) in the route panel heading */
.ph .fp.rmd { margin-left: 10px; } .fp.rmd button { font-size: 14px; line-height: 18px; padding: 1px 5px; }
/* spot tool */
#spotb { display: flex; align-items: center; justify-content: center; } #spotb.on { color: var(--fg); border-color: var(--muted); background: var(--panel2); }
.spotting, .spotting .leaflet-interactive { cursor: crosshair !important; }
.spm svg { position: absolute; transform: translate(-50%, -50%); filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)); }   /* the placed spot: a white crosshair (REVIEW_UI cycle 2 item 44) */
.sd b small.u { margin-left: 1px; font-size: 9.5px; font-weight: 400; color: var(--muted); }
.sr { display: grid; grid-template-columns: 26px 74px 1fr; align-items: center; gap: 8px; padding: 3px 0; font-family: var(--mono); font-size: 12.5px; }
.sn { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sd { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.sd img { width: 16px; height: 16px; border-radius: 50%; background: rgba(230, 225, 214, .16); }
.sd small { color: var(--muted); font-size: 10.5px; }
.sd.un { color: var(--muted); font-style: italic; }
.sd .hn { color: var(--muted); font-size: 11px; margin-right: 2px; }
.fv { width: 74px; position: relative; display: inline-flex; align-items: center; height: 16px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.fv i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(230, 225, 214, .35); }
.fv b { position: relative; padding: 0 4px; font-size: 11.5px; }
.si2 { display: inline-flex; align-items: center; gap: 4px; }
.si2 .sii { width: 18px; height: 18px; display: inline-block; }
.si2 .sii svg { width: 18px; height: 18px; }

/* live map markers */
.nm { pointer-events: auto; }
.nm img { width: 100%; height: 100%; border-radius: 50%; background: rgba(15, 20, 27, .72); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.nm.bW img { box-shadow: 0 0 0 2px var(--warden); } .nm.bC img { box-shadow: 0 0 0 2px var(--colonial); }   /* built mine / rig: class "nm b" + team (node markers in renderLive), not dead (REVIEW_TOOL N22) */
.nm.flash img { animation: flash 1s ease-in-out 3; }
.nm.rig img { border-radius: 22%; background: var(--oil); box-shadow: 0 0 0 1px #000; }      /* the rig badge, as on the poster */
.nm.rig.bW img { box-shadow: 0 0 0 2px var(--warden); } .nm.rig.bC img { box-shadow: 0 0 0 2px var(--colonial); }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--fg); } }
.port svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- top bar */
#top { position: fixed; top: 10px; left: 10px; z-index: 1000; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  background: rgba(21, 27, 36, .94); border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: 0 4px 18px rgba(0,0,0,.45);
  max-width: calc(100vw - 20px); }
.brand { font-weight: 700; letter-spacing: .12em; font-size: 13px; color: var(--muted); padding: 0 6px 0 4px; }
.seg { display: flex; background: var(--bg); border-radius: 7px; padding: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 5px; color: var(--muted); min-height: 30px; }
.seg button.on { background: var(--panel2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.seg img { width: 20px; height: 20px; }
#side button { padding: 4px 6px; opacity: .45; } #side button.on { opacity: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); display: inline-block; }   /* live: pulsing cream (red = destroyed only) */
[data-mode="live"].on .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ib { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-family: var(--mono);
  font-weight: 700; color: var(--muted); }
/* short labels under the tool icons (desktop width only; phones keep the bare icons, the title / aria-label name them) */
.ib .tl, .seg .dl, #pop .dl { display: none; }
@media (min-width: 1100px) {
  .ib { display: flex; flex-direction: column; align-items: center; justify-content: center; width: auto; min-width: 34px; height: 40px; padding: 2px 4px 1px; gap: 2px; }
  .ib .tl { display: block; font: 600 9.5px/1 var(--display); letter-spacing: .02em; color: var(--muted); }
  .ib.on .tl { color: var(--fg); }
  .ib > b { line-height: 16px; }
  .seg .dl { display: inline; font-size: 12px; margin-left: 4px; }
  #pop .dl { display: inline; font-size: 10px; }
}
@media (min-width: 1100px) {   /* REVIEW_UI cycle 2 item 49: a toolbar that would wrap drops the labels (fitTop), so nothing jumps rows */
  #top.icons .ib { height: 32px; min-width: 30px; } #top.icons .ib .tl, #top.icons .seg .dl, #top.icons #pop .dl, #top.icons #pop .spk, #top.icons .brand, #top.icons #dt > small:first-child { display: none; }
}
@media (min-width: 721px) { #top.icons2 #pop, #top.icons2 #hlth.ok { display: none; } #top.icons3 #linkb, #top.icons3 #infob { display: none; } }   /* REVIEW_UI cycle 3 item 63 (fitTop) */
@media (pointer: coarse) { #help .kbo { display: none; } }   /* touch: no keyboard shortcuts in the help (REVIEW_UI cycle 2 item 47) */
.cntk { display: inline-flex; gap: 4px; } .cntk span { display: inline-flex; align-items: center; gap: 2px; font: 700 11px var(--mono); }
.cntk i { width: 15px; height: 15px; border-radius: 3px; background-size: 82%; background-position: center; background-repeat: no-repeat; display: inline-block; }
.dd { position: relative; }
.ddb { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 7px; padding: 3px 8px;
  cursor: pointer; min-height: 30px; font-size: 13px; font-weight: 600; }
.ddb::after { content: ""; border: 4px solid transparent; border-top-color: var(--muted); margin: 4px 0 0 2px; }
.ddm { position: absolute; top: calc(100% + 4px); left: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  min-width: 170px; box-shadow: 0 6px 20px rgba(0,0,0,.5); z-index: 1001; }
.ddm button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 8px; border-radius: 5px;
  cursor: pointer; font-size: 13px; text-align: left; }
.ddm button:hover, .ddm button.on { background: var(--panel2); }
.oi { display: inline-flex; gap: 2px; align-items: center; }
.oi i, .oi img { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.sw { background: linear-gradient(90deg, #22272e, #696a68, #b0aca2); }   /* the forecast share: a neutral ramp (REVIEW_UI cycle 3 item 55) */
.zn { background: conic-gradient(from 30deg, var(--warden) 0 45%, var(--colonial) 45% 80%, var(--neutral) 80%); }
.oi img.sm { width: 13px; height: 13px; border-radius: 3px; }
.oi img.sdm { width: 14px; height: 14px; border-radius: 0; object-fit: contain; }   /* the faction mark of a side-aware field / need layer */
.oi .num { font-family: var(--mono); color: var(--muted); font-size: 12px; margin-left: 2px; }
.chg { font-family: var(--mono); font-weight: 700; color: var(--hot); font-style: normal; width: auto !important; }

#info { position: fixed; top: calc(var(--topb, 52px) + 6px); left: 10px; z-index: 999; max-width: min(560px, calc(100vw - 20px)); background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; box-shadow: 0 6px 20px rgba(0,0,0,.5);
  max-height: calc(100vh - 80px); overflow: auto; }
#info b { color: var(--fg); font-weight: 600; }
#info .bun b { width: 38px; }
#info .row { display: flex; align-items: center; gap: 8px; margin: 4px 0; flex-wrap: wrap; }

/* armed tools + one-line notes: a pill under the top bar (cream edge: the user's own action, see the palette rule in the README) */
#hint { position: fixed; top: calc(var(--topb, 52px) + 8px); left: 50%; transform: translateX(-50%); z-index: 1003; display: flex; flex-direction: column;
  align-items: center; gap: 6px; pointer-events: none; max-width: calc(100vw - 16px); }
#hint:empty { display: none; }
.arm, .toast { pointer-events: auto; display: flex; align-items: center; gap: 6px; background: rgba(21, 27, 36, .96); border: 1px solid rgba(230, 225, 214, .55);
  border-radius: 16px; padding: 3px 4px 3px 10px; font-size: 13px; color: var(--muted); box-shadow: 0 4px 14px rgba(0,0,0,.5); white-space: nowrap; }
.toast { padding: 4px 12px; border-color: var(--line); font-size: 12.5px; color: var(--fg); }
.arm b { color: var(--fg); } .arm .cur { color: var(--fg); font-weight: 700; } .arm .done { opacity: .55; text-decoration: line-through; }
.arm > i { font-style: normal; opacity: .6; } .arm .ai { display: inline-flex; color: var(--fg); } .arm .ai svg { width: 15px; height: 15px; }
.arm .ax { width: 24px; height: 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font-size: 14px; line-height: 1; }
@media (max-width: 720px) { .arm, .toast { white-space: normal; font-size: 12px; } }
/* find box (/): an input and up to 8 results, under the armed-tool pill */
#find { pointer-events: auto; width: min(360px, calc(100vw - 16px)); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.55); }
#find[hidden] { display: none; }
#findq { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); padding: 0 10px; font: 14px var(--display); outline: none; }
#findq:focus { border-color: var(--muted); }
#findr:not(:empty) { margin-top: 4px; }
.fr { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.fr.on, .fr:hover { background: var(--panel2); } .fr.on { box-shadow: inset 2px 0 0 var(--fg); }
.fr small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.fr b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--muted); }
.fi .hx { width: 15px; height: 13px; margin: 0; } .fi .tw.key { width: 18px; height: 18px; }
/* a found place: a white ring with a dark edge for 3 s (user-placed style) */
.fndm i { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--fg);
  box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #000; animation: fndp 1s ease-in-out 3; }
@keyframes fndp { 50% { transform: translate(-50%, -50%) scale(1.35); opacity: .6; } }
/* faint hex names where a hex shows no chips (whole-map zoom; the replay video's anchors: cream, low alpha, a dark halo) */
.hxn { font: 700 calc(var(--ls, 10px) * .95)/1.05 var(--display); letter-spacing: .06em; text-transform: uppercase; text-align: center; color: rgba(230, 225, 214, .42);
  text-shadow: 0 0 3px rgba(7, 10, 14, .9), 0 0 1px #070a0e; white-space: pre; }
.hxn.alt { display: none; }                                    /* a hex with chips: its name only where the chips step aside */
.fill-on:not(.zin) .hl .cnt { display: none; } .fill-on:not(.zin) .hl .hxn.alt { display: block; }
.fill-on:not(.zin) .hl .hst:not(:has(.ich)) { display: none; }   /* an emptied chip block (resources only) leaves no dark box */

/* ---------------------------------------------------------------- panel */
#panel { position: fixed; z-index: 1000; top: 0; right: 0; bottom: 0; width: var(--pw); background: var(--panel); border-left: 1px solid var(--line);
  overflow-y: auto; box-shadow: -6px 0 24px rgba(0,0,0,.45); }
.grab { display: none; }
#pbody { padding: 12px 14px 24px; }
.ph { display: flex; align-items: center; gap: 8px; }
.ph h2 { margin: 0; font-size: 21px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 30px; padding: 0 8px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font-size: 12.5px; }
.x { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 6px 0 10px; line-height: 1.45; }
.sec { border-top: 1px solid var(--line); padding: 10px 0 8px; }
.sh { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.sh .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--mono); }
.res { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.rc { display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--mono); }
.rc .ci { width: 38px; height: 38px; border-radius: 8px; background-size: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.rc b { font-size: 14px; } .rc span { font-size: 12px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-weight: 700; font-size: 14px; }
.badge .ci { width: 26px; height: 26px; border-radius: 6px; background-size: cover; background-color: var(--oil); }
.bar { height: 10px; border-radius: 3px; background: var(--colonial); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--warden); }
.brow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; }
.strip { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; margin-top: 8px; }
.sq { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sq svg { width: 100%; max-width: 26px; height: auto; }
.sq small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.bun { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.bun b { font-family: var(--mono); font-size: 13px; width: 30px; text-align: right; flex: none; }
.bun .ics { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; }
.bun .lg { display: inline-flex; gap: 6px; padding: 0 8px; border-right: 1px solid var(--line); }
.bun .lg:first-child { padding-left: 2px; } .bun .lg:last-child { border-right: 0; }
.bun .lc { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 13px; }
.bun .lc img { width: 20px; height: 20px; }
.nodes-on .leaflet-labels-pane { display: none; }
.rt { display: flex; gap: 2px; }
.rt button { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 6px; padding: 3px 9px; cursor: pointer;
  font-family: var(--mono); font-weight: 700; font-size: 13px; }
.rt button.on { background: var(--panel2); color: var(--fg); border-color: var(--muted); }
.rt .lbl { align-self: center; color: var(--muted); font-size: 16px; margin-right: 2px; }

/* ring panel: resource | amount in the ring | nearest (hexes, km) */
.rgrid { display: grid; grid-template-columns: 26px 1fr 44px 52px; align-items: center; gap: 8px; padding: 3px 4px; font-family: var(--mono); font-size: 13px; }
.rgrid.rh { font-size: 11px; color: var(--muted); padding-bottom: 0; }
.rgrid.rh span:nth-child(n+3), .rgrid .nd { text-align: right; }
.rgrid.z { opacity: .4; }
.rgrid b { font-size: 14px; }
.ri i { display: block; width: 24px; height: 24px; border-radius: 5px; background-size: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.ri.sv svg { width: 20px; height: 20px; display: block; margin: 0 2px; }
.rgrid .amt { display: flex; gap: 10px; }
.rgrid .lc { display: inline-flex; align-items: center; gap: 3px; }
.rgrid .lc.z { opacity: .4; }
.rgrid .lc img { width: 20px; height: 20px; border-radius: 50%; background: rgba(230, 225, 214, .16); }
.hx { width: 11px; height: 10px; display: inline-block; vertical-align: -1px; margin-left: 2px; color: var(--muted); }
.nd[data-hex], .nd[data-node] { cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.nd.near { color: #f0d890; } .nd.far { color: var(--muted); }

/* live panel */
.tc { display: flex; gap: 14px; align-items: center; font-family: var(--mono); font-size: 15px; font-weight: 700; flex-wrap: wrap; }
.tc span { display: inline-flex; align-items: center; gap: 5px; }
.tc img { width: 22px; height: 22px; }
.tq { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ng { margin-top: 6px; }
.ngh { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 700; font-size: 13px; margin: 6px 0 2px; }
.ngh img, .bun .lc img { width: 22px; height: 22px; border-radius: 50%; background: rgba(230, 225, 214, .16); }   /* the coal pick is dark on dark without a backdrop */
.nr { display: grid; grid-template-columns: 22px 1fr 1fr; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; padding: 3px 4px;
  border-radius: 5px; cursor: pointer; }
.nr:hover { background: var(--panel2); }
.nr .d { display: inline-flex; align-items: center; gap: 4px; }
.nr .d svg { width: 14px; height: 14px; flex: none; }
.nr .d.far { color: var(--muted); }
.nr .d.near { color: #f0d890; }
.nr .t { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted); justify-self: center; }
.nr .t.W { background: var(--warden); border-color: var(--warden); } .nr .t.C { background: var(--colonial); border-color: var(--colonial); }
.empty { color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* hex panel trend row: Warden share 24 h ago (thin, faint) over now, the front arrow, the 48 h flip chance */
.trend .sh .oi svg { width: 18px; height: 10px; }
.trow { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tbar { display: inline-flex; flex-direction: column; gap: 2px; width: 70px; flex: none; }
.tbar i { position: relative; display: block; height: 5px; border-radius: 2px; background: #2b3542; overflow: hidden; }
.tbar i::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(230, 225, 214, .45); }   /* the 50 % mark */
.tbar i b { display: block; height: 100%; background: var(--warden); }
.tbar i.t0 { height: 3px; opacity: .55; }
.tnum b { font-size: 14px; } .tnum small { color: var(--muted); }
.tar { flex: none; filter: drop-shadow(0 0 1px #000); } .tst { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.tpj b { font-size: 14px; }

/* ---------------------------------------------------------------- phone: the panel becomes a bottom sheet */
@media (max-width: 720px) {
  :root { --pw: 100vw; }
  #top { top: 8px; left: 8px; right: 8px; max-width: none; gap: 4px; }
  .brand { display: none; }
  .leaflet-control-zoom { display: none; }   /* pinch to zoom; frees the corner for the attribution */
  .seg button { padding: 4px 8px; font-size: 13px; }
  #panel { top: auto; left: 0; right: 0; width: 100%; height: 46vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,.5); }
  .grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 7px auto 0; }
  #pbody { padding: 8px 14px 24px; }
  .rc .ci { width: 32px; height: 32px; }
  /* --topb = the top bar's bottom edge (set by app.js: the bar wraps to 2-3 rows on a phone), so nothing slides under it */
  #info { top: calc(var(--topb, 56px) + 6px); left: 8px; right: 8px; z-index: 1002; max-height: calc(100vh - var(--topb, 56px) - 20px); }
  #help { top: calc(var(--topb, 56px) + 6px); max-height: calc(100vh - var(--topb, 56px) - 20px); }
  #legend { left: 8px; right: 8px; top: calc(var(--topb, 50px) + 6px); bottom: auto; }
  .lp { position: fixed; left: 8px; right: 8px; top: calc(var(--topb, 50px) + 4px); width: auto; min-width: 0; max-height: calc(100vh - var(--topb, 50px) - 40px);
    z-index: 1003; overflow-x: hidden; }   /* phone: a sheet */     /* the bottom edge belongs to the attribution */
  /* picker rows wrap inside the sheet (at 375 px the threat-type icons and the air W/C/both toggle ran 88 px past its edge) */
  .lr { flex-wrap: wrap; row-gap: 2px; }
  .lr > span:not(.oi):not(.fp) { white-space: normal; }
  .fp { flex: 0 0 auto; flex-wrap: wrap; max-width: 100%; }   /* no shrink (that stacked the buttons in a column): the row wraps it to its own line */
  .fp.tpx { padding-left: 0; }
  .lcols { grid-template-columns: auto; }   /* one column */
  .lr { padding: 3px 4px; }                 /* a finger-sized row, still compact */
  #panel:not([hidden]) ~ #legend { display: none; }
  /* REVIEW_UI cycle 2 item 38: at most two toolbar rows at 375 px. Row 1: mode, layers, side, a shorter VP bar; row 2: the data age chip
     and eight tools (link and key live in the help sheet: helpb). The population chip and a quiet "recorder ok" drop out (their
     tooltips had nothing a phone can hover anyway); a stale recorder still shows. */
  #pop, #hlth.ok, #linkb, #infob { display: none !important; }
  #vp .vb { width: 44px; } #vp small { display: none; } #vp.two .vrow small { display: none; }
  #dt > small { display: none; } #dt.st1 > b, #dt.st2 > b { display: none; }
  #dt .dold { display: none; } #top { padding: 4px; }
  #dt:has(.dreload) .dage { display: none; }   /* the reload button stands in for the age chip (one slot on the second row) */
  #side button { padding: 3px 3px; } .seg button { padding: 4px 6px; }
  #panel { height: 45vh; }   /* the sheet at most 45 % of the screen; with the history's time bar above it, 40 % */
  body:has(#scrub:not([hidden])) #panel { height: 40vh; } body:has(#scrub:not([hidden])):has(#panel:not([hidden])) #scrub { bottom: calc(40vh + 6px); }
  /* the history's time row stays above a sheet (☰ biggest hid it completely) */
  body:has(#panel:not([hidden])) #scrub { bottom: calc(45vh + 6px); }
}
.lgi { margin-left: 6px; height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 600 11px var(--mono); cursor: pointer; }
#info .ix { float: right; margin: -2px -2px 4px 8px; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
#dt .dreload { margin-left: 6px; height: 20px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--err, #e05a4a); background: var(--bg); color: var(--fg); font: 700 10.5px var(--mono); cursor: pointer; }   /* N15: the refetch failed */
.hbt { display: flex; gap: 6px; margin: 2px 0 8px; } .hbt .sb { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font: 600 12px var(--mono); }

/* ---- war analogs (end of the hottest-hexes panel; history/war_analogs.py -> data/analogs.json) */
.an .an-row { padding: 5px 4px 6px; border-radius: 6px; cursor: pointer; }
.an .an-row:hover, .an .an-row:focus-visible { background: var(--panel2); outline: none; }
.an .an-row.an-live { cursor: default; } .an .an-row.an-live:hover { background: none; }
.an .an-h { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 12.5px; }
.an .an-h small { color: var(--muted); font-size: 10.5px; }
.an .an-d { color: var(--muted); font-size: 11px; }
.an .an-r { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.an .an-o { display: inline-block; min-width: 16px; padding: 0 3px; border-radius: 3px; text-align: center; font-size: 11px; color: #10151c; background: var(--neutral); }
.an .an-o.W { background: var(--warden); } .an .an-o.C { background: var(--colonial); }
.an-strip { display: grid; gap: 2px; margin-top: 5px; }   /* the hex panel's .strip squares, one per day bin (columns set inline) */
.an-strip .sq svg { max-width: 18px; }
.an-strip .sq small { font-size: 9px; min-height: 11px; }
.an .an-t { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.an .an-key { margin-top: -4px; }
.an .an-weak { color: var(--fg); border: 1px solid var(--muted); border-radius: 3px; padding: 0 3px; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }

/* ---- war-end outlook (top of the hottest-hexes panel) and build watch (map item `builds` + panel rows; stats.json outlook / builds) */
.ol { margin: 2px 0 8px; padding: 6px 6px 5px; border-radius: 6px; background: var(--panel2); font-family: var(--mono); font-size: 12px; }
.ol b.w, .ol .w b, .bws b.w { color: #8db4ee; } .ol b.c, .ol .c b { color: #8fd29a; }
.ol .olv { display: flex; align-items: center; gap: 6px; }
.ol .olv > b { font-size: 15px; min-width: 18px; text-align: center; }
.ol .olv small { color: var(--muted); }
.ol .olb { position: relative; flex: 1; height: 10px; border-radius: 3px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ol .olb .vw { position: absolute; left: 0; top: 0; bottom: 0; background: var(--warden); }
.ol .olb .vc { position: absolute; right: 0; top: 0; bottom: 0; background: var(--colonial); }
.ol .olb .vm { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--fg); opacity: .6; }
.ol .olp { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.ol .olp .w { color: #8db4ee; } .ol .olp .c { color: #8fd29a; text-align: right; }
.ol .olh { margin-top: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol .olh small { color: var(--muted); }
.tw.bw { --tis: 18px; }
.tw.bw.site .mi { opacity: .7; }
.tw.bw.site::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px dashed var(--fg); }
.tw.bw .bwc { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); padding: 1px 3px; border-radius: 3px; background: var(--fg); color: #10151c;
  font: 700 10px/1.1 var(--mono); white-space: nowrap; box-shadow: 0 0 0 1px #000; }
.tw.key.bw { width: 16px; height: 16px; }
.tw.key.bw.site::after { inset: -2px; }
/* a build site among the industry / defence icons (live.json structs flag 0x04): dimmed, the builds item's dashed cream ring */
.tw.st.site .mi { opacity: .6; }
.tw.st.site::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.3px dashed var(--fg); }
.ich .bsc i { position: relative; opacity: .65; }
.ich .bsc i::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 1px dashed var(--fg); }
.ich .bsc b { font-size: .85em; color: var(--muted); }
small.bld { color: var(--muted); font-size: 10.5px; font-family: var(--mono); align-self: center; }
.cmpg small.bld { margin-left: 4px; }
.bwk { font: 700 9.5px/1.1 var(--mono); padding: 1px 2px; border-radius: 3px; background: var(--fg); color: #10151c; margin-left: 3px; }
.bws .sh .mi { width: 14px; height: 14px; display: inline-block; }
.bwr { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 4px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: 12px; }
.bwr:hover { background: var(--panel2); }
.bwr .hn2 { font-family: var(--display); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bwr small { color: var(--muted); }
.bwr .bwc { padding: 1px 4px; border-radius: 3px; background: var(--fg); color: #10151c; font-size: 10.5px; }
/* ---- hot now, victory towns at risk, depot board, since your last visit (REVIEW_TOOL.md (e) 1, 2, 3, 5) */
#vprb { display: flex; align-items: center; justify-content: center; }
#vprb.on { color: var(--fg); background: var(--panel2); border-color: var(--muted); }
.hr.hn { grid-template-columns: 20px 1fr auto 54px 34px 74px; gap: 6px; }
.hr.hw .hn2 { white-space: normal; overflow: visible; line-height: 1.15; overflow-wrap: normal; word-break: normal; min-width: 9ch; }   /* hottest: the name wraps between words, never mid-word (REVIEW_UI cycle 2 item 34) */
#pbody { container-type: inline-size; }
@container (max-width: 420px) {   /* a narrow panel (the 400 px desktop panel, a phone): the per-hour sparkline column goes, the names keep 9ch */
  .hr.hn { grid-template-columns: 20px 1fr auto 34px 74px; } .hr.hn > .spk, .hr.hn.hh > .hs { display: none; }
}
.b24 { margin-left: 2px; color: var(--muted); font: 400 8.5px/1 var(--mono); text-shadow: 0 0 2px #000, 0 0 3px #000; }   /* the hollow raid disc's "24h" tag */
#info .row.hk { flex-wrap: nowrap; align-items: flex-start; } #info .row.hk .oi { flex: 0 0 auto; min-width: 30px; } #info .row.hk .kt { flex: 1 1 auto; min-width: 0; }   /* the history key: swatch left, the text wraps beside it */
.vf.un { color: var(--muted); font-style: italic; }   /* "unsure": no %, one neutral word (REVIEW_UI cycle 2 item 36) */
.ol .olv .age { margin-left: 2px; font-size: 10px; } .ol .olv .age.old { color: var(--hot); }
.hr.hw.on { background: var(--panel2); }
.hrk { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); display: inline-flex; align-items: center; gap: 1px; padding: 1px 4px 1px 2px; border-radius: 8px; background: #0f141b; border: 1.5px solid var(--hot); color: var(--fg); font: 700 11px/1 var(--mono); box-shadow: 0 0 0 1px #000; white-space: nowrap; cursor: pointer; }
.hrk svg { color: var(--hot); } .hrk.on { background: var(--hot); color: #10151c; } .hrk.on svg { color: #10151c; }   /* a hottest-list rank on its hex; lit while its row is hovered */
.hr .hn1 { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.hr.hh .hn1 { justify-content: flex-end; }
.spx { display: inline-block; min-width: 30px; padding: 0 3px; border-radius: 3px; text-align: center; font: 700 11px/15px var(--mono); color: var(--muted); border: 1px solid var(--line); }
.spx.a { color: #10151c; background: var(--hot); border-color: var(--hot); }        /* 2x and up: amber = activity */
.spx.r { color: #fff; background: var(--dead); border-color: var(--dead); }          /* 3x and up: the alert level */
.si .spx { margin-left: 4px; }
.vr, .dr { display: grid; grid-template-columns: 14px 1fr 40px 66px 44px 52px; gap: 6px; align-items: center; padding: 4px 4px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: 12px; }
.dr { grid-template-columns: 14px 20px 1fr 44px 40px; } .dr.nd { grid-template-columns: 14px 20px 1fr 44px; }   /* nd: nothing down, no column */
.vr.ng { grid-template-columns: 14px 1fr 40px 66px 44px; }   /* ng: no enemy gun in range of any listed town, no column */
.tw.dlost .dxr { position: absolute; left: 50%; top: 50%; width: calc(var(--tis, 14px) * 1.15); height: calc(var(--tis, 14px) * 1.15); transform: translate(-50%, -50%); border: 1.5px solid; border-radius: 50%; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; pointer-events: none; }
.tw.dlost b { color: var(--dead); }   /* a lost depot: the red ✕ (the colour rule's destroyed), the loser in the ring */
.vr:hover, .dr:hover { background: var(--panel2); }
.vr.hh, .dr.hh { cursor: default; padding-top: 0; padding-bottom: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; } .vr.hh:hover, .dr.hh:hover { background: none; }
.vr small, .dr small { color: var(--muted); }
.vn { display: flex; flex-direction: column; min-width: 0; font-family: var(--display); font-size: 13px; line-height: 1.15; }
.vn, .vn small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vn small { font-family: var(--mono); font-size: 10px; }
.vf { justify-self: start; padding: 0 4px; border-radius: 3px; font: 700 11px/16px var(--mono); white-space: nowrap; color: var(--muted); }
.vf.on { color: #0f141b; } .vf.hi { box-shadow: 0 0 0 1.5px var(--hot); }
.vgs { display: inline-flex; gap: 4px; justify-content: flex-end; } .vg { display: inline-flex; align-items: center; gap: 1px; color: var(--fg); } .vg.z { color: var(--muted); }
.vg .tw.key, .dr .tw.key { width: 16px; height: 16px; }
.km { text-align: right; color: var(--fg); } .km.near { color: var(--hot); font-weight: 700; }
.vps { color: var(--fg); font-size: 18px; }
.ds { font-size: 11px; text-align: center; } .ds.up { color: var(--fg); } .ds.dn { color: var(--dead); font-weight: 700; }
.dr.off .vn { color: var(--muted); }
.tw.dlost .mi { opacity: .45; } .tw.dlost b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); font: 900 calc(var(--tis, 14px) * .95)/1 var(--display); text-shadow: 0 0 2px #000, 0 0 3px #000; pointer-events: none; } .meta .dn { color: var(--dead); }
.ph h2 img, .ph h2 .tw.key { display: inline-block; vertical-align: -2px; }
.fchips img { display: inline-block; width: 14px; height: 14px; vertical-align: -3px; }
#since { position: fixed; z-index: 995; top: calc(var(--topb, 50px) + 6px); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 4px 6px 4px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(21, 27, 36, .95); box-shadow: 0 4px 16px rgba(0, 0, 0, .45); font: 12px var(--mono); color: var(--muted); }
#since[hidden] { display: none; }
#since .svs { color: var(--fg); }
.meta .mic { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px; } .meta .mic .tw.key { width: 16px; height: 16px; }
#since .si2 { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#since .si2 b + b::before { content: "·"; color: var(--muted); font-weight: 400; margin: 0 2px; }
#since b.w { color: #8db4ee; } #since b.c { color: #8fd29a; } #since b.z { color: var(--muted); font-weight: 400; }
#since .sv svg { width: 13px; height: 13px; color: var(--fg); vertical-align: -1px; } #since .tw.key { width: 16px; height: 16px; }
#since .oi svg { width: 18px; height: 10px; }
#since .mvh { font: 600 12px var(--display); background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 3px; }
#since .mvh i { width: 0; height: 0; border: 4px solid transparent; border-bottom: 7px solid currentColor; border-top: 0; }   /* a small triangle in the gainer's colour */
#since .mv2 { white-space: normal; flex-wrap: wrap; } #since .mv2 > span { display: inline-flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
#since .svs small { color: var(--muted); }
.svtk i, .svtk-k i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid; box-shadow: 0 0 0 1.5px rgba(0,0,0,.7), inset 0 0 0 1.5px rgba(0,0,0,.6); }   /* a town taken since the last visit */
.compact .svtk i { left: -6px; top: -6px; width: 12px; height: 12px; border-width: 2px; }
.svtk-k { position: relative; width: 20px; height: 18px; } .svtk-k i { left: 1px; top: 0; width: 14px; height: 14px; border-width: 2px; }
#since .sb { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font: 600 11.5px var(--mono); }
#since .sb.x2 { color: var(--muted); font-size: 14px; position: absolute; top: 3px; right: 4px; }   /* item 61: × in the corner */
#since { padding-right: 36px; }
@media (min-width: 721px) { #panel:not([hidden]) ~ #since { left: calc((100vw - var(--pw)) / 2); } }
/* desktop: with a side panel open the top bar wraps short of it (its last buttons used to sit under the panel) */
@media (min-width: 721px) { body:has(#panel:not([hidden])) #top { max-width: calc(100vw - var(--pw) - 30px); } }
@media (max-width: 720px) {
  #since { left: 8px; right: 8px; transform: none; max-width: none; gap: 3px 10px; }
  .hr.hn { grid-template-columns: 18px 1fr auto 70px; gap: 5px; } .hr.hn .en, .hr.hn > .spk, .hr.hn.hh > .hs { display: none; }   /* phone: enlistments in the hex panel only, no sparkline */
  .vr { grid-template-columns: 12px 1fr 36px 62px 40px 46px; gap: 5px; }
}

/* ---------------------------------------------------------------- feature batch 25 Nov (owner's picks; README "Feature batch 25 Nov") */
/* item 6: the scrubber's "go to day" box; a miss shakes it with a white edge (white = what the user typed, README colour rule) */
#scrubg { width: 64px; height: 26px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; padding: 0 6px; font: 11px var(--mono); }
#scrubg:focus { outline: none; border-color: var(--muted); }
#scrubg.bad { border-color: var(--fg); box-shadow: 0 0 0 1px #000; animation: gdshake .32s linear; }
@keyframes gdshake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
#scrubgh { height: 26px; font-family: var(--mono); padding: 0 4px; }
#scrubgh[hidden] { display: none; }
/* item 8: the replay end card, over the map's north (the video's card) */
#hcard { position: fixed; z-index: 994; top: calc(var(--topb, 56px) + 14px); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px);
  background: rgba(21, 27, 36, .95); border: 1px solid rgba(138, 148, 163, .6); border-radius: 10px; padding: 8px 12px 9px; font: 13px var(--display);
  box-shadow: 0 4px 18px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 4px; }
#hcard[hidden] { display: none; }
@media (min-width: 721px) { #panel:not([hidden]) ~ #hcard { left: calc((100vw - var(--pw)) / 2); } }
#hcard .hch { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg); font-weight: 600; font-size: 12.5px; padding-right: 2px; }
#hcard .hch span { color: var(--muted); }
#hcard .ax { margin-left: auto; width: 22px; height: 22px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font-size: 13px; line-height: 1; flex: none; }
#hcard .hcr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; color: var(--fg); }
#hcard .hcr small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
#hcard .hcr b { font: 700 15px var(--display); }
#hcard .hcl { border: 0; background: none; padding: 0; color: var(--fg); font: 600 13px var(--display); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 720px) { #hcard { top: calc(var(--topb, 56px) + 46px); left: 8px; right: 8px; transform: none; max-width: none; } #hcard .hch { font-size: 11px; } }
/* items 5 + 11: the route panel's exposure line (deaths = activity: amber, README colour rule) and the nearest depot / via line */
.rexp, .rdep { margin-top: 6px; font: 11.5px/1.6 var(--mono); color: var(--muted); }
.rexp > span { display: block; } .rdep .tw.key { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.rexp b { color: var(--fg); } .rexp .lv.medium { color: var(--hot); } .rexp .lv.high { color: #10151c; background: var(--hot); padding: 0 4px; border-radius: 3px; }
.rdep b { color: var(--fg); } .rdep .tw.key { width: 16px; height: 16px; }
.rdep button { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 1px 6px; cursor: pointer; font: 600 11.5px var(--mono); }
.rdep .rvd { border-color: rgba(230, 225, 214, .55); }   /* white = what the user asks for (the route's colour) */
.rtm.via i { width: 12px; height: 12px; font-size: 0; box-shadow: 0 0 0 2px #000; }
/* item 1: the faint hex name above the chip row (whole-map zoom; the labels pane hides from a 1-ring zoom in live mode), hidden where
   the chips step aside (the centred alt copy takes over) and with the "names" item off; the major towns' names under their icons */
.hxn.top { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: .2em; pointer-events: none; }
.fill-on:not(.zin) .hl .hxn.top, .feed-on .hl .hxn.top { display: none; }
.hl.plh .hxn.top { visibility: hidden; }
.nonames .hxn, .nonames .tnl { display: none !important; }
.tnl { pointer-events: none; } .tnl > b { position: absolute; transform: translateX(-50%); white-space: nowrap; font: 600 11px/13px var(--display);
  letter-spacing: .01em; opacity: .82; text-shadow: 0 0 3px #070a0e, 0 0 2px #070a0e, 0 0 1px #000; }
.nmk { font: 700 12px/1 var(--display); color: var(--fg); letter-spacing: -.02em; }
/* item 9: the since strip's "★ watched" part (one group per bookmarked hex) */
#since .wch { white-space: normal; flex-wrap: wrap; row-gap: 2px; color: var(--fg); }
#since .wch .wh { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; color: var(--muted); }
#since .wch .mvh { color: var(--fg); } #since .wch .mvh i { display: none; }
#since .wch b.up { color: var(--hot); } #since .wch b.dn { color: var(--muted); }
#since .wch .spx { font: 700 11px var(--mono); padding: 0 3px; border-radius: 3px; }
/* item 10: the phone toolbar in one row + the "⋯" sheet with the tools (moved there by placeTools at 720 px and below) */
#moreb { display: none; }
#topm[hidden] { display: none; }
@media (max-width: 720px) {
  #top { flex-wrap: nowrap; right: auto; max-width: calc(100vw - 16px); }
  #top > * { flex: none; } #top > #vp { flex: 0 1 auto; min-width: 0; overflow: hidden; }   /* a narrower phone: the score bar gives way first */
  #moreb { display: flex; align-items: center; justify-content: center; margin-left: auto; font-size: 17px; line-height: 1; color: var(--fg); }
  #moreb.on { background: var(--panel2); border-color: var(--muted); }
  #sum .ddb .oi:nth-of-type(n+2) { display: none; }   /* the layers button: its icon only (the panel names the layers) */
  #top { gap: 3px; } #top #vp .vb { width: 28px; }
  #topm { position: fixed; top: calc(var(--topb, 50px) + 6px); right: 8px; z-index: 1004;   /* fixed: at the screen's right edge whatever the bar's width */
    display: grid; grid-template-columns: repeat(4, 64px); gap: 6px;
    padding: 8px; background: rgba(21, 27, 36, .97); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.55); }
  #topm .ib { display: flex !important; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 48px; gap: 3px; padding: 2px; }
  #topm .ib[style*="display: none"] { display: none !important; }   /* a tool the mode hides (forecast: no history, events, hot, VP) */
  #topm .ib .tl { display: block; font: 600 10px/1 var(--display); letter-spacing: .02em; color: var(--muted); }
  #topm .ib.on .tl { color: var(--fg); }
  #top #topm #linkb, #top #topm #infob { display: flex !important; }
  /* the history legend as a chip (the war's row + "i key"), not a full-width bar */
  body:has(#scrub:not([hidden])) #legend { right: auto; max-width: calc(100vw - 16px); padding: 3px 6px; }
}
/* item 13: who is bleeding (hex panel row under the front row; map drop, momentum layer on) */
.trow.brl { margin-top: 5px; gap: 5px; font: 12px var(--mono); color: var(--muted); align-items: center; }
.trow.brl b { color: var(--fg); } .trow.brl b.z { color: var(--muted); font-weight: 400; } .trow.brl .bll { color: var(--muted); }
.trow.brl .bla { color: var(--fg); } .trow.brl .bdr { flex: none; }
.bldm svg { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); filter: drop-shadow(0 0 1px #000); pointer-events: auto; }
/* item 14: the arrivals pill (muted) and the layer icon */
.ppl.arr { font-size: 10px; line-height: 12px; padding: 0 3px; border-width: 1px; opacity: .85; }
.oi.lpl { display: inline-flex; gap: 1px; } .oi.lpl .ppl { padding: 0 3px; height: 10px; line-height: 8px; font-size: 7px; border-width: 1.5px; }
/* item 15: when enemy partisans strike (the least-active strip's style; the busiest hours lit amber; hatched = too few raids) */
.sks .qhs i.pk { background: var(--hot); }
.sks.few .qhs { background: repeating-linear-gradient(135deg, rgba(230, 225, 214, .35) 0 1px, transparent 1px 4px); } .sks.few .qhs i { opacity: .25 !important; }
.qh.skr { gap: 5px; } .qh.skr .skl { color: var(--muted); } .qh.skr .skw { color: var(--muted); }
.sks-row { margin-top: 4px; } .sks-row.lst { margin: 2px 0 8px; font-size: 11px; }
/* item 16: the activity strip behind the slider's track */
#scrubrw { position: relative; }
#scruba { position: absolute; left: 7px; right: 7px; top: 0; height: 22px; width: calc(100% - 14px); pointer-events: none; z-index: 0; }
#scrubr { position: relative; z-index: 1; -webkit-appearance: none; appearance: none; background: transparent; height: 22px; cursor: pointer; }
/* a thin neutral track (the activity strip shows around it), a cream thumb; both engines (the owner browses with LibreWolf) */
#scrubr::-webkit-slider-runnable-track { height: 2px; background: rgba(201, 195, 181, .6); border-radius: 1px; }
#scrubr::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: #c9c3b5; box-shadow: 0 0 0 2px #10151c; }
#scrubr::-moz-range-track { height: 2px; background: rgba(201, 195, 181, .6); border-radius: 1px; }
#scrubr::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #c9c3b5; box-shadow: 0 0 0 2px #10151c; }
#scrubr:focus-visible { outline: 1px solid var(--muted); outline-offset: 1px; }
.arl { margin-top: 4px; font: 12px/1.45 var(--mono); color: var(--muted); } .arl b { color: var(--fg); } .arl small { color: var(--muted); }   /* item 14: the arrivals line */
.sks-row.lst .qh { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
/* ---- review cycle 4 (25 Nov) ---- */
/* item 75: the sites tool lights like the other tools */
#siteb.on { color: var(--fg); border-color: var(--muted); background: var(--panel2); }
/* item 95: the armed-tool pill steps aside while the layer panel is open (it covered the panel's first map-item row) */
body:has(#sum .ddm:not([hidden])) #hint .arm { display: none; }
/* item 94: on a phone the pill sits at the bottom, above the sheet / the time bar, on one line */
@media (max-width: 720px) {
  /* only the pill moves (the find box stays in #hint at the top, clear of the on-screen keyboard) */
  .arm { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--botb, 0px) + 30px); max-width: calc(100vw - 16px); box-sizing: border-box;
    white-space: nowrap; font-size: 12px; padding: 4px 6px 4px 10px; }
  .arm .ast { display: none; }
}
/* item 71: the phone's whole-map button */
#worldb { position: fixed; right: 8px; bottom: calc(var(--botb, 0px) + 26px); z-index: 993; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(21, 27, 36, .92); color: var(--fg); font-size: 19px; line-height: 1; cursor: pointer; }
#worldb.on { border-color: var(--fg); }
#worldb[hidden] { display: none; }
/* items 79 / N55: the end card's one data time */
#hcard .hcd { font: 11px var(--mono); color: var(--muted); margin: -2px 0 2px; } #hcard .hcd small { font-size: 10px; }
/* item 76: one site marker per hex on the desktop whole map, labelled with all its ranks ("1·3") */
.sfm.mul i { width: auto; min-width: 20px; padding: 0 5px; border-radius: 10px; font-size: 10.5px; letter-spacing: -.02em; }
/* item 73: hex names readable: >= 10 px, alpha .84, a crisp 1 px edge instead of the blurred halo (it won at 8.7 px: 1.6:1); on a light
   forecast fill dark text with a light edge (.dk) */
.hxn { font-size: max(10px, calc(var(--ls, 10px) * .95)); color: rgba(234, 229, 218, .84);
  text-shadow: 1px 0 0 rgba(7, 10, 14, .85), -1px 0 0 rgba(7, 10, 14, .85), 0 1px 0 rgba(7, 10, 14, .85), 0 -1px 0 rgba(7, 10, 14, .85); }
.hxn.dk { color: rgba(16, 21, 28, .92); text-shadow: 1px 0 0 rgba(234, 229, 218, .5), -1px 0 0 rgba(234, 229, 218, .5), 0 1px 0 rgba(234, 229, 218, .5), 0 -1px 0 rgba(234, 229, 218, .5); }
/* item 74: the hex name at the hex's top edge from the icon zoom on (the labels pane is hidden there) */
.leaflet-hexnames-pane .hl .hxe { display: none; } .nodes-on .leaflet-hexnames-pane .hl .hxe, .leaflet-hexnames-pane .hl.plt .hxe { display: block; }   /* 107: .plt = the centre name under a pill moved up here */
.hxn.hxe { position: absolute; left: 0; top: 0; transform: translate(-50%, 0); white-space: nowrap; font-size: max(10px, calc(var(--ls, 10px) * .8)); opacity: .9; }
/* N45: the fighting-share pill: the share primary, ~n (upper bound) secondary */
.ppl.pls small { font-size: 9px; font-weight: 400; opacity: .75; } .zk.opl .ppl.pls small { font-size: 8.5px; }
.si.z { color: var(--muted); }
/* item 88: the guard clock (thin hours grey + blue box, raid starts amber ticks, ◆ per-player peak), 00 / 06 / 12 / 18 */
.gclk { display: inline-flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; } .gclk small { color: var(--muted); }
.gcw svg { display: block; } .gcw { padding-bottom: 9px; } .gcw .qhx::before { display: none; }
.sks-row.lst > .skl { display: block; font: 11px var(--mono); color: var(--muted); margin-bottom: 1px; }
.qh.gclk { white-space: normal; } .gclk small { white-space: normal; max-width: 100%; }
.hr.blh.hh .blm1 { font: 10px var(--mono); color: var(--muted); }
/* item 83 / F2: the slider on its own full-width row, a taller strip, clickable peak ticks, the hover readout, the recorder tail (N47) */
#scrubrw { flex: 1 1 100%; order: 0; }
#scruba { height: 30px; top: -4px; overflow: visible; }
#scrubr { height: 22px; }
#scrubpk { position: absolute; left: 0; right: 0; top: -9px; height: 7px; z-index: 2; pointer-events: none; }
#scrubpk .apk { position: absolute; top: 0; width: 7px; height: 7px; margin-left: -3.5px; padding: 0; border: 0; border-radius: 1px; background: var(--hot); cursor: pointer; pointer-events: auto; box-shadow: 0 0 0 1px #10151c; }
#scrubpk .apk:hover, #scrubpk .apk:focus-visible { transform: scale(1.35); }
#scrubhv { position: absolute; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap; z-index: 3; pointer-events: none;
  background: rgba(12, 16, 22, .96); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font: 11px var(--mono); color: var(--fg); }
#scrubhv[hidden] { display: none; }
@media (max-width: 720px) { #scruba { height: 24px; top: -1px; } #scrubpk { top: -6px; } }
/* item 84: the go-to-day hint */
#scrubg::placeholder { color: var(--muted); } .gdh { font: 11px var(--mono); color: var(--hot); white-space: nowrap; }
/* cycle 4 idea 10: the gained-ground figure beside the ghost picker */
.ggf { font: 11px var(--mono); color: var(--muted); white-space: nowrap; } .ggf[hidden] { display: none; } .ggf b { font-weight: 700; }
/* Part 4: choke point rings (side colour = whose supply; solid = yours / defend, dashed = theirs / targets) */
.chk i { position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; border: 2.5px solid; background: rgba(12, 16, 22, .9);
  color: #fff; font: 700 10px/17px var(--mono); text-align: center; box-shadow: 0 0 0 1px #000; pointer-events: auto; }
.chk.en i { border-style: dashed; }
.chk.key { position: relative; display: inline-block; width: 26px; height: 18px; } .chk.key i { left: 50%; top: 50%; min-width: 20px; height: 16px; font-size: 8.5px; line-height: 11px; border-width: 2px; box-shadow: none; }
.hr.ckr { grid-template-columns: 34px 1fr auto auto; cursor: pointer; } .sh.sub { margin-top: 6px; font-size: 10px; text-transform: none; letter-spacing: 0; }
.rrisk.ck { margin-top: 4px; }
/* the ☰ war list: digest rows and offensives */
.hr.dgr { grid-template-columns: 28px auto auto 1fr; gap: 8px; cursor: pointer; } .hr.dgr.hh { cursor: default; } .hr.dgr.on { background: var(--panel2); }
.hr.dgr .d2 { font: 11.5px var(--mono); white-space: nowrap; } .hr.dgr .d2 small { color: var(--muted); font-size: 10px; }
.hr.ofr { grid-template-columns: 24px 1fr auto auto; gap: 8px; cursor: pointer; } .hr.ofr .d2 { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.hlc select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 6px; height: 24px; font: 11px var(--mono); }
/* cycle 4 idea 2: the hex panel's war timeline */
.htl { display: flex; flex-wrap: wrap; gap: 1px; margin: 3px 0 4px; } .htl svg { width: 9px; height: 9px; }
.tl .tlk { color: var(--muted); margin-right: 6px; } .tl .ev { margin-left: 3px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
.tl .sb { height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; font: 11px var(--mono); }
/* cycle 4 ideas 1 + 7: the reader's own marks (★ watched, ✎ note) and the note box */
.umk b { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); display: inline-flex; gap: 1px; pointer-events: auto; cursor: pointer; }
.umk i { font: 700 11px/14px var(--mono); font-style: normal; width: 15px; height: 15px; text-align: center; border-radius: 4px; background: rgba(12, 16, 22, .9); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }
.hnote summary { cursor: pointer; color: var(--muted); font: 12px var(--mono); } .hnote summary small { color: var(--muted); opacity: .8; }
.hnote textarea { width: 100%; box-sizing: border-box; margin-top: 5px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; font: 12px var(--mono); padding: 5px; resize: vertical; }
.hnote .nst { color: var(--muted); font-size: 10.5px; }
/* item 98: the nearest standing depot's ring while a route shows */
.rdr i { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px #000, inset 0 0 0 1px #000; }
/* cycle 4 idea 6: the phone landing card ("what matters now") */
#land { position: fixed; left: 8px; right: 8px; top: calc(var(--topb, 52px) + 8px); z-index: 1004; max-height: calc(100vh - var(--topb, 52px) - 24px); overflow: auto;
  background: rgba(21, 27, 36, .98); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .6); }
#land .lh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; } #land .lh b { font: 700 16px var(--display); text-transform: uppercase; letter-spacing: .04em; }
#land .lh small, #land .lnote { color: var(--muted); font: 11px var(--mono); } #land .lnote { display: block; margin-top: 8px; text-align: center; }
#land .lsh { margin: 10px 0 3px; color: var(--muted); font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
#land .lrw { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; width: 100%; text-align: left; gap: 0 8px; padding: 8px 10px; margin: 3px 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: 14px var(--display); cursor: pointer; }
#land .lrw small { grid-row: 2; color: var(--muted); font: 11px var(--mono); } #land .lrw i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--muted); font-size: 18px; }
#land .lmap { display: block; width: 100%; margin-top: 10px; height: 40px; border-radius: 8px; border: 1px solid var(--fg); background: var(--fg); color: #10151c; font: 700 14px var(--display); cursor: pointer; }
/* cycle 4 idea 9: a command row in the find box */
.fr.cmd .fi { font: 700 15px var(--mono); color: var(--fg); text-align: center; } .fr.cmd.off { opacity: .55; } .fr.cmd b { font-weight: 700; }
/* item 73 follow-up: under 64 px hexes (a phone's map above a sheet) the names cannot fit: hidden, the hex panel / tooltip name them */
.cnt2 .hxn { display: none !important; }
/* item 72: a phone's forecast below ring zoom: one chip per hex (its best odds), the full block from the ring zoom on */
.cmb1 { display: none !important; }
/* REVIEW_UI cycle 5 item 121: on any screen, not only a phone: under ~110 px hexes (.compact) one chip per hex, the block from there up */
.compact .cmbf { display: none !important; } .compact .cmb1 { display: flex !important; }
/* item 104: a phone's mode switch says "forecast" while it is on (a bare "%" next to "● live" read as nothing) */
@media (max-width: 720px) { .seg [data-mode="forecast"].on .dl { display: inline; font-size: 10px; margin-left: 3px; } }
/* item 93: the score's unit glyph (⌂ towns in history, ★ victory towns live), kept on a phone where the word drops */
#vp .vu { color: var(--muted); font-size: 11px; margin-right: 3px; }
/* item 90: the emblem pickers' selected state = the cream border of the other lit buttons; a gap before the weapon types */
.fp button.sdp { border: 1px solid transparent; border-radius: 5px; opacity: .55; }
.fp button.sdp.on { border-color: var(--fg); background: var(--panel2); opacity: 1; box-shadow: inset 0 0 0 1px rgba(230, 225, 214, .35); }
.fp:has(> button.sdp) { margin-right: 10px; padding-right: 8px; border-right: 1px solid var(--line); }
/* item 91: with momentum on, the count chips fade (as under a fill) so its arrows and drops read over them */
.mom-on .hl .hst { opacity: .42; }
/* item 99: a pile of event marks at the whole-map zoom: one count badge per hex */
.evp b { position: absolute; transform: translate(-50%, -50%) scale(var(--iz, 1)); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgba(12, 16, 22, .92);
  border: 1.5px solid var(--hot); color: #fff; font: 700 11px/17px var(--mono); text-align: center; pointer-events: auto; cursor: pointer; box-shadow: 0 0 0 1px #000; }
/* item 102: the key's named resource chips */
.row.kfr { display: flex; flex-wrap: wrap; gap: 4px 10px; } .row.kfr span { display: inline-flex; align-items: center; gap: 4px; } .row.kfr img { width: 16px; height: 16px; border-radius: 3px; }
/* item 94 follow-up: #hint is centred with a transform, which would make the pill's position:fixed relative to it; on a phone it spans the
   width instead (no transform), so the pill reaches the screen's bottom and the find box stays centred at the top */
@media (max-width: 720px) { #hint { left: 8px; right: 8px; transform: none; align-items: center; } }
/* ---- review cycle 5 (25 Nov 2026) ---- */
/* item 106: the war scan's state line: the size and a load button (phone / Save-Data), a thin progress bar while it reads */
.scask { font: 12px/1.45 var(--mono); color: var(--fg); padding: 6px 2px; } .scask .sb { margin-left: 4px; }
.scpr { position: relative; font: 11px var(--mono); color: var(--muted); padding: 4px 2px 7px; }
.scpr i { position: absolute; left: 2px; bottom: 2px; height: 2px; max-width: calc(100% - 4px); background: var(--fg); opacity: .7; border-radius: 1px; }
/* item 109: the compare-towns lines in their own row under the slider (30-70 % scale, 50 % dotted), end labels at its right */
#scrubcm { position: relative; display: block; margin: 1px 7px 0; border-top: 1px solid rgba(230, 225, 214, .12); }
#scrubcm[hidden] { display: none; }
#scrubcms { display: block; width: 100%; height: 22px; }
#scrubcml { display: block; text-align: right; font: 10px/1.2 var(--mono); color: var(--fg); padding: 1px 0 0; pointer-events: none; white-space: nowrap; }   /* 140: its own line under the row, off the lines' last days */
@media (max-width: 720px) { #scrubcml { font-size: 9px; } }
/* item 116: the partial last day, muted, "9 h so far" under its number */
.hr.dgr.part { opacity: .62; } .hr.dgr .pth { display: block; font: 9px/1.1 var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; }
/* item 107: a place name in a list or card: flashes its hex (a pulsing white outline) */
.hcl, .hr .hcl { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
@keyframes hxfl { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .15; } }
.hxfl { animation: hxfl .62s ease-in-out 4; }
/* F13 / ideas 1 + 8: the offensive card under its row, the outcome tag, the row's ▶ */
.hr.ofr.on { background: var(--panel2); }
.hr.ofr .oco, .ofc .oco { margin-left: 6px; font: 10px var(--mono); font-style: normal; color: var(--muted); } .oco.g { color: var(--fg); } .oco.l { color: #c9a3a3; }
.hr .ofp { margin-left: 6px; border: 1px solid var(--line, #3a424d); background: none; color: var(--fg); border-radius: 4px; font-size: 10px; line-height: 1; padding: 2px 4px; cursor: pointer; }
.ofc { margin: 0 4px 8px 28px; padding: 6px 8px; border-left: 2px solid var(--panel2); font: 11px var(--mono); }
.ofc .ofl { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); margin-top: 4px; } .ofc .ofl small { font-size: 10px; }
.ofc .ofs { display: block; width: 100%; height: 34px; margin-top: 2px; border-radius: 3px; }
.ofc .ofh { line-height: 1.5; } .ofc .ofb { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .ofc .ofb small { color: var(--muted); }
/* F14: the stalemate rows */
.hr.stl { grid-template-columns: 1fr auto auto; gap: 8px; cursor: pointer; } .hr.stl .d2 { font: 11px var(--mono); white-space: nowrap; } .hr.stl .en small { color: var(--muted); margin-right: 4px; }
.hr.stl .ev { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 13px; }
/* item 120: the hex panel's war as a 0-100 % step line with day ticks */
.htl2 { position: relative; margin: 3px 0 12px; } .htl2 .htls { display: block; width: 100%; height: 39px; }
.htl2 .htlt { position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; } .htl2 .htlt span { position: absolute; transform: translateX(-50%); font: 9px/1 var(--mono); color: var(--muted); }
.hr.dgr .hn2.bf { white-space: normal; line-height: 1.15; min-width: 0; } .hr.dgr .hn2.bf small { display: block; font-size: 9.5px; color: var(--muted); }
.hr.dgr .hn2.bf .hcl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: inline-block; vertical-align: bottom; }
.hr.dgr .d2 .pth { display: block; font-size: 9px; line-height: 1; }
/* item 120: the hex panel's lower sections fold (closed by default, remembered per section) */
.sec .sh.fsh { cursor: pointer; user-select: none; } .sec .sh.fsh::before { content: "▾"; display: inline-block; width: 12px; color: var(--muted); }
.sec.fold .sh.fsh::before { content: "▸"; } .sec.fold > :not(.fsh) { display: none !important; } .sec.fold { padding-bottom: 4px; }
.sec .sh.fsh:hover { color: var(--fg); }
/* item 108: the partisan target rings carry the list's rank (the first 10), the list rows the same number */
.ptr .ptn { position: absolute; right: -7px; top: -7px; min-width: 14px; height: 14px; padding: 0 2px; border-radius: 7px; background: #e6e1d6; color: #10151c;
  font: 700 9.5px/14px var(--mono); font-style: normal; text-align: center; box-shadow: 0 0 0 1px #10151c; }
.pr .sc .ptn.key { display: inline-block; min-width: 14px; height: 14px; margin-right: 4px; border-radius: 7px; background: #e6e1d6; color: #10151c; font: 700 9.5px/14px var(--mono); font-style: normal; text-align: center; }
/* item 112: the raid history's header row (deaths W / C on every row) */
.rhr.rhh2 { color: var(--muted); font-size: 10px; } .rhr.rhh2 .en { color: var(--muted); }
/* F16: the quiet ranking (hotby=quiet): its rows and its map marks (no flame) */
.hr.qf { grid-template-columns: 22px 1fr auto 56px; } .hr.qf .d2 small { color: var(--muted); } .hrk.qt { color: var(--fg); }
/* item 113 / idea 6: the now card's data age (the top bar chip's colours); on a desktop a panel at the top left */
#land .lage { font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: var(--panel2); color: var(--fg); }
#land .lage.st1 { background: var(--hot); color: #10151c; } #land .lage.st2 { background: var(--err); color: #10151c; }
#land .lsh small { text-transform: none; font-weight: 400; }
#land.dsk { left: 12px; right: auto; width: 360px; top: 74px; max-height: calc(100vh - 110px); }
/* items 114 + 125: the whole-map button: SVG corners; in the world view "front" beside the inward corners */
#worldb { display: inline-flex; align-items: center; justify-content: center; gap: 3px; } #worldb svg { display: block; }
#worldb.on { width: auto; padding: 0 8px; } #worldb small { font: 600 11px var(--display); }
/* item 117 + F10: the route's choke line in the ring's own look (side colour edge, the W9 ring), "if cut" and "avoid" */
.rck { margin-top: 6px; padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--fg); background: var(--panel2); color: var(--fg); font: 11.5px/1.6 var(--mono); }
.rck .chk.key { display: inline-block; position: relative; vertical-align: -4px; } .rck small { color: var(--muted); } .rck .rcx { display: block; }
.rck button, .rrun button { border: 1px solid rgba(230, 225, 214, .55); background: var(--bg); color: var(--fg); border-radius: 5px; padding: 1px 6px; cursor: pointer; font: 600 11px var(--mono); margin-left: 4px; }
/* F15: the multi-stop run's legs, the + stop / save row, the saved runs */
.rlegs { margin-top: 8px; font: 11px/1.5 var(--mono); }
.rleg { display: grid; grid-template-columns: 1fr 38px 52px 40px 50px 18px; gap: 4px; align-items: center; padding: 2px 0; border-top: 1px solid var(--line); }
.rleg.rlh { color: var(--muted); font-size: 10px; border-top: 0; } .rleg small { color: var(--muted); } .rleg .rvx { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.rrun { display: flex; gap: 4px; align-items: center; margin-top: 8px; } .rrun button { margin-left: 0; }
.rrun input { flex: 1; min-width: 0; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font: 11px var(--mono); }
.rruns { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; font: 11px var(--mono); } .rruns a { color: var(--fg); } .rruns .rvx { border: 0; background: none; color: var(--muted); cursor: pointer; }
.rtm.stp i { width: 16px; height: 16px; font-size: 10px; line-height: 16px; background: #10151c; color: var(--fg); box-shadow: 0 0 0 2px var(--fg); }
/* F11: a choke under threat now: a ⚠ chip at its ring, a line in the chokes tab */
.chk .ckt { position: absolute; left: 9px; top: -19px; width: 14px; height: 14px; border-radius: 7px; background: #10151c; color: #f3ecd8; font: 700 9px/14px var(--mono); text-align: center; box-shadow: 0 0 0 1.5px #f3ecd8; }
.hr.ckr .ckw { display: block; color: var(--fg); font-size: 10px; white-space: normal; } .ckth { margin: 4px 0 2px; font: 600 11px var(--mono); color: var(--fg); }
/* idea 5: a watched hex's flip on the activity strip, under the peak ticks */
#scrubpk .awf { position: absolute; top: 30px; width: 11px; height: 11px; margin-left: -5.5px; padding: 0; border: 0; background: none; font: 700 11px/11px sans-serif; cursor: pointer; pointer-events: auto; text-shadow: 0 0 2px #070a0e, 0 0 1px #070a0e, 1px 1px 0 #070a0e, -1px -1px 0 #070a0e; }   /* 136: a ★ under the track in the new owner's colour */
#scrubpk .awf:hover, #scrubpk .awf:focus-visible { transform: scale(1.4); }
#scrubpk .arw { position: absolute; top: -2px; width: 11px; height: 11px; margin-left: -5.5px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; line-height: 0; }   /* idea 2: a raid tick above the track */
#scrubpk .arw svg { filter: drop-shadow(0 0 1px #070a0e); } #scrubpk .arw:hover { transform: scale(1.4); }
/* idea 7: the flip steps */
#scrubfp[disabled], #scrubfn[disabled] { opacity: .4; cursor: default; }
.hr.ofr .hn2 { white-space: normal; overflow: visible; line-height: 1.2; min-width: 0; } .hr.ofr .hn2 .oco { display: block; margin-left: 0; }
.leaflet-hexnames-pane .hl.plt .hxe { white-space: pre-line; text-align: center; line-height: 1.05; }   /* 107: the moved name in two lines, as at the centre */
.leaflet-hexnames-pane .hl.plt.pl1 .hxe { white-space: nowrap; font-size: max(9px, calc(var(--ls, 10px) * .7)); }   /* 129: one line when both edges meet a neighbour's name */

/* REVIEW_UI cycle 6 (stamp 20261127f) */
.stlm b { position: absolute; transform: translate(-50%, -150%); font: 700 10.5px var(--mono); color: #10151c; background: #efe7d2; border-radius: 3px; padding: 0 4px; white-space: nowrap; box-shadow: 0 0 0 1.5px #070a0e; }   /* 130: a stalemate's days on the map */
.rck.mut { opacity: .78; border-left-style: dashed; } .ckd { color: var(--fg); font-weight: 700; }   /* 131: a cheap way round for the truck = a note · 132: the distance as the row figure */
.hr.dgr { grid-template-columns: 28px auto auto 1fr auto; } .hr.dgr .dgp { padding: 0 6px; font-size: 10px; line-height: 16px; }   /* idea 1: ▶ on a day row */
#scrubv.loop { border-color: #e0a040; color: #e0a040; }   /* 139: the replay loop's speed */
@media (max-width: 720px) { .hr.dgr .hn2.bf, .hr.dgr .hn2.bf .hcl { white-space: normal; line-height: 1.15; text-align: left; } .hr.dgr { gap: 5px; } }   /* 133: the biggest fight wraps on a phone ("Farranac C…") */
#scrubfg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } #scrubfg[hidden] { display: none; } #scrubfg small { color: var(--muted); font-size: 11px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }   /* 135 */
@media (max-width: 720px) { #scrubfg { order: 2; } }
.hr.sup { grid-template-columns: 1fr auto; gap: 2px 8px; cursor: pointer; } .hr.sup small { grid-column: 1 / 3; color: var(--muted); font-size: 10.5px; }   /* owner ruling 2: worst-supplied fronts */
.sup1 .si { font: 11.5px var(--mono); } .sup1 .tw.key { display: inline-block; width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
#land .lbt { display: flex; gap: 8px; } #land .lbt .lmap { flex: 1; } #land .lcp { margin-top: 10px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); font: 600 12px var(--mono); cursor: pointer; padding: 0 12px; }   /* X2 */
#land .wrs { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 3px; } #land .wrt { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 24px; height: 28px; border-radius: 4px; font: 700 11px/1 var(--mono); color: #0f141b; }   /* X4 */
#land .wrt small { font: 9px/1 var(--mono); color: #0f141b; opacity: .85; margin-top: 2px; } #land .wrt.wd { background: var(--panel2); color: var(--fg); } #land .wrt.wd small { color: var(--muted); } #land .wrn { color: var(--muted); font: 10.5px var(--mono); }
#since .swr b, #since .srd .mvh { font-weight: 700; } #since .srd svg { vertical-align: -2px; }   /* X5, idea 3 */
.ckc .ofl span { font: 11.5px var(--mono); } .ckc .tw.key { display: inline-block; width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; } .hr.ckr.on { background: var(--panel2); }   /* owner ruling 1: the choke card */
.chk.on i { box-shadow: 0 0 0 3px #ffffff, 0 0 8px 2px rgba(255, 255, 255, .6); }
.blkh { margin: 10px 0 4px; padding-bottom: 2px; border-bottom: 1px solid var(--line); font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fg); }   /* consolidation (e): the hottest panel's two blocks */
details.anf { margin: 4px 0; } details.anf > summary { cursor: pointer; font: 11px var(--mono); color: var(--muted); }   /* X6 */
.rsp .lsh { margin: 6px 0 3px; color: var(--muted); font: 600 10.5px var(--mono); text-transform: uppercase; } .rsp .lsh small { text-transform: none; font-weight: 400; }
.rsp .wrs { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 3px; } .rsp .wrt { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 24px; height: 28px; border-radius: 4px; font: 700 11px/1 var(--mono); color: #0f141b; }
.rsp .wrt small { font: 9px/1 var(--mono); color: #0f141b; opacity: .85; margin-top: 2px; } .rsp .wrt.wd { background: var(--panel2); color: var(--fg); } .rsp .wrn { color: var(--muted); font: 10.5px var(--mono); }
.lpre { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; font: 600 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }   /* X3: layer presets */
.lpre button { border: 1px solid var(--line); background: var(--panel2); color: var(--fg); border-radius: 6px; padding: 2px 10px; font: 600 11.5px var(--mono); cursor: pointer; text-transform: none; letter-spacing: 0; }
#resmode { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; font: 12px var(--mono); padding: 2px 4px; max-width: 220px; }   /* consolidation (d) */
.lrsub { padding: 0 0 4px 34px; } .lrnote { padding: 0 0 2px 34px; font: 10.5px var(--mono); color: var(--muted); }
.opb .opl { font: 11.5px/1.45 var(--mono); color: var(--fg); } .opb .sh .hcl { font: 700 13px var(--display); text-transform: none; } #ohsel { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; font: 11.5px var(--mono); }   /* B4 */
.odl, .lodd { font: 11.5px/1.45 var(--mono); color: var(--fg); margin: 2px 0; } .odl b, .lodd b { color: var(--fg); } #land .lodd { padding: 2px 2px 4px; }   /* B2: the odds block */
.rcl { font: 600 11px var(--mono); color: var(--fg); margin-left: 8px; text-decoration: underline dotted; text-underline-offset: 3px; } .ecr { margin-top: 4px; }   /* B3: recap links */
.hr.pwr { grid-template-columns: 1fr 22px 56px 1fr auto; gap: 6px; } .pwt { display: inline-block; width: 18px; text-align: center; border-radius: 3px; color: #0f141b; font: 700 10.5px/16px var(--mono); background: var(--panel2); }
.f48c { margin: 4px 0; } .f48r { display: block; margin: 2px 0; } .hr.f48l { grid-template-columns: 1fr auto; gap: 2px 8px; } .hr.f48l small { grid-column: 1 / 3; color: var(--muted); }   /* B3: the first 48 h */
.hr.f48l img { width: 16px; height: 16px; vertical-align: -3px; object-fit: contain; }
#land .lbt { position: sticky; bottom: -12px; margin: 10px -12px -12px; padding: 0 12px 10px; background: linear-gradient(rgba(21, 27, 36, 0), rgba(21, 27, 36, .98) 30%); }   /* the card grew (X4, X7, idea 6, B2): "map" stays on screen */

/* the maker's mark in the attribution corner (owner, 26 Nov): logo inline with its words, never on its own line */
.leaflet-control-attribution .madeby img{display:inline-block;vertical-align:-2px;margin-right:3px;border-radius:3px}
.leaflet-control-attribution .madeby{color:inherit;text-decoration:none}
