/* Callout Golems: the mockups' look (dev/games/callout-golems/design), and the game's own pieces below */

:root { --bg: #0b1410; --panel: rgba(10, 18, 14, .88); --panel2: #15241c; --line: #ffffff1f; --text: #eef5f0; --muted: #8fa89a; --accent: #ffd23f; --accent2: #3ee08f; --danger: #ff5a5f; --fire: #ff8a6e; --police: #7fa6ff; --ems: #ffb3b5; --dot: #ffb35a; }
/* [duo] the safe-area insets: every use goes through these (main.js ?sa=t,r,b,l overrides them for the tests) */
:root { --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); }
:root { --rsat: var(--sat); --rsar: var(--sar); --rsab: var(--sab); --rsal: var(--sal); }   /* [duo] (the full insets: main.js sets both; --sa* drop a whole rail for the punch's box alone) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--text); font: 600 13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow: hidden; }
/* [duo] the root's background is what WebKit paints past the page (the Duo's status rail on the camera's edge, and the
   strip it keeps along the bottom in the home-screen app): black, the bezel's colour, not a dark green bar */
html { background: #000; }
body { background: var(--bg); }
/* [duo] the world edge to edge: inset 0, never vh/lvh/dvh (in the Duo's home-screen app 100vh/100lvh came out ~80 px short
   of the page, a bar along the bottom); only the HUD keeps to the safe areas */
canvas#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* [duo] the Duo (main.js html.bleed): the canvas 120 px past every edge of the page, into what WebKit shows past it (the
   rail), if it draws there; gl.js reads the offset back, so the camera and every label stay on the page */
