.map-floating-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}
.map-floating-btn:active {
    transform: scale(0.9);
}
#btn-expand-map {
    right: 68px;
}
#map-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--bg-main);
}
#map-popup-container {
    position: absolute;
    inset: 0;
}
#map-popup-container #map {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}
#btn-close-map-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}
#btn-close-map-popup:active {
    transform: scale(0.9);
}
.map-center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    color: #ef4444;
    font-size: 1.5rem;
    text-shadow: 0 0 4px rgba(255,255,255,0.8);
    opacity: 0.8;
}

/* Sponsored ad card */
.sponsor-ad-card {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18), 0 4px 16px rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.sponsor-ad-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245,158,11,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.sponsor-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(140deg, #bbf7d0 0%, #4ade80 40%, #86efac 70%, #f9a8d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(74,222,128,0.3);
}
.sponsor-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.1));
}
.sponsor-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.sponsor-date-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-left: auto;
    padding-left: 10px;
    min-width: 0;
}
.sponsor-dday {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: -0.3px;
}
.sponsor-dday.ongoing {
    color: #10b981;
}
.sponsor-dlabel {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}
.sponsor-event-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 3px;
    line-height: 1.3;
}
.sponsor-event-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
@keyframes stt-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
    70%  { box-shadow: 0 0 0 18px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── Congestion Heatmap ─────────────────────────── */
.heatmap-wrap {
    width: 100%;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--glass-border);
}
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.heatmap-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 1px;
    display: inline-block;
    flex-shrink: 0;
}
.heatmap-legend-label {
    margin-right: 4px;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: 18px repeat(24, 1fr);
    gap: 1.5px;
}
.hm-hdr {
    font-size: 0.48rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 13px;
    user-select: none;
}
.hm-day {
    font-size: 0.52rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.hm-cell {
    height: 11px;
    border-radius: 2px;
    background: var(--glass-border);
    cursor: default;
}
.hm-loading {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 4px 0;
}
.cat-item {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.cat-item:hover { background: var(--glass); }
.cat-item.active { background: var(--primary); color: white; }
.bike-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0.75rem;
    background: transparent;
    color: #FF6B35;
    border: 1px solid #FF6B35;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
}
.bike-btn.active {
    background: #FF6B35;
    color: #fff;
}
.shop-btn {
    padding: 8px 0.6rem;
    display: flex;
    align-items: center;
    background: transparent;
    color: var(--shop-color, #6366f1);
    border: 1.5px solid var(--shop-color, #6366f1);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
}
.shop-btn.active {
    background: var(--shop-color, #6366f1);
    color: #fff;
}
