:root {
  --cream: #d9cbb5;
  --ink: #31281a;
  --paper: #f0ebe3;
  --line: #d9d4cc;
  --muted: #6f665b;
  --gold: #c6993c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Heebo, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
header {
  background: var(--cream);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.identity { display: flex; align-items: center; gap: 12px; }
.logo {
  display: flex;
  align-items: center;
  height: 44px;
  text-decoration: none;
  color: var(--ink);
  font: 1000 33px/1 "Arial Black", Arial, sans-serif;
  letter-spacing: -2.5px;
}
h1 { font-size: 17px; font-weight: 900; margin: 0; }
#count { font-size: 13px; font-weight: 700; opacity: .75; }
.controls { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  width: 200px;
  background: #fff;
  color: var(--ink);
}
#near {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
#near:disabled { opacity: .6; cursor: default; }
main { flex: 1; min-height: 0; display: flex; direction: ltr; }
aside {
  width: 320px;
  flex-shrink: 0;
  direction: rtl;
  border-right: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#list { flex: 1; overflow-y: auto; }
.row {
  display: block;
  width: 100%;
  text-align: right;
  font: inherit;
  color: inherit;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.row:hover, .row[aria-current=true] { background: var(--paper); }
.row strong { display: block; font-weight: 700; font-size: 14px; }
.row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row em { color: var(--ink); font-weight: 700; font-style: normal; margin-inline-start: 6px; }
.empty { padding: 16px; font-size: 13px; color: var(--muted); }
#map { flex: 1; min-height: 0; background: #e8e5de; }
.pin {
  width: 18px; height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--gold);
  border: 2px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.cluster {
  border-radius: 50%;
  background: #d9cbb58c;
  display: grid; place-items: center;
}
.cluster span {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--cream);
  display: grid; place-items: center;
  font: 900 13px Heebo, Arial, sans-serif;
}
.pin-you {
  width: 16px; height: 16px;
  border-radius: 50%; background: #2a7de1;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(42,125,225,.3);
}
.leaflet-popup-content { font-family: Heebo,Arial,sans-serif; direction: rtl; text-align: right; }
.leaflet-popup-content strong { display: block; font-weight: 900; font-size: 15px; margin-bottom: 4px; }
.leaflet-popup-content span { display: block; font-size: 13px; }
.leaflet-popup-content small { display: block; margin-top: 5px; color: var(--muted); }
#notice {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  max-width: 90%; background: #31281a; color: #fff;
  padding: 9px 15px; border-radius: 8px; z-index: 1100;
}
.credits { flex: none; background: #f4f0e9; font-size: 10px; padding: 1px 8px; color: #6f665b; }
.credits summary { cursor: pointer; }
.credits p { margin: 4px 0; }
.credits a { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #9b752d; outline-offset: -3px; }
@media (max-width: 760px) {
  html { height: auto; min-height: 100%; }
  body { height: auto; min-height: 100svh; }
  header { flex: none; }
  main { flex: none; display: flex; flex-direction: column-reverse; min-height: auto; }
  #map { flex: none; height: 44svh; min-height: 220px; width: 100%; }
  aside {
    width: 100%; flex: none; min-height: 180px;
    border-right: 0; border-top: 1px solid var(--line);
  }
  #list { flex: none; overflow: visible; touch-action: pan-y; }
  .row { min-height: 64px; padding: 13px 16px; }
  input { width: 140px; font-size: 16px; }
  .credits { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
