:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #1c2330; --muted: #5f6b7a; --line: #d9dde3;
  --brand: #9b1c1c; --brand-ink: #ffffff; --head: #3f5568; --head-ink: #ffffff;
  --open: #d11a1a; --mine: #1f4fd1; --off: #1f4fd1; --pick: #7b2cbf; --ok: #1d7a3a; --warn: #a15c00; --bad: #b42318;
  --chip-ok: #e3f4e8; --chip-warn: #fff1d6; --chip-bad: #fde7e5; --chip-open: #eef1f5;
  --today: #fff8db; --focus: #2b6cff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c; --panel: #1b2129; --ink: #e8ecf1; --muted: #9aa6b5; --line: #2e3742;
    --head: #2c3c4b; --open: #ff6b6b; --mine: #7aa2ff; --off: #7aa2ff; --pick: #c9a0ff; --ok: #58c27d; --warn: #f2b45c; --bad: #ff8577;
    --chip-ok: #193325; --chip-warn: #3a2c12; --chip-bad: #3d1d1a; --chip-open: #26303b; --today: #2c2a1a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
/* Every typing field gets the page's own background and ink unless a rule below says otherwise. (A field with no
   rule of its own used to keep the browser's white box with the page's light ink in dark mode: typed digits vanished.)
   :where() keeps this at zero weight, so any other rule still wins. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]), select, textarea) {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
:where(input, select, textarea)::placeholder { color: var(--muted); opacity: 1; }
/* PIN field (pinField in app.js): big enough to hit with one tap, dots in the page's ink, a count under it */
.pin-wrap { display: inline-flex; flex-direction: column; gap: 3px; vertical-align: top; max-width: 100%; }
.pin-row { display: inline-flex; align-items: stretch; }
.pin-wrap .pin-input { width: 168px; max-width: 100%; min-height: 46px; padding: 6px 12px; font-size: 20px; font-variant-numeric: tabular-nums; border: 2px solid var(--muted); border-right: 0; border-radius: 9px 0 0 9px;
  background: var(--panel); color: var(--ink); caret-color: var(--focus); }
