/* Seekers Retreats: calm and purposeful. Deep forest green and warm sand, with saffron for actions. */
:root {
  --bg: #f5f0e6;
  --surface: #fffdf8;
  --sunken: #ece5d6;
  --text: #1d2b27;
  --muted: #5b6660;
  --border: #ddd3c1;
  --brand: #1f4a3f;
  --brand-deep: #132f28;
  --on-brand: #f3efe4;
  --accent: #c4622d;
  --accent-ink: #ffffff;
  --accent-soft: #f7e3d4;
  --link: #1f5e4f;
  --sun: #f2b544;
  --ok: #2f7a45;
  --warn: #a8660b;
  --bad: #b3372b;
  --caveat-bg: #fbecd0;
  --caveat-border: #d9a441;

  --spiritual: #6d4fa3;
  --yoga_meditation: #2f5f8f;
  --arts_literature: #b8452f;
  --alternate_living: #9a5f12;
  --ecology_conservation: #1f7a72;
  --organic_farming: #4f7a1e;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(29, 43, 39, .06), 0 8px 24px rgba(29, 43, 39, .08);
  --shadow-lift: 0 2px 4px rgba(29, 43, 39, .08), 0 14px 32px rgba(29, 43, 39, .14);
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a17;
    --surface: #1a2420;
    --sunken: #22302b;
    --text: #e9efe9;
    --muted: #9fb0a7;
    --border: #2e3d37;
    --brand: #24534a;
    --brand-deep: #0c1613;
    --on-brand: #eef3ec;
    --accent: #e8925a;
    --accent-ink: #1a120c;
    --accent-soft: #3a2618;
    --link: #8fc9b5;
    --ok: #7cc48f;
    --warn: #e3ab55;
    --bad: #ec8577;
    --caveat-bg: #3a2e1a;
    --caveat-border: #a5803f;
    --spiritual: #b59ae6;
    --yoga_meditation: #8ab7e3;
    --arts_literature: #ec8d77;
    --alternate_living: #e3ab55;
    --ecology_conservation: #6cc9bf;
    --organic_farming: #a6cf6e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 6px; }
h2 { font-size: 1.3rem; margin: 0 0 10px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* header */
#site-header { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.mark { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--accent-soft) 0 28%, var(--accent) 30%); flex: none; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: .93rem; }
.nav a:hover { background: var(--sunken); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 18px; }
.demo-bar { background: var(--accent-soft); color: var(--text); font-size: .85rem; padding: 6px 16px; text-align: center; }

/* buttons + form controls */
.btn { font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-danger { color: var(--bad); }
.btn-small { padding: 5px 12px; font-size: .88rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: .9rem; background: var(--surface); }
.checks input { accent-color: var(--accent); }
.checks label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* chips + tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --c: var(--accent); font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--c); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: var(--surface); }
.chip .n { opacity: .7; margin-left: 3px; font-variant-numeric: tabular-nums; }
.theme-spiritual { --c: var(--spiritual); }
.theme-arts_literature { --c: var(--arts_literature); }
.theme-alternate_living { --c: var(--alternate_living); }
.theme-ecology_conservation { --c: var(--ecology_conservation); }
.theme-organic_farming { --c: var(--organic_farming); }
.theme-yoga_meditation { --c: var(--yoga_meditation); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; color: var(--c, var(--muted)); border: 1px solid var(--c, var(--border)); }
.pill { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill-verified { color: var(--ok); }
.pill-unverified { color: var(--muted); border-style: dashed; }
.pill-pending { color: var(--warn); }
.pill-approved { color: var(--ok); }
.pill-rejected { color: var(--bad); }
.pill-archived { color: var(--muted); }

/* explore */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 16px 0; }
.filters .field { min-width: 170px; flex: 1 1 170px; max-width: 240px; }
.filters .search { flex: 2 1 240px; max-width: 360px; }
.filter-themes { flex-basis: 100%; }
.results-bar { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; color: var(--muted); font-size: .92rem; }
.explore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.explore.no-map { grid-template-columns: 1fr; }
.explore.no-map .map-pane { display: none; }
.map-pane { position: sticky; top: 88px; height: calc(100vh - 110px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
#map, .mini-map { width: 100%; height: 100%; background: var(--sunken); }
.map-pane, .mini-map, .pick-map { isolation: isolate; }   /* keep Leaflet's layers under the sticky header */
.cards { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 18px; }
.card a.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.card .cover { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--sunken); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card a:hover .cover img { transform: scale(1.03); }
.cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 8%, var(--surface))); }
.cover-empty span { font-family: var(--display); font-size: 3rem; color: var(--c); opacity: .6; }
.card h3 { margin: 4px 0 0; font-family: var(--body); font-size: 1rem; font-weight: 600; }
.card .place { font-size: .88rem; color: var(--muted); }
.card .summary { font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: .82rem; color: var(--muted); }
.card.hl .cover { outline: 3px solid var(--accent); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); grid-column: 1 / -1; }

