/* Phone-only shell. Desktop nodes and styles are restored at the breakpoint. */
.mobile-only{display:none!important}#mobileSheet:not([open]){display:none!important}
@media(max-width:850px){
 html:has(body.mobile-mode),body.mobile-mode{height:100%;overflow:hidden;overscroll-behavior:none}
 body.mobile-mode{height:var(--mobile-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;background:var(--field,#f5f6f8)}
 body.mobile-mode .mobile-only{display:flex!important}
 body.mobile-mode>header{position:relative;flex:0 0 56px;height:56px;min-height:56px;padding:6px 12px;gap:10px;flex-wrap:nowrap;z-index:10;border-bottom:1px solid var(--line)}
 body.mobile-mode>header .brand{gap:6px;min-width:0}body.mobile-mode>header .brandmark{height:28px;width:28px}body.mobile-mode>header .brand strong{font-size:13px;white-space:nowrap}
 body.mobile-mode>header .brand .studio,body.mobile-mode>header .brand-divider{display:none}
 body.mobile-mode>header .event-picker{font-size:0;margin:0 0 0 auto;gap:0;min-width:0;flex:1;max-width:175px}
 body.mobile-mode>header .event-picker select{width:100%;max-width:175px;min-height:40px;margin:0;font-size:13px;padding:8px 28px 8px 10px}
 body.mobile-mode #mobileMenuButton{flex:none;width:40px;height:40px;min-height:40px;align-items:center;justify-content:center;padding:8px;font-size:20px}
 body.mobile-mode>.workspace{display:block;flex:1 1 0;min-height:0;min-width:0;height:auto;width:100%;overflow:hidden}
 body.mobile-mode .workspace>main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 body.mobile-mode .canvas-toolbar{flex:0 0 auto;min-height:52px;padding:6px 10px;display:block;background:var(--field,#fff)}
 body.mobile-mode .canvas-toolbar>div:not(.mobile-quick-tools){display:none!important}
 body.mobile-mode .mobile-quick-tools{display:grid!important;grid-template-columns:minmax(80px,1fr) auto auto;gap:7px;align-items:center;width:100%}
 body.mobile-mode .mobile-quick-tools #viewSelect{width:100%;max-width:none;margin:0;min-height:40px;padding:8px;font-size:12px}
 body.mobile-mode .mobile-quick-tools button{height:40px;min-height:40px;margin:0;padding:8px 11px;font-size:12px;white-space:nowrap}
 body.mobile-mode #viewport{flex:1 1 0;height:auto;min-height:0;padding:6px;display:block;overflow:auto;overscroll-behavior:contain;background:var(--field,#f5f6f8);background-image:none}
 body.mobile-mode #artboard{margin-left:auto;margin-right:auto;box-shadow:none;background:transparent}
 body.mobile-mode .canvas-footer{flex:0 0 auto;min-height:28px;max-height:36px;padding:6px 12px;font-size:11px;line-height:1.5;overflow:hidden;background:var(--field,#fff)}
 body.mobile-mode .canvas-footer #status{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}body.mobile-mode .canvas-footer span:last-child{display:none}
 #mobileDock{flex:0 0 auto;padding:5px 6px calc(5px + env(safe-area-inset-bottom));gap:4px;border-top:1px solid var(--line);background:var(--field,#fff);z-index:10}
 #mobileDock button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;padding:5px 3px;font-size:11px;border-color:transparent;background:transparent;color:var(--muted);border-radius:10px}
 #mobileDock button[aria-expanded=true]{background:var(--ui-1c2c44,#eaf2ff);color:var(--accent,#3182f6)}
 #mobileSheet{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:calc(var(--mobile-viewport-height,100dvh) - 30px);height: min(78dvh,780px);padding:0;border:1px solid var(--line);border-bottom:0;border-radius:22px 22px 0 0;background:var(--field,#fff);color:var(--ink);box-shadow:0 -15px 60px #0002;overflow:hidden}
 #mobileSheet[open]{display:flex;flex-direction:column}#mobileSheet::backdrop{background:#10182860;backdrop-filter:blur(3px)}
 .mobile-sheet-handle{width:36px;height:4px;border-radius:10px;margin:9px auto 2px;flex:none;background:var(--line)}
 .mobile-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:4px 16px 10px;flex:none;border-bottom:1px solid var(--line)}
 .mobile-sheet-heading h2{font-size:16px}.mobile-sheet-heading button{font-size:12px;padding:8px 10px;min-height:40px;background:transparent;border-color:transparent}.mobile-sheet-heading button span{font-size:22px;margin-left:4px;vertical-align:-2px}
 #mobileSheetBody{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;padding:12px 14px calc(18px + env(safe-area-inset-bottom))}
 #mobileSheetBody>section{min-width:0}#mobileSheet input:not([type=checkbox]):not([type=range]),#mobileSheet select{font-size:16px;min-height:44px}#mobileSheet button{min-height:42px}
 #mobileSheet .products{position:static;top:auto;width:100%;height:auto;min-height:0;max-height:none;padding:0;border:0;display:flex;overflow:visible;background:transparent}
 #mobileSheet .products #catalogPanel{height:auto;min-height:0;overflow:visible;display:flex;flex-direction:column}
 #mobileSheet .products #catalogPanel>.section-head{display:none}#mobileSheet .products .sidebar-tabs{flex:none;margin-bottom:10px}
 #mobileSheet .products .product-tabs{position:sticky;top:-12px;background:var(--field,#fff);padding:4px 0;z-index:1}
 #mobileSheet .products #productList{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:none;overflow:visible;padding:0}
 #mobileSheet .product-row{margin:0;align-items:center;gap:3px}#mobileSheet .product-card{min-width:0;width:100%;padding:10px 7px;min-height:80px}#mobileSheet .product-card img{width:32px;height:44px}#mobileSheet .product-card strong{font-size:12px}#mobileSheet .product-card small{font-size:10px}
 #mobileSheet .products .list-hint{font-size:11px;margin:9px 0}#mobileSheet .products .product-footer{position:static;display:block;flex:none;background:transparent;margin-top:12px;padding-top:10px}
 #mobileSheet .product-order{display:block}#mobileSheet .product-order>div{min-width:0}#mobileSheet .catalog-bulk{flex-wrap:wrap;gap:6px}#mobileSheet .catalog-bulk select{flex-basis:100%}
 #mobileSheet .placements{min-height:0;max-height:none;height:auto;display:block;padding:0;border:0;background:transparent}#mobileSheet .group-list{display:grid;grid-template-columns:1fr;overflow:visible;max-height:none}
 #mobileSheet .inspector{display:block;position:static;height:auto;max-height:none;padding:0;border:0;overflow:visible;background:transparent}#mobileSheet .field-pair{gap:10px}
 #mobileSheet #miscPanel{overflow:visible}#mobileSheet #miscList{max-height:none}#mobileSheet #fixtureList{max-height:180px}#mobileSheet .layout-tabs{margin-bottom:16px}
 #mobileSheet[data-panel=view]{height:auto;min-height:320px}#mobileSheet [data-mobile-content=view]{display:flex;flex-direction:column;gap:16px}
 #mobileSheet .canvas-actions{display:flex;gap:8px;flex-wrap:wrap}#mobileSheet .canvas-actions>button{width:44px}#mobileSheet .guide{margin-left:auto;gap:8px;min-height:42px}
 #mobileSheet .zoom-control{flex-basis:100%;display:flex;gap:12px;align-items:center;flex-wrap:nowrap;padding:10px 0}#mobileSheet .zoom-control input{width:auto;flex:1;min-width:60px;margin:0}#mobileSheet .zoom-control button{width:42px}#mobileSheet .zoom-control output{font-size:13px}
 /* Live camera controls stay outside the modal so the booth remains visible. */
 body.mobile-mode #mobileCameraBar{flex:0 0 auto;min-width:0;border-top:1px solid var(--line)}
 body.mobile-mode #mobileCameraBar:has(#orbitControls[hidden]),body.mobile-mode.event-pending #mobileCameraBar{display:none!important}
 body.mobile-mode #mobileCameraBar #orbitControls:not([hidden]){display:grid;grid-template-columns:36px minmax(0,1fr) 40px 36px;gap:5px 8px;width:100%;padding:6px 12px;flex-wrap:nowrap;border-bottom:1px solid var(--line)}
 #mobileCameraBar #orbitTitle{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #mobileCameraBar #orbitRange{width:100%;min-width:0;margin:0;height:36px;touch-action:pan-y}
 #mobileCameraBar #orbitValue{font-size:11px;min-width:0;text-align:center}
 #mobileCameraBar button{min-height:36px;height:36px;margin:0;padding:5px 8px;font-size:12px;white-space:nowrap}
 #mobileCameraBar #orbitDrag{grid-column:1/3;margin:0;height:32px;min-height:32px}
 #mobileCameraBar #orbitReset{grid-column:3/5;height:32px;min-height:32px}
 #mobileSheet #eventNote{padding:10px;border:0;border-radius:10px;font-size:11px;line-height:1.6;margin:0}
 #mobileSheet[data-panel=menu]{height:auto;max-height:80dvh}#mobileSheet [data-mobile-content=menu]{display:flex;flex-direction:column;gap:14px}
 #mobileSheet .workspace-switch{margin:0;display:flex}#mobileSheet .workspace-switch button{flex:1;padding:10px;font-size:14px}
 #mobileSheet .header-library{width:100%;margin:0;text-align:left;order:0;padding:13px}
 #mobileSheet .file-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;width:100%}#mobileSheet .file-actions>button,#mobileSheet .file-actions .server-save-group{width:100%;margin:0}#mobileSheet .server-save-group button{width:100%}
 #mobileSheet .admin-storage-menu{grid-column:1/-1;white-space:normal}#mobileSheet .admin-storage-menu summary{min-height:44px;padding:12px}#mobileSheet .admin-storage-menu>button{position:static;top:auto;right:auto;width:100%;box-shadow:none;text-align:left;margin-top:6px}
 #mobileSheet #themeToggle{width:100%;font-size:13px;text-align:left;padding:11px 14px}#mobileSheet #themeToggle::before{display:none}
 #mobileSheet .mockup-actions{display:none}body.package-open #mobileSheet .mockup-actions{display:flex;flex-wrap:wrap;gap:8px}body.package-open #mobileSheet .file-actions{display:none}
 body.mobile-mode.package-open #mobileDock,body.mobile-mode.package-open .mobile-quick-tools{display:none!important}body.mobile-mode.package-open>.workspace{display:none}body.mobile-mode.package-open #packageOverlay{flex:1;min-height:0}
 body.mobile-mode .asset-loading{bottom:85px;font-size:12px;max-width:90vw;padding:10px 14px}
 @media(max-width:360px){body.mobile-mode>header .brand strong{display:none}.mobile-quick-tools button{padding-left:8px!important;padding-right:8px!important}#mobileSheet .products #productList{grid-template-columns:1fr}}
}
