.mh-control-hub{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:18;display:flex;gap:4px;pointer-events:auto}
.mh-control-hub[hidden],.mh-hub-tools[hidden]{display:none!important}
.mh-control-hub>button{min-height:44px;border:1px solid #ffffff25;border-radius:13px;background:#102b3be8;color:#f7e8bd;box-sizing:border-box;cursor:pointer;font:700 11px system-ui}
.mh-hub-backpack{display:flex;align-items:center;gap:6px;padding:7px 10px}
.mh-hub-backpack svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.mh-hub-toggle{width:44px;font-size:22px!important}
.mh-hub-toggle[aria-expanded=true]{background:#d6a13d;color:#102b3b}
.mh-hub-tools{position:absolute;right:0;top:52px;display:grid;grid-template-columns:repeat(6,44px);gap:4px;padding:4px;border-radius:15px;background:#102b3bed;box-shadow:0 6px 20px #0002}
#app .mh-hub-tools .topbar-actions{display:contents!important}
#app .mh-hub-tools :is(#map-button,#decorate-button,#fullscreen-button,#house-help-button,#list-button,.mh-hub-camera){position:static!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;inset:auto!important;transform:none!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:3px!important;border:0;border-radius:10px;background:#ffffff0d;color:#fff0c5;font:700 8px/1.1 system-ui;box-sizing:border-box;white-space:nowrap}
#app .mh-hub-tools button[hidden]{display:none!important}
#app .mh-hub-tools button>span[aria-hidden=true]{font-size:17px;line-height:1}
#app .mh-hub-tools #list-button>span{display:none}
#app .mh-hub-tools #list-count{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#d6a13d;color:#102b3b;font:800 12px system-ui}
#app .mh-hub-tools #house-help-button svg{width:25px;height:25px}
#app .mh-hub-tools .mh-hub-camera small{font:700 8px system-ui}
#app.mh-has-control-hub .location-tools{display:none!important}
#app.mh-has-control-hub #decorate-panel[data-mh018-grouped=true]{top:68px!important;right:max(12px,env(safe-area-inset-right))!important;bottom:auto!important;max-height:calc(100dvh - 92px);overflow:visible}
#app.mh-has-control-hub.mh-hub-expanded #decorate-panel[data-mh018-grouped=true]{top:122px!important}
#app.mh-has-control-hub #decorate-panel[data-mh018-grouped=true] #decorate-catalog{display:none!important}
#chair-prompt[data-learned=true]{display:none!important}
@media(max-width:350px){.mh-hub-tools{gap:3px;grid-template-columns:repeat(6,44px);padding:3px}.mh-control-hub{right:8px}}

.mh-zoom-panel{position:absolute;top:108px;right:0;width:266px;padding:12px;border-radius:14px;background:#102b3bf5;color:#fff0c5;box-shadow:0 6px 20px #0004;font:12px/1.4 system-ui;box-sizing:border-box}
.mh-zoom-panel[hidden]{display:none!important}
.mh-zoom-panel p{margin:0 0 10px}
.mh-zoom-row{display:flex;gap:10px;align-items:center}
.mh-zoom-row input{min-width:0;flex:1;accent-color:#d6a13d}
.mh-zoom-panel button{min-width:44px;min-height:44px;border:1px solid #ffffff25;border-radius:10px;background:#ffffff12;color:#fff0c5;font:700 18px system-ui;cursor:pointer}
.mh-zoom-panel .mh-zoom-reset{margin-top:10px;width:100%;font-size:12px}

/* One hamburger opens the existing menu; room tools share its top edge. */
#app .mh-control-hub #info-button{position:static!important;display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:9px;inset:auto!important;transform:none!important;border-radius:13px;background:#102b3be8;color:#f7e8bd}
#app .mh-control-hub #info-button>span{display:none}
#app .mh-control-hub #info-button svg{width:23px;height:23px}
#info-drawer>.mh-hub-tools{position:sticky;top:0;right:auto;grid-template-columns:repeat(6,44px);justify-content:space-between;gap:2px;width:100%;box-sizing:border-box;margin:0 0 16px;padding:5px;background:#102b3b;z-index:3}
#app.mh-has-control-hub #info-drawer{padding-top:12px}
@media(max-width:350px){#info-drawer>.mh-hub-tools{grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:3px}#app #info-drawer>.mh-hub-tools button{width:100%!important;min-width:40px!important}}

#info-drawer>.mh-zoom-panel{position:static;width:100%;margin:-7px 0 16px;box-sizing:border-box}

@media(max-height:520px) and (orientation:landscape){
  #app.mh-has-control-hub #info-drawer{padding-top:64px}
  #info-drawer>.mh-hub-tools{position:relative;top:auto}
}

#arrange-drawer .inventory-dimensions{margin:8px 12px;font:12px/1.45 system-ui;color:#536571;overflow-wrap:anywhere}

@media(min-width:761px) and (min-height:521px){#app.mh-has-control-hub #info-drawer{left:auto;right:max(12px,env(safe-area-inset-right));transform-origin:top right}}

/* Room tools share the menu panel's material and typography. */
#info-drawer>.mh-hub-tools{background:transparent;border-radius:0;box-shadow:none;border-bottom:1px solid #786c5530;padding:0 0 12px;margin-bottom:14px}
#app #info-drawer>.mh-hub-tools :is(#map-button,#decorate-button,#fullscreen-button,#house-help-button,#list-button,.mh-hub-camera){background:transparent;color:#203848;border:1px solid transparent;border-radius:9px}
#app #info-drawer>.mh-hub-tools button:hover,#app #info-drawer>.mh-hub-tools button:focus-visible{background:#c6b58a24;border-color:#786c5530}
#app #info-drawer>.mh-hub-tools #list-count{background:#d7c89f;color:#203848}

#app #info-drawer>.mh-hub-tools button::before,#app #info-drawer>.mh-hub-tools button::after{content:none!important}
#app #info-drawer>.mh-hub-tools button svg{width:20px!important;height:20px!important;color:#203848;filter:none}
#app #info-drawer>.mh-hub-tools button small{font:700 8px/1.1 system-ui;color:#203848;text-transform:none;letter-spacing:0}

/* Reset is no longer an exposed scene control. */
#app #decorate-reset{display:none!important}
@media(max-width:760px),(max-height:520px){
 #app .drawer{top:0!important;bottom:0!important;left:0!important;right:0!important;width:100%!important;height:100%!important;max-height:100%!important;border:0;border-radius:0!important;padding:max(10px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important;box-sizing:border-box}
 #app .drawer.open{transform:none!important}
 #app .drawer .drawer-handle{display:none!important}
 #app .drawer .drawer-head{gap:10px;padding:0 0 8px;align-items:center;background:var(--cream)}
 #app .drawer .drawer-head small,#app .drawer>.drawer-intro,#arrange-drawer .drawer-intro{display:none}
 #app .drawer .drawer-head h2{margin:0;font:800 21px/1.1 system-ui;letter-spacing:-.03em}
 #app .drawer .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;font-size:26px}
 #app .backpack-toolbar{position:sticky;top:-10px;z-index:4;background:var(--cream);padding:0 0 8px}
 #app .backpack-search{margin:6px 0;font-size:12px;gap:0}
 #app .backpack-search>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #app .backpack-search input{min-height:44px;padding:8px 10px;font-size:16px;border-radius:9px}
 #app .backpack-filters{margin:0}
 #app .backpack-filters summary{min-height:44px;font-size:12px;padding:8px 0;box-sizing:border-box;align-items:center}
 #app .backpack-filter-fields{padding:6px 0}
 #app .inventory-item{padding:7px;border-radius:12px}
 #app .inventory-dimensions{margin:5px 7px;font-size:11px}
 #app .backpack-request{margin-bottom:0;padding:8px 10px;font-size:11px}
 #app .mh-hub-tools{position:static!important;grid-template-columns:repeat(6,minmax(44px,1fr));gap:2px;padding:0 0 8px;margin:0 0 6px}
 #app #info-drawer>.mh-hub-tools button{width:100%!important;min-width:44px!important;min-height:48px!important;height:48px!important}
 #app #info-drawer>.mh-hub-tools button svg{width:22px!important;height:22px!important}
 #app #info-drawer>.mh-hub-tools button small{font-size:10px}
 #app.mh008-arrange .decorate-panel:not([data-mh010-context="product"]){grid-template-columns:repeat(3,minmax(0,1fr))}
 #app.mh008-arrange .decorate-panel:not([data-mh010-context="product"]) :is(#decorate-remove,#decorate-undo,#decorate-done){grid-column:auto}
}

.inventory-details>summary{display:none}
@media(max-width:760px),(max-height:520px){
 #app .inventory-details>summary{display:flex;align-items:center;min-height:44px;font:650 11px system-ui;color:#536571;cursor:pointer;list-style:none}
 #app .inventory-details>summary::after{content:'＋';margin-left:auto}
 #app .inventory-details[open]>summary::after{content:'−'}
 #app .inventory-pick>span>small{display:none!important}
 #app .inventory-pick strong{font-size:12px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #app .inventory-pick .arrange-visual{aspect-ratio:4/3}
 #app .inventory-count{margin:4px 0;font-size:11px}
}

#app #info-drawer>.mh-hub-tools button{position:relative!important;box-shadow:none!important;backdrop-filter:none!important;background:transparent!important}
#app #info-drawer>.mh-hub-tools #list-count{position:absolute;right:2px;top:0;min-width:14px;width:auto;height:14px;padding:0 3px;border-radius:5px;font:800 8px/14px system-ui;background:#dbcfaa;color:#203848}
@media(max-width:760px),(max-height:520px){#app #info-drawer>#info-copy{display:none}}
@media(orientation:landscape) and (max-height:520px){
 #app .backpack-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,30%);gap:0 10px}
 #app .backpack-toolbar>.drawer-head{grid-column:1/-1;padding-bottom:2px}
 #app .backpack-search{margin:4px 0}
 #app .backpack-filters{align-self:center}
 #app #arrange-items{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
 #app .inventory-pick{display:grid;grid-template-columns:64px minmax(0,1fr);gap:6px;align-items:start}
 #app .inventory-pick .arrange-visual{width:64px;height:64px;aspect-ratio:1}
 #app .inventory-pick em{grid-column:2}
 #app .backpack-request{min-height:44px;padding:5px 10px}
}
@media(orientation:landscape) and (max-height:520px) and (max-width:700px){#app #arrange-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Panels own their close controls on desktop and phones. */
#app:has(.drawer.open,#map-panel.open,.house-chat:not([hidden]))>.mh-control-hub{visibility:hidden;pointer-events:none}
