html,
body,
#app-shell,
.leaflet-map {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17211d;
    overflow: hidden;
}

button {
    font: inherit;
}

.leaflet-map {
    --map-control-icon-color: #4b5563;
    --map-layers-icon-color: var(--map-control-icon-color);
    --map-photos-icon-color: #2563eb;
    --map-info-icon-color: #ff3b30;
    --map-messages-icon-color: #34c759;
    --map-routes-icon-gradient: conic-gradient(
        from -35deg,
        #ff3b30,
        #ff9500,
        #ffcc00,
        #34c759,
        #00c7be,
        #007aff,
        #5856d6,
        #af52de,
        #ff2d55,
        #ff3b30
    );
    background: #dfe8dc;
}

.maplibre-leaflet-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.maplibre-leaflet-layer .maplibregl-canvas {
    pointer-events: none;
}

.leaflet-control-layers {
    position: relative;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fff;
    background-clip: padding-box;
    box-shadow: none;
    font-size: 12px;
}

.leaflet-control-layers::after,
.map-legend::after {
    content: "";
    position: absolute;
    top: 0;
    left: 30px;
    width: 8px;
    height: 30px;
}

.leaflet-top.leaflet-left .leaflet-control-layers {
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}

.leaflet-top.leaflet-left .leaflet-control-layers-toggle {
    box-shadow: inset 0 -1px #ccc;
}

.leaflet-touch .leaflet-control-layers-toggle,
.leaflet-control-layers-toggle,
.map-legend-toggle {
    width: 30px;
    height: 30px;
}

.leaflet-control-layers-expanded {
    width: 30px;
    height: 30px;
    padding: 0;
    background: #fff;
    overflow: visible;
}

.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: flex;
}

.leaflet-control-layers-list {
    position: absolute;
    top: 0;
    left: 36px;
    display: block;
    min-width: 190px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 9px 10px 10px;
    border: 1px solid rgba(41, 56, 48, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(23, 33, 29, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    visibility: hidden;
    backdrop-filter: blur(5px);
}

.leaflet-control-layers.leaflet-control-layers-expanded .leaflet-control-layers-list {
    position: absolute;
    top: 0;
    left: 36px;
}

.leaflet-control-layers-expanded .leaflet-control-layers-list {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.leaflet-retina .leaflet-control-layers-toggle,
.leaflet-control-layers-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    --map-control-icon-color: var(--map-layers-icon-color);
    border-radius: 2px 2px 0 0;
    background-color: #fff;
    background-image: none;
    background-size: 18px 18px;
    color: var(--map-control-icon-color);
    font-size: 16px;
    text-decoration: none;
}

.leaflet-control-layers-toggle:link,
.leaflet-control-layers-toggle:visited,
.leaflet-control-layers-toggle:hover,
.leaflet-control-layers-toggle:focus-visible,
.leaflet-control-layers-toggle:active {
    color: var(--map-control-icon-color);
    text-decoration: none;
}

.leaflet-control-layers-toggle:hover,
.leaflet-control-layers-toggle:focus-visible {
    background-color: #f4f4f4;
}

.leaflet-control-zoom a,
.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus-visible {
    color: var(--map-control-icon-color);
}

.route-options-settling .route-option-hit-line,
.route-options-settling .route-option-marker {
    pointer-events: none;
}

.leaflet-control-layers-section {
    margin: 7px 4px 3px;
    padding: 7px 0 2px;
    border-top: 1px solid rgba(41, 56, 48, 0.14);
    color: #5c6f66;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.leaflet-control-layers-section:first-child {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 0;
}

.map-legend {
    position: relative;
    font-size: 11px;
    line-height: 1.25;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fff;
    background-clip: padding-box;
    box-shadow: none;
}

.leaflet-top.leaflet-left .map-legend {
    margin-top: 0;
    margin-left: 10px;
    border-top: 0;
    border-radius: 0 0 4px 4px;
}

.map-legend-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0 0 2px 2px;
    background: #fff;
    color: var(--map-control-icon-color);
    cursor: default;
    font-size: 18px;
}

.map-legend-toggle:hover,
.map-legend-toggle:focus-visible {
    background: #f4f4f4;
}

.map-legend-panel {
    position: absolute;
    top: 0;
    left: 36px;
    width: min(210px, calc(100vw - 66px));
    padding: 8px;
    border: 1px solid rgba(41, 56, 48, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(23, 33, 29, 0.14);
    color: #17211d;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    visibility: hidden;
    backdrop-filter: blur(5px);
}

.map-legend-content {
    max-height: calc(var(--route-tool-panel-max-height, 520px) - 18px);
    overflow-y: auto;
    padding: 1px 2px 2px;
}

.map-legend:hover .map-legend-panel,
.map-legend:focus-within .map-legend-panel,
.map-legend.map-legend-mobile-open .map-legend-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.route-picker-control,
.route-tools-control {
    position: relative;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fff;
    background-clip: padding-box;
}

.route-tool {
    position: relative;
}

.route-picker-tool::after,
.route-details-tool::after,
.route-updates-tool::after {
    content: "";
    position: absolute;
    top: 0;
    left: 30px;
    width: 6px;
    height: 30px;
}

.route-tool-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--map-control-icon-color);
    cursor: default;
    font-size: 17px;
}

