/* CamperRemote live overview rc105 – visual refresh, scoped to the live page.
   Core status colors, device control and measurement evidence remain source-owned. */
body #main #overview-page{--live-navy:#102f52;--live-blue:#075eaf;--live-line:#d7e7f5;--live-soft:#edf6ff;color:var(--live-navy)}
body #main .live-intro{position:relative;isolation:isolate;overflow:hidden;min-height:128px;padding:22px 26px;border:1px solid #d3e6f7;border-radius:22px;background:linear-gradient(115deg,#f5faff 0%,#e6f3ff 66%,#d1e8ff 100%);box-shadow:0 8px 22px #0c477c0b;margin:12px 0 15px}
body #main .live-intro::before{content:'';position:absolute;inset:auto -6% -75px 36%;height:140px;border-radius:50% 50% 0 0;background:linear-gradient(125deg,#e0efff,#b8d9f7);opacity:.55;z-index:-1;transform:rotate(-7deg)}
body #main .live-intro .eyebrow{font-size:11px;letter-spacing:1.9px;font-weight:750;color:#1761a9}
body #main .live-intro h1{font-size:clamp(24px,2.35vw,33px);line-height:1.16;font-weight:750;letter-spacing:-.9px;margin:7px 0}
body #main .live-intro #page-description{font-size:14px;line-height:1.45;margin:0;color:#56738d}
body #main .live-intro .voice-entry-shortcut{position:relative;z-index:1;align-self:start;min-height:44px;border:1px solid #bdd9f1;border-radius:12px;background:#fff;color:#0862b2;box-shadow:0 4px 12px #0a468019}
body #main #connection.live-connection{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px!important;width:100%;min-width:0;margin:0 0 20px!important;padding:7px!important;background:#e0eef9!important;border:0!important;border-radius:17px!important;box-shadow:none!important}
body #main .live-connection .connection-stage{min-width:0;border:1px solid #dbe9f5!important;border-radius:13px!important;background:#fff!important;padding:10px 12px!important;box-shadow:0 2px 8px #143f740a!important}
body #main .live-connection .connection-stage>summary{min-height:45px;line-height:1.3;gap:5px}
body #main .live-connection .connection-stage>summary>span{font-weight:650;color:#2d557b}
body #main #overview-page .metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px!important;margin:0 0 24px}
body #main #overview-page .metric{min-width:0;min-height:146px;padding:18px 18px 16px;border:1px solid var(--live-line);border-radius:19px;background:linear-gradient(160deg,#fff 0%,#fff 70%,#f3f9ff 100%);box-shadow:0 7px 19px #1b5e9a0b;transition:box-shadow .15s ease}
body #main #overview-page .metric-label{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:30px;margin:0;letter-spacing:0;font-size:13px;font-weight:700;color:#294964;line-height:1.25}
body #main #overview-page .live-metric-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 31px;width:31px;height:31px;border-radius:10px;background:#edf6ff;color:#0760b0}
body #main #overview-page .live-metric-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body #main #overview-page .metric-value:not(.gas-percent){font-size:clamp(26px,2.7vw,41px)!important;font-weight:750;line-height:1.2;letter-spacing:-1px;color:#075eac;margin:13px 0 6px}
body #main #overview-page .metric-value.smaller{font-size:clamp(17px,1.6vw,24px)!important;line-height:1.25;letter-spacing:-.4px;white-space:normal;overflow-wrap:break-word}
body #main #overview-page .metric-note{font-size:11px;line-height:1.4;color:#668099;margin:8px 0 0;overflow-wrap:anywhere}
body #main #overview-page #voltage-bar{display:flex;gap:3px;max-width:100%;height:9px;margin:8px 0 10px;overflow:hidden;border-radius:5px}
body #main #overview-page #voltage-bar>span{flex:1 1 0;min-width:0;height:100%;border-radius:2px;background:#e1eee9}
body #main #overview-page #voltage-bar>span.filled{background:var(--segment-color)}
body #main #overview-page .live-section-heading{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:21px;font-weight:750;letter-spacing:-.45px;color:#173854;line-height:1.35}
body #main #overview-page .live-section-icon{display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;border:1px solid #d8eaff;border-radius:11px;background:#eaf5ff;font-size:19px;color:#075eac}
body #main #automation-overview{margin:17px 0 23px}
body #main #overview-page .automation-overview-grid{gap:13px}
body #main #overview-page .automation-overview-item{position:relative;gap:6px;padding:17px 19px;border:1px solid var(--live-line);border-radius:18px;background:linear-gradient(150deg,#fff,#f8fbff);box-shadow:0 6px 15px #144b8109}
body #main #overview-page .automation-overview-item>h3{font-size:16px!important;margin:0;font-weight:750}
body #main #overview-page .automation-overview-state{font-size:14px;font-weight:700;line-height:1.35}
body #main #overview-page .automation-overview-detail{margin:3px 0 0;font-size:12px;line-height:1.4;min-height:0}
body #main #overview-page .automation-overview-item>a{min-height:34px;margin-top:0;padding:5px 0;font-size:13px}
body #main #overview-page .automation-overview-item[data-tone=warning]{border-color:#f0cba2;background:#fffaf3}
body #main #overview-page .automation-overview-item[data-tone=warning] .automation-overview-state{color:#905408}
body #main #overview-page .automation-overview-item[data-tone=failed]{border-color:#f0c2b8;background:#fff7f5}
body #main #overview-page .automation-overview-item[data-tone=failed] .automation-overview-state{color:#a33227}
body #main #overview-page .live-gas-heading{margin:0 0 12px}
body #main #gas-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:0 0 25px}
body #main #gas-overview .gas-card{min-height:159px;padding:18px 19px;border-radius:19px;box-shadow:0 7px 19px #1b5e9a0b}
body #main #gas-overview .gas-card h3.metric-label{font-size:15px!important;min-height:26px}
body #main #gas-overview .gas-card h3.metric-label::before{content:'';display:inline-block;width:15px;height:19px;margin-right:8px;vertical-align:middle;border:2px solid #1f73be;border-top-width:5px;border-radius:4px 4px 6px 6px;transform:scale(.75)}
body #main #gas-overview .gas-card .gas-percent{font-size:clamp(27px,3vw,42px)!important;letter-spacing:-.8px;margin:6px 0 7px}
body #main #gas-overview .gas-track{height:9px;margin:9px 0 12px;border-radius:10px;background:#e1edf7;overflow:hidden}
body #main #gas-overview .gas-fill{border-radius:10px}
body #main #gas-overview .gas-detail{font-size:12px;line-height:1.5}
body #main #gas-overview .gas-status{font-size:11px;line-height:1.4}
body #main .live-devices-section{position:relative;margin:2px 0 20px;scroll-margin-top:16px}
body #main .live-devices-heading{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 15px;margin:0 0 12px}
body #main .live-devices-heading .live-section-heading{margin:0}
body #main .live-devices-heading p{margin:0;font-size:12px;color:#62809b}
body #main .live-devices-section .device-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;align-items:stretch}
body #main .live-devices-section .device-status-grid>.control-card{position:relative;min-width:0;min-height:156px;display:flex;flex-direction:column;align-items:stretch;gap:5px;margin:0;padding:17px 17px 12px;border:1px solid var(--live-line);border-radius:18px;background:linear-gradient(145deg,#fff 0%,#f5faff 100%);box-shadow:0 7px 17px #19538a0c}
body #main .live-devices-section .device-status-grid>.control-card[hidden]{display:none!important}
body #main .live-devices-section .device-status-grid>.control-card h3{margin:0;font-size:16px!important;font-weight:750;line-height:1.35}
body #main .live-devices-section .device-status-grid>.control-card h3::before{display:inline-flex;align-items:center;justify-content:center;margin-right:7px;color:#0964b4}
body #main .device-status-grid [data-device-status=heating] h3::before{content:'≋';font-size:23px;line-height:12px}
body #main .device-status-grid [data-device-status=water] h3::before{content:'◉';font-size:18px}
body #main .device-status-grid [data-device-status=climate] h3::before{content:'❄';font-size:19px}
body #main .device-status-grid .live-energy h3::before{content:'⚡';font-size:17px}
body #main .live-devices-section .device-status-grid .device-setting,body #main .live-devices-section .device-status-grid #live-energy-value{display:block;margin:3px 0 0;font-size:16px;line-height:1.3;color:#075eac;overflow-wrap:anywhere;font-weight:750}
body #main .live-devices-section .device-status-grid :is(.device-freshness,#live-energy-note,.device-power-note){margin:2px 0 4px;font-size:11px;line-height:1.45;color:#67829b}
body #main .live-devices-section .device-status-grid .device-planning{font-size:11px;line-height:1.4;margin:2px 0}
body #main .live-devices-section .device-status-grid .device-planning a{font-size:11px}
body #main .live-devices-section .device-status-grid a:is([data-device-control],[data-energy-control],[data-extension-control]){display:flex;justify-content:center;align-items:center;width:100%;min-height:38px;margin-top:auto;padding:8px 10px;background:#eaf4ff;border:1px solid #d1e4f8;border-radius:11px;color:#075eac;font-size:12px;font-weight:700;text-decoration:none;line-height:1.2}
body #main .live-devices-section .device-status-grid a:is([data-device-control],[data-energy-control],[data-extension-control]):hover{background:#d9ebff}
body #main .live-devices-section .device-status-grid a:focus-visible{outline:3px solid #70ace4;outline-offset:2px}
body #main #overview-page [hidden]{display:none!important}
@media(max-width:1220px) and (min-width:901px){body #main #overview-page .metrics,body #main .live-devices-section .device-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){
 body #main .live-intro{margin:0 0 13px;min-height:104px;padding:16px 17px;border-radius:16px}
 body #main .live-intro h1{font-size:24px!important}
 body #main .live-intro .eyebrow{font-size:10px}
 body #main .live-intro .voice-entry-shortcut{min-height:42px;padding:8px 10px}
 body #main #connection.live-connection{margin:0 0 14px!important;gap:5px!important;padding:5px!important;border-radius:13px!important}
 body #main #connection.live-connection .connection-stage{padding:8px 5px!important;border-radius:9px!important}
 body #main #connection.live-connection .connection-stage>summary{min-height:38px;font-size:11px}
 body #main #connection.live-connection .connection-stage strong{font-size:11px}
 body #main #overview-page .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;margin-bottom:19px}
 body #main #overview-page .metric{min-height:128px;padding:13px 12px;border-radius:16px}
 body #main #overview-page .metric-label{font-size:12px;gap:5px;min-height:28px}
 body #main #overview-page .live-metric-icon{width:28px;height:28px;flex-basis:28px;border-radius:9px}
 body #main #overview-page .metric-value{font-size:clamp(25px,7vw,36px)!important;margin:13px 0 7px}
 body #main #overview-page .metric-value.smaller{font-size:clamp(15px,4.2vw,22px)!important}
 body #main #overview-page .metric-note{font-size:10px}
 body #main #overview-page .live-section-heading{font-size:19px}
 body #main #automation-overview{margin:16px 0 20px}
 body #main #overview-page .automation-overview-grid{grid-template-columns:1fr;gap:9px}
 body #main #overview-page .automation-overview-item{padding:12px 14px;gap:3px;border-radius:15px}
 body #main #overview-page .automation-overview-item>h3{font-size:15px!important}
 body #main #overview-page .automation-overview-item>a{min-height:31px}
 body #main #gas-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:19px}
 body #main #gas-overview .gas-card{min-width:0;min-height:144px;padding:13px 12px;border-radius:16px}
 body #main #gas-overview .gas-card h3.metric-label{font-size:12px!important;gap:2px}
 body #main #gas-overview .gas-card h3.metric-label::before{margin-right:2px;transform:scale(.6)}
 body #main #gas-overview .gas-card .gas-percent{font-size:clamp(27px,7vw,36px)!important}
 body #main #gas-overview .gas-detail{font-size:10px}
 body #main #gas-overview .gas-status{font-size:10px}
 body #main .live-devices-section .device-status-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body #main .live-devices-section .device-status-grid>.control-card{min-height:145px;padding:13px 11px 11px;border-radius:16px}
 body #main .live-devices-section .device-status-grid>.control-card h3{font-size:14px!important}
 body #main .live-devices-section .device-status-grid .device-setting,body #main .live-devices-section .device-status-grid #live-energy-value{font-size:15px}
 body #main .live-devices-section{scroll-margin-top:16px}
 body #main .live-devices-heading p{flex-basis:100%}
}
@media(max-width:350px){
 body #main #overview-page .metric{padding:12px 9px}
 body #main #gas-overview{grid-template-columns:1fr}
 body #main .live-devices-section .device-status-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){body #main #overview-page *{transition:none!important}}
/* The first upward swipe must be able to position the device shortcuts immediately
   below the persistent mobile header even when the overview otherwise ends here. */
@media(max-width:900px){
 body #main #overview-page::after{content:'';display:block;height:max(370px,45dvh);pointer-events:none}
}
