/* ============================================================================
   SITE SURVEY — FIELD CAPTURE
   The agent-facing half of the site survey: the location-tagging readiness
   strip, the guided-capture launcher, the full-screen capture flow, and the
   media rows in the form itself.

   Written phone-first (375px is the design width; 320px must not break) and
   token-only, so dark mode and the portal's navy/gold identity come for free.
   House rules honoured from docs/DESIGN.md: radius <= 8px, no gradients, no
   glass, no emoji as UI, one accent (gold) reserved for the single primary
   action on screen, status carried by border + text + icon, never colour alone.
   ============================================================================ */

/* ---------- shared primitives ---------- */
:root {
  --sv-radius: 8px;
  --sv-radius-sm: 6px;
  --sv-tap: 44px;                      /* WCAG 2.5.5 target floor on coarse pointers */
  --sv-safe-b: env(safe-area-inset-bottom, 0px);
}

.sv-icon { width: 16px; height: 16px; flex: none; display: block; }
.sv-icon-lg { width: 20px; height: 20px; }

/* ============================================================================
   1. LOCATION-TAGGING READINESS
   A status row, not a marketing banner. It answers one question — "is my phone
   set up to tag these shots?" — and offers exactly the action that fixes it.
   ============================================================================ */
.sv-geo {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--hairline); border-left-width: 1px;
  border-radius: var(--sv-radius); background: var(--surface);
  padding: 12px 14px; margin: 0 0 14px;
}
.sv-geo-head { display: flex; align-items: flex-start; gap: 10px; }
.sv-geo-ico {
  width: 28px; height: 28px; flex: none; border-radius: var(--sv-radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-muted);
}
.sv-geo-txt { flex: 1; min-width: 0; }
.sv-geo-title {
  display: block; font: 600 14px/1.35 'Inter', system-ui, sans-serif;
  color: var(--text-strong); letter-spacing: 0;
}
.sv-geo-sub {
  display: block; margin-top: 3px;
  font: 400 13px/1.45 'Inter', system-ui, sans-serif; color: var(--text-body);
  text-transform: none; letter-spacing: 0;
}
.sv-geo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-geo-actions > .sv-btn { flex: 1 1 auto; }

/* state skins — the icon well carries the colour, the card stays calm */
.sv-geo.is-on    { border-color: color-mix(in oklab, var(--green) 34%, var(--hairline)); }
.sv-geo.is-on    .sv-geo-ico { background: var(--green-bg); color: var(--green-ink); }
.sv-geo.is-warn  { border-color: color-mix(in oklab, var(--amber) 38%, var(--hairline)); }
.sv-geo.is-warn  .sv-geo-ico { background: var(--amber-bg); color: var(--amber-ink); }
.sv-geo.is-error { border-color: color-mix(in oklab, var(--red) 34%, var(--hairline)); }
.sv-geo.is-error .sv-geo-ico { background: var(--red-bg); color: var(--red-ink); }
.sv-geo-hint {
  margin: 0; font: 400 12.5px/1.45 'Inter', system-ui, sans-serif;
  color: var(--text-muted); text-transform: none; letter-spacing: 0;
}

/* ---------- buttons (one vocabulary across every capture surface) ---------- */
.sv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--sv-tap); padding: 11px 16px; margin: 0;
  font: 600 14.5px/1 'Inter', system-ui, sans-serif; letter-spacing: 0.01em;
  text-transform: none; text-align: center;
  border-radius: var(--sv-radius); border: 1px solid var(--border-btn);
  background: var(--surface); color: var(--text-strong);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.sv-btn:hover { background: var(--hover); }
