@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --brand: #1e5b3c;
  --brand-hover: #174a30;
  --brand-ink: #ffffff;
  --brand-soft: #e1eee5;
  --ink: #18211c;
  --ink-2: #33403a;
  --muted: #56625b;
  --line: #dde3df;
  --line-strong: #c2cbc5;
  --surface: #ffffff;
  --surface-2: #f3f6f4;
  --ground: #eef1ee;
  --listing: #c8370f;
  --rental: #f0a500;
  --rental-edge: #4a3200;
  --select: #1d6fd6;
  --shadow-1: 0 1px 2px rgba(16, 28, 21, 0.08), 0 2px 6px rgba(16, 28, 21, 0.08);
  --shadow-2: 0 4px 12px rgba(16, 28, 21, 0.12), 0 14px 36px rgba(16, 28, 21, 0.12);
  --radius: 12px;
  --radius-s: 8px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --panel-w: 404px;
  --peek: 152px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2f7d52;
    --brand-hover: #38905f;
    --brand-soft: #1d3428;
    --ink: #e8eee9;
    --ink-2: #ccd6cf;
    --muted: #a3afa7;
    --line: #29332d;
    --line-strong: #3b4740;
    --surface: #151b17;
    --surface-2: #1d2520;
    --ground: #0f1411;
    --select: #5ea4ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45), 0 14px 36px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 15px/1.45 var(--font);
  color: var(--ink);
  background: var(--ground);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--brand);
  accent-color: var(--brand);
}
::selection { background: var(--brand-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h2, h3 { text-wrap: balance; }
a { color: var(--brand); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #7fcca0; } }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; }

/* ---------- layout */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: var(--panel-w) 1fr; }
.map-wrap { position: relative; grid-column: 2; grid-row: 1; min-width: 0; background: #f4f3ef; }
#map { position: absolute; inset: 0; }
.panel {
  grid-column: 1; grid-row: 1; z-index: 3;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

/* ---------- brand */
.brand { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 18px 20px 12px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -0.01em; }
.logo { width: 30px; height: 30px; flex: none; }
.tagline { grid-column: 1; margin: 0; color: var(--muted); font-size: 13.5px; }
.brand .icon-btn { grid-row: 1 / span 2; grid-column: 2; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.search-mark { display: none; }

/* ---------- search */
.search { position: relative; margin: 0 20px; display: flex; align-items: center; }
.search > .i { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 44px 0 42px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface-2); outline: none;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--muted); }
.search input:placeholder-shown { padding-right: 14px; }
.search input:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search .icon-btn { position: absolute; right: 3px; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); max-height: min(420px, 60vh); overflow: auto;
}
.search-results li { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s); cursor: pointer; }
.search-results li:hover, .search-results li.active { background: var(--surface-2); }
.search-results li.empty { display: block; color: var(--muted); cursor: default; }
.opt-main { min-width: 0; display: grid; }
.opt-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--surface-2); }
.chip .n { font-weight: 500; color: var(--muted); }
.chip.layer[aria-pressed="true"] { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong)); color: var(--ink); }
.chip.layer[aria-pressed="false"] .sym { opacity: 0.35; }
.chip.layer[aria-pressed="false"] { color: var(--muted); }
.chip .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 12px; display: grid; place-items: center; }

/* ---------- filters */
.filters { padding: 4px 20px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 52vh; overflow: auto; background: var(--surface); }
.filters fieldset { border: 0; margin: 0; padding: 14px 0 6px; }
.filters fieldset + fieldset { border-top: 1px solid var(--line); }
.filters legend { font-weight: 700; font-size: 15px; padding: 0 0 8px; }
.filters .sub { margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
.checks { display: grid; gap: 2px; }
.checks.cols { grid-template-columns: 1fr 1fr; column-gap: 12px; }
.check { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; }
.check .n { color: var(--muted); font-size: 13px; }
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.field select { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); padding: 0 8px; color: var(--ink); font-size: 14px; }
.filter-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; position: sticky; bottom: -16px; background: var(--surface); padding-bottom: 4px; }

