.shb-archive {
    --shb-ink: #575656;
    --shb-blue: #009cbc;
    --shb-blue-soft: rgba(0, 156, 188, 0.09);
    --shb-lime: #afca05;
    --shb-yellow: #ffcc00;
    --shb-map-land: rgba(0, 156, 188, 0.14);
    --shb-map-line: #ffffff;
    --shb-border: rgba(0, 156, 188, 0.28);
    --shb-surface: #ffffff;
    --shb-shadow: 0 18px 44px rgba(87, 86, 86, 0.13);
    box-sizing: border-box;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto 56px;
    color: var(--shb-ink);
    font-family: inherit;
    scroll-margin-top: 32px;
}

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

.shb-archive [hidden] {
    display: none !important;
}

.shb-archive__header {
    max-width: 980px;
    margin: 0 auto 72px;
    text-align: center;
}

.shb-archive__eyebrow {
    margin: 0 0 10px;
    color: var(--shb-blue);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shb-archive__header h2,
.shb-explorer__heading h2 {
    margin: 0;
    color: var(--shb-ink);
    font-size: clamp(36px, 4.2vw, 50px);
    line-height: 1.1;
}

.shb-archive__intro {
    max-width: 800px;
    margin: 18px auto 0;
    color: var(--shb-ink);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.65;
}

.shb-archive__actions,
.shb-followup-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.shb-button,
.shb-text-link,
.shb-text-button {
    font-family: inherit;
}

.shb-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.shb-button--primary {
    border-color: var(--shb-blue);
    background: var(--shb-blue);
    color: #ffffff !important;
    font-size: 19px;
}

.shb-button--secondary {
    border-color: var(--shb-blue);
    background: var(--shb-surface);
    color: var(--shb-ink) !important;
}

.shb-button:hover {
    transform: translateY(-2px);
}

.shb-button--primary:hover {
    border-color: var(--shb-ink);
    background: var(--shb-ink);
}

.shb-button--secondary:hover {
    background: var(--shb-blue-soft);
}

.shb-archive__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 34px auto 0;
}

.shb-stat {
    display: grid;
    min-height: 118px;
    align-content: center;
    gap: 2px;
    padding: 20px;
    border: 1px solid var(--shb-border);
    border-radius: 16px;
    background: var(--shb-surface);
}

.shb-stat strong {
    color: var(--shb-blue);
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
}

.shb-stat span {
    color: var(--shb-ink);
    font-size: 15px;
    font-weight: 700;
}

.shb-archive__data-date {
    margin: 12px 0 0;
    color: var(--shb-ink);
    font-size: 13px;
}

.shb-explorer {
    scroll-margin-top: 28px;
}

.shb-explorer__heading {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: center;
}

.shb-explorer__heading h2 {
    font-size: clamp(30px, 3.5vw, 42px);
}

.shb-explorer__heading > p:last-child {
    max-width: 720px;
    margin: 14px auto 0;
    font-size: 17px;
    line-height: 1.6;
}

.shb-explorer__toolbar {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    align-items: end;
    gap: 18px 24px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--shb-border);
    border-radius: 16px;
    background: var(--shb-surface);
}

.shb-search {
    display: grid;
    gap: 7px;
}

.shb-search label {
    color: var(--shb-ink);
    font-size: 14px;
    font-weight: 800;
}

.shb-search__field {
    position: relative;
}

.shb-search input {
    width: 100%;
    min-height: 48px;
    padding: 10px 50px 10px 14px;
    border: 2px solid var(--shb-border);
    border-radius: 12px;
    background: var(--shb-surface);
    color: var(--shb-ink);
    font: inherit;
    font-size: 16px;
}

.shb-search input::placeholder {
    color: rgba(87, 86, 86, 0.78);
}

.shb-search__field button {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--shb-ink);
    font: inherit;
    font-size: 23px;
    cursor: pointer;
}

.shb-year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shb-filter,
.shb-view-toggle button,
.shb-reset-button,
.shb-text-button {
    min-height: 44px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.shb-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border: 2px solid var(--shb-border);
    background: var(--shb-surface);
    color: var(--shb-ink);
    white-space: nowrap;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.shb-filter:hover {
    border-color: var(--shb-blue);
    background: var(--shb-blue-soft);
    transform: translateY(-1px);
}

.shb-filter.is-active {
    border-color: var(--shb-blue);
    background: var(--shb-ink);
    color: #ffffff;
}

.shb-filter.is-active::before {
    content: "✓";
    color: var(--shb-yellow);
}

.shb-view-controls {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shb-view-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--shb-border);
    border-radius: 999px;
    background: var(--shb-blue-soft);
}

.shb-view-toggle button {
    padding: 8px 17px;
    border: 0;
    background: transparent;
    color: var(--shb-ink);
}

.shb-view-toggle button.is-active {
    background: var(--shb-ink);
    color: #ffffff;
}

.shb-reset-button {
    padding: 8px 16px;
    border: 2px solid var(--shb-blue);
    background: var(--shb-surface);
    color: var(--shb-ink);
}

.shb-reset-button:hover {
    background: var(--shb-blue-soft);
}

