:root{color-scheme:light;--ink:#172c45;--muted:#506780;--blue:#2458d1;--line:#dbe5f2;--green:#176c53;--paper:#fff;--bg:#edf2fa;font-family:Roboto,"Segoe UI",sans-serif;color:var(--ink);background:#dbe5f2}
*{box-sizing:border-box}body{margin:0}.app{max-width:580px;min-height:100dvh;margin:auto;background:var(--bg);position:relative}.icon{display:block;width:22px;height:22px;flex:none}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #4981ec;outline-offset:3px}button:focus:not(:focus-visible){outline:none}
.top{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 10px;gap:8px}.brand{display:flex;align-items:center;gap:10px;border:0;background:none;text-align:left;color:var(--ink);font-weight:800;font-size:18px;padding:0;min-height:44px}.brand-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#163555;color:white}.brand small{display:block;font-size:9px;letter-spacing:.11em;color:var(--muted);margin-top:3px}.demo-badge,.label{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;background:#e1eafe;color:#2d4d86;font-size:11px;font-weight:700;white-space:nowrap}.demo-badge i,.dot{height:7px;width:7px;border-radius:50%;background:#4d75c6;display:inline-block}.dot.on{background:#28a776}.dot.off{background:#cc6843}
main{padding:10px 20px calc(96px + env(safe-area-inset-bottom));min-width:0}h1,h2,h3,p{margin:0}h1{font-size:29px;line-height:1.15;letter-spacing:-.045em}h2{font-size:18px;letter-spacing:-.02em}h3{font-size:15px;line-height:1.3}p,.muted{color:var(--muted);font-size:13px;line-height:1.45}.heading{margin:9px 0 17px}.heading p{margin-top:5px}.section{margin-top:20px}.between{display:flex;justify-content:space-between;align-items:center;gap:10px}.section-title{margin-bottom:9px}.inline-link{border:0;background:none;color:#224dad;font-weight:700;padding:6px 0;min-height:36px}.hero{position:relative;isolation:isolate;overflow:hidden;min-height:175px;padding:18px;border-radius:23px;color:white;background:linear-gradient(125deg,#153554 16%,#204d89 72%,#2b62aa);box-shadow:0 10px 24px #193f6928}.hero h1{margin:10px 0 5px}.hero p{color:#d5e5fa;max-width:205px}.hero .hero-tag{background:#ffffff22;color:white}.hero-status{margin-top:14px;font-size:12px;display:flex;gap:6px;align-items:center}.house-art{position:absolute;right:9px;bottom:10px;height:124px;width:137px;display:grid;place-items:center;z-index:-1;border:1px solid #ffffff32;border-radius:50%;background:radial-gradient(#93b9f847,transparent 72%)}.house-art .icon{width:87px;height:87px;stroke-width:1;color:#d5eaff;filter:drop-shadow(0 0 7px #a8d4ffa6)}
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.tile,.card,.list{background:var(--paper);border:1px solid var(--line);border-radius:16px}.tile{padding:11px;text-align:left;color:var(--ink);min-width:0}.tiles.metrics{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:11px}.metric-label{display:block;color:var(--muted);font-size:11px;margin:5px 0 2px}.metric strong{font-size:19px;letter-spacing:-.035em;white-space:nowrap}.metric em{font-size:10px;font-style:normal;color:var(--muted);margin-left:2px}.tile-icon{width:33px;height:33px;display:grid;place-items:center;border-radius:10px;background:#eaf0ff;color:#315bc0;flex:none}.tile-icon .icon{width:18px;height:18px}.warm{background:#fff1db;color:#94510a}.teal{background:#dcf5ec;color:#146850}.pink{background:#f5e9ff;color:#7442a7}.card{padding:13px;margin-bottom:8px}.card p{margin-top:4px}.row{display:flex;align-items:center;gap:10px;min-width:0}.grow{flex:1;min-width:0}.list{overflow:hidden}.list .row{padding:10px 12px;min-height:57px}.list .row+.row{border-top:1px solid var(--line)}.shortcut{width:100%;background:transparent;border:0;text-align:left;color:var(--ink)}.shortcut .chevron{width:17px;height:17px;color:var(--muted)}.row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.event-time{font-size:10px;color:var(--muted);white-space:nowrap}.good{color:var(--green)}.bad{color:#9e4022}
.tabs{display:flex;gap:6px;margin:8px 0 14px;flex-wrap:wrap}.tab,.btn{border:1px solid var(--line);background:white;border-radius:11px;color:var(--ink);padding:9px 12px;min-height:42px;font-weight:700;font-size:13px}.tab.active,.btn.primary{background:var(--blue);color:white;border-color:var(--blue)}.tab:hover,.btn:hover,.shortcut:hover{filter:brightness(.97)}.room-card{min-height:107px}.room-card h3{margin-top:7px}.room-card p{font-size:11px;margin-top:3px}.room-status{font-size:11px;color:var(--muted)}.back{margin-bottom:8px}.switch{width:45px;height:27px;flex:none;border:0;background:#738398;border-radius:30px;padding:3px;position:relative;touch-action:manipulation}.switch::after{content:"";display:block;width:21px;height:21px;background:white;border-radius:50%;box-shadow:0 1px 2px #23324e35;transition:transform .16s}.switch[aria-checked=true]{background:var(--blue)}.switch[aria-checked=true]::after{transform:translateX(18px)}.switch::before{content:"";position:absolute;inset:-8px 0}.input{display:grid;gap:4px;font-weight:700;color:var(--ink);font-size:12px;min-width:0}.input input,.input select{min-width:0;width:100%;padding:8px;border:1px solid #becde2;border-radius:8px;background:white;color:var(--ink);min-height:40px}input[type=range]{width:100%;accent-color:var(--blue);margin:14px 0 5px}.form-row{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin-top:10px}.form-row .input{flex:1 1 106px}.buttons{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.notice{background:#e4ecfc;border-radius:11px;padding:9px 11px;color:#244575;font-size:12px;line-height:1.45;margin:8px 0}.notice.warn{background:#fbecd9;color:#804816}.sensor-values{margin:9px 0 4px;font-weight:800;font-size:16px;overflow-wrap:anywhere}.sensor-values span{display:block;margin-bottom:2px}.sensor-note{overflow-wrap:anywhere}.lock-banner{display:grid;place-items:center;padding:17px;text-align:center;background:#e3edff;border-radius:19px;margin-bottom:11px;color:#214eaa}.lock-banner.open{background:#def5e8;color:#166643}.lock-banner .lock-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:17px;background:#fff;margin-bottom:7px}.lock-banner .lock-icon .icon{width:29px;height:29px}.lock-banner h2{font-size:22px}.countdown{font-variant-numeric:tabular-nums}.days{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;margin-top:9px}.days label{display:inline-flex;align-items:center;gap:2px}.days input{accent-color:var(--blue)}summary{cursor:pointer;font-weight:700;color:#294d9b;margin-top:8px}.result{display:block;color:var(--muted);font-size:12px;padding:3px 0}.empty{padding:11px;color:var(--muted);font-size:13px}
#nav{position:fixed;z-index:2;bottom:0;left:50%;transform:translateX(-50%);width:min(580px,100%);padding:5px 5px calc(6px + env(safe-area-inset-bottom));background:#fffffffa;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));box-shadow:0 -7px 25px #31476b12}#nav button{background:transparent;border:0;color:var(--muted);font-size:10px;font-weight:700;display:grid;justify-items:center;align-content:center;gap:3px;padding:3px 0;min-height:49px}#nav button span:first-child{width:47px;height:28px;border-radius:12px;display:grid;place-items:center}#nav button[aria-current=page]{color:#214fac}#nav button[aria-current=page] span:first-child{background:#e4edff}#nav .icon{width:19px;height:19px}#toast{position:fixed;z-index:3;bottom:calc(69px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(90%,470px);padding:10px 14px;background:#173653;color:white;border-radius:12px;font-size:13px;box-shadow:0 6px 20px #102b4c36}
@media(max-width:360px){main{padding-inline:13px}.top{padding-inline:13px}.house-art{right:4px;width:96px;height:94px}.house-art .icon{width:61px;height:61px}.hero p{max-width:175px}.metric strong{font-size:16px}#nav button{font-size:9px}}@media(prefers-reduced-motion:reduce){*,*::after{transition:none!important}}

.theme-picker{margin:17px 0 8px;min-inline-size:0;display:flex;gap:8px}
.theme-picker legend{padding:0 5px;font-size:14px;font-weight:700}
.theme-picker label{display:flex;align-items:center;gap:6px;flex:1;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;font-size:13px;font-weight:700;cursor:pointer}
.theme-picker input{margin:0;accent-color:var(--blue)}

:root[data-theme="dark"]{
  color-scheme:dark;
  --ink:#edf3ff;
  --muted:#bbc9dd;
  --blue:#3971e4;
  --line:#344660;
  --green:#7cddb4;
  --paper:#192639;
  --bg:#101827;
  --tint:#233a61;
  --link:#abc7ff;
  background:#0b1220;
}
[data-theme="dark"] .demo-badge,[data-theme="dark"] .label,
[data-theme="dark"] .tile-icon,[data-theme="dark"] .notice{
  background:var(--tint);color:var(--link);
}
[data-theme="dark"] .demo-badge i,[data-theme="dark"] .dot{background:#86a9fb}
[data-theme="dark"] .dot.on{background:#5cd8a1}
[data-theme="dark"] .dot.off{background:#ff9e80}
[data-theme="dark"] .hero .hero-tag{background:#ffffff22;color:white}
[data-theme="dark"] .inline-link,[data-theme="dark"] summary{color:var(--link)}
[data-theme="dark"] .warm,[data-theme="dark"] .notice.warn{background:#493421;color:#ffc97d}
[data-theme="dark"] .teal{background:#1c4039;color:#a0ebce}
[data-theme="dark"] .pink{background:#413252;color:#e8c8ff}
[data-theme="dark"] .bad{color:#ffb397}
[data-theme="dark"] .btn,[data-theme="dark"] .tab,
[data-theme="dark"] .input input,[data-theme="dark"] .input select,
[data-theme="dark"] .lock-icon{background:var(--paper);border-color:var(--line)}
[data-theme="dark"] .tab.active,[data-theme="dark"] .btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
[data-theme="dark"] .lock-banner{background:#213758;color:#bdd6ff}
[data-theme="dark"] .lock-banner.open{background:#173a32;color:#9aebc9}
[data-theme="dark"] #nav{background:#152134;box-shadow:0 -7px 25px #0003}
[data-theme="dark"] #nav button[aria-current="page"]{color:var(--link)}
[data-theme="dark"] #nav button[aria-current="page"] span:first-child{background:var(--tint)}
[data-theme="dark"] #toast{background:#304a70;color:#fff}

.cloud-ca{margin-top:8px}
.cloud-remember{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:13px}
.cloud-remember input{margin:0;accent-color:var(--blue)}
.cloud-ca textarea{width:100%;min-width:0;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;resize:vertical}

.safari-local-link{display:inline-flex;align-items:center;text-decoration:none}
.safari .top{padding-top:calc(16px + env(safe-area-inset-top, 0px))}
.safari .input :is(input:not([type="range"]),select,textarea){font-size:16px}