.pin-wrap .pin-input::placeholder { font-size: 15px; letter-spacing: 0; color: var(--muted); }
.pin-wrap .pin-input:not(:placeholder-shown) { -webkit-text-security: disc; text-security: disc; letter-spacing: 5px; font-weight: 700; }
.pin-wrap.show .pin-input:not(:placeholder-shown) { -webkit-text-security: none; text-security: none; letter-spacing: 3px; }
.pin-wrap .pin-input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(43,108,255,.2); }
.pin-eye { min-width: 46px; border: 2px solid var(--muted); border-radius: 0 9px 9px 0; background: var(--panel); color: var(--ink); font-size: 18px; cursor: pointer; }
.pin-wrap.show .pin-eye { background: var(--chip-open); }
.pin-cue { min-height: 1.25em; font-size: 13px; font-weight: 600; color: var(--ok); }
a { color: var(--mine); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  background: var(--brand); color: var(--brand-ink); padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav { display: none; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .tabbar a { color: inherit; text-decoration: none; }
.nav a { padding: 6px 7px; border-radius: 6px; opacity: .9; white-space: nowrap; flex: none; }
.nav a.on { background: rgba(255,255,255,.18); opacity: 1; font-weight: 600; }
.who { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.who button { background: rgba(255,255,255,.15); border: 0; color: inherit; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: var(--panel);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: 10px 2px; font-size: 12px; color: var(--muted); }
.tabbar a.on { color: var(--brand); font-weight: 700; }
.tabbar a span { display: block; font-size: 18px; line-height: 1.1; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}
.offline { background: var(--chip-warn); color: var(--warn); text-align: center; padding: 6px; font-size: 14px; }
.offline a { color: inherit; font-weight: 700; }
.offline.bad { background: var(--chip-bad); color: var(--bad); }
.unsent-list { margin: 6px 0; padding-left: 20px; max-height: 40vh; overflow: auto; }
.unsent-list li { margin: 4px 0; }
/* property inspections without signal */
.pi-sync { cursor: pointer; border: 0; font: inherit; }
.pi-thumb-wait { position: relative; display: inline-block; }
.pi-thumb-wait .pi-thumb-badge { position: absolute; right: 2px; bottom: 4px; background: var(--chip-warn); color: var(--warn); border-radius: 8px; padding: 0 4px; font-size: 12px; }
.pi-thumb-off { display: inline-flex; align-items: center; justify-content: center; background: var(--chip-open); color: var(--muted); font-size: 22px; }
.pi-phone-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pi-phone-row:last-child { border-bottom: 0; }
.pi-op { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pi-op:last-child { border-bottom: 0; }


main { padding: 16px; max-width: 1700px; margin: 0 auto; }
.loading { color: var(--muted); padding: 40px; text-align: center; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 20px 0 8px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.bar .grow { flex: 1; }
.btn { background: var(--panel); border: 1px solid var(--line); padding: 7px 12px; border-radius: 7px; cursor: pointer; min-height: 36px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.good { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 3px 8px; min-height: 28px; font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--chip-open); white-space: nowrap; }
.chip.ok { background: var(--chip-ok); color: var(--ok); }
.chip.warn { background: var(--chip-warn); color: var(--warn); }
.pin-status .chip { font-size: 15px; padding: 4px 10px; }   /* Build 359: saved or not, readable on a phone */
.chip.bad { background: var(--chip-bad); color: var(--bad); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 6px 12px; cursor: pointer; }
.seg button.on { background: var(--head); color: var(--head-ink); }
label.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }

/* ---------- month schedule (mirrors the current layout) ---------- */
.month { display: grid; grid-template-columns: repeat(7, minmax(var(--col, 0px), 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--panel); font-size: 11.5px; letter-spacing: -0.1px; }
.month .ln > span:first-child { font-variant-numeric: tabular-nums; }
.month .dow .ds { display: none; }
.month .dow { background: var(--head); color: var(--head-ink); text-align: center; font-weight: 700; padding: 4px; border-right: 1px solid var(--line); }
.day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 110px; padding: 2px 3px 6px; min-width: 0; overflow: hidden; }
.day.other { background: color-mix(in srgb, var(--bg) 60%, var(--panel)); }
.day.other .dnum { color: var(--muted); }
.day.today { background: var(--today); }
.dnum { font-weight: 700; font-size: 14px; padding: 2px 2px 4px; display: flex; justify-content: space-between; align-items: center; }
.dnum button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.grp { margin-bottom: 6px; }
.grp-h { font-weight: 700; font-size: 13px; padding: 2px 4px; border-left: 3px solid rgba(0,0,0,.25); color: #1c2330; }
.ln { display: grid; grid-template-columns: max-content minmax(0, 1fr) 8px; gap: 6px; padding: 1px 2px; cursor: pointer; border-radius: 3px; align-items: center; white-space: nowrap; }
.ln:hover { background: color-mix(in srgb, var(--focus) 10%, transparent); }
.ln .who { overflow: hidden; text-overflow: ellipsis; display: block; margin: 0; }
.ln.open { color: var(--open); }
.ln.mine { color: var(--pick); font-weight: 600; }
.ln .st { width: 8px; height: 8px; border-radius: 50%; }
/* (Build 214, Sam: "highlight the shifts for the logged-in person") your own shifts, in the month and the list */
.ln.me { background: color-mix(in srgb, var(--mine) 22%, transparent); box-shadow: inset 3px 0 0 var(--mine); font-weight: 700; padding-left: 5px; }
.agenda .ln.me { padding-left: 8px; }
.st.pending { background: var(--warn); } .st.approved { background: var(--ok); } .st.rejected { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.phone-only { display: none; }
.tabs-phone { display: none; }
/* month zoom (pinch / − + on phones) */
.month-wrap { overflow-x: auto; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.month-wrap.zoomed { max-height: calc(100dvh - 170px); overflow: auto; border-bottom: 1px solid var(--line); }
.month-wrap.zoomed .month .dow { position: sticky; top: 0; z-index: 2; }
.month.zoomed { font-size: 12.5px; }
.month.zoomed .ln { padding: 3px 2px; }
.month.zoomed .grp-h { font-size: 13.5px; }
.seg.zoom button { min-width: 38px; font-size: 15px; padding: 6px 10px; }
.legend-wrap { margin: 6px 0; font-size: 13px; color: var(--muted); }
.legend-wrap summary { cursor: pointer; }
@media (max-width: 759px) {
  main { padding: 10px; }
  .month { font-size: 11px; }
  .month .ln { gap: 4px; }
  .day { min-height: 90px; }
  /* (Build 287, speed S-4) a month is ~6,000 lines: the phone lays out only the days on screen, zoomed in too (a phone
     opens zoomed); a day keeps the size it was last drawn at, so a row settles once and stays */
  .month .day { content-visibility: auto; contain-intrinsic-size: auto 90px; }
  .agenda .aday { content-visibility: auto; contain-intrinsic-size: auto 240px; }
  .desk-only { display: none; }
  .tabs-desk { display: none !important; }
  .tabs-phone { display: block; width: 100%; padding: 10px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; font-weight: 600; }
  /* tab bars (Admin, Payroll …) wrap onto more lines instead of running off the screen */
  .seg { display: flex; flex-wrap: wrap; max-width: 100%; }
  .seg button { flex: 1 1 auto; border-bottom: 1px solid var(--line); }
  .bar > .seg { width: 100%; }
  .phone-only { display: inline; }
  /* zoomed in on a phone: time on its own row, then the person (two-line lines) */
  .month.zoomed .ln { grid-template-columns: minmax(0, 1fr) 8px; gap: 0 4px; row-gap: 0; padding: 3px 2px; border-bottom: 1px dotted var(--line); }
  .month.zoomed .ln > span:first-child { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
  .month.zoomed .ln.open > span:first-child, .month.zoomed .ln.off > span:first-child { color: inherit; }
  .month.zoomed .ln .who { white-space: nowrap; }
  .month:not(.zoomed) .pos:not(.off-code) { display: none; }
  /* squeezed to fit a phone: just start time + name, smaller headers */
  .month:not(.zoomed) .dur { display: none; }
  .month:not(.zoomed) .ln { grid-template-columns: 1fr; gap: 0; padding: 2px 1px; border-bottom: 1px dotted var(--line); }
  .month:not(.zoomed) .ln .st { display: none; }
  .month:not(.zoomed) .grp-h { font-size: 10.5px; padding: 1px 2px; }
  .month:not(.zoomed) .dow { font-size: 11px; padding: 4px 0; }
  .month:not(.zoomed) .dow .dl { display: none; }
  .month:not(.zoomed) .dow .ds { display: inline; }
  .month:not(.zoomed) .dnum { font-size: 12px; }
  .bar h1 { font-size: 19px; }
  .bar label.chk { font-size: 13px; }
}

/* agenda (phones) */
.agenda .aday { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.agenda .aday.today { outline: 2px solid var(--brand); }
.agenda .ah { background: var(--head); color: var(--head-ink); padding: 6px 10px; font-weight: 700; display: flex; justify-content: space-between; }
.agenda .grp { padding: 4px 8px 0; }
.agenda .ln { grid-template-columns: max-content minmax(0,1fr) 10px; font-size: 14px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.agenda .ln:last-child { border-bottom: 0; }
/* (Build 214) the List view: the riding assignment under the name, and a readable Add shift on the date line */
.agenda .ln-ride { grid-column: 2 / 3; font-size: 12.5px; color: var(--muted); white-space: normal; margin-top: -2px; }
.agenda .ln.open .ln-ride { color: var(--muted); }
.agenda .ah { align-items: center; }
.agenda .ah .ah-add { background: var(--panel); color: var(--ink); border-color: transparent; font-weight: 600; white-space: nowrap; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: color-mix(in srgb, var(--head) 12%, var(--panel)); font-size: 13px; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sub td { background: color-mix(in srgb, var(--head) 7%, var(--panel)); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- payroll steps ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.step { flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.step b { display: block; font-size: 14px; }
.step.done { border-color: var(--ok); background: var(--chip-ok); }
.step.now { border-color: var(--warn); background: var(--chip-warn); }

/* ---------- dialog & forms ---------- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10,15,20,.5); }
/* the app's own question sheets (public/questions.js, Build 226): on top of any open sheet; a bottom sheet on a phone */
.fh-ask form { padding: 18px; }
.fh-ask h3 { margin: 0 0 10px; }
.fh-ask-text { white-space: pre-wrap; margin: 0 0 10px; overflow-wrap: anywhere; }   /* (Build 255) a long web address wraps instead of pushing the sheet off a phone */
.fh-ask-err:empty { display: none; }
.fh-ask-copyrow { grid-template-columns: 1fr auto; align-items: center; }
@media (max-width: 700px) {
  dialog.fh-ask { margin: auto auto 0; width: 100vw; max-width: none; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .fh-ask .actions .btn { flex: 1; min-height: 44px; }
}
#dlgForm { padding: 18px; max-height: 85vh; overflow: auto; }
#dlgForm h3 { margin: 0 0 12px; }
.f { display: grid; gap: 4px; margin-bottom: 10px; font-size: 14px; }
.f input, .f select, .f textarea { padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); width: 100%; }
.f input[type=checkbox], .f input[type=radio] { width: auto; padding: 0; flex: none; }
.f label.chk { justify-content: flex-start; white-space: nowrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.actions .left { margin-right: auto; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; }
.dows { display: flex; gap: 4px; flex-wrap: wrap; }
.dows label { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 13px; cursor: pointer; }
.dows input { margin: 0 4px 0 0; }

.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #1c2330; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; }
.toast.bad { background: var(--bad); }

.signin { max-width: 420px; margin: 10vh auto; text-align: center; }
.signin img { width: 84px; height: 84px; border-radius: 16px; }
.signin .btn { width: 100%; margin-top: 12px; padding: 12px; font-size: 16px; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.grid-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }

@media print {
  .topbar, .tabbar, .bar, .noprint { display: none !important; }
  main { padding: 0; }
  .day { min-height: 0; }
}

/* compact inputs inside tables (admin editors) */
.tbl-wrap input:not([type=checkbox]), .tbl-wrap select, table input:not([type=checkbox]), table select {
  padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); max-width: 100%;
}
dialog td, dialog th { white-space: nowrap; }
.daylink { border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 0 4px; border-radius: 4px; text-decoration: underline dotted; text-underline-offset: 3px; }
.daylink:hover { background: color-mix(in srgb, var(--focus) 15%, transparent); }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
dialog ul { margin: 8px 0 0; padding-left: 20px; }
.ln.off { color: var(--off); font-style: italic; font-weight: 400; }
.ln.off .who::before { content: ''; }

.reqn { color: var(--warn); }
tr.grpstart td { border-top: 2px solid var(--line); }

/* notifications */
.bell { position: relative; background: none; border: 0; font-size: 18px; cursor: pointer; padding: 4px 6px; color: inherit; }
.bell-n { position: absolute; top: -2px; right: -4px; background: #ffd23f; color: #222; border-radius: 9px; font-size: 11px; font-weight: 700; min-width: 17px; padding: 0 4px; line-height: 17px; text-align: center; }
.nlist { display: grid; gap: 6px; max-height: 50vh; overflow: auto; margin: 8px 0; }
.nitem { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; color: inherit; font: inherit; }
.nitem-b { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.nact { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.nact input { flex: 1; min-width: 160px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: inherit; }
.my-today { display: flex; flex-direction: column; gap: 8px; }
.my-shift { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.my-shift:first-child { border-top: 0; }
.my-shift-b { display: flex; gap: 6px; flex-wrap: wrap; }
.nitem.unread { border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--panel)); }
.nset h4 { margin: 12px 0 4px; font-size: 14px; }
.nset label.chk { margin: 4px 0; }
.nudge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Payroll by station: station / earning-code pickers */
.pickset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0; }
.pickset label.chk.pick { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; background: var(--panel); }
.pickset label.chk.pick:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--panel)); }
@media print { .no-print { display: none !important; } }

/* Build number / revision at the bottom of every screen */
.buildbar { text-align: center; font-size: 11px; color: var(--muted); padding: 10px 16px 14px; font-variant-numeric: tabular-nums; user-select: all; }
@media print { .buildbar { display: none; } }

.buildbar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.buildbar .report-btn { font-size: 12px; }
.buildbar .build-txt { user-select: all; }

/* Help tab */
.help-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; }
.help-toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2 260px; }
.help-toc li { margin: 3px 0; }
/* What's new, folded (Build 285): a month per section, an update per line; big tap targets for a phone */
.changes-month { padding: 0; }
.changes-month > summary { padding: 14px 16px; min-height: 48px; cursor: pointer; font-size: 1.05em; }
.changes-build { border-top: 1px solid var(--line, #e3e3e3); }
.changes-build > summary { padding: 12px 16px; min-height: 44px; cursor: pointer; }
.changes-build[open] > summary { font-weight: 600; }
.changes-body { padding: 0 16px 12px; }
.changes-body > h3:first-child { display: none; }
/* A long guide, folded by chapter (Build 385): a chapter per line, a big tap target, opened one at a time */
.guide-ch { padding: 0; margin: 8px 0; }
.guide-ch > summary { padding: 14px 16px; min-height: 48px; cursor: pointer; font-size: 1.05em; font-weight: 600; }
.guide-ch-body { padding: 0 16px 12px; }
.md { line-height: 1.55; max-width: 980px; }
.md h2, .md h3 { margin: 22px 0 8px; scroll-margin-top: 70px; }
.md h2:first-child, .md h3:first-child { margin-top: 0; }
.md h4, .md h5 { margin: 16px 0 6px; scroll-margin-top: 70px; }
.md p { margin: 8px 0; }
.md-list { margin: 6px 0; padding-left: 22px; }
.md-list li { margin: 3px 0; }
.md code, .md-pre { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 0.92em; }
.md code { overflow-wrap: anywhere; }   /* (265) a long address in a guide (the NEMSIS test service's) wraps on a phone instead of pushing the page sideways */
.md-pre { padding: 8px 10px; overflow-x: auto; white-space: pre; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.md table { margin: 8px 0; }
.bell.help-q { font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }

/* View as (troubleshooting) */
.viewas { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 16px;
  background: #fff1d6; color: #5a3d00; border-bottom: 2px solid #e0a800; font-size: 14px; }
.viewas span { flex: 1; min-width: 200px; }
.viewas-list { max-height: 50vh; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }
.viewas-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 10px; cursor: pointer; color: inherit; font: inherit; }
.viewas-item:hover { background: color-mix(in srgb, var(--focus) 8%, transparent); }
@media print { .viewas { display: none; } }

.viewas.test { background: #ffe1e8; color: #6b0f23; border-bottom-color: #c2185b; }
.viewas.act { background: #e7f1fb; color: #0b3d6b; border-bottom-color: #1d6fb8; }   /* (Build 290) the demo's act-as: changes allowed */
.viewas-item.is-test { background: color-mix(in srgb, #c2185b 5%, transparent); }

/* Section drop-down (Admin / Reports / Payroll / Help) */
.tabs-pick { display: inline-flex; align-items: center; gap: 8px; }
.tabs-pick select { min-width: 230px; padding: 8px 34px 8px 12px; font-size: 15px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: inherit; cursor: pointer; }
@media (max-width: 759px) {
  .tabs-pick { display: flex; width: 100%; }
  .tabs-pick > span { display: none; }
  .tabs-pick select { flex: 1; width: 100%; padding: 10px; font-size: 16px; }
}

/* (Build 366) ‹ Back / Next › at the end of each step of a step-by-step setup: big, thumb-sized, the step's name under each */
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.step-nav .btn { min-height: 52px; min-width: 140px; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 6px 14px; text-align: left; }
.step-nav .step-next { align-items: flex-end; text-align: right; }
.step-nav .step-dir { font-size: 16px; font-weight: 700; }
.step-nav .step-to::before { content: attr(data-to); }
.step-nav .step-to { font-size: 12px; font-weight: 400; opacity: 0.85; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .step-nav .btn { min-width: 0; flex: 1; } .step-nav .step-n { display: none; } }
/* (Build 366) a module's section drop-down on the EMS pages (ePCR, QA/QI, Billing): under the header, in place of the tabs */
.ems-sec { margin: 0 0 12px; }

/* Schedule template: rotation editor */
.rot { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.rot-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rot-top input[type=date] { padding: 4px 6px; }
.rot-days { flex-wrap: wrap; max-width: 330px; }
.tpl-table td { vertical-align: top; }
[hidden] { display: none !important; }

/* Accrual rules */
.bank-class { margin-top: 10px; }
.bank-class tr.tier-first td { border-top: 1px solid var(--line); }
.bank-class tr.tier-more td { border-top: 0; background: color-mix(in srgb, var(--bg) 60%, transparent); }

.linkbtn { background: none; border: 0; padding: 0 2px; cursor: pointer; color: inherit; font: inherit; }

/* Assets module */
.as-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.as-truck { text-decoration: none; color: inherit; display: block; margin: 0; }
.as-truck:hover { border-color: var(--head); }
.as-labels { display: grid; grid-template-columns: repeat(3, 2.625in); gap: 0 0.125in; justify-content: center; }
.as-label { width: 2.625in; height: 1in; box-sizing: border-box; padding: 0.08in 0.12in; display: flex; gap: 0.1in; align-items: center; overflow: hidden;
  background: #fff; color: #000; border: 1px dashed #ccc; }
.as-label .qr { width: 0.84in; height: 0.84in; flex: none; }
.as-label .qr svg { width: 100%; height: 100%; display: block; }
.as-label .txt { min-width: 0; line-height: 1.15; }
.as-label .org { font-size: 8pt; font-weight: 700; letter-spacing: .05em; }
.as-label .tag { font-size: 13pt; font-weight: 800; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.as-label .nm { font-size: 8pt; max-height: 2.3em; overflow: hidden; }
@media print {
  body { padding: 0; background: #fff; }
  .as-labels { padding-top: 0.5in; }
  .as-label { border: 0; }
  #dlg, .toast, .offline { display: none !important; }
}
@media print { .buildbar { display: none !important; } html, body { background: #fff !important; } }
/* phones: with modules added there can be more tabs than fit — the bar scrolls sideways; top bar keeps Sign out visible */
@media (max-width: 760px) {
  .tabbar { overflow-x: auto; scrollbar-width: none; }
  .tabbar::-webkit-scrollbar { display: none; }
  .tabbar a { flex: 1 0 auto; min-width: 58px; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
  .who { gap: 5px; min-width: 0; }
  .who > .small { display: none; }
  .who button { padding: 5px 8px; }
}

/* truck QR screen */
.qa-head { display: flex; align-items: center; gap: 10px; }
.qa-unit { font-size: 30px; font-weight: 800; }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.qa-btn { display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 16px; min-height: 76px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: inherit; cursor: pointer; font: inherit; }
.qa-btn b { display: block; font-size: 17px; }
.qa-btn .qa-sub { display: block; color: var(--muted); margin-top: 2px; }
.qa-btn .qa-ic { font-size: 28px; width: 36px; text-align: center; }
.qa-btn.primary { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.qa-btn:disabled { opacity: .55; cursor: default; }

/* truck QR labels */
.tq-sheet { display: flex; flex-wrap: wrap; gap: 0.25in; justify-content: center; }
.tq-label { background: #fff; color: #000; border: 1px dashed #bbb; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-sizing: border-box; page-break-inside: avoid; break-inside: avoid; }
.tq-big .tq-label { width: 4in; height: 4in; padding: 0.2in; }
.tq-big .qr { width: 2.6in; height: 2.6in; }
.tq-small .tq-label { width: 2in; height: 2in; padding: 0.08in; }
.tq-small .qr { width: 1.25in; height: 1.25in; }
.tq-label .qr svg { width: 100%; height: 100%; display: block; }
.tq-top { font-weight: 800; letter-spacing: .1em; font-size: 10pt; }
.tq-big .tq-top { font-size: 13pt; margin-bottom: 4px; }
.tq-unit { font-weight: 800; font-size: 20pt; line-height: 1.1; margin-top: 4px; }
.tq-small .tq-unit { font-size: 11pt; }
.tq-sub { font-size: 10pt; }
.tq-small .tq-sub { font-size: 7pt; }
.tq-help { font-size: 9pt; margin-top: 2px; }
.tq-small .tq-help { display: none; }
@media print { .tq-label { border: 1px solid #ddd; } }

/* Today */
.today-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.today-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; background: var(--bg); }
.today-row:hover { border-color: var(--head); }
.today-row.done { opacity: .75; }
/* (248) a training sign-in row on a phone: the name and times get the whole line; the signature and status go under them */
@media (max-width: 600px) { .today-row.tr-att { flex-wrap: wrap; } .today-row.tr-att > .grow { flex: 1 1 calc(100% - 40px); min-width: 0; } }
.today-row.done .today-ic { color: var(--ok); }
.today-ic { font-size: 20px; width: 26px; text-align: center; }
.today-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 4px; }
.today-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: inherit; font-weight: 600; }
.today-tile:hover { border-color: var(--head); }
.today-tile-ic { font-size: 26px; }
/* scanner */
.scan-wrap { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; }
.scan-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; width: min(70vw, 300px); aspect-ratio: 1; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.scan-msg { position: absolute; bottom: calc(90px + env(safe-area-inset-bottom)); left: 16px; right: 16px; text-align: center; color: #fff; font-size: 15px; text-shadow: 0 1px 3px #000; }
.scan-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; background: rgba(255,255,255,.9); color: #000; }

/* truck check form */
.ck-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ck-row:first-of-type { border-top: 0; }
.ck-label { flex: 1 1 220px; font-weight: 500; }
.ck-seg button { padding: 9px 14px; min-height: 40px; }
.ck-seg button.on.ck-ok { background: var(--ok); color: #fff; }
.ck-seg button.on.ck-bad { background: var(--bad); color: #fff; }
.ck-note { flex: 1 1 100%; }
.ck-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; }
@media (min-width: 761px) { .ck-actions { bottom: 0; } }

/* Schedule ▾ menu and section bar */
.nav-dd { position: relative; }
.nav-dd-btn { background: none; border: 0; color: inherit; font: inherit; padding: 6px 10px; border-radius: 6px; cursor: pointer; opacity: .9; }
.nav-dd-btn.on { background: rgba(255,255,255,.18); opacity: 1; font-weight: 600; }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 210px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; }
.nav-menu[hidden] { display: none; }
.nav-menu a { color: var(--ink) !important; padding: 8px 10px; border-radius: 6px; display: flex; gap: 8px; opacity: 1; }
.nav-menu a:hover, .nav-menu a.on { background: var(--chip-open); font-weight: 600; }
.subnav { padding: 10px 16px 0; max-width: 1700px; margin: 0 auto; }
.subnav-pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.subnav-pick select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 400; min-width: 200px; }
.subnav-tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.subnav-tabs-l { font-weight: 600; }
.subnav-tabs .seg a { padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; color: inherit; background: var(--panel); border-right: 1px solid var(--line); }
.subnav-tabs .seg a:last-child { border-right: 0; }
.subnav-tabs .seg a.on { background: var(--head); color: var(--head-ink); }
@media (max-width: 520px) { .subnav-tabs-l { display: none; } .subnav-tabs .seg { width: 100%; } .subnav-tabs .seg a { flex: 1; justify-content: center; } }
@media print { .subnav { display: none !important; } }

/* Today: collapsible sections, who's working */
.today-sec { padding: 0; }
.today-sec > summary { list-style: none; cursor: pointer; padding: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.today-sec > summary::-webkit-details-marker { display: none; }
.today-sec > summary::before { content: '▸'; color: var(--muted); width: 12px; }
.today-sec[open] > summary::before { content: '▾'; }
.today-sec-t { font-weight: 700; font-size: 17px; }
.today-sec-s { flex: 1 1 200px; }
.today-sec[open] { padding-bottom: 14px; }
.today-sec[open] > :not(summary) { margin-left: 14px; margin-right: 14px; }
.who-grp { margin-top: 8px; }
.who-g { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.who-row { display: grid; grid-template-columns: 110px 1fr; gap: 0 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.who-row .who-p { grid-column: 2; }
.who-row.off .who-n { color: var(--off); }
.who-row.open .who-n { color: var(--open); font-weight: 700; }
.who-t { font-variant-numeric: tabular-nums; color: var(--muted); grid-row: span 2; }
@media (min-width: 761px) { .who-row { grid-template-columns: 120px minmax(160px, 260px) 1fr; } .who-row .who-p { grid-column: 3; } .who-t { grid-row: auto; } }

.today-row.overdue { border-color: var(--bad); }
.today-row .grow { flex: 1; min-width: 0; }

#dlg .f input[hidden] { display: none; }
#dlg .f div > select + input { margin-top: 6px; width: 100%; }

/* checklist tree editor */
.tree-card { padding: 8px; }
.tree-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 4px; border-top: 1px solid var(--line); }
.tree-row:first-child { border-top: 0; }
.tree-row input, .tree-row select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.tree-label { flex: 1 1 220px; min-width: 160px; }
.tree-area .tree-label { font-weight: 700; }
.tree-ic { width: 20px; text-align: center; }
.tree-btns { display: inline-flex; gap: 3px; margin-left: auto; flex-wrap: wrap; }
.tree-daily { font-size: 13px; }

/* check form: nested areas */
.ck-tree { padding: 6px 10px; }
.ck-area { border-left: 3px solid var(--line); margin: 6px 0 6px 2px; padding-left: 10px; }
.ck-area > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 700; list-style: none; }
.ck-area > summary::-webkit-details-marker { display: none; }
.ck-area > summary::before { content: '▾'; color: var(--muted); }
.ck-area:not([open]) > summary::before { content: '▸'; }
.ck-area .ck-allok { margin-left: auto; font-weight: 400; }
.ck-d0 { border-left-color: var(--head); }
.ck-d0 > summary { font-size: 17px; }
.ck-qty { color: var(--muted); font-weight: 600; }

/* reports */
.rp-pick { min-width: 320px; max-width: 100%; }
.rp-params { flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.rp-params .f { margin: 0; }
.rp-quick { display: flex; flex-wrap: wrap; gap: 4px; align-self: flex-end; }
.rp-quick .btn.on { background: var(--head); color: var(--head-ink); }
.rp-head h2 { margin: 6px 0 2px; }
.rp-table td.num, .rp-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.rp-bad { color: var(--bad); font-weight: 600; }
@media print { .rp-out .tbl-wrap { overflow: visible; } .rp-table { font-size: 11px; } }

.ask-q { flex: 1 1 300px; min-height: 52px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.ask-sql { white-space: pre-wrap; font-size: 12px; background: var(--bg); padding: 8px; border-radius: 6px; }

.plan-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0; }
.btn.onoff { min-width: 44px; padding: 2px 8px; }
.btn.onoff.on { background: var(--chip-ok); color: var(--ok); border-color: var(--ok); }

/* controlled substances */
.cs-draft { background: var(--chip-warn); color: var(--warn); border-radius: 8px; padding: 6px 10px; margin: 0 0 10px; }
.cs-alert { display: block; background: var(--chip-bad); color: var(--bad); font-weight: 600; text-decoration: none; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cs-grid .card { margin: 0; }
.cs-tbl { width: 100%; border-collapse: collapse; margin-top: 6px; }
.cs-tbl td { padding: 5px 4px; border-top: 1px solid var(--line); }
.cs-tbl td.num { text-align: right; }
.cs-wit { border-color: var(--head); }
.cs-unit { border-top: 1px solid var(--line); padding: 8px 0; }
.cs-unit.nested { margin-left: 22px; border-left: 3px solid var(--line); padding-left: 10px; }
.cs-row { margin: 6px 0; }
.cs-row.card { padding: 8px; }
.scan-panel { position: absolute; left: 16px; right: 16px; bottom: calc(140px + env(safe-area-inset-bottom)); background: var(--panel, #fff); color: var(--ink, #000); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
/* (Build 245) the phone app's own scanner steps aside while the page asks about a new barcode: the question over the page */
.scan-native-pick { background: rgba(0,0,0,.6); } .scan-native-pick .scan-panel { position: static; width: min(92vw, 480px); }
.cs-sigwrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 6px 0; }
.cs-sig { width: 100%; max-width: 420px; aspect-ratio: 600 / 170; border: 1px solid var(--line); border-radius: 8px; background: #fff; touch-action: none; }
/* (263) Recognition and corrective action: the drawn signatures on an entry, side by side, stacked on a phone */
.ca-sigs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.ca-sigs figure { margin: 0; flex: 1 1 180px; max-width: 260px; }
.ca-sigimg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cs-print { position: fixed; inset: 0; z-index: 2000; background: #fff; color: #000; overflow: auto; padding: 24px; }
.cs-print .cs-tbl td, .cs-print .cs-tbl th { border: 1px solid #999; padding: 4px 6px; font-size: 12px; text-align: left; }
.cs-print-sigs { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 18px; }
.cs-print-sigs > div { width: 300px; font-size: 12px; }
.cs-print-sigs img { width: 280px; border-bottom: 1px solid #000; }
.cs-line { height: 60px; border-bottom: 1px solid #000; }
/* (382) a fire report on paper */
.fi-print h3 { margin: 14px 0 4px; font-size: 15px; }
.fi-ptbl { border-collapse: collapse; width: 100%; } .fi-ptbl th { width: 38%; font-weight: 600; } .fi-ptbl .fi-psub { background: #eee; width: auto; }
.fi-pdraft { border: 2px solid #b45309; color: #b45309; font-weight: 700; padding: 4px 10px; display: inline-block; margin-bottom: 8px; }
@media print { .fi-ptbl tr { break-inside: avoid; } }
@media print { body:has(.cs-print) > *:not(.cs-print) { display: none !important; } .cs-print { position: static; } }
/* Protocols: the protocol reader in a frame, filling the screen under the header */
.proto-frame { display: block; width: 100%; height: calc(100dvh - 190px); min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 700px) { .proto-frame { height: calc(100dvh - 255px - env(safe-area-inset-bottom, 0px)); border-radius: 8px; } }

/* ---------- Fire Incidents (NERIS report form) ---------- */
.fi-head { position: sticky; top: 60px; z-index: 6; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(16,24,40,.05); }
.fi-head-l { display: flex; align-items: center; gap: 10px; }
.fi-head h1 { margin: 0; font-size: 20px; letter-spacing: .2px; }
.fi-sum { display: flex; gap: 26px; flex: 1; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.fi-sum > div, .fi-rt > div { display: flex; flex-direction: column; min-width: 0; }
.fi-sum span, .fi-rt span { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.fi-sum b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-head-r { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fi-vbad { background: var(--chip-bad); color: var(--bad); border-color: transparent; font-weight: 600; text-decoration: none; }
.fi-vok { background: var(--chip-ok); color: var(--ok); border-color: transparent; font-weight: 600; text-decoration: none; }
.fi-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 84px; }
.fi-nav { position: sticky; top: 136px; display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; max-height: calc(100vh - 230px); overflow: auto; }
.fi-nav a { padding: 9px 10px; color: inherit; text-decoration: none; display: flex; gap: 10px; align-items: center; font-size: 14px; border-radius: 8px; }
.fi-nav a:hover { background: var(--bg); }
.fi-nav a.on { background: var(--head); color: var(--head-ink); font-weight: 600; }
.fi-nav a.parent { background: var(--bg); color: inherit; font-weight: 600; }
.fi-nav a.fi-subnav { padding: 6px 10px 6px 42px; font-size: 13px; }
.fi-ic { width: 20px; text-align: center; flex: none; }
.fi-badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.fi-pagepick { display: none; }
.fi-main { min-width: 0; max-width: 980px; }
.fi-ptitle { margin: 2px 0 14px; font-size: 24px; display: flex; align-items: center; gap: 10px; }
.fi-ptitle .fi-ic { width: auto; }
.fi-unitbar { margin-bottom: 14px; }
.fi-body { border: 0; padding: 0; margin: 0; min-width: 0; }
.fi-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px 20px; margin-bottom: 16px; }
/* Build 272: dispatch's CAD notes on the report's Narrative page (folded, read only) */
.fi-cadnotes > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; list-style: none; -webkit-tap-highlight-color: transparent; }
.fi-cadnotes > summary::-webkit-details-marker { display: none; }
.fi-cadnotes > summary::before { content: '▸'; color: var(--muted); width: 14px; }
.fi-cadnotes[open] > summary::before { content: '▾'; }
.fi-cadnotes-list { margin-top: 10px; }
.fi-cadnote { padding: 8px 0; border-top: 1px solid var(--line); }
/* Build 273: Calls waiting for a report */
.fi-wrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.fi-wtxt { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.fi-wbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.fi-wbtns .btn { min-height: 44px; }
.fi-wpick { margin-bottom: 8px; }
.fi-wskipped { margin-top: 10px; }
.fi-cadnote-t { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.fi-h { margin: 0 0 14px; font-size: 17px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fi-note { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.fi-fromchartsbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .fi-fromchartsbar .fi-note { flex: 1; min-width: 200px; margin: 0; }   /* Build 186: the patient charts fill in the Medical page */
.fi-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; align-items: start; }
.fi-form + .fi-form, .fi-form + .fi-list, .fi-var > .fi-form, .fi-card > .fi-var + .fi-var { margin-top: 18px; }
.fi-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fi-f.fi-wide, .fi-form > .fi-sub, .fi-form > .fi-list, .fi-form > .fi-var, .fi-form > .fi-more, .fi-form > .fi-form { grid-column: 1 / -1; }
.fi-f.fi-when { grid-column: span 1; }
.fi-lab { font-size: 14px; font-weight: 600; line-height: 1.3; }
.fi-req { color: var(--bad); }
.fi-help { color: var(--muted); cursor: help; font-weight: 400; }
.fi-desc { font-size: 12px; color: var(--muted); }
.fi-f input:not([type=checkbox]), .fi-f select, .fi-f textarea, .fi-sel, .fi-ta, .fi-dt input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; font: inherit; font-size: 15px; min-width: 0; box-sizing: border-box; }
.fi-f textarea, .fi-ta { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.fi-f input:focus, .fi-f select:focus, .fi-f textarea:focus, .fi-ta:focus, .fi-sel:focus, .fi-ms-box:focus, .fi-ms-box.open { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(43,108,255,.15); }
.fi-num { max-width: 180px; }
.fi-addsel { max-width: 320px; margin-top: 12px; }
.fi-dt { display: flex; gap: 6px; align-items: center; }
.fi-dt input[type=date] { flex: 1.2; min-width: 130px; }
.fi-dt input[type=time] { flex: 1; min-width: 110px; }
.fi-dt input[type=number] { flex: 1; }
.fi-dt .btn { height: 40px; flex: none; }
/* (Build 370) a date-and-time field in a narrow grid column (an iPad's two columns): the date on its own line, the time and
   its Now / ✕ under it, instead of running past the card's edge. Only grid items get the container, so nothing sized by
   its content collapses. */
.fi-form > .fi-f { container-type: inline-size; }
@container (max-width: 380px) { .fi-dt { flex-wrap: wrap; } .fi-dt input[type=date] { flex: 1 1 100%; } .fi-dt input[type=time] { flex: 1 1 auto; } }
.fi-x { color: var(--muted); }
.fi-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; border-radius: 8px; }
.fi-seg button { min-width: 64px; height: 38px; padding: 0 16px; font: inherit; font-size: 14px; border-right: 1px solid var(--line); color: inherit; }
.fi-seg button:last-child { border-right: 0; }
.fi-seg button:hover { background: var(--bg); }
.fi-seg button.on { background: var(--head); color: var(--head-ink); font-weight: 600; }
.fi-ms { position: relative; }
.fi-ms-box { min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 34px 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; position: relative; box-sizing: border-box; }
.fi-ph { color: var(--muted); padding-left: 3px; }
.fi-caret { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.fi-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--chip-open); border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px 3px 9px; font-size: 13px; line-height: 1.25; }
.fi-tagx { cursor: pointer; padding: 0 5px; border-radius: 4px; color: var(--muted); font-size: 15px; }
.fi-tagx:hover { background: var(--line); color: var(--ink); }
.fi-ms-add { font-size: 13px; color: var(--brand); font-weight: 600; padding: 3px 6px; white-space: nowrap; }
.fi-ms-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.18); overflow: hidden; }
.fi-ms-q { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line); padding: 11px 12px; font: inherit; background: var(--panel); color: inherit; outline: none; }
.fi-ms-list { max-height: 320px; overflow: auto; padding: 4px 0; }
.fi-ms-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 12px 4px; }
.fi-ms-o { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.fi-ms-o:hover { background: var(--bg); }
.fi-ms-o.on { font-weight: 600; }
.fi-ms-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 8px 12px; background: var(--bg); }
.fi-sub { border-left: 3px solid var(--line); padding: 2px 0 2px 16px; }
.fi-subt { margin-bottom: 10px; font-size: 15px; }
.fi-subt .fi-lab { font-size: 15px; }
.fi-list { display: flex; flex-direction: column; gap: 12px; }
.fi-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; background: var(--bg); }
.fi-item-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; }
.fi-add { align-self: flex-start; border-style: dashed; }
.fi-more { margin-top: 14px; }
.fi-more summary { cursor: pointer; color: var(--mine); font-size: 14px; }
.fi-more > .fi-form { margin-top: 14px; }
.fi-q { padding: 2px 0; }
.fi-warn { background: var(--chip-warn); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; border: 1px solid rgba(161,92,0,.2); }
.fi-warn b { display: block; margin-bottom: 4px; }
.fi-corr { margin: 4px 0 10px; }
.fi-corr:empty { display: none; }
.fi-err { white-space: pre-wrap; background: var(--chip-bad); color: var(--bad); padding: 10px; border-radius: 8px; font-size: 12px; max-height: 50vh; overflow: auto; }
.fi-sync { display: grid; gap: 8px; margin: 8px 0; } .fi-sync-row { padding: 8px 10px; border: 1px solid var(--line, #ddd); border-radius: 8px; } .fi-sync-unit { margin-left: 18px; } .fi-sync-row .fi-sel { margin-top: 6px; min-height: 44px; width: 100%; }   /* (384) Send stations & units: what NERIS already has */
.fi-probs li { margin: 4px 0; }
.fi-rt { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.fi-rt > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; min-width: 130px; }
.fi-rt b { font-size: 17px; font-variant-numeric: tabular-nums; }
.fi-counts { margin: 0 0 16px; }
.fi-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fi-unit { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); color: inherit; text-decoration: none; }
.fi-unit:hover { border-color: var(--head); box-shadow: 0 2px 8px rgba(16,24,40,.08); }
.fi-unit-h { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.fi-unit-t { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fi-unit-t > div { display: flex; flex-direction: column; }
.fi-unit-t span { font-size: 11px; color: var(--muted); }
.fi-unit-t b { font-size: 13px; font-variant-numeric: tabular-nums; }
.fi-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(16,24,40,.06); }
.fi-foot-in { max-width: 1700px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.fi-foot-m { text-align: center; }
.fi-files { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.fi-file { width: 150px; display: flex; flex-direction: column; gap: 6px; }
.fi-file img { width: 150px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
/* setup page still uses the simple grid */
.fi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; margin-bottom: 8px; }
@media (max-width: 1100px) { .fi-sum { display: none; } }
@media (max-width: 800px) {
  .fi-head { position: static; padding: 10px 12px; gap: 10px; }
  .fi-wrap { grid-template-columns: 1fr; padding-bottom: 140px; }
  .fi-nav { display: none; }
  .fi-pagepick { display: block; width: 100%; height: 44px; padding: 0 10px; font-size: 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 12px; color: inherit; }
  .fi-form { grid-template-columns: 1fr; gap: 16px; }
  .fi-card { padding: 14px 14px 16px; }
  .fi-grid { grid-template-columns: 1fr; }
  .fi-foot { bottom: calc(57px + env(safe-area-inset-bottom)); }
  .fi-foot-m { display: none; }
  .fi-unit-t { grid-template-columns: repeat(2, 1fr); }
  .fi-dt { flex-wrap: wrap; }
  .fi-dt input[type=date] { flex: 1 1 100%; }
  .fi-dt input[type=time] { flex: 1 1 auto; }
}

/* Master Admin → Access roles */
.role-list { display: grid; gap: 10px; }
.role-card { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.role-grants { display: flex; flex-wrap: wrap; gap: 6px; }
.role-checks { display: grid; gap: 6px; }
.role-mods td { vertical-align: top; padding: 6px 8px; }
/* (Build 253) on a phone each module is a block: its name, then its level, then its switches (the three-column table was
   wider than the sheet, so the names were cut off) */
@media (max-width: 700px) {
  .role-mods, .role-mods tbody, .role-mods tr, .role-mods td { display: block; width: 100%; box-sizing: border-box; }
  .role-mods tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .role-mods td { padding: 2px 4px; white-space: normal; }
  .role-mods select { width: 100%; }
  .role-mods td:empty { display: none; }
  .role-mods label.chk { white-space: normal; align-items: flex-start; }
}
.role-pick { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 10px; margin-top: 6px; }

/* ---------- Personnel ---------- */
.pm-q { min-width: 260px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; }
.pm-by { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; font: inherit; }
@media (max-width: 520px) { .pm-q, .pm-by { min-width: 0; flex: 1 1 100%; } }
.pm-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
.pm-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px; border-radius: 12px; color: inherit; text-decoration: none; }
.pm-card:hover { background: var(--panel); box-shadow: 0 2px 10px rgba(16,24,40,.08); }
.pm-av { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: var(--head); flex: none; }
.pm-ini { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 30px; letter-spacing: .5px; }
.pm-name { font-weight: 700; font-size: 13px; line-height: 1.2; }
.pm-sub { font-size: 12px; color: var(--muted); min-height: 15px; }
.pm-dot { position: absolute; top: 8px; right: 22%; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); }
.pm-dot.bad { background: var(--bad); } .pm-dot.warn { background: #e6a700; }
.pm-side { position: sticky; top: 80px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.pm-side a { padding: 7px 10px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 14px; }
.pm-side a:hover { background: var(--bg); }
.pm-side a.on { background: var(--head); color: var(--head-ink); font-weight: 600; }
.pm-side hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.pm-head { display: flex; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; }
.pm-head-ph { position: relative; }
.pm-head-ph .pm-av { width: 112px; height: 112px; }
.pm-photo-edit { position: absolute; right: -6px; bottom: -6px; background: var(--panel); border: 1px solid var(--line); border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* (266, 11-19 · D2) a record's sections: one dropdown at the top on every screen */
.pm-pagepick-l { display: grid; gap: 4px; max-width: 520px; margin: 0 0 14px; }
.pm-pagepick { display: block; width: 100%; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; font-size: 17px; font-weight: 600; padding: 0 12px; }
.pm-main { min-width: 0; max-width: 900px; }
.pm-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; }
.pm-sec-h { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.pm-sec-h h2 { margin: 0; font-size: 18px; flex: 1; }
.pm-kv { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; margin: 0; }
.pm-kv dt { color: var(--muted); font-size: 14px; }
.pm-kv dd { margin: 0; font-size: 14px; }
.pm-contacts { display: grid; gap: 10px; }
.pm-crow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.pm-crow input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: inherit; min-width: 0; }
.pm-certs { display: grid; gap: 10px; }
.pm-cert { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.pm-cert.expiring { border-left-color: #e6a700; } .pm-cert.expired { border-left-color: var(--bad); }
.pm-cert-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pm-note { border-top: 1px solid var(--line); padding: 10px 0; }
.pm-note:first-child { border-top: 0; padding-top: 0; }
.pm-log { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.pm-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pm-lists textarea { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; font: inherit; }
@media (max-width: 800px) {
  .pm-wrap { grid-template-columns: 1fr; } .pm-side { position: static; flex-direction: row; flex-wrap: wrap; order: -1; } .pm-side hr { display: none; }
  .pm-pagepick-l { max-width: none; }
  .pm-kv { grid-template-columns: 1fr; gap: 2px; } .pm-kv dd { margin-bottom: 8px; }
  .pm-head { flex-direction: column; text-align: center; } .pm-crow { grid-template-columns: 1fr 1fr; }
  .pm-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } .pm-av { width: 72px; height: 72px; }
}

.cs-pars { display: grid; gap: 6px; margin: 8px 0; }
.cs-par { display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, .8fr) 34px; gap: 6px; align-items: center; }
.cs-par-head { margin-top: 8px; }
@media (max-width: 560px) { .cs-par { grid-template-columns: minmax(0, 1fr) 64px 34px; } .cs-par > input:nth-of-type(2) { grid-column: 1 / -1; grid-row: 2; } .cs-par-head span:nth-child(3) { display: none; } }
.cs-par select, .cs-par input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: inherit; min-width: 0; }
.cs-should { margin-top: 6px; }

.cs-hist { cursor: pointer; }
.cs-hist:hover td { background: var(--hover, rgba(0,0,0,.04)); }
.cs-par.cs-sc { grid-template-columns: minmax(0, 1.4fr) 80px 140px minmax(0, 1fr) auto; }
@media (max-width: 560px) { .cs-par.cs-sc { grid-template-columns: minmax(0, 1fr) 70px; } .cs-par.cs-sc-head, .cs-sc.cs-par-head { display: none; } }
.ck-seals .ck-seal { padding: 8px 0; border-top: 1px dashed var(--line); }
.ck-seals .ck-seal:first-of-type { border-top: 0; }
.ck-seals .ck-seg button { white-space: nowrap; }
.ck-row.ck-seals { display: block; }
.ck-row.ck-seals > .ck-label { margin-bottom: 4px; font-weight: 600; }
.ck-seals .ck-seal.inside { margin-left: 22px; padding-left: 10px; border-left: 3px solid var(--line); }
.brand #org { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-org { font-size: 11px; font-weight: 500; opacity: .85; }
@media (max-width: 700px) { .brand .brand-org { display: none; } }
.signin .signin-org { margin: -6px 0 10px; font-weight: 600; opacity: .8; }
.today-logo { width: 72px; height: 72px; object-fit: contain; flex: none; margin-right: 4px; }
@media (max-width: 560px) { .today-logo { width: 44px; height: 44px; } }
.gear-pts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.gear-pts .small { width: 100%; }
.chip-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: inherit; }
.chip-btn.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.gear-look { margin: 2px 0 4px; } .gear-look ul { margin: 4px 0 0 18px; padding: 0; }
/* community events calendar */
.ev-nav { margin: 8px 0; }
.ev-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ev-dow { background: var(--panel); text-align: center; font-size: 12px; font-weight: 700; padding: 4px; }
.ev-day { background: var(--panel); min-height: 92px; padding: 3px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ev-day.other { opacity: .5; }
.ev-day.today { box-shadow: inset 0 0 0 2px var(--accent, #9b1c1c); }
.ev-dnum { font-size: 12px; font-weight: 700; pointer-events: none; }
.ev-chip { display: block; font-size: 11.5px; line-height: 1.25; padding: 2px 4px; border-radius: 4px; background: #dbeafe; color: #1e3a8a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chip.completed { background: #dcfce7; color: #14532d; }
.ev-chip.cancelled { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.ev-chip.mine { outline: 2px solid #1e3a8a; outline-offset: -2px; }
.ev-ages { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; } .ev-ages label { display: flex; flex-direction: column; }
.chip-btn.on.ok { background: #15803d; border-color: #15803d; }
@media (max-width: 640px) { .ev-day { min-height: 64px; } .ev-chip { font-size: 10px; } }
.month-foot { margin: 14px 0 6px; }
/* phones: wide tables scroll inside their card instead of pushing the whole page sideways */
@media (max-width: 520px) { .cs-tbl, .rp-table { display: block; max-width: 100%; overflow-x: auto; } .cs-tbl td .bar { flex-wrap: wrap !important; } }
/* property inspections */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.kv > div > b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pi-codes { max-height: 46vh; overflow: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.pi-code { text-align: left; border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 8px; padding: 7px 10px; cursor: pointer; font: inherit; }
.pi-code:hover, .pi-code.on { border-color: var(--accent, #a51c1c); background: color-mix(in srgb, var(--accent, #a51c1c) 7%, var(--panel)); }
.pi-ck { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pi-ck .seg button { min-width: 42px; }
.pi-v { border: 1px solid var(--line); border-left: 4px solid #c62828; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.pi-v.corrected, .pi-v.na { border-left-color: #2e7d32; opacity: .85; }
.pi-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
/* Build 206: an inspection as three steps (Arrive / Walk / Wrap up), violations grouped by code section, the pre-plan sheet */
.pi-where-line { margin: 2px 0 8px; }
.pi-place { font-weight: 700; font-size: 18px; text-decoration: none; }
.pi-steps { display: flex; width: 100%; margin: 4px 0 10px; flex-wrap: nowrap; }
.pi-steps .pi-step { flex: 1 1 0; min-height: 46px; font-size: 16px; font-weight: 600; border-bottom: 0; }
.pi-step-n { font-weight: 400; opacity: .8; font-size: 13px; }
/* Build 224 (review 158): the drug log's Opened sheet as four steps, its bar kept at the bottom of the sheet */
.cs-steps .pi-step { font-size: 14px; padding: 4px 2px; min-height: 44px; }
.cs-bar { position: sticky; bottom: -18px; margin: 14px -18px -18px; padding: 10px 18px; background: var(--panel); border-top: 1px solid var(--line); gap: 8px; align-items: center; flex-wrap: nowrap; z-index: 5; }
.cs-bar .btn { min-height: 44px; flex: none; white-space: nowrap; }
.pi-sec { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 0 10px 8px; }
.pi-sec > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 0; min-height: 44px; list-style: none; }
.pi-sec > summary::-webkit-details-marker { display: none; }
.pi-sec:not([open]) { padding-bottom: 0; }
.pi-sec.done > summary b { font-weight: 600; color: var(--muted); }
.pi-sec-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pi-ck .seg { flex-wrap: nowrap; width: auto; }
.pi-ck .seg button { min-width: 48px; min-height: 42px; font-size: 16px; border-bottom: 0; }
.pi-ck-more { flex-basis: 100%; color: var(--muted); }
.pi-g { border: 1px solid var(--line); border-left: 4px solid #c62828; border-radius: 8px; padding: 10px; margin: 10px 0; }
.pi-g.ok { border-left-color: #2e7d32; }
.pi-g-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pi-g-fix { margin: 4px 0; }
.pi-g .pi-v { border-left: 1px solid var(--line); margin: 6px 0 0; background: var(--bg); opacity: 1; }
.pi-g .pi-v.corrected > .bar:first-child b, .pi-g .pi-v.na > .bar:first-child b { font-weight: 500; color: var(--muted); }
.pi-bar { gap: 8px; align-items: center; z-index: 5; border-top: 1px solid var(--line); flex-wrap: nowrap; }
.pi-bar .btn { min-height: 44px; flex: none; white-space: nowrap; }
.pi-progress { font-size: 13px; line-height: 1.25; min-width: 0; }
.pi-v .pi-vstatus { width: auto; max-width: 150px; flex: none; }
.pi-menu { min-width: 44px; font-size: 20px; line-height: 1; }
.pi-menu-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.pi-menu-item { min-height: 46px; display: flex; align-items: center; justify-content: flex-start; text-align: left; text-decoration: none; }
.pi-sev { display: flex; width: 100%; flex-wrap: nowrap; }
.pi-sev button { flex: 1 1 0; min-height: 42px; border-bottom: 0; padding: 6px 4px; }
.pi-recent { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; }
.pi-last-v { padding: 4px 0; border-top: 1px solid var(--line); margin-top: 4px; }
.pi-pp-sec { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 0 10px 8px; }
.pi-pp-sec:not([open]) { padding-bottom: 0; }
.pi-pp-sec > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 0; min-height: 44px; }
.pi-pp-to { margin: 2px 0 8px; }
.pi-pp-map { height: 240px; border-radius: 8px; margin-top: 8px; }
.pi-pp-photo { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; max-width: 92px; text-align: center; text-decoration: none; color: inherit; }
.pi-pp-copy { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; color: inherit; }
.pi-alsopp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 8px; }
/* the inspections list on a phone: cards; My day; the map of today's stops */
.pi-cards { display: flex; flex-direction: column; gap: 8px; }
.pi-card { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; background: var(--panel); padding: 10px 12px; cursor: pointer; }
.pi-card.late { border-left-color: #c62828; }
/* Build 230: picking inspections for a bulk action; the owner was told it's coming up; the occupancy log */
.pi-sel, .pi-selall, .pi-pick { width: 24px; height: 24px; flex: none; margin: 0; }
.pi-told { color: var(--ok); white-space: nowrap; }
.pi-occ-row { padding: 8px 0; border-top: 1px solid var(--line); }
.pi-occ-row.can { cursor: pointer; }
.pi-occ-top { display: flex; gap: 8px; align-items: center; }
.pi-occ-notes { white-space: pre-wrap; margin: 2px 0; }
.pi-occ-kinds button { min-height: 44px; padding: 0 14px; }
/* Build 231: the Crew plan (how the year is going by station and shift; building the plan) */
.pi-crew { color: var(--muted); white-space: nowrap; }
.pcp-year .pcp-y { font-size: 20px; min-width: 56px; text-align: center; }
.pcp-year .btn { min-width: 44px; min-height: 44px; font-size: 18px; }
.pcp-big { font-size: 18px; } .pcp-big b { font-size: 26px; }
.pcp-meter { position: relative; height: 12px; border-radius: 6px; background: var(--chip-open); overflow: hidden; margin: 6px 0; display: flex; }
.pcp-meter .pcp-done { background: var(--ok); } .pcp-meter .pcp-late { background: var(--bad); margin-left: auto; }
.pcp-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pcp-st { display: block; width: 100%; text-align: left; font: inherit; color: inherit; margin: 0; cursor: pointer; }
.pcp-st.on { border-color: var(--mine); box-shadow: 0 0 0 2px var(--mine); }
.pcp-st.pcp-prev { cursor: default; margin-bottom: 8px; padding: 10px 12px; }
.pcp-shifts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.pcp-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 6px; }
.pcp-mo { display: flex; flex-direction: column; align-items: center; border-radius: 5px; background: var(--chip-open); padding: 2px 0; font-size: 11px; line-height: 1.25; }
.pcp-mo i { font-style: normal; color: var(--muted); } .pcp-mo b { font-size: 12px; }
.pcp-mo.none b { color: var(--muted); font-weight: 400; } .pcp-mo.done { background: var(--chip-ok); } .pcp-mo.late { background: var(--chip-bad); }
a.pcp-row { display: block; text-decoration: none; color: inherit; }
.pcp-ticks { display: flex; flex-wrap: wrap; gap: 4px 14px; } .pcp-ticks.col { flex-direction: column; }
.pcp-tick { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; } .pcp-ticks .pcp-tick input[type=checkbox] { width: 24px; height: 24px; flex: none; margin: 0; } .pcp-ticks.col .pcp-tick { align-items: flex-start; white-space: normal; padding: 6px 0; }
.pcp-more { margin: 8px 0; } .pcp-more > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-weight: 600; }
.pcp-list { max-height: 40vh; overflow: auto; } .pcp-li { padding: 4px 0; border-top: 1px solid var(--line); }
.pcp-peek { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.pcp-plan { border-top: 1px solid var(--line); padding-top: 8px; }
.pi-card-top { display: flex; gap: 8px; align-items: center; }
.pi-card-n, .pi-stop span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--head); color: var(--head-ink); font-weight: 700; font-size: 13px; flex: none; }
.pi-stop span { width: 30px; height: 30px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.pi-day-h { margin: 14px 0 6px; font-size: 15px; }
.pi-daymap { height: 300px; border-radius: 10px; margin: 0 0 10px; }
.pi-dir { text-decoration: none; white-space: nowrap; }
/* Master Admin → Alert routing: grouped, one row per alert */
.al-grp > summary { cursor: pointer; padding: 2px 0; list-style-position: inside; }
.al-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.al-row:first-of-type { margin-top: 8px; }
.al-b { display: flex; gap: 6px; flex: none; }
@media (max-width: 520px) { .al-row { flex-direction: column; } .al-b { align-self: stretch; } .al-b .btn { flex: 1; } }
/* grouped navigation: computer menus, phone ☰ More sheet, Today tiles */
.nav { overflow: visible; }
.nav-dd-btn { white-space: nowrap; }
dialog.sheet { margin: auto auto 0; width: 100vw; max-width: 640px; border-radius: 16px 16px 0 0; max-height: 86vh; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.more-grp { margin: 10px 0 4px; }
.more-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-item { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-height: 56px; }
.more-item.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.more-item a { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.more-ic { font-size: 22px; flex: none; }
.more-l { font-weight: 600; font-size: 14px; line-height: 1.2; }
.more-pin { background: none; border: 0; border-left: 1px solid var(--line); padding: 0 12px; font-size: 18px; color: var(--muted); cursor: pointer; }
.more-pin.on { color: #c98a00; }
.today-grp-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 2px 6px; }
.today-nav .today-tiles { margin-top: 0; }
/* Hydrants */
.hy-map { height: calc(100vh - 230px); min-height: 360px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 899px) { .hy-map { height: calc(100vh - 270px - env(safe-area-inset-bottom)); } }
.hy-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; } .hy-legend i, .hy-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
.hy-me { background: #fff; border: 2px solid rgba(0,0,0,.2); border-radius: 4px; width: 34px; height: 34px; font-size: 18px; cursor: pointer; }
/* batch selection (Properties / Hydrants) */
.batch-bar { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 64px); z-index: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 2px solid #1e66d0; border-radius: 10px; padding: 8px 10px; margin: 8px 0; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.batch-bar[hidden] { display: none; }
.batch-selecting { cursor: crosshair; outline: 3px solid #1e66d0; user-select: none; -webkit-user-select: none; }
td.batch-ck, th.batch-ck { width: 34px; text-align: center; }
td.batch-ck input, th.batch-ck input { width: 20px; height: 20px; }
.batch-list { max-height: 160px; overflow: auto; border: 1px solid var(--line, #ddd); border-radius: 6px; padding: 4px 8px; margin: 4px 0 10px; }
.batch-list > div { display: flex; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line, #eee); }
.batch-list > div:last-child { border-bottom: 0; }
/* Inventory */
.inv-lines { display: grid; gap: 6px; }
.inv-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.inv-line.done { border-color: var(--ok, #2e9e44); }
.inv-line .grow { min-width: 160px; }
.inv-pick { display: grid; gap: 4px; }
.inv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
a.inv-room { display: block; color: inherit; text-decoration: none; }
.inv-scan { padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-size: 15px; }
a.qa-btn { text-decoration: none; color: inherit; }
a.qa-btn.primary { color: inherit; }
/* Training */
.tr-people { display: grid; gap: 2px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.tr-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.tr-bar i { display: block; height: 100%; background: var(--ok, #2e9e44); }
.tr-year { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.tr-year > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--panel); }
.tr-year b { display: block; font-size: 20px; } .tr-year span { font-size: 12px; color: var(--muted); }
.tr-rule { padding: 10px 12px; margin: 6px 0; }
.tr-sheet { text-align: center; max-width: 7in; margin: 0 auto; padding: 0.3in; border: 2px solid #222; border-radius: 12px; background: #fff; color: #111; }
.tr-sheet h1 { font-size: 28pt; margin: 6px 0; }
.tr-sheet-h { font-size: 14pt; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tr-sheet-sub { font-size: 12pt; color: #444; margin: 4px 0; }
.tr-sheet-do { font-size: 15pt; font-weight: 700; margin: 12px 0 4px; }
.tr-qr { width: 4.2in; max-width: 80vw; margin: 12px auto; } .tr-qr svg { width: 100%; height: auto; display: block; }
.fi-sethead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 2px; padding: 6px 8px; background: var(--bg); border-radius: 6px; }
/* Station displays */
.disp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.disp-card .pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.disp-card .pill.ok { background: color-mix(in srgb, #1e8a46 15%, var(--panel)); color: #1e8a46; font-weight: 700; }
.disp-slide { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; background: var(--panel); }
.disp-slide.off { opacity: .55; }
.disp-slide .bar { flex-wrap: nowrap; }
.disp-more summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.disp-more { margin-top: 4px; }
/* citations */
.pi-cite { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; flex-wrap: wrap; }
.pi-cv { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.pi-cv.off { opacity: .6; }
.pi-cmap { display: grid; grid-template-columns: 1fr minmax(0, 1fr); gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 600px) { .pi-cmap { grid-template-columns: 1fr; } }
.fi-psaps { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.fi-psap { display: grid; grid-template-columns: 60px 1fr; gap: 2px 8px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; cursor: pointer; font: inherit; color: inherit; }
.fi-psap small { grid-column: 2; }
.fi-psap:hover { border-color: var(--brand); }
.who-ride { color: var(--brand); }
.ride-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.ride-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ride-who { flex: 1 1 180px; min-width: 0; }
.ride-sel { display: flex; gap: 6px; flex: 1 1 220px; }
.ride-sel select { flex: 1; min-width: 0; }
.unit-pick { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; flex: 1; }
.unit-pick select { flex: 1; min-width: 70px; }
.unit-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--chip-open, #eef1f5); border: 1px solid var(--line); border-radius: 6px; padding: 2px 2px 2px 8px; font-weight: 600; font-size: 13px; }
.unit-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 0 6px; }
.sc-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sc-row:last-child { border-bottom: 0; }
.sc-ic { font-size: 18px; width: 24px; text-align: center; }
/* holiday (bonus) label on the schedule */
.hol { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--chip-warn); border-radius: 5px; padding: 1px 5px; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (Build 340) whose shift a day is, from Schedule setup → Shift names */
.shname { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; line-height: 1.3; padding: 0 5px; border-radius: 5px; background: var(--chip-open); color: var(--ink); vertical-align: middle; white-space: nowrap; }
.agenda .ah .shname { margin-left: 8px; background: var(--panel); }
.aday .hol { font-size: 12px; white-space: normal; display: inline-block; margin: 2px 0 4px; }

/* Past incidents */
.ph-files { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-file { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 140px; text-decoration: none; }
.ph-file img { width: 140px; height: 105px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.ph-printhead { display: none; }
@media print { .ph-printhead { display: block; margin-bottom: 8px; } .ph-sec { break-inside: avoid-page; } .ph-file img { width: 120px; height: 90px; } }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 12px; }
@media print { .ph-grid { display: block; } }
.ph-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; }
.ph-sum > div { display: flex; flex-direction: column; } .ph-sum span { font-size: 12px; color: var(--muted); }
.fi-search summary { cursor: pointer; } .fi-search h4 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fi-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.fi-search-grid select, .fi-search-grid input { width: 100%; }
.fi-fchip { display: inline-flex; align-items: center; gap: 4px; } .fi-fchip button { border: 0; background: none; cursor: pointer; padding: 0 2px; font-size: 12px; }

/* pages written in the app (policies, course lessons) */
.page-text { line-height: 1.55; max-width: 820px; }
.page-text h2 { font-size: 1.25em; margin: 18px 0 6px; } .page-text h3 { font-size: 1.1em; margin: 14px 0 4px; } .page-text h4 { margin: 12px 0 4px; }
.page-text p { margin: 0 0 10px; } .page-text ul, .page-text ol { margin: 0 0 10px; padding-left: 22px; }
.pol-frame { width: 100%; height: min(70vh, 900px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
/* (Build 203) fillable forms: the setup list (one box per row: what it is, what fills it) and the member's fill-in page */
.pform-list, .pfill-list { display: flex; flex-direction: column; gap: 10px; }
.pform-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pform-row:last-child { border-bottom: 0; }
.pform-label { width: 100%; font-weight: 600; } .pform-src { max-width: 100%; min-height: 40px; } .pform-fixed { width: 100%; margin-top: 6px; }
.pform-how .chk { margin-top: 6px; }
.pform-mail { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; } .pform-to, .pform-from { width: 100%; }
.pfill-row .f { margin: 0; } .pfill-row input:not([type=checkbox]), .pfill-row select, .pfill-row textarea { width: 100%; min-height: 44px; font-size: 16px; }
.pfill-row.from:not(.changed) input { border-color: var(--ok); } .pfill-row.changed .pfill-from { display: none; }
.pfill-row .chip { margin-left: 8px; font-weight: 400; } .pfill-tick { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.pfill-tick input { width: 22px; height: 22px; }
@media (max-width: 700px) { .pform-row { grid-template-columns: 1fr; } }
/* (Build 203) Staffing → rules from the contract: one card per rule found, the contract's words under it, a big tick */
.stc-row { margin-bottom: 10px; } .stc-row select, .stc-row input[type=number], .stc-row input[type=time], .stc-row input[list] { min-height: 40px; max-width: 100%; }
.stc-quote { margin: 0; padding: 8px 12px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 0 8px 8px 0; font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; }
/* (Build 236) time-off picks: the month calendar (big squares to tap on a phone) */
.pk-cal { max-width: 460px; } .pk-calbar { margin: 4px 0; }
.pk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pk-dow { text-align: center; font-size: 12px; color: var(--muted); }
.pk-day { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; font: inherit; }
.pk-day small { font-size: 11px; min-height: 1em; } .pk-day.empty { border: none; background: none; }
.pk-day.work { border-color: var(--mine); } .pk-day.out, .pk-day.past { opacity: .35; }
.pk-day:not(.work):not(.out):not(.empty) { color: var(--muted); }
.pk-day.taken { background: var(--chip-bad); color: var(--bad); }
.pk-day.mine { background: var(--chip-ok); color: var(--ok); border-color: var(--ok); } .pk-day.mine.pending { background: var(--chip-warn); color: var(--warn); }
.pk-fold summary { cursor: pointer; padding: 4px 0; min-height: 32px; } .pk-actions .btn { min-height: 44px; }
/* (Build 290) Staffing → Shift bids (staffing-bids.js): rows with one big button, the check before Apply */
.bd-menu { margin: 0 0 10px; } .bd-items, .bd-list, .bd-order-list, .bd-ranks { display: flex; flex-direction: column; gap: 6px; }
.bd-item { flex-wrap: wrap; } .bd-item .btn.primary, .bd-add .btn { min-height: 44px; } .bd-item.bd-mine { border-color: var(--ok); }
.bd-no { color: var(--muted); } .bd-who { font-weight: 600; } .bd-add { padding: 8px 0; border-top: 1px solid var(--line); } .bd-add:first-of-type { border-top: 0; padding-top: 0; }
.bd-banner { background: var(--chip-warn); color: var(--warn); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }
.bd-lgroup { margin: 10px 0; } .bd-line { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.bd-line.skip { color: var(--warn); } .bd-line.warn { font-weight: 600; } .bd-lic { width: 22px; text-align: center; flex: none; }
.bd-logrow { padding: 4px 0; border-top: 1px solid var(--line); } .bd-rankadd { margin-top: 8px; max-width: 100%; }
.stc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.stc-ticklabel { display: flex; align-items: center; gap: 8px; min-height: 44px; } .stc-tick { width: 24px; height: 24px; }
.stc-page { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; font: inherit; font-size: 14px; background: var(--bg); padding: 10px; border-radius: 8px; }
.stc-otherrow { padding: 10px 0; border-bottom: 1px solid var(--line); } .stc-otherrow:last-child { border-bottom: 0; }
.stc-bar { position: sticky; bottom: 0; background: var(--bg, #fff); padding: 8px 0; border-top: 1px solid var(--line); z-index: 2; }
.lms-steps { display: flex; flex-direction: column; gap: 6px; }
.lms-step { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; }
.lms-step.on { border-color: var(--accent, #a51c1c); background: var(--accent-bg, rgba(165, 28, 28, .06)); }
.lms-step .ic { width: 28px; text-align: center; font-size: 18px; }
.lms-video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.lms-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; } .lms-bar i { display: block; height: 100%; background: var(--ok, #2e9e44); }
.lms-task { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); } .lms-task:last-child { border-bottom: 0; }

/* ---------- Build 179: My profile, "confirm it's you", text opt-in ---------- */
.who-me { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: 16px; }
.who-me .who-name { font-size: 14px; }
@media (max-width: 700px) { .who-me .who-name { display: none; } }
.sf-box { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sf-box .sf-way { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.sf-box .sf-way.primary { color: #fff; }
.sms-card .sms-agree { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); line-height: 1.45; font-size: 14px; }
.sms-card .sms-agree input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* ---------- EMS (patient care reports) — the design canvas look: navy, one blue accent, red only for attention ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-var.woff2') format('woff2'); }
/* (Build 216) #dlg too: EMS setup's edit sheets (Master Admin → EMS → Treatments → Edit) open in the app's own dialog, where the
   EMS colours weren't set — its Done / Save button was white on white */
dialog#dlg { --ems-navy: #0E1A2B; --ems-accent: #1D5FD1; --ems-red: #B42318; --ems-green: #067647; --ems-ground: #F5F6F8; --ems-line: #E4E7EC; --ems-ink: #101828; --ems-mute: #5B6676; --ems-panel: #ffffff; }
.ems, dialog.ems-sheet, dialog.ems-dlg {
  --ems-navy: #0E1A2B; --ems-accent: #1D5FD1; --ems-red: #B42318; --ems-green: #067647; --ems-ground: #F5F6F8; --ems-line: #E4E7EC; --ems-ink: #101828; --ems-mute: #5B6676; --ems-panel: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-feature-settings: 'tnum' 1, 'cv11' 1; }
@media (prefers-color-scheme: dark) {
  .ems, dialog.ems-sheet, dialog.ems-dlg, dialog#dlg { --ems-accent: #6EA0FF; --ems-red: #FF8577; --ems-green: #47CD89; --ems-ground: #12161c; --ems-line: #2e3742; --ems-ink: #e8ecf1; --ems-mute: #9aa6b5; --ems-panel: #1b2129; } }
.ems { background: var(--ems-ground); color: var(--ems-ink); margin: -4px -4px 0; padding: 4px; border-radius: 12px; }
.ems-head { display: flex; align-items: center; gap: 12px; background: var(--ems-navy); color: #fff; padding: 14px 16px; border-radius: 12px; margin-bottom: 12px; }
.ems-head .grow { flex: 1; }
.ems-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.ems-sub { font-size: 13px; opacity: .78; }
.ems-chip { font-size: 13px; font-weight: 600; opacity: .9; text-align: right; }
.ems-lockbtn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ems-lockbtn:hover { background: rgba(255,255,255,.16); }
.ems .card.ems-card, .ems .card { background: var(--ems-panel); border: 1px solid var(--ems-line); border-radius: 12px; }
.ems h3 { letter-spacing: -.01em; }
.ems .btn, .ems-btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font-weight: 600; }
.ems .btn.sm { min-height: 36px; padding: 0 12px; }
.ems .btn.ems-primary, .ems-btn.ems-primary, .ems .btn.primary { background: var(--ems-accent); border-color: var(--ems-accent); color: #fff; }
@media (prefers-color-scheme: dark) { .ems .btn.ems-primary, .ems-btn.ems-primary, .ems .btn.primary { color: #0b1220; } }
.ems-btn.ems-danger { background: var(--ems-red); border-color: var(--ems-red); color: #fff; }
.ems-btn:disabled { opacity: .45; cursor: not-allowed; }
.ems .today-row.ems-row, .ems-row { width: 100%; min-height: 56px; text-align: left; font: inherit; cursor: pointer; background: var(--ems-panel); border-color: var(--ems-line); }
.ems .today-row.ems-row:hover { border-color: var(--ems-accent); }
.ems-soon-card { border-left: 4px solid var(--ems-accent) !important; }
.ems-soon { margin: 12px 0; padding: 12px; border: 1px dashed var(--ems-line); border-radius: 10px; background: var(--ems-ground); font-size: 14px; }
.ems-warn { color: var(--ems-red); }
.ems-ok { color: var(--ok); font-weight: 600; }
.ems-locked { text-align: center; padding: 48px 16px 56px; background: var(--ems-panel); border: 1px solid var(--ems-line); border-radius: 12px; }
.ems-lock-big { font-size: 44px; line-height: 1; }
.ems-locked h2 { margin: 10px 0 4px; letter-spacing: -.01em; }
.ems-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.ems-set .f span { font-size: 13px; }
.ems-pos { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.ems-filters { align-items: flex-end; }
.ems-filters .f { margin: 0; }
.ems-filters select, .ems-filters input { min-height: 40px; }
.ems-scroll { overflow-x: auto; border: 1px solid var(--ems-line); border-radius: 10px; }
.ems-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ems-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ems-mute); background: var(--ems-ground); padding: 8px 10px; white-space: nowrap; }
.ems-table td { padding: 8px 10px; border-top: 1px solid var(--ems-line); vertical-align: top; }
.ems-table td.num { font-variant-numeric: tabular-nums; }
.ems-table tr.ems-flag td { background: rgba(180, 35, 24, .06); }
/* the unlock sheet, break the glass and the chart dialog: same shell, navy head */
dialog.ems-sheet, dialog.ems-dlg { color: var(--ems-ink); background: var(--ems-panel); border-radius: 14px; }
dialog.ems-sheet #dlgForm, dialog.ems-dlg #dlgForm { padding: 0 18px 18px; }
.ems-sheet-head, .ems-glass-head, .ems-chart-head { display: flex; align-items: center; gap: 12px; margin: 0 -18px 14px; padding: 16px 18px; background: var(--ems-navy); color: #fff; border-radius: 14px 14px 0 0; }
.ems-sheet-head h3, .ems-glass-head h3 { margin: 0 !important; color: #fff; }
.ems-glass-head { background: var(--ems-red); display: block; }
.ems-chart-head .grow { flex: 1; }
.ems-run { font-size: 18px; font-weight: 700; }
.ems-lock-ic { font-size: 26px; }
.ems-pins { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
dialog.ems-sheet .pin-wrap .pin-input { min-height: 52px; width: 190px; font-size: 22px; }
dialog.ems-sheet .pin-eye { min-width: 52px; }
.ems-or { font-size: 13px; color: var(--ems-mute); margin: 10px 0 8px; }
dialog.ems-sheet .sf-box .sf-way, dialog.ems-sheet .btn { min-height: 44px; border-radius: 10px; }
dialog.ems-sheet .sf-box .sf-way.primary, dialog.ems-sheet .btn.primary { background: var(--ems-accent); border-color: var(--ems-accent); }
.ems-head { flex-wrap: wrap; row-gap: 8px; }
.ems-sub { white-space: nowrap; }
.ems-chip small { display: block; font-weight: 500; opacity: .8; }
.ems-chart-head .chip { background: rgba(255,255,255,.16); color: #fff; }
.ems-set { align-items: end; }
.ems .today-row.ems-row { flex-wrap: wrap; row-gap: 4px; }
.ems .today-row.ems-row .grow { min-width: 150px; }
.ems .today-row.ems-row b { white-space: nowrap; }
/* phone header: one more button (👤) has to fit beside 🔔 ? 👁 and Sign out */
@media (max-width: 760px) {
  .who { gap: 2px; }
  .who .bell { padding: 4px 4px; }
  .who .bell.help-q { min-width: 26px; }
  .who button:not(.bell) { padding: 5px 7px; }
}
/* EMS — Build 180: a chart's parts, two versions of one, charting without signal, devices */
.ems-part { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--ems-line); border-radius: 10px; background: var(--ems-ground); }
.ems-part textarea { min-height: 72px; font: inherit; border-radius: 8px; }
.ems-two { margin-top: 8px; padding: 10px; border: 1px solid var(--ems-red); border-radius: 10px; }
.ems-other { margin: 6px 0; padding: 8px 10px; border: 1px dashed var(--ems-line); border-radius: 8px; background: var(--ems-panel); }
.ems-other-text { white-space: pre-wrap; margin: 4px 0 6px; }
.ems-failed { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--ems-red); border-radius: 10px; }
.ems-refused { padding: 8px 0; border-top: 1px solid var(--line, #E4E7EC); }
.ems-refused:first-of-type { border-top: 0; }
button.ems-refused-btn { border: 0; font: inherit; font-size: 12px; cursor: pointer; }
.ems-limit { border-left: 4px solid #B54708 !important; }
.ems-limit.locked { border-left-color: var(--ems-red) !important; }
.ems-nosignal { border-left: 4px solid var(--ems-mute) !important; }
.ems-code { font-size: 34px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-align: center; padding: 14px; margin: 8px 0; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-ground); }
.ems-x { border: 0; background: none; color: var(--ems-mute); cursor: pointer; padding: 2px 6px; min-height: 28px; }
.ems-x:hover { color: var(--ems-red); }
.ems-keeps { margin: 8px 0 0; }
.ems-devices td { vertical-align: middle; }
.ems-devices .chip { margin-left: 6px; }


/* ---------- Reports hub (Build 181): tabs, charts, dashboards, maps ---------- */
.rh-tabs, nav.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
nav.tabs .tab { padding: 8px 12px; border-radius: 8px 8px 0 0; color: var(--ink); text-decoration: none; border: 1px solid transparent; border-bottom: 0; }
nav.tabs .tab.on { background: var(--panel); border-color: var(--line); font-weight: 600; margin-bottom: -1px; }
.chart-box { position: relative; height: 280px; }
.tile .chart-box { height: 220px; }
.rp-chart-wrap { margin: 8px 0 12px; }
.rp-drill { cursor: pointer; }
.rp-drill:hover td { background: color-mix(in srgb, var(--focus) 8%, transparent); }
.print-only { display: none; }
@media print { .print-only { display: block !important; } .chart-box { height: 240px; } }
.heat { display: grid; gap: 2px; font-size: 11px; align-items: center; margin: 6px 0; }
.heat-x { text-align: center; color: var(--muted); }
.heat-y { color: var(--muted); }
.heat-c { min-height: 22px; border-radius: 3px; background: var(--chip-open); display: flex; align-items: center; justify-content: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.heat-c.dark { color: #fff; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-auto-flow: row dense; gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.tile-wide { grid-column: span 2; }
@media (max-width: 520px) { .tile-wide { grid-column: span 1; } }
.tile-title { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; background: none; border: 0; padding: 0; color: var(--ink); text-align: left; cursor: pointer; }
div.tile-title { cursor: default; }
.tile-v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile-ch { font-variant-numeric: tabular-nums; }
.tile-ch.good { color: var(--ok); } .tile-ch.bad { color: var(--bad); }
.tile .ok { color: var(--ok); } .tile .bad { color: var(--bad); }
.tile-list td { padding: 3px 6px; font-size: 13px; }
.rh-map { height: 520px; border-radius: 10px; border: 1px solid var(--line); }
.map-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.map-key { display: inline-flex; align-items: center; gap: 4px; }
.map-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 3px; border-radius: 10px; color: #fff; font-size: 10px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.map-pin { background: none; border: 0; }
.sec-row { padding: 2px 0; }
.ov-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ov-pick fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ov-pick label.chk { display: flex; margin: 3px 0; }
.iso-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
.pick-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
p.warn, .small.warn { color: var(--warn); } p.ok, .small.ok { color: var(--ok); }
.card.warn { border-color: var(--warn); background: var(--chip-warn); }
.card.ok { border-color: var(--ok); background: var(--chip-ok); }
/* Help desk (Build 183): ticket threads */
tr.click { cursor: pointer; } tr.click:hover td { background: color-mix(in srgb, var(--line) 35%, transparent); }
.sup-msg { border-left: 3px solid var(--line); padding: 6px 10px; margin: 0 0 10px; }
.sup-msg.sup-fh { border-color: #2563eb; } .sup-msg.sup-dept_admin { border-color: var(--ok); } .sup-msg.sup-system { color: var(--muted); }
.sup-msg.sup-internal { background: var(--chip-warn); border-color: var(--warn); }

/* ---- EMS: the chart screen (Build 184; revision 2 in Build 185) — public/modules/ems-chart.js ----
   One centred column, small labels, big tap answers. Everything else is one tap away. */
.pcr { font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --pcr-amber: #B54708; }
@media (prefers-color-scheme: dark) { .pcr, dialog.pcr-dlg { --pcr-amber: #F5B740; } }
dialog.pcr-dlg { --pcr-amber: #B54708; }
.pcr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ems-navy); color: #fff; padding: 10px 14px; border-radius: 12px 12px 0 0; }
/* (Build 378) a practice chart: an amber band above the header on every tab; the list's chip and band; the switch card's Practice / Go live */
.pcr-practice { background: #F5B740; color: #2b1d00; padding: 7px 14px; border-radius: 12px 12px 0 0; font-size: 14px; line-height: 1.35; }
.pcr-practice b { letter-spacing: .06em; }
.pcr.practice .pcr-head { border-radius: 0; }
.chip.ems-practice-chip { background: #F5B740; color: #2b1d00; font-weight: 700; letter-spacing: .04em; }
.ems .card.ems-practice-band { background: #FFF4D6; border: 2px solid #F5B740; color: #2b1d00; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ems-practice-band b { font-size: 17px; white-space: nowrap; }
.ems-practice-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line, #ddd); }
.ems-practice-box .btn { min-height: 48px; font-size: 16px; }
.ems-practice-box .bar { margin-top: 10px; }
.ems-practice-box .small { font-size: 14px; line-height: 1.4; margin-top: 2px; }
.ems-practice-on-now b, .ems-practice-live b { font-size: 16px; }
.ems-golive-list { margin: 4px 0 10px 20px; padding: 0; }
.ems-golive-name { font-size: 17px; min-height: 48px; width: 100%; }
/* (379) Go live's lists: the newest practice charts and the iPads to open first */
.ems-golive-newest, .ems-golive-ipads { margin: 8px 0; }
.ems-golive-list li { margin: 3px 0; }
.ems-golive-list .chip { margin-left: 6px; font-size: 12px; }
.ems-golive-warn, .ems-leftover-note { font-size: 15px; margin: 8px 0; }
.pcr-head .grow { flex: 1; }
.pcr-back { color: #fff; text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); white-space: nowrap; }
.pcr-who { min-width: 0; }
.pcr-name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.pcr-age { margin-left: 10px; font-weight: 600; font-size: 15px; opacity: .85; }
.pcr-sub { font-size: 13px; opacity: .8; }
.pcr-state { font-size: 13px; font-weight: 600; opacity: .9; max-width: 320px; text-align: right; }
.pcr-state.bad { color: #FFB4A9; opacity: 1; }
.pcr-head .chip { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.pcr-head .chip.warn { background: #F5B740; border-color: #F5B740; color: #2b1d00; }
.pcr-head .chip.ok { background: #2E9E6B; border-color: #2E9E6B; color: #fff; }
.pcr-todo { min-height: 44px; padding: 0 8px 0 16px; border-radius: 22px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.pcr-todo:hover, .pcr-menubtn:hover, .pcr-headbtn:hover { background: rgba(255,255,255,.2); }
.pcr-menubtn, .pcr-headbtn { width: 44px; min-height: 44px; border-radius: 22px; border: 1px solid rgba(255,255,255,.3); background: none; color: #fff; font: inherit; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.pcr-head .btn.pcr-ready { min-height: 44px; border-radius: 22px; border-color: #2E9E6B; background: #2E9E6B; color: #fff; white-space: nowrap; }
.pcr-tabs { display: flex; gap: 2px; overflow-x: auto; background: var(--ems-panel); border: 1px solid var(--ems-line); border-top: 0; border-radius: 0 0 12px 12px; padding: 0 6px; margin-bottom: 16px; scrollbar-width: none; }
.pcr-tabs::-webkit-scrollbar { display: none; }
/* (Build 301, Sam, 11-23 · D7) the header and the tabs stay in view while the chart scrolls; once pinned they slim to a bar
   (ems-chart.js sets top, .stuck, the kept space below and --pcr-pin); while a field is typed in on a touch screen they let go */
.pcr-top { position: sticky; top: 0; z-index: 8; }
.pcr-top.typing { position: static; }
.pcr-top.stuck .pcr-head { padding: 6px 10px; gap: 4px 8px; border-radius: 0; box-shadow: 0 2px 8px rgba(16,24,40,.25); }
.pcr-top.stuck .pcr-back, .pcr-top.stuck .pcr-sub, .pcr-top.stuck .pcr-head > .grow { display: none; }
.pcr-top.stuck .pcr-who { flex: 1 1 0; min-width: 0; }
@media (min-width: 700px) { .pcr-top.stuck .pcr-who { flex: 1 1 170px; } }   /* a tablet: room for the whole name beside the times */
.pcr-top.stuck .pcr-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcr-top.stuck .pcr-state { order: 3; width: auto; max-width: 84px; flex: 0 0 auto; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.pcr-top.stuck .pcr-tstrip { order: 2; flex: 1 1 220px; min-width: 0; margin-top: 0; padding-top: 4px;
  /* (Build 375, Sam Nov 30: "the times go off the right side into the saved") the strip slides sideways: its right edge fades
     out before Saved instead of cutting a time in half, and the last time scrolls clear of the fade */
  padding-right: 22px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
.pcr-top.stuck .pcr-state { padding-left: 8px; border-left: 1px solid rgba(255,255,255,.25); }
.pcr-top.stuck .pcr-tstop { min-height: 36px; }
.pcr-top.stuck .pcr-tabs { border-radius: 0; box-shadow: 0 2px 6px rgba(16,24,40,.12); }
.pcr-top.stuck .pcr-tab { min-height: 44px; }
html:has(.pcr-top) { scroll-padding-top: calc(var(--pcr-pin, 0px) + 8px); }   /* a field moved into view (Tab, a tap on "To finish") lands below the bar */
.pcr-tab { min-height: 48px; padding: 0 14px; border: 0; background: none; color: var(--ems-mute); font: inherit; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pcr-tab.on { color: var(--ems-accent); border-bottom-color: var(--ems-accent); }
.pcr-dot { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--ems-red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .pcr-dot { color: #1b0d0b; } }
/* Build 186: every tab says where it stands — a red count (still needed), a green tick (complete), a grey ring (nothing needed, nothing entered) */
.pcr-dot.ok { background: var(--ems-green); min-width: 20px; height: 20px; padding: 0; font-size: 12px; }
.pcr-dot.idle { background: none; border: 2px solid var(--ems-line); min-width: 12px; width: 12px; height: 12px; padding: 0; box-sizing: border-box; }
.pcr-tab.is-todo:not(.on) { color: var(--ems-ink); }
.pcr-tab.is-idle:not(.on) { color: var(--ems-mute); opacity: .8; }
/* …and what a chart needs is starred where it is asked: ★ red until it is answered, ✓ green once it is */
.pcr-req { display: inline-block; margin-left: 5px; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.pcr-req.todo { color: var(--ems-red); }
.pcr-req.ok { color: var(--ems-green); }
.pcr-cardhead h3 .pcr-req { font-size: 14px; }
/* loaded miles: where the number came from, and the button to work it out again */
.pcr-f[data-f="destination.miles"] { grid-column: 1 / -1; }   /* its own row: the number, and beside it where it came from */
.pcr-f[data-f="destination.miles"] .pcr-unit { max-width: 200px; }
.pcr-milesnote { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pcr-milesbad { color: var(--ems-red); }
/* the column: the parts of the tab in the middle, their names in the margin beside it on a wide screen */
.pcr-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr); align-items: start; }
.pcr-main { grid-column: 2; min-width: 0; }
.pcr-side { grid-column: 1; justify-self: end; width: 170px; margin-right: 22px; position: sticky; top: calc(var(--pcr-pin, 56px) + 16px); display: flex; flex-direction: column; gap: 2px; }
.pcr-sidelink { min-height: 38px; text-align: right; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ems-mute); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pcr-sidelink:hover { background: var(--ems-panel); color: var(--ems-ink); }
.pcr-card { background: var(--ems-panel); border: 1px solid var(--ems-line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.pcr-card[data-sec^="f_"] { border-left: 4px solid var(--ems-accent); }
.pcr-cardhead { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.pcr-cardhead h3 { flex: 1; margin: 0; font-size: 16px; letter-spacing: -.01em; }
.pcr-uto { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--ems-line); background: none; color: var(--ems-mute); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pcr-uto.on { border-color: var(--ems-accent); color: var(--ems-accent); background: color-mix(in srgb, var(--ems-accent) 10%, transparent); }
.pcr-ro { border: 0; padding: 0; margin: 0; min-width: 0; }
.pcr-dispatched { margin: 0 0 10px 4px; }
.pcr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; }
.pcr-f { grid-column: span 4; min-width: 0; border-radius: 8px; }
.pcr-f.half { grid-column: span 2; }
.pcr-l { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ems-mute); margin-bottom: 4px; min-height: 28px; }
.pcr-l > span { flex: 1; }
.pcr-from { font-weight: 600; color: var(--ems-accent); }
.pcr-in, .pcr-f input.pcr-in, .pcr-f select.pcr-in, .pcr-f textarea.pcr-in { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: var(--ems-ground); color: var(--ems-ink); font: inherit; font-size: 16px; }
textarea.pcr-in { min-height: 88px; line-height: 1.45; }
.pcr-in:focus, .pcr-num:focus { outline: 2px solid var(--ems-accent); outline-offset: 1px; border-color: var(--ems-accent); background: var(--ems-panel); }
.pcr-nv { width: 46px; min-height: 26px; padding: 0 2px; border: 1px solid var(--ems-line); border-radius: 6px; background: none; color: var(--ems-mute); font-size: 12px; opacity: .65; }
.pcr-nv:hover, .pcr-nv:focus { opacity: 1; }
.pcr-nvnote { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed var(--ems-line); border-radius: 10px; color: var(--ems-mute); font-style: italic; }
.pcr-unit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcr-unit > input { flex: 1; min-width: 80px; }
.pcr-unit > span { color: var(--ems-mute); font-size: 13px; }
.pcr-dt { display: flex; gap: 6px; }
.pcr-dt > input { flex: 1; min-width: 0; }
.pcr-now { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ems-accent); background: none; color: var(--ems-accent); font: inherit; font-weight: 700; cursor: pointer; }
.pcr-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcr-chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; -webkit-touch-callout: none; user-select: none; }
.pcr-chip.sm { min-height: 38px; padding: 0 12px; font-size: 13px; }
.pcr-chip.on { background: var(--ems-accent); border-color: var(--ems-accent); color: #fff; }
.pcr-chip.no { background: none; border: 1px dashed var(--ems-mute); color: var(--ems-ink); }
.pcr-chip.held { outline: 2px solid var(--ems-mute); }
.pcr-chip.else { border-color: var(--ems-accent); color: var(--ems-accent); }   /* (after 365) found at another side: tap to add this side */
.pcr-chip.locked { cursor: default; opacity: .9; }
.pcr-chip:disabled { cursor: default; }
@media (prefers-color-scheme: dark) { .pcr-chip.on { color: #0b1220; } }
.pcr-none { border-style: dashed; color: var(--ems-mute); }
.pcr-noner { margin-top: 6px; }
.pcr-quick { margin-top: 8px; }
.pcr-find.multi .pcr-quick { display: none; }
.pcr-find.multi:focus-within .pcr-quick { display: flex; }
.pcr-other { width: 150px !important; }
.pcr-more { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px dashed var(--ems-line); background: none; color: var(--ems-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pcr-morelist, .pcr-results { margin-top: 8px; border: 1px solid var(--ems-line); border-radius: 12px; padding: 6px; background: var(--ems-panel); }
.pcr-results { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.pcr-opts { max-height: 250px; overflow: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.pcr-opt { min-height: 44px; flex: none; text-align: left; padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--ems-ink); font: inherit; font-size: 15px; cursor: pointer; }
.pcr-opt:hover, .pcr-opt:focus-visible { background: var(--ems-ground); }
.pcr-opt.own { color: var(--ems-accent); font-weight: 600; }
.pcr-fold { margin-top: 14px; border-top: 1px solid var(--ems-line); padding-top: 6px; }
.pcr-fold > summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ems-accent); }
.pcr-fold[open] > summary { margin-bottom: 8px; }
.pcr-foldn { margin-left: 8px; font-size: 12.5px; font-weight: 500; color: var(--ems-mute); }
.pcr-flash { animation: pcr-flash 1.6s ease-out; }
@keyframes pcr-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--ems-red); } 100% { box-shadow: 0 0 0 3px transparent; } }
.pcr-secerr:empty, .pcr-err:empty { display: none; }
.pcr-two, .pcr-sentback, .pcr-stale { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ems-red); color: var(--ems-ink); background: color-mix(in srgb, var(--ems-red) 9%, var(--ems-panel)); font-size: 14px; }
.pcr-stale { border-color: var(--ems-accent); background: color-mix(in srgb, var(--ems-accent) 9%, var(--ems-panel)); }
.pcr-review { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--ems-accent); border-radius: 12px; background: color-mix(in srgb, var(--ems-accent) 7%, var(--ems-panel)); }
.pcr-review .grow { flex: 1; min-width: 180px; }
.pcr-ver { border: 1px solid var(--ems-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pcr-ver ul { margin: 6px 0 10px; padding-left: 18px; font-size: 14px; }
/* crew */
.pcr-crew { border: 1px solid var(--ems-line); border-radius: 10px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.pcr-crewtop { display: flex; gap: 8px; }
.pcr-crewtop select { flex: 1; min-width: 0; }
/* times, disposition */
.pcr-intervals { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 16px; }
.pcr-iv { padding: 6px 12px; border-radius: 10px; background: var(--ems-ground); font-size: 13px; color: var(--ems-mute); }
.pcr-iv b { font-size: 16px; color: var(--ems-ink); font-variant-numeric: tabular-nums; }
.pcr-intervals .pcr-warn { width: 100%; margin: 2px 0 0; }
.pcr-nodest { margin: 0 0 14px 4px; }
/* vitals */
.pcr-vitals td, .pcr-vitals th { padding: 10px 8px; }
.pcr-row { cursor: pointer; }
.pcr-row:hover td { background: color-mix(in srgb, var(--ems-accent) 7%, transparent); }
.pcr-hot { color: var(--ems-red); font-weight: 700; }
.pcr-trend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pcr-trendcell { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--ems-ground); font-size: 13px; }
.pcr-trendl { font-weight: 700; color: var(--ems-mute); }
.pcr-trendv { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcr-spark { width: 84px; height: 24px; flex: none; }
.pcr-spark polyline { stroke: var(--ems-accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.pcr-spark circle { fill: var(--ems-accent); }
dialog.pcr-dlg { width: min(720px, calc(100vw - 16px)); }
dialog.pcr-dlg.pcr-finish, dialog.pcr-dlg.pcr-menu { width: min(480px, calc(100vw - 16px)); }
dialog.pcr-dlg #dlgForm { max-height: 92vh; }
.pcr-padtime { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pcr-padtime .pcr-dt { flex: 1; min-width: 220px; }
.pcr-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pcr-nums .pcr-chips { margin-top: 6px; }
.pcr-nums .pcr-chip { min-height: 36px; padding: 0 10px; font-size: 13px; }
.pcr-bp { grid-column: span 2; display: flex; align-items: flex-end; gap: 6px; }
.pcr-bp .pcr-numf { flex: 1; }
.pcr-slash { font-size: 28px; color: var(--ems-mute); padding-bottom: 8px; }
.pcr-numf { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ems-mute); }
.pcr-numf small { font-weight: 500; }
.pcr-num { width: 100%; min-height: 56px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-size: 26px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pcr-calc { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--ems-mute); font-variant-numeric: tabular-nums; }
.pcr-warn { margin: 4px 0 8px; color: #9a5b00; font-weight: 600; font-size: 14px; }
.pcr-calc:empty, .pcr-warn:empty { display: none; }
@media (prefers-color-scheme: dark) { .pcr-warn { color: #ffcf7a; } }
.pcr-gcsbox, .pcr-painbox { border: 1px solid var(--ems-line); border-radius: 12px; padding: 10px 12px; margin: 10px 0 8px; }
.pcr-painbox { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
.pcr-gcsrow { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.pcr-gcsrow > span { width: 60px; flex: none; font-size: 13px; font-weight: 700; color: var(--ems-mute); }
.pcr-gcsrow .pcr-chip { min-width: 44px; padding: 0 10px; text-align: center; }
.pcr-gcsrow .pcr-chips { flex-wrap: nowrap; }
.pcr-gcs { margin-left: 4px; }
.pcr-faces { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.pcr-face { width: 66px; min-height: 66px; border-radius: 12px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; font-size: 24px; cursor: pointer; }
.pcr-face small { font-size: 11px; color: var(--ems-mute); }
.pcr-face.on { border-color: var(--ems-accent); box-shadow: inset 0 0 0 2px var(--ems-accent); }
.pcr-flacc .pcr-gcsrow > span { width: 120px; }
/* QuickTreat */
.pcr-sctnote { margin: 8px 0 0; }   /* the SNOMED CT line under the treatment picker (Build 226) */
.pcr-qtbody { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; min-height: 320px; }
.pcr-qtcats { display: flex; flex-direction: column; gap: 6px; }
.pcr-qtcat { min-height: 48px; border-radius: 10px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-weight: 700; cursor: pointer; text-align: left; padding: 0 12px; }
.pcr-qtcat.on { background: var(--ems-navy); border-color: var(--ems-navy); color: #fff; }
.pcr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; align-content: start; }
.pcr-tile { min-height: 64px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ems-line); background: var(--ems-ground); color: var(--ems-ink); font: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pcr-tile:hover, .pcr-tile:focus-visible { border-color: var(--ems-accent); }
.pcr-tile .small { color: var(--ems-mute); }
.pcr-tile.other { border-style: dashed; background: none; }
/* timeline */
.pcr-tl { display: flex; flex-direction: column; gap: 6px; }
.pcr-tlrow { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border: 1px solid var(--ems-line); border-radius: 10px; background: var(--ems-panel); color: var(--ems-ink); font: inherit; text-align: left; cursor: pointer; }
.pcr-tlrow:disabled { cursor: default; opacity: 1; }
.pcr-tlrow .grow { flex: 1; min-width: 0; }
.pcr-tltime { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 52px; }
.pcr-tlrow[data-kind="event"] { border-left: 4px solid var(--ems-red); }
.pcr-tlrow[data-kind="vitals"], .pcr-tlrow[data-kind="assess"] { background: var(--ems-ground); border-color: transparent; min-height: 44px; }
.pcr-formrow { display: flex; align-items: center; gap: 6px; }
/* Master Admin → EMS → Treatments (Build 189) */
.ems-treatgroup { border-top: 1px solid var(--ems-line, #e4e7ec); padding: 6px 0; }
.ems-treatgroup > summary { font-weight: 700; cursor: pointer; min-height: 36px; display: flex; align-items: center; }
.ems-treatrow { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 2px 0; }
.ems-treatrow.off b { font-weight: 500; opacity: .75; }
.ems-treatrow .grow { flex: 1; min-width: 0; }
/* ---- treatments (Build 189): the picker, a card per treatment, the vial, the waste and its witness, the timeline ---- */
.pcr-qtfind { margin: 0 0 10px; }
.pcr-qtcat { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pcr-qtn { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ems-accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pcr-tile.picked { border-color: var(--ems-accent); box-shadow: inset 0 0 0 2px var(--ems-accent); position: relative; }
.pcr-tile.picked::after { content: '✓'; position: absolute; top: 6px; right: 10px; font-weight: 800; color: var(--ems-accent); }
.pcr-multi { margin-right: auto; }
.pcr-txcards { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pcr-txcards.multi .pcr-txcard { border: 1px solid var(--ems-line); border-radius: 12px; padding: 10px 12px; background: var(--ems-ground); }
.pcr-txcards.multi .pcr-txcard .pcr-in, .pcr-txcards.multi .pcr-txcard .pcr-num { background: var(--ems-panel); border-color: var(--ems-line); }   /* a box on a grey card still looks like a box */
.pcr-txhead { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.pcr-txname { font-size: 16px; }
.pcr-notbtn.on { background: var(--ems-red); border-color: var(--ems-red); color: #fff; }
.pcr-notwhy { margin: 2px 0 10px; }
.pcr-txfold { margin-top: 8px; }
.pcr-allergywarn, .pcr-allergyask { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--ems-red); background: rgba(180, 35, 24, .08); color: var(--ems-ink); font-weight: 700; }
.pcr-allergyask { margin-top: 12px; }
.pcr-warnkept { color: #9a5b00; font-weight: 600; margin: 0 0 8px; }
.pcr-doseoffers { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.pcr-doseoffers:empty { display: none; }
.pcr-doseoffer { text-align: left; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px dashed var(--ems-accent); background: none; color: var(--ems-ink); font: inherit; cursor: pointer; }
.pcr-doseoffer:hover, .pcr-doseoffer:focus-visible { background: var(--ems-ground); }
.pcr-protodose { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--ems-line); }
.pcr-protodose:first-child { border-top: 0; }
.pcr-protodose .grow { flex: 1; min-width: 0; }
.pcr-barcode { flex: 1; min-width: 180px; }
.pcr-scansaid { margin: 0 0 8px; font-weight: 600; }
.pcr-scansaid.ok { color: #1a7f37; } .pcr-scansaid.warn { color: #9a5b00; }
.pcr-scansaid.bad { color: var(--ems-red); padding: 8px 10px; border: 2px solid var(--ems-red); border-radius: 10px; }
.pcr-lots, .pcr-csask { margin: 0 0 10px; }
.pcr-witbox { margin-top: 10px; }
.pcr-witpinrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pcr-witok { color: #1a7f37; font-weight: 700; margin: 8px 0 0; }
.pcr-witname { margin: 8px 0; }
.pcr-suprow { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--ems-line); }
.pcr-step { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.pcr-supq { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.pcr-supadd { margin-top: 8px; }
.pcr-tlline { display: flex; align-items: stretch; gap: 6px; }
.pcr-tlline .pcr-tlrow { flex: 1; min-width: 0; }
.pcr-tlline.off .pcr-tlrow b { text-decoration: line-through; text-decoration-thickness: 1px; }
.pcr-tlline.off .pcr-tlrow { background: var(--ems-ground); }
.pcr-tlline.running .pcr-tlrow { border-color: var(--ems-accent); }
.pcr-stop { flex: none; min-width: 84px; border-radius: 10px; border: 0; background: var(--ems-red); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.pcr-tlflag { color: var(--ems-red); font-weight: 700; }
.pcr-sigwho { max-width: 420px; }
.cs-fromchart { margin: 0 0 6px; padding: 6px 8px; border-radius: 8px; background: rgba(26, 127, 55, .08); }
.cs-chartuse { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line, #e3e6ea); }
@media (prefers-color-scheme: dark) { .pcr-warnkept, .pcr-scansaid.warn { color: #ffcf7a; } .pcr-scansaid.ok, .pcr-witok { color: #7ee2a8; } .pcr-stop, .pcr-notbtn.on, .pcr-qtn { color: #10151c; } }
@media (max-width: 700px) { .pcr-stop { min-width: 64px; } }
/* the assessment */
.pcr-axhead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pcr-axwhen { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcr-axwhen .pcr-dt { flex: 1; min-width: 220px; max-width: 320px; }
.pcr-axrow { padding: 10px 0; border-top: 1px solid var(--ems-line); }
.pcr-axtop { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.pcr-axname { flex: 1; min-width: 120px; font-weight: 600; }
.pcr-axname small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ems-mute); }
.pcr-segs { display: inline-flex; border: 1px solid var(--ems-line); border-radius: 12px; overflow: hidden; }
.pcr-seg { min-height: 44px; padding: 0 14px; border: 0; border-left: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pcr-seg:first-child { border-left: 0; }
.pcr-seg.on { background: var(--ems-accent); color: #fff; }
.pcr-seg.abn.on { background: var(--pcr-amber); color: #fff; }
.pcr-seg[data-s="x"].on { background: var(--ems-mute); color: #fff; }
@media (prefers-color-scheme: dark) { .pcr-seg.on, .pcr-seg.abn.on, .pcr-seg[data-s="x"].on { color: #0b1220; } }
.pcr-axnote { margin-top: 6px; font-size: 13px; color: var(--ems-mute); }
.pcr-axsum { width: 100%; min-height: 40px; margin-top: 8px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--pcr-amber) 9%, var(--ems-panel)); color: var(--ems-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pcr-axsum .grow { flex: 1; }
.pcr-axopen { margin: 10px 0 2px; padding: 12px; border-radius: 12px; background: var(--ems-ground); display: flex; flex-direction: column; gap: 8px; }
.pcr-axopen .pcr-in { background: var(--ems-panel); }
.pcr-loclabel { font-size: 12.5px; font-weight: 600; color: var(--ems-mute); margin-right: 2px; }
.pcr-axhint { margin: 10px 0 0; }
.pcr-axothers, .pcr-axtrend { margin-top: 16px; }
.pcr-axothers .pcr-tlrow { margin-bottom: 6px; }
.pcr-changed { background: color-mix(in srgb, var(--ems-accent) 12%, transparent); font-weight: 600; }
.pcr-axread { padding: 8px 0; border-top: 1px solid var(--ems-line); }
.pcr-axread:first-child { border-top: 0; }
.pcr-axread ul { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.pcr-diagram { border: 1px solid var(--ems-line); border-radius: 12px; padding: 12px; margin: 4px 0 10px; }
.pcr-views { display: none; gap: 6px; justify-content: center; margin: 10px 0 0; }
.pcr-viewbtn { min-height: 38px; padding: 0 18px; border-radius: 19px; border: 1px solid var(--ems-line); background: none; color: var(--ems-ink); font: inherit; font-weight: 600; cursor: pointer; }
.pcr-viewbtn.on { background: var(--ems-navy); border-color: var(--ems-navy); color: #fff; }
.pcr-bodies { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.pcr-bodysvg { width: 46%; max-width: 250px; height: auto; touch-action: manipulation; }
.pcr-zone { fill: var(--ems-ground); stroke: var(--ems-mute); stroke-width: 1.2; cursor: pointer; }
.pcr-zone:hover, .pcr-zone:focus-visible { fill: color-mix(in srgb, var(--ems-accent) 22%, var(--ems-ground)); stroke: var(--ems-accent); outline: none; }
.pcr-zone.was { fill: color-mix(in srgb, var(--ems-mute) 30%, var(--ems-ground)); }
.pcr-zone.hit { fill: color-mix(in srgb, var(--ems-accent) 45%, var(--ems-ground)); stroke: var(--ems-accent); }
.pcr-zone.burn { fill: color-mix(in srgb, var(--ems-red) 45%, var(--ems-ground)); stroke: var(--ems-red); }
.pcr.readonly .pcr-zone { cursor: default; }
.pcr-mark { fill: var(--ems-navy); pointer-events: none; }
.pcr-markn { fill: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }
.pcr-bodycap { fill: var(--ems-mute); font-size: 11px; font-weight: 600; }
.pcr-marks { margin-top: 10px; }
.pcr-tbsa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ems-mute); }
.pcr-tbsa .pcr-in { width: 92px; flex: none; }
.pcr-tbsa .small { flex: 1; min-width: 200px; font-weight: 500; }
/* forms that open in place */
.pcr-formbox { margin-top: 10px; padding: 12px; border: 1px solid var(--ems-accent); border-radius: 12px; background: color-mix(in srgb, var(--ems-accent) 4%, var(--ems-panel)); }
.pcr-formhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pcr-critbox { margin-top: 16px; }
.pcr-crit { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 14px; }
.pcr-crit .grow { flex: 1; }
.pcr-crit small { color: var(--ems-mute); }
.pcr-critmark { width: 20px; flex: none; text-align: center; font-weight: 700; color: var(--ems-mute); }
.pcr-crit.red .pcr-critmark { color: var(--ems-red); }
.pcr-crit.yellow .pcr-critmark { color: var(--pcr-amber); }
.pcr-verdict { margin: 8px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ems-line); font-size: 14px; font-weight: 600; }
.pcr-verdict.red { border-color: var(--ems-red); background: color-mix(in srgb, var(--ems-red) 8%, var(--ems-panel)); }
.pcr-verdict.yellow { border-color: var(--pcr-amber); background: color-mix(in srgb, var(--pcr-amber) 9%, var(--ems-panel)); }
.pcr-lines { margin: 14px 0 0; font-size: 14px; line-height: 2; }
.pcr-alertbtn { margin-top: 14px; }
.pcr-alerted { margin: 14px 0 0; font-weight: 600; }
.pcr-pts { margin: 10px 0 0; }
/* signatures, hand-off */
.pcr-sig .cs-sig { width: 100%; max-width: 600px; height: auto; border: 1px solid var(--ems-line); border-radius: 10px; touch-action: none; background: #fff; }
.pcr-sigimg { max-width: 320px; width: 100%; border: 1px solid var(--ems-line); border-radius: 10px; background: #fff; display: block; margin-bottom: 6px; }
.pcr-usesig { margin-top: 8px; }
.pcr-hosum { border: 1px solid var(--ems-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 15px; line-height: 1.5; background: var(--ems-ground); }
/* to finish, and the chart's own menu */
.pcr-misstab { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ems-mute); margin: 10px 0 4px; }
.pcr-miss { margin-bottom: 12px; max-height: 56vh; overflow: auto; }
.pcr-missrow { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 0; border-left: 3px solid var(--ems-red); border-radius: 0 8px 8px 0; background: none; color: var(--ems-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; margin-bottom: 2px; }
.pcr-missrow:hover { background: var(--ems-ground); }
.pcr-missrow .grow { flex: 1; }
/* QA reminders before Send / Finish (Build 202): amber, not red — they never block a chart */
.pcr-remind { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.pcr-remrow { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-left: 3px solid var(--warn); border-radius: 0 8px 8px 0; background: var(--chip-warn); color: var(--ems-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pcr-remrow:hover { filter: brightness(.97); }
.pcr-remrow .grow { flex: 1; } .pcr-remrow .small { margin-top: 2px; }
.pcr-remgo { font-size: 22px; color: var(--ems-mute); }
.pcr-remhead { color: var(--warn); }
.emsq-noremind { margin-left: 6px; }
.pcr-lvl { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ems-line); color: var(--ems-mute); white-space: nowrap; }
.pcr-lvl.state { border-color: var(--ems-red); color: var(--ems-red); }
.pcr-acts { display: flex; flex-direction: column; }
.pcr-acts .btn { width: 100%; margin-top: 8px; }
/* the action bar: vitals and treatments are one tap from anywhere on the chart */
.pcr-foot { position: sticky; bottom: 8px; z-index: 7; display: flex; gap: 8px; align-items: center; max-width: 680px; margin: 14px auto 0; padding: 8px; background: color-mix(in srgb, var(--ems-panel) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--ems-line); border-radius: 16px; box-shadow: 0 6px 20px rgba(16, 24, 40, .14); }
.pcr-foot .grow { flex: 1; }
.pcr-fb { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--ems-line); background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pcr-fb.primary { background: var(--ems-accent); border-color: var(--ems-accent); color: #fff; }
.pcr-short { display: none; }
@media (prefers-color-scheme: dark) { .pcr-fb.primary { color: #0b1220; } }
.ems-pickcall .ems-row.on { border-color: var(--ems-accent); box-shadow: inset 0 0 0 1px var(--ems-accent); }
.ems-review-card { border-left: 4px solid var(--ems-accent) !important; }
.ems-req details, .ems-lists details, .ems-forms details { border: 1px solid var(--ems-line); border-radius: 10px; padding: 4px 12px; margin-bottom: 6px; }
.ems-req summary, .ems-lists summary, .ems-forms summary { min-height: 40px; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.ems-lists textarea, .ems-forms textarea { margin: 4px 0 8px; font: inherit; }
@media (max-width: 1100px) { .pcr-body { grid-template-columns: minmax(0, 1fr); } .pcr-main { grid-column: 1; width: 100%; max-width: 680px; margin: 0 auto; } .pcr-side { display: none; } }
/* ---- Build 186: exposure reports (Personnel) ---- */
.pm-exps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pm-exp { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pm-exp .grow { flex: 1; min-width: 0; } .pm-exp:hover { border-color: var(--focus); }
.pm-expkinds { display: flex; flex-direction: column; gap: 6px; } .pm-expkinds .chk { white-space: normal; }
/* ---- Build 186: what the rest of Fire Hub already knows, on the chart ---- */
.pcr-headbtn.on, .pcr-headbtn.on:hover { background: #fff; color: var(--ems-navy); border-color: #fff; }
.pcr-protobtn { font-size: 18px; }
.pcr-wt > input { min-width: 70px; } .pcr-wt .pcr-chip { min-height: 44px; min-width: 48px; padding: 0 10px; text-align: center; } .pcr-wtother { margin-top: 4px; min-height: 16px; }
/* the crew */
.pcr-crewname { flex: 2; min-width: 0; display: flex; gap: 6px; } .pcr-crewname input { min-width: 0; }
.pcr-crewsrc { margin: -4px 0 0 2px; }
.pcr-crewmore { margin-top: 2px; } .pcr-crewmore .pcr-l { margin-bottom: 4px; }
.pcr-allwore { margin: 0 0 12px; }
.pcr-expnote { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--pcr-amber) 10%, var(--ems-panel)); border: 1px solid color-mix(in srgb, var(--pcr-amber) 45%, var(--ems-line)); }
/* the scene's property */
.pcr-place { margin: 0 0 16px; padding: 12px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-ground); }
.pcr-place.offer { border-color: var(--ems-accent); background: color-mix(in srgb, var(--ems-accent) 5%, var(--ems-panel)); }
.pcr-place.none { padding: 0; border: 0; background: none; }
.pcr-placehead { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; } .pcr-placehead .grow { flex: 1; min-width: 180px; } .pcr-pin { font-size: 18px; line-height: 1.3; }
.pcr-place.offer .pcr-placepick { margin-top: 10px; }
.pcr-hz { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--ems-line); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pcr-hz .hot { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--ems-red); background: color-mix(in srgb, var(--ems-red) 8%, var(--ems-panel)); }
.pcr-atplace { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-panel); color: var(--ems-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pcr-atplace .grow { flex: 1; } .pcr-atplace.hot { border-color: var(--ems-red); } .pcr-atplace.hot b { color: var(--ems-red); }
.pcr-placelist { max-height: 46vh; }
dialog.pcr-dlg.pcr-placedlg, dialog.pcr-dlg.pcr-cad { width: min(520px, calc(100vw - 16px)); }
/* dispatch, read again */
.pcr-cadbar { margin: 12px 0 0; align-items: center; gap: 10px; flex-wrap: wrap; } .pcr-cadbar .grow { flex: 1; min-width: 160px; }
.pcr-cadlist { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; }
.pcr-cadrow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border: 1px solid var(--ems-line); border-radius: 10px; cursor: pointer; } .pcr-cadrow .grow { flex: 1; } .pcr-cadrow input { width: 20px; height: 20px; flex: none; }
/* an offer: one tap accepts it */
.pcr-offer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; padding: 12px; border: 1px dashed var(--ems-accent); border-radius: 12px; background: color-mix(in srgb, var(--ems-accent) 5%, var(--ems-panel)); font-size: 14px; }
.pcr-offer .grow { flex: 1; min-width: 200px; } .pcr-offertrend { margin-top: 4px; font-variant-numeric: tabular-nums; }
.pcr-where { margin: 14px 0 0; line-height: 1.6; }
/* the protocols, beside the chart */
.pcr-proto { display: flex; flex-direction: column; min-width: 0; background: var(--ems-panel); border: 1px solid var(--ems-line); border-radius: 14px; overflow: hidden; }
.pcr-protohead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ems-navy); color: #fff; } .pcr-protohead .grow { flex: 1; min-width: 0; } .pcr-protowt { opacity: .86; margin-top: 2px; }
.pcr-protohead .btn { min-height: 40px; background: none; color: #fff; border-color: rgba(255,255,255,.4); }
.pcr-protofits { padding: 8px 12px; border-bottom: 1px solid var(--ems-line); }
.pcr-protoframe { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
@media (min-width: 1101px) {   /* room for both: the chart keeps its column, the reader takes the right-hand side and stays put while the chart scrolls */
  .pcr-body.with-proto { grid-template-columns: minmax(0, 1fr) 520px; column-gap: 18px; }
  .pcr-body.with-proto .pcr-side { display: none; }
  .pcr-body.with-proto .pcr-main { grid-column: 1; justify-self: center; width: 100%; max-width: 680px; }
  .pcr-body.with-proto .pcr-proto { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--pcr-pin, 56px) + 8px); height: calc(100vh - var(--pcr-pin, 56px) - 16px); }   /* below the app's own bar */
  .pcr:has(> .pcr-body.with-proto) .pcr-foot { margin-left: max(0px, calc((100% - 538px - 680px) / 2)); margin-right: 0; max-width: min(680px, calc(100% - 538px)); }   /* the bottom bar stays under the chart's column */
}
@media (max-width: 1100px) { .pcr-proto { position: fixed; inset: 0; z-index: 70; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); } }   /* a small screen: the reader covers the chart until it is closed */
@media (max-width: 899px) {
  /* a chart on a phone: the two headers give their room to the chart */
  .ems-inchart .ems-head { padding: 8px 12px; margin-bottom: 8px; }
  .ems-inchart .ems-head > div:first-child, .ems-inchart .ems-chip small { display: none; }
  .ems-inchart .ems-lockbtn { min-height: 40px; }
  .pcr-head { padding: 10px 12px; gap: 6px 8px; }
  .pcr-head .grow { display: none; }
  .pcr-back { min-height: 40px; padding: 0 10px; }
  .pcr-who { flex: 1 1 150px; }
  .pcr-state { max-width: none; width: 100%; text-align: left; order: 5; }
  .pcr-foot { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .pcr-gcsrow > span { width: 52px; }
  .pcr-gcsrow .pcr-chip { min-width: 40px; min-height: 40px; padding: 0 6px; }
  .pcr-gcsrow { gap: 6px; }
}
@media (max-width: 620px) {
  .pcr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pcr-f { grid-column: span 2; } .pcr-f.half { grid-column: span 1; }
  .pcr-f.half:has(.pcr-dt), .pcr-f.half:has(.pcr-chips) { grid-column: span 2; }
  .pcr-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pcr-painbox { grid-template-columns: minmax(0, 1fr); } .pcr-qtbody { grid-template-columns: 1fr; } .pcr-qtcats { flex-direction: row; overflow-x: auto; } .pcr-qtcat { white-space: nowrap; }
  .pcr-card { padding: 14px; } .pcr-name { font-size: 17px; }
  .pcr-seg { padding: 0 10px; font-size: 13px; } .pcr-axtop .pcr-segs { width: 100%; } .pcr-axtop .pcr-seg { flex: 1; }
  .pcr-views { display: flex; } .pcr-bodysvg { width: 82%; max-width: 300px; }
  .pcr-bodies[data-view="f"] svg:nth-child(2), .pcr-bodies[data-view="b"] svg:nth-child(1) { display: none; }
  .pcr-fb { padding: 0 12px; } .pcr-long { display: none; } .pcr-short { display: inline; }
}

/* ---- Build 187: patient data in — word lists, seen before, license and medication scans, photos ---- */
.pcr-terms { display: flex; flex-direction: column; gap: 6px; }
.pcr-termlist { display: flex; flex-direction: column; gap: 4px; }
.pcr-term { display: flex; align-items: center; gap: 4px; border: 1px solid var(--ems-line); border-radius: 10px; background: var(--ems-panel); }
.pcr-term.from { border-style: dashed; border-color: var(--ems-accent); }
.pcr-term.warn { border-color: var(--ems-red); }
.pcr-termname { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 12px; border: 0; background: none; color: var(--ems-ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pcr-termwarn { color: var(--ems-red); font-weight: 600; }
.pcr-termbar { display: flex; gap: 8px; align-items: center; } .pcr-termbar .pcr-in { flex: 1; min-width: 0; }
.pcr-termres { border: 1px solid var(--ems-line); border-radius: 10px; padding: 4px; max-height: 300px; overflow: auto; }
.pcr-termopt small { font-weight: 400; }
.pcr-allright { align-self: flex-start; }
.pcr-hints { grid-column: 1 / -1; margin: 2px 0 14px; display: flex; flex-direction: column; gap: 8px; } .pcr-hints:empty { display: none; }
.pcr-thin { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ems-red); background: color-mix(in srgb, var(--ems-red) 8%, var(--ems-panel)); font-size: 14px; }
.pcr-thin.soft { border-color: var(--ems-line); background: var(--ems-ground); }
.pcr-thinflag { margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: #B42318; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.pcr-hint { margin: 0; }
.pcr-ptbar { margin: 0 0 14px; }
.pcr-samescene { margin-left: 10px; }
.pcr-seenbox:empty { display: none; } .pcr-seennone { margin: 0 0 12px; } .pcr-seenruns { margin-bottom: 10px; } .pcr-seenrun { margin: 0 0 8px; }
.pcr-cadrow.warn { border-color: var(--ems-red); }
.pcr-medtext { width: 100%; box-sizing: border-box; } .pcr-medbar { margin: 0 0 10px; flex-wrap: wrap; }
.pcr-termsnote { margin: 14px 0 0; }
.pcr-cambtn { position: relative; } .pcr-mondot { position: absolute; top: -4px; left: -4px; width: 12px; height: 12px; border-radius: 6px; background: #f59e0b; border: 2px solid #fff; } .pcr-monmore { margin: 6px 0; padding: 8px; border-radius: 8px; background: #fff7e6; } .pcr-monmore .pcr-monwarn { margin-bottom: 6px; } .pcr-monmore .btn.pcr-monmorego { min-height: 44px; height: auto; } .pcr-camn { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #fff; color: var(--ems-navy); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.pcr-camview { position: relative; margin: 12px 0 8px; background: #000; border-radius: 12px; overflow: hidden; min-height: 96px; display: flex; justify-content: center; }
.pcr-camvideo { width: 100%; max-height: 50vh; object-fit: contain; display: block; }
.pcr-shutter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: 68px; height: 68px; padding: 0; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; } .pcr-shutter span { display: block; width: 48px; height: 48px; margin: auto; border-radius: 50%; background: #fff; } .pcr-shutter:disabled { opacity: .4; }
.pcr-cammsg { color: var(--ems-red); min-height: 1em; } .pcr-camangles { margin-top: 8px; }
.pcr-camstrip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; } .pcr-camstrip:empty { display: none; } .pcr-camthumb { flex: none; width: 72px; text-align: center; font-size: 11px; } .pcr-camthumb img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; } .pcr-camthumb span { display: block; font-size: 30px; line-height: 54px; }
.pcr-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; }
.pcr-viewimg { display: block; width: 100%; max-height: 58vh; object-fit: contain; background: #000; border-radius: 10px; margin-bottom: 12px; }
.pcr-addfile { display: inline-flex; align-items: center; cursor: pointer; }
.pcr-camcount { white-space: nowrap; }   /* (301) the count opens the photo list */
.scan-frame.wide { width: min(92vw, 560px); aspect-ratio: 3.2; }
.pcr-readscan .pcr-shutter { bottom: calc(150px + env(safe-area-inset-bottom)); } .pcr-readscan .scan-msg { bottom: calc(84px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.55); border-radius: 10px; padding: 6px 10px; }
.scan-photo { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.92); color: #000; cursor: pointer; white-space: nowrap; }
.pcr-widescan .scan-msg { bottom: calc(86px + env(safe-area-inset-bottom)); }
/* (Build 202) scanning the front of a license: a card-shaped outline (ID-1, 85.6 × 54 mm) and the shutter above the message */
.scan-frame.idcard { width: min(88vw, 520px); aspect-ratio: 1.586; border-radius: 14px; }
.pcr-frontscan .pcr-shutter { bottom: calc(150px + env(safe-area-inset-bottom)); } .pcr-frontscan .scan-msg { bottom: calc(84px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.55); border-radius: 10px; padding: 6px 10px; }
.pcr-who2 { margin: 0 0 14px; } .pcr-txtime { margin: 0 0 14px; } .pcr-byrole { margin-top: 10px; } .pcr-byother-member { margin-top: 8px; max-width: 260px; }
.ems-termrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--ems-line); } .ems-termrow .grow { flex: 1; min-width: 220px; }

/* ---------- EMS: from the monitor (Build 190) ---------- */
.pcr-mondlg { max-width: 720px; }
.pcr-monhave { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--ems-line); border-radius: 10px; }
.pcr-monrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; } .pcr-monrow .grow { flex: 1; min-width: 180px; }
.pcr-monpick { margin: 12px 0 0; }
.pcr-monnone { margin: 6px 0 12px; }
.pcr-monwho { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 10px 12px; border: 1px solid var(--ems-line); border-radius: 10px; margin: 0 0 10px; }
.pcr-monwho .pcr-l { display: block; } .pcr-monwho.bad { border-color: var(--ems-red); border-width: 2px; }
.pcr-monwarn { grid-column: 1 / -1; color: var(--ems-red); font-weight: 700; }
.pcr-montime { margin: 0 0 12px; } .pcr-monmovel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pcr-monsec { margin: 0 0 12px; } .pcr-monsechead { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--ems-line); padding: 4px 0; } .pcr-monsechead h4 { margin: 0; flex: 1; font-size: 15px; }
.pcr-monline { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--ems-line); cursor: pointer; min-height: 44px; box-sizing: border-box; }
.pcr-monline input[type=checkbox] { width: 22px; height: 22px; margin: 2px 0 0; flex: none; } .pcr-monline .grow { flex: 1; min-width: 0; } .pcr-monline.have { opacity: .6; cursor: default; }
.pcr-monline.hot { background: rgba(200, 30, 30, .06); }
.pcr-monpic { display: block; max-width: 100%; max-height: 180px; margin-top: 6px; border: 1px solid var(--ems-line); border-radius: 6px; background: #fff; }
.pcr-mon { white-space: nowrap; }
.ems-monrow, .ems-monmaprow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; } .ems-monrow input[type=text] { flex: 1; min-width: 150px; } .ems-monrow select { flex: 1; min-width: 150px; }
.ems-monmaprow .ems-monsay { width: 130px; } .ems-monmaprow select { flex: 1; min-width: 180px; }
.ems-monmapwrap { margin: 6px 0; } .ems-monmapwrap summary { cursor: pointer; padding: 6px 0; font-weight: 600; } .ems-montest { margin-top: 6px; }
@media (max-width: 520px) { .pcr-monwho { grid-template-columns: 1fr; } }

/* ---------- EMS sign-off (Build 191): times out of sequence, the narrative draft, the Sign tab ---------- */
.pcr-lvl.time { border-color: var(--ems-red); color: var(--ems-red); }
.pcr-seq { margin-top: 2px; }
.pcr-signcheck.bad { border-color: var(--ems-red); border-width: 2px; }
.pcr-seqlist { display: grid; gap: 6px; margin: 6px 0 2px; }
.pcr-seqrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-left: 3px solid var(--ems-red); border-radius: 0 10px 10px 0; background: var(--ems-ground); font-size: 14px; }
.pcr-seqrow .grow { flex: 1; min-width: 200px; } .pcr-seqic { font-size: 18px; }
.pcr-seqbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.pcr-seqdlg { max-width: 560px; }
.pcr-words { margin: 10px 0 8px; padding: 10px 14px; border-left: 3px solid var(--ems-accent); border-radius: 0 10px 10px 0; background: var(--ems-ground); font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.pcr-sigblock { margin: 6px 0 4px; }
.pcr-signoffer { margin: 8px 0 0; } .pcr-cant { margin-top: 6px; }
.pcr-signlast { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--ems-mute); }
.pcr-signsend { margin: 4px 0 18px; padding: 12px 14px; border: 1px solid var(--ems-line); border-radius: 14px; background: var(--ems-panel); align-items: center; }
.pcr-ainote { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ems-accent) 8%, var(--ems-panel)); border: 1px solid color-mix(in srgb, var(--ems-accent) 35%, var(--ems-line)); }
.pcr-nardlg { max-width: 760px; }
.pcr-narparts { display: grid; gap: 10px; margin: 10px 0; }
.pcr-narpart { border: 1px solid var(--ems-line); border-left: 4px solid var(--ems-mute); border-radius: 10px; padding: 10px 12px; }
.pcr-narpart.ok { border-left-color: #1a7f37; } .pcr-narpart.off { opacity: .55; } .pcr-narpart.off .pcr-nartext { text-decoration: line-through; }
.pcr-narpart h4 { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ems-mute); }
.pcr-nartext { margin: 0 0 6px; font-size: 15px; line-height: 1.75; }
.pcr-nars { cursor: pointer; border-radius: 4px; padding: 1px 2px; }
.pcr-nars.new { background: color-mix(in srgb, var(--ems-accent) 14%, transparent); }
.pcr-narpart.ok .pcr-nars.new { background: none; }
.pcr-nars.check { background: color-mix(in srgb, var(--ems-red) 14%, transparent); font-weight: 600; }
.pcr-nars.on, .pcr-nars:focus-visible { outline: 2px solid var(--ems-accent); }
.pcr-narone { margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--ems-ground); }
.pcr-narone ul { margin: 2px 0 0; padding-left: 18px; }
.pcr-narfoot { margin: 4px 0 0; gap: 6px; flex-wrap: wrap; }
.pcr-nargaps { margin: 8px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--ems-red); background: color-mix(in srgb, var(--ems-red) 7%, var(--ems-panel)); font-size: 14px; }
.pcr-narline { display: flex; gap: 8px; margin: 4px 0; align-items: flex-start; }
.ems-wording details { margin: 4px 0; }
@media (max-width: 700px) { .pcr-seqrow { align-items: flex-start; } .pcr-signsend { flex-wrap: wrap; } }
.pcr-hosum .pcr-sigimg { max-height: 72px; max-width: 260px; width: auto; display: block; margin-bottom: 4px; background: #fff; border-radius: 6px; }
.pcr-card[data-sec="sign"] .pcr-f + .pcr-f, .pcr-card[data-sec="sign"] .pcr-words + .pcr-f, .pcr-card[data-sec="sign"] .pcr-f + .pcr-words { margin-top: 14px; }

/* Build 192: the call's times in order under the chart header */
.pcr-tstrip { flex-basis: 100%; display: flex; align-items: center; gap: 2px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15); }
.pcr-tstrip::-webkit-scrollbar { display: none; }
.pcr-tstop { display: inline-flex; flex-direction: column; align-items: center; min-height: 40px; padding: 2px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #fff; font: inherit; cursor: pointer; line-height: 1.15; }
.pcr-tstop:hover { background: rgba(255,255,255,.1); }
.pcr-tstop .pcr-tlab { font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: .03em; }
.pcr-tstop b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pcr-tstop.bad { background: #C8372D; border-color: #F08A80; }
.pcr-tstop.bad .pcr-tlab { opacity: 1; }
.pcr-trows { flex-direction: row; font-size: 13px; font-weight: 600; margin-left: 8px; }
.pcr-tsep { opacity: .45; font-size: 14px; }

/* ---- QA/QI (Build 193): the review queue, a review beside the chart, the rules, a crew member's inbox ---- */
.emsq-cols { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 6fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .emsq-cols { grid-template-columns: 1fr; } }
.emsq-row.emsq-mine { opacity: .7; cursor: default; }
.emsq-why { color: var(--ems-mute); }
.emsq-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.emsq-seg a { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
/* Billing (Build 329): the run's big buttons, its checks and its history */
.emsb-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.emsb-acts .emsb-act { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.emsb-seg { min-height: 44px; }
.emsb-miss { color: var(--warn); }
.emsb-reason { border-left: 3px solid var(--ems-accent); padding-left: 10px; }
.emsb-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--ems-line); }
.emsb-check:first-of-type { border-top: 0; }
.emsb-mark { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--ems-accent); }
.emsb-check.no .emsb-mark { background: var(--warn); }
.emsb-event { padding: 8px 0; border-top: 1px solid var(--ems-line); }
.emsb-event:first-of-type { border-top: 0; }
.emsb-note-text { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: var(--bg); white-space: pre-wrap; }
.emsb .card label.chk { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.emsb .card label.chk input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; }
.emsb-kinds { margin-bottom: 10px; }
.emsb-kinds .chip-btn { min-height: 44px; }
.emsb .today-row.emsb-person { cursor: default; }
.emsq-tab h4 { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ems-mute); }
.emsq-fact { padding: 4px 8px; border-left: 3px solid transparent; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.emsq-fact.on { background: var(--chip-warn); border-left-color: var(--warn); }
.emsq-narr { white-space: pre-wrap; padding: 8px; border: 1px solid var(--ems-line); border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.emsq-finding { border: 1px solid var(--ems-line); border-left: 4px solid var(--warn); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.emsq-finding.accepted { border-left-color: var(--ok); }
.emsq-finding.dismissed { border-left-color: var(--ems-line); opacity: .75; }
.emsq-ftitle { font-weight: 700; margin: 4px 0 2px; }
.emsq-proto blockquote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--ems-line); color: var(--ems-mute); white-space: pre-wrap; }
.emsq-rests { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 0 0; color: inherit; font: inherit; }
button.emsq-rests { cursor: pointer; }
.emsq-note { border-top: 1px solid var(--ems-line); padding: 8px 0; }
.emsq-ntext { white-space: pre-wrap; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
/* Build 195 — a question in a review, and its answers */
.emsq-thread { border: 1px solid var(--ems-line); border-left: 4px solid var(--ems-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.emsq-thread.turn { border-left-color: var(--warn); }
.emsq-thread.closed { opacity: .75; }
.emsq-about { margin: 2px 0 4px; overflow-wrap: anywhere; }
.emsq-turn { padding: 6px 10px; margin: 6px 0 0; border-radius: 8px; background: var(--ems-ground); }
.emsq-turn.crew { margin-left: 18px; }
.emsq-turn.reviewer { margin-right: 18px; }
.emsq-writebox { margin-top: 8px; }
.emsq-held { color: var(--ems-mute); }
.emsq-pick { max-height: 260px; overflow: auto; display: grid; gap: 6px; margin: 6px 0; }
.emsq-pick label.chk { white-space: normal; align-items: flex-start; }
.emsq-checks { margin-top: 12px; }
.emsq-rulerow { border: 1px solid var(--ems-line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.emsq-rulerow.off { opacity: .6; }
.emsq-alt { border: 1px dashed var(--ems-line); border-radius: 10px; padding: 8px; margin: 4px 0; }
.emsq-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.emsq-many { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.emsq-words { min-width: 220px; }
.emsq-when select, .emsq-when input, .emsq-ex select, .emsq-ex input, .emsq-dlg select, .emsq-dlg input[type=number], .emsq select, .emsq input[type=number], .emsq input[type=date] { min-height: 36px; padding: 4px 8px; border: 1px solid var(--ems-line); border-radius: 7px; background: var(--ems-panel); color: var(--ems-ink); max-width: 100%; }
.emsq-ex { margin: 6px 0; }
.emsq-prevbox { background: var(--ems-ground); border-radius: 8px; padding: 8px 10px; margin: 10px 0; }
.emsq-prev { margin: 2px 0 0; font-weight: 600; }
label.chk.emsq-sw { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0; white-space: normal; }
.emsq-setrow td { background: var(--ems-ground); }
.emsq-table td.emsq-rule { padding-left: 22px; }
.emsq-inboxcard { display: block; text-decoration: none; color: inherit; border-left: 4px solid var(--warn) !important; }
.emsq-tried { margin-top: 10px; }
.emsq-hist summary, .emsq-checks summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 6px; }
.ems a.btn, a.ems-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---- the state report (Build 194): NEMSIS on a chart, in EMS → State report, in Master Admin → EMS → NEMSIS ---- */
.emsn-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.emsn-row { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 0; border-left: 3px solid var(--ems-line); background: none; text-align: left; font: inherit; color: inherit; }
button.emsn-row { cursor: pointer; }
button.emsn-row:hover { background: var(--ems-ground); }
.emsn-row.error { border-left-color: var(--bad); }
.emsn-row.warning { border-left-color: var(--warn); }
.emsn-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.emsn-sum { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.emsn-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.emsn-table th, .emsn-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.emsn-grid { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 14px; margin: 8px 0 12px; }
.emsn-f select[multiple] { min-height: 96px; }
.emsn-need { color: var(--bad); font-weight: 700; }
.emsn-group, .emsn-codes, .emsn-contact { border-top: 1px solid var(--line); padding: 6px 0; }
.emsn-group > summary, .emsn-codes > summary, .emsn-contact > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 6px; }
/* (Build 265) lists of rows in the NEMSIS setup and on a member's "For the state EMS office" card */
.emsn-sub, .emsn-item { border-top: 1px solid var(--line); padding: 4px 0 4px 8px; }
.emsn-sub > summary, .emsn-item > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.emsn-f-rows { grid-column: 1 / -1; }
.emsn-rows { border-left: 3px solid var(--line); padding-left: 8px; }
.emsn-addrow { margin: 6px 0; min-height: 40px; }
.emsn-check { border-left: 4px solid var(--warn); padding: 6px 12px; margin: 10px 0; }
.emsn-check ul { margin: 6px 0 0; padding-left: 20px; }
.emsn-result { margin-top: 12px; }
.pcr-nemchip { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 2px 0; margin-left: 8px; }

/* ---- Build 196: the rest of what a chart can carry (ems-more.js), and the NEMSIS setup done by Fire Hub ---- */
.pcrm-rows { display: flex; flex-direction: column; gap: 4px; }
.pcrm-row { border: 1px solid var(--ems-line); border-radius: 8px; background: var(--ems-ground); }
.pcrm-row > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 4px 10px; cursor: pointer; list-style: none; }
.pcrm-row > summary::-webkit-details-marker { display: none; }
.pcrm-row > summary .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pcrm-row > .pcr-grid { padding: 4px 10px 10px; }
.pcrm-add, .pcrm-new { align-self: flex-start; min-height: 40px; margin-top: 4px; }
.pcrm-list { margin-bottom: 8px; }
.pcrm-statebox:empty { display: none; }
.pcrm-state .pcr-misstab { color: var(--bad); }
.pcr-approxwrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcr-approx { min-height: 36px; }
.emsn-onboard { list-style: none; margin: 6px 0; padding: 0; }
.emsn-onboard li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.emsn-onboard li .grow { flex: 1; min-width: 0; }
.emsn-onboard .emsn-mark { width: 20px; text-align: center; font-weight: 700; }
.emsn-onboard li.done .emsn-mark { color: var(--ok, #1a7f37); }
.emsn-onboard li.todo .emsn-mark { color: var(--warn); }
.emsn-onboard input[type=checkbox] { width: 20px; height: 20px; margin: 2px 0 0; }
.emsn-held { border-left: 4px solid var(--bad); padding: 6px 12px; margin: 10px 0; }
.emsn-held ul { margin: 6px 0 0; padding-left: 20px; }
.emsn-kv { margin: 8px 0; }
.emsn-summary .emsn-send { margin: 10px 0; }
/* Build 200 — the state report, sent by Fire Hub itself */
.emsn-sent { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.emsn-wdem.bad, .emsn-woff { border-left: 4px solid var(--warn); padding: 6px 12px; margin: 10px 0; }
.emsn-wdem.bad ul { margin: 6px 0 0; padding-left: 20px; }
/* (Build 255) the State pack fold: a long web address wraps on a phone; the pack's notes sit close under its line */
.emsn-packurl { word-break: break-all; }
/* (Build 255) on a phone nothing in the NEMSIS setup runs off the screen: a state's long agency names, the monitor's
   "how often" list, and the Codes table (found once a real state's list was loaded and every fold was open) */
.emsn-agency, .ems-monevery { max-width: 100%; }
@media (max-width: 640px) { .emsn-table { table-layout: fixed; } .emsn-table td, .emsn-table th { overflow-wrap: anywhere; } .emsn-table input { width: 100%; min-width: 0; } }
.emsn-packnotes { margin: 4px 0 8px; padding-left: 20px; }
/* (Build 354) what a state's pack says about a chart (the State pack fold), and a question the state asks about one
   part of a chart, drawn in that part as soon as it applies */
.emsn-packchart { margin: 0 0 8px; } .emsn-packchart ul { margin: 2px 0 4px; padding-left: 20px; } .emsn-packchart li { overflow-wrap: anywhere; }
.pcrm-stateq { grid-column: 1 / -1; margin-top: 12px; padding: 10px 12px 12px; border: 1px solid var(--ems-line); border-left: 4px solid var(--ems-accent, #b3261e); border-radius: 10px; background: var(--ems-ground); }
.pcrm-stateqh { font-weight: 600; margin-bottom: 6px; }
.pcrm-stateq .pcr-f + .pcr-f { margin-top: 10px; }
.pcrm-qwhy, .pcrm-qstale { margin-top: 4px; }
.emsn-wok { color: var(--ok, #1a7f37); font-weight: 600; }
.emsn-wcounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; }

/* (Build 198) settings screens: each card a bar with its title; tap to open */
.card.fh-fold > .fh-head { cursor: pointer; display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 0; user-select: none; min-height: 40px; }
.card.fh-fold > .fh-head::after { content: '▾'; margin-left: auto; font-size: 1.1em; opacity: .7; transition: transform .15s; }
.card.fh-fold.fh-shut > .fh-head::after { transform: rotate(-90deg); }
.card.fh-fold.fh-shut > :not(.fh-head) { display: none !important; }
.card.fh-fold.fh-shut { padding-top: 10px; padding-bottom: 10px; }
.card.fh-fold > .fh-head:focus-visible { outline: 2px solid var(--accent, #c00); outline-offset: 2px; }
.fh-foldbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }

/* (Build 199) ☆ = make a full-list entry a quick pick */
.emsn-star { border: 0; background: none; font-size: 1.25em; line-height: 1; padding: 2px 4px; cursor: pointer; color: #b8860b; min-width: 32px; min-height: 32px; }

/* ---------- schedule drag and drop (Build 201) ---------- */
.ln.can-drag { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ln.drag-src { opacity: .35; outline: 2px dashed var(--focus); }
.ln.drop-move { outline: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.ln.drop-swap { outline: 3px solid var(--focus); background: color-mix(in srgb, var(--focus) 18%, transparent); }
body.dragging-shift, body.dragging-shift * { cursor: grabbing !important; }
body.dragging-shift { -webkit-user-select: none; user-select: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--panel); color: var(--ink);
  box-shadow: 0 6px 22px rgba(0,0,0,.28); border: 2px solid var(--focus); font-size: 15px; max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-ghost .drag-what { margin-top: 2px; }
.drag-hint { color: var(--muted); }
.move-card { padding: 10px 12px; margin: 8px 0; }
.move-card .small { margin-top: 2px; }
.move-warn { margin: 6px 0 0; padding-left: 4px; list-style: none; color: var(--warn); font-size: 14px; }
.move-warn li { margin: 2px 0; }

/* ---------- property inspection fees (Build 201) ---------- */
.fee-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.fee-sum .card { margin: 0; padding: 10px 14px; }
.fee-sum b { font-size: 22px; display: block; margin: 2px 0; }
.fee-list { display: grid; gap: 8px; }
.fee-row { margin: 0; padding: 10px 12px; }
.fee-row.old { border-left: 4px solid var(--bad); }
.fee-row .fee-main { display: block; color: inherit; text-decoration: none; }
.fee-row .fee-top { display: flex; gap: 8px; align-items: baseline; font-size: 16px; }
.fee-row .fee-acts { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.fee-row .fee-acts .btn:not(.sm) { min-height: 44px; min-width: 96px; }
pre.fee-mail { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 6px 0 0; color: var(--muted); }
.fee-row .fee-top .grow { flex: 1; min-width: 0; }

/* Drug log (Build 204): the "restock probably wasn't logged" clue, the last entries on a discrepancy, the two warnings on a sheet */
.cs-clue { display: block; margin: 6px 0; padding: 6px 8px; border-left: 4px solid var(--warn, #c98a00); background: var(--chip-warn, rgba(201, 138, 0, .12)); border-radius: 4px; font-weight: 500; }
span.cs-clue { display: inline; padding: 0 4px; border-left: 0; background: none; }
.cs-recent { margin: 6px 0; }
.cs-recent .cs-tbl td { padding: 3px 8px 3px 0; }
.cs-flag { border: 2px solid var(--warn, #c98a00); background: var(--chip-warn, rgba(201, 138, 0, .12)); }
.cs-flag .btn { min-height: 44px; }
.cs-howto { margin: 2px 0 8px; }
.cs-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 0 0 12px; }   /* Build 227: say what you did, then pick the box */
.cs-task { min-height: 56px; font-size: 17px; font-weight: 600; }
.cs-pickbox { display: grid; gap: 8px; margin: 10px 0; }
.cs-pick { min-height: 56px; font-size: 17px; justify-content: space-between; display: flex; align-items: center; text-align: left; }
.cs-pick.narc { border: 2px solid var(--head); }
.cs-picktruck { flex-wrap: wrap; margin: 6px 0; }
.cs-picktruck button { min-height: 44px; font-size: 16px; }
.cs-discline summary { cursor: pointer; padding: 6px 0; }
.cs-discwhat { margin: 4px 0; }
.cs-others > summary { cursor: pointer; padding: 12px 0; font-weight: 600; border-top: 1px solid var(--line); min-height: 44px; }
.cs-onhand td.num { width: 3em; font-size: 18px; vertical-align: top; }
.cs-prefill { margin: 4px 0 6px; padding: 6px 8px; border-radius: 8px; background: rgba(26, 127, 55, .08); }
@media (max-width: 700px) {   /* Build 227: the drug log is used on phones — bigger text and buttons */
  .cs-unit .btn { min-height: 44px; font-size: 16px; padding: 8px 14px; }
  .cs-unit > .bar > b { font-size: 18px; }
  .cs-tbl td { font-size: 16px; padding: 8px 4px; }
  .cs-tasks { grid-template-columns: 1fr 1fr; }
  .cs-tasks .cs-task[data-task="check"] { grid-column: 1 / -1; min-height: 48px; }
}
.cs-howto a { display: inline-block; padding: 6px 2px; }

/* Map layers (Build 204): the 🗺 button on a map and its list; the setup screens */
.gisl { display: flex; flex-direction: column; align-items: flex-end; }
.gisl-btn { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel, #fff); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }
.gisl-box { margin-top: 6px; width: min(280px, 78vw); max-height: 60vh; overflow: auto; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel, #fff); color: var(--ink, #111); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.gisl-h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 2px; color: var(--muted, #666); }
.gisl-row { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.gisl-row input { width: 22px; height: 22px; }
.gisl-sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; flex: none; text-align: center; font-style: normal; line-height: 16px; }
.gisl-find { width: 100%; min-height: 40px; }
.gisl-hit { display: block; width: 100%; text-align: left; min-height: 40px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font-size: 14px; cursor: pointer; }
.gisl-pop table { border-collapse: collapse; } .gisl-pop td { padding: 1px 8px 1px 0; font-size: 13px; vertical-align: top; }
.gis-map { height: 300px; border-radius: 12px; border: 1px solid var(--line); margin: 8px 0; }
/* Build 353: ① a layer from a file */
.gis-or { text-align: center; margin: 10px 0; }
.gis-upload { min-height: 48px; }
.gis-src { display: block; text-decoration: none; color: inherit; }
.gis-src .chip { margin-left: 6px; }
.gis-pick { display: block; width: 100%; text-align: left; min-height: 48px; padding: 8px 10px; margin: 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); color: inherit; font-size: 15px; cursor: pointer; }
.gis-pick small { display: block; color: var(--muted, #666); }
.gis-frow { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.2fr); gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gis-frow select { width: 100%; min-height: 44px; }
.gis-frow .gis-eg { grid-column: 1 / -1; }
.gis-guess { color: var(--warn); font-weight: 600; }
@media (max-width: 560px) { .gis-frow { grid-template-columns: 1fr; } }
.gis-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.gis-steps span { padding: 4px 10px; border-radius: 999px; background: var(--chip-open); font-size: 13px; }
.gis-steps span.on { background: var(--mine); color: #fff; }
.gis-steps span.done { background: var(--chip-ok); }
.gis-prev td, .gis-prev th { white-space: nowrap; }
/* Build 205: our area, only some of it, parcels and properties */
.gis-vals, .gis-groups { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; margin: 6px 0; }
.gis-groups { display: flex; flex-wrap: wrap; gap: 0 16px; max-height: 180px; }
.gis-val, .gis-dname, .gis-group { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.gis-val input, .gis-dname input, .gis-group input, .gis-mrow input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.gis-valfind { width: 100%; min-height: 40px; margin-top: 6px; }
.gis-picksay { margin: 4px 0 8px; font-weight: 600; }
.gis-mrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.gis-mrow input[type=checkbox] { margin-top: 4px; }
.gis-additem { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.gis-areacard .chip, .gis-parcelcard .chip { margin-left: 6px; }
.gis-ourrow { font-weight: 600; }

.md-video { margin: 12px 0; }
.md-video video { display: block; width: 100%; max-width: 420px; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.md-video .md-video-play { width: 100%; max-width: 420px; min-height: 56px; justify-content: flex-start; text-align: left; }   /* (287) a video loads only when tapped */
.md-video .md-video-play + figcaption { display: none; }   /* the button already says what it shows */
.md-video figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Build 208: Station log (sl-) */
.sl-pick { gap: 6px; flex-wrap: nowrap; }
.sl-pick .sl-station { flex: 1; min-width: 0; }
.sl-pick .sl-day { max-width: 11rem; }
.sl-pull summary { cursor: pointer; padding: 2px 0; }
.sl-rows, .sl-entries, .sl-late { display: flex; flex-direction: column; gap: 2px; }
.sl-row, .sl-entry { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sl-row:last-child, .sl-entry:last-child { border-bottom: 0; }
.sl-row.off { opacity: .6; }
.sl-t { min-width: 3.2rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.sl-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-entry.late { background: var(--chip-warn); border-radius: 6px; padding: 6px; }
.sl-entry .sl-edit { min-width: 44px; min-height: 40px; }
.sl-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sl-kinds .sl-kind { min-height: 40px; }
.sl-signed { border-left: 4px solid #2e9e44; }
.sl-dayrow { display: flex; gap: 8px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.sl-add, .sl-sign { min-height: 44px; }

/* Build 209: CAD feed */
.cad-sec > summary { cursor: pointer; padding: 4px 0; font-size: 1.05em; }
.cad-sec[open] > summary { margin-bottom: 8px; }
.cad-state { white-space: nowrap; }
.cad-unknownchip { color: var(--warn); font-weight: 600; }
.cad-health > div { margin: 4px 0; }
.cad-lasterr { color: var(--warn); }
.cad-relayaddr code { overflow-wrap: anywhere; word-break: break-all; }   /* (Build 270) the relay's address wraps on a phone */
.cad-relay { margin: 10px 0; } .cad-relay > summary { cursor: pointer; padding: 10px 0; }   /* a big enough tap target */
.cad-filelist { max-height: 260px; overflow: auto; }
.cad-file { padding: 3px 0; border-bottom: 1px solid var(--line); }
.cad-r-error b { color: var(--warn); }
.cad-labels { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cad-label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.cad-label.unmapped { border-color: var(--warn); background: var(--chip-warn); }
.cad-label select, .cad-addrow select { min-height: 44px; max-width: 52%; }
.cad-guess { color: var(--ink); font-style: italic; }
.cad-addrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cad-addrow input { flex: 1 1 12em; min-height: 44px; }
.cad-checkrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.cad-checkrow input[type=file] { flex: 1 1 14em; min-height: 44px; }
.cad-verdict { font-weight: 700; padding: 8px 10px; border-radius: 8px; margin: 8px 0; }
.cad-verdict.yes { background: #e5f4e4; color: #1d5a1a; }
.cad-verdict.no { background: var(--chip-warn); }
.cad-units { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cad-unit { padding: 8px 10px; margin: 0; }
.cad-times { margin-top: 4px; }
.cad-t { padding: 2px 0; }
.cad-at { font-variant-numeric: tabular-nums; color: var(--muted); }
.cad-not { color: var(--warn); font-weight: 600; }
.cad-aid { color: var(--muted); }
.cad-private { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
.cad-unitnames, .cad-types, .cad-senders { width: 100%; box-sizing: border-box; font-family: inherit; }
.cad-sums { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.pcr-fromcad { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.pcr-fromcad summary { cursor: pointer; }
.pcr-fromcad-note { padding: 4px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
/* Build 210: what dispatch noted for our units, offered beside the fire report's Dispatch disposition box */
.fi-cadoffers-wrap { display: flex; flex-direction: column; gap: 8px; }
.fi-cadoffers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fi-cadoffers-l { font-size: 13px; color: var(--muted); width: 100%; }
/* Build 311: other agencies' units on the call, from CAD (read only) */
.fi-cadtimes { border-left: 4px solid var(--accent, #c0392b); }   /* (Build 351) CAD's newer times */
.fi-ct-l { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.fi-ct-row { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 10px; background: var(--chip, rgba(127,127,127,.08)); cursor: pointer; font-size: 16px; line-height: 1.35; }
.fi-ct-row input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; }
.fi-ct-w { min-width: 0; overflow-wrap: anywhere; }
.fi-ct-t { display: block; font-size: 15px; opacity: .85; }
.fi-ct-b { display: flex; gap: 10px; flex-wrap: wrap; }
.fi-ct-b .btn { min-height: 44px; flex: 1 1 140px; font-size: 16px; }
.fi-aidcad { margin: 4px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--chip, rgba(127,127,127,.08)); }
.fi-aidcad p { margin: 0 0 4px; }
.fi-aidcad-l { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.fi-cadoffer { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.fi-cadoffer small { font-size: 11px; font-weight: 500; color: var(--muted); }
.fi-cadoffer.on { background: var(--chip-ok); border-color: var(--ok); }
.fi-cadoffer.on span::before { content: '✓ '; }
.fi-cadoffer:disabled { cursor: default; opacity: .75; }

/* Build 216: a unit's vehicle swap */
.swap-card { border-left: 4px solid var(--warn); }
.swap-card.back { border-left-color: var(--ok, #2e7d32); }
.swap-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.swap-list .chk { min-height: 40px; align-items: center; }
.swap-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.swap-ul { margin: 4px 0 0; padding-left: 20px; }
.swap-edit { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.swap-erow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swap-erow input { flex: 1 1 160px; min-width: 0; }
.swap-erow select { flex: 1 1 140px; min-width: 0; max-width: 100%; }
/* Build 216: a medication's routes (EMS setup) and the chart's route chips */
.ems-routes .pcr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ems-routechip { display: inline-flex; align-items: center; gap: 4px; }
.ems-byrow { align-items: flex-end; flex-wrap: wrap; }

/* Build 217 (code review 80): a count table keeps the drug's name and its count box on a phone's screen together */
.cs-cnt td.cs-cntbox { width: 110px; text-align: right; }
.cs-cnt td.cs-cntbox input { width: 96px; max-width: 100%; box-sizing: border-box; }
@media (max-width: 520px) { .cs-tbl.cs-cnt { display: table; overflow: visible; } }
/* Build 217 (code review 155): on a phone, a wide table's row buttons (Approve, Accept, Update, Recount …) stay in view:
   the last cell holding a button sticks to the right edge while the rest of the row scrolls under it */
@media (max-width: 600px) {
  .tbl-wrap td:last-child:has(.btn), .rp-table td:last-child:has(.btn), .cs-tbl td:last-child:has(.btn) { position: sticky; right: 0; z-index: 1; background: var(--panel); box-shadow: -6px 0 6px -4px rgba(0,0,0,.25); }
  .tbl-wrap th:last-child, .rp-table th:last-child { position: sticky; right: 0; z-index: 1; background: var(--panel); }
  .btn.sm { min-height: 40px; }
}
/* Build 234: the owner portal's Setup card (one kind per line, a box big enough to tap) and the request sheet's details */
.po-ticks { display: flex; flex-direction: column; gap: 0; margin: 2px 0 10px; }
.po-ticks .po-tick { display: flex; min-height: 40px; align-items: center; gap: 8px; white-space: normal; } .po-ticks .po-tick input[type=checkbox] { width: 24px; height: 24px; flex: none; margin: 0; }
.po-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 6px 0 12px; font-size: 15px; } .po-dl dt { color: var(--muted); } .po-dl dd { margin: 0; overflow-wrap: anywhere; }
/* Build 355: self-inspection by link, the inspectors' side (prop-self.js): one answer a row, a No stands out; the accept sheet's rows; Setup's ticks */
.ps-row { cursor: pointer; } .ps-ans { border-top: 1px solid var(--line); padding: 8px 0; } .ps-ans:first-of-type { border-top: 0; } .ps-ans.is-no { border-left: 4px solid var(--warn); padding-left: 8px; }
.ps-note { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; } .ps-sec-h { margin: 10px 0 2px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.ps-vrow { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; } .ps-mark { margin-left: 0; }
.ps-types { display: flex; flex-direction: column; margin: 2px 0 10px; } .ps-type { padding: 2px 0; } .ps-type .chk { display: flex; min-height: 40px; align-items: center; gap: 8px; white-space: normal; }
.ps-type .chk input[type=checkbox] { width: 24px; height: 24px; flex: none; margin: 0; } .ps-type select { margin: 0 0 6px 32px; max-width: calc(100% - 32px); } .ps-type select[hidden] { display: none; }
.ps-bar .btn { min-height: 44px; }

/* Build 239 (filming the officer videos): on a phone the pickup requests and the Available list (Approvals, Fill open shift,
   the day panel) are cards — who asked, their note, hours and warnings, then the buttons — instead of a table squeezed
   behind its sticky buttons */
@media (max-width: 600px) {
  .pk-cards { overflow: visible; }
  .pk-cards table, .pk-cards tbody, .pk-cards tr, .pk-cards td { display: block; width: auto; }
  .pk-cards thead { display: none; }
  .pk-cards tr { padding: 10px 12px; border-top: 1px solid var(--line); }
  .pk-cards tr:first-child { border-top: 0; }
  .pk-cards td, .pk-cards td:last-child:has(.btn) { border: 0; padding: 2px 0; position: static; box-shadow: none; background: none; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .pk-cards td:empty { display: none; }
  .pk-cards td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); }
  .pk-cards td:last-child > div { flex-wrap: wrap; margin-top: 8px; }
  .pk-cards td:last-child select { max-width: 100%; }
  /* (Nov 16) a small table inside a card (a discrepancy's last entries) stays a table */
  .pk-cards .cs-tbl { display: table; width: 100%; } .pk-cards .cs-tbl tbody { display: table-row-group; }
  .pk-cards .cs-tbl tr { display: table-row; padding: 0; } .pk-cards .cs-tbl td { display: table-cell; padding: 3px 6px 3px 0; border-top: 1px solid var(--line); }
}

/* ---- Build 265: members' details for the state EMS office (Personnel) ---- */
.pm-fold > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.pms-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding: 6px 0; }
.pms-row .f { flex: 1 1 140px; }
.pms-sel[multiple] { min-height: 110px; }

/* (Build 286) Master Admin → Notifications → Email: folded sections, the domain's DNS records (long values wrap; Copy beside) */
.mail-card .mail-now { margin: 4px 0 10px; }
.mail-sec { border-top: 1px solid var(--line, #ddd); padding: 4px 0; }
.mail-sec > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.mail-sec-body { padding: 4px 0 10px; }
.mail-sec select.mail-via { min-height: 44px; width: 100%; max-width: 520px; font-size: 16px; }
.mail-sec input { font-size: 16px; min-height: 44px; }
.mail-recs { display: grid; gap: 10px; margin: 8px 0; }
.mail-rec { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 8px; }
.mail-rec-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; margin-top: 4px; }
.mail-rec-row code { overflow-wrap: anywhere; word-break: break-all; font-size: 13px; }
.mail-rec-row .btn { min-height: 40px; }
/* (Build 306) Master Admin → Notifications → Text messages */
.sms-admin .bar .btn { min-height: 44px; }
.sms-sample { background: var(--soft, #f3f4f6); border-radius: 14px; padding: 10px 12px; max-width: 420px; font-size: 15px; overflow-wrap: anywhere; }
.sms-kind { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.sms-kind input { width: 22px; height: 22px; }
.sms-admin input.sms-cap { max-width: 140px; }
/* Build 345: Run alerts (public/modules/runalerts.js). Phones first: every button a thumb can't miss. */
.ra-switch { width: 100%; min-height: 60px; font-size: 18px; font-weight: 700; border-radius: 12px; }
.ra-switch.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ra-switch.off { background: var(--panel); color: var(--muted); border: 2px dashed var(--line); }
.ra-warn { color: var(--warn); font-weight: 600; }
/* (Build 346) this phone's own choices inside the store app: folded under the member's switch */
.ra-phone { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.ra-phone summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 4px; }
.ra-popup { width: 100%; min-height: 52px; font-size: 16px; font-weight: 700; border-radius: 12px; margin-bottom: 10px; }   /* (Build 352) */
.ra-popup.on { background: var(--ok, #1e7b34); border-color: var(--ok, #1e7b34); color: #fff; }
.ra-popup.off { background: var(--panel); color: var(--muted); border: 2px dashed var(--line); }
.ra-loud { width: 100%; min-height: 52px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.ra-loud.on { background: var(--warn); border-color: var(--warn); color: #fff; }
.ra-loud.off { background: var(--panel); color: var(--muted); border: 2px dashed var(--line); }
.ra-call { display: block; text-decoration: none; color: inherit; border-left: 6px solid var(--open); }
.ra-call.gone { border-left-color: var(--line); opacity: .8; }
.ra-title { font-size: 18px; }
.ra-h { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.ra-clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--open); white-space: nowrap; }
.ra-addr { display: block; font-size: 20px; font-weight: 700; color: inherit; margin: 6px 0 2px; overflow-wrap: anywhere; }
.ra-sub, .ra-detail { color: var(--muted); margin-bottom: 4px; overflow-wrap: anywhere; }
.ra-units { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ra-unit { font-size: 14px; padding: 4px 10px; }
.ra-unit small { font-weight: 500; color: var(--muted); }
.ra-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.ra-btn { min-height: 64px; font-size: 18px; font-weight: 800; border-radius: 12px; border-width: 2px; }
.ra-btn.go { border-color: var(--ok); color: var(--ok); }
.ra-btn.go.picked { background: var(--ok); color: #fff; }
.ra-btn.no { border-color: var(--muted); color: var(--muted); grid-column: 1 / -1; min-height: 52px; font-size: 16px; }
.ra-btn.no.picked { background: var(--muted); color: #fff; }
.ra-answer .ra-btn.go:only-of-type, .ra-answer .ra-btn.go:first-child:nth-last-child(2) { grid-column: 1 / -1; }
.ra-map { height: 240px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; z-index: 0; }
.ra-dir .ra-go { flex: 1; min-height: 52px; font-size: 17px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ra-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ra-chips .chip { font-size: 14px; padding: 4px 10px; }
.ra-chips .chip small { font-weight: 500; }
.ra-chips .chip.me { outline: 2px solid var(--ok); }
.ra-notesbtn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.ra-note { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.ra-prow { padding: 5px 0; border-top: 1px solid var(--line); }
.ra-paged summary, .ra-group summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ra-group { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px 10px; margin: 8px 0; background: var(--bg); }
.ra-ticks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.ra-tick, .ra-radio { min-height: 40px; display: flex; align-items: center; }
.ra-radio { align-items: flex-start; gap: 6px; padding: 6px 0; }
.ra-radio input, .ra-tick input { width: 20px; height: 20px; flex: none; }
.ra-choices { display: block; width: 100%; max-width: 100%; min-height: 44px; margin-top: 4px; }
.ra-group input[type="text"], .ra-group input:not([type]) { min-height: 44px; box-sizing: border-box; }

/* ---- (Build 365, Sam's Nov 29 ESO review) the chart, refined: one part of a tab at a time, an answered question as one
   line, an impression's card one question at a time, a time on the number pad, the lock on the chart's own header ---- */
.pcr-f.pcr-done { margin-bottom: 2px; }
.pcr-ans { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-ground); color: var(--ems-ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pcr-ans:hover { border-color: var(--ems-accent); }
.pcr-ans .pcr-ansl { color: var(--ems-mute); font-size: 14px; font-weight: 600; white-space: nowrap; }
.pcr-ans b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pcr-ans i { flex: 1; color: var(--ems-mute); }
.pcr-ans .pcr-pen { color: var(--ems-accent); font-size: 18px; }
.pcr-skipped .pcr-ans { border-style: dashed; background: none; }
.pcr-donebtn { margin-top: 8px; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--ems-accent); background: none; color: var(--ems-accent); font: inherit; font-weight: 700; cursor: pointer; }
.pcr-canhold { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pcr-limnote { margin-top: 6px; }
.pcr-nvopts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.pcr-nvopt { min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 14px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-panel); color: var(--ems-ink); font: inherit; text-align: left; cursor: pointer; }
.pcr-nvopt:hover { border-color: var(--ems-accent); }
.pcr-stepfoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.pcr-stepfoot .grow { flex: 1; }
.pcr-skip, .pcr-stepall { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--ems-accent); font: inherit; font-weight: 600; cursor: pointer; }
.pcr-skip:hover, .pcr-stepall:hover { background: var(--ems-ground); }
.pcr-secbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.pcr-secbar > span:first-child { color: var(--ems-mute); font-size: 14px; font-weight: 600; }
.pcr-secbar .pcr-secsel { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--ems-line); border-radius: 12px; background: var(--ems-panel); color: var(--ems-ink); font-size: 16px; font-weight: 700; }
.pcr-secof { white-space: nowrap; }
.pcr-nextsec { width: 100%; min-height: 52px; margin: 4px 0 12px; font-size: 16px; font-weight: 700; justify-content: center; }
.pcr-missline { display: flex; align-items: stretch; gap: 6px; }
.pcr-missline .pcr-missrow { flex: 1; min-width: 0; }
.pcr-cantget { flex: none; min-height: 44px; padding: 0 12px; border: 1px solid var(--ems-line); border-radius: 10px; background: none; color: var(--ems-mute); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pcr-cantget:hover { color: var(--ems-ink); border-color: var(--ems-ink); }
.pcr-missrow .pcr-go { color: var(--ems-mute); font-size: 20px; }
.ems.pcr-lockin > .ems-head { display: none; }
.pcr-dt2 { display: block; }
.pcr-dtrow { display: flex; gap: 8px; }
.pcr-dtrow .pcr-time { flex: 1; min-width: 0; min-height: 52px; font-size: 22px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; text-align: center; }
.pcr-nowbig { min-height: 52px; min-width: 76px; padding: 0 16px; font-size: 17px; background: var(--ems-accent); color: #fff; }
@media (prefers-color-scheme: dark) { .pcr-nowbig { color: #0b1220; } }
.pcr-timebad { color: var(--ems-red); margin-top: 4px; }
.pcr-dt2 .pcr-day { margin-top: 6px; width: 100%; }
.pcr-dayline { margin-top: 4px; }
.pcr-daybtn { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--ems-accent); font: inherit; font-weight: 600; cursor: pointer; }
.pcr-evm[hidden] { display: none; }
.pcr-agitfold { margin-top: 10px; }
.pcr-samevit { margin-left: auto; white-space: nowrap; }
.pcr-txnone { text-align: center; padding: 18px 8px 8px; }
.pcr-txnone p { margin: 0 0 12px; font-size: 17px; font-weight: 600; color: var(--ems-mute); }
.pcr-txbig { min-height: 56px; min-width: 220px; font-size: 18px; }
.ems-rowname { font-size: 16px; }
.ems-rowimp { font-size: 14px; font-weight: 600; margin-top: 2px; }
.ems-left { white-space: nowrap; }
/* (item 10) a tab with nothing on it yet reads as a tab, not as switched off */
.pcr-tab.is-idle:not(.on) { color: var(--ems-ink); opacity: 1; }
/* (item 11) the bottom bar steps aside while a list of answers is open or the keyboard is up, and the last field can scroll above it */
.pcr:has(.pcr-results:not([hidden])) > .pcr-foot, .pcr:has(.pcr-morelist:not([hidden])) > .pcr-foot, .pcr:has(> .pcr-top.typing) > .pcr-foot { visibility: hidden; }
.pcr .pcr-main { padding-bottom: 88px; }

/* Build 371: Peer support (public/modules/peer.js). Phones first: one row per member, one big button. */
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.pr-row.done { opacity: .75; }
.pr-who { flex: 1 1 14rem; min-width: 0; color: inherit; text-decoration: none; }
.pr-name { font-size: 17px; }
.pr-n { color: var(--muted); }
.pr-now { color: var(--brand); font-weight: 600; margin-top: 2px; }
.pr-kinds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pr-kinds .chip { white-space: normal; }
.pr-reach { min-height: 48px; min-width: 9.5rem; font-size: 16px; }
.pr-reached { color: var(--muted); }
.pr-big { font-size: 44px; font-weight: 700; line-height: 1.1; }
.pr-fold summary { cursor: pointer; padding: 6px 0; min-height: 32px; }
.pr-kind label { display: block; margin: 8px 0; }
.pr-kind input:not([type]), .pr-kind textarea { width: 100%; box-sizing: border-box; }
.pr-when { gap: 8px; align-items: center; flex-wrap: wrap; }
.pr-undo { min-height: 40px; }
.pr-kind .chk, .pr-fold > .chk { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 2px 0; }
.pr-kind .chk input, .pr-fold > .chk input { width: 22px; height: 22px; flex: none; }
.pr-types { margin: 8px 0; }
.pr-type { border: 0; cursor: pointer; min-height: 32px; }
.pr-type-add { margin-top: 6px; width: 100%; min-height: 44px; }
/* Build 373: a fire report's time on a touch screen is a typed box with seconds (fire.js timeBox) */
.fi-dt .fi-time { width: 7.5em; font-variant-numeric: tabular-nums; }
/* Build 374: a supply room's own alert people (Inventory → Setup → Supply rooms → 🔔) */
.btn.sm.inv-al-btn { white-space: normal; text-align: left; max-width: 100%; min-height: 40px; height: auto; }
.inv-al-roles { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; }
.inv-al-roles .chk { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.inv-al-chips { flex-wrap: wrap; margin: 4px 0; }
.inv-al-chips .chip { border: 0; cursor: pointer; min-height: 32px; }
.inv-al-add { width: 100%; min-height: 44px; }
.inv-room { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
/* (Build 381, the demo walk's #10) a long name list's find box sits right above it */
.sel-findwrap { display: flex; flex-direction: column; gap: 6px; } .sel-findwrap .sel-find { min-height: 44px; }
/* (Build 381, the demo walk's #14) a check item Save says is still missing */
.ck-missing { outline: 3px solid var(--bad, #c0392b); outline-offset: 2px; border-radius: 8px; }
/* (Build 381, the demo walk's #28) today's own shift is a tap, like the days after it */
.my-shift-open { background: none; border: 0; padding: 6px 0; min-height: 44px; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
/* (Build 383, the demo walk's #12) the fire report's address: one line, then City · State · ZIP on one row */
.fi-addr-line { width: 100%; font-size: 17px; }
.fi-addr-read { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.fi-addr-csz { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; grid-column: 1 / -1; }
@media (max-width: 520px) { .fi-addr-csz { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .fi-addr-csz > .fi-f:first-child { grid-column: 1 / -1; } }
/* (Build 383, the iPad and phone walk) a narrow phone with every top-bar button (an admin's 🎭 and 🔑) went 2 px past the
   screen on every page: tighter gaps there, nothing hidden */
@media (max-width: 420px) {
  .topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .who { gap: 4px; }
}
