.map-page {
    min-height: calc(100vh - 73px);
    display: grid;
    grid-template-rows: minmax(520px, 72vh) auto;
    background: #0a0a0a;
}

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 480px;
    border-top: 1px solid #27272a;
    border-bottom: 1px solid #27272a;
}

.cluster-panel {
    background: #18181b;
    border-top: 1px solid #27272a;
    padding: 14px 20px 18px;
    max-height: none;
    overflow: visible;
}

.cluster-panel.hidden {
    display: none;
}

.cluster-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cluster-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fafafa;
}

.cluster-count {
    font-size: 0.875rem;
    color: #a1a1aa;
}

.cluster-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    max-height: none;
    overflow: visible;
    padding-right: 2px;
}

.photo-card {
    border: 1px solid #27272a;
    border-radius: 10px;
    overflow: hidden;
    background: #0a0a0a;
    cursor: pointer;
}

.photo-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #18181b;
}

.marker-cluster,
.marker-cluster div {
    border-radius: 999px;
}

.marker-cluster-custom,
.marker-cluster-custom div,
.marker-cluster-custom span {
    border-radius: 50% !important;
}

.cluster-icon {
    color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.cluster-size-sm {
    background: #2563eb;
}

.cluster-size-md {
    background: #1d4ed8;
}

.cluster-size-lg {
    background: #1e40af;
}

.map-media-viewer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-media-viewer.hidden {
    display: none;
}

.map-media-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
}

.map-media-viewer-content {
    position: relative;
    z-index: 1;
    width: min(92vw, 1400px);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-media-viewer-image {
    max-width: 100%;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
}

.map-media-viewer-close {
    position: absolute;
    top: -42px;
    right: 0;
    background: transparent;
    border: none;
    color: #fafafa;
    cursor: pointer;
    padding: 6px;
}

.map-media-viewer-close:hover {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .map-page {
        min-height: calc(100vh - 65px);
        grid-template-rows: minmax(440px, 62vh) auto;
    }

    .cluster-panel {
        padding: 12px;
    }

    .cluster-photos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .photo-thumb {
        height: 120px;
    }

    .map-media-viewer-content {
        width: 96vw;
    }
}
