/* ── MAP VIEW ── */
#map-view {
    position: relative;
}

.map-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

/* Stats bar */
#map-stats-bar {
    display: flex;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.map-stat {
    flex: 1;
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--border);
    text-align: center;
}

.map-stat:last-child {
    border-right: none;
}

.map-stat-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.map-stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Map scroll wrapper */
.map-scroll-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    position: relative;
}

#map-container {
    min-width: 960px;
    padding: 1rem;
}

/* Dots */
.map-dot {
    transition: r 0.15s ease;
}

/* Tooltip */
#map-tooltip {
    display: none;
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    max-width: 210px;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.map-tooltip-theme {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.map-tooltip-q {
    font-size: 0.8rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    font-family: 'Playfair Display', serif;
}

.map-tooltip-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.map-tooltip-hint {
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 0.06em;
}

/* Legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.map-legend-title {
    width: 100%;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.map-legend-item:hover {
    color: var(--text);
}

.map-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map-legend-dot.video {
    opacity: 1;
}

.map-legend-dot.audio {
    opacity: 0.7;
}

/* Mobile */
@media (max-width: 768px) {
    #map-stats-bar {
        flex-wrap: wrap;
    }

    .map-stat {
        flex: 1 1 50%;
        border-bottom: 1px solid var(--border);
    }

    .map-stat:nth-child(2) {
        border-right: none;
    }

    .map-stat:nth-child(3),
    .map-stat:nth-child(4) {
        border-bottom: none;
    }

    #map-container {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .map-stat-val {
        font-size: 1.3rem;
    }

    .map-scroll-wrap {
        max-height: 60vh;
    }
}