.sv-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sv-btn:active { background: var(--surface-2); }
.sv-btn[disabled], .sv-btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.sv-btn-primary {
  background: var(--gold); border-color: var(--gold-dark); color: #1d1d1f;
}
.sv-btn-primary:hover { background: var(--gold-soft); }
.sv-btn-primary:active { background: var(--gold-dark); }
.sv-btn-lg { min-height: 52px; font-size: 16px; padding: 14px 18px; }
.sv-btn-block { display: flex; width: 100%; }
.sv-btn-quiet {
  border-color: transparent; background: none; color: var(--text-body);
  font-weight: 500; min-height: 40px; padding: 8px 10px;
}
.sv-btn-quiet:hover { background: var(--surface-2); color: var(--text-strong); }
.sv-spin {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid color-mix(in oklab, currentColor 28%, transparent);
  border-top-color: currentColor; animation: sv-spin .7s linear infinite;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   2. GUIDED-CAPTURE LAUNCHER
   The one hero action in the media section. Navy field, gold arrow: the
   portal's own hero-action pattern, not a gradient card.
   ============================================================================ */
.sv-launch {
  display: flex; align-items: center; gap: 14px; width: 100%;
  text-align: left; margin: 0 0 16px; padding: 15px 16px;
  border: 1px solid var(--sidebar-deep); border-radius: var(--sv-radius);
  background: var(--sidebar-bg); color: var(--sidebar-text-strong);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .14s ease, transform .16s ease;
}
.sv-launch:hover { background: var(--sidebar-hover); transform: translateY(-1px); }
.sv-launch:active { transform: none; }
.sv-launch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sv-launch-ico {
  width: 40px; height: 40px; flex: none; border-radius: var(--sv-radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .07); color: var(--gold-soft);
}
.sv-launch-txt { flex: 1; min-width: 0; }
.sv-launch-title {
  display: block; font: 600 15.5px/1.25 'Inter', system-ui, sans-serif;
  color: var(--sidebar-text-strong); letter-spacing: 0; text-transform: none;
}
.sv-launch-sub {
  display: block; margin-top: 3px;
  font: 400 12.5px/1.4 'Inter', system-ui, sans-serif; color: var(--sidebar-text);
  letter-spacing: 0; text-transform: none;
}
.sv-launch-go { color: var(--gold-soft); flex: none; }

/* ============================================================================
   3. GUIDED CAPTURE — full-screen flow
   Three screens share one shell: board (pick anything), step (shoot one), and
   review. Header and footer are fixed; only the middle scrolls, so the primary
   action never leaves the thumb zone on a phone.
   ============================================================================ */
.gc {
  position: fixed; inset: 0; z-index: 4000;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--canvas); color: var(--text-strong);
  font-family: 'Inter', system-ui, sans-serif;
  overscroll-behavior: contain;
}
.gc-head {
  flex: none; padding: 12px 14px 0;
  background: var(--surface); border-bottom: 1px solid var(--hairline);
}
.gc-head-row { display: flex; align-items: center; gap: 10px; min-height: var(--sv-tap); }
.gc-title {
  flex: 1; min-width: 0; margin: 0;
  font: 600 18px/1.2 var(--font-serif, Georgia, serif); color: var(--text-head);
}
.gc-step-of { flex: 1; min-width: 0; font: 500 13px/1.2 'Inter', system-ui, sans-serif; color: var(--text-muted); }
.gc-iconbtn {
  width: var(--sv-tap); height: var(--sv-tap); flex: none; margin-right: -8px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--sv-radius-sm); background: none;
  color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.gc-iconbtn:hover { background: var(--surface-2); color: var(--text-strong); }
.gc-iconbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* progress — count first (the value), label second */
.gc-prog { display: flex; align-items: baseline; gap: 7px; padding: 2px 0 10px; }
.gc-prog-n { font: 600 13.5px/1 'Inter', system-ui, sans-serif; color: var(--text-strong); }
.gc-prog-label { font: 400 13px/1 'Inter', system-ui, sans-serif; color: var(--text-muted); }
.gc-bar {
  height: 3px; border-radius: 2px; background: var(--rule);
  margin: 0 0 12px; overflow: hidden;
}
.gc-bar > i {
  display: block; height: 100%; border-radius: 2px; background: var(--gold);
  transition: width .28s cubic-bezier(.22, 1, .36, 1);
}

.gc-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 14px 18px; }
.gc-foot {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 14px calc(10px + var(--sv-safe-b));
  background: var(--surface); border-top: 1px solid var(--hairline);
}
.gc-foot-row { display: flex; gap: 8px; }
.gc-foot-row > .sv-btn { flex: 1 1 0; min-width: 0; }

/* ---------- inline notice inside the flow ---------- */
.gc-note {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 12px; padding: 9px 11px;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius-sm);
  background: var(--surface);
  font: 400 12.5px/1.4 'Inter', system-ui, sans-serif; color: var(--text-body);
}
.gc-note.is-warn { border-color: color-mix(in oklab, var(--amber) 38%, var(--hairline)); background: var(--amber-bg); color: var(--text-strong); }
.gc-note.is-error { border-color: color-mix(in oklab, var(--red) 34%, var(--hairline)); background: var(--red-bg); color: var(--text-strong); }
.gc-note.is-ok { border-color: color-mix(in oklab, var(--green) 34%, var(--hairline)); background: var(--green-bg); color: var(--text-strong); }
.gc-note .sv-btn-quiet { margin-left: auto; flex: none; min-height: 32px; padding: 6px 10px; font-size: 12.5px; text-decoration: underline; }