.route-details-tool > .route-tool-toggle {
    color: var(--map-info-icon-color);
}

.route-updates-tool > .route-tool-toggle {
    color: var(--map-messages-icon-color);
}

.route-picker-tool > .route-tool-toggle {
    color: #ff3b30;
}

.route-picker-tool > .route-tool-toggle i {
    display: inline-block;
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.route-picker-tool > .route-tool-toggle i {
    background-image: var(--map-routes-icon-gradient);
}

.route-images-tool > .route-tool-toggle {
    color: var(--map-photos-icon-color);
}

.route-tool:not(:last-child) > .route-tool-toggle {
    border-bottom: 1px solid #ccc;
}

.route-tool:first-child > .route-tool-toggle {
    border-radius: 2px 2px 0 0;
}

.route-tool:last-child > .route-tool-toggle {
    border-radius: 0 0 2px 2px;
}

.route-tool:only-child > .route-tool-toggle {
    border-radius: 2px;
}

.route-tool-toggle:hover,
.route-tool-toggle:focus-visible {
    background: #f4f4f4;
}

.route-tool-panel {
    --route-tool-panel-width: 270px;
    position: absolute;
    top: 0;
    left: 34px;
    width: min(var(--route-tool-panel-width), calc(100vw - 66px));
    max-height: var(--route-tool-panel-max-height, 520px);
    box-sizing: border-box;
    overflow: hidden;
    padding: 8px;
    border: 1px solid rgba(41, 56, 48, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(25, 34, 30, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-4px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    visibility: hidden;
    backdrop-filter: blur(10px);
}

.route-tool:hover > .route-tool-panel,
.route-tool:focus-within > .route-tool-panel,
.route-tool.route-tool-mobile-open > .route-tool-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.route-picker-panel .route-picker-list {
    max-height: calc(var(--route-tool-panel-max-height, 520px) - 10px);
    padding: 0;
}

.route-picker-list .route-tab {
    width: 100%;
}

.route-picker-panel {
    padding: 4px;
}

.route-details-picker-panel {
    --route-tool-panel-width: 540px;
    padding: 8px;
}

.route-details-picker-panel .route-details-picker-content {
    max-height: calc(var(--route-tool-panel-max-height, 520px) - 18px);
    padding: 0;
}

.map-popover-scroll-content {
    scrollbar-color: #718078 rgba(41, 56, 48, 0.08);
    scrollbar-gutter: stable;
}

.map-popover-scroll-content::-webkit-scrollbar {
    width: 10px;
}

.map-popover-scroll-content::-webkit-scrollbar-track {
    background: rgba(41, 56, 48, 0.08);
    border-radius: 999px;
}

.map-popover-scroll-content::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #718078;
    background-clip: padding-box;
}

.map-popover-scroll-hint {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 36px 8px 11px;
    border-radius: 0 0 7px 7px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.98) 58%
    );
    color: #53645c;
    font-size: 0.72rem;
    font-weight: 750;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.map-popover-has-more > .map-popover-scroll-hint {
    opacity: 1;
}

.route-details-summary {
    margin: 0;
}

.route-details-picker-content .route-details-title {
    margin: 0 0 8px;
    color: #1d2b24;
    font-size: 1.04rem;
    line-height: 1.25;
}

.route-details-summary dl {
    display: grid;
    gap: 5px;
    margin: 0;
}

.route-details-summary dl div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.route-details-summary dt {
    color: #68756e;
    font-size: 0.76rem;
    font-weight: 650;
}

.route-details-summary dd {
    margin: 0;
    color: #1d2b24;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
}

.route-details-copy {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(41, 56, 48, 0.12);
}

.route-details-copy > :first-child {
    margin-top: 0;
}

.route-details-copy > :last-child {
    margin-bottom: 0;
}

.route-updates-picker-panel {
    --route-tool-panel-width: 320px;
    padding: 8px;
}

.route-updates-picker-panel .route-updates-list {
    max-height: calc(var(--route-tool-panel-max-height, 520px) - 18px);
    padding: 0;
}

.route-updates-list .empty-updates {
    padding: 0;
    color: #1b2821;
    font-size: 0.92rem;
    line-height: 1.45;
}

.route-tools-control.details-unavailable .route-updates-tool > .route-tool-toggle {
    border-radius: 2px 2px 0 0;
}

.route-tools-control.photos-unavailable .route-updates-tool > .route-tool-toggle {
    border-bottom: 0;
    border-radius: 0 0 2px 2px;
}

.route-tools-control.details-unavailable.photos-unavailable .route-updates-tool > .route-tool-toggle {
    border-radius: 2px;
}

.map-legend-section {
    display: block;
    margin: 7px 0 3px;
    padding: 7px 0 2px;
    border-top: 1px solid rgba(41, 56, 48, 0.14);
    color: #5c6f66;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.map-legend-section:first-of-type {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 0;
}

.map-legend-panel ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.map-legend-panel li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.map-legend-label {
    min-width: 0;
}

.map-legend-line {
    width: 28px;
    height: 0;
    border-top: 3px solid var(--legend-color, #155DFC);
    border-radius: 999px;
}

.map-legend-line-dashed {
    border-top-style: dashed;
}

.map-legend-line-dotted {
    border-top-style: dotted;
}

.map-legend-icon {
    width: 28px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-legend-location-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ff00cc;
    box-shadow: 0 0 0 1px rgba(23, 33, 29, 0.18), 0 2px 5px rgba(23, 33, 29, 0.22);
}

.map-legend-circle {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    background: var(--legend-icon-color, #4b5563);
    color: #fff;
    font-size: 9px;
    box-shadow: 0 2px 5px rgba(23, 33, 29, 0.24);
}

.map-legend-photo {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    font-size: 9px;
    box-shadow: 0 2px 5px rgba(23, 33, 29, 0.24);
}

.route-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    width: min(290px, calc(100vw - 32px));
    max-height: var(--route-panel-max-height, calc(100vh - 276px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(41, 56, 48, 0.18);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(25, 34, 30, 0.22);
    backdrop-filter: blur(10px);
}

.route-panel.panel-expanded {
    width: min(360px, calc(100vw - 32px));
    height: var(--route-panel-max-height, calc(100vh - 276px));
}

.route-panel[hidden] {
    display: none;
}

.route-panel-restore-control[hidden] {
    display: none;
}

.route-panel-restore-control a.route-panel-restore {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-control-icon-color);
    font-size: 13px;
    line-height: 1;
}

.route-panel-restore[hidden] {
    display: none;
}

.route-panel-restore-control a.route-panel-restore:hover,
.route-panel-restore-control a.route-panel-restore:focus-visible {
    background: #f4f4f4;
    color: var(--map-control-icon-color);
}

.elevation-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 700;
    height: 96px;
    min-height: 96px;
    max-height: min(48vh, 360px);
    padding: 7px 10px 5px;
    border: 1px solid rgba(37, 52, 44, 0.14);
    border-radius: 8px;
    background: rgba(250, 252, 249, 0.92);
    box-shadow: 0 8px 22px rgba(25, 34, 30, 0.14);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.elevation-resize-handle {
    position: absolute;
    left: 50%;
    top: 0;
    width: 54px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 8px;
    cursor: ns-resize;
    touch-action: none;
}

.elevation-resize-handle::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 5px;
    height: 3px;
    border-radius: 999px;
    background: rgba(29, 43, 36, 0.24);
}

.elevation-resize-handle:hover::before {
    background: rgba(15, 118, 110, 0.62);
}

.elevation-meta {
    position: absolute;
    top: 9px;
    right: 12px;
    left: 70px;
    z-index: 2;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #526158;
    font-size: 0.74rem;
    line-height: 1;
    pointer-events: none;
}

.elevation-meta > span:first-child {
    flex: 0 1 auto;
    min-width: max-content;
    color: #1d2b24;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.elevation-meta > span:last-child {
    flex: 1;
    max-width: none;
    min-width: 0;
    text-align: right;
}

.elevation-stat {
    display: inline-block;
    margin-left: 7px;
    white-space: nowrap;
}

.elevation-stat:first-child {
    margin-left: 0;
}

.elevation-stat-label {
    color: #6f7c74;
    font-weight: 520;
}

.elevation-stat-value {
    color: #24332b;
    font-weight: 760;
}

#elevation-chart {
    display: block;
    width: 100%;
    min-height: 70px;
    flex: 1;
    margin-top: 0;
    overflow: hidden;
}

.elevation-axis {
    stroke: rgba(29, 43, 36, 0.36);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.elevation-grid {
    stroke: rgba(29, 43, 36, 0.1);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.elevation-x-label,
.elevation-y-label {
    fill: #66746b;
    font-size: 10px;
    font-weight: 650;
    paint-order: stroke;
    stroke: rgba(250, 252, 249, 0.94);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.elevation-x-label {
    text-anchor: middle;
}

.elevation-y-label {
    text-anchor: end;
}

.elevation-fill {
    fill: rgba(122, 134, 128, 0.12);
    stroke: none;
}

.elevation-line {
    fill: none;
    stroke: #7a8680;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.elevation-line-route {
    stroke: #7a8680;
}

.elevation-option-axis-segment {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.elevation-option-profile-line {
    fill: none;
    stroke: #7a8680;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.elevation-option-label {
    fill: #1d2b24;
    font-size: 11px;
    font-weight: 850;
    text-anchor: middle;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 3;
    stroke-linejoin: round;
}

.elevation-line-moderate {
    stroke: #eab308;
}

.elevation-line-hard {
    stroke: #f97316;
}

.elevation-line-steep {
    stroke: #ef4444;
    stroke-width: 2.9;
}

.elevation-line-extreme {
    stroke: #991b1b;
    stroke-width: 3.1;
}

.elevation-match-line {
    stroke: rgba(255, 0, 204, 0.62);
    stroke-width: 1.6;
    stroke-dasharray: 4 5;
    vector-effect: non-scaling-stroke;
}

.elevation-match-dot {
    fill: #ff00cc;
    stroke: #fff;
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
}

.elevation-hover-line {
    stroke: rgba(0, 119, 255, 0.7);
    stroke-width: 1.6;
    vector-effect: non-scaling-stroke;
}

.elevation-hover-dot {
    fill: #0077ff;
    stroke: #fff;
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
}

.elevation-hover-label {
    fill: #1d2b24;
    font-size: 12px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 3;
    stroke-linejoin: round;
}

.elevation-hover-line.elevation-photo-marker {
    stroke: rgba(15, 118, 110, 0.78);
    stroke-width: 2;
}

.elevation-photo-halo {
    fill: rgba(15, 118, 110, 0.16);
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.elevation-hover-dot.elevation-photo-marker {
    fill: #0f766e;
    stroke: #fff;
    stroke-width: 2.8;
}

.elevation-hover-label.elevation-photo-marker {
    fill: #0f3f35;
}

.elevation-hit-area {
    fill: transparent;
    cursor: crosshair;
    pointer-events: all;
}

.head-stack-marker {
    background: transparent;
    border: 0;
    z-index: 650;
}

.status-hover-target {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.head-stack {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: saturate(var(--head-saturation, 100%)) drop-shadow(0 4px 7px rgba(0, 0, 0, 0.32));
    transform: scale(var(--map-marker-scale, 1));
    transform-origin: bottom center;
}

.head-stack img {
    width: 36px;
    height: 50px;
    object-fit: contain;
    margin-left: -12px;
    pointer-events: none;
}

.head-stack img:first-child {
    margin-left: 0;
}

.head-stack-marker.historical .head-stack {
    filter: saturate(var(--head-saturation, 75%)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.24));
    opacity: 0.86;
}

.head-stack-marker.historical .head-stack img {
    width: 24px;
    height: 34px;
    margin-left: -8px;
}

.waypoint-scale-marker {
    background: transparent;
    border: 0;
}

.waypoint-pin {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    font-size: 13px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.26));
    transform: scale(var(--map-marker-scale, 1));
    transform-origin: bottom center;
}

.waypoint-pin::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: #3b82f6;
}

.waypoint-pin i {
    position: relative;
    z-index: 1;
}

.waypoint-pin-green::before {
    background: #15803d;
}

.waypoint-pin-blue::before {
    background: #2563eb;
}

.waypoint-pin-cadetblue::before {
    background: #0f766e;
}

.waypoint-pin-slate::before {
    background: #475569;
}

.waypoint-pin-orange::before {
    background: #FF8904;
}

.waypoint-pin-red::before {
    background: #dc2626;
}

.route-option-line {
    filter: drop-shadow(0 1px 2px rgba(23, 33, 29, 0.28));
}

.route-option-marker {
    background: transparent;
    border: 0;
}

.route-option-pin {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    background: var(--route-option-color, #4b5563);
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 9px rgba(23, 33, 29, 0.28);
    transform: scale(var(--map-marker-scale, 1));
}

.route-option-marker.selected .route-option-pin {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.88), 0 4px 12px rgba(23, 33, 29, 0.34);
}

.route-endpoint-marker {
    background: transparent;
    border: 0;
}

.route-endpoint-pin {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    background: var(--route-endpoint-color, #4b5563);
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 9px rgba(23, 33, 29, 0.28);
    transform: scale(var(--map-marker-scale, 1));
}

.photo-map-marker,
.photo-cluster-map-marker,
.photo-thumbnail-map-marker {
    background: transparent;
    border: 0;
}

.photo-map-pin {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(23, 33, 29, 0.32);
    transform: scale(var(--map-marker-scale, 1));
}

.photo-cluster-pin {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 5px 14px rgba(23, 33, 29, 0.34);
    transform: scale(var(--map-marker-scale, 1));
}

.photo-cluster-pin b {
    min-width: 18px;
    height: 18px;
    position: absolute;
    top: -8px;
    right: -9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(23, 33, 29, 0.26);
    box-sizing: border-box;
}

.photo-map-thumb {
    width: var(--photo-thumb-width);
    height: var(--photo-thumb-height);
}

.photo-map-thumb {
    display: block;
    border: 0;
    border-radius: 7px;
    background: transparent;
    box-shadow: 0 5px 14px rgba(23, 33, 29, 0.36);
    box-sizing: border-box;
    overflow: hidden;
}

.photo-map-thumb img {
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    display: block;
    margin: -2px;
    object-fit: cover;
}

.photo-modal[hidden] {
    display: none;
}

.photo-modal {
    --photo-modal-bottom-clearance: clamp(128px, 24vh, 260px);
    --photo-modal-top-gap: 12px;
    --photo-carousel-space: 82px;
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: start center;
    padding: var(--photo-modal-top-gap) 12px var(--photo-modal-bottom-clearance);
}

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 13, 16, 0.58);
    backdrop-filter: blur(1px);
}

.photo-modal-panel {
    width: min(96vw, 1800px);
    height: calc(100vh - var(--photo-modal-bottom-clearance) - var(--photo-modal-top-gap));
    max-height: calc(100vh - var(--photo-modal-bottom-clearance) - var(--photo-modal-top-gap));
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0;
    padding-bottom: var(--photo-carousel-space);
    box-sizing: border-box;
}

.photo-modal-close {
    width: 38px;
    height: 38px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    background: rgba(12, 18, 22, 0.58);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

.photo-modal-close:hover,
.photo-modal-close:focus-visible {
    background: rgba(12, 18, 22, 0.82);
}

.photo-modal-nav {
    width: 46px;
    height: 56px;
    position: absolute;
    top: min(44%, calc(50vh - 50px));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(12, 18, 22, 0.5);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
}

.photo-modal-nav:hover,
.photo-modal-nav:focus-visible {
    background: rgba(12, 18, 22, 0.82);
}

.photo-modal-nav:disabled {
    display: none;
}

.photo-modal-prev {
    left: 8px;
}

.photo-modal-next {
    right: 8px;
}

.photo-modal-image {
    width: auto;
    max-width: min(96vw, 1800px);
    max-height: 100%;
    justify-self: center;
    align-self: center;
    border-radius: 6px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
    touch-action: pan-y;
}

.photo-modal-caption {
    display: grid;
    gap: 3px;
    justify-self: center;
    max-width: min(820px, 100%);
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.56);
}

.photo-modal-caption strong {
    font-size: 0.96rem;
    line-height: 1.2;
}

.photo-modal-caption span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.photo-modal-carousel {
    position: fixed;
    bottom: var(--photo-modal-bottom-clearance);
    right: 12px;
    left: 12px;
    z-index: 2;
    max-width: 100%;
    display: flex;
    gap: 8px;
    padding: 6px 2px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.photo-carousel-thumb {
    width: var(--photo-carousel-thumb-width, 66px);
    height: var(--photo-carousel-thumb-height, 58px);
    flex: 0 0 auto;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.64;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.photo-carousel-thumb:hover,
.photo-carousel-thumb:focus-visible {
    border-color: rgba(255, 255, 255, 0.72);
    opacity: 1;
}

.photo-carousel-thumb.active {
    border-color: #fff;
    opacity: 1;
    box-shadow: 0 0 0 2px #fff;
}

.photo-carousel-thumb img {
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    display: block;
    margin: -2px;
    object-fit: cover;
}

.map-distance-scale {
    margin-left: 10px !important;
    margin-bottom: 4px !important;
    color: rgba(23, 33, 29, 0.94);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.map-distance-scale span {
    width: var(--scale-width, 54px);
    height: 6px;
    display: block;
    position: relative;
    border-right: 2px solid rgba(23, 33, 29, 0.82);
    border-bottom: 2px solid rgba(23, 33, 29, 0.82);
    border-left: 2px solid rgba(23, 33, 29, 0.82);
    background: rgba(255, 255, 255, 0.78);
    box-sizing: border-box;
    white-space: nowrap;
}

.map-distance-scale span::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 5px);
    top: -3px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
}

.route-fit-controls .route-fit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-control-icon-color);
    font-size: 13px;
    line-height: 1;
}

.route-fit-controls .route-fit-button:hover,
.route-fit-controls .route-fit-button:focus-visible {
    color: var(--map-control-icon-color);
}

.route-fit-controls [data-route-fit="route"] i {
    font-size: 17px;
    font-weight: 900;
}

.route-fit-button.leaflet-disabled {
    display: none;
}

.route-fit-button[data-route-fit="route"]:has(+ .route-fit-button[hidden]) {
    border-bottom: 0;
    border-radius: 0 0 2px 2px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 4px;
}

.panel-minimize-button {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: -2px;
    border: 1px solid rgba(41, 56, 48, 0.16);
    border-radius: 6px;
    background: #f8fbf9;
    color: #405049;
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1;
}

.panel-minimize-button:hover,
.panel-minimize-button:focus-visible {
    border-color: rgba(47, 58, 53, 0.34);
    background: #ecefed;
    color: #2f3a35;
}

.panel-header > div:first-child {
    min-width: 0;
}

.panel-kicker {
    margin: 0 0 1px;
    color: #5c6f66;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.panel-header h1 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.latest-update-summary {
    padding: 6px 10px 8px;
}

.latest-update-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid rgba(255, 0, 204, 0.36);
    border-radius: 6px;
    background: rgba(255, 0, 204, 0.08);
    color: #1f2d27;
    cursor: pointer;
    text-align: left;
}

