/* Field app for chimney & dryer vent work: high contrast for daylight, big touch targets,
   charcoal + brick palette. Light and dark follow the phone's setting. */
:root {
  --bg: #eef0f2; --surface: #ffffff; --sunk: #f4f6f7; --ink: #182028; --muted: #5a6670; --line: #d6dce0;
  --accent: #a33b22; --accent-ink: #ffffff; --accent-soft: #f7e7e2; --char: #1b232b;
  --ok: #23774a; --ok-soft: #e1f2e8; --warn: #95600c; --warn-soft: #fbefd9; --bad: #b42318; --bad-soft: #fde7e4;
  --info: #285e9c; --info-soft: #e3edf9;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 12px;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418; --surface: #182027; --sunk: #131a20; --ink: #e6ebee; --muted: #93a1ab; --line: #29343c;
    --accent: #e27a57; --accent-ink: #1b0d07; --accent-soft: #3a2219; --char: #0b0f12;
    --ok: #5cc68b; --ok-soft: #15301f; --warn: #e5ae55; --warn-soft: #33270f; --bad: #f37a6d; --bad-soft: #3b1714;
    --info: #80b2ee; --info-soft: #172a40;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- chrome ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--char); color: #fff; padding: calc(var(--top) + 8px) var(--gr) 8px var(--gl); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: .03em; }
.logo-mark { width: 56px; height: 56px; border-radius: 13px; background: url("../icons/icon-192.png") center / cover no-repeat; flex: none; }
.logo-mark.sm { width: 28px; height: 28px; border-radius: 7px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-decoration: none;
  background: rgba(255,255,255,.1); color: #fff; white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #5cc68b; }
.pill.busy i { background: #e5ae55; animation: pulse 1s infinite alternate; }
.pill.off i { background: #93a1ab; }
.pill.bad i { background: #f37a6d; }
@keyframes pulse { to { opacity: .35; } }
.main { padding: 12px var(--gr) calc(88px + var(--bot)) var(--gl); }
.wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 4px var(--gr) calc(4px + var(--bot)) var(--gl); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); }
body:not([data-mode="app"]) .topbar, body:not([data-mode="app"]) .tabs { display: none; }
body:not([data-mode="app"]) .main { padding-top: calc(var(--top) + 12px); }

/* ---------- type ---------- */
h1 { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.05; margin: 2px 0 0; text-wrap: balance; letter-spacing: .005em; }
h2 { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0; }
h2 .muted { letter-spacing: 0; }
.h { font-family: var(--display); font-size: 24px; margin: 0; }
.pagehead { display: flex; flex-direction: column; gap: 2px; }
.pagehead .sub { color: var(--muted); font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; margin-left: -4px; }
.back svg { width: 18px; height: 18px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 700; } .center { text-align: center; } .pad { padding: 16px; }
.lead { margin: 0; font-size: 15.5px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .05em; }
.tbad { color: var(--bad); font-weight: 600; }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-top: 1px solid var(--line); background: none; width: 100%;
  text-align: left; color: inherit; text-decoration: none; min-height: 56px; cursor: pointer; }
.row:first-child { border-top: 0; }
a.row:active, button.row:active { background: var(--sunk); }
@media (hover: hover) { a.row:hover, button.row:hover { background: var(--sunk); } }
div.row { cursor: default; }
.grow { flex: 1; min-width: 0; }
.t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t2 { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wraptext { white-space: normal; overflow: visible; }
.rowend { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty.small { padding: 16px; font-size: 14px; }
.banner { padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 14px; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.okb { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: none; border-color: transparent; }
.btn.light { color: #fff; }
.btn.sm { min-height: 36px; padding: 5px 11px; font-size: 13.5px; }
.btn.big { min-height: 52px; font-size: 16px; width: 100%; }
.btn:disabled { opacity: .55; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.spread { justify-content: space-between; align-items: center; }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 6px 0; cursor: pointer; text-align: left; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--muted); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.light { color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.input { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; }
textarea.input { resize: vertical; line-height: 1.4; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input.color { padding: 4px; height: 46px; }
.input:disabled { background: var(--sunk); color: var(--muted); }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 10px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.checkline { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.checkline input { width: 22px; height: 22px; accent-color: var(--accent); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: var(--sunk); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 8px 14px; min-height: 38px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.small button { padding: 5px 11px; min-height: 32px; font-size: 13px; }
.seg.dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.seg.dark button { color: #c9d1d6; }
.seg.dark button[aria-pressed="true"] { background: #fff; color: #111; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1 1 220px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fab { position: fixed; right: calc(var(--gr) + 2px); bottom: calc(78px + var(--bot)); z-index: 25; display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px 0 16px; border-radius: 28px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; }
.fab svg { width: 24px; height: 24px; }

/* ---------- project ---------- */
.actionbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 70px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; }
.act svg { width: 26px; height: 26px; }
.act.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.phaseline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.thumb { position: relative; display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--sunk); cursor: pointer; width: 100%; max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.thumb img.loaded { opacity: 1; }
.thumb.ghost { border: 1px dashed var(--line); background: none; cursor: default; }
.badge { position: absolute; left: 5px; top: 5px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; }
.badge.after { background: var(--ok); color: #fff; }
.badge.mk, .badge.up { left: auto; right: 5px; padding: 3px; display: inline-flex; }
.badge.up { top: auto; bottom: 5px; }
.badge svg { width: 13px; height: 13px; }
.cmp { display: flex; flex-direction: column; gap: 6px; }
.cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cmp-row.head span { font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gpsline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); min-height: 24px; }
.gpsline svg { width: 16px; height: 16px; color: var(--ok); }
.matchbox { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--info-soft); }
.matchrow { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.matchrow span { font-size: 13px; color: var(--muted); }
.matchrow.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tl { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl:first-of-type { border-top: 0; }
.tl-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tl-head a { color: var(--ink); text-decoration: none; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0; padding: 14px; }
.kv dt { color: var(--muted); font-size: 13.5px; } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- inspection ---------- */
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--ok); }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.levelbtn { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 13px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.levelbtn b { font-family: var(--display); font-size: 19px; }
.levelbtn span { font-size: 12.5px; color: var(--muted); }
.levelbtn[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.checksec { display: flex; flex-direction: column; gap: 6px; }
.checktitle { font-weight: 700; font-size: 14px; }
.citem { border-top: 1px solid var(--line); }
.citem:first-child { border-top: 0; }
.citem.attn { background: var(--bad-soft); }
.cmain { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 4px; flex-wrap: wrap; }
.clabel { flex: 1 1 180px; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; text-align: left; background: none; border: 0; padding: 8px; font-weight: 600; cursor: pointer; min-height: 44px; }
.pc { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; background: var(--sunk); border-radius: 6px; padding: 1px 6px; }
.pc svg { width: 13px; height: 13px; }
.stbtns { display: flex; gap: 4px; flex-wrap: wrap; }
.st { min-height: 40px; min-width: 52px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.st[aria-pressed="true"] { color: #fff; background: var(--muted); border-color: var(--muted); }
.st.ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.st.bad[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); }
.st.warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); }
@media (prefers-color-scheme: dark) { .st[aria-pressed="true"] { color: #10161a; } }
.cdetail { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.strip .thumb { width: 84px; flex: none; }
.addph { flex: none; width: 84px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1.5px dashed var(--muted); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.addph svg { width: 24px; height: 24px; }
.finding { align-items: flex-start; }
.finding .grow { display: flex; flex-direction: column; gap: 4px; }
.sigrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sigimg { max-height: 60px; max-width: 220px; background: #fff; border-radius: 6px; }
.sigpad { width: 100%; aspect-ratio: 3; background: #fff; border: 1.5px dashed var(--muted); border-radius: 10px; touch-action: none; }
.reportbar { display: flex; flex-direction: column; gap: 8px; }
.liblist { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto; }
.libitem { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.libitem b { font-weight: 600; } .libitem span:last-child { font-size: 13px; color: var(--muted); }

/* ---------- settings ---------- */
.logorow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logoimg { max-height: 64px; max-width: 180px; background: #fff; border-radius: 8px; padding: 4px; }
.logoph { width: 120px; height: 64px; border: 1.5px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.codebox { font-size: 30px; font-weight: 700; letter-spacing: .18em; color: var(--accent); }

/* ---------- sign in ---------- */
.auth { max-width: 440px; width: 100%; margin: 4vh auto 0; display: flex; flex-direction: column; gap: 18px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.brandname { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: .02em; }

/* ---------- sheets & toasts ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8,12,15,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 620px; max-height: calc(100% - var(--top) - 24px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px 18px 0 0; }
.sheet.wide { max-width: 760px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px var(--gl); }
.sheet-head h3 { margin: 0; font-family: var(--display); font-size: 24px; }
.sheet-body { overflow: auto; padding: 6px var(--gr) 16px var(--gl); display: flex; flex-direction: column; gap: 12px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px var(--gr) calc(12px + var(--bot)) var(--gl); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; max-width: 220px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 18px; } .sheet-foot { padding-bottom: 14px; } }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: up .2s ease-out; } @keyframes up { from { transform: translateY(30px); opacity: .5; } } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--bot)); z-index: 90; max-width: min(92vw, 520px);
  background: var(--char); color: #fff; padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; box-shadow: 0 6px 20px rgba(0,0,0,.3); text-align: center; }

/* ---------- photo viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 70; background: #050708; color: #fff; display: flex; flex-direction: column; }
.v-top { display: flex; align-items: center; gap: 8px; padding: calc(var(--top) + 6px) var(--gr) 6px var(--gl); }
.v-count { font-weight: 600; color: #c9d1d6; }
.chipbtn { border: 1px solid rgba(255,255,255,.3); background: none; color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.v-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.v-nav svg { width: 24px; height: 24px; } .v-nav.l { left: 10px; } .v-nav.r { right: 10px; }
.v-stamp { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 12px; color: #e7ecef; text-shadow: 0 1px 3px #000; }
.v-panel { background: #12181d; padding: 12px var(--gr) calc(12px + var(--bot)) var(--gl); display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow: auto; }
.v-panel .input { background: #1c242b; border-color: #2b363e; color: #fff; }
.v-panel .seg { background: #1c242b; border-color: #2b363e; }
.v-panel .seg button { color: #aab6be; }
.v-panel .seg button[aria-pressed="true"] { background: #fff; color: #111; }
.v-panel .btn { background: #1c242b; border-color: #2b363e; color: #fff; }
.v-panel .btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.v-panel .btn.danger { color: #f37a6d; }
.v-item { font-weight: 700; color: #ffd8c9; }
.tagrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tag { flex: none; border: 1px solid #2b363e; background: #1c242b; color: #c9d1d6; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tag.on { background: #fff; color: #111; border-color: #fff; }

/* ---------- markup ---------- */
.markup { position: fixed; inset: 0; z-index: 80; background: #050708; color: #fff; display: flex; flex-direction: column; }
.m-top { display: flex; align-items: center; gap: 4px; padding: calc(var(--top) + 6px) var(--gr) 6px var(--gl); }
.m-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px; }
.m-stage canvas { max-width: 100%; max-height: 100%; touch-action: none; }
.m-text { position: absolute; width: 220px; min-height: 42px; padding: 8px 10px; border-radius: 8px; border: 2px solid var(--accent); background: #fff; color: #111; font-size: 16px; }
.m-tools { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 10px var(--gr) calc(12px + var(--bot)) var(--gl); background: #12181d; }
.swatches { display: flex; gap: 10px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.sw[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #050708 inset; }
.m-stampt { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #c9d1d6; }
.m-stampt input { width: 20px; height: 20px; accent-color: var(--accent); }

@media (max-width: 460px) {
  h1 { font-size: 27px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; } .grid3 .f:first-child { grid-column: 1 / -1; }
  .act span { font-size: 12px; }
  .kv { grid-template-columns: 76px 1fr; }
}

/* ---------- photo-section inspection ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chiptog { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; }
.chiptog[aria-pressed="true"], .chiptog.picked { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.coverrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.covimg { width: 120px; }
.psec { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.psec-head { display: flex; align-items: center; gap: 6px; }
.titlein { font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .03em; border-color: transparent; background: var(--sunk); }
.psec-tools { display: flex; flex: none; }
.psec-tools .iconbtn { width: 38px; height: 38px; font-size: 13px; }
.addph.sq { width: 100%; height: auto; aspect-ratio: 1; }
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.qrow span { flex: 1 1 200px; }
.yn button[data-yn="deficiencies"][data-v="yes"][aria-pressed="true"], .yn button[data-yn="meets_standards"][data-v="no"][aria-pressed="true"] { background: var(--bad); color: #fff; }
.yn button[data-yn="deficiencies"][data-v="no"][aria-pressed="true"], .yn button[data-yn="meets_standards"][data-v="yes"][aria-pressed="true"] { background: var(--ok); color: #fff; }
h2.mt { margin-top: 10px; }
.prop { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.prop-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prop-head + .tl { border-top: 0; }
.kindrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 2px; }