.shb-explorer__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    margin: 0 4px 14px;
}

.shb-archive__hint,
.shb-map-legend {
    margin: 0;
    color: var(--shb-ink);
    font-size: 14px;
}

.shb-archive__hint {
    font-weight: 700;
}

.shb-map-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.shb-map-legend > span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--shb-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 0 0 1px var(--shb-border);
}

.shb-view-panel {
    scroll-margin-top: 22px;
}

.shb-map-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--shb-border);
    border-radius: 16px;
    background: rgba(0, 156, 188, 0.06);
    box-shadow: var(--shb-shadow);
}

.shb-map-canvas {
    position: relative;
    height: clamp(650px, 70vw, 860px);
    min-height: 650px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(175, 202, 5, 0.1), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, rgba(0, 156, 188, 0.08) 100%);
}

.shb-map {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: grab;
}

.shb-map:active {
    cursor: grabbing;
}

.shb-map .shb-state {
    fill: var(--shb-map-land);
    stroke: var(--shb-blue);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.shb-map .shb-district {
    fill: transparent;
    stroke: var(--shb-map-line);
    stroke-width: 1;
    opacity: 0.92;
    vector-effect: non-scaling-stroke;
}

.shb-map .shb-state-label {
    fill: rgba(87, 86, 86, 0.76);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-anchor: middle;
    text-transform: uppercase;
    pointer-events: none;
}

.shb-map .shb-marker {
    color: var(--shb-blue);
    cursor: pointer;
    text-decoration: none;
}

.shb-map .shb-marker__halo {
    fill: rgba(0, 156, 188, 0.16);
    transition: r 150ms ease, opacity 150ms ease;
}

.shb-map .shb-marker__circle {
    fill: currentColor;
    stroke: #ffffff;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 3px 4px rgba(87, 86, 86, 0.2));
}

.shb-map .shb-marker__text {
    fill: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.shb-map .shb-marker:hover .shb-marker__halo,
.shb-map .shb-marker:focus .shb-marker__halo {
    r: 24px;
    opacity: 1;
}

.shb-map .shb-marker:focus-visible .shb-marker__circle {
    stroke: var(--shb-yellow);
    stroke-width: 6;
}

.shb-map .shb-marker.is-cluster {
    color: var(--shb-ink);
}

.shb-map .shb-marker.is-selected {
    color: var(--shb-yellow);
}

.shb-map .shb-marker.is-selected .shb-marker__halo {
    fill: rgba(175, 202, 5, 0.32);
}

.shb-map .shb-marker.is-selected .shb-marker__text {
    fill: var(--shb-ink);
}

.shb-map .shb-marker.is-cluster .shb-marker__circle {
    stroke-width: 4;
}

.shb-map-tools {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: grid;
    gap: 8px;
}

.shb-map-tools button,
.shb-place-details__close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 2px solid var(--shb-border);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--shb-ink);
    font: inherit;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 5px 16px rgba(87, 86, 86, 0.12);
    cursor: pointer;
}

.shb-map-tools button:hover,
.shb-place-details__close:hover {
    border-color: var(--shb-blue);
    background: var(--shb-blue-soft);
}

.shb-place-details {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: min(410px, calc(100% - 96px));
    height: auto;
    max-height: min(600px, calc(100% - 32px));
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--shb-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--shb-ink);
    box-shadow: 0 16px 38px rgba(87, 86, 86, 0.2);
}

.shb-place-details__close {
    position: sticky;
    top: 0;
    float: right;
    margin: -8px -8px 4px 12px;
    box-shadow: none;
}

.shb-place-details__count {
    margin: 0 0 5px;
    color: var(--shb-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.shb-place-details h3 {
    margin: 0 0 16px;
    color: var(--shb-ink);
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.12;
}

.shb-place-details__visits {
    display: grid;
    clear: both;
}

.shb-visit {
    display: grid;
    gap: 4px;
    padding: 14px 0;
    border-top: 1px solid var(--shb-border);
}

.shb-visit:first-child {
    border-top: 0;
}

.shb-visit__date {
    color: var(--shb-ink);
    font-size: 13px;
    font-weight: 800;
}

.shb-visit__occasion {
    color: var(--shb-ink);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.shb-visit__venue {
    color: var(--shb-ink);
    font-size: 14px;
    line-height: 1.4;
}

.shb-visit__image {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 9px;
    border-radius: 12px;
}

.shb-place-details__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--shb-border);
}

.shb-text-button {
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--shb-ink);
    text-decoration: underline;
    text-decoration-color: var(--shb-blue);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.shb-text-button:hover {
    color: var(--shb-blue);
}

.shb-list-panel {
    padding: 26px;
    border: 1px solid var(--shb-border);
    border-radius: 16px;
    background: var(--shb-blue-soft);
}

.shb-list-panel__title {
    margin: 0;
    color: var(--shb-ink);
    font-size: clamp(26px, 3vw, 34px);
}

.shb-list-panel__intro {
    max-width: 760px;
    margin: 8px 0 22px;
    line-height: 1.55;
}

.shb-place-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shb-place-list__item {
    min-width: 0;
}

.shb-place-list__item details {
    height: 100%;
    border: 1px solid var(--shb-border);
    border-radius: 13px;
    background: var(--shb-surface);
}

.shb-place-list__item summary {
    display: grid;
    min-height: 72px;
    align-content: center;
    gap: 3px;
    padding: 14px 44px 14px 16px;
    color: var(--shb-ink);
    cursor: pointer;
    list-style-position: outside;
}

.shb-place-list__name {
    font-size: 17px;
    font-weight: 800;
}

.shb-place-list__meta {
    font-size: 13px;
}

.shb-place-list__body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--shb-border);
}