.latest-update-card:hover,
.latest-update-card:focus-visible {
    border-color: rgba(255, 0, 204, 0.58);
    background: rgba(255, 0, 204, 0.12);
}

.latest-update-empty {
    margin: 0;
    padding: 8px 9px;
    border: 1px solid rgba(41, 56, 48, 0.12);
    border-radius: 6px;
    background: #f8fbf9;
    color: #68756e;
    font-size: 0.78rem;
    line-height: 1.35;
}

.latest-update-empty span {
    display: block;
    margin-bottom: 2px;
    color: #1d2b24;
    font-weight: 800;
}

.panel-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 10px 10px;
}

.panel-tab {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(41, 56, 48, 0.16);
    border-radius: 6px;
    background: #f8fbf9;
    color: #405049;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.panel-tab-wide {
    grid-column: 1 / -1;
}

.panel-tab:hover,
.panel-tab:focus-visible {
    border-color: rgba(47, 58, 53, 0.34);
    background: #ecefed;
    color: #2f3a35;
}

.panel-tab.active {
    border-color: #2f3a35;
    background: #2f3a35;
    color: #fff;
}

.panel-tab.active::after {
    content: "\f077";
    font: var(--fa-font-solid);
    font-size: 0.7rem;
}

.panel-view {
    border-top: 1px solid rgba(41, 56, 48, 0.1);
}

