/* Canvass by A.B.M. Forensics — brand direction A "Survey". Layout: split (list + map) or map-first on desktop; map + bottom sheet on phones. */
:root {
  --ink: #13213A;
  --ink-2: #1C2C4A;
  --ink-line: #34456A;
  --blue: #2F64D6;
  --blue-d: #1E4AAE;
  --blue-l: #E4ECFD;
  --blue-on-dark: #8FB3FF;
  --parcel: #D6DDE7;
  --line: #E3E8EF;
  --line-2: #C9D2DE;
  --paper: #F4F6F9;
  --white: #FFFFFF;
  --muted: #4F5E77;
  --muted-on-dark: #A9B8D3;
  --amber: #E08A1E;
  --amber-l: #FCEEDB;
  --amber-d: #5E3405;
  --red: #C2413A;
  --green: #1F9D6B;
  --display: Archivo, Inter, 'Helvetica Neue', Arial, sans-serif;
  --font: Inter, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r: 10px;
  --shadow: 0 6px 24px rgba(19, 33, 58, .18);
  --panel-w: 420px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.gap { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pad { padding: 18px 20px; }
.pad-x { padding-left: 20px; padding-right: 20px; }
.h1 { margin: 0; font: 700 24px/1.15 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.h2 { margin: 0; font: 700 20px/1.2 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.eyebrow { margin: 0; padding: 0; font: 600 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.skeleton { color: var(--muted); padding: 24px 0; }

/* ---------- App frame ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  flex: none; position: relative; z-index: 1200; background: var(--ink); color: var(--white);
  display: flex; align-items: center; gap: 10px 16px; min-height: 56px;
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.brand .mark { width: 26px; height: 26px; }
.brand-name { font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.tb-icon { width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.tb-icon:hover { background: var(--ink-2); }
.tb-spacer { flex: 1; }
.tb-case { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-left: 14px; border-left: 1px solid var(--ink-line); }
.tb-case-top { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.tb-case-top .mono { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tb-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { font-size: 12.5px; color: var(--muted-on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-badge .short { display: none; }
.tb-badge { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--amber-l); color: var(--amber-d); white-space: nowrap; }
.tb-layout { display: inline-flex; background: var(--ink-2); border-radius: 9px; padding: 3px; gap: 2px; }
.tb-layout button { height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-on-dark); display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-weight: 600; font-size: 13px; }
.tb-layout button[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.tb-peers { display: flex; align-items: center; }
.tb-peers .avatar { margin-left: -8px; border: 2px solid var(--ink); }
.tb-peers .avatar:first-child { margin-left: 0; }
.tb-live { margin-left: 8px; font-size: 12.5px; color: #C9D5EA; white-space: nowrap; }
.tb-live i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3CCB8A; margin-right: 6px; }
.tb-user { position: relative; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--white); font-size: 11px; font-weight: 700; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.me { border: 2px solid rgba(255, 255, 255, .7); width: 36px; height: 36px; font-size: 12px; }

.main { flex: 1; min-height: 0; position: relative; display: flex; }
.panel { flex: 0 0 var(--panel-w); width: var(--panel-w); min-height: 0; background: var(--white); border-right: 1px solid var(--parcel); display: flex; flex-direction: column; position: relative; z-index: 900; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-grab { display: none; }
.mapwrap { flex: 1; min-width: 0; position: relative; }
.map { position: absolute; inset: 0; background: #EEF1F5; }
.map-hint {
  position: absolute; z-index: 800; left: 50%; top: 14px; transform: translateX(-50%);
  background: var(--ink); color: var(--white); border-radius: 999px; padding: 9px 16px; font-weight: 500; font-size: 13px;
  box-shadow: var(--shadow); white-space: nowrap; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}

/* Map-first layout: the list floats over a full-width map */
.app.mapfirst .panel {
  position: absolute; top: 16px; left: 16px; bottom: auto; width: 380px; max-height: calc(100% - 32px);
  border: 0; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.app.mapfirst .mapwrap { position: absolute; inset: 0; }

/* Door log: a side drawer over the map */
.door {
  position: absolute; z-index: 1000; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%;
  background: var(--white); box-shadow: -8px 0 28px rgba(19, 33, 58, .18); display: flex; flex-direction: column;
}
.door-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.door-head h2 { margin: 2px 0 0; font: 700 21px/1.2 var(--display); letter-spacing: -.01em; outline: none; }
.door-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; overscroll-behavior: contain; }
.door-foot { border-top: 1px solid var(--line); padding: 10px 16px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: var(--white); }
.foot-meta { min-height: 18px; }
.unsaved { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.unsaved span { flex: 1; font-weight: 600; }

/* ---------- Controls ---------- */
.btn {
  height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink);
  font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--paper); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn.primary:hover:not(:disabled) { background: var(--blue-d); }
.btn.dark { background: var(--ink-2); border-color: var(--ink-line); color: var(--white); height: 40px; }
.btn.lg { height: 48px; font-size: 15px; border-radius: 12px; }
.btn.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.link { border: 0; background: none; padding: 6px 0; color: var(--blue); font-weight: 600; font-size: 13px; text-align: left; }
.link.danger, .danger { color: var(--red); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 42px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--white); padding: 9px 11px; font-size: 15px;
}
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 100, 214, .2); }
input[type=range] { width: 100%; accent-color: var(--blue); }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; flex: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--paper); border-radius: 11px; padding: 4px; }
.seg button { height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--blue-d); box-shadow: 0 1px 3px rgba(19, 33, 58, .14); }
.notice { background: var(--blue-l); color: #1B3C82; border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; }
.error { background: #F8E1DF; color: #7E201B; border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; }
.ok { display: inline-flex; align-items: center; gap: 5px; color: #0F5A3C; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; background: var(--amber-l); color: var(--amber-d); border-radius: 999px; padding: 1px 7px; }
.pill-ink { display: inline-flex; align-items: center; gap: 5px; background: var(--ink); color: var(--white); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 1300; top: calc(100% + 6px); right: 0; min-width: 260px; background: var(--white); color: var(--ink);
  border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column;
}
.menu-wrap .menu { left: 0; right: auto; }
.menu button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.menu button:hover { background: var(--paper); }
.menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; font-size: 13px; }
.menu-head span { color: var(--muted); font-size: 12px; }

/* ---------- Sign-in / welcome / empty ---------- */
.signin-brand { display: flex; align-items: center; gap: 14px; }
.signin-brand .mark { width: 52px; height: 52px; }
.brand-big { font: 700 32px/1 var(--display); letter-spacing: -.025em; }
.empty { text-align: center; padding: 40px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .mark { width: 56px; height: 56px; }
.empty h2 { margin: 0; font: 700 20px var(--display); }
.empty p { max-width: 34ch; margin: 0; }

/* ---------- Home ---------- */
.case { display: flex; flex-direction: column; gap: 8px; }
.case-head { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.case-head .mono { color: var(--ink); font-weight: 600; font-size: 13px; }
.cv-card { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); }
.cv-card:hover { border-color: var(--line-2); background: #FAFBFD; }
.cv-card-top { display: flex; align-items: center; gap: 8px; }
.cv-mode { color: var(--blue); display: inline-flex; }
.cv-title { flex: 1; font-weight: 700; font-size: 15px; }
.cv-count { font: 600 13px var(--mono); }
.cv-meta { font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }

/* ---------- New canvass ---------- */
.draw-status { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--paper); border-radius: 9px; padding: 10px 12px; }
.found { background: var(--paper); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.found-count { font-size: 15px; }
.found-count b { font: 700 22px var(--display); }
.found-list { margin: 0; padding-left: 18px; font-size: 13.5px; }

/* ---------- Canvass panel ---------- */
.cv-summary { display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.cv-head { display: flex; flex-direction: column; gap: 3px; }
.progress-row { display: flex; align-items: baseline; gap: 8px; }
.big-num { font: 700 34px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stack-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); }
.stack-bar span { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 6px; margin: 0 -6px; border-radius: 7px; font-size: 12.5px; text-align: left; min-width: 0; }
.legend-item span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-item b { font-variant-numeric: tabular-nums; }
.legend-item:hover, .legend-item.on { background: var(--paper); }
.alerts { padding-top: 12px; }
.alert { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--r); padding: 10px 12px; font-size: 13px; line-height: 1.45; border: 0; text-align: left; width: 100%; }
.alert.amber { background: var(--amber-l); color: var(--amber-d); }
.alert.blue { background: var(--blue-l); color: #1B3C82; }
.alert svg { flex: none; margin-top: 2px; }
.cv-tools { padding-top: 14px; padding-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.fchip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.fchip.on span { color: #C9D5EA; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 10px; color: var(--muted); background: var(--white); }
.search input { border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 38px !important; font-size: 14px !important; background: transparent !important; }
.sort { width: auto !important; min-height: 40px !important; font-size: 13px !important; padding: 0 8px !important; flex: none; }
.add-form { background: var(--paper); border-radius: 12px; padding: 12px; }
.addr-list { list-style: none; margin: 0; padding: 4px 10px 12px; }
.addr-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 10px; min-height: 56px; }
.addr-row:hover { background: var(--paper); }
.addr-row.sel { background: #EEF3FE; border-color: #BFD0F7; }
.addr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.addr-label { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.addr-label .unit { color: var(--muted); font-weight: 500; }
.addr-label .wit { display: inline-flex; color: var(--ink); }
.addr-label .fu { display: inline-flex; color: var(--amber); }
.addr-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-row { padding: 18px 10px; color: var(--muted); }
.cv-activity { border-top: 1px solid var(--line); }
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.activity li { display: flex; gap: 10px; align-items: flex-start; }

/* ---------- Door log ---------- */
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-btn { min-height: 50px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; }
.st-btn.wide { grid-column: span 2; }
.st-btn.on { border-width: 2px; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font-size: 20px; font-weight: 600; line-height: 1; }
.stepper span { min-width: 34px; text-align: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dvr { background: var(--ink); color: var(--white); border-radius: 14px; padding: 14px; }
.dvr .eyebrow.light { color: var(--muted-on-dark); }
.dvr .field label { color: var(--muted-on-dark); }
.dvr input { background: var(--ink-2) !important; border-color: var(--ink-line) !important; color: var(--white) !important; font-family: var(--mono); font-weight: 600; }
.dvr input::placeholder { color: #6E7F9E; }
.light-muted { color: var(--muted-on-dark); }
.dvr-result { font-size: 13.5px; line-height: 1.5; color: #DDE5F3; }
.dvr-result .hl { color: var(--blue-on-dark); }
.witness-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.witness { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.w-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--white); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.w-text { margin: 2px 0; white-space: pre-wrap; }
.add-w { border: 1px dashed var(--line-2); border-radius: 12px; padding: 4px 12px; }
.add-w[open] { padding-bottom: 12px; }
.add-w summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); min-height: 40px; }
.add-w summary::-webkit-details-marker { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 2000; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--white); border-radius: 12px; padding: 11px 16px; font-weight: 500; box-shadow: var(--shadow);
  max-width: min(520px, calc(100% - 32px));
}
.toast.error { background: #7E201B; }

/* ---------- Leaflet overrides ---------- */
.leaflet-container { font: 12px/1.4 var(--font); }
.leaflet-bar a, .map-btn { width: 40px !important; height: 40px !important; line-height: 40px !important; }
.leaflet-touch .leaflet-bar, .leaflet-bar { border: 0 !important; border-radius: 10px !important; box-shadow: 0 2px 10px rgba(19, 33, 58, .18) !important; overflow: hidden; }
.leaflet-control-layers { border: 0 !important; border-radius: 10px !important; box-shadow: 0 2px 10px rgba(19, 33, 58, .18) !important; }
.map-btn { border: 0; border-radius: 10px; background: var(--white); color: var(--blue); display: inline-flex !important; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(19, 33, 58, .18); }
.incident-icon { background: none; border: 0; }
.incident-mark { position: relative; width: 34px; height: 34px; }
.incident-mark span { position: absolute; left: 50%; bottom: 38px; transform: translateX(-50%); background: var(--ink); color: var(--white); font: 700 10.5px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; white-space: nowrap; }
.peer-icon { background: none; border: 0; }
.peer { width: 32px; height: 32px; border-radius: 50%; color: var(--white); border: 3px solid var(--white); box-shadow: 0 0 0 4px rgba(47, 100, 214, .22); display: inline-flex; align-items: center; justify-content: center; font: 700 11px var(--font); }
.leaflet-tooltip { font: 600 12.5px var(--font); color: var(--ink); border-radius: 8px; border: 0; box-shadow: 0 2px 10px rgba(19, 33, 58, .2); }

/* ---------- Phones: map with a bottom sheet ---------- */
@media (max-width: 760px) {
  .topbar { gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .brand-name, .tb-layout, .tb-live { display: none; }
  .app[data-view="canvass"] .brand { display: none; }
  .tb-case { border-left: 0; padding-left: 0; }
  .tb-badge { font-size: 10px; padding: 5px 7px; }
  .tb-badge .long { display: none; }
  .tb-badge .short { display: inline; }
  .dvr .grid2 { grid-template-columns: minmax(0, 1fr); }
  .toast { bottom: auto; top: calc(max(8px, env(safe-area-inset-top)) + 64px); }
  .mapwrap { position: absolute; inset: 0; }
  .panel, .app.mapfirst .panel {
    position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: none; height: 48%;
    border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(19, 33, 58, .16); transition: height .22s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app.sheet-full .panel { height: calc(100% - 8px); }
  .app.sheet-min .panel { height: 132px; }
  .sheet-grab { display: flex; justify-content: center; align-items: center; height: 26px; border: 0; background: none; flex: none; width: 100%; }
  .sheet-grab span { width: 42px; height: 5px; border-radius: 3px; background: var(--parcel); }
  .pad { padding: 8px 16px 16px; }
  .pad-x { padding-left: 16px; padding-right: 16px; }
  .leaflet-bottom { bottom: 48%; }
  .app.sheet-full .leaflet-bottom { bottom: 100%; }
  .app.sheet-min .leaflet-bottom { bottom: 132px; }
  .map-hint { top: 10px; max-width: calc(100% - 80px); }
  .door { width: auto; left: 0; box-shadow: none; z-index: 1100; }
  .app.door-open .panel { visibility: hidden; }
  .grid2 { gap: 8px; }
  .h1 { font-size: 22px; }
}
@media (max-width: 380px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Print report ---------- */
.report { display: none; }
@media print {
  body.printing .app { display: none !important; }
  body.printing .report { display: block; padding: 0; font: 10.5pt/1.35 var(--font); color: #000; }
  .report h1 { font: 700 16pt var(--display); margin: 0 0 6pt; }
  .report p { margin: 0 0 4pt; }
  .report table { width: 100%; border-collapse: collapse; margin-top: 10pt; }
  .report th, .report td { border: 1px solid #999; padding: 4pt 5pt; text-align: left; vertical-align: top; font-size: 9pt; }
  .report th { background: #eee; }
  .report tr { break-inside: avoid; }
  @page { margin: 12mm; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Team members (administrators) ---------- */
.team-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.team-row .grow { min-width: 180px; }
.team-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn.danger-btn { color: var(--red); }

/* ---------- Updates (release history) ---------- */
.release-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.release { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.release-top { display: flex; align-items: center; gap: 8px; }
.release-ver { font-weight: 600; font-size: 13px; }
.release-notes { font-size: 14px; white-space: pre-wrap; }
.release-files ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.menu-head .mono { font-size: 11px; color: var(--muted); margin-top: 2px; }
