/* Compact HomeKind review: consistent cards, progressive disclosure and five clear destinations. */
:root{--hk-ink:#183b63;--hk-teal:#267f7b;--hk-soft:#edf5f3;--hk-border:#e1e8e8}
.bottom-nav,.comfortable .bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:640px}.bottom-nav button{padding:7px 3px;gap:4px;font-size:12px}.bottom-nav .icon{width:21px;height:21px}.bottom-nav .bottom-nav-icon{height:25px}
.home-screen{max-width:1120px;margin:auto}.home-heading{margin-bottom:14px}.home-heading h1{font-size:clamp(24px,3vw,34px);margin:0}.home-heading p{margin:4px 0 0;color:#65727b}.home-summary-block{border:1px solid var(--hk-border);border-radius:20px;background:#fff;overflow:hidden;margin:0 0 16px}.home-summary-block .home-quick-summary{background:transparent;border:0;box-shadow:none;margin:0;padding:18px 20px 12px}.home-summary-block .home-quick-summary h2{font-size:19px}.home-summary-block .home-quick-summary p{font-size:14px;line-height:1.65;max-width:90ch;margin:7px 0}.home-summary-block .home-glance{border:0;border-radius:0;background:#f5f8f7;box-shadow:none;margin:0}.home-summary-block .home-glance button{min-height:46px;padding:9px 14px}.home-summary-block .home-glance b{font-size:12px}.home-summary-detail{border:0;border-top:1px solid var(--hk-border);border-radius:0;margin:0;padding:0 20px;box-shadow:none}.home-summary-detail>summary{min-height:43px;font-size:13px}.home-summary-detail .briefing-grid{grid-template-columns:1fr 1fr;gap:14px}.home-summary-detail .card{box-shadow:none;border:0;background:#f7f9f8;margin:0 0 14px}
.home-dashboard{display:block!important;margin-bottom:16px}.home-map-panel{width:100%}.home-model{margin:0!important;border-radius:20px!important;padding:16px!important}.home-model .home-map-controls{margin-top:8px}.home-model .card-head{margin-bottom:8px}.home-model .home-model-canvas,.home-model .home-floor-plan{height:clamp(220px,28vw,340px)}.home-model .home-room-prompt{padding:10px 0;margin:0}.home-model .home-room-prompt p{margin:0;font-size:13px}.home-model .map-room-options{max-height:160px;overflow:auto}.home-model .home-map-legend{padding:5px 0;font-size:11px}
.home-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}.home-card{border:1px solid var(--hk-border);border-radius:18px;background:#fff;overflow:hidden;min-width:0;box-shadow:0 3px 12px #183b6305}.home-card>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:16px;min-height:88px}.home-card>summary::-webkit-details-marker{display:none}.home-card>summary>.round-icon{background:var(--hk-soft);color:var(--hk-teal);width:42px;height:42px;border-radius:13px;flex:none}.home-card>summary>span:nth-child(2){display:grid;gap:5px;min-width:0}.home-card>summary b{font-size:16px;color:var(--hk-ink)}.home-card>summary small{font-size:12px;color:#65727b;line-height:1.4}.home-card .detail-toggle{margin-left:auto;font-size:21px;color:var(--hk-teal)}.home-card[open] .detail-toggle{transform:rotate(45deg)}.home-card[open]{grid-column:1/-1}.home-card-body{padding:0 16px 16px;border-top:1px solid #edf1f0}.home-card-body>.card,.home-card-body .home-attention,.home-card-body .favourite-home{box-shadow:none;border:0;border-radius:0;margin:0;padding:14px 0}.home-card-body .home-context{display:block!important}.home-card-body .home-people{display:block}.home-card-body>button{margin:10px 8px 0 0}.home-family-list{display:flex;gap:16px;flex-wrap:wrap;padding:16px 0}.home-family-list>div{display:flex;align-items:center;gap:9px}.home-family-list .avatar{width:35px;height:35px;font-size:12px}.home-setup-prompt{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 14px;background:#eaf2ed;border-radius:14px;margin-bottom:14px;font-size:14px}
.settings-group{margin:24px 0}.settings-group>h2{font-size:17px;margin-bottom:12px}.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-tile{min-height:105px;padding:16px;display:flex;gap:12px;border-radius:17px}.admin-tile b,.compact .admin-tile b{font-size:17px}.admin-tile small{font-size:12px;line-height:1.5}.admin-tile>span:nth-child(2){flex:1}.admin-tile>.icon{width:17px;flex:none}.admin-tile .round-icon{width:38px;height:38px;flex:none}.settings-setup{margin-top:28px;border-top:1px solid var(--hk-border);padding-top:15px}.settings-setup>summary{display:flex;align-items:center;gap:10px;cursor:pointer;min-height:48px}.settings-setup>summary small{margin-left:auto;color:#64737b;font-size:12px}.settings-setup .admin-grid{margin-top:12px}.setup-welcome{display:flex;gap:15px;padding:23px;background:#eaf3ed;border-radius:20px}.setup-welcome h2{font-size:22px;margin:0}.setup-welcome p{margin:8px 0 14px}
.routine-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.routine-card,.compact .routine-card{padding:17px;border-radius:18px;box-shadow:none;border:1px solid var(--hk-border)}.routine-card .card-head{gap:10px;align-items:flex-start}.routine-card h2{font-size:18px}.routine-card p{font-size:12px;margin:5px 0}.routine-action-summary>div{padding:6px 0}.routine-action-summary{font-size:13px;margin:9px 0}.routine-card .row-actions{gap:7px;margin-top:12px}.routine-card .row-actions button{font-size:12px;min-height:40px;padding:8px 11px}.routine-starters>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.routine-starters button{display:flex;align-items:flex-start;gap:10px;text-align:left;padding:14px;background:#f1f7f5;border-color:#e0eae7}.routine-starters b,.routine-starters small{display:block}.routine-starters small{font-size:12px;line-height:1.5;margin-top:5px}.routine-section{grid-column:1/-1;border:1px solid var(--hk-border);border-radius:13px;padding:0 14px;min-width:0}.routine-section>summary{font-weight:650;padding:13px 0;cursor:pointer;display:flex;gap:10px;align-items:center}.routine-section>summary small{font-size:11px;color:#64737b;font-weight:400;margin-left:auto}.routine-section>div{padding-bottom:14px}.routine-section .form-grid{gap:12px}.routine-builder-action{padding:13px;border-radius:12px;background:#f7f9f8;border:0}.routine-builder-action legend{font-size:12px;color:var(--hk-teal)}.routine-builder-action .checkline{min-height:38px}.routine-text-draft{background:#f0f6f4;border-radius:17px;padding:18px;margin:16px 0}.routine-text-draft label{font-size:14px}.routine-text-draft textarea{min-height:76px}.routine-filters,.update-categories{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 18px}.routine-filters button,.update-categories button{min-height:39px;font-size:12px;padding:8px 14px;border-radius:22px}.routine-filters button[aria-pressed=true],.update-categories button[aria-pressed=true]{background:var(--hk-ink);color:#fff}.routine-condition{border-bottom:1px solid var(--hk-border);padding:10px 0}.routine-condition .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.routine-draft-warnings{font-size:13px;background:#fff7e5;border-radius:10px;padding:12px 26px}.routine-icon{width:36px;height:36px;display:grid;place-items:center;background:var(--hk-soft);border-radius:11px;color:var(--hk-teal);flex:none}.routine-icon .icon{width:19px}.routine-title{display:flex;gap:10px;align-items:flex-start}
.permission-group{border:1px solid var(--hk-border);border-radius:12px;margin:8px 0;padding:0 12px}.permission-group>summary{cursor:pointer;font-weight:650;padding:12px 0}.permission-group .permission-grid{border:0;padding:0}.room-multiselect{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px 0}.room-multiselect .checkline{margin:0;font-size:13px}.access-scope{grid-column:1/-1}.access-scope>summary{cursor:pointer}.timeline-event,.comfortable .timeline-event{grid-template-columns:32px 75px minmax(0,1fr);gap:12px}.timeline-marker{width:30px;height:30px;border-radius:10px;background:#edf5f3;display:grid;place-items:center;color:var(--hk-teal);margin:0;position:relative}.timeline-marker .icon{width:17px;height:17px}.timeline-event h3{font-size:15px}.timeline-event time{font-size:12px;padding-top:6px}.timeline-event p{font-size:12px}.timeline-card{box-shadow:none}.timeline-event:before{left:15px}.update-overview{background:#f0f6f4;border-radius:15px;padding:15px;margin-bottom:15px}.contact-requests{margin:20px 0}.contact-request{display:flex;gap:12px;align-items:center;padding:13px;border-bottom:1px solid var(--hk-border)}.contact-request>div{flex:1}.contact-request small{display:block;color:#65727b}.contact-add{display:flex;gap:10px;flex-wrap:wrap}.call-test-results{padding:12px;border-radius:12px;background:#f0f6f4}
@media(max-width:620px){.home-card-grid{gap:9px}.home-card>summary{padding:12px;gap:8px;min-height:91px}.home-card>summary>.round-icon{width:31px;height:34px;border-radius:10px}.home-card>summary .icon{width:17px}.home-card>summary b{font-size:14px}.home-card>summary small{font-size:11px}.home-card .detail-toggle{font-size:17px}.home-summary-detail .briefing-grid{grid-template-columns:1fr}.home-summary-block .home-quick-summary{padding:15px}.home-summary-block .home-glance b{font-size:11px}.home-summary-block .home-glance button{padding:8px}.home-model .home-model-canvas,.home-model .home-floor-plan{height:230px}.routine-grid{grid-template-columns:1fr}.routine-starters>div{grid-template-columns:1fr 1fr}.admin-tile{padding:13px;gap:9px;min-height:116px}.admin-tile .round-icon{width:30px;height:30px}.admin-tile>.icon{display:none}.admin-tile b,.compact .admin-tile b{font-size:15px}.admin-tile small{font-size:11px}.settings-setup>summary{flex-wrap:wrap}.settings-setup>summary small{width:100%;margin:0 0 7px 30px}.bottom-nav button,.comfortable .bottom-nav button{font-size:11px;min-height:59px}.comfortable .home-card>summary{min-height:110px}.comfortable .home-card>summary b{font-size:17px}.comfortable .home-card>summary small{font-size:13px}.timeline-event,.comfortable .timeline-event{grid-template-columns:29px 57px minmax(0,1fr);gap:9px}.timeline-event time{font-size:11px}}
@media(prefers-reduced-motion:no-preference){.home-card>summary .detail-toggle{transition:transform .15s}.admin-tile:hover,.home-card>summary:hover{background:#f6f9f8}}
/* Reliability messages stay beside the affected feature. */
.network-notice{padding:0!important;background:transparent!important;border:0!important;margin:0 0 .65rem!important;box-shadow:none!important;min-height:0!important}
.service-notice{display:flex;align-items:center;justify-content:space-between;gap:.6rem;font-size:.82rem;line-height:1.5;color:var(--muted,#556261);background:#f3f5f1;border-radius:10px;padding:.45rem .65rem;margin:.35rem 0}.service-notice .link{font-size:.8rem;white-space:nowrap;padding:.2rem}.diagnostics-table{overflow-x:auto}.diagnostics-table table{border-collapse:collapse;width:100%;font-size:.82rem}.diagnostics-table td,.diagnostics-table th{padding:.65rem;text-align:left;border-bottom:1px solid #e7e9e4}.diagnostics-table code{font-size:.7rem;overflow-wrap:anywhere}.home-quick-summary>small{display:block;color:var(--muted,#556261);font-size:.75rem}
/* A disclosure stays in its original grid cell, including the right column. */
.home-screen .home-card{border-radius:16px}
.home-screen .home-card[open]{grid-column:auto}
.home-screen .home-card>summary{display:grid;grid-template-columns:36px minmax(0,1fr) 14px;gap:10px;box-sizing:border-box;height:120px;min-height:120px;padding:14px}
.home-screen .home-card>summary>.round-icon{width:36px;height:36px;border-radius:11px}
.home-screen .home-card>summary b{line-height:1.35;overflow-wrap:anywhere}
.home-screen .home-card>summary small{line-height:1.45;overflow-wrap:anywhere}
.home-screen .home-card .detail-toggle{margin:0;justify-self:end}
.home-screen .home-card-body{min-width:0;overflow-wrap:anywhere}
.home-screen .home-card-body .home-room-grid{grid-template-columns:1fr}
.home-screen .home-card-body .favourite-grid{grid-template-columns:1fr}
.home-screen .home-card-body .card-head,.home-screen .home-card-body .row-actions{flex-wrap:wrap;gap:8px}
.home-screen .home-card-body button,.home-screen .home-card-body select{max-width:100%;white-space:normal}
/* Room readings occupy the space below the plan only when a room is selected. */
.home-screen .home-map-layout,.home-screen .home-map-layout.has-room-selection{display:block}
.home-screen [data-home-room-status][hidden]{display:none}
.home-screen .has-room-selection [data-home-room-status]{margin-top:12px;width:100%;box-sizing:border-box}
.home-screen .home-model .home-model-canvas,.home-screen .home-model .home-floor-plan{width:100%;min-width:0;height:clamp(260px,34vw,420px);min-height:260px;box-sizing:border-box}
.home-screen .home-model .home-model-canvas canvas{display:block;max-width:100%;touch-action:none}
.home-sections-nav{display:flex;gap:4px;padding:4px;margin:0 0 20px;border:1px solid var(--hk-border);border-radius:13px;background:#edf3f1;width:fit-content;max-width:100%}
.home-sections-nav button{min-height:44px;padding:10px 18px;border:0;background:transparent;border-radius:9px}
.home-sections-nav button[aria-pressed=true]{background:var(--hk-ink);color:#fff}
.bottom-nav button>span:last-child{line-height:1.25;max-width:100%;text-align:center}
@media(max-width:620px){
 .home-screen .home-card>summary{grid-template-columns:28px minmax(0,1fr) 10px;gap:7px;height:132px;min-height:132px;padding:11px}
 .home-screen .home-card>summary>.round-icon{width:28px;height:32px;border-radius:9px}
 .comfortable .home-screen .home-card>summary{height:148px;min-height:148px}
 .comfortable .home-screen .home-card>summary b{font-size:15px}
 .comfortable .home-screen .home-card>summary small{font-size:12px}
 .home-screen .home-card-body{padding:0 11px 12px}
 .home-sections-nav{width:100%;box-sizing:border-box}
 .home-sections-nav button{flex:1;padding:10px}
 .bottom-nav button,.comfortable .bottom-nav button{min-height:64px;font-size:11px}
}
@media(max-width:380px){.home-screen .home-card>summary{grid-template-columns:24px minmax(0,1fr) 8px;gap:5px;padding:9px}.home-screen .home-card>summary>.round-icon{width:24px;height:30px}.comfortable .home-screen .home-card>summary b{font-size:14px}}
/* Keep each pair of headers on its row; the open content uses both columns. */
.home-screen .home-card-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;--home-card-gap:12px}
.home-card-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--home-card-gap);align-items:start;min-width:0}
.home-screen .home-card-row>.home-card{border:0;background:transparent;box-shadow:none;overflow:visible}
.home-screen .home-card-row>.home-card>summary{border:1px solid var(--hk-border);border-radius:16px;background:#fff}
.home-screen .home-card-row>.home-card[open]>summary{background:#edf5f3;border-color:#a7c7bf}
.home-screen .home-card-row>.home-card>.home-card-body{position:relative;width:calc(200% + var(--home-card-gap));max-width:none;box-sizing:border-box;margin-top:10px;border:1px solid var(--hk-border);border-radius:16px;background:#fff;padding:0 16px 16px}
.home-screen .home-card-row>.home-card:nth-child(2)>.home-card-body{margin-left:calc(-100% - var(--home-card-gap))}
.home-screen .home-card-row>.home-card>.home-card-body .home-room-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
@media(max-width:620px){.home-screen .home-card-grid{--home-card-gap:9px}.home-screen .home-card-row>.home-card>.home-card-body{padding:0 13px 14px}}

/* Let the connection message use the full phone width. */
.network-notice>.service-notice{width:100%;min-width:0;box-sizing:border-box}.service-notice>span{min-width:0;flex:1}.service-notice>button{flex:none}
/* Account pictures stay within the existing avatar footprint. */
[data-profile-avatar]{overflow:hidden;flex-shrink:0}
[data-profile-avatar]>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
[data-profile-avatar]>svg{display:block;width:65%;height:65%;margin:auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-icon-preview,.profile-photo-preview{display:flex;align-items:center;justify-content:center;width:112px;height:112px;border-radius:50%;background:#edf3f5;color:#183b63;font-size:2rem;margin:12px 0}
.profile-icon-preview>svg{width:64px;height:64px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-icon-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px;min-width:0;margin-top:16px}
.profile-icon-choice{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-height:88px;padding:8px;border:2px solid #d7e1e6;border-radius:12px;cursor:pointer}
.profile-icon-choice:has(input:checked){background:#e5f1ec;border-color:#25674e}
.profile-icon-choice:focus-within{outline:3px solid #183b63;outline-offset:2px}
.profile-icon-choice>svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.account-profile-form fieldset{min-width:0}
[data-profile-crop-preview] canvas{display:block;width:min(100%,320px);height:auto;border-radius:12px;margin:12px 0}
.profile-crop-controls{display:grid;gap:12px;margin-bottom:16px}
.profile-crop-controls label{display:grid;gap:5px}
.profile-crop-controls input{min-height:44px;width:100%}
.call-person-avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:inherit}