.panel-view:not([hidden]) {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.latest-updates-panel {
    min-height: 0;
    overflow: hidden;
}

.route-about-shell,
.other-routes-shell {
    min-height: 0;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px 6px;
}

.section-header.compact {
    padding-bottom: 2px;
}

.section-header h2 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
    color: #1d2b24;
}

.latest-updates {
    flex: 1;
    min-height: 0;
    list-style: none;
    margin: 0;
    padding: 0 12px 8px;
    display: grid;
    align-content: start;
    gap: 6px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.update-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(41, 56, 48, 0.12);
    border-radius: 6px;
    background: #ffffff;
    color: #1f2d27;
    cursor: pointer;
    text-align: left;
}

.update-item-featured {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 10px 12px;
    border-color: rgba(15, 118, 110, 0.36);
    background: #eef7f2;
}

.update-item:hover,
.update-item:focus-visible {
    border-color: rgba(0, 119, 255, 0.44);
    background: rgba(0, 119, 255, 0.08);
}

.update-kind-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border-radius: 50%;
    background: rgba(70, 82, 76, 0.1);
    color: #6f5f46;
    font-size: 9px;
}

.update-kind-icon.weather-update {
    color: #557482;
}

.update-kind-icon.camp-update {
    color: #28705c;
}

.update-kind-icon.fire-update {
    color: #b5472d;
}

