:root {
    --ink: #17211d;
    --muted: #60706a;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --line: #ddd7ca;
    --brand: #19352d;
    --brand-2: #8d5b32;
    --accent: #2f80ed;
    --marker: #1f9bd1;
    --shadow: 0 18px 55px rgba(23, 33, 29, .16);
    --marker-icon-certificate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5 15.52 3.5 19.42 4.58 20.5 8.48 22.5 12 20.5 15.52 19.42 19.42 15.52 20.5 12 22.5 8.48 20.5 4.58 19.42 3.5 15.52 1.5 12 3.5 8.48 4.58 4.58 8.48 3.5ZM12 9.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 1 0 0-5Z' fill='black' fill-rule='evenodd' stroke='black' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
    --marker-icon-water: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 7c2.5-2 4.5-2 7 0s4.5 2 7 0 4.5-2 6 0M2 12c2.5-2 4.5-2 7 0s4.5 2 7 0 4.5-2 6 0M2 17c2.5-2 4.5-2 7 0s4.5 2 7 0 4.5-2 6 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --marker-icon-coffee: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 8h12v7a5 5 0 0 1-5 5h-2a5 5 0 0 1-5-5V8Zm12 2h2a3 3 0 0 1 0 6h-2M4 22h15M8 2c-2 2 2 2 0 4m5-4c-2 2 2 2 0 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --marker-icon-shoe-prints: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='8' cy='7' rx='3' ry='5' transform='rotate(-25 8 7)' fill='black'/%3E%3Cellipse cx='16' cy='17' rx='3' ry='5' transform='rotate(-25 16 17)' fill='black'/%3E%3Ccircle cx='4' cy='2' r='1.3' fill='black'/%3E%3Ccircle cx='20' cy='22' r='1.3' fill='black'/%3E%3C/svg%3E");
    --marker-icon-monument: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 4 6v9h3v3H5v-3h3V8l4-6Zm-8 19h16v2H4v-2Z' fill='black'/%3E%3C/svg%3E");
    --marker-icon-church: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21h18M5 21v-8l7-5 7 5v8M9 21v-5h6v5M12 8V3M9.5 5.5h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --marker-icon-shapes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='7' cy='7' r='4' fill='black'/%3E%3Cpath d='m17 3 5 9H12l5-9Z' fill='black'/%3E%3Crect x='4' y='14' width='8' height='8' rx='1' fill='black'/%3E%3C/svg%3E");
    --marker-icon-dungeon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2h4v4h3V2h4v4h3V2h4v8l-2 2v10h-5v-6h-4v6H5V12l-2-2V2Z' fill='black'/%3E%3C/svg%3E");
    --marker-icon-vihara: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 10 7v3H2V9l10-7ZM4 14h3v6H4v-6Zm5 0h6v6H9v-6Zm8 0h3v6h-3v-6ZM2 21h20v2H2v-2Z' fill='black'/%3E%3C/svg%3E");
    --marker-icon-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m2 11 10-9 10 9-2 2-2-2v11h-5v-7h-2v7H6V11l-2 2-2-2Z' fill='black'/%3E%3C/svg%3E");
    --marker-icon-industry: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 2h5l1 8 4-3v4l5-4v4l4-3v14H3V2Zm3 13v3h3v-3H6Zm6 0v3h3v-3h-3Zm6 0v3h2v-3h-2Z' fill='black'/%3E%3C/svg%3E");
    --marker-icon-synagogue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 8 14H4L12 2Zm0 20L4 8h16l-8 14Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
    --marker-icon-building: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2h16v20h-6v-5h-4v5H4V2Zm3 3v3h3V5H7Zm7 0v3h3V5h-3Zm-7 6v3h3v-3H7Zm7 0v3h3v-3h-3Z' fill='black' fill-rule='evenodd'/%3E%3C/svg%3E");
    --marker-icon-chess-rook: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2h5v4h2V2h2v4h2V2h5v7l-3 3 2 8h2v2H3v-2h2l2-8-3-3V2Z' fill='black'/%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

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

.app-shell {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    min-height: 100vh;
}

@media (min-width: 861px) {
    .app-shell {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }
}

.topbar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(260px, 620px) auto;
    gap: 18px;
    align-items: center;
    padding: 10px 18px;
    background: rgba(251, 250, 246, .96);
    border-bottom: 1px solid var(--line);
    z-index: 10;
}

