/* Zumrasha Inspect — dark site-tool theme, ported from the approved prototype.
   Mobile-first: every control is at least 44px tall so it works in gloves. */

:root {
  --bg: #08080a;
  --surface: #0d0d0f;
  --card: #1b1b1e;
  --card-2: #2b2b40;
  --primary: #c6c6e8;
  --on-primary: #23233a;
  --text: #e9e9ee;
  --muted: rgba(233, 233, 238, 0.5);
  --faint: rgba(233, 233, 238, 0.35);
  --line: rgba(255, 255, 255, 0.2);
  --line-soft: rgba(255, 255, 255, 0.08);
  --ok: #7bd88f;
  --ok-ink: #16301f;
  --warn: #e8a33d;
  --warn-bg: #2e2617;
  --warn-ink: #f0d8ab;
  --bad: #e8635f;
  --bad-ink: #3a1614;
  --na: #9a9aa2;

  --font-body: 'Barlow', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Barlow Condensed', 'Barlow', ui-sans-serif, system-ui, sans-serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 18px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font-family: var(--font-body); font-size: 16px; color: var(--text); }
/* 16px minimum on focusable text inputs: anything smaller makes iOS Safari zoom
   the whole page on focus, which is what pushes buttons out of reach. */
input, textarea, select { font-size: 16px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@keyframes zpulse { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }
@keyframes zrise { from { transform: translateY(16px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.zscroll::-webkit-scrollbar { width: 0; height: 0; }
.zscroll { scrollbar-width: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── app shell ───────────────────────────────────────────────────────────── */

/* iOS Safari: 100vh includes the browser chrome, so the bottom action bar ends
   up below the fold; and when the keyboard opens, dvh shrinks mid-layout and
   pushes it further. Pin the shell to the visual viewport instead and let only
   the middle section scroll. svh is the stable small-viewport unit; dvh
   overrides it where supported. */
#app {
  display: flex;
  flex-direction: column;
  height: 100svh;
  height: 100dvh;
  max-height: 100svh;
  max-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 8px 10px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}

.topbar .icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: var(--r-pill);
  border: none; background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}

.topbar .titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; padding-left: 4px; }
.topbar .title { font-family: var(--font-heading); font-size: 21px; line-height: 1.15; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lang-btn {
  flex: none; height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .16); background: transparent;
  color: var(--primary); font-size: 12px; letter-spacing: .06em;
}

.sync { flex: none; display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10.5px; color: var(--faint); padding-right: 8px; }
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: zpulse 2.4s infinite; }
.sync.off .dot { background: #6a6a72; animation: none; }

.body {
  flex: 1 1 auto;
  min-height: 0;              /* without this a flex child refuses to shrink and
                                 the CTA below it gets pushed off-screen */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.screen { padding: 8px 14px 16px; display: flex; flex-direction: column; gap: 14px; }

/* ── generic pieces ──────────────────────────────────────────────────────── */

.card { background: var(--card); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 11px; }
.card.tight { padding: 12px 14px; }
.hint { font-size: 12px; color: var(--muted); padding: 0 4px; }
.section-label { font-size: 12px; color: var(--muted); padding: 0 4px; }

.field { position: relative; }
.field > label {
  position: absolute; top: -8px; left: 14px; padding: 0 6px; z-index: 1;
  background: var(--surface); font-size: 11.5px; color: rgba(233, 233, 238, .6);
}
.field.on-card > label { background: var(--card); }

.input, .select, textarea.input {
  width: 100%; min-height: 54px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, .22);
  background: transparent; color: var(--text); font-size: 15px;
}
textarea.input { min-height: 110px; padding: 14px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 40px; }
.field .chev { position: absolute; right: 15px; top: 20px; pointer-events: none; color: rgba(233, 233, 238, .6); }
.select option { background: var(--card); color: var(--text); }
.input::placeholder, textarea.input::placeholder { color: var(--faint); }
.input:disabled, .select:disabled { opacity: .45; }

.btn {
  width: 100%; min-height: 54px; border-radius: var(--r-pill); border: none;
  background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:disabled { background: #2a2a2e; color: var(--faint); }
.btn.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .22); color: var(--text); font-weight: 400; }
.btn.dashed { background: transparent; border: 1px dashed rgba(255, 255, 255, .28); color: var(--primary); min-height: 50px; font-size: 14.5px; }
.btn.sm { min-height: 44px; font-size: 13.5px; }

.seg { display: flex; border-radius: var(--r-pill); border: 1px solid var(--line); overflow: hidden; }
.seg button { flex: 1; min-height: 44px; border: none; background: transparent; color: rgba(233, 233, 238, .75); font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed='true'].yes { background: var(--ok); color: var(--ok-ink); }
.seg button[aria-pressed='true'].no  { background: var(--bad); color: var(--bad-ink); }
.seg button[aria-pressed='true'].na  { background: var(--na); color: #25252a; }
.seg button[aria-pressed='true'].acc { background: var(--ok); color: var(--ok-ink); }
.seg button[aria-pressed='true'].rej { background: var(--bad); color: var(--bad-ink); }

.chip { padding: 3px 10px; border-radius: 8px; font-size: 11px; white-space: nowrap; }
.chip.ok   { background: rgba(123, 216, 143, .16); color: var(--ok); }
.chip.warn { background: rgba(232, 163, 61, .16); color: var(--warn); }
.chip.bad  { background: rgba(232, 99, 95, .16); color: var(--bad); }
.chip.dim  { background: rgba(255, 255, 255, .08); color: var(--muted); }

.notice { border-radius: var(--r-md); padding: 13px; font-size: 12.5px; line-height: 1.5; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.bad  { background: #2e1a19; color: #f3b7b5; }

/* ── login ───────────────────────────────────────────────────────────────── */

.login { padding: 26px 20px; gap: 20px; }
.login .logo { display: flex; justify-content: center; padding: 14px 26px; }
.login .logo img { width: 170px; max-width: 60%; height: auto; }
.login .foot { text-align: center; font-size: 11.5px; color: var(--faint); }
.checkline { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(233, 233, 238, .8); }
.checkline input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ── location picker ─────────────────────────────────────────────────────── */

.pinned { background: var(--card-2); border-radius: var(--r-md); padding: 13px 15px; display: flex; align-items: center; gap: 11px; }
.pinned .k { font-size: 11px; color: rgba(198, 198, 232, .75); }
.pinned .v { font-size: 15px; }
.pinned button { border: none; background: transparent; color: var(--primary); font-size: 13px; }

.step { background: var(--card); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 11px; }
.step header { display: flex; align-items: center; gap: 9px; }
.step header .name { font-size: 15.5px; }
.step header .count { margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.tiles { display: grid; gap: 8px; overflow-y: auto; }
.tile {
  text-align: left; min-height: 54px; padding: 8px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: transparent; color: var(--text);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.tile .code { font-size: 15.5px; line-height: 1.1; }
.tile .sub { font-size: 10.5px; opacity: .6; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile[aria-pressed='true'] { background: rgba(198, 198, 232, .18); border-color: var(--primary); }
.tile.st-active { border-color: rgba(232, 163, 61, .4); }
.tile.st-closed { border-color: rgba(123, 216, 143, .35); }
.tile.st-inactive {
  opacity: .4; cursor: not-allowed;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 5px, transparent 5px 10px);
}
.legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 10.5px; }
.legend span { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ── templates ───────────────────────────────────────────────────────────── */

.tmpl {
  text-align: left; padding: 14px 15px; border-radius: var(--r-md); border: none;
  border-left: 4px solid var(--primary); background: var(--card);
  display: flex; gap: 13px; align-items: center; color: var(--text); width: 100%;
}
.tmpl .code { font-size: 12.5px; letter-spacing: .06em; color: var(--primary); width: 48px; flex: none; }
.tmpl .main { flex: 1; min-width: 0; }
.tmpl .name { display: block; font-size: 16px; line-height: 1.25; }
.tmpl .sub { display: block; font-size: 12px; color: var(--muted); }

/* ── header / read-only rows ─────────────────────────────────────────────── */

.kv { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.kv:first-of-type { border-top: none; }
.kv .k { width: 118px; flex: none; color: var(--faint); font-size: 12px; padding-top: 2px; }
.kv .v { flex: 1; line-height: 1.35; overflow-wrap: anywhere; }

/* ── checklist ───────────────────────────────────────────────────────────── */

.progress-head { position: sticky; top: 0; z-index: 5; background: var(--surface); padding: 6px 16px 12px; display: flex; flex-direction: column; gap: 8px; margin: 0 -14px; }
.progress-head .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.progress-head .row b { color: var(--text); font-size: 15px; font-weight: 500; }
.bar { height: 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .09); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); transition: width .2s; }

.item { background: var(--card); border-radius: var(--r-md); border-left: 4px solid rgba(255, 255, 255, .12); padding: 13px 14px; display: flex; flex-direction: column; gap: 11px; }
.item.a-yes { border-left-color: var(--ok); }
.item.a-no  { border-left-color: var(--bad); }
.item.a-na  { border-left-color: #5a5a62; }
.item .head { display: flex; gap: 10px; align-items: flex-start; }
.item .num { font-size: 12px; color: var(--faint); width: 20px; flex: none; padding-top: 3px; }
.item .label { flex: 1; font-size: 14px; line-height: 1.4; text-wrap: pretty; }
.item .bullets { padding-left: 30px; display: flex; flex-direction: column; gap: 4px; }
.item .bullets span { font-size: 12px; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.item .controls { display: flex; gap: 9px; align-items: center; padding-left: 30px; }
.item .indent { padding-left: 30px; }

.round-btn {
  width: 46px; height: 46px; flex: none; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--text);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.round-btn.has { border-color: var(--primary); }
.round-btn .badge {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.round-btn .badge.warn { background: var(--warn); }

.needs { padding-left: 30px; font-size: 11.5px; color: var(--warn); display: flex; gap: 6px; align-items: center; }

.thumbs { padding-left: 30px; display: flex; gap: 9px; flex-wrap: wrap; }
.thumb { width: 78px; height: 78px; border-radius: var(--r-sm); overflow: hidden; position: relative; background: #2a3138; display: flex; flex-direction: column; justify-content: flex-end; border: none; padding: 0; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .phase { position: absolute; top: 5px; left: 5px; padding: 1px 6px; border-radius: 6px; background: var(--ok); color: var(--ok-ink); font-size: 8.5px; letter-spacing: .04em; z-index: 1; }
.thumb .stamp { position: relative; font-size: 8.5px; padding: 4px 5px; background: rgba(0, 0, 0, .6); color: #fff; line-height: 1.25; z-index: 1; }
.thumb .del { position: absolute; top: 4px; right: 4px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; }

/* ── sign-off ────────────────────────────────────────────────────────────── */

.result-opt {
  text-align: left; padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: 14.5px; display: flex; align-items: center; gap: 9px; width: 100%;
}
.result-opt[aria-pressed='true'] { border-color: var(--primary); background: rgba(198, 198, 232, .14); }

.signer .row { display: flex; align-items: center; gap: 9px; }
.signer .role { font-size: 15px; }
.signer .who { font-size: 11.5px; color: var(--faint); }
.ink { height: 60px; border-radius: 10px; background: #e9e9ee center / contain no-repeat; }

/* ── export ──────────────────────────────────────────────────────────────── */

.export-list { background: var(--card); border-radius: var(--r-lg); overflow: hidden; }
.export-list button {
  width: 100%; text-align: left; padding: 16px; border: none; background: transparent;
  color: var(--text); display: flex; gap: 14px; align-items: center;
}
.export-list button + button { border-top: 1px solid var(--line-soft); }
.export-list .main { flex: 1; min-width: 0; }
.export-list .name { display: block; font-size: 15.5px; }
.export-list .sub { display: block; font-size: 11.5px; color: var(--faint); }
.summary { background: var(--card); border-radius: var(--r-lg); border-left: 4px solid var(--primary); padding: 15px; display: flex; flex-direction: column; gap: 9px; }
.summary .doc { font-size: 18px; font-family: var(--font-heading); letter-spacing: .01em; }
.summary .meta { font-size: 13px; line-height: 1.55; color: rgba(233, 233, 238, .62); }
.summary .chips { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }

/* ── bottom CTA ──────────────────────────────────────────────────────────── */

.cta {
  flex: 0 0 auto; padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 7px;
}
.cta .hint { font-size: 11.5px; line-height: 1.35; color: var(--faint); text-align: center; }

/* ── overlays: camera, signature pad, language sheet ─────────────────────── */

.overlay { position: absolute; inset: 0; z-index: 80; display: flex; }
.overlay.dim { background: rgba(0, 0, 0, .6); align-items: flex-end; }
.sheet { width: 100%; background: var(--card); border-radius: 26px 26px 0 0; padding: 18px 16px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 11px; animation: zrise .2s ease-out; }
.sheet h2 { margin: 0; font-family: var(--font-heading); font-size: 19px; font-weight: 500; }

.camera { background: #000; flex-direction: column; animation: zrise .2s ease-out; }
.camera .bar { padding: max(12px, env(safe-area-inset-top)) 16px 8px; color: #fff; font-size: 13px; display: flex; gap: 10px; align-items: center; background: none; height: auto; }
.camera .bar button { border: none; background: transparent; color: var(--primary); font-size: 14px; }
.camera .stage { flex: 1; position: relative; margin: 8px 12px; border-radius: var(--r-md); overflow: hidden; background: #12161a; display: flex; align-items: center; justify-content: center; }
.camera video, .camera .preview { width: 100%; height: 100%; object-fit: cover; }
.camera .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 33.33% 33.33%; pointer-events: none; }
.camera .stamp { position: absolute; left: 12px; bottom: 12px; color: #fff; font-size: 10.5px; line-height: 1.5; text-shadow: 0 1px 2px #000; }
.camera .phases { padding: 6px 14px 0; display: flex; justify-content: center; }
.camera .phases .seg { border-color: rgba(255, 255, 255, .35); }
.camera .phases .seg button { min-width: 104px; min-height: 40px; color: rgba(255, 255, 255, .7); font-size: 12.5px; letter-spacing: .06em; }
.camera .phases .seg button[aria-pressed='true'] { background: #fff; color: #111; }
.camera .cap { padding: 10px 14px 4px; }
.camera .cap input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); color: #fff; min-height: 48px; }
.camera .shutter-row { padding: 12px 16px max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 28px; }
.camera .shutter { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; background: rgba(255, 255, 255, .18); }
.camera .side { color: rgba(255, 255, 255, .55); font-size: 12px; width: 62px; border: none; background: transparent; }

.pad-wrap { border-radius: 14px; overflow: hidden; background: #e9e9ee; }
.pad-wrap canvas { width: 100%; height: 180px; touch-action: none; display: block; }

.lang-opt { padding: 15px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 15.5px; text-align: left; display: flex; align-items: center; gap: 12px; width: 100%; }
.lang-opt[aria-pressed='true'] { border-color: var(--primary); background: rgba(198, 198, 232, .14); }
.lang-opt .code { font-size: 12px; letter-spacing: .08em; color: var(--primary); width: 30px; }

/* ── toast ───────────────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  max-width: min(92vw, 480px); z-index: 200;
  background: var(--card-2); color: var(--text); border-radius: var(--r-sm);
  padding: 12px 16px; font-size: 13.5px; line-height: 1.4; text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5); animation: zrise .18s ease-out;
}
.toast.bad { background: #3a1614; color: #f3b7b5; }

/* ── report language banner ──────────────────────────────────────────────── */

.report-lang-note {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(198, 198, 232, .1); border-radius: var(--r-md);
  padding: 12px 13px; font-size: 12px; line-height: 1.45; color: rgba(198, 198, 232, .9);
}

/* ── drafts list ─────────────────────────────────────────────────────────── */

.draft { width: 100%; text-align: left; background: var(--card); border: none; border-radius: var(--r-md); padding: 13px 14px; display: flex; gap: 12px; align-items: center; color: var(--text); }
.draft .main { flex: 1; min-width: 0; }
.draft .doc { font-size: 15px; }
.draft .meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 600px) {
  #app { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
}


/* ── checklist list rows (each item opens its own screen) ────────────────── */

.row-item {
  width: 100%; text-align: left; background: var(--card); border: none;
  border-left: 4px solid rgba(255, 255, 255, .12); border-radius: var(--r-md);
  padding: 14px; display: flex; gap: 11px; align-items: center; color: var(--text);
  min-height: 62px;
}
.row-item.a-yes { border-left-color: var(--ok); }
.row-item.a-no  { border-left-color: var(--bad); }
.row-item.a-na  { border-left-color: #5a5a62; }
.row-item .num { font-size: 12px; color: var(--faint); flex: none; width: 20px; }
.row-item .label {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-item .tail { flex: none; display: flex; align-items: center; gap: 7px; }
.row-item .pc {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--muted);
}
.row-item .mk {
  width: 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 13px;
  background: rgba(255, 255, 255, .07); color: var(--faint);
}
.row-item .mk.yes { background: rgba(123, 216, 143, .18); color: var(--ok); }
.row-item .mk.no  { background: rgba(232, 99, 95, .18); color: var(--bad); }
.row-item .mk.na  { background: rgba(255, 255, 255, .1); color: var(--na); font-size: 10px; }
.row-item.done .mk { box-shadow: 0 0 0 1px currentColor inset; }

.logo-slot {
  min-height: 92px; border-radius: var(--r-sm);
  border: 1px dashed rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; background: rgba(255, 255, 255, .03);
}
.logo-slot img { max-height: 72px; max-width: 100%; object-fit: contain; }


/* ── work-area pickers: a real, grabbable scrollbar ──────────────────────
   These lists scroll inside a short box. With the scrollbar hidden there was
   nothing to drag, so you had to hunt for empty space. Make it visible and
   wide enough for a thumb. */
.tiles {
  scrollbar-width: auto;
  scrollbar-color: var(--primary) rgba(255, 255, 255, .08);
  padding-right: 4px;
}
.tiles::-webkit-scrollbar { width: 12px; }
.tiles::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .07);
  border-radius: var(--r-pill);
}
.tiles::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--r-pill);
  border: 3px solid var(--card);      /* inset so the thumb reads as a slider */
  min-height: 40px;
}
.tiles::-webkit-scrollbar-thumb:active { background: #e0e0f5; }

/* ── inspection list: press and hold a row to delete ─────────────────────────
   The hold is handled in app.js. Block iOS's own callout menu and text
   selection so the gesture does not fight the system one. */
.draft {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
