:root {
  --ink: #1c2a24;
  --ink-soft: #5a6b62;
  --mist: #eef3ef;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-solid: #fbfcfb;
  --line: rgba(28, 42, 36, 0.1);
  --saffron: #c66a2d;
  --saffron-soft: #c67a2a;
  --teal: #1f5c52;
  --teal-deep: #143d37;
  --gold: #b8924a;
  --warn: #a84b2f;
  --ok: #2f7a5a;
  --shadow: 0 22px 50px rgba(28, 50, 42, 0.1);
  --radius: 22px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --topbar-h: 64px;
  --frame: 0.8rem;
  --glow: 0 0 24px rgba(198, 106, 45, 0.16);
  --page-bg: #e8eee9;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.7));
  --glass-solid: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(251, 252, 251, 0.96));
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --search-bg: rgba(255, 255, 255, 0.88);
  --results-bg: rgba(255, 255, 255, 0.96);
  --filter-bg: rgba(255, 255, 255, 0.65);
  --control-bg: rgba(255, 255, 255, 0.94);
  --map-bg: #d7e0d8;
  --pin-fill: #f4ead8;
  --pin-border: #efe4ce;
  --pin-progress-fill: #cfe8df;
  --pin-progress-border: #6aa392;
  --placeholder: rgba(90, 107, 98, 0.65);
  --close-bg: rgba(255, 255, 255, 0.9);
  --mobile-toggle-bg: linear-gradient(180deg, #ffffff, #f4f7f5);
}

html[data-theme="dark"] {
  --ink: #f4efe6;
  --ink-soft: #b7c4bc;
  --mist: rgba(244, 239, 230, 0.08);
  --panel: rgba(10, 26, 24, 0.72);
  --panel-solid: #10211e;
  --line: rgba(224, 176, 110, 0.16);
  --saffron: #e09a45;
  --saffron-soft: #f0c27a;
  --teal: #8ec9b8;
  --teal-deep: #f4efe6;
  --gold: #d4b06a;
  --warn: #e07a5f;
  --ok: #5ec49a;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --glow: 0 0 28px rgba(224, 154, 69, 0.28);
  --page-bg: #0b1614;
  --glass: linear-gradient(180deg, rgba(16, 33, 30, 0.9), rgba(12, 26, 24, 0.8));
  --glass-solid: linear-gradient(180deg, rgba(18, 36, 33, 0.97), rgba(12, 26, 24, 0.96));
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --search-bg: rgba(8, 20, 18, 0.72);
  --results-bg: rgba(14, 30, 27, 0.96);
  --filter-bg: rgba(255, 255, 255, 0.06);
  --control-bg: rgba(16, 33, 30, 0.94);
  --map-bg: #1a2420;
  --pin-fill: #2a2418;
  --pin-border: #4a3f2a;
  --pin-progress-fill: #1e4a42;
  --pin-progress-border: #5ec4a8;
  --placeholder: rgba(183, 196, 188, 0.55);
  --close-bg: rgba(16, 33, 30, 0.9);
  --mobile-toggle-bg: linear-gradient(180deg, #1a2e2a, #12211e);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--page-bg);
  overflow: hidden;
  color-scheme: light;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  color-scheme: dark;
}

body {
  height: 100dvh;
}

.brand__name-short {
  display: none;
}

.sidebar__close,
.sidebar-scrim,
.detail__handle {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Atmosphere —— */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 120%, #dce8e2 0%, transparent 55%),
    linear-gradient(165deg, #eaf3ee 0%, #f4f1ea 48%, #f3e7d6 100%);
}

.atmosphere__mesh {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 55% 45% at 82% 8%, rgba(232, 165, 106, 0.42), transparent 58%),
    radial-gradient(ellipse 50% 55% at 8% 88%, rgba(90, 168, 148, 0.28), transparent 52%),
    radial-gradient(ellipse 35% 30% at 48% 42%, rgba(255, 255, 255, 0.55), transparent 62%);
  animation: meshShift 22s ease-in-out infinite alternate;
}

.atmosphere__wash {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -22deg,
      transparent,
      transparent 56px,
      rgba(31, 92, 82, 0.045) 56px,
      rgba(31, 92, 82, 0.045) 57px
    );
  opacity: 0.7;
}

.atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: drift 20s ease-in-out infinite alternate;
}

