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

:root {
    --panel-bg: rgba(8, 21, 38, 0.88);
    --panel-border: rgba(255, 255, 255, 0.14);
    --panel-text: #f4f7fb;
    --panel-muted: #bfd1e5;
    --accent: #ff8a3d;
    --surface: #ffffff;
    --shadow: 0 18px 45px rgba(6, 18, 33, 0.22);
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 190, 118, 0.35), transparent 30%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 30%),
        #dfe9f3;
    color: #16202b;
}

#map {
    width: 100%;
    height: 100%;
}

.map-panel {
    position: absolute;
    top: 5rem;
    left: 1rem;
    z-index: 1000;
    width: min(370px, calc(100vw - 2rem));
    padding: 1.1rem;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    background: var(--panel-bg);
    color: var(--panel-text);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffd3ae;
}

.map-panel h1 {
    font-size: 1.55rem;
    line-height: 1.15;
}

.panel-copy {
    margin-top: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--panel-muted);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.category-filters.is-collapsed {
    display: none;
}

.filter-status {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--panel-muted);
}

.panel-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    color: var(--panel-text);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.panel-toggle:hover,
.panel-toggle:focus-visible {
    border-color: rgba(255, 255, 255, 0.26);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
    transform: translateY(-1px);
}

.panel-toggle-icon {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.panel-toggle.is-open .panel-toggle-icon {
    transform: rotate(180deg);
}

.filter-chip {
    --chip-accent: #f59e0b;
    padding: 0.55rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--chip-accent) 28%, rgba(255, 255, 255, 0.18));
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        color-mix(in srgb, var(--chip-accent) 14%, rgba(20, 29, 43, 0.92));
    color: #eef5ff;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(6, 18, 33, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-chip:hover,
.filter-chip:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--chip-accent) 50%, white);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 22px rgba(6, 18, 33, 0.24);
}

.filter-chip.active {
    border-color: color-mix(in srgb, var(--chip-accent) 75%, white);
    background: linear-gradient(135deg, color-mix(in srgb, var(--chip-accent) 88%, white), var(--chip-accent));
    color: #fff;
    box-shadow:
        0 12px 26px color-mix(in srgb, var(--chip-accent) 35%, rgba(6, 18, 33, 0.35)),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.leaflet-control {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.leaflet-bar a {
    background: #fff;
    color: #333;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid #ccc;
}

.leaflet-bar a:hover {
    background: #e6e6e6;
}

.leaflet-popup-content-wrapper {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-tip {
    background: #fff;
}

.place-marker {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.user-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0f62fe;
    border: 3px solid #fff;
    box-shadow: 0 0 0 10px rgba(15, 98, 254, 0.16);
}

.leaflet-tooltip {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

.place-popup {
    min-width: 270px;
    color: #16202b;
}

.popup-header {
    margin-bottom: 0.85rem;
}

.popup-header h3 {
    font-size: 1.15rem;
    margin-bottom: 0.2rem;
}

.popup-subtitle {
    color: #5b6b7f;
    font-size: 0.9rem;
}

.popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.popup-badge {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #eef4fb;
    color: #36506d;
    font-size: 0.76rem;
    font-weight: 700;
}

.popup-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e8eef5;
}

.popup-section h4 {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    color: #23364d;
}

.fact-list {
    display: grid;
    gap: 0.45rem;
}

.fact-row {
    font-size: 0.9rem;
    line-height: 1.35;
}

.fact-label {
    font-weight: 700;
    color: #23364d;
}

@media (max-width: 720px) {
    .map-panel {
        width: calc(100vw - 1rem);
        left: 0.5rem;
        right: 0.5rem;
        top: 4.5rem;
        padding: 0.9rem;
    }

    .map-panel h1 {
        font-size: 1.3rem;
    }
}
