#homes{display:block;width:100%;max-width:520px;padding:14px;margin:10px 0 24px;border:1px solid #abb8a9;border-radius:8px;font:inherit;background:#fffef9;color:inherit}#homes:focus-visible{outline:3px solid #b37722;outline-offset:3px}#selected{margin-top:24px}#selected h3{margin-top:14px}#selected p{line-height:1.6;overflow-wrap:anywhere}#more{margin-bottom:12px}[hidden]{display:none!important}
.discovery-results{display:grid;gap:12px;margin-top:16px}.discovery-item{border:1px solid #d6dcd4;border-radius:8px;padding:14px;background:#fff}.discovery-item h4{margin:0 0 6px}.discovery-item p{margin:3px 0}.entity-id{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9rem;overflow-wrap:anywhere}#discovery-status{margin:10px 0}#discover:disabled{opacity:.6;cursor:not-allowed}

.registration-form { display:grid; gap: .8rem; border-top:1px solid #ddd; padding-top:1rem; }
.registration-form label { display:grid; gap:.35rem; }
.registration-form input[type=text] { width:100%; min-width:0; box-sizing:border-box; padding:.65rem; font:inherit; }
.registration-form input[type=checkbox] { justify-self:start; width:1.25rem; height:1.25rem; }
.registration-form p { overflow-wrap:anywhere; }

.discovery-device { border:1px solid #d5dcd6; border-radius:.7rem; padding:1rem; min-width:0; }
.discovery-device > summary { cursor:pointer; font-weight:600; overflow-wrap:anywhere; }
.device-count { display:block; margin:.35rem 0 0 1rem; font-size:.85rem; font-weight:400; }
.discovery-device[open] > summary { margin-bottom:1rem; }
.discovery-device .discovery-item + .discovery-item { margin-top:.8rem; }
.reading-setup > summary { cursor:pointer; padding:.5rem 0; }

#selected{max-width:none}#layout-editor{max-width:780px}

/* Persistent admin actions, separate from the scrolling editor content. */
.admin-rail{position:fixed;z-index:20;left:0;top:96px;bottom:0;width:220px;padding:24px 16px;background:#fafaf5;border-right:1px solid #dedfd5;box-shadow:4px 0 18px #293d3014;overflow-y:auto;overscroll-behavior:contain}
.admin-rail-title{font-size:10px;letter-spacing:2px;font-weight:750;color:#6b7a61;margin-bottom:12px}
.admin-rail .button{display:block;width:100%;margin:0 0 10px;text-align:left;border-radius:9px;padding:12px 14px;line-height:1.35}
.admin-rail .button[aria-current=step]{background:#e7eee4;color:#294a3f;border-color:#91ad97}
.admin-rail .button[aria-current=page]{background:#e7eee4;color:#294a3f;border-color:#91ad97}
.layout-actions{border-top:1px solid #d8dfd4;margin-top:18px;padding-top:18px}
.layout-actions .rail-save{background:#173b5b;border-color:#173b5b}
.layout-actions .rail-save:hover{background:#275977}
.layout-actions .rail-save[data-unsaved=true],#admin-floating-nav #admin-save[data-unsaved=true]{background:#b4232c;border-color:#8f1c25;color:#fff}
.layout-actions .rail-save[data-unsaved=true]:hover,#admin-floating-nav #admin-save[data-unsaved=true]:hover{background:#8f1c25}
#admin-floating-nav{position:fixed;z-index:60;right:24px;bottom:24px;display:flex;flex-direction:column;gap:8px}
#admin-floating-nav button{display:grid;place-items:center;width:48px;height:48px;border:1px solid #78988a;border-radius:50%;background:#294a3f;color:#fff;font:27px Georgia,serif;box-shadow:0 5px 18px #1d352b55;cursor:pointer}
#admin-floating-nav button:disabled{opacity:.55;cursor:not-allowed}
#admin-floating-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#admin-floating-nav button:hover:not(:disabled),#admin-floating-nav button:focus-visible{background:#397b67;outline:3px solid #bfd9c3}
:root[data-theme=dark] .admin-rail .button[aria-current=page]{background:#315d56;color:#fff;border-color:#6f9c8e}
:root[data-theme=dark] .layout-actions .rail-save[data-unsaved=true]{background:#b4232c;border-color:#e0666d;color:#fff}
body:has(.admin-rail:not([hidden])) main{margin-left:calc(220px + max(24px, (100vw - 1260px)/2));max-width:min(1040px,calc(100vw - 220px - 64px))}
body:has(.admin-rail:not([hidden])) footer{margin-left:calc(220px + 32px);max-width:calc(100vw - 220px - 64px)}
@media(max-width:700px){
  .admin-rail{top:auto;left:0;right:0;bottom:0;width:100%;padding:10px 14px;background:#fafaf5;border-left:0;border-right:0;border-top:1px solid #dedfd5;box-shadow:0 -4px 18px #293d3014;overflow-x:auto;overflow-y:hidden;display:flex;align-items:center;gap:8px;white-space:nowrap}
  .admin-rail-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .admin-rail .button{display:inline-block;width:auto;min-width:max-content;margin:0;padding:10px 12px;text-align:center}
  .layout-actions{display:flex;align-items:center;gap:8px;border:0;margin:0;padding:0}
  #admin-floating-nav{right:14px;bottom:86px}
  #admin-floating-nav button{width:42px;height:42px}
  body:has(.admin-rail:not([hidden])) main{margin-left:auto;max-width:1040px;padding-bottom:108px}
  body:has(.admin-rail:not([hidden])) footer{margin:0 22px 80px;max-width:none}
}
#prepare-home{display:grid;gap:12px;max-width:620px}#prepare-home label,#pairing-result label{display:grid;gap:5px;margin:10px 0}#prepare-home input,#pairing-result input{width:100%;box-sizing:border-box;padding:9px;font:inherit;border:1px solid #81958e;border-radius:5px}#pairing-result{overflow-wrap:anywhere}#pairing-code{font-family:monospace}

:root[data-theme=dark] #homes,:root[data-theme=dark] #homes option{background:#1d3034;color:#e5eeeb;border-color:#70928d}

#customer-invite-form{display:grid;gap:12px;max-width:620px}#customer-invite-form label,#customer-invite-result label{display:grid;gap:5px;margin:10px 0}#customer-invite-form input,#customer-invite-result input{width:100%;box-sizing:border-box;padding:9px;font:inherit;border:1px solid #81958e;border-radius:5px}#customer-invite-result{overflow-wrap:anywhere}#customer-sign-in-code{font-family:monospace}

#customer-remove-form{display:grid;gap:12px;max-width:620px}#customer-remove-form label{display:grid;gap:5px;margin:10px 0}#customer-remove-form input{width:100%;box-sizing:border-box;padding:9px;font:inherit;border:1px solid #81958e;border-radius:5px}

.configured-sensor{border:1px solid #b5c7bb;border-radius:22px;padding:24px;margin:18px 0;background:#ffffff70}.configured-sensor h4{font-size:20px;margin:0 0 10px}.configured-sensor label{display:block;margin:14px 0}.configured-sensor input:not([type=checkbox]),.configured-sensor select{display:block;width:100%;padding:11px;margin-top:6px;border:1px solid #81958e;border-radius:9px;font:inherit}.configured-sensor input[type=checkbox]{margin-right:8px}.configured-sensor .reading-help{font-size:12px}:root[data-theme=dark] .configured-sensor{background:#1d3034;border-color:#567568}

.sensor-battery{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:10px 16px;border-radius:20px;background:#e3efdf;color:#254c2e;font-weight:650}.sensor-battery small{font-size:11px;font-weight:400}.sensor-battery[data-level=low]{background:#ffe1db;color:#9c261c}.sensor-battery[data-level=unknown]{background:#e9ecee;color:#53616b}

#discovery-status{scroll-margin-top:28px}

.configured-device{background:#f5f6f3;border:1px solid #c5d2cd;border-radius:28px;padding:26px;margin:24px 0;box-shadow:0 8px 24px #102e4910}.configured-device>h3{font-size:25px;margin:0 0 8px;color:#102e49}.configured-device label{display:block;margin:14px 0}.configured-device input:not([type=checkbox]),.configured-device select{display:block;width:100%;padding:10px;margin-top:6px;border:1px solid #81958e;border-radius:9px;font:inherit}.configured-device input[type=checkbox]{margin-right:8px}.device-reading{border:1px solid #cfdbd4;border-radius:16px;margin:20px 0;padding:16px;min-width:0;background:#fff}.device-reading legend{font-weight:650;padding:0 8px;overflow-wrap:anywhere}.device-reading-state{font-size:21px;font-weight:600}.device-reading small{color:#526675}:root[data-theme=dark] .configured-device{background:#1d3034;border-color:#567568}:root[data-theme=dark] .configured-device>h3{color:#e5eeeb}:root[data-theme=dark] .device-reading{background:#17282c;border-color:#526675}:root[data-theme=dark] .device-reading small{color:#bdcfd9}
@media(max-width:600px){.configured-device{padding:18px;border-radius:22px}}

.configured-device .configured-device-name{color:#096b78;font-size:1.5rem;font-weight:750;letter-spacing:-.025em}
.configured-device-readings{margin:1.2rem 0;border-top:1px solid #c6dcd9;padding-top:.8rem}
.configured-device-readings>summary{cursor:pointer;padding:.6rem .3rem;font-weight:650;color:#28585e;border-radius:10px}
.configured-device-readings>summary:hover{background:#e9f3f1}
.configured-device-readings>summary:focus-visible{outline:3px solid #168598;outline-offset:3px}
:root[data-theme=dark] .configured-device .configured-device-name{color:#71d9e5}
:root[data-theme=dark] .configured-device-readings>summary{color:#b0e2e2}
:root[data-theme=dark] .configured-device-readings>summary:hover{background:#254249}

.device-expansion-controls{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 1rem}
.configured-device-group>summary{cursor:pointer;color:#096b78;padding:.2rem 0;border-radius:12px}
.configured-device-group>summary .configured-device-name{display:inline;margin:0 0 0 .3rem}
.configured-device-group>summary:focus-visible{outline:3px solid #168598;outline-offset:5px}
:root[data-theme=dark] .configured-device-group>summary{color:#71d9e5}

.home-photo-editor{margin:20px 0;padding:22px;border:1px solid #b8ccc7;border-radius:24px;background:#eff6f3;color:#173e38}.home-photo-editor p{max-width:65ch}.home-photo-preview{display:block;width:min(100%,520px);height:190px;object-fit:cover;border-radius:18px;margin:16px 0}.home-photo-actions{display:flex;gap:10px;flex-wrap:wrap}[data-theme=dark] .home-photo-editor{background:#193236;color:#e0f1eb;border-color:#526f73}

.onboarding-status:not(:empty){padding:12px 16px;border-radius:12px;border-left:4px solid;font-weight:600;line-height:1.5}.onboarding-status[data-state=pending]{background:#fff3c4;color:#704b00;border-color:#d99b00}.onboarding-status[data-state=success]{background:#e1f5e8;color:#155b32;border-color:#299956}.onboarding-status[data-state=error]{background:#fde4e0;color:#922f25;border-color:#cc4737}[data-theme=dark] .onboarding-status[data-state=pending]{background:#48390d;color:#ffe39a;border-color:#e5b933}[data-theme=dark] .onboarding-status[data-state=success]{background:#163f2b;color:#b7efce}[data-theme=dark] .onboarding-status[data-state=error]{background:#502521;color:#ffc8be}