.atmosphere__orb--a {
  width: 48vw;
  height: 48vw;
  top: -16%;
  right: -12%;
  background: rgba(232, 165, 106, 0.38);
}

.atmosphere__orb--b {
  width: 40vw;
  height: 40vw;
  bottom: -18%;
  left: -10%;
  background: rgba(90, 168, 148, 0.28);
  animation-delay: -7s;
}

.atmosphere__orb--c {
  width: 22vw;
  height: 22vw;
  top: 38%;
  left: 42%;
  background: rgba(255, 255, 255, 0.55);
  animation-delay: -12s;
  animation-duration: 26s;
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .atmosphere {
  background:
    radial-gradient(ellipse 90% 70% at 50% 120%, #12211e 0%, transparent 55%),
    linear-gradient(165deg, #0c1614 0%, #101c1a 48%, #1a1810 100%);
}

html[data-theme="dark"] .atmosphere__mesh {
  background:
    radial-gradient(ellipse 55% 45% at 82% 8%, rgba(224, 154, 69, 0.22), transparent 58%),
    radial-gradient(ellipse 50% 55% at 8% 88%, rgba(90, 168, 148, 0.16), transparent 52%),
    radial-gradient(ellipse 35% 30% at 48% 42%, rgba(255, 255, 255, 0.04), transparent 62%);
}

html[data-theme="dark"] .atmosphere__orb--c {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .atmosphere__grain {
  mix-blend-mode: overlay;
  opacity: 0.2;
}

html[data-theme="dark"] .detail__section {
  background: rgba(244, 239, 230, 0.05);
  border-color: var(--line);
}

html[data-theme="dark"] .map-loader {
  background: radial-gradient(
    ellipse 55% 45% at 50% 48%,
    rgba(16, 33, 30, 0.55) 0%,
    rgba(11, 22, 20, 0.2) 55%,
    transparent 72%
  );
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 5%) scale(1.1); }
}

@keyframes meshShift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-2%, 3%) scale(1.06); }
}

/* —— Top bar —— */
.topbar {
  position: relative;
  z-index: 20;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(240px, 1.4fr) auto;
  gap: 1rem;
  align-items: center;
  margin: var(--frame) var(--frame) 0;
  padding: 0 1.15rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: var(--shadow), var(--inset);
  animation: dropIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(198, 106, 45, 0.35), var(--glow);
  animation: markGlow 4.5s ease-in-out infinite;
}

@keyframes markGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(198, 106, 45, 0.3), 0 0 14px rgba(198, 106, 45, 0.16); }
  50% { box-shadow: 0 0 0 1px rgba(198, 106, 45, 0.55), 0 0 22px rgba(198, 106, 45, 0.28); }
}

.brand__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__sub {
  margin: 0.12rem 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron-soft);
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

.theme-toggle {
  justify-self: end;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--close-bg);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}

.theme-toggle:hover {
  background: rgba(224, 154, 69, 0.16);
  color: var(--ink);
  border-color: rgba(224, 154, 69, 0.4);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle__icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  background: var(--search-bg);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(28, 50, 42, 0.06);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.search:focus-within {
  background: rgba(224, 154, 69, 0.08);
  border-color: rgba(224, 154, 69, 0.5);
  box-shadow: 0 0 0 4px rgba(224, 154, 69, 0.12), var(--glow);
}

.search__icon {
  width: 18px;
  height: 18px;
  color: var(--saffron-soft);
  flex-shrink: 0;
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  min-width: 0;
}

.search input::placeholder {
  color: var(--placeholder);
}

.search__hint {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--results-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow), var(--inset);
  backdrop-filter: blur(20px);
  max-height: 320px;
  overflow-y: auto;
  z-index: 40;
  animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-results li button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.72rem 0.8rem;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.18s, transform 0.18s;
}

.search-results li button:hover,
.search-results li button.is-active {
  background: rgba(224, 154, 69, 0.12);
}

.search-results .result-name {
  font-weight: 500;
  font-size: 0.92rem;
}

.search-results .result-meta {
  grid-column: 1;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.search-results .result-region {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--saffron-soft);
  font-weight: 500;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.4rem 1rem 1.25rem;
  text-align: center;
  pointer-events: none;
}

.search-empty__mark {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 0.25rem;
}

.search-empty__flame {
  position: absolute;
  inset: 10px;
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.12;
}

.search-empty__globe {
  position: absolute;
  inset: 0;
  width: 64px;
  height: 64px;
  color: var(--saffron-soft);
  opacity: 0.35;
}

