/* Approved cream/sculpted homepage. Does not style other pages or private widgets. */
body.cozy-home{--cream:#fcf5e9;--paper:#fffaf2;--walnut:#402817;--muted:#715d49;--edge:#e3d3bd;--honey:#96571e;background:var(--cream);color:var(--walnut);padding-top:calc(88px + env(safe-area-inset-top));font-size:17px}
.cozy-home a{color:#775025}
.cozy-home header,.cozy-home main,.cozy-home footer{width:min(1200px,calc(100% - 48px))}
.cozy-home .cozy-header{position:fixed;inset:0 0 auto;width:100%;height:calc(88px + env(safe-area-inset-top));padding:calc(12px + env(safe-area-inset-top)) 32px 12px 80px;margin:0;z-index:10000;background:var(--cream);border-bottom:1px solid var(--edge);display:flex;align-items:center}
.cozy-home .brand{font-size:clamp(20px,3vw,36px);font-weight:750;letter-spacing:-1px;color:var(--walnut);gap:14px;line-height:1.2;min-width:0}
.cozy-home .home-art,.cozy-home .agents-art{display:block;flex:none;background-image:url('/assets/cozy/approved-artwork.png');background-repeat:no-repeat}
.cozy-home .home-art{width:52px;height:58px;background-size:2648.276% 1765.517%;background-position:7.51% 9.42%}
.cozy-home.home-page.homebase-with-panel details.homebase-panel::before{height:calc(88px + env(safe-area-inset-top));background:transparent;border:0;pointer-events:none}
.cozy-home .homebase-panel>summary{top:calc(22px + env(safe-area-inset-top));background:var(--paper);color:var(--walnut);border-color:var(--edge);box-shadow:none}
.cozy-home .homebase-panel-content,.cozy-home .homebase-panel-modal{background:var(--cream);color:var(--walnut)}
.cozy-home .homebase-panel a{color:var(--walnut)}
.cozy-home .homebase-panel a:hover,.cozy-home .homebase-panel a[aria-current="page"]{background:#efdfc5;color:#583b1d}
.cozy-home #main-content{padding:28px 0 36px}
.cozy-home .homebase-search{margin:0 0 20px;padding:18px 20px;border:1px solid var(--edge);border-radius:18px;background:var(--paper);box-shadow:0 3px 8px #54341b0b}.cozy-home .homebase-search label{display:grid;gap:7px;color:var(--walnut);font-weight:700}.cozy-home .homebase-search input{width:100%;min-height:46px;padding:10px 13px;border:1px solid var(--edge);border-radius:11px;background:#fffdf8;color:var(--walnut);font:inherit}.cozy-home .homebase-search p{margin:7px 0 0;color:var(--muted);font-size:14px}.cozy-home #homebase-search-status{min-height:0;margin-top:8px;color:var(--muted);font-size:14px}.cozy-home #homebase-search-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.cozy-home #homebase-search-results section{padding:13px;border:1px solid var(--edge);border-radius:12px;background:var(--cream)}.cozy-home #homebase-search-results h3{margin:0 0 7px;font-size:15px}.cozy-home #homebase-search-results p{margin:0 0 7px}.cozy-home #homebase-search-results ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}.cozy-home #homebase-search-results a{display:block;min-height:28px;color:var(--walnut);font-weight:650}.cozy-home #homebase-search-results span{display:block;color:var(--muted);font-size:13px}
.cozy-home .app-launcher{margin:0}
.cozy-home .app-launcher .apps-heading{margin-bottom:12px}
.cozy-home #reorder-apps{background:var(--paper);color:#674725;border-color:var(--edge);font-size:14px}
.cozy-home .app-launcher #household-app-cards{gap:16px 12px}
.cozy-home .app-launcher-sections{display:grid;gap:18px}
.cozy-home .app-launcher-sections>h2{margin:0;color:var(--walnut);font-size:18px}
.cozy-home .app-launcher .app-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 12px;margin:0}
.cozy-home .app-launcher .all-apps{border:1px solid var(--edge);border-radius:14px;background:var(--paper)}
.cozy-home .app-launcher .all-apps>summary{min-height:48px;display:flex;align-items:center;padding:0 16px;cursor:pointer;color:var(--walnut);font-weight:650}
.cozy-home .app-launcher .all-apps[open]>summary{border-bottom:1px solid var(--edge)}
.cozy-home .app-launcher .all-apps #household-app-cards{padding:16px;margin:0}
.cozy-home .app-launcher a.app-card{gap:10px;padding:0;min-width:0;border-radius:14px}
.cozy-home.home-page .app-launcher .app-icon{width:100%;height:auto;max-width:136px;aspect-ratio:1;border:0;border-radius:20px;background-image:url('/assets/cozy/approved-artwork.png');background-repeat:no-repeat;background-size:1097.142857% 731.428571%;color:transparent;box-shadow:0 5px 10px #54341b16;flex:none}
.cozy-home .app-launcher .app-card-title{color:var(--walnut);font-weight:650;font-size:15px;line-height:1.3;text-decoration:none}
.cozy-home .app-launcher a.app-card:hover .app-icon{box-shadow:0 6px 14px #54341b30}
.cozy-home .app-launcher a.app-card:hover .app-card-title{text-decoration:underline}
.cozy-home .daily-panels{grid-template-columns:1.1fr 1.25fr 1fr;gap:18px;margin:30px 0 22px}
.cozy-home .daily-panels>.card{padding:22px;background:var(--paper);border:1px solid var(--edge);border-radius:18px;box-shadow:0 3px 8px #54341b0b;min-width:0}
.cozy-home .daily-panels h3{font-size:23px;line-height:1.3;letter-spacing:-.6px;margin:0 0 18px}
.cozy-home .daily-panels .calendar-preview,.cozy-home .daily-panels .photo-preview,.cozy-home .daily-panels .weather-preview{height:230px;border-radius:10px;background:#fff}
.cozy-home .daily-panels .calendar-preview>p,.cozy-home .daily-panels .photo-preview>p,.cozy-home .daily-panels .weather-preview>p{padding:16px;font-size:15px;color:var(--muted)}
.cozy-home .daily-panels :is(.calendar-open,.photo-open,.weather-open){font-size:14px;margin-top:12px;min-height:44px}
.cozy-home .agents-panel{display:flex;align-items:center;gap:22px;padding:18px 24px;border:1px solid var(--edge);border-radius:18px;background:var(--paper);box-shadow:0 3px 8px #54341b0b}
.cozy-home .agents-art{width:112px;height:88px;background-size:1228.8% 1137.7778%;background-position:4.25% 86.24%}
.cozy-home .agents-copy{flex:1;min-width:0}.cozy-home .agents-copy h2{margin:0 0 4px;font-size:23px}.cozy-home .agents-copy p{margin:0;font-size:14px;color:var(--muted)}
.cozy-home .agents-copy a{font-size:15px}
.cozy-home .about-site{margin-top:20px;border:1px solid var(--edge);border-radius:12px;background:transparent}
.cozy-home .about-site>summary{font-size:16px;color:var(--muted)}
.cozy-home .original-introduction h2{font-size:24px;letter-spacing:-.5px;margin-top:12px}
.cozy-home .original-introduction .eyebrow{font-size:11px;color:#526744}
.cozy-home main>h2{font-size:18px;margin-top:24px;margin-bottom:8px}
.cozy-home main>p{font-size:14px;color:var(--muted)}
.cozy-home footer{border-color:var(--edge);color:var(--muted);padding-top:20px;padding-bottom:24px;font-size:12px}
.cozy-home :is(a,button,summary):focus-visible{outline:3px solid #87501d;outline-offset:4px}
.cozy-home #card-order-dialog{background:var(--cream);color:var(--walnut);border-color:var(--edge)}
@media(max-width:1000px){.cozy-home .daily-panels{grid-template-columns:1fr}.cozy-home .daily-panels .calendar-preview,.cozy-home .daily-panels .photo-preview,.cozy-home .daily-panels .weather-preview{height:230px}}
@media(max-width:900px){.cozy-home .app-launcher #household-app-cards{gap:22px 14px}.cozy-home.home-page .app-launcher .app-icon{max-width:120px}.cozy-home .app-launcher .app-card-title{font-size:14px}.cozy-home .daily-panels{margin-top:26px}.cozy-home .daily-panels>.card{padding:20px}.cozy-home .daily-panels h3{font-size:22px}.cozy-home .agents-art{width:90px;height:74px}.cozy-home .agents-panel{padding:16px;gap:12px}}
@media(max-width:500px){body.cozy-home{padding-top:calc(76px + env(safe-area-inset-top))}.cozy-home header,.cozy-home main,.cozy-home footer{width:calc(100% - 28px)}.cozy-home .cozy-header{width:100%;height:calc(76px + env(safe-area-inset-top));padding:calc(10px + env(safe-area-inset-top)) 12px 10px 62px}.cozy-home .home-art{width:34px;height:38px}.cozy-home .brand{font-size:20px;letter-spacing:-.7px;gap:8px}.cozy-home .homebase-panel>summary{top:calc(16px + env(safe-area-inset-top));left:8px}.cozy-home #main-content{padding-top:16px}.cozy-home .app-launcher #household-app-cards{gap:18px 8px}.cozy-home .app-launcher .app-card-title{font-size:14px;min-height:32px}.cozy-home.home-page .app-launcher .app-icon{border-radius:15px}.cozy-home .agents-art{display:none}.cozy-home .agents-copy h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.cozy-home *{scroll-behavior:auto!important;transition:none!important}}
.cozy-home .app-launcher [data-app-id="display"] .app-icon{background-color:transparent;background-position:1.934097% 20.927602%}
.cozy-home .app-launcher [data-app-id="receipts"] .app-icon{background-color:transparent;background-position:12.034384% 20.927602%}
.cozy-home .app-launcher [data-app-id="pantry"] .app-icon{background-color:transparent;background-position:21.848138% 20.927602%}
.cozy-home .app-launcher [data-app-id="groceries"] .app-icon{background:url('/assets/cozy/grocery-checklist-tile-v2.png') center/cover no-repeat}
.cozy-home .app-launcher [data-app-id="recipes"] .app-icon{background-color:transparent;background-position:41.977077% 20.927602%}
.cozy-home .app-launcher [data-app-id="finances"] .app-icon{background-color:transparent;background-position:52.507163% 20.927602%}
.cozy-home .app-launcher [data-app-id="media"] .app-icon{background-color:transparent;background-position:62.392550% 20.927602%}
.cozy-home .app-launcher [data-app-id="trips"] .app-icon{background-color:transparent;background-position:72.206304% 20.927602%}

/* HB-01 preview: match embedded and fallback surfaces to the outer paper. */
.cozy-home .daily-panels :is(.calendar-preview,.photo-preview,.weather-preview){background:var(--paper)}

/* HB-02: compact disconnected widgets at every screen size; readiness restores normal size. */
 .cozy-home .daily-panels :is(.calendar-preview:not(.calendar-connected),.photo-preview:not(.photo-connected),.weather-preview:not(.weather-connected)){height:auto;min-height:0}
 .cozy-home .daily-panels :is(.calendar-preview:not(.calendar-connected),.photo-preview:not(.photo-connected),.weather-preview:not(.weather-connected))>p{padding:0;margin:0}
 .cozy-home .daily-panels :is(.calendar-preview:not(.calendar-connected),.photo-preview:not(.photo-connected),.weather-preview:not(.weather-connected))>iframe{position:absolute;inset:0}

/* Connected widgets need no extra launch prompt; recovery links remain when disconnected. */
.cozy-home .calendar-connected + .calendar-open,
.cozy-home .photo-connected + .photo-open{display:none}

/* Consolidated dashboard: wider canvas, existing artwork/order, sidebar navigation. */
.cozy-home main,.cozy-home footer{width:min(1800px,calc(100% - 48px));max-width:1800px;margin-inline:auto}
.cozy-home .app-launcher .app-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:0;min-width:0;background:transparent;border:0;box-shadow:none}
.cozy-home .app-launcher #household-app-cards{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:16px}
.cozy-home .daily-panels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.cozy-home .weather-attribution{font-size:12px;color:var(--muted);margin-top:8px}
.cozy-home .weather-attribution summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.cozy-home .weather-attribution a{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:1000px){.cozy-home .app-launcher #household-app-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.cozy-home .daily-panels{grid-template-columns:repeat(2,minmax(0,1fr))}.cozy-home .weather-card{grid-column:1/-1}}
@media(max-width:650px){.cozy-home main,.cozy-home footer{width:calc(100% - 32px)}.cozy-home .daily-panels{grid-template-columns:minmax(0,1fr);gap:16px}.cozy-home .weather-card{grid-column:auto}.cozy-home .app-launcher #household-app-cards{gap:14px 10px}}
@media(max-width:700px){.cozy-home #homebase-search-results{grid-template-columns:1fr}.cozy-home .homebase-search{padding:16px}}

.cozy-home [hidden]{display:none!important}

/* Maintenance uses its own artwork; existing launcher geometry is preserved. */
.cozy-home.home-page .app-launcher [data-app-id="maintenance"] .app-icon{background-image:url("/assets/cozy/maintenance-v1.png");background-size:cover;background-position:center}

.cozy-home .app-launcher [data-app-id="documents"] .app-icon{background-image:url("/assets/cozy/documents-v1.png");background-size:100% 100%;background-position:center}

.cozy-home.home-page .app-launcher [data-app-id="workshop"] .app-icon{background-image:url("/assets/cozy/workshop-v1.png");background-size:cover;background-position:center}

/* Sevo owner-only professional case log launcher. */
.cozy-home.home-page .app-launcher [data-app-id="sevo"] .app-icon{background-image:url("/assets/cozy/sevo-v1.png");background-size:cover;background-position:center}

/* Give phone app names enough room without shrinking the approved typography. */
@media(max-width:500px){
 .cozy-home .app-launcher #household-app-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
 .cozy-home .app-launcher .app-card-title{max-width:100%;overflow-wrap:anywhere;text-wrap:balance}
}
@media(max-width:374px){
 .cozy-home .app-launcher #household-app-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Existing Scout composition; final illustrated roster artwork remains separate. */
.cozy-home.home-page .app-launcher [data-app-id="scout-homes"] .app-icon{background:url("/assets/cozy/scout-house-v1.png") center/cover no-repeat}

/* Provisions nested navigation; scoped to the existing Homebase panel. */
.homebase-panel .homebase-provisions{position:static;margin:4px 0;padding:0;border:1px solid #dfcdb5;border-radius:10px;background:#fffaf2;color:#402817}
.homebase-panel .homebase-provisions>summary{position:static;display:list-item;list-style:disclosure-closed;min-height:44px;margin:0 0 0 24px;padding:11px 12px 11px 0;font:650 16px/1.4 system-ui;cursor:pointer;color:inherit}
.homebase-panel .homebase-provisions[open]>summary{list-style:disclosure-open}
.homebase-panel .homebase-provisions-links{display:flex;flex-direction:column;gap:2px;padding:0 6px 6px 14px}
.homebase-panel .homebase-provisions-links>a{min-width:0;min-height:44px;padding:10px 12px;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.homebase-panel .homebase-provisions-links>a[aria-current="page"]{background:#435b36;color:#fffaf2}
.homebase-panel .homebase-provisions :is(summary,a):focus-visible{outline:3px solid #8a511c;outline-offset:2px}
@media(max-width:450px){.homebase-panel .homebase-provisions-links{padding-left:10px}.homebase-panel .homebase-provisions-links>a{padding-inline:10px}}