.update-item:hover .update-kind-icon,
.update-item:focus-visible .update-kind-icon {
    background: rgba(0, 119, 255, 0.14);
}

.update-heads {
    width: 50px;
    min-height: 46px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.update-heads.compact {
    width: 38px;
    min-height: 34px;
}

.update-heads img {
    width: 30px;
    height: 40px;
    object-fit: contain;
    object-position: top center;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.22));
}

.update-heads img + img {
    margin-left: -12px;
}

.update-heads.compact img {
    width: 24px;
    height: 32px;
}

.update-heads.compact img + img {
    margin-left: -9px;
}

.update-kicker {
    display: block;
    margin: 0 0 3px;
    color: #5c6f66;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.update-copy {
    min-width: 0;
}

.update-message {
    margin: 0 0 4px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.update-item-featured .update-message {
    font-size: 1rem;
    -webkit-line-clamp: 3;
}

.latest-update-card .update-message {
    margin-bottom: 3px;
    font-size: 0.83rem;
    -webkit-line-clamp: 2;
}

.latest-update-card .update-meta {
    gap: 6px;
    font-size: 0.68rem;
}

.update-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #68756e;
    font-size: 0.72rem;
    font-weight: 650;
}

.update-time,
.update-battery {
    cursor: help;
}

.update-battery.ok {
    color: #0f766e;
}

