/* Dashboard and map are two modes of #mapView (data-mode). */
#mapView[data-mode=dashboard]>.mapwrap{display:none!important}
#mapView[data-mode=map]>aside{display:none!important}
#mapView{padding:0 8px}
#mapView[data-mode=dashboard]{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}
#mapView[data-mode=dashboard]>aside{display:contents}
#mapView[data-mode=dashboard]>aside>.panel[hidden]{display:none}
#mapView[data-mode=dashboard] #forecastPanel{display:contents}
#mapView[data-mode=dashboard] #spot{order:1;margin:0;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
#mapView[data-mode=dashboard] #dashMapCard{order:2;margin:0}
#mapView[data-mode=dashboard] #dashTiles{order:3;margin:0}
#mapView[data-mode=dashboard] #reportsPanel{order:4;margin:0}
#mapView[data-mode=dashboard] #forecast{order:5;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:10px 8px;min-width:0}
#mapView[data-mode=dashboard] .forecast-provider-footer{order:6;margin:0}
@media(min-width:901px){
 #mapView[data-mode=dashboard]{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);column-gap:12px}
 #mapView[data-mode=dashboard] #spot{grid-column:1/-1}
 #mapView[data-mode=dashboard] #dashMapCard{grid-column:1;grid-row:2/span 2;align-self:stretch}
 #mapView[data-mode=dashboard] #dashTiles{grid-column:2;grid-row:2}
 #mapView[data-mode=dashboard] #reportsPanel{grid-column:2;grid-row:3;max-height:420px;overflow:auto}
 #mapView[data-mode=dashboard] #forecast,#mapView[data-mode=dashboard] .forecast-provider-footer{grid-column:1/-1}
}
/* map mode: full-size map */
#mapView[data-mode=map]{display:block}
#mapView[data-mode=map]>.mapwrap.mapwrap{position:relative;top:auto;margin:0;width:auto;height:calc(100dvh - 210px);min-height:380px;--map-height:calc(100dvh - 210px)}
@media(min-width:901px){#mapView[data-mode=map]>.mapwrap.mapwrap{height:calc(100dvh - var(--desktop-map-top,80px) - 16px);--map-height:calc(100dvh - var(--desktop-map-top,80px) - 16px)}}
/* compass map card */
#dashMapCard{display:flex;flex-direction:column}
#dashMapCard h3{margin:0 0 8px}
.dash-map-box{position:relative;flex:1 1 auto;height:auto;min-height:270px;border-radius:10px;overflow:hidden;isolation:isolate;pointer-events:none;user-select:none;background:var(--soft)}
#dashMap{position:absolute;inset:0;z-index:0}
#dashRose{position:absolute;inset:0;width:100%;height:100%;z-index:1000;pointer-events:none}
.dash-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--muted);margin-top:8px}
.dash-legend b{color:var(--text)}.dash-legend i{display:inline-block;width:14px;height:4px;border-radius:2px;margin-inline-end:6px;vertical-align:middle}
/* tiles */
.dash-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dash-tile{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:10px 12px;min-width:0}
.dash-tile.t-wide{grid-column:1/-1}
.dash-tile .tl{font-size:12px;letter-spacing:.04em;color:var(--muted);font-weight:700;margin-bottom:4px}
.dash-tile .trow{display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0}
.dash-tile .tbig{font-size:26px;font-weight:800;line-height:1.1}.dash-tile .tbig small{font-size:13px;font-weight:600;color:var(--muted)}
.dash-tile .tend{text-align:end}
.dash-tile .tsub{font-size:13px;color:var(--muted);margin:2px 0 4px}
.dash-spark{display:block;width:100%;height:36px}
.dash-tx{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}
.dash-arrow{font-size:28px;font-weight:800;line-height:1;display:inline-block}
.dash-ico{font-size:26px;line-height:1}.dash-wx svg{width:34px;height:34px}
.dash-tile .bath-rating-button{padding:0!important;min-height:0;cursor:pointer}
.dash-tile .bath-grid{gap:2px}
@media(min-width:901px){.dash-tile .tbig{font-size:24px}.dash-map-box{min-height:340px}}
/* tab row */
.view-tabs{flex-wrap:wrap}

