:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --soft: #f4f6f8;
  --blue: #2563ff;
  --blue-dark: #1747d1;
  --green: #0f9f6e;
  --red: #df3b3b;
  --surface: #ffffff;
  --shadow: 0 18px 48px rgba(17, 24, 39, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #fff; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }
.safe-top { padding-top: max(10px, env(safe-area-inset-top)); }
.safe-bottom { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.screen { min-height: 100dvh; background: var(--surface); }
.centered { display: grid; place-items: center; padding: 28px 22px; text-align: center; }
.boot-logo, .auth-logo { width: min(210px, 62vw); height: auto; }
.spinner { width: 26px; height: 26px; margin: 22px auto 0; border: 3px solid #e5e7eb; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kicker { margin: 0 0 8px; color: var(--blue); font-size: .74rem; font-weight: 800; letter-spacing: .14em; }
.muted { color: var(--muted); line-height: 1.48; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.9rem, 7vw, 2.7rem); letter-spacing: -.04em; line-height: 1.03; }
.auth-panel, .processing-card, .complete-card { width: min(440px, 100%); }
.auth-panel .auth-logo { margin-bottom: 34px; }
.stack { display: grid; gap: 14px; margin-top: 26px; text-align: left; }
label { display: grid; gap: 7px; color: var(--ink); font-weight: 700; }
label span { font-size: .85rem; }
label small, .setup-form small { color: var(--muted); font-weight: 500; line-height: 1.35; }
input, textarea, select { width: 100%; border: 1px solid #d6d9df; border-radius: 14px; background: #fff; color: var(--ink); padding: 14px 15px; outline: none; font-size: 16px; }
textarea { resize: none; }
input:focus, textarea:focus, select:focus { border-color: #9bb6ff; box-shadow: 0 0 0 3px rgba(37, 99, 255, .12); }
.primary-action, .secondary-action { width: 100%; min-height: 52px; border: 0; border-radius: 15px; font-weight: 800; padding: 0 20px; }
.primary-action { background: var(--blue); color: white; box-shadow: 0 8px 22px rgba(37, 99, 255, .22); }
.primary-action:active { background: var(--blue-dark); transform: translateY(1px); }
.secondary-action { background: var(--soft); color: var(--ink); }
.text-button, .text-link { border: 0; background: transparent; color: var(--blue); font-weight: 750; text-decoration: none; padding: 10px; }
.status { min-height: 1.4em; color: var(--muted); font-size: .9rem; }
.simple-header, .capture-header, .review-header { min-height: 64px; padding-left: 16px; padding-right: 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.simple-header img { width: 126px; height: auto; }
.simple-header .text-link { margin-left: auto; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 2rem; display: grid; place-items: center; padding: 0 0 4px; }
.header-title, .capture-context { min-width: 0; flex: 1; display: grid; gap: 2px; }
.header-title strong, .capture-context strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-title small, .capture-context small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-spacer { width: 42px; }
.page-pad { padding: 28px 20px 42px; width: min(680px, 100%); margin: 0 auto; }
.project-cards { display: grid; gap: 12px; margin-top: 24px; }
.project-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: left; box-shadow: 0 4px 16px rgba(17,24,39,.04); }
.project-card strong { display: block; font-size: 1.05rem; }
.project-card small { color: var(--muted); display: block; margin-top: 4px; }
.project-card .arrow { font-size: 1.6rem; color: #98a2b3; }
.project-home { display:grid; gap:14px; }
.project-home h1 { margin-bottom:0; }
.project-home-card { width:100%; min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; border:1px solid var(--line); border-radius:18px; background:#fff; color:var(--ink); text-align:left; font:inherit; box-shadow:0 4px 16px rgba(17,24,39,.04); }
.project-home-card strong { display:block; font-size:1.02rem; }
.project-home-card small { display:block; margin-top:5px; color:var(--muted); line-height:1.35; }
.project-home-find { justify-self:start; min-height:44px; margin-top:-8px; padding:8px 4px; font-weight:650; }
.project-home-card .arrow { flex:none; color:#98a2b3; font-size:1.6rem; }
.project-home-start { min-height:112px; border:0; background:var(--blue); color:#fff; box-shadow:0 8px 22px rgba(37,99,255,.2); }
.project-home-start strong { font-size:1.2rem; }
.project-home-start small { color:#fff; }
.project-home-inspection-icon { width:52px; height:52px; flex:none; }
/* Same yellow as Add snag in the desnag review. */
.project-home-one-snag { border-color:#eab308; background:#facc15; color:#422006; }
.project-home-one-snag small, .project-home-one-snag .arrow { color:#713f12; }
.project-home-desnag { display:grid; gap:10px; }
.project-home-resume { display:grid; gap:8px; }
.project-home-actions { display:grid; gap:10px; margin-top:2px; }
.project-home-actions .primary-action,.project-home-actions .secondary-action { margin:0; min-height:54px; }
.setup-form { display: grid; gap: 18px; }
.setup-form h1 { margin-bottom: 4px; }
.sticky-action { margin-top: 8px; }

.capture-screen { display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; }
.capture-header { min-height: 58px; position: relative; flex: 0 0 auto; border-bottom: 0; padding-bottom: 4px; }
.capture-header .icon-button { width: 36px; height: 36px; font-size: 1.8rem; }
.capture-context strong { font-size: 1rem; letter-spacing: -.01em; }
.capture-context small { font-size: .78rem; }
.done-button { flex: 0 0 auto; border: 0; background: #f1f3f6; color: var(--ink); border-radius: 999px; padding: 8px 12px; font-size: .78rem; font-weight: 800; box-shadow: none; white-space: nowrap; }
.done-button:active { background: #e6e9ee; transform: translateY(1px); }
.capture-meta { flex: 0 0 auto; display: flex; align-items: center; padding: 4px 14px 6px; }
.area-pill { max-width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); padding: 6px 9px; display: inline-flex; align-items: center; gap: 6px; text-align: left; font-size: .76rem; font-weight: 650; }
.area-pill svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.area-pill .area-label { color: var(--ink); font-size: inherit; font-weight: 800; }
.area-pill #areaText { min-width: 0; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-chevron { color: #98a2b3; font-size: 1rem; line-height: 1; }
.last-strip { flex: 0 0 auto; width: calc(100% - 28px); margin: 2px 14px 4px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; text-align: left; padding: 5px 9px 5px 6px; }
.last-strip img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.last-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; }
.last-strip small { font-size: .61rem; color: var(--muted); letter-spacing: .09em; font-weight: 850; }
.last-strip strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .79rem; }
.last-edit { color: var(--blue); font-size: .76rem; font-weight: 800; }
.capture-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; padding: 6px 14px 16px; overflow-y: auto; scroll-padding: 12px; }
.capture-stage > * { flex-shrink: 0; }
#captureView > .spatial-capture-bar { flex: none; margin: 4px 14px 6px; grid-template-columns: minmax(0,1fr) auto; }
#spatialCurrentBtn { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#spatialPinStatus:empty { display: none; }
.party-label { position: relative; display: flex; align-items: center; gap: 6px; }
.party-help summary { display: grid; place-items: center; width: 44px; height: 44px; list-style: none; cursor: pointer; color: var(--blue); font-weight: 800; }
.party-help summary::-webkit-details-marker { display: none; }
.party-help [role=tooltip] { position: absolute; top: 100%; left: 0; right: 0; z-index: 8; margin: 0; padding: 12px; border: 1px solid #c6d4ed; border-radius: 12px; background: #eff6ff; color: #27364c; font: 500 13px/1.5 system-ui; box-shadow: 0 4px 12px #17203320; }
#partyQuickPick [data-party], #reviewPartyChips [data-review-party] { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#partyQuickPick .party-holding, #reviewPartyChips .party-holding { outline: 2px solid #94a3b8; outline-offset: 2px; }
.empty-capture { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 160px; }
.empty-camera-card { width: 100%; min-height: clamp(160px, 31dvh, 235px); border: 1px solid #e8ebef; border-radius: 18px; background: #f8f9fb; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: var(--ink); box-shadow: none; }
.empty-camera-icon { width: 52px; height: 52px; border-radius: 16px; background: #fff; border: 1px solid #e6e9ee; display: grid; place-items: center; }
.empty-camera-icon svg { width: 27px; height: 27px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-camera-copy { display: grid; gap: 3px; text-align: center; }
.empty-camera-copy strong { font-size: .98rem; }
.empty-camera-copy small { color: var(--muted); font-size: .79rem; font-weight: 500; }
.photo-composer { width: 100%; margin: 0; }
.photo-frame { position: relative; border-radius: 18px; overflow: hidden; background: #111827; max-height: 47dvh; }
.photo-frame img { width: 100%; max-height: 47dvh; display: block; object-fit: contain; }
.photo-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.markup-tools { position: absolute; left: 9px; bottom: 9px; display: flex; gap: 5px; padding: 4px; border-radius: 12px; background: rgba(17,24,39,.82); backdrop-filter: blur(8px); }
.markup-tool { border: 0; color: #fff; background: transparent; border-radius: 8px; padding: 7px 9px; font-size: .72rem; font-weight: 800; }
.markup-tool.active { background: #fff; color: var(--ink); }
.markup-hint { color: var(--muted); font-size: .72rem; margin: 6px 3px 0; }
.note-composer { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: stretch; margin-top: 0; }
.note-composer textarea { min-height: 58px; max-height: 116px; border-radius: 15px; background: #f7f8fa; border-color: transparent; padding: 12px 13px; line-height: 1.35; }
.dictate-button { width: 48px; min-height: 58px; border: 1px solid #e7e9ed; border-radius: 15px; background: #f7f8fa; color: var(--ink); display: grid; place-items: center; box-shadow: none; }
.dictate-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dictate-button:active { background: #eceff3; }
.capture-footer { flex: 0 0 auto; min-height: 70px; display: grid; grid-template-columns: minmax(0,1fr) 84px; gap: 9px; align-items: center; padding: 8px 14px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.camera-button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; border-radius: 14px; background: var(--ink); color: #fff; }
.camera-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.camera-button strong { font-size: .92rem; }
.next-button { min-width: 84px; min-height: 50px; border: 0; border-radius: 14px; background: #eef1f5; color: var(--ink); font-weight: 800; font-size: .9rem; }

.processing-card { display: grid; justify-items: center; }
.ai-mark { width: 68px; height: 68px; border-radius: 20px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 900; margin-bottom: 22px; box-shadow: 0 14px 32px rgba(37,99,255,.24); }
.progress-track { width: 100%; height: 8px; border-radius: 999px; overflow: hidden; background: #edf0f3; margin: 20px 0 12px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .25s ease; }
.review-screen { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #f4f5f7; }
.review-header { justify-content: space-between; }
.review-header > div { display: grid; flex: 1; text-align: center; }
.review-header small { color: var(--muted); }
.review-back { min-width: 58px; padding-left: 0; text-align: left; }
#reviewFinishBtn { min-width: 104px; padding-right: 0; font-size: .78rem; text-align: right; }
.review-deck { flex: 1 1 auto; min-height: 0; padding: 14px 14px 10px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.review-card { width: min(520px, 100%); min-height: min-content; margin: 0 auto; overflow: visible; border-radius: 24px; background: white; box-shadow: var(--shadow); touch-action: pan-y; transition: transform .18s ease, opacity .18s ease; }
.review-card.dragging { transition: none; }
.review-photo-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #111827; overflow: hidden; }
.review-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.review-photo-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.review-sync-status { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; width: fit-content; max-width: calc(100% - 20px); border-radius: 999px; background: rgba(15,23,42,.82); color: #fff; padding: 6px 9px; font-size: .7rem; font-weight: 750; }
.review-copy { padding: 20px 20px 24px; }
.review-location { color: var(--blue); font-size: .78rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.review-copy h2 { margin: 13px 0 18px; font-size: 1.42rem; line-height: 1.18; letter-spacing: -.025em; }
.action-copy { border-top: 1px solid var(--line); padding-top: 15px; }
.action-copy small { color: var(--muted); font-weight: 850; letter-spacing: .08em; }
.action-copy p { margin: 7px 0 0; line-height: 1.45; }
.warning-copy { margin-top: 14px; padding: 11px 12px; border-radius: 12px; background: #fff7ed; color: #9a4b0b; font-size: .82rem; line-height: 1.4; }
.review-responsibility { display: grid; gap: 8px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.review-responsibility > small { color: var(--muted); font-weight: 850; letter-spacing: .08em; }
.review-party-chips,.edit-party-chips,.edit-party-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.review-party-chip,.edit-party-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; border: 1px solid #2563ff; border-radius: 999px; background: #2563ff; color: #fff; padding: 7px 11px; font-size: .8rem; font-weight: 800; }
.edit-party-chip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; padding: 0; font: 900 18px/1 system-ui; }
#reviewOwner { justify-self: start; padding: 6px 0; }
#reviewOwner.hidden { display: none !important; }
.review-actions { flex: 0 0 auto; min-height: 76px; padding: 8px 14px max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; background: #fff; border-top: 1px solid var(--line); z-index: 10; }
#reviewAiRetryBtn { justify-self: start; margin-top: 8px; color: #1748c7; font-weight: 850; }
.review-button { min-height: 50px; border: 0; border-radius: 14px; font-weight: 850; }
.review-button.edit { background: #f2f4f7; color: var(--ink); }
.review-button.later { background: #fff7e6; color: #8a5a00; }
.review-button.accept { background: #e8f8f1; color: #08754f; }
.complete-tick { width: 70px; height: 70px; border-radius: 50%; background: #e8f8f1; color: var(--green); display: grid; place-items: center; font-size: 2.1rem; font-weight: 900; margin: 0 auto 22px; }
.complete-card { display: grid; gap: 12px; justify-items: stretch; }
.link-action { display: grid; place-items: center; text-decoration: none; }
.bottom-sheet { width: min(620px, calc(100% - 16px)); max-width: 620px; border: 0; border-radius: 24px 24px 0 0; padding: 0; margin: auto auto 0; box-shadow: 0 -20px 60px rgba(17,24,39,.2); }
.bottom-sheet::backdrop { background: rgba(17,24,39,.38); backdrop-filter: blur(2px); }
.bottom-sheet form { display: grid; gap: 14px; padding: 8px 18px max(18px, env(safe-area-inset-bottom)); }
.sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: #d7dbe2; margin: 2px auto 6px; }
.bottom-sheet h2 { margin-bottom: 0; }
.suggestion-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.suggestion-row button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 8px 11px; background: #f0f2f5; font-size: .8rem; font-weight: 700; }
.mini-photo { border-radius: 14px; overflow: hidden; max-height: 180px; background: #111827; }
.mini-photo img { width: 100%; max-height: 180px; object-fit: contain; display: block; }
.danger-text { border: 0; background: transparent; color: var(--red); font-weight: 750; padding: 10px; }
.two-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-sheet { box-sizing: border-box; width: 100vw; max-width: 680px; height: 100dvh; max-height: 100dvh; border: 0; padding: 0; margin: 0 auto; background: #fff; color: var(--ink); }
.edit-sheet::backdrop { background: rgba(17,24,39,.38); }
.edit-sheet form { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.edit-sheet-header { flex: 0 0 auto; min-height: 64px; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; border-bottom: 1px solid var(--line); background: #fff; padding-left: 12px; padding-right: 12px; }
.edit-sheet-header strong { text-align: center; }
.edit-sheet-header button:first-child { text-align: left; padding-left: 0; }
.edit-sheet-header button:last-child { text-align: right; padding-right: 0; }
.edit-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 18px; padding: 20px 18px max(32px, calc(env(safe-area-inset-bottom) + 20px)); -webkit-overflow-scrolling: touch; }
.edit-sheet textarea { min-height: 112px; resize: vertical; }
.edit-responsibility { display: grid; gap: 12px; }
.edit-add-party { width: auto; justify-self: start; min-height: 44px; }
.edit-party-picker { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.edit-party-choice { min-height: 38px; border: 1px solid #c9d9ff; border-radius: 999px; background: #eef3ff; color: #1748c7; padding: 7px 11px; font-size: .8rem; font-weight: 800; }
.edit-sheet input,.edit-sheet textarea,.edit-sheet button { font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: max(94px, calc(env(safe-area-inset-bottom) + 76px)); transform: translate(-50%, 20px); z-index: 100; opacity: 0; pointer-events: none; max-width: calc(100% - 32px); padding: 11px 14px; border-radius: 12px; background: #111827; color: #fff; font-size: .84rem; box-shadow: var(--shadow); transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) {
  .capture-screen { max-width: 720px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .review-screen { max-width: 760px; margin: 0 auto; }
  .bottom-sheet { border-radius: 24px; margin: auto; }
}
/* The banner that answers "which Event am I in?" without scrolling. It is the
   first thing above the capture header for the whole walk, because an inspector
   who has to remember the answer will eventually remember it wrong. */
.active-event-banner{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#0b132b;color:#fff;border-bottom:1px solid rgba(255,255,255,.15)}
.active-event-banner.project-mode{background:#475569}
.active-event-banner>div{min-width:0;display:grid;gap:1px}
.active-event-banner small{font-size:10px;font-weight:900;letter-spacing:.1em;color:#93c5fd}
.active-event-banner.project-mode small{color:#e2e8f0}
.active-event-banner strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.active-event-banner span{font-size:11px;color:#cbd5e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.active-event-banner button{flex:none;border:1px solid rgba(255,255,255,.35);background:#fff;color:#0b132b;border-radius:999px;padding:8px 12px;font-weight:800}
/* One tap to assign. The pills are the parties this project actually uses, so
   the common case never needs the keyboard. */
.assignment-composer{margin:10px 0;display:grid;gap:7px}
.assignment-composer>span{font-size:12px;font-weight:800;color:#475569}
.assignment-composer input{width:100%}
.quick-party-pills{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:2px}
.quick-party-pills:empty{display:none}
.quick-party-pills button{white-space:nowrap;border:1px solid #dbe3ee;background:#fff;border-radius:999px;padding:8px 11px;font-weight:700;color:#334155}
.quick-party-pills button.active{background:#2563ff;color:#fff;border-color:#2563ff}
.quick-party-pills button.predicted{border-color:#93c5fd;background:#eff6ff;color:#1748c7}
.quick-party-pills button.predicted.active{background:#2563ff;color:#fff;border-color:#2563ff}
.quick-party-pills button small{display:block;font-size:9px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#2563ff;opacity:.85}
.quick-party-pills button.predicted.active small{color:#dbeaff}
.quick-party-pills .owner-add-input{min-width:0;max-width:100%;flex:1 1 100%;min-height:44px;font-size:16px;line-height:1.2}
#laterDraftBtn,#acceptDraftBtn{position:relative;z-index:2;touch-action:manipulation;pointer-events:auto}

/* The way back into Close out snags from a walk in progress. Small and quiet:
   it is a second errand, not the reason the phone is out. */
.capture-subbar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 16px 0; }
.capture-subbar button { min-height:44px; border:1px solid var(--line); background:#fff; color:var(--blue); border-radius:12px; padding:8px 10px; font:inherit; font-size:12px; font-weight:800; }
.capture-home-button { min-height:40px; border:0; background:transparent; color:var(--blue); padding:0 4px; font:inherit; font-size:12px; font-weight:850; white-space:nowrap; }

/* Unfinished inspections. The same shape as a project card, because it answers
   the same question: which of these am I going back into? */
.inspection-cards { display: grid; gap: 10px; margin: 4px 0 18px; }
.inspection-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 8px 24px rgba(29, 54, 94, .06);
}
.inspection-card > span:first-child { display: grid; gap: 3px; min-width: 0; }
.inspection-card strong { font-size: .95rem; }
.inspection-card small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.inspection-card .arrow { flex: 0 0 auto; color: var(--blue); font-size: .78rem; font-weight: 850; }
#resumeRecoveryNote { border: 1px solid #fcd9a4; border-radius: 12px; background: #fffaf0; color: #7a4a05; padding: 11px 13px; font-size: .78rem; line-height: 1.45; }
#resumeRecoveryNote.hidden { display: none !important; }
 .project-ai-context{margin:0 0 10px;border:1px solid #c9d9ff;border-radius:14px;background:linear-gradient(180deg,#f7faff,#fff);padding:12px;color:#0b132b}.project-ai-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.project-ai-head div{display:grid;gap:2px}.project-ai-head small,.project-ai-entities>small{font-size:10px;letter-spacing:.12em;font-weight:900;color:#2563ff}.project-ai-head strong{font-size:15px}.project-ai-head span{font-size:11px;color:#64748b}.project-ai-ask{border:0;border-radius:9px;background:#2563ff;color:#fff;min-height:38px;padding:7px 10px;font:inherit;font-size:12px;font-weight:850}.project-ai-drawings{display:flex;gap:7px;overflow:auto;margin-top:10px;padding-bottom:2px}.project-ai-drawings button{display:flex;align-items:center;gap:7px;min-width:190px;border:1px solid #d7deea;border-radius:10px;background:#fff;padding:8px;text-align:left;color:#0b132b}.project-ai-drawings button>span:first-child{font-size:20px}.project-ai-drawings button span:last-child{display:grid;gap:2px}.project-ai-drawings strong{font-size:12px}.project-ai-drawings small{font-size:10px;color:#64748b}.project-ai-empty{font-size:12px;color:#64748b;margin:9px 0 0}.project-ai-entities{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:9px}.project-ai-entities span{border-radius:999px;background:#eaf0ff;color:#1e40af;padding:4px 8px;font-size:11px;font-weight:750}.project-ai-dialog .dialog-heading>div{display:grid;gap:3px}.project-ai-dialog .dialog-heading small{display:block;color:#64748b;font-size:11px}.project-ai-question{display:grid;gap:6px;margin:10px 0}.project-ai-question textarea{width:100%;resize:vertical;border:1px solid #d7deea;border-radius:10px;padding:10px;font:inherit}.project-ai-answer{margin-top:12px;color:#0b132b}.project-ai-answer>p{font-weight:700;line-height:1.45}.project-ai-fact{border-left:3px solid #2563ff;padding-left:9px;margin:9px 0}.project-ai-fact span{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#64748b;font-weight:900}.project-ai-fact p{margin:2px 0;font-size:13px}.project-ai-sources{display:block;color:#64748b;line-height:1.5;margin-top:12px}
/* Optional project location context remains a compact strip above the camera. */
.spatial-capture-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center;margin:0 0 10px;border:1px solid #bfd2ff;border-radius:12px;background:#f8fbff;padding:6px}.spatial-capture-bar button{min-height:44px;border:0;background:transparent;color:#0b132b;font:inherit;font-weight:850;text-align:left}.spatial-capture-bar button:nth-child(2){color:#2563ff;font-size:12px;text-align:right}.spatial-capture-bar small{grid-column:1/-1;color:#64748b;padding:0 7px 3px}.spatial-dialog{width:calc(100vw - 20px);max-width:520px;max-height:calc(100dvh - 20px);margin:auto 10px 10px;border:0;border-radius:16px;padding:16px;box-shadow:0 24px 80px rgba(15,23,42,.3)}.spatial-dialog::backdrop{background:rgba(15,23,42,.55)}.spatial-selector-head small,.spatial-dialog h4{color:#64748b;font-size:11px;font-weight:800;text-transform:uppercase}.spatial-selector-head h3{margin:4px 0 12px}.spatial-choice-list{display:grid;gap:5px}.spatial-choice-list button,.spatial-levels button{display:flex;justify-content:space-between;min-height:48px;border:1px solid #d7deea;border-radius:9px;background:#fff;padding:10px 12px;color:#0b132b;font:inherit;font-weight:750;text-align:left}.spatial-levels{margin-top:14px;border-top:1px solid #d7deea;padding-top:12px}.spatial-levels summary{color:#2563ff;font-weight:850}.spatial-levels div{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;margin-top:8px}.spatial-levels button{justify-content:center}.spatial-levels button.active{border-color:#2563ff;background:#eff6ff;color:#2563ff}.spatial-pin-stage{position:relative;display:grid;place-items:center;max-height:65vh;overflow:auto;border-radius:10px;background:#e2e8f0;touch-action:pan-x pan-y}.spatial-pin-stage img{display:block;max-width:100%;height:auto}.spatial-pin-marker{position:absolute;width:22px;height:22px;transform:translate(-50%,-100%);border:4px solid #fff;border-radius:50% 50% 50% 0;background:#dc2626;box-shadow:0 2px 8px rgba(0,0,0,.4);rotate:-45deg;pointer-events:none}.spatial-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.spatial-dialog .dialog-close{min-height:40px;border:0;background:transparent;color:#2563ff;font-weight:800}.spatial-dialog .inline-actions{display:flex;gap:8px}.spatial-dialog .inline-actions>*{flex:1}
/* Direct project reports use the same touch targets as inspection actions. */
.field-project-card{margin-bottom:14px;border:1px solid #e4e7ec;border-radius:18px;background:#fff;overflow:hidden}
.field-project-card .project-card{border:0;margin:0;border-radius:0}
.field-project-reports{display:block;width:100%;min-height:48px;border-top:1px solid #e4e7ec!important;text-align:left;padding:12px 18px!important;color:#2563eb}
.field-report-card{padding:16px;border:1px solid #e4e7ec;border-radius:18px;background:#fff;display:grid;gap:9px}
.field-report-card small{color:#667085;line-height:1.5}.field-report-card>div{display:flex;gap:8px}.field-report-card .field-report-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.field-report-card .secondary-action{display:flex;align-items:center;justify-content:center;flex:1;text-decoration:none;min-height:48px;margin:0;padding:10px}.field-report-card .field-report-rename{display:grid;gap:8px;padding-top:4px;border-top:1px solid #eef2f6}.field-report-rename label{display:grid;gap:5px;font-size:12px;font-weight:800;color:#475467}.field-report-rename input,.report-result-title input{box-sizing:border-box;width:100%;min-height:48px;border:1px solid #d0d5dd;border-radius:12px;padding:10px 12px;font:inherit;font-size:16px;color:#101828;background:#fff}.field-report-rename.hidden{display:none}.report-result-title{display:grid;gap:5px;margin:14px 0 8px;font-size:12px;font-weight:800;color:#475467}.report-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}

.project-ai-source{display:block;max-width:100%;min-height:44px;margin:6px 0;padding:9px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#f1f5ff;color:#1e40af;text-align:left;white-space:normal;overflow-wrap:anywhere;font:inherit;font-size:13px;cursor:pointer}.project-ai-question textarea{box-sizing:border-box}.project-document-group{padding:12px 0;border-bottom:1px solid #e2e8f0}.project-document-group small{display:block;color:#64748b}

.resume-actions{display:grid;gap:10px;margin:20px 0 24px}.resume-actions .secondary-action{border:1px solid #dbe2ec;background:#fff;padding:12px 18px;min-height:50px}.resume-actions #startAnotherInspectionBtn{background:#2563ff;color:#fff;border-color:#2563ff}

/* Keep evidence and its selected drawing area visible in quick editing. */
.edit-evidence { display:grid; gap:12px; }
.edit-photo-previews { display:flex; flex-wrap:wrap; gap:8px; }
.edit-pin-preview { display:block; position:relative; width:100%; padding:0; overflow:hidden; border:1px solid #d0d5dd; border-radius:12px; background:#f5f7fb; color:#2563eb; min-height:52px; }
.edit-pin-preview img { display:block; width:100%; height:auto; }
.edit-pin-dot { position:absolute; transform:translate(-50%,-50%); width:22px; height:22px; border:3px solid white; border-radius:50%; color:white; text-align:center; line-height:22px; box-shadow:0 1px 5px #0008; }
#editPinDrawing { flex-shrink:0; min-height:44px; width:100%; max-width:100%; font:inherit; font-size:16px; background:white; color:#101828; border:1px solid #d0d5dd; border-radius:10px; padding:8px; }
#editPinDrawing[hidden] { display:none; }

/* Consistent keyboard focus and calm interaction across the field screens. */
a:focus-visible,button:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
button:disabled{cursor:not-allowed}
.project-card strong{line-height:1.4;overflow-wrap:anywhere}
.project-card small{line-height:1.5}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.primary-action,.secondary-action,.project-card{transition:none}.primary-action:active{transform:none}}

/* Mid-walk location finder: a temporary selection over the same register. */
.ico-walk-finder{box-sizing:border-box;width:min(96vw,560px);max-height:90dvh;overflow:auto;border:0;border-radius:20px;padding:18px;background:#f8fafc;color:#101828;font:inherit}
.ico-walk-finder::backdrop{background:#10182888}.ico-walk-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.ico-walk-heading h2{margin:0}.ico-walk-heading button{min-width:44px;min-height:44px;border:0;border-radius:12px;background:#fff;font-size:26px}.ico-walk-finder p{color:#475467}.ico-walk-finder input{box-sizing:border-box;width:100%;min-height:48px;padding:10px;border:1px solid #cbd5e1;border-radius:12px;font:inherit}.ico-walk-finder .ico-actions{margin:12px 0}.ico-walk-finder .ico-area[aria-pressed=true]{background:#e8efff;border-color:#2563eb;color:#174ac2}.ico-walk-finder #icoWalkReview{position:sticky;bottom:0;width:100%;margin-top:12px;min-height:48px}.ico-walk-finder #icoWalkReview:disabled{background:#e2e8f0;color:#475467}.ico-walk-finder .ico-result{width:100%}.ico-walk-finder h3{font-size:15px}.ico-head [data-resume-walk]{width:auto;min-width:72px;font-size:12px;padding:6px}.ico-room-tools #icoDeckFinder{background:#2563eb;color:white}

.ico-pin-reminder{display:grid;gap:5px;border:1px solid #f2cc83;background:#fff8e8;border-radius:12px;padding:10px 12px;margin:0 0 12px;font-size:13px}.ico-pin-reminder span{color:#6b5c3a}.ico-pin-reminder button{justify-self:start;border:0;background:none;padding:5px 0;color:#174ac2;font:inherit;font-weight:800;text-decoration:underline}.ico-walk-finder [data-pin-row] small{display:block;margin-top:4px}

/* Drawing pin modal must remain operable on the narrowest supported phone. */
#spatialPinDialog .dialog-heading{display:flex;align-items:flex-start;gap:10px}
#spatialPinDialog .dialog-heading>strong{min-width:0;flex:1;overflow-wrap:anywhere}
#spatialPinDialog .pin-dialog-close{flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;display:grid!important;place-items:center;font-size:28px;line-height:1;white-space:nowrap;overflow:hidden}
@media(max-width:600px){#spatialPinDialog{box-sizing:border-box;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto}}

/* 2026-09-21 Inspect navigation cleanup */
.field-picker-header{justify-content:space-between}.field-identity-btn{margin-left:auto;display:flex;align-items:center;gap:7px;min-height:42px;border:0;border-radius:999px;background:#f4f6f8;color:var(--ink);padding:4px 10px 4px 5px;font-weight:800}.field-identity-btn>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e9efff;color:var(--blue);font-size:12px;font-weight:900}.field-identity-btn>strong{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.field-identity-btn.compact>strong{max-width:58px}
.field-account-menu{position:fixed;z-index:100;top:max(72px,calc(env(safe-area-inset-top) + 62px));right:10px;width:min(320px,calc(100vw - 20px));display:grid;gap:4px;border:1px solid var(--line);border-radius:18px;background:#fff;padding:8px;box-shadow:0 20px 60px rgba(17,24,39,.18)}.field-account-menu[hidden]{display:none}.field-account-identity{display:grid;gap:2px;padding:11px 12px 13px;border-bottom:1px solid var(--line);margin-bottom:4px}.field-account-identity small{color:var(--muted);overflow-wrap:anywhere}.field-account-menu>a,.field-account-menu>button{display:grid;gap:2px;min-height:46px;border:0;border-radius:11px;background:transparent;color:var(--ink);padding:10px 12px;text-align:left;text-decoration:none;font:700 14px/1.3 inherit}.field-account-menu>a:hover,.field-account-menu>button:hover{background:var(--soft)}.field-account-menu>a small{color:var(--muted);font-size:11px;font-weight:500}
.field-project-card{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 4px 16px rgba(17,24,39,.04)}.field-project-card .project-card{border:0;border-radius:0;box-shadow:none}.field-project-state{display:block;padding:0 18px 14px;color:var(--muted);font-size:12px}
@media(max-width:600px){.page-pad{padding-top:24px}.project-cards{margin-top:18px}.field-identity-btn{padding-right:8px}.field-identity-btn>strong{max-width:60px}}
