:root {
  --ink: #0f1b2d;
  --ink-2: #33445c;
  --muted: #6b7686;
  --paper: #f5f2ec;
  --card: #ffffff;
  --line: #e4ded3;
  --accent: #ff5a1f;
  --accent-ink: #ffffff;
  --accent-soft: #fff0e8;
  --ok: #1d8a5a;
  --ok-soft: #e6f5ee;
  --warn: #b7791f;
  --warn-soft: #fff6dc;
  --danger: #c2372b;
  --shadow: 0 1px 2px rgb(15 27 45 / .06), 0 8px 24px rgb(15 27 45 / .08);
  --radius: 18px;
  --solid: #0f1b2d;
  --solid-ink: #ffffff;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef2f7; --ink-2: #c3ccd8; --muted: #93a0b2; --paper: #0b121c; --card: #141e2c; --line: #243246;
    --accent-soft: #3a1d10; --ok-soft: #10301f; --warn-soft: #33290f; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .35); --solid: #2a3a55; --solid-ink: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eef2f7; --ink-2: #c3ccd8; --muted: #93a0b2; --paper: #0b121c; --card: #141e2c; --line: #243246;
  --accent-soft: #3a1d10; --ok-soft: #10301f; --warn-soft: #33290f; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .35); --solid: #2a3a55; --solid-ink: #ffffff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num, .amount, .total-val, td.n { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.01em; flex: 1; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 9px; top: 5px; width: 8px; height: 12px; border-radius: 4px; background: #fff; box-shadow: 0 6px 0 -3px #fff; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; display: grid; place-items: center; margin-left: -10px; }
.icon-btn:active { background: var(--line); }
.net { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.net.off { background: var(--warn-soft); color: var(--warn); }

.view { flex: 1; padding: 0 16px calc(env(safe-area-inset-bottom) + 110px); outline: none; }

/* ---------- record screen */
.hero { position: relative; margin: 4px 0 0; border-radius: 24px; overflow: hidden; min-height: 210px; color: #fff; box-shadow: var(--shadow);
  background: #1b2738 center/cover no-repeat; display: flex; align-items: flex-end; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 18 30 / .05) 20%, rgb(10 18 30 / .78) 100%); }
.hero-body { position: relative; padding: 20px; }
.hero h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.hero p { margin: 0; font-size: 15px; opacity: .92; text-wrap: pretty; }

.recorder { display: flex; flex-direction: column; align-items: center; padding: 26px 0 8px; }
.mic { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 30px rgb(255 90 31 / .38), inset 0 -6px 0 rgb(0 0 0 / .12); display: grid; place-items: center; transition: transform .15s ease, background .2s; touch-action: manipulation; }
.mic:active { transform: scale(.97); }
.mic svg { width: 64px; height: 64px; }
.mic .ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; pointer-events: none; }
.mic.rec { background: var(--danger); box-shadow: 0 10px 30px rgb(194 55 43 / .4), inset 0 -6px 0 rgb(0 0 0 / .12); }
.mic.rec .ring { animation: pulse 1.6s ease-out infinite; border-color: var(--danger); }
.mic.busy { background: var(--ink-2); box-shadow: none; }
@keyframes pulse { 0% { transform: scale(.92); opacity: .7; } 100% { transform: scale(1.18); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mic.rec .ring { animation: none; opacity: .5; } }
.rec-label { margin-top: 16px; font-weight: 700; font-size: 18px; }
.rec-sub { margin-top: 4px; color: var(--muted); font-size: 14px; min-height: 20px; text-align: center; }
.meter { display: flex; gap: 4px; align-items: center; height: 34px; margin-top: 10px; }
.meter i { width: 5px; border-radius: 3px; background: var(--danger); height: 4px; transition: height .08s linear; }

.steps { display: flex; gap: 6px; justify-content: center; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.steps li { padding: 5px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.steps li.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 650; }
.steps li.done { color: var(--ok); }

.tip { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tip b { color: var(--ink); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--card); padding: 10px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; min-height: 44px; }
.chip:active { background: var(--line); }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.typebox { margin-top: 14px; }
textarea.big { width: 100%; min-height: 150px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); resize: vertical; font-size: 16px; line-height: 1.45; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0;
  background: var(--solid); color: var(--solid-ink); font-weight: 700; font-size: 16px; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }

/* ---------- estimate editor */
.job-hero { position: relative; margin-top: 4px; height: 150px; border-radius: 20px; overflow: hidden; background: #1b2738 center/cover; box-shadow: var(--shadow); }
.job-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgb(10 18 30 / .72)); }
.job-hero .badge { position: absolute; z-index: 1; left: 14px; top: 14px; }
.job-hero input.title { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; background: transparent; border: 0; color: #fff; font-size: 21px; font-weight: 750; letter-spacing: -.01em; padding: 4px; border-radius: 8px; }
.job-hero input.title:focus { background: rgb(0 0 0 / .3); outline: none; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--card); color: var(--ink); }
.badge.draft { background: #fff; color: #0f1b2d; }
.badge.sent { background: #dbe8ff; color: #1d4fb8; }
.badge.accepted { background: var(--ok-soft); color: var(--ok); }
.badge.paid { background: var(--ok); color: #fff; }
.badge.declined { background: #f6dede; color: var(--danger); }

.section { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.section h2 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fields .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 3px 2px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; }
.field textarea { min-height: 70px; resize: vertical; }

.questions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.q { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }

.lines { display: flex; flex-direction: column; gap: 8px; }
.line { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--paper); }
.line.missing { border-color: var(--accent); background: var(--accent-soft); }
.line .top { display: flex; gap: 8px; align-items: flex-start; }
.kind { flex: none; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; margin-top: 9px; }
.kind.labor { background: #e3ecff; color: #234ea8; }
.kind.material { background: #efe7da; color: #7a5420; }
.kind.fee { background: #e9e6f5; color: #54428f; }
.line textarea.desc { flex: 1; border: 0; background: transparent; resize: none; font-size: 15px; font-weight: 600; line-height: 1.35; padding: 6px 2px; min-height: 34px; field-sizing: content; }
.line .del { flex: none; width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; font-size: 20px; }
.line .calc { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.line .calc input { width: 64px; min-height: 40px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.line .calc input.price { width: 92px; }
.line .calc .unit { width: 46px; }
.line .calc .amount { margin-left: auto; font-weight: 750; color: var(--ink); font-size: 16px; }
.line .src { font-size: 11px; color: var(--muted); margin-top: 4px; }
.line.missing .src { color: var(--accent); font-weight: 700; }
.add-line { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; }
.totals .k { color: var(--muted); }
.totals .v { text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 20px; font-weight: 800; color: var(--ink); padding-top: 6px; border-top: 1px dashed var(--line); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.dock-in { max-width: 528px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.dock .sum { flex: 1; min-width: 0; }
.dock .sum small { display: block; font-size: 12px; color: var(--muted); }
.dock .sum b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

details.transcript { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
details.transcript summary { cursor: pointer; font-weight: 650; min-height: 32px; }
details.transcript p { line-height: 1.5; margin: 6px 0 0; }

.engine { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--solid); color: var(--solid-ink); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; transition: .2s ease; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 600px) { .hero { min-height: 240px; } }

/* ---------- v2: navigation, lists, CRM */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; justify-content: center; gap: 4px; padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs a { flex: 1; max-width: 132px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 52px; border-radius: 12px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 650; }
.tabs a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--accent); }
.tabs a.on svg { stroke-width: 2.3; }
body.has-tabs .view { padding-bottom: calc(env(safe-area-inset-bottom) + 92px); }

.list-h { margin: 22px 2px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 76px; }
.card:active { transform: scale(.995); }
.thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--line) center/cover; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card-side b { font-variant-numeric: tabular-nums; font-size: 15px; }
.card-side small { font-size: 12px; color: var(--ok); font-weight: 600; }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.avatar.xl { width: 68px; height: 68px; font-size: 24px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.stats div { background: var(--solid); color: var(--solid-ink); border-radius: 16px; padding: 14px; }
.stats small { display: block; font-size: 12px; opacity: .75; }
.stats b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.search { width: 100%; margin-top: 12px; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 16px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 12px; scrollbar-width: none; }
.filters .chip { flex: none; min-height: 38px; padding: 6px 14px; }
.chip.on { background: var(--solid); color: var(--solid-ink); border-color: transparent; }
.empty-s { color: var(--muted); text-align: center; padding: 20px 0; }

.empty { text-align: center; padding: 8px 0 20px; }
.empty-img { height: 200px; border-radius: 22px; background: center/cover; box-shadow: var(--shadow); }
.empty h2 { margin: 18px 0 6px; font-size: 22px; }
.empty p { color: var(--muted); margin: 0 auto 16px; max-width: 34ch; text-wrap: pretty; }

.job-hero textarea.title { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 8px; background: transparent; border: 0; color: #fff; font-size: 21px; font-weight: 750; letter-spacing: -.01em;
  padding: 4px; border-radius: 8px; resize: none; line-height: 1.2; height: 58px; overflow: hidden; }
.job-hero textarea.title:focus { background: rgb(0 0 0 / .35); outline: none; }
.job-hero { height: 170px; }
.h-link { color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }

.status-bar { margin-top: 12px; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; margin: 0; }
.track li { padding: 8px 4px 6px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: center; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.track li small { display: block; font-size: 11px; font-weight: 500; min-height: 14px; }
.track li.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.track li.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.status-actions { display: flex; gap: 8px; margin-top: 8px; }
.status-actions .btn { flex: 1; min-height: 46px; font-size: 15px; }
.btn.dark { background: var(--solid); color: var(--solid-ink); }
.danger-t { color: var(--danger) !important; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--line) center/cover; }
.ph-del { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: 18px; line-height: 1; }
.ph-empty { grid-column: 1 / -1; display: block; padding: 18px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; font-size: 14px; cursor: pointer; }

.client-head { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.client-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.client-head p { margin: 2px 0 0; color: var(--muted); }
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-top: 14px; }
.cbtn { display: grid; place-items: center; min-height: 48px; border-radius: 14px; background: var(--solid); color: var(--solid-ink); text-decoration: none; font-weight: 700; }

.lead { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 4px 2px 0; }
.section h2 span { font-weight: 600; }
.pb { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pb-row { display: grid; grid-template-columns: 1fr 84px 54px 36px; gap: 6px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pb-row:last-child { border-bottom: 0; }
.pb-row input { min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; min-width: 0; }
.pb-row .pb-price { text-align: right; font-variant-numeric: tabular-nums; }
.pb-row .pb-kw { grid-column: 1 / -1; font-size: 13px; min-height: 36px; color: var(--muted); }
.pb-row .del { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 20px; border-radius: 10px; }

/* ---------- v3: send sheet, invoice, settings */
.gear { margin-left: 2px; margin-right: -8px; color: var(--ink-2); text-decoration: none; }
.dock-btns { display: flex; gap: 8px; }
.dock-btns .btn { padding: 0 16px; }
.sheet-bg { position: fixed; inset: 0; z-index: 70; background: rgb(8 14 24 / .5); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-width: 560px; margin: 0 auto; background: var(--card); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 18px); box-shadow: 0 -10px 40px rgb(0 0 0 / .25); animation: up .22s ease-out; max-height: 90dvh; overflow: auto; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 12px; font-size: 19px; }
.send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.send-grid .btn { text-decoration: none; }
.send-grid #shShare { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.logo-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.logo { flex: none; width: 76px; height: 76px; border-radius: 16px; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 700; cursor: pointer; background: #fff center/contain no-repeat; }
.pb-row { grid-template-columns: 1fr 96px 64px 36px; grid-template-areas: "name name name name" "price price unit del" "kw kw kw kw"; }
.pb-row .pb-name { grid-area: name; font-weight: 650; }
.pb-row .pb-price { grid-area: auto; }
.field select { appearance: auto; }

/* ---------- v4: privacy, offline queue, undo */
.consent { margin: 12px auto 0; max-width: 34ch; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.outbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 650; font-size: 14px; }
.privacy { margin: 0 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.privacy li { margin-bottom: 6px; }
.toast.act { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast .undo { border: 0; background: transparent; color: var(--accent); font-weight: 800; min-height: 32px; padding: 0 4px; }

/* ---------- v5: setup, follow-ups, options, add by voice */
.setup { margin: 4px 0 14px; padding: 16px; border-radius: 20px; background: var(--card); border: 2px solid var(--accent); box-shadow: var(--shadow); }
.setup h2 { margin: 0; font-size: 20px; }
.setup p { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.seg .chip { min-height: 40px; padding: 6px 12px; }
.stats { grid-template-columns: 1fr 1fr; }
.nudge { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--warn-soft); }
.nudge h3 { margin: 0 0 6px; font-size: 14px; color: var(--warn); }
.nudge-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-top: 1px solid color-mix(in srgb, var(--warn) 20%, transparent); }
.nudge-row:first-of-type { border-top: 0; }
.nudge-row .chip { min-height: 38px; padding: 6px 14px; flex: none; }
.line.opt { border-style: dashed; border-color: var(--ok); }
.line.opt.off { opacity: .78; }
.line.opt.off .amount { text-decoration: line-through; color: var(--muted); }
.inc { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--ok); font-weight: 700; font-size: 13px; min-height: 32px; }
.inc input { width: 20px; height: 20px; accent-color: var(--ok); }
.recorder.small { padding: 6px 0 14px; }
.recorder.small .mic { width: 112px; height: 112px; }
.recorder.small .mic svg { width: 44px; height: 44px; }

.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); }
.cam-ov { position: fixed; inset: 0; z-index: 99; background: #000; display: flex; flex-direction: column; }
.cam-ov video { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.cam-bar { display: flex; justify-content: center; gap: 12px; padding: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

/* ---- v6: site-ready UX (one hand, gloves, sun) ---- */
:root { --muted: #4b5667; --link: #b83a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted: #a9b5c6; --link: #ff8a5c; } }
:root[data-theme="dark"] { --muted: #a9b5c6; --link: #ff8a5c; }
.h-link, .linkbtn, .chip.accent, .tabs a.on { color: var(--link); }
.hero.compact { min-height: 124px; }
.hero.compact h1 { font-size: 24px; margin: 0; }
.hero.compact p { display: none; }
.hero.compact .hero-body { padding: 16px 18px; }
.mic { width: 150px; height: 150px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 16px; }
.qbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 92px; padding: 10px; border-radius: 18px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.qbtn svg { width: 30px; height: 30px; }
.qbtn b { font-size: 18px; font-weight: 800; }
.qbtn small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.qbtn:active { background: var(--line); }
#homeCam { background: var(--solid); color: var(--solid-ink); border-color: var(--solid); }
#homeCam small { color: inherit; opacity: .85; }
.photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.photo-btns .btn { min-height: 60px; font-size: 18px; font-weight: 800; }
.photo-btns label.btn { cursor: pointer; }
.btn, .chip { font-weight: 700; }
.tabs a { font-size: 12px; min-height: 58px; }
.tabs a svg { width: 26px; height: 26px; }
.upd-bar { position: fixed; z-index: 60; left: 12px; right: 12px; top: max(10px, env(safe-area-inset-top)); min-height: 56px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font: inherit; font-size: 17px; font-weight: 800; box-shadow: var(--shadow); }
