[hidden] { display: none !important; }
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/jakarta-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/jakarta-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef2ff;
  --call: #059669;
  --call-hover: #047857;
  --ok-soft: #dcfce7;
  --ok-text: #166534;
  --hero-1: #1e1b4b;
  --hero-2: #4338ca;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 24px 60px rgb(30 27 75 / 0.25);
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 19px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-weight: 500; }

a { color: var(--accent); }
button, input { font: inherit; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }

/* Top band */
body {
  background:
    radial-gradient(800px 360px at 90% -10%, rgb(167 139 250 / 0.45), transparent 60%),
    linear-gradient(135deg, var(--hero-1), var(--hero-2)) top / 100% 420px no-repeat,
    var(--bg);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 8px; }
.topbar-link { color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none; padding: 10px 0; opacity: 0.9; }
.topbar-link:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(255 255 255 / 0.15); border: 1px solid rgb(255 255 255 / 0.25); }
.search-area h1 { color: #fff; font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.03em; margin: 12px 0 8px; font-weight: 800; }
.search-area h1 span { background: linear-gradient(90deg, #c4b5fd, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.05rem; color: rgb(255 255 255 / 0.85); margin: 0 0 20px; }

.search-card {
  color: var(--text);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 24px;
  border: 0; border-radius: 16px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-xl { width: 100%; min-height: 68px; font-size: 1.3rem; border-radius: 18px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 20px rgb(79 70 229 / 0.35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgb(79 70 229 / 0.45); }
.btn-dark { color: #fff; background: var(--text); }
.btn-light { color: var(--hero-1); background: #fff; }
.btn-ghost { color: #fff; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 255 255 / 0.35); }
.linkish { background: none; border: 0; padding: 12px 0; min-height: 48px; color: var(--accent); text-decoration: underline; cursor: pointer; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 14px 0 8px; font-size: 0.95rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

form label { display: block; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; gap: 10px; }
.row input {
  flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.row input:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.row .btn { flex: 0 0 auto; }

fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 6px 16px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600;
  transition: all 0.15s ease;
}
.chip:hover span { border-color: #c7d2fe; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:checked + span::after { content: "✓"; margin-left: 8px; }
.chip input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* Trust + safety */
.trust { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.trust li::before { content: "✓ "; color: var(--call); font-weight: 800; }
.safety { margin-top: 20px; padding: 16px 20px; border-radius: var(--radius); background: #fff7ed; border: 2px solid #fed7aa; color: #7c2d12; }
.safety p { margin: 6px 0 0; }
.disclaimer { color: var(--muted); font-size: 0.95rem; margin: 20px 0 0; }

/* Results */
#status:not(:empty) {
  margin: 16px 0 0; padding: 14px 18px; border-radius: 16px;
  background: var(--accent-soft); color: var(--hero-1); font-weight: 600;
}
.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 16px 0; display: flex; align-items: center; gap: 10px; }
.count:not(:empty) { font-size: 0.9rem; padding: 2px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

#results { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 2px solid transparent; cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(15 23 42 / 0.06), 0 16px 32px rgb(15 23 42 / 0.12); }
.card.active, .card:focus-visible { border-color: var(--accent); outline: none; }
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px;
  color: #fff; font-weight: 800; font-size: 1.2rem; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.who { flex: 1; min-width: 0; }
.name { font-size: 1.25rem; font-weight: 800; margin: 0; line-height: 1.25; }
.place { display: flex; align-items: center; gap: 6px; color: var(--muted); margin: 4px 0 0; }
.dist { flex: none; font-weight: 700; font-size: 0.95rem; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 0.95rem; font-weight: 600; }
.tag.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok-text); }
.note { color: var(--muted); margin: 12px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-call { flex: 1 1 100%; color: #fff; background: var(--call); font-size: 1.1rem; white-space: nowrap; }
.btn-call:hover { background: var(--call-hover); }
.btn-outline { flex: 1 1 auto; color: var(--text); background: var(--surface); border: 2px solid var(--line); min-height: 52px; font-weight: 600; overflow-wrap: anywhere; }
.btn-outline:hover { border-color: var(--accent); }
.report { font-size: 0.9rem; color: var(--muted); }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); border: 2px dashed var(--line); }

#map { height: 280px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 0; }
.pin {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 3px solid #fff; box-shadow: 0 4px 10px rgb(0 0 0 / 0.3);
}
.pin b { transform: rotate(45deg); color: #fff; font: 800 14px "Plus Jakarta Sans", sans-serif; }
.me { width: 22px; height: 22px; border-radius: 50%; background: #0ea5e9; border: 4px solid #fff; box-shadow: 0 0 0 8px rgb(14 165 233 / 0.25); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { font: 16px/1.4 "Plus Jakarta Sans", sans-serif; }

/* Info + FAQ */
.info.wrap { margin-top: 40px; }
.info-grid { display: grid; gap: 8px 32px; }
.steps { padding-left: 1.4em; margin: 0; display: grid; gap: 10px; }
.helps { padding-left: 1.2em; margin: 0; display: grid; gap: 10px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 48px; }
.faq details p { margin: 0 0 14px; color: var(--muted); }
@media (min-width: 960px) { .info-grid { grid-template-columns: 1fr 1fr; } }

/* Footer */
footer.wrap { margin-top: 48px; padding-bottom: 40px; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  color: #fff; padding: 32px; border-radius: 28px;
  background: radial-gradient(600px 300px at 100% 0, rgb(167 139 250 / 0.5), transparent 60%), linear-gradient(135deg, var(--hero-1), var(--hero-2));
}
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: rgb(255 255 255 / 0.85); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin-top: 16px; }
.footer-links a, .footer-links .linkish { color: var(--muted); }
.author { color: var(--muted); margin-left: auto; }

/* Simple content page */
body.plain { background: var(--bg); }
.page { max-width: 760px; padding-top: 32px; padding-bottom: 48px; }
.page h1 { font-size: 2.2rem; letter-spacing: -0.02em; }

@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "search map" "list map"; column-gap: 32px; }
  .search-area { grid-area: search; }
  .list-area { grid-area: list; }
  .map-col { grid-area: map; position: sticky; top: 16px; align-self: start; padding-top: 12px; }
  #map { height: calc(100vh - 32px); min-height: 520px; }
  .btn-call { flex: 0 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --surface: #141a2e; --text: #e8ecf6; --muted: #a6b0c6; --line: #263050;
    --accent: #818cf8; --accent-soft: #1e2350; --ok-soft: #0f2e1f; --ok-text: #86efac;
  }
  .btn-dark { background: #e8ecf6; color: #0b1020; }
  #status:not(:empty) { color: #e0e7ff; }
  .safety { background: #2a1a0e; border-color: #7c2d12; color: #fed7aa; }
}

/* Join form */
.join { display: grid; gap: 6px; margin-top: 24px; }
.join > label:not(.check) { font-weight: 700; margin-top: 16px; }
.join input:not([type="checkbox"]):not([type="radio"]), .join textarea {
  width: 100%; min-height: 56px; padding: 10px 16px; font: inherit;
  border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text);
}
.join input:focus, .join textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.join fieldset { margin-top: 20px; }
.join .btn-xl { margin-top: 20px; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 2px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.check input { width: 28px; height: 28px; flex: none; margin-top: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-top: 20px; }
.form-errors { margin-top: 16px; padding: 12px 20px; border-radius: 16px; background: #fef2f2; border: 2px solid #fecaca; color: #991b1b; font-weight: 600; }
.already { margin-top: 16px; padding: 16px 20px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok-text); }
.thanks { margin-top: 24px; padding: 24px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok-text); }
