/* =====================================================================
   DFW MONITOR MDT — mobile CAD style terminal
   Night = dark cab screen, Day = high-glare grey CAD screen
   ===================================================================== */
:root, [data-theme="night"] {
  --bg: #070b10;
  --bg2: #0c121a;
  --panel: #0f1720;
  --panel2: #141e29;
  --panel3: #1a2633;
  --line: #223142;
  --line2: #2d3f53;
  --text: #dfe8f1;
  --text2: #a9b8c8;
  --dim: #6e8197;
  --accent: #38c6ff;
  --accent-ink: #001a26;
  --sel: #1d4f8f;
  --sel-line: #3b8bff;
  --row-alt: rgba(255,255,255,.018);
  --hover: rgba(56,198,255,.07);

  --p1: #ff3347; --p2: #ff9a1f; --p3: #f2d00a; --p4: #3fbf5c;
  --police: #3d8bff; --fire: #ff4a36; --ems: #17c49b; --apd: #a68bff; --wx: #ff8a00;

  --st-pending: #f2d00a; --st-disp: #3d8bff; --st-enrt: #ff9a1f; --st-scene: #2ec956; --st-clear: #6e8197;
  --pending-row: rgba(242,208,10,.10);
  --pending-row-line: rgba(242,208,10,.35);

  --lcd-bg: #08140c; --lcd-line: #1b3a24; --lcd-text: #7dffa4; --lcd-dim: #2f6b43; --lcd-glow: rgba(125,255,164,.35);

  --tile-ink: #fff;
  --shadow: 0 10px 40px rgba(0,0,0,.55);
  --map-filter: none;
  color-scheme: dark;
}
[data-theme="day"] {
  --bg: #b9c0c8;
  --bg2: #d3d8de;
  --panel: #f4f6f8;
  --panel2: #e7ebef;
  --panel3: #dde2e8;
  --line: #b8c1cb;
  --line2: #9aa6b3;
  --text: #0d141b;
  --text2: #2c3a48;
  --dim: #5b6b7c;
  --accent: #0a6fd6;
  --accent-ink: #fff;
  --sel: #2f7de1;
  --sel-line: #0a5bbf;
  --row-alt: rgba(0,0,0,.025);
  --hover: rgba(10,111,214,.08);
  --p1: #e0001b; --p2: #e57600; --p3: #c9a800; --p4: #1f9a3c;
  --police: #0a5fd6; --fire: #e02a12; --ems: #00977a; --apd: #6d4bd8; --wx: #d66b00;
  --st-pending: #e2c000; --st-disp: #0a5fd6; --st-enrt: #e57600; --st-scene: #1f9a3c; --st-clear: #7b8794;
  --pending-row: #fff27a;
  --pending-row-line: #d9c300;
  --lcd-bg: #c8d6b0; --lcd-line: #93a37a; --lcd-text: #1d2a10; --lcd-dim: #66764d; --lcd-glow: transparent;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 13px/1.35 "Barlow", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--panel); }
::-webkit-scrollbar-thumb { background: var(--line2); border: 2px solid var(--panel); border-radius: 6px; }

#app {
  height: 100vh;
  display: grid;
  grid-template-rows: 54px 64px 62px minmax(0,1fr) 28px;
  grid-template-columns: minmax(0, 1fr);   /* long ticker / banner text must never widen the page */
}
#app > * { min-width: 0; }
.fk-ticker { min-width: 0; overflow: hidden; }

