/* Full-height Water workspace; responsive panes preserve all controls and content. */
[hidden]{display:none!important}
html{height:100%;scrollbar-gutter:auto}
body[data-screen]{height:100dvh;min-height:0!important;margin:0;overflow:hidden}
.screen-tabs{display:flex;gap:6px;flex:none;align-items:center}
.screen-tabs button,.screen-info-button,.screen-pager button{font:inherit;font-size:11px;border:1px solid #cddfd8;border-radius:8px;padding:6px 10px;background:#fff;color:#315f54;cursor:pointer}
.screen-tabs button[aria-pressed=true]{background:#2b6556;color:#fff;border-color:#2b6556}
.screen-pager{display:flex;justify-content:space-between;align-items:center;gap:6px;flex:none;font-size:10px;padding-top:6px}
.screen-pager button{padding:4px 8px;font-size:10px}.screen-pager button:disabled{opacity:.4;cursor:default}
#list,#dam-list,#station-dashboard{overflow:hidden!important;min-height:0}
.screen-info{width:min(760px,94vw);max-height:90dvh;border:1px solid #cfddd6;border-radius:18px;padding:20px;color:#294d46;background:#fafcf8}
.screen-info::backdrop{background:#173b3266;backdrop-filter:blur(4px)}
.screen-info-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.screen-info-head h2{font-size:18px;margin:0}.screen-info-head button{font:inherit;padding:6px 10px;border:1px solid #cddfd8;border-radius:8px;background:#fff}
.screen-info-content{max-height:calc(90dvh - 100px);overflow:auto;line-height:1.6}.screen-info-content footer{padding:12px 0;font-size:12px}.screen-info-content .verification{margin:10px 0;padding:15px}.screen-info-content .source-links{grid-template-columns:1fr}.screen-info-content .notice{margin:12px 0}.screen-info-content p{font-size:12px}
body[data-screen=river] main{min-height:0}body[data-screen=river] #stations-dialog[open]{height:min(760px,90dvh);display:flex;flex-direction:column}body[data-screen=river] #station-dashboard{flex:1;height:auto;max-height:none}
body[data-screen=dams] .workspace,body[data-screen=dams] .right-column,body[data-screen=dams] .list-panel{min-height:0}
body[data-screen=dams] .list-panel{flex:1}body[data-screen=dams] .list-columns{display:none}
body[data-screen=rain],body[data-screen=ensemble]{display:flex;flex-direction:column;font-size:13px;line-height:1.4}
body[data-screen=rain] header,body[data-screen=ensemble] header{height:48px;flex:none;padding:0 22px;gap:14px;flex-wrap:nowrap}
body[data-screen=rain] header nav,body[data-screen=ensemble] header nav{font-size:12px;gap:18px}
body[data-screen=rain] main,body[data-screen=ensemble] main{width:100%;max-width:none;flex:1;min-height:0;margin:0;padding:12px 22px;display:flex;flex-direction:column;gap:8px}
.intro{flex:none;min-height:36px}.intro h1{font-size:24px;line-height:1.2;margin:0}.intro h1 br{display:none}.intro h1 em{font-size:18px;margin-left:12px}.intro .eyebrow,.intro p{display:none}.intro>button{font-size:11px;padding:7px 10px}
.screen-caution{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:10px;color:#856a40;flex:none}.screen-info-button{font-size:10px;padding:4px 8px}
.stats{gap:10px;margin:0;flex:none}.stats>div{padding:9px 14px;border-radius:12px}.stats strong{font-size:21px;line-height:1.25;margin:2px 0}.stats small{font-size:10px}
.layout{flex:1;min-height:0;gap:14px;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:stretch}
.map-card{min-height:0;display:flex;flex-direction:column;padding:14px;border-radius:17px}.panel-head{flex:none;gap:8px}.panel-head h2{font-size:16px}.panel-head select{font-size:11px;padding:5px 7px;max-width:58%}.map-wrap{flex:1;min-height:0}.map-wrap svg{width:100%;height:100%;max-height:none}.map-stamp{top:10px;font-size:10px}.map-stamp span{font-size:8px}
.timeline{padding-top:8px;margin-top:8px;flex:none}.timeline>div{gap:8px;align-items:center}.timeline strong{font-size:11px}.timeline button{font-size:10px;padding:5px 8px}.timeline input{padding:0;margin:5px 0;height:18px}.timeline small{font-size:9px}.legend,.scale{flex:none;font-size:9px;gap:7px}.controls{flex:none;margin:8px 0;gap:8px}.controls label{font-size:10px}.controls select{font-size:10px;padding:5px;margin-top:3px}
.layout>aside{display:flex;flex-direction:column;min-height:0;gap:8px}.layout>aside>.screen-tabs{height:30px}.detail,.ranking{margin:0;min-height:0;flex:1;padding:16px;border-radius:17px;display:flex;flex-direction:column}.detail>.eyebrow{font-size:9px;flex:none}.detail h2{font-size:23px;margin:3px 0}.detail p{margin:5px 0;font-size:11px}.detail #coords{font-size:10px}.rain-scene{height:65px;flex:none;margin:8px 0}.rain-scene span{left:46%}.big strong{font-size:42px;line-height:1.2}.big span{font-size:11px}.detail-grid{padding:8px 0;margin:8px 0;gap:8px;flex:none}.detail-grid small{font-size:10px}.detail-grid b{font-size:16px}.detail h3{font-size:12px;margin:6px 0}.detail #bars{height:auto;min-height:80px;flex:1;margin:8px 0 0}.ranking .panel-head span{font-size:10px}.ranking label{font-size:11px;margin-top:8px}.ranking input{font-size:12px;padding:7px;margin:4px 0}.ranking #status{font-size:10px;flex:none}.ranking #list{height:auto;max-height:none;flex:1;min-height:0}.ranking #list button{padding:9px 3px;font-size:12px}.ranking #list b{font-size:13px}
.ensemble-tabs{margin:5px 0;flex:none}.ensemble-overview{flex:1;min-height:0;display:flex;flex-direction:column}.model-cards{margin:6px 0;gap:8px;flex:1;min-height:0}.model-card{padding:12px}.model-card h3{font-size:12px}.model-card .percent{font-size:35px;line-height:1.3}.model-card small{font-size:10px}.model-card p{font-size:11px;margin:6px 0}.local-reference{padding:9px;margin:5px 0;font-size:11px;flex:none}.local-reference p{font-size:11px}.local-reference small{font-size:10px}.comparison{font-size:11px;padding:9px;flex:none}.ensemble-trend{display:flex;flex-direction:column;flex:1;min-height:0}.ensemble-trend #bars{flex:1;min-height:100px}.ensemble-trend #freshness{font-size:11px;flex:none}.weather-view-switch{display:none}
@media(max-width:850px){
 body[data-screen=rain] header,body[data-screen=ensemble] header{height:42px;padding:0 10px;gap:6px;font-size:11px}header small{display:none}body[data-screen=rain] header nav,body[data-screen=ensemble] header nav{font-size:10px;gap:10px}
 body[data-screen=rain] main,body[data-screen=ensemble] main{padding:8px 10px;gap:6px}.intro h1{font-size:20px}.intro h1 em{display:none}.intro>button{font-size:10px;padding:5px}.screen-caution{font-size:8px}.screen-info-button{font-size:9px}.stats{grid-template-columns:repeat(2,1fr);gap:5px}.stats>div{padding:6px 9px}.stats strong{font-size:17px}.stats small{font-size:9px}.weather-view-switch{display:block;flex:none}.weather-view-switch .screen-tabs button{font-size:10px;padding:5px 10px}
 .layout{display:flex;min-height:0}.layout>aside,.layout>.map-card{flex:1;min-width:0}body[data-weather-view=map] .layout>aside{display:none}body[data-weather-view=point] .layout>.map-card{display:none}.map-card,.detail,.ranking{padding:10px}.panel-head{flex-wrap:nowrap}.panel-head h2{font-size:14px}.panel-head select{font-size:10px}.controls{grid-template-columns:1fr 1fr;margin:6px 0}.controls select{font-size:9px;padding:4px}.controls label{font-size:9px}.timeline strong{font-size:10px}.legend,.scale{font-size:8px;gap:5px}.detail h2{font-size:19px}.rain-scene{height:45px;margin:5px 0}.big strong{font-size:34px}.detail-grid{margin:5px 0;padding:5px 0}.detail #bars{min-height:75px}.model-card{padding:8px}.model-card .percent{font-size:28px}.model-card p{font-size:10px}.model-card small{font-size:9px}.local-reference{padding:7px}.local-reference p,.local-reference small,.comparison{font-size:10px}.comparison{padding:7px}
 body[data-screen=dams] .summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}body[data-screen=dams] .summary-grid article{padding:5px 6px}body[data-screen=dams] .summary-grid small{display:none}body[data-screen=dams] .summary-grid article>span{font-size:8px}body[data-screen=dams] .summary-grid strong{font-size:17px}body[data-screen=dams] .list-panel{min-height:0}
}
@media(max-height:740px){
 body[data-screen=river] header{height:auto}body[data-screen=river] .gauge-info{line-height:1.15}body[data-screen=river] .water-gauge{min-height:0}body[data-screen=river] .gauge-tank{max-height:85px}
 body[data-screen=dams] .gate-scene svg,body[data-screen=dams] .reservoir-scene svg{height:55px}body[data-screen=dams] .gate-flow{padding:4px 7px}body[data-screen=dams] .detail-panel{padding:8px 10px}body[data-screen=dams] .gate-metrics strong{font-size:19px}body[data-screen=dams] .data-note{font-size:7px}body[data-screen=dams] .page-heading{margin-bottom:4px}body[data-screen=dams] .summary-grid{margin-bottom:6px}body[data-screen=dams] .list-heading h2{font-size:13px}
 .intro{min-height:28px}.intro h1{font-size:20px}.stats>div{padding:5px 9px}.stats strong{font-size:17px}.stats small{font-size:9px}.detail{padding:10px}.detail h2{font-size:19px}.rain-scene{height:40px;margin:4px 0}.detail-grid{margin:4px 0;padding:5px 0}.big strong{font-size:32px}.model-card .percent{font-size:27px}.model-card{padding:8px}.model-card p{margin:3px 0;font-size:10px}.model-card small{font-size:9px}.local-reference{padding:6px;margin:3px 0}.comparison{padding:6px;font-size:10px}.detail p{margin:3px 0}.layout>aside>.screen-tabs{height:27px}
}
body[data-screen=river] #stations-dialog .all-stations{display:flex;flex-direction:column;flex:1;min-height:0}body[data-screen=river] #stations-dialog .dashboard-note{flex:none}
.rain-reading{display:flex;flex-direction:column;flex:1;min-height:0}.rain-reading .rain-scene{flex:1;min-height:45px}.rain-reading .big,.rain-reading #interval,.rain-reading .detail-grid{flex:none}
.dam-detail-group{display:flex;flex-direction:column;flex:1;min-height:0}.dam-detail-group>.detail-panel{flex:1;min-height:0}.dam-detail-group .gate-scene,.dam-detail-group .reservoir-scene{margin:12px 0}.dam-detail-group .gate-scene svg,.dam-detail-group .reservoir-scene svg{height:clamp(90px,21dvh,250px)}@media(max-width:850px){.dam-detail-group .gate-scene svg,.dam-detail-group .reservoir-scene svg{height:clamp(55px,15dvh,140px)}.right-column>.screen-tabs button{font-size:10px;padding:5px 8px}}
.screen-info-select{width:100%;margin:12px 0;font:inherit;font-size:12px;padding:8px;border:1px solid #ceded6;border-radius:8px;color:inherit;background:#fff}.screen-info-content{overflow:visible;max-height:none;min-height:100px}.screen-info-content>a{display:block;padding:20px}.screen-info-content small{display:block}
