.wea-pic-selector { display: flex; align-items: center; gap: 7px; }
.wea-pic-selector select { min-width: 0; flex: 1; width: 100%; }
.wea-pic-panel select,
.wea-pic-panel button {
    min-height: 34px; border: 1px solid rgba(144, 218, 255, .2); border-radius: 9px;
    padding: 6px 9px; background: rgba(12, 32, 50, .75); color: #d8edf7; font: inherit; font-size: 11px;
}
.wea-pic-panel select option { background: #152b3d; color: #e7f7ff; }
.wea-pic-panel button { cursor: pointer; white-space: nowrap; }
.wea-pic-panel button.active { background: rgba(52, 163, 187, .26); border-color: #5ccedb; color: #a9f5ff; }
.wea-pic-panel :focus-visible { outline: 2px solid #8decff; outline-offset: 3px; }
.wea-pic-panel [hidden] { display: none !important; }
.wea-pic-controls { display: grid; gap: 8px; margin-top: 10px; }
.wea-pic-opacity { display: flex; align-items: center; gap: 8px; color: #afc6d4; font-size: 11px; }
.wea-pic-opacity input { min-width: 0; flex: 1; }
.wea-pic-opacity output { min-width: 31px; text-align: right; }
.wea-pic-panel input[type="range"] { width: 100%; height: 20px; margin: 0; accent-color: #72dce9; cursor: pointer; }
.wea-pic-time { display: block; min-height: 30px; color: #e0f3ff; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wea-pic-timezone { color: #92aebf; font-size: 10px; }
.wea-pic-range { display: flex; justify-content: space-between; gap: 6px; margin-top: -6px; color: #92aebf; font-size: 10px; font-variant-numeric: tabular-nums; }
.wea-pic-actions { display: flex; gap: 7px; }
.wea-pic-actions button { flex: 1; }
.wea-pic-panel :disabled { opacity: .4; cursor: default; }
.wea-pic-status { margin: 8px 0 0; color: #a1bbc9; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.wea-pic-status p { margin: 2px 0 0; }
#wea-pic-status { color: #c3e7ef; font-size: 11px; }
@media (max-width: 767px) {
    .wea-pic-panel select, .wea-pic-panel button { min-height: 40px; font-size: 12px; }
    .wea-pic-panel input[type="range"] { height: 28px; }
}

.layer-comparison-hint { margin: 0; color: #a1bbc9; font-size: 10px; line-height: 1.7; }
.station-visibility-toggle { border: 1px solid rgba(144,218,255,.3); border-radius: 6px; padding: 5px 8px; background: rgba(12,32,50,.55); color: #c3e7ef; font: inherit; font-size: 11px; cursor: pointer; }
.station-visibility-toggle[aria-pressed="true"] { border-color: #5ccedb; background: rgba(52,163,187,.2); }
.station-visibility-toggle:focus-visible { outline: 2px solid #8decff; outline-offset: 3px; }

/* The existing map legend dock contains independently labelled raster / station rows. */
#legend-panel { max-height: min(44dvh, 330px); }
.map-legend-body { display: grid; gap: 10px; max-height: min(34dvh, 265px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.map-legend-row { min-width: 0; }
.map-legend-row:not([hidden]) ~ .map-legend-row:not([hidden]) { border-top: 1px solid rgba(174,221,240,.2); padding-top: 9px; }
.map-legend-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin: 0; }
.map-legend-tag { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; color: #c7e8f4; font-size: 10px; line-height: 1.6; }
.map-legend-tag::before { content: ''; width: 10px; height: 6px; border: 1px solid #b6e6ee; border-radius: 2px; background: #5d99b0; }
.map-legend-tag.station::before { width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; background: #21485f; box-shadow: 0 0 0 1px #18232c; }
.map-legend-name { font-size: 12px; color: #eef9ff; font-weight: 600; line-height: 1.5; }
.map-legend-time { flex-basis: 100%; margin: 0 0 6px; font-size: 10px; color: #aac5d3; font-variant-numeric: tabular-nums; line-height: 1.5; overflow-wrap: anywhere; }
.map-legend-status { margin: 3px 0; color: #b2cbd7; font-size: 11px; line-height: 1.6; }
.map-legend-row [hidden] { display: none !important; }
.map-legend-row .legend-content { padding: 0 1px 1px; }
.legend-panel.collapsed .map-legend-body { display: none; }
@media (min-width: 769px) and (min-height: 601px), (min-width: 769px) and (pointer: fine) {
    .rank-panel { max-height: min(82dvh, 720px, calc(100dvh - var(--map-legend-height, 110px) - 58px)); }
}
@media (max-width: 768px), (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
    #legend-panel { max-height: min(46dvh, 315px); }
    #legend-panel.collapsed { max-height: 52px; }
    .map-legend-body { max-height: min(34dvh, 235px); }
    .station-visibility-toggle { min-height: 40px; padding-inline: 10px; }
}