.search-empty__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.search-empty__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 300;
}

/* —— Stage —— */
.stage {
  position: relative;
  z-index: 10;
  height: calc(100dvh - var(--topbar-h) - var(--frame) * 3);
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: var(--frame);
  margin: var(--frame);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.2rem 0.95rem 0.9rem 1.1rem;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--inset);
  animation: slideInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}

.sidebar__intro {
  padding: 0 0.4rem 1rem;
}

.sidebar__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
}

.sidebar__title::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 0.65rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--saffron), transparent);
}

.sidebar__lede {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
}

.restore-update {
  margin-top: 0.85rem;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--filter-bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.restore-update:hover:not(:disabled) {
  border-color: rgba(224, 154, 69, 0.4);
  background: rgba(224, 154, 69, 0.12);
}

.restore-update:disabled {
  opacity: 0.45;
  cursor: default;
}

.filters {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  z-index: 21;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow), var(--inset);
}

.filter-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--filter-bg);
  overflow: hidden;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.filter-group:hover {
  border-color: rgba(224, 154, 69, 0.4);
  color: var(--ink);
  transform: translateY(-1px);
}

.filter-caret {
  display: grid;
  place-items: center;
  width: 1.55rem;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.filter-caret svg {
  width: 11px;
  height: 11px;
  transition: transform 0.2s;
}

.filter-group.is-open .filter-caret svg {
  transform: rotate(180deg);
}

.filter {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.38rem 0.7rem 0.38rem 0.55rem;
  border-radius: 0;
  cursor: pointer;
}

.filter-group:has(.filter.is-active) {
  background: linear-gradient(180deg, #e6a85a, #c67a2a);
  border-color: transparent;
  color: #1a1208;
  box-shadow: 0 6px 16px rgba(224, 154, 69, 0.28);
}

.filter-group:has(.filter.is-active) .filter-caret {
  border-right-color: rgba(26, 18, 8, 0.18);
}

.region-menu {
  position: absolute;
  z-index: 23;
  min-width: 220px;
  max-width: min(320px, calc(100% - 1.4rem));
  max-height: min(46vh, 340px);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--results-bg);
  box-shadow: var(--shadow), var(--inset);
  backdrop-filter: blur(18px);
}

.region-menu[hidden] {
  display: none;
}

.region-menu li button {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}

.region-menu li button:hover {
  background: rgba(224, 154, 69, 0.12);
}

.region-menu__empty {
  padding: 0.7rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.centre-list {
  list-style: none;
  margin: 0;
  padding: 0 0.15rem 0.4rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 154, 69, 0.35) transparent;
}

.centre-list li {
  animation: listIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 38ms);
}

.centre-list.is-settled li {
  animation: none;
}

@keyframes listIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.centre-list li button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.72rem 0.65rem;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  transition: background 0.2s, transform 0.2s;
}

.centre-list li button:hover {
  background: rgba(31, 92, 82, 0.06);
}

.centre-list li button.is-selected {
  background: rgba(224, 154, 69, 0.14);
}

.centre-list li button.is-selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--saffron);
  box-shadow: 0 0 8px rgba(224, 154, 69, 0.7);
}

.pin-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 3px rgba(224, 154, 69, 0.2), 0 0 10px rgba(224, 154, 69, 0.45);
}

.pin-dot--warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.22);
}

.centre-list__name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
}

.centre-list__city {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--saffron-soft);
  margin-top: 0.18rem;
}

.centre-list__date {
  font-size: 0.7rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.list-empty {
  padding: 1.4rem 0.7rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 300;
}

.skeleton-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.72rem 0.55rem;
}

.skeleton-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(224, 154, 69, 0.28);
}

.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.skeleton-line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(31, 92, 82, 0.06) 0%,
    rgba(198, 106, 45, 0.16) 45%,
    rgba(31, 92, 82, 0.06) 90%
  );
  background-size: 220% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line--name { width: 62%; height: 11px; }
.skeleton-line--wide { width: 78%; height: 11px; }
.skeleton-line--short { width: 48%; height: 11px; }
.skeleton-line--meta { width: 34%; height: 8px; animation-delay: 0.18s; }

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* —— Map —— */
.map-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), var(--inset);
  animation: fadeIn 0.9s ease 0.12s both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.map-container {
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  z-index: 1;
}

.map-container .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  font: inherit;
}