/* ============================== DIVISION BOARD ============================== */
.divbar {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; padding: 5px 6px 0;
  background: var(--bg2);
}
.dtile {
  position: relative; min-width: 0; padding: 4px 7px 5px 9px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(var(--panel3), var(--panel)); border: 1px solid var(--line2); border-left: 5px solid var(--dc);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; user-select: none;
}
.dtile:hover { border-color: var(--dc); }
.dtile.sel { background: color-mix(in srgb, var(--dc) 22%, var(--panel)); box-shadow: inset 0 0 0 1px var(--dc); }
.dtile.hot { animation: tilehot 1.6s infinite; }
@keyframes tilehot { 50% { box-shadow: inset 0 0 0 1px var(--p1), 0 0 12px rgba(255,51,71,.35); } }
.dtile.k-fire { --dc: var(--fire); } .dtile.k-ems { --dc: var(--ems); } .dtile.k-apd { --dc: var(--apd); }
.dt-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.dt-top b { font: 700 16px/1 "Barlow Condensed"; letter-spacing: .06em; }
.dt-rx { font: 700 9px/1 "JetBrains Mono"; padding: 2px 4px; border-radius: 2px; color: var(--dim); border: 1px solid var(--line2); white-space: nowrap; }
.dt-rx.recent { color: var(--st-scene); border-color: var(--st-scene); }
.dt-rx.live { color: #001a08; background: #2ee66b; border-color: #2ee66b; animation: blink .6s infinite; }
.dt-nums { display: flex; gap: 8px; font: 600 8.5px/1 "Barlow Condensed"; letter-spacing: .1em; color: var(--dim); padding-right: 44px; overflow: hidden; white-space: nowrap; }
.dtile:not(:has(.dt-mon)) .dt-nums { padding-right: 0; }
.dt-nums span { display: flex; align-items: baseline; gap: 2px; }
.dt-nums em { font: 700 14px/1 "JetBrains Mono"; font-style: normal; color: var(--text); }
.dt-nums .p1 em { color: var(--p1); } .dt-nums .pend em { color: var(--st-pending); }
.dt-load { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.dt-load i { display: block; height: 100%; background: var(--dc); }
.dt-mon {
  position: absolute; right: 4px; bottom: 7px; height: 16px; padding: 0 4px; border-radius: 2px;
  font: 700 8.5px/1 "JetBrains Mono"; border: 1px solid var(--line2); background: var(--panel2); color: var(--dim);
}
.dt-mon.on { background: #1f9a3c; border-color: #43d466; color: #fff; }
.dt-mon:hover { border-color: var(--accent); color: var(--text); }

/* ============================== CRITICAL BANNER ============================== */
.critbar {
  position: fixed; z-index: 1700; left: 6px; right: 6px; top: 186px; height: 40px;
  display: flex; align-items: center; gap: 10px; padding: 0 8px 0 0; border-radius: 3px; overflow: hidden;
  background: #2a050b; border: 2px solid #ff3347; box-shadow: 0 8px 30px rgba(255,0,30,.35);
  animation: critpulse 1s infinite;
}
@keyframes critpulse { 50% { background: #4a0812; } }
.cb-flash { align-self: stretch; display: grid; place-items: center; padding: 0 14px; background: #ff3347; color: #fff; font: 700 15px/1 "Barlow Condensed"; letter-spacing: .14em; white-space: nowrap; }
.cb-text { flex: 1; min-width: 0; color: #ffe1e5; font: 700 14px/1.1 "JetBrains Mono"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-btn { height: 28px; padding: 0 14px; border-radius: 3px; border: 1px solid #ff6b7a; background: transparent; color: #fff; font: 700 12.5px/1 "Barlow Condensed"; letter-spacing: .12em; }
.cb-ack { background: #ff3347; }

.aflash { position: fixed; inset: 0; z-index: 1650; pointer-events: none; }
.af-police { animation: afPolice .5s steps(1) infinite; }
.af-fire { animation: afFire .5s steps(1) infinite; }
.af-ems { animation: afEms .5s steps(1) infinite; }
@keyframes afPolice { 0% { box-shadow: inset 0 0 0 10px #ff2238, inset 0 0 160px rgba(255,34,56,.45); } 50% { box-shadow: inset 0 0 0 10px #2f6bff, inset 0 0 160px rgba(47,107,255,.45); } }
@keyframes afFire { 0% { box-shadow: inset 0 0 0 10px #ff2a12, inset 0 0 160px rgba(255,42,18,.5); } 50% { box-shadow: inset 0 0 0 10px #ffb000, inset 0 0 160px rgba(255,176,0,.35); } }
@keyframes afEms { 0% { box-shadow: inset 0 0 0 10px #17c49b, inset 0 0 160px rgba(23,196,155,.4); } 50% { box-shadow: inset 0 0 0 10px #ff2238, inset 0 0 160px rgba(255,34,56,.35); } }

/* PulsePoint view (spans call queue + map; radio stays visible) */
.workspace { position: relative; }
.pp-view { position: absolute; z-index: 720; top: 5px; bottom: 5px; left: 5px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.pp-head { gap: 10px; height: 38px; border-left: 4px solid #e0203f; }
.pp-live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e0203f; box-shadow: 0 0 8px #e0203f; margin-right: 4px; animation: blink 1.6s infinite; }
.pp-sub { font: 600 11px/1 "JetBrains Mono"; color: var(--dim); letter-spacing: 0; margin-left: 6px; }
.pp-head .viewsw button { height: 26px; }
.pp-agencies { flex: 1; min-width: 0; font: 600 10px/1 "JetBrains Mono"; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; letter-spacing: 0; }
.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; background: linear-gradient(#c8102e, #9a0c23); color: #fff; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .12em; flex: none; }
.pp-bar .btn-sm { height: 24px; background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.35); color: #fff; }
.pp-btns { display: inline-flex; gap: 4px; }
.pp-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pp-stage iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
.pp-setup { flex: none; padding: 10px 12px; background: var(--panel2); border-bottom: 2px solid #c8102e; font: 500 12px/1.4 "Barlow"; color: var(--text2); }
.pps-title { font: 700 12.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--text); margin-bottom: 6px; }
.pp-setup ol { margin: 0 0 8px; padding-left: 18px; }
.pp-setup li { margin-bottom: 3px; }
.pp-setup b { color: var(--text); }
.pps-row { display: flex; gap: 6px; }
.pps-row input { flex: 1; height: 30px; padding: 0 8px; font: 500 11.5px/1 "JetBrains Mono"; }
.pps-skip { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--dim); font: 500 11px/1 "Barlow"; text-decoration: underline; }
.tab-pp.active { box-shadow: inset 0 3px 0 #e0203f; }
#queueTabs { overflow-x: auto; scrollbar-width: none; }
#queueTabs::-webkit-scrollbar { display: none; }
#queueTabs .tab { padding: 0 8.5px; flex: none; }
.fb-stats { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-left: 1px solid rgba(255,255,255,.08); font: 600 10.5px/1 "JetBrains Mono"; color: #8fa2b5; white-space: nowrap; }
.fb-stats b { color: #fff; }
.fb-stats .c { color: #ff6b7a; }
.keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font: 500 12.5px/1.3 "Barlow"; }
.key-row kbd { min-width: 56px; text-align: center; padding: 3px 6px; border-radius: 3px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--panel2); font: 700 11px/1 "JetBrains Mono"; color: var(--text); }
.tab-pp { color: #ff7a8c; }

/* logon screen */
.logon { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 35%, #12233a 0%, #070b10 70%); }
.logon::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
.logon.out { animation: lgout .35s ease-in forwards; }
@keyframes lgout { to { opacity: 0; transform: scale(1.02); visibility: hidden; } }
.lg-card { position: relative; width: min(520px, 100%); padding: 22px 24px 18px; border-radius: 6px; background: linear-gradient(#111b26, #0c131b); border: 1px solid #2d3f53; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); color: #dfe8f1; }
.lg-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #223142; margin-bottom: 14px; }
.lg-head .sb-shield { width: 44px; height: 44px; }
.lg-title { font: 700 30px/1 "Barlow Condensed"; letter-spacing: .08em; }
.lg-title span { color: #38c6ff; }
.lg-sub { font: 600 11px/1 "Barlow Condensed"; letter-spacing: .2em; color: #7f93a8; margin-top: 5px; }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lg-grid input { background: #070b10 !important; color: #fff !important; font: 700 15px/1 "JetBrains Mono" !important; letter-spacing: .06em; }
.lg-checks { margin: 4px 0 14px; border: 1px solid #223142; border-radius: 3px; background: #070b10; padding: 6px 10px; font: 600 12px/1.9 "JetBrains Mono"; }
.lg-check { display: flex; justify-content: space-between; gap: 10px; }
.lg-check span:last-child { font-weight: 700; }
.lg-check .ok { color: #2ee66b; } .lg-check .wait { color: #38c6ff; } .lg-check .err { color: #ffb020; }
.lg-btn { width: 100%; height: 52px; border-radius: 4px; border: 1px solid #43d466; background: linear-gradient(#2dbb56, #1b8d3c); color: #fff; font: 700 20px/1 "Barlow Condensed"; letter-spacing: .2em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 0 24px rgba(46,201,86,.25); }
.lg-btn:hover { filter: brightness(1.1); }
.lg-foot { margin-top: 10px; text-align: center; font: 500 11px/1.3 "Barlow"; color: #6e8197; }
.inc-notes { margin-top: 8px; }
.inc-notes label { display: block; font: 700 9.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim); margin-bottom: 4px; }
.inc-notes textarea { width: 100%; height: 54px; padding: 6px 8px; font: 500 12px/1.35 "JetBrains Mono"; resize: vertical; }

.wx-risk { display: inline-block; margin-left: 4px; padding: 1px 4px; border-radius: 2px; font: 700 9px/1.1 "JetBrains Mono"; letter-spacing: 0; color: #9fb3c6; border: 1px solid #2d3f53; }
.wx-risk.r-TSTM { color: #0b1118; background: #c1e9c1; border-color: #55bb55; }
.wx-risk.r-MRGL { color: #fff; background: #66a366; border-color: #005500; }
.wx-risk.r-SLGT { color: #0b1118; background: #ffe066; border-color: #dd9f00; }
.wx-risk.r-ENH { color: #0b1118; background: #ffa366; border-color: #ff6600; }
.wx-risk.r-MDT { color: #fff; background: #e06666; border-color: #cd0000; animation: blink 1s infinite; }
.wx-risk.r-HIGH { color: #fff; background: #ee99ee; border-color: #cc00cc; animation: blink .6s infinite; }
.al-card.spc { border-left-color: #66a366; }
.al-card.spc.r-SLGT { border-left-color: #ffe066; } .al-card.spc.r-ENH { border-left-color: #ffa366; } .al-card.spc.r-MDT, .al-card.spc.r-HIGH { border-left-color: #ff3347; }
.al-card.spc.r-NONE { border-left-color: var(--line2); }
.hud-btn.wxb.active { background: #7a5a00; border-color: #ffc61a; }

/* ============================== WEATHER CHIP ============================== */
.sb-wx { flex-direction: column; justify-content: center; align-items: flex-start; min-width: 104px; }
.wx-v { font: 700 16px/1.1 "JetBrains Mono"; color: #fff; margin-top: 2px; }
.wx-s { font: 600 9.5px/1.1 "Barlow Condensed"; letter-spacing: .1em; color: #8195aa; max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================== MAP EXTRAS ============================== */
.div-lbl { transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 3px; background: rgba(8,14,20,.72); border: 1px solid rgba(255,255,255,.12); border-left: 3px solid var(--dc); color: #fff; white-space: nowrap; pointer-events: none; opacity: .9; }
.div-lbl b { font: 700 12.5px/1 "Barlow Condensed"; letter-spacing: .1em; color: var(--dc); }
.div-lbl small { font: 600 9.5px/1 "JetBrains Mono"; color: #9fb3c6; }
.div-lbl span { font: 700 11px/1 "JetBrains Mono"; color: #ffcf4a; }
.div-lbl.sel { background: #1d5fbf; border-color: #7fb6ff; }
.z-far .mk:not(.sel) .mk-lbl, .z-far .ac:not(.ac-ps) span { display: none; }
.z-far .div-lbl small { display: none; }
.z-mid .sta-ico { transform: scale(.8); }
.sta-ico { width: 30px; height: 16px; display: grid; place-items: center; border-radius: 2px; background: #5a0d08; border: 1px solid #ff6a55; color: #ffd9d3; font: 700 9.5px/1 "JetBrains Mono"; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ac { position: relative; width: 26px; height: 26px; }
.ac svg { width: 26px; height: 26px; fill: #b9c8d8; stroke: #0b1118; stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.ac-rotor svg { fill: #ffd24a; stroke: #ffd24a; }
.ac-rotor svg circle { fill: #ffd24a; stroke: #0b1118; }
.ac-ps svg, .ac-ps svg circle { fill: #ff3df2; stroke: #ff3df2; }
.ac-ps.ac-med svg, .ac-ps.ac-med svg circle { fill: #2fe6c8; stroke: #2fe6c8; }
.ac-ps.ac-news svg, .ac-ps.ac-news svg circle { fill: #9fb3c6; stroke: #9fb3c6; }
.ac-ps svg circle, .ac-rotor svg circle { stroke: #0b1118; }
.ac-emer svg { fill: #ff3347; animation: blink .6s infinite; }
.ac span { position: absolute; left: 26px; top: 0; white-space: nowrap; font: 700 9.5px/1.15 "JetBrains Mono"; color: #fff; background: rgba(0,0,0,.65); padding: 2px 4px; border-radius: 2px; pointer-events: none; }
.ac span i { font-style: normal; color: #ff8cf8; }
.ac-med span i { color: #6ff5df; }
.lg-approx { background: transparent; border: 2px dashed #9fb3c6; }
.lg-air { background: #ff3df2; border-radius: 2px; }
.mk.approx .dot { background: transparent !important; border-style: dashed; border-width: 2px; }
.mk.approx.mk-police .dot { border-color: #3d8bff; } .mk.approx.mk-fire .dot { border-color: #ff4a36; } .mk.approx.mk-ems .dot { border-color: #17c49b; }

/* ============================== INCIDENT BOARD (F2) ============================== */
.center-col { position: relative; }
.board { position: absolute; inset: 0; z-index: 700; }
.board-tools { display: flex; align-items: center; gap: 10px; }
.board-scroll { flex: 1; overflow: auto; min-height: 0; }
table.cad { width: 100%; border-collapse: collapse; font: 600 12px/1.25 "JetBrains Mono"; }
table.cad th {
  position: sticky; top: 0; z-index: 1; text-align: left; padding: 7px 8px; white-space: nowrap; cursor: pointer;
  font: 700 11px/1 "Barlow Condensed"; letter-spacing: .12em; color: var(--text2);
  background: linear-gradient(var(--panel3), var(--panel2)); border-bottom: 2px solid var(--line2); border-right: 1px solid var(--line);
}
table.cad th.sorted { color: var(--accent); }
table.cad td { padding: 6px 8px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.cad tr { cursor: pointer; }
table.cad tbody tr:nth-child(even) { background: var(--row-alt); }
table.cad tbody tr:hover { background: var(--hover); }
table.cad tr.pending td { background: var(--pending-row); }
[data-theme="day"] table.cad tr.pending td { color: #111; }
table.cad tr.sel td { background: var(--sel) !important; color: #fff; }
table.cad tr.crit td:first-child { box-shadow: inset 4px 0 0 var(--p1); }
table.cad .pcell { font-weight: 700; text-align: center; color: #fff; }
table.cad .pc-1 { background: var(--p1); } table.cad .pc-2 { background: var(--p2); } table.cad .pc-3 { background: var(--p3); color: #1a1500; } table.cad .pc-4 { background: var(--p4); }
table.cad .cat { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* ============================== INCIDENT RADIO LINK ============================== */
.rlink { border-bottom: 1px solid var(--line); }
.rl-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; flex-wrap: wrap; }
.rl-name { flex: 1; min-width: 0; font: 700 12.5px/1.2 "Barlow Condensed"; letter-spacing: .08em; color: var(--st-scene); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-tx { display: grid; grid-template-columns: 62px minmax(0,1fr) 34px; gap: 6px; align-items: center; padding: 4px 10px; font: 500 11px/1.25 "JetBrains Mono"; border-top: 1px dashed var(--line); cursor: pointer; }
.rl-tx:hover { background: var(--hover); }
.rl-tx .t { color: var(--dim); }
.rl-tx .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-tx .l { text-align: right; color: var(--text2); }
.rl-empty { padding: 6px 10px 8px; font: 500 11px/1.3 "JetBrains Mono"; color: var(--dim); }

/* radio log division badge + presets */
.divb { display: inline-block; font: 700 9px/1 "JetBrains Mono"; padding: 2px 3px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; color: #0b1118; }
.sl-presets { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 0; flex: none; max-height: 150px; overflow-y: auto; }
.pr-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pr-row .lbl { min-width: 70px; }
.preset.ag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.preset.ag:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.preset i { font: 700 9px/1 "JetBrains Mono"; font-style: normal; color: var(--dim); }
.sl-presets .lbl { font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim); margin-right: 2px; }
.preset { height: 26px; padding: 0 9px; border-radius: 3px; border: 1px solid var(--st-scene); background: color-mix(in srgb, var(--st-scene) 12%, transparent); color: var(--text); font: 700 11px/1 "Barlow Condensed"; letter-spacing: .08em; }
.preset:hover { background: color-mix(in srgb, var(--st-scene) 25%, transparent); }
.air-row { display: grid; grid-template-columns: 74px minmax(0,1fr) 64px; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); font: 500 11.5px/1.25 "JetBrains Mono"; cursor: pointer; }
.air-row:hover { background: var(--hover); }
.air-row b { font: 700 12.5px/1.1 "Barlow Condensed"; letter-spacing: .05em; }
.air-row .tag { font: 700 9.5px/1 "JetBrains Mono"; padding: 2px 4px; border-radius: 2px; background: #ff3df2; color: #200020; }
.air-row .tag.med { background: #2fe6c8; color: #00201b; } .air-row .tag.rot { background: #ffd24a; color: #201800; } .air-row .tag.news { background: #9fb3c6; color: #0b1118; }
.critchip { color: #fff !important; background: var(--p1); border-color: var(--p1) !important; }
.critchip.wf { background: #ff6a00; border-color: #ffb020 !important; animation: blink 1s infinite; }
.uhome { font: 600 10px/1 "JetBrains Mono"; color: var(--dim); }

/* ============================== STATUS BAR ============================== */
.statusbar {
  display: flex; align-items: stretch; gap: 0;
  background: linear-gradient(#121b25, #0c131b);
  border-bottom: 1px solid var(--line);
}
[data-theme="day"] .statusbar { background: linear-gradient(#2a3644, #1d2833); color: #e9eef3; }
.statusbar > * { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid rgba(255,255,255,.07); }
.sb-brand { gap: 10px; min-width: 250px; }
.sb-shield { width: 30px; height: 30px; fill: none; stroke: #38c6ff; stroke-width: 2.3; }
.sb-shield circle { fill: #38c6ff; stroke: none; }
.sb-title { font: 700 19px/1 "Barlow Condensed", sans-serif; letter-spacing: .06em; color: #eef4fa; }
.sb-title span { color: #38c6ff; }
.sb-sub { font: 600 9.5px/1 "Barlow Condensed"; letter-spacing: .18em; color: #7f93a8; margin-top: 4px; }
.sb-unit { flex-direction: column; justify-content: center; align-items: flex-start; }
.sb-label { font: 600 9.5px/1 "Barlow Condensed"; letter-spacing: .16em; color: #7f93a8; }
.sb-value { font: 700 17px/1.1 "JetBrains Mono"; color: #fff; margin-top: 3px; }
.sb-status { gap: 6px; }
.stat-btn {
  height: 36px; min-width: 74px; padding: 0 10px;
  font: 700 13px/1 "Barlow Condensed"; letter-spacing: .08em;
  border: 1px solid rgba(255,255,255,.14); border-radius: 3px;
  background: #1a2531; color: #8fa2b5;
}
.stat-btn.on[data-status="AVAIL"]   { background: #1f9a3c; color: #fff; border-color: #43d466; box-shadow: 0 0 0 1px #0a3d17 inset, 0 0 14px rgba(46,201,86,.35); }
.stat-btn.on[data-status="MONITOR"] { background: #0a6fd6; color: #fff; border-color: #4fa3ff; box-shadow: 0 0 14px rgba(61,139,255,.35); }
.stat-btn.on[data-status="BUSY"]    { background: #e57600; color: #fff; border-color: #ffab52; box-shadow: 0 0 14px rgba(255,154,31,.35); }
.stat-btn.on[data-status="OOS"]     { background: #b3001a; color: #fff; border-color: #ff4d61; box-shadow: 0 0 14px rgba(255,51,71,.35); }
.sb-counts { gap: 4px; }
.cnt { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 50px; height: 40px; border-radius: 3px; background: #0a1017; border: 1px solid rgba(255,255,255,.07); }
.cnt b { font: 700 18px/1 "JetBrains Mono"; color: #fff; }
.cnt span { font: 600 9.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: #8195aa; margin-top: 3px; }
.cnt-p1 b { color: #ff5466; } .cnt-pd b { color: #5aa0ff; } .cnt-fd b { color: #ff6a55; } .cnt-ems b { color: #2fdcb0; } .cnt-wx b { color: #ffa53a; }
.cnt-p1.hot { background: #3a0710; border-color: #ff3347; animation: hotpulse 1.4s infinite; }
@keyframes hotpulse { 50% { box-shadow: 0 0 14px rgba(255,51,71,.55); } }
.sb-feeds { gap: 4px; flex: 1; flex-wrap: wrap; align-content: center; min-width: 0; }
.feed {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
  font: 600 10.5px/1 "JetBrains Mono"; color: #9db0c3;
  background: #0a1017; border: 1px solid rgba(255,255,255,.07); border-radius: 2px; white-space: nowrap;
}
.feed i { width: 7px; height: 7px; border-radius: 50%; background: #4b5a69; }
.feed.ok i { background: #2ee66b; box-shadow: 0 0 6px #2ee66b; }
.feed.warn i { background: #ffb020; box-shadow: 0 0 6px #ffb020; }
.feed.err i { background: #ff3347; box-shadow: 0 0 6px #ff3347; }
.feed.busy i { background: #38c6ff; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sb-right { gap: 6px; border-right: 0; margin-left: auto; }
.icon-btn { width: 36px; height: 36px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); background: #18222d; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: #b9c8d8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: #223040; }
.icon-btn.off svg { stroke: #5a6b7c; }
.icon-btn.off { background: #2a1216; border-color: #5a1f27; }
.sb-clock { text-align: right; padding-left: 8px; }
#clockTime { font: 700 22px/1 "JetBrains Mono"; color: #fff; letter-spacing: .03em; }
#clockDate { font: 600 10.5px/1 "Barlow Condensed"; letter-spacing: .16em; color: #8195aa; margin-top: 3px; }

/* ============================== COMMAND TILES ============================== */
.cmdbar {
  display: flex; gap: 4px; padding: 5px 6px;
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.tile {
  position: relative; flex: 1 1 0; min-width: 0;
  border: 1px solid rgba(0,0,0,.35); border-radius: 3px;
  font: 700 12.5px/1.05 "Barlow Condensed"; letter-spacing: .06em; text-align: center;
  color: var(--tile-ink); padding: 12px 4px 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 0 rgba(0,0,0,.25);
  transition: filter .12s, transform .06s;
}
.tile b { position: absolute; top: 3px; left: 5px; font: 700 9px/1 "JetBrains Mono"; opacity: .75; letter-spacing: 0; }
.tile:hover { filter: brightness(1.12); }
.tile:active { transform: translateY(1px); filter: brightness(.95); }
.tile.active { outline: 2px solid #fff; outline-offset: -4px; }
.t-blue   { background: linear-gradient(#2f80e8, #1d5fbf); }
.t-red    { background: linear-gradient(#e94b5b, #c22536); }
.t-slate  { background: linear-gradient(#4b5d70, #364657); }
.t-teal   { background: linear-gradient(#18a6a0, #0d7c78); }
.t-green  { background: linear-gradient(#2dbb56, #1b8d3c); }
.t-amber  { background: linear-gradient(#f0a419, #c97f00); color: #1b1200; }
.t-violet { background: linear-gradient(#8a68f0, #6646c9); }
.t-cyan   { background: linear-gradient(#22b8e6, #0b8cb8); }
.t-orange { background: linear-gradient(#ff7b2e, #d4570f); }
[data-theme="day"] .t-slate { background: linear-gradient(#8996a4, #6b7886); }
.tile.lit { box-shadow: 0 0 0 2px #fff inset, 0 0 16px rgba(255,255,255,.3); }
.sync {
  flex: 0 0 210px; display: flex; flex-direction: column; border-radius: 3px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.35);
}
.sync-top { flex: 1; display: grid; place-items: center; font: 700 14px/1 "Barlow Condensed"; letter-spacing: .12em; background: #4b5d70; color: #fff; }
.sync-bot { height: 20px; display: grid; place-items: center; font: 600 10.5px/1 "JetBrains Mono"; background: #0a1017; color: #9fb3c6; }
[data-theme="day"] .sync-bot { background: #2a3644; color: #e8eef4; }
.sync.ok .sync-top { background: linear-gradient(#31c45c, #1c9a40); }
.sync.warn .sync-top { background: linear-gradient(#f0a419, #c97f00); color: #1b1200; }
.sync.err .sync-top { background: linear-gradient(#e94b5b, #b31c2c); }

/* ============================== WORKSPACE ============================== */
.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: var(--qcol, minmax(380px, 27%)) minmax(0, 1fr) var(--rcol, minmax(350px, 25%));
  gap: 5px; padding: 5px;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 10px; flex: none;
  background: linear-gradient(var(--panel3), var(--panel2)); border-bottom: 1px solid var(--line);
}
.panel-title { font: 700 14px/1 "Barlow Condensed"; letter-spacing: .12em; }
.pt-ico { color: var(--accent); font-size: 10px; vertical-align: 2px; margin-right: 4px; }
.panel-meta { font: 600 11px/1 "JetBrains Mono"; color: var(--dim); }

.tabs { display: flex; gap: 2px; padding: 4px 4px 0; background: var(--panel2); border-bottom: 1px solid var(--line); flex: none; }
.tab {
  height: 30px; padding: 0 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 3px 3px 0 0;
  background: var(--panel3); color: var(--text2); font: 700 12.5px/1 "Barlow Condensed"; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); border-color: var(--line2); box-shadow: inset 0 3px 0 var(--accent); }
.tabs-spacer { flex: 1; }
.tab-collapse { padding: 0 10px; }
.badge { min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--p1); color: #fff; font: 700 10px/16px "JetBrains Mono"; }

.search { position: relative; flex: 1; min-width: 120px; }
.search svg { position: absolute; left: 8px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); fill: none; stroke: var(--dim); stroke-width: 2; }
.search input { width: 100%; height: 30px; padding: 0 8px 0 28px; }
input[type="search"], input:not([type]), input[type="number"], select, textarea {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 3px; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
select { height: 30px; padding: 0 6px; font: 600 11.5px/1 "Barlow Condensed"; letter-spacing: .06em; }

/* ============================== QUEUE ============================== */
.queue-tools { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.queue-tools .search { flex-basis: 100%; }
.queue-tools select { flex: 1; }
.queue-head, .qrow {
  display: grid; grid-template-columns: 46px minmax(0,1fr) 62px 54px; align-items: center;
}
.queue-head {
  height: 24px; padding: 0 8px 0 0; flex: none;
  font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim);
  background: var(--panel2); border-bottom: 1px solid var(--line);
}
.queue-head span:first-child { text-align: center; }
.queue-head span:nth-child(3), .queue-head span:nth-child(4) { text-align: right; padding-right: 2px; }
.queue-list, .alerts-list, .units-list { flex: 1; overflow-y: auto; min-height: 0; outline: none; }
.qrow {
  position: relative; min-height: 50px; padding: 5px 8px 5px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.qrow:nth-child(even) { background: var(--row-alt); }
.qrow:hover { background: var(--hover); }
.qrow.pending { background: var(--pending-row); box-shadow: inset 0 0 0 1px var(--pending-row-line); }
[data-theme="day"] .qrow.pending .q-type, [data-theme="day"] .qrow.pending .q-loc { color: #111; }
.qrow.sel { background: var(--sel) !important; box-shadow: inset 0 0 0 1px var(--sel-line); }
.qrow.sel * { color: #fff !important; }
.qrow.sel .chip { border-color: rgba(255,255,255,.5) !important; }
.qrow.cleared { opacity: .45; }
.qrow.isnew::after { content: "NEW"; position: absolute; right: 8px; top: 5px; font: 700 9px/1 "JetBrains Mono"; color: #fff; background: var(--p1); padding: 2px 4px; border-radius: 2px; animation: blink 1s infinite; }
.q-pri { display: flex; flex-direction: column; align-items: center; gap: 4px; align-self: stretch; justify-content: center; border-left: 5px solid var(--dim); }
.q-pri .pnum { width: 28px; height: 22px; display: grid; place-items: center; border-radius: 2px; font: 700 13px/1 "JetBrains Mono"; color: #fff; background: var(--dim); }
.q-pri .src { font: 700 9px/1 "JetBrains Mono"; color: var(--dim); letter-spacing: .04em; }
.pri-1 .q-pri { border-left-color: var(--p1); } .pri-1 .pnum { background: var(--p1); }
.pri-2 .q-pri { border-left-color: var(--p2); } .pri-2 .pnum { background: var(--p2); }
.pri-3 .q-pri { border-left-color: var(--p3); } .pri-3 .pnum { background: var(--p3); color: #1a1500; }
.pri-4 .q-pri, .pri-5 .q-pri, .pri-9 .q-pri { border-left-color: var(--p4); } .pri-4 .pnum, .pri-5 .pnum, .pri-9 .pnum { background: var(--p4); }
.pri-1 .pnum { animation: hotpulse 1.4s infinite; }
.q-main { min-width: 0; padding-left: 8px; }
.q-type { font: 700 14px/1.15 "Barlow Condensed"; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-type .cat { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.cat-police { background: var(--police); } .cat-fire { background: var(--fire); } .cat-ems { background: var(--ems); } .cat-apd { background: var(--apd); }
.q-loc { font: 500 12px/1.25 "JetBrains Mono"; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.q-sub { display: flex; gap: 6px; margin-top: 3px; font: 600 10.5px/1 "JetBrains Mono"; color: var(--dim); white-space: nowrap; overflow: hidden; }
.q-sub .nogeo { color: var(--p2); }
.q-units { text-align: right; font: 700 15px/1 "JetBrains Mono"; min-width: 0; }
.q-units small { display: block; font: 600 10px/1.2 "JetBrains Mono"; color: var(--dim); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-age { text-align: right; font: 700 12.5px/1 "JetBrains Mono"; color: var(--text2); }
.q-age.old { color: var(--p2); }
.chip {
  display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 2px;
  font: 700 10px/1 "JetBrains Mono"; letter-spacing: .02em; border: 1px solid; white-space: nowrap;
}
.st-pending { color: var(--st-pending); border-color: var(--st-pending); }
.st-disp { color: var(--st-disp); border-color: var(--st-disp); }
.st-enrt { color: var(--st-enrt); border-color: var(--st-enrt); }
.st-scene { color: var(--st-scene); border-color: var(--st-scene); }
.st-clear { color: var(--st-clear); border-color: var(--st-clear); }
.st-delayed { color: var(--apd); border-color: var(--apd); }
[data-theme="day"] .st-pending { color: #6b5b00; background: #fff27a; }
.empty-q { padding: 30px 16px; text-align: center; color: var(--dim); font: 600 13px/1.4 "Barlow Condensed"; letter-spacing: .08em; }

/* units board */
.ugroup-h { position: sticky; top: 0; z-index: 1; padding: 5px 10px; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; background: var(--panel3); border-bottom: 1px solid var(--line); color: var(--text2); }
.urow { display: grid; grid-template-columns: 70px 82px minmax(0,1fr); gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.urow:hover { background: var(--hover); }
.urow .uid { font: 700 13px/1 "JetBrains Mono"; }
.urow .uinc { font: 500 11.5px/1.2 "JetBrains Mono"; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* alerts */
.al-section { padding: 6px 10px; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; background: var(--panel3); border-bottom: 1px solid var(--line); color: var(--text2); position: sticky; top: 0; }
.al-card { padding: 9px 10px 9px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--wx); }
.al-card.sev-Extreme, .al-card.sev-Severe { border-left-color: var(--p1); }
.al-card.sev-Moderate { border-left-color: var(--p2); }
.al-card.sev-Minor { border-left-color: var(--p3); }
.al-card.faa { border-left-color: var(--accent); }
.al-ev { font: 700 14px/1.15 "Barlow Condensed"; letter-spacing: .04em; }
.al-meta { font: 500 11px/1.35 "JetBrains Mono"; color: var(--text2); margin-top: 3px; }
.al-desc { font: 400 12px/1.4 "Barlow"; color: var(--text2); margin-top: 5px; white-space: pre-wrap; max-height: 0; overflow: hidden; transition: max-height .2s; }
.al-card.open .al-desc { max-height: 600px; overflow-y: auto; }
.al-card { cursor: pointer; }
.al-ok { padding: 14px 12px; color: var(--st-scene); font: 600 12px/1.3 "JetBrains Mono"; }

/* ============================== CENTER ============================== */
/* (the incident card takes up to 290px but never more than ~38% — on a short screen the map keeps most of the room) */
.center-col { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) clamp(150px, 38%, 290px); gap: 5px; }
/* a narrow window: the logo would run into the UNIT box */
@media (max-width: 1180px) and (min-width: 761px) { .sb-unit { display: none; } }
.center-col.collapsed { grid-template-rows: minmax(0,1fr) 36px; }
.map-panel { position: relative; }
#map { position: absolute; inset: 0; background: var(--bg2); }
[data-theme="night"] .leaflet-container { background: #0b0f14; }
.leaflet-control-attribution { font: 9.5px/1.3 "Barlow" !important; background: rgba(10,16,23,.7) !important; color: #8b9cb0 !important; }
.leaflet-control-attribution a { color: #9fc4ff !important; }
[data-theme="day"] .leaflet-control-attribution { background: rgba(255,255,255,.8) !important; color: #333 !important; }
.leaflet-control-zoom a { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.map-hud { position: absolute; z-index: 500; top: 8px; left: 56px; right: 8px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.hud-group { display: flex; pointer-events: auto; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hud-btn {
  height: 28px; padding: 0 10px; font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .1em;
  background: rgba(15,23,32,.92); color: #a9b8c8; border: 1px solid #2d3f53; margin-left: -1px;
}
.hud-group .hud-btn:first-child { border-radius: 3px 0 0 3px; margin-left: 0; }
.hud-group .hud-btn:last-child { border-radius: 0 3px 3px 0; }
.hud-btn:hover { color: #fff; }
.hud-btn.active { background: #1d5fbf; color: #fff; border-color: #3b8bff; position: relative; z-index: 1; }
.hud-btn.toggle.active[data-layer="police"] { background: #1a4fa3; }
.hud-btn.toggle.active[data-layer="fire"] { background: #b3261a; border-color: #ff4a36; }
.hud-btn.toggle.active[data-layer="ems"] { background: #0b8c6e; border-color: #17c49b; }
.hud-btn.toggle.active[data-layer="radar"] { background: #1b7a3a; border-color: #2ec956; }
.map-legend {
  position: absolute; z-index: 500; left: 8px; bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 5px 9px; background: rgba(15,23,32,.9); border: 1px solid #2d3f53; border-radius: 3px;
  font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .1em; color: #a9b8c8; max-width: calc(100% - 16px);
}
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg-police { background: #3d8bff; } .lg-fire { background: #ff4a36; } .lg-ems { background: #17c49b; } .lg-apd { background: #a68bff; }
.lg-p1 { background: transparent; border: 2px solid #ff3347; }
.lg-geo { color: #6e8197; font-family: "JetBrains Mono"; letter-spacing: 0; }

/* map markers */
.mk { position: relative; width: 22px; height: 22px; }
.mk .dot {
  position: absolute; inset: 3px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5);
}
.mk.sq .dot { border-radius: 3px; transform: rotate(45deg); inset: 4px; }
.mk-police .dot { background: #3d8bff; } .mk-fire .dot { background: #ff4a36; } .mk-ems .dot { background: #17c49b; } .mk-apd .dot { background: #a68bff; }
.mk.hot::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #ff3347;
  animation: ring 1.6s ease-out infinite;
}
@keyframes ring { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.mk.sel .dot { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--sel-line), 0 0 18px rgba(59,139,255,.9); }
.mk-lbl { position: absolute; left: 24px; top: 2px; white-space: nowrap; font: 700 10px/1 "JetBrains Mono"; color: #fff; background: rgba(0,0,0,.72); padding: 3px 5px; border-radius: 2px; pointer-events: none; }
.leaflet-tooltip.mk-tip { background: #0f1720; color: #dfe8f1; border: 1px solid #2d3f53; border-radius: 3px; font: 600 11.5px/1.35 "JetBrains Mono"; box-shadow: 0 4px 16px rgba(0,0,0,.5); padding: 6px 8px; }
.leaflet-tooltip.mk-tip::before { display: none; }
.mk-tip b { font: 700 13px/1.2 "Barlow Condensed"; letter-spacing: .04em; }

/* detail */
.detail-panel .dtab-body { flex: 1; overflow-y: auto; min-height: 0; }
.empty-state { height: 100%; display: grid; place-content: center; text-align: center; padding: 20px; }
.es-title { font: 700 16px/1 "Barlow Condensed"; letter-spacing: .16em; color: var(--dim); }
.es-sub { margin-top: 8px; color: var(--dim); font-size: 12.5px; }
.inc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 100%; }
.inc-left { padding: 10px 12px; border-right: 1px solid var(--line); min-width: 0; }
.inc-right { display: flex; flex-direction: column; min-width: 0; }
.inc-hdr { display: flex; align-items: flex-start; gap: 10px; }
.inc-pri { flex: none; width: 46px; height: 46px; border-radius: 3px; display: grid; place-items: center; color: #fff; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .08em; text-align: center; }
.inc-pri b { display: block; font: 700 22px/1 "JetBrains Mono"; }
.inc-title { font: 700 21px/1.05 "Barlow Condensed"; letter-spacing: .03em; }
.inc-loc { font: 600 14px/1.3 "JetBrains Mono"; margin-top: 4px; color: var(--accent); }
.inc-actions { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.inc-actions .btn-sm { height: 28px; }
.btn-sm[disabled] { opacity: .4; cursor: not-allowed; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin-top: 10px; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.kv div { background: var(--panel2); padding: 5px 8px; min-width: 0; }
.kv label { display: block; font: 700 9.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim); }
.kv span { display: block; font: 600 12.5px/1.25 "JetBrains Mono"; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv .wide { grid-column: span 2; }
.inc-note { margin-top: 8px; font: 500 11.5px/1.4 "JetBrains Mono"; color: var(--dim); }
.sub-h { height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--text2); background: var(--panel3); border-bottom: 1px solid var(--line); flex: none; }
.utable { width: 100%; border-collapse: collapse; font: 600 12px/1 "JetBrains Mono"; }
.utable td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.utable td:first-child { font-weight: 700; width: 80px; }
.utable td:last-child { text-align: right; color: var(--dim); font-size: 11px; }
.tl { flex: 1; overflow-y: auto; min-height: 60px; }
.tl-row { display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 6px; padding: 4px 10px; font: 500 11.5px/1.35 "JetBrains Mono"; border-bottom: 1px dashed var(--line); }
.tl-row span:first-child { color: var(--dim); }
.tl.near, .tl.prem { flex: none; min-height: 0; max-height: 180px; }
/* fire benchmarks on the call card: timed milestones heard on the fire's channels */
.bench { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.bench-i { display: inline-flex; flex-direction: column; padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; font: 600 10px/1.25 "JetBrains Mono", monospace; letter-spacing: .03em; }
.bench-i i { font-style: normal; color: var(--dim); font-weight: 500; }
.bench-i.b-mayday { border-color: #ff3b3b; background: rgba(255, 59, 59, .18); color: #ff6b6b; animation: benchPulse 1s ease-in-out infinite alternate; }
.bench-i.b-control, .bench-i.b-primary, .bench-i.b-secondary { border-color: rgba(57, 217, 138, .55); }
.bench-i.b-defensive, .bench-i.b-alarm2, .bench-i.b-alarm3 { border-color: rgba(255, 176, 32, .65); }
.bench-i.b-terminated { opacity: .75; }
@keyframes benchPulse { from { box-shadow: 0 0 0 0 rgba(255, 59, 59, .0); } to { box-shadow: 0 0 0 3px rgba(255, 59, 59, .35); } }
.tl.prem .tl-row { grid-template-columns: 86px minmax(0,1fr); }
.tl.near .tl-row { cursor: pointer; }
.inc-units .uchip, .utable td:first-child { cursor: pointer; }
.inc-units .uchip:hover, .utable td:first-child:hover { text-decoration: underline; }
.tl.near .tl-row:hover { background: var(--hover, rgba(127,127,127,.12)); }

.btn-sm, .rbtn {
  height: 30px; padding: 0 11px; border-radius: 3px; border: 1px solid var(--line2);
  background: linear-gradient(var(--panel3), var(--panel2)); color: var(--text);
  font: 700 12px/1 "Barlow Condensed"; letter-spacing: .09em; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-sm:hover, .rbtn:hover { border-color: var(--accent); }
.btn-sm.on { background: #c97f00; border-color: #f0a419; color: #fff; }
.rbtn b { font: 700 9.5px/1 "JetBrains Mono"; opacity: .6; }
.rbtn-primary { background: linear-gradient(#2f80e8, #1d5fbf); border-color: #4b97ff; color: #fff; }
.rbtn-primary.on { background: linear-gradient(#e94b5b, #c22536); border-color: #ff6b7a; }
.rbtn-sm { height: 26px; padding: 0 8px; font-size: 11px; }
.rbtn.on { background: linear-gradient(#f0a419, #c97f00); border-color: #ffc152; color: #1b1200; }

/* log */
.log-list { font: 500 12px/1.3 "JetBrains Mono"; }
.log-row { display: grid; grid-template-columns: 70px 52px minmax(0,1fr); gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.log-row:hover { background: var(--hover); }
.log-row .lt { color: var(--dim); }
.log-row .lk { font-weight: 700; }
.lk-new { color: var(--accent); } .lk-p1 { color: var(--p1); } .lk-clr { color: var(--dim); } .lk-upd { color: var(--p2); } .lk-wx { color: var(--wx); } .lk-sys { color: var(--st-scene); } .lk-emer { color: #fff; background: var(--p1); padding: 0 3px; }

/* ============================== RADIO ============================== */
.rhead {
  margin: 8px; padding: 10px 12px 9px; border-radius: 5px; flex: none;
  background: var(--lcd-bg); border: 2px solid var(--lcd-line);
  box-shadow: inset 0 0 30px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.5);
  color: var(--lcd-text); font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 6px var(--lcd-glow);
  position: relative; overflow: hidden;
}
.rhead::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px); }
.rhead.emer { background: #3a0710; border-color: #ff3347; color: #ffd0d5; --lcd-glow: rgba(255,51,71,.6); animation: hotpulse 1s infinite; }
.rhead-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.rh-sys { font-weight: 700; letter-spacing: .08em; }
.rh-flags { display: flex; gap: 4px; }
.rh-flag { padding: 1px 4px; border: 1px solid var(--lcd-dim); color: var(--lcd-dim); font-size: 9.5px; font-weight: 700; text-shadow: none; }
.rh-flag.on { color: var(--lcd-bg); background: var(--lcd-text); border-color: var(--lcd-text); }
.rh-emer.on { background: #ff3347; border-color: #ff3347; color: #fff; }
.rh-tg { font-size: 23px; font-weight: 700; margin-top: 6px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.rh-desc { font-size: 11.5px; margin-top: 2px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-row { display: flex; justify-content: space-between; margin-top: 7px; font-size: 12.5px; font-weight: 700; }
.rh-unit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; }
.rh-progress { height: 4px; margin-top: 6px; background: var(--lcd-line); border-radius: 2px; overflow: hidden; }
.rh-progress i { display: block; height: 100%; width: 0; background: var(--lcd-text); box-shadow: 0 0 6px var(--lcd-glow); }
.rh-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size: 11px; }
.rh-rx { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.rh-rx i { width: 4px; background: var(--lcd-dim); }
.rh-rx i:nth-child(1) { height: 3px; } .rh-rx i:nth-child(2) { height: 5px; } .rh-rx i:nth-child(3) { height: 7px; } .rh-rx i:nth-child(4) { height: 9px; } .rh-rx i:nth-child(5) { height: 12px; }
.rhead.rx .rh-rx i { background: var(--lcd-text); animation: rxbar .5s infinite alternate; }
.rhead.rx .rh-rx i:nth-child(2) { animation-delay: .1s; } .rhead.rx .rh-rx i:nth-child(3) { animation-delay: .2s; } .rhead.rx .rh-rx i:nth-child(4) { animation-delay: .05s; } .rhead.rx .rh-rx i:nth-child(5) { animation-delay: .15s; }
@keyframes rxbar { to { opacity: .35; } }

.rctl { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 4px; padding: 0 8px; flex: none; }
.rctl .rbtn { height: 38px; justify-content: center; }
.rvol { display: flex; align-items: center; gap: 8px; padding: 8px; flex: none; }
.rvol svg { width: 18px; height: 18px; fill: none; stroke: var(--text2); stroke-width: 1.8; flex: none; }
.rvol input[type=range] { flex: 1; min-width: 60px; accent-color: var(--accent); }
#volVal { font: 600 11px/1 "JetBrains Mono"; width: 22px; color: var(--dim); }
.chk { display: inline-flex; align-items: center; gap: 5px; font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .08em; color: var(--text2); white-space: nowrap; cursor: pointer; }
.chk input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }

.rzone { display: flex; align-items: center; gap: 4px; padding: 0 8px 6px; flex: none; }
.rz-lbl { font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .16em; color: var(--dim); padding-right: 2px; }
.rzone select, .rzone input { flex: 1; min-width: 0; height: 26px; font: 700 12px/1 "JetBrains Mono"; letter-spacing: .04em; color: var(--lcd-text); background: var(--lcd-bg); border-color: var(--lcd-line); }
[data-theme="day"] .rzone select, [data-theme="day"] .rzone input { color: var(--lcd-text); }
.rzone input { padding: 0 8px; }
.sys-strip { display: flex; gap: 4px; padding: 0 8px 8px; flex-wrap: wrap; flex: none; }
.sys-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 3px;
  border: 1px solid var(--line2); background: var(--panel2); font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .08em; color: var(--dim);
}
.sys-chip i { width: 7px; height: 7px; border-radius: 50%; background: #4b5a69; }
.sys-chip.on { color: var(--text); border-color: var(--accent); }
.sys-chip.on.ok i { background: #2ee66b; box-shadow: 0 0 6px #2ee66b; }
.sys-chip.on.err i { background: #ff3347; }
.sys-chip small { font: 600 9.5px/1 "JetBrains Mono"; color: var(--dim); }

.tx-list { flex: 1; overflow-y: auto; min-height: 0; }
.tx {
  display: grid; grid-template-columns: 58px minmax(0,1fr) 40px 22px 16px; gap: 6px; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; font-family: "JetBrains Mono";
}
.tx:hover { background: var(--hover); }
.tx.playing { background: color-mix(in srgb, var(--st-scene) 16%, transparent); box-shadow: inset 4px 0 0 var(--st-scene); }
.tx.played .tx-tg { color: var(--text2); }
.tx.queued { box-shadow: inset 4px 0 0 var(--accent); }
.tx.emer { background: rgba(255,51,71,.14); box-shadow: inset 4px 0 0 var(--p1); }
.tx-time { font-size: 11px; color: var(--dim); }
.tx-tg { font: 700 13.5px/1.15 "Barlow Condensed"; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.tx-tg .sysb { display: inline-block; font: 700 9px/1 "JetBrains Mono"; padding: 2px 3px; border-radius: 2px; background: var(--panel3); color: var(--text2); margin-right: 5px; vertical-align: 1px; }
.tx-sub { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tx-text { margin-top: 3px; font: 500 11.5px/1.3 "Barlow"; color: var(--text); white-space: normal; border-left: 2px solid var(--accent); padding-left: 6px; }
.tx-text.dim { color: var(--dim); border-left-color: var(--line2); font-family: "JetBrains Mono"; font-size: 10px; }
.tx-text.kw { border-left-color: var(--p1); color: #ffd0d5; background: rgba(255,51,71,.1); }
[data-theme="day"] .tx-text.kw { color: #8a0012; }
.rl-tx .n em { display: block; font: 500 11px/1.3 "Barlow"; font-style: normal; color: var(--text); white-space: normal; margin-top: 2px; }
.rl-tx .n em.kw { color: var(--p1); }
.rl-tx .n { white-space: normal; }
#btnStt.on { background: linear-gradient(#2dbb56, #1b8d3c); border-color: #43d466; color: #fff; }
.lk-key { color: #fff; background: #b3001a; padding: 0 3px; }
.divb.ptone { background: #ff3347; color: #fff; animation: blink 1s infinite; }
.divb.agb { background: #2a3a4c; color: #cfe3ff; border: 1px solid #3d5a7a; }
[data-theme="day"] .divb.agb { background: #dbe7f5; color: #0b3c74; }
.fb-sel { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-left: 1px solid rgba(255,255,255,.08); font: 600 10.5px/1 "JetBrains Mono"; color: #9fc4ff; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.fb-sel b { color: #fff; } .fb-sel span { color: #ffb020; }
.resp-lbl { position: absolute; transform: translate(-50%, -150%); white-space: nowrap; font: 700 9.5px/1 "JetBrains Mono"; color: #1b1200; background: #ffb020; padding: 2px 4px; border-radius: 2px; }
table.cad a.addr { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
table.cad tr.sel a.addr { color: #fff; }
.viewsw { display: flex; pointer-events: auto; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.viewsw button { height: 28px; padding: 0 12px; font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .12em; background: rgba(15,23,32,.92); color: #a9b8c8; border: 1px solid #2d3f53; margin-left: -1px; }
.viewsw button:first-child { border-radius: 3px 0 0 3px; margin-left: 0; } .viewsw button:last-child { border-radius: 0 3px 3px 0; }
.viewsw button.on { background: #0a6fd6; color: #fff; border-color: #4fa3ff; position: relative; z-index: 1; }
.viewsw button[data-view="pulse"].on { background: #b3102b; border-color: #ff4d61; }
.viewsw button .ppdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0203f; margin-right: 5px; vertical-align: 0; }
.lk-sta { color: #1b1200; background: #ffb020; padding: 0 3px; }
.lk-crit { color: #fff; background: var(--p1); padding: 0 3px; }
.lk-air { color: #ff8cf8; }
.mk-sta .dot { background: #ffb020; border-radius: 3px; transform: rotate(45deg); inset: 4px; }
.mk-sta.fire .dot { background: #ff4a36; }
.mk-sta::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #ffb020; animation: ring 1.4s ease-out infinite; }
.mk-sta .mk-lbl { background: #7a4a00; }
.tx-len { font-size: 11px; text-align: right; color: var(--text2); }
.tx-star { background: none; border: 0; color: var(--dim); font-size: 15px; padding: 0; }
.tx-star.on { color: #ffc61a; }
.radio-error { margin: 8px; padding: 10px; border: 1px solid var(--p1); border-radius: 3px; background: rgba(255,51,71,.1); font: 500 12px/1.45 "Barlow"; }
.radio-error a { color: var(--accent); }
.radio-error .rbtn { margin-top: 8px; }

/* ============================== FOOTER ============================== */
.footbar { display: flex; align-items: stretch; background: #0a1017; border-top: 1px solid var(--line); color: #c5d3e1; }
[data-theme="day"] .footbar { background: #1d2833; }
.fb-label { display: grid; place-items: center; padding: 0 10px; background: #1d5fbf; color: #fff; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; }
.fk-ticker { flex: 1; overflow: hidden; display: flex; align-items: center; padding: 0 10px; font: 600 11.5px/1 "JetBrains Mono"; white-space: nowrap; }
.fk-ticker span.hot { color: #ff6b7a; }
.fb-right { display: flex; align-items: center; padding: 0 10px; font: 600 9.5px/1 "Barlow Condensed"; letter-spacing: .12em; color: #6e8197; white-space: nowrap; }

/* ============================== MODALS ============================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2000; backdrop-filter: blur(2px); }
.modal {
  position: fixed; z-index: 2001; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1060px, calc(100vw - 32px)); max-height: calc(100vh - 60px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 4px; box-shadow: var(--shadow);
}
#modalSettings { width: min(720px, calc(100vw - 32px)); }
.tone-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 34px; gap: 4px 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel2); }
.tone-map span { font: 600 12px/1.2 "Barlow"; color: var(--text2); }
.tone-map select { height: 28px; width: 100%; }
.tone-map .tplay { height: 28px; width: 34px; padding: 0; justify-content: center; }
#modalLinks { width: min(900px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; background: linear-gradient(#2f80e8, #1d5fbf); color: #fff; border-radius: 3px 3px 0 0; flex: none; }
.modal-title { font: 700 15px/1 "Barlow Condensed"; letter-spacing: .14em; }
.modal-x { width: 30px; height: 30px; border: 0; background: rgba(0,0,0,.2); color: #fff; font-size: 20px; border-radius: 3px; }
.modal-body { padding: 12px; overflow-y: auto; min-height: 0; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex: none; }
.modal-foot .hint { flex: 1; }
.hint { font: 500 12px/1.45 "Barlow"; color: var(--text2); margin: 0 0 10px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; flex: 1; min-width: 0; }
.field label { font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim); }
.field input:not([type=range]), .field select { height: 32px; padding: 0 8px; }
.field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.field-row.wrap { flex-wrap: wrap; gap: 10px 18px; }
.field-row .field { margin-bottom: 0; }
.settings-grid input[type=number] { width: 100%; }

.sl-tools { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; flex: none; }
.seg { display: flex; }
.seg button { height: 30px; padding: 0 10px; border: 1px solid var(--line2); background: var(--panel2); font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .08em; color: var(--text2); margin-left: -1px; }
.seg button:first-child { border-radius: 3px 0 0 3px; } .seg button:last-child { border-radius: 0 3px 3px 0; }
.seg button.on { background: #1d5fbf; color: #fff; border-color: #3b8bff; position: relative; }
.sl-count { font: 600 11px/1 "JetBrains Mono"; color: var(--dim); margin-left: auto; }
.sl-body { flex: 1; overflow-y: auto; min-height: 200px; }
.sl-group { border-bottom: 1px solid var(--line); }
.sl-gh { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--panel2); cursor: pointer; position: sticky; top: 0; z-index: 1; }
.sl-gh .caret { width: 12px; color: var(--dim); }
.sl-gh .gname { font: 700 13px/1 "Barlow Condensed"; letter-spacing: .08em; flex: 1; }
.sl-gh .gcount { font: 600 11px/1 "JetBrains Mono"; color: var(--dim); }
.sl-tgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sl-tg { display: grid; grid-template-columns: 18px 22px minmax(0,1fr); gap: 6px; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); cursor: pointer; }
.sl-tg:hover { background: var(--hover); }
.sl-tg.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sl-tg input { accent-color: var(--accent); margin: 0; }
.sl-tg .star { background: none; border: 0; padding: 0; font-size: 15px; color: var(--dim); }
.sl-tg .star.on { color: #ffc61a; }
.sl-tg .tga { font: 700 12.5px/1.15 "Barlow Condensed"; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-tg .tgd { font: 500 10.5px/1.2 "JetBrains Mono"; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-empty { padding: 30px; text-align: center; color: var(--dim); }
.sl-sys { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; background: linear-gradient(var(--panel3), var(--panel2)); border-bottom: 1px solid var(--line2); border-top: 2px solid var(--accent); font: 600 11.5px/1.2 "Barlow"; color: var(--text2); }
.sl-sys b { font: 700 13px/1 "Barlow Condensed"; letter-spacing: .1em; color: var(--text); }
.sl-sys span { margin-left: auto; font: 700 10.5px/1 "JetBrains Mono"; color: var(--dim); }
.sl-tg .sysb { display: inline-block; font: 700 9px/1 "JetBrains Mono"; padding: 2px 3px; border-radius: 2px; background: var(--panel3); color: var(--text2); margin-right: 5px; vertical-align: 1px; }
.tab-all { color: var(--accent); } .tab-add { color: var(--st-scene); }
#slSysTabs { overflow-x: auto; scrollbar-width: none; }
.br-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.br-row > div { flex: 1; min-width: 0; }
.br-row b { display: block; font: 700 13.5px/1.2 "Barlow Condensed"; letter-spacing: .05em; }
.br-row span { display: block; font: 500 11px/1.3 "Barlow"; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-row em { font: 700 10.5px/1 "JetBrains Mono"; font-style: normal; color: var(--st-scene); }
.br-note { padding: 10px 12px; font: 500 12px/1.45 "Barlow"; color: var(--text2); background: var(--panel2); border-bottom: 1px solid var(--line); }

.local-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
.lr-meter { margin: 4px 0 12px; border: 1px solid var(--line2); border-radius: 3px; background: #05080b; }
.lr-meter canvas { display: block; width: 100%; height: 46px; }
.lr-state { font: 700 12px/1 "JetBrains Mono"; color: var(--dim); }
.lr-state.live { color: var(--st-scene); } .lr-state.rec { color: #fff; background: var(--p1); padding: 4px 6px; border-radius: 2px; animation: blink 1s infinite; }
.lr-clips-head { font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--text2); padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.lr-clips { max-height: 220px; overflow-y: auto; }
.lr-clip { display: grid; grid-template-columns: 72px minmax(0,1fr) 48px auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font: 500 11.5px/1.2 "JetBrains Mono"; }
.lr-clip a { color: var(--accent); font-size: 11px; }
#lrPlan { width: 100%; height: 150px; padding: 8px; font: 500 12px/1.4 "JetBrains Mono"; resize: vertical; margin-bottom: 8px; }
.rbtn-file { position: relative; overflow: hidden; cursor: pointer; }
.rbtn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lr-plan-view { max-height: 240px; overflow-y: auto; font: 500 11.5px/1.3 "JetBrains Mono"; }
.lr-plan-view table { width: 100%; border-collapse: collapse; }
.lr-plan-view td, .lr-plan-view th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.lr-plan-view th { font: 700 10px/1 "Barlow Condensed"; letter-spacing: .12em; color: var(--dim); }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lnk-h { grid-column: 1 / -1; font: 700 11px/1 "Barlow Condensed"; letter-spacing: .16em; color: var(--dim); padding: 6px 0 0; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.lnk { display: block; padding: 9px 10px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel2); text-decoration: none; color: var(--text); border-left: 4px solid var(--accent); }
.lnk:hover { border-color: var(--accent); }
.lnk b { display: block; font: 700 14px/1.1 "Barlow Condensed"; letter-spacing: .04em; }
.lnk span { display: block; font: 500 11px/1.3 "Barlow"; color: var(--text2); margin-top: 3px; }
.lnk.c-police { border-left-color: var(--police); } .lnk.c-fire { border-left-color: var(--fire); } .lnk.c-radio { border-left-color: var(--st-scene); } .lnk.c-wx { border-left-color: var(--wx); }

/* toasts */
.toast-wrap { position: fixed; z-index: 1500; right: calc(max(350px, 25%) + 22px); top: 168px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; min-width: 300px; max-width: 420px; padding: 9px 12px; border-radius: 3px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line2); border-left: 5px solid var(--accent); box-shadow: var(--shadow);
  animation: tin .2s ease-out;
}
.toast.p1 { border-left-color: var(--p1); background: color-mix(in srgb, var(--p1) 14%, var(--panel)); }
.toast.fire { border-left-color: var(--fire); }
.toast b { display: block; font: 700 14px/1.15 "Barlow Condensed"; letter-spacing: .05em; }
.toast span { display: block; font: 500 11.5px/1.3 "JetBrains Mono"; color: var(--text2); margin-top: 3px; }
@keyframes tin { from { transform: translateX(30px); opacity: 0; } }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1500px) {
  .sb-counts .cnt-wx, .sb-sub { display: none; }
  .sb-brand { min-width: 0; }
  .workspace { grid-template-columns: var(--qcol, minmax(340px, 28%)) minmax(0, 1fr) var(--rcol, minmax(320px, 26%)); }
}
@media (max-width: 1500px) {
  .dt-nums span:nth-child(3) { display: none; }
  .sb-wx { min-width: 0; }
}
@media (max-width: 1250px) {
  .divbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #app { grid-template-rows: 54px 64px auto minmax(0,1fr) 28px; }
  .divbar { padding-bottom: 5px; }
  .sb-wx { display: none; }
  .toast-wrap { right: 16px; top: auto; bottom: 40px; }
  .sb-feeds { display: none; }
  .sync { flex-basis: 150px; }
  .tile { font-size: 11px; }
  .workspace { grid-template-columns: minmax(320px, 36%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .queue-panel { grid-row: 1 / 3; }
  .center-col { grid-template-rows: minmax(0,1fr) clamp(140px, 36%, 230px); }
  .kv { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
/* ============================== PHONE (one screen at a time + bottom tab bar) ============================== */
.mnav { display: none; }
@media (max-width: 860px) {
  body { overflow: hidden; }
  #app { height: 100dvh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
  .cmdbar, .footbar { display: none; }
  /* compact status bar */
  .statusbar { flex: none; height: 48px; }
  .statusbar > * { padding: 0 8px; }
  .sb-unit, .sb-status, .sb-feeds, .sb-wx, #btnTheme { display: none !important; }
  .sb-brand { min-width: 0; gap: 6px; }
  .sb-shield { width: 24px; height: 24px; }
  .sb-title { font-size: 16px; }
  .sb-counts { gap: 3px; padding: 0 4px; }
  .cnt { min-width: 36px; height: 36px; }
  .cnt b { font-size: 14px; }
  .cnt span { font-size: 8px; }
  .cnt-wx, .cnt-ems { display: none; }
  .sb-right { gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  #clockTime { font-size: 16px; }
  #clockDate { display: none; }
  /* division board: swipeable strip */
  .divbar { flex: none; display: flex; overflow-x: auto; gap: 4px; padding: 4px 6px; scrollbar-width: none; }
  .divbar::-webkit-scrollbar { display: none; }
  .dtile { flex: 0 0 112px; min-height: 54px; }
  .dt-rx { display: none; }
  .dt-mon { top: 4px; bottom: auto; }
  .dt-nums { gap: 6px; }
  .queue-head, .qrow { grid-template-columns: 42px minmax(0, 1fr) 48px 58px; }
  .q-age { font-size: 11px; }
  .q-units { font-size: 14px; }
  /* workspace shows one screen */
  .workspace { flex: 1; min-height: 0; display: block; padding: 4px 6px calc(62px + env(safe-area-inset-bottom)); }
  .workspace > .queue-panel, .workspace > .center-col, .workspace > .radio-panel { display: none; height: 100%; }
  body[data-mview="calls"] .queue-panel, body[data-mview="alerts"] .queue-panel { display: flex; }
  body[data-mview="map"] .center-col { display: grid; }
  body[data-mview="radio"] .radio-panel { display: flex; }
  .center-col { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .center-col.collapsed { grid-template-rows: minmax(0, 1fr) 36px; }
  .pp-view { left: 6px !important; right: 6px !important; top: 4px; bottom: calc(62px + env(safe-area-inset-bottom)); }
  .pp-agencies, .pp-head .viewsw, .map-hud .viewsw, .board-tools .viewsw { display: none; }
  .pp-head .panel-title { font-size: 12px; }
  /* map HUD becomes one swipeable row */
  .map-hud { left: 48px; right: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .map-hud::-webkit-scrollbar { display: none; }
  .hud-group { flex: none; }
  .map-legend { display: none; }
  /* bigger touch targets in lists */
  .qrow { min-height: 58px; }
  .tab { height: 34px; }
  .tx { padding: 8px; }
  .inc { grid-template-columns: 1fr; }
  .inc-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-grid { grid-template-columns: 1fr; }
  .rctl .rbtn { height: 46px; }
  /* full-screen dialogs */
  .modal { left: 0; top: 0; transform: none; width: 100vw !important; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .modal-head { border-radius: 0; padding-top: env(safe-area-inset-top); height: auto; min-height: 44px; }
  .sl-tgs { grid-template-columns: 1fr; }
  .keys-grid { grid-template-columns: 1fr; }
  .critbar { top: calc(4px + env(safe-area-inset-top)); left: 4px; right: 4px; height: auto; min-height: 44px; flex-wrap: wrap; padding: 4px 6px 4px 0; }
  .cb-text { white-space: normal; font-size: 12px; }
  .toast-wrap { left: 8px; right: 8px; top: auto; bottom: calc(68px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
  /* bottom tab bar */
  .mnav { display: flex; position: fixed; z-index: 1600; left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #0a1017; border-top: 1px solid #223142; }
  [data-theme="day"] .mnav { background: #1d2833; }
  .mnav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: #7f93a8; font: 700 10px/1 "Barlow Condensed"; letter-spacing: .12em; }
  .mnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mnav button.on { color: #fff; box-shadow: inset 0 3px 0 #38c6ff; background: rgba(56,198,255,.08); }
  .mnav button[data-m="pulse"].on { box-shadow: inset 0 3px 0 #e0203f; }
  .mnav b { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff3347; color: #fff; font: 700 9.5px/16px "JetBrains Mono"; }
  .mnav b:empty { display: none; }
}

/* ===================================================================== alert center */
#queueTabs .tab .badge { display: inline-block; margin-left: 3px; height: 15px; min-width: 15px; line-height: 15px; font-size: 9.5px; vertical-align: 1px; }
.ac-head { display: flex; align-items: center; gap: 6px; padding: 7px 8px; background: var(--panel2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.ac-sum { flex: 1; font: 600 11px/1.2 "JetBrains Mono"; color: var(--text2); }
.ac-sum b { color: var(--p1); font-size: 14px; }
.ac-sys { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); font: 700 10px/1.2 "Barlow Condensed"; letter-spacing: .12em; color: var(--dim); }
.ac-sys b { font-family: "JetBrains Mono"; letter-spacing: 0; margin-left: 3px; }
.ac-sys b.ok { color: var(--st-scene); } .ac-sys b.off { color: var(--p2); }
.ac-filters { display: flex; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ac-filters button { flex: none; height: 24px; padding: 0 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); border-radius: 12px; font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .1em; }
.ac-filters button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ac-item { display: flex; gap: 8px; padding: 8px 8px 8px 10px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--line2); cursor: pointer; opacity: .78; }
.ac-item:hover { background: var(--hover); opacity: 1; }
.ac-item.open { opacity: 1; background: color-mix(in srgb, var(--panel2) 70%, transparent); }
.ac-item.sev-crit { border-left-color: var(--p1); } .ac-item.sev-high { border-left-color: var(--p2); } .ac-item.sev-med { border-left-color: var(--p3); } .ac-item.sev-low { border-left-color: var(--line2); }
.ac-item.sev-crit.open { background: rgba(255,51,71,.10); box-shadow: inset 0 0 0 1px rgba(255,51,71,.35); }
.ac-item.sev-high.open { background: rgba(255,154,31,.07); }
.ac-main { flex: 1; min-width: 0; }
.ac-title { font: 700 13px/1.25 "Barlow Condensed"; letter-spacing: .05em; color: var(--text); }
.ac-sev, .ac-cat { display: inline-block; font: 700 9px/1 "JetBrains Mono"; padding: 2px 4px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.ac-sev { background: var(--panel3); color: var(--text2); }
.sev-crit .ac-sev { background: var(--p1); color: #fff; } .sev-high .ac-sev { background: var(--p2); color: #1a0d00; } .sev-med .ac-sev { background: var(--p3); color: #1a1500; }
.ac-cat { border: 1px solid var(--line2); color: var(--dim); }
.acat-fire .ac-cat { color: var(--fire); border-color: var(--fire); } .acat-police .ac-cat { color: var(--police); border-color: var(--police); } .acat-ems .ac-cat { color: var(--ems); border-color: var(--ems); }
.acat-radio .ac-cat { color: var(--accent); border-color: var(--accent); } .acat-rule .ac-cat { color: #ffc61a; border-color: #ffc61a; } .acat-wx .ac-cat { color: var(--wx); border-color: var(--wx); }
.ac-text { margin-top: 3px; font: 500 12px/1.35 "Barlow"; color: var(--text2); word-break: break-word; }
.ac-meta { margin-top: 3px; font: 500 10px/1.2 "JetBrains Mono"; color: var(--dim); }
.ac-acts { display: flex; flex-direction: column; gap: 4px; flex: none; }
.ac-acts .btn-sm { height: 22px; padding: 0 8px; font-size: 10.5px; }
#btnQuiet.on { color: #ffc61a; background: rgba(255,198,26,.12); box-shadow: inset 0 0 0 1px rgba(255,198,26,.5); }
.escchip { color: #1a0d00 !important; background: var(--p2); border-color: var(--p2) !important; }
.radchip { color: var(--accent) !important; border-color: var(--accent) !important; background: transparent; }

/* rules */
.rl-sec { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.rl-h { padding: 8px 10px; background: var(--panel2); border-bottom: 1px solid var(--line); font: 700 13px/1.2 "Barlow Condensed"; letter-spacing: .12em; }
.rl-h span { display: block; margin-top: 2px; font: 500 11.5px/1.3 "Barlow"; letter-spacing: 0; color: var(--dim); }
.rl-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.rl-row b { font: 700 13px/1.2 "Barlow Condensed"; letter-spacing: .06em; }
.rl-row span { flex: 1; min-width: 0; font: 500 11px/1.3 "JetBrains Mono"; color: var(--dim); }
.rl-empty { padding: 9px 10px; color: var(--dim); font: 500 12px/1.3 "Barlow"; border-bottom: 1px solid var(--line); }
.rl-add { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: var(--panel2); }
.rl-add input { flex: 1 1 200px; height: 30px; padding: 0 8px; }
.rl-add select { height: 30px; }
.zone-lbl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 700 10px/1 "JetBrains Mono"; color: #ffc61a; text-shadow: 0 0 3px #000, 0 0 6px #000; pointer-events: none; }
.ctx-pop .leaflet-popup-content-wrapper { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 3px; padding: 0; }
.ctx-pop .leaflet-popup-content { margin: 0; }
.ctx-pop .leaflet-popup-tip { background: var(--panel); }
.ctx { display: flex; flex-direction: column; min-width: 220px; }
.ctx b { padding: 7px 10px; font: 600 11px/1 "JetBrains Mono"; color: var(--dim); border-bottom: 1px solid var(--line); }
.ctx button, .ctx a { text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: 700 12px/1 "Barlow Condensed"; letter-spacing: .08em; text-decoration: none; cursor: pointer; }
.ctx button:hover, .ctx a:hover { background: var(--hover); }

/* settings tabs */
#modalSettings { width: min(780px, calc(100vw - 32px)); }
.set-tabs { padding: 4px 8px 0; }
.set-h { margin: 4px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font: 700 11.5px/1 "Barlow Condensed"; letter-spacing: .16em; color: var(--accent); }
.set-pane .field-row { flex-wrap: wrap; }
.stt-info { margin: -4px 0 12px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel2); font: 500 10.5px/1.5 "JetBrains Mono"; color: var(--dim); }
.stt-info b { color: var(--text); }

/* radio transcripts */
#btnStt.gpu { box-shadow: inset 0 0 0 1px var(--st-scene); color: var(--st-scene); }
.ent-addr { color: #ffd24a; font-weight: 600; border-bottom: 1px dashed rgba(255,210,74,.6); cursor: pointer; }
[data-theme="day"] .ent-addr { color: #8a5a00; border-bottom-color: #8a5a00; }
.ent-unit { color: var(--accent); font-weight: 600; }
.ent-code { font-family: "JetBrains Mono"; font-size: .92em; background: var(--panel3); padding: 0 3px; border-radius: 2px; }
.ent-kw { color: #fff; background: rgba(255,51,71,.55); padding: 0 2px; border-radius: 2px; }
[data-theme="day"] .ent-kw { color: #fff; background: #d0021b; }
.tx-dec, .tx-link { display: inline-block; margin-left: 6px; font: 700 9.5px/1.3 "JetBrains Mono"; padding: 1px 4px; border-radius: 2px; vertical-align: 1px; }
.tx-dec { background: #7a4a00; color: #ffe3b0; }
.tx-link { border: 1px solid var(--accent); color: var(--accent); cursor: pointer; }
.tx-link.pin { border-color: #ffd24a; color: #ffd24a; }
.tx-link:hover { background: var(--hover); }
.tx-sttrow { border-left-color: transparent !important; display: none; }
.tx:hover .tx-sttrow { display: block; }
.tx-stt { border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); font: 700 9.5px/1 "JetBrains Mono"; padding: 3px 6px; border-radius: 2px; cursor: pointer; }
.tx-stt:hover { border-color: var(--accent); color: var(--accent); }
#txList.textlog .tx-text { font-size: 12.5px; }
.mk-sta.rad .dot { background: #38c6ff; }
.mk-sta.rad::before { border-color: #38c6ff; }
.mk-sta.rad .mk-lbl { background: #0a4a66; }
.rl-tx.about { background: rgba(56,198,255,.06); }
.rl-lead { margin: 4px 0 6px; padding: 6px 8px; border: 1px solid rgba(56,198,255,.45); border-radius: 3px; font: 700 11px/1.3 "Barlow Condensed"; letter-spacing: .08em; color: var(--accent); background: rgba(56,198,255,.07); }
.rl-lead b { color: var(--text); }
.rl-playall { color: var(--accent); cursor: pointer; text-decoration: none; }
.rl-playall:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .ac-head { flex-wrap: wrap; }
  .ac-acts { flex-direction: row; align-self: center; }
  .ac-acts .btn-sm { height: 30px; padding: 0 10px; }
  .tx-sttrow { display: block; }
  .rl-add input { flex-basis: 100%; }
  .set-tabs { overflow-x: auto; }
}

@media (max-width: 860px) {
  .critbar { flex-wrap: wrap; gap: 4px 8px; padding: 0 6px 6px 0; }
  .cb-flash { flex: 1 1 100%; align-self: auto; display: block; padding: 5px 10px; font-size: 13px; text-align: left; }
  .cb-text { flex: 1 1 0; padding-left: 8px; font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: normal; }
  .cb-btn { height: 30px; padding: 0 12px; }
}

/* live transcript on the radio display + transcript search */
.rh-text { margin-top: 4px; font: 500 11.5px/1.3 "JetBrains Mono"; color: var(--lcd-text); text-shadow: 0 0 6px var(--lcd-glow); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rh-text.kw { color: #ffb3bb; }
.tx-search { padding: 5px 6px; border-bottom: 1px solid var(--line); background: var(--panel2); flex: none; }
.tx-search input { width: 100%; height: 28px; padding: 0 8px; }

/* settings: long option labels wrap instead of running off the side */
.settings-grid .chk { white-space: normal; align-items: flex-start; line-height: 1.25; }
.settings-grid .chk input { margin-top: 1px; flex: none; }
.settings-grid { overflow-x: hidden; }

/* who was talking */
.spk { display: inline-block; margin-right: 5px; font: 700 9px/1.3 "JetBrains Mono"; padding: 0 4px; border-radius: 2px; border: 1px solid var(--line2); color: var(--text2); vertical-align: 1px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spk.disp { border-color: #2ec956; color: #2ec956; }

.mk-sta.p1 .dot { background: #ff3347; }
.mk-sta.p1::before { border-color: #ff3347; }
.mk-sta.p1 .mk-lbl { background: #8a0012; }

.lg-rad { background: #38c6ff !important; border-radius: 2px !important; transform: rotate(45deg) scale(.85); box-shadow: 4px -4px 0 -1px #ff3347; }

/* ===================================================================== map pop-ups for dispatched calls */
.mping { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; border: 3px solid #38c6ff; pointer-events: none; animation: mping 1.3s ease-out 3; opacity: 0; }
.mping.s-crit { border-color: #ff3347; } .mping.s-high { border-color: #ff9a1f; } .mping.s-med { border-color: #ffd24a; }
@keyframes mping { 0% { transform: scale(.15); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.mpop { position: absolute; left: 0; bottom: 16px; transform: translateX(-50%); min-width: 170px; max-width: 260px; padding: 6px 9px 6px 10px; border-radius: 3px; cursor: pointer;
  background: rgba(10,16,23,.94); border: 1px solid #38c6ff; border-left: 4px solid #38c6ff; color: #e8f1fa; box-shadow: 0 6px 22px rgba(0,0,0,.55); animation: mpopIn .25s ease-out; white-space: normal; }
.mpop::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #38c6ff; }
.mpop b { display: block; font: 700 12px/1.2 "Barlow Condensed"; letter-spacing: .05em; }
.mpop span { display: block; margin-top: 2px; font: 500 11px/1.3 "Barlow"; color: #b9c8d8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mpop i { display: block; margin-top: 3px; font: 700 9px/1 "JetBrains Mono"; font-style: normal; color: #7f93a8; }
.mpop.s-crit { border-color: #ff3347; background: rgba(42,5,11,.95); } .mpop.s-crit::after { border-top-color: #ff3347; }
.mpop.s-high { border-color: #ff9a1f; } .mpop.s-high::after { border-top-color: #ff9a1f; }
.mpop.s-med { border-color: #ffd24a; } .mpop.s-med::after { border-top-color: #ffd24a; }
@keyframes mpopIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* MAP + PULSEPOINT split */
body.pp-split #map { right: calc(50% + 3px); }
body.pp-split .map-hud { right: calc(50% + 8px); }
body.pp-split .map-legend { right: calc(50% + 3px); }
body.pp-split .pp-view { box-shadow: none; }
.viewsw button[data-view="split"].on { background: #7a1430; border-color: #ff4d61; }
@media (max-width: 860px) { .viewsw .vs-split { display: none; } }
body.pp-split .map-hud .hud-group:has([data-base]), body.pp-split .map-hud .hud-group:has(#btnRecenter) { display: none; }

/* ===================================================================== RADIO CONTROL HEAD
   rugged two-way radio styling: dark housing · color display with status bar, zone line and softkey labels ·
   rubber keys underneath. Purely visual — every control keeps its ID and behavior. */
:root, [data-theme="night"] { --lcd-bg: #06111c; --lcd-bg2: #0d2236; --lcd-line: #1b3a57; --lcd-text: #e9f3ff; --lcd-dim: #5b7a97; --lcd-glow: rgba(140,200,255,.16); --lcd-acc: #ffb547; --lcd-rx: #3ee07f; }
[data-theme="day"] { --lcd-bg: #dde8f2; --lcd-bg2: #c6d6e5; --lcd-line: #8ea4b8; --lcd-text: #0b1824; --lcd-dim: #566d82; --lcd-glow: transparent; --lcd-acc: #9a5200; --lcd-rx: #0d8a3c; }
.rhousing { margin: 8px; padding: 6px 8px 8px; border-radius: 13px; flex: none; position: relative;
  background: linear-gradient(#2c3137, #17191d 55%, #0f1114); border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 -2px 0 rgba(0,0,0,.6), 0 3px 12px rgba(0,0,0,.45); }
.rhousing::before { content: ""; position: absolute; inset: 0; border-radius: 13px; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 2px, transparent 2px 5px); }
.rh-bezel-top { display: flex; align-items: center; gap: 8px; padding: 0 4px 6px; position: relative; }
.rh-led { width: 9px; height: 9px; border-radius: 50%; background: #1b2a20; box-shadow: inset 0 1px 2px rgba(0,0,0,.8); flex: none; transition: background .15s, box-shadow .15s; }
.rhousing.rx .rh-led { background: #3ee07f; box-shadow: 0 0 9px #3ee07f; }
.rhousing.emer .rh-led { background: #ff3347; box-shadow: 0 0 10px #ff3347; }
.rh-model { flex: 1; font: 700 9px/1 "JetBrains Mono"; letter-spacing: .24em; color: #7c8792; white-space: nowrap; overflow: hidden; }
.rh-lamp { flex: none; font: 800 9.5px/1 "Barlow Condensed"; letter-spacing: .14em; padding: 4px 8px; border-radius: 5px; color: #3a1a00; background: linear-gradient(#d9730f, #9c4d00);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.6); opacity: .5; }
.rhousing.emer .rh-lamp { opacity: 1; background: linear-gradient(#ff8a1f, #ff4d00); color: #fff; box-shadow: 0 0 14px #ff6a00; animation: hotpulse 1s infinite; }
.rhousing .rhead { margin: 0; border-radius: 6px; border: 2px solid #040506; padding: 6px 9px 0; text-shadow: none;
  background: linear-gradient(var(--lcd-bg2), var(--lcd-bg) 42%); box-shadow: inset 0 0 0 1px var(--lcd-line), inset 0 10px 20px rgba(0,0,0,.30); }
.rhousing .rhead::after { background: linear-gradient(170deg, rgba(255,255,255,.06), transparent 35%); }
.rhousing .rhead.emer { background: linear-gradient(#55101b, #2a060c 45%); border-color: #ff3347; }
.rh-status { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--lcd-line); }
.rh-status .rh-flags { flex: 1; justify-content: center; }
.rh-clock { font: 700 11px/1 "JetBrains Mono"; color: var(--lcd-text); }
.rhousing .rh-flag { border-radius: 2px; border-color: var(--lcd-line); color: var(--lcd-dim); font-size: 9px; }
.rhousing .rh-flag.on { color: var(--lcd-bg); background: var(--lcd-text); border-color: var(--lcd-text); }
.rhousing #rhScan.on { background: var(--lcd-rx); border-color: var(--lcd-rx); color: #02140a; }
.rhousing #rhPri.on, .rhousing #rhHold.on { background: var(--lcd-acc); border-color: var(--lcd-acc); color: #1a0e00; }
.rh-zoneline { display: flex; align-items: center; gap: 6px; margin-top: 5px; font: 700 11px/1 "JetBrains Mono"; min-width: 0; }
.rh-zl { flex: none; background: var(--lcd-acc); color: #1a0e00; padding: 2px 4px; border-radius: 2px; font-size: 10px; }
.rh-zone { color: var(--lcd-acc); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; }
.rh-zoneline:hover .rh-zone { text-decoration: underline; }
.rh-zoneline .rh-sys { color: var(--lcd-dim); font-size: 10px; font-weight: 700; white-space: nowrap; letter-spacing: .04em; }
.rhousing .rh-tg { font: 700 27px/1.1 "Barlow Condensed", sans-serif; letter-spacing: .03em; margin-top: 4px; color: var(--lcd-text); }
.rhousing .rh-desc { color: var(--lcd-dim); opacity: 1; font-size: 11px; }
.rhousing .rh-row { font-size: 12px; }
.rhousing .rh-progress { background: var(--lcd-line); height: 3px; }
.rhousing .rh-progress i { background: var(--lcd-rx); box-shadow: none; }
.rhousing .rh-rx i { background: var(--lcd-line); }
.rhousing .rhead.rx .rh-rx i { background: var(--lcd-rx); }
.rhousing .rh-bottom { margin-top: 5px; color: var(--lcd-dim); }
.rh-soft { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; margin: 6px -9px 0; border-top: 1px solid var(--lcd-line); }
.rh-soft span { text-align: center; font: 700 10px/1 "JetBrains Mono"; letter-spacing: .08em; color: var(--lcd-text); padding: 4px 0 5px; background: rgba(255,255,255,.035); border-right: 1px solid var(--lcd-line); }
.rh-soft span:last-child { border-right: 0; }
.rhousing.scanning .rh-soft span:first-child { color: var(--lcd-rx); }
.rhousing .rctl { padding: 7px 0 0; gap: 5px; }
.rhousing .rctl .rbtn { height: 36px; border-radius: 8px; border: 1px solid #000; color: #e2e8ee; background: linear-gradient(#3d434a, #24282d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 0 #050607; font-size: 12.5px; transition: transform .05s; }
.rhousing .rctl .rbtn:hover { border-color: #000; background: linear-gradient(#474e56, #2a2f35); }
.rhousing .rctl .rbtn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 #050607; }
.rhousing .rctl .rbtn b { color: #8b97a4; opacity: 1; }
.rhousing .rctl .rbtn-primary { background: linear-gradient(#2e8d4c, #1b5f32); }
.rhousing .rctl .rbtn-primary.on { background: linear-gradient(#c7323f, #8c1723); }
.rhousing .rctl .rbtn.on:not(.rbtn-primary) { background: linear-gradient(#e2a019, #a46d00); color: #1b1200; }
.rhousing .rctl .rbtn.on b { color: inherit; opacity: .7; }
@media (max-width: 860px) { .rhousing .rctl .rbtn { height: 46px; } .rhousing .rh-tg { font-size: 30px; } }

/* ===================================================================== incidents built from radio dispatch */
.qrow.radrow { background-image: linear-gradient(90deg, rgba(56,198,255,.07), transparent 40%); }
.qrow.radrow .q-pri .src { color: #38c6ff; font-size: 9px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qrow.homerow { box-shadow: inset 3px 0 0 #ffc61a; }
.chip.radinc { color: #38c6ff; border: 1px dashed #38c6ff; background: rgba(56,198,255,.08); }
.mk.radinc .dot { outline: 2px dashed #38c6ff; outline-offset: 2px; }
.mk.radinc .mk-lbl { background: #0a4a66; }
.inc-note.radnote { color: #9fdcff; border-left: 3px solid #38c6ff; }
[data-theme="day"] .inc-note.radnote { color: #0a4a66; }
[data-theme="day"] .chip.radinc, [data-theme="day"] .qrow.radrow .q-pri .src { color: #0a5f8a; border-color: #0a5f8a; }
.ac-home { color: #ffc61a; }

/* ===================================================================== settings: alerts by department */
.dept-grid { border: 1px solid var(--line); border-radius: 3px; margin-bottom: 12px; overflow: hidden; }
.dg-h, .dg-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .85fr) minmax(0, .85fr); gap: 6px; align-items: center; padding: 5px 8px; }
.dg-h { background: var(--panel3); font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .12em; color: var(--text2); }
.dg-row { border-top: 1px solid var(--line); }
.dg-row:nth-child(odd) { background: var(--row-alt); }
.dg-row b { display: block; font: 700 12.5px/1.15 "Barlow Condensed"; letter-spacing: .06em; }
.dg-row small { display: block; font: 500 10.5px/1.25 "Barlow"; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-row select { width: 100%; height: 26px; font-size: 11px; }
.dg-row.home { box-shadow: inset 3px 0 0 #ffc61a; }
.dg-row.home b { color: #ffc61a; }
[data-theme="day"] .dg-row.home b { color: #8a6400; }
@media (max-width: 640px) { .dg-h { display: none; } .dg-row { grid-template-columns: 1fr 1fr 1fr; } .dg-row > span:first-child { grid-column: 1 / -1; } }

/* ===================================================================== scan list: SCANNING NOW */
.tab-mine.active { box-shadow: inset 0 3px 0 #3ee07f !important; }
.my-sys { align-items: center !important; }
.my-sys .my-mode { margin-left: auto; font: 700 10px/1 "JetBrains Mono"; color: var(--accent); }
.my-sys .btn-sm { height: 24px; padding: 0 8px; font-size: 11px; }
.my-all { padding: 9px 12px; font: 500 12px/1.4 "Barlow"; color: var(--text2); border-bottom: 1px solid var(--line); }
.my-all .btn-sm { height: 24px; margin-left: 8px; }
.my-ag { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; padding: 5px 12px; background: var(--panel3); font: 700 11px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--text2); border-bottom: 1px solid var(--line); }
.my-ag span { font-family: "JetBrains Mono"; color: var(--dim); }
.my-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 62px 26px; gap: 8px; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--line); }
.my-row:hover { background: var(--hover); }
.my-row.live { box-shadow: inset 3px 0 0 #3ee07f; }
.my-row .star { background: none; border: 0; color: var(--dim); font-size: 15px; cursor: pointer; padding: 0; }
.my-row .star.on { color: #ffc61a; }
.my-name { min-width: 0; }
.my-name b { display: block; font: 700 12.5px/1.2 "Barlow Condensed"; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-name small { display: block; font: 500 10.5px/1.2 "JetBrains Mono"; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-role { font: 700 9px/1 "JetBrains Mono"; padding: 3px 5px; border-radius: 2px; border: 1px solid var(--line2); color: var(--text2); white-space: nowrap; }
.my-role.r-alert { color: #ff7a5c; border-color: #ff7a5c; }
.my-role.r-disp { color: #3ee07f; border-color: #3ee07f; }
.my-role.r-tac { color: #ffb547; border-color: #ffb547; }
.my-act { font: 600 10.5px/1 "JetBrains Mono"; color: var(--dim); text-align: right; }
.my-row.live .my-act { color: #3ee07f; }
.my-rm { width: 24px; height: 24px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel2); color: var(--dim); cursor: pointer; }
.my-rm:hover { color: #fff; background: #a3152a; border-color: #ff3347; }
.my-bg { margin: 10px; padding: 9px 11px; border: 1px dashed var(--line2); border-radius: 3px; font: 500 11.5px/1.45 "Barlow"; color: var(--text2); }
.my-bg b { color: var(--text); font-family: "Barlow Condensed"; letter-spacing: .08em; }
@media (max-width: 640px) { .my-row { grid-template-columns: 24px minmax(0, 1fr) 52px 26px; } .my-role { display: none; } }
.lg-radinc { background: transparent !important; border: 2px dashed #38c6ff !important; border-radius: 50% !important; }
.rhousing .rctl { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.rhousing .rctl .rbtn { min-width: 0; overflow: hidden; }
@media (max-width: 860px) { .rhousing .rctl .rbtn { padding: 0 4px; font-size: 12px; } .rhousing .rctl .rbtn b { display: none; } }

/* ===================================================================== high-priority strip (top of the call queue) */
.hotstrip { display: flex; gap: 5px; padding: 6px; overflow-x: auto; flex: none; border-bottom: 1px solid var(--line); background: linear-gradient(rgba(255,51,71,.07), transparent); scrollbar-width: thin; }
.hs-lbl { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 38px; font: 800 10px/1 "Barlow Condensed"; letter-spacing: .14em; color: #ff6b7a; }
.hs-lbl b { min-width: 22px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: #e0182f; color: #fff; font: 700 11px/1 "JetBrains Mono"; animation: hotpulse 1.4s infinite; }
.hs-card { flex: none; width: 168px; text-align: left; padding: 5px 7px 6px; border-radius: 5px; cursor: pointer; color: var(--text);
  background: linear-gradient(var(--lcd-bg2, #0d2236), var(--lcd-bg, #06111c)); border: 1px solid var(--line2); border-top: 3px solid var(--p1); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.hs-card:hover { border-color: var(--accent); border-top-color: inherit; }
.hs-card.k-fire { border-top-color: var(--fire); } .hs-card.k-ems { border-top-color: var(--ems); } .hs-card.k-police { border-top-color: var(--police); }
.hs-card.crit { box-shadow: 0 0 0 1px rgba(255,51,71,.6), inset 0 0 14px rgba(255,51,71,.15); }
.hs-card.wf { border-top-color: #ff3347; animation: hotpulse 1.4s infinite; }
.hs-card.sel { border-color: var(--sel-line); box-shadow: 0 0 0 1px var(--sel-line); }
.hs-card i { display: block; font: 800 9px/1 "JetBrains Mono"; font-style: normal; letter-spacing: .06em; color: #ff8c97; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-card b { display: block; margin-top: 3px; font: 700 13px/1.1 "Barlow Condensed"; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--lcd-text, #e9f3ff); }
.hs-card span { display: block; margin-top: 2px; font: 500 10.5px/1.2 "JetBrains Mono"; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-card small { display: block; margin-top: 3px; font: 700 9.5px/1 "JetBrains Mono"; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-card small em { font-style: normal; color: var(--text2); }
[data-theme="day"] .hs-card { background: var(--panel); }
[data-theme="day"] .hs-card b { color: var(--text); }

/* ===================================================================== grouped queue */
.qgrp { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 7px; height: 27px; padding: 0 10px; cursor: pointer; user-select: none;
  background: linear-gradient(var(--panel3), var(--panel2)); border-bottom: 1px solid var(--line2); border-top: 1px solid var(--line2); font: 700 12px/1 "Barlow Condensed"; letter-spacing: .12em; }
.qgrp .caret { color: var(--dim); width: 10px; }
.qgrp b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qgrp span:last-child { font: 700 10.5px/1 "JetBrains Mono"; color: var(--dim); letter-spacing: 0; }
.qgrp em { font-style: normal; color: #ff6b7a; }
.qgrp.home b { color: #ffc61a; }
[data-theme="day"] .qgrp.home b { color: #8a6400; }
.qgrp.col { opacity: .85; }
.queue-tools select#queueGroup { flex: 1; }

/* ===================================================================== alert center: one-click department mute */
.ac-depts { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ac-depts button { height: 22px; padding: 0 7px; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); font: 700 10px/1 "Barlow Condensed"; letter-spacing: .08em; cursor: pointer; }
.ac-depts button.on { border-color: color-mix(in srgb, var(--st-scene) 60%, transparent); }
.ac-depts button.off { background: #3a0d14; border-color: #ff3347; color: #ffb3bb; text-decoration: line-through; }
[data-theme="day"] .ac-depts button.off { background: #ffe1e4; color: #8a0012; }

/* ===================================================================== map: faded routine calls */
.mk.stale { opacity: .45; transform: scale(.75); }
.mk.stale .mk-lbl { display: none; }

/* ===================================================================== radio-style treatment: queue + map (night) */
[data-theme="night"] .panel-head { background: linear-gradient(#262b31, #15181c); border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); position: relative; }
[data-theme="night"] .panel-head::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 2px, transparent 2px 5px); }
[data-theme="night"] .pt-ico { color: #3ee07f; text-shadow: 0 0 6px rgba(62,224,127,.7); }
[data-theme="night"] .panel-title { color: #dfe6ee; }
[data-theme="night"] .panel-meta { color: #3ee07f; background: #06111c; border: 1px solid #1b3a57; padding: 3px 6px; border-radius: 3px; font-size: 10.5px; }
/* queue tabs as rubber keys */
[data-theme="night"] #queueTabs.tabs { background: #111417; padding: 5px 5px 0; }
[data-theme="night"] #queueTabs .tab { background: linear-gradient(#353b42, #22262b); border-color: #000; color: #c9d3dd; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
[data-theme="night"] #queueTabs .tab.active { background: linear-gradient(var(--lcd-bg2), var(--lcd-bg)); color: #e9f3ff; box-shadow: inset 0 3px 0 #3ee07f; border-color: #1b3a57; }
/* priority block = backlit key */
[data-theme="night"] .q-pri .pnum { border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.35), 0 0 8px color-mix(in srgb, currentColor 0%, transparent); }
[data-theme="night"] .pri-1 .pnum { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.35), 0 0 10px rgba(255,51,71,.55); }
[data-theme="night"] .q-type { color: #eef4fa; }
[data-theme="night"] .q-loc { color: #9fc4e8; }
[data-theme="night"] .queue-head { background: #0b1520; color: #5b7a97; border-bottom-color: #1b3a57; }
/* map HUD buttons as rubber keys, legend as a display strip */
[data-theme="night"] .hud-btn { background: linear-gradient(#3a4047, #23272c); border-color: #000; color: #d5dde6; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
[data-theme="night"] .hud-btn:hover { background: linear-gradient(#454c54, #2a2f35); }
[data-theme="night"] .hud-btn.active { background: linear-gradient(#1f6a3c, #134726); border-color: #000; color: #eafff1; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 8px rgba(62,224,127,.35); }
[data-theme="night"] .hud-btn.toggle.active[data-layer="police"] { background: linear-gradient(#2459b0, #173c78); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 8px rgba(61,139,255,.4); }
[data-theme="night"] .hud-btn.toggle.active[data-layer="fire"] { background: linear-gradient(#c13024, #861a12); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 8px rgba(255,74,54,.4); }
[data-theme="night"] .hud-btn.toggle.active[data-layer="ems"] { background: linear-gradient(#0f9a79, #0a6550); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 8px rgba(23,196,155,.4); }
[data-theme="night"] .hud-group { border-radius: 4px; box-shadow: 0 2px 0 #050607, 0 3px 10px rgba(0,0,0,.45); }
[data-theme="night"] .map-legend { background: linear-gradient(rgba(13,34,54,.94), rgba(6,17,28,.94)); border: 1px solid #1b3a57; color: #c9dcef; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
[data-theme="night"] .mpop { background: linear-gradient(rgba(13,34,54,.96), rgba(6,17,28,.96)); }

/* ===================================================================== call details from radio (size-ups etc.) */
.chip.dchip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.dchip.d-fire { color: #fff; background: #c4231a; border-color: #ff4a36; }
.dchip.d-smoke { color: #1a0e00; background: #ffb547; border-color: #ffb547; }
.dchip.d-ok { color: #3ee07f; border-color: #3ee07f; }
.dchip.d-info { color: var(--text2); border-color: var(--line2); }
[data-theme="day"] .dchip.d-ok { color: #0d7a35; border-color: #0d7a35; }
.cdet { padding: 2px 0 4px; }
.cdet-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-bottom: 1px dashed var(--line); }
.cdet-row[data-cid] { cursor: pointer; }
.cdet-row[data-cid]:hover { background: var(--hover); }
.cdet-row .t { font: 600 10.5px/1 "JetBrains Mono"; color: var(--dim); width: 60px; flex: none; }
.cdet-row .chip { max-width: none; }

/* ===================================================================== scan list: quick-pick groups */
.qp-h { padding: 8px 12px 4px; font: 700 10.5px/1 "Barlow Condensed"; letter-spacing: .14em; color: var(--dim); }
.qp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; padding: 4px 10px 10px; border-bottom: 1px solid var(--line2); }
.qp { text-align: left; padding: 7px 9px; border-radius: 7px; cursor: pointer; border: 1px solid #000; color: #dfe6ee;
  background: linear-gradient(#3a4047, #23272c); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 #050607; }
.qp b { display: block; font: 700 12px/1.15 "Barlow Condensed"; letter-spacing: .05em; }
.qp small { display: block; margin-top: 3px; font: 600 10px/1 "JetBrains Mono"; color: #8b97a4; }
.qp:active { transform: translateY(1px); }
.qp-on { background: linear-gradient(#1f6a3c, #134726); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 0 #050607, 0 0 8px rgba(62,224,127,.35); }
.qp-on small { color: #bff5d2; }
.qp-part { background: linear-gradient(#5a4a12, #3a300a); }
.qp-part small { color: #ffd98a; }
.qp-na { opacity: .45; cursor: default; }
[data-theme="day"] .qp { color: #fff; }
.qp-solo { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-bottom: 0; padding-bottom: 4px; }
.qp-fire { background: linear-gradient(#6e1a12, #43100b); }
.qp-fire.qp-on { background: linear-gradient(#c13024, #861a12); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 0 #050607, 0 0 10px rgba(255,74,54,.5); }
.qp-fire small { color: #ffc2b8; }

/* ===================================================================== scan list: fire department chips */
.fd-grid { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 10px 10px; }
.fdc { height: 26px; padding: 0 9px; border-radius: 13px; cursor: pointer; border: 1px solid #000; color: #c9d3dd;
  background: linear-gradient(#353b42, #22262b); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); font: 700 11px/1 "Barlow Condensed"; letter-spacing: .07em; }
.fdc.on { background: linear-gradient(#c13024, #861a12); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 7px rgba(255,74,54,.45); }
.fdc.part { background: linear-gradient(#5a4a12, #3a300a); color: #ffd98a; }

/* ===================================================================== working fire on the map: pulsing red ring */
.mk.wfire::before, .mk.wfire::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid #ff3347; animation: wfring 1.6s ease-out infinite; pointer-events: none; }
.mk.wfire::after { animation-delay: .8s; }
.mk.wfire .dot { background: #ff3347 !important; box-shadow: 0 0 12px #ff3347; }
@keyframes wfring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* mutual aid */
.chip.maid { color: #1a0e00; background: #ffb547; border-color: #ffb547; }
.inc-note.maidnote { color: #ffcf7a; border-left: 3px solid #ffb547; }
[data-theme="day"] .inc-note.maidnote { color: #7a4a00; }

/* ===================================================================== recap */
.rc-tools { display: flex; align-items: center; gap: 6px; padding: 0 0 10px; }
.rc-tools span { margin-left: auto; font: 600 11px/1 "JetBrains Mono"; color: var(--dim); }
.rc-card { padding: 9px 11px; margin-bottom: 7px; border: 1px solid var(--line2); border-left: 5px solid var(--dim); border-radius: 4px; background: var(--panel2); cursor: pointer; }
.rc-card.act { border-left-color: var(--fire); }
.rc-card.wf { border-left-color: #ff3347; box-shadow: inset 0 0 0 1px rgba(255,51,71,.35); }
.rc-card:hover { border-color: var(--accent); }
.rc-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-tag { font: 800 10px/1 "JetBrains Mono"; color: #ff8c97; }
.rc-top b { font: 700 15px/1.1 "Barlow Condensed"; letter-spacing: .04em; }
.rc-when { margin-left: auto; font: 600 10.5px/1 "JetBrains Mono"; color: var(--dim); }
.rc-when em { font-style: normal; color: #3ee07f; }
.rc-loc { margin-top: 4px; font: 500 12px/1.4 "JetBrains Mono"; color: var(--text2); }
.rc-units { margin-top: 3px; font: 600 10.5px/1.3 "JetBrains Mono"; color: var(--dim); }
.rc-det { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; }
.rc-d { display: inline-flex; align-items: center; gap: 4px; }
.rc-d i { font: 600 10px/1 "JetBrains Mono"; font-style: normal; color: var(--dim); }

/* ===================================================================== unit chips (apparatus colors) */
.inc-units { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.uchip { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 3px; font: 700 10.5px/1 "JetBrains Mono"; letter-spacing: .02em;
  color: #fff; border: 1px solid rgba(0,0,0,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.uchip.u-eng { background: linear-gradient(#d23a2c, #9c2017); }
.uchip.u-med { background: linear-gradient(#17a884, #0d7a5f); }
.uchip.u-trk { background: linear-gradient(#e0831a, #a85b08); }
.uchip.u-cmd { background: linear-gradient(#e8edf2, #b9c4cf); color: #111; }
.uchip.u-pd { background: linear-gradient(#2f6fd6, #1d4c9c); }
.uchip.u-oth { background: linear-gradient(#56606b, #3a424b); }
.inc-city { margin-left: 8px; font: 700 10.5px/1 "JetBrains Mono"; padding: 2px 6px; border-radius: 2px; background: var(--panel3); color: var(--text2); vertical-align: 2px; }

/* map marker glyphs */
.mk .dot svg { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; fill: #fff; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.mk.sq .dot svg { transform: rotate(-45deg); }
.mk .dot { overflow: visible; }

/* view-only window (MDT open twice) */
#viewOnly { position: fixed; left: 50%; bottom: 38px; transform: translateX(-50%); z-index: 9000; padding: 6px 12px; border-radius: 4px; pointer-events: none;
  background: rgba(10,16,23,.94); border: 1px solid #ffb547; color: #ffd98a; font: 600 11px/1.3 "JetBrains Mono"; box-shadow: 0 4px 16px rgba(0,0,0,.5); max-width: calc(100vw - 32px); text-align: center; }
#viewOnly b { color: #1a0e00; background: #ffb547; padding: 1px 5px; border-radius: 2px; margin-right: 4px; }
#viewOnly { pointer-events: auto; cursor: pointer; }
#viewOnly .x { margin-left: 6px; color: #b08a4a; }
/* phone: one compact line just above the tab bar, never over the call card */
@media (max-width: 760px) {
  #viewOnly { bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 10px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 24px); }
  #viewOnly .long { display: none; }
  .sb-brand { flex-shrink: 0; }
  .sb-title { white-space: nowrap; font-size: 15px; }
}
/* share-link visitors: whose MDT this is */
#sharedNote { position: fixed; left: 50%; bottom: 38px; transform: translateX(-50%); z-index: 8999; padding: 6px 12px; border-radius: 4px;
  background: rgba(10,16,23,.94); border: 1px solid #39c2ff; color: #bfe9ff; font: 600 11px/1.3 "JetBrains Mono"; box-shadow: 0 4px 16px rgba(0,0,0,.5); max-width: calc(100vw - 32px); text-align: center; }
#sharedNote b { color: #00131c; background: #39c2ff; padding: 1px 5px; border-radius: 2px; margin-right: 4px; }
#sharedNote a { color: #39c2ff; }
#sharedNote .x { cursor: pointer; margin-left: 6px; color: #7f93a8; }
@media (max-width: 760px) { #sharedNote { bottom: 64px; } }

/* ============================== MINIMIZE PANELS · SIMPLE VIEW (desktop) ============================== */
.panel-min { display: none; margin-left: 6px; width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--dim); font: 700 14px/1 system-ui, sans-serif; cursor: pointer; flex: none; }
.panel-min:hover { color: var(--text); border-color: var(--dim); }
@media (min-width: 1251px) {
  .panel-min { display: inline-block; }
  /* a minimized side panel: a thin strip with its name; click anywhere on it to bring it back */
  body.min-queue { --qcol: 34px; }
  body.min-radio { --rcol: 34px; }
  body.min-queue .queue-panel > :not(.panel-head), body.min-radio .radio-panel > :not(.panel-head) { display: none !important; }
  body.min-queue .queue-panel, body.min-radio .radio-panel { cursor: pointer; }
  body.min-queue .queue-panel .panel-head, body.min-radio .radio-panel .panel-head { flex: 1; height: auto; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 8px 0; border-bottom: 0; }
  body.min-queue .queue-panel .panel-title, body.min-radio .radio-panel .panel-title { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
  body.min-queue .queue-panel .panel-meta, body.min-radio .radio-panel .panel-meta { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 10px; }
  body.min-queue .queue-panel .panel-min, body.min-radio .radio-panel .panel-min { order: -1; margin: 0; }
  /* SIMPLE: the essentials only — division board folded away, no map legend / queue filters / extra map buttons */
  body.simple #app { grid-template-rows: 54px 64px 0 minmax(0,1fr) 28px; }
  body.simple .divbar { overflow: hidden; padding: 0; visibility: hidden; }
  body.simple .map-legend, body.simple .queue-tools { display: none; }
  body.simple .map-hud .hud-group:has([data-layer]), body.simple .map-hud .hud-group:has([data-ov]), body.simple .map-hud .hud-group:has([data-wx]) { display: none; }
}
#btnSimple.on { color: var(--acc, #39c2ff); }
/* ---------- unit tracker board ---------- */
.ub-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel2, var(--panel)); }
.ub-g { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ub-l { font: 700 10.5px/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; color: var(--text2); margin-right: 2px; }
.ub-chip { font: 600 11.5px/1 "JetBrains Mono", monospace; padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; white-space: nowrap; }
.ub-chip b { color: var(--accent); }
.ub-chip.big { font-size: 14px; padding: 3px 9px; }
.ub-chip.u { cursor: pointer; } .ub-chip.u:hover { border-color: var(--accent); }
.ub-filter { display: flex; gap: 2px; }
.ub-filter button { font: 700 11px/1 "Barlow Condensed", sans-serif; letter-spacing: .1em; padding: 5px 9px; background: transparent; color: var(--text2); border: 1px solid var(--line); cursor: pointer; }
.ub-filter button.on { background: var(--accent); color: #001018; border-color: var(--accent); }
#unitBoard table.cad .uhome { font-size: 10px; color: var(--text2); }
/* ---------- catch-up ---------- */
.cu-sec { margin: 0 0 12px; }
.cu-h { font: 700 11px/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; color: var(--text2); margin: 0 0 6px; display: flex; justify-content: space-between; }
.cu-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 5px 6px; border-bottom: 1px solid var(--line); cursor: pointer; font: 500 12px/1.3 "JetBrains Mono", monospace; }
.cu-row:hover { background: var(--hover); }
.cu-row .t { color: var(--text2); }
.cu-row.crit b { color: var(--p1); } .cu-row.high b { color: var(--fire, #ff6a3d); }
.cu-tiles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cu-tiles span { border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; font: 600 11px/1.1 "JetBrains Mono", monospace; color: var(--text2); }
.cu-tiles b { display: block; font-size: 18px; color: var(--text); }

/* ---------- insights: repeat address · long call ---------- */
.chip.repchip { color: #1a1300; background: #ffd36b; border-color: #ffd36b; }
.chip.longchip { color: var(--text); background: transparent; border-color: var(--p3, #e6c84b); }
.chip.homechip { color: #001a10; background: #39d98a; border-color: #39d98a; }

.tx-save { color: var(--dim); text-decoration: none; font-size: 14px; text-align: center; }
.tx-save:hover { color: var(--accent); }
.chip.fwychip { color: #e7f2ff; background: transparent; border-color: #5b8cff; }
.chip.lanechip { color: #fff; background: #c2410c; border-color: #c2410c; }

/* ---------- command palette (Ctrl+K) ---------- */
.pal { position: fixed; inset: 0; z-index: 5000; background: rgba(0, 0, 0, .45); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.pal.hidden { display: none; }
.pal-box { width: min(640px, calc(100vw - 32px)); background: var(--panel, #121b26); border: 1px solid var(--accent, #39c2ff); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); overflow: hidden; }
.pal-in { width: 100%; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: 600 15px/1 "JetBrains Mono", monospace; padding: 14px 16px; outline: none; }
.pal-list { max-height: 50vh; overflow: auto; }
.pal-i { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; cursor: pointer; font: 500 12.5px/1.3 "JetBrains Mono", monospace; }
.pal-i b { color: var(--text); font-weight: 700; } .pal-i span { color: var(--text2, #7f93a8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-i.on, .pal-i:hover { background: var(--hover, #1b2a3a); } .pal-i.on b { color: var(--accent, #39c2ff); }
.pal-e { padding: 12px 16px; color: var(--text2, #7f93a8); }
.chip.alsochip { color: #001018; background: #9fd8ff; border-color: #9fd8ff; }
.sta-ico.sta-empty { background: #ff3b3b !important; color: #fff !important; border-color: #fff !important; box-shadow: 0 0 0 3px rgba(255, 59, 59, .35); }
.lowc { opacity: .55; text-decoration: underline dotted; text-underline-offset: 3px; }
