/* === Stations Map — Modern Kinetic Design === */
:root {
    --map-accent: #2563eb;
    --map-accent-hover: #1d4ed8;
    --map-success: #10b981;
    --map-warning: #f59e0b;
    --map-danger: #ef4444;
    --map-info: #0ea5e9;
    --map-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --map-shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.smap-page { width:100%; max-width:100%; margin:0 auto; padding:0 0 3rem; }

.smap-context {
    margin: 1rem 0 1rem;
    background: var(--surf,#fff);
    border: 1px solid var(--brd,#e2e8f0);
    border-radius: 16px;
    padding: 18px;
    color: var(--txt-2,#475569);
    line-height: 1.7;
    box-shadow: 0 4px 18px rgba(15,23,42,.04);
}
.smap-context h2 {
    margin: 0 0 8px;
    color: var(--txt,#0f172a);
    font-size: 1.05rem;
    font-weight: 800;
}
.smap-context p {
    margin: 0 0 10px;
    font-size: .9rem;
}
.smap-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.smap-context-item {
    background: var(--surf2,#f8fafc);
    border: 1px solid var(--brd,#e2e8f0);
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}
.smap-context-item strong {
    display: block;
    color: var(--txt,#0f172a);
    font-size: .86rem;
    margin-bottom: 4px;
}
.smap-context-item span {
    display: block;
    font-size: .8rem;
    line-height: 1.55;
    color: var(--txt-2,#64748b);
}
[data-theme="dark"] .smap-context {
    background: var(--surf,#111f3a);
    border-color: var(--brd,rgba(255,255,255,.08));
}
[data-theme="dark"] .smap-context-item {
    background: var(--surf2,#172542);
    border-color: var(--brd,rgba(255,255,255,.08));
}

.smap-page button,
.smap-page input,
.smap-page iframe {
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    background-clip: padding-box;
}

.smap-page button,
.smap-page input {
    -webkit-tap-highlight-color: transparent;
}

/* Hero — Compact & Modern */
.smap-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding: 1rem 0 1.25rem;
    border-bottom: 1px solid var(--brd);
    margin-bottom: 1rem;
}

.smap-title {
    font-family: 'Manrope', 'Inter', system-ui, sans-serif;
    font-size: clamp(1.5rem, 4vw, 1.90rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--map-accent), var(--map-info));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    flex: 1 1 100%;
    letter-spacing: -0.02em;
}

.smap-title i {
    -webkit-text-fill-color: initial;
    color: var(--map-accent);
    margin-right: 0.5rem;
}

.smap-sub {
    font-size: 0.9rem;
    color: var(--txt-2);
    margin: 0;
    flex: 1;
    font-weight: 500;
}

.smap-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    margin-left: auto;
}

.smap-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--surf2);
    border: 1px solid var(--brd);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--txt);
    transition: all 0.2s ease;
    cursor: default;
    box-shadow: var(--map-shadow);
}

.smap-pill:hover {
    transform: translateY(-1px);
    border-color: var(--map-accent);
    background: var(--surf);
}

.smap-pill i {
    color: var(--map-accent);
    font-size: 0.8rem;
}

/* Provider Tabs — Pill Style */
.smap-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--surf2);
    border-radius: 12px;
    border: 1px solid var(--brd);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.smap-tabs::-webkit-scrollbar { display: none; }

.smap-tab-lbl {
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--txt-3);
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.smap-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--surf);
    color: var(--txt-2);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 42px;
    box-shadow: var(--map-shadow);
}

.smap-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--map-accent), var(--map-info));
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 0;
}

.smap-tab:hover {
    color: var(--map-accent);
    border-color: rgba(37,99,235,.28);
    transform: translateY(-1px);
}

.smap-tab.act {
    color: #fff;
    border-color: transparent;
    box-shadow: var(--map-shadow);
}

.smap-tab.act::before {
    opacity: 1;
}

.smap-tab > * {
    position: relative;
    z-index: 1;
}

.smap-tab .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.smap-tab.act .dot {
    background: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Filter Bar — Accordion Style */
.smap-filter {
    background: var(--surf);
    border: 1px solid var(--brd);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
    animation: slideDown 0.3s ease;
    box-shadow: var(--map-shadow);
}

.smap-filter.act {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.smap-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--brd);
}

.smap-filter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.smap-filter-grp {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.smap-filter-grp:last-child {
    margin-bottom: 0;
}

.smap-filter-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--txt-2);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.smap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.72rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--brd);
    background: var(--surf2);
    color: var(--txt-2);
    transition: all 0.15s ease;
    user-select: none;
    min-height: 38px;
}

.smap-chip:hover {
    border-color: var(--map-accent);
    color: var(--map-accent);
    transform: translateY(-1px);
}

.smap-chip.act {
    background: var(--map-accent);
    color: #fff;
    border-color: var(--map-accent);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.smap-chip i {
    font-size: 0.7rem;
}

.smap-inp {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    border: 2px solid var(--brd);
    background: var(--surf2);
    color: var(--txt);
    font-size: 0.8rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 120px;
    min-height: 42px;
}

.smap-inp:focus {
    border-color: var(--map-accent);
    background: var(--surf);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.smap-inp::placeholder {
    color: var(--txt-3);
}

.smap-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--map-accent);
    color: #fff;
    border: none;
    transition: all 0.2s;
    box-shadow: var(--map-shadow);
    min-height: 42px;
    justify-content: center;
}