.map-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse 55% 45% at 50% 48%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(232, 238, 233, 0.08) 55%,
    transparent 72%
  );
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.map-panel.is-loading .map-loader {
  opacity: 1;
  visibility: visible;
}

.map-loader__ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid rgba(224, 154, 69, 0.35);
  box-shadow: 0 0 0 12px rgba(224, 154, 69, 0.07), 0 0 32px rgba(224, 154, 69, 0.2);
  animation: mapRing 1.8s ease-in-out infinite;
}

@keyframes mapRing {
  0%, 100% { transform: scale(0.9); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 1; }
}

.map-pin {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.map-pin__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 100%;
  transition: transform 0.2s ease;
}

.map-pin.is-entering .map-pin__inner {
  animation: pinIn 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--pin-delay, 0ms);
}

@keyframes pinIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.leaflet-marker-icon.map-pin:hover .map-pin__inner {
  transform: translateY(-2px);
}

.map-pin__badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 32px;
  border-radius: 50%;
  background: var(--pin-fill) !important;
  border: 1.5px solid var(--pin-border);
  box-shadow: 0 2px 8px rgba(20, 40, 35, 0.35), 0 0 0 1px rgba(224, 154, 69, 0.15);
  box-sizing: border-box;
  padding: 4px 3px;
}

.map-pin__count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--saffron);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 1.5px var(--page-bg);
}

.map-pin.is-selected .map-pin__badge {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(224, 154, 69, 0.4), 0 4px 12px rgba(20, 40, 35, 0.3);
}

.map-pin.is-progress .map-pin__badge {
  background: var(--pin-progress-fill) !important;
  border-color: var(--pin-progress-border);
  box-shadow: 0 2px 8px rgba(20, 40, 35, 0.35), 0 0 0 1px rgba(31, 92, 82, 0.2);
}

.map-pin.is-progress.is-selected .map-pin__badge {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 92, 82, 0.35), 0 4px 12px rgba(20, 40, 35, 0.3);
}

.map-pin.is-progress .map-pin__pointer {
  border-top-color: var(--pin-progress-fill);
}

.map-pin__badge img {
  display: block;
  width: 14px;
  height: 18px;
  object-fit: contain;
  background: transparent;
}

.map-pin__pointer {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--pin-fill);
  margin-top: -1px;
  filter: drop-shadow(0 1px 1px rgba(20, 40, 35, 0.18));
}

.leaflet-marker-icon.map-pin:hover {
  z-index: 600 !important;
}

.leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(28, 50, 42, 0.12) !important;
  margin-right: 14px !important;
  margin-bottom: 14px !important;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  color: var(--teal-deep) !important;
  background: var(--control-bg) !important;
  border-bottom-color: var(--line) !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(224, 154, 69, 0.2) !important;
  color: var(--saffron-soft) !important;
}

.leaflet-control-attribution {
  background: var(--control-bg) !important;
  font-size: 10px !important;
  color: var(--ink-soft) !important;
  border-radius: 8px 0 0 0;
}

.leaflet-control-attribution a {
  color: var(--saffron-soft) !important;
}

/* —— Detail panel —— */
.detail {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  width: min(390px, calc(100% - 2rem));
  background: var(--glass-solid);
  border: 1px solid rgba(198, 106, 45, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--inset);
  backdrop-filter: blur(18px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(28px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.detail[hidden] {
  display: none;
}

.detail__close,
.detail__back {
  position: absolute;
  top: 0.85rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--close-bg);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  z-index: 2;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}

.detail__close { right: 0.85rem; }
.detail__back { left: 0.85rem; }

.detail__close:hover,
.detail__back:hover {
  background: rgba(224, 154, 69, 0.16);
  color: var(--ink);
  border-color: rgba(224, 154, 69, 0.4);
  transform: scale(1.05);
}

.detail__close svg,
.detail__back svg {
  width: 16px;
  height: 16px;
}

.detail__scroll {
  overflow-y: auto;
  padding: 1.45rem 1.4rem 1.55rem;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(224, 154, 69, 0.35) transparent;
}

.chooser-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.chooser-list li + li {
  margin-top: 0.15rem;
}

.chooser-list button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 0.95rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: padding-left 0.2s;
}

.chooser-list button:hover {
  padding-left: 0.35rem;
}

.chooser-list button:hover .chooser-list__name {
  color: var(--saffron-soft);
}

.chooser-list__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.2s;
}

