:root {
  --green-900: #10261a;
  --green-800: #174a31;
  --green-700: #1f6f4a;
  --green-500: #3f9b4f;
  --green-200: #cfe8c6;
  --green-50: #f1f7ee;
  --paper: #fbfaf6;
  --ink: #1c2a22;
  --muted: #5e6d64;
  --line: #e2e6de;
  --garden: #e0892b;
  --warn: #f2c14e;
  --bad: #d9534f;
  --purple: #7b4fd6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 38, 26, .06), 0 8px 24px rgba(16, 38, 26, .08);
  --display: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-700); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--green-900); }
.brand-icon { display: block; }
.brand-lg { flex-direction: column; text-align: center; gap: 18px; }
.brand-lg .brand-icon { width: 88px; height: 88px; filter: drop-shadow(0 8px 18px rgba(31, 111, 74, .35)); }
.brand-lg h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
.brand-sm .brand-icon { width: 34px; height: 34px; }
.brand-sm span { font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }

/* ---------- Landing ---------- */
.landing {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #dcefd3 0%, transparent 60%),
    radial-gradient(800px 500px at 100% 100%, #e8f1dd 0%, transparent 60%),
    var(--paper);
  position: relative; overflow: hidden;
}
.landing::before {
  /* faint street grid */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(31, 111, 74, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 111, 74, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: rotate(-29deg) scale(1.6);
}
.landing-card { position: relative; width: 100%; max-width: 620px; text-align: center; }
.tagline { font-size: 1.1rem; line-height: 1.55; color: var(--muted); margin: 18px auto 34px; max-width: 520px; }

.zip-form { text-align: left; }
.zip-label { display: block; font-weight: 700; margin-bottom: 10px; text-align: center; font-size: 1.05rem; }
.zip-row {
  display: flex; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px; box-shadow: var(--shadow); max-width: 440px; margin: 0 auto;
}
.zip-row:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(63, 155, 79, .15), var(--shadow); }
.zip-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 18px; font-size: 1.25rem; letter-spacing: .12em; }
.zip-row button, .zip-form-inline button {
  border: 0; border-radius: 999px; background: var(--green-700); color: #fff; font-weight: 700; padding: 10px 26px;
  transition: background .15s;
}
.zip-row button:hover, .zip-form-inline button:hover { background: var(--green-800); }
.form-error { color: var(--bad); text-align: center; min-height: 1.4em; margin: 10px 0 0; font-size: .95rem; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .88rem; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--green-500); background: var(--green-50); }

.sources { position: relative; margin-top: 56px; font-size: .82rem; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- Planner layout ---------- */
.planner { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line);
  position: relative; z-index: 1100; /* above Leaflet panes and controls so the account menu can overlap the map */
}
.zip-form-inline { display: flex; gap: 6px; }
.zip-form-inline input {
  width: 130px; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; outline: 0; letter-spacing: .08em;
}
.zip-form-inline input:focus { border-color: var(--green-500); }
.zip-form-inline button { padding: 8px 18px; }

