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

:root {
    --green-dark: #1b4332;
    --green-mid: #2d6a4f;
    --green-light: #52b788;
    --green-pale: #d8f3dc;
    --text: #1a1a1a;
    --text-muted: #555;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    --header-height: 72px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--green-pale);
    color: var(--text);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Header ── */
.site-header {
    height: var(--header-height);
    background: var(--green-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 1000;
    flex-shrink: 0;
}

.header-content h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.header-content .subtitle {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* ── Map ── */
.map-wrapper {
    flex: 1;
    position: relative;
}

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

/* ── Leaflet overrides ── */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.leaflet-popup-tip-container {
    display: none;
}

/* ── Custom marker ── */
.marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 3px solid var(--green-mid);
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.marker-pin:hover {
    border-color: var(--green-dark);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.marker-pin .marker-emoji {
    font-size: 18px;
    line-height: 1;
}

/* ── Compass ── */
.compass {
    position: absolute;
    top: 16px;
    right: 58px; /* offset left of Leaflet's zoom control */
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.compass-n {
    font-size: 9px;
    font-weight: 800;
    color: var(--green-dark);
    line-height: 1;
    letter-spacing: 0.05em;
}

/* ── Info panel ── */
.info-panel {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(440px, calc(100vw - 48px));
    background: var(--white);
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.info-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(12px);
}

.info-panel-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
}

.info-panel-close:hover {
    background: var(--green-pale);
    color: var(--text);
}

.info-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.info-panel-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.info-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 0;
}

.info-panel-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.info-panel-embed:not(:empty) {
    padding-top: 12px;
}

.panel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--green-pale);
    color: var(--green-dark);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 8px;
    transition: background 0.15s;
}

.panel-link:hover {
    background: #b7e4c7;
}

.info-panel-image {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
    .site-header {
        padding: 0 16px;
    }

    .header-content h1 {
        font-size: 1.15rem;
    }

    .info-panel {
        bottom: 16px;
        border-radius: 12px;
        padding: 20px 20px 18px;
    }
}