/* ---------- board: grouped rows, thumbnail as the proof ---------- */
.gc-group {
  display: flex; align-items: baseline; gap: 8px;
  margin: 18px 2px 8px; padding: 0;
}
.gc-group:first-child { margin-top: 8px; }
.gc-group-name {
  font: 600 13px/1.3 'Inter', system-ui, sans-serif; color: var(--text-strong);
  letter-spacing: 0; text-transform: none;
}
.gc-group-count { font: 400 12.5px/1.3 'Inter', system-ui, sans-serif; color: var(--text-faint); }
.gc-list { display: flex; flex-direction: column; gap: 6px; }

.gc-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 9px 12px 9px 10px; text-align: left;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius);
  background: var(--surface); color: var(--text-strong);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .14s ease, background .14s ease;
}
.gc-row:hover { background: var(--hover); }
.gc-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gc-row.is-next { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.gc-row.is-done .gc-row-name { color: var(--text-body); }

/* thumb well: a real thumbnail once shot, an outlined placeholder before */
.gc-thumb {
  width: 46px; height: 46px; flex: none; border-radius: var(--sv-radius-sm);
  overflow: hidden; position: relative;
  background: var(--surface-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.gc-thumb > .sv-icon-lg { position: absolute; }        /* placeholder, painted over by the shot */
.gc-thumb img, .gc-thumb video {
  position: relative; width: 100%; height: 100%; object-fit: cover; display: block;
  background: var(--surface-2);
}
.gc-thumb img[data-thumb-sid] { background: none; }     /* URL still resolving — let the glyph show */
.gc-thumb.is-empty { border-style: dashed; }
.gc-thumb-n {
  position: absolute; right: 0; bottom: 0;
  min-width: 17px; height: 15px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  font: 600 10.5px/1 'Inter', system-ui, sans-serif;
  background: var(--sidebar-deep); color: #fff;
  border-top-left-radius: 5px;
}
.gc-row-txt { flex: 1; min-width: 0; }
.gc-row-name {
  display: block; font: 500 14px/1.3 'Inter', system-ui, sans-serif;
  color: var(--text-strong); letter-spacing: 0; text-transform: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gc-row-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  font: 400 12.5px/1.35 'Inter', system-ui, sans-serif; color: var(--text-muted);
}
.gc-row-meta .sv-icon { width: 13px; height: 13px; }
.gc-req { color: var(--red-ink); font-weight: 600; }
.gc-row-go { flex: none; color: var(--text-faint); }
.gc-state-ok { color: var(--green-ink); display: inline-flex; align-items: center; gap: 4px; }
.gc-state-warn { color: var(--amber-ink); display: inline-flex; align-items: center; gap: 4px; }
.gc-state-bad { color: var(--red-ink); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- step: one item, big shutter in the thumb zone ---------- */
.gc-step-group {
  font: 500 12.5px/1.3 'Inter', system-ui, sans-serif; color: var(--text-muted);
  text-transform: none; letter-spacing: 0;
}
.gc-step-name {
  margin: 5px 0 0; font: 600 21px/1.25 var(--font-serif, Georgia, serif);
  color: var(--text-head); text-wrap: balance;
}
.gc-step-req { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
  font: 500 12.5px/1 'Inter', system-ui, sans-serif; color: var(--text-muted); }
.gc-step-req.is-required { color: var(--red-ink); }
.gc-step-aim {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0; padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius-sm);
  background: var(--surface);
  font: 400 12.5px/1.45 'Inter', system-ui, sans-serif; color: var(--text-body);
}
.gc-step-aim b { color: var(--text-strong); font-weight: 600; }
.gc-shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.gc-shot {
  position: relative; width: 78px; height: 78px; border-radius: var(--sv-radius-sm);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; color: var(--text-faint);
}
.gc-shot > .sv-icon-lg { position: absolute; }
.gc-shot img, .gc-shot video {
  position: relative; width: 100%; height: 100%; object-fit: cover; display: block;
  background: var(--surface-2);
}
.gc-shot img[data-thumb-sid] { background: none; }
.gc-shot-badge {
  position: absolute; left: 0; bottom: 0; width: 100%;
  display: flex; align-items: center; gap: 3px; padding: 3px 5px;
  font: 600 10px/1.2 'Inter', system-ui, sans-serif; color: #fff;
  background: rgba(20, 24, 31, .74);
}
.gc-shot-badge .sv-icon { width: 11px; height: 11px; }
.gc-shot-badge.is-ok   { color: #86efac; }
.gc-shot-badge.is-warn { color: #fcd67e; }
.gc-shot-badge.is-bad  { color: #fca5a5; }
.gc-shot-rm {
  position: absolute; top: 3px; right: 3px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(20, 24, 31, .74); color: #fff;
  cursor: pointer; padding: 0;
}
.gc-shot-rm:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.gc-empty {
  margin: 16px 0 0; padding: 22px 16px; text-align: center;
  border: 1px dashed var(--border-btn); border-radius: var(--sv-radius);
  background: var(--surface);
}
.gc-empty-t { font: 500 13.5px/1.4 'Inter', system-ui, sans-serif; color: var(--text-body); }
.gc-empty-s { margin-top: 4px; font: 400 12.5px/1.45 'Inter', system-ui, sans-serif; color: var(--text-faint); }
.gc-prog-line { margin: 12px 0 0; font: 500 12.5px/1.4 'Inter', system-ui, sans-serif; color: var(--text-muted); }

/* ---------- review ---------- */
.gc-review { padding: 20px 4px 4px; }
.gc-review-ico {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: var(--green-bg); color: var(--green-ink);
}
.gc-review-ico.is-warn { background: var(--amber-bg); color: var(--amber-ink); }
.gc-review-h { margin: 0; font: 600 22px/1.2 var(--font-serif, Georgia, serif); color: var(--text-head); }
.gc-review-s { margin: 8px 0 0; font: 400 13.5px/1.5 'Inter', system-ui, sans-serif; color: var(--text-body); max-width: 62ch; }
.gc-check { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; }
.gc-check-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius); background: var(--surface);
}
.gc-check-row.is-bad { border-color: color-mix(in oklab, var(--red) 34%, var(--hairline)); }
.gc-check-ico { flex: none; margin-top: 1px; color: var(--green-ink); }
.gc-check-row.is-bad .gc-check-ico { color: var(--red-ink); }
.gc-check-t { display: block; font: 500 13.5px/1.35 'Inter', system-ui, sans-serif; color: var(--text-strong); }
.gc-check-s { display: block; margin-top: 3px; font: 400 12.5px/1.45 'Inter', system-ui, sans-serif; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .gc-bar > i { transition: none; }
  .sv-launch { transition: none; }
  .sv-launch:hover { transform: none; }
  .sv-spin { animation-duration: 1.6s; }
}

/* ============================================================================
   4. MEDIA ROWS IN THE CLASSIC FORM
   The same 24 items, listed. Each row states what to shoot, what is already
   captured, and offers one obvious control — the native file widget is hidden
   behind it, because "Choose Files / no files selected" is neither readable
   nor tappable at arm's length in a parking lot.
   ============================================================================ */
.sv-media-group {
  display: block; margin: 22px 0 10px;
  font: 600 13.5px/1.35 'Inter', system-ui, sans-serif; color: var(--text-strong);
  letter-spacing: 0; text-transform: none;
}
.sv-media-group:first-of-type { margin-top: 6px; }
.sv-media {
  border: 1px solid var(--hairline); border-radius: var(--sv-radius);
  background: var(--surface); padding: 13px 14px; margin: 0 0 10px;
}
.sv-media.is-filled { border-color: color-mix(in oklab, var(--green) 26%, var(--hairline)); }
.sv-media-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sv-media-name {
  flex: 1 1 190px; min-width: 0;
  font: 500 14px/1.4 'Inter', system-ui, sans-serif; color: var(--text-strong);
  text-transform: none; letter-spacing: 0; text-wrap: pretty;
}
.sv-req { color: var(--red-ink); font-weight: 700; }
.sv-media-state {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font: 500 12.5px/1.3 'Inter', system-ui, sans-serif; color: var(--text-faint);
  text-transform: none; letter-spacing: 0;
}
.sv-media-state.is-ok { color: var(--green-ink); }
.sv-media-state.is-req { color: var(--red-ink); }
.sv-media-shots { margin-top: 2px; }
.sv-media-add { width: 100%; margin-top: 11px; }
.sv-media-hint {
  margin: 8px 0 0; font: 400 12px/1.45 'Inter', system-ui, sans-serif;
  color: var(--text-faint); text-transform: none; letter-spacing: 0;
}
.sv-media .sales-file-progress { display: block; margin: 8px 0 0; }

/* ---------- file chips (form + guided review) ---------- */
.sv-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sv-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 6px; min-height: 52px;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius-sm);
  background: var(--surface-2);
}
.sv-chip-thumb {
  position: relative; width: 40px; height: 40px; flex: none;
  border-radius: 5px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--rule); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
}
.sv-chip-thumb > .sv-icon-lg { position: absolute; }
.sv-chip-thumb img, .sv-chip-thumb video {
  position: relative; width: 100%; height: 100%; object-fit: cover; display: block;
}
.sv-chip-thumb img[data-thumb-sid] { background: none; }
.sv-chip-body { flex: 1; min-width: 0; }
.sv-chip-name {
  display: block; font: 400 12.5px/1.35 'Inter', system-ui, sans-serif;
  color: var(--text-body); text-transform: none; letter-spacing: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sv-chip-meta { display: block; margin-top: 2px; }
.sv-chip-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font: 500 11.5px/1.2 'Inter', system-ui, sans-serif;
  text-transform: none; letter-spacing: 0;
}
.sv-chip-badge .sv-icon { width: 12px; height: 12px; }
.sv-chip-badge.is-ok { color: var(--green-ink); }
.sv-chip-badge.is-warn { color: var(--amber-ink); }
.sv-chip-badge.is-bad { color: var(--red-ink); }
.sv-chip-rm {
  width: var(--sv-tap); height: var(--sv-tap); flex: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--sv-radius-sm); background: none;
  color: var(--text-faint); cursor: pointer;
}
.sv-chip-rm:hover { background: var(--hover-red); color: var(--red-ink); }
.sv-chip-rm:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* ============================================================================
   5. SURVEY SHELL — header and docked actions
   The header carries identity and state only. Every action lives in the docked
   bar at the bottom: on a phone that is where the thumb already is, and it puts
   Submit at the END of the form rather than above the first field.
   ============================================================================ */
