@layer reset, base, layout, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { border: 0; background: none; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  button:disabled { cursor: default; opacity: .5; }
  svg { flex-shrink: 0; }
  img { max-width: 100%; display: block; }
  button svg { pointer-events: none; }
  fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
  legend { padding: 0; }
  a { color: inherit; }
}
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("./fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("./fonts/manrope.woff2") format("woff2"); }
@layer base {
  :root {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: Manrope, Inter, system-ui, sans-serif;
    font-size: 17px;
    color-scheme: light;
    --bg: #FFF7ED; --surface: #FFFFFF; --surface-2: #FFEDD5; --surface-3: #FDF3E7; --text: #271811; --muted: #76645B; --line: #E8D6CC; --hairline: rgba(39,24,17,.08);
    --primary: #9A3412; --primary-active: #C2410C; --primary-ink: #FFFFFF; --primary-soft: #FFEDD5; --primary-soft-ink: #7C2D12;
    --accent: #F59E0B; --accent-ink: #78350F;
    --ok: #3F6212; --ok-soft: #ECFCCB; --danger: #991B1B; --danger-soft: #FEE2E2;
    --shadow: 0 10px 30px rgba(39,24,17,.10); --capture-shadow: 0 14px 34px rgba(154,52,18,.32), inset 0 -6px 14px rgba(0,0,0,.12);
    --radius: 18px; --radius-s: 12px;
    --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
    background: var(--bg); color: var(--text);
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #17100C; --surface: #211713; --surface-2: #2C1E18; --surface-3: #261A14; --text: #FFF7ED; --muted: #C7B6AC; --line: #3A2A22; --hairline: rgba(255,247,237,.08);
    --primary: #D97706; --primary-active: #F59E0B; --primary-ink: #17100C; --primary-soft: #3A2414; --primary-soft-ink: #FDBA74;
    --accent: #FB923C; --accent-ink: #FED7AA;
    --ok: #A3E635; --ok-soft: #1F2A10; --danger: #FCA5A5; --danger-soft: #3B1A1A;
    --shadow: 0 10px 30px rgba(0,0,0,.45); --capture-shadow: 0 14px 34px rgba(217,119,6,.35), inset 0 -6px 14px rgba(0,0,0,.3);
  }
  :root[data-text="large"] { font-size: 20px; }
  :root[data-motion="reduced"] * { transition: none !important; animation: none !important; }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
  body { min-width: 320px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
  h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
  h1 { font-size: 1.35rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; font-weight: 600; }
  .small { font-size: .88rem; } .tiny { font-size: .78rem; } .muted { color: var(--muted); } .center { text-align: center; } .strong { font-weight: 600; }
  .eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .skip-link { position: fixed; top: -80px; left: 16px; z-index: 1000; background: var(--primary); color: var(--primary-ink); padding: 12px; border-radius: 10px; }
  .skip-link:focus { top: 12px; }
  input, textarea, select { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s); min-height: 56px; padding: 12px 14px; width: 100%; outline: none; font-size: 1.05rem; }
  textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
  input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
  input[type="checkbox"], input[type="radio"] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--primary); margin: 0; padding: 0; }
  button:focus-visible, a:focus-visible, summary:focus-visible, label:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
  .boot { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
  .error-message { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: var(--radius-s); font-size: .95rem; margin-bottom: 8px; }
  .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  @keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .brand { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 1.25rem; display: inline-flex; align-items: center; gap: 6px; }
  .brand .ico { color: var(--primary); }
}
@layer layout {
  #app { min-height: 100dvh; }
  .screen { min-height: 100dvh; max-width: 620px; margin: 0 auto; padding: calc(10px + var(--safe-t)) 18px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
  .screen.has-nav { padding-bottom: calc(96px + var(--safe-b)); }
  .topbar { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; min-height: 56px; gap: 6px; }
  .topbar.plain { grid-template-columns: 1fr auto 1fr; }
  .topbar.plain .brand { text-align: center; }
  .topbar-title { text-align: center; min-width: 0; }
  .topbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-title p { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { display: flex; justify-content: flex-end; gap: 2px; }
  .topbar-spacer { display: flex; align-items: center; }
  .icon-btn { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
  .icon-btn.small { width: 48px; height: 48px; }
  .icon-btn:active { background: var(--surface-2); }
  .icon-btn.primary { color: var(--primary); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--hairline); padding: 6px 8px calc(6px + var(--safe-b)); z-index: 30; max-width: 100%; }
  .nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 58px; justify-content: center; border-radius: 14px; color: var(--muted); font-size: .74rem; font-weight: 500; }
  .nav-item.active { color: var(--primary-soft-ink); background: var(--primary-soft); }
  .stack { display: flex; flex-direction: column; gap: 14px; }
  .stack.tight { gap: 8px; }
  .row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.center { justify-content: center; } .row.between { justify-content: space-between; } .gap-s { gap: 8px; }
  .grow { flex: 1; min-width: 0; }
  .section-head { display: flex; align-items: baseline; justify-content: space-between; min-height: 32px; margin-top: 6px; }
  .section-head .eyebrow { margin: 0; }
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
  .panel.soft { background: var(--surface-3); border-color: transparent; }
}
@layer components {
  /* buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 1.02rem; background: var(--surface-2); color: var(--text); transition: transform .08s ease, background .15s ease; text-decoration: none; }
  .btn:active { transform: scale(.98); }
  .btn.primary { background: var(--primary); color: var(--primary-ink); }
  .btn.primary:active { background: var(--primary-active); }
  .btn.ghost { background: transparent; border: 1.5px solid var(--line); }
  .btn.quiet { background: transparent; color: var(--muted); font-weight: 500; }
  .btn.danger { color: var(--danger); } .btn.danger.primary { background: var(--danger); color: #fff; }
  .btn.small { min-height: 44px; padding: 0 14px; font-size: .92rem; border-radius: 12px; }
  .btn.xl { min-height: 64px; width: 100%; font-size: 1.1rem; border-radius: 20px; }
  .btn.wide { width: 100%; }
  .btn.start { justify-content: flex-start; }
  /* sync chip */
  .sync-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: .74rem; color: var(--muted); background: var(--surface-2); max-width: 46vw; }
  .sync-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sync-chip.paused { color: var(--danger); background: var(--danger-soft); }
  /* home */
  .home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: max(14px, 4vh) 0 6px; }
  .home-hero h1 { font-size: 1.55rem; }
  .home-hero p { color: var(--muted); max-width: 30ch; font-size: 1.02rem; }
  .capture-area { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 6px; }
  .capture-btn { width: 132px; height: 132px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; box-shadow: var(--capture-shadow); transition: transform .1s ease, background .15s ease; position: relative; }
  .capture-btn::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--primary) 28%, transparent); }
  .capture-btn:active { transform: scale(.95); background: var(--primary-active); }
  .capture-label { font-family: var(--display); font-weight: 800; letter-spacing: .08em; font-size: .9rem; color: var(--primary-soft-ink); }
  :root[data-theme="dark"] .capture-label { color: var(--primary-active); }
  .capture-sub { color: var(--muted); font-size: .9rem; }
  .location-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .8rem; font-weight: 600; min-height: 32px; }
  .location-pill.off { background: var(--surface-2); color: var(--muted); }
  .location-pill.warn { background: var(--surface-2); color: var(--accent-ink); }
  .empty-home .capture-area { padding: 30px 0 20px; }
  .privacy-line { max-width: 36ch; }
  /* banners (due reminder, thing nearby) */
  .banner { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-soft-ink); min-height: 60px; }
  .banner.calm { background: var(--ok-soft); color: var(--ok); }
  .banner .grow { min-width: 0; line-height: 1.3; }
  .banner .icon-btn.small { color: inherit; }
  .banner .btn.small { min-height: 44px; background: var(--surface); color: inherit; }
  /* capture focus screen (home-screen shortcut) */
  .capture-focus { justify-content: center; }
  .capture-area.tall { flex: 1; justify-content: center; gap: 14px; }
  .capture-area.tall h1 { font-size: 1.7rem; margin-bottom: 8px; }
  /* photo strip + gallery */
  .photo-count { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 3px; background: rgba(39,24,17,.6); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: .72rem; font-weight: 600; }
  .card { position: relative; }
  .photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
  .photo-strip::-webkit-scrollbar { display: none; }
  .strip-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 2px solid transparent; position: relative; }
  .strip-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .strip-thumb.on { border-color: var(--primary); }
  .strip-add { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; border: 1.5px dashed var(--line); color: var(--primary-soft-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; font-weight: 600; }
  .swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; border-radius: var(--radius); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe-item { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; max-height: 46dvh; display: block; }
  .swipe-item img { width: 100%; height: 100%; object-fit: cover; }
  .swipe-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(39,24,17,.62); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .85rem; text-align: left; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .15s ease; }
  .dot.on { background: var(--primary); }
  .opt-actions.four { grid-template-columns: repeat(4, 1fr); }
  .opt-actions.four .btn { padding: 0 4px; font-size: .82rem; }
  /* thing rows */
  .rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .thing-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--hairline); min-height: 76px; }
  .thing-row:last-child { border-bottom: 0; }
  .thing-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; color: var(--text); min-height: 60px; }
  .thing-thumb { width: 54px; height: 54px; border-radius: 14px; background: var(--surface-2); color: var(--primary-soft-ink); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; position: relative; }
  .thing-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .thumb-badge { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--primary-soft-ink); display: grid; place-items: center; border: 1px solid var(--line); box-shadow: 0 1px 3px var(--hairline); }
  .thing-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .thing-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thing-meta { color: var(--muted); font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .thing-meta .dist { color: var(--primary-soft-ink); font-weight: 600; }
  .thing-actions { display: flex; gap: 2px; }
  /* entry cards */
  .cards { display: flex; flex-direction: column; gap: 12px; }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
  .card-main { display: grid; grid-template-columns: 112px 1fr; gap: 12px; text-align: left; color: var(--text); min-height: 112px; padding: 0; width: 100%; }
  .card-photo { width: 112px; height: 100%; min-height: 112px; background: var(--surface-2); color: var(--primary-soft-ink); display: grid; place-items: center; overflow: hidden; position: relative; }
  .card-photo .thumb-badge { right: 6px; bottom: 6px; }
  .card-photo img { width: 100%; height: 100%; object-fit: cover; }
  .card-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 12px 10px 0; min-width: 0; justify-content: center; }
  .card-title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
  .card-title .ico { color: var(--accent); }
  .card-dist { color: var(--primary-soft-ink); font-weight: 600; }
  .card-dist.none { color: var(--muted); font-weight: 500; }
  .card-time { color: var(--muted); font-size: .88rem; }
  .card-foot { display: flex; border-top: 1px solid var(--hairline); }
  .card-foot .btn { flex: 1; border-radius: 0; min-height: 56px; background: var(--surface); color: var(--primary); font-weight: 700; }
  .card-foot .btn:active { background: var(--primary-soft); }
  .asset-missing img { display: none; }
  /* captured */
  .saved-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 0 4px; }
  .saved-check { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); margin-bottom: 4px; }
  .saved-check.fresh { animation: pop .32s ease-out; }
  .saved-check.plain { background: var(--surface-2); color: var(--primary-soft-ink); }
  .saved-hero h2 { font-size: 1.5rem; }
  .saved-time { color: var(--muted); font-size: 1.02rem; }
  .saved-loc { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .92rem; min-height: 28px; flex-wrap: wrap; justify-content: center; }
  .saved-loc .btn.quiet { color: var(--primary); min-height: 44px; padding: 0 8px; }
  .saved-loc .ico { color: var(--primary); }
  .saved-loc.warn { color: var(--accent-ink); }
  .preview { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 10; max-height: 220px; display: grid; place-items: center; color: var(--primary-soft-ink); }
  .preview img { width: 100%; height: 100%; object-fit: cover; }
  .preview.tall { aspect-ratio: auto; max-height: 60dvh; }
  .preview.tall img { object-fit: contain; max-height: 60dvh; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .95rem; color: var(--text); position: relative; cursor: pointer; }
  .chip .ico { color: var(--primary-soft-ink); }
  .chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
  .chip.on .ico { color: var(--primary-ink); }
  .chip.small { min-height: 48px; padding: 0 14px; font-size: .88rem; }
  .chip.soft { background: var(--surface-3); border-color: transparent; }
  .chip.soft.on { background: var(--primary); border-color: var(--primary); }
  .opt-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .opt-actions .btn { flex-direction: column; gap: 4px; min-height: 68px; font-size: .9rem; padding: 0 8px; }
  .opt-actions .btn.on { background: var(--primary-soft); color: var(--primary-soft-ink); }
  .opt-actions .btn.on .ico { color: var(--accent); }
  .saved-foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: auto; padding-top: 8px; }
  .assigned-note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-3); border-radius: var(--radius-s); padding: 12px 14px; font-size: .92rem; color: var(--muted); }
  .assigned-note .ico { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
  .assigned-note strong { color: var(--text); }
  .location-offer { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 14px; }
  .location-offer .btn { min-width: 220px; }
  /* detail */
  .detail-photo { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--primary-soft-ink); min-height: 200px; max-height: 62dvh; }
  .detail-photo img { width: 100%; max-height: 62dvh; object-fit: contain; }
  .detail-title { display: flex; align-items: center; gap: 8px; }
  .detail-title h1 { font-size: 1.5rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .detail-title .ico { color: var(--accent); }
  .facts { display: flex; flex-direction: column; gap: 6px; }
  .fact { display: flex; align-items: center; gap: 10px; min-height: 30px; color: var(--muted); }
  .fact .ico { color: var(--primary); }
  .fact.big { color: var(--primary-soft-ink); font-weight: 700; font-size: 1.15rem; }
  .fact.big .ico { color: var(--primary); }
  .fact strong { color: var(--text); font-weight: 600; }
  .note-preview { color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; white-space: pre-wrap; }
  .more { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--surface); }
  .more summary { min-height: 56px; display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; list-style: none; }
  .more summary::-webkit-details-marker { display: none; }
  .more summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--muted); }
  .more[open] summary::after { content: "–"; }
  .more .stack { padding: 4px 0 18px; }
  .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
  .kv dt { color: var(--muted); } .kv dd { font-variant-numeric: tabular-nums; word-break: break-all; }
  .action-list { display: flex; flex-direction: column; gap: 8px; }
  /* lists */
  .list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .list-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; text-align: left; color: var(--text); border-bottom: 1px solid var(--hairline); width: 100%; }
  .list-row:last-child { border-bottom: 0; }
  .list-row.static { cursor: default; }
  .list-row.danger { color: var(--danger); }
  .list-row .ico.lead { color: var(--primary); }
  .list-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: 500; }
  .list-main .small { font-weight: 400; }
  .list-row select { width: auto; min-width: 120px; max-width: 46%; flex-shrink: 0; min-height: 48px; padding: 6px 10px; }
  .history-row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 8px 12px; width: 100%; text-align: left; color: var(--text); border-bottom: 1px solid var(--hairline); }
  .history-row:last-child { border-bottom: 0; }
  .tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
  .tab { flex: 1; min-height: 48px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); }
  .tab.active { background: var(--surface); color: var(--primary-soft-ink); box-shadow: 0 1px 2px var(--hairline); }
  .seg { display: flex; gap: 8px; flex-wrap: wrap; }
  .seg-item { flex: 1 1 auto; position: relative; }
  .seg-item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; }
  .seg-item span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; }
  .seg-item input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-soft-ink); }
  .field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
  .field > span:first-child, .field legend { color: var(--muted); font-size: .85rem; font-weight: 600; }
  .empty { text-align: center; color: var(--muted); padding: 36px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .empty .ico { color: var(--line); }
  .search-bar { display: flex; gap: 8px; align-items: center; }
  .search-bar input { min-height: 52px; }
  /* sheet + toast */
  #sheet { border: 0; padding: 0; margin: 0; max-width: 100vw; max-height: 100dvh; width: 100%; height: 100dvh; background: transparent; }
  #sheet::backdrop { background: rgba(39,24,17,.45); }
  .sheet-inner { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; background: var(--bg); color: var(--text); border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + var(--safe-b)); box-shadow: var(--shadow); max-width: 620px; margin: 0 auto; animation: rise .22s ease-out; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
  .sheet-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
  .sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 10px; }
  .sheet-foot .btn { flex: 1; }
  .confirm-text { font-size: 1.02rem; }
  #toast-region { position: fixed; left: 12px; right: 12px; bottom: calc(92px + var(--safe-b)); z-index: 40; display: flex; justify-content: center; pointer-events: none; }
  .toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 10px 8px 10px 18px; border-radius: 16px; box-shadow: var(--shadow); max-width: 560px; width: 100%; font-weight: 500; animation: rise .2s ease-out; }
  .toast > span { flex: 1; }
  .toast button { min-height: 48px; padding: 0 14px; border-radius: 10px; font-weight: 700; color: var(--bg); background: rgba(255,255,255,.12); }
  .toast .toast-close { padding: 0; width: 48px; display: grid; place-items: center; background: none; }
  /* map */
  .map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); height: 52dvh; min-height: 280px; position: relative; }
  #map { width: 100%; height: 100%; }
  .map-note { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 500; background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 12px; padding: 8px 12px; font-size: .85rem; color: var(--muted); text-align: center; }
  .map-refresh { position: absolute; right: 10px; top: 10px; z-index: 500; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--primary); }
  .marker-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); display: grid; place-items: center; }
  .marker-pin .ico { transform: rotate(45deg); color: #fff; }
  .marker-pin.place { background: var(--accent); }
  .marker-cluster { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); display: grid; place-items: center; font-weight: 700; font-size: .9rem; font-family: var(--display); }
  .marker-you { width: 18px; height: 18px; border-radius: 50%; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }
}
@layer responsive {
  @media (min-width: 560px) { .opt-actions .btn { flex-direction: row; } .opt-actions.four .btn { font-size: .95rem; } .cards.wide { display: grid; grid-template-columns: 1fr 1fr; } }
  @media (max-width: 360px) { .opt-actions.four { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 360px) { .capture-btn { width: 116px; height: 116px; } .card-main { grid-template-columns: 96px 1fr; } .card-photo { width: 96px; } }
}