/* centre page */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 8px; border-radius: var(--radius); overflow: hidden; margin: 18px 0 24px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery > :first-child { grid-row: span 2; }
.gallery.n1 { grid-template-columns: 1fr; grid-template-rows: 360px; }
.gallery.n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 360px; }
.gallery.n2 > :first-child, .gallery.n1 > :first-child { grid-row: auto; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n1:has(.cover-empty) { grid-template-rows: 220px; }
.gallery > .cover { height: 100%; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; margin-bottom: 56px; }
.detail .lead { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts dt { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts dd { margin: 2px 0 0; }
.caveat { padding: 10px 14px; background: var(--caveat-bg); border-left: 3px solid var(--caveat-border); border-radius: 6px; margin: 14px 0; font-size: .93rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.mini-map { height: 240px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 10px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--sunken); font-size: .9rem; }
.notice-warn { background: var(--caveat-bg); }

/* form pages */
.form-page { padding: 28px 0 64px; }
.form-section { padding: 20px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.form-section:first-of-type { border-top: 0; }
.pick-map { height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sunken); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid button { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; }

/* inbox */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 120px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin: 20px 0; }
.thread-list { border-right: 1px solid var(--border); overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.thread-list a { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.thread-list a:hover { background: var(--sunken); }
.thread-list a.on { background: var(--accent-soft); }
.thread-list .who { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.thread-list .who time { margin-left: auto; font-weight: 400; font-size: .8rem; color: var(--muted); }
.thread-list .unread .who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; align-self: center; }
.thread-list .sub { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv { display: flex; flex-direction: column; min-height: 0; }
.conv-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.conv-head h2 { margin: 0; font-size: 1.1rem; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.msg time { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.composer { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--border); }
.composer textarea { min-height: 44px; height: 44px; }
.conv-empty { display: grid; place-items: center; color: var(--muted); height: 100%; padding: 20px; text-align: center; }

/* admin + account tables */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 18px 0; flex-wrap: wrap; }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.review { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.review .cover { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.review .cover img { width: 100%; height: 100%; object-fit: cover; }
.review dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: .9rem; margin: 8px 0; }
.review dt { color: var(--muted); }
.review dd { margin: 0; overflow-wrap: anywhere; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

/* dialogs + toasts */
.dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog .close { align-self: center; }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: .92rem; }
.toast-bad { background: var(--bad); color: #fff; }

.leaflet-popup-content { font: 14px/1.4 var(--body); }
.leaflet-popup-content a { font-weight: 600; }

@media (max-width: 900px) {
  .explore { grid-template-columns: 1fr; }
  .map-pane { position: relative; top: 0; height: 260px; order: -1; }
  .mini-map { height: 200px; }
  .pick-map { height: 240px; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .side { position: static; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.has-thread .thread-list { display: none; }
  .inbox:not(.has-thread) .conv { display: none; }
  .msgs { min-height: 50vh; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: 240px; }
  .gallery > :not(:first-child) { display: none; }
  .gallery > :first-child { grid-row: auto; }
  .filters .field, .filters .search { max-width: none; }
  .review { grid-template-columns: 1fr; }
  .nav { margin-left: 0; width: 100%; }
}

/* ================================================================ calm + purposeful layer */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; }

/* header */
#site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.brand { color: var(--brand); }
.mark { width: 30px; height: 30px; border-radius: 0; background: none; color: var(--brand); }
.nav a.on { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.nav a[data-donate] { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 7px 14px; }
.nav a[data-donate]:hover { filter: brightness(1.07); background: var(--accent); }
.demo-bar { background: color-mix(in srgb, var(--sun) 22%, var(--surface)); }
@media (prefers-color-scheme: dark) {
  .brand, .nav a.on { color: var(--on-brand); }
  .mark { color: #4f8a77; }
}

/* hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 120px; color: var(--on-brand);
  background: radial-gradient(120% 90% at 78% 70%, #4d7f6a 0%, transparent 60%), linear-gradient(165deg, var(--brand-deep) 0%, var(--brand) 70%); }
.hero-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 18ch; margin: 0 0 14px; }
.hero .eyebrow { margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.hero-lead { margin: 0; max-width: 60ch; font-size: 1.05rem; color: color-mix(in srgb, var(--on-brand) 86%, transparent); }
.hero-search { margin-top: 26px; max-width: 560px; display: flex; align-items: center; gap: 10px; background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 6px 8px 6px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.hero-search input { border: 0; background: transparent; padding: 10px 4px; font-size: 1rem; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.hero-stats { margin: 18px 0 0; font-size: .92rem; color: color-mix(in srgb, var(--on-brand) 80%, transparent); }
.hero-stats strong { color: #fff; }
.hero-stats a { color: var(--sun); font-weight: 600; }

/* filter panel floats over the bottom of the hero */
.filters { position: relative; z-index: 2; margin-top: -64px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.filter-themes legend { font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font-weight: 500; background: var(--bg); border-color: var(--border); }
.chip .ticon { color: var(--c); }
.chip:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.chip[aria-pressed="true"], .chip[aria-pressed="true"] .ticon { color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"], .chip[aria-pressed="true"] .ticon { color: var(--brand-deep); } }
.tag { display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--c, var(--muted)) 10%, transparent); border-color: transparent; }
.results-bar { padding: 18px 0 14px; }

/* buttons */
.btn { border-radius: 999px; }
.btn-primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }

/* listing cards: framed, lifted on hover */
.cards { gap: 22px; }
.card a.card-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); gap: 0; height: 100%; transition: transform .2s, box-shadow .2s; }
.card a.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card .cover { border-radius: 0; aspect-ratio: 16 / 10; }
.card a.card-link > :not(.cover) { margin-left: 16px; margin-right: 16px; }
.card a.card-link > .row { margin-top: 14px; }
.card .place { margin-top: 2px; }
.card .tags { margin-top: 10px; }
.card .summary { margin-top: 10px; color: var(--text); }
.card .meta { margin-top: auto; padding: 12px 0 14px; border-top: 1px solid var(--border); }
.card .summary + .meta, .card .tags + .meta { margin-top: 12px; }
.card.hl a.card-link { box-shadow: 0 0 0 3px var(--accent), var(--shadow-lift); }
.card.hl .cover { outline: 0; }
.cover-empty { color: var(--c); background:
  radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--c) 20%, transparent), transparent 60%),
  linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface))); }
.cover-empty .ticon { opacity: .75; }

/* panels and centre page */
.side .panel:first-child { border-top: 4px solid var(--accent); }
.gallery { box-shadow: var(--shadow); }
.facts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }

/* donate */
.donate-uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.donate-uses div { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); border-top: 4px solid var(--brand); }
.donate-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin: 18px 0; }
.donate-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.donate-card h2 { margin: 0; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; align-self: stretch; }
.qr { width: 200px; height: 200px; display: grid; place-items: center; text-align: center; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.qr svg { width: 100%; height: 100%; }
.upi-app { align-self: stretch; }
@media (hover: hover) and (pointer: fine) { .upi-app { display: none; } }   /* UPI app links only open on phones */

/* footer */
#site-footer { margin-top: 56px; background: var(--brand-deep); color: color-mix(in srgb, var(--on-brand) 82%, transparent); }
.foot { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; padding-top: 32px; padding-bottom: 36px; }
.foot .brand, .foot .mark { color: var(--on-brand); }
.foot p { margin: 8px 0 0; max-width: 52ch; font-size: .9rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot nav a { color: var(--on-brand); text-decoration: none; font-weight: 500; }
.foot nav a:hover { color: var(--sun); }

@media (max-width: 900px) { .hero { padding: 40px 0 104px; } }
@media (max-width: 600px) {
  .donate-uses { grid-template-columns: 1fr; }
  .filters { padding: 16px; }
}

/* theme tiles: square infographic boxes */
.theme-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.theme-tile { position: relative; min-height: 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px; text-align: left; font: inherit; color: var(--text); cursor: pointer; clip-path: inset(0 round var(--radius));
  border: 1px solid color-mix(in srgb, var(--c) 22%, var(--border)); border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 12%, var(--surface)) 0%, var(--surface) 75%);
  transition: transform .2s, box-shadow .2s, background .2s; }