.sv-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0 14px; margin: 0;
}
.sv-topbar-back {
  width: var(--sv-tap); height: var(--sv-tap); flex: none; margin-left: -10px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--sv-radius-sm); background: none;
  color: var(--text-muted); cursor: pointer;
  transform: scaleX(-1);                      /* chevron points back */
}
.sv-topbar-back:hover { background: var(--surface-2); color: var(--text-strong); }
.sv-topbar-back:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.sv-topbar-txt { flex: 1; min-width: 0; }
.sv-topbar-title {
  margin: 0; font: 600 24px/1.15 var(--font-serif, Georgia, serif); color: var(--text-head);
}
.sv-topbar-sub {
  display: block; margin-top: 2px;
  font: 400 13px/1.35 'Inter', system-ui, sans-serif; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sv-status {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--surface-2);
  font: 500 12px/1.2 'Inter', system-ui, sans-serif; color: var(--text-muted);
}
.sv-status.is-ok {
  border-color: color-mix(in oklab, var(--green) 34%, var(--hairline));
  background: var(--green-bg); color: var(--green-ink);
}
.sv-locked {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin: 0 0 14px;
  border: 1px solid var(--hairline); border-radius: var(--sv-radius);
  background: var(--surface);
  font: 400 13px/1.5 'Inter', system-ui, sans-serif; color: var(--text-body);
}
.sv-locked > span { flex: 1 1 200px; min-width: 0; }
.sv-locked b { color: var(--text-strong); font-weight: 600; }
.sv-locked .sv-icon-lg { color: var(--text-muted); margin-top: 1px; }
.sv-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin: 18px 28px 28px; max-width: 760px;
}
.sv-actions-row { display: flex; gap: 8px; }
.sv-actions-row > .sv-btn { flex: 1 1 0; }