.update-battery.low {
    color: #b42318;
}

.update-locate {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f766e;
}

.empty-updates {
    margin: 0;
    padding: 4px 4px 8px;
    color: #68756e;
    font-size: 0.86rem;
}

.route-list-shell {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.route-list-shell::before,
.route-list-shell::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 1;
    height: 16px;
    pointer-events: none;
}

.route-list-shell::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.route-list-shell::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.route-list {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 5px;
    padding: 3px 10px 9px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.route-year-divider {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 6px 2px 1px;
    color: #5c6f66;
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1;
}

.route-year-divider:first-child {
    margin-top: 2px;
}

.route-year-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(41, 56, 48, 0.14);
}

.route-tab {
    min-height: 44px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid rgba(41, 56, 48, 0.14);
    border-radius: 6px;
    background: #f9fbf8;
    color: #1f2d27;
    cursor: pointer;
    text-align: left;
}

.route-tab:hover,
.route-tab.active {
    border-color: rgba(25, 99, 84, 0.45);
    background: #eef7f2;
}

.route-swatch {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--route-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

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

.route-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 700;
}

.route-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #687870;
    font-size: 0.66rem;
    line-height: 1;
    font-weight: 650;
}

.route-date {
    color: inherit;
}

.route-temporal-status {
    font-weight: 750;
}

.route-temporal-status-future {
    color: #0f766e;
}

.route-temporal-status-active {
    color: #2563a6;
}

.route-temporal-status-past {
    color: #7a8580;
}

.route-meta > span + span::before {
    content: "·";
    margin-right: 6px;
}

.route-status {
    margin: 0;
    color: #687870;
    font-size: 0.78rem;
    font-weight: 650;
    min-height: 0;
}

.route-description {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 0 16px 14px;
    font-size: 0.92rem;
    line-height: 1.45;
    scrollbar-width: thin;
}