.dash-wt svg{width:34px;height:34px;color:var(--accent)}
@media(min-width:1200px){.dash-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* tiles scale with their own width */
.dash-tile{container-type:inline-size}
.dash-tile.t-wide{--d:clamp(15px,4.4cqw,36px)}
.dash-tile.t-wide .bath-grid{grid-template-columns:repeat(6,calc(var(--d)/2));grid-template-rows:var(--d) var(--d);height:calc(var(--d)*2 + 3px);gap:2px 0}
.dash-tile.t-wide .bath-slot{width:var(--d);height:var(--d)}
.dash-tile.t-wide .bath-score{font-size:clamp(14px,3.4cqw,26px)}
.dash-tile.t-wide .bath-rating-button small{font-size:clamp(11px,2.3cqw,17px)}
.dash-tile .tver{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
.dash-tile .tword{font-size:clamp(16px,4.2cqw,30px);font-weight:800;line-height:1.1}
.dash-tile.t-wide .tbig{font-size:clamp(26px,7cqw,52px)}
.dash-tile.t-wide .tsub{font-size:clamp(13px,2.8cqw,20px)}
.dash-tile.t-wide .tl,.dash-tile .tl{font-size:clamp(12px,2.6cqw,16px)}
.dash-tile:not(.t-wide) .tbig{font-size:clamp(24px,13cqw,40px)}
.dash-tile:not(.t-wide) .tsub{font-size:clamp(12px,6cqw,16px)}
/* status row, forecast straight below it, map beside (wide) or last (narrow) */
#dashTiles .dash-spark,#dashTiles .dash-tx{display:none}
#dashTiles .t-wide .tver{flex-direction:row;align-items:center;gap:8px}
#dashTiles .t-wide .bath-rating-button small{display:none}
.dash-reports-tile{display:block;width:100%;min-width:0;min-height:44px;font:inherit;text-align:start;color:var(--text);background:var(--panel);cursor:pointer}
.dash-reports-tile:disabled{opacity:1;cursor:default}
.dash-reports-tile .tl,.dash-reports-tile .trow,.dash-reports-tile .tsub{display:block}
.dash-reports-tile .trow{display:flex}
.dash-reports-tile:not(:disabled) .tbig{color:var(--accent)}
.dash-reports-tile:not(:disabled){border-color:var(--accent)}
.drt-chevron{width:20px;height:20px;flex:none;color:var(--accent);transition:transform .15s}
.dash-reports-tile[aria-expanded=true] .drt-chevron{transform:rotate(180deg)}
#mapView[data-mode=dashboard] #reportsPanel:not(.reports-open){display:none}
@media(min-width:901px){
 #mapView[data-mode=dashboard]{position:relative;grid-template-columns:minmax(0,3fr) minmax(0,1fr);column-gap:10px;padding-top:8px}
 #mapView[data-mode=dashboard] #dashTiles{grid-column:1;grid-row:1;gap:6px}
 #mapView[data-mode=dashboard] #forecast{grid-column:1;grid-row:2}
 #mapView[data-mode=dashboard] .forecast-provider-footer{grid-column:1;grid-row:3}
 #mapView[data-mode=dashboard] #dashMapCard{grid-column:2;grid-row:1/span 3;position:sticky;top:calc(var(--desktop-map-top,126px) + 8px);height:calc(100dvh - var(--desktop-map-top,126px) - 16px);align-self:start;padding:8px}
 #dashMapCard .dash-map-box{min-height:0}
 #dashMapCard .dash-legend{flex-direction:column}
 #dashTiles .t-wide{grid-column:auto}
 #dashTiles .dash-tile{padding:7px 9px}
 #dashTiles .dash-tile:not(.t-wide) .tbig{font-size:25px}
 #dashTiles .dash-arrow{font-size:22px}
 .dash-reports-tile .drt-narrow{display:none}
 #mapView[data-mode=dashboard] #reportsPanel{position:absolute;z-index:60;grid-column:auto;grid-row:auto;margin:0;max-height:min(640px,calc(100dvh - 150px));overflow:auto;border:1px solid var(--accent);border-radius:12px;background:var(--panel);box-shadow:0 12px 34px #0009}
}
@media(min-width:1200px){#mapView[data-mode=dashboard] #dashTiles{grid-template-columns:1.8fr repeat(5,minmax(0,1fr))}}
@media(min-width:901px) and (max-width:1199px){#mapView[data-mode=dashboard] #dashTiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){
 #mapView[data-mode=dashboard]{gap:7px}
 #mapView[data-mode=dashboard] #dashTiles{order:2;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 #mapView[data-mode=dashboard] #reportsPanel{order:3;margin:0}
 #mapView[data-mode=dashboard] #forecast{order:4}
 #mapView[data-mode=dashboard] .forecast-provider-footer{order:5}
 #mapView[data-mode=dashboard] #dashMapCard{order:6}
 #reportsPanel>h3{display:none}
 #dashTiles .t-wide,.dash-reports-tile{grid-column:1/-1}
 .dash-reports-tile .drt-wide{display:none}
 .drt-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
 .drt-top b{font-size:16px;color:var(--accent)}
 .dash-reports-tile:disabled .drt-top b{font-weight:600;color:var(--muted)}
 .dash-reports-tile small{display:block;margin-top:3px;font-size:13px;line-height:1.35;color:var(--muted)}
 #dashTiles .dash-tile:not(.t-wide):not(.dash-reports-tile){padding:6px 5px;text-align:center}
 #dashTiles .dash-tile:not(.t-wide):not(.dash-reports-tile) .trow{flex-direction:column;gap:0}
 #dashTiles .dash-tile:not(.t-wide):not(.dash-reports-tile) .tl{font-size:12px}
 #dashTiles .dash-tile:not(.t-wide):not(.dash-reports-tile) .tbig{font-size:18px}
 #dashTiles .dash-tile:not(.t-wide):not(.dash-reports-tile) .tsub{font-size:11px;line-height:1.2;margin-bottom:0}
 #dashTiles .dash-arrow{font-size:17px}
 #dashTiles .dash-ico svg{width:20px;height:20px}
}
/* best time of the week */
#bestWeek{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;box-sizing:border-box;margin:0;padding:10px 14px;font:inherit;text-align:start;color:var(--text);background:color-mix(in srgb,var(--accent) 12%,var(--panel));border:1px solid var(--accent);border-radius:10px;cursor:pointer}
#bestWeek[hidden]{display:none}
#bestWeek .bw-text{min-width:0}
#bestWeek small{display:block;font-size:13px;color:var(--muted)}
#bestWeek b{display:block;font-size:18px;line-height:1.25}
#bestWeek .bw-sub{display:block;margin-top:2px;font-size:14px}
#bestWeek .bw-ducks{flex:none}
#bestWeek .bath-rating-button{padding:0!important;min-height:0}
#bestWeek .bath-rating-button small,#bestWeek .bath-rating-button small.bath-verdict,#dashTiles .bath-rating-button small.bath-verdict,.qs-tiles .bath-rating-button small.bath-verdict{display:none!important}
#bestWeek .bath-flat,#dashTiles .bath-flat,.qs-tiles .bath-flat{display:none}
.tip-i{display:inline-grid;place-items:center;width:18px;height:18px;min-width:18px;min-height:18px;margin-inline-start:2px;padding:0;font-size:11px;line-height:1;color:var(--muted);background:none;border:1px solid var(--muted);border-radius:50%;vertical-align:1px;cursor:pointer}
.tip-box{position:fixed;z-index:1200;width:250px;padding:10px 12px;font-size:14px;line-height:1.4;color:var(--text);background:var(--soft);border:1px solid var(--accent);border-radius:10px;box-shadow:0 10px 26px #0009}
@media(min-width:901px){
 #mapView[data-mode=dashboard] #bestWeek{grid-column:1;grid-row:1}
 #mapView[data-mode=dashboard] #dashTiles{grid-row:2}
 #mapView[data-mode=dashboard] #forecast{grid-row:3}
 #mapView[data-mode=dashboard] .forecast-provider-footer{grid-row:4}
 #mapView[data-mode=dashboard] #dashMapCard{grid-row:1/span 4}
}
@media(max-width:900px){
 #mapView[data-mode=dashboard] #bestWeek{order:2}
 #mapView[data-mode=dashboard] #dashTiles{order:3}
 #mapView[data-mode=dashboard] #reportsPanel{order:4}
 #mapView[data-mode=dashboard] #forecast{order:5}
 #mapView[data-mode=dashboard] .forecast-provider-footer{order:6}
 #mapView[data-mode=dashboard] #dashMapCard{order:7}
 #bestWeek b{font-size:17px}
}
#mapView[data-mode=map] #bestWeek{display:none}

/* Best time: a quiet line under the current conditions, so it never reads as "now". */
#mapView[data-mode=dashboard] #bestWeek{padding:8px 12px;font-size:14px;background:var(--panel);border:1px solid var(--line);border-radius:10px}
#bestWeek .bw-text{display:block;line-height:1.35}
#bestWeek .bw-text b{display:inline;font-size:inherit;font-weight:700}
#bestWeek .bw-cal{margin-inline-end:6px;vertical-align:-3px;color:var(--accent)}
#bestWeek .bw-go{flex:none;color:var(--accent);font-size:18px}
@media(min-width:901px){
 #mapView[data-mode=dashboard] #dashTiles{grid-row:1}
 #mapView[data-mode=dashboard] #bestWeek{grid-row:2}
}
@media(max-width:900px){
 #mapView[data-mode=dashboard] #dashTiles{order:2}
 #mapView[data-mode=dashboard] #reportsPanel{order:3}
 #mapView[data-mode=dashboard] #bestWeek{order:4}
}