.smap-btn:hover {
    background: var(--map-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--map-shadow-lg);
}

.smap-btn:active {
    transform: translateY(0);
}

.smap-btn-ghost {
    background: var(--surf2);
    color: var(--txt-2);
    border: 2px solid var(--brd);
}

.smap-btn-ghost:hover {
    background: var(--map-accent);
    color: #fff;
    border-color: var(--map-accent);
}

.smap-btn-success {
    background: var(--map-success);
}

.smap-btn-success:hover {
    background: #059669;
}

.smap-note {
    font-size: 0.7rem;
    color: var(--txt-3);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

/* Map Card — Elevated Design */
.smap-card {
    background: var(--surf);
    border: 1px solid var(--brd);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--map-shadow-lg);
    transition: all 0.3s ease;
}

.smap-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

/* Toolbar */
.smap-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(to right, var(--surf2), var(--surf));
    border-bottom: 1px solid var(--brd);
}

.smap-toolbar-l {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--txt);
}

.smap-toolbar-r {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.smap-tbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--brd);
    background: var(--surf);
    color: var(--txt);
    transition: all 0.2s;
    min-height: 40px;
}

.smap-tbtn:hover {
    background: var(--map-accent);
    color: #fff;
    border-color: var(--map-accent);
    transform: translateY(-1px);
}

.smap-tbtn-p {
    background: var(--map-accent);
    color: #fff;
    border-color: var(--map-accent);
}

.smap-tbtn-p:hover {
    background: var(--map-accent-hover);
}

/* Live Badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16,185,129,0.15);
    color: var(--map-success);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid rgba(16,185,129,0.3);
}

html[data-theme="dark"] .live-badge {
    background: rgba(16,185,129,0.2);
    color: #34d399;
}

.ldot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--map-success);
    animation: livePulse 2s infinite;
    box-shadow: 0 0 0 rgba(16,185,129,0.4);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

/* Provider Info */
#pvName {
    font-weight: 700;
    color: var(--txt);
}

#pvDesc {
    color: var(--txt-3);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Iframe Container */
.smap-wrap {
    position: relative;
    width: 100%;
    height: 70vh;
    height: 70svh;
    min-height: 500px;
    background: var(--surf2);
}

@media (max-width: 1024px) {
    .smap-wrap { height: 65vh; min-height: 450px; }
    .smap-hero {
        align-items: flex-start;
    }
    .smap-pills {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .smap-wrap { height: 60vh; min-height: 400px; }
    .smap-context-grid { grid-template-columns: 1fr; }
    .smap-toolbar { padding: 0.6rem 1rem; }
    .smap-toolbar-l,
    .smap-toolbar-r {
        width: 100%;
    }
    .smap-toolbar-r {
        justify-content: stretch;
    }
    .smap-tbtn {
        flex: 1 1 calc(33.333% - 0.5rem);
        justify-content: center;
    }
    .smap-tbtn span { display: none; }
    .smap-tbtn i { margin: 0; }
}

@media (max-width: 480px) {
    .smap-wrap { height: 55vh; min-height: 350px; }
    .smap-hero { flex-direction: column; align-items: flex-start; }
    .smap-pills { margin-left: 0; width: 100%; }
    .smap-pill {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
    }
    .smap-tab-lbl {
        width: 100%;
        padding-bottom: 0;
    }
    .smap-tab {
        min-width: 170px;
    }
}

.smap-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smap-wrap iframe.ev-on {
    display: block;
    opacity: 1;
}

/* Enhanced Spinner */
.smap-spin {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--surf);
    z-index: 20;
    backdrop-filter: blur(4px);
}

.smap-spin.on {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--brd);
    border-top-color: var(--map-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(37,99,235,0.3);
    animation: spin 1.5s linear infinite reverse;
}

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

.smap-spin p {
    font-size: 0.9rem;
    color: var(--txt-2);
    font-weight: 500;
}

.smap-spin-sub {
    font-size: 0.75rem;
    color: var(--txt-3);
    margin-top: -0.5rem;
}

/* Footer Strip */
.smap-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--surf2);
    border-top: 1px solid var(--brd);
    font-size: 0.8rem;
    color: var(--txt-3);
}

.smap-foot a {
    color: var(--map-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.smap-foot a:hover {
    color: var(--map-accent-hover);
    text-decoration: underline;
}

#rdyMsg {
    display: none;
    color: var(--map-success);
    font-weight: 700;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status Legend */
.smap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--surf2);
    border-radius: 12px;
    border: 1px solid var(--brd);
}

.smap-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--txt-2);
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    background: var(--surf);
    border-radius: 20px;
    border: 1px solid var(--brd);
    transition: all 0.2s;
}

.smap-legend-item:hover {
    transform: translateY(-1px);
    border-color: var(--map-accent);
}