.route-description h1,
.route-description h2,
.route-description h3,
.route-description h4,
.route-description h5,
.route-description h6 {
    line-height: 1.25;
    margin: 12px 0 8px;
}

.route-description h1 {
    font-size: 1.3rem;
}

.route-description h2 {
    font-size: 1.15rem;
}

.route-description h3 {
    font-size: 1.04rem;
}

.route-description h4 {
    font-size: 0.96rem;
}

.route-description h5 {
    font-size: 0.9rem;
}

.route-description h6 {
    font-size: 0.84rem;
}

.route-description p,
.route-description ul,
.route-description ol {
    margin: 0 0 10px;
}

.route-description ul {
    padding-left: 18px;
}

.route-description ol {
    padding-left: 24px;
}

.route-description a {
    color: #0f766e;
    font-weight: 700;
}

.leaflet-tooltip,
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content-wrapper {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(31, 45, 39, 0.14);
    box-shadow: 0 12px 26px rgba(23, 33, 29, 0.22);
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 5px 12px rgba(23, 33, 29, 0.14);
}

.leaflet-popup-tip-container,
.leaflet-tooltip::before {
    display: none;
}

.managed-overlay:not(.overlay-positioned) {
    visibility: hidden;
}

.overlay-leader-halo,
.overlay-leader-line,
.overlay-leader-dot {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.overlay-leader-halo {
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 6;
}

.overlay-leader-line {
    stroke: rgba(23, 33, 29, 0.64);
    stroke-width: 2.2;
}

.overlay-leader-dot {
    fill: rgba(23, 33, 29, 0.72);
    stroke: rgba(255, 255, 255, 0.96);
    stroke-width: 2;
}

.leaflet-popup-content {
    margin: 0;
}

.leaflet-tooltip {
    padding: 0;
    border: 1px solid rgba(31, 45, 39, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(23, 33, 29, 0.18);
}

.leaflet-tooltip .location-popup {
    width: auto;
    min-width: 180px;
    max-width: min(292px, calc(100vw - 64px));
}

.route-overview-tooltip {
    z-index: 710;
}

.leaflet-overlay-pane path.route-overview-hit-line.leaflet-interactive {
    pointer-events: all;
}

.route-overview-hover-popup {
    pointer-events: none;
    transform: translate(-50%, -100%);
}

.debug-waypoint-segment {
    cursor: help;
}

.debug-waypoint-segment-tooltip {
    z-index: 720;
    pointer-events: none;
}

.debug-waypoint-segment-tooltip[hidden] {
    display: none;
}

.debug-waypoint-segment-popup {
    min-width: 230px;
}

.route-overview-popup {
    min-width: 190px;
}

.route-overview-swatch {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: var(--route-overview-color, #6b7280);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 3px rgba(31, 45, 39, 0.18);
}

.waypoint-popup dl {
    padding-top: 4px;
}

.location-popup {
    width: min(292px, calc(100vw - 64px));
    min-width: min(228px, calc(100vw - 64px));
    max-width: calc(100vw - 64px);
    padding: 0;
    color: #1b2821;
}

.location-popup header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(41, 56, 48, 0.1);
    text-transform: capitalize;
    background: rgba(245, 249, 246, 0.88);
}

.location-popup-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
}

.route-option-popup .location-popup-icon {
    background: color-mix(in srgb, var(--route-option-color, #0f766e) 14%, white);
    color: var(--route-option-color, #0f766e);
}

.route-endpoint-popup .location-popup-icon {
    background: color-mix(in srgb, var(--route-endpoint-color, #0f766e) 14%, white);
    color: var(--route-endpoint-color, #0f766e);
}

.location-popup header strong {
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.location-popup p {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.91rem;
    line-height: 1.4;
    white-space: pre-wrap;
    border-bottom: 1px solid rgba(41, 56, 48, 0.08);
}

.location-popup dl {
    margin: 0;
    display: grid;
    gap: 0;
    padding: 6px 12px 10px;
}

.location-popup dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    padding: 4px 0;
}

.location-popup span {
    color: #68756e;
    font-size: 0.72rem;
    font-weight: 650;
}

.location-popup strong {
    min-width: 0;
    color: #1d2b24;
    font-size: 0.78rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.update-popup .update-popup-message {
    display: grid;
    gap: 2px;
    padding: 8px 10px 6px;
    white-space: normal;
}

.update-popup .update-popup-message strong {
    display: block;
    color: #1d2b24;
    font-size: 0.91rem;
    font-weight: 820;
    line-height: 1.4;
    text-align: left;
}

.update-popup .popup-value {
    color: #1d2b24;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: right;
}

.update-popup .popup-subvalue {
    display: block;
    margin-top: 2px;
    color: inherit;
    font-size: 0.72rem;
    font-weight: inherit;
}

.update-popup-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
    color: #5b6470;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.update-popup-type i {
    width: 12px;
    color: #6b756e;
    font-size: 0.68rem;
    text-align: center;
}

.status-update .update-popup-type i {
    color: #6f5f46;
}

.location-update .update-popup-type i {
    color: #596879;
}

.weather-update .update-popup-type i,
.weather-popup .update-popup-type i {
    color: #557482;
}

.camp-update .update-popup-type i {
    color: #28705c;
}

.fire-update .update-popup-type i {
    color: #b5472d;
}

.weather-popup {
    width: min(320px, calc(100vw - 64px));
}

.weather-popup .update-popup-message strong {
    font-size: 0.86rem;
    line-height: 1.25;
}

.weather-block {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(41, 56, 48, 0.08);
}

.weather-block h4 {
    margin: 0 0 3px;
    color: #1d2b24;
    font-size: 0.78rem;
    line-height: 1.18;
}

.weather-block .weather-metadata,
.weather-block .weather-empty {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    color: #68756e;
    font-size: 0.68rem;
    line-height: 1.25;
}

.weather-items,
.weather-days,
.weather-days ul {
    margin: 0;
    padding-left: 14px;
}

.weather-items li,
.weather-days li {
    margin: 2px 0;
    color: #26342d;
    font-size: 0.72rem;
    line-height: 1.25;
}

.weather-items strong,
.weather-days strong {
    color: #1d2b24;
    font-size: inherit;
    text-align: left;
}

.weather-popup dl {
    padding: 4px 10px 7px;
}

.weather-popup dl div {
    padding: 3px 0;
}

.update-popup .popup-value .update-time {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.location-popup .update-battery.ok {
    color: #0f766e;
}

.location-popup .update-battery.low {
    color: #b42318;
}

#debug-banner {
    box-sizing: border-box;
}

.debug-banner {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 14px;
    background: #1565c0;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(25, 34, 30, 0.18);
}

.debug-banner.replay-banner {
    background: #e65100;
}

.debug-banner-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.debug-banner-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.debug-banner button,
.debug-banner input {
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font: inherit;
}

.debug-banner button {
    padding: 0 9px;
    cursor: pointer;
}

.debug-banner button:disabled {
    opacity: 0.48;
    cursor: default;
}

.debug-banner button:not(:disabled):hover,
.debug-banner input:focus {
    background: rgba(255, 255, 255, 0.24);
}

.replay-interval-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.replay-interval-control input {
    width: 58px;
    padding: 0 5px;
}

@media (max-width: 700px) {
    .map-legend:hover .map-legend-panel,
    .map-legend:focus-within .map-legend-panel,
    .route-tool:hover > .route-tool-panel,
    .route-tool:focus-within > .route-tool-panel {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-4px);
        visibility: hidden;
    }

    .map-legend.map-legend-mobile-open .map-legend-panel,
    .route-tool.route-tool-mobile-open > .route-tool-panel {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .route-panel {
        top: auto;
        right: 8px;
        bottom: 173px;
        left: 8px;
        width: auto;
        max-height: var(--route-panel-max-height, 46vh);
    }

    .route-panel.panel-expanded {
        width: auto;
    }

    .panel-header {
        padding: 9px 10px 4px;
    }

    .section-header {
        padding: 8px 12px 6px;
    }

    .latest-updates {
        padding: 0 8px 8px;
    }

    .update-item-featured {
        grid-template-columns: auto 1fr;
    }

    .update-heads {
        width: 42px;
    }

    .update-locate {
        display: none;
    }

    .route-list {
        grid-template-columns: 1fr;
        padding: 0 7px 7px;
    }

    .route-tab {
        min-height: 34px;
        padding: 5px 7px;
    }

    .route-meta {
        font-size: 0.64rem;
    }

    .route-label {
        font-size: 0.78rem;
    }

    .route-description {
        padding: 12px;
    }

    .elevation-panel {
        left: 8px;
        right: 8px;
        bottom: 8px;
        height: 92px;
        min-height: 92px;
        padding: 6px 4px 4px 8px;
    }

    .elevation-meta {
        top: 9px;
        right: 6px;
        left: 60px;
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        padding-right: 0;
        font-size: 0.66rem;
    }

    .elevation-meta > span:last-child {
        max-width: none;
        text-align: left;
    }

    .elevation-stat {
        margin-left: 0;
        margin-right: 8px;
    }

    .photo-modal {
        --photo-modal-bottom-clearance: 126px;
        --photo-modal-top-gap: 6px;
        --photo-carousel-space: 62px;
        padding: var(--photo-modal-top-gap) 6px 6px;
        padding-bottom: var(--photo-modal-bottom-clearance);
    }

    .photo-modal-panel {
        max-height: 98vh;
        grid-template-rows: minmax(0, 1fr) auto auto;
        padding-bottom: 0;
    }

    .photo-modal-image {
        min-width: 0;
        min-height: 0;
        max-width: calc(100vw - 12px);
        max-height: 100%;
        object-fit: contain;
    }

    .photo-modal-carousel {
        width: 100%;
        min-width: 0;
        position: static;
        box-sizing: border-box;
    }

    .photo-modal-close {
        top: 8px;
        right: 8px;
    }

    .photo-modal-nav {
        width: 38px;
        height: 48px;
        font-size: 18px;
    }

    .photo-carousel-thumb {
        width: var(--photo-carousel-thumb-width, 52px);
        height: var(--photo-carousel-thumb-height, 42px);
    }
}
