:root{color-scheme:dark;--bg:#090f15;--panel:#101b22;--line:#263b47;--text:#eff5f7;--muted:#96aab8;--teal:#21d4d2;--amber:#ffbf54}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#172935 0,transparent 65%),var(--bg);font:15px/1.5 system-ui,sans-serif;color:var(--text)}button,select,input{font:inherit}button,select{background:#132630;color:var(--text);border:1px solid var(--line);border-radius:10px;padding:10px 14px}button,a,select{touch-action:manipulation}button,a{cursor:pointer}button:hover{border-color:var(--teal)}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid var(--teal);outline-offset:4px}header{height:80px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#0d171eea;position:sticky;top:0;z-index:5;backdrop-filter:blur(20px)}.brand{font-size:25px;letter-spacing:1px}.brand>strong>span,.brand:first-letter{color:var(--teal)}.header-right{display:flex;gap:24px;align-items:center}#connection{font-size:13px;color:var(--amber)}aside{position:fixed;top:105px;left:18px;width:175px;display:grid;gap:10px}aside a{padding:14px;border-radius:10px;color:var(--muted)}aside a.active{color:var(--teal);background:#15343b}main{margin-left:210px;padding:30px;max-width:1750px}.page-title{display:flex;justify-content:space-between;align-items:center;gap:15px}.eyebrow{font-size:10px;letter-spacing:3px;color:var(--muted);margin:0}h1{font-size:32px;margin:3px 0 18px;letter-spacing:-1px}h2{font-size:17px;margin:0}h3{font-size:16px;margin-top:28px}.muted,small{color:var(--muted)}.refresh{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#0f1e27;border:1px solid var(--line);border-radius:12px;padding:10px 14px;font-size:12px;margin-bottom:20px}.dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.card{background:linear-gradient(135deg,#16232c,#0e171e);border:1px solid var(--line);border-radius:16px;padding:22px;min-width:0;box-shadow:0 12px 30px #0002}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.card-heading a{font-size:12px;color:var(--teal)}.card-heading button{font-size:12px}.house-card{grid-column:span 2;padding:12px;overflow:hidden}.house-card .card-heading{padding:7px}.work-card{grid-column:span 2}.state-line{display:flex;align-items:center;gap:14px;margin:20px 0}.state-icon{font-size:36px;color:var(--teal)}.state-line strong{font-size:24px;color:var(--teal)}.state-line p{margin:0;color:var(--muted);font-size:12px}.periods{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden}.periods button{flex:1;border:0;border-radius:0;background:transparent;padding:8px 10px;font-size:12px;white-space:nowrap}.periods .selected{background:#17525b;color:#d8ffff}.stats{display:grid;grid-template-columns:1.3fr 1.3fr .7fr;gap:10px;margin:25px 0}.stats strong{font-size:25px;display:block;letter-spacing:-1px}.stats small{font-size:12px}.state-strip{display:flex;height:15px;overflow:hidden;border-radius:4px;background:#5f6d77}.state-strip span{height:100%}.state-strip .co{background:var(--teal)}.state-strip .cwu{background:var(--amber)}.state-strip .idle{background:#697a86}.legend{display:flex;gap:18px;font-size:11px;margin-top:8px}.legend span:first-child{color:var(--teal)}.legend span:nth-child(2){color:var(--amber)}.legend span:last-child{color:var(--muted)}.demo-note{font-size:11px;color:var(--muted);margin-top:20px}.metric{display:flex;gap:18px;align-items:center}.metric>span{font-size:32px;color:var(--teal)}.metric strong{display:block;font-size:30px}.metric small{font-size:12px}.shortcut{grid-column:span 2;display:flex;align-items:center;gap:20px;font-size:25px}.shortcut small{font-size:12px}.shortcut>span{margin-left:auto}.detail-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:24px}.detail-stats>div{padding:25px;background:#0c171d;border:1px solid var(--line);border-radius:12px}.detail-stats strong{display:block;font-size:30px}.detail-stats small{display:block}.time-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:10px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}th,td{padding:15px 10px;text-align:left;border-bottom:1px solid var(--line)}th{font-size:11px;color:var(--muted);font-weight:400}td.co{color:var(--teal)}td.cwu{color:var(--amber)}.settings{max-width:750px}.settings label{display:grid;gap:8px;margin:25px 0}.settings .check{display:flex}.empty{text-align:center;padding:70px 20px}.empty>span{font-size:50px;color:var(--teal)}footer{margin:30px 0;color:#6e8596;font-size:11px}.event{padding:18px;border-bottom:1px solid var(--line);display:flex;gap:25px}.event span{color:var(--teal)}dialog{background:#0b161e;color:var(--text);border:1px solid var(--line);border-radius:18px;padding:24px;max-width:95vw}dialog::backdrop{background:#000c;backdrop-filter:blur(8px)}#houseDialog{width:1400px;padding:0;max-height:96dvh;overflow:auto}.full-top{padding:15px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px}.full-top span{color:var(--muted);font-size:12px}.house-scene{position:relative;aspect-ratio:1.4;isolation:isolate;overflow:hidden;border-radius:10px;background:#101e29}.house-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.scene-tint{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply;background:#b7bfd6;opacity:.2}.house-scene[data-weather=day] .scene-tint{background:#fff3c5;opacity:.12;mix-blend-mode:screen}.house-scene[data-weather=dawn] .scene-tint{background:#e6a681;opacity:.3;mix-blend-mode:soft-light}.house-scene[data-weather=fog]:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#d2e0e588,transparent);pointer-events:none;z-index:1}.weather-particles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.weather-particles i{position:absolute;top:-10%;width:1px;height:16px;background:#a5cedc;animation:rain 1.2s linear infinite;opacity:.6}.house-scene[data-weather=snow] .weather-particles i{width:4px;height:4px;border-radius:50%;background:white;animation-duration:6s}.house-scene:not([data-weather=rain]):not([data-weather=snow]) .weather-particles{display:none}@keyframes rain{to{transform:translate(-50px,800px)}}.house-scene svg.flow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}.flow path{fill:none;stroke-width:.22;opacity:.8;stroke-linecap:round;filter:drop-shadow(0 0 .4px currentColor)}.flow .particles{stroke-dasharray:.22 2;stroke-width:.38;animation:flow 1.6s linear infinite;stroke:#fff}.flow .return .particles{animation-direction:reverse}.flow .ground{color:#20ddd8;stroke:#20ddd8}.flow .heating{color:#fa774d;stroke:#fa774d}.flow .water{color:#ffbd55;stroke:#ffbd55}.house-scene[data-state=idle] .flow,.house-scene[data-state=unknown] .flow{opacity:.1}.house-scene[data-state=co] .water,.house-scene[data-state=cwu] .heating{opacity:.12}.house-scene[data-state=idle] .particles,.house-scene[data-state=unknown] .particles,.house-scene[data-state=co] .water .particles,.house-scene[data-state=cwu] .heating .particles,.paused .particles{animation-play-state:paused}.paused .particles{opacity:0}@keyframes flow{to{stroke-dashoffset:-4.44}}.scene-badge{position:absolute;z-index:2;padding:6px 10px;background:#0c1823df;border:1px solid #43627599;border-radius:8px;font-size:11px;backdrop-filter:blur(12px)}.scene-badge strong{display:block;font-size:20px}.scene-badge.room{left:44%;top:29%}.scene-badge.cwu{right:8%;top:24%}.scene-badge.co{left:51%;top:52%}.scene-badge.outside{left:4%;top:25%}.scene-badge.mode{left:4%;top:4%;font-size:13px;color:var(--teal);border-color:#28bfbb}.scene-badge.boreholes{left:8%;bottom:6%;font-size:11px}.scene-badge.note{right:3%;bottom:3%;font-size:9px;color:#b5c6d1}.scene-bottom{display:flex;justify-content:space-around;gap:8px;padding:12px;background:#0b1d25;border-top:1px solid var(--line);font-size:12px;color:var(--teal)}#fullHouse .house-scene{aspect-ratio:1.8}#fullHouse .scene-badge{font-size:14px;padding:10px 15px}#fullHouse .scene-badge strong{font-size:30px}.layout-row{display:flex;align-items:center;gap:12px;padding:8px 0}.layout-row label{flex:1}.layout-row button{padding:6px 12px}#layoutList{margin:20px 0}#toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);padding:14px 22px;border-radius:12px;background:#234754;z-index:20;max-width:90vw;display:none}.page[hidden],[hidden]{display:none!important}body:has(#houseDialog[open]){overflow:hidden}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}}@media(min-width:1500px){.house-scene{aspect-ratio:1.6}}@media(max-width:1100px){aside{width:65px;left:8px}aside span{display:none}main{margin-left:80px;padding:22px}.card{padding:15px}.house-card{padding:8px}.stats strong{font-size:21px}.page-title>.muted{display:none}.refresh #lastRead{display:none}.header-right{gap:12px}.house-scene{aspect-ratio:1.15}}@media(max-width:720px){header{height:65px;padding:0 18px}.brand{font-size:20px}.header-right button span{display:none}#connection{font-size:10px}aside{position:fixed;top:auto;bottom:0;left:0;width:100%;display:flex;justify-content:space-around;background:#0e1d26f5;border-top:1px solid var(--line);z-index:10;padding-bottom:env(safe-area-inset-bottom)}aside a{display:grid;text-align:center;font-size:20px;padding:7px 5px;gap:0}aside a span{display:block;font-size:9px}main{margin:0;padding:18px 14px 80px}h1{font-size:26px}.refresh{font-size:10px;gap:6px;padding:7px}.refresh button{font-size:10px;padding:7px}.dashboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.house-card,.work-card{grid-column:span 2}.house-scene{aspect-ratio:1.25}.house-card .card-heading{margin-bottom:5px}h2{font-size:15px}.card-heading button{font-size:10px;padding:7px}.work-card{padding:16px}.state-line{margin:10px 0}.state-line strong{font-size:21px}.stats{margin:18px 0}.stats strong{font-size:22px}.metric{padding:15px;gap:10px}.metric>span{font-size:22px}.metric strong{font-size:26px}.metric small{font-size:10px}.shortcut{grid-column:span 1;padding:13px;gap:8px;font-size:19px}.shortcut h2{font-size:13px}.shortcut small{font-size:10px}.demo-note{margin-bottom:0;font-size:10px}.detail-stats{gap:8px}.detail-stats>div{padding:12px 8px}.detail-stats strong{font-size:20px}.detail-stats small{font-size:10px}#work .card-heading{display:block}#work .periods{margin-top:15px}.full-top{padding:10px;font-size:12px}.full-top>span{display:none}.full-top button{font-size:11px}#fullHouse .house-scene{aspect-ratio:.8}#fullHouse .scene-badge{font-size:10px;padding:5px}#fullHouse .scene-badge strong{font-size:20px}#fullHouse .scene-bottom{font-size:10px}#houseDialog{max-width:100vw;width:100vw;border-radius:0}footer{font-size:10px}.card-heading a{font-size:10px}}

/* Bottom navigation on every screen, matching approved concept. */
aside{top:auto;bottom:0;left:0;width:100%;display:flex;justify-content:center;gap:clamp(8px,5vw,90px);background:#0e1d26f5;border-top:1px solid var(--line);z-index:10;padding:5px 14px calc(5px + env(safe-area-inset-bottom));backdrop-filter:blur(20px)}aside a{display:grid;text-align:center;font-size:23px;min-width:70px;padding:7px 12px;gap:1px}aside a span{display:block;font-size:11px}main{margin-left:auto;margin-right:auto;padding-bottom:110px;max-width:1600px}@media(max-width:720px){aside{gap:0;justify-content:space-around;padding-left:0;padding-right:0}aside a{font-size:20px;min-width:0;padding:7px 5px}aside a span{font-size:9px}main{margin:0;padding:18px 14px 95px}}


/* Moving luminous ribbons, never dots. */
.flow .particles{stroke-dasharray:7 15;stroke-width:.45;stroke-linecap:round;filter:drop-shadow(0 0 .6px currentColor);animation:light-flow 3s linear infinite,light-pulse 2.5s ease-in-out infinite alternate;opacity:.95}.flow path:not(.particles){stroke-width:.2;opacity:.4}@keyframes light-flow{to{stroke-dashoffset:-44}}@keyframes light-pulse{from{opacity:.55}to{opacity:1}}.house-scene[data-state=unknown] .flow .particles{opacity:0}.house-scene[data-ground=off] .ground .particles,.house-scene[data-co=off] .heating .particles,.house-scene[data-heat-water=off] .water .particles{animation:none;opacity:0}.house-scene[data-state=idle] .flow{opacity:1}.house-scene[data-state=idle] .particles{animation-play-state:running}
body.auth-locked>header,body.auth-locked>aside,body.auth-locked>main,body.auth-locked>dialog{display:none!important}.login-screen{min-height:100dvh;display:grid;place-items:center;padding:25px;background:radial-gradient(ellipse at top,#1c3440,#080f15 70%)}.login-box{width:min(420px,100%);padding:32px;border:1px solid #2b4654;border-radius:24px;background:#0c1822ed;box-shadow:0 25px 100px #0007}.login-box h1{margin-top:30px}.login-box .brand{font-weight:750}.login-box label{display:grid;gap:8px;margin-top:22px;color:#a8becb;font-size:13px}.login-box input{padding:14px;border:1px solid #2b4654;border-radius:12px;background:#14222d;color:white;min-width:0;font:inherit}.login-box button{width:100%;margin-top:26px;background:#078d96;border-color:#1ac6ca;padding:13px;font-weight:700}.login-box .muted{font-size:12px}.login-box img{width:100%;height:190px;object-fit:cover;border-radius:12px;margin-top:25px}.login-error{color:#ffb36a;font-size:13px;min-height:20px}.unknown{background:repeating-linear-gradient(45deg,#22303a,#22303a 3px,#354953 3px,#354953 6px)}#recordList pre{white-space:pre-wrap;font:13px/1.9 system-ui}

/* Telemetry occupies its own rows; the illustration is unobstructed. */
.house-scene,#fullHouse .house-scene{aspect-ratio:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:8px;background:#0b1821}.scene-canvas{position:relative;aspect-ratio:1.5;grid-column:1/-1;overflow:hidden;border-radius:10px}.scene-badge,#fullHouse .scene-badge{position:static;inset:auto;padding:9px;font-size:11px;background:#142630;min-width:0}.scene-badge strong,#fullHouse .scene-badge strong{font-size:23px}.scene-badge.mode{order:-1;grid-column:1/-1;color:#ff806b}.scene-badge.boreholes{grid-column:1/3}.scene-badge.note{grid-column:3/5;font-size:9px;color:#9cb0be}.scene-bottom{flex-wrap:wrap;font-size:11px}.compressor-status{font-weight:650;color:#76bbf2}.compressor-status[data-active=on]{color:#ff775d}.flow .ground,.flow .heating,.flow .water{color:#fa654e;stroke:#fa654e}.flow .particles{stroke:#ffddd4}.house-scene[data-ground=off] .ground,.house-scene[data-co=off] .heating,.house-scene[data-heat-water=off] .water{color:#459ee1;stroke:#459ee1;opacity:.65}.house-scene[data-state=idle] .mode{color:#71b7f1}.house-scene[data-state=unknown] .mode{color:#9fb0bc}.house-scene[data-weather=fog]:after{display:none}.house-scene[data-weather=fog] .scene-canvas:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#d2e0e588,transparent);pointer-events:none}.house-card{align-self:start}.dashboard{align-items:start}@media(max-width:720px){.scene-badge,#fullHouse .scene-badge{font-size:9px;padding:7px 5px}.scene-badge strong,#fullHouse .scene-badge strong{font-size:18px}.scene-canvas{aspect-ratio:1.35}.scene-bottom{font-size:10px}.scene-badge.note{font-size:8px}}

.scene-badge.integral,.scene-badge.curve{grid-column:span 2}.scene-badge.integral strong{color:#edf5f7}.scene-badge.boreholes{grid-column:1/3}.scene-badge.note{grid-column:1/-1}

/* A single softly tapered shimmer moving along the pipe, no dotted pattern. */
.flow path:not(.pulse){opacity:0!important}.flow .particles.pulse{stroke:currentColor;stroke-width:.3;stroke-dasharray:1.15 98.85;stroke-linecap:butt;stroke-dashoffset:var(--offset);filter:drop-shadow(0 0 .35px currentColor);animation:pipe-shimmer 6s linear infinite}.flow .ground{color:#37baff}.flow .heating,.flow .water{color:#ff6549}@keyframes pipe-shimmer{from{stroke-dashoffset:var(--offset)}to{stroke-dashoffset:calc(var(--offset) - 100px)}}.house-scene[data-ground=off] .ground .pulse,.house-scene[data-co=off] .heating .pulse,.house-scene[data-heat-water=off] .water .pulse,.house-scene[data-state=unknown] .pulse,.house-scene.paused .pulse{display:none}.house-scene[data-state=idle] .particles.pulse{animation-play-state:running}@media(prefers-reduced-motion:reduce){.flow .particles.pulse{display:none}}

.component-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}.component{display:grid;justify-items:center;text-align:center;border:1px solid #25475d;background:linear-gradient(145deg,#142a38,#0d1922);border-radius:12px;padding:14px 5px;color:#65a6d3;gap:5px}.component-icon{width:40px;height:40px;padding:4px}.component-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.component span{font-size:10px;color:#b7c8d3}.component strong{font-size:11px;font-weight:600}.component[data-active=on]{color:#ff795e;border-color:#b35746;background:linear-gradient(145deg,#3b2423,#191b22)}.component[data-active=on] .component-icon{filter:drop-shadow(0 0 6px #ff654b66);animation:component-breathe 2.5s ease-in-out infinite}.component[data-component=valve][data-active=on]{color:#4ec9d4;border-color:#387c88}@keyframes component-breathe{50%{opacity:.55;transform:scale(.96)}}@media(max-width:720px){.component-grid{gap:6px}.component{padding:10px 3px}.component span{font-size:9px}.component strong{font-size:10px}.component-icon{width:34px;height:34px}}

/* Source-loop flow follows its pump; hot-water charging follows compressor + valve. */
.house-scene[data-ground=on] .ground{opacity:1;color:#43c9ff}
.house-scene[data-heat-water=on] .water{opacity:1;color:#ff7252}
.house-scene .flow .particles.pulse{stroke-width:.52;filter:drop-shadow(0 0 .75px currentColor);animation-duration:4s}
.house-scene[data-heat-water=on] .water .pulse{display:inline;animation-play-state:running}
.house-scene[data-heat-house=off] .heating .pulse{display:none}
.house-scene[data-heat-house=on] .heating{opacity:1}
.house-scene[data-heat-house=on] .heating .pulse{display:inline;animation-play-state:running}
.house-scene[data-state=unknown] .flow .pulse,.paused .flow .pulse{display:none!important}
@media(prefers-reduced-motion:reduce){.house-scene .flow .pulse{display:none!important}}

/* Viewport-sized dashboard: image labels occupy the empty landscape, devices below. */
html,body{height:100%;overflow:hidden}body{height:100dvh}header{height:60px;padding:0 24px}header .brand{font-size:22px}header button{padding:7px 10px;font-size:12px}aside{height:64px;padding-top:3px;padding-bottom:calc(3px + env(safe-area-inset-bottom))}aside a{font-size:20px;padding:3px 12px}aside a span{font-size:10px}
main{height:calc(100dvh - 124px);width:100%;max-width:1700px;padding:12px 24px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.page-title{flex:none;height:36px}.eyebrow,.page-title>.muted{display:none}h1{font-size:23px;margin:0}.refresh{flex:none;padding:5px 10px;margin:8px 0 12px;min-height:35px}.refresh button{font-size:11px;padding:5px 9px}.refresh #lastRead{display:inline}footer{display:none}.page{flex:1;min-height:0;overflow:hidden}.page>.card{height:100%;overflow:hidden}.dashboard{height:100%;min-height:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr) 75px 75px;gap:10px;align-items:stretch}.house-card{grid-column:1/3;grid-row:1/4;align-self:stretch;display:flex;flex-direction:column;min-height:0;padding:10px}.house-card .card-heading{flex:none;padding:0 2px;margin-bottom:7px}.card-heading h2{font-size:14px}.card-heading button{padding:6px 9px;font-size:10px}#houseMount{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}.work-card{grid-column:3/5;grid-row:1;padding:16px}.dashboard .metric{grid-column:span 1;min-height:0;padding:8px 15px}.metric strong{font-size:24px}.metric>span{font-size:23px}.dashboard .shortcut{display:none}.house-scene,#fullHouse .house-scene{padding:0;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;background:#0a151d;overflow:hidden}.scene-canvas{flex:none;grid-column:auto;aspect-ratio:1.5;max-width:100%;max-height:100%;border-radius:9px}.house-art{object-fit:fill}.scene-badge,#fullHouse .scene-badge{position:absolute;inset:auto;z-index:3;min-width:0;padding:4px 7px;font-size:clamp(8px,.75vw,12px);line-height:1.25;background:#0a1922d9;border:1px solid #52778b99;border-radius:7px;backdrop-filter:blur(7px);box-shadow:0 3px 14px #0004}.scene-badge strong,#fullHouse .scene-badge strong{font-size:clamp(12px,1.6vw,24px);line-height:1.2;white-space:nowrap}.scene-badge.mode,#fullHouse .scene-badge.mode{left:3%;top:3%;font-size:clamp(9px,1vw,14px);padding:5px 8px}.scene-badge.outside{left:3%;top:15%}.scene-badge.room{left:3%;top:32%}.scene-badge.co{right:2%;top:42%}.scene-badge.cwu{right:2%;top:61%}.scene-badge.return-temp{right:2%;top:79%}.scene-badge.integral{left:36%;bottom:4%}.scene-badge.curve{left:56%;bottom:4%}.scene-badge.boreholes,.scene-badge.note,.scene-bottom{display:none}.component-grid{flex:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:0}.component{padding:6px 2px;gap:2px;border-radius:8px}.component-icon{width:27px;height:27px;padding:2px}.component span{font-size:8px;white-space:nowrap}.component strong{font-size:9px;white-space:nowrap}
#houseDialog{width:calc(100vw - 24px);max-width:1500px;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);overflow:hidden;border-radius:14px}#houseDialog[open]{display:flex;flex-direction:column}.full-top{flex:none;height:52px;padding:8px 14px}.full-top button{padding:7px 10px;font-size:11px}#fullHouse{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:0 10px 10px}#fullHouse .component-grid{width:100%;max-width:1000px;align-self:center}#fullHouse .component{padding:7px}#fullHouse .component span{font-size:10px}#fullHouse .component strong{font-size:12px}#fullHouse .component-icon{width:34px;height:34px}
.work-card .state-line{margin:10px 0}.work-card .stats{margin:14px 0}.work-card .stats strong{font-size:25px}.work-card .demo-note{margin-top:10px}.work-card .state-line strong{font-size:22px}.page-pager{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;font-size:11px;margin-top:8px}.page-pager button{padding:5px 12px;font-size:12px}.page-pager button:disabled{opacity:.35;cursor:default}.table-wrap{overflow:hidden}#work>.card,#records>.card{display:flex;flex-direction:column;padding:14px}#work .detail-stats{margin-top:0;gap:8px}#work .detail-stats>div{padding:10px}#work h3{margin:12px 0 7px}#work .demo-note{margin:8px 0}#work td,#work th{padding:8px 5px}#work>.card>.muted{font-size:10px;margin:8px 0 0}#work .table-wrap{min-height:0;flex:1}#recordList{flex:1;min-height:0;overflow:hidden}#recordList pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.65}#records>.card>p{font-size:11px;margin:3px 0 12px}.settings{max-width:100%;padding:16px}.settings label{margin:12px 0}.settings .muted{font-size:12px}#layoutDialog{overflow:hidden;max-height:calc(100dvh - 20px);padding:16px}#layoutDialog h2{margin:0}#layoutDialog p{font-size:11px;margin:5px 0}#layoutList{margin:10px 0}.layout-row{padding:3px 0;font-size:12px}.layout-row button{padding:3px 8px}#layoutDialog>button{font-size:11px;padding:7px}
@media(max-width:720px){header{height:48px;padding:0 12px}.brand{font-size:17px!important}.header-right{gap:6px}header button{padding:6px;font-size:10px}#connection{font-size:9px}aside{height:59px}aside a{padding:4px 5px}main{height:calc(100dvh - 107px);padding:5px 10px 8px}.page-title{height:25px}h1{font-size:19px}.refresh{min-height:29px;margin:3px 0 6px;padding:3px 6px;font-size:8px}.refresh #sourceStatus{display:none}.refresh #lastRead{display:inline}.refresh button{font-size:9px;padding:4px 6px}.dashboard{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 157px;gap:7px}.house-card{grid-column:1;grid-row:1;padding:6px}.work-card{grid-column:1;grid-row:2;padding:8px 10px}.dashboard .metric{display:none}.house-card .card-heading{margin-bottom:4px}.card-heading h2{font-size:12px}.house-card .card-heading button{font-size:9px;padding:4px 7px}.component-grid{gap:3px}.component{padding:4px 1px}.component-icon{width:22px;height:22px}.component span{font-size:7px;white-space:normal;line-height:1.1}.component strong{font-size:8px}.scene-badge,#fullHouse .scene-badge{font-size:8px;padding:3px 5px}.scene-badge strong,#fullHouse .scene-badge strong{font-size:14px}.work-card>.card-heading{margin:0 0 3px}.work-card>.card-heading h2{font-size:11px}.work-card>.card-heading a{font-size:9px}.work-card .state-line{margin:0;height:24px}.work-card .state-icon{font-size:18px}.work-card .state-line strong{font-size:15px}.work-card .state-line p{display:none}.work-card .periods{margin:3px 0}.work-card .periods button{padding:3px;font-size:9px}.work-card .stats{margin:4px 0;gap:8px}.work-card .stats strong{font-size:17px}.work-card .stats small{font-size:9px}.work-card .state-strip{height:7px}.work-card .legend{font-size:8px;margin-top:3px}.work-card .demo-note{font-size:8px;margin:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#houseDialog{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;border-radius:0}.full-top{height:43px;font-size:11px;padding:6px 10px}#fullHouse{padding:0 6px 8px;gap:6px}#fullHouse .component-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#fullHouse .component{padding:5px}#fullHouse .component span{font-size:9px}#fullHouse .component strong{font-size:10px}#fullHouse .component-icon{width:29px;height:29px}#work>.card,#records>.card{padding:9px}#work .card-heading{display:flex;margin-bottom:6px}#work .periods{margin:0}#work .periods button{padding:4px;font-size:9px}#work .detail-stats>div{padding:6px}#work .detail-stats strong{font-size:17px}#work .detail-stats small{font-size:8px}#work h3{font-size:12px;margin-top:9px}#work .demo-note,#work .time-axis{font-size:8px}#work th,#work td{font-size:9px;white-space:normal;padding:6px 3px}#work .detail-stats{grid-template-columns:1fr 1fr 1fr}.login-screen{height:100dvh;min-height:0;padding:15px}.login-box{padding:18px;max-height:calc(100dvh - 30px)}.login-box img{height:100px;margin-top:12px}.login-box h1{font-size:25px;margin-top:12px}.login-box label{margin-top:10px}.login-box input{padding:9px}.login-box button{margin-top:14px}.login-error{margin:5px 0;min-height:10px}}
@media(max-height:650px) and (min-width:721px){header{height:46px}aside{height:53px}main{height:calc(100dvh - 99px);padding:5px 15px}.page-title{height:24px}h1{font-size:18px}.refresh{margin:3px 0 5px;min-height:28px}.dashboard{grid-template-rows:minmax(0,1fr) 49px 49px}.work-card{padding:8px}.work-card .state-line{margin:3px 0}.work-card .state-line strong{font-size:17px}.work-card .state-line p{display:none}.work-card .stats{margin:6px 0}.work-card .stats strong{font-size:19px}.work-card .demo-note{font-size:9px;margin:5px 0}.work-card .periods button{padding:4px}.component{padding:4px 1px}.component-icon{width:22px;height:22px}.metric strong{font-size:19px}}
@media(max-width:720px) and (max-height:700px){.dashboard{grid-template-rows:minmax(0,1fr) 132px}.work-card>.card-heading{display:none}.work-card .legend{display:none}.work-card .demo-note{font-size:7px}.component-icon{display:none}.component{padding:5px 1px}}

main{max-width:none;width:100%}
.login-screen{height:100dvh;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 20% 5%,#183846 0,transparent 48%),radial-gradient(ellipse at 90% 100%,#133340 0,transparent 45%),#080f15;padding:18px}
.login-box{position:relative;width:min(450px,100%);padding:30px 34px 24px;border-radius:23px;border-color:#315460;background:linear-gradient(145deg,#13252ef5,#0b151df5);box-shadow:0 30px 100px #0007}
.login-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:15px;border-bottom:1px solid #29434f}.login-brand img{width:180px!important;height:auto!important;border-radius:0!important;margin:0!important;object-fit:contain!important}.login-brand span{font-size:8px;letter-spacing:1.6px;white-space:nowrap;color:#8facba}.login-box>img{display:block;width:100%;height:112px;object-fit:cover;object-position:center 45%;border-radius:12px;margin:18px 0 0;border:1px solid #2b4550}.login-box h1{font-size:27px;letter-spacing:-.8px;line-height:1.25;margin:20px 0 10px}.login-box>.muted{font-size:12px;margin:10px 0}.login-box label{margin-top:15px;font-size:12px}.login-box input{padding:11px 13px;border-radius:10px;background:#0b1922}.login-box button{margin-top:22px;background:linear-gradient(100deg,#168c98,#1ba9af);border:1px solid #54dbe066;box-shadow:0 8px 25px #0b858c33;color:#f5ffff}.login-box>.muted:last-child{font-size:10px;text-align:center;color:#7395a5}.login-box .login-error{font-size:11px;min-height:16px;margin:8px 0}
.house-scene[data-weather=night] .scene-tint{background:linear-gradient(#18304c 0%,#25364c 35%,transparent 55%,#19334a 100%);mix-blend-mode:multiply;opacity:.68}.house-scene[data-weather=day] .house-art{filter:brightness(1.2) saturate(.95)}.house-scene[data-weather=day] .scene-tint{background:linear-gradient(#d6edff 0%,#fff9d9 37%,transparent 70%);mix-blend-mode:screen;opacity:.24}.house-scene[data-weather=dawn] .scene-tint{background:linear-gradient(#e9ad87,transparent 55%);mix-blend-mode:soft-light;opacity:.45}.scene-clock{position:absolute;z-index:3;right:3%;top:3%;color:#e9f6ff;background:#0c1b25cc;border:1px solid #46657688;border-radius:7px;padding:4px 7px;font-size:clamp(8px,.9vw,12px)}
@media(max-width:720px){.login-box{padding:22px;max-height:calc(100dvh - 24px)}.login-brand img{width:155px!important}.login-brand span{font-size:7px}.login-box>img{height:90px;margin-top:14px}.login-box h1{font-size:24px;margin-top:16px}.login-box label{margin-top:12px}.login-box input{padding:10px}.login-box button{margin-top:17px}}
@media(max-height:670px){.login-box{padding:17px 24px}.login-box>img{height:65px;margin-top:10px}.login-box h1{font-size:23px;margin-top:12px}.login-box label{margin-top:9px}.login-box input{padding:8px 11px}.login-box button{padding:10px;margin-top:12px}.login-box>.muted{margin:5px 0}.login-brand{padding-bottom:10px}}

/* Explicit coordinates in both views avoid inherited opposite-side anchors. */
.scene-badge.mode,#fullHouse .scene-badge.mode{left:3%;right:auto;top:3%;bottom:auto}
.scene-badge.outside,#fullHouse .scene-badge.outside{left:3%;right:auto;top:15%;bottom:auto}
.scene-badge.room,#fullHouse .scene-badge.room{left:3%;right:auto;top:32%;bottom:auto}
.scene-badge.co,#fullHouse .scene-badge.co{left:auto;right:2%;top:42%;bottom:auto}
.scene-badge.cwu,#fullHouse .scene-badge.cwu{left:auto;right:2%;top:61%;bottom:auto}
.scene-badge.return-temp,#fullHouse .scene-badge.return-temp{left:auto;right:2%;top:79%;bottom:auto}
.scene-badge.integral,#fullHouse .scene-badge.integral{left:36%;right:auto;top:auto;bottom:4%}
.scene-badge.curve,#fullHouse .scene-badge.curve{left:56%;right:auto;top:auto;bottom:4%}
@media(min-width:721px){.dashboard{grid-template-columns:repeat(10,minmax(0,1fr))}.house-card{grid-column:1/7}.work-card{grid-column:7/11}.dashboard .metric{grid-column:span 2}}

/* A running circulation pump is independent of the compressor state. */
.house-scene[data-house-flow=on] .flow .heating{opacity:1;color:#ff8061}
.house-scene[data-house-flow=on] .flow .heating .pulse{display:inline;animation:pipe-shimmer 4s linear infinite;animation-play-state:running}
.house-scene[data-water-flow=on] .flow .water{opacity:1;color:#ff8061}
.house-scene[data-water-flow=on] .flow .water .pulse{display:inline;animation:pipe-shimmer 4s linear infinite;animation-play-state:running}
.house-scene[data-state=unknown] .flow .pulse,.house-scene.paused .flow .pulse{display:none!important}
.scene-badge.room,#fullHouse .scene-badge.room{left:45%;right:auto;top:34%;bottom:auto;background:#091923c9;border-color:#b2dae677}
.scene-circulator{position:absolute;z-index:3;left:52%;top:55.8%;width:4%;min-width:17px;max-width:42px;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 22%,#3d596a,#13222c 60%,#070e14);border:1px solid #4f7285;color:#6db3dc;box-shadow:1px 3px 6px #0009,inset 0 1px 1px #e5f9ff77;display:grid;place-items:center}.scene-circulator svg{width:86%;height:86%;fill:none;stroke:currentColor;stroke-width:1.5}.rotor{transform-origin:16px 16px}.house-scene[data-co=on] .scene-circulator{color:#ff9b76;border-color:#fba582;box-shadow:0 0 10px #ff754c88,inset 0 1px 2px #fff7}.house-scene[data-co=on] .scene-circulator .rotor,.component[data-component=co][data-active=on] .rotor{animation:rotor-spin 1.4s linear infinite}.component[data-component=co] .rotor{fill:currentColor;stroke-width:.6}
.scene-compressor{position:absolute;left:61.4%;top:55.1%;width:1%;height:2.8%;min-width:4px;z-index:2;border-radius:2px;background:#21435b;border:1px solid #557384}.scene-compressor span{position:absolute;inset:20%;background:#6e9bb2}.house-scene[data-compressor=on] .scene-compressor{background:#ff6d4c;box-shadow:0 0 10px #ff6d4c}.house-scene[data-compressor=on] .scene-compressor span{background:#ffd5ac;animation:compressor-stroke .8s ease-in-out infinite}
.heat-halo{position:absolute;pointer-events:none;z-index:1;opacity:0;border-radius:50%;filter:blur(7px);background:#ff5b2a}.home-heat{left:36%;top:44%;width:24%;height:5%}.water-heat{left:67.5%;top:60%;width:4.4%;height:8%}.house-scene[data-heat-house=on] .home-heat,.house-scene[data-heat-water=on] .water-heat{animation:heat-breathe 3s ease-in-out infinite}
.component-grid{gap:7px}.component{position:relative;overflow:hidden;min-height:93px;padding:10px 5px 8px;border:1px solid #3c5c6e;border-bottom:3px solid #07121b;background:radial-gradient(ellipse at 20% 0%,#35536366,transparent 70%),linear-gradient(150deg,#203544 0%,#112431 52%,#0b1721 100%);box-shadow:inset 0 1px 1px #c9e7f344,inset 0 -2px 4px #0006,0 4px 8px #0007;transform:perspective(700px) rotateX(3deg);gap:3px}.component:before{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(115deg,#ffffff0c,transparent 42%,#0002);border-radius:inherit}.component-icon{width:43px;height:43px;padding:4px;filter:drop-shadow(1px 2px 1px #0008)}.component span{font-size:10px;white-space:normal;line-height:1.1}.component strong{font-size:11px;line-height:1.15}.component[data-active=on]{background:radial-gradient(ellipse at 20% 0%,#d9855e55,transparent 72%),linear-gradient(150deg,#503b33,#30242a 55%,#161d26);border-color:#b8795b;border-bottom-color:#291a19;box-shadow:inset 0 1px 1px #ffdab966,inset 0 -2px 5px #0005,0 4px 8px #0007,0 0 15px #ed775011}.component[data-active=on] .component-icon{animation:none;filter:drop-shadow(0 0 4px #ff885c55)}.component[data-component=compressor][data-active=on] .component-icon svg{animation:compressor-stroke .8s ease-in-out infinite}.component[data-component=heater][data-active=on] .component-icon svg{animation:heater-glow 1.7s ease-in-out infinite}.component[data-component=ground][data-active=on] .component-icon svg,.component[data-component=cwu][data-active=on] .component-icon svg{animation:component-breathe 2s ease-in-out infinite}.component[data-component=valve][data-active=on]{background:linear-gradient(150deg,#24424c,#142832);border-color:#4b8393;border-bottom-color:#10232b}
#fullHouse .component{min-height:105px;padding:10px}#fullHouse .component-icon{width:47px;height:47px}#fullHouse .component span{font-size:11px}#fullHouse .component strong{font-size:13px}
@keyframes rotor-spin{to{transform:rotate(360deg)}}@keyframes compressor-stroke{50%{transform:translateY(1px) scaleY(.9);opacity:.65}}@keyframes heat-breathe{50%{opacity:.23}}@keyframes heater-glow{50%{color:#ffbe72;filter:drop-shadow(0 0 5px #ff7138)}}
.paused .rotor,.paused .scene-compressor span,.paused .heat-halo{animation:none!important}
@media(max-width:720px){.component-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.component{min-height:76px;padding:6px 3px 5px}.component-icon{display:block;width:33px;height:33px;padding:2px}.component span{font-size:9px}.component strong{font-size:10px}#fullHouse .component{min-height:85px;padding:7px}#fullHouse .component-icon{width:38px;height:38px}#fullHouse .component span{font-size:10px}#fullHouse .component strong{font-size:11px}.scene-badge.room,#fullHouse .scene-badge.room{left:44%;top:33%}}
@media(max-height:650px) and (min-width:721px){.component{min-height:70px;padding:4px 2px}.component-icon{width:31px;height:31px}.component span{font-size:9px}.component strong{font-size:10px}}
@media(min-width:721px) and (max-height:500px){.dashboard{grid-template-rows:minmax(0,1fr)}.house-card,.work-card{grid-row:1}.dashboard .metric{display:none}.component{min-height:58px}.component-icon{width:24px;height:24px}.component span{font-size:8px}.component strong{font-size:9px}}
@media(prefers-reduced-motion:reduce){.rotor,.scene-compressor span,.heat-halo,.component-icon svg{animation:none!important}.house-scene .flow .pulse{display:none!important}}
.scene-badge.room,#fullHouse .scene-badge.room{left:43%;top:31%;display:flex;align-items:center;gap:5px;padding:4px 6px;white-space:nowrap}.scene-badge.room strong,#fullHouse .scene-badge.room strong{display:inline;font-size:clamp(14px,1.6vw,22px)}
/* Keep the image and device cards together as one unit, including portrait view. */
#houseMount,#fullHouse{justify-content:center;gap:8px}.house-scene,#fullHouse .house-scene{flex:none;min-height:0;width:100%}.scene-canvas{margin:0 auto}.component-grid{align-self:stretch}
@media(max-width:720px){.dashboard{display:flex;flex-direction:column;gap:8px}.house-card{flex:none;min-height:0;height:auto;width:100%;padding:6px}.work-card{flex:1;min-height:156px;width:100%}#houseMount{flex:none;justify-content:flex-start;gap:6px}#fullHouse{justify-content:center;gap:6px}.house-card .card-heading{margin:0 0 6px}.component-grid{gap:5px}.component{min-height:74px}.work-card .stats{margin:7px 0}.work-card .demo-note{white-space:normal;line-height:1.3}.work-card .legend{margin-top:5px}}
@media(max-width:720px) and (max-height:700px){.work-card{min-height:130px}.component{min-height:60px;padding:4px 2px}.component-icon{width:26px;height:26px}.component span{font-size:8px}.component strong{font-size:9px}.work-card .stats{margin:4px 0}}

/* Warm emitter glow sits directly on the existing radiators and floor grid. */
.emitter-glow{position:absolute;pointer-events:none;z-index:1;opacity:0;background:#ff6b2c55;box-shadow:0 0 10px #ff7b3e88,inset 0 0 8px #ffc18666;border-radius:2px;mix-blend-mode:screen}
.radiator-one{left:53.7%;top:21.5%;width:5.9%;height:4.9%}.radiator-two{left:82.1%;top:18.3%;width:2.8%;height:7.5%}.floor-grid{left:35.8%;top:44.4%;width:24.6%;height:4.2%;clip-path:polygon(13% 0,82% 0,100% 100%,0 100%);background:linear-gradient(#ff753511,#ff9b4455);filter:blur(1px)}
.house-scene[data-warm-house=on] .emitter-glow{opacity:.65;animation:emitter-warmth 3.2s ease-in-out infinite}.house-scene[data-warm-house=on] .home-heat{animation:heat-breathe 3s ease-in-out infinite}
@keyframes emitter-warmth{50%{opacity:.95;filter:drop-shadow(0 0 3px #ff7a38)}}
.house-scene[data-state=unknown] .emitter-glow{opacity:0;animation:none}.house-scene[data-state=unknown] .rotor,.house-scene[data-state=unknown] .scene-compressor span{animation:none!important}.house-scene.paused .emitter-glow{animation:none}
@media(prefers-reduced-motion:reduce){.emitter-glow{animation:none!important}}
/* Readouts indicate active circuits without moving the temperature text. */
.house-scene[data-heat-water=on] .scene-badge.cwu{animation:reading-warmth 2.4s ease-in-out infinite}.house-scene[data-co=on] .scene-badge.co{animation:reading-warmth 2.4s ease-in-out infinite}.house-scene[data-warm-house=on] .scene-badge.room{animation:reading-warmth 2.4s ease-in-out infinite}
@keyframes reading-warmth{0%,100%{border-color:#b5775c;background:#302223dc;box-shadow:0 0 3px #ff774422}50%{border-color:#ffb17e;background:#4a2d25e8;box-shadow:0 0 13px #ff773b66,inset 0 0 9px #ff7a2b18}}
.house-scene[data-state=unknown] .scene-badge,.house-scene.paused .scene-badge{animation:none!important}@media(prefers-reduced-motion:reduce){.scene-badge{animation:none!important}}
