/* Compact home, with details available on demand. */
#home{max-width:1000px;margin-inline:auto}#home .gamegrid{display:flex;flex-direction:column;gap:12px}#home .neighbors{margin:0}#home .rightcol{display:grid;grid-template-columns:1fr 1fr;margin-top:12px}
#pet.home-pet .home-pet-fallback{pointer-events:none}#pet.home-pet #homepet3d{pointer-events:auto;touch-action:pan-y}
#pet.home-pet{width:80%;left:10%;height:90%;bottom:12px;cursor:grab}#pet.home-pet:active{cursor:grabbing}.home-companion-label select{border:1px solid #dce4d2;border-radius:12px;padding:10px;background:#fffdf7;color:#536b48;font:inherit;min-height:44px}
.home-view-controls{padding:7px 12px 5px;background:#fbfcf7;border-top:1px solid #e8ecdf}.home-view-controls>div{display:flex;gap:5px;justify-content:center}.home-view-controls button{flex:1;max-width:90px;min-width:0;min-height:44px;padding:8px 4px;border:0;border-radius:12px;background:transparent;color:#65765a;font-size:12px}.home-view-controls button[aria-pressed=true]{background:#e7eedf;color:#3f5d36}.home-view-controls p{text-align:center;font-size:10px;color:#929c87;margin:2px 0 0}
.home-status{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:8px 15px;color:#7d8b70;background:#fff}.home-status #homepetstatus{grid-column:1;margin:0;font-size:12px}.home-status #sleepstatus{grid-column:1;font-size:10px;line-height:1.5;margin:0}.home-status #wakepet{grid-column:2;grid-row:1/3;align-self:center;border:1px solid #e0e6d7;border-radius:20px;padding:9px 12px;min-height:44px;font-size:11px;background:#f7f9ef;color:#667c54}
.home-more,.mobile-fold{border:1px solid #e6eadf;border-radius:14px;background:#fcfdf8;margin:10px 0;overflow:hidden}.home-more>summary,.mobile-fold>summary{padding:14px 16px;min-height:48px;cursor:pointer;font-size:12px;color:#79896b}.home-more .home-pet-toolbar{border-top:1px solid #e9ece2}.home-more .home-pet-toolbar button{flex:1}.home-more .sleep-routine{border:0}.home-more .sectionhead,.home-more .friendgrid{padding:12px}.home-more .friendgrid{padding-top:0}.mobile-fold .journey{padding:12px}.mobile-fold .walkmem{margin:12px}.mobile-more{display:none}.map-mobile-warning{margin:5px 14px 12px;font-size:10px;color:#8a947f;line-height:1.6}
@media(max-width:850px){
 aside{position:fixed;inset:0 0 auto;z-index:700;display:flex;align-items:center;height:58px;padding:8px 14px;background:#fcfcf8f5;border:0;border-bottom:1px solid #e9ecdf;backdrop-filter:blur(12px)}.brand{font-size:23px;gap:6px}.brand span{font-size:18px;letter-spacing:2px}.brand small{display:none}
 aside nav{position:fixed;inset:auto 0 0;z-index:800;display:grid;grid-template-columns:repeat(4,1fr);padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fffef9f5;border-top:1px solid #e3e9dc;backdrop-filter:blur(16px)}aside nav button{display:flex;flex-direction:column;justify-content:center;gap:3px;width:100%;min-height:52px;padding:5px;border-radius:14px;text-align:center;font-size:20px;margin:0}aside nav button span{display:block;font-size:10px}aside nav button[data-tab=model],aside nav button[data-tab=plan]{display:none}
 .mobile-more{display:block;margin-left:auto;position:relative}.mobile-more>summary{list-style:none;font-size:24px;min-width:44px;min-height:44px;text-align:center;line-height:40px;cursor:pointer}.mobile-more>summary::-webkit-details-marker{display:none}.mobile-more>div{position:absolute;right:0;top:48px;min-width:180px;padding:8px;background:#fffef9;border:1px solid #e4e9db;box-shadow:0 8px 28px #35482d22;border-radius:16px;display:flex;flex-direction:column}.mobile-more button,.mobile-more a{background:transparent;border:0;min-height:44px;padding:12px;color:#5f7552;text-align:left;font-size:12px;text-decoration:none}
 main{margin:0;max-width:none;padding:66px 12px calc(86px + env(safe-area-inset-bottom))}header{height:0;border:0}header .breadcrumb,header .demo,header .icon{display:none}header .coins{position:fixed;right:62px;top:13px;z-index:710;background:#f3f5e9;border:0;font-size:11px;padding:9px 11px}.topright{display:contents}
 body.home-active .pageheading,body.walk-active .pageheading{display:none}.pageheading{padding:12px 2px 20px}.pageheading .date,.pageheading .eyebrow,.pageheading p{display:none}.pageheading h1{font-size:22px}.roomcard{border-radius:22px}.roomtop{padding:8px 12px;gap:10px}.roomtag{font-size:12px}.home-companion-label select{max-width:115px;font-size:12px;min-height:40px;padding:8px 10px}
 #home .room{height:clamp(285px,45svh,490px)}#pet.home-pet{width:96%;left:2%;height:95%;bottom:0}#home .wall-art,#home .plant,#home .bench,#home .speech,.petlabel small,.roomhint{display:none}#home .window{opacity:.35;width:110px;left:24px;height:160px}#home .rug{opacity:.55;bottom:12px;height:65px}#home .bowl{opacity:.6;bottom:24px}#home .petlabel{left:12px;top:12px;bottom:auto;transform:none;padding:7px 11px;font-size:11px;pointer-events:none}#home .home-sleeping:after{top:10%;right:15%}
 #home .actions{padding:4px 8px 10px;gap:5px}#home .actions button{min-height:66px;border:0;background:#f7f9f1;border-radius:14px;gap:2px;padding:8px 2px}#home .actions button>span{font-size:23px;line-height:26px}#home .actions b{font-size:12px}#home .actions small{display:none}#home .rightcol{grid-template-columns:1fr;padding:0 10px 10px}.home-more,.mobile-fold{margin:8px 0}.home-more .home-pet-toolbar{padding:8px 10px}.home-status{padding:7px 13px}.home-status #homepetstatus{font-size:11px}.home-status #sleepstatus{font-size:10px}.home-status #wakepet{font-size:11px}
 .mapcard{border-radius:22px}.mapbar{padding:10px 12px}.build-label{display:none}.companion-quick{padding:6px 10px}.companion-quick>span{font-size:11px}.companion-quick button{padding:7px 10px;min-height:40px;font-size:11px}.map-stage #map{height:clamp(350px,calc(100svh - 265px),700px)}.maptools{padding:8px;gap:6px}.maptools button{min-height:44px;flex:1;font-size:11px}#center{display:none}.walkgrid{display:block}.mobile-fold>.walkside{display:block}.mobile-fold .card{border:0;margin:0;border-radius:0}.map-hud{left:10px;right:10px;bottom:26px;padding:8px 11px}.direction-gallery .dog-directions{grid-template-columns:repeat(4,minmax(0,1fr))}
 footer{font-size:0;margin:5px 0;padding:10px 0;border:0}footer>span,footer>small{display:none}footer .android-download{font-size:11px}.fine{font-size:11px}.friendgrid{grid-template-columns:1fr}#toast{bottom:calc(88px + env(safe-area-inset-bottom));max-width:90%;font-size:12px;white-space:normal;text-align:center;padding:12px 18px}
}
@media(prefers-reduced-motion:reduce){.home-view-controls button{transition:none}}
@media(max-width:850px){aside{backdrop-filter:none}.home-view-controls button{font-size:13px}#home .actions b{font-size:13px}}
@media(max-width:360px){.home-view-controls>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.home-view-controls button{max-width:none}}

.home-view-controls button:disabled{opacity:.4;cursor:wait}

/* Keep the walking companion above the tabs on narrow and folded phones. */
@media(max-width:850px){
 body.walk-active main{padding:66px 8px calc(86px + env(safe-area-inset-bottom))}
 aside nav button[data-tab=admin],.topright>.admin-open{display:none}
 .walk-active .companion-quick{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain}
 .walk-active .companion-quick>span,.walk-active .companion-quick>button{flex:0 0 auto;white-space:nowrap}
 .walk-active .map-stage #map{height:var(--walk-map-height,calc(100svh - 250px - env(safe-area-inset-bottom)));min-height:220px;max-height:none}
}

/* Audio belongs in the marked top bar, immediately left of the coin badge. */
@media(max-width:850px){
 header .audio-controls{position:fixed;right:124px;top:6px;z-index:720;display:flex;flex-wrap:nowrap;gap:4px;pointer-events:auto}
 header .audio-controls button{min-width:44px;min-height:44px;padding:5px 6px;font-size:11px;touch-action:manipulation}
 header .audio-status{position:fixed;top:54px;right:12px;z-index:720;background:#fffdf3;border-radius:8px;max-width:200px}
 header .audio-status:empty{display:none}
}
@media(max-width:380px){header .audio-controls{right:117px;gap:2px}header .audio-controls button{font-size:10px;padding:4px;min-width:42px}}
@media(max-width:350px){aside .brand{gap:4px}aside .brand span{font-size:13px}header .audio-controls button{width:42px;font-size:9px}}
@media(max-width:850px){body.walk-active main>header{display:block;height:0;border:0}}

/* Keep a narrow phone/Fold shell compact without shrinking touch targets. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(max-width:850px){
 main,.view,#home .gamegrid,#home .roomcard{min-width:0}
 #home .roomtop{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;padding:8px 12px}
 #home .roomtop>.roomtag{min-width:0;overflow-wrap:anywhere;font-size:12px}
 #home .roomtop>.member-walk{grid-column:2;grid-row:1;min-height:44px;margin:0;padding:7px 10px;max-width:145px;white-space:normal}
 #home .roomtop>.petlabel{grid-column:1;grid-row:2;max-width:none;padding:0;gap:6px}
 #home .roomtop>.home-companion-label{grid-column:2;grid-row:2;min-width:0}
 #home .roomtop .home-companion-label select{width:110px;max-width:100%;min-height:44px}
 #home .roomtop .petlabel .decor-open,#home .roomtop .coin-shop-open{margin:0;min-height:44px;padding:7px 10px}
 #home .room{height:clamp(190px,36svh,340px)}
 #home .home-view-controls{padding:4px 8px}
 #home .home-view-controls>div{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px}
 #home .home-view-controls button{width:100%;max-width:none;min-height:44px;padding:7px 2px}
 #home .home-view-controls p{margin:0;font-size:10px}
 #home .coat-picker{gap:5px;padding:7px 10px}
 #home .coat-picker button{min-width:0;padding:7px 5px;font-size:12px}
}
@media(max-width:360px){
 #home .roomtop>.petlabel{grid-column:1/-1}
 #home .roomtop>.home-companion-label{grid-column:1/-1;grid-row:3}
 #home .roomtop .home-companion-label select{width:100%}
 #home .home-view-controls>div{grid-template-columns:repeat(3,minmax(0,1fr))}
}
