:root {
    --text: #17283a;
    --sheet-bg: rgba(255, 255, 255, 0.66);
    --sheet-border: rgba(255, 255, 255, 0.72);
    --sheet-shadow: 0 -14px 40px rgba(14, 35, 52, 0.24);
    --glass-shadow: 0 10px 24px rgba(8, 28, 48, 0.18);
    --sheet-peek: 82px;
    --sheet-max-height: 65vh;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    background: #f2f7fb;
    color: var(--text);
    overflow: hidden;
}

.app {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

.floating-brand {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    display: inline-block;
    width: auto;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 13px;
    letter-spacing: 0.22em;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

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

.hidden {
    display: none !important;
}

.status-view {
    position: absolute;
    inset: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
    background: rgba(10, 22, 32, 0.16);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    overflow: auto;
}

.status-view .status-box {
    width: min(760px, 100%);
    background: var(--sheet-bg);
    border: 1px solid var(--sheet-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.status-view .status-box h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.status-view .status-box p {
    margin: 0;
    opacity: 0.82;
}

.panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 0;
    z-index: 1000;
    height: auto;
    max-height: var(--sheet-max-height);
    background: var(--sheet-bg);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border: 1px solid var(--sheet-border);
    border-bottom: 0;
    box-shadow: var(--sheet-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(calc(100% - var(--sheet-peek)));
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel.expanded {
    transform: translateY(0);
}

.center-map-btn {
    position: fixed;
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
    z-index: 980;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.68);
    color: rgba(24, 44, 63, 0.9);
    display: grid;
    place-items: center;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transition: bottom 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 180ms ease;
    touch-action: manipulation;
}

.center-map-btn:active {
    transform: scale(0.95);
}

.center-map-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.center-map-btn.sheet-expanded {
    bottom: calc(var(--sheet-actual-height, var(--sheet-peek)) + env(safe-area-inset-bottom, 0px) + 16px);
}

.center-map-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.panel-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 18px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 19px;
    min-height: 78px;
    touch-action: manipulation;
    position: relative;
}

.panel-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 52px;
    height: 5px;
    border-radius: 999px;
    background: rgba(102, 122, 143, 0.45);
}

.panel-label {
    padding-top: 10px;
}

.panel-arrow {
    font-size: 20px;
    min-width: 20px;
    text-align: center;
    color: rgba(24, 44, 63, 0.72);
}

.panel-content {
    padding: 0 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.flavors {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    line-height: 1.5;
    font-size: 17px;
    font-weight: 500;
}

.flavors li {
    border-radius: 12px;
    padding: 9px 11px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.muted {
    margin: 0;
    color: rgba(20, 40, 58, 0.66);
    font-size: 15px;
}

.last-update {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 44, 63, 0.12);
    font-size: 12px;
    font-weight: 500;
    color: rgba(20, 40, 58, 0.64);
    letter-spacing: 0.01em;
}

.custom-marker-dot {
    background: transparent;
    border: 0;
}

.marker-shell {
    --marker-color: #ff4d4d;
    --marker-highlight: rgba(255, 122, 122, 0.95);
    --marker-glow: rgba(255, 77, 77, 0.56);
    --marker-pulse: rgba(255, 77, 77, 0.5);
    position: relative;
    display: block;
    width: var(--marker-outer-size);
    height: var(--marker-outer-size);
}

.marker-pulse,
.marker-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.marker-core {
    width: var(--marker-size);
    height: var(--marker-size);
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, var(--marker-highlight) 24%, var(--marker-color) 100%);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32), 0 0 14px var(--marker-glow);
}

.marker-pulse {
    width: calc(var(--marker-size) * 2.3);
    height: calc(var(--marker-size) * 2.3);
    border: 2px solid var(--marker-pulse);
    opacity: 0.5;
    animation: marker-pulse 1600ms ease-out infinite;
}

@keyframes marker-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.42);
        opacity: 0.64;
    }
    70% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .leaflet-control-zoom {
        display: none !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .panel {
        left: 50%;
        transform: translate(-50%, calc(100% - var(--sheet-peek)));
        width: min(560px, calc(100% - 20px));
        max-height: fit-content;
    }

    .panel.expanded {
        transform: translate(-50%, 0);
    }

    .panel-toggle {
        min-height: 66px;
        padding: 12px 16px 10px;
    }

    .panel-content {
        padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
    }

    .flavors {
        gap: 6px;
        font-size: 16px;
    }

    .flavors li {
        padding: 7px 10px;
    }

    .last-update {
        margin: 10px 0 0;
        padding-top: 10px;
    }

    .center-map-btn {
        right: 22px;
        bottom: 24px;
    }

    .center-map-btn.sheet-expanded {
        bottom: 24px;
    }
}
