/* =========================================================
   Places de jeux – thème « ludique et chaleureux »
   Orange (action) + bleu carte (sélection) + vert (officiel)
   ========================================================= */
:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-2: #fff1e3;
  --ink: #1c1917;
  --muted: #57534e;          /* 7.0:1 sur blanc */
  --line: #f1e3d3;
  --line-strong: #e0cbb4;
  --primary: #c2410c;        /* 5.2:1 sur blanc */
  --primary-hover: #9a3412;
  --on-primary: #ffffff;
  --primary-soft: #ffedd5;
  --accent: #1d4ed8;         /* sélection, communauté */
  --accent-soft: #dbeafe;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --danger: #b91c1c;
  --sun: #fbbf24;
  --scrim: rgba(28, 25, 23, .5);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(28, 25, 23, .06), 0 2px 8px rgba(28, 25, 23, .06);
  --shadow-2: 0 8px 28px rgba(28, 25, 23, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 200ms;
  --header: 68px;
  --panel-w: 400px;
  --peek: 148px;
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f;
    --surface: #211a16;
    --surface-2: #2b221d;
    --ink: #f5f0eb;
    --muted: #b8aca2;
    --line: #3a2f28;
    --line-strong: #4d4037;
    --primary: #fb923c;
    --primary-hover: #fdba74;
    --on-primary: #1c1917;
    --primary-soft: #3d2416;
    --accent: #93c5fd;
    --accent-soft: #1e2b45;
    --ok: #4ade80;
    --ok-soft: #173023;
    --danger: #fca5a5;
    --scrim: rgba(0, 0, 0, .6);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--primary); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 3000; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--bg); font-weight: 800; text-decoration: none; transition: top var(--dur) var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--ink);
}
.icon-btn:hover { background: var(--line); }
.link {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0;
  color: var(--primary); font-weight: 800; text-decoration: underline; text-underline-offset: 3px;
}
.link .ic { width: 16px; height: 16px; }

/* ---------- En-tête ---------- */
.top {
  height: var(--header); flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: relative; z-index: 1200;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.logo { display: block; width: 52px; height: 42px; flex: none; }
.brand strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.brand small { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; margin-top: 2px; }
.search {
  flex: 1; max-width: 480px; position: relative; display: flex; align-items: center;
}
.search > .ic { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 44px 0 44px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--bg);
  outline: none; transition: border-color var(--dur), box-shadow var(--dur);
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search .clear {
  position: absolute; right: 2px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); display: grid; place-items: center;
}
.search .clear[hidden] { display: none; }
.search .clear .ic { width: 18px; height: 18px; }
.langs {
  display: flex; gap: 2px; padding: 3px; flex: none;
  background: var(--surface-2); border-radius: 999px;
}
.langs button {
  min-width: 40px; height: 38px; border: 0; background: transparent; border-radius: 999px;
  font-weight: 800; font-size: .85rem; color: var(--muted); transition: background var(--dur), color var(--dur);
}
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- Mise en page ---------- */
.layout { flex: 1; display: grid; grid-template-columns: var(--panel-w) 1fr; min-height: 0; position: relative; }
.panel {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; z-index: 1100;
}
.sheet-handle { display: none; }
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--surface-2); }