html.bleed canvas#cv { inset: -120px auto auto -120px; width: calc(100% + 240px); height: calc(100% + 240px); }   /* (a canvas won't stretch between insets: its size given, in % of the page, never vh) */
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui * { pointer-events: auto; }
.h { font-style: italic; font-weight: 900; letter-spacing: .01em; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lbl { font-size: 9.5px; font-weight: 900; letter-spacing: .16em; color: var(--muted); }
.tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font-size: 10.5px; font-weight: 900; padding: 2px 8px; border-radius: 9px; background: rgba(8, 14, 11, .85); border: 1.5px solid currentColor; pointer-events: none; }
.tag small { font-weight: 700; opacity: .75; margin-left: 4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 900; background: #ffffff10; border: 1px solid var(--line); }
.btn { display: grid; place-items: center; border-radius: 999px; background: rgba(10, 18, 14, .78); border: 2px solid #ffffff30; font-weight: 900; font-size: 11px; color: var(--text); text-align: center; line-height: 1.1; }
.p1 { background: #ff5a5f; color: #fff; } .p2 { background: #ffb13b; color: #241400; } .p3 { background: #58a6ff; color: #04162c; }
.ptag { font-style: italic; font-weight: 900; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; }
.logo .t1 { font-size: 44px; color: var(--accent); line-height: .9; text-shadow: 0 4px 0 #0008; }
.logo .t2 { font-size: 26px; color: #fff; line-height: 1; }
.card { padding: 10px 12px; }
.mdt { width: 300px; }
.mdt .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mdt .ic { font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #ff5a5f33; }
.mdt b { font-size: 14px; } .mdt .sub { color: var(--muted); font-size: 11px; }
.rows div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid #ffffff10; font-size: 11.5px; }
.rows div span:first-child { color: var(--muted); font-weight: 800; }
.feed div { background: rgba(8, 14, 11, .82); border: 1px solid var(--line); border-radius: 9px; padding: 4px 9px; margin-top: 4px; font-size: 11.5px; }
.feed .who { font-weight: 900; margin-right: 6px; }
.mm { width: 190px; height: 190px; border-radius: 50%; overflow: hidden; border: 3px solid #ffffff2a; background: #0b1410; }
.mm canvas { width: 100%; height: 100%; display: block; }
.speed { font-size: 40px; color: var(--accent); line-height: .9; } .speed small { font-size: 12px; color: var(--muted); font-style: normal; margin-left: 4px; }
.acts { display: flex; gap: 10px; }
.acts .btn { width: 64px; height: 64px; }
.acts .btn.on { border-color: var(--accent); color: var(--accent); }
.bar { height: 7px; border-radius: 9px; background: #ffffff18; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--fire); }
.role { width: 132px; padding: 10px; text-align: center; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); }
.role .e { font-size: 30px; } .role b { display: block; font-size: 13px; margin-top: 2px; } .role small { color: var(--muted); font-size: 10px; display: block; }
.role.sel { border-color: var(--accent); box-shadow: 0 0 0 3px #ffd23f33; }
table { border-collapse: collapse; width: 100%; } td { padding: 4px 6px; border-top: 1px solid #ffffff10; font-size: 11.5px; }
.prompt { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; padding: 10px 16px; border-radius: 14px; background: rgba(10, 18, 14, .9); border: 2px solid var(--accent); }
.prompt b { color: var(--accent); font-size: 15px; } .prompt kbd { background: var(--accent); color: #1a1400; border-radius: 5px; padding: 1px 6px; font: 900 11px system-ui; }
.wcard { width: 100%; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1.5px solid var(--line); }
.wcard img { width: 100%; display: block; aspect-ratio: 16 / 8.5; object-fit: cover; background: #111; }
.wcard .t { padding: 8px 10px; } .wcard .t b { font-size: 15px; color: var(--accent); } .wcard .t p { margin: 3px 0 5px; color: #cfdcd4; font-size: 11.5px; font-weight: 600; }
.wcard .map { position: absolute; right: 8px; top: 8px; width: 92px; height: 92px; border-radius: 10px; border: 2px solid #ffffff40; }
.lines .ln { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel2); margin-bottom: 4px; font-size: 11.5px; }
.lines .ln.ring { border: 1.5px solid var(--accent); }
.urow { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 8px; font-size: 11px; }
.urow .who { margin-left: auto; font-size: 10px; font-weight: 900; }
.st { font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 5px; }
.st.en { background: #ffb13b22; color: #ffb13b; } .st.on { background: #58a6ff22; color: #58a6ff; } .st.av { background: #3ee08f22; color: #3ee08f; }
.badge { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 900; padding: 1px 6px 1px 3px; border-radius: 8px; background: rgba(8, 14, 11, .88); border: 1.5px solid currentColor; white-space: nowrap; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 16px; color: var(--muted); }
@media (max-width: 760px) { .feed { display: none; } .mdt { width: 230px; } .logo .t1 { font-size: 34px; } .acts .btn { width: 54px; height: 54px; } }

/* the game's own */
.scr { position: fixed; inset: 0; overflow: auto; padding: max(18px, var(--rsat)) max(18px, calc(var(--rsar) + 8px)) max(24px, var(--rsab)) max(18px, calc(var(--rsal) + 8px)); }
.scr.dim { background: rgba(11, 20, 16, .9); }
.menu-btn { display: block; width: 100%; padding: 13px 16px; margin-top: 9px; border-radius: 14px; border: 2px solid #ffffff26; background: rgba(10, 18, 14, .82); color: var(--text); font: 900 italic 16px system-ui, sans-serif; text-align: left; cursor: pointer; }
.menu-btn.go { background: var(--accent); color: #1a1400; border: 0; }
.menu-btn small { display: block; font: 700 11px system-ui, sans-serif; color: var(--muted); margin-top: 2px; font-style: normal; }
.menu-btn.go small { color: #4a3a00; }
.menu-btn:disabled { opacity: .45; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.wcard, .seat { cursor: pointer; }
.wcard.sel, .seat.sel { border-color: var(--accent); box-shadow: 0 0 0 3px #ffd23f40; }
.seat { padding: 12px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); display: flex; gap: 10px; align-items: center; }
.seat .e { font-size: 32px; } .seat b { font-size: 15px; } .seat p { margin: 2px 0 0; color: #cfdcd4; font-size: 11.5px; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back { cursor: pointer; }
input.name { background: var(--panel2); border: 1.5px solid var(--line); color: var(--text); font: 800 14px system-ui; padding: 9px 12px; border-radius: 10px; width: 200px; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud .box, #hud .btn, #hud .pill, #hud .touch, #hud .mm { pointer-events: auto; }
.floatx { position: absolute; transform: translate(-50%, -100%); font: 900 italic 15px system-ui; text-shadow: 0 2px 0 #000a; white-space: nowrap; pointer-events: none; }
.marker { position: absolute; transform: translate(-50%, -100%); text-align: center; pointer-events: none; font-weight: 900; font-size: 11px; }
.marker .chev { font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 0 #000a); }
.prompt .k { display: inline-block; min-width: 22px; background: var(--accent); color: #1a1400; border-radius: 6px; padding: 1px 6px; font: 900 12px system-ui; margin-right: 6px; }
body.touch .prompt { pointer-events: auto; cursor: pointer; -webkit-user-select: none; user-select: none; } body.touch .prompt .k { font-size: 14px; padding: 3px 8px; }
.ring { width: 46px; height: 46px; border-radius: 50%; margin: 6px auto 0; background: conic-gradient(var(--accent) calc(var(--p) * 1%), #ffffff22 0); display: grid; place-items: center; }
.ring::after { content: ''; width: 34px; height: 34px; border-radius: 50%; background: rgba(10, 18, 14, .95); }
.feed div { animation: fin .25s ease-out; }
@keyframes fin { from { opacity: 0; transform: translateY(6px); } }
.touch { position: absolute; border-radius: 50%; background: rgba(10, 18, 14, .55); border: 2px solid #ffffff30; color: #fff; font: 900 12px system-ui; display: grid; place-items: center; user-select: none; -webkit-user-select: none; touch-action: none; }
.stick { left: 22px; bottom: 22px; width: 132px; height: 132px; }
.stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: #ffffff40; }
.tasks div { display: flex; gap: 6px; font-size: 11.5px; padding: 2px 0; } .tasks .ok { color: var(--accent2); } .tasks .me { color: var(--accent); }
.bigmap { position: fixed; inset: max(6vh, calc(var(--rsat) + 8px)) max(6vw, calc(var(--rsar) + 8px)) max(6vh, calc(var(--rsab) + 8px)) max(6vw, calc(var(--rsal) + 8px)); border-radius: 18px; overflow: hidden; border: 2px solid #ffffff30; background: #0b1410; }
.bigmap canvas { width: 100%; height: 100%; display: block; }
.flash { animation: fl 1s infinite; } @keyframes fl { 50% { border-color: #ff5a5f; } }
.toast { position: relative; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; font: 900 italic 22px system-ui; color: var(--accent); text-shadow: 0 3px 0 #000a; pointer-events: none; animation: tst 2.6s forwards; white-space: nowrap; }
@keyframes tst { 0% { opacity: 0; transform: translateY(10px); } 10%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
@media (max-width: 760px) { .stick { width: 112px; height: 112px; } }

/* the dispatch seat */
.dsp-top { position: absolute; left: 12px; right: 12px; top: 10px; display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.dsp-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; align-items: center; min-width: 0; flex: 1; }
.dsp-tab { flex: none; white-space: nowrap; height: 30px; line-height: 18px; padding-right: 16px !important; padding: 5px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); font: 800 11.5px system-ui; cursor: pointer; position: relative; }
.dsp-tab.on { border-color: var(--accent); color: var(--accent); }
.dsp-tab i { font-style: normal; }
.dsp-tab i.rb { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font: 900 9.5px/15px system-ui; text-align: center; pointer-events: none; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.dsp-left { position: absolute; left: 12px; top: 62px; max-height: calc(100% - 74px); width: 330px; padding: 9px; display: flex; flex-direction: column; gap: 6px; }
.dsp-right { position: absolute; right: 12px; top: 62px; max-height: calc(100% - 74px); width: 280px; padding: 9px; overflow-y: auto; }
.dsp-lines { display: flex; gap: 5px; flex-wrap: wrap; }
.dsp-ln { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 12px; background: var(--panel2); border: 1.5px solid var(--line); color: var(--text); font: 800 11.5px system-ui; cursor: pointer; transition: border-color .2s, background .2s, opacity .2s, transform .12s; }
.dsp-ln:active { transform: scale(.95); }
.dsp-ln span { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.dsp-ln .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; position: relative; background: #ffffff0e; font-style: normal; font-size: 13px; }
.dsp-ln .ic svg { position: absolute; inset: -1px; width: 28px; height: 28px; transform: rotate(-90deg); }
.dsp-ln .ic svg .arc { transition: stroke-dashoffset .25s linear; }
.dsp-ln .ic em { font-style: normal; }
.dsp-ln.free { opacity: .5; } .dsp-ln.gone { display: none; }
.dsp-ln.ringing { border-color: var(--accent); background: #ffd23f14; } .dsp-ln.ringing .ic em { display: inline-block; animation: jiggle .45s infinite; }
.dsp-ln.ringing.hot { border-color: var(--danger); background: #ff5a5f1c; }
.dsp-ln.act { border-color: var(--accent2); background: #3ee08f14; } .dsp-ln.act b { color: var(--accent2); } .dsp-ln.hold { border-color: #58a6ff; }
@keyframes jiggle { 25% { transform: rotate(-16deg); } 75% { transform: rotate(16deg); } }
.dsp-sheet { flex: 0 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.dsp-caller { display: flex; align-items: center; gap: 8px; } .dsp-caller .who { flex: 1; min-width: 0; }
.dsp-caller .who b { display: block; font-size: 14px; } .dsp-caller .who span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dsp-caller .who span.clue { color: #ff9a9d; }
.av { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 36px; position: relative; background: radial-gradient(circle at 35% 25%, #b9b2a2, #7c7566 70%); box-shadow: inset 0 -4px 0 #0003, 0 3px 8px #0006; }
.av i { position: absolute; top: 13px; width: 7px; height: 5px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 8px #ffd23f; transition: height .3s, top .3s, background .3s; }
.av i:first-of-type { left: 8px; } .av i:last-of-type { right: 8px; }
.av.worried i { height: 8px; top: 11px; background: #fff6c9; animation: blink 2.4s infinite; } .av.calm i { height: 3px; top: 15px; }
@keyframes blink { 92% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.panic { width: 82px; flex: 0 0 82px; }
.panic .t { display: flex; justify-content: space-between; font-size: 8.5px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.panic .bar { height: 7px; border-radius: 4px; background: #ffffff14; margin-top: 3px; position: relative; overflow: hidden; }
.panic .bar div { height: 100%; background: linear-gradient(90deg, #3ee08f, #ffd23f 50%, #ff5a5f); background-size: 82px 100%; transition: width .4s ease-out; }
.panic .bar i { position: absolute; top: 0; bottom: 0; left: 72%; width: 2px; background: #fff8; }
.dsp-chat { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding: 4px 2px; overscroll-behavior: contain; }
.bub { max-width: 88%; padding: 6px 10px; border-radius: 13px; font-size: 12.5px; line-height: 1.38; font-weight: 600; background: #ffffff10; border: 1px solid #ffffff14; border-bottom-left-radius: 4px; align-self: flex-start; }
.bub.you { align-self: flex-end; background: #1d4ea8; border: 0; border-radius: 13px; border-bottom-right-radius: 4px; color: #e6efff; }
.bub.in { animation: bubin .28s cubic-bezier(.2, .9, .3, 1.25); } .bub.you.in { transform-origin: right bottom; } .bub.them.in { transform-origin: left bottom; }
@keyframes bubin { from { opacity: 0; transform: translateY(8px) scale(.92); } }
.bub.typing { color: var(--muted); letter-spacing: .25em; font-weight: 900; animation: dots 1s infinite; } .bub.typing.hidden { display: none; }
@keyframes dots { 50% { opacity: .45; } }
.bub.garble { color: #ffb3b5; font-style: italic; }
.kw { font: inherit; font-weight: 800; color: #ffe680; background: #ffd23f22; border: 0; border-bottom: 2px solid var(--accent); border-radius: 4px; padding: 0 3px; cursor: pointer; transition: background .2s, color .2s, transform .1s; }
.kw:hover { background: #ffd23f44; } .kw:active { transform: scale(.94); }
.kw.got { color: #002313; background: var(--accent2); border-color: transparent; animation: got .35s; }
@keyframes got { 40% { transform: scale(1.12); } }
.dsp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dsp-fields > div { display: flex; align-items: center; gap: 6px; background: #ffffff08; border-radius: 8px; padding: 4px 7px; font-size: 11px; font-weight: 800; border: 1px dashed #ffffff22; color: var(--muted); min-width: 0; transition: border-color .25s, color .25s, background .25s; }
.dsp-fields > div i { font-style: normal; } .dsp-fields > div > div { min-width: 0; } .dsp-fields span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-fields small { display: block; color: var(--muted); font-size: 8.5px; font-weight: 900; letter-spacing: .1em; }
.dsp-fields > div.ok { border: 1px solid #3ee08f66; color: var(--text); } .dsp-fields > div.warn { border: 1px solid #ff5a5f88; color: #ffb3b5; }
.dsp-fields > div.pop { animation: fpop .5s; } @keyframes fpop { 30% { background: #3ee08f33; transform: scale(1.04); } }
.dsp-asks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dsp-asks button, .dsp-opt { padding: 6px 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); font: 800 11.5px system-ui; cursor: pointer; text-align: left; display: flex; gap: 6px; align-items: center; line-height: 1.2; transition: opacity .2s, border-color .2s, transform .1s; }
.dsp-asks button:active:not(:disabled), .dsp-opt:active:not(:disabled) { transform: scale(.97); }
.dsp-asks kbd, .dsp-opt kbd { font: 900 9px system-ui; background: #ffffff14; border-radius: 4px; padding: 1px 4px; color: var(--muted); }
.dsp-asks button.calm { border-color: #3ee08f66; color: #9ff0c6; } .dsp-asks button.used { opacity: .38; text-decoration: line-through; } .dsp-asks button:disabled { opacity: .5; }
.dsp-opt { width: 100%; margin-top: 3px; } .dsp-opt.ok { border-color: var(--accent2); } .dsp-opt.bad { border-color: var(--danger); }
.dsp-sheet .menu-btn.go { transition: opacity .2s, box-shadow .3s, transform .1s; } .dsp-sheet .menu-btn.go:disabled { opacity: .45; cursor: default; }
.dsp-sheet .menu-btn.go.ready { animation: ready 1.6s infinite; } .dsp-sheet .menu-btn.go:active:not(:disabled) { transform: scale(.98); }
@keyframes ready { 50% { box-shadow: 0 0 0 4px #ffd23f44; } }
.dsp-cpr { text-align: center; font-size: 20px; }
.dsp-wait.hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .dsp-ln.ringing .ic em, .bub.in, .kw.got, .dsp-fields > div.pop, .menu-btn.go.ready, .av i { animation: none; } }
.dsp-prow { display: flex; gap: 5px; align-items: center; } .dsp-prow .ptag { cursor: pointer; border: 2px solid transparent; font-size: 13px; padding: 4px 10px; } .dsp-prow .ptag.sel { border-color: #fff; } .dsp-prow .pill { cursor: pointer; color: var(--text); }
.dsp-inc { display: flex; gap: 8px; width: 100%; align-items: center; padding: 6px 8px; margin-bottom: 4px; border-radius: 10px; background: var(--panel2); border: 1.5px solid transparent; color: var(--text); font: 600 12px system-ui; cursor: pointer; }
.dsp-inc.sel { border-color: var(--accent); } .dsp-inc .e { font-size: 20px; } .sub { color: var(--muted); font-size: 11px; font-weight: 600; }
.dsp-card { margin-top: 6px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--accent); background: #ffd23f0d; }
.dsp-unit { display: flex; width: 100%; gap: 6px; align-items: center; padding: 5px 8px; margin-top: 3px; border-radius: 9px; background: var(--panel2); border: 1.5px solid var(--line); color: var(--text); font: 700 12px system-ui; cursor: pointer; }
.dsp-unit span { margin-left: auto; color: var(--muted); } .dsp-unit.on { border-color: var(--accent2); background: #3ee08f18; }
.dsp-unit.busy { opacity: .42; cursor: default; }
/* outside help (SG.AID): a row each, REQUEST until it's called, then on the way, then here */
.dsp-aid { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-top: 4px; border-radius: 10px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 11.5px; }
.dsp-aid .e { font-size: 18px; } .dsp-aid .w { flex: 1; min-width: 0; } .dsp-aid .w b { display: block; } .dsp-aid .w span { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.dsp-aid .pill.rq { background: var(--accent); color: #1a1400; border: 0; cursor: pointer; } .dsp-aid .pill.rq:disabled { opacity: .4; cursor: default; }
.dsp-aid .st { font-size: 9.5px; font-weight: 900; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; background: #ffd23f22; color: var(--accent); }
.dsp-aid.used { border-color: var(--accent2); background: #3ee08f12; } .dsp-aid.here .st { background: #3ee08f22; color: var(--accent2); }
.dsp-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; background: #58a6ff; border: 2px solid #fff; box-shadow: 0 3px 0 #0008; }
.dsp-pin.p1 { background: #ff5a5f; } .dsp-pin.p2 { background: #ffb13b; } .dsp-pin.sel { outline: 3px solid var(--accent); }
.dsp-pin { font-size: 15px; } .dsp-pin > * { transform: rotate(45deg); }
.dsp-u { font-size: 13px; filter: drop-shadow(0 1px 0 #000); }
/* a mass-casualty incident at the desk: tag chips, the colour bar, the counts, the hospitals, the pin's ring */
.tc { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 6px; font: 900 10.5px system-ui; color: #fff; }
.tc.r { background: #ff5a5f; } .tc.y { background: #ffb13b; color: #241400; } .tc.g { background: #3ee08f; color: #002313; } .tc.b { background: #23262a; border: 1px solid #ffffff40; } .tc.q { background: #ffffff1a; color: var(--muted); border: 1px dashed #ffffff40; }
.mci-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 3px; } .mci-chips .sub { margin-left: 3px; }
.mcib { margin-bottom: 6px; padding: 7px 8px; border-radius: 10px; background: #ff5a5f12; border: 1.5px solid #ff5a5f66; }
.mcibar { display: flex; height: 10px; margin-top: 6px; border-radius: 5px; overflow: hidden; background: #ffffff10; }
.mcibar i { display: block; height: 100%; } .mcibar i.r { background: #ff5a5f; } .mcibar i.y { background: #ffb13b; } .mcibar i.g { background: #3ee08f; } .mcibar i.b { background: #23262a; }
.mcibar i.q { background: #8fa89a88; } .mcibar i.x { background: repeating-linear-gradient(45deg, #ffffff30 0 3px, #ffffff0a 3px 6px); }
.ctab { display: grid; grid-template-columns: 60px repeat(3, 1fr); gap: 2px 4px; font-size: 10.5px; margin-top: 6px; }
.ctab span { text-align: right; font-variant-numeric: tabular-nums; } .ctab .hh { color: var(--muted); font-size: 8.5px; font-weight: 900; letter-spacing: .1em; } .ctab .k { text-align: left; }
.mci-h { background: var(--panel2); margin-top: 3px; } .mci-h .star { color: var(--accent); }
.mci-h .who { display: flex; gap: 3px; align-items: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.mci-h .who span { font: 800 9.5px system-ui; padding: 1px 4px; border-radius: 4px; background: #ffffff10; } .mci-h .who .r { color: #ffb3b5; } .mci-h .who .y { color: #ffd890; } .mci-h .who .g { color: #9ff0c6; } .mci-h .who .over { background: #ff5a5f55; color: #fff; }
.dsp-card .menu-btn.mci-aid { text-align: center; padding: 8px; font-size: 12.5px; margin-top: 5px; }
.dsp-pin { position: relative; } .dsp-pin .mci-ring { position: absolute; inset: -8px; border-radius: 50%; z-index: -1; -webkit-mask: radial-gradient(circle, transparent 0 18px, #000 18.5px); mask: radial-gradient(circle, transparent 0 18px, #000 18.5px); }

/* the dispatch seat on a phone: one panel (the call or the incidents, under a switch), the map round it */
.dsp-seg { display: none; }
body.dsp-phone .dsp-right { display: none; }
body.dsp-phone .dsp-seg { display: flex; gap: 4px; }
.dsp-seg button { flex: 1; padding: 7px 6px; border-radius: 10px; background: var(--panel2); border: 1.5px solid var(--line); color: var(--muted); font: 900 11px system-ui; letter-spacing: .06em; cursor: pointer; }
.dsp-seg button.on { color: var(--accent); border-color: var(--accent); }
.dsp-seg b { background: var(--danger); color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 3px; }
body.dsp-phone .dsp-top { left: 6px; right: 6px; top: 6px; padding: 4px 6px; gap: 4px; }
body.dsp-phone .dsp-top > .lbl { display: none; }
body.dsp-phone .dsp-top .pill { padding: 3px 7px; font-size: 10px; white-space: nowrap; flex: none; }
body.dsp-phone #dassist i { display: none; }
body.dsp-phone .dsp-tab { padding: 4px 8px; font-size: 11px; height: 26px; }
body.dsp-phone .dsp-left { height: auto; left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 45vh; padding: 6px; gap: 4px; border-radius: 12px; }
body.dsp-phone .dsp-left.bar .dsp-sheet { display: none; }
body.dsp-phone .dsp-left.bar .dsp-lines:empty { display: none; }
.dsp-seg .fold { flex: 0 0 38px; font-size: 14px; color: var(--text); }
body.dsp-phone .dsp-sheet { gap: 4px; }
body.dsp-phone .dsp-caller b { font-size: 12.5px; }
body.dsp-phone .bub { font-size: 11.5px; padding: 4px 8px; }
body.dsp-phone .dsp-fields small { display: none; }
body.dsp-phone .dsp-prow .ptag { padding: 3px 9px; font-size: 12px; }
body.dsp-phone .dsp-inc { padding: 4px 6px; margin-bottom: 3px; } body.dsp-phone .dsp-inc .e { font-size: 16px; }
body.dsp-phone .dsp-unit { padding: 4px 7px; font-size: 11px; }
body.dsp-phone .dsp-ln { padding: 5px 7px; font-size: 11px; }
body.dsp-phone .dsp-chat { max-height: 14vh; }
body.dsp-phone .dsp-fields { grid-template-columns: repeat(4, 1fr); }
body.dsp-phone .dsp-fields div { padding: 3px 5px; font-size: 10.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.dsp-phone .dsp-asks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.dsp-phone .dsp-asks button { flex: none; }
body.dsp-phone .dsp-sheet .menu-btn { padding: 9px 12px; margin-top: 4px; font-size: 14px; }
/* sideways: the panel down the left, the map on the right */
@media (orientation: landscape) {
  body.dsp-phone .dsp-left { top: auto; bottom: 6px; right: auto; left: 6px; width: min(40vw, 330px); max-height: calc(100% - 56px); }
  body.dsp-phone .dsp-chat { max-height: 24vh; }
  body.dsp-phone .dsp-fields { grid-template-columns: 1fr 1fr; }
}

/* turning the dispatch view */
.dsp-rot { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.dsp-rot .btn { width: 40px; height: 40px; font-size: 19px; cursor: pointer; }
body.dsp-phone .dsp-rot { top: 30%; right: 8px; } body.dsp-phone .dsp-rot .btn { width: 36px; height: 36px; font-size: 17px; }
body:not(.dsp-phone) .dsp-rot { right: 304px; }

/* a narrow phone: the call card under the callsign, not under it on top */
@media (max-width: 520px) { body:not(.touch) #mdt { top: 52px; left: 8px; } }

/* the dashboard */
.dash { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; background: rgba(10, 18, 14, .72); border: 1px solid var(--line); pointer-events: none; }
.dash .gear { font-size: 20px; color: var(--text); background: var(--panel2); border-radius: 7px; padding: 0 7px; }
.dash .speed { font-size: 34px; }
.dash .sig { font-size: 20px; color: #ffb02033; transition: color .05s; } .dash .sig.on { color: #ffb020; text-shadow: 0 0 10px #ffb020; }
.dash .tells { display: flex; gap: 4px; font-size: 15px; align-items: center; }
#hud.on-foot .dash .sig { display: none; }
/* touch: driving or walking, never both */
#hud.on-foot .ctl-veh, #hud.in-veh .ctl-foot { display: none; }
#hud:has(#big > *) .ctl-veh, #hud:has(#big > *) .ctl-foot, #hud:has(#big > *) #prompt { display: none; }   /* a menu is open: the pedals and buttons were drawn over it */
#big .scr { overflow-y: auto; }
.steer { position: absolute; left: 18px; bottom: 18px; width: 210px; height: 92px; border-radius: 46px; background: rgba(10, 18, 14, .55); border: 2px solid #ffffff30; pointer-events: auto; touch-action: none; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); font: 900 9px system-ui; letter-spacing: .12em; user-select: none; -webkit-user-select: none; }
.steer .wheel { font-size: 46px; line-height: 1; color: var(--text); }
/* the touch steering wheel: grab it anywhere and turn it */
.steerw { position: absolute; left: 14px; bottom: 14px; width: 158px; height: 158px; border-radius: 50%; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; background: radial-gradient(circle, rgba(10, 18, 14, .35) 60%, rgba(10, 18, 14, 0) 72%); }
.steerw .wheel { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 6px #0008); }
.pedal { position: absolute; bottom: 18px; border-radius: 14px; background: rgba(10, 18, 14, .6); border: 2px solid #ffffff30; display: grid; place-items: center; font: 900 12px system-ui; letter-spacing: .08em; color: var(--text); pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.pedal.gas { right: 20px; width: 72px; height: 132px; border-color: #3ee08f88; } .pedal.gas.on { background: #3ee08f55; }
.pedal.brake { right: 102px; width: 68px; height: 96px; border-color: #ff5a5f88; } .pedal.brake.on { background: #ff5a5f55; }
#hud .touch.on { background: #ffffff33; }
/* a touch button whose action is ready (what it'll do in a tag beside it; the work button fills as it's held) */
#hud .touch.ready { z-index: 3; border-color: var(--accent); background: rgba(40, 34, 6, .7); box-shadow: 0 0 0 3px #ffd23f55; animation: tready 1.2s infinite; }
#hud .touch.ready::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0); pointer-events: none; }
#hud .touch .tip { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; background: rgba(10, 18, 14, .9); border: 1.5px solid var(--accent); border-radius: 9px; padding: 3px 8px; font: 800 11.5px system-ui; color: var(--text); pointer-events: none; }
#hud .touch .tip:empty { display: none; }
#hud .vbar .touch.ready { position: relative; }
#hud .vbar .touch .tip { right: auto; left: 50%; top: auto; bottom: calc(100% + 8px); transform: translateX(-50%); }
@keyframes tready { 50% { box-shadow: 0 0 0 6px #ffd23f22; } }
.vbar { position: absolute; right: 14px; bottom: 166px; display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; pointer-events: auto; }
.vbar .touch { position: static; width: 44px; height: 44px; font-size: 17px; }
body.touch #hud .dash { left: 50%; transform: translateX(-50%); top: auto; bottom: calc(8px + var(--sab)); }
body.touch .mdt { width: 236px; } body.touch #hud .dash .speed { font-size: 28px; }
body:not(.touch) #hud .dash { left: 14px; transform: none; top: auto; bottom: 14px; }
@media (max-height: 420px) { .vbar { bottom: 150px; grid-template-columns: repeat(5, 40px); } .vbar .touch { width: 40px; height: 40px; } .pedal.gas { height: 112px; } .pedal.brake { height: 80px; } .steer { width: 180px; height: 80px; } .steerw { width: 136px; height: 136px; } }

/* left-handed: the touch controls' layer mirrored, and each control mirrored back (so the wheel, the stick and the
   buttons read the right way round, on the other side) */
body.lefty .ctl-veh, body.lefty .ctl-foot { position: absolute; transform: scaleX(-1); pointer-events: none; }
/* [duo] the touch controls' layers (the wheel, the pedals, the stick, the buttons) inside the safe area, each side by its
   own inset less the 6 px the controls' own margins already keep: clear of the camera on whichever side it is, and of
   the home bar; mirrored (left-handed) inside the same box */
#hud .ctl-veh, #hud .ctl-foot { position: absolute; top: max(0px, calc(var(--rsat) - 6px)); right: max(0px, calc(var(--rsar) - 6px)); bottom: max(0px, calc(var(--rsab) - 6px)); left: max(0px, calc(var(--rsal) - 6px)); }   /* (the full insets: the thumbs' controls never under a rail) */
body.lefty .ctl-veh > *, body.lefty .ctl-foot > * { transform: scaleX(-1); }
body.lefty .ctl-foot .touch .tip { right: auto; left: calc(100% + 8px); }

/* a call offered to you: take it or not, before the bar runs out */
.offer { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); width: min(420px, 92vw); padding: 10px 14px; border-radius: 14px; background: rgba(10, 18, 14, .94); border: 2px solid var(--accent); pointer-events: auto; animation: fin .25s; box-shadow: 0 8px 24px #0008; }
.offer b.h { display: block; font-size: 17px; margin-top: 2px; } .offer .sub { color: var(--muted); font-size: 12px; font-weight: 700; }
.offer .tbar { height: 4px; border-radius: 2px; background: #ffffff18; margin-top: 8px; overflow: hidden; } .offer .tbar i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.offer .row { display: flex; } .offer .menu-btn { flex: 1; width: auto; margin-top: 0; text-align: center; padding: 10px; font-size: 15px; } .offer .menu-btn small { display: inline; margin-left: 6px; }

/* incident command (plan-incident-command.md §4-5): the IC's board (.full in the vehicle, .mini on foot and on touch),
   its sector cards and unit chips, the sector tags, the dispatcher's COMMAND block and an IC's alarm request */
.cmd-board { position: absolute; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; z-index: 4; }
#cmdb .cmd-board.full { right: 14px; bottom: 14px; width: min(860px, calc(100vw - 28px)); }
#cmdb .cmd-board.mini { left: 50%; bottom: 14px; transform: translateX(-50%); width: min(780px, calc(100vw - 28px)); }
body.touch #cmdb .cmd-board.mini { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto; }
.cmd-hd { display: flex; align-items: center; gap: 8px; }
.cmd-hd .ic { font-size: 22px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #ff5a5f33; flex: none; }
.cmd-hd b.h { font-size: 15px; } .cmd-hd .sub { display: block; }
.cmd-hd .r { margin-left: auto; display: flex; gap: 5px; align-items: center; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.cmd-maj { background: #ff5a5f; color: #fff; font-style: italic; font-weight: 900; font-size: 9.5px; letter-spacing: .12em; padding: 2px 7px; border-radius: 6px; vertical-align: 2px; }
.cmd-ic { color: var(--accent); }
.cmd-esc { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: #ff5a5f14; border: 1px solid #ff5a5f55; font-size: 11.5px; }
.cmd-esc .bar { flex: 0 0 120px; } .cmd-esc .bar i { background: linear-gradient(90deg, #ffb13b, #ff5a5f); }
.cmd-esc.ok { background: #3ee08f10; border-color: #3ee08f55; } .cmd-esc.ok .bar i { background: var(--accent2); }
.cmd-secs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cmd-sec { border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); border-top: 3px solid var(--sc); padding: 6px 7px 7px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.cmd-sec .nm { display: flex; align-items: center; gap: 5px; font: 900 italic 12px system-ui; color: var(--sc); letter-spacing: .02em; white-space: nowrap; }
.cmd-sec .nm kbd { margin-left: auto; font: 900 9px system-ui; background: #ffffff14; border-radius: 4px; padding: 1px 5px; color: var(--muted); font-style: normal; }
.cmd-sec .ld { font-size: 10px; color: var(--muted); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-sec .ft { margin-top: auto; padding-top: 4px; border-top: 1px solid #ffffff10; font-size: 10.5px; font-weight: 800; }
.cmd-sec .wk { font-size: 10px; color: #cfdcd4; font-weight: 700; }
.cmd-sec.warn { box-shadow: inset 0 0 0 1.5px #ff5a5f88; } .cmd-sec.clear { opacity: .9; } .cmd-sec.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.cmd-chip { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; background: #ffffff0c; border: 1.5px solid transparent; font: 800 10.5px system-ui; color: var(--text); white-space: nowrap; overflow: hidden; min-width: 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
.cmd-chip .n { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cmd-chip .s { margin-left: auto; font-size: 8.5px; font-weight: 900; letter-spacing: .06em; flex: none; }
.cmd-chip .s.wk { color: var(--accent2); } .cmd-chip .s.id { color: #ffb13b; } .cmd-chip .s.en { color: var(--muted); }
.cmd-chip.pl .n b { color: var(--accent); }
.cmd-chip.sel { border-color: var(--accent); background: #ffd23f1c; box-shadow: 0 0 0 2px #ffd23f33; }
.cmd-chip.lead::before { content: '◆'; color: var(--sc); font-size: 8px; }
.cmd-chip.pend { border: 1.5px dashed var(--accent); opacity: .8; }   /* a guest's tap, till the host's board has it */
.cmd-tray { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmd-tray .cmd-chip { flex: none; }
.cmd-ft { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.cmd-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.cmd-btns .menu-btn { width: auto; margin: 0; padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
.cmd-btns .menu-btn.on { border-color: var(--accent2); color: var(--accent2); }
.cmd-btns .menu-btn kbd { font: 900 9px system-ui; background: #ffffff1a; border-radius: 4px; padding: 1px 4px; margin-left: 5px; font-style: normal; color: var(--muted); }
.cmd-btns .menu-btn.go kbd { background: #00000022; color: #4a3a00; }
.cmd-log { font-size: 10.5px; color: var(--muted); font-weight: 700; line-height: 1.45; }
.cmd-log b { color: #cfdcd4; }
.cmd-keys { font-size: 10px; color: var(--muted); font-weight: 800; display: flex; gap: 10px; flex-wrap: wrap; }
.cmd-keys kbd, .cmd-hint kbd { font: 900 9px system-ui; background: #ffffff14; border-radius: 4px; padding: 1px 4px; color: var(--text); margin-right: 3px; }
/* the compact board: on foot, and on a touch screen (a phone in portrait: the sectors in three columns) */
.cmd-board.mini { gap: 6px; padding: 8px 9px; }
.cmd-board.mini .cmd-mhd { gap: 6px; flex-wrap: nowrap; min-width: 0; }
.cmd-board.mini .cmd-hint { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cmd-board.mini .cmd-sec { padding: 5px 6px; }
.cmd-board.mini .cmd-sec .nm { font-size: 11px; } .cmd-board.mini .cmd-sec .ld { font-size: 9.5px; } .cmd-board.mini .cmd-sec .ft { font-size: 10px; }
.cmd-board.mini .cmd-chip { font-size: 10px; padding: 2px 5px; }
.cmd-board.mini .cmd-btns { flex-wrap: nowrap; } .cmd-board.mini .cmd-btns .menu-btn { padding: 7px 10px; font-size: 12px; }
@media (max-width: 600px) { .cmd-board.mini .cmd-secs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cmd-board.mini .cmd-btns { flex-wrap: wrap; } }
#hud.cmd-mini #prompt .prompt { bottom: 250px !important; }   /* the prompt above the strip */
#hud:not(.cmd-on) .touch[data-t="B"] { display: none; }   /* 📋: only at a commanded incident */
/* the sectors' spots in the world: yours bigger, with where to go over it */
.cmd-tag.me { font-size: 13px; padding: 3px 11px; border-width: 2px; }
.cmd-tag .go { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); font: 900 italic 22px system-ui; text-shadow: 0 3px 0 #000a; white-space: nowrap; }
/* the dispatcher's card: the command block and an alarm request (and its dot on the incident in the list) */
.cmd-dsp { margin: 2px 0 6px; padding: 6px 7px; border-radius: 10px; background: #ffffff08; border: 1px solid var(--line); }
.cmd-dsp .sr { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; padding: 1px 0; }
.cmd-dsp .sr .d { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.cmd-dsp .sr .c { margin-left: auto; color: var(--muted); }
.cmd-req { margin: 6px 0; padding: 7px 8px; border-radius: 10px; border: 2px solid var(--danger); background: #ff5a5f1a; }
.cmd-req b { font-size: 12.5px; } .cmd-req .tbar { height: 4px; border-radius: 2px; background: #ffffff18; margin-top: 6px; overflow: hidden; } .cmd-req .tbar i { display: block; height: 100%; background: var(--danger); }
.cmd-req .menu-btn { margin-top: 6px; padding: 8px 10px; text-align: center; font-size: 13px; }
.cmd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex: none; animation: pulse 1s infinite; }
/* the command review at the end (in #big) */
.cmd-rev { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 28px)); padding: 14px 16px; border: 2px solid var(--accent); }
.cmd-rev .grade { font: 900 italic 64px/1 system-ui; color: var(--accent); text-shadow: 0 4px 0 #0008; width: 84px; text-align: center; }
.cmd-rev .rows div span:last-child { font-variant-numeric: tabular-nums; }
.cmd-rev .pos { color: var(--accent2); } .cmd-rev .neg { color: var(--danger); }
/* triage at a mass-casualty incident (design/triage.html): the START card, the tag chips, the tarps' ghost, the
   loading board. Touch: the card and the board are their own buttons, and the controls under them step aside */
:root { --tr: #ff5a5f; --ty: #ffb13b; --tg: #3ee08f; }
.tc { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 6px; font: 900 10.5px system-ui; color: #fff; }
.tc.r { background: var(--tr); } .tc.y { background: var(--ty); color: #241400; } .tc.g { background: var(--tg); color: #002313; } .tc.b { background: #23262a; border: 1px solid #ffffff40; } .tc.q { background: #ffffff1a; color: var(--muted); border: 1px dashed #ffffff40; }
#mci .box { pointer-events: auto; }
#mci .x { cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #ffffff12; color: var(--muted); font-size: 13px; flex: none; }
.tcard { position: absolute; right: 14px; top: 58px; width: 330px; padding: 12px 14px; border: 2px solid var(--accent); z-index: 4; -webkit-user-select: none; user-select: none; }
.tcard .hd { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.tcard .hd .lbl { white-space: nowrap; } .tcard .hd b { font-size: 16px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tcard .hd .sub { color: var(--muted); font-size: 11px; font-weight: 700; }
.tcard .av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: #ffffff10; flex: none; }
.tcard .tm { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.tcard .step { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 6px 2px; border-top: 1px solid #ffffff12; font-size: 12px; }
.tcard .step .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 900 10px system-ui; background: #ffffff14; color: var(--muted); }
.tcard .step.done .n { background: var(--accent2); color: #002313; } .tcard .step.now .n { background: var(--accent); color: #1a1400; }
.tcard .step.todo { opacity: .45; }
.tcard .step .v { font-weight: 900; font-variant-numeric: tabular-nums; } .tcard .step .v.bad { color: #ff9a9d; } .tcard .step .v.ok { color: #9ff0c6; }
.tcard .vbar { height: 5px; border-radius: 3px; background: #ffffff14; margin-top: 3px; position: relative; } .tcard .vbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; } .tcard .vbar s { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff9; }
.tcard .air { margin-top: 6px; text-align: center; padding: 9px; font-size: 14px; border-color: #9fd0ff; color: #cfe8ff; cursor: pointer; } .tcard .air small { display: inline; margin-left: 6px; }
.tcard .sub.air { color: #9fd0ff; font-weight: 800; }
.tbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.tbtns button { padding: 8px 4px 6px; border-radius: 10px; border: 2px solid transparent; font: 900 italic 13px system-ui; cursor: pointer; line-height: 1.05; touch-action: manipulation; }
.tbtns button small { display: block; font: 800 8.5px system-ui; font-style: normal; letter-spacing: .06em; opacity: .85; margin-top: 2px; }
.tbtns button kbd { display: block; font: 900 9px system-ui; opacity: .7; margin-bottom: 2px; }
.tbtns .r { background: var(--tr); color: #fff; } .tbtns .y { background: var(--ty); color: #241400; } .tbtns .g { background: var(--tg); color: #002313; } .tbtns .b { background: #23262a; color: #fff; border-color: #ffffff30; }
.tbtns .sug { box-shadow: 0 0 0 3px #fff; } .tbtns button:active { transform: scale(.96); }
.tcard .hint { margin-top: 7px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; }
/* over the scene: a patient's tag, a tarp, the ghost of the tarps */
.tag.tri { font-size: 10px; padding: 1px 6px; } .tag.tri small { display: block; margin: 0; font-size: 9px; text-align: center; }
.tag.tarp { font-size: 10px; } .tag.tarp.to { box-shadow: 0 0 0 3px #ffd23f66; } .tag.tarp small { color: var(--accent); }
svg.ghost { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
/* the loading officer: a button to take the board, and the board */
.lo-btn { position: absolute; left: 50%; bottom: 172px; transform: translateX(-50%); padding: 8px 14px; border: 2px solid var(--accent); border-radius: 12px; font: 900 italic 13px system-ui; color: var(--accent); cursor: pointer; white-space: nowrap; }
.lo-btn .k { display: inline-block; min-width: 20px; background: var(--accent); color: #1a1400; border-radius: 6px; padding: 1px 6px; font: 900 12px system-ui; margin-left: 6px; font-style: normal; }
.lboard { position: absolute; right: 14px; top: 58px; bottom: 14px; width: 390px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; z-index: 4; -webkit-user-select: none; user-select: none; }
.lboard .lrows, .lboard .hrows { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; } .lboard .lrows { flex: 1 1 0; min-height: 84px; } .lboard .hrows { flex: none; max-height: 34%; }
.prow { display: grid; grid-template-columns: 24px 1fr 60px 40px; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 9px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 11.5px; cursor: pointer; flex: none; }
.prow small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; } .prow .tr { color: #9ff0c6; }
.prow.sel { border-color: var(--accent); background: #ffd23f12; } .prow.wait { opacity: .55; }
.prow .c { height: 5px; border-radius: 3px; background: #ffffff14; overflow: hidden; } .prow .c i { display: block; height: 100%; }
.prow .w { color: var(--muted); font-size: 10.5px; text-align: right; font-variant-numeric: tabular-nums; }
.hrow { display: grid; grid-template-columns: 1fr 40px 132px; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 9px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 11.5px; cursor: pointer; flex: none; }
.hrow small { color: var(--muted); font-size: 9.5px; } .hrow.sel { border-color: var(--accent2); background: #3ee08f14; }
.hrow .cap { display: flex; gap: 3px; justify-content: flex-end; } .hrow .cap span { font: 800 10px system-ui; padding: 1px 4px; border-radius: 4px; background: #ffffff10; }
.hrow .cap span.r { color: #ffb3b5; } .hrow .cap span.y { color: #ffd890; } .hrow .cap span.g { color: #9ff0c6; } .hrow .cap span.over { background: #ff5a5f55; color: #fff; }
.ambq { display: flex; gap: 5px; } .ambq div { flex: 1; padding: 5px 6px; border-radius: 9px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 10.5px; text-align: center; } .ambq div.front { border-color: var(--accent); }
.ambq div b { display: block; font-size: 11.5px; }
.lboard .warn { color: #ffb3b5; font-size: 11px; }
.lboard .menu-btn.go { text-align: center; padding: 10px; margin-top: 2px; font-size: 15px; flex: none; } .lboard .menu-btn.go small { display: inline; margin-left: 6px; } .lboard .menu-btn.off { background: #ffffff18; color: var(--muted); }
#hud.lb-open #mm, #hud.lb-open #floorP { visibility: hidden; }
#hud.lb-open .ctl-foot, #hud.tc-open .ctl-foot .touch:not(.stick) { display: none; }
body.touch .tcard { left: 50%; right: auto; transform: translateX(-50%); top: 52px; width: min(380px, 94vw); }
body.touch .tbtns button { padding: 12px 4px 10px; font-size: 15px; }
body.touch .lboard { top: 52px; bottom: 8px; right: 8px; width: min(400px, 96vw); }
body.touch .lo-btn { bottom: 200px; padding: 11px 16px; font-size: 15px; }
@media (max-width: 760px) { .tcard { right: 8px; width: min(330px, 94vw); } .lboard { right: 8px; left: 8px; width: auto; } }
@media (max-height: 520px) { .tcard .step { padding: 3px 2px; } body.touch .tcard { top: 6px; } .lboard, body.touch .lboard { top: 6px; bottom: 6px; } }
/* station life: the fuel gauge on the dashboard, the readiness bars on the MDT, the offer's readiness line, and the
   dispatcher's four little bars per unit (.rd: fuel, condition, the main stock, crew) */
.gauge { display: flex; align-items: center; gap: 5px; font: 900 11px system-ui; color: var(--muted); }
.gauge .bar { width: 54px; height: 7px; } .gauge .bar i { background: var(--accent2); }
.gauge.low .bar i { background: #ffb13b; } .gauge.crit .bar i { background: var(--danger); } .gauge.crit { color: var(--danger); } .gauge.dim { opacity: .45; }
.rdbar { display: flex; align-items: center; gap: 6px; } .rdbar .bar { width: 90px; } .rdbar .bar i { background: var(--accent2); }
.rdbar b { min-width: 46px; text-align: right; font-size: 12.5px; }
.rdbar.low .bar i { background: #ffb13b; } .rdbar.out .bar i { background: var(--danger); } .rdbar.low b { color: #ffb13b; } .rdbar.out b { color: var(--danger); }
.mdt .rdgrace { margin-top: 2px; } .mdt .rdgrace i { background: #9fd0ff; }
.rd { display: inline-flex; gap: 2px; align-items: flex-end; margin-left: 6px; vertical-align: middle; }
.rd i { display: block; width: 5px; height: 14px; border-radius: 2px; background: #ffffff18; position: relative; overflow: hidden; }
.rd i::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); background: var(--c, #3ee08f); }
.warnl { margin-top: 5px; color: #ffb13b; font-size: 12px; font-weight: 800; }
.svcl { color: #9fd0ff; }
/* the dispatcher's map: a unit low (amber), out (red), or in service at its bay (blue) */
.dsp-u.low { filter: drop-shadow(0 0 2px #ffb13b) drop-shadow(0 0 3px #ffb13b); } .dsp-u.out { filter: drop-shadow(0 0 2px #ff5a5f) drop-shadow(0 0 3px #ff5a5f); } .dsp-u.svc { filter: drop-shadow(0 0 2px #9fd0ff) drop-shadow(0 0 3px #9fd0ff); }
#hud #rdT:empty { display: none; }
@media (max-width: 760px) { .rdbar .bar { width: 60px; } }
/* dispatcher depth: the timers, the where card, a match to merge, the language line, an open line, the shift sheet */
.dsp-tm { display: flex; flex-wrap: wrap; gap: 4px; } .dsp-tm.hidden { display: none; }
.dsp-tm span { font: 800 10px system-ui; padding: 2px 7px; border-radius: 999px; background: #ffffff0d; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.dsp-tm span.ok { color: var(--accent2); border-color: #3ee08f55; } .dsp-tm span.late { color: #ffb13b; border-color: #ffb13b66; } .dsp-tm span.live { color: var(--text); }
.dsp-where, .dsp-match, .dsp-int { border-radius: 11px; padding: 6px 8px; font-size: 11.5px; font-weight: 700; }
.dsp-where.hidden, .dsp-match.hidden, .dsp-int.hidden { display: none; }
.dsp-where { border: 1.5px dashed #ffd23f88; background: #ffd23f0a; }
.dsp-where .hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .dsp-where .hd b { color: var(--accent); font-size: 12.5px; }
.dsp-where .hd span { font: 900 9px system-ui; letter-spacing: .1em; color: var(--muted); } .dsp-where .hd.ok { margin: 0; } .dsp-where .hd.ok b { color: var(--accent2); }
.dsp-where .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pill.clue { background: #ffffff12; color: var(--text); font-weight: 800; } .pill.clue.claim { border-color: #ff8a8d77; }
.pill.clue button { background: none; border: 0; color: var(--muted); font: 900 10px system-ui; cursor: pointer; padding: 0 0 0 3px; }
.pill.clue.struck { opacity: .6; text-decoration: line-through; color: #ff8a8d; } .pill.clue.wait { color: #c39bff; border-style: dashed; }
.dsp-where > .pill { cursor: pointer; color: var(--text); } .dsp-where kbd, .dsp-match kbd, .dsp-int kbd, .dsp-aed kbd { font: 900 9px system-ui; background: #00000030; border-radius: 4px; padding: 1px 4px; }
.dsp-match { display: flex; gap: 8px; align-items: center; border: 1.5px solid #58a6ff; background: #58a6ff14; }
.dsp-match .e { font-size: 20px; } .dsp-match .t { flex: 1; min-width: 0; } .dsp-match .t b { display: block; font-size: 12px; } .dsp-match .t span { display: block; color: var(--muted); font-size: 10.5px; }
.dsp-match .menu-btn { width: auto; margin: 0; padding: 7px 10px; font-size: 13px; background: #58a6ff; color: #04122a; }
.dsp-int { border: 1.5px solid #c39bff88; background: #c39bff12; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; } .dsp-int b { color: #dcc6ff; }
.dsp-int .opts { display: flex; flex-direction: column; gap: 3px; width: 100%; } .dsp-int .pill { cursor: pointer; color: var(--text); justify-content: flex-start; } .dsp-int .pill i { color: var(--muted); font-weight: 600; }
.dsp-int .menu-btn { width: auto; margin: 0 0 0 auto; padding: 5px 10px; font-size: 12px; }
.bub.twist { border: 1.5px solid #ff5a5f99; background: #ff5a5f14; } .bub small.upd { display: block; font: 900 8.5px system-ui; letter-spacing: .12em; color: #ff8a8d; }
.bub.snd { font-style: italic; background: transparent; border: 1px dashed #ffffff33; border-radius: 9px; color: #cfdcd4; }
.bub.int { background: #c39bff1c; border: 1px solid #c39bff55; }
.bub .orig { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; font-style: italic; margin-bottom: 2px; }
.kw sup { font-size: 8px; color: var(--muted); margin-left: 1px; }
.dsp-asks.dsp-pad button { border-style: dashed; }
.dsp-ln.dial { border-color: #9fd0ff; background: #9fd0ff14; } .dsp-ln.dial b { color: #9fd0ff; } .dsp-ln.conf { border-color: #c39bff; background: #c39bff14; } .dsp-ln.conf b { color: #c39bff; }
.dsp-switch { width: 100%; text-align: left; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--danger); background: #ff5a5f14; color: var(--text); cursor: pointer; margin-bottom: 6px; }
.dsp-switch b { display: block; font: 900 italic 16px system-ui; } .dsp-switch span { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.dsp-aed { margin: 0 0 6px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; font-weight: 800; } .dsp-aed.ok { border-color: var(--accent2); color: var(--accent2); }
.menu-btn.dsp-aed { width: 100%; }
.dsp-claim { font-size: 11px; font-weight: 700; color: #ffb13b; margin-bottom: 4px; }
.dsp-shd { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 6px; } .dsp-shd .pill { cursor: pointer; color: var(--text); }
.dsp-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.dsp-metric { padding: 6px 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); min-width: 0; }
.dsp-metric small { display: block; font: 900 8.5px system-ui; letter-spacing: .08em; color: var(--muted); } .dsp-metric b { display: block; font: 900 italic 20px system-ui; }
.dsp-metric span { font-size: 10px; color: var(--muted); font-weight: 700; } .dsp-metric i { display: block; font: 900 8.5px system-ui; margin-top: 2px; }
.dsp-metric.ok i { color: var(--accent2); } .dsp-metric.late i { color: #ffb13b; }
.dsp-log { width: 100%; border-collapse: collapse; font-size: 11px; font-weight: 700; } .dsp-log th { font: 900 8.5px system-ui; color: var(--muted); text-align: left; padding: 2px; }
.dsp-log td { padding: 3px 2px; border-top: 1px solid #ffffff10; font-variant-numeric: tabular-nums; } .dsp-log td.ok { color: var(--accent2); } .dsp-log td.late { color: #ffb13b; }
.dsp-ov { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.dsp-ov .dsp-fix { fill: #c39bff18; stroke: #c39bff; stroke-width: 2; stroke-dasharray: 6 4; } .dsp-ov .dsp-lm { fill: none; stroke: #ffd23f; stroke-width: 1.5; stroke-dasharray: 3 4; }
.dsp-cand { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #1a1400; font: 900 11px system-ui; border: 2px solid #1a1400; transform: translateY(50%); }
.dsp-cand.dot { width: 9px; height: 9px; border-width: 1.5px; }
.dsp-pin.hollow { background: #0b141099; border: 2px dashed #ffb13b; color: #ffb13b; font-weight: 900; }
.dsp-plab { display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 7px; background: #0b1410dd; border: 1px solid #ffb13b; color: #ffb13b; font: 900 10px system-ui; white-space: nowrap; }
.dsp-plab.claim { border-color: #ff8a8d; color: #ff8a8d; }
/* the rhythm: dispatch's BUSY pips and TONIGHT chips, the map's TODAY strip, the time row, the pause menu's skips */
.dsp-busy i { font-style: normal; opacity: .6; font-size: 10px; margin-right: 3px; }
.dsp-busy b { color: #3a4250; font-size: 10px; } .dsp-busy b.on { color: #ffb13b; }
.dsp-tonight { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .dsp-tonight:empty { display: none; }
.dsp-tonight .lbl { width: 100%; }
.dsp-tonight .chip, .rh-today .chip { font-size: 10.5px; padding: 2px 7px; border-radius: 9px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.dsp-tonight .chip.now { border-color: #ffb13b; color: #ffd9a0; }
.rh-today { margin-top: 8px; font-size: 11px; } .rh-today canvas { width: 100%; height: 46px; display: block; border-radius: 6px; }
.rh-today .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .rh-today .chip { cursor: pointer; }
.rh-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; }
.rh-row .btn.on { border-color: var(--accent); color: var(--accent); }
/* the Chaos Maker (chaos.js; plan-chaos-maker.md) */
.cm-top { border-color: #c77dff66; }
.cm-bud { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.cm-bud b { color: var(--text); }
.cm-e { display: inline-flex; align-items: center; gap: 5px; } .cm-e .bar { width: 70px; } .cm-e small { color: #c77dff; }
.cm-dots { display: inline-flex; gap: 2px; margin-left: 3px; vertical-align: middle; } .cm-dots i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff22; } .cm-dots i.on { background: #c77dff; }
.cm-left { width: 260px; overflow-y: auto; border-color: #c77dff44; }
.cm-ring { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; color: var(--muted); } .cm-ring b { font-size: 18px; color: #c77dff; }
.cm-pick { width: 300px; border-color: #c77dff66; } .cm-pick.hidden { display: none; }
.cm-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.cm-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 6px; align-items: center; width: 100%; padding: 5px 7px; margin: 2px 0; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); font: 800 11.5px system-ui; text-align: left; cursor: pointer; }
.cm-row small { color: var(--muted); } .cm-row em { font-style: normal; color: #c77dff; font-size: 10.5px; }
.cm-row.on { border-color: #c77dff; background: #c77dff22; } .cm-row.off { opacity: .45; cursor: default; } .cm-row.off em { color: #ff9a9d; }
.cm-tools { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px; max-width: calc(100% - 24px); }
.cm-tool { display: flex; flex-direction: column; align-items: center; width: 64px; padding: 4px 2px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.cm-tool b { font-size: 17px; line-height: 1.2; } .cm-tool small { font: 900 8.5px system-ui; letter-spacing: .08em; color: var(--muted); } .cm-tool.on { border-color: #c77dff; background: #c77dff2a; } .cm-tool.on small { color: #c77dff; }
.cm-hint { flex-basis: 100%; text-align: center; font-size: 10.5px; color: var(--muted); }
.cm-sel { font-size: 24px; filter: drop-shadow(0 0 6px #c77dff); animation: pulse 1s infinite; }
.cm-hov { border-style: dashed !important; }
.dsp-pin.cm-own { box-shadow: 0 0 0 3px #c77dff, 0 3px 0 #0008; } .dsp-pin.cm-brew { opacity: .6; background: #3a2a4a; }
.cm-badge { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.cm-badge .pill { pointer-events: auto; cursor: pointer; color: #c77dff; background: rgba(10, 18, 14, .85); }
.cm-offer { pointer-events: auto; padding: 10px 12px; width: 300px; text-align: center; border-color: #c77dff; } .cm-offer small { display: block; color: var(--muted); margin: 3px 0 6px; } .cm-offer > div { display: flex; gap: 6px; } .cm-offer .menu-btn { margin: 0; }
body.dsp-phone .cm-bud .cm-s { display: none; } body.dsp-phone .cm-left { display: none; } body.dsp-phone .cm-pick { display: block; left: 6px; right: 6px; width: auto; top: auto; bottom: 120px; max-height: 45%; } body.dsp-phone .cm-pick.hidden { display: none; }
body.dsp-phone .cm-tool { width: 52px; }
/* investigations: the case board (main.js caseBoard; plan-investigations.md 7). .st.ok, not .st.av (the caller's avatar clashes) */
.cb { max-width: 760px; margin: 0 auto; }
.cb-top { display: flex; align-items: center; gap: 8px; } .cb-x { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 2px 9px; font-weight: 900; cursor: pointer; }
.cb-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0; padding-bottom: 2px; }
.cb-tab { flex: none; background: var(--panel2); border: 1.5px solid var(--line); color: var(--text); border-radius: 10px; padding: 4px 9px; font: 900 11px system-ui; cursor: pointer; text-align: left; }
.cb-tab small { display: block; font-weight: 700; color: var(--muted); font-size: 9.5px; } .cb-tab.sel { box-shadow: 0 0 0 2px #ffd23f55; }
.cb-head { display: flex; align-items: center; gap: 8px; }
.cb-heat { height: 4px; border-radius: 3px; background: #ffffff14; margin: 6px 0 8px; overflow: hidden; } .cb-heat i { display: block; height: 100%; background: linear-gradient(90deg, #ffb13b, #ff5a5f); }
.cb-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.cb-clue { display: flex; gap: 7px; padding: 5px 7px; border-radius: 9px; background: var(--panel2); margin-top: 4px; font-size: 11.5px; border-left: 3px solid #9fd0ff; }
.cb-clue small { display: block; color: var(--muted); font-size: 10px; } .cb-clue.bad { border-left-color: var(--danger); opacity: .75; }
.cb-fact { display: flex; justify-content: space-between; padding: 4px 7px; border-radius: 8px; background: var(--panel2); margin-top: 4px; font-size: 11.5px; }
.cb-fact.est { color: var(--accent2); box-shadow: inset 0 0 0 1px #3ee08f66; } .cb-fact.conf { color: #ffb13b; }
.cb-lead { display: flex; gap: 6px; align-items: center; font-size: 11px; margin-top: 4px; } .cb-lead .st { margin-left: auto; background: #ffffff12; } .st.ok { background: #3ee08f22; color: #3ee08f; }
.cb-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin-top: 4px; }
.cb-cand { padding: 7px 9px; border-radius: 10px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 11.5px; }
.cb-cand small { display: block; color: var(--muted); font-size: 10px; margin: 2px 0; } .cb-cand.out { opacity: .38; } .cb-cand.acc { border-color: var(--accent); }
.cb-cand .menu-btn { margin-top: 5px; padding: 6px 8px; font-size: 11px; width: 100%; } .cb-ticks { font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .cb-cols { grid-template-columns: 1fr; } }

/* crew roles (crew.js): the crew strip, top middle; RIDE WITH A FRIEND's seat chips; a passenger has no pedals */
#hud .crew-strip { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); gap: 6px; font-size: 11px; padding: 4px 11px; max-width: calc(100vw - 32px); flex-wrap: wrap; justify-content: center; }
#hud .crew-strip .cr { white-space: nowrap; }
#hud .crew-strip .cr.me { color: var(--accent); }
#hud .crew-strip .cr.free { color: var(--muted); cursor: pointer; text-decoration: underline dotted; }
#hud .crew-strip .cr.lock { cursor: pointer; }
#hud .crew-strip .sub { color: var(--muted); font-weight: 700; }
.pill.crew-free { cursor: pointer; border-color: var(--accent); color: var(--accent); }
.pill.crew-free.on { background: var(--accent); color: #111; }
#hud.in-ride .ctl-veh .pedal, #hud.in-ride .ctl-veh .steer, #hud.in-ride .ctl-veh .steerw, #hud.in-ride .ctl-veh [data-hold="hand"] { display: none; }
@media (max-width: 700px) { #hud .crew-strip { top: auto; bottom: 200px; } }
/* consequences (consequences.js): the town report (J), the dispatcher's town block */
.tr-news { margin-top: 8px; padding: 6px 9px; border-radius: 9px; background: #ffd9a014; color: #ffd9a0; font-size: 12px; font-weight: 700; }
.tr-towns { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin-top: 4px; }
.tr-town { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 6px 9px; border-radius: 10px; background: var(--panel2); border: 1.5px solid var(--line); font-size: 11.5px; }
.tr-town.me { border-color: var(--accent); } .tr-town small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.tr-bar { grid-column: 1 / -1; grid-row: 2; height: 4px; border-radius: 3px; background: #ffffff14; overflow: hidden; } .tr-bar i { display: block; height: 100%; }
.tr-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border-radius: 9px; background: var(--panel2); margin-top: 4px; font-size: 11.5px; }
.tr-row > span:nth-child(2) { flex: 1; min-width: 0; } .tr-row small { display: block; color: var(--muted); font-size: 10px; }
.tr-g { font: 900 15px system-ui; width: 16px; text-align: center; } .tr-d { font-weight: 900; font-size: 11px; white-space: nowrap; }
.dsp-town { margin-top: 10px; } .dsp-town .tr-row { padding: 4px 7px; font-size: 11px; }
/* a county disaster (disaster.js): the banner top centre, and in dispatch over the incident list; the towns' meters */
.evbw { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); pointer-events: none; max-width: min(560px, calc(100vw - 32px)); z-index: 3; }
.evb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; padding: 7px 12px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--evc, var(--danger)); box-shadow: 0 0 18px -6px var(--evc, var(--danger)); font-size: 12px; }
.evb b { color: var(--evc, var(--danger)); font: 900 italic 13px system-ui; letter-spacing: .02em; }
.evb .ptag { background: var(--evc, var(--danger)); color: #0b1410; animation: evp 1.6s ease-in-out infinite; }
.evb .evt { font-weight: 900; font-variant-numeric: tabular-nums; }
.evb small { flex-basis: 100%; color: var(--muted); font-size: 10.5px; font-weight: 800; }
@keyframes evp { 50% { opacity: .55; } }
#devb .evb { margin: 0 0 6px; } .evpanel { margin-bottom: 8px; } .evpanel .lbl { font-weight: 900; font-size: 10.5px; }
.evmeter { flex: 1; height: 5px; border-radius: 3px; background: #ffffff14; overflow: hidden; max-width: 90px; } .evmeter i { display: block; height: 100%; }
@media (max-width: 720px) { .evbw { top: 104px; } .evb { font-size: 11px; padding: 5px 9px; } }
/* PvP (pvp.js): the room's toggle, the heat stars, the bust meter, BUSTED and the Pebble Pen */
.pvp-row { gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; } .pvp-row .pill { cursor: pointer; } .pvp-row .pill.on { background: #c78bff; color: #111; border-color: #c78bff; }
#crimeH { position: absolute; inset: 0; pointer-events: none; }
.crime-heat { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); text-align: center; padding: 4px 14px 6px; border-radius: 12px; background: rgba(10, 8, 18, .8); border: 1px solid #c78bff66; }
.crime-heat .stars { font-size: 24px; letter-spacing: 3px; color: #ffd23f; text-shadow: 0 2px 0 #000a; } .crime-heat.hot .stars { color: #ff5a5f; animation: crimeFlash .6s infinite alternate; }
.crime-heat .bar, .crime-bust .bar { height: 4px; border-radius: 3px; background: #ffffff1a; overflow: hidden; margin-top: 3px; } .crime-heat .bar i { display: block; height: 100%; background: #ffd23f; }
.crime-bust { position: absolute; left: 50%; bottom: 170px; transform: translateX(-50%); width: 220px; text-align: center; padding: 6px 10px; border-radius: 12px; background: rgba(30, 6, 10, .85); border: 2px solid #ff5a5f; }
.crime-bust .lbl { color: #ff8a8d; } .crime-bust .bar { height: 8px; } .crime-bust .bar i { display: block; height: 100%; background: #ff5a5f; }
.crime-pen { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); min-width: 280px; text-align: center; padding: 18px 22px; border-radius: 16px; background: rgba(12, 8, 20, .92); border: 2px solid #c78bff; pointer-events: auto; overflow: hidden; }
.crime-pen .h { font-size: 30px; color: #c78bff; display: block; } .crime-pen .menu-btn { margin-top: 10px; }
.crime-pen .bars { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 34px, #ffffff14 34px 40px); pointer-events: none; }
@keyframes crimeFlash { from { opacity: 1; } to { opacity: .55; } }

/* services (plan-services.md): the picker's service tiles and apparatus strip; the station's vehicle bay */
.svcs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.svc { cursor: pointer; padding: 10px 6px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); border-top: 4px solid var(--c, var(--line)); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.svc .e { font-size: 30px; line-height: 1.1; } .svc b { font-size: 13px; line-height: 1.1; } .svc small { color: var(--muted); font-size: 10px; font-weight: 800; }
.svc.sel { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 3px #ffd23f40; }
.svc.off, .seat.off { opacity: .5; cursor: default; }
.grid.apps { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 8px; }
.grid.apps .seat { padding: 9px 10px; } .grid.apps .seat .e { font-size: 26px; }
@media (max-width: 760px) { .svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .svc { flex-direction: row; text-align: left; gap: 8px; padding: 8px 10px; } .svc .e { font-size: 24px; } .svc small { display: none; } }
.bay-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.bay-card { cursor: pointer; padding: 10px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--line); border-top: 4px solid var(--c, var(--line)); }
.bay-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px #ffd23f40; } .bay-card.off { opacity: .5; cursor: default; }
.bay-card .e { font-size: 24px; } .bay-card .bar { height: 5px; border-radius: 3px; background: #ffffff18; margin-top: 6px; overflow: hidden; } .bay-card .bar i { display: block; height: 100%; background: var(--accent2); }
.mdt .bay-chip { cursor: pointer; margin-top: 6px; display: inline-flex; }

/* ---- the HUD's fixed pieces (main.js hudBuild), placed here so a touch screen can move them */
/* (--sat/--sar/--sab/--sal: the safe-area insets, at the top of this file) */
#mdt { position: absolute; left: 14px; top: 14px; }
#hud .topbar { position: absolute; right: 14px; top: 14px; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#hud .topbar > div { flex-basis: 100%; text-align: right; margin-top: 0 !important; }   /* (a fine owing, a citizen's fuel and licence: a line under it, not after the ☰) */
#menuB { width: 26px; height: 26px; font-size: 13px; cursor: pointer; }
#hud #mm { position: absolute; right: 14px; bottom: 14px; }
#floorP { position: absolute; right: 14px; top: 58px; width: 184px; }

/* ---- touch: a phone or a tablet. Everything clear of the notch and the home bar, every target 44 px or more, and
   on a phone the panels folded to chips: the MDT to its top line (tap it), the radio log to its last two lines */
body.touch .scr { padding: max(18px, var(--rsat)) max(14px, calc(var(--rsar) + 8px)) calc(24px + var(--rsab)) max(14px, calc(var(--rsal) + 8px)); }   /* [duo] (8 px clear of a rail: the punch's box is padded 4) */
body.touch .scr .pill[data-ctl], body.touch .scr .pill[data-hand], body.touch .scr .pill[data-steer], body.touch .scr .pill[data-units], body.touch .scr .pill[data-q], body.touch .scr .pill[data-rh], body.touch .scr .pill[data-skip], body.touch .scr .pill[data-pvp], body.touch .scr .pill[data-ride], body.touch .scr .pill[data-trial], body.touch #rideRf { min-height: 44px; padding: 6px 13px; font-size: 12px; cursor: pointer; }
body.touch .scr .pill[style*="cursor"], body.touch .scr .pill[data-daily], body.touch .scr .pill[data-car] { min-height: 40px; padding: 6px 12px; display: inline-flex; align-items: center; }
body.touch .menu-btn { min-height: 48px; }
body.touch .scr #go { position: sticky; bottom: max(8px, var(--sab)); z-index: 2; box-shadow: 0 6px 24px #000c; }   /* (the seat picker's CLOCK IN: on screen, not under the last card) */
/* [works] the placement tool on a touch screen: fits and scrolls, its rows and chips thumb-sized */
body.touch #big .wkt { margin: max(8px, var(--sat)) auto 8px !important; max-height: calc(100vh - 16px - var(--sat) - var(--sab)); overflow-y: auto; pointer-events: auto; }
body.touch #big .wkt .hd { display: flex; align-items: center; gap: 8px; }
body.touch #big .wkt [data-wk] { min-height: 40px; display: flex; align-items: center; gap: 0 6px; flex-wrap: wrap; }
body.touch #big .wkt .pill[data-wk] { display: inline-flex; min-width: 40px; justify-content: center; }
body.touch #big .wkt .wk-ks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
@media (max-width: 560px) { body.touch #big .wkt .wk-cols { flex-direction: column; } }
body.touch input.name { min-height: 44px; font-size: 16px; }   /* (16 px: iOS doesn't zoom into it) */
body.touch #hud .topbar { top: calc(8px + var(--sat)); right: calc(8px + var(--sar) + var(--ctr, 0px)); padding: 2px 2px 2px 10px; max-width: calc(100vw - 16px - var(--sal) - var(--sar) - var(--ctr, 0px) - var(--ctl, 0px)); white-space: nowrap; }   /* [duo] (--ctl/--ctr: the punch's box in that top corner, main.js) */
body.touch #hud .topbar > span:not(.btn) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.touch #menuB { width: 44px; height: 44px; font-size: 20px; flex: none; }
body.touch #hud #mm { top: calc(var(--tbh, 48px) + 14px + var(--sat)); right: calc(8px + var(--sar)); bottom: auto; width: 128px; height: 128px; }
body.touch #floorP { top: calc(200px + var(--sat)); right: calc(8px + var(--sar)); width: min(184px, 46vw); }
body.touch #mdt { left: calc(8px + var(--sal) + var(--ctl, 0px)); top: calc(8px + var(--sat)); max-height: calc(100% - 220px - var(--sat) - var(--sab)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.touch #mdt > :first-child { cursor: pointer; min-height: 40px; }
body.touch #hud .rd-m { top: calc(64px + var(--sat)); }
body.touch #hud .rd-strip { min-height: 40px; }
body.touch #hud .rd-ring button { min-height: 44px; }
body.touch #hud .rd-ring button kbd { display: none; }   /* (the keys' numbers: no keyboard here) */
body.touch #hud .rd-ring { max-height: calc(100vh - 80px - var(--sat) - var(--sab)); overflow-y: auto; }
@media (max-height: 500px) and (orientation: landscape) { body.touch #hud .rd-m:has(.rd-ring) { max-width: min(460px, calc(100vw - 268px - var(--sal) - var(--sar))) !important; z-index: 13; } body.touch #hud .rd-ring { max-height: calc(100vh - 70px - var(--sat) - var(--sab)); } }
body.touch #hud #nav-hud .nb, body.touch #hud #nav-hud .fl, body.touch #hud #nav-hud .chip .x { min-height: 40px; display: flex; align-items: center; }
body.touch #hud #nav-hud .chip .x { min-width: 40px; justify-content: center; }
/* [duo] a tablet: Go to just under the seat's keys (BOARD...), over the vbar (a phone's and the mid class's below) */
body.touch #hud #nav-hud { top: calc(46% + 8px); right: calc(12px + var(--sar)); }
/* [duo] the mid size class (a tablet's layout on a screen 501-700 px tall on its side: the Duo open, 866 x 587 in its
   home-screen app): Go to beside the vbar and the seat's keys (BOARD...) left of it, anchored to the bottom as the vbar
   is, so they stay clear of it and of the minimap whatever the height */
@media (orientation: landscape) and (min-height: 501px) and (max-height: 700px) {
  body.touch #hud #nav-hud { right: calc(166px + var(--sar)); top: auto; bottom: calc(166px + var(--sab)); }
  body.touch .vkeys { right: calc(280px + var(--sar)); bottom: calc(166px + var(--sab)); width: auto; flex-direction: row-reverse; }   /* (left of Go to, clear of a job's card on the right) */
}
}
body.touch #hud #nav-hud .row { min-height: 40px; align-items: center; }
body.touch .prompt.onv { top: calc(112px + var(--sat)); }
body.touch .prompt.act { bottom: 200px; }
body.touch .prompt.tap { box-shadow: 0 0 0 3px #ffd23f40; }
body.touch #hud .offer { top: calc(112px + var(--sat)); z-index: 12; }
body.touch .offer .menu-btn { min-height: 48px; }
/* the vbar's ready 🚪: its word to the left of the whole bar, not over the buttons above it */
#hud .vbar .touch.ready { position: static; }
#hud .vbar .touch.ready::before { display: none; }
#hud .vbar .touch .tip { right: calc(100% + 8px); left: auto; top: 0; bottom: auto; transform: none; }
/* the on-foot buttons' word (WORK's, GET IN's, the cone's): over the cluster, not over the buttons beside it */
#hud .ctl-foot .touch .tip { position: fixed; right: calc(10px + var(--sar)); left: auto; top: auto; bottom: calc(246px + var(--sab)); transform: none; max-width: calc(100vw - 20px - var(--sal) - var(--sar)); }
body.lefty #hud .ctl-foot .touch .tip { position: absolute; right: auto; left: calc(100% + 8px); top: 50%; bottom: auto; transform: translateY(-50%); }   /* (mirrored, each button's transformed: beside it, as it was) */
@media (max-height: 500px) and (orientation: landscape) { #hud .ctl-foot .touch .tip { right: calc(240px + var(--sar)); bottom: calc(150px + var(--sab)); max-width: calc(100vw - 420px - var(--sal) - var(--sar)); } }
/* [duo] the cover screen's slide-out menus (main.js [data-fan]): the less-used buttons behind ⋯, press it and slide to
   one and let go, or tap it and tap one. Kept out: on foot the stick, WORK, GET IN (LOW when offered); driving the
   wheel, the pedals, the hand brake, the siren, the camera, the door and any button that's lit (ready) */
.fan-t { display: none; }
@media (max-height: 500px) and (orientation: landscape), (max-width: 560px) and (orientation: portrait) {
  body.touch #hud .fan-t { display: flex; flex-direction: column; align-items: center; justify-content: center; position: absolute; width: 48px; height: 48px; border-radius: 50%; background: rgba(10, 18, 14, .7); border: 2px solid #ffffff40; color: #fff; font: 900 20px/1 system-ui; pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
  body.touch #hud .fan-t small { font: 900 8px system-ui; letter-spacing: .06em; color: var(--muted); margin-top: 1px; }
  body.touch #hud .fan-open > .fan-t { border-color: var(--accent); color: var(--accent); background: rgba(40, 34, 6, .85); }
  body.touch #hud .fan-hov { border-color: var(--accent) !important; background: rgba(255, 210, 63, .35) !important; }
  body.touch #hud .ctl-foot > .fan-t { right: 30px; bottom: 112px; }
  body.touch #hud .ctl-foot:not(.fan-open) > :is([data-t="R"], [data-t="G"], [data-t="C"], [data-t="B"]) { display: none; }
  body.touch #hud .ctl-foot.fan-open > :is([data-t="R"], [data-t="G"], [data-t="C"], [data-t="B"]) { width: 48px !important; height: 48px !important; font-size: 11px; z-index: 20; background: rgba(10, 18, 14, .9); }
  body.touch #hud .vbar > .fan-t { position: static; width: 44px; height: 44px; }
  /* (the bar's rows from the bottom up, the kept buttons and ⋯ first: opened, the rest go on above and nothing under the
     thumb moves) */
  body.touch #hud .vbar { display: flex; flex-wrap: wrap-reverse; align-content: flex-start; justify-content: flex-start; }
  body.touch #hud .vbar > :is([data-t="Q"], [data-t="C"], [data-t="F"], .fan-t) { order: -1; }
  body.touch #hud .vbar:not(.fan-open) > .touch:not([data-t="F"]):not([data-t="Q"]):not([data-t="C"]):not(.ready) { display: none; }
  body.touch #hud .vbar.fan-open { z-index: 20; }
}
/* (on its side: the on-foot menu a row to the left of ⋯; upright: a column above it) */
@media (max-height: 500px) and (orientation: landscape) {
  body.touch #hud .ctl-foot.fan-open > [data-t="R"] { right: 88px !important; bottom: 112px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="G"] { right: 144px !important; bottom: 112px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="C"] { right: 200px !important; bottom: 112px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="B"] { right: 256px !important; bottom: 112px !important; }
}
@media (max-width: 560px) and (orientation: portrait) {
  body.touch #hud .vbar { flex-direction: row-reverse; width: 144px; gap: 6px; }
  body.touch #hud .ctl-foot.fan-open > [data-t="R"] { right: 30px !important; bottom: 170px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="G"] { right: 30px !important; bottom: 226px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="C"] { right: 30px !important; bottom: 282px !important; }
  body.touch #hud .ctl-foot.fan-open > [data-t="B"] { right: 30px !important; bottom: 338px !important; }
  body.touch #hud .ctl-foot.fan-open > #tLow { visibility: hidden; }
}
/* [duo] the cover screen: the REP chip beside the phone's button (citphone.js: under the minimap), not under it */
@media (max-height: 500px) and (orientation: landscape) { html body.touch #citChip { right: calc(72px + var(--sar)) !important; top: calc(var(--tbh, 46px) + 140px + var(--sat)) !important; } }
@media (max-width: 560px) and (orientation: portrait) { html body.touch #citChip { right: calc(72px + var(--sar)) !important; top: calc(var(--tbh, 48px) + 160px + var(--sat)) !important; } html body.touch #hud .vkeys { bottom: calc(322px + var(--sab)); right: calc(72px + var(--sar)); }
  /* (the right-hand column bottom up: the vbar, the job's dock, the seat's keys, the phone's button under the minimap; the
     job's card down the left under the top bar, where the MDT is on a service seat) */
  html body.touch #citJob { left: calc(8px + var(--sal)) !important; right: auto !important; top: calc(var(--tbh, 48px) + 14px + var(--sat)) !important; width: min(260px, calc(100vw - 156px - var(--sal) - var(--sar))) !important; max-height: calc(100% - var(--tbh, 48px) - 14px - 392px - var(--sat) - var(--sab)); overflow-y: auto; } }
@media (max-height: 500px) and (orientation: landscape) { html body.touch #hud .vkeys { right: calc(72px + var(--sar)); } }
@media (max-width: 560px) and (orientation: portrait) { body.touch.trk-job #citChip { display: none !important; } html body.touch.trk-job #trk-dash { right: calc(72px + var(--sar)) !important; } html body.touch.trk-job #trk-dash .row { flex-wrap: wrap !important; } html body.touch.trk-job #hud .vkeys { right: calc(8px + var(--sar)); } html body.touch.trk-job #cpFab { left: auto !important; right: calc(8px + var(--sar)) !important; bottom: auto !important; } html body.touch.trk-job #hud #nav-hud { bottom: calc(250px + var(--sab)); } }   /* (the truck's dash clear of the phone's button, wrapped to fit; the seat's keys under the phone's button) */   /* (the truck's dash across there: REP's in the phone) */   /* (beside the phone's button, not under it) */
/* [duo] the ticket kiosk's screen (flights.js #flk): inside the whole safe area, rails and all */
#flk { padding: max(8px, var(--rsat)) max(8px, var(--rsar)) max(8px, var(--rsab)) max(8px, var(--rsal)) !important; }
#flk > div { max-height: 100% !important; }
/* [duo] the title on a small screen: the words on a dark wash, not on the bright sky and haze */
@media (max-height: 700px), (max-width: 700px) {
  #ui > .scr:has(#play) { background: linear-gradient(90deg, rgba(11, 20, 16, .84) 0, rgba(11, 20, 16, .66) 400px, rgba(11, 20, 16, 0) 620px); }
}
/* the seat's keys with no button of their own (main.js hudVkeys): the drone, the works tool, the plate, the catch */
.vkeys { position: absolute; right: calc(14px + var(--sar)); bottom: calc(420px + var(--sab)); display: flex; flex-wrap: wrap-reverse; flex-direction: row-reverse; gap: 6px; width: 104px; pointer-events: none; }
#hud.on-foot .vkeys { bottom: calc(250px + var(--sab)); }
#hud .vkeys .touch.vk { position: static; width: 48px; height: 48px; font-size: 17px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.vkeys .touch.vk small { font: 900 7.5px system-ui; letter-spacing: .04em; color: var(--muted); }
#hud:has(#big > *) .vkeys, body.touch #hud:has(#big > *) .rd-m, body.touch #hud:has(#big > *) #nav-hud, body.touch #hud:has(#big .scr) .offer { display: none; }   /* (a menu or a board open: nothing drawn over it) */
body.touch #big .pill { min-height: 40px; display: inline-flex; align-items: center; }
/* [drone] up: the on-foot stick flies it (WORK marks), the pedals put away */
#hud.drone-up .ctl-veh { display: none; }
#hud.drone-up.in-veh .ctl-foot { display: block; }
/* the radio log: on a touch screen its last two lines, and each fades after a while */
body.touch #hud .feed div:not(:nth-last-child(-n+2)) { display: none; }
body.touch #hud .feed div { animation: fin .25s ease-out, fout .6s 12s forwards; }
@keyframes fout { to { opacity: 0; visibility: hidden; } }

/* the dispatch desk on a phone: its tabs and the view's turn buttons big enough for a thumb */
body.touch.dsp-phone .dsp-tab { height: 40px; line-height: 28px; padding: 5px 16px 5px 10px; }
body.touch.dsp-phone .dsp-rot .btn { width: 44px; height: 44px; }
/* (the desk's top bar on a phone: the towns keep most of it, the chips scroll after them, the ☰ always at the end;
   the panels under the bar moved down to clear it) */
body.dsp-phone .dsp-top { overflow-x: auto; scrollbar-width: none; }
body.dsp-phone .dsp-top::-webkit-scrollbar { display: none; }
body.dsp-phone .dsp-tabs { flex: 0 0 auto; width: min(62%, 300px); min-width: 120px; }
body.dsp-phone .dsp-top > .btn:last-child { position: sticky; right: -6px; flex: none; width: 40px !important; height: 40px !important; font-size: 18px; background: #0d1712; z-index: 1; }
body.touch.dsp-phone .dsp-top .pill { min-height: 32px; }
body.touch.dsp-phone .rd-eb, body.touch.dsp-phone .rd-dr, body.touch.dsp-phone #cadqp, body.touch.dsp-phone #cvpp { top: 60px !important; }
body.touch.dsp-phone .rd-dr.shut { top: 60px !important; right: auto !important; left: 6px; max-width: calc(50vw - 12px); }
body.touch.dsp-phone #cadqp { max-width: calc(50vw - 12px); }
body.touch .rd-hd, body.touch .rd-ch { min-height: 36px; }
body.touch .dsp-asks button, body.touch .dsp-sheet .menu-btn { min-height: 44px; }
/* [duo] the dispatch desk (dispatch.js: its pieces placed in #hud) inside the safe area as a whole, each side its own
   inset; its tags over the map stay on the map's own coordinates (the viewport's) */
#hud:has(> .dsp-dtop) { top: var(--rsat); right: var(--rsar); bottom: var(--rsab); left: var(--rsal); }
#hud:has(> .dsp-dtop) > #dtags { inset: calc(0px - var(--rsat)) calc(0px - var(--rsar)) calc(0px - var(--rsab)) calc(0px - var(--rsal)) !important; }

/* the seats' own cards (ems.js, scent.js, tactical.js, crew.js's ride, arrest.js): on a phone under the minimap,
   out of the controls (their buttons are taps already) */
@media (max-width: 700px) and (orientation: portrait) {
  body.touch #hud #ems-hud, body.touch #hud #k9-hud, body.touch #hud #tac-hud, body.touch #hud #ride-hud { top: calc(196px + var(--sat)); bottom: auto; width: auto; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); transform: none; max-height: calc(100% - 196px - 420px); overflow-y: auto; }
  body.touch #hud #arr-hud { bottom: auto; top: calc(196px + var(--sat)); right: calc(8px + var(--sar)); max-height: calc(100% - 196px - 250px); overflow-y: auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.touch #hud #ems-hud, body.touch #hud #k9-hud, body.touch #hud #tac-hud, body.touch #hud #ride-hud { top: calc(58px + var(--sat)); bottom: auto; width: min(460px, calc(100vw - 520px - var(--sal) - var(--sar))); max-height: calc(100% - 64px - 150px); overflow-y: auto; }
  body.touch #hud #arr-hud { bottom: auto; top: calc(6px + var(--sat)); right: auto; left: calc(252px + var(--sal)); width: min(360px, calc(100vw - 520px - var(--sal) - var(--sar))); max-height: calc(100% - 160px); overflow-y: auto; }
}
/* every button in the HUD, its boards and cards a thumb's size; the wildfire board (wildhud.js) across a phone */
body.touch #hud button, body.touch #wfboard button, body.touch #big button { min-height: 40px; min-width: 40px; }
body.touch #wfboard { max-height: calc(100% - 80px - var(--sat) - var(--sab)) !important; }
@media (max-width: 700px) and (orientation: portrait) { body.touch #wfboard { top: calc(62px + var(--sat)) !important; left: calc(8px + var(--sal)); right: calc(8px + var(--sar)) !important; width: auto !important; max-height: calc(100% - 480px) !important; } }
/* [hwy] the Traffic Car's radar panel, its cards and the road block button (main.js hudTp: inline, so !important) */
body.touch #hud .tp-radar button, body.touch #hud .tp-card button, body.touch #hud .tp-ck button { min-height: 40px; }
@media (max-width: 700px) and (orientation: portrait) {
  body.touch #hud .tp-radar { bottom: auto !important; top: calc(196px + var(--sat)) !important; }
  body.touch #hud .tp-card { right: calc(8px + var(--sar)) !important; width: min(290px, calc(100vw - 16px - var(--sal) - var(--sar))) !important; max-height: calc(100% - 196px - 420px); overflow-y: auto; }
  body.touch #hud .tp-rb { left: calc(8px + var(--sal)) !important; bottom: calc(348px + var(--sab)) !important; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.touch #hud .tp-radar { bottom: auto !important; top: calc(58px + var(--sat)) !important; max-height: calc(100% - 180px); overflow-y: auto; }
  body.touch #hud .tp-card { top: calc(58px + var(--sat)) !important; right: calc(128px + var(--sar)) !important; max-height: calc(100% - 180px); overflow-y: auto; }
  body.touch #hud .tp-ck { top: calc(58px + var(--sat)) !important; left: calc(252px + var(--sal)) !important; max-height: calc(100% - 180px); overflow-y: auto; }
  body.touch #hud .tp-rb { left: calc(8px + var(--sal)) !important; bottom: auto !important; top: calc(162px + var(--sat)) !important; }
}
/* fire+ the pump panel, the nozzle and the crew's calls (crew.js #engH): off the left-hand stack */
body.touch #hud #engH .pill { min-height: 38px; display: inline-flex; align-items: center; }
@media (max-width: 700px) and (orientation: portrait) { body.touch #hud #engH { top: calc(196px + var(--sat)) !important; left: calc(8px + var(--sal)) !important; max-width: calc(100vw - 132px - var(--sal) - var(--sar)) !important; max-height: calc(100% - 196px - 360px); overflow-y: auto; } }
@media (max-height: 500px) and (orientation: landscape) { body.touch #hud #engH { top: calc(58px + var(--sat)) !important; left: calc(252px + var(--sal)) !important; max-height: calc(100% - 180px); overflow-y: auto; } }
/* fire+ the maydays and cues (#fireH), the car card and the aerial's gauges (#rigH): under the minimap on a phone */
@media (max-width: 700px) and (orientation: portrait) { body.touch #hud #fireH { top: calc(196px + var(--sat)) !important; } body.touch #hud #rigH { top: calc(196px + var(--sat)) !important; right: calc(8px + var(--sar)) !important; max-width: calc(100vw - 16px - var(--sal) - var(--sar)) !important; } }
@media (max-height: 500px) and (orientation: landscape) { body.touch #hud #fireH { top: calc(58px + var(--sat)) !important; max-width: calc(100vw - 520px - var(--sal) - var(--sar)) !important; } body.touch #hud #rigH { top: calc(58px + var(--sat)) !important; right: calc(128px + var(--sar)) !important; max-width: min(340px, calc(100vw - 520px - var(--sal) - var(--sar))) !important; } }
/* [drone] its card: up out of the controls */
body.touch #droneH { bottom: auto !important; top: calc(196px + var(--sat)); max-width: calc(100vw - 16px - var(--sal) - var(--sar)) !important; }
@media (max-height: 500px) and (orientation: landscape) { body.touch #droneH { top: calc(58px + var(--sat)); max-width: min(420px, calc(100vw - 520px - var(--sal) - var(--sar))) !important; } }
/* [animal] the catch panel: off the controls, its tools tappable (1-7) */
body.touch #hud #an-hud { bottom: auto; top: calc(196px + var(--sat)); min-width: 0; width: min(380px, calc(100vw - 16px - var(--sal) - var(--sar))); }
body.touch #hud #an-hud .tb { flex-wrap: wrap; pointer-events: auto; }
body.touch #hud #an-hud .tb span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
@media (max-height: 500px) and (orientation: landscape) { body.touch #hud #an-hud { top: calc(58px + var(--sat)); width: min(380px, calc(100vw - 520px - var(--sal) - var(--sar))); } }

/* the Citizen seat's pieces (cithud.js, jobhud.js: placed inline, so !important): clear of the pedals and the minimap */
body.touch #citChip { top: calc(var(--tbh, 48px) + 146px + var(--sat)) !important; right: calc(8px + var(--sar)) !important; }
/* [phone2] the phone (#citPhone, #cpFab, #cpBan) places itself clear of the controls and brings its own CSS: citphone.js */
body.touch #citJob { right: calc(8px + var(--sar)) !important; bottom: auto !important; top: calc(236px + var(--sat)) !important; width: min(260px, calc(100vw - 16px - var(--sal) - var(--sar))) !important; }
body.touch #citAid { bottom: auto !important; top: calc(196px + var(--sat)) !important; width: min(340px, calc(100vw - 16px - var(--sal) - var(--sar))) !important; }
body.touch #citAid .menu-btn, body.touch #citJob button { min-height: 40px; }
body.touch #citPick .pill, body.touch #citAid .pill, body.touch #citRc .pill, body.touch #citJob .pill, body.touch #citSlip .pill, body.touch #citAsx .pill { min-height: 38px; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 4px 12px; }

/* a phone held upright: the MDT and the minimap under the top bar; down the left, over the wheel: the dash, the radio
   strip, Go to; the seat's keys over the vbar on the right */
@media (max-width: 700px) and (orientation: portrait) {
  body.touch #hud .topbar { font-size: 11px; gap: 6px; }
  body.touch #mdt { top: calc(var(--tbh, 48px) + 14px + var(--sat)); width: min(236px, calc(100vw - 156px - var(--sal) - var(--sar))); max-height: calc(100% - 62px - 356px - var(--sat) - var(--sab)); padding: 8px 10px; }
  body.touch #hud #mm { top: calc(var(--tbh, 48px) + 14px + var(--sat)); width: 124px; height: 124px; }
  body.touch #hud .dash { left: calc(8px + var(--sal)); transform: none; bottom: calc(184px + var(--sab)); max-width: calc(100vw - 172px - var(--sal) - var(--sar)); flex-wrap: wrap; gap: 4px 8px; padding: 4px 10px; }
  body.touch #hud .dash .speed { font-size: 24px; }
  body.touch #hud .rd-m { left: calc(8px + var(--sal)); right: auto; top: auto; bottom: calc(252px + var(--sab)); transform: none; flex-direction: column-reverse; max-width: calc(100vw - 16px - var(--sal) - var(--sar)); }
  body.touch #hud #nav-hud { left: calc(8px + var(--sal)); right: auto; top: auto; bottom: calc(300px + var(--sab)); align-items: flex-start; max-width: calc(100vw - 16px - var(--sal) - var(--sar)); }
  body.touch #hud .feed { display: block; left: calc(8px + var(--sal)) !important; width: min(300px, calc(100vw - 156px - var(--sal) - var(--sar))) !important; }
  body.touch .prompt.onv { top: calc(196px + var(--sat)); width: max-content; max-width: calc(100vw - 24px - var(--sal) - var(--sar)); }
  body.touch .prompt.act { left: calc(8px + var(--sal)); right: auto; transform: none; bottom: calc(420px + var(--sab)); max-width: calc(100vw - 132px - var(--sal) - var(--sar)); }
  body.touch #hud.on-foot .prompt.act { bottom: calc(350px + var(--sab)); }
  body.touch #hud .offer { left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); width: auto; transform: none; top: calc(var(--tbh, 48px) + 14px + var(--sat)); }
  body.touch #hud.offer-on #mdt { visibility: hidden; }
  body.touch #mdt.min > :not(:first-child) { display: none; }
  body.touch #mdt > :first-child::after { content: '▴'; margin-left: auto; padding-left: 6px; color: var(--muted); font-size: 13px; }
  body.touch #mdt.min > :first-child::after { content: '▾'; }
  body.touch #mdt.min > :first-child { margin-bottom: 0; }
  body.touch #hud .crew-strip { top: auto; bottom: calc(352px + var(--sab)); }
  body.touch #hud .evbw { top: calc(196px + var(--sat)); }
  /* (left-handed: the wheel's on the right and the vbar on the left, so the stack and the tray swap sides) */
  body.touch.lefty #hud .dash, body.touch.lefty #hud .rd-m, body.touch.lefty #hud #nav-hud, body.touch.lefty .prompt.act { left: auto; right: calc(8px + var(--sar)); }
  body.touch.lefty #hud #nav-hud { align-items: flex-end; }
  body.touch.lefty .vkeys { right: auto; left: calc(14px + var(--sal)); flex-direction: row; }
  /* [duo] the hand brake over the brake, off the wheel; the seat's keys (BOARD...) clear of the minimap; the MDT's title
     on one line */
  body.touch #hud .ctl-veh .touch[data-hold="hand"] { right: 102px !important; bottom: 120px !important; }
  body.touch .vkeys { bottom: calc(372px + var(--sab)); }
  body.touch #mdt .hd > div:not(.ic) { flex: 1; min-width: 0; }
  body.touch #mdt .hd b.h { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.touch #hud .vbar .touch .tip { right: 0; left: auto; top: auto; bottom: calc(100% + 8px); transform: none; }   /* (the door's word over it, not on the dash) */

}
/* a phone on its side: the MDT top left (the radio strip and Go to under it while it's folded, beside it while it's
   open), the top bar and the minimap top right, the vbar along the bottom between the wheel and the pedals, the dash
   over it; the hand brake over the brake */
@media (max-height: 500px) and (orientation: landscape) {
  body.touch #hud .topbar { top: calc(6px + var(--sat)); max-width: calc(100vw - 268px - var(--sal) - var(--sar) - var(--ctr, 0px) - var(--ctl, 0px)); }
  body.touch #mdt { top: calc(6px + var(--sat)); width: 236px; max-height: calc(100% - 172px - var(--sat) - var(--sab)); padding: 7px 10px; }
  body.touch #hud #mm { top: calc(var(--tbh, 46px) + 12px + var(--sat)); width: 108px; height: 108px; }
  body.touch #floorP { top: calc(170px + var(--sat)); }
  body.touch #hud .feed { display: none; }
  body.touch #hud .dash { bottom: calc(160px + var(--sab)); padding: 3px 10px; }   /* [duo] (over the wheel's top, not on its ring) */
  body.touch #hud.on-foot .dash { bottom: calc(8px + var(--sab)); }
  body.touch #hud .dash .speed { font-size: 22px; }
  body.touch #hud .vbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 6px; width: min(436px, calc(100% - 340px)); grid-template-columns: repeat(auto-fill, 44px); justify-content: center; gap: 5px; }
  body.touch .vbar .touch { width: 44px; height: 44px; }
  body.touch.lefty #hud .vbar { transform: translateX(-50%) scaleX(-1); }   /* (left-handed: mirrored back, as the rest are) */
  body.touch #hud .vbar .touch .tip { right: auto; left: 50%; top: auto; bottom: calc(100% + 8px); transform: translateX(-50%); }   /* [duo] (the vbar's one row now: just over it, not on the dash) */
  body.touch #hud .ctl-veh .touch[data-hold="hand"] { right: 112px !important; bottom: 122px !important; }
  body.touch .steerw { width: 132px; height: 132px; }   /* [duo] (158 was a third of the cover screen's height) */
  body.touch #hud .rd-m { left: calc(8px + var(--sal)); top: calc(70px + var(--sat)); transform: none; max-width: 236px; }
  body.touch #hud #nav-hud { left: calc(8px + var(--sal)); right: auto; top: calc(116px + var(--sat)); align-items: flex-start; max-width: 300px; }
  body.touch #hud:has(#mdt:not(.min)) .rd-m { left: calc(252px + var(--sal)); top: calc(6px + var(--sat)); max-width: calc(100vw - 252px - 380px); min-width: 170px; }
  body.touch #hud:has(#mdt:not(.min)) #nav-hud { left: calc(252px + var(--sal)); top: calc(54px + var(--sat)); }
  body.touch #mdt.min > :not(:first-child) { display: none; }
  body.touch #mdt > :first-child::after { content: '▴'; margin-left: auto; padding-left: 6px; color: var(--muted); font-size: 13px; }
  body.touch #mdt.min > :first-child::after { content: '▾'; }
  body.touch #mdt.min > :first-child { margin-bottom: 0; }
  body.touch .prompt.onv { top: calc(64px + var(--sat)); max-width: min(360px, calc(100vw - 520px - var(--sal) - var(--sar))); }
  body.touch .prompt.act { bottom: calc(212px + var(--sab)); max-width: min(380px, calc(100vw - 460px - var(--sal) - var(--sar))); }
  body.touch #hud.on-foot .prompt.act { bottom: calc(70px + var(--sab)); }
  body.touch #hud .offer { left: calc(8px + var(--sal)); top: calc(6px + var(--sat)); transform: none; width: min(400px, 48vw); max-height: calc(100% - 12px); overflow-y: auto; }
  body.touch #hud.offer-on #mdt { visibility: hidden; }
  body.touch .vkeys { right: calc(8px + var(--sar)); bottom: calc(160px + var(--sab)); width: auto; max-width: 50vw; }
  body.touch #hud.on-foot .vkeys { right: auto; left: calc(22px + var(--sal)); bottom: calc(158px + var(--sab)); flex-direction: row; max-width: calc(50vw - var(--sal)); }   /* [duo] (over the stick, not on the dash)
  body.touch #hud .crew-strip { top: auto; bottom: calc(212px + var(--sab)); }
  body.touch #hud .evbw { top: calc(64px + var(--sat)); }
  body.touch #citChip { top: calc(var(--tbh, 46px) + 126px + var(--sat)) !important; }
  /* ([phone2] the phone: citphone.js places it) */
  body.touch #citJob { top: calc(var(--tbh, 46px) + 8px + var(--sat)) !important; right: calc(128px + var(--sar) + var(--ctr, 0px)) !important; }   /* [duo] (under the top bar however tall it is) */
  body.touch #citAid { top: calc(58px + var(--sat)) !important; width: min(340px, calc(100vw - 520px - var(--sal) - var(--sar))) !important; max-height: calc(100% - 64px); overflow-y: auto; }
}

/* [callux] the call screen, uncluttered (iPad and phone): the lines one row of small chips; on a call the panel's full
   height in four bands (the caller, what they're saying, the card and questions scrolling, the priority and SEND HELP
   pinned at the bottom), the rarer endings under MORE; a narrow top bar keeps the clock, the score and ASSIST, the rest
   behind ⋯ (dispatch.js callSkel, renderLines, topmore) */
body:not(.dsp-phone) .dsp-left { width: 350px; }
.dsp-lines { flex: none; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.dsp-lines::-webkit-scrollbar { display: none; }
.dsp-ln, body.dsp-phone .dsp-ln { flex: none; gap: 3px; padding: 1px 6px 1px 1px; border-radius: 11px; font-size: 10.5px; }
.dsp-ln .ic { width: 20px; height: 20px; font-size: 10.5px; }
.dsp-ln .ic svg { width: 22px; height: 22px; }
.dsp-ln span { min-width: 0; font-size: 10px; }
.dsp-ln.free span { display: none; }
.dsp-wait { flex: none; padding: 2px 8px; }
body.touch .dsp-ln { min-height: 30px; }
/* on a call */
.dsp-left.oncall { height: calc(100% - 74px); }
.dsp-left.oncall .dsp-sheet { flex: 1 1 auto; min-height: 0; overflow: visible; gap: 6px; }
.dsp-chd { flex: none; display: flex; flex-direction: column; gap: 4px; }
.dsp-left.oncall .dsp-chat { flex: 1 1 0; min-height: clamp(120px, 30vh, 320px); max-height: none; padding: 6px; border-radius: 11px; background: #0000002e; border: 1px solid #ffffff10; }
.dsp-left.oncall .bub { font-size: 13px; }
.dsp-cmid { flex: 0 1 auto; min-height: 64px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; overscroll-behavior: contain; scrollbar-width: thin; }
.dsp-cfoot { flex: none; display: flex; flex-direction: column; gap: 5px; }
.dsp-cmid .dsp-where, .dsp-cmid .dsp-match, .dsp-cmid .dsp-int { padding: 4px 8px; }
.dsp-cmid #dproto .hd { margin: 0; } .dsp-cmid #dproto .sub { display: none; }
.dsp-cmid .dsp-int .opts { flex-direction: row; flex-wrap: wrap; }
.dsp-cmid .dsp-int .opts .pill { padding: 3px 8px; }
.dsp-left.oncall .dsp-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dsp-left.oncall .dsp-fields > div { padding: 3px 6px; gap: 4px; font-size: 10.5px; }
.dsp-left.oncall .dsp-fields small { display: none; }
.dsp-left.oncall .dsp-asks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
.dsp-left.oncall .dsp-asks button { padding: 5px 7px; font-size: 11px; line-height: 1.2; }
body.touch .dsp-left.oncall .dsp-asks button { min-height: 38px; }
/* the priority: one segmented control; MORE ▾ opens upward */
.dsp-cfoot .dsp-prow { gap: 6px; }
.dsp-pseg { flex: 1; display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.dsp-pseg .ptag, .dsp-prow .dsp-pseg .ptag { flex: 1; border: 0; border-radius: 0; padding: 6px 0; font-size: 13px; text-align: center; opacity: .6; transition: opacity .15s; }
.dsp-pseg .ptag + .ptag { border-left: 1px solid #0006; }
.dsp-prow .dsp-pseg .ptag.sel { opacity: 1; box-shadow: inset 0 0 0 2px #fff; }
.dsp-prow > .pill { flex: none; padding: 6px 10px; white-space: nowrap; }
.dsp-more { position: relative; flex: none; } .dsp-more > .pill { padding: 6px 10px; white-space: nowrap; cursor: pointer; color: var(--text); }
.dsp-menu { display: none; position: absolute; right: 0; bottom: calc(100% + 6px); min-width: 200px; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; background: #0d1712f2; border: 1px solid var(--line); box-shadow: 0 8px 24px #000a; z-index: 6; }
.dsp-more.open .dsp-menu { display: flex; }
.dsp-menu .pill { width: 100%; justify-content: flex-start; padding: 8px 10px; font-size: 11px; cursor: pointer; color: var(--text); }
body.touch .dsp-prow .pill, body.touch .dsp-pseg .ptag { min-height: 36px; }
.dsp-cfoot .menu-btn, body.dsp-phone .dsp-cfoot .menu-btn { margin: 0; padding: 8px 14px; font-size: 16px; }
.dsp-cfoot .menu-btn small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.touch .dsp-cfoot .menu-btn { min-height: 46px; }
/* the phone: the panel's taller on a call; in landscape, two columns (the call on the left, the card on the right) */
body.dsp-phone .dsp-left.oncall { height: min(70vh, calc(100% - 70px)); max-height: none; }
body.dsp-phone .dsp-left.oncall .dsp-seg button { padding: 4px 6px; font-size: 10px; }
body.dsp-phone .dsp-left.oncall .dsp-chat { min-height: clamp(110px, 22vh, 220px); max-height: none; }
body.dsp-phone .dsp-left.oncall .dsp-cmid { min-height: 96px; }
body.dsp-phone .dsp-left.oncall .bub { font-size: 12px; }
@media (orientation: landscape) {
  body.dsp-phone .dsp-left.oncall { width: min(68vw, 640px); height: calc(100% - 62px); }
  body.dsp-phone .dsp-left.oncall .dsp-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; }
  body.dsp-phone .dsp-left.oncall .dsp-chd { grid-column: 1; grid-row: 1; }
  body.dsp-phone .dsp-left.oncall .dsp-chat { grid-column: 1; grid-row: 2 / 4; min-height: 0; }
  body.dsp-phone .dsp-left.oncall .dsp-cmid { grid-column: 2; grid-row: 1 / 3; min-height: 0; }
  body.dsp-phone .dsp-left.oncall .dsp-cfoot { grid-column: 2; grid-row: 3; }
  body.touch.dsp-phone:has(.dsp-left.oncall) .rd-dr.shut { left: calc(min(68vw, 640px) + 14px) !important; }
  body.dsp-phone .dsp-left.oncall .dsp-cfoot .menu-btn { padding: 6px 12px; font-size: 14px; min-height: 40px; }
  body.dsp-phone .dsp-left.oncall .dsp-cfoot .menu-btn small { font-size: 10px; }
  body.dsp-phone .dsp-rot { top: 60%; }   /* (clear of the top bar's ☰) */
}
/* (portrait: the map's turn buttons stay above the taller panel) */
@media (orientation: portrait) { body.dsp-phone:has(.dsp-left.oncall) .dsp-rot { top: auto; transform: none; bottom: calc(min(70vh, 100% - 70px) + 14px); } }
/* the top bar: on a narrow screen the clock, the score, ASSIST and anything urgent; the rest behind ⋯ */
.dsp-top > .dsp-topmore { display: none; }
@media (max-width: 1400px) {
  .dsp-dtop:not(.more) > .pill:not(#dclock):not(#dscore):not(#dpower):not(#dassist):not(.dsp-keep) { display: none !important; }
  .dsp-dtop > .dsp-topmore { display: grid; flex: none; width: 28px; height: 28px; cursor: pointer; font-size: 15px; }
  .dsp-dtop.more { flex-wrap: wrap; overflow: visible; z-index: 8; }
  .dsp-dtop.more > .pill { white-space: nowrap; }
  /* (opened, the first row stays as it was and the quieter chips drop into the rows under it) */
  .dsp-dtop.more::after { content: ""; flex-basis: 100%; order: 1; }
  .dsp-dtop.more > .pill:not(#dclock):not(#dscore):not(#dpower):not(#dassist):not(.dsp-keep) { order: 2; }
}
body.dsp-phone .dsp-dtop:not(.more) > #dscore, body.dsp-phone .dsp-dtop:not(.more) > #dassist { display: none !important; }
body.dsp-phone .dsp-dtop.more > #dscore, body.dsp-phone .dsp-dtop.more > #dassist { order: 2; }
body.touch .dsp-dtop > .dsp-topmore { width: 36px; height: 36px; }
body.dsp-phone .dsp-dtop .dsp-tabs { flex: 1 1 0; width: auto; min-width: 90px; }   /* (the town tabs take what the clock, ⋯ and ☰ leave, and scroll) */
/* the right side: the 📍 on an event a small icon, not a bare button */
.go-at { background: none !important; border: 0 !important; color: inherit; font-size: 11px; line-height: 1; vertical-align: middle; }
