.map-page {
    color: #1e293b;
    line-height: 1.6;
    max-width: 1200px;
}

.map-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin: 32px 0 20px 0;
}
.map-heading:first-child { margin-top: 0; }

.map-upload {
    max-width: 100%;
    padding: 24px;
    border: 1px solid #e9eef2;
    margin-bottom: 24px;
    background: #ffffff;
    box-sizing: border-box;
    border-radius: 2px;
}
.map-upload label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}
.map-upload input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #e9eef2;
    box-sizing: border-box;
    font-size: 0.95rem;
    color: #1e293b;
    background: #ffffff;
    border-radius: 2px;
}
.map-upload input[type="file"]:focus {
    border-color: #004EA6;
    outline: none;
}
.map-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.map-btn {
    background: #004EA6;
    color: #ffffff;
    padding: 0 24px;
    height: 44px;
    line-height: 42px;
    border: 1px solid #004EA6;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
    display: inline-block;
    border-radius: 2px;
    text-decoration: none;
}
.map-btn:hover {
    background: #003d82;
    border-color: #003d82;
    color: #ffffff;
}
.map-btn--outline {
    background: #ffffff;
    color: #004EA6;
    border: 1px solid #004EA6;
}
.map-btn--outline:hover {
    background: #f8fafc;
    color: #003d82;
}

.map-alert-success {
    color: #0f172a;
    background: #f1f5f9;
    border-left: 4px solid #004EA6;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    border-radius: 2px;
}
.map-alert-error {
    color: #0f172a;
    background: #fdf2f4;
    border-left: 4px solid #c93a4b;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    border-radius: 2px;
}

.map-layers {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 2px;
    font-size: 0.9rem;
}
.map-layers__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #1e293b;
}
.map-layers__item input[type="radio"] {
    accent-color: #004EA6;
    margin: 0;
    cursor: pointer;
}

.map-legend {
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.map-legend__marker {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-sizing: border-box;
}
.map-legend__marker--yes { background: #10b981; }
.map-legend__marker--no { background: #ef4444; }
.map-legend__marker--unknown { background: #64748b; }

.map-wrapper { position: relative; }

#map {
    width: 100%;
    height: 700px;
    background: #ffffff;
    z-index: 1;
}

.map-zoom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    background: #004EA6;
    border: 1px solid #004EA6;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
}
.map-zoom-btn {
    width: 36px;
    height: 36px;
    background: #004EA6;
    color: #ffffff;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 36px;
    text-align: center;
    font-family: inherit;
    padding: 0;
    transition: background 0.15s ease;
}
.map-zoom-btn:last-child { border-bottom: none; }
.map-zoom-btn:hover { background: #003d82; }

.map-status {
    margin-top: 16px;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    display: none;
    color: #1e293b;
}
.map-status.visible { display: block; }
.map-status__row { margin-bottom: 6px; }
.map-status__row:last-child { margin-bottom: 0; }
.map-status__link {
    color: #004EA6;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}
.map-status__missing {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9eef2;
    font-family: monospace;
    font-size: 0.85rem;
}
.map-status__missing.visible { display: block; }

.route-marker-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.route-marker {
    width: var(--marker-size, 28px);
    height: var(--marker-size, 28px);
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: var(--marker-font, 13px);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-sizing: border-box;
    font-family: inherit;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    transition: width 0.15s ease, height 0.15s ease, font-size 0.15s ease;
}

.route-label-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.route-label {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 5px;
    border: 1px solid #004EA6;
    border-radius: 2px;
    white-space: nowrap;
    text-align: center;
    line-height: 14px;
    display: inline-block;
    box-shadow: none !important;
}

.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.leaflet-marker-icon {
    box-shadow: none !important;
    filter: none !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 2px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
    padding: 0 !important;
    font-family: inherit;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1e293b;
    width: auto !important;
}
.leaflet-popup-tip {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
}
.leaflet-popup-close-button {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    top: 6px !important;
    right: 6px !important;
    color: #94a3b8 !important;
    background: transparent !important;
    font-size: 18px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    transition: color 0.15s ease;
}
.leaflet-popup-close-button:hover {
    background: transparent !important;
    color: #0f172a !important;
}

.map-popup {
    padding: 12px 16px;
    background: #ffffff;
    width: 300px;
    box-sizing: border-box;
}
.map-popup__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    padding-right: 20px;
    line-height: 1.3;
}
.map-popup__row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 4px 10px;
    padding: 3px 0;
    font-size: 0.85rem;
    align-items: baseline;
}
.map-popup__label {
    color: #64748b;
    line-height: 1.35;
}
.map-popup__value {
    color: #0f172a;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}
.map-popup__note {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #e9eef2;
    font-size: 0.75rem;
    color: #94a3b8;
}
.map-popup__list {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #e9eef2;
    max-height: 260px;
    overflow-y: auto;
}
.map-popup__list .map-popup__row {
    grid-template-columns: 22px 1fr;
}

.map-popup-region .leaflet-popup-content-wrapper {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
}
.map-popup-region .leaflet-popup-content {
    padding: 8px 14px !important;
}
.map-popup--region {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    padding: 0;
    white-space: nowrap;
}

.week-status {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #1e293b;
    display: none;
}
.week-status.visible { display: block; }

.download-block {
    margin-top: 16px;
}
.download-link {
    display: inline-block;
    padding: 12px 20px;
    background: #ffffff;
    color: #004EA6;
    border: 1px solid #004EA6;
    border-radius: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}
.download-link:hover {
    background: #f8fafc;
    color: #003d82;
}