/* ---------- Barre d'outils + filtres ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 10px;
  padding: 14px 16px 10px;
}
.count { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.tools { display: flex; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  font-weight: 700; font-size: .9rem; white-space: nowrap; transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.chip .ic { width: 18px; height: 18px; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"], .chip[aria-expanded="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font-size: .72rem; font-weight: 800;
}
.badge-count[hidden] { display: none; }

.filters {
  display: grid; gap: 16px; padding: 4px 16px 16px;
  border-bottom: 1px solid var(--line);
  max-height: 58%; overflow-y: auto; overscroll-behavior: contain; flex: none;
  animation: drop var(--dur) var(--ease);
}
.filters[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.label { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0; }
.req { color: var(--primary); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 40px; }
.select .ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
select, .sheet input, .sheet textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--bg); font-size: 16px; font-weight: 600; outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
select:focus, .sheet input:focus, .sheet textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  font-size: .88rem; font-weight: 700; transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.chips button .ic { width: 18px; height: 18px; }
.chips button:hover { background: var(--surface-2); }
.chips button[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chips button[aria-pressed="true"]::after {
  content: ""; width: 14px; height: 14px; margin-left: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.switch .track {
  width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; flex: none;
  transition: background var(--dur);
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.reset { justify-self: start; min-height: 40px; }

/* ---------- Liste ---------- */
.list {
  list-style: none; margin: 0; padding: 8px 10px 12px; overflow-y: auto; flex: 1;
  overscroll-behavior: contain; display: grid; gap: 6px; align-content: start; outline: none;
}
.card {
  width: 100%; text-align: left; border: 1.5px solid transparent; background: var(--surface);
  padding: 12px; border-radius: var(--radius); display: grid; gap: 4px;
  transition: background var(--dur), border-color var(--dur);
}
.card:hover { background: var(--surface-2); }
.list li.on .card { background: var(--accent-soft); border-color: var(--accent); }
.card .row { display: flex; align-items: flex-start; gap: 8px; }
.card .name { font-weight: 800; font-size: 1rem; line-height: 1.3; flex: 1; }
.card .dist {
  flex: none; font-size: .8rem; font-weight: 800; color: var(--accent);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.card .where { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.card .where .ic { width: 15px; height: 15px; }
.card .feat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; color: var(--muted); }
.card .feat .ic { width: 18px; height: 18px; }
.card .feat .more { font-size: .78rem; font-weight: 800; align-self: center; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap;
}
.tag .ic { width: 13px; height: 13px; stroke-width: 3; }
.tag.community { background: var(--accent-soft); color: var(--accent); }

.skeleton {
  height: 86px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty .ic { width: 44px; height: 44px; color: var(--line-strong); stroke-width: 1.5; }
.empty p { margin: 0; font-weight: 700; }

.made {
  margin: 0 0 10px !important; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2);
  display: grid !important; gap: 4px; font-size: .85rem; color: var(--ink);
}
.made a { color: var(--primary) !important; font-weight: 800; }
.made .heart { width: 15px; height: 15px; color: #e11d48; fill: #e11d48; vertical-align: -2px; }
.made .cta { text-decoration: none; }
.browse a { color: var(--primary); font-weight: 800; }
.made .cta:hover { text-decoration: underline; }
.by {
  flex: none; font-size: .78rem; font-weight: 800; color: var(--muted); text-decoration: none;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); margin-left: -4px;
}
.by:hover { color: var(--primary); border-color: var(--primary); }
@media (max-width: 1023px) { .by { display: none; } }
.credits { padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.credits p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.credits a { color: var(--muted); font-weight: 700; }

/* ---------- Carte ---------- */
.fab {
  position: absolute; right: 12px; bottom: 34px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
  display: grid; place-items: center; transition: background var(--dur);
}
.fab:hover { background: var(--surface-2); }
.fab[aria-pressed="true"] { color: var(--accent); }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-2) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }

.pin span {
  display: block; width: 24px; height: 24px; margin: 1px;
  background: var(--primary); border: 3px solid #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform var(--dur) var(--ease), background var(--dur);
}
.pin.active { z-index: 1000 !important; }
.pin.active span { background: var(--accent); transform: rotate(-45deg) scale(1.3); }
.pin-new span { background: var(--accent); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37, 99, 235, .25); }

.marker-cluster { background: rgba(194, 65, 12, .22); border-radius: 50%; }
.marker-cluster div {
  width: 32px; height: 32px; margin: 4px; border-radius: 50%; text-align: center;
  background: var(--primary); color: var(--on-primary); font-family: var(--font-body); font-weight: 800; font-size: 12px;
  box-shadow: 0 0 0 2px #fff;
}
.marker-cluster span { line-height: 32px; }