.workspace { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 400px; flex-shrink: 0; overflow-y: auto; background: var(--paper); border-right: 1px solid var(--line); padding: 20px 18px 28px; }
.map-wrap { flex: 1; position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #e9ece6; }
#map.proposing { cursor: crosshair; }

@media (max-width: 820px) {
  .workspace { flex-direction: column-reverse; }
  .sidebar { width: 100%; border-right: 0; border-top: 1px solid var(--line); flex: 1; }
  .map-wrap { flex: none; height: 52vh; }
  .brand-sm span { display: none; }
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.tab {
  border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.tab:hover { background: var(--green-50); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--green-50); color: var(--green-800); font-weight: 700; }
.tab-panel { flex: 1; min-height: 0; overflow-y: auto; background: var(--paper); }

/* ---------- Park explorer ---------- */
.explore-panel { background: #f3f5ef; }
.explore-shell { width: min(100% - 48px, 1040px); margin: 0 auto; padding: 42px 0 64px; }
.explore-heading, .results-topline, .receipt-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.explore-heading { padding: 8px 0 34px; border-bottom: 1px solid #d9dfd4; }
.explore-heading h1, .results-topline h1 { font-family: var(--display); font-weight: 600; font-size: 3rem; line-height: 1.05; margin: 8px 0 10px; }
.explore-heading p { margin: 0; max-width: 540px; color: var(--muted); font-size: 1.04rem; line-height: 1.55; }
.explore-index { color: #6c786d; font-size: .72rem; letter-spacing: .08em; white-space: nowrap; padding-top: 8px; }
.explore-form { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 44px; padding-top: 32px; }
.quiz-step { min-width: 0; padding: 0; border: 0; margin: 0; }
.quiz-step:first-child { grid-column: 1 / -1; }
.quiz-step legend { padding: 0; font-size: 1.12rem; font-weight: 700; }
.quiz-step legend span { color: #b35b3f; font-family: var(--display); font-size: 1rem; margin-right: 11px; }
.quiz-hint { margin: 6px 0 14px 34px; font-size: .88rem; color: var(--muted); }
.choice-grid { display: grid; gap: 9px; margin-top: 15px; }
.borough-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pace-choices { grid-template-columns: 1fr; }
.experience-choices { grid-template-columns: 1fr 1fr; }
.choice-card { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 70px; padding: 13px 14px 13px 38px; border: 1px solid #d9dfd4; border-radius: 8px; background: rgba(255,255,255,.72); cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.choice-card:hover { border-color: #66856e; transform: translateY(-1px); }
.choice-card:has(input:checked) { border-color: var(--green-700); background: #e8f0e5; box-shadow: inset 0 0 0 1px var(--green-700); }
.choice-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-card:focus-within { outline: 3px solid rgba(63,155,79,.24); outline-offset: 2px; }
.choice-check { position: absolute; top: 50%; left: 13px; width: 15px; height: 15px; border: 1.5px solid #9ca89d; border-radius: 50%; transform: translateY(-50%); }
.borough-choices .choice-check { border-radius: 4px; }
.choice-card:has(input:checked) .choice-check { border-color: var(--green-700); background: var(--green-700); box-shadow: inset 0 0 0 3px #e8f0e5; }
.choice-name { font-weight: 700; font-size: .91rem; line-height: 1.25; }
.choice-number { position: absolute; right: 11px; bottom: 9px; font-size: .65rem; color: #89948a; }
.choice-desc { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.quiz-submit { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 18px; border-top: 1px solid #d9dfd4; padding-top: 20px; }
.quiz-submit .form-error { flex: 1; text-align: left; margin: 0; }
.explore-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; border: 0; border-radius: 7px; padding: 13px 17px; background: var(--green-800); color: white; font-weight: 700; transition: background .16s, transform .16s; }
.explore-button:hover { background: var(--green-900); transform: translateY(-1px); }
.explore-button span { font-size: 1.1rem; }
.results-topline { align-items: center; padding-bottom: 26px; }
.results-topline h1 { margin-bottom: 0; }
.text-button { border: 0; background: none; color: var(--green-800); font-weight: 700; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.results-meta { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #d9dfd4; color: var(--muted); font-size: .82rem; }
.results-meta i { margin: 0 5px; font-style: normal; color: #b35b3f; }
.park-card { display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border: 1px solid #e0e4dc; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 28px rgba(28,42,34,.08); touch-action: pan-y; }
.park-photo { min-height: 540px; position: relative; overflow: hidden; background: #7d9078; }
.park-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.park-photo::after { content: ''; position: absolute; inset: 48% 0 0; background: linear-gradient(transparent, rgba(10,25,17,.48)); pointer-events: none; }
.photo-credit, .park-borough { position: absolute; z-index: 1; color: #fff; }
.photo-credit { left: 15px; bottom: 13px; font-size: .68rem; color: #fff; text-decoration: none; text-shadow: 0 1px 5px #18261d; }
.photo-credit:hover { text-decoration: underline; text-underline-offset: 2px; }
.park-borough { top: 16px; left: 16px; padding: 7px 10px; color: var(--ink); background: rgba(255,255,255,.92); border-radius: 5px; font-size: .75rem; font-weight: 700; }
.park-copy { display: flex; flex-direction: column; padding: 30px 30px 24px; }
.park-route { color: #a75037; font-size: .69rem; letter-spacing: .07em; font-weight: 700; }
.park-copy h2 { font-family: var(--display); font-weight: 600; font-size: 2.15rem; line-height: 1.1; margin: 9px 0 12px; }
.park-known { color: #425148; margin: 0; font-size: .98rem; line-height: 1.5; }
.park-why { margin: 14px 0 0; padding: 11px 12px; border-left: 3px solid #c38236; background: #f8f3e8; color: #46574a; font-size: .88rem; line-height: 1.5; }
.park-why span { display: block; margin-bottom: 3px; color: #a75037; font-size: .66rem; font-weight: 700; }
.park-details { display: grid; gap: 16px; padding: 22px 0 16px; margin-top: 12px; border-top: 1px solid var(--line); }
.park-details h3, .receipt-block h2 { margin: 0 0 5px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.park-details p, .receipt-block p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.park-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding: 8px 0 18px; }
.park-tags span { display: grid; place-items: center; min-height: 43px; min-width: 70px; padding: 6px 9px; border: 1px solid #d7dfd4; border-radius: 7px; background: #f2f5ef; color: #405348; font-size: .7rem; text-align: center; }
.park-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); padding: 13px 0; }
.button-outline { border: 1px solid #cbd5cb; border-radius: 6px; padding: 8px 10px; background: #fff; color: var(--green-800); font-size: .8rem; font-weight: 700; }
.button-outline:hover:not(:disabled) { background: #edf3e9; }
.button-outline:disabled { opacity: .4; cursor: default; }
.swipe-hint { color: #768177; font-size: .72rem; }
.choose-park { width: 100%; }
.itinerary-shell { max-width: 760px; }
.itinerary-shell.is-printing > .receipt-topline,
.itinerary-shell.is-printing > .receipt-actions,
.itinerary-shell.is-printing > .receipt-export-status,
.itinerary-shell.is-printing > .back-to-matches { display: none; }
.receipt-topline { align-items: center; margin-bottom: 18px; }
.receipt-printer { position: relative; z-index: 0; width: min(100%, 590px); margin: 0 auto; }
.printer-casing { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; height: 76px; padding: 9px 18px 19px; border: 2px solid #778679; border-bottom: 0; border-radius: 14px 14px 2px 2px; background: #dfe5dc; color: var(--ink); box-shadow: inset 0 4px 0 #f4f6f1, 0 3px 8px rgba(16,38,26,.16); }
.printer-casing::before { content: ''; position: absolute; top: 9px; left: 11px; right: 11px; height: 2px; background: #c1cbc0; }
.printer-status { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .61rem; letter-spacing: .04em; }
.printer-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid #b7ff98; background: var(--green-900); box-shadow: 3px 3px 0 rgba(0,0,0,.28); color: #a7ff80; image-rendering: pixelated; text-align: right; }
.printer-lights { display: inline-flex; align-items: center; gap: 3px; }
.printer-lights i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #4b7758; }
.receipt-printer.is-printing .printer-lights i { animation: printer-light-blink .72s steps(2, end) infinite; }
.receipt-printer.is-printing .printer-lights i:nth-child(2) { animation-delay: .12s; }
.receipt-printer.is-printing .printer-lights i:nth-child(3) { animation-delay: .24s; }
.printer-status-label { white-space: nowrap; }
@keyframes printer-light-blink {
  0%, 45% { background: #4b7758; box-shadow: none; transform: scale(.9); }
  50%, 100% { background: #a7ff80; box-shadow: 0 0 4px #a7ff80; transform: scale(1); }
}
.printer-slot { position: absolute; left: 15px; right: 15px; bottom: 0; height: 12px; border: 1px solid #526255; border-bottom: 0; border-radius: 3px 3px 0 0; background: var(--green-900); box-shadow: inset 0 3px 4px rgba(0,0,0,.38); }
.itinerary-receipt { position: relative; width: calc(100% - 34px); max-width: 556px; margin: 0 auto; overflow: hidden; border: 1px solid #c8c5b9; border-radius: 2px; background: #fffef9; box-shadow: 0 2px 5px rgba(28,42,34,.1), 0 14px 30px rgba(28,42,34,.08); clip-path: polygon(0 0, 100% 0, 100% 98.8%, 96% 100%, 92% 98.8%, 88% 100%, 84% 98.8%, 80% 100%, 76% 98.8%, 72% 100%, 68% 98.8%, 64% 100%, 60% 98.8%, 56% 100%, 52% 98.8%, 48% 100%, 44% 98.8%, 40% 100%, 36% 98.8%, 32% 100%, 28% 98.8%, 24% 100%, 20% 98.8%, 16% 100%, 12% 98.8%, 8% 100%, 4% 98.8%, 0 100%); }
.receipt-printer > .itinerary-receipt { z-index: 2; }
.itinerary-receipt.is-printing { animation: receipt-feed 6.4s steps(88, end) both; }
.receipt-printer.is-tearing > .itinerary-receipt { animation: receipt-tear .76s cubic-bezier(.35,.02,.7,.45) forwards; }
.receipt-printer.is-torn::after { content: ''; position: absolute; z-index: 1; top: 47px; left: 30px; right: 30px; height: 40px; background: #fffef9; clip-path: polygon(0 0, 100% 0, 100% 76%, 94% 100%, 87% 75%, 80% 100%, 73% 76%, 66% 100%, 59% 75%, 52% 100%, 45% 76%, 38% 100%, 31% 75%, 24% 100%, 17% 76%, 10% 100%, 4% 75%, 0 96%); }
.receipt-printer.is-torn > .itinerary-receipt { transform: translateY(40px) rotate(1.1deg); filter: drop-shadow(0 10px 8px rgba(28,42,34,.2)); clip-path: polygon(0 2%, 4% 0, 8% 2.5%, 12% 0, 16% 2.5%, 20% 0, 24% 2.5%, 28% 0, 32% 2.5%, 36% 0, 40% 2.5%, 44% 0, 48% 2.5%, 52% 0, 56% 2.5%, 60% 0, 64% 2.5%, 68% 0, 72% 2.5%, 76% 0, 80% 2.5%, 84% 0, 88% 2.5%, 92% 0, 96% 2.5%, 100% 0, 100% 98.8%, 96% 100%, 92% 98.8%, 88% 100%, 84% 98.8%, 80% 100%, 76% 98.8%, 72% 100%, 68% 98.8%, 64% 100%, 60% 98.8%, 56% 100%, 52% 98.8%, 48% 100%, 44% 98.8%, 40% 100%, 36% 98.8%, 32% 100%, 28% 98.8%, 24% 100%, 20% 98.8%, 16% 100%, 12% 98.8%, 8% 100%, 4% 98.8%, 0 100%); }
@keyframes receipt-feed {
  from { clip-path: inset(100% 0 0 0); opacity: 1; transform: translateY(calc(-100% + 6px)); }
  to { clip-path: inset(0); opacity: 1; transform: translateY(0); }
}
@keyframes receipt-tear {
  0% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(3px) rotate(-.25deg); }
  58% { transform: translateY(54px) rotate(2deg); }
  100% { transform: translateY(40px) rotate(1.1deg); }
}
.itinerary-receipt::before, .itinerary-receipt::after { content: ''; position: absolute; z-index: 2; top: 46px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(28,42,34,.12); }
.itinerary-receipt::before { left: -6px; }
.itinerary-receipt::after { right: -6px; }
.receipt-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px 26px; background: #f3f1e8; color: var(--ink); border-bottom: 2px dashed #bfc2b7; }
.receipt-brand, .receipt-number { display: flex; flex-direction: column; gap: 4px; }
.receipt-brand span, .receipt-number span { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .68rem; color: var(--muted); }
.receipt-brand strong { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.receipt-number { text-align: right; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.receipt-number strong { font-size: .9rem; font-variant-numeric: tabular-nums; }
.receipt-body { padding: 25px 31px 24px; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }
.receipt-date, .receipt-label { color: #a75037; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .68rem; font-weight: 700; }
.receipt-date { margin: 0 0 9px; }
.receipt-body > h1 { font-family: var(--display); font-weight: 600; font-size: 2.35rem; line-height: 1.08; margin: 0 0 5px; }
.receipt-route { margin: 0; color: var(--muted); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .84rem; }
.receipt-why { margin: 13px 0 0; max-width: 640px; color: #46574a; font-size: .91rem; line-height: 1.5; }
.receipt-stickers { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 15px 0 5px; padding: 2px 3px 4px; }
.receipt-sticker { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 34px; padding: 7px 11px; border: 1px dashed #87703d; border-radius: 11px 8px 12px 9px; box-shadow: 0 2px 0 rgba(28,42,34,.08); color: #38463b; font-size: .66rem; font-weight: 700; transform: rotate(-1.5deg); }
.receipt-sticker b { color: #a75037; font-size: .9rem; }
.sticker-sun { background: #f4e2a2; }
.sticker-leaf { border-color: #849b7c; background: #e3eddb; transform: rotate(1deg); }
.sticker-sky { border-color: #849aa1; background: #e1edf0; transform: rotate(-.5deg); }
.receipt-destination { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; padding: 13px 0; border-top: 1px dashed #bfc2b7; border-bottom: 1px dashed #bfc2b7; background: transparent; }
.receipt-label { display: block; margin-bottom: 4px; }
.receipt-destination p { margin: 0; font-weight: 700; font-size: .91rem; }
.map-link { display: inline-block; margin-top: 7px; color: var(--green-800); font-family: var(--sans); font-weight: 700; font-size: .84rem; }
.map-link span { margin-left: 5px; }
.receipt-qr { flex: 0 0 100px; width: 100px; height: 100px; display: grid; place-items: center; padding: 7px; border: 1px solid #dce2d8; background: #fffdf8; }
.receipt-qr canvas, .receipt-qr img { display: block; width: 84px !important; height: 84px !important; }
.receipt-section { margin-top: 17px; padding-top: 13px; border-top: 1px dashed #bfc2b7; }
.receipt-section-intro { margin: -2px 0 8px 24px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.receipt-section-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.receipt-section-heading > span { color: #a75037; font-family: var(--display); font-weight: 600; }
.receipt-section-heading h2 { margin: 0; font-size: .9rem; }
.nearby-stops { margin: 0; padding: 0; list-style: none; }
.nearby-stops li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px dashed #dfe4dc; }
.nearby-stops li:first-child { border-top: 0; }
.stop-type { color: #617065; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.stop-copy { min-width: 0; }
.stop-copy strong { font-size: .87rem; }
.stop-copy p { margin: 3px 0 0; color: var(--muted); font-size: .79rem; line-height: 1.4; }
.nearby-stops a { color: var(--green-800); font-size: .77rem; font-weight: 700; white-space: nowrap; }
.receipt-lower { display: block; margin-top: 13px; }
.receipt-field { min-width: 0; padding: 14px 0; border: 0; border-top: 1px dashed #bfc2b7; background: transparent; }
.receipt-field .receipt-section-heading { margin-bottom: 7px; }
.receipt-field p { margin: 0; color: #4c5b50; font-size: .8rem; line-height: 1.45; }
.field-notes { margin: 0; padding: 0; list-style: none; }
.field-notes li { padding: 9px 0; border-top: 1px dashed #dfe4dc; }
.field-notes li:first-child { border-top: 0; padding-top: 2px; }
.field-notes strong { display: block; margin-bottom: 3px; color: #405348; font-size: .75rem; }
.field-notes p { color: var(--muted); font-size: .78rem; }
.prep-block { border-left: 0; background: transparent; }
.receipt-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 17px 24px 24px; border-top: 2px dashed #bfc2b7; color: #647268; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .62rem; font-weight: 700; text-align: center; }
.receipt-footer::before { content: ''; width: 170px; height: 42px; background: repeating-linear-gradient(90deg, #1c2a22 0 2px, transparent 2px 4px, #1c2a22 4px 5px, transparent 5px 9px, #1c2a22 9px 13px, transparent 13px 16px, #1c2a22 16px 17px, transparent 17px 20px); }
.receipt-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px auto 0; }
.receipt-actions .button-outline { padding: 12px 14px; }
.receipt-actions button:disabled { opacity: .56; cursor: wait; transform: none; }
.receipt-export-status { min-height: 1.2em; margin: 7px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.back-to-matches { margin-top: 14px; }
@media (max-width: 820px) {
  .explore-shell { width: min(100% - 32px, 650px); padding-top: 28px; }
  .explore-form { grid-template-columns: 1fr; gap: 28px; }
  .quiz-step:first-child, .quiz-submit { grid-column: auto; }
  .borough-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .park-card { grid-template-columns: 1fr; }
  .park-photo { min-height: 300px; }
}
@media (max-width: 500px) {
  .explore-shell { width: min(100% - 24px, 440px); padding: 22px 0 38px; }
  .explore-heading { padding-bottom: 22px; }
  .explore-index { display: none; }
  .explore-heading h1, .results-topline h1 { font-size: 2.2rem; }
  .explore-heading p { font-size: .94rem; }
  .borough-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-choices { grid-template-columns: 1fr; }
  .quiz-submit { align-items: stretch; flex-direction: column; }
  .quiz-submit .form-error { flex: auto; }
  .quiz-submit .explore-button { width: 100%; }
  .results-topline { align-items: flex-start; }
  .park-photo { min-height: 230px; }
  .park-copy { padding: 22px 18px; }
  .park-copy h2 { font-size: 1.85rem; }
  .receipt-body { padding: 22px 17px; }
  .receipt-body > h1 { font-size: 2rem; }
  .receipt-stickers { gap: 7px; }
  .receipt-sticker { min-height: 32px; padding: 6px 9px; font-size: .62rem; }
  .receipt-header { padding: 15px 17px; }
  .receipt-footer { padding: 12px 17px; }
  .printer-casing { padding-left: 14px; padding-right: 14px; }
  .printer-status { font-size: .55rem; }
  .receipt-destination { align-items: flex-start; }
  .receipt-qr { flex-basis: 84px; width: 84px; height: 84px; padding: 4px; }
  .receipt-qr canvas, .receipt-qr img { width: 74px !important; height: 74px !important; }
  .nearby-stops li { grid-template-columns: 60px minmax(0, 1fr); }
  .nearby-stops a { grid-column: 2; }
  .receipt-lower { grid-template-columns: 1fr; }
  .swipe-hint { display: none; }
  .receipt-actions { flex-direction: column; }
  .receipt-actions > * { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .itinerary-receipt.is-printing, .receipt-printer.is-tearing > .itinerary-receipt { animation: none; }
  .receipt-printer.is-printing .printer-lights i { animation: none; background: #a7ff80; box-shadow: 0 0 3px #a7ff80; }
  .receipt-printer.is-torn > .itinerary-receipt { transform: translateY(30px); }
}

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; margin: 0; }
}

/* ---------- Map overlays ---------- */
.map-loading {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 10px; background: #fff; padding: 9px 16px; border-radius: 999px;
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 500; white-space: nowrap;
}
.spinner { width: 16px; height: 16px; border: 2.5px solid var(--green-200); border-top-color: var(--green-700); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
.spinner-sm { width: 12px; height: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.propose-btn {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1000;
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; color: #fff; background: var(--purple);
  box-shadow: 0 6px 20px rgba(123, 79, 214, .4); white-space: nowrap; transition: background .15s;
}
.propose-btn:hover { background: #6a3fc4; }
.propose-btn.active { background: var(--green-900); box-shadow: 0 6px 20px rgba(16, 38, 26, .35); }

.proposal-pin { background: none; border: 0; }
.proposal-pin span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--purple); color: #fff; font-weight: 700; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.proposal-pin i { transform: rotate(45deg); font-style: normal; font-size: 18px; line-height: 1; }

.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--sans); font-size: .9rem; line-height: 1.45; }
.pop strong { display: block; font-size: 1rem; margin: 2px 0; }
.pop-kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

.proposal-form { display: flex; flex-direction: column; gap: 7px; }
.proposal-form input, .proposal-form select, .proposal-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; font-size: .9rem;
}
.proposal-form .pf-name { font-weight: 700; }
.impact { border-radius: 8px; padding: 7px 9px; font-size: .85rem; }
.impact strong { font-size: .9rem; margin: 0 0 1px; }
.impact-high { background: #fde7e6; color: #8f2320; }
.impact-mid { background: #fdf3d5; color: #7a5a06; }
.impact-low { background: var(--green-50); color: var(--green-800); }
.pf-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.pf-delete { border: 0; background: none; color: var(--bad); font-weight: 700; padding: 4px 0; }

/* ---------- Profile ---------- */
.profile-head { margin-bottom: 16px; }
.kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--green-700); }
.profile-head h2 { font-family: var(--display); font-weight: 600; font-size: 1.9rem; margin: 4px 0 2px; letter-spacing: -.01em; }
.profile-head .place { display: block; font-family: var(--sans); font-size: 1.05rem; font-weight: 500; color: var(--ink); letter-spacing: 0; margin-top: 2px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.profile-head p { margin: 4px 0 0; font-size: .9rem; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px 12px; min-height: 104px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--green-800); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .95rem; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat-label { font-weight: 700; font-size: .9rem; margin-top: 4px; }
.stat-sub { font-size: .76rem; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.info { color: var(--muted); font-weight: 400; cursor: help; }
.stat.skeleton { background: linear-gradient(90deg, #f1f2ee 25%, #f8f9f6 50%, #f1f2ee 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-color: transparent; }
@keyframes shimmer { to { background-position: -200% 0; } }

.aqi-badge { display: inline-block; min-width: 2.2em; text-align: center; padding: 0 10px; border-radius: 9px; color: #fff; }
.aqi-good { background: #3f9b4f; }
.aqi-moderate { background: #d6a21e; }
.aqi-usg { background: #e0762b; }
.aqi-bad { background: var(--bad); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: .98rem; }
.card p { margin: 8px 0 0; font-size: .88rem; line-height: 1.45; }
.note { color: var(--muted); }
.good-note { color: var(--purple); }
.error-card h2 { font-family: var(--display); margin: 0 0 6px; }

.meter { margin-bottom: 10px; }
.goal-row { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 5px; }
.goal-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { position: relative; height: 8px; border-radius: 99px; background: #eef0ea; overflow: visible; }
.bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; max-width: 100%; }
.bar span.ok { background: var(--green-500); }
.bar span.low { background: var(--warn); }
.bar span.projected { background: #c6b3f0; }
.goal { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.goal .small { margin-top: 5px; }

.layer-list { display: flex; flex-direction: column; gap: 2px; }
.layer { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.layer:hover { background: var(--green-50); }
.layer input { accent-color: var(--green-700); width: 16px; height: 16px; margin: 0; }
.swatch { width: 18px; height: 14px; border-radius: 4px; flex-shrink: 0; opacity: .85; }
.swatch.dot { width: 12px; height: 12px; border-radius: 50%; margin: 0 3px; opacity: 1; }
.layer-text { display: flex; flex-direction: column; font-size: .9rem; font-weight: 500; }
.layer-text small { color: var(--muted); font-weight: 400; font-size: .78rem; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.rank li:first-child { border-top: 0; padding-top: 0; }
.rank li span { display: flex; flex-direction: column; }
.rank small { color: var(--muted); font-size: .76rem; }
.rank strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cap::first-letter { text-transform: uppercase; }

.air { margin: 8px 0 0; }
.air div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.air div:first-child { border-top: 0; }
.air dt { color: var(--ink); }
.air dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.air dd small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }

.proposal-list { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: p; }
.proposal-list li button {
  width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left;
  border: 0; background: none; padding: 7px 4px; border-radius: 8px; font-size: .88rem;
}
.proposal-list li button:hover { background: #f3eefc; }
.proposal-list li button span::before { content: '●'; color: var(--purple); margin-right: 8px; }
.proposal-list small { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.row-actions { display: flex; gap: 10px; align-items: center; }
.btn-secondary { border: 1.5px solid var(--purple); color: var(--purple); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .85rem; }
.btn-secondary:hover { background: #f3eefc; }
.btn-link { border: 0; background: none; color: var(--muted); font-size: .85rem; text-decoration: underline; }

.footnote { font-size: .74rem; color: var(--muted); line-height: 1.5; margin: 14px 2px 0; }

/* ---------- Shared controls ---------- */
.btn-primary {
  border: 0; border-radius: 999px; background: var(--green-700); color: #fff; font-weight: 700;
  padding: 8px 16px; font-size: .88rem; white-space: nowrap; transition: background .15s;
}
.btn-primary:hover { background: var(--green-800); }
.btn-green { border-color: var(--green-700); color: var(--green-700); }
.btn-green:hover { background: var(--green-50); }
.linkish { border: 0; background: none; padding: 0; color: var(--green-700); font-weight: 500; text-align: left; text-decoration: underline; text-decoration-color: var(--green-200); text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: currentColor; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: #eef0ea; color: var(--muted); }
.tag-native { background: var(--green-50); color: var(--green-800); }
.tag-public { background: #e3effc; color: #1d4f8a; }
.tag-petition { background: #f3eefc; color: #5b34b0; }
.tag-project { background: #fdf0e1; color: #9a5510; }
.panel-title { font-family: var(--display); font-weight: 600; font-size: 1.6rem; margin: 4px 0 10px; letter-spacing: -.01em; line-height: 1.15; }
.empty-hint { text-align: center; padding: 22px 12px; color: var(--muted); }
.empty-hint p { margin: 6px auto 0; max-width: 340px; line-height: 1.5; font-size: .9rem; }
.empty-icon { font-size: 1.8rem; }

/* ---------- Build Ideas ---------- */
#advisor-map { position: absolute; inset: 0; background: #e9ece6; cursor: crosshair; }
.advisor-panel { width: 460px; }
.ask { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.ask-sentence { margin: 0; font-size: 1.05rem; line-height: 2.1; }
.ask-sentence select {
  border: 0; border-bottom: 2px solid var(--green-500); background: var(--green-50); border-radius: 6px 6px 0 0;
  padding: 2px 6px; font-weight: 700; color: var(--green-800); max-width: 100%;
}
.ask-where { font-weight: 700; color: var(--purple); }
.ask-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.answer { margin-top: 16px; }
.answer-where { font-weight: 700; font-size: 1.1rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.fact { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fact div { display: flex; flex-direction: column; }
.fact strong { font-size: .95rem; }
.fact span:not(.fact-icon) { font-size: .76rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.fact-icon { font-size: 1.3rem; line-height: 1; }
.sun-full { background: #fff8e1; border-color: #f3e0a0; }
.sun-part { background: #fdfbf2; }
.sun-shade { background: #eef1f4; border-color: #d8dee5; }
.fact-gap { background: #fde7e6; border-color: #f4c6c3; }
.sun-why { margin: 4px 2px 0; line-height: 1.45; }
.answer-h { font-size: 1rem; margin: 20px 0 10px; }

.opps { display: flex; flex-direction: column; gap: 8px; }
.opp { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.opp-primary { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(63, 155, 79, .12); }
.opp summary { display: flex; gap: 10px; align-items: center; padding: 11px 14px; cursor: pointer; font-weight: 700; font-size: .92rem; list-style: none; }
.opp summary::-webkit-details-marker { display: none; }
.opp summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.opp[open] summary::after { transform: rotate(180deg); }
.opp-icon { font-size: 1.1rem; }
.opp-body { padding: 0 14px 14px; font-size: .88rem; line-height: 1.5; }
.opp-body p { margin: 8px 0; }
.opp-body ul { margin: 0; padding-left: 18px; }
.opp-body ul li { margin: 3px 0; }
.opp-body ul.lots { list-style: none; padding: 0; }
.opp-body ul.lots li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.opp-body ul.lots li:first-child { border-top: 0; }
.steps { margin: 8px 0; padding-left: 20px; }
.steps li { margin: 4px 0; }
.opp-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-weight: 700; font-size: .85rem; }
.opp-actions { margin-top: 8px; }

.plants { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plant { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; }
.plant-top { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.plant-top strong { font-size: .92rem; line-height: 1.25; }
.plant-latin { font-size: .74rem; color: var(--muted); font-style: italic; margin-top: 2px; }
.plant p { font-size: .8rem; line-height: 1.45; margin: 6px 0; flex: 1; }
.plant-sun { font-size: .8rem; letter-spacing: 2px; }
.garden-designer { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.designer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.designer-head h3 { margin: 0; font-size: 1rem; }
.designer-head p { margin: 3px 0 10px; color: var(--muted); font-size: .78rem; }
.designer-reset { padding: 3px 0; white-space: nowrap; }
.designer-toolbar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.designer-toolbar button, .designer-upload { white-space: nowrap; }
.designer-upload { display: inline-flex; align-items: center; cursor: pointer; }
.designer-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.designer-gallery-item {
  display: grid; align-content: center; justify-items: center; gap: 3px; min-width: 0; min-height: 78px;
  padding: 5px 4px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); cursor: pointer;
}
.designer-gallery-item:hover { border-color: var(--green-500); background: var(--green-50); }
.designer-gallery-item:focus-visible { outline: 2px solid var(--green-700); outline-offset: 1px; }
.designer-gallery-art { font-size: 1.8rem; line-height: 1; }
.designer-gallery-name { width: 100%; overflow: hidden; font-size: .68rem; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.designer-gallery-native { color: var(--green-800); font-size: .6rem; line-height: 1; }
.designer-stage {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 5 / 3; min-height: 220px;
  border: 1px solid #cbd4c7; border-radius: 8px;
  background-color: #edf1e7;
  background-image: linear-gradient(rgba(34, 77, 50, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 77, 50, .09) 1px, transparent 1px);
  background-size: 24px 24px; touch-action: none; user-select: none;
}
.designer-stage.has-photo { background: #d9ddd4; }
.designer-photo { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.designer-empty { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: #526c56; font-family: var(--display); font-size: 1.1rem; pointer-events: none; }
.designer-sticker {
  position: absolute; z-index: 2; display: grid; justify-items: center; gap: 1px; width: 108px; min-height: 70px;
  transform: translate(-50%, -50%); padding: 2px; border: 0; background: transparent; color: #183c27; cursor: grab; touch-action: none;
}
.designer-sticker:active { cursor: grabbing; }
.designer-sticker-art { font-size: 3rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(16, 38, 26, .3)); }
.designer-sticker-name { max-width: 108px; overflow: hidden; padding: 3px 7px; border: 1px solid rgba(20, 63, 36, .18); border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: .66rem; font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.designer-sticker > button { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(20, 63, 36, .18); border-radius: 50%; background: #fff; color: #52645a; font-size: .85rem; cursor: pointer; }

/* ---------- Community ---------- */
.comm-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; }
.comm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.comm-head p { margin: 0; }
.demo-note { background: #fff8e1; border: 1px solid #f3e0a0; border-radius: 10px; padding: 9px 14px; font-size: .85rem; margin-bottom: 16px; }
.demo-note code { font-size: .8rem; background: #fff; padding: 1px 5px; border-radius: 4px; }
.comm-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .comm-grid { grid-template-columns: 1fr; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.item {
  display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.item:hover { border-color: var(--green-500); box-shadow: var(--shadow); }
.item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-title { font-size: 1rem; line-height: 1.3; }
.item-meta { color: var(--ink); }

.lot-list { list-style: none; margin: 10px 0 0; padding: 0; }
.lot-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.lot-list li:first-child { border-top: 0; }
.lot-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label, .two label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 700; }
.stack input:not([type=checkbox]):not([type=radio]), .stack select, .stack textarea, .inline-form input {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; font-weight: 400; font-size: .92rem; outline: 0; width: 100%;
}
.stack input:focus, .stack select:focus, .stack textarea:focus, .inline-form input:focus { border-color: var(--green-500); }
.stack fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stack legend { font-size: .84rem; font-weight: 700; margin-bottom: 4px; }
.stack label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.check input { accent-color: var(--green-700); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two[hidden] { display: none; }
.programs { list-style: none; margin: 0; padding: 0; }
.programs li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.programs li:first-child { border-top: 0; padding-top: 0; }
.programs a { font-weight: 700; text-decoration: none; }
.programs span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.thanks { text-align: center; padding: 8px 4px; }
.thanks p { margin: 6px 0; }
.mini-list { text-align: left; margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }

/* ---------- Dialog ---------- */
.dialog {
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 18px; padding: 24px;
  box-shadow: 0 20px 60px rgba(16, 38, 26, .3); color: var(--ink); background: #fff;
}
.dialog::backdrop { background: rgba(16, 38, 26, .45); }
.dlg-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 1.6rem; color: var(--muted); line-height: 1; }
.dlg-title { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin: 6px 0 8px; line-height: 1.2; padding-right: 24px; }
.dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { flex-direction: row !important; align-items: flex-start; gap: 8px !important; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }
.seg input { accent-color: var(--green-700); margin-top: 3px; }
.seg span { display: flex; flex-direction: column; }
.seg small { font-weight: 400; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.detail-desc { white-space: pre-wrap; line-height: 1.55; margin: 12px 0; }
.detail-block { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.detail-block h3 { margin: 0 0 10px; font-size: 1rem; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form .chat-name { max-width: 130px; }
.signers { list-style: none; padding: 0; margin: 12px 0 0; font-size: .86rem; }
.signers li { padding: 5px 0; border-top: 1px solid var(--line); }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.msg { align-self: flex-start; max-width: 85%; background: #f1f3ee; border-radius: 12px 12px 12px 4px; padding: 7px 11px; font-size: .9rem; line-height: 1.4; }
.msg.mine { align-self: flex-end; background: var(--green-50); border-radius: 12px 12px 4px 12px; }
.msg-meta { font-size: .74rem; color: var(--muted); margin-bottom: 1px; }
.msg-meta strong { color: var(--ink); }

@media (max-width: 820px) {
  .advisor-panel { width: 100%; }
  .plants, .facts { grid-template-columns: 1fr; }
  .designer-toolbar { gap: 6px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form .chat-name { max-width: none; }
  .seg, .two { grid-template-columns: 1fr; }
  .lot-list li { flex-direction: column; align-items: flex-start; }
}
.note-box { background: #fff8e1; border: 1px solid #f3e0a0; border-radius: 10px; padding: 9px 12px; font-size: .85rem; line-height: 1.45; margin: 0 0 10px; }
.item-detail > .item-top { padding-right: 28px; }

/* ---------- Account ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.account-area { position: relative; }
.account { position: relative; }
.avatar-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; }
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green-700); color: #fff; font-weight: 700; font-size: 1rem;
}
.avatar-btn:hover .avatar { background: var(--green-800); }
.badge {
  position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
}
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 36px rgba(16, 38, 26, .18); padding: 6px; z-index: 2000;
}
.account-menu > button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: .9rem;
}
.account-menu > button:hover { background: var(--green-50); }
.account-menu > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); padding: 10px 10px 4px; }
.menu-empty { padding: 0 10px 6px; margin: 0; }
.menu-logout { border-top: 1px solid var(--line) !important; border-radius: 0 0 8px 8px !important; margin-top: 4px; color: var(--muted); }
.pill { background: var(--bad); color: #fff; border-radius: 99px; font-size: .7rem; font-weight: 700; padding: 1px 7px; }

.dialog-sm { width: min(420px, calc(100vw - 32px)); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .dlg-title { margin: 0; }
.auth-reason { background: var(--green-50); border-radius: 10px; padding: 9px 12px; font-size: .88rem; margin: 14px 0 0; }
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1f3ee; border-radius: 10px; padding: 3px; margin: 16px 0 14px; }
.seg-tabs button { border: 0; background: none; padding: 7px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.seg-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.btn-block { width: 100%; padding: 10px; font-size: .95rem; }
.btn-sm { padding: 5px 12px; font-size: .8rem; margin-top: 6px; }
.auth-demo { text-align: center; margin: 12px 0 0; }
.form-error:empty { display: none; }

/* ---------- Map tab additions ---------- */
#map3d { position: absolute; inset: 0; z-index: 500; background: #e9ece6; }
.map3d-error { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; padding: 12px 18px; border-radius: 10px; }
.ink { color: var(--ink); }
.legend { margin: 2px 0 8px 30px; }
.legend-title { font-size: .74rem; color: var(--muted); margin-bottom: 4px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .74rem; }
.legend-row span { display: inline-flex; align-items: center; gap: 4px; }
.legend-row i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0, 0, 0, .08); }

.proposal-pin.draft span { background: #b9a3ec; border-style: dashed; }
.pf-save { display: flex; align-items: center; gap: 10px; }
.pf-save .btn-primary { padding: 6px 18px; }
.saved-note { color: var(--green-700); font-weight: 700; font-size: .85rem; }
.saved-tag, .draft-tag { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.saved-tag { background: var(--green-50); color: var(--green-800); }
.draft-tag { background: #f1f3ee; color: var(--muted); }

/* ---------- Community additions ---------- */
.subnav { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav button {
  border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.subnav button:hover { color: var(--ink); }
.subnav button[aria-selected="true"] { color: var(--green-800); border-bottom-color: var(--green-700); }
.comm-main { display: flex; flex-direction: column; gap: 12px; }
.comm-main .card, .comm-side .card { margin-bottom: 0; }
.comm-side { display: flex; flex-direction: column; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-on { background: var(--green-50); border-color: var(--green-500); color: var(--green-800); font-weight: 700; }
.chip-on button { border: 0; background: none; padding: 0 0 0 4px; color: var(--green-800); font-size: 1rem; line-height: 1; }

.grow { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.grow-side { display: flex; flex-direction: column; gap: 12px; }
.grow-side .card { margin: 0; }
#grow-map { height: 460px; border-radius: 10px; border: 1px solid var(--line); }
.grow-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.grow-legend span { display: inline-flex; align-items: center; gap: 6px; }
.grow-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.grow-legend i.ring { background: #fff; border: 3px solid var(--purple); box-shadow: none; }
.grow-list { list-style: none; margin: 0; padding: 0; }
.grow-list button {
  width: 100%; display: flex; flex-direction: column; text-align: left; border: 0; background: none;
  padding: 8px 6px; border-radius: 8px; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 700;
}
.grow-list li:first-child button { border-top: 0; }
.grow-list button:hover { background: var(--green-50); }
.grow-list small { font-weight: 400; color: var(--muted); font-size: .78rem; }

.opps-list { display: flex; flex-direction: column; gap: 8px; }
.opp-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); }
.opp-date {
  flex-shrink: 0; width: 50px; height: 54px; border-radius: 10px; background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-size: .72rem; color: var(--muted); text-align: center;
}
.opp-date b { font-size: 1.3rem; color: var(--green-800); }
.opp-info { flex: 1; min-width: 0; }
.opp-info .item-title { font-size: .98rem; font-weight: 700; }
.opp-cta { flex-shrink: 0; }
.opp-cta .btn-sm { margin: 0; }

.cta-card { text-align: center; }
.cta-card h3 { margin-top: 4px; }
.cta-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.field-label { font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.follow-chips { margin-bottom: 6px; }
.follow-add { margin-top: 0; }
.follow-add input { max-width: 130px; }

.updates { list-style: none; margin: 0; padding: 0; }
.updates button { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 6px; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.4; }
.updates li:first-child button { border-top: 0; }
.updates button:hover { background: var(--green-50); }
.updates li.unread button { background: #f6fbf3; box-shadow: inset 3px 0 0 var(--green-500); }
.u-icon { flex-shrink: 0; }
.u-text { display: flex; flex-direction: column; }
.u-text small { color: var(--muted); margin-top: 2px; }

#pick-map { height: 190px; border-radius: 10px; border: 1px solid var(--line); cursor: crosshair; }
.saved-select { width: 100%; margin-bottom: 6px; border: 1.5px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; }
.pick-status { margin-top: 4px; }
.login-cta { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.done-note { margin: 12px 0 0; }

@media (max-width: 860px) {
  .grow { grid-template-columns: 1fr; }
  #grow-map { height: 340px; }
}
@media (max-width: 820px) {
  .topbar-right { gap: 6px; }
  .zip-form-inline input { width: 96px; }
  .opp-card { flex-wrap: wrap; }
}

.toast {
  /* Sits above the map's bottom-center "Propose" button so it never blocks it. */
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 3000; background: var(--green-900); color: #fff;
  pointer-events: none;
  padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; max-width: calc(100vw - 32px);
}
.auth-ok { color: var(--green-700); font-size: .88rem; margin: 0; }
.auth-ok:empty { display: none; }
.contact-list { margin: 4px 0 0; padding-left: 18px; }

/* Change-ZIP form in the Map tab profile */
.profile-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.profile-zip { display: flex; gap: 4px; }
.profile-zip input { width: 76px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .85rem; letter-spacing: .06em; outline: 0; background: #fff; }
.profile-zip input:focus { border-color: var(--green-500); }
.profile-zip button { border: 0; border-radius: 999px; background: var(--green-50); color: var(--green-800); font-weight: 700; font-size: .78rem; padding: 4px 10px; white-space: nowrap; }
.profile-zip button:hover { background: var(--green-200); }
.error-card .profile-zip { margin-top: 12px; }

/* Build Ideas map key */
.map-key { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 8px 12px; max-width: 270px; font-family: var(--sans); color: var(--ink); }
.map-key summary { font-weight: 700; font-size: .85rem; cursor: pointer; }
.map-key ul { list-style: none; margin: 6px 0 0; padding: 0; }
.map-key li { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; }
.map-key li i { flex-shrink: 0; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.map-key li div { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.3; }
.map-key small { color: var(--muted); font-size: .72rem; }
.key-pin { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--purple); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 820px) { .map-key { max-width: 220px; } }

/* ---------- 3D views ---------- */
.map3d { position: absolute; inset: 0; z-index: 500; background: #e9ece6; }
.map3d[hidden] { display: none; }
/* While a 3D view covers a Leaflet map, hide the 2D map's own controls (the key stays). */
.under-3d .leaflet-control-zoom, .under-3d .leaflet-control-layers, .under-3d .leaflet-control-scale, .under-3d .leaflet-control-attribution { display: none; }
.toggle-3d {
  position: absolute; top: 12px; left: 12px; z-index: 600; border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font-weight: 700; font-size: .85rem; padding: 8px 14px; box-shadow: var(--shadow);
}
.toggle-3d:hover { background: var(--green-50); }
.toggle-3d.on { background: var(--green-800); color: #fff; }
.toggle-3d:disabled { opacity: .7; }
.grow-map-wrap { position: relative; }
.grow-map-wrap .map3d { border-radius: 10px; overflow: hidden; }
.maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; font-family: var(--sans); }

/* ---------- Street photos ---------- */
.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.photo { flex: 0 0 180px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0; overflow: hidden; text-align: left; scroll-snap-align: start; }
.photo img { display: block; width: 100%; height: 120px; object-fit: cover; background: #eef0ea; }
.photo span { display: block; padding: 6px 8px; font-size: .74rem; color: var(--muted); }
.photo:hover { border-color: var(--green-500); }
.photo-credit { margin: 6px 0 8px; }
.sv-google { display: inline-block; text-decoration: none; margin-top: 2px; }
.sv-link { display: inline-block; font-weight: 700; }
.dialog-wide { width: min(980px, calc(100vw - 32px)); }
.photo-view img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #111; border-radius: 10px; }
.photo-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; font-size: .88rem; }
.photo-nav { display: flex; gap: 6px; }
.camera-pin { background: none; border: 0; }
.camera-pin span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #111; color: #fff;
  font-size: 12px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* ---------- Partner sites ---------- */
.partner-kinds { margin: 10px 0 12px; }
.partner-list { display: flex; flex-direction: column; gap: 10px; }
.partner-card { border: 1px solid var(--line); border-left: 4px solid var(--kind); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.partner-top { display: flex; gap: 10px; align-items: flex-start; }
.partner-top strong { font-size: .98rem; }
.partner-icon { font-size: 1.4rem; line-height: 1; }
.partner-idea { font-size: .85rem; line-height: 1.45; margin: 8px 0; }
.partner-linked { display: flex; flex-direction: column; gap: 3px; margin: 0 0 8px; font-size: .86rem; }
.partner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.partner-actions .btn-sm { margin: 0; }
.partner-tag { font-size: .8rem; font-weight: 700; color: var(--green-800); }
.partner-banner { background: var(--green-50); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .88rem; }
.tag-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.tag-option { display: flex; gap: 8px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.tag-option:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }

.open-map-card { text-align: center; padding: 22px 18px; }
.open-map-card p { margin: 8px auto 0; max-width: 320px; line-height: 1.5; }

/* ---------- Greenify branding ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.logo { width: min(300px, 72vw); height: auto; overflow: visible; filter: drop-shadow(0 10px 18px rgba(63, 155, 79, .22)); }
.logo-word { font-family: 'Dancing Script', cursive; font-weight: 600; font-size: 820px; fill: #111; }
.brand-lg { gap: 10px; }
.brand-lg h1 { font-family: var(--sans); font-size: clamp(.95rem, 2.4vw, 1.15rem); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-700); }
.brand-sm .mascot { width: 40px; height: 40px; transition: transform .2s; }
.brand-sm:hover .mascot { transform: rotate(-8deg) scale(1.06); }
.brand-sm .wordmark { font-family: 'Dancing Script', cursive; font-weight: 600; font-size: 1.8rem; line-height: 1; color: #111; letter-spacing: 0; padding-bottom: 2px; }
.brand-sm .mascot { width: 46px; height: 46px; margin: -4px 0; }
@media (max-width: 820px) { .brand-sm .wordmark { display: inline; font-size: 1.5rem; } }
/* On narrow phones keep the top bar to one row: mascot, ZIP box and login. */
@media (max-width: 480px) { .brand-sm .wordmark { display: none; } }

/* ---------- Map / 3D switch ---------- */
.map-view-switch {
  position: absolute; top: 12px; left: 12px; z-index: 1000; display: flex; gap: 2px;
  padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: var(--shadow);
}
.map-view-switch button {
  border: 0; border-radius: 999px; padding: 7px 12px; background: transparent;
  color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.map-view-switch button[aria-pressed="true"] { background: var(--green-800); color: #fff; }
.map-view-switch button:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }

/* ---------- Text alerts ---------- */
.sms-box { border: 1.5px solid var(--line) !important; border-radius: 12px; padding: 10px 12px 8px !important; background: var(--paper); }
.sms-box legend { padding: 0 4px; }
.sms-box .consent { margin: 2px 0 0; line-height: 1.4; font-size: .74rem; }

/* ---------- Live air quality ---------- */
.aqi-vbad { background: #8f3f97; }
.aqi-hazard { background: #7e0023; }
.air-now { display: flex; gap: 12px; align-items: center; margin: 4px 0 6px; }
.air-now .aqi-badge { font-size: 1.4rem; font-weight: 700; padding: 4px 12px; }
.air-now div { display: flex; flex-direction: column; }
.air-sub { font-weight: 700; font-size: .86rem; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Planting mockup: half / full screen ---------- */
.designer-size { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.designer-size .btn-sm { margin: 0; white-space: nowrap; }
.designer-half, .designer-full {
  position: fixed; z-index: 1500; margin: 0; padding: 16px 18px; border: 0; background: var(--paper);
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(16, 38, 26, .18); overflow: hidden;
}
/* Half screen: the right half of the window, below the top bar, so the answer stays visible. */
.designer-half { top: 61px; right: 0; bottom: 0; width: 50vw; border-left: 1px solid var(--line); }
/* Full screen: covers everything, including the top bar. */
.designer-full { inset: 0; z-index: 2500; }
body.designer-open { overflow: hidden; }
.designer-half .designer-gallery, .designer-full .designer-gallery {
  display: flex; gap: 6px; overflow-x: auto; flex-shrink: 0; padding-bottom: 4px;
}
.designer-half .designer-gallery-item, .designer-full .designer-gallery-item { flex: 0 0 96px; }
.designer-half .designer-stage, .designer-full .designer-stage { flex: 1; aspect-ratio: auto; min-height: 0; }
.designer-full .designer-sticker-art { font-size: 3.6rem; }
@media (max-width: 820px) {
  /* On phones "half screen" means the bottom two thirds. */
  .designer-half { top: auto; left: 0; width: auto; height: 66vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; }
}