/* ---------- tabs and count */
.tabs { display: flex; align-items: center; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] { height: 42px; padding: 0 10px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.count { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); }
.results { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-bottom: 24px; outline: none; }

/* ---------- list */
.group h3 {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px;
  margin: 0; padding: 14px 20px 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); background: var(--surface);
}
.group h3 .n { font-weight: 500; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; }
.item {
  width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 20px; border: 0; background: none; text-align: left; min-height: 56px;
  transition: background-color 0.12s;
}
.item:hover { background: var(--surface-2); }
.item:focus-visible { outline-offset: -2px; }
.item-main { min-width: 0; display: grid; gap: 1px; }
.item-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.more { margin: 4px 20px 0; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.more:hover { background: var(--surface-2); }
.note { margin: 16px 20px 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.link { padding: 0; border: 0; background: none; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
@media (prefers-color-scheme: dark) { .link { color: #7fcca0; } }
.empty-state { padding: 40px 24px; text-align: center; color: var(--ink-2); }
.empty-state p { margin: 0 0 16px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- symbols (match the map icons) */
.sym { display: inline-block; flex: none; width: 14px; height: 14px; justify-self: center; }
.sym-tract.sym-fs { background: var(--brand); border-radius: 3px; }
.sym-tract.sym-association { background: #fff; border: 3px solid #1e5b3c; border-radius: 3px; }
.sym-tract.sym-inferred { background: #fff; border: 2px dashed #1e5b3c; border-radius: 3px; }
.sym-site { width: 12px; height: 12px; border-radius: 50%; background: #1e5b3c; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(30, 91, 60, 0.4); }
.sym-rental { width: 14px; height: 14px; background: var(--rental); border: 1.5px solid var(--rental-edge); transform: rotate(45deg) scale(0.86); border-radius: 1px; }
.sym-pin { width: 15px; height: 20px; background: center / contain no-repeat; }
.sym-pin.sym-open { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 29'%3E%3Cpath d='M11 27S2 16.5 2 10.5a9 9 0 0 1 18 0C20 16.5 11 27 11 27Z' fill='%23c8370f' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='11' cy='10.5' r='3.4' fill='%23fff'/%3E%3C/svg%3E"); }
.sym-pin.sym-sold { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 29'%3E%3Cpath d='M11 27S2 16.5 2 10.5a9 9 0 0 1 18 0C20 16.5 11 27 11 27Z' fill='%23fff' stroke='%23c8370f' stroke-width='2.5'/%3E%3Ccircle cx='11' cy='10.5' r='3.4' fill='%23c8370f'/%3E%3C/svg%3E"); }
.sym-pin.sym-unclear { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 29'%3E%3Cpath d='M11 27S2 16.5 2 10.5a9 9 0 0 1 18 0C20 16.5 11 27 11 27Z' fill='%23fff' stroke='%236b7480' stroke-width='2' stroke-dasharray='3 2'/%3E%3Ccircle cx='11' cy='10.5' r='3.4' fill='%236b7480'/%3E%3C/svg%3E"); }
.sym-forest { width: 16px; height: 16px; border-radius: 4px; background: #b9d8ab; border: 1.5px solid #3f7a4f; }

/* ---------- record pages */
.back {
  display: inline-flex; align-items: center; gap: 4px; margin: 12px 12px 0; height: 36px; padding: 0 12px 0 6px;
  border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.back:hover { background: var(--surface-2); }
.rec-head { display: flex; flex-direction: column; gap: 6px; padding: 8px 20px 4px; }
.rec-head h2 { order: 1; margin: 0; font-size: 22px; line-height: 1.2; font-weight: 750; letter-spacing: -0.01em; outline: none; }
.rec-head .where { order: 2; margin: 0; color: var(--muted); font-size: 14px; }
.rec-head .status { order: 3; }
.rec-head .price { order: 4; margin: 4px 0 0; font-size: 28px; font-weight: 750; letter-spacing: -0.01em; }
.rec-head .price span { font-size: 16px; font-weight: 600; color: var(--muted); }
.status { align-self: flex-start; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.status-open { background: #fbe6de; color: #8a2405; border-color: #f3c7b7; }
.status-sold { background: var(--surface); color: #8a2405; border-color: #e3a48c; }
.status-unclear { background: var(--surface-2); color: var(--ink-2); border-style: dashed; border-color: var(--line-strong); }
.status-rental { background: #fdf0d2; color: #5c3d00; border-color: #f2d48c; }
.status-fs, .status-site { background: var(--brand-soft); color: var(--ink); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.status-association { background: var(--surface); color: var(--ink); border-color: color-mix(in srgb, var(--brand) 55%, transparent); }
.status-inferred { background: var(--surface); color: var(--ink-2); border-style: dashed; border-color: var(--line-strong); }
@media (prefers-color-scheme: dark) {
  .status-open { background: #3d1a10; color: #ffb59e; border-color: #6b2c19; }
  .status-sold { color: #ffb59e; border-color: #6b2c19; }
  .status-rental { background: #3a2c0a; color: #ffd98a; border-color: #5e4813; }
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
  color: var(--ink); font-weight: 650; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 16px; margin: 0; padding: 14px 20px 4px; font-size: 14.5px; }
.facts + .facts { border-top: 1px solid var(--line); margin-top: 12px; }
.facts dt { color: var(--muted); display: flex; align-items: flex-start; gap: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 14px 20px 0; }
.tags li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 550; color: var(--ink-2); }
blockquote { margin: 16px 20px 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
blockquote p { margin: 0; font-size: 14.5px; color: var(--ink); }
blockquote cite { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--muted); }
.lede { margin: 12px 20px 0; font-size: 14.5px; color: var(--ink-2); }
.notes { margin: 14px 20px 0; font-size: 13.5px; color: var(--muted); max-width: 65ch; }
.source { margin: 12px 20px 0; font-size: 14px; }
.source a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.fileno { margin: 18px 20px 0; font-size: 12.5px; color: var(--muted); }
.term { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; margin: -2px 0 0 2px; border: 0; border-radius: 999px; background: none; color: var(--muted); vertical-align: middle; }
.term:hover { background: var(--surface-2); color: var(--ink); }
.term-pop {
  position: fixed; inset: auto; margin: 0; width: min(300px, calc(100vw - 24px)); padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2); font-size: 14px;
}
.term-pop strong { display: block; margin-bottom: 4px; }
.term-pop p { margin: 0; color: var(--ink-2); }
.prose { padding: 4px 20px 0; font-size: 14.5px; max-width: 70ch; }
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose ul { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.prose p { margin: 10px 0 0; }

/* ---------- map tools */
.map-tools { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.tool-group { display: flex; flex-direction: column; border-radius: var(--radius-s); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.tool { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: var(--surface); color: var(--ink-2); border-radius: var(--radius-s); box-shadow: var(--shadow-1); }
.tool-group .tool { border-radius: 0; box-shadow: none; }
.tool-group .tool + .tool { border-top: 1px solid var(--line); }
.tool:hover { background: var(--surface-2); }
.tool[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand); }
@media (prefers-color-scheme: dark) { .tool[aria-expanded="true"] { color: var(--ink); } }
.tool[aria-busy="true"] .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.layers-pop {
  position: absolute; top: 0; right: 56px; width: 300px; padding: 6px 16px 14px;
  background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.layers-pop h2 { font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin: 12px 0 6px; }
.switch { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 6px 0; font-size: 14px; cursor: pointer; }
.switch input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.switch small { display: block; color: var(--muted); font-size: 12.5px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.legend li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; }
.map-status { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 4; margin: 0; padding: 10px 14px; border-radius: var(--radius-s); background: #18211c; color: #fff; font-size: 14px; box-shadow: var(--shadow-2); max-width: min(480px, calc(100% - 140px)); }

/* ---------- MapLibre surfaces */
.cluster-marker { line-height: 0; }
.cluster {
  position: relative; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.96); box-shadow: 0 1px 3px rgba(16, 28, 21, 0.25), 0 4px 10px rgba(16, 28, 21, 0.12);
  color: #18211c; font: 700 13px var(--font); transition: transform 0.18s var(--ease-out);
}
.cluster svg { position: absolute; inset: 0; }
.cluster span { position: relative; }
.cluster:hover { transform: scale(1.08); }
.map-tip .maplibregl-popup-content { padding: 6px 10px; border-radius: var(--radius-s); font: 600 13px/1.3 var(--font); color: #18211c; box-shadow: var(--shadow-2); }
.map-tip .maplibregl-popup-tip { display: none; }
.maplibregl-ctrl-attrib { font: 11px var(--font); }
.maplibregl-ctrl-scale { font: 11px var(--font); border-color: #56625b; color: #33403a; background: rgba(255, 255, 255, 0.8); }

/* ---------- phone: map first, results in a bottom sheet */
@media (max-width: 899px) {
  :root { --peek: 132px; }
  .app { display: block; }
  .map-wrap { position: absolute; inset: 0; }
  /* Search is the top pill over the map, led by the logo, which opens About. */
  .map-wrap > .search { position: absolute; z-index: 4; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; right: 68px; margin: 0; }
  .map-wrap > .search input { height: 48px; padding-left: 52px; font-size: 16px; background: var(--surface); border-color: transparent; box-shadow: var(--shadow-1); }
  .map-wrap > .search > .i { display: none; }
  .search-mark { display: grid; place-items: center; position: absolute; left: 8px; z-index: 1; width: 34px; height: 34px; border-radius: var(--radius-s); }
  .search-mark .logo { width: 32px; height: 32px; }
  .map-tools { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
  .layers-pop { right: 0; top: auto; bottom: auto; position: fixed; left: 12px; width: auto; top: calc(64px + env(safe-area-inset-top, 0px)); max-height: 60vh; overflow: auto; }
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
    height: calc(100dvh - 64px - env(safe-area-inset-top, 0px));
    border-right: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -2px 14px rgba(16, 28, 21, 0.18);
    transform: translateY(calc(100% - var(--peek) - env(safe-area-inset-bottom, 0px)));
    transition: transform 0.3s var(--ease-quart);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .panel[data-sheet="half"] { transform: translateY(45%); }
  .panel[data-sheet="full"] { transform: translateY(0); }
  .panel.dragging { transition: none; }
  .sheet-handle { display: grid; place-items: center; width: 100%; height: 22px; padding: 0; border: 0; background: none; touch-action: none; flex: none; }
  .sheet-handle span { width: 40px; height: 5px; border-radius: 999px; background: var(--line-strong); }
  .brand { display: none; }
  /* A record or forest page leads its sheet; layer chips and tabs belong to the list. */
  .panel:not([data-view="list"]) :is(.chips, .tabs, .filters) { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding: 10px 14px 10px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { height: 38px; }
  .filter-btn { order: -1; }
  .tabs, .item, .group h3, .facts, .rec-head, .actions, .tags, .lede, .notes, .prose { padding-left: 16px; padding-right: 16px; }
  .note, blockquote, .more, .fileno, .source { margin-left: 16px; margin-right: 16px; }
  .filters { max-height: none; }
  .row { grid-template-columns: 1fr 1fr; }
  /* Pinch zooms on a phone; the buttons would only crowd the map. */
  .map-tools .tool-group { display: none; }
  .maplibregl-ctrl-scale { display: none; }
  /* Credits sit just above the peeking sheet, clear of the search pill and the tools. */
  .maplibregl-ctrl-bottom-right { bottom: calc(var(--peek) + 8px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; }
  .maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0; float: right; }
}
@media (min-width: 900px) { .sheet-handle { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
