.weather-layer-rail {
    position: absolute;
    z-index: 720;
    top: 14px;
    right: 14px;
    display: grid;
    gap: 6px;
    width: 78px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 13px;
    background: rgba(33, 29, 23, .88);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
    backdrop-filter: blur(8px);
}

.weather-layer-button {
    min-width: 0;
    min-height: 49px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 5px 4px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #eee7dc;
    background: rgba(255, 255, 255, .06);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.weather-layer-button > span { font-size: 18px; line-height: 1; }
.weather-layer-button strong { font-size: 10px; font-weight: 700; line-height: 1.2; }
.weather-layer-button small { color: #cfc4b4; font-size: 8px; }
.weather-layer-button:hover { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .14); }
.weather-layer-button.is-active { border-color: #efc36e; color: #fff; background: #a66812; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.weather-layer-button.is-loading { opacity: .64; cursor: progress; }
.weather-layer-external { border-top-color: rgba(255, 255, 255, .15); }

.weather-point-panel {
    position: absolute;
    z-index: 710;
    top: 14px;
    right: 104px;
    width: min(360px, calc(100% - 132px));
    max-height: calc(100% - 28px);
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 13px;
    color: #211d17;
    background: rgba(255, 253, 249, .96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    backdrop-filter: blur(10px);
}

.weather-point-panel[hidden] { display: none; }
.weather-point-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.weather-point-panel header strong { display: block; margin-top: 2px; font-size: 16px; }
.weather-panel-kicker { color: #8e5a10; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.weather-point-panel header button {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid #ded7cc;
    border-radius: 7px;
    color: #5f584e;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.weather-point-meta { margin: 7px 0 10px; color: #6f675c; font-size: 10px; }
.weather-point-status { padding: 10px; border-radius: 8px; color: #765218; background: #fff5df; font-size: 11px; }
.weather-point-status.is-error { color: #8c2c2c; background: #fff0f0; }
.weather-point-status[hidden] { display: none; }

.weather-point-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.weather-metric {
    min-width: 0;
    padding: 9px;
    border: 1px solid #e5ded3;
    border-radius: 9px;
    background: #f8f4ed;
}
.weather-metric span { display: block; overflow: hidden; color: #6f675c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.weather-metric strong { display: block; margin-top: 3px; font-size: 16px; line-height: 1.2; }
.weather-metric small { margin-left: 2px; color: #746b60; font-size: 9px; font-weight: 400; }

.weather-hourly {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
}
.weather-hour-card {
    flex: 0 0 72px;
    padding: 8px 6px;
    border: 1px solid #e5ded3;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}
.weather-hour-card time, .weather-hour-card span, .weather-hour-card strong { display: block; }
.weather-hour-card time { color: #6f675c; font-size: 9px; }
.weather-hour-card span { margin: 4px 0; font-size: 18px; }
.weather-hour-card strong { font-size: 11px; }
.weather-hour-card small { display: block; margin-top: 2px; color: #2872a7; font-size: 9px; }
.weather-point-notice { margin: 10px 0 0; color: #766c60; font-size: 9px; line-height: 1.5; }

.cm77-weather-surface {
    position: absolute;
    left: 0;
    top: 0;
    opacity: .46;
    pointer-events: none;
    mix-blend-mode: normal;
}

.weather-wind-icon { background: transparent; border: 0; }
.weather-wind-arrow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #074f70;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px #fff, 0 -1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
    transform-origin: 50% 50%;
}
.weather-wind-speed {
    position: absolute;
    top: 29px;
    left: -5px;
    width: 44px;
    padding: 1px 3px;
    border-radius: 5px;
    color: #fff;
    background: rgba(7, 79, 112, .82);
    font-size: 8px;
    text-align: center;
}

.legend.is-weather-model { width: 224px; }
.legend.is-weather-model .legend-bar { background: var(--weather-legend-gradient); }
.map-note.is-weather-model { max-width: 280px; background: rgba(30, 51, 61, .88); }

@media (max-width: 820px) {
    .weather-layer-rail {
        top: 8px;
        right: 8px;
        width: auto;
        max-width: calc(100% - 58px);
        grid-auto-flow: column;
        grid-auto-columns: 58px;
        overflow-x: auto;
        padding: 5px;
    }
    .weather-layer-button { min-height: 45px; }
    .weather-layer-button > span { font-size: 15px; }
    .weather-point-panel {
        top: 70px;
        right: 8px;
        width: min(360px, calc(100% - 16px));
        max-height: calc(100% - 138px);
    }
    .map-note { display: none; }
    .legend { bottom: 8px; }
}

@media (max-width: 480px) {
    .weather-point-panel { left: 8px; width: auto; }
    .weather-layer-rail { left: 48px; right: 8px; max-width: none; }
    .legend.is-weather-model { width: 190px; }
}