.shb-place-list__visits {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shb-place-list__visits li {
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid var(--shb-border);
}

.shb-place-list__visits time {
    font-size: 13px;
    font-weight: 800;
}

.shb-place-list__occasion {
    font-weight: 700;
}

.shb-place-list__venue {
    font-size: 14px;
}

.shb-list-empty,
.shb-noscript {
    padding: 16px;
    border-left: 4px solid var(--shb-yellow);
    background: rgba(255, 204, 0, 0.13);
    color: var(--shb-ink);
}

.shb-map-attribution {
    margin: 12px 4px 0;
    color: var(--shb-ink);
    font-size: 11px;
    text-align: right;
}

.shb-map-attribution a,
.shb-text-link {
    color: var(--shb-ink);
    text-decoration-color: var(--shb-blue);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.shb-followup-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-top: 72px;
}

.shb-followup-card {
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid var(--shb-border);
    border-radius: 18px;
    background: var(--shb-surface);
}

.shb-followup-card--accent {
    background: var(--shb-blue-soft);
}

.shb-followup-card h2 {
    margin: 0;
    color: var(--shb-ink);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
}

.shb-followup-card > p:not(.shb-archive__eyebrow) {
    margin: 13px 0 0;
    font-size: 16px;
    line-height: 1.6;
}

.shb-followup-card .shb-button {
    margin-top: 22px;
}

.shb-followup-card__actions {
    justify-content: flex-start;
}

.shb-followup-card__actions .shb-button {
    margin-top: 0;
}

.shb-text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    font-weight: 800;
}

.shb-map-error {
    padding: 16px;
    border-left: 4px solid var(--shb-yellow);
    background: rgba(255, 204, 0, 0.12);
}

.shb-button:focus-visible,
.shb-filter:focus-visible,
.shb-view-toggle button:focus-visible,
.shb-reset-button:focus-visible,
.shb-search input:focus-visible,
.shb-search__field button:focus-visible,
.shb-map-tools button:focus-visible,
.shb-place-details__close:focus-visible,
.shb-text-button:focus-visible,
.shb-text-link:focus-visible,
.shb-place-list__item summary:focus-visible {
    outline: 3px solid var(--shb-yellow);
    outline-offset: 3px;
    box-shadow: 0 0 0 2px var(--shb-ink);
}

@media (max-width: 900px) {
    .shb-explorer__toolbar {
        grid-template-columns: 1fr;
    }

    .shb-place-list {
        grid-template-columns: 1fr;
    }

    .shb-followup-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .shb-archive {
        width: 100%;
        max-width: none;
        margin-bottom: 36px;
    }

    .shb-archive__header {
        margin-bottom: 48px;
    }

    .shb-archive__header h2 {
        font-size: clamp(30px, 9vw, 36px);
    }

    .shb-archive__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .shb-archive__actions .shb-button {
        width: 100%;
    }

    .shb-archive__summary {
        gap: 9px;
    }

    .shb-stat {
        min-height: 102px;
        padding: 14px 10px;
    }

    .shb-explorer__toolbar {
        padding: 16px;
    }

    .shb-year-filter {
        width: 100%;
        flex-wrap: nowrap;
        padding: 2px 2px 8px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .shb-filter {
        flex: 0 0 auto;
    }

    .shb-view-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .shb-view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .shb-reset-button {
        width: 100%;
    }

    .shb-explorer__status {
        align-items: flex-start;
        flex-direction: column;
    }

    .shb-map-frame {
        overflow: visible;
        border-radius: 14px;
    }

    .shb-map-canvas {
        height: min(65vh, 600px);
        min-height: 500px;
        overflow: hidden;
        border-radius: 14px;
    }

    .shb-place-details {
        position: relative;
        inset: auto;
        width: 100%;
        max-height: none;
        margin-top: 12px;
        overflow: visible;
        border-radius: 14px;
        box-shadow: 0 10px 28px rgba(87, 86, 86, 0.12);
    }

    .shb-map .shb-state-label {
        font-size: 18px;
    }

    .shb-map-tools {
        top: 12px;
        left: 12px;
    }

    .shb-list-panel {
        padding: 18px;
    }

    .shb-followup-grid {
        margin-top: 48px;
    }
}

@media (max-width: 520px) {
    .shb-archive__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shb-stat:last-child {
        grid-column: 1 / -1;
    }

    .shb-map-canvas {
        height: 520px;
        min-height: 460px;
    }

    .shb-map-legend {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shb-button,
    .shb-filter,
    .shb-map .shb-marker__halo {
        transition: none;
    }
}