/* On a phone the primary action docks to the bottom of the viewport; the
   secondary pair scrolls with the form above it. */
@media (max-width: 640px) {
  .sv-actions {
    position: sticky; bottom: 0; z-index: 5;
    flex-direction: column-reverse; gap: 8px;
    margin: 18px -14px 0; max-width: none; padding: 10px 14px calc(10px + var(--sv-safe-b));
    background: var(--canvas);
    border-top: 1px solid var(--hairline);
  }
}

/* A sentence under a field label. The label stays a NAME in the house
   micro-label style; the explanation gets normal sentence case, because a
   tracked-uppercase sentence is unreadable at arm's length. */
.sv-field-hint {
  display: block; margin: -1px 0 3px;
  font: 400 12.5px/1.45 'Inter', system-ui, sans-serif; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; font-weight: 400;
}

/* ============================================================================
   6. CLIENT DETAIL — quick actions
   One primary action, the rest behind a disclosure. Desktop keeps it open (the
   row is free there); the phone breakpoint closes it, so the tabs and the
   client's actual record are reachable without scrolling past eight buttons.
   ============================================================================ */
.crm-more { border: 0; }
.crm-more-btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: var(--sv-tap); padding: 10px 14px;
  font: 500 13.5px/1 'Inter', system-ui, sans-serif; color: var(--text-body);
  border: 1px solid var(--border-btn); border-radius: var(--sv-radius);
  background: var(--surface); cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.crm-more-btn::-webkit-details-marker { display: none; }
