/* =====================================================================
   Plot Empire: "cartographic" theme. Cream paper, navy ink, emerald/teal
   and terracotta. The whole theme is this one :root block.
   ===================================================================== */
:root {
  --bg: #f4ecd8;          /* paper */
  --surface: #fbf6e9;     /* raised paper */
  --surface-2: #f0e5c8;   /* inset paper */
  --line: #d6c7a0;        /* map-line tan */
  --line-strong: #b9a676;
  --text: #14213d;        /* ink */
  --text-soft: #2c3a5a;
  --muted: #566079;       /* AA on paper (5.2:1) */
  --emerald: #047857;
  --emerald-2: #059669;
  --teal: #0e7490;
  --orange: #c2410c;      /* terracotta, AA with white text */
  --orange-2: #ea580c;
  --sun: #f59e0b;
  --danger: #b42318;
  --ok: #047857;
  --accent: #047857;
  --on-orange: #ffffff;
  --radius: 20px;
  --shadow: 0 24px 60px -34px rgba(20, 33, 61, .45);
  --shadow-sm: 0 6px 18px -10px rgba(20, 33, 61, .35);
  --focus: 0 0 0 4px rgba(4, 120, 87, .22);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --map-h: clamp(460px, calc(100vh - 300px), 780px);
  color-scheme: light;
}
@supports (height: 100dvh) { :root { --map-h: clamp(460px, calc(100dvh - 300px), 780px); } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(14, 116, 144, .10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(245, 158, 11, .10), transparent 60%),
    repeating-radial-gradient(circle at 12% 8%, transparent 0 34px, rgba(4, 120, 87, .045) 34px 35px),
    repeating-radial-gradient(circle at 88% 70%, transparent 0 46px, rgba(14, 116, 144, .04) 46px 47px),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px 40px; }
a { color: var(--emerald); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; letter-spacing: -.01em; margin: 0; font-weight: 700; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .85rem; }
.gold, .accent-word { color: var(--orange); font-style: italic; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--text); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.center { text-align: center; }
.center-actions { justify-content: center; }
.lead { font-size: 1.25rem; color: var(--text); font-family: var(--serif); }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--emerald); margin: 0 0 10px; font-weight: 700; }
.lbl { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }

