:root {
  color-scheme: only light;
  --paper: #f6f2ea;
  --paper-strong: #fbf8f2;
  --ink: #241f1b;
  --muted: #77716b;
  --line: #e3ded5;
  --accent: #d95646;
  --accent-hover: #bd4133;
  --accent-soft: #f3d6cf;
  --accent-soft-hover: #ebc5bb;
  --map-accent: #d95646;
  --focus-ring: rgb(217 87 69 / 48%);
  --soft-action-ink: #823528;
  --shadow: 0 20px 50px rgba(59, 48, 40, 0.18);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
.map:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.app-shell,
.map-stage,
.map {
  position: relative;
  width: 100%;
  height: 100%;
}

.app-shell { height: 100dvh; }

.map {
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background-color: var(--paper);
}

.map.is-dragging {
  cursor: grabbing;
}

.vector-map,
.tile-pane,
.schematic-pane,
.marker-layer,
.map-wash {
  position: absolute;
  inset: 0;
}

.vector-map {
  z-index: 1;
  overflow: hidden;
  background: var(--paper);
  pointer-events: none;
}

.vector-map.maplibregl-map,
.vector-map .maplibregl-canvas-container,
.vector-map .maplibregl-canvas {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vector-map .maplibregl-control-container {
  display: none;
}

.schematic-pane {
  z-index: 0;
  overflow: hidden;
  background: var(--paper);
  opacity: 1;
}

.schematic-pane svg {
  display: block;
  visibility: hidden;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 0 0;
}

.schematic-pane path,
.schematic-pane ellipse {
  vector-effect: non-scaling-stroke;
}

.schematic-water-outline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 29;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-water {
  fill: none;
  stroke: #d7e3e2;
  stroke-width: 23;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schematic-park {
  fill: rgba(195, 209, 187, 0.42);
  stroke: rgba(155, 174, 148, 0.32);
  stroke-width: 1;
}

.schematic-label {
  fill: #817c74;
  font: 600 calc(11px / var(--schematic-scale, 1)) var(--sans);
  letter-spacing: 0.14em;
  text-anchor: middle;
  text-transform: uppercase;
}

.tile-pane {
  z-index: 1;
  overflow: hidden;
  background: transparent;
}

.tile-level {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.tile-level.is-prefetch {
  visibility: hidden;
}

.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  border: 0;
  opacity: 0;
  filter: grayscale(1) saturate(0.16) contrast(0.56) brightness(1.19) sepia(0.06);
  transition: opacity 180ms ease;
}

.tile-level.is-stale .map-tile.is-loaded {
  opacity: 0.32;
}

.map-tile.is-loaded {
  opacity: 0.46;
}

.map-wash {
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(251, 248, 242, 0.5) 0, rgba(251, 248, 242, 0.1) 19%, transparent 35%);
}

/* The real MapLibre canvas stays mounted under this light paper veil. */
.map-loading {
  position: fixed;
  z-index: 75;
  inset: 0;
  background: rgba(246, 242, 234, 0.38);
  transition: opacity var(--loading-reveal) ease;
  touch-action: none;
}

.map-loading.is-leaving { opacity: 0; }
.loading-signals { position: absolute; inset: 0; }
.loading-signal {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: signal-enter var(--loading-signalEnter) ease var(--signal-delay) forwards;
}
.loading-signal::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: signal-wave var(--loading-wave) ease-out var(--signal-delay) both;
}
.loading-copy {
  position: absolute;
  top: 47%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 40px);
  margin: 0;
  color: var(--ink);
  font: 400 clamp(1.15rem, 4.8vw, 1.5rem)/1.35 var(--serif);
  letter-spacing: -0.025em;
  text-align: center;
  text-shadow: 0 1px 12px var(--paper), 0 0 28px var(--paper);
  opacity: 0;
  translate: -50% 0;
  animation: loading-text var(--loading-textEnter) ease var(--loading-copyAt) forwards;
}
body.is-booting .map-controls { visibility: hidden; opacity: 0; }
body.loading-started .vector-map {
  animation: map-enter var(--loading-mapEnter) ease both;
}
.marker-layer { transition: opacity var(--loading-reveal) ease; }
body.is-booting .marker-layer,
body.has-loading-error .marker-layer { visibility: hidden; opacity: 0; }
body.is-booting .preview,
body.is-booting .story,
body.is-booting .empty-state { visibility: hidden; }
@keyframes map-enter {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes signal-enter {
  from { opacity: 0; transform: scale(0.65); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes signal-wave {
  from { opacity: 0.38; transform: scale(0.45); }
  to { opacity: 0; transform: scale(2.5); }
}
@keyframes loading-text {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes loading-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.map-controls {
  position: fixed;
  z-index: 68;
  top: calc(env(safe-area-inset-top) + clamp(14px, 2.2vw, 30px));
  left: calc(env(safe-area-inset-left) + clamp(14px, 2.2vw, 30px));
  right: calc(env(safe-area-inset-right) + clamp(14px, 2.2vw, 30px));
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.map-controls[hidden] { display: none; }

.filter-bar,
.open-place-list {
  border: 1px solid rgba(62, 51, 43, 0.15);
  background: rgba(251, 248, 242, 0.95);
  box-shadow: 0 8px 26px rgba(59, 48, 40, 0.12);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.filter-bar {
  display: flex;
  min-width: 0;
  padding: 4px;
  gap: 3px;
  overflow-x: auto;
  border-radius: 999px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.open-place-list {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 clamp(10px, 3vw, 17px);
  border-radius: 999px;
  color: var(--ink);
  font: 700 0.79rem/1 var(--sans);
  cursor: pointer;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #514b46;
  font: 700 0.76rem/1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.filter-chip.is-active {
  background: var(--accent);
  color: #fff;
}

.filter-chip:active { transform: scale(0.96); }
.filter-chip:focus-visible { outline-offset: 1px; }

.map-attribution {
  position: fixed;
  z-index: 85;
  right: calc(8px + env(safe-area-inset-right));
  bottom: calc(4px + env(safe-area-inset-bottom));
  margin: 0;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #69655f;
  font-size: 0.56rem;
}

.map-attribution a {
  color: inherit;
}

.marker-layer {
  z-index: 15;
  pointer-events: none;
}

.marker-cluster {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  line-height: 1;
  box-shadow: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.marker-cluster::before,
.marker-cluster::after {
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.marker-cluster::before {
  content: "";
  border: 2px solid var(--paper-strong);
  background: var(--map-accent);
  box-shadow: 0 3px 10px rgba(74, 48, 38, 0.12);
}

.marker-cluster::after {
  content: attr(data-cluster-count);
  color: #fff;
  font: 600 0.78rem/1 var(--sans);
}

.marker-cluster:active {
  transform: translate(-50%, -50%) scale(0.94);
}

.marker-cluster:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.photo-marker {
  position: absolute;
  width: 58px;
  height: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 180ms ease, filter 180ms ease;
}

.photo-marker.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.photo-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 1px;
  height: 6px;
  background: rgba(75, 58, 47, 0.42);
  transform: translateX(-50%);
}

.photo-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper-strong);
  border-radius: 50%;
  background: var(--map-accent);
  box-shadow: 0 2px 5px rgba(80, 42, 30, 0.28);
  transform: translate(-50%, 50%);
}

.photo-marker__frame {
  position: absolute;
  inset: 0 3px 9px;
  overflow: hidden;
  border: 3px solid var(--paper-strong);
  border-radius: 13px;
  background: var(--paper-strong);
  box-shadow: 0 5px 14px rgba(58, 49, 42, 0.16), 0 0 0 1px rgba(36, 31, 27, 0.08);
}

.photo-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-icon {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #eee6dc;
  color: #614d3c;
}

.category-icon svg { width: 25px; height: 25px; }
.category-icon[data-kind="coffee"] { background: #f0e3d3; color: #78522e; }
.category-icon[data-kind="bar"] { background: #eee0e8; color: #754966; }
.category-icon[data-kind="restaurant"] { background: #f4e2d9; color: #94412f; }
.category-icon[data-kind="culture"] { background: #e2e8f0; color: #435b77; }
.category-icon[data-kind="walk"] { background: #e4eadc; color: #466142; }
.category-icon[data-kind="entertainment"] { background: #eee7d4; color: #765a28; }

.photo-marker.is-selected {
  z-index: 1000000 !important;
  transform: translate(-50%, -100%) scale(1.12);
}

.photo-marker.is-selected .photo-marker__frame {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--paper-strong), 0 9px 20px rgba(58, 49, 42, 0.2);
}

.preview {
  position: fixed;
  z-index: 70;
  left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(28px + env(safe-area-inset-bottom));
  visibility: hidden;
  opacity: 0;
  transform: translateY(calc(100% + 30px));
  transition: transform 280ms cubic-bezier(0.22, 0.8, 0.2, 1), opacity 220ms ease, visibility 280ms;
}

.preview.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-property: transform, opacity;
}

body.has-story .preview {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.preview-card {
  position: relative;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(62, 51, 43, 0.12);
  border-radius: 26px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  backdrop-filter: blur(16px);
}

.preview-open {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  padding: 0;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.preview-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 12px;
  padding-top: 11px;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.preview-location {
  display: -webkit-box;
  overflow: hidden;
  color: #625c56;
  font-size: 0.79rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.media-box {
  position: relative;
  overflow: hidden;
}

.media-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.media-box img.is-loaded { opacity: 1; }

.preview-media {
  width: 80px;
  height: 88px;
  align-self: center;
  border-radius: 17px;
}

.preview-copy {
  min-width: 0;
  align-self: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview h2 {
  display: block;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4.8vw, 1.45rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.preview-place {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: #625c56;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.preview-chevron {
  align-self: center;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 200;
}

.story {
  position: fixed;
  z-index: 100;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  background: var(--paper-strong);
  color: var(--ink);
  transition: opacity 230ms ease, transform 300ms cubic-bezier(0.22, 0.8, 0.2, 1);
  overscroll-behavior: contain;
}

.story::backdrop { background: transparent; }

@starting-style {
  .story[open] { opacity: 0; transform: translateY(4%); }
  transition-property: opacity, transform;
}

.story-content {
  min-height: 100%;
}

.place-list {
  width: min(470px, calc(100% - 24px));
  max-height: min(720px, calc(100dvh - 32px - env(safe-area-inset-bottom)));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.place-list[open] {
  display: flex;
  flex-direction: column;
}
.place-list::backdrop { background: rgb(34 29 25 / 34%); }

.place-list-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.place-list-heading,
.place-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.place-list-heading h2 {
  margin: 0;
  font: 500 1.8rem/1.1 var(--serif);
}

.place-list-heading p {
  margin: 5px 0 0;
  color: #625c56;
  font-size: 0.82rem;
}

.place-list-close,
.show-all-places {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.place-list-close {
  width: 44px;
  border-radius: 50%;
  font: 1.4rem var(--sans);
}

.show-all-places {
  width: 100%;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--soft-action-ink);
  font: 700 0.84rem var(--sans);
}

.show-all-places:disabled { opacity: 0.55; cursor: default; }
.place-list-items {
  min-height: 0;
  margin: 0;
  padding: 6px 8px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.place-list-row {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.place-list-row:hover,
.place-list-row:focus-visible { background: var(--paper); }
.place-list-row:focus-visible { outline-offset: -3px; }
.place-list-media { flex: 0 0 44px; height: 44px; border-radius: 11px; }
.place-list-copy { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.place-list-copy strong { display: block; font: 500 1.05rem/1.25 var(--serif); }
.place-list-copy span { display: block; margin-top: 3px; color: #625c56; font-size: 0.76rem; }
.place-list-copy .place-list-program {
  color: var(--soft-action-ink);
  font-size: 0.8rem;
  line-height: 1.35;
}
.place-list-empty { padding: 16px; color: #625c56; }

@media (max-width: 699px) {
  .place-list { margin-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

.story-hero {
  position: relative;
  height: clamp(220px, 30vh, 264px);
  height: clamp(220px, 30svh, 264px);
  overflow: hidden;
  background: var(--paper);
}

.story-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(20, 16, 12, 0.34));
  pointer-events: none;
}

.story-close {
  position: absolute;
  z-index: 3;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(48, 40, 34, 0.12);
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.92);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(49, 39, 32, 0.16);
}

.story-topbar {
  position: relative;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.story-body {
  position: relative;
  z-index: 4;
  margin-top: -20px;
  padding: 30px 22px calc(50px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--paper-strong);
}

.story-body--no-hero {
  margin-top: 0;
  padding-top: 28px;
  border-radius: 0;
}

.story-body h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.story-category {
  display: flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-category::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.story-place {
  margin: 12px 0 0;
  color: #514b46;
  font-size: 1rem;
  line-height: 1.45;
}

.story-location {
  display: block;
  margin: 12px 0 0;
  color: #625c56;
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.route-action {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.route-action:hover { background: var(--accent-hover); }
.route-action:active { transform: scale(0.98); }
.story-location__action { width: 100%; margin-top: 18px; }
.preview-route {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--soft-action-ink);
  font-size: 0.76rem;
  white-space: nowrap;
}
.preview-route:hover { background: var(--accent-soft-hover); }

.story-description {
  max-width: 660px;
  margin: 26px 0 0;
  font-size: 1rem;
  line-height: 1.58;
}

.story-program {
  margin-top: 24px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--soft-action-ink);
}

.story-program h3 { margin: 0; font: 500 1.2rem/1.25 var(--serif); }
.story-program p { margin: 6px 0 10px; line-height: 1.45; }
.story-program a { color: inherit; font-size: 0.86rem; font-weight: 700; text-underline-offset: 3px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.tags li {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #514b46;
  font-size: 0.76rem;
}

.gallery {
  display: grid;
  grid-auto-columns: minmax(72%, 1fr);
  grid-auto-flow: column;
  margin: 32px -22px 0;
  padding: 0 22px 8px;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar { display: none; }

.gallery .media-box {
  height: min(72vw, 420px);
  border-radius: 17px;
  scroll-snap-align: center;
}

.story-sources {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.story-sources h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.source-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.source-list a,
.source-unavailable {
  color: #586c72;
  font-size: 0.98rem;
  text-underline-offset: 3px;
}

.source-unavailable { color: var(--muted); }

.source-external {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  font-size: 0.85em;
  text-decoration: none;
}

.empty-state {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  width: min(330px, calc(100% - 40px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.95);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
}

.empty-state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.empty-state p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (min-width: 700px) {
  .preview {
    right: auto;
    bottom: calc(28px + env(safe-area-inset-bottom));
    left: calc(28px + env(safe-area-inset-left));
    width: 440px;
  }

  .preview-open { grid-template-columns: 94px minmax(0, 1fr) 22px; }

  .preview-media {
    width: 94px;
    height: 100px;
  }

  .preview h2 {
    font-size: 1.55rem;
  }

  .story {
    left: auto;
    width: min(540px, 46vw);
    border-left: 1px solid var(--line);
    box-shadow: -22px 0 60px rgba(46, 38, 32, 0.2);
  }

  @starting-style {
    .story[open] { transform: translateX(5%); }
  }

  .story-body {
    padding-right: 36px;
    padding-left: 36px;
  }

  .gallery {
    margin-right: -36px;
    margin-left: -36px;
    padding-right: 36px;
    padding-left: 36px;
  }
}

@media (max-width: 370px) {
  .preview-open { grid-template-columns: 62px minmax(0, 1fr) 14px; gap: 10px; }
  .preview-media { width: 62px; height: 78px; }
  .preview h2 { font-size: 1.2rem; }
  .preview-route { padding-right: 10px; padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story, .preview { transition: none !important; }
  body.loading-started .vector-map,
  .loading-copy,
  .loading-signal {
    animation-name: loading-fade;
    animation-duration: 120ms !important;
    transform: none;
  }
  .loading-signal::after { animation: none; }
  .map-loading, .marker-layer { transition-duration: var(--loading-reducedReveal) !important; }
}

:root[data-theme="new-year"] {
  --paper: #f0f3ee;
  --paper-strong: #f9faf5;
  --ink: #202c27;
  --line: #dbe4dd;
  --accent: #285a49;
  --accent-hover: #1e493a;
  --accent-soft: #e0ece2;
  --accent-soft-hover: #cfe2d4;
  --map-accent: #9b5148;
  --focus-ring: rgb(40 90 73 / 48%);
  --soft-action-ink: #234c3d;
  --holiday-gold: #9a681e;
  --holiday-light: #d49a3c;
}

[data-theme="new-year"] .filter-bar {
  background: rgb(247 250 246 / 96%);
}

.filter-chip--seasonal:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-inline: 12px;
  border: 1px solid #e8d6b5;
  background: #f3ead7;
  color: #624719;
}

.filter-chip--seasonal::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--holiday-gold);
  clip-path: polygon(50% 0, 63% 36%, 100% 50%, 63% 64%, 50% 100%, 37% 64%, 0 50%, 37% 36%);
}

.filter-chip--seasonal.is-active:not([hidden]) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.filter-chip--seasonal.is-active::before { background: #f6ce82; }

[data-theme="new-year"] .open-place-list {
  position: relative;
  border-color: #254f42;
  background: var(--accent);
  color: #fff;
}

[data-theme="new-year"] .map-wash {
  background: linear-gradient(180deg, rgb(218 234 232 / 52%), transparent 46%);
}

.seasonal-snow {
  position: absolute;
  z-index: 10;
  inset: 0;
  overflow: clip;
  contain: layout paint;
  pointer-events: none;
}

.seasonal-snow span {
  position: absolute;
  top: -12px;
  left: var(--flake-x);
  width: var(--flake-size);
  height: var(--flake-size);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px 1px rgb(71 115 111 / 36%);
  animation: seasonal-snowfall var(--flake-duration) linear var(--flake-delay) infinite;
}

@keyframes seasonal-snowfall {
  from { opacity: 0.6; transform: translate(0, 0); }
  45% { opacity: 0.85; transform: translate(calc(-0.6 * var(--flake-drift)), 46dvh); }
  to { opacity: 0.55; transform: translate(var(--flake-drift), calc(100dvh + 20px)); }
}

[data-theme="new-year"] :is(.map-controls, .open-place-list, .preview-card, .place-list-header)::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -4px;
  left: 14px;
  width: min(120px, 44%);
  height: 10px;
  background:
    radial-gradient(ellipse 17% 42% at 17% 49%, #fff 87%, transparent 99%),
    radial-gradient(ellipse 27% 43% at 45% 41%, #fff 87%, transparent 99%),
    radial-gradient(ellipse 10% 49% at 63% 52%, #f9fffe 87%, transparent 99%),
    radial-gradient(ellipse 25% 33% at 75% 42%, #fff 89%, transparent 99%);
  filter: drop-shadow(0 1px 1px rgb(48 84 76 / 24%));
  pointer-events: none;
  transform-origin: center top;
  animation: seasonal-snow-settle 1350ms ease-out both;
}

[data-theme="new-year"] .open-place-list::before {
  left: 10px;
  width: 66%;
}

[data-theme="new-year"] .place-list-header { position: relative; }

[data-theme="new-year"] .place-list-header::before {
  left: 30px;
  width: min(174px, 42%);
}

[data-theme="new-year"] :is(.preview-card, .place-list-header)::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 22px;
  width: 58px;
  height: 9px;
  background:
    radial-gradient(circle at 5px 3px, var(--holiday-light) 2px, transparent 2.6px),
    radial-gradient(circle at 20px 6px, #ba7657 2px, transparent 2.6px),
    radial-gradient(circle at 36px 6px, var(--holiday-light) 2px, transparent 2.6px),
    radial-gradient(circle at 52px 3px, #7eab8d 2px, transparent 2.6px);
  border-top: 1px solid rgb(154 104 30 / 30%);
  border-radius: 50% 50% 20% 20%;
  pointer-events: none;
}

@keyframes seasonal-snow-settle {
  from { opacity: 0; transform: scaleY(0.25); }
  to { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 600px) {
  .seasonal-snow span:nth-child(n + 25) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .seasonal-snow { display: none; }
  [data-theme="new-year"] :is(.map-controls, .open-place-list, .preview-card, .place-list-header)::before {
    animation: none;
  }
}
