
:root{--bg:#f6f7fb;--ink:#232b40;--muted:#989eb1;--purple:#7658dc;--line:#eceef5;--shadow:0 5px 25px #27386405}*{box-sizing:border-box}body{margin:0;background:#e9ecf3;color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}button,input,select{outline-offset:4px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #aa92f4}button{border:0;background:none}button:disabled{opacity:.5;cursor:not-allowed}button:active:not(:disabled){transform:scale(.98)}[hidden]{display:none!important}.app{max-width:480px;min-height:100dvh;background:var(--bg);margin:auto;padding-bottom:105px;position:relative;box-shadow:0 0 100px #19284308}.top{padding:calc(24px + env(safe-area-inset-top)) 25px 16px;display:flex;align-items:center;justify-content:space-between}.wordmark{font-size:19px;font-weight:750;letter-spacing:-.9px}.wordmark span{color:#9677e5}.demo{background:#ede8fb;color:#9277c6;padding:5px 8px;border-radius:6px;font-size:9px;font-weight:650;letter-spacing:.8px;margin-left:8px}.avatar{background:#e8e4f5;width:39px;height:39px;border-radius:50%;display:grid;place-items:center;color:#9a83c4;font-weight:650;font-size:12px}.top .row{gap:0}.content{padding:0 24px}.greeting{margin:14px 0 23px}.greeting p{margin:0 0 8px;color:#a0a5b7;font-size:12px}.greeting h1{font-size:32px;font-weight:730;line-height:1.2;letter-spacing:-1.25px;margin:0;display:flex;align-items:center;gap:9px}.greeting h1 button{font-size:17px;color:#a2a7b8;padding:10px}.row{display:flex;align-items:center;gap:12px}.between{display:flex;align-items:center;justify-content:space-between;gap:10px}.muted{color:var(--muted)}.small{font-size:11px;line-height:1.6}.status-dot{width:5px;height:5px;border-radius:50%;background:#75ba9e;display:inline-block;margin-right:5px}.overview{display:flex;gap:0;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 25px}.overview>div{flex:1;padding-left:19px;border-left:1px solid var(--line)}.overview>div:first-child{padding-left:0;border:0}.overview small{display:flex;gap:5px;align-items:center;color:#a0a5b6;font-size:10px;margin-bottom:6px}.overview strong{font-size:20px;font-weight:600;letter-spacing:-.6px}.overview strong span{font-size:11px;font-weight:450;color:#8b93a8}.overview svg{width:12px;height:12px}.section-title{margin:24px 0 14px;display:flex;align-items:center;justify-content:space-between}.section-title h2{font-size:16px;letter-spacing:-.3px;margin:0;font-weight:650}.section-title button{color:#a6aabc;font-size:11px;min-height:35px;padding:7px 0 7px 12px}.scenes{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.scene{background:white;border:1px solid #eceef6;border-radius:17px;text-align:left;padding:13px 13px 12px;box-shadow:var(--shadow);min-height:85px}.scene .scene-symbol{width:30px;height:30px;border-radius:11px;display:grid;place-items:center;margin-bottom:10px;color:#9c87d2;background:#f0ebfb}.scene:nth-child(2) .scene-symbol{background:#fff1dc;color:#d8ac62}.scene:nth-child(3) .scene-symbol{background:#e7f5f2;color:#80adab}.scene svg{width:17px;height:17px}.scene strong{font-size:10px;font-weight:600}.tabs{display:flex;gap:20px;margin-top:26px;border-bottom:1px solid #e9ebf3}.tabs button{padding:0 0 12px;color:#a7acbc;font-size:12px;font-weight:550;border-bottom:2px solid transparent;min-height:34px}.tabs button.active{color:var(--ink);border-color:#9074d7}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:17px}.tile{border:1px solid #e9ecf4;border-radius:21px;background:white;position:relative;overflow:hidden;box-shadow:var(--shadow);min-width:0}.tile.active{background:#fffaf0;border-color:#f6ead4}.tile.active.fan{background:#eef7fc;border-color:#dfedf6}.tile.active.rgb{background:#f5f0fd;border-color:#eae0fa}.tile.active.security{background:#edf7f2;border-color:#daeee3}.tile.active.security.triggered{background:#fbeef2;border-color:#f1dce4}.tile.triggered h3,.tile.triggered p{color:#b27e8e}.tile-top{display:flex;align-items:center;justify-content:space-between;padding:15px 14px 0}.tile-dot{height:6px;width:6px;background:#cbd1de;border-radius:50%}.active .tile-dot{background:#d8b77a}.active.fan .tile-dot{background:#8bbad8}.active.rgb .tile-dot{background:#b49bdf}.active.security .tile-dot{background:#8cbdab}.tile-menu{color:#a6acbc;letter-spacing:1px;padding:0;width:30px;min-height:20px;font-size:15px}.tile-icon{display:block;width:72px;height:72px;margin:0 0 0 15px}.tile-body{display:block;text-align:left;padding:5px 17px 15px;width:100%}.tile h3{font-size:13px;font-weight:650;letter-spacing:-.1px;margin:0 0 5px;line-height:1.4}.tile p{font-size:10px;color:#8792a8;margin:0;min-height:16px}.tile-control{display:flex;align-items:center;justify-content:space-between;padding:0 16px 15px}.tile-control>span{font-size:11px;font-weight:500;color:#8f9bb0}.toggle{width:35px;height:21px;border-radius:20px;background:#e7eaf1;position:relative;min-height:21px;padding:0}.toggle:after{content:'';position:absolute;background:white;box-shadow:0 1px 3px #0001;width:15px;height:15px;border-radius:50%;top:3px;left:3px;transition:transform .2s}.toggle[aria-checked=true]{background:#a993d9}.toggle[aria-checked=true]:after{transform:translateX(14px)}.tile.active.light .toggle{background:#e6be72}.tile.active.fan .toggle{background:#8ebbd8}.tile-foot{border-top:1px solid #f1f2f7;padding:11px 15px;background:#ffffff50;font-size:9px;color:#a4adbf;display:flex;gap:5px;align-items:center}.tile-foot svg{width:11px;height:11px}.climate{background:white;border:1px solid #e9ecf4;border-radius:21px;padding:19px;margin-top:15px;box-shadow:var(--shadow)}.climate-head{display:flex;align-items:center;gap:12px}.climate-symbol{width:41px;height:41px;background:#f6eee8;color:#ce9f85;border-radius:14px;display:grid;place-items:center}.climate-head h3{font-size:12px;margin:0 0 4px;font-weight:650}.climate-head p{font-size:10px;color:#a0a7b9;margin:0}.climate-head button{margin-left:auto;color:#a9afbf;min-width:35px;min-height:35px}.climate-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:18px}.climate-temperature{font-size:30px;font-weight:550;letter-spacing:-1px}.climate-temperature small{font-size:13px;color:#9fa6b7;font-weight:400;margin-left:3px}.climate-chart{width:150px;height:45px}.climate-chart svg{width:100%;height:100%}.activity{display:flex;align-items:center;gap:10px;margin-top:25px;padding:0 2px;font-size:10px;color:#a0a7bb;line-height:1.7}.activity svg{color:#a895cf;width:15px;height:15px;flex-shrink:0}.activity span{overflow-wrap:anywhere}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);max-width:480px;width:100%;background:#ffffffee;backdrop-filter:blur(16px);display:flex;border-top:1px solid #e9ecf4;padding:12px 12px calc(15px + env(safe-area-inset-bottom));z-index:5}.bottom-nav button{display:flex;flex-direction:column;align-items:center;gap:7px;flex:1;color:#b5b9c8;font-size:9px;min-height:44px}.bottom-nav button svg{width:22px;height:22px;stroke-width:1.6}.bottom-nav button.active{color:#9274d6}.bottom-nav button.active .nav-icon{background:#f0eafb}.nav-icon{width:45px;height:28px;border-radius:10px;display:grid;place-items:center}.view{animation:appear .2s ease}.page-heading{margin:20px 0 23px}.page-heading h1{font-size:29px;font-weight:700;letter-spacing:-1px;margin:0 0 7px}.page-heading p{font-size:12px;color:#a0a7b9;margin:0;line-height:1.7}.filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none}.chip{border:1px solid #e7eaf2;border-radius:20px;background:white;color:#9aa3b8;font-size:11px;padding:9px 15px;white-space:nowrap}.chip.active{background:#ece5fa;color:#9374cc;border-color:#e4daf7}.list{background:white;border:1px solid #e9ecf4;border-radius:19px;overflow:hidden;margin-top:16px}.list-row{display:flex;align-items:center;gap:13px;padding:16px;width:100%;text-align:left;min-height:69px;border-bottom:1px solid #f0f2f7}.list-row:last-child{border:0}.list-icon{width:39px;height:39px;background:#f0ebf9;border-radius:13px;color:#a38bcf;display:grid;place-items:center;flex-shrink:0}.list-icon svg{width:21px;height:21px}.list-row .title{flex:1;min-width:0}.list-row h3{font-size:12px;font-weight:600;margin:0 0 4px}.list-row p{font-size:11px;color:#8996ad;margin:0;line-height:1.6}.chevron{color:#b5bbcc;margin-left:auto}.rule-card{background:white;border:1px solid #e8ebf3;border-radius:20px;margin-bottom:13px;padding:18px}.rule-card .row strong{font-size:12px;flex:1;font-weight:600}.rule-card .rule-lines{border-left:1px solid #e9e3f5;margin:19px 0 17px 17px;padding-left:19px;display:flex;flex-direction:column;gap:15px}.rule-lines div{position:relative;font-size:11px;color:#8e9ab1;line-height:1.6}.rule-lines div:before{content:'';position:absolute;left:-23px;top:5px;width:7px;height:7px;border:2px solid #bca7e4;background:white;border-radius:50%}.rule-lines small{font-size:8px;font-weight:700;color:#b3a0d1;letter-spacing:.7px;display:block}.btn{background:#f0ebfa;color:#9a7bd0;border:1px solid #e9dff8;border-radius:12px;min-height:43px;padding:10px 15px;font-size:12px;font-weight:600}.btn.primary{background:#9a7fd4;border-color:#9a7fd4;color:white}.btn.soft{background:#f5f6fa;color:#8d99af;border-color:#ecedf4}.btn.danger{color:#ca8b9a;background:#fcf0f3;border-color:#f6e3e8}.full{width:100%}.sheet{width:min(480px,100%);max-width:100%;max-height:90dvh;margin:auto auto 0;padding:0;border:0;border-radius:28px 28px 0 0;background:#fbfcfe;color:var(--ink);box-shadow:0 -20px 80px #17284413;position:fixed;bottom:0;top:auto}.sheet::backdrop{background:#26334766;backdrop-filter:blur(5px)}.handle{height:4px;width:34px;border-radius:3px;background:#dce0eb;margin:11px auto 10px}.sheet-top{display:flex;justify-content:space-between;align-items:center;padding:0 23px 10px}.sheet-top>span{font-size:10px;color:#a4adc0}.close{background:#f0f2f7;width:31px;height:31px;border-radius:50%;font-size:19px;color:#a8afbf}.sheet-body{padding:0 25px 28px;overflow:auto;max-height:calc(90dvh - 76px)}.detail-hero{text-align:center}.detail-hero .tile-icon{width:95px;height:95px;margin:0 auto 10px}.detail-hero h2{font-size:21px;font-weight:650;letter-spacing:-.5px;margin:0 0 6px}.detail-hero p{color:#a0a9ba;font-size:11px;margin:0 0 25px}.detail-box{background:white;border:1px solid #e9edf4;border-radius:17px;padding:19px;margin:15px 0}.detail-value{font-size:39px;letter-spacing:-1.5px;font-weight:500}.detail-value small{color:#a6afc0;font-size:15px;font-weight:400}.stepper{display:flex;justify-content:center;align-items:center;gap:30px;padding:12px 0}.stepper button{width:42px;height:42px;border-radius:50%;background:#f0ebfa;color:#a28bd0;font-size:23px}.range{width:100%;height:8px;accent-color:#a98edc;margin:22px 0;cursor:pointer}.range-ends{display:flex;justify-content:space-between;font-size:10px;color:#aeb6c6}.field{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#919fb5;margin:16px 0}.field input,.field select,.field textarea{padding:13px;border:1px solid #e4e9f2;border-radius:12px;width:100%;background:white;color:#65758f;min-height:44px}.field input[type=color]{padding:4px;height:47px}.feedback{font-size:11px;color:#a0a8bb;text-align:center;line-height:1.8;min-height:22px;margin:15px 0}.feedback.success{color:#7aa894}.feedback.error{color:#cb8b9a}.palette{display:flex;justify-content:center;gap:11px;margin:20px 0}.palette button{width:35px;height:35px;border:4px solid white;border-radius:50%;outline:1px solid #e3e7f1}.palette button.selected{outline:2px solid #bda6e4}.shield-modes{display:flex;gap:8px;margin:18px 0}.shield-modes button{flex:1;font-size:10px;min-height:47px}.note{padding:13px 15px;background:#f2edf9;border-radius:12px;color:#a392bb;font-size:10px;line-height:1.8;margin:17px 0}.banner{display:flex;align-items:center;gap:10px;background:#fcf0e2;color:#b59b78;padding:12px 15px;border-radius:13px;font-size:10px;margin-bottom:18px;line-height:1.6}.progress{height:7px;background:#ebe6f4;border-radius:8px;overflow:hidden;margin:18px 0}.progress>div{height:100%;width:0;background:#b9a1e3;border-radius:8px;transition:width .2s}.log{font:10px/1.8 ui-monospace,Consolas,monospace;color:#96a1b6;padding:12px 0;border-bottom:1px solid #eceff5;overflow-wrap:anywhere}.log small{font-size:9px;color:#b4bdd0;display:block}.alarm-state{padding:17px;background:#edf6f1;color:#8daf9e;border-radius:14px;text-align:center;font-size:13px;margin:15px 0}.alarm-state.triggered{background:#fceef1;color:#c48b98}.toast{position:fixed;left:50%;bottom:100px;transform:translateX(-50%);width:calc(100% - 40px);max-width:410px;background:#465169ee;backdrop-filter:blur(12px);color:white;padding:14px 18px;border-radius:15px;font-size:11px;line-height:1.7;z-index:15;box-shadow:0 5px 30px #27384d15}.add-btn{border:1px dashed #dbd2ed;background:#f4effa;color:#a38bca;width:100%;padding:16px;border-radius:17px;font-size:12px}.sensor-mini{font-size:31px;color:#7f8dab;font-weight:500;letter-spacing:-1px;margin:10px 0}.sheet-body .sensor-mini{margin:0}.readings{display:grid;grid-template-columns:1fr 1fr;gap:12px}.reading{background:white;border:1px solid #e8ecf4;border-radius:19px;padding:17px}.reading p{font-size:10px;color:#a6afc0;margin:8px 0}.reading .list-icon{width:35px;height:35px}.reading strong{font-size:25px;font-weight:550;color:#8a96ae}.reading strong small{font-size:12px;color:#b1b9c8;font-weight:400}.mini-chart{width:100%;height:100px;display:block;margin:15px 0}.technical{font:10px/1.9 ui-monospace,Consolas,monospace;color:#9ca9bf;white-space:pre-wrap}.alert-badge{position:absolute;right:11px;top:11px;padding:3px 6px;font-size:8px;background:#f8e7ec;color:#c18a9b;border-radius:5px}.lightbulb-shape{filter:drop-shadow(0 5px 4px #caa15922)}svg.ico{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.empty{padding:25px;text-align:center;color:#a2adc1;font-size:12px;line-height:1.8}.demo-footer{text-align:center;font-size:9px;color:#b3baca;margin:25px 0 0}.view-switch{display:flex;gap:8px;align-items:center}.badge{font-size:9px;border-radius:5px;padding:4px 7px;background:#f0ebfa;color:#a088cd}.screen-subtitle{font-size:11px;color:#abb4c6}.mode-row{display:flex;gap:7px;margin:15px 0}.mode-row button{flex:1;padding:10px 3px;font-size:10px;border:1px solid #e8e2f4;background:#f6f2fb;border-radius:10px;color:#a18ac6}.mode-row button.active{background:#b29bdc;color:white;border-color:#b29bdc}@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(min-width:600px){.app{margin:25px auto;border-radius:30px;overflow:hidden;min-height:calc(100dvh - 50px)}.bottom-nav{bottom:25px;border-radius:0 0 30px 30px}.sheet{bottom:25px;border-radius:28px;max-height:85dvh}.sheet-body{max-height:calc(85dvh - 76px)}}@media(max-width:355px){.content{padding:0 17px}.top{padding-left:18px;padding-right:18px}.tile h3{font-size:11px}.tile-body{padding-left:13px;padding-right:13px}.scene{padding:12px 10px}.tile-icon{margin-left:11px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}


/* Control v03: one interface, phone and desktop layouts. Icons: Lucide. */
:root{--bg:#f5f7fa;--ink:#182335;--muted:#65758b;--purple:#2563eb;--line:#e5eaf1;--accent:#2563eb;--shadow:0 3px 16px #182a4604}
body{background:var(--bg);color:var(--ink)}
button:focus-visible,input:focus-visible,select:focus-visible{outline-color:#2563eb}
.app{background:var(--bg)}
.wordmark span,.bottom-nav button.active{color:var(--accent)}
.demo,.badge{background:#eaf1ff;color:#285bb0}.avatar{background:#e9eff7;color:#456082}
.greeting p,.overview small,.page-heading p,.climate-head p,.detail-hero p,.small.muted,.field,.sheet-top>span{color:#6b7b91}
.greeting h1 button,.section-title button,.tile-menu,.chevron,.close{color:#6d7d93}
.overview strong span,.climate-temperature small,.detail-value small{color:#68798f}
.status-dot{background:#16a36b}.scene .scene-symbol{color:#2563eb;background:#edf3ff}.scene:nth-child(2) .scene-symbol{color:#e29709;background:#fff5df}.scene:nth-child(3) .scene-symbol{color:#16966a;background:#eaf8f1}
.scene strong{font-size:11px;color:#37465c}.tabs button{color:#738198}.tabs button.active{color:#1b2c45;border-color:#2563eb}
.tile,.list,.climate,.reading,.rule-card{border-color:#e4eaf1;background:#fff;box-shadow:0 3px 14px #263b6003}
.tile.active{background:#fff;border-color:#ead8ac}.tile.active.fan{background:#fff;border-color:#c6dcec}.tile.active.rgb{background:#fff;border-color:#daccf5}.tile.active.security{background:#fff;border-color:#c5e3d4}
.tile.active.light{background:linear-gradient(145deg,#fff 68%,#fff9e9)}
.tile.active.fan{background:linear-gradient(145deg,#fff 68%,#f0f8ff)}
.tile.active.rgb{background:linear-gradient(145deg,#fff 68%,#f7f2ff)}
.tile.active.security{background:linear-gradient(145deg,#fff 68%,#effaf4)}
.tile.active.security.triggered{background:#fff1f3;border-color:#e9a8b4}.tile.triggered h3,.tile.triggered p{color:#bc3d58}
.tile p,.tile-control>span,.activity,.reading p,.list-row p,.rule-lines div,.climate-head p,.range-ends,.feedback{color:#687a91}
.tile-dot{background:#bbc5d3}.active .tile-dot{background:#f4aa14}.active.fan .tile-dot{background:#1988d3}.active.rgb .tile-dot{background:#9559e1}.active.security .tile-dot{background:#10a371}
.art{width:64px;height:64px;border-radius:19px;background:#f0f3f8;color:#8595ab;display:grid;place-items:center;margin:6px 0 11px 17px}
.art svg.ico{width:33px;height:33px;stroke-width:1.75}
.active .art.light,.detail-hero .art.light{background:#fff1c9;color:#edab13}.active .art.fan,.detail-hero .art.fan{background:#e2f2ff;color:#1688d9}
.active .art.rgb,.detail-hero .art.rgb{background:#f0e7ff;color:#9756e1}.active .art.shield,.detail-hero .art.shield{background:#def5e9;color:#14a572}
.active .art.temp,.detail-hero .art.temp{background:#fff0e4;color:#eb7c32}.active .art.servo,.detail-hero .art.servo{background:#e7edff;color:#526fd8}
.detail-hero .art.plug{background:#eaf0f7;color:#56789e}.detail-hero .art.timer{background:#fff2db;color:#c98b21}.detail-hero .art.door{background:#e7f4ef;color:#299470}
.tile.triggered .art{background:#ffe2e8;color:#d34c67}
.toggle[aria-checked=true]{background:#2563eb}.tile.active.light .toggle{background:#efae23}.tile.active.fan .toggle{background:#168bd8}
.tile.active.rgb .toggle{background:#9254d8}.tile.active.security .toggle{background:#0e9d6b}
.bottom-nav{border-color:#e4eaf1}.bottom-nav button{color:#74839b;font-size:10px}.bottom-nav button.active .nav-icon{background:#e9f0ff}
.chip{color:#6b7b92}.chip.active{background:#eaf1ff;color:#245ebe;border-color:#ccdcfc}
.list-icon,.climate-symbol{color:#2563eb;background:#eaf1ff}.reading strong{color:#213751}.reading strong small{color:#647992}
.btn{background:#edf3ff;border-color:#dbe6fb;color:#245fc3}.btn.primary{background:#2563eb;border-color:#2563eb;color:#fff}.btn.primary:hover{background:#1d55d0}
.btn.soft{background:#f1f4f8;border-color:#e6ebf1;color:#526b88}.btn.danger{color:#c5405e;background:#fff0f4;border-color:#f5d7df}
.stepper button{background:#eaf1ff;color:#2563eb}.range{accent-color:#2563eb}.palette button.selected{outline-color:#2563eb}
.note{color:#5f7392;background:#edf2f9}.banner{background:#fff5e0;color:#9b6a17}.field input,.field select,.field textarea{color:#30475f}
.feedback.success{color:#138657}.feedback.error{color:#c6415d}.rule-lines small{color:#537bc0}.rule-lines div:before{border-color:#5c8ae5}
.progress>div{background:#2563eb}.alarm-state{background:#eaf7f0;color:#1a865e}.alarm-state.triggered{background:#fff0f3;color:#c44160}
.log{color:#4e6580}.log small{color:#8795a8}.demo-footer{color:#7e8da1}.mode-row button{background:#edf3fd;color:#4770a9;border-color:#dce6f8}.mode-row button.active{background:#2563eb;color:white}
.add-btn{background:#edf3ff;border-color:#b8cef7;color:#2e64bc}.scene,.tile,.climate,.rule-card{transition:border-color .15s,box-shadow .15s,transform .15s}.tile:hover{box-shadow:0 6px 22px #1c3b6510}.scene:hover{border-color:#bdcdec}
.detail-hero .art{margin:5px auto 17px;width:80px;height:80px;border-radius:24px}.detail-hero .art svg{width:42px;height:42px}
.desktop-sidebar,.desktop-context,.desktop-only{display:none}.dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.heading-actions{display:none}
.main-devices .tiles{margin-top:0}.sensor-grid-wrap .readings{margin-top:17px}.main-devices>.section-title{display:none}.desktop-rail{display:none}
/* Touch areas stay generous while the visible switch remains compact. */
.toggle:before{content:'';position:absolute;inset:-11px -5px}.tile-menu:before{content:'';position:absolute;inset:-5px}.tile-menu{position:relative}
@media(max-width:767px){
 .app{max-width:600px;margin:0 auto;border-radius:0;box-shadow:none;min-height:100dvh;overflow:visible}
 .bottom-nav{max-width:600px;bottom:0;border-radius:0}.sheet{bottom:0;border-radius:26px 26px 0 0;max-height:90dvh}.sheet-body{max-height:calc(90dvh - 76px)}
 .greeting p{font-size:12px}.tile p{font-size:11px}.tile h3{font-size:13px}.scene strong{font-size:11px}.overview small{font-size:11px}.scene .scene-symbol{margin-bottom:9px}
}
@media(min-width:768px){
 .mobile-profile{display:none}
 .app{max-width:none;margin:0;padding:0 0 35px 218px;min-height:100dvh;border-radius:0;box-shadow:none;overflow:visible}
 .desktop-sidebar{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:218px;background:white;border-right:1px solid #e4eaf1;z-index:6;padding:31px 21px 24px}
 .desktop-sidebar .wordmark{font-size:27px;letter-spacing:-1.3px}.desktop-brand-note{font-size:8px;letter-spacing:1.7px;color:#9aa7b9;margin:8px 0 33px}
 .sidebar-label{font-size:9px;color:#9ba9bb;font-weight:650;letter-spacing:1.2px;margin:26px 12px 12px}
 #desktop-nav{display:flex;flex-direction:column;gap:7px}#desktop-nav button{display:flex;align-items:center;gap:11px;min-height:44px;padding:12px 14px;border-radius:10px;text-align:left;color:#6c7f99;font-size:12px;font-weight:550}
 #desktop-nav button svg{width:18px;height:18px}#desktop-nav button.active{background:#edf3ff;color:#2563eb}
 .desktop-spaces{display:flex;flex-direction:column;gap:5px}.desktop-spaces button{display:flex;align-items:center;gap:10px;padding:10px 14px;text-align:left;color:#71839c;font-size:11px;border-radius:9px}.desktop-spaces button svg{width:16px;height:16px}.desktop-spaces button.active{background:#f3f6fa;color:#3c587b}
 .sidebar-foot{margin-top:auto;padding:20px 12px 0;border-top:1px solid #eef1f5;font-size:10px;color:#8b9aaf;line-height:1.8}.sidebar-foot strong{color:#506783;font-size:11px;font-weight:550}.sidebar-foot small{font-size:9px;color:#93a1b4}
 .top{height:78px;padding:0 30px;background:white;border-bottom:1px solid #e5eaf1;gap:14px}.top>.row>.wordmark{display:none}.top>.row{gap:12px}.top .demo{margin:0;order:2;font-size:9px}
 .desktop-context{display:flex;align-items:center;gap:9px;color:#8290a5;font-size:11px}.desktop-context strong{color:#435c7a;font-weight:550}.desktop-top-actions{display:flex;align-items:center;gap:20px;margin-left:auto}.desktop-top-actions time{color:#8494a9;font-size:11px}.avatar{width:34px;height:34px}
 .content{padding:25px 27px 20px;max-width:1540px;margin:auto}.bottom-nav{display:none}.demo-footer{margin:15px 0 0}.dashboard-heading .greeting{margin:0 0 24px}.greeting h1{font-size:31px;letter-spacing:-1px}.greeting p{font-size:11px;margin-bottom:8px}
 .heading-actions{display:flex;gap:9px;align-items:center;margin-top:-18px}.heading-actions .btn{font-size:11px;min-height:37px;padding:8px 12px;border-radius:9px}.heading-actions .btn svg{width:15px;height:15px}
 .overview{background:white;border:1px solid #e4eaf1;border-radius:14px;padding:21px 22px;margin-bottom:25px;gap:0}.overview>div{padding-left:26px}.overview strong{font-size:26px}.overview strong span{font-size:11px}.overview small{font-size:10px;gap:7px;margin-bottom:9px}.overview svg{width:13px;height:13px}
 .home-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(245px,.66fr);gap:23px;align-items:start}.home-left{min-width:0}.scene-section .section-title{margin:0 0 13px}.section-title h2{font-size:14px}.section-title button{font-size:10px}
 .scenes{gap:10px}.scene{display:flex;align-items:center;gap:10px;min-height:65px;padding:13px 10px;border-radius:13px}.scene .scene-symbol{margin:0;width:32px;height:32px;border-radius:10px;flex-shrink:0}.scene strong{font-size:10px;line-height:1.5}
 .tabs{margin-top:28px;gap:22px}.tabs button{font-size:11px;padding-bottom:14px}.main-devices .tiles{margin-top:17px;gap:13px}.tile{border-radius:17px}.tile-top{padding:12px 13px 0}.tile-body{padding:0 15px 13px}.tile h3{font-size:13px}.tile p{font-size:10px}.tile .art{margin:3px 0 12px 0;width:52px;height:52px;border-radius:15px}.tile .art svg{width:28px;height:28px}.tile-control{padding:0 14px 15px}.tile-control>span{font-size:10px}.tile-menu{font-size:13px}
 .desktop-rail{display:flex;flex-direction:column;gap:18px}.rail-card{background:white;border:1px solid #e3e9f2;border-radius:15px;padding:20px;min-width:0}.rail-card h2{font-size:13px;font-weight:650;margin:0}.rail-card .caption{font-size:10px;color:#8798af;margin-top:7px;line-height:1.7}.rail-card .section-title{margin:0 0 18px}.rail-value{font-size:32px;font-weight:600;letter-spacing:-1px;color:#243c59}.rail-value small{font-size:12px;color:#8b9ab0;font-weight:400}.rail-measure{display:flex;justify-content:space-between;align-items:baseline}.rail-measure .trend{font-size:9px;background:#eaf7f0;color:#198c65;padding:5px 7px;border-radius:5px}
 .desktop-chart{width:100%;height:130px;display:block;margin:15px 0 0}.chart-legend{display:flex;gap:14px;font-size:9px;color:#8393aa;margin-top:8px}.chart-legend i{width:5px;height:5px;border-radius:50%;display:inline-block;background:#2563eb;margin-right:4px}.chart-legend span:nth-child(2) i{background:#d39529}
 .hardware-row{display:flex;align-items:center;gap:11px}.hardware-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#edf3ff;color:#2563eb;flex-shrink:0}.hardware-icon svg{width:20px;height:20px}.hardware-row h3{font-size:11px;font-weight:600;margin:0 0 5px}.hardware-row p{font-size:9px;color:#8494a9;margin:0}.hardware-data{margin-top:18px;padding-top:15px;border-top:1px solid #edf1f5;display:grid;grid-template-columns:1fr 1fr;gap:15px}.hardware-data span{display:block;font-size:9px;color:#8998ac;margin-bottom:5px}.hardware-data strong{font-size:11px;font-weight:550;color:#4d6582}
 .rail-link{border-top:1px solid #edf1f5;margin:18px -20px -20px;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#4774b4;width:calc(100% + 40px);text-align:left}.rail-link svg{width:13px;height:13px}
 .event-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #f0f3f7;align-items:flex-start}.event-item:last-child{border:0}.event-symbol{width:24px;height:24px;border-radius:7px;display:grid;place-items:center;background:#f2f5fa;color:#8299b9;flex-shrink:0}.event-symbol svg{width:12px;height:12px}.event-item p{font-size:10px;line-height:1.65;color:#5b718d;margin:0;overflow-wrap:anywhere}.event-item time{font-size:8px;color:#9aa8ba;display:block;margin-top:4px}
 .mobile-climate{display:none}.activity{margin-top:20px;background:white;border:1px solid #e5eaf2;border-radius:11px;padding:13px 16px;font-size:10px}
 .page-heading{margin:0 0 27px}.page-heading h1{font-size:30px}.page-heading p{font-size:12px}.view>.tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:23px}.view>.tiles .tile .art{width:59px;height:59px}.view>.tiles .tile .art svg{width:31px;height:31px}
 .routine-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.routine-grid .rule-card{margin:0;display:flex;flex-direction:column}.routine-grid .rule-card>.btn{margin-top:auto}.flow-create{margin-top:20px;max-width:400px}.more-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:24px}.more-layout .list{margin:0}.more-layout>.note{margin:0;align-self:start;padding:23px;line-height:1.9;font-size:12px;border:1px solid #e2e9f4;border-radius:15px}.more-reset{margin-top:18px;max-width:300px}
 .sheet{width:445px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);margin:auto 20px auto auto;inset:20px 0 20px auto;bottom:20px;top:20px;border-radius:20px;box-shadow:-10px 0 70px #172d4a20}.handle{display:none}.sheet-top{padding:19px 22px 13px;border-bottom:1px solid #ecf0f6;margin-bottom:18px}.sheet-body{max-height:calc(100dvh - 128px);padding-bottom:26px}.sheet::backdrop{background:#24334c44;backdrop-filter:blur(2px)}.detail-hero .art{width:75px;height:75px}.detail-hero .art svg{width:38px;height:38px}
 .toast{bottom:28px;left:calc(50% + 109px);font-size:12px;max-width:430px}.sensor-grid-wrap>.readings{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:1180px){
 .app{padding-left:238px}.desktop-sidebar{width:238px;padding-left:24px;padding-right:24px}.content{padding:31px 38px 20px}.top{padding:0 38px}.home-grid{grid-template-columns:minmax(0,1fr) 320px;gap:27px}.main-devices .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}.scene{padding:13px 15px;gap:12px}.scene strong{font-size:11px}.view>.tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.routine-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tile h3{font-size:14px}.tile p{font-size:11px}.toast{left:calc(50% + 119px)}
}
@media(min-width:1500px){.home-grid{grid-template-columns:minmax(0,1fr) 350px}.main-devices .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.scene{min-height:74px}.tile .art{width:60px;height:60px}.tile .art svg{width:32px;height:32px}}
@media(min-width:1180px) and (max-width:1399px){.main-devices .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1400px){.main-devices .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:768px) and (max-width:1023px){
 .app{padding-left:190px}.desktop-sidebar{width:190px;padding-left:14px;padding-right:14px}.content{padding:24px}
 .home-grid{grid-template-columns:1fr}.desktop-rail{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:4px}.desktop-rail .rail-card:last-child{grid-column:span 2}
 .view>.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-grid,.more-layout{grid-template-columns:1fr}.more-layout{gap:16px}
 .heading-actions .btn{font-size:10px;padding:8px}.heading-actions .btn:first-child{display:none}.greeting h1{font-size:27px}.desktop-top-actions time{display:none}
}
/* v04 alternative: navigation across the top, preserving the mobile app layout. */
@media(max-width:767px){#desktop-nav{display:none}}
@media(min-width:768px){
 .app{padding-left:0}.top{padding:0 28px;gap:20px;position:sticky;top:0;z-index:5;height:80px}
 .top>.row>.wordmark{display:block;font-size:25px;letter-spacing:-1.2px}.top>.row{gap:7px;flex-shrink:0}.top .demo{font-size:8px;padding:4px 6px}
 #desktop-nav{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;margin:0 auto}
 #desktop-nav button{padding:10px 13px;gap:8px;min-height:40px;border-radius:10px;font-size:12px;white-space:nowrap;color:#75849a}
 #desktop-nav button svg{width:17px;height:17px}#desktop-nav button.active{background:#edf3ff;color:#2563eb}
 .desktop-top-actions{margin-left:0;gap:17px;flex-shrink:0}.desktop-top-actions time{font-size:10px}
 .content{padding:31px 32px 22px;max-width:1360px}.home-grid{grid-template-columns:minmax(0,1fr) 300px;gap:26px}
 .main-devices .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}.main-devices .tiles:has(>.tile:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
 .toast{left:50%}.heading-actions .btn:first-child{display:inline-flex}
 .desktop-rail{display:flex}.desktop-rail .rail-card:last-child{grid-column:auto}
}
@media(min-width:768px) and (max-width:1030px){
 .top{gap:12px;padding:0 23px}#desktop-nav button{padding:9px 10px;font-size:11px}.top .demo{display:none}.desktop-top-actions time{display:none}
 .content{padding:25px}.home-grid{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.scene{gap:7px;padding:12px 9px}.scene strong{font-size:10px}
 .heading-actions .btn{font-size:10px}.heading-actions .btn:first-child{display:none}.main-devices .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1300px){.main-devices .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.main-devices .tiles:has(>.tile:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}.home-grid{grid-template-columns:minmax(0,1fr) 320px;gap:30px}}


/* Only API forms and operational states not present in the approved mockup. */
.source-badge-gap{margin-left:6px}
.sensor-dot.color-0{background:#2563eb}.sensor-dot.color-1{background:#e49416}.sensor-dot.color-2{background:#129d79}.sensor-dot.color-3{background:#9859d7}.sensor-dot.color-4{background:#df657b}.sensor-dot.color-5{background:#2197b3}.sensor-dot.color-6{background:#bd7c39}.sensor-dot.color-7{background:#6e78bf}
.live-login{max-width:410px;padding:54px 25px;margin:5vh auto}.live-login .wordmark{font-size:30px;margin-bottom:45px}.live-login .page-heading h1{font-size:32px}.live-login .field input{font-size:16px}.login-demo{margin-top:12px}.login-caption{text-align:center;font-size:10px;margin-top:23px}.status-dot.stale{background:#bb8d35}.status-dot.offline{background:#96a2b4}.source-warning{background:#fff5e0;color:#9b6a17}.command-pending{color:#9a721d!important}.command-failed{color:#bd405b!important}.run-card{margin:16px 0}.run-card h3{font-size:13px;margin:0 0 8px}.run-card p{font-size:11px;color:#687b95;line-height:1.8}.run-card .row{flex-wrap:wrap}.run-chart{width:100%;height:220px;display:block}.run-chart text{font:9px 'Segoe UI',sans-serif;fill:#8395ad}.run-meta{font-size:10px;color:#8091a8;margin-bottom:15px}.sensor-selection{display:flex;align-items:center;gap:9px;font-size:12px;padding:13px 0;border-bottom:1px solid #edf0f5}.sensor-selection input{accent-color:#2563eb}.sensor-selection span{flex:1}.sensor-selection small{font-size:9px;color:#8395ad;display:block;margin-top:4px}.live-table{display:grid;grid-template-columns:1fr 1fr;gap:20px}.live-table small{color:#8496ae;font-size:9px;display:block;margin-bottom:6px}.live-table strong{font-size:12px;font-weight:550;overflow-wrap:anywhere}.live-ota-jobs .log{font-size:11px}.live-file{font-size:11px;max-width:100%}.live-mode{flex-wrap:wrap}.live-unsupported{color:#788ba5!important}.chart-empty-live{display:grid;place-items:center;text-align:center;height:130px;color:#8798ad;font-size:11px;line-height:1.8}.run-links{display:flex;gap:9px;flex-wrap:wrap}.run-links a{display:inline-flex;align-items:center;text-decoration:none;justify-content:center}.sensor-dot{width:6px;height:6px;border-radius:50%;display:inline-block}.live-checkbox{display:flex;align-items:center;gap:8px;font-size:11px;color:#7489a5}.run-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.live-swatches{display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:#7487a0;margin:12px 0}.live-swatches span{display:inline-flex;align-items:center;gap:5px}.live-ota-actions{display:flex;gap:8px;flex-wrap:wrap}.live-ota-actions .btn{flex:1}.tile .tile-body{margin:0}.tile .toggle:disabled{opacity:1;background:#dce2eb}.tile .toggle[aria-checked=true]:disabled{background:#9caec5}
@media(max-width:767px){.live-login{margin:0 auto;padding-top:40px}.live-login .field input,.sheet .field input,.sheet .field select,.sheet .field textarea{font-size:16px}.live-table{gap:17px}.run-grid{display:block}.run-chart{height:180px}}

.climate-chart .chart-empty-live{height:54px;font-size:9px;line-height:1.35;display:flex;align-items:center;justify-content:center}