/* ---------- header / footer ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1240px; width: 100%; margin: 0 auto; padding: 16px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-size: 1.2rem; }
.brand:hover { color: var(--text); }
.brand svg { color: var(--emerald); flex: none; }
.brand b { color: var(--orange); font-weight: 700; font-style: italic; }
.top nav { display: flex; gap: 4px; align-items: center; font-size: .92rem; }
.top nav a { color: var(--text-soft); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.top nav a:hover { color: var(--text); background: rgba(20, 33, 61, .06); }
.top nav a.nav-cta { color: var(--on-orange); background: linear-gradient(180deg, var(--orange-2), var(--orange)); font-weight: 700; margin-left: 6px; padding: 9px 16px; box-shadow: var(--shadow-sm); }
.top nav a.nav-cta:hover { filter: brightness(1.06); color: var(--on-orange); }

.foot { margin-top: 40px; border-top: 2px solid var(--text); padding: 36px 20px calc(28px + var(--safe-b)); color: var(--text-soft); font-size: .9rem; background: linear-gradient(180deg, var(--surface-2), var(--bg)); position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid var(--text); opacity: .5; }
.foot-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 36ch; }
.foot nav { display: flex; flex-direction: column; gap: 2px; }
.foot h4 { margin: 0 0 8px; color: var(--text); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; }
.foot nav a { color: var(--text-soft); text-decoration: none; padding: 7px 0; }
.foot nav a:hover { color: var(--orange); text-decoration: underline; }
.foot-fine { max-width: 1240px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid var(--line-strong); }

/* ---------- hero + stats ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 14px 0 18px; }
.hero h1 { font-size: clamp(1.8rem, 4.8vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
.hero .sub { margin: 0; max-width: 44ch; color: var(--text-soft); font-size: 1.02rem; }
.hero .eyebrow { margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 16px; }
.stat { position: relative; padding: 14px 16px; border: 1.5px solid var(--text); border-radius: 14px; background: var(--surface); min-width: 0; box-shadow: 3px 3px 0 rgba(20, 33, 61, .85); }
.stat dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 600; }
.stat dd { margin: 3px 0 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.stat dd .of { font-family: var(--sans); font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .note { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.stat.rush dd b { color: var(--orange); }
.bar { display: block; height: 7px; border-radius: 99px; background: rgba(20, 33, 61, .12); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--emerald), var(--teal)); transition: width .6s ease; }
.note.canceled { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text-soft); }

/* ---------- the map ---------- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.mapwrap { min-width: 0; }
.map {
  position: relative; height: var(--map-h); border-radius: 14px; overflow: hidden; outline: none;
  border: 2px solid var(--text);
  background: #a6d3d6;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 6.5px var(--text), var(--shadow);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.map.dragging { cursor: grabbing; }
.map:focus-visible { border-color: var(--emerald); box-shadow: 0 0 0 5px var(--surface), 0 0 0 8px var(--emerald); }
.map canvas#map-canvas { display: block; position: absolute; inset: 0; }
.compass { position: absolute; left: 12px; top: 12px; width: 64px; height: 64px; z-index: 2; pointer-events: none; color: var(--text); opacity: .8; }
.map-tools { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.map-tools button {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--text); cursor: pointer;
  background: var(--surface); color: var(--text); font: 700 1.4rem/1 var(--sans); box-shadow: 2px 2px 0 var(--text);
  transition: transform .1s, background .15s;
}
.map-tools button:hover { background: #fff; }
.map-tools button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--text); }
.map-key { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; font-size: .74rem; color: var(--text); background: rgba(251, 246, 233, .94); border: 1.5px solid var(--text); pointer-events: none; font-weight: 600; }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i, .tier-list i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; border: 1.5px solid var(--text); }
.k-down { background: #f3cf94; }
.k-mid { background: #bfe0dc; }
.k-sub { background: #efe3c3; }
.k-sale { background: var(--orange-2); clip-path: polygon(0 0, 100% 0, 100% 100%); border: 0 !important; }
.map-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--text); color: #fff; font-size: .8rem; max-width: 240px; box-shadow: 0 12px 30px -10px rgba(20, 33, 61, .6); }
.map-tip[hidden] { display: none; }
.map-tip b { overflow-wrap: anywhere; }
.map-tip span { color: #cfd6e6; font-size: .74rem; }
.map-hint { margin: 14px 4px 0; color: var(--muted); font-size: .82rem; text-align: center; }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-touch { display: inline; } .hint-mouse { display: none; } }
.nojs { position: absolute; inset: auto 12px 56px 12px; margin: 0; color: var(--text-soft); font-size: .9rem; }

/* ---------- side panel (desktop) / bottom sheet (mobile) ---------- */
.panel { position: sticky; top: 14px; max-height: var(--map-h); overflow-y: auto; border: 2px solid var(--text); border-radius: 14px; background: var(--surface); box-shadow: 5px 5px 0 rgba(20, 33, 61, .9); overscroll-behavior: contain; }
.pv { padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.pv h2 { font-size: 1.7rem; }
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pv-head h2 { margin-top: 8px; }
.chip { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--text); background: var(--surface-2); color: var(--text); }
.chip-downtown { background: #f6d9a4; }
.chip-midtown { background: #c4e4df; }
.chip-suburbs { background: #efe3c3; }
.tier-chip { font-family: var(--sans); font-size: .7rem; vertical-align: middle; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--text); background: var(--surface-2); margin-left: 6px; }
.tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tier-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-strong); }
.tier-list li span { flex: 1; color: var(--text-soft); }
.tier-list li:last-child { border-bottom: 0; }
.tier-list b { font-family: var(--serif); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.rush { padding: 14px; border: 1.5px solid var(--text); border-radius: 12px; background: var(--surface-2); }
.rush-top { display: flex; justify-content: space-between; align-items: baseline; }
.rush-top b { font-family: var(--serif); font-size: 1.35rem; color: var(--orange); }
.rush .fine { margin: 8px 0 0; }
.pv-actions { display: flex; flex-direction: column; gap: 10px; }
.jump label { gap: 8px; }
.jump-row { display: flex; gap: 8px; }
.jump-row input { min-width: 0; }
.jump-row .btn-ghost { min-height: 50px; padding: 0 20px; }
.price-box, .sale-box { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1.5px solid var(--text); border-radius: 12px; background: var(--surface-2); }
.sale-box { background: #fde7d3; }
.sale-box .btn-primary { margin-top: 10px; }
.amt { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--orange); line-height: 1.1; }
.wide { width: 100%; }
.pv-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-links .btn-ghost, .btn-ghost.small { min-height: 42px; padding: 8px 16px; font-size: .9rem; }
.banner { margin: 0; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--orange); background: #fde7d3; color: #7c2d12; font-size: .92rem; font-weight: 600; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.meta div { padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--bg); }
.meta dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.meta dd { margin: 2px 0 0; font-weight: 700; }
.owner-note { margin: 0; }

/* ad card (the "deed" for a plot) */
.adcard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px 16px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, #fffdf6), #fffdf6);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 80%, var(--text));
}
.adcard::before { content: ""; position: absolute; inset: 5px; border: 1px dashed color-mix(in srgb, var(--text) 40%, transparent); border-radius: 8px; pointer-events: none; }
.ad-logo, .ad-mono { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 2px solid var(--text); background: #fff; }
.ad-mono { display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; font-weight: 800; color: var(--text); background: var(--accent); }
.ad-name { font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; position: relative; }
.ad-tag { margin: 0; color: var(--text-soft); font-size: .92rem; overflow-wrap: anywhere; min-height: 1.2em; position: relative; }
.ad-visit { position: relative; display: inline-flex; align-items: center; margin-top: 4px; padding: 9px 18px; border-radius: 99px; font-weight: 700; font-size: .88rem; text-decoration: none; color: var(--on-orange); background: var(--text); max-width: 100%; overflow-wrap: anywhere; }
a.ad-visit:hover { background: var(--orange); color: var(--on-orange); }
.adcard.big { padding: 26px 18px 22px; }
.adcard.big .ad-logo, .adcard.big .ad-mono { width: 72px; height: 72px; border-radius: 16px; font-size: 2rem; }
.adcard.big .ad-name { font-size: 1.6rem; }
.adcard[hidden], .ad-logo[hidden], .ad-mono[hidden] { display: none; }

/* buy form inside the panel */
.buyform { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; animation: rise .25s ease-out; }
.buyform .pv-head h2 { font-size: 1.45rem; }
.buy-foot { display: flex; flex-direction: column; gap: 10px; }
.buy-foot .fine { margin: 0; }

/* mobile sticky bar */
.bar-price { display: flex; flex-direction: column; }
#mbar { display: none; }

/* ---------- sections ---------- */
.prices, .feed, .leaders, .how { margin-top: 56px; scroll-margin-top: 20px; }
.prices h2, .feed h2, .leaders h2, .how h2 { font-size: 1.7rem; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.prices h2::after, .feed h2::after, .leaders h2::after, .how h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; background: repeating-linear-gradient(90deg, var(--orange) 0 10px, transparent 10px 15px); }
.h2-note { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tier { padding: 20px; border: 1.5px solid var(--text); border-radius: 14px; background: var(--surface); box-shadow: 3px 3px 0 rgba(20, 33, 61, .85); }
.tier h3 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.tier-price { margin: 6px 0 8px; font-family: var(--serif); font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tier .muted { margin: 0; font-size: .92rem; }
.t-down { background: linear-gradient(180deg, #f9e2b8, var(--surface)); }
.t-down .tier-price { color: var(--orange); }
.t-mid { background: linear-gradient(180deg, #cfe8e4, var(--surface)); }
.t-mid .tier-price { color: var(--teal); }
.prices .fine { margin-top: 14px; }
.feed-list { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--text); border-radius: 14px; background: var(--surface); overflow: hidden; }
.feed-list li { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px dashed var(--line-strong); font-size: .95rem; overflow-wrap: anywhere; }
.feed-list li:last-child { border-bottom: 0; }
.feed-text { flex: 1; min-width: 0; }
.feed-list a { color: var(--text); font-weight: 700; text-decoration-color: var(--line-strong); }
.feed-list a:hover { color: var(--orange); }
.feed-list time { color: var(--muted); white-space: nowrap; font-size: .85rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); flex: none; border: 1.5px solid var(--text); }
.empty { padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 14px; margin: 0; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lb-grid h3 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; }
.lb { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--text); border-radius: 14px; background: var(--surface); overflow: hidden; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px dashed var(--line-strong); min-width: 0; }
.lb li:last-child { border-bottom: 0; }
.lb .rank { width: 1.4em; color: var(--muted); font-family: var(--serif); font-variant-numeric: tabular-nums; font-weight: 800; }
.lb li:nth-child(1) .rank { color: var(--orange); }
.lb a { color: var(--text); text-decoration: none; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb a:hover { color: var(--orange); text-decoration: underline; }
.lb-meta { color: var(--muted); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { display: flex; gap: 14px; padding: 18px; border: 1.5px solid var(--text); border-radius: 14px; background: var(--surface); }
.steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; color: var(--on-orange); background: var(--emerald); border: 2px solid var(--text); }
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-soft); font-size: .92rem; }
.how .fine { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn-primary, .btn-ghost {
  appearance: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 14px 26px; border-radius: 12px; font: inherit; font-weight: 700; transition: transform .12s, box-shadow .12s, filter .15s, background .15s;
}
.btn-primary { border: 2px solid var(--text); color: var(--on-orange); background: linear-gradient(180deg, var(--orange-2), var(--orange)); box-shadow: 3px 3px 0 var(--text); }
.btn-primary:hover { filter: brightness(1.06); color: var(--on-orange); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--text); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { color: var(--text); background: var(--surface); border: 2px solid var(--text); }
.btn-ghost:hover { background: #fff; color: var(--text); border-color: var(--emerald); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--emerald); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--text-soft); font-weight: 600; }
label small { color: var(--muted); font-weight: 400; }
input[type=text], input:not([type]), input[type=url], input[type=email], select, textarea {
  width: 100%; min-height: 50px; padding: 13px 15px; border-radius: 10px; border: 1.5px solid var(--line-strong);
  background: #fffdf6; color: var(--text); font: inherit; font-size: 16px;
  box-shadow: inset 0 1px 2px rgba(20, 33, 61, .08); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
input[type=text]:hover, input:not([type]):hover, input[type=url]:hover, input[type=email]:hover, select:hover, textarea:hover { border-color: var(--text-soft); }
input[type=text]:focus, input:not([type]):focus, input[type=url]:focus, input[type=email]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--emerald); box-shadow: var(--focus);
}
::placeholder { color: #7b8296; opacity: 1; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }
input[type=color] { width: 64px; height: 48px; padding: 2px; border-radius: 10px; border: 1.5px solid var(--text); background: #fffdf6; cursor: pointer; }
input[type=file] { color: var(--muted); font-size: .85rem; max-width: 100%; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--emerald); flex: none; }
.row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.row .file { flex: 1; min-width: 160px; }
.check { flex-direction: row; align-items: center; gap: 12px; color: var(--text); min-height: 44px; font-weight: 500; }
.lab { display: flex; justify-content: space-between; align-items: baseline; }
.count { font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 500; }
.err { color: var(--danger); font-size: .84rem; font-weight: 600; }
.err:empty { display: none; }
.form-err { margin: 0; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 2rem; line-height: 1; cursor: pointer; width: 44px; height: 44px; border-radius: 10px; flex: none; }
.icon-btn:hover { color: var(--text); background: rgba(20, 33, 61, .08); }

/* ---------- content pages ---------- */
.narrow { max-width: 680px; margin: 48px auto 0; }
.narrow h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 14px; font-weight: 800; }
.prose h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--text-soft); }
.prose li { margin: 6px 0; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose details { border: 1.5px solid var(--text); border-radius: 12px; background: var(--surface); margin: 10px 0; }
.prose summary { cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 14px; min-height: 52px; align-items: center; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; color: var(--orange); font-size: 1.5rem; line-height: 1; flex: none; font-weight: 800; }
.prose details[open] summary::after { content: "\2212"; }
.prose details p { margin: 0; padding: 0 18px 18px; }
.big-code { font-family: var(--serif); font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; letter-spacing: -.04em; color: var(--text); line-height: 1; margin: 6px 0 14px; display: flex; justify-content: center; align-items: center; gap: .02em; }
.big-mark { width: .78em; height: .78em; color: var(--orange); animation: wobble 3s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(8deg) translateY(-4px); } }
.lost-note { font-family: var(--serif); font-style: italic; color: var(--muted); margin: -4px 0 18px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--emerald); animation: spin .8s linear infinite; margin-top: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.after { font-size: 1.25rem; margin-top: 28px; }
.landlord { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.landlord h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin-bottom: 6px; }
.deed-mark { flex: none; width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; font-family: var(--serif); font-size: 2.2rem; font-weight: 800; color: var(--text); background: var(--accent); border: 2px solid var(--text); box-shadow: 4px 4px 0 var(--text); }
.keybox { padding: 22px; border: 2px solid var(--text); border-radius: 14px; background: #fde7d3; box-shadow: 5px 5px 0 var(--orange); }
.keybox h2 { font-size: 1.3rem; margin-bottom: 8px; }
.keybox p { color: var(--text-soft); margin: 0 0 14px; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { min-width: 0; font-size: 14px; }
.linkrow .btn-primary, .linkrow .btn-ghost { min-height: 50px; padding: 0 20px; flex: none; }
.notice { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 14px; border: 1.5px solid var(--text); background: var(--surface); margin: 22px 0; }
.notice.ok { background: #d9efe4; }
.notice.ok::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--emerald); color: #fff; font-weight: 800; }
.notice.for-sale { background: #fde7d3; }
.notice p { margin: 4px 0 0; }
.notice-inline { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line-strong); font-size: .9rem; color: var(--text-soft); }
.notice-inline.ok { border-color: var(--emerald); color: var(--emerald); background: #d9efe4; }

/* ---------- manage page ---------- */
.manage { max-width: 1040px; margin: 32px auto 0; }
.manage-head h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); }
.manage-head { margin-bottom: 18px; }
.manage-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.card { padding: 22px; border: 2px solid var(--text); border-radius: 14px; background: var(--surface); box-shadow: 4px 4px 0 rgba(20, 33, 61, .9); }
.card h2 { font-size: 1.25rem; margin-bottom: 12px; }
.card .dlg-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.side-stack { display: flex; flex-direction: column; gap: 18px; }
.form-foot { margin-top: 14px; }
.form-ok { margin: 12px 0 0; color: var(--emerald); font-weight: 700; }
.form-ok[hidden] { display: none; }
.preview-col .adcard { margin-top: 8px; }

/* ---------- admin ---------- */
.admin-main { max-width: 960px; }
.admin-main h2 { margin: 30px 0 12px; font-size: 1.3rem; }
.acard { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px solid var(--text); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.acard img { border-radius: 10px; object-fit: cover; }
.ainfo { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.aact { display: flex; flex-direction: column; gap: 8px; }
.aact form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.aact input[type=text], .aact input:not([type]) { padding: 7px 10px; width: 160px; min-height: 0; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.btn-sm { border: 1.5px solid var(--text); background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 10px 14px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.btn-sm.ok { background: #bfe6d3; }
.btn-sm.bad { background: #f6c9bd; }
.pill { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); }
.inline { flex-direction: row; align-items: center; gap: 4px; font-size: .8rem; }
.msg.unread { background: #fff8e1; }
.msg.read { opacity: .75; }
.msg-body { white-space: pre-wrap; margin: 8px 0 0; color: var(--text); }

/* ---------- contact form ---------- */
.contact-form {
  position: relative; display: flex; flex-direction: column; gap: 20px; margin: 26px 0 10px; padding: 28px;
  border: 2px solid var(--text); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 5px 5px 0 rgba(20, 33, 61, .9);
}
.contact-form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--emerald) 0 18px, var(--orange) 18px 36px, var(--teal) 36px 54px); }
.contact-form[hidden] { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row2 > label { min-width: 0; }
select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5l6 6 6-6' stroke='%23047857' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px 9px;
}
select option { background: #fffdf6; color: var(--text); }
textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.contact-form .btn-primary { align-self: flex-start; min-width: 190px; min-height: 54px; font-size: 1.02rem; }
.contact-form .btn-primary::after { content: "\2192"; transition: transform .15s; }
.contact-form .btn-primary:hover::after { transform: translateX(4px); }
.contact-form .fine { margin: -4px 0 0; }

/* ---------- toast + confetti ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -140%); z-index: 70;
  max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 12px; font-weight: 700; text-align: center; font-size: .95rem;
  background: var(--text); color: #fff; border: 2px solid var(--sun); box-shadow: 0 20px 50px -10px rgba(20, 33, 61, .6);
  transition: transform .5s cubic-bezier(.2, 1.3, .3, 1);
}
.toast.show { transform: translate(-50%, 0); }
.toast[hidden] { display: block; visibility: hidden; }
.toast.show[hidden] { visibility: visible; }

/* ---------- tablet / phone ---------- */
@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 900px) {
  :root { --map-h: clamp(380px, 62vh, 620px); }
  @supports (height: 100dvh) { :root { --map-h: clamp(380px, 62dvh, 620px); } }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .stage { display: block; }
  .stats { display: flex; overflow-x: auto; gap: 10px; margin-left: -16px; margin-right: -16px; padding: 0 16px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: 0 0 auto; min-width: 150px; padding: 11px 14px; scroll-snap-align: start; }
  .stat dd { font-size: 1.25rem; }
  .stat .note { display: none; }
  .stat .bar { margin-top: 6px; }
  .stat.rush dd .of { display: none; }
  .compass { width: 48px; height: 48px; }

  /* the panel becomes a bottom sheet */
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; max-height: 52vh; border-radius: 20px 20px 0 0; border-width: 2px 0 0;
    padding-bottom: var(--safe-b); transform: translateY(104%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .9, .2, 1), visibility 0s .3s;
    box-shadow: 0 -20px 50px -20px rgba(20, 33, 61, .55); background: var(--surface);
  }
  @supports (height: 100dvh) { .panel { max-height: 52dvh; } .panel.tall { max-height: 88dvh; } }
  .panel.tall { max-height: 88vh; }
  .panel.open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .9, .2, 1); }
  .panel::before { content: ""; display: block; width: 42px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 0; position: sticky; top: 8px; }
  .pv, .buyform { padding: 14px 16px 20px; }
  .pv-idle { display: none; }
  .buy-foot { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--surface) 22%); padding-top: 14px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

  #mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px calc(10px + var(--safe-b)); border-top: 2px solid var(--text); background: var(--surface); box-shadow: 0 -14px 40px -20px rgba(20, 33, 61, .5); transition: transform .25s; }
  #mbar .amt { font-size: 1.7rem; }
  #mbar .btn-primary { flex: 1; min-height: 50px; padding: 12px; }
  body.sheet-open #mbar { transform: translateY(120%); }
  body.home { padding-bottom: calc(80px + var(--safe-b)); }
  .map-hint { display: none; }
  .map-key { left: 8px; bottom: 8px; gap: 8px; padding: 6px 9px; font-size: .68rem; }
}
@media (max-width: 760px) {
  main { padding: 0 16px 32px; }
  .top { padding: 12px 16px; }
  .top nav a:not(.nav-cta) { display: none; }
  .hero { padding: 6px 0 12px; display: block; }
  .hero .sub { display: none; }
  .hero .eyebrow { margin-bottom: 6px; letter-spacing: .14em; }
  .map { border-radius: 12px; }
  .map-tools { right: 8px; top: 8px; }
  .compass { left: 8px; top: 8px; }
  .prices, .feed, .leaders, .how { margin-top: 40px; }
  .tiers { grid-template-columns: 1fr; gap: 10px; }
  .tier { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 16px; }
  .tier .muted { grid-column: 1 / -1; }
  .tier-price { margin: 0; font-size: 1.9rem; grid-column: 2; grid-row: 1; }
  .steps { grid-template-columns: 1fr; }
  .lb-grid { grid-template-columns: 1fr; }
  .feed-list li { flex-wrap: wrap; padding: 12px 14px; }
  .feed-list time { width: 100%; padding-left: 24px; margin-top: -4px; }
  .foot { margin-top: 24px; padding-top: 28px; }
  .foot-grid { gap: 22px; }
  .narrow { margin-top: 28px; }
  .manage { margin-top: 18px; }
  .manage-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .card .dlg-grid { grid-template-columns: 1fr; gap: 16px; }
  .preview-col { order: -1; }
  .landlord { flex-direction: column; align-items: flex-start; gap: 12px; }
  .keybox { padding: 18px 16px; }
  .linkrow { flex-direction: column; }
  .linkrow .btn-primary, .linkrow .btn-ghost { width: 100%; }
  .acard { flex-direction: column; align-items: stretch; }
  .row2 { grid-template-columns: 1fr; gap: 20px; }
  .contact-form { padding: 22px 16px; border-radius: 12px; }
  .contact-form .btn-primary { align-self: stretch; }
  .toast { top: calc(10px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 380px) {
  .brand span { font-size: 1rem; }
  #mbar .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #fx { display: none; }
}

/* ================= map v2: toolbar, minimap, list view, details ================= */
.map::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 60px 6px rgba(20, 33, 61, .22); border-radius: inherit; }
.map-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.search-wrap { position: relative; flex: 1 1 220px; min-width: 0; }
.search-wrap input { min-height: 44px; padding: 9px 14px 9px 40px; border-radius: 99px; background: #fffdf6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23566079' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 14px center; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 2px solid var(--text); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; max-height: 320px; overflow-y: auto; }
.results[hidden] { display: none; }
.results button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px dashed var(--line-strong); background: transparent; color: var(--text); font: inherit; cursor: pointer; min-height: 46px; }
.results button:hover, .results button:focus-visible { background: var(--surface-2); }
.results button b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results small, .nb small { color: var(--muted); }
.results .none { margin: 0; padding: 12px 14px; color: var(--muted); }
.strip { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.chips, .jumps { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-btn { appearance: none; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--text); background: var(--surface); color: var(--text); transition: background .15s, transform .1s; }
.chip-btn:hover { background: #fff; }
.chip-btn[aria-pressed="true"] { background: var(--text); color: #fff; }
.chip-btn.plain { border-style: dashed; }
.chip-btn.view { background: var(--emerald); color: #fff; border-color: var(--text); }
.chip-btn.view[aria-pressed="true"] { background: var(--orange); }
.map-live { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; background: rgba(251, 246, 233, .94); border: 1.5px solid var(--text); font-size: .7rem; font-weight: 800; letter-spacing: .14em; pointer-events: none; }
.map-live i { width: 8px; height: 8px; border-radius: 50%; background: #dc2626; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .35; transform: scale(.7); } }
.map-nudge { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 3; padding: 9px 16px; border-radius: 99px; background: var(--text); color: #fff; font-size: .82rem; font-weight: 700; pointer-events: none; transition: opacity .45s, transform .45s; white-space: nowrap; box-shadow: var(--shadow); }
.map-nudge.gone { opacity: 0; transform: translate(-50%, 8px); }
.map-nudge[hidden] { display: none; }
.minimap { position: absolute; right: 12px; bottom: 12px; width: 120px; height: 80px; z-index: 3; border: 2px solid var(--text); border-radius: 8px; background: #a6d3d6; box-shadow: 2px 2px 0 var(--text); cursor: crosshair; touch-action: none; }
.only-touch { display: none !important; }
.map-tools { top: 52px; }
.compass { top: 52px; }
.listview { border: 2px solid var(--text); border-radius: 14px; background: var(--surface); padding: 18px; max-height: calc(var(--map-h) + 40px); overflow-y: auto; box-shadow: var(--shadow); }
.listview[hidden] { display: none; }
.ldistricts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.ld { padding: 12px 14px; border: 1.5px solid var(--text); border-radius: 12px; background: var(--bg); }
.ld h3 { font-size: 1.05rem; }
.ld p { margin: 2px 0 0; }
.ld-downtown { background: #f9e2b8; }
.ld-midtown { background: #cfe8e4; }
.lh { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 20px 0 8px; }
.lgroup { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-bottom: 8px; }
.lrow { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fffdf6; color: var(--text); font: inherit; cursor: pointer; min-height: 48px; flex-wrap: wrap; }
.lrow:hover { border-color: var(--text); background: #fff; }
.lrow b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow small { color: var(--muted); width: 100%; }
.lavail .lrow { justify-content: space-between; }
.lavail .lrow small { width: auto; font-weight: 700; color: var(--orange); }

/* plot details extras */
.scarcity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.scarcity li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line-strong); }
.scarcity li:last-child { border-bottom: 0; }
.scarcity li span { flex: 1; color: var(--text-soft); }
.scarcity i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--text); }
.scarcity b { font-variant-numeric: tabular-nums; font-size: .9rem; }
.breakdown { padding: 12px 14px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--bg); }
.breakdown dl { margin: 0; }
.breakdown dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .92rem; }
.breakdown dt { color: var(--text-soft); }
.breakdown dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.breakdown .total { border-top: 1.5px solid var(--text); margin-top: 4px; padding-top: 6px; font-size: 1.02rem; }
.breakdown .total dd { color: var(--orange); font-family: var(--serif); font-size: 1.15rem; }
.breakdown .fine { margin: 8px 0 0; }
.next-door .lbl { margin: 0 0 8px; }
.nb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nb { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: #fffdf6; color: var(--text); font: inherit; cursor: pointer; min-height: 52px; }
.nb:hover { border-color: var(--text); background: #fff; }
.nb .dot { grid-row: span 3; }
.nb .nb-dir { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.nb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.cta { position: sticky; bottom: 8px; z-index: 2; }

/* full screen map (phones) */
body.map-full { overflow: hidden; }
.map.full { position: fixed; inset: 0; z-index: 80; height: 100vh; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
body.map-full #mbar { display: none; }
body.map-full .panel { z-index: 90; }
.map.full .only-touch { display: grid !important; }
@media (max-width: 900px) {
  :root { --map-h: clamp(420px, 70vh, 720px); }
  @supports (height: 100dvh) { :root { --map-h: clamp(420px, 70dvh, 720px); } }
  .only-touch { display: grid !important; }
  .map-bar { gap: 8px; margin-bottom: 10px; }
  .search-wrap { flex: 1 1 0; }
  .strip { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; gap: 8px; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; width: calc(100% + 32px); }
  .strip::-webkit-scrollbar { display: none; }
  .chips, .jumps { flex-wrap: nowrap; flex: none; }
  .chip-btn { flex: none; min-height: 44px; }
  .minimap { width: 92px; height: 62px; right: 8px; bottom: 8px; }
  .map-key { bottom: 8px; left: 8px; max-width: calc(100% - 120px); }
  .map-nudge { bottom: 78px; }
  .map-tools { top: 44px; right: 8px; }
  .compass { top: 44px; left: 8px; }
  .map-live { top: 8px; }
  .ldistricts { grid-template-columns: 1fr; }
  .lgroup { grid-template-columns: 1fr; }
  .listview { max-height: none; padding: 14px; }
}
@media (pointer: coarse) { .map-nudge .hint-mouse { display: none; } }
@media (pointer: fine) { .map-nudge .hint-touch { display: none; } }

/* ================= form controls: dropzone, colour chips, checkbox, price, busy buttons ================= */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > .lab { color: var(--text-soft); font-size: .88rem; font-weight: 600; justify-content: flex-start; gap: 6px; }
.field > .lab small { color: var(--muted); font-weight: 500; }
.help { color: var(--muted); font-size: .8rem; }

/* upload dropzone */
.dropzone { position: relative; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); transition: border-color .15s, background .15s, box-shadow .15s; }
.dropzone:hover { border-color: var(--emerald); background: #f6f0dc; }
.dropzone:focus-within { border-color: var(--emerald); box-shadow: var(--focus); }
.dropzone.drag { border-color: var(--orange); background: #fde7d3; border-style: solid; }
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; text-align: center; cursor: pointer; color: var(--text); font-weight: 500; min-height: 44px; }
.dz-empty[hidden], .dz-file[hidden] { display: none; }
.dz-empty b { font-size: .95rem; }
.dz-empty small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.dz-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #d9efe4; color: var(--emerald); border: 2px solid var(--text); margin-bottom: 4px; transition: transform .2s; }
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { transform: translateY(-2px); }
.dropzone.has-file { border-style: solid; border-color: var(--text); background: var(--surface); }
.dz-file { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; }
.dz-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 2px solid var(--text); background: #fff; flex: none; }
.dz-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.dz-size { color: var(--muted); font-size: .8rem; }
.dz-remove { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--text); background: var(--surface); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.dz-remove:hover { background: #f6c9bd; }
.dz-remove:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }

/* colour chips */
.swatch-row { display: flex; flex-wrap: wrap; gap: 2px; margin: -4px; }
.swatches.enhanced .native-color { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.swatches { position: relative; }
.sw { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.sw::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid var(--text); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), inset 0 2px 0 rgba(255, 255, 255, .35); transition: transform .15s; }
.sw:hover::before { transform: scale(1.12); }
.sw[aria-checked="true"]::after { content: ""; position: absolute; inset: 2px; border: 3px solid var(--text); border-radius: 50%; animation: pop .2s ease-out; }
.sw .sw-check { position: absolute; color: #fff; font-weight: 800; font-size: .95rem; text-shadow: 0 0 3px rgba(0, 0, 0, .75), 0 0 1px #000; transform: scale(0); transition: transform .18s; }
.sw[aria-checked="true"] .sw-check { transform: scale(1); }
.sw:focus-visible { outline: 3px solid var(--emerald); outline-offset: 1px; }
.sw.custom:not(.picked)::before { background: conic-gradient(from 0deg, #dc2626, #f59e0b, #65a30d, #0e7490, #7c3aed, #db2777, #dc2626); }
.sw.custom:not(.picked) .sw-check { display: none; }
.sw.custom:not(.picked)::after { content: "+"; position: absolute; inset: auto; border: 0; color: #fff; font: 800 1.1rem/1 var(--sans); text-shadow: 0 0 3px #000; animation: none; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

/* checkbox */
.cbx { position: relative; display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 9px 0; min-height: 44px; cursor: pointer; color: var(--text); font-weight: 500; font-size: .92rem; line-height: 1.45; }
.cbx input { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.cbx .box { flex: none; width: 26px; height: 26px; border: 2px solid var(--text); border-radius: 8px; background: #fffdf6; display: grid; place-items: center; transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: 2px 2px 0 rgba(20, 33, 61, .25); }
.cbx .box::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .18s cubic-bezier(.2, 1.4, .4, 1); }
.cbx input:checked + .box { background: var(--emerald); }
.cbx input:checked + .box::after { transform: rotate(45deg) scale(1); }
.cbx input:focus-visible + .box { box-shadow: var(--focus); border-color: var(--emerald); }
.cbx:hover .box { border-color: var(--emerald); }
.cbx:has(+ .err:not(:empty)) .box { border-color: var(--danger); background: #fdecea; }
.cbx-text { padding-top: 2px; }

/* price input */
.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); pointer-events: none; }
.money-input input { padding-left: 32px; font-variant-numeric: tabular-nums; }

/* busy buttons + dialog footer */
.btn-primary[aria-busy="true"], .btn-ghost[aria-busy="true"] { pointer-events: none; opacity: .9; }
.btn-primary[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
.contact-form .btn-primary[aria-busy="true"]::after { content: none; }
.buy-foot { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
select { font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .sw[aria-checked="true"]::after { animation: none; } }

/* ================= map filters: caption bar, active chips, counts ================= */
.map-caption { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 16px; border-radius: 99px; background: var(--text); color: #fff; font-weight: 700; font-size: .86rem; line-height: 1.3; box-shadow: var(--shadow); animation: capin .25s ease-out; }
.map-caption[hidden] { display: none; }
.map.has-caption .map-live { display: none; }
.cap-text { min-width: 0; }
.cap-clear { flex: none; appearance: none; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 800; min-height: 32px; padding: 4px 14px; border-radius: 99px; border: 0; background: #fff; color: var(--text); }
.cap-clear:hover { background: var(--sun); }
.cap-clear:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes capin { from { opacity: 0; transform: translate(-50%, -8px); } }
.chip-btn[aria-pressed="true"]:not(.plain):not(.view)::before { content: "\2713"; margin-right: 6px; font-weight: 800; }
.chip-n { margin-left: 7px; padding: 1px 8px; border-radius: 99px; background: rgba(20, 33, 61, .1); font-size: .76rem; font-variant-numeric: tabular-nums; }
.chip-btn[aria-pressed="true"] .chip-n { background: rgba(255, 255, 255, .22); }
@media (max-width: 900px) {
  .map-caption { border-radius: 16px; font-size: .8rem; top: 8px; padding: 8px 8px 8px 12px; max-width: calc(100% - 16px); }
}
@media (prefers-reduced-motion: reduce) { .map-caption { animation: none; } }
