.page-nav{display:flex;gap:4px;padding:4px;background:var(--pale);border:1px solid var(--line);border-radius:24px;margin-left:auto;white-space:nowrap;font-size:15px}.page-nav a{padding:7px 19px;border-radius:20px;color:var(--ink)}.page-nav [aria-current]{background:var(--purple);color:#fff}.dashboard-page{--surface:#fff;--canvas:#f6f5fa;--accent:#6546ad;--blue:#3297cf;--green:#229b94;--red:#cc4c60;--orange:#b87724;background:var(--canvas);color:var(--ink)}[data-theme=forge] .dashboard-page{--surface:#1e2723;--canvas:#121916;--accent:#d5b574;--blue:#72b6d2;--green:#73b89f;--red:#eb8589;--orange:#e0b46c}.dashboard-page .topbar{position:sticky;top:0;z-index:10;gap:18px}.dashboard-page .theme-switch{margin-left:12px}.dashboard{max-width:1780px;margin:auto;padding:24px 26px 12px}.dash-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.dash-heading h1{font-size:27px;margin:0;color:var(--ink)}.dash-heading p{font-size:16px;color:var(--muted);margin:3px 0}.dash-heading .eyebrow{font-size:14px;letter-spacing:2px;margin-bottom:6px}.dash-actions{display:flex;align-items:center;gap:14px;font-size:16px;color:var(--muted)}.dash-actions button{font-size:16px;background:var(--surface)}.section-nav{display:flex;gap:25px;border-bottom:1px solid var(--line);margin:17px 0}.section-nav a{font-size:16px;color:var(--muted);padding:9px 0}.section-nav .active{color:var(--accent);border-bottom:3px solid var(--accent);font-weight:700}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.kpi{display:flex;align-items:center;gap:16px;padding:17px 20px;border:1px solid var(--line);background:var(--surface);border-radius:12px}.kpi svg{width:29px;height:29px}.kpi-icon{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;background:color-mix(in srgb,currentColor 10%,transparent);color:var(--blue)}.kpi:nth-child(3) .kpi-icon{color:var(--green)}.kpi:nth-child(4) .kpi-icon{color:var(--orange)}.kpi-label{font-size:16px;color:var(--muted)}.kpi strong{display:inline-block;font-size:29px;font-weight:750;line-height:1.35;margin-right:8px}.kpi small{font-size:16px;color:var(--muted)}.attention{display:flex;gap:20px;align-items:center;margin:14px 0 20px;padding:13px 18px;background:color-mix(in srgb,var(--accent) 5%,var(--surface));border:1px solid var(--line);border-radius:10px}.attention>strong{font-size:15px;white-space:nowrap}.attention small{display:block;font-size:14px;font-weight:400;color:var(--muted)}#attention-items{display:grid;grid-template-columns:repeat(5,1fr);gap:15px;flex:1}#attention-items a{border-left:1px solid var(--line);padding-left:14px;font-size:16px;color:var(--ink)}#attention-items b{font-size:18px;margin-right:5px;color:var(--red)}.region-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dash-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0;scroll-margin-top:95px;box-shadow:0 3px 16px #30205b04}.card-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 19px;border-bottom:1px solid var(--line);gap:12px;background:color-mix(in srgb,var(--accent) 5%,var(--surface))}.card-heading .eyebrow{font-size:14px;letter-spacing:1.8px;margin:0 0 3px}.card-heading h2{font-size:20px;margin:0;color:var(--ink)}.card-heading h2 span{display:block;font-size:16px;font-weight:400;color:var(--muted);margin-top:2px}.card-heading>a{font-size:16px;white-space:nowrap;color:var(--accent)}.region-body{display:grid;grid-template-columns:36% 1fr;gap:15px;padding:15px}.map-column{display:flex;flex-direction:column;min-width:0}.mini-map{background:#eaf0f1;border-radius:8px;overflow:hidden;min-height:200px;color:#465764}.map-column>.mini-map{flex:1;min-height:400px}.mini-map svg{display:block;width:100%;height:100%;min-height:inherit}.mini-map .province{fill:#e4e5eb;stroke:#c1bdcf;stroke-width:.65}.mini-map .eec-province{fill:#d6e5df;stroke:#a9c4b7}.mini-map text{font:14px var(--font);fill:#546575;paint-order:stroke;stroke:#f5f8f9;stroke-width:3px;stroke-linejoin:round}.mini-map .marker{cursor:pointer;stroke:white;stroke-width:1.5}.mini-map .marker:hover,.mini-map .marker:focus{stroke:#473567;stroke-width:3px;outline:none}.mini-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:14px;color:var(--muted);margin-top:9px}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:4px}.dot.square{border-radius:1px}.blue{background:var(--blue)}.teal{background:var(--green)}.amber{background:var(--orange)}.map-note,.micro{font-size:15px;color:var(--muted);line-height:1.6;margin:4px 0}.map-note{margin-top:8px}.region-data{min-width:0}h3{font-size:16px;margin:0;color:var(--ink)}.chart-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:15px 0 3px}.chart-head>span{font-size:14px;color:var(--muted)}.metric-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.metric{background:color-mix(in srgb,var(--blue) 6%,var(--surface));border-radius:7px;padding:9px 11px}.metric span{display:block;font-size:14px;color:var(--muted)}.metric strong{font-size:22px;color:var(--blue)}.rain-chart svg{width:100%;height:auto;display:block}.rain-chart{font-size:16px;min-height:170px;color:var(--muted)}.chart-grid{stroke:var(--line);stroke-width:1}.chart-text{font:14px var(--font);fill:var(--muted)}.chart-legend{display:flex;gap:13px;font-size:14px;flex-wrap:wrap}.chart-legend b{color:var(--blue)}.chart-legend em{color:var(--accent);font-style:normal}.calculation{font-size:15px;color:var(--muted);margin:7px 0 12px}.calculation summary{cursor:pointer;color:var(--accent)}.reservoir{display:block;color:var(--ink);border:0;border-radius:0;background:none;width:100%;padding:7px 0;border-bottom:1px solid var(--line);text-align:left}.reservoir-top{display:flex;justify-content:space-between;font-size:16px;gap:8px}.reservoir-top b{font-size:16px;white-space:nowrap}.storage-track{height:4px;background:var(--pale);border-radius:4px;margin-top:5px;overflow:hidden}.storage-track i{display:block;height:100%;border-radius:4px}.reservoir small{font-size:14px;color:var(--muted);display:block;margin-top:3px}.select-caption{display:block;font-size:15px;color:var(--muted);margin-bottom:5px}#basin-select{width:100%;font-size:16px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);padding:8px}.detail-title{font-size:17px;margin:13px 0 0}.datum-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:11px 0}.datum{padding:9px;background:color-mix(in srgb,var(--accent) 5%,var(--surface));border-radius:6px}.datum strong{font-size:20px;display:block}.datum span,.datum small{display:block;font-size:14px;color:var(--muted)}.space-top{margin-top:20px}.control-list{max-height:235px;overflow:auto;scrollbar-width:thin;margin:7px 0}.control-row{display:flex;justify-content:space-between;gap:8px;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:9px 0;width:100%;font-size:15px}.control-row small{display:block;font-size:14px;color:var(--muted)}.control-row b{font-weight:600;white-space:nowrap;color:var(--accent)}.bottom-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:18px;margin-top:18px}.small-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px;border-bottom:1px solid var(--line)}.small-heading h2{font-size:16px;margin:0}.small-heading select{font-size:15px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:3px}.national-body{display:grid;grid-template-columns:110px 1fr;gap:12px;padding:12px}.national-body .mini-map{min-height:240px}.scroll-list{max-height:270px;overflow:auto;scrollbar-width:thin}.water-row,.estate-row-dash{padding:10px 0;border-bottom:1px solid var(--line);display:block;color:var(--ink);font-size:16px;background:none;border-radius:0;text-align:left;width:100%;border-top:0;border-left:0;border-right:0}.water-row{display:flex;justify-content:space-between;gap:8px}.water-row small,.estate-row-dash small{display:block;font-size:14px;color:var(--muted)}.water-row b{white-space:nowrap}.estate-row-dash{padding:12px 15px}.estate-row-dash span{font-size:15px;color:var(--orange)}.footnote{font-size:14px;color:var(--muted);padding:0 15px;margin:8px 0 12px}.fresh-row{padding:12px 15px;border-bottom:1px solid var(--line);font-size:16px}.fresh-row strong{display:flex;justify-content:space-between;font-weight:500}.fresh-row small{display:block;font-size:14px;color:var(--muted);margin-top:3px}.badge{font-size:14px;color:var(--green)}.badge.old{color:var(--orange)}.dashboard-footer{display:flex;justify-content:space-between;color:var(--muted);font-size:15px;margin-top:20px;padding-bottom:8px}.error-note{padding:12px;border:1px solid var(--orange);border-radius:8px;font-size:16px;margin:10px 0}.empty-note{padding:16px 0;color:var(--muted);font-size:16px}.dashboard-page dialog{width:440px;max-width:calc(100% - 28px);background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:25px}.dashboard-page dialog::backdrop{background:#15172d70}.dashboard-page dialog button#close-point{float:right;border:0;padding:0 5px;background:none;font-size:23px}.dashboard-page dialog h2{font-size:19px}.dashboard-page dialog a{font-size:16px}.dashboard-page a:hover{text-decoration:underline}.dashboard-page button:hover{background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
/* Keep maps bounded independently of SVG intrinsic aspect ratio. */
.map-column>.mini-map{position:relative;height:450px;min-height:450px;flex:1}.map-column>.mini-map svg{position:absolute;inset:0;width:100%;height:100%;min-height:0}.dashboard-page #reservoir-list{display:grid;grid-template-columns:1fr 1fr;column-gap:14px}.dashboard-page .reservoir-top{font-size:15px}.dashboard-page .reservoir-top b{font-size:16px}.dashboard-page .mini-map [role=button]{pointer-events:all}
@media(min-width:1550px){.region-body{grid-template-columns:40% 1fr}.card-heading h2 span{display:inline;font-size:15px;margin-left:8px}.dashboard{padding-top:25px}}
@media(max-width:1150px){.region-grid{grid-template-columns:1fr}.region-body{grid-template-columns:38% 1fr}.map-column>.mini-map{min-height:360px}.bottom-grid{grid-template-columns:1fr 1fr}.bottom-grid>section:first-child{grid-column:1/-1}.national-body{grid-template-columns:160px 1fr}.kpi{padding:12px;gap:9px}.kpi-icon{width:34px;height:40px}.kpi strong{font-size:24px}.dashboard-page .brand-title{font-size:20px}.dashboard-page .topbar{padding:0 18px}.attention{align-items:flex-start;gap:12px}#attention-items{gap:7px}}
@media(max-width:700px){.dashboard{padding:16px 12px}.dashboard-page .topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:12px;gap:10px}.dashboard-page .brand{flex:1}.dashboard-page .brand-title{font-size:18px}.dashboard-page .theme-switch{margin:0}.page-nav{order:3;width:100%;justify-content:center;margin:0}.page-nav a{flex:1;text-align:center}.dash-heading{align-items:flex-start;gap:10px}.dash-heading h1{font-size:22px;display:block}.dash-heading .eyebrow{display:block}.dash-actions{flex-direction:column;gap:4px;align-items:flex-end}.dash-actions span{max-width:110px;text-align:right;font-size:14px}.section-nav{gap:17px;overflow-x:auto;white-space:nowrap}.section-nav a{font-size:16px}.kpi-grid{grid-template-columns:1fr 1fr;gap:8px}.kpi{padding:11px}.kpi-label{font-size:15px}.kpi strong{font-size:25px}.attention{flex-direction:column}#attention-items{width:100%;grid-template-columns:repeat(3,1fr);row-gap:12px}#attention-items a{font-size:15px}.card-heading{padding:13px}.region-body{grid-template-columns:1fr;padding:12px}.map-column>.mini-map{height:245px;min-height:245px;flex:none}.mini-map svg{min-height:0}.region-card .map-note{margin-bottom:8px}.bottom-grid{grid-template-columns:1fr}.bottom-grid>section:first-child{grid-column:auto}.dash-heading p{font-size:15px}.dashboard-footer{gap:15px;font-size:14px}.card-heading .eyebrow{display:block}.national-body .mini-map{min-height:220px}.national-body{grid-template-columns:100px 1fr}.dash-card{scroll-margin-top:140px}.region-grid{gap:14px}.datum strong{font-size:22px}}

@media(max-width:700px){.map-column>.mini-map{height:245px;min-height:245px;flex:none}.dashboard-page #reservoir-list{grid-template-columns:1fr 1fr}}
.dashboard-page dialog{max-height:85dvh;overflow:auto}
/* EEC: compact map above reservoirs; rainfall ranking beneath the chart. */
#eec .region-body{grid-template-columns:40% minmax(0,1fr)}
#eec-map{height:clamp(250px,23vw,330px);min-height:0;flex:none}
.dashboard-page #eec #reservoir-list{grid-template-columns:1fr}
#eec .reservoir{padding:9px 0}
#eec .reservoir-top{font-size:16px}
#eec .reservoir-top b{font-size:16px}
.rain-ranking{border-top:1px solid var(--line);margin-top:16px;padding-top:4px}
.rain-ranking .chart-head{align-items:flex-start;flex-wrap:wrap;gap:3px}
.rain-ranking .chart-head h3{font-size:15px}
.rain-rank-row{display:flex;align-items:center;gap:10px;width:100%;padding:9px 0;text-align:left;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.rain-rank{display:grid;place-items:center;width:25px;height:28px;flex:none;background:color-mix(in srgb,var(--blue) 10%,var(--surface));color:var(--blue);border-radius:7px;font-size:16px;font-weight:700}
.rain-rank-row:first-child .rain-rank{background:color-mix(in srgb,var(--accent) 15%,var(--surface));color:var(--accent)}
.rain-rank-copy{flex:1;min-width:0}
.rain-rank-name{display:block;font-size:16px;font-weight:600;overflow-wrap:anywhere;line-height:1.5}
.rain-rank-copy>small{display:block;font-size:14px;color:var(--muted);margin:3px 0 7px}
.rain-rank-track{height:4px;display:block;border-radius:5px;background:var(--pale);overflow:hidden}
.rain-rank-track i{display:block;height:100%;border-radius:5px}
.rain-rank-value{flex:none;text-align:right}
.rain-rank-value strong{display:block;font-size:19px;line-height:1.3}
.rain-rank-value strong small{font-size:14px;font-weight:400}
.rain-rank-value>span{display:block;font-size:14px;color:var(--muted);margin-top:4px}
@media(max-width:1150px) and (min-width:901px){.rain-rank-row{gap:6px}.rain-rank{width:20px}.rain-rank-value strong{font-size:18px}.rain-rank-copy>small{font-size:14px}}
@media(max-width:700px){#eec .region-body{grid-template-columns:1fr}#eec-map{height:245px}#eec .rain-rank-row{padding:9px 0}.rain-rank-name{font-size:16px}}

.rain-rank-copy>.rain-rank-meta{margin:3px 0 5px;line-height:1.5;overflow-wrap:anywhere}
.rain-rank-time{white-space:nowrap}

/* Readable supporting text without compressing the regional cards. */
.dashboard-page{line-height:1.65}
.chart-head,.small-heading{flex-wrap:wrap}
.metric small{font-size:14px}
.metric span{line-height:1.6}
.rain-rank-copy>small{line-height:1.65}
.rain-rank-row{padding:9px 0}
.control-row,.water-row{flex-wrap:wrap;row-gap:4px}
.control-row>span,.water-row>span{min-width:0;flex:1 1 130px;overflow-wrap:anywhere}
.control-list{max-height:310px}
.fresh-row strong{gap:8px;flex-wrap:wrap}
.dashboard-footer{flex-wrap:wrap}
@media(max-width:1200px){.region-grid{grid-template-columns:1fr}.attention{flex-direction:column;align-items:stretch}.region-body{grid-template-columns:38% minmax(0,1fr)}}
@media(max-width:700px){.region-body{grid-template-columns:1fr}.national-body{grid-template-columns:80px minmax(0,1fr)}.kpi{min-width:0}.kpi-icon{flex:none}.metric{padding:10px}.rain-rank-value{max-width:88px}.rain-rank-row{gap:8px}}
/* EEC map controls stay in place while its geographic viewport changes. */
#eec-map-canvas{position:absolute;inset:0}
.interactive-map{isolation:isolate;touch-action:pan-y;user-select:none}
.interactive-map:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.interactive-map.is-zoomed{cursor:grab;touch-action:none}
.interactive-map.is-dragging{cursor:grabbing}
.mini-map-controls{position:absolute;right:9px;top:9px;display:flex;flex-direction:column;z-index:1;box-shadow:0 2px 8px #24213625;border:1px solid #ccc3db;border-radius:8px;overflow:hidden}
.dashboard-page .mini-map-controls button{width:34px;height:34px;padding:0;border:0;border-radius:0;background:#fff;color:#594270;font-size:23px;line-height:1}
.dashboard-page .mini-map-controls button+button{border-top:1px solid #e7e1ed}
.dashboard-page .mini-map-controls button:hover{background:#eee7f7}
.dashboard-page .mini-map-controls button:disabled{color:#aaa;cursor:default}
.mini-map-zoom{position:absolute;left:8px;bottom:8px;background:#ffffffde;color:#594270;padding:1px 7px;border-radius:5px;font-size:14px;pointer-events:none}
.estate-zones{pointer-events:none}
.estate-zone-swatch{display:inline-block;width:14px;height:10px;margin-right:5px;border-radius:5px;background:#9865c76b;border:1px solid #9865c7;vertical-align:middle}
@media(pointer:coarse){.dashboard-page .mini-map-controls button{width:40px;height:40px}}

.mini-map .marker-leader line{stroke:#657382;stroke-width:.8;opacity:.65}.mini-map .marker-leader circle{fill:#657382;opacity:.8}.mini-map text{pointer-events:none}
/* Full monitoring detail shared with the large map, within one dashboard dialog. */
.dashboard-page #point-dialog.has-monitor-detail{width:560px;padding:22px;max-height:90dvh;overscroll-behavior:contain}
.has-monitor-detail #close-point{display:none}
#point-content .water-detail-head{align-items:flex-start;gap:16px}
#point-content .water-detail-head>div{min-width:0;flex:1}
#point-content .water-detail-head h2{font-size:22px;line-height:1.5;overflow-wrap:anywhere}
#point-content .water-detail-head small{font-size:14px;letter-spacing:1.4px}
#point-content .water-detail-head p{font-size:16px;line-height:1.6}
#point-content .water-detail-head button{min-width:36px;min-height:36px;font-size:25px;flex:none}
#point-content .water-metrics{gap:10px}
#point-content .water-metrics strong{font-size:24px}
#point-content .water-metrics span,#point-content .water-metrics small{font-size:14px;line-height:1.6}
#point-content .water-alert,#point-content .water-observed{font-size:16px;line-height:1.6}
#point-content .water-disclaimer{font-size:14px;line-height:1.7}
#point-content .monitor-guide-toggle{font-size:16px}
#point-content .monitor-guide-copy{font-size:15px;line-height:1.8}
#point-content .history-heading h3{font-size:17px}
#point-content .history-heading small,#point-content .history-heading h3 span,#point-content .history-live,#point-content .history-range,#point-content .history-inspect,#point-content .history-legend,#point-content .history-range-control,#point-content .history-extent,#point-content .history-status,#point-content .history-note{font-size:14px}
#point-content .history-plot svg{max-height:none}
.open-monitor-detail{width:100%;margin-top:8px;font-size:16px;padding:9px;color:var(--accent);border:1px solid var(--line);background:var(--surface);border-radius:7px}
@media(max-width:600px){.dashboard-page #point-dialog.has-monitor-detail{padding:16px;max-width:calc(100% - 16px)}#point-content .water-detail-head h2{font-size:19px}#point-content .water-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#point-content .history-heading{flex-wrap:wrap}}

/* Compact Chao Phraya map keeps the entire selected corridor in view. */
#basin-map{height:420px;min-height:0;flex:none}
.basin-estates{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 6px}
.dashboard-page .basin-estate-key{background:transparent;border:1px solid var(--line);border-radius:6px;padding:3px 7px;text-align:left;font-size:14px;color:var(--ink)}
.basin-estate-key b{color:#ae86d0;margin-right:3px}.estate-dot{background:#8e62b5;transform:rotate(45deg);border-radius:1px}
.mini-map text.estate-number{fill:#fff;stroke:none;font-size:10px;font-weight:700}
@media(max-width:700px){#basin-map{height:420px;min-height:0}}
/* River profile and station trends replace the control-card overview. */
#basin{container-type:inline-size}
#basin .region-data{display:flex;flex-direction:column}
.basin-context{margin-top:auto;padding-top:16px}
.basin-context .map-note{margin-bottom:0}
.river-overview{grid-column:1/-1;min-width:0;border-top:1px solid var(--line);padding-top:20px}
.river-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.control-kicker{display:block;color:var(--accent);font-size:13px;letter-spacing:1.5px;margin-bottom:4px}
.river-heading h3{font-size:18px}
.river-tabs{display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:20px;background:var(--pale)}
.dashboard-page .river-tabs button{border:0;border-radius:18px;padding:6px 14px;font-size:15px;background:transparent;color:var(--muted)}
.dashboard-page .river-tabs [aria-pressed=true]{background:var(--accent);color:var(--surface)}
.river-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:14px;color:var(--muted);margin:12px 0}
.river-water-key,.river-bank-key{display:inline-block;width:20px;vertical-align:middle;margin-right:5px;border-top:2px solid var(--blue)}
.river-bank-key{border-color:var(--accent);border-top-style:dashed}
.river-profile{overflow-x:auto;scrollbar-width:thin;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--blue) 4%,var(--surface))}
.river-profile svg{display:block;width:100%;min-width:760px}
.profile-grid{stroke:var(--line);stroke-width:1}
.profile-axis{fill:var(--muted);font:13px var(--font)}
.profile-station-label{fill:var(--ink);font:13px var(--font);font-weight:600}
.profile-area{fill:var(--blue);opacity:.17}
.profile-water{fill:none;stroke:var(--blue);stroke-width:2}
.profile-flow{fill:none;stroke:color-mix(in srgb,var(--blue) 24%,var(--surface));stroke-linecap:round;pointer-events:none;vector-effect:non-scaling-stroke;animation:profile-water-flow 1.8s linear infinite}
.profile-flow-primary{stroke-width:4;stroke-dasharray:3 17;opacity:.96}
.profile-flow-secondary{stroke-width:2;stroke-dasharray:1 9;opacity:.76;animation-duration:1.2s}
@keyframes profile-water-flow{to{stroke-dashoffset:-20}}
@media(prefers-reduced-motion:reduce){.profile-flow{animation:none;opacity:.3}}
.profile-bank{fill:none;stroke:var(--accent);stroke-width:2;stroke-dasharray:5 4}
.profile-bank-dot{fill:var(--accent)}
.profile-dot{stroke:var(--surface);stroke-width:2}
.profile-hit{fill:transparent;pointer-events:all}
.profile-station{cursor:pointer;outline:none;pointer-events:bounding-box}
.profile-station:hover .profile-dot,.profile-station:focus-visible .profile-dot{stroke:var(--ink);stroke-width:3;r:8}
.profile-label-leader{stroke:var(--muted);stroke-width:.7;opacity:.5}
.profile-estate-guide{stroke:#9c78c4;stroke-width:1.3;stroke-dasharray:4 5;opacity:.65;pointer-events:none}
.profile-estate{cursor:pointer;outline:none;pointer-events:bounding-box}
.profile-estate rect{fill:var(--surface);stroke:#9c78c4;stroke-width:1}
.profile-estate path{fill:#9c78c4}
.profile-estate text{fill:var(--ink);font:14px var(--font);font-weight:600}
.profile-estate:hover rect,.profile-estate:focus-visible rect{stroke:var(--ink);stroke-width:2}
.river-reading-note{font-size:14px;line-height:1.7;color:var(--muted);margin:10px 0 18px}
.river-stations-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.river-stations-heading span{font-size:14px;color:var(--muted)}
.region-grid{align-items:start}
.river-station-cards{display:grid;grid-template-columns:1fr;gap:8px}
.dashboard-page .river-station-card{display:grid;grid-template-columns:minmax(190px,1.1fr) minmax(130px,1fr) auto;align-items:center;gap:12px 18px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--blue) 4%,var(--surface));padding:13px 16px;text-align:left;color:var(--ink);width:100%}
.river-station-copy{min-width:0}.river-station-copy>strong{display:block;font-size:17px;overflow-wrap:anywhere}
.river-station-copy>small{display:block;font-size:14px;color:var(--muted);margin:3px 0 6px;line-height:1.6}
.river-bank-badge{display:inline-block;font-size:14px;background:color-mix(in srgb,currentColor 10%,transparent);padding:2px 7px;border-radius:5px}
.river-station-level{grid-column:3;grid-row:1;text-align:right;white-space:nowrap}
.river-station-level strong{font-size:25px;line-height:1.4;display:block}
.river-station-level small,.river-change{display:block;font-size:14px;color:var(--muted)}
.river-change{margin-top:5px}.river-spark{grid-column:2;grid-row:1;display:block;height:48px;min-width:0}
.river-spark svg{display:block;width:100%;height:48px}
.spark-empty{display:flex;align-items:center;height:100%;font-size:14px;color:var(--muted)}
@container(max-width:560px){
 .dashboard-page .river-station-card{grid-template-columns:minmax(0,1fr) auto;padding:12px;gap:6px 12px}
 .river-station-level{grid-column:2;grid-row:1}
 .river-spark{grid-column:1/-1;grid-row:2;height:36px}
 .river-spark svg{height:36px}
}
/* Let both EEC lists share the card's bottom edge without fixed heights or scrolling. */
@media(min-width:701px){
 #eec .region-data{display:flex;flex-direction:column}
 #eec .region-data>*,#eec .rain-ranking>*{flex-shrink:0}
 #eec .rain-ranking{display:flex;flex-direction:column;flex:1}
 #eec #rain-ranking-list{display:grid;grid-auto-rows:1fr;flex:1}
 #eec #reservoir-list{flex:1}
}


/* Overview brief fills the left column naturally, independent of the river card. */
.region-column{display:grid;gap:18px;min-width:0}
.brief-header-icon{font-size:36px;color:var(--accent);opacity:.7}
.brief-content{padding:0 20px}
.brief-topic{padding:20px 0;border-bottom:1px solid var(--line);--brief-color:var(--blue)}
.brief-topic:last-child{border-bottom:0;padding-bottom:16px}
.brief-water{--brief-color:var(--red)}.brief-dams{--brief-color:var(--orange)}
.brief-topic-heading{display:flex;align-items:center;gap:12px}
.brief-icon{width:42px;height:42px;border-radius:12px;flex:none;display:grid;place-items:center;color:var(--brief-color);background:color-mix(in srgb,var(--brief-color) 10%,transparent)}
.brief-icon svg{width:26px;height:26px}
.brief-topic-heading>div{min-width:0;flex:1}
.brief-topic-heading h3{font-size:18px;line-height:1.5}
.brief-topic-heading>div>span{display:block;font-size:14px;color:var(--muted);margin-top:2px}
.brief-topic-heading>strong{font-size:32px;color:var(--brief-color);line-height:1.2;white-space:nowrap}
.brief-topic strong small{font-size:15px;font-weight:400;margin-left:6px;color:var(--muted)}
.brief-topic>p{font-size:15px;color:var(--muted);margin:12px 0 9px}
.brief-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:9px}
.brief-chip{font-size:15px;padding:4px 9px;border:1px solid var(--line);border-radius:7px;background:color-mix(in srgb,var(--brief-color) 4%,var(--surface))}
.brief-chip b{color:var(--brief-color);margin-left:5px;font-weight:600}
.brief-more{font-size:14px;color:var(--muted);align-self:center}
.brief-time{display:block;font-size:14px;color:var(--muted);line-height:1.6}
.brief-reservoirs{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:12px 0}
.brief-reservoirs>div+div{border-left:1px solid var(--line);padding-left:20px}
.brief-reservoirs strong{display:block;font-size:30px;color:var(--orange);line-height:1.3}
.brief-reservoirs>div:first-child strong{color:var(--red)}
.brief-reservoirs b{font-size:15px;font-weight:500}
.brief-reservoirs p{font-size:14px;color:var(--muted);line-height:1.7;margin:4px 0 0;overflow-wrap:anywhere}
.brief-coverage{margin:0;padding:12px 20px;background:color-mix(in srgb,var(--accent) 4%,var(--surface));border-top:1px solid var(--line);font-size:14px;line-height:1.7;color:var(--muted);scroll-margin-top:100px}
@media(max-width:700px){.region-column{gap:14px}.brief-content{padding:0 15px}.brief-topic{padding:17px 0}.brief-topic-heading{gap:9px}.brief-topic-heading h3{font-size:17px}.brief-topic-heading>strong{font-size:28px}.brief-reservoirs{gap:12px}.brief-reservoirs>div+div{padding-left:12px}.brief-coverage{padding:12px 15px;scroll-margin-top:155px}}

/* Match the two desktop columns; distribute space through their content. */
@media(min-width:1201px){
 .region-grid{align-items:stretch}
 .region-column{display:flex;flex-direction:column}
 .region-column>.quick-brief{flex:none}
 .region-column>#eec{flex:1;display:flex;flex-direction:column}
 #eec>.region-body{flex:1}
 #basin{display:flex;flex-direction:column}
 #basin>.region-body{flex:1;grid-template-rows:auto 1fr}
 #basin .river-overview{display:flex;flex-direction:column}
 #basin .river-station-cards{flex:1;grid-auto-rows:1fr}
}

/* Enhancements fit within the measured existing brief footprint. */
.brief-enhanced .brief-chips{flex-wrap:nowrap;align-items:flex-start;overflow:hidden}
.brief-enhanced .brief-chip,.brief-enhanced .brief-more{flex:none;white-space:nowrap}
.brief-enhanced .brief-more{align-self:flex-start;padding-top:5px}
.brief-enhanced .brief-chip[hidden],.brief-enhanced .brief-more[hidden]{display:none}
.brief-topic[role=button]{cursor:pointer;position:relative;border-radius:6px}
.brief-topic[role=button]:hover{background:color-mix(in srgb,var(--brief-color) 5%,var(--surface))}
.brief-topic[role=button]:focus-visible{outline:2px solid var(--brief-color);outline-offset:-2px}
.brief-reservoir-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:6px 12px;margin:12px 0}
.dashboard-page .brief-dam-item{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:6px;padding:4px 6px;border:1px solid var(--line);border-radius:6px;background:transparent;text-align:left;color:var(--ink)}
.brief-dam-line{display:flex;gap:5px;align-items:center;justify-content:space-between;font-size:13px;line-height:1.4;min-width:0}
.brief-dam-line>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.brief-dam-line b{font-size:14px;flex:none}
.brief-dam-track{display:block;height:3px;background:var(--pale);border-radius:4px;overflow:hidden;flex:none}
.brief-dam-track i{display:block;height:100%;border-radius:4px}
.quick-brief{container-type:inline-size}
@container(max-width:600px){.brief-reservoir-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px}.dashboard-page .brief-dam-item{gap:3px;padding:2px 5px}.brief-dam-line{font-size:12px}.brief-dam-line b{font-size:13px}}
.dashboard-page #point-dialog.has-brief-list{width:620px;padding:24px}
.brief-province{margin:18px 0 0;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.brief-province h3{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;background:var(--pale);font-size:16px}
.brief-province h3 span{font-size:14px;font-weight:400;color:var(--muted)}
.dashboard-page .brief-station-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 12px;border:0;border-top:1px solid var(--line);border-radius:0;text-align:left;background:transparent;color:var(--ink);font-size:15px}
.brief-station-row>span{min-width:0;overflow-wrap:anywhere}
.brief-station-row small{display:block;color:var(--muted);font-size:13px;margin-top:3px}
.brief-station-row b{white-space:nowrap;font-size:16px;color:var(--accent)}
@media(max-width:600px){.dashboard-page #point-dialog.has-brief-list{padding:16px}.brief-station-row b{font-size:14px}}

.brief-enhanced{display:flex;flex-direction:column}
.brief-enhanced>.card-heading,.brief-enhanced>.brief-coverage{flex-shrink:0}
.brief-enhanced>.brief-content{display:flex;flex-direction:column;flex:1;min-height:0}
.brief-enhanced .brief-topic:not(.brief-dams){flex:none}
.brief-enhanced .brief-dams{display:flex;flex-direction:column;flex:1;min-height:0}
.brief-enhanced .brief-dams>.brief-topic-heading,.brief-enhanced .brief-dams>.brief-time{flex:none}
.brief-enhanced .brief-reservoir-grid{flex:1;min-height:0}

/* The shared map stylesheet locks the mobile viewport; dashboards use document scrolling. */
html.dashboard-document,body.dashboard-page{height:auto;min-height:100%;overflow:visible;overscroll-behavior:auto}

/* Give province names room inside the basin boundaries beside the station details. */
@media(min-width:701px){#basin .basin-body{grid-template-columns:minmax(300px,1fr) minmax(0,1fr)}}

/* Official desktop dashboard: the artwork stays anchored to the viewport. */
@media(min-width:1024px){
 html[data-theme="official"] .dashboard-page{
  background-image:url("ieat-dashboard-background-v1.png");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
 }
}

/* Keep the dashboard introduction legible over the desktop artwork. */
@media(min-width:1024px){
 html[data-theme="official"] .dashboard-page .dash-heading{
  padding:18px 22px 15px;background:#fff;
  border:1px solid #ddd5e7;border-bottom:0;border-radius:14px 14px 0 0;
 }
 html[data-theme="official"] .dashboard-page .dash-heading h1{color:#302044}
 html[data-theme="official"] .dashboard-page .dash-heading .eyebrow{color:#674684;font-weight:700}
 html[data-theme="official"] .dashboard-page .dash-heading p,
 html[data-theme="official"] .dashboard-page .dash-actions{color:#51465f}
 html[data-theme="official"] .dashboard-page .section-nav{
  margin:0 0 18px;padding:0 22px 12px;gap:8px;background:#fff;
  border:1px solid #ddd5e7;border-top:0;border-radius:0 0 14px 14px;
  box-shadow:0 5px 16px #3020440a;
 }
 html[data-theme="official"] .dashboard-page .section-nav a{
  padding:9px 16px;color:#51465f;font-weight:600;border-bottom:0;border-radius:7px;
 }
 html[data-theme="official"] .dashboard-page .section-nav a:hover{background:#f0eaf6;color:#483064}
 html[data-theme="official"] .dashboard-page .section-nav a.active{background:#654389;color:#fff}
 html[data-theme="official"] .dashboard-page .section-nav a:focus-visible{outline:2px solid #654389;outline-offset:3px}
}

/* Keep the introduction as the same light card on tablet and mobile. */
@media(max-width:1023px){
 html[data-theme="official"] .dashboard-page .dash-heading{
  padding:17px 17px 14px;background:#eeedf2;
  border:1px solid #cbc4d6;border-bottom:0;border-radius:14px 14px 0 0;
 }
 html[data-theme="official"] .dashboard-page .dash-heading h1{color:#30233f}
 html[data-theme="official"] .dashboard-page .dash-heading .eyebrow{color:#674298;font-weight:700}
 html[data-theme="official"] .dashboard-page .dash-heading p,
 html[data-theme="official"] .dashboard-page .dash-actions{color:#5c4f6c}
 html[data-theme="official"] .dashboard-page .section-nav{
  margin:0 0 18px;padding:0 10px 11px;gap:4px;background:#eeedf2;
  border:1px solid #cbc4d6;border-top:0;border-radius:0 0 14px 14px;
  box-shadow:0 5px 16px #3020440a;
 }
 html[data-theme="official"] .dashboard-page .section-nav a{
  padding:8px 11px;color:#51425f;font-weight:600;border-bottom:0;border-radius:7px;
 }
 html[data-theme="official"] .dashboard-page .section-nav a:hover{background:#dfdbe7;color:#40304f}
 html[data-theme="official"] .dashboard-page .section-nav a.active{background:#7041a4;color:#fff}
 html[data-theme="official"] .dashboard-page .section-nav a:focus-visible{outline:2px solid #7041a4;outline-offset:2px}
}

/* Fit the selected graph into the existing minimap row, without enlarging it. */
#basin .basin-context{position:relative;margin-top:6px;padding-top:0;font-size:12px;line-height:1.6;color:var(--muted)}
#basin .basin-context summary{cursor:pointer;list-style:revert;font-size:12px;margin:0}
#basin .basin-context[open] .map-note{position:absolute;z-index:3;bottom:100%;left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:10px;box-shadow:0 4px 12px #0002;font-size:13px}
#basin-detail .basin-current .detail-title,#basin-detail .basin-current h2{font-size:17px;margin:9px 0 0}
#basin-detail .datum-grid{gap:6px;margin:8px 0}
#basin-detail .datum{padding:7px;min-width:0}
#basin-detail .datum strong{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;font-size:20px;line-height:1.35}
#basin-detail .datum strong small{display:inline;font-size:12px;font-weight:400}
#basin-detail .datum-grid:has(>.datum:nth-child(5)){grid-template-columns:repeat(3,minmax(0,1fr))}
#basin-detail .basin-history{min-width:0;margin:8px 0 0;padding-top:8px;min-height:0}
#basin-detail .history-heading{flex-wrap:nowrap;flex:none}
#basin-detail .history-heading h3{font-size:15px;margin:0}
#basin-detail .history-heading h3 span{font-size:12px}
#basin-detail .water-history:not(.dam-history) .history-heading::after{content:'24 ชม.';font-size:12px;color:var(--muted);white-space:nowrap}
#basin-detail .history-heading small,#basin-detail .history-live,
#basin-detail .water-history:not(.dam-history) .history-range,
#basin-detail .history-legend,#basin-detail .history-range-control,
#basin-detail .history-navigator,#basin-detail .history-extent,
#basin-detail .history-status,#basin-detail .history-note{display:none}
#basin-detail .history-plot{margin-top:3px;min-height:0}
#basin-detail .history-plot svg{display:block;width:100%;height:150px;max-height:100%}
#basin-detail .history-inspect,#basin-detail .history-range{font-size:12px;line-height:1.4;margin:3px 0 0;flex:none}
#basin-detail .empty-note{font-size:13px;line-height:1.55;padding:8px;background:var(--pale);border-radius:8px;margin:0}
@media(min-width:701px){
 #basin .basin-body>.region-data{contain:size;min-height:0}
 #basin-detail{display:flex;flex-direction:column;flex:1;min-height:0}
 #basin-detail .basin-current{flex:none}
 #basin-detail .basin-history.water-history{display:flex;flex-direction:column;flex:1;overflow:hidden}
 #basin-detail .history-plot{flex:1;display:flex;align-items:center;justify-content:center}
 #basin-detail .history-plot svg{height:100%;max-height:none}
}

/* Reuse empty map-footer space so moving the summary never enlarges the card. */
#basin .map-column{position:relative;container-type:inline-size}
#basin .map-column>.basin-context{position:absolute;right:0;bottom:6px;width:calc(100% - 170px);margin:0}
#basin .basin-context summary{display:block;position:relative;padding-left:12px;line-height:15px}
#basin .basin-context summary::before{content:'▸';position:absolute;left:0;top:0}
#basin .basin-context[open] summary::before{content:'▾'}
#basin-counts span{display:inline-block;white-space:nowrap;margin-right:5px}
#basin .basin-context[open] .map-note{left:auto;width:280px;max-width:calc(100cqw - 16px);box-sizing:border-box}
#basin-detail .basin-station-heading{display:flex;align-items:baseline;justify-content:space-between;gap:4px 8px;flex-wrap:wrap;margin-top:9px}
#basin-detail .basin-station-heading .detail-title{margin:0}
#basin-detail .basin-station-heading .basin-observed{margin:0;font-size:12px;line-height:1.5;white-space:nowrap}
@container(min-width:355px){#basin .map-column>.basin-context{width:calc(100% - 100px)}}
@container(min-width:427px){#basin .map-column>.basin-context{bottom:auto;top:426px;width:170px}}
