:root {
    --panel: 360px;
    --surface: rgba(255, 255, 255, 0.96);
    --surface-strong: #ffffff;
    --ink: #14233d;
    --muted: rgba(20, 35, 61, 0.62);
    --faint: rgba(20, 35, 61, 0.45);
    --line: rgba(60, 60, 67, 0.12);
    --accent: #4264fb;
    --accent-soft: rgba(66, 100, 251, 0.12);
    --on-accent: #ffffff;
    --fill: #eef1f8;
    --skel: #f7f8fc;
    --shadow: 0 16px 40px rgba(20, 35, 61, 0.14);
    --brand: none;
    --info: none;
    --scroll-thumb: rgba(20, 35, 61, 0.28);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

html[data-light="dawn"] {
    --surface: rgba(247, 231, 220, 0.96);
    --surface-strong: #f7e7dc;
    --ink: #4a2c38;
    --muted: rgba(74, 44, 56, 0.68);
    --faint: rgba(74, 44, 56, 0.46);
    --line: rgba(196, 92, 120, 0.22);
    --accent: #c45c78;
    --accent-soft: rgba(196, 92, 120, 0.16);
    --on-accent: #fff6f0;
    --fill: #f3d9cc;
    --skel: #faeee6;
    --shadow: 0 16px 40px rgba(74, 44, 56, 0.16);
    --scroll-thumb: rgba(74, 44, 56, 0.32);
}

html[data-light="dusk"] {
    --surface: rgba(42, 26, 36, 0.94);
    --surface-strong: #2a1a24;
    --ink: #f6dcc8;
    --muted: rgba(246, 220, 200, 0.72);
    --faint: rgba(246, 220, 200, 0.46);
    --line: rgba(255, 150, 110, 0.22);
    --accent: #ff8a5c;
    --accent-soft: rgba(255, 138, 92, 0.18);
    --on-accent: #2a1a24;
    --fill: #3a2430;
    --skel: #4a3040;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    --brand: invert(1);
    --info: invert(1);
    --scroll-thumb: rgba(246, 220, 200, 0.38);
}

html[data-light="night"] {
    --surface: rgba(26, 39, 64, 0.94);
    --surface-strong: #1a2740;
    --ink: #cfe8f7;
    --muted: rgba(207, 232, 247, 0.7);
    --faint: rgba(207, 232, 247, 0.46);
    --line: rgba(126, 200, 255, 0.2);
    --accent: #7ec8ff;
    --accent-soft: rgba(126, 200, 255, 0.18);
    --on-accent: #1a2740;
    --fill: #243552;
    --skel: #314664;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --brand: invert(1);
    --info: invert(1);
    --scroll-thumb: rgba(207, 232, 247, 0.38);
}

@font-face {
    font-family: "Cera Pro";
    src:
        url("./fonts/CeraPro-Black.woff2") format("woff2"),
        url("./fonts/CeraPro-Black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    background: #d7e2ee;
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

#map {
    position: absolute;
    inset: 0;
}

button,
input {
    font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.bridge-hit:focus,
.bridge-hit:focus-visible,
.wiki-link:focus,
.wiki-link:focus-visible,
.mapboxgl-ctrl-bottom-left a:focus,
.mapboxgl-ctrl-bottom-left a:focus-visible {
    outline: none;
}

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

.dock {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: auto;
    display: flex;
    pointer-events: none;
}

.panel {
    position: relative;
    z-index: 1;
    align-self: stretch;
    box-sizing: border-box;
    width: var(--panel);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease, color 0.45s ease;
}

.panel-header {
    padding: 18px 22px 0;
}

.brand img {
    height: 18px;
    width: auto;
    display: block;
    filter: var(--brand);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 16px;
    height: 1px;
    background: currentColor;
}

.panel-header h1 {
    margin: 8px 0 0;
    font-family: "Cera Pro", "Inter", sans-serif;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.92;
}

.lede {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 0;
}

.count {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.toolbar-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--ink);
    cursor: pointer;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    color: var(--accent);
}

.filter {
    display: block;
    padding: 12px 18px 0;
}

.filter input {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--ink);
}

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

.list {
    flex: 1;
    min-height: 0;
    margin-top: 12px;
    overflow: auto;
    padding: 0 8px 16px;
}

.group-name {
    margin: 14px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
}

.city-group-name {
    display: none;
    margin: 10px 14px 2px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 500;
}

.country-section.is-open .city-group-name,
.city-page.is-open .city-group-name {
    display: block;
}

.bridge {
    border-radius: 14px;
    color: var(--ink);
}

.bridge-line {
    display: flex;
    align-items: center;
    min-width: 0;
}

.bridge-hit {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 6px 4px 6px 8px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.bridge-hit:hover,
.bridge.is-active .bridge-hit {
    background: transparent;
}

.bridge-name {
    min-width: 0;
    line-height: 1.25;
    transition: color 280ms ease;
}

.bridge-hit:hover .bridge-name,
.bridge.is-active .bridge-name {
    color: var(--accent);
}

.thumb {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--fill);
}

.thumb-photo {
    position: absolute;
    inset: 0;
    background: center / cover no-repeat;
    opacity: 1;
    transition: opacity 460ms ease;
}

.bridge-more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bridge.is-active .bridge-more {
    grid-template-rows: 1fr;
}

.bridge-more-clip {
    overflow: hidden;
    min-height: 0;
    padding: 0 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bridge.is-active .bridge-more-clip {
    opacity: 1;
    transform: none;
}

.stage {
    position: relative;
    height: 156px;
    margin-bottom: 8px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--fill);
}

.stage-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stage-credit {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 18px 10px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: rgba(255, 255, 255, 0.88);
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-credit a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-underline-offset: 2px;
}

.stage-credit[hidden] {
    display: none;
}

.stage-photo.is-leave-next { animation: stage-leave-next 460ms ease both; }
.stage-photo.is-enter-next { animation: stage-enter-next 460ms ease both; }
.stage-photo.is-leave-prev { animation: stage-leave-prev 460ms ease both; }
.stage-photo.is-enter-prev { animation: stage-enter-prev 460ms ease both; }

@keyframes stage-leave-next {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes stage-enter-next {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes stage-leave-prev {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes stage-enter-prev {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.stage-btn {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--ink);
    transform: translateY(-50%);
    cursor: pointer;
}

.stage-btn[hidden] { display: none; }
.stage-btn.prev { left: 8px; }
.stage-btn.next { right: 8px; }

.stage-btn svg {
    width: 14px;
    height: 14px;
}

.stage-btn:hover {
    color: var(--accent);
}

.bridge-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bridge-summary {
    margin: 6px 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}

.empty {
    margin: 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

.photo-skel {
    background: linear-gradient(90deg, var(--fill), var(--skel), var(--fill));
    background-size: 200% 100%;
    animation: skel 1.2s ease-in-out infinite;
}

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

.bridge-pad {
    flex: 1 1 auto;
    align-self: stretch;
    min-width: 8px;
    padding: 0;
}

.wiki-link {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    align-self: center;
    width: 0;
    height: 22px;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--accent);
    opacity: 0;
    pointer-events: none;
    text-decoration: none;
    transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), margin 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
}

.bridge.is-active .wiki-link {
    width: 29px;
    margin-left: 6px;
    opacity: 1;
    pointer-events: auto;
}

.wiki-link img {
    width: 29px;
    height: 22px;
    display: block;
}

.wiki-link:hover {
    color: var(--ink);
}

.light-bar {
    position: absolute;
    z-index: 4;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
}

.light-controls {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 50px;
    padding: 6px;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.light-controls button {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.light-controls svg {
    display: block;
    width: 38px;
    height: 38px;
}

.light-controls circle {
    fill: var(--surface-strong);
    stroke: none;
}

.light-controls path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.light-controls button:hover circle,
.light-controls button.is-active circle {
    fill: var(--accent);
}

.light-controls button:hover path,
.light-controls button.is-active path {
    stroke: var(--on-accent);
}

.heat-toggle {
    position: relative;
    z-index: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    margin: 0 0 0 -10px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow);
    cursor: pointer;
    -webkit-mask: radial-gradient(circle 25px at -6px 50%, transparent 24.5px, #000 25.5px);
    mask: radial-gradient(circle 25px at -6px 50%, transparent 24.5px, #000 25.5px);
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.brand-slot {
    position: absolute;
    z-index: 5;
    top: 12px;
    right: calc(var(--panel) + 24px);
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
    transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-mark:active {
    transform: scale(0.96);
}

.brand-mark img {
    display: block;
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.brand-mark:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.brand-slot .mapboxgl-ctrl-attrib {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    display: block !important;
    width: max-content !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow) !important;
    color: var(--ink) !important;
    font-family: var(--font) !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition:
        opacity 140ms ease,
        transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 140ms;
}

.brand-slot .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition:
        opacity 140ms ease,
        transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s;
}

.brand-slot .mapboxgl-ctrl-attrib-inner {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    position: static !important;
    white-space: normal !important;
    min-width: 0 !important;
}

.brand-slot .mapboxgl-ctrl-attrib-button {
    display: none !important;
}

.heat-toggle svg {
    display: block;
    width: 38px;
    height: 38px;
}

.heat-toggle .btn-disc {
    fill: var(--surface-strong);
    transition: fill 0.35s ease;
}

.heat-toggle .heatmap-dot {
    fill: var(--accent);
    transform-box: fill-box;
    transform-origin: center;
    transition: fill 0.35s ease;
}

.heat-toggle.is-on .btn-disc {
    fill: var(--accent);
}

.heat-toggle.is-on .heatmap-dot {
    fill: var(--on-accent);
    animation: heatmap-dot-pulse 2.2s ease-in-out infinite;
}

.heat-toggle.is-on .heatmap-dot-md:nth-child(2) { animation-delay: 0.18s; }
.heat-toggle.is-on .heatmap-dot-md:nth-child(3) { animation-delay: 0.36s; }
.heat-toggle.is-on .heatmap-dot-sm:nth-child(4) { animation-delay: 0.12s; }
.heat-toggle.is-on .heatmap-dot-sm:nth-child(5) { animation-delay: 0.42s; }
.heat-toggle.is-on .heatmap-dot-sm:nth-child(6) { animation-delay: 0.28s; }

@keyframes heatmap-dot-pulse {
    0%,
    100% { opacity: 0.55; transform: scale(0.88); }
    50% { opacity: 1; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .heat-toggle.is-on .heatmap-dot {
        animation: none;
    }
}

.mapboxgl-ctrl-bottom-right {
    display: none !important;
}

.mapboxgl-ctrl-bottom-left {
    display: none !important;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    left: 12px !important;
    bottom: 12px !important;
    right: auto !important;
    z-index: 3;
    width: max-content;
    max-width: min(360px, calc(100vw - 24px));
    min-height: 0;
    padding: 4px 10px 4px 8px !important;
    box-sizing: border-box;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(16px);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
    margin: 0 !important;
    float: none !important;
}

a.mapboxgl-ctrl-logo {
    flex: 0 0 72px;
    width: 72px !important;
    height: 18px !important;
    margin: 0 !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: 72px 18px !important;
    filter: none !important;
}

html[data-light="day"] a.mapboxgl-ctrl-logo,
html[data-light="dawn"] a.mapboxgl-ctrl-logo {
    background-image: url("./mapbox-logo-black%201.svg") !important;
    background-size: contain !important;
}

.mapboxgl-ctrl-attrib.mapboxgl-compact,
.mapboxgl-ctrl-attrib.mapboxgl-compact-show {
    display: flex !important;
    align-items: center;
    gap: 6px;
    position: static !important;
    flex: 0 0 auto;
    min-height: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-family: var(--font) !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
    color: var(--ink) !important;
}

.mapboxgl-ctrl-attrib.mapboxgl-compact:not(.mapboxgl-compact-show) .mapboxgl-ctrl-attrib-inner {
    display: none !important;
}

.mapboxgl-ctrl-attrib.mapboxgl-compact-show {
    flex: 0 0 auto;
    min-width: max-content;
}

.mapboxgl-ctrl-bottom-left:has(.mapboxgl-compact-show) {
    width: max-content;
    max-width: calc(100vw - 24px) !important;
}

.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 4px 6px;
    order: 1;
    position: static !important;
    min-width: max-content;
}

.mapboxgl-ctrl-attrib a {
    color: var(--ink) !important;
    text-decoration: none;
    transition: color 0.25s ease;
}

.mapboxgl-ctrl-attrib a:hover {
    text-decoration: underline;
}

.mapboxgl-ctrl-attrib .mapboxgl-ctrl-attrib-button {
    display: grid !important;
    position: static !important;
    place-items: center;
    flex: 0 0 18px;
    order: 0;
    box-sizing: border-box;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent !important;
    color: var(--ink);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.mapboxgl-ctrl-attrib .mapboxgl-ctrl-attrib-button::before {
    content: "i";
}

.mapboxgl-ctrl-attrib-button .mapboxgl-ctrl-icon {
    display: none !important;
}

.bridge:not(.is-active) .photo-skel {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .photo-skel,
    .thumb-photo,
    .stage-photo,
    .bridge-more,
    .bridge-more-clip,
    .wiki-link,
    .bridge-name {
        animation: none;
        transition: none;
    }
}

@media screen and (max-width: 720px) {
    .dock {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        height: 25dvh;
        max-height: 25dvh;
        flex-direction: column;
        padding: 0 6px calc(4px + env(safe-area-inset-bottom));
        box-sizing: border-box;
        overflow: hidden;
    }

    .dock.is-detail {
        height: 62dvh;
        max-height: 62dvh;
    }

    .dock.is-detail.is-tall {
        height: 88dvh;
        max-height: 88dvh;
    }

    .panel {
        width: auto;
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        border-radius: 16px;
    }

    .panel-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 100px 0 12px;
    }

    .panel-header .brand {
        display: none;
    }

    .brand img {
        height: 15px;
    }

    .eyebrow,
    .lede {
        display: none;
    }

    .panel-header h1 {
        margin: 0;
        min-width: 0;
        overflow: hidden;
        font-size: 20px;
        line-height: 1;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .toolbar {
        position: absolute;
        top: 7px;
        right: 8px;
        padding: 0;
    }

    .count {
        display: none;
    }

    .icon-btn {
        width: 28px;
        height: 28px;
    }

    .filter {
        padding: 4px 10px 0;
    }

    .filter input {
        height: 32px;
        min-height: 32px;
        background: var(--surface-strong);
        font-size: 14px;
    }

    .list {
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        margin-top: 4px;
        padding: 0 4px 4px;
        overflow: hidden;
    }

    .city-deck {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        height: 100%;
        overflow: hidden;
        touch-action: pan-y;
    }

    .city-page {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        touch-action: pan-y;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .city-page-name {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin: 0;
        padding: 4px 8px 2px;
        background: var(--surface);
        color: var(--faint);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .city-page-name span {
        letter-spacing: 0;
        font-weight: 500;
    }

    .country-group-name,
    .city-group-name {
        margin: 7px 10px 2px;
        color: var(--faint);
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .bridge-stack .bridge {
        background: transparent;
        border: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--line);
        padding: 0;
    }

    .bridge-stack .bridge:last-child {
        border-bottom: 0;
    }

    .bridge-line {
        align-items: flex-start;
    }

    .bridge-hit {
        align-items: flex-start;
        min-height: 0;
        gap: 0;
        padding: 10px 2px;
    }

    .wiki-link {
        align-self: flex-start;
        margin-top: 10px;
    }

    .bridge.is-active .wiki-link {
        width: 29px;
        margin-left: 6px;
    }

    .bridge-copy {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .bridge-name {
        font-size: 15px;
    }

    .bridge-type {
        color: var(--muted);
        font-size: 12px;
        font-weight: 500;
        line-height: 1.3;
    }

    .bridge.is-active .bridge-type {
        color: var(--accent);
    }

    .bridge-more-clip {
        padding: 0 2px 8px;
    }

    .dock.is-detail .bridge.is-active .bridge-summary {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .dock.is-detail.is-tall .bridge.is-active .bridge-summary {
        display: block;
        -webkit-line-clamp: unset;
        overflow: auto;
        max-height: min(36dvh, 280px);
        -webkit-overflow-scrolling: touch;
    }

    .stage {
        height: 112px;
    }

    .light-bar {
        top: calc(8px + env(safe-area-inset-top));
        left: 8px;
    }

    .light-controls {
        height: 44px;
        gap: 2px;
        padding: 4px;
    }

    .brand-slot {
        top: calc(8px + env(safe-area-inset-top));
        right: calc(8px + env(safe-area-inset-right));
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        padding: 0;
    }

    .brand-mark img {
        width: 22px;
        height: 22px;
    }

    .heat-toggle {
        width: 44px;
        height: 44px;
        margin-left: -8px;
        -webkit-mask: radial-gradient(circle 22px at -6px 50%, transparent 21.5px, #000 22.5px);
        mask: radial-gradient(circle 22px at -6px 50%, transparent 21.5px, #000 22.5px);
    }

    .heat-toggle svg {
        width: 34px;
        height: 34px;
    }

    .light-controls button,
    .light-controls svg {
        width: 34px;
        height: 34px;
    }

    .mapboxgl-ctrl-bottom-left {
        top: calc(8px + env(safe-area-inset-top)) !important;
        right: calc(8px + env(safe-area-inset-right)) !important;
        bottom: auto !important;
        left: auto !important;
        z-index: 4;
        gap: 4px;
        max-width: max-content !important;
        padding: 4px 6px 4px 8px !important;
        border-radius: 12px !important;
    }

    .mapboxgl-ctrl-bottom-left a.mapboxgl-ctrl-logo {
        flex: 0 0 58px;
        width: 58px !important;
        height: 15px !important;
        background-size: contain !important;
    }

    .mapboxgl-ctrl-bottom-left:has(.mapboxgl-compact-show) {
        z-index: 6;
        overflow: visible;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
        flex: 0 0 18px;
        min-width: 0;
        overflow: visible;
    }

    .mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
        position: absolute !important;
        top: calc(100% + 8px);
        right: 0;
        z-index: 2;
        justify-content: flex-end;
        flex-wrap: wrap;
        width: max-content;
        max-width: calc(100vw - 16px);
        min-width: 0;
        white-space: normal;
        padding: 6px 10px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    }
}

.bridge-splash {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #12324f;
    opacity: 1;
    transition: opacity 0.7s ease;
}

.bridge-splash.is-out {
    opacity: 0;
    pointer-events: none;
}

.bridge-splash-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    filter: saturate(0.9) contrast(0.96) brightness(1.02);
    transform: scale(1.04);
    transition: opacity 0.35s ease;
}

.bridge-splash-video.is-ready {
    opacity: 1;
}

.bridge-splash-grade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(18, 50, 79, 0.2) 0%, rgba(18, 50, 79, 0.04) 38%, rgba(18, 50, 79, 0.22) 100%);
}

.bridge-splash-grade::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("./intro-noise.png");
    background-repeat: repeat;
    background-size: 64px 64px;
}

.bridge-splash-brand {
    position: absolute;
    top: 36px;
    left: 50%;
    z-index: 1;
    width: min(180px, 42vw);
    height: auto;
    filter: brightness(0) invert(1);
    transform: translateX(-50%);
    animation: bridge-brand-in 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) 0.15s both;
}

.bridge-splash-title {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0 24px;
    font-family: "Cera Pro", "Inter", sans-serif;
    font-size: clamp(56px, 9vw, 120px);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.045em;
    text-align: center;
    color: #f4f7ff;
    text-shadow: 0 10px 40px rgba(4, 10, 24, 0.45);
    animation: bridge-title-in 0.75s cubic-bezier(0.16, 0.84, 0.24, 1) 0.28s both;
}

.bridge-splash.is-copy-out .bridge-splash-brand,
.bridge-splash.is-copy-out .bridge-splash-title {
    animation: bridge-copy-out 0.45s ease forwards;
}

@keyframes bridge-brand-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes bridge-title-in {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

@keyframes bridge-copy-out {
    to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bridge-splash-brand,
    .bridge-splash-title,
    .bridge-splash.is-copy-out .bridge-splash-brand,
    .bridge-splash.is-copy-out .bridge-splash-title {
        animation: none;
    }

    .brand-mark,
    .brand-slot .mapboxgl-ctrl-attrib {
        transition: none;
    }
}

.brand-slot .mapboxgl-ctrl-attrib,
.brand-slot .mapboxgl-ctrl-attrib.mapboxgl-compact,
.brand-slot .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    display: block !important;
    flex: none !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    margin: 0 !important;
    overflow: visible !important;
}

.brand-slot .mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
    width: auto;
    max-width: 220px;
    min-width: 0 !important;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    white-space: nowrap !important;
}

@media (min-width: 721px) {
    .mapboxgl-ctrl-bottom-left {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        left: 12px !important;
        bottom: 12px !important;
        right: auto !important;
        top: auto !important;
        z-index: 3;
        width: max-content;
        max-width: calc(100vw - var(--panel) - 48px);
        min-height: 0;
        margin: 0;
        padding: 5px 12px 5px 8px !important;
        box-sizing: border-box;
        background: var(--ui-pill-bg) !important;
        border: 1px solid var(--ui-pill-border) !important;
        border-radius: 999px !important;
        box-shadow: var(--ui-pill-shadow) !important;
        backdrop-filter: none;
        transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
    }

    .mapboxgl-ctrl-bottom-left > .mapboxgl-ctrl:has(a.mapboxgl-ctrl-logo) {
        order: -1;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
        margin: 0 !important;
        float: none !important;
    }

    .mapboxgl-ctrl-bottom-left a.mapboxgl-ctrl-logo {
        display: block !important;
        flex: 0 0 72px;
        width: 72px !important;
        height: 18px !important;
        margin: 0 !important;
        background-image: url("./mapbox-logo-black%201.svg") !important;
        background-repeat: no-repeat !important;
        background-position: left center !important;
        background-size: contain !important;
        filter: none !important;
        transition: filter 0.45s ease;
    }

    html[data-light="dusk"] .mapboxgl-ctrl-bottom-left a.mapboxgl-ctrl-logo,
    html[data-light="night"] .mapboxgl-ctrl-bottom-left a.mapboxgl-ctrl-logo {
        filter: invert(1) !important;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib.mapboxgl-compact,
    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
        background: transparent !important;
        padding: 0 !important;
        font-size: 11px !important;
        color: var(--ui-pill-text) !important;
        transition: color 0.45s ease;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner,
    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
        display: inline !important;
        position: static !important;
        white-space: nowrap;
        color: var(--ui-pill-text) !important;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib a {
        color: var(--ui-pill-text) !important;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib a:hover {
        color: var(--ui-accent) !important;
    }

    .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib .mapboxgl-ctrl-attrib-button {
        display: none !important;
    }
}

:root {
    --ui-pad: 10px;
    --ui-pill-bg: #ffffff;
    --ui-pill-text: #14233d;
    --ui-accent: #4264fb;
    --ui-icon-bg: #ffffff;
    --ui-icon-on-accent: #ffffff;
    --ui-pill-border: rgba(60, 60, 67, 0.12);
    --ui-pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --heat-1: #5c128c;
    --heat-2: #b01258;
    --heat-3: #e82424;
    --heat-4: #ff5c10;
    --heat-5: #ff9e24;
    --heat-6: #ffd27a;
}

[data-ui-theme="dawn"] {
    --ui-pill-bg: #f7e7dc;
    --ui-pill-text: #4a2c38;
    --ui-accent: #c45c78;
    --ui-icon-bg: #f7e7dc;
    --ui-icon-on-accent: #fff6f0;
    --ui-pill-border: rgba(196, 92, 120, 0.22);
    --ui-pill-shadow: 0 1px 2px rgba(74, 44, 56, 0.08);
    --heat-1: #12768a;
    --heat-2: #3056b0;
    --heat-3: #843eb0;
    --heat-4: #d64880;
    --heat-5: #ffc48e;
    --heat-6: #ffe0c2;
}

[data-ui-theme="day"] {
    --ui-pill-bg: #ffffff;
    --ui-pill-text: #14233d;
    --ui-accent: #4264fb;
    --ui-icon-bg: #ffffff;
    --ui-icon-on-accent: #ffffff;
    --ui-pill-border: rgba(60, 60, 67, 0.12);
    --ui-pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --heat-1: #5c128c;
    --heat-2: #b01258;
    --heat-3: #e82424;
    --heat-4: #ff5c10;
    --heat-5: #ff9e24;
    --heat-6: #ffd27a;
}

[data-ui-theme="dusk"] {
    --ui-pill-bg: #2a1a24;
    --ui-pill-text: #f6dcc8;
    --ui-accent: #ff8a5c;
    --ui-icon-bg: #2a1a24;
    --ui-icon-on-accent: #2a1a24;
    --ui-pill-border: rgba(255, 150, 110, 0.22);
    --ui-pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    --heat-1: #3852ff;
    --heat-2: #8438ff;
    --heat-3: #e434a8;
    --heat-4: #ff8048;
    --heat-5: #ffe096;
    --heat-6: #fff6d8;
}

[data-ui-theme="night"] {
    --ui-pill-bg: #1a2740;
    --ui-pill-text: #cfe8f7;
    --ui-accent: #7ec8ff;
    --ui-icon-bg: #1a2740;
    --ui-icon-on-accent: #1a2740;
    --ui-pill-border: rgba(126, 200, 255, 0.2);
    --ui-pill-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    --heat-1: #a8245c;
    --heat-2: #ec4448;
    --heat-3: #ff8e2a;
    --heat-4: #ffd656;
    --heat-5: #fffad2;
    --heat-6: #ffb45a;
}

.map-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.map-button svg {
    display: block;
    width: 38px;
    height: 38px;
    overflow: visible;
}

.map-button circle:not(.heatmap-dot) {
    fill: var(--ui-icon-bg);
    transition: fill 0.35s ease;
}

.map-button path {
    stroke: var(--ui-accent);
    transition: stroke 0.35s ease;
}

.map-button:hover circle:not(.heatmap-dot),
.map-button:active circle:not(.heatmap-dot),
.map-button.selected circle:not(.heatmap-dot) {
    fill: var(--ui-accent);
}

.map-button:hover path,
.map-button:active path,
.map-button.selected path {
    stroke: var(--ui-icon-on-accent);
}

#heatmap .heatmap-dot {
    fill: var(--ui-accent);
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
}

#heatmap:hover:not(.selected) .heatmap-dot,
#heatmap:active:not(.selected) .heatmap-dot {
    fill: var(--ui-icon-on-accent);
}

#heatmap.selected .btn-disc {
    fill: var(--ui-accent);
}

#heatmap.selected .heatmap-marks {
    filter: url(#heat-goo);
}

#heatmap.selected .heatmap-dot {
    animation: heat-liquid 2.8s ease-in-out infinite;
}

#heatmap.selected .heatmap-dot-lg { fill: var(--heat-5); }
#heatmap.selected .heatmap-dot-md:nth-child(2) { fill: var(--heat-3); animation-duration: 3.4s; }
#heatmap.selected .heatmap-dot-md:nth-child(3) { fill: var(--heat-4); animation-duration: 2.4s; }
#heatmap.selected .heatmap-dot-sm:nth-child(4) { fill: var(--heat-1); animation-duration: 3.1s; }
#heatmap.selected .heatmap-dot-sm:nth-child(5) { fill: var(--heat-2); animation-duration: 2.2s; }
#heatmap.selected .heatmap-dot-sm:nth-child(6) { fill: var(--heat-6); animation-duration: 3.6s; }

@keyframes heat-liquid {
    0%,
    100% {
        opacity: 0.82;
        transform: translate(0, 0) scale(0.78, 0.86);
    }
    38% {
        opacity: 1;
        transform: translate(0.7px, -0.9px) scale(1.22, 0.94);
    }
    71% {
        opacity: 0.9;
        transform: translate(-0.8px, 0.6px) scale(0.9, 1.2);
    }
}

.map-controls {
    display: flex;
    align-items: center;
    gap: 0;
    position: absolute;
    z-index: 4;
    top: var(--ui-pad);
    left: var(--ui-pad);
    max-width: calc(100vw - (var(--ui-pad) * 2));
}

.map-controls-group {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 5px 6px;
    background: var(--ui-pill-bg);
    border: 1px solid var(--ui-pill-border);
    border-radius: 32px;
    box-shadow: var(--ui-pill-shadow);
    box-sizing: border-box;
    transition: background 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.map-controls-time {
    padding-right: 36px;
    -webkit-mask: radial-gradient(circle 27px at calc(100% + 2px) 50%, transparent 26px, #000 27.5px);
    mask: radial-gradient(circle 27px at calc(100% + 2px) 50%, transparent 26px, #000 27.5px);
}

.map-controls-heatmap {
    width: 50px;
    height: 50px;
    margin-left: -23px;
    padding: 5px;
    justify-content: center;
    border-radius: 50%;
}

.brand-mark {
    box-sizing: border-box;
    background: var(--ui-pill-bg);
    border-color: var(--ui-pill-border);
    box-shadow: var(--ui-pill-shadow);
    text-decoration: none;
}

.brand-mark-icon {
    display: block;
    width: 26px;
    height: 26px;
    pointer-events: none;
}

[data-ui-theme="dusk"] .brand-mark-icon,
[data-ui-theme="night"] .brand-mark-icon {
    filter: invert(1);
}

.attrib-bar {
    display: none;
}

@media (min-width: 721px) {
    .panel {
        -webkit-mask-image: radial-gradient(circle 27px at 32px 32px, transparent 26px, #000 27.5px);
        mask-image: radial-gradient(circle 27px at 32px 32px, transparent 26px, #000 27.5px);
    }

    .brand-slot {
        top: 19px;
        right: calc(12px + var(--panel) - 57px);
        z-index: 6;
    }

    .panel-header {
        padding: 14px 22px 0 80px;
    }

    .eyebrow {
        margin-top: 0;
        height: 36px;
    }

    .panel-header h1,
    .lede {
        margin-left: -58px;
    }

    .panel-header h1 {
        margin-top: 20px;
    }
}

@media screen and (max-width: 720px) {
    .map-controls {
        top: calc(env(safe-area-inset-top, 0px) + var(--ui-pad));
        left: var(--ui-pad);
    }

    .brand-slot {
        top: calc(env(safe-area-inset-top, 0px) + var(--ui-pad));
        right: calc(var(--ui-pad) + env(safe-area-inset-right, 0px));
    }

    .brand-mark {
        width: 50px;
        height: 50px;
    }

    .brand-mark .brand-mark-icon {
        width: 26px;
        height: 26px;
    }

    .panel {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .dock,
    .dock.is-detail,
    .dock.is-detail.is-tall {
        height: auto;
        max-height: none;
        overflow: visible;
        flex-direction: column;
        gap: 6px;
        padding: 0 0 env(safe-area-inset-bottom, 0px);
    }

    .panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto minmax(0, 1fr);
        align-items: center;
        flex: 0 0 auto;
        width: auto;
        height: 36dvh;
        max-height: 36dvh;
        margin: 0 8px;
        border-radius: 18px;
    }

    .dock.is-detail .panel {
        height: 64dvh;
        max-height: 64dvh;
    }

    .dock.is-detail.is-tall .panel {
        height: 82dvh;
        max-height: 82dvh;
    }

    .panel-header {
        display: block;
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        padding: 12px 6px 0 14px;
    }

    .panel-heading {
        min-width: 0;
    }

    .panel-header h1 {
        margin: 0;
        font-size: 22px;
        line-height: 1.05;
    }

    .toolbar {
        position: static;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        padding: 12px 10px 0 0;
    }

    .filter {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 8px 12px 0;
    }

    .list {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 3;
        min-height: 0;
        height: auto;
        margin-top: 8px;
        padding: 0 0 8px;
        overflow: hidden;
    }

    .city-deck {
        display: block;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        height: 100%;
        overflow: hidden;
        touch-action: pan-y;
    }

    .list {
        height: 100%;
    }

    .city-track {
        display: flex;
        width: 100%;
        height: 100%;
        will-change: transform;
    }

    .city-page {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        touch-action: pan-y;
        background: transparent;
    }

    .city-page-name {
        padding: 6px 14px 4px;
    }

    .country-group-name,
    .city-group-name {
        margin: 8px 14px 2px;
    }

    .bridge-line {
        align-items: center;
    }

    .bridge-line > .bridge-hit:first-child {
        flex: 1 1 auto;
        align-items: center;
        gap: 12px;
        width: auto;
        min-height: 0;
        padding: 8px 4px 8px 12px;
    }

    .thumb {
        flex: 0 0 52px;
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .bridge-copy {
        gap: 1px;
    }

    .wiki-link,
    .bridge.is-active .wiki-link {
        align-self: center;
        margin-top: 0;
    }

    .bridge-more-clip {
        padding: 0 12px 10px;
    }

    .stage {
        width: 100%;
        height: 176px;
        margin: 0 0 10px;
        border-radius: 14px;
    }

    .stage-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .attrib-bar {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        box-sizing: border-box;
        width: max-content;
        max-width: calc(100% - 20px);
        height: 40px;
        margin: 6px var(--ui-pad) 8px;
        padding: 0;
        overflow: hidden;
        background: var(--ui-pill-bg);
        border: 1px solid var(--ui-pill-border);
        border-radius: 20px;
        box-shadow: var(--ui-pill-shadow);
        color: var(--ui-pill-text);
        pointer-events: auto;
    }

    .attrib-logo {
        display: grid;
        place-items: center;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        cursor: pointer;
    }

    .attrib-logo img {
        display: block;
        width: 22px;
        height: 22px;
        pointer-events: none;
    }

    [data-ui-theme="dusk"] .attrib-logo img,
    [data-ui-theme="night"] .attrib-logo img {
        filter: invert(1);
    }

    .attrib-pop {
        display: grid;
        grid-template-columns: 0fr;
        min-width: 0;
        transition: grid-template-columns 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .attrib-bar.is-open {
        padding-right: 12px;
    }

    .attrib-bar.is-open .attrib-pop {
        grid-template-columns: 1fr;
    }

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

    .attrib-bar .mapboxgl-ctrl-bottom-left {
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 0;
        width: auto !important;
        max-width: calc(100vw - 78px) !important;
        min-width: 0;
        height: 38px;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none;
    }

    .attrib-bar.is-open .mapboxgl-ctrl-bottom-left {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask: linear-gradient(90deg, #000 calc(100% - 16px), transparent);
        mask: linear-gradient(90deg, #000 calc(100% - 16px), transparent);
    }

    .attrib-bar .mapboxgl-ctrl {
        margin: 0 !important;
        float: none !important;
    }

    .attrib-bar a.mapboxgl-ctrl-logo {
        display: none !important;
    }

    .attrib-bar .mapboxgl-ctrl-attrib,
    .attrib-bar .mapboxgl-ctrl-attrib.mapboxgl-compact,
    .attrib-bar .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
        display: flex !important;
        position: static !important;
        flex: 0 0 auto;
        width: max-content !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        color: var(--ui-pill-text) !important;
        font-family: Inter, sans-serif !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1 !important;
    }

    .attrib-bar .mapboxgl-ctrl-attrib-button {
        display: none !important;
    }

    .attrib-bar .mapboxgl-ctrl-attrib-inner,
    .attrib-bar .mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner,
    .attrib-bar .mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
        display: inline !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        color: var(--ui-pill-text) !important;
    }

    .attrib-bar .mapboxgl-ctrl-attrib a {
        color: var(--ui-pill-text) !important;
        text-decoration: none;
    }
}

@media screen and (max-width: 480px) {
    .map-button svg {
        width: 32px;
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #heatmap.selected .heatmap-dot {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .city-track {
        transition: none !important;
    }
}

.dock {
    flex-direction: column;
    align-items: stretch;
    bottom: auto;
    width: var(--panel);
    height: auto;
    max-height: calc(100dvh - 24px);
    gap: 0;
}

.explore-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.explore-bar .brand-mark,
.explore-pill {
    pointer-events: auto;
}

.explore-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    height: 50px;
    margin: 0 0 0 -10px;
    padding: 0 18px 0 26px;
    border: 1px solid var(--ui-pill-border);
    border-radius: 32px;
    background: var(--ui-pill-bg);
    box-shadow: var(--ui-pill-shadow);
    color: var(--ui-pill-text);
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transform-origin: right center;
    -webkit-mask: radial-gradient(circle 27px at -15px 50%, transparent 26px, #000 27.5px);
    mask: radial-gradient(circle 27px at -15px 50%, transparent 26px, #000 27.5px);
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease, font-size 0.3s ease;
}

.explore-pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 16%, transparent), var(--ui-pill-shadow);
}

.dock:not(.is-open) .explore-pill {
    animation: explore-breathe 3.4s ease-in-out infinite;
}

.dock.is-open .explore-pill {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding-left: 34px;
    font-size: 14px;
    animation: none;
}

.explore-pill-kicker,
.explore-pill-name {
    font: inherit;
    letter-spacing: inherit;
}

@keyframes explore-breathe {
    0%,
    100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

.panel-pop {
    display: grid;
    grid-template-rows: 0fr;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dock.is-open .panel-pop {
    grid-template-rows: 1fr;
    margin-top: 6px;
}

.panel-header {
    display: none;
}

.panel {
    width: 100%;
    min-height: 0;
    transform-origin: top center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.28s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dock.is-open .panel {
    height: calc(100dvh - 92px);
    max-height: calc(100dvh - 92px);
    opacity: 1;
    transform: none;
}

.dock:not(.is-open) .panel {
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
    opacity: 0;
}

@media (min-width: 721px) {
    .map-controls {
        top: 12px;
        left: 12px;
    }

    .panel-header {
        padding-right: 18px;
    }

    .panel-header h1,
    .lede {
        margin-left: -62px;
    }

    .toolbar,
    .filter {
        padding-right: 18px;
        padding-left: 18px;
    }

    .toolbar {
        padding-top: 14px;
    }

    .filter {
        padding-top: 10px;
    }

    .list {
        margin-top: 8px;
        padding: 2px 8px 16px 18px;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: var(--scroll-thumb) transparent;
    }

    .list::-webkit-scrollbar {
        width: 10px;
    }

    .list::-webkit-scrollbar-track {
        background: transparent;
        margin: 8px 0 14px;
    }

    .list::-webkit-scrollbar-thumb {
        background-color: var(--scroll-thumb);
        border: 2px solid transparent;
        border-radius: 999px;
        background-clip: padding-box;
    }

    .group-name {
        margin: 18px 0 6px;
    }

    .country-section:first-child .group-name {
        margin-top: 6px;
    }

    .city-group-name {
        margin-left: 0;
        margin-right: 0;
    }

    .bridge-hit {
        padding-left: 0;
    }

    .bridge-more-clip {
        padding-left: 0;
        padding-right: 0;
    }
}

@media screen and (max-width: 720px) {
    .dock,
    .dock.is-detail,
    .dock.is-detail.is-tall {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: none;
        align-items: stretch;
        padding: 0 0 calc(22px + env(safe-area-inset-bottom, 0px));
    }

    .panel-pop {
        order: 1;
    }

    .explore-bar {
        order: 2;
        box-sizing: border-box;
        width: 100%;
        padding: 0 var(--ui-pad);
    }

    .dock:not(.is-open) .explore-pill {
        animation: none;
    }

    .attrib-bar {
        order: 3;
    }

    .explore-bar .brand-mark {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + var(--ui-pad));
        right: calc(var(--ui-pad) + env(safe-area-inset-right, 0px));
        z-index: 6;
        width: 50px;
        height: 50px;
    }

    .explore-pill,
    .dock.is-open .explore-pill {
        flex: none;
        width: 100%;
        margin: 0;
        justify-content: center;
        padding: 0 16px 0 64px;
        -webkit-mask: radial-gradient(circle 27px at 25px 50%, transparent 26px, #000 27.5px);
        mask: radial-gradient(circle 27px at 25px 50%, transparent 26px, #000 27.5px);
    }

    .explore-pill-wrap {
        position: relative;
        width: 100%;
        height: 50px;
        pointer-events: none;
    }

    .explore-pill-label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: opacity 0.22s ease;
    }

    .explore-pill-wrap .attrib-logo {
        position: absolute;
        z-index: 2;
        left: 0;
        top: 0;
        display: grid;
        place-items: center;
        box-sizing: border-box;
        width: 50px;
        height: 50px;
        margin: 0;
        padding: 0;
        border: 1px solid var(--ui-pill-border);
        border-radius: 50%;
        background: var(--ui-pill-bg);
        box-shadow: var(--ui-pill-shadow);
        color: var(--ui-pill-text);
        font-family: Inter, sans-serif;
        font-size: 22px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        pointer-events: auto;
    }

    .attrib-glyph {
        display: block;
        transform: translateY(-1px);
    }

    .attrib-pop {
        position: absolute;
        z-index: 1;
        left: 64px;
        right: 14px;
        top: 0;
        height: 50px;
        display: flex;
        align-items: center;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }

    .explore-pill-wrap.is-attrib .explore-pill-label {
        opacity: 0;
    }

    .explore-pill-wrap.is-attrib .attrib-pop {
        opacity: 1;
        pointer-events: auto;
        -webkit-mask: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
        mask: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
    }

    .attrib-pop .mapboxgl-ctrl-bottom-left {
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50px;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        scrollbar-width: none;
    }

    .attrib-pop .mapboxgl-ctrl-bottom-left::-webkit-scrollbar {
        display: none;
    }

    .attrib-pop .mapboxgl-ctrl {
        margin: 0 !important;
        float: none !important;
    }

    .attrib-pop a.mapboxgl-ctrl-logo,
    .attrib-pop .mapboxgl-ctrl-attrib-button {
        display: none !important;
    }

    .attrib-pop .mapboxgl-ctrl-attrib,
    .attrib-pop .mapboxgl-ctrl-attrib.mapboxgl-compact,
    .attrib-pop .mapboxgl-ctrl-attrib.mapboxgl-compact-show {
        display: block !important;
        position: static !important;
        flex: 0 0 auto !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        color: var(--ui-pill-text) !important;
        font-family: Inter, sans-serif !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1 !important;
    }

    .attrib-pop .mapboxgl-ctrl-attrib-inner,
    .attrib-pop .mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner,
    .attrib-pop .mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
        display: block !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        white-space: nowrap !important;
        color: var(--ui-pill-text) !important;
        font-family: Inter, sans-serif !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 50px !important;
    }

    .attrib-pop .mapboxgl-ctrl-attrib a {
        color: var(--ui-pill-text) !important;
        text-decoration: none;
    }

    .panel {
        width: auto;
        transform-origin: bottom center;
        transform: translateY(12px);
    }

    .dock.is-open .panel {
        height: 32dvh;
        max-height: 32dvh;
        margin: 0 10px 10px;
        border-radius: 24px;
        transform: none;
    }

    .dock.is-open.is-detail .panel {
        height: 58dvh;
        max-height: 58dvh;
    }

    .dock.is-open.is-detail.is-tall .panel {
        height: 76dvh;
        max-height: 76dvh;
    }

    .dock.is-open.is-detail.is-card .panel {
        height: var(--card-sheet);
        max-height: var(--card-sheet);
    }

    .dock.is-open.is-picking .panel,
    .dock.is-open.is-detail.is-card.is-picking .panel {
        height: 32dvh;
        max-height: 32dvh;
    }

    .dock.is-open.is-detail.is-card .list {
        padding-top: 0;
        padding-bottom: 0;
    }

    .dock.is-open.is-detail.is-card .bridge.is-active .bridge-summary {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
        max-height: none;
        margin-bottom: 0;
    }

    .dock.is-open.is-detail.is-card .bridge-more,
    .dock.is-open.is-detail.is-card .bridge-more-clip {
        transition: none;
    }

    .panel-header {
        display: none !important;
    }

    .toolbar,
    .filter {
        display: none !important;
    }

    .list,
    .place-results {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
    }

    .list {
        position: relative;
        margin-top: 0;
        padding: 14px 0 16px;
    }

    .city-group-name {
        display: block;
    }

    .city-page-name {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 2px;
        width: 100%;
        margin: 0;
        padding: 4px 6px 8px;
        border: 0;
        appearance: none;
        background: var(--surface);
        color: inherit;
        font: inherit;
        text-align: center;
        cursor: pointer;
    }

    .country-chevron {
        position: absolute;
        right: 14px;
        width: 16px;
        height: 16px;
        color: var(--faint);
        transition: transform 0.2s ease;
    }

    .list.is-picking .country-chevron {
        transform: rotate(180deg);
    }

    .country-menu {
        display: none;
    }

    .list.is-picking .bridge-stack {
        display: none;
    }

    .list.is-picking .country-menu {
        display: block;
        position: absolute;
        z-index: 4;
        left: 0;
        right: 0;
        top: 44px;
        bottom: 0;
        padding: 2px 8px 12px;
        overflow: auto;
        background: var(--surface);
    }

    .country-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        min-height: 44px;
        margin: 0;
        padding: 0 8px;
        border: 0;
        border-bottom: 1px solid var(--line);
        background: transparent;
        color: var(--ink);
        font: inherit;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0;
        text-align: left;
        text-transform: none;
        cursor: pointer;
    }

    .country-option em {
        color: var(--faint);
        font-style: normal;
        font-weight: 500;
        font-size: 13px;
    }

    .country-option.is-current {
        color: var(--accent);
    }

    .city-step {
        display: grid;
        flex: 0 0 36px;
        place-items: center;
        width: 36px;
        height: 36px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 18px;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
    }

    .city-step svg {
        width: 18px;
        height: 18px;
    }

    .city-step:disabled {
        opacity: 0.28;
        cursor: default;
    }

    .city-page-name .city-page-title {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 32px;
        color: var(--ink);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.12em;
        line-height: 1.15;
        text-align: center;
        text-transform: uppercase;
    }

    .city-page-name .city-page-title > span {
        letter-spacing: 0.12em;
    }

    .city-page-name .city-page-title em {
        margin-left: 6px;
        color: var(--faint);
        font-style: normal;
        font-weight: 500;
        letter-spacing: 0;
    }

    .city-page-name .city-page-title small {
        display: block;
        margin-top: 2px;
        color: var(--faint);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.08em;
    }

    .bridge-line > .bridge-hit:first-child {
        padding: 10px 16px;
    }

    .thumb {
        border-radius: 14px;
    }

    .panel.has-places .list {
        display: none;
    }

    .place-results {
        overflow: auto;
        padding: 14px 10px 16px;
    }

    .place-results[hidden] {
        display: none !important;
    }

    .place-status {
        margin: 18px 12px;
        color: var(--muted);
        font-size: 14px;
    }

    .place-hit {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: var(--ink);
        text-align: left;
        cursor: pointer;
    }

    .place-hit:active {
        background: var(--line);
    }

    .place-name {
        font-size: 15px;
        font-weight: 600;
    }

    .place-meta {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.3;
    }

    .explore-search {
        position: absolute;
        z-index: 1;
        left: 62px;
        right: 16px;
        top: 0;
        height: 50px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--ui-pill-text);
        font-family: Inter, sans-serif;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.02em;
        text-align: center;
        opacity: 0;
        pointer-events: none;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
    }

    .explore-search::placeholder {
        color: var(--ui-pill-text);
        opacity: 0.72;
    }

    .dock.is-open .explore-pill-wrap:not(.is-attrib) .explore-search {
        opacity: 1;
        pointer-events: auto;
    }

    .dock.is-open .explore-pill-wrap:not(.is-attrib) .explore-search:focus,
    .dock.is-open .explore-pill-wrap:not(.is-attrib) .explore-search:not(:placeholder-shown) {
        text-align: left;
    }

    .dock.is-open .explore-pill-wrap:not(.is-attrib) .explore-pill-label {
        display: none;
    }

    .attrib-globe {
        display: none;
        width: 22px;
        height: 22px;
    }

    .dock.is-open .attrib-glyph {
        display: none;
    }

    .dock.is-open .attrib-globe {
        display: block;
    }

    .explore-pill-wrap {
        touch-action: pan-y;
    }
}

@media (prefers-reduced-motion: reduce) {
    .explore-pill,
    .panel-pop,
    .panel,
    .attrib-pop {
        animation: none;
        transition: none;
    }
}

@media (min-width: 721px) {
    .dock {
        top: 12px;
        right: 12px;
        bottom: 12px;
        left: auto;
        width: var(--panel);
        height: auto;
        max-height: none;
    }

    .explore-pill,
    .explore-pill-wrap {
        display: none !important;
    }

    .explore-bar {
        position: absolute;
        top: 7px;
        left: 7px;
        width: 50px;
        height: 50px;
        margin: 0;
        padding: 0;
        z-index: 6;
    }

    .explore-bar .brand-mark {
        position: relative;
        width: 50px;
        height: 50px;
    }

    .panel-pop,
    .dock.is-open .panel-pop {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        align-self: stretch;
        grid-template-rows: none;
        margin: 0;
        min-height: 0;
        height: auto;
        overflow: hidden;
    }

    .panel-header {
        display: block;
    }

    .panel,
    .dock.is-open .panel,
    .dock:not(.is-open) .panel {
        flex: 1 1 auto;
        align-self: stretch;
        width: 100%;
        min-height: 0;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        border-width: 1px !important;
        box-shadow: var(--shadow) !important;
        opacity: 1 !important;
        transform: none !important;
        -webkit-mask-image: radial-gradient(circle 27px at 32px 32px, transparent 26px, #000 27.5px);
        mask-image: radial-gradient(circle 27px at 32px 32px, transparent 26px, #000 27.5px);
    }
}