/* ---------- Popup ---------- */
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow-2); background: var(--surface); color: var(--ink); padding: 0; }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 0; width: min(300px, 78vw) !important; font-family: var(--font-body); font-size: 14px; line-height: 1.45; }
.leaflet-container a.leaflet-popup-close-button { width: 36px; height: 36px; font-size: 22px; line-height: 34px; color: var(--muted); top: 4px; right: 4px; }
.pop { padding: 16px; display: grid; gap: 10px; }
.pop h3 { margin: 0; padding-right: 26px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.15; font-weight: 800; }
.pop .where { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; margin: -6px 0 0; }
.pop .where .ic { width: 15px; height: 15px; }
.pop .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pop .feat { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pop .feat li { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: .82rem; }
.pop .feat .ic { width: 16px; height: 16px; }
.pop .src { margin: 0; font-size: .78rem; color: var(--muted); }
.pop .none { margin: 0; color: var(--muted); font-size: .85rem; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .85rem; }
.pop dt { color: var(--muted); font-weight: 700; }
.pop dd { margin: 0; }
.pop .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pop .acts .btn { min-height: 40px; padding: 0 14px; font-size: .88rem; }
.pop .acts .btn .ic { width: 16px; height: 16px; }
.leaflet-container .pop a.btn-primary { color: var(--on-primary); }
.leaflet-container .pop a.btn-ghost { color: var(--ink); }

/* ---------- Formulaire de proposition ---------- */
dialog.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0;
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2);
}
dialog.sheet[open] { animation: pop-in 220ms var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.sheet::backdrop { background: var(--scrim); }
.sheet form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.sheet > form > header, .sheet > form > footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.sheet > form > header { border-bottom: 1px solid var(--line); }
.sheet > form > header h2 { margin: 0; flex: 1; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; }
.sheet > form > footer { border-top: 1px solid var(--line); justify-content: flex-end; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.sg-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 18px; overscroll-behavior: contain; }
#sg-map { height: 230px; border-radius: var(--radius); border: 1.5px solid var(--line-strong); }
#sg-map.invalid { border-color: var(--danger); }
.help { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; }
.field-err { margin: 0; color: var(--danger); font-weight: 800; font-size: .88rem; }
.field-err[hidden] { display: none; }
.sheet textarea { resize: vertical; font-weight: 500; }
.sg-msg { margin: 0; font-weight: 800; }
.sg-msg:empty { display: none; }
.sg-msg.ok { color: var(--ok); }
.sg-msg.err { color: var(--danger); }
.spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Tablette ---------- */
@media (max-width: 1023px) {
  :root { --panel-w: 340px; }
  .brand-txt small { display: none; }
}

/* ---------- Mobile : carte plein écran + panneau glissant ---------- */
@media (max-width: 767px) {
  :root { --header: auto; }
  .top { flex-wrap: wrap; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 10px; gap: 10px; }
  .brand { flex: 1; min-width: 0; }
  .brand-txt { min-width: 0; }
  .brand strong { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logo { width: 46px; height: 37px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .propose { padding: 0 14px; }
  .langs button { min-width: 34px; }
  body { overflow: hidden; position: fixed; inset: 0; }
  .layout { display: block; overflow: hidden; }
  .map-wrap { position: absolute; inset: 0; }
  .panel {
    position: absolute; left: 0; right: 0; bottom: 0; top: 48px;
    border-right: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-2);
    transform: translateY(calc(100% - var(--peek)));
    transition: transform 280ms var(--ease);
    will-change: transform;
  }
  body.sheet-open .panel { transform: none; }
  body.sheet-dragging .panel { transition: none; }
  .sheet-handle {
    display: grid; place-items: center; width: 100%; height: 28px; border: 0; background: transparent; flex: none;
    touch-action: none;
  }
  .grip { width: 44px; height: 5px; border-radius: 999px; background: var(--line-strong); }
  .toolbar { padding-top: 0; touch-action: none; }
  .tools .chip span:not(.badge-count) { display: none; }
  .tools .chip { padding: 0 12px; min-width: 44px; min-height: 44px; justify-content: center; }
  .list { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .fab { bottom: calc(var(--peek) + 12px); }
  .leaflet-bottom.leaflet-right { bottom: calc(var(--peek) - 8px); }
}
@media (max-width: 380px) {
  .propose span { display: none; }
  .propose { width: 44px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- Photos ---------- */
.pop.has-photo { padding-top: 0; }
.pop-photo {
  position: relative; display: block; margin: 0 -16px; padding: 0; border: 0; cursor: zoom-in;
  background: var(--surface-2); border-radius: 12px 12px 0 0; overflow: hidden;
}
.pop-photo img { display: block; width: 100%; height: 150px; object-fit: cover; }
.pop-photo .n {
  position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; background: rgba(28, 25, 23, .72); color: #fff; font-weight: 800; font-size: .8rem;
}
.pop-photo .n .ic { width: 15px; height: 15px; }
.pop-photo:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.pop.has-photo h3 { padding-right: 0; }
.leaflet-container .leaflet-popup:has(.pop.has-photo) a.leaflet-popup-close-button {
  color: #fff; background: rgba(28, 25, 23, .6); border-radius: 999px; top: 8px; right: 8px; z-index: 1;
}
.photo-count { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--muted); font-size: .78rem; font-weight: 800; vertical-align: 1px; }
.photo-count .ic { width: 14px; height: 14px; }

dialog.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(12, 10, 9, .94); color: #fff;
}
dialog.lightbox[open] { display: grid; place-items: center; animation: fade-in 180ms var(--ease); }
dialog.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; padding: 56px 16px 24px; max-width: 100%; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100dvh - 130px); width: auto; height: auto; border-radius: 10px; object-fit: contain; }
.lightbox figcaption { font-weight: 700; font-size: .9rem; color: #e7e5e4; text-align: center; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}
.lb-btn[hidden] { display: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-btn .ic { width: 26px; height: 26px; }
.lb-btn:focus-visible { outline: 3px solid #fdba74; outline-offset: 2px; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.lightbox[open] { animation: none; } }