.chooser-list__meta {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.detail__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin: 0 2.2rem 0.55rem;
}

.detail__title {
  margin: 0 2.2rem 0.35rem 2.2rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.detail__month {
  margin: 0 2.2rem 1.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron-soft);
  font-weight: 500;
}

.detail__location {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.15rem 0;
}

.metric {
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: rgba(224, 154, 69, 0.08);
  border: 1px solid rgba(224, 154, 69, 0.14);
}

.metric__label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.metric__value {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.detail__section {
  margin-top: 1.2rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(31, 92, 82, 0.04);
  border: 1px solid rgba(28, 42, 36, 0.06);
}

.detail__section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron-soft);
  font-weight: 500;
}

.detail__section p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

.history-toggle {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--filter-bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.history-toggle:hover {
  border-color: rgba(224, 154, 69, 0.4);
  background: rgba(224, 154, 69, 0.12);
}

.update-history {
  margin-top: 0.35rem;
}

.detail__history-label {
  margin: 1.35rem 0 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron-soft);
  font-weight: 500;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

.contact-row strong {
  color: var(--ink);
  font-weight: 500;
}

.mobile-toggle {
  display: none;
}

/* —— Responsive —— */
@media (max-width: 980px) {
  :root {
    --frame: 0.55rem;
    --topbar-h: auto;
    --radius: 18px;
  }

  body {
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
  }

  button,
  input,
  .leaflet-container {
    touch-action: manipulation;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    flex-shrink: 0;
    margin: var(--frame) var(--frame) 0;
    padding: 0.9rem 1rem 1rem;
    gap: 0.8rem;
    border-radius: 18px;
  }

  .brand {
    grid-column: 1;
    gap: 0.75rem;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
    align-self: start;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }

  .brand__name-full {
    display: none;
  }

  .brand__name-short {
    display: inline;
    font-size: 1.35rem;
  }

  .brand__sub {
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    margin-top: 0.15rem;
  }

  .search-wrap {
    grid-column: 1 / -1;
    max-width: none;
    justify-self: stretch;
    z-index: 45;
  }

  .search {
    padding: 0.78rem 1rem;
    min-height: 50px;
  }

  .search__icon {
    width: 20px;
    height: 20px;
  }

  .search input {
    font-size: 17px;
  }

  .search__hint {
    display: none;
  }

  .search-results {
    max-height: min(50dvh, 320px);
  }

  .search-results li button {
    padding: 0.85rem 0.8rem;
    min-height: 48px;
  }

  .stage {
    flex: 1;
    min-height: 0;
    height: auto;
    grid-template-columns: 1fr;
    margin: var(--frame);
  }

  .sidebar-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 24;
    border-radius: var(--radius);
    background: rgba(20, 32, 28, 0.28);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .sidebar-scrim:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(360px, calc(100% - 2.5rem));
    z-index: 26;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 0.85rem 1.25rem 0.95rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--close-bg);
    color: var(--ink-soft);
    cursor: pointer;
    z-index: 2;
  }

  .sidebar__intro {
    padding-right: 3rem;
    padding-bottom: 0.7rem;
  }

  .sidebar__title {
    font-size: 1.65rem;
  }

  .sidebar__lede {
    font-size: 0.82rem;
  }

  .restore-update {
    min-height: 44px;
    font-size: 0.8rem;
  }

  .filters {
    top: 0.55rem;
    left: 0.55rem;
    right: 3.6rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.35rem 0.4rem;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  body.has-detail .filters {
    right: 0.55rem;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.45rem 0.85rem 0.45rem 0.55rem;
    font-size: 0.75rem;
  }

  .filter-group {
    flex-shrink: 0;
  }

  .filter-caret {
    width: 1.7rem;
  }

  .centre-list {
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .centre-list li button {
    min-height: 52px;
    padding: 0.8rem 0.65rem;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    z-index: 22;
    min-height: 46px;
    padding: 0 0.95rem 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--mobile-toggle-bg);
    box-shadow: var(--shadow), var(--glow);
    color: var(--teal-deep);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
  }

  .mobile-toggle__icon {
    width: 18px;
    height: 18px;
  }

  body.is-sidebar-open .mobile-toggle,
  body.has-detail .mobile-toggle {
    display: none;
  }

  .map-pin__badge {
    width: 28px;
    height: 36px;
    padding: 5px 4px;
  }

  .map-pin__badge img {
    width: 16px;
    height: 20px;
  }

  .leaflet-control-zoom {
    margin-top: 12px !important;
    margin-right: 12px !important;
  }

  .leaflet-control-zoom a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
  }

  .leaflet-control-attribution {
    max-width: 46%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.has-detail .leaflet-bottom {
    bottom: min(68dvh, 480px);
  }

  .detail {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: min(72dvh, 620px);
    border-radius: 22px 22px 0 0;
    animation: sheetUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }

  @keyframes sheetUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .detail__handle {
    display: block;
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: rgba(28, 42, 36, 0.18);
    margin: 0.7rem auto 0.15rem;
  }

  .detail__close,
  .detail__back {
    top: 0.85rem;
    width: 48px;
    height: 48px;
  }

  .detail__scroll {
    padding: 0.85rem 1.25rem 1.5rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .detail__title {
    margin: 0 3.5rem 0.4rem;
    font-size: 1.75rem;
    overflow-wrap: anywhere;
  }

  .detail__month {
    margin: 0 3.5rem 1rem;
    font-size: 0.82rem;
  }

  .detail__section {
    margin-top: 1rem;
    padding: 1rem 1.05rem;
  }

  .detail__section h3 {
    font-size: 0.74rem;
  }

  .detail__section p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .history-toggle {
    min-height: 48px;
    font-size: 0.88rem;
  }

  .chooser-list__name {
    font-size: 1.4rem;
  }

  .chooser-list__meta {
    font-size: 1rem;
  }

  .chooser-list button {
    min-height: 68px;
    padding: 1.05rem 0.2rem;
    gap: 0.45rem;
  }
}

@media (min-width: 981px) {
  .topbar {
    height: var(--topbar-h);
    grid-template-columns: minmax(220px, 1.1fr) minmax(240px, 1.4fr) auto;
    grid-template-rows: none;
    padding: 0 1.15rem;
    gap: 1rem;
    border-radius: 20px;
    flex-shrink: initial;
  }

  .brand__name-full {
    display: inline;
  }

  .brand__name-short {
    display: none;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }

  .search {
    padding: 0.62rem 0.9rem;
    min-height: 0;
  }

  .search__icon {
    width: 18px;
    height: 18px;
  }

  .search input {
    font-size: inherit;
  }

  .stage {
    flex: initial;
    min-height: auto;
    height: calc(100dvh - var(--topbar-h) - var(--frame) * 3);
    grid-template-columns: minmax(280px, 360px) 1fr;
  }

  body.has-detail .filters {
    right: 26rem;
  }

  .detail {
    top: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    left: auto;
    width: min(390px, calc(100% - 2rem));
    max-height: none;
    border-radius: var(--radius);
    animation: slideInRight 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: 0;
  }

  .detail__handle {
    display: none;
  }

  .detail__close,
  .detail__back {
    top: 0.85rem;
    width: 36px;
    height: 36px;
  }

  .detail__scroll {
    padding: 1.45rem 1.4rem 1.55rem;
  }

  .detail__title {
    margin: 0 2.2rem 0.35rem;
    font-size: 1.9rem;
  }

  .detail__month {
    margin: 0 2.2rem 1.15rem;
    font-size: 0.7rem;
  }

  .detail__section {
    margin-top: 0.85rem;
    padding: 0.85rem 0.9rem;
  }

  .detail__section h3 {
    font-size: inherit;
  }

  .detail__section p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .chooser-list__name {
    font-size: 1.25rem;
  }

  .chooser-list__meta {
    font-size: 0.92rem;
  }

  .chooser-list button {
    min-height: 0;
    padding: 0.95rem 0.2rem;
    gap: 0.35rem;
  }
}

@media (max-width: 980px) and (max-height: 520px) {
  .brand__sub {
    display: none;
  }

  .detail {
    max-height: 82dvh;
  }

  .mobile-toggle {
    bottom: 0.55rem;
    left: 0.55rem;
  }
}

@media (max-width: 520px) {
  .search-results .result-region {
    display: none;
  }

  .search-results li button {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere__orb,
  .atmosphere__mesh,
  .brand__mark,
  .skeleton-line,
  .map-loader__ring,
  .map-pin.is-entering .map-pin__inner,
  .centre-list li {
    animation: none;
  }

  .map-panel,
  .sidebar,
  .topbar,
  .detail,
  .search-results {
    animation: none;
  }
}
