* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.35);
    --panel-bg: rgba(10, 10, 10, 0.85);
    --panel-border: rgba(255, 255, 255, 0.18);
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #010101;
    color: #f8fafc;
}

body {
    display: flex;
    flex-direction: column;
}

.brand-chip {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.7rem;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.4);
    background: var(--accent-soft);
    color: #fff5eb;
}

.top-toolbar {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(95%, 1200px);
    padding: 10px 24px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.title-stack h1 {
    font-size: 1rem;
    font-weight: 600;
}

.title-stack p {
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.6);
}

.legend-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(248, 250, 252, 0.15);
    background: rgba(10, 10, 10, 0.6);
}

.legend-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

.map-screen {
    flex: 1;
    padding: 0;
    height: 100vh;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    margin: 0;
    max-width: none;
}

.floating-hint {
    bottom: 20px;
    left: 20px;
    max-width: 280px;
}

.panel-pill {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.6rem;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.collapsible .panel-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, max-height 0.25s ease;
}

.collapsible:hover .panel-body,
.collapsible:focus-within .panel-body {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 10px;
}

.floating-panel {
    position: absolute;
    border-radius: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 12px 16px;
    color: rgba(248, 250, 252, 0.9);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    z-index: 3;
}

.floating-panel.collapsible {
    padding-bottom: 12px;
}

.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(248, 250, 252, 0.7);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    z-index: 1;
    background: rgba(1, 6, 15, 0.85);
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    user-select: none;
    position: relative;
    z-index: 0;
}

.points-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.point-pin {
    position: absolute;
    width: clamp(18px, 2.4vw, 30px);
    height: clamp(18px, 2.4vw, 30px);
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.point-pin::after {
    content: attr(data-label);
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(3, 10, 20, 0.92);
    color: #fff;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    border: 1px solid rgba(248, 250, 252, 0.15);
}

.point-pin:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.point-pin:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.popup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
    z-index: 30;
}

.popup {
    position: fixed;
    inset: 0;
    display: none;
    pointer-events: none;
    z-index: 40;
}

.popup-content {
    position: absolute;
    min-width: 260px;
    max-width: 320px;
    padding: 22px;
    border-radius: 20px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
    pointer-events: all;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(248, 250, 252, 0.3);
    background: rgba(5, 12, 25, 0.85);
    color: #f8fafc;
    cursor: pointer;
}

.popup-category {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.25);
    color: #dbeafe;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.popup h3 {
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.popup-subtitle {
    color: rgba(248, 250, 252, 0.75);
    margin-bottom: 12px;
    font-size: 0.95em;
}

.popup p {
    color: rgba(248, 250, 252, 0.85);
    line-height: 1.7;
}

.popup-arrow {
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--panel-bg);
    border-left: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    transform: translate(-50%, 100%) rotate(45deg);
    left: 50%;
    bottom: -18px;
}

.popup-content.flip .popup-arrow {
    bottom: auto;
    top: -18px;
    border-left: 0;
    border-bottom: 0;
    border-right: 1px solid var(--panel-border);
    border-top: 1px solid var(--panel-border);
    transform: translate(-50%, -100%) rotate(45deg);
}

@media (max-width: 940px) {
    .top-toolbar {
        flex-direction: column;
        align-items: flex-start;
        transform: translate(-50%, 0);
    }

    .legend-dock {
        justify-content: flex-start;
    }

    .event-info,
    .status-cards {
        position: static;
        margin: 12px 20px 0;
    }

    .floating-panel {
        border-radius: 14px;
    }
}

@media (max-width: 640px) {
    .brand-chip {
        letter-spacing: 0.2em;
    }

    .floating-hint .panel-body {
        font-size: 0.8rem;
    }

    .panel-tag {
        letter-spacing: 0.08em;
    }
}
