/* The field app: one column, big targets, sheets that cover the screen for one decision at a time. */
html, body { height: 100%; overscroll-behavior: none; }
body { background: var(--bg-2); }
.join { min-height: 100%; padding: 20px 16px 32px; }
.join-wrap { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.join-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.join-head h1 { margin: 0; font-size: 24px; flex: 1; }
.card { background: var(--control-bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.card h2 { margin: 0; font-size: 15px; }
.pick-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); min-height: 52px; }
.pick-row .name { font-weight: 600; }
.pick-row .sub { font-size: 12.5px; color: var(--muted); }

.app { height: 100%; display: flex; flex-direction: column; position: relative; max-width: 560px; margin: 0 auto; background: var(--bg-2); }
.p-head { padding: calc(14px + env(safe-area-inset-top)) 16px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: none; }
.p-head-main { flex: 1; min-width: 0; }
.p-head h1 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-head .crew { flex-basis: 100%; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cleared); font-weight: 500; background: var(--tint-green); border-radius: 999px; padding: 4px 10px; flex: none; }
.live .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--cleared-fill); animation: blinkdot 1.4s infinite; }
.live.off { color: var(--muted); background: var(--soft); } .live.off .dot { background: var(--dot-off); animation: none; }
.live.bad { color: var(--danger); background: var(--tint-red); } .live.bad .dot { background: var(--danger); }
.inbox-btn { position: relative; }
.nbadge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }   /* wraps rather than pushing the page sideways at 375 px */
.inbox-acts .btn { min-height: 48px; white-space: normal; line-height: 1.15; padding: 4px 10px; }
.mrow { border-left: 3px solid var(--line); padding: 8px 10px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; background: var(--control-bg); border-radius: 0 10px 10px 0; }
.mrow.safety { border-left-color: var(--hazard); background: var(--tint-orange); }
.mrow.par { border-left-color: #6B5DBF; }
.mrow.mine { border-left-color: var(--accent); }
.mrow-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.mrow-top .who { font-weight: 600; }
.mrow-top .t { color: var(--muted); }
.mrow-text { font-size: 15px; }
.mrow-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.mrow-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mrow-btns .btn { min-height: 44px; flex: 1; }
.inbox-card { background: var(--control-bg); border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.inbox-card .k { color: var(--accent-text); }
.sheet.safety-sheet { background: var(--safety); color: #1B1B18; }
.safety-sheet h2 { color: #1B1B18; }
.safety-sheet .mrow { background: #fff; border-left-color: var(--danger); }
.safety-sheet .mrow-text { font-size: 20px; font-weight: 600; }
.safety-sheet .mrow-btns .btn { background: var(--danger); color: #fff; border-color: var(--danger); min-height: 56px; font-size: 17px; }
.safety-sheet .mrow.par .mrow-btns .btn.green { background: var(--cleared-fill); border-color: var(--cleared-fill); }
.par-count { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; }
.par-count .btn { width: 48px; min-height: 44px; font-size: 20px; padding: 0; }
.par-count .num { font-size: 20px; font-weight: 600; width: 28px; text-align: center; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-row .btn { min-height: 44px; }
.badge.st-assigned { background: var(--tint-blue); color: var(--active); }
.badge.st-available { background: var(--tint-green); color: var(--cleared); }
.badge.st-out_of_service { background: var(--tint-orange); color: var(--hazard-ink); }
.badge.st-checked_out { background: var(--soft); color: var(--muted); }
.badge.primary { background: var(--tint-green2); color: var(--cleared); }
.chip.dim { opacity: .5; }
.fmark { position: absolute; left: -12px; top: -12px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px; background: #3E3C36; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); white-space: nowrap; }
.fmark.inline { position: static; height: 24px; flex: none; }
.fmark-icp { background: #1F4E79; } .fmark-staging { background: #6B5DBF; } .fmark-base { background: #3E3C36; } .fmark-shelter { background: #2F7A52; }
.fmark-pod { background: #B86E00; } .fmark-hospital { background: #B3261E; } .fmark-helispot { background: #1B6F8A; } .fmark-other { background: #6B6860; }
.fmark-camp { background: #5A6E2A; } .fmark-helibase { background: #0F556B; } .fmark-ramp { background: #2A6F97; }
.near { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.near:last-child { border-bottom: 0; }
.near-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.near-name { font-weight: 600; }
.near .btn { text-decoration: none; }
.p-body { flex: 1; min-height: 0; overflow: auto; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.card .zone-name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.compose-map { height: 180px; margin-top: -4px; }
.req-row { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.req-row:last-child { border-bottom: 0; }
.req-dot { width: 10px; height: 10px; border-radius: 5px; flex: none; background: var(--dot-off); }
.req-dot.asked { background: var(--hazard); } .req-dot.approved, .req-dot.ordered { background: var(--active-fill); } .req-dot.filled { background: var(--cleared-fill); } .req-dot.declined { background: var(--danger); }
.co-item { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.co-item:last-child { border-bottom: 0; }
.co-item input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.co-item .sub { font-size: 12px; color: var(--muted); }
.sheet.sheet-fixed { position: fixed; z-index: 1600; }   /* over the app's own sheets, which sit at 1500 */
.you-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; background: var(--tint-blue); color: var(--active); border-radius: 10px; padding: 8px 12px; }
.you-line.missing { background: var(--tint-orange); color: var(--hazard-ink); }
.you-line.noid { background: var(--tint-yellow); color: var(--ink); }
.you-line .btn { min-height: 32px; }
.id-photo img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
#id-read { font-size: 14px; }
#id-read .k { margin-bottom: 2px; }
#id-read .warn { color: var(--danger); font-weight: 600; }
#scan-video { width: 100%; max-height: 60vh; border-radius: 14px; background: #000; object-fit: cover; }
.showcode-qr { display: flex; justify-content: center; }
.showcode-qr svg { width: 100%; max-width: 300px; height: auto; background: #fff; padding: 12px; border-radius: 14px; box-sizing: content-box; }
.showcode-code { font-size: 40px; letter-spacing: .14em; font-weight: 600; text-align: center; }
.small { font-size: 12.5px; }
.mini { height: 200px; background: var(--panel-2); border-radius: 10px; border: 1px solid var(--line); flex: none; overflow: hidden; position: relative; z-index: 0; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 84px; padding: 12px; border-radius: 14px; background: var(--control-bg); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.act:active { transform: scale(.98); }
.act svg { width: 26px; height: 26px; }
.act.photo { background: var(--accent); color: #fff; border-color: var(--accent); }
.act.clear { background: var(--cleared-fill); color: #fff; border-color: var(--cleared-fill); }
.help { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 14px; background: var(--danger); color: #fff; font-weight: 700; font-size: 16px; flex: none; }
.help svg { width: 22px; height: 22px; }
.p-foot { padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex: none; }
.banner { background: var(--accent); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.banner .k { color: #CFE0F2; }
.banner .btn { align-self: flex-start; background: #fff; color: var(--accent); border-color: #fff; }
.done-card { border-color: var(--cleared-fill); }
.done-card .big { font-size: 20px; font-weight: 600; color: var(--cleared); }

.sheet { position: absolute; inset: 0; background: var(--bg-2); z-index: 1500; display: flex; flex-direction: column; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 16px 0; overflow: auto; }
.sheet > :last-child:not(.sheet-btns) { margin-bottom: calc(16px + env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 600; }
.sheet p { margin: 0; }
.sheet .input { border: 1px solid var(--control-border); border-radius: 10px; padding: 10px 12px; font-size: 16px; min-height: 48px; background: var(--control-bg); }
.sheet-btns { margin-top: auto; display: flex; gap: 10px; flex: none; padding: 8px 0 calc(16px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: var(--bg-2); z-index: 1; }   /* on screen however long the sheet is (v42) */
.sheet-btns .btn { flex: 1; min-height: 54px; font-size: 16px; border-radius: 14px; }
.viewfinder { position: relative; border-radius: 14px; overflow: hidden; background: var(--photo-bg); flex: none; max-height: 42vh; }
.viewfinder img { display: block; width: 100%; height: 100%; max-height: 42vh; object-fit: cover; }
.facing { position: absolute; left: 8px; bottom: 8px; background: rgba(27,27,24,.82); color: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.compass { display: flex; align-items: center; justify-content: space-between; background: var(--control-bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; gap: 10px; }
.compass .big { font-size: 24px; font-weight: 600; font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.compass .small { font-size: 12px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .btn { width: 56px; min-height: 48px; font-size: 22px; padding: 0; }
.stepper .num { font-size: 24px; font-weight: 600; width: 36px; text-align: center; }
.xcode { display: flex; gap: 14px; align-items: center; background: var(--control-bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.xcode .xt { font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.xbox { position: relative; width: 92px; height: 92px; flex: none; }
.xbox svg { position: absolute; left: 0; top: 0; width: 92px; height: 92px; }
.xv { position: absolute; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; font-weight: 500; color: var(--ink); line-height: 1; }
.xv.top { top: 6px; left: 0; right: 0; text-align: center; }
.xv.bottom { bottom: 6px; left: 0; right: 0; text-align: center; }
.xv.left { left: 5px; top: 50%; transform: translateY(-50%); }
.xv.right { right: 5px; top: 50%; transform: translateY(-50%); }

/* mini map markers */
.leaflet-div-icon { background: none; border: 0; }
.umark { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.umark .upulse { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 8px; background: var(--accent); transform: translate(-50%, -50%); animation: pulse 2.2s ease-out infinite; }
.umark .udot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 7px; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.umark .uhead { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; transition: transform .4s; }
.umark .uhead::before { content: ''; position: absolute; left: -5px; top: -17px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--accent); }
.ppin { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ppin .wedge { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; }
.ppin .wedge path { fill: rgba(31,78,121,.28); stroke: var(--accent); stroke-width: 1; }
.ppin .pdot { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 6px; background: var(--accent); border: 2px solid #fff; }
.hmark { position: absolute; left: -10px; top: -10px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 18px solid var(--safety); filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.leaflet-control-attribution { font-size: 9px; background: color-mix(in srgb, var(--panel) 85%, transparent) !important; color: var(--muted) !important; }


/* people on the unit: the rows at check-in and in the menu, the chips for what each is qualified for */
.chip.sm { min-height: 34px; padding: 5px 11px; font-size: 13px; }
.pp-list { display: flex; flex-direction: column; gap: 10px; }
.pp-edit { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.pp-edit .input { min-height: 44px; }
.pp-edit-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.pp-x { width: 44px; min-height: 44px; padding: 0; font-size: 20px; color: var(--muted); }
.pp-edit .chips { gap: 6px; }
.pp-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.pp-row:last-child { border-bottom: 0; }
.pp-row.out { color: var(--muted); }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-name { font-weight: 600; font-size: 15px; }
.pp-name .role { font-weight: 400; color: var(--muted); }
.pp-sub { font-size: 12.5px; color: var(--muted); }
.pp-row .btn { min-height: 44px; }
.pp-add { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px dashed var(--control-border); border-radius: 12px; }
.pp-add .chips { gap: 6px; }

/* your briefing and the hurt card (ICS-100, v24) */
.brief { background: var(--control-bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; display: flex; flex-direction: column; }
.brief-sec { padding: 10px 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.brief-sec:last-child { border-bottom: 0; }
.brief-sec .k { margin: 0; }
.brief-sec.warn .k { color: var(--hazard-ink); }
.brief-text { font-size: 13.5px; }
.brief-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brief-row .btn { min-height: 32px; flex: none; text-decoration: none; }
.hurt-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.hurt-row:last-child { border-bottom: 0; }
.hurt-n { width: 28px; height: 28px; border-radius: 14px; background: var(--ink); color: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.hurt-row.warn .hurt-n { background: var(--hazard); color: #1B1B18; }
.hurt-row.warn .hurt-text { color: var(--hazard-ink); }
.hurt-text { font-size: 13.5px; flex: 1; min-width: 0; }
.hurt-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.hurt-btns .btn { min-height: 34px; text-decoration: none; }
.near.hurt-near { cursor: pointer; }
.near.hurt-near .fmark { background: var(--danger); }
.kind-chips { gap: 6px; }

/* People here: a shelter desk's home (v26), the sheet that signs a person in, the crew's rows on the house record */
.desk { display: flex; flex-direction: column; gap: 10px; flex: none; }
.desk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.desk-top h2 { margin: 0; font-size: 22px; font-weight: 600; }
.desk-count { font-size: 13px; color: var(--muted); }
.desk-count strong { color: var(--ink); font-size: 15px; }
.desk-find { display: flex; flex-direction: column; gap: 4px; }
.desk .input, .st-row .input, .person-who .input { border: 1px solid var(--control-border); border-radius: 10px; padding: 10px 12px; font-size: 16px; min-height: 48px; background: var(--control-bg); color: var(--ink); width: 100%; min-width: 0; }
.find-card { font-size: 13.5px; }
.find-row { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.find-ask { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; padding-top: 4px; }
.find-ask .btn { min-height: 36px; }
.desk-arr-k { color: var(--hazard-ink); }
.arrive { border: 2px solid var(--hazard); background: var(--tint-orange); border-radius: 12px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.arrive-main { flex: 1; min-width: 0; }
.arrive-btn { background: var(--ink); color: var(--bg-2); border-color: var(--ink); min-height: 44px; font-weight: 600; flex: none; }
.desk-signin { min-height: 54px; font-size: 16px; border-radius: 14px; }
.ev-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); min-height: 52px; }
.ev-row.away { color: var(--muted); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-who { font-weight: 600; font-size: 15px; }
.ev-sub { font-size: 12.5px; color: var(--muted); }
.ev-when { font-size: 12.5px; color: var(--muted); text-align: right; flex: none; max-width: 45%; }
.person-who { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.sheet label.k { display: flex; flex-direction: column; gap: 4px; }
.sheet label.k .input { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); }
.st-people { display: flex; flex-direction: column; gap: 8px; }
.st-people:empty { display: none; }
.st-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "who x" "cond cond"; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.st-row > [data-stp="who"] { grid-area: who; } .st-row > [data-stp="cond"] { grid-area: cond; } .st-row > .pp-x { grid-area: x; }
.st-row > .st-k, .st-row > .chips { grid-column: 1 / -1; }   /* Went to and On which run as chip rows under who and condition (v66) */
.st-row > .st-k { margin-top: 4px; }
.st-on { font-size: 13px; padding: 6px 10px; border-left: 3px solid var(--cleared-fill); background: var(--control-bg); border-radius: 0 10px 10px 0; }

/* time in the water (v28): one row at the top of the home screen, a slim banner past the rotation, never a takeover */
.water-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13.5px; margin-bottom: 8px; }
.water-row > span { flex: 1; min-width: 0; }
.water-row.over { background: var(--safety); color: #1B1B18; }
.water-row.over .btn { color: #1B1B18; border-color: #1B1B18; }
.water-row.over .btn.pri { background: #1B1B18; color: #fff; }

/* the sign-in screen with a join code waiting (v39) */
.code-ready { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--tint-green, #e8f3e8); color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.code-ready .mono { letter-spacing: .1em; }
.auth-again { justify-content: stretch; }   /* the code step's Resend and Use another address, two thumbs wide (v73) */
.auth-again .btn { flex: 1; min-height: 44px; }

/* ---- the transport board (v54): the desk's Arriving by run, the driver's run card, the house record's On select */
.arrive-run { border: 2px solid var(--active); background: var(--tint-blue); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.arrive-run.late { border-color: var(--hazard); background: var(--tint-orange); }
.arrive-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.arrive-list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.arrive-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.arrive-row > span { flex: 1; min-width: 0; }
.arrive-run .arrive-btn { min-height: 50px; width: 100%; }
.badge.tr-planned { background: var(--soft); color: var(--ink-2); }
.badge.tr-loading { background: var(--tint-orange); color: var(--hazard-ink); }
.badge.tr-en_route { background: var(--tint-blue); color: var(--active); }
.badge.tr-arrived { background: var(--tint-green); color: var(--cleared); }
.badge.tr-done { background: var(--soft); color: var(--muted); }
.run-card { background: var(--accent); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.run-card .k { color: #CFE0F2; }
.run-card .big { font-size: 17px; font-weight: 700; line-height: 1.25; }
.run-card .sub { font-size: 13px; opacity: .92; }
.run-card .btn { background: #fff; color: var(--accent); border-color: #fff; min-height: 54px; font-size: 17px; font-weight: 600; border-radius: 12px; }
.run-card.late { background: var(--hazard); color: #1B1B18; }
.run-card.late .k { color: #1B1B18; }
.run-card.late .btn { color: #1B1B18; }
.run-next { font-size: 13px; }

/* ---- people and tags (v55): the typed box under the camera, the band sheet, the band at check-in and on the desk's sheet */
.scan-typed { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.scan-typed-row { display: flex; gap: 8px; }
.scan-typed-row .input { flex: 1; min-width: 0; border: 1px solid var(--control-border); border-radius: 10px; padding: 10px 12px; font-size: 18px; min-height: 48px; background: var(--control-bg); color: var(--ink); }
.band-head { font-size: 17px; font-weight: 700; }
#band-who .chips, #band-what .chips { margin-top: 6px; }
.band-seen { font-size: 13.5px; }
.pp-edit-top .input[data-jp="band"] { flex: 0 0 86px; }
.ev-band { display: flex; gap: 10px; align-items: center; }
.ev-band .btn { min-height: 48px; flex: none; }

/* ---- invitations by email (v56): the card from the link, on the sign-in screen and the check-in screen */
.invite-card { border: 2px solid var(--accent); background: var(--tint-blue); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; margin-bottom: 10px; }
.invite-card .big { font-size: 18px; font-weight: 700; line-height: 1.2; }
.invite-card .k { color: var(--accent-text); }
.invite-card form { display: flex; flex-direction: column; gap: 6px; }
.invite-card .input { border: 1px solid var(--control-border); border-radius: 10px; padding: 10px 12px; font-size: 16px; min-height: 48px; background: var(--control-bg); color: var(--ink); width: 100%; }
.invite-card .btn.big { min-height: 54px; font-size: 16px; border-radius: 12px; }
.invite-bad { color: var(--hazard-ink); font-weight: 600; }

/* v62: the band door on the sign-in screen, and the app's own question in place of the browser's confirm() */
.code-ready .band-note { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
dialog.confirm { border: 0; border-radius: 14px; padding: 16px 18px; background: var(--panel); color: var(--ink); max-width: min(360px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
dialog.confirm::backdrop { background: rgba(0,0,0,.45); }
dialog.confirm h3 { margin: 0 0 6px; font-size: 16px; }
dialog.confirm .confirm-text { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
dialog.confirm .row-btns { margin-top: 14px; }

/* What's wrong, what you need (v68): the two rows of chips on Need help now and Alert sent, two to a row, glove-sized */
.alert-ask { display: flex; flex-direction: column; gap: 8px; }
.alert-ask .chips { gap: 8px; }
.alert-ask .chip { flex: 1 1 calc(50% - 4px); min-height: 52px; justify-content: center; font-size: 16px; font-weight: 600; border-radius: 12px; padding: 8px 10px; }
.alert-ask .small { color: var(--muted); }

/* ---- claim a band, add your licences (v69): the claim sheet's unit list, the licences sheet, the state chips, the You card */
.ask { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.ulist { display: flex; flex-direction: column; gap: 6px; }
.ulist button { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--control-border); background: var(--control-bg); color: var(--ink); font: inherit; min-height: 48px; }
.ulist button .r { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--control-border); grid-row: 1 / 3; }
.ulist button.on { border-color: var(--accent); background: var(--sel-bg); }
.ulist button.on .r { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
.ulist button b { font-size: 15px; } .ulist button .s { font-size: 12.5px; color: var(--muted); }
.btn.link { background: none; border-color: transparent; color: var(--accent-text); text-decoration: underline; }
.cred-list { display: flex; flex-direction: column; }
.cred-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line-soft); }
.cred-row:first-child { border-top: 0; }
.cred-row .nm { font-size: 15px; font-weight: 600; } .cred-row .nm small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.cred-row .acts { display: flex; gap: 6px; }
.cred-row .acts .btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.cred-row .acts .btn svg { width: 16px; height: 16px; }
.cred-row .typing { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 0 2px; }
.cred-row .typing .input { min-height: 40px; font-size: 14px; padding: 7px 10px; }
.cred-row .typing .full { grid-column: 1 / -1; }
.cred-row .typing .row-btns { grid-column: 1 / -1; }
.cred-row .typing .row-btns .btn { min-height: 40px; }
.st { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.st.pending { background: var(--tint-orange); color: var(--hazard-ink); }
.st.given { background: var(--tint-blue); color: var(--active); }
.st.confirmed, .st.checked { background: var(--tint-green); color: var(--cleared); }
.st.rejected { background: var(--tint-red); color: var(--danger); }
.you .line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.you .line:first-of-type { border-top: 0; }
.you .line .w { color: var(--muted); font-size: 12.5px; grid-column: 1 / -1; margin-top: -4px; }
.you .line .st { justify-self: end; }
.you .btn { width: 100%; margin-top: 4px; }

/* ---- Tell the base (v74): what Message Operations and Ask for something share: the title's icon, the quick starts
   under the box, the scale (three steps on one bar, hot to cool), the stuck flag under it, the Where switch, the red
   link at the foot. The chosen step fills with its colour; the flag on is an outline and a tint, a different shape. */
.sheet-title { display: flex; align-items: center; gap: 10px; }
.sheet-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sheet-ic.ask { background: var(--ask); }
.sheet-ic svg { width: 18px; height: 18px; }
.sheet label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.quick { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: -4px; }
.quick button { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; font-style: italic; color: var(--accent-text); padding: 0 2px; text-decoration: underline dotted; text-underline-offset: 4px; text-decoration-color: var(--grey); }
.quick button::before { content: '\201C'; opacity: .55; } .quick button::after { content: '\201D'; opacity: .55; }
.scale { display: flex; border: 1px solid var(--control-border); border-radius: 12px; overflow: hidden; background: var(--control-bg); }
.scale .step { flex: 1 1 0; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 16px; font-weight: 600; color: var(--ink); border-right: 1px solid var(--control-border); border-bottom: 4px solid var(--dot-off); padding: 0 4px; white-space: nowrap; }
.scale .step:last-child { border-right: 0; }
.scale .step.s-now { border-bottom-color: var(--danger); } .scale .step.s-nightfall { border-bottom-color: var(--hazard); } .scale .step.s-tomorrow { border-bottom-color: var(--active-fill); }
.scale .step.on.s-now { background: var(--danger); color: #fff; } .scale .step.on.s-nightfall { background: var(--hazard); color: #1B1B18; } .scale .step.on.s-tomorrow { background: var(--active-fill); color: #fff; }
.scale .step.on { border-right-color: transparent; }
.scale .tick { font-size: 14px; }
.flag { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 1px solid var(--control-border); border-radius: 12px; background: var(--control-bg); padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink); text-align: left; margin-top: -4px; }
.flag .fic { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--grey); flex: none; position: relative; }
.flag .fic::after { content: ''; position: absolute; left: 3px; right: 3px; top: 7px; height: 4px; background: var(--grey); border-radius: 2px; }
.flag.on { border: 2px solid var(--danger); background: var(--tint-red); color: var(--danger); font-weight: 700; padding: 0 11px; }
.flag.on .fic { border-color: var(--danger); background: var(--danger); } .flag.on .fic::after { background: #fff; }
.flag .tick { margin-left: auto; }
.where { display: flex; align-items: center; gap: 12px; min-height: 48px; border: 1px solid var(--control-border); border-radius: 12px; background: var(--control-bg); padding: 6px 12px; color: var(--ink); text-align: left; width: 100%; }
.tog { width: 44px; height: 26px; border-radius: 13px; background: var(--dot-off); position: relative; flex: none; transition: background .15s; }
.tog .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.35); transition: left .15s; }
.where.on .tog { background: var(--accent); } .where.on .tog .knob { left: 21px; }
.where-w { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.where-t { font-size: 15px; font-weight: 600; } .where.on .where-t { color: var(--accent-text); }
.where-s { font-size: 12.5px; color: var(--muted); }
#ask-where.on .tog { background: var(--ask); } #ask-where.on .where-t { color: var(--ask-text); }
.help-link { min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--danger); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; width: 100%; }
.btn.pri.ask { background: var(--ask); border-color: var(--ask); }