.app-shell.is-search-overlay-open .topbar {
    z-index: 1001;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--brand);
    border-radius: 6px;
    font-family: Georgia, "Times New Roman", serif;
}

.search-box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 6px;
}

.search-box input,
select {
    width: 100%;
    min-height: 42px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
}

.search-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
    cursor: pointer;
    font-size: 22px;
}

.search-button:disabled {
    cursor: wait;
    opacity: .65;
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: min(65vh, 430px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(23, 33, 29, .18);
}

.search-results[hidden] {
    display: none;
}

.search-result-group + .search-result-group {
    border-top: 1px solid var(--line);
}

.search-result-heading {
    margin: 0;
    padding: 9px 12px 5px;
    color: var(--brand-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.search-result {
    display: grid;
    width: 100%;
    gap: 2px;
    padding: 9px 12px;
    color: var(--ink);
    background: #fff;
    border: 0;
    border-top: 1px solid rgba(221, 215, 202, .65);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
    background: #f5f2e9;
    box-shadow: inset 0 0 0 2px var(--accent);
    outline: none;
}

.search-result-type {
    color: var(--brand-2);
    font-size: 11px;
    font-weight: 700;
}

.search-result-context {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-attribution {
    margin: 0;
    padding: 8px 12px;
    color: var(--muted);
    background: #fbfaf6;
    border-top: 1px solid var(--line);
    font-size: 11px;
}

.search-status {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(23, 33, 29, .14);
    font-size: 13px;
}

.search-status:empty {
    display: none;
}

.search-status.is-visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    box-shadow: none;
}

.icon-button,
.close-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    background: #fff;
    cursor: pointer;
    font-size: 22px;
}

#locate-button {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#locate-button[data-location-state="loading"] {
    color: var(--accent);
    background: #eff6ff;
    border-color: rgba(47, 128, 237, .38);
    cursor: wait;
}

#locate-button[data-location-state="active"] {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(47, 128, 237, .28);
}

#locate-button[data-location-state="error"] {
    color: #a33a27;
    background: #fff5f2;
    border-color: rgba(163, 58, 39, .3);
}

.location-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
}

#locate-button[data-location-state="loading"] .location-symbol,
#mobile-locate-button[data-location-state="loading"] .location-symbol {
    display: none;
}

#locate-button[data-location-state="loading"] .location-loader,
#mobile-locate-button[data-location-state="loading"] .location-loader {
    display: block;
    animation: location-control-spin .8s linear infinite;
}

.side-panel {
    z-index: 5;
    overflow: auto;
    background: var(--paper);
    border-right: 1px solid var(--line);
}

.mobile-panel-header,
.mobile-map-actions,
.mobile-panel-backdrop {
    display: none;
}

.menu-submenu > summary {
    display: none;
}

.menu-submenu-content {
    display: block;
}

