/* 5.4: a stable 3D viewport with independently scrolling overlay drawers. */
.m-topbar,.m-location{display:none}
body.stockedit-mobile #wpadminbar,body.stockedit-mobile #adminmenumain,body.stockedit-mobile #wpfooter{display:none!important}
body.stockedit-mobile #wpcontent{margin-left:0!important;padding-left:0!important}body.stockedit-mobile #wpbody-content{padding-bottom:0}body.stockedit-mobile{overscroll-behavior:none}body.stockedit-mobile-3d{overflow:hidden}
.mw-app.mw-compact{padding:0;margin:0;max-width:none;--m-drawer-width:min(340px,88vw);font-size:14px}
.mw-app.mw-compact>.mw-header,.mw-app.mw-compact>.mw-topline,.mw-compact .mw-workbench-toolbar{display:none!important}
.mw-compact input:not([type=checkbox]):not([type=range]),.mw-compact textarea,.mw-compact select{font-size:16px!important;min-height:44px;max-width:100%;box-sizing:border-box}.mw-compact button{min-height:44px}.mw-compact input[type=checkbox]{width:22px;height:22px;flex-shrink:0}
.mw-compact .m-topbar{display:flex;align-items:center;gap:5px;position:sticky;top:0;z-index:85;min-height:56px;flex-shrink:0;box-sizing:border-box;padding:calc(5px + env(safe-area-inset-top,0px)) max(6px,env(safe-area-inset-right,0px)) 5px max(6px,env(safe-area-inset-left,0px));background:var(--panel);border-bottom:1px solid var(--line)}
.m-topbar>button{width:44px;height:44px;padding:8px!important;display:grid;place-items:center;flex-shrink:0;border-color:transparent!important;background:transparent!important;font-size:21px!important}.m-topbar>button[aria-expanded=true]{background:#e8f0ff!important;color:#2563eb!important}.mw-dark .m-topbar>button[aria-expanded=true]{background:#153b68!important;color:#b7d8ff!important}
.m-brand{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.m-brand>img{width:30px;height:30px;object-fit:contain;border-radius:5px}.m-brand>div{min-width:0}.m-brand small{display:block;color:var(--muted);font-size:9px;letter-spacing:.7px}.m-brand h1{margin:0;line-height:1.4;display:block;font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%}
.mw-compact[data-page=overview]{position:fixed!important;inset:0!important;width:100%!important;height:100vh!important;height:100dvh!important;z-index:99990!important;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;background:var(--panel)}
.mw-compact[data-page=overview] .mw-workbench{flex:1;display:flex;flex-direction:column;min-height:0;border:0;border-radius:0;overflow:hidden}
.mw-compact[data-page=overview] .mw-workspace,.mw-compact.mw-fullscreen[data-page=overview] .mw-workspace{position:relative;display:flex;flex:1;width:100%;height:auto!important;min-height:0!important;flex-wrap:nowrap!important;border:0;border-radius:0;overflow:hidden}
.mw-compact[data-page=overview] .mw-view{flex:1;flex-basis:100%;width:100%;height:100%;min-height:0;min-width:0;position:relative}
.mw-compact[data-page=overview] .mw-stage{height:100%;flex:1;min-height:0!important;position:relative;overflow:hidden}
.mw-compact[data-page=overview] .mw-canvas-toolbar,.mw-compact[data-page=overview] .mw-interaction-toolbar,.mw-compact[data-page=overview] .mw-legend,.mw-compact[data-page=overview] .mw-bottom-nav,.mw-compact[data-page=overview] .mw-axis,.mw-compact[data-page=overview] .mw-scene-help{display:none!important}
.mw-compact[data-page=overview] .mw-scene-controls{left:8px;right:8px;top:8px;max-width:none;display:flex;flex-wrap:nowrap;gap:6px;justify-content:space-between}
.mw-compact .mw-scene-controls .mw-segment{flex:1;display:flex;min-width:0;border:1px solid var(--line)}.mw-compact .mw-scene-controls .mw-segment>button{min-height:44px;flex:1;font-size:12px!important;padding:7px 4px!important;white-space:nowrap}.mw-compact .mw-scene-controls>.mw-fullscreen-toggle{font-size:11px!important;min-height:44px;padding:7px!important;max-width:102px;white-space:normal}
.mw-compact .m-location{display:flex;align-items:center;gap:6px;position:absolute;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));z-index:24;pointer-events:none}.m-location>button{pointer-events:auto;background:var(--panel)!important;box-shadow:0 2px 12px #0002;white-space:nowrap;min-height:42px!important;font-size:12px!important}.m-location>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0;font-size:11px;background:var(--panel);color:var(--muted);border-radius:8px;padding:7px 10px;max-width:40%}
.mw-compact .mw-alert,.mw-compact .mw-notice{padding:8px 12px;margin:0;font-size:12px;max-height:90px;overflow:auto;flex-shrink:0}.mw-compact .mw-alert>button,.mw-compact .mw-notice>button{min-height:32px}
.mw-compact .mw-workbench{border-radius:0;border:0}.mw-compact .mw-workspace{position:relative}
.mw-app.mw-compact .mw-sidebar,.mw-app.mw-compact .mw-sidebar.mw-collapsed{display:block!important;position:fixed;left:0;top:0;bottom:0;height:100vh;height:100dvh;width:var(--m-drawer-width);max-width:88vw;flex:none!important;min-width:0;box-sizing:border-box;padding:14px 14px calc(20px + env(safe-area-inset-bottom,0px));z-index:80;background:var(--panel);color:var(--text);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;transform:translateX(-105%);transition:transform .22s ease;box-shadow:10px 0 30px #0003;border-right:1px solid var(--line);border-radius:0}
.mw-compact[data-page=overview] .mw-sidebar,.mw-compact.mw-fullscreen[data-page=overview] .mw-sidebar{position:absolute!important;height:100%!important;top:0;bottom:0}
.mw-app.mw-compact .mw-properties{display:block!important;position:absolute;right:0;top:0;bottom:0;left:auto;min-width:0;width:min(370px,92vw)!important;max-width:92vw;flex:none!important;height:100%!important;max-height:none!important;margin:0;padding:14px 14px calc(20px + env(safe-area-inset-bottom,0px));box-sizing:border-box;border:0;border-left:1px solid var(--line);border-radius:0;background:var(--panel);color:var(--text);z-index:80;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;transform:translateX(105%);transition:transform .22s ease;box-shadow:-10px 0 30px #0003}
.mw-app.mw-compact .mw-sidebar.m-open,.mw-app.mw-compact .mw-properties.m-open{transform:translateX(0)}
.m-drawer-backdrop{position:fixed!important;inset:0!important;width:100%;height:100vh;height:100dvh;border:0!important;border-radius:0!important;background:#0b193c66!important;padding:0!important;z-index:70;touch-action:none}.mw-compact[data-page=overview] .m-drawer-backdrop{position:absolute!important;height:100%!important}
.mw-app.mw-compact .mw-sidebar .mw-section-title,.mw-app.mw-compact .mw-properties>.mw-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.mw-compact .mw-section-title>h2{font-size:17px}.mw-compact .mw-sidebar .mw-section-title>button,.mw-compact .mw-properties>.mw-section-title>button{width:44px;height:44px;flex-shrink:0}
.mw-app.mw-compact .mw-sidebar nav{display:flex;flex-direction:column;gap:5px}.mw-app.mw-compact .mw-sidebar nav>button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;min-height:46px;padding:10px 12px!important;font-size:14px!important;white-space:normal}.mw-app.mw-compact .mw-sidebar h3{display:block;font-size:12px;margin:22px 0 10px}.mw-app.mw-compact .mw-sidebar .mw-room{display:flex!important;width:100%;min-height:52px;padding:10px 8px!important;font-size:13px!important}.mw-app.mw-compact .mw-sidebar .mw-room small{font-size:10px;line-height:1.4}.mw-compact .mw-sidebar .mw-shelf-link{width:100%;text-align:left}.mw-app.mw-compact .mw-sidebar-footer{display:block;margin-top:24px;padding:14px 0}.mw-compact .mw-sidebar-footer>button{display:block;width:100%;margin:8px 0}.mw-compact .mw-sidebar-footer>a{display:block;font-size:12px;padding:12px 0}
.m-search{margin:10px 0 18px}.m-search>label{display:block;font-weight:600;margin-bottom:7px}.m-search>input{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--bg);color:var(--text)}.m-search-results{margin-top:8px;border:1px solid var(--line);border-radius:8px;max-height:42vh;overflow:auto}.m-search-results>button{display:flex;gap:9px;align-items:center;text-align:left;width:100%;border:0!important;border-radius:0!important;border-bottom:1px solid var(--line)!important;padding:10px!important}.m-search-results strong,.m-search-results small{display:block}.m-search-results small{color:var(--muted);font-size:11px}.m-search-results>p{padding:10px}
.m-properties-content>h3{margin:5px 0 10px!important;font-size:19px}.m-context{font-size:10px;letter-spacing:1px;color:var(--muted);font-weight:700}.m-properties-content>p{font-size:13px;line-height:1.6}.m-properties-content>button{width:100%;margin:7px 0;text-align:center}.m-properties-content .mw-cargo-volume{position:static;pointer-events:auto;margin:12px 0}.m-properties-content h4{font-size:13px;margin:20px 0 9px}.m-bin-list{display:flex;flex-direction:column;gap:7px}.m-bin-list>button{width:100%;display:flex;align-items:center;gap:9px;text-align:left;padding:10px!important;min-height:70px}.m-bin-list>button>span{min-width:0;flex:1}.m-bin-list strong,.m-bin-list small{display:block}.m-bin-list strong{font-size:13px}.m-bin-list small{font-size:10px;color:var(--muted);line-height:1.6}.m-bin-list b{text-align:right;font-size:18px}.m-bin-list b small{font-size:9px;font-weight:400}.m-cargo-line{display:flex;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.m-cargo-line strong,.m-cargo-line small{display:block}.m-cargo-line strong{font-size:13px}.m-cargo-line small{color:var(--muted);font-size:11px}.m-room-shelf{display:flex!important;gap:12px;align-items:center;text-align:left!important}.m-room-shelf>span:nth-child(2){flex:1}.m-desktop-action{text-align:left!important}.m-desktop-action small{display:block;font-size:10px;color:var(--muted)}
.m-view-options{margin:20px 0;border:1px solid var(--line);border-radius:9px}.m-view-options>summary{padding:14px;cursor:pointer;font-weight:600}.m-view-options>.mw-field{margin:12px}.m-view-options>button{margin:12px}.m-switch{display:flex;gap:15px;align-items:center;justify-content:space-between;padding:11px 12px;border-top:1px solid var(--line);font-size:13px}.m-gesture-help{padding:12px;background:var(--bg);border-radius:9px;font-size:11px;color:var(--muted);line-height:1.7}.m-gesture-help strong,.m-gesture-help span{display:block}.m-gesture-help strong{color:var(--text);margin-bottom:5px}.m-overview-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.m-overview-numbers>span{padding:12px 5px;text-align:center;background:var(--bg);border-radius:8px;font-size:10px}.m-overview-numbers strong{display:block;font-size:22px}
.m-desktop-notice .mw-primary{width:100%}.m-desktop-notice p{font-size:15px;line-height:1.7}.m-desktop-symbol{font-size:46px;text-align:center;color:#2563eb;padding:8px}.mw-compact .mw-modal-backdrop{padding:max(18px,env(safe-area-inset-top,0px)) 12px max(18px,env(safe-area-inset-bottom,0px));box-sizing:border-box}.mw-app.mw-compact .mw-modal{width:100%!important;max-width:720px;max-height:calc(100dvh - 36px);margin:0;box-sizing:border-box}.mw-compact .mw-modal-scroll{max-height:calc(100dvh - 38px);overflow:auto;padding:20px!important;box-sizing:border-box;overscroll-behavior:contain}.mw-compact .mw-modal .mw-section-title>h2{font-size:20px}.mw-compact .mw-section-title>button[aria-label="Popup schließen"]{min-height:32px;width:32px;height:32px;right:0;top:0}.mw-compact .mw-field{min-width:0}.mw-compact .mw-modal form{min-width:0}.mw-compact .mw-modal .mw-primary{min-height:46px}
.mw-compact .mw-scene>.mw-cargo-volume{left:8px;top:64px;width:240px;max-width:calc(100% - 16px);padding:8px}.mw-compact .mw-scene>.mw-cargo-volume strong{font-size:12px}.mw-compact .mw-scene>.mw-cargo-volume small{font-size:9px}.mw-compact .mw-scene>.mw-cargo-volume>div:first-child{gap:6px}.mw-compact .mw-billboard{max-width:140px;font-size:10px}.mw-compact .mw-skip-flight{position:absolute;bottom:64px;left:8px;z-index:40;max-width:calc(100% - 16px)}
@media(max-width:370px){.mw-compact .mw-scene-controls .mw-segment>button{font-size:10px!important}.mw-compact .mw-scene-controls>.mw-fullscreen-toggle{font-size:10px!important;max-width:78px}.m-brand small{font-size:8px}.m-topbar>button{width:42px}.m-brand>img{display:none}.m-location>span{display:none}}
@media(orientation:landscape) and (max-height:540px){.mw-compact .m-topbar{min-height:46px;padding-top:0;padding-bottom:0}.mw-compact .mw-scene>.mw-cargo-volume{top:60px;width:210px}.mw-compact .mw-scene>.mw-cargo-volume small{display:none}.m-location{bottom:5px!important}.m-location>button{min-height:36px!important}}
@media(prefers-reduced-motion:reduce){.mw-app.mw-compact .mw-sidebar,.mw-app.mw-compact .mw-properties{transition:none!important}}
html.stockedit-mobile-page{padding-top:0!important}.mw-compact:not([data-page=overview]) .mw-sidebar{top:calc(56px + env(safe-area-inset-top,0px))!important;height:calc(100dvh - 56px - env(safe-area-inset-top,0px))!important}
/* Remove WordPress desktop compensation on every mobile program page. */
body.stockedit-mobile #macubez-root{margin:0!important;width:100%;min-height:100dvh}body.stockedit-mobile #wpbody-content{min-width:0}.mw-app.mw-compact:not([data-page=overview]){width:100%;min-width:0}.mw-compact .j-journal{padding:18px 12px;max-width:100%;min-width:0}
/* The overlapping close circle needs half its diameter outside the dialog. */
.mw-compact .mw-modal-backdrop{padding:max(18px,env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) max(18px,env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px))}
/* Identical mode-button dimensions; the archive close button keeps its compact rectangle. */
.mw-app:not(.mw-review) .mw-scene-controls{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));width:min(510px,calc(100% - 20px));gap:6px}.mw-app:not(.mw-review) .mw-scene-controls .mw-segment{display:contents!important}.mw-app:not(.mw-review) .mw-scene-controls>.mw-fullscreen-toggle{max-width:none!important;width:100%}.mw-app.mw-compact:not(.mw-review) .mw-scene-controls{width:auto}.mw-app.mw-compact:not(.mw-review) .mw-scene-controls button{font-size:11px!important;padding:7px 8px!important}@media(max-width:370px){.mw-app.mw-compact:not(.mw-review) .mw-scene-controls button{font-size:10px!important;padding:6px!important}}
.mw-compact .ops-dialog .ops-result{min-width:0}.mw-compact .ops-dialog .mw-field input{width:100%}.mw-compact .ops-backup details p,.mw-compact .ops-dialog p{overflow-wrap:anywhere}.mw-compact .ops-backup-stats strong{font-size:20px}.mw-compact .ops-dialog progress{width:100%}

/* 6.8: shared spatial editor in the overlay drawer; the scene stays mounted. */
.m-spatial-tools{display:grid;gap:10px;margin:12px 0 18px}.m-spatial-tools p{margin:0;font-size:12px;color:var(--muted)}
.mw-compact .mw-properties form{display:flex;flex-direction:column;gap:12px}.mw-compact .mw-properties>.mw-primary,.mw-compact .mw-properties>.mw-danger{margin:8px 0}.mw-compact .mw-dock-actions{gap:10px;flex-wrap:wrap}
.m-touch-hint{position:absolute;left:12px;right:12px;top:64px;pointer-events:none;z-index:25;text-align:center;font-size:11px;line-height:1.4;padding:6px 10px;border-radius:8px;background:var(--panel);color:var(--text);border:1px solid var(--line)}
.mw-compact .mw-scene canvas{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