.theme-tile::after { content: ""; position: absolute; right: -28px; bottom: -28px; width: 96px; height: 96px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 10%, transparent); pointer-events: none; }
.theme-tile:hover { transform: translateY(-3px); border-color: var(--c); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, var(--surface)) 0%, var(--surface) 80%); }
.theme-tile:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.tile-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); margin-bottom: 4px; flex: none; }
.tile-name { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.tile-blurb { font-size: .78rem; line-height: 1.35; color: var(--muted); }
.tile-count { margin-top: auto; font-size: .8rem; color: var(--muted); position: relative; z-index: 1; }
.tile-count strong { font-family: var(--display); font-size: 1.5rem; color: var(--c); margin-right: 2px; }
.theme-tile[aria-pressed="true"] { background: var(--c); border-color: var(--c); box-shadow: var(--shadow-lift); }
.theme-tile[aria-pressed="true"] :is(.tile-name, .tile-blurb, .tile-count, .tile-count strong) { color: #fff; }
.theme-tile[aria-pressed="true"] .tile-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.theme-tile[aria-pressed="true"]::after { background: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  .theme-tile[aria-pressed="true"] :is(.tile-name, .tile-blurb, .tile-count, .tile-count strong), .theme-tile[aria-pressed="true"] .tile-icon { color: var(--brand-deep); }
}
@media (max-width: 1100px) { .theme-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .theme-tile { min-height: 168px; } }
@media (max-width: 560px) { .theme-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile-blurb { display: none; } .theme-tile { min-height: 140px; } }

/* touch screens: switch map panning on and off */
.map-move { font: 600 .82rem var(--body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; }
.map-move.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* results line: keep each control on one line; wrap as a whole on small screens */
.results-bar { flex-wrap: wrap; row-gap: 8px; }
.results-bar > * { white-space: nowrap; }
#count { font-weight: 600; color: var(--text); }
@media (max-width: 600px) { #count { flex-basis: 100%; } }

/* "Filters" button and its panel (the theme tiles stay visible above) */
.filter-toggle-row { display: flex; margin-top: 16px; }
.filter-toggle { gap: 8px; }
.filter-toggle[aria-expanded="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.filter-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: .78rem; font-weight: 700; display: inline-grid; place-items: center; }
.filter-badge[hidden] { display: none; }
.more-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.more-filters[hidden] { display: none; }
.more-filters .field { max-width: none; min-width: 0; }
.more-filters-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
@media (max-width: 900px) { .more-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .more-filters { grid-template-columns: 1fr; } }
.filters > .filter-toggle-row, .filters > .more-filters { flex-basis: 100%; margin-top: 0; }

.photo-credits { margin: -14px 0 20px; font-size: .74rem; color: var(--muted); }
.photo-credits a { color: inherit; }

/* header: logo left, menu centred, sign-in / account top right */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; flex-wrap: nowrap; }
.bar .brand { justify-self: start; }
.bar .nav { margin: 0; justify-self: center; justify-content: center; flex-wrap: nowrap; }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.bar-end a[data-account] { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--border);
  border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; background: var(--surface); }
.bar-end a[data-account].on { border-color: var(--brand); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand);
  font-weight: 700; font-size: .85rem; }
@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr auto; grid-template-areas: "brand end" "nav nav"; row-gap: 8px; }
  .bar .brand { grid-area: brand; }
  .bar-end { grid-area: end; }
  .bar .nav { grid-area: nav; width: 100%; overflow-x: auto; justify-content: center; scrollbar-width: none; }
  .bar .nav::-webkit-scrollbar { display: none; }
  .bar .nav a { white-space: nowrap; }
  .bar-end .who { display: none; }
  .bar-end a[data-account] { padding: 4px; }
}
@media (max-width: 420px) { .bar .nav { justify-content: flex-start; } }

/* Donate sits in the centred menu on wide screens and beside sign-in on phones */
.bar-end .donate-end { display: none; text-decoration: none; border-radius: 999px; }
@media (max-width: 860px) {
  .bar .nav a[data-donate] { display: none; }
  .bar-end .donate-end { display: inline-flex; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .9rem; padding: 7px 14px; }
}

/* floating "back to top" button on Explore */
.to-themes { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 900; display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: 600 .92rem var(--body);
  box-shadow: 0 8px 24px rgba(19, 47, 40, .35); cursor: pointer; animation: to-themes-in .2s ease-out; }
.to-themes:hover { filter: brightness(1.12); }
.to-themes:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.to-themes[hidden] { display: none; }
@keyframes to-themes-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .to-themes { animation: none; } }
@media (prefers-color-scheme: dark) { .to-themes { background: var(--accent); color: var(--accent-ink); } }