.panel-section {
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.intro h1 {
    margin: 6px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1.05;
}

.intro p {
    color: var(--muted);
    line-height: 1.55;
}

.kicker,
.eyebrow,
.section-title {
    margin: 0;
    color: var(--brand-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.filter-row {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.facet-filter {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.facet-filter summary {
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 52px;
    padding: 8px 38px 8px 12px;
    cursor: pointer;
    list-style: none;
}

.facet-filter summary::-webkit-details-marker {
    display: none;
}

.facet-filter summary::after {
    position: absolute;
    top: 50%;
    right: 14px;
    content: "⌄";
    color: var(--brand);
    font-size: 20px;
    transform: translateY(-58%);
}

.facet-filter[open] summary {
    border-bottom: 1px solid var(--line);
}

.facet-filter[open] summary::after {
    transform: translateY(-38%) rotate(180deg);
}

.facet-filter summary > span {
    color: var(--muted);
    font-size: 12px;
}

.facet-filter summary strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facet-filter summary:focus-visible {
    outline: 3px solid rgba(47, 128, 237, .3);
    outline-offset: 2px;
}

.facet-options {
    display: grid;
    max-height: 250px;
    padding: 6px;
    overflow-y: auto;
}

.facet-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.facet-option:hover {
    background: #f3f0e8;
}

.facet-option:focus-within {
    outline: 2px solid var(--accent);
}

.facet-option.is-disabled {
    cursor: not-allowed;
    opacity: .48;
}

.facet-option input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--brand);
}

.facet-count {
    min-width: 30px;
    padding: 2px 6px;
    color: var(--muted);
    background: #f3f0e8;
    border-radius: 999px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.facet-empty,
.filter-results,
.empty-list {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.facet-empty {
    padding: 10px 6px;
}

.filter-status-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.filter-status-row[aria-busy="true"] .filter-results {
    opacity: .65;
}

.text-button {
    flex: 0 0 auto;
    padding: 3px 0;
    color: var(--brand-2);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.text-button[hidden] {
    display: none;
}

.settings-row {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.settings-row label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.near-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.near-heading {
    display: flex;
    gap: 12px;
    align-items: start;
    justify-content: space-between;
}

.near-context,
.location-status,
.near-status {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.location-status:empty {
    display: none;
}

.location-status {
    color: var(--brand-2);
}

.near-list[aria-busy="true"] {
    opacity: .7;
}

.near-list a {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px;
    color: var(--ink);
    border-bottom: 1px solid rgba(221, 215, 202, .7);
    text-decoration: none;
}

.near-list a:hover,
.near-list a:focus-visible {
    background: rgba(255, 255, 255, .65);
}

.near-item-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.near-name {
    line-height: 1.3;
}

.near-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.near-distance {
    flex: 0 0 auto;
    color: var(--brand-2);
    font-size: 13px;
    white-space: nowrap;
}

.near-status.is-error {
    color: #9d3321;
}

.near-list .empty-list {
    padding: 10px 0;
}

.map-stage {
    position: relative;
    min-height: 0;
}

.map {
    position: absolute;
    inset: 0;
    background: #d9e3db;
}

.preview-card {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    max-width: 720px;
    padding: 14px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 600;
}

.preview-card[hidden] {
    display: none;
}

.preview-main-link {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

.preview-main-link:focus-visible {
    outline: 3px solid rgba(47, 128, 237, .45);
    outline-offset: 3px;
}

.preview-image-frame {
    display: grid;
    place-items: center;
    min-width: 0;
    overflow: hidden;
    background: transparent;
    border-radius: 6px;
}

.preview-card img {
    display: block;
    width: 180px;
    height: 118px;
    object-fit: contain;
    border-radius: 6px;
    background: transparent;
}

.preview-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

#preview-title {
    margin: 4px 36px 8px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    line-height: 1.1;
}

.preview-link-hint {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    width: fit-content;
    color: var(--brand);
    font-size: 14px;
    font-weight: 800;
}

.preview-card .close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
}

.preview-expand-button {
    display: none;
}

.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    color: #fff;
    background: var(--brand);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.secondary-link {
    color: var(--brand);
    background: transparent;
    border: 1px solid var(--brand);
}

.heritage-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--marker);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 10%;
    box-shadow: 0 7px 18px rgba(31, 155, 209, .38);
    transform: rotate(-45deg);
}

.heritage-marker-symbol {
    --marker-icon: var(--marker-icon-certificate);
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask: var(--marker-icon) center / contain no-repeat;
    mask: var(--marker-icon) center / contain no-repeat;
    transform: rotate(45deg);
}

.heritage-marker-symbol.is-certificate {
    width: 15px;
    height: 15px;
}

.heritage-marker-symbol.is-water { --marker-icon: var(--marker-icon-water); }
.heritage-marker-symbol.is-coffee { --marker-icon: var(--marker-icon-coffee); }
.heritage-marker-symbol.is-shoe-prints { --marker-icon: var(--marker-icon-shoe-prints); }
.heritage-marker-symbol.is-monument { --marker-icon: var(--marker-icon-monument); }
.heritage-marker-symbol.is-church { --marker-icon: var(--marker-icon-church); }
.heritage-marker-symbol.is-shapes { --marker-icon: var(--marker-icon-shapes); }
.heritage-marker-symbol.is-dungeon { --marker-icon: var(--marker-icon-dungeon); }
.heritage-marker-symbol.is-vihara { --marker-icon: var(--marker-icon-vihara); }
.heritage-marker-symbol.is-home { --marker-icon: var(--marker-icon-home); }
.heritage-marker-symbol.is-industry { --marker-icon: var(--marker-icon-industry); }
.heritage-marker-symbol.is-synagogue { --marker-icon: var(--marker-icon-synagogue); }
.heritage-marker-symbol.is-building { --marker-icon: var(--marker-icon-building); }
.heritage-marker-symbol.is-chess-rook { --marker-icon: var(--marker-icon-chess-rook); }

.heritage-marker.is-selected,
.is-selected .heritage-marker {
    background: #d54b35;
    box-shadow: 0 10px 22px rgba(213, 75, 53, .35);
}

.cluster-marker {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #17211d;
    background: rgba(239, 193, 50, .82);
    border: 3px solid rgba(255, 255, 255, .86);
    border-radius: 50%;
    box-shadow: 0 0 0 9px rgba(239, 193, 50, .28), 0 8px 22px rgba(23, 33, 29, .24);
    font-size: 16px;
    font-weight: 800;
}

.cluster-marker.is-medium {
    background: rgba(235, 143, 54, .86);
    box-shadow: 0 0 0 10px rgba(235, 143, 54, .3), 0 9px 24px rgba(23, 33, 29, .26);
}

.cluster-marker.is-large {
    background: rgba(213, 84, 45, .88);
    box-shadow: 0 0 0 11px rgba(213, 84, 45, .32), 0 10px 26px rgba(23, 33, 29, .28);
}

.user-location-marker {
    --user-heading: 0deg;
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 67, 142, .3);
}

.user-location-pulse {
    position: absolute;
    inset: 0;
    display: block;
    background: linear-gradient(145deg, #4aa3ff 0%, #1775e6 52%, #0d58bd 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, .52),
        inset 0 -1px 1px rgba(0, 55, 125, .22);
    animation: user-location-heartbeat 4s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

.user-location-reticle {
    position: absolute;
    inset: 1px;
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: opacity .12s ease, transform .16s ease-out;
}

.user-location-reticle.is-oriented {
    opacity: 0;
    transform: rotate(var(--user-heading));
}

.user-location-marker.has-heading .user-location-reticle.is-neutral {
    opacity: 0;
}

.user-location-marker.has-heading .user-location-reticle.is-oriented {
    opacity: 1;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.page-brand {
    margin: 0;
}

.page-header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.back-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    color: var(--brand);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.back-link:hover,
.back-link:focus-visible {
    background: #f3f0e8;
    outline: 3px solid rgba(47, 128, 237, .3);
    outline-offset: 2px;
}

.monument-page {
    display: grid;
    grid-template-columns: minmax(280px, 48%) minmax(0, 1fr);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.monument-hero {
    display: grid;
    place-items: center;
    min-height: 520px;
    background: #eee8dc;
}

.monument-hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 720px;
    object-fit: contain;
}

.monument-body {
    padding: 34px;
}

.monument-body h1,
.listing h1,
.centered h1 {
    margin: 6px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    line-height: 1.05;
}

.monument-body h2 {
    margin-top: 28px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
}

.monument-body p {
    line-height: 1.7;
}

.place {
    color: var(--muted);
}

.facts {
    display: grid;
    gap: 1px;
    margin: 26px 0;
    background: var(--line);
    border: 1px solid var(--line);
}

.facts div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    background: #fff;
}

.facts dt {
    font-weight: 800;
}

.facts dd {
    margin: 0;
    color: var(--muted);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.monument-nearby {
    margin: 32px 0;
}

.monument-nearby-intro {
    margin-top: -14px;
    color: var(--muted);
}

.result-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}

.result-card span,
.result-card small {
    color: var(--muted);
}

.centered {
    min-height: 70vh;
    display: grid;
    align-content: center;
    justify-items: start;
}

@media (max-width: 860px) {
    .app-shell {
        position: relative;
        display: block;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .topbar {
        position: absolute;
        top: max(12px, env(safe-area-inset-top));
        left: 12px;
        right: 12px;
        z-index: 900;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 4px;
        min-height: 56px;
        padding: 6px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(221, 215, 202, .9);
        border-radius: 999px;
        box-shadow: 0 8px 24px rgba(23, 33, 29, .2);
        transition: opacity .18s ease, transform .22s ease;
    }

    .brand {
        gap: 0;
        font-size: 0;
    }

    .brand-name {
        display: none;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        border-radius: 11px;
        font-size: 25px;
    }

    .search-box {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 0;
    }

    .search-box input {
        min-width: 0;
        min-height: 44px;
        padding: 0 8px 0 12px;
        background: transparent;
        border: 0;
        border-radius: 999px;
        font-size: 15px;
    }

    .search-box input:focus {
        outline: 2px solid rgba(47, 128, 237, .45);
        outline-offset: -2px;
    }

    .search-button {
        width: 44px;
        height: 44px;
        color: var(--brand);
        background: transparent;
        border-radius: 50%;
        font-size: 19px;
    }

    .search-results {
        top: calc(100% + 12px);
        left: -52px;
        width: calc(100% + 52px);
        max-height: min(62dvh, 430px);
        border-radius: 16px;
    }

    .search-status {
        top: calc(100% + 12px);
        left: -52px;
        border-radius: 12px;
    }

    #locate-button {
        display: none;
    }

    .side-panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1100;
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--paper);
        border: 1px solid var(--line);
        border-bottom: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -18px 48px rgba(23, 33, 29, .25);
        transform: translateY(calc(100% + 24px));
        transition: transform .24s ease-out;
    }

    .app-shell.is-mobile-panel-open .side-panel {
        transform: translateY(0);
    }

    .mobile-panel-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(23, 33, 29, .42);
        border: 0;
        cursor: pointer;
    }

    .mobile-panel-backdrop:not([hidden]) {
        display: block;
    }

    .mobile-panel-header {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px 12px;
        background: rgba(251, 250, 246, .98);
        border-bottom: 1px solid var(--line);
    }

    .mobile-panel-header::before {
        position: absolute;
        top: 7px;
        left: 50%;
        width: 42px;
        height: 4px;
        content: "";
        background: #c9c3b7;
        border-radius: 999px;
        transform: translateX(-50%);
    }

    .mobile-panel-header h2 {
        margin: 3px 0 0;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 23px;
    }

    .mobile-panel-header .close-button {
        flex: 0 0 auto;
    }

    .intro {
        display: none;
    }

    .panel-section {
        padding: 18px;
    }

    .app-shell[data-mobile-panel-view="filters"] .menu-panel-section,
    .app-shell[data-mobile-panel-view="menu"] #filter-panel-section {
        display: none;
    }

    .menu-submenu {
        padding: 0;
    }

    .menu-submenu > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 58px;
        padding: 0 18px;
        color: var(--brand);
        background: #fff;
        border-bottom: 1px solid var(--line);
        cursor: pointer;
        font-size: 16px;
        font-weight: 800;
        list-style: none;
    }

    .menu-submenu > summary::-webkit-details-marker {
        display: none;
    }

    .menu-submenu > summary i {
        transition: transform .18s ease;
    }

    .menu-submenu[open] > summary i {
        transform: rotate(180deg);
    }

    .menu-submenu-content {
        padding: 18px;
    }

    .menu-submenu-content > .section-title:first-child {
        margin-bottom: 12px;
    }

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .facet-filter[open] {
        grid-column: 1 / -1;
    }

    .map-stage {
        position: absolute;
        inset: 0;
        min-height: 0;
    }

    .preview-card {
        left: 12px;
        right: 12px;
        bottom: calc(28px + env(safe-area-inset-bottom));
        max-height: 150px;
        padding: 8px;
        overflow: hidden;
        border-radius: 14px;
        transition: bottom .22s ease;
    }

    .preview-main-link {
        grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
        gap: 12px;
        min-height: 132px;
    }

    .preview-image-frame {
        width: 100%;
        height: 132px;
        background: transparent;
        border-radius: 10px;
    }

    .preview-card img {
        width: 100%;
        height: 132px;
        border-radius: 10px;
    }

    #preview-title {
        display: -webkit-box;
        margin: 2px 66px 4px 0;
        overflow: hidden;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 18px;
        line-height: 1.15;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .preview-card .eyebrow {
        overflow: hidden;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .preview-link-hint {
        gap: 5px;
        margin-top: 3px;
        font-size: 12px;
    }

    .preview-card .close-button {
        top: 6px;
        right: 6px;
        width: 30px;
        height: 30px;
    }

    .preview-expand-button:not([hidden]) {
        position: absolute;
        top: 6px;
        right: 42px;
        z-index: 2;
        display: inline-grid;
        place-items: center;
        width: 30px;
        height: 30px;
        color: var(--brand);
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
        cursor: pointer;
    }

    .preview-card.is-expanded {
        max-height: min(44dvh, 340px);
        padding: 14px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .preview-card.is-expanded .preview-main-link {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .preview-card.is-expanded .preview-image-frame {
        width: 100%;
        height: min(24dvh, 180px);
    }

    .preview-card.is-expanded img {
        width: 100%;
        height: min(24dvh, 180px);
    }

    .preview-card.is-expanded #preview-title {
        display: block;
        margin: 4px 68px 9px 0;
        overflow: visible;
        font-size: 20px;
        line-height: 1.2;
        overflow-wrap: anywhere;
        -webkit-line-clamp: initial;
    }

    .preview-card.is-expanded .eyebrow {
        margin-right: 68px;
        overflow: visible;
        font-size: 11px;
        line-height: 1.35;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .app-shell.has-preview-open .topbar {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(-100% - 24px));
    }

    .app-shell.has-preview-open .mobile-map-actions {
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(100% + 48px));
    }

    .mobile-map-actions {
        position: fixed;
        right: 12px;
        bottom: calc(30px + env(safe-area-inset-bottom));
        left: 12px;
        z-index: 900;
        display: grid;
        grid-template-columns: 1fr 1.35fr 1fr;
        min-height: 76px;
        overflow: hidden;
        background: rgba(255, 255, 255, .97);
        border: 1px solid rgba(221, 215, 202, .92);
        border-radius: 22px;
        box-shadow: 0 10px 30px rgba(23, 33, 29, .24);
        transition: opacity .18s ease, transform .22s ease;
    }

    .mobile-map-actions button {
        display: flex;
        flex-direction: column;
        gap: 7px;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 8px 5px;
        color: var(--brand);
        background: transparent;
        border: 0;
        cursor: pointer;
        font: inherit;
        font-size: 12px;
        font-weight: 750;
    }

    .mobile-map-actions button + button {
        border-left: 1px solid rgba(221, 215, 202, .8);
    }

    .mobile-map-actions button:focus-visible {
        outline: 3px solid rgba(47, 128, 237, .4);
        outline-offset: -3px;
    }

    .mobile-map-actions button[aria-expanded="true"] {
        background: #f0eee6;
    }

    .mobile-map-actions #mobile-locate-button {
        transition: color .18s ease, background-color .18s ease;
    }

    .mobile-map-actions #mobile-locate-button[data-location-state="loading"] {
        color: var(--accent);
        background: #eff6ff;
        cursor: wait;
    }

    .mobile-map-actions #mobile-locate-button[data-location-state="active"] {
        color: var(--accent);
        background: rgba(47, 128, 237, .1);
    }

    .mobile-map-actions #mobile-locate-button[data-location-state="error"] {
        color: #a33a27;
        background: #fff5f2;
    }

    .mobile-map-actions i {
        font-size: 23px;
    }

    .leaflet-top {
        top: 78px;
    }

    .leaflet-bottom.leaflet-right {
        bottom: 0;
    }

    .monument-page {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: stretch;
    }

    .page-header .brand-name,
    .page-header .brand > span:last-child {
        display: none;
    }

    .back-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .monument-hero {
        min-height: 260px;
    }

    .monument-hero img {
        max-height: 430px;
    }

    .monument-body {
        padding: 22px;
    }

    .monument-body h1,
    .listing h1,
    .centered h1 {
        font-size: 32px;
    }

    .facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 860px) and (max-height: 600px) and (orientation: landscape) {
    .topbar {
        right: auto;
        width: min(420px, calc(100% - 112px));
    }

    .mobile-map-actions {
        right: 10px;
        bottom: 26px;
        left: auto;
        width: min(390px, calc(100% - 20px));
        min-height: 64px;
    }

    .mobile-map-actions button {
        gap: 4px;
        padding: 5px;
    }

    .preview-card {
        right: 10px;
        bottom: 26px;
        left: auto;
        width: min(430px, calc(100% - 20px));
    }

    .leaflet-bottom.leaflet-right {
        bottom: 0;
    }
}

@keyframes user-location-heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(.82); }
}

@keyframes location-control-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .side-panel {
        transition: none;
    }

    .topbar,
    .mobile-map-actions,
    .preview-card {
        transition: none;
    }

    .user-location-pulse,
    .location-loader {
        animation: none;
    }
}