.ldot2 {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* External Cards — Modern Grid */
.ext-section {
    margin-top: 2rem;
}

.ext-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--txt);
    border-bottom: 2px solid var(--brd);
    padding-bottom: 0.6rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ext-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ext-card {
    background: var(--surf);
    border: 1px solid var(--brd);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ext-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--map-accent), var(--map-info));
    opacity: 0;
    transition: opacity 0.3s;
}

.ext-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--map-shadow-lg);
    border-color: var(--map-accent);
}

.ext-card:hover::before {
    opacity: 1;
}

.ext-card-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--txt);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ext-card-desc {
    font-size: 0.8rem;
    color: var(--txt-3);
    line-height: 1.5;
    flex: 1;
}

.ext-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: rgba(37,99,235,0.1);
    color: var(--map-accent);
    width: fit-content;
}

.ext-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--map-accent);
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 0.5rem;
    box-shadow: var(--map-shadow);
}

.ext-open:hover {
    background: var(--map-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--map-shadow-lg);
    color: #fff;
}

/* Tip — Alert Style */
.smap-tip {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(14,165,233,0.08));
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--txt-2);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.smap-tip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--map-accent), var(--map-info));
}

.smap-tip i {
    color: var(--map-accent);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Toast Notifications */
.smap-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--surf);
    border: 1px solid var(--brd);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--map-shadow-lg);
    display: none;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    max-width: 400px;
}

.smap-toast.show {
    display: flex;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.smap-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.smap-toast-icon.success { background: rgba(16,185,129,0.15); color: var(--map-success); }
.smap-toast-icon.error { background: rgba(239,68,68,0.15); color: var(--map-danger); }
.smap-toast-icon.info { background: rgba(14,165,233,0.15); color: var(--map-info); }

.smap-toast-content {
    flex: 1;
}

.smap-toast-title {
    font-weight: 700;
    color: var(--txt);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.smap-toast-msg {
    color: var(--txt-3);
    font-size: 0.8rem;
}

/* Fullscreen Mode */
.smap-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    max-width: none !important;
    border-radius: 0 !important;
    height: 100vh !important;
}

.smap-fullscreen .smap-wrap {
    height: calc(100vh - 120px) !important;
}

/* Responsive Improvements */
@media (max-width: 640px) {
    .smap-page {
        padding: 0 0.75rem 2.25rem;
    }

    .smap-tabs,
    .smap-filter,
    .smap-legend,
    .smap-card,
    .smap-tip {
        border-radius: 14px;
    }

    .smap-filter-header,
    .smap-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .smap-filter-grp {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
    }

    .smap-filter-lbl,
    .smap-note {
        grid-column: 1 / -1;
    }

    .smap-chip {
        justify-content: center;
        width: 100%;
    }

    .smap-inp {
        width: 100% !important;
        min-width: unset;
    }

    .smap-btn {
        justify-content: center;
        width: 100%;
    }

    .smap-note {
        margin-left: 0;
    }

    #f-ps .smap-chip {
        font-size: 0.72rem;
    }

    #f-ps .smap-filter-grp:first-of-type .smap-chip,
    #f-gm .smap-filter-grp:nth-of-type(2) .smap-chip {
        min-height: 34px;
        padding: 0.32rem 0.55rem;
    }

    #f-ps .smap-filter-grp:first-of-type {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    #f-ps .smap-filter-grp:first-of-type .smap-filter-lbl {
        margin-bottom: 0.1rem;
    }

    #f-ps .smap-filter-grp:nth-of-type(2),
    #f-ocm .smap-filter-grp:nth-of-type(2),
    #f-gm .smap-filter-grp:nth-of-type(2) {
        grid-template-columns: 1fr 1fr;
    }

    #f-gm .smap-filter-grp:nth-of-type(2) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #f-gm .smap-filter-grp:nth-of-type(2) .smap-btn,
    #f-ps .smap-filter-grp:nth-of-type(2) .smap-btn,
    #f-ocm .smap-filter-grp:nth-of-type(2) .smap-btn {
        grid-column: span 1;
    }

    #f-gm .smap-filter-grp:nth-of-type(2) .smap-chip {
        min-height: 34px;
    }

    .smap-legend {
        gap: 0.5rem;
    }
    
    .smap-legend-item {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .smap-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .ext-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .smap-pill {
        flex-basis: 100%;
    }

    .smap-tbtn {
        flex-basis: 100%;
    }

    .smap-filter-grp,
    #f-ps .smap-filter-grp:first-of-type {
        grid-template-columns: 1fr 1fr;
    }
}

/* Loading Skeleton */
.smap-skeleton {
    background: linear-gradient(90deg, var(--surf2) 25%, var(--surf) 50%, var(--surf2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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


/* Final 2026-05-15 provider label contrast */
.smap-tab-lbl {
    color: var(--txt, #0f172a) !important;
    opacity: 1 !important;
    font-weight: 850 !important;
}
.smap-tab-lbl i {
    color: var(--map-accent, #2563eb) !important;
    opacity: 1 !important;
}
html[data-theme="dark"] .smap-tab-lbl,
[data-theme="dark"] .smap-tab-lbl {
    color: #e2e8f0 !important;
}