.crm-more-btn::after {
  content: ""; width: 7px; height: 7px; flex: none; margin-left: 1px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .16s ease;
}
.crm-more[open] > .crm-more-btn::after { transform: translateY(1px) rotate(-135deg); }
.crm-more-btn:hover { background: var(--hover); color: var(--text-strong); }
.crm-more-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.crm-more-list { display: contents; }          /* desktop: buttons rejoin the flex row */
/* On a wide screen the row costs nothing, so the disclosure control is pure
   chrome — the group is rendered open and its toggle is hidden. */
@media (min-width: 641px) { .crm-more-btn { display: none; } }

@media (max-width: 640px) {
  .crm-more-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .crm-more-list > .btn-secondary { width: 100%; }
  .crm-more { flex: 1 0 100%; }
  .crm-more-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .crm-more-btn::after { transition: none; } }

/* ── guided capture, 9/9/26: the next shot named, the instruction, the blur
   check, the "can't get this shot" reasons. Tokens only, tap targets 44px. ── */
.gc-next { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 12px 13px; border: 1px solid var(--gold); border-radius: var(--sv-radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--gold); }
.gc-next-k { font: 700 10.5px/1 'Inter', system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.gc-next-name { font: 600 16px/1.25 'Inter', system-ui, sans-serif; color: var(--text-strong); }
.gc-next-aim { font: 400 13px/1.45 'Inter', system-ui, sans-serif; color: var(--text-body); margin-bottom: 4px; }
.gc-cant-sub { display: block; font: 400 11.5px/1.2 'Inter', system-ui, sans-serif; color: var(--text-faint); }
.gc-blur { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.gc-blur img { width: 100%; max-height: 52vh; max-height: 52dvh; object-fit: contain; border-radius: var(--sv-radius); background: var(--surface-2); border: 1px solid var(--hairline); }
.gc-ask { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.gc-ask-t { font: 600 15px/1.3 'Inter', system-ui, sans-serif; color: var(--text-strong); }
.gc-ask-s { font: 400 12.5px/1.45 'Inter', system-ui, sans-serif; color: var(--text-muted); margin-bottom: 4px; }
.gc-ask-opt { min-height: var(--sv-tap); text-align: left; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--sv-radius-sm); background: var(--surface); color: var(--text-strong); font: 500 14px/1.3 'Inter', system-ui, sans-serif; cursor: pointer; }
.gc-ask-opt.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: var(--gold-soft, var(--surface-2)); }
.gc-ask-other { min-height: var(--sv-tap); padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--sv-radius-sm); background: var(--surface); color: var(--text-strong); font: 400 16px/1.3 'Inter', system-ui, sans-serif; }
/* Manual upload: a small text link after the last group — reachable, not inviting. */
.gc-manual { text-align: center; padding: 18px 0 6px; }
.gc-manual-btn { border: 0; background: none; padding: 6px 8px; min-height: 32px; font: 400 12px/1.4 'Inter', system-ui, sans-serif; color: var(--text-faint); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gc-manual-btn:hover { color: var(--text-muted); }
