/* Host overlays consume no scene space. The core owns everything inside the frame. */
.b7-function-body:not([data-ready="true"])>iframe,#combination-frame:not([data-ready="true"]),#demo-frame:not([data-ready="true"]){visibility:hidden!important;pointer-events:none!important}
html:has(dialog:modal),body:has(dialog:modal){overflow:hidden!important;overscroll-behavior:none}
.b7-function-dialog.expanded,.b13-combination-dialog{position:fixed!important;inset:0!important;margin:0!important;padding:0!important;width:100%!important;height:100dvh!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:#111716!important;color:#f6f3ec;box-sizing:border-box;grid-template-rows:none!important}
.b7-function-dialog.expanded[open],.b13-combination-dialog[open]{display:block!important}
.b7-function-dialog .b7-function-body,.b7-function-dialog iframe,.b13-combination-dialog #combination-frame{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#101615;box-sizing:border-box}
.b7-function-head,.b13-combination-head{position:absolute!important;z-index:20;top:env(safe-area-inset-top,0px)!important;left:env(safe-area-inset-left,0px)!important;right:env(safe-area-inset-right,0px)!important;display:flex!important;align-items:center!important;gap:8px!important;height:52px!important;min-height:0!important;max-height:52px!important;padding:4px 10px!important;border:0!important;background:linear-gradient(180deg,rgba(12,18,17,.92),rgba(12,18,17,.76))!important;backdrop-filter:blur(16px);box-sizing:border-box}
.b7-function-head>div,.b13-combination-head>div{display:flex!important;align-items:center;gap:10px;min-width:0;flex:1}
.b7-function-dialog.expanded .b7-function-head,.b13-combination-dialog .b13-combination-head{background:linear-gradient(180deg,#101b185e,#101b1817)!important;backdrop-filter:blur(7px)}
.b7-function-dialog.expanded .b7-function-head h2{text-shadow:0 1px 4px #000,0 1px 9px #000}
.b7-function-dialog.expanded .b7-function-head .b7-project-switch{display:flex!important}
.b7-function-head h2,.b13-combination-head h2{font:500 14px/1.2 var(--font-body,Arial),sans-serif!important;letter-spacing:0!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff!important}
.b7-function-head p,.b13-combination-head .eyebrow{display:none!important}
.b7-function-head button,.b13-combination-head button,.b13-combination-head summary,.b7-project-switch select,.b13-combination-head select{height:44px!important;min-height:44px!important;margin:0!important;padding:0 12px!important;border:1px solid #ffffff38!important;border-radius:8px!important;background:#182321cc!important;color:#f6f3ed!important;font:500 12px/1.2 Arial,sans-serif!important;box-sizing:border-box;cursor:pointer}
.b7-function-head button,.b13-combination-head button{flex:none;white-space:nowrap}
.b7-function-head :focus-visible,.b13-combination-head :focus-visible{outline:2px solid #f5d0a1!important;outline-offset:-3px!important}
.b7-project-switch,.b13-combination-head>label{display:flex!important;align-items:center;min-width:0;margin:0!important;font-size:0!important}
.b7-project-switch select,.b13-combination-head select{max-width:200px;width:100%;padding-right:28px!important}
.b13-combination-head>div{display:none!important}
.b13-combination-head>label{flex:1}
.b13-combination-head select{max-width:300px}
.r3-host-more{position:relative;flex:none}
.r3-host-more summary{display:grid;place-items:center;list-style:none}
.r3-host-more summary::-webkit-details-marker{display:none}
.r3-host-more .b13-combination-foot{position:absolute;top:50px;right:0;display:flex!important;flex-direction:column;align-items:stretch;gap:12px;width:min(310px,calc(100vw - 28px));max-height:calc(100dvh - 130px);overflow:auto;padding:16px!important;background:#14201ff5!important;border:1px solid #ffffff38;border-radius:12px;box-shadow:0 14px 50px #0008;color:#eee}
.r3-host-more p{margin:0;font-size:13px;line-height:1.55;color:#d7dfda}
.b13-combination-bar{position:absolute!important;z-index:15;left:12px;top:calc(64px + env(safe-area-inset-top,0px));width:min(420px,calc(100% - 24px));padding:0!important;border:0!important;background:transparent!important;display:flex!important;flex-wrap:wrap;gap:8px;pointer-events:none}
.b13-combination-status:not(:empty),.b13-combination-bar>button{pointer-events:auto;background:#13221fee;border:1px solid #ffffff35;border-radius:10px;padding:12px;color:#f6f3ed;backdrop-filter:blur(14px);font-size:13px;line-height:1.5;margin:0}
.b13-combination-status:empty{display:none}
.b7-function-loading,.b7-function-failure{position:absolute!important;z-index:12;inset:50% auto auto 50%!important;transform:translate(-50%,-50%);width:max-content;max-width:calc(100% - 40px);margin:0!important;padding:18px 22px!important;border-radius:14px!important;background:#172321ed!important;color:#f5f2ec!important;border:1px solid #ffffff38;box-shadow:0 16px 70px #0005;backdrop-filter:blur(18px);font-size:14px;line-height:1.5}
.b7-function-loading:before{content:'';display:inline-block;width:12px;height:12px;margin-right:10px;border:2px solid #d3b58c44;border-top-color:#d3b58c;border-radius:50%;vertical-align:-2px;animation:r3-loading 1s linear infinite}
.r3-host-toast{position:absolute;z-index:30;left:16px;bottom:max(16px,env(safe-area-inset-bottom));max-width:calc(100% - 32px);padding:12px 16px;border:1px solid #ffffff38;border-radius:10px;background:#182321ed;color:#fff;font-size:13px;pointer-events:none}
@keyframes r3-loading{to{rotate:360deg}}
@media(max-width:600px){.b7-function-head,.b13-combination-head{gap:5px!important;padding-inline:6px!important}.b7-function-head>div{gap:0}.b7-function-head:has(select) h2{display:none}.b7-project-switch{width:100%}.b7-function-head button,.b13-combination-head button,.b13-combination-head summary{font-size:11px!important;padding-inline:8px!important}.b7-function-head select,.b13-combination-head select{font-size:12px!important;padding-left:8px!important}.b7-function-head h2{font-size:12px!important}.b13-combination-head .r3-host-more summary{font-size:0!important;width:40px}.b13-combination-head .r3-host-more summary:before{content:'···';font-size:20px}}
@media(prefers-reduced-motion:reduce){.b7-function-loading:before{animation:none}}
/* Direct demo and room entry obey the same 52px overlay contract. */
body[data-page=vorfuehrung]{overflow:hidden!important}
html:has(body[data-page=vorfuehrung]){overflow:hidden!important;scrollbar-gutter:auto!important}
body[data-page=vorfuehrung] .demo-heading :is(select,button,.back){border:1px solid #ffffff38!important;border-radius:8px!important;background:#182321cc!important;color:#f6f3ed!important}
body[data-page=vorfuehrung]>.site-header,body[data-page=vorfuehrung]>.site-footer,body[data-page=vorfuehrung] .demo-notice,body[data-page=vorfuehrung] .demo-result,body[data-page=vorfuehrung] #demo-title,body[data-page=vorfuehrung] #demo-purpose,body[data-page=vorfuehrung] .demo-heading label{display:none!important}
body[data-page=vorfuehrung] #main{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;margin:0;padding:0!important}
body[data-page=vorfuehrung] #demo-frame{position:absolute;inset:0;width:100%!important;height:100%!important;min-height:0!important;border:0;margin:0}
body[data-page=vorfuehrung] .demo-heading{position:absolute;top:env(safe-area-inset-top,0px);left:0;right:0;height:52px;z-index:20;display:flex!important;align-items:center;justify-content:space-between;padding:4px 10px!important;margin:0!important;box-sizing:border-box;background:#111c19d9;backdrop-filter:blur(16px);border:0;gap:8px}
body[data-page=vorfuehrung] .demo-heading>div{display:flex;gap:8px;align-items:center;min-width:0}
body[data-page=vorfuehrung] .demo-heading select,body[data-page=vorfuehrung] .demo-heading button,body[data-page=vorfuehrung] .demo-heading .back{height:44px;min-height:44px;margin:0;padding:0 10px;display:flex;align-items:center;font-size:12px;box-sizing:border-box;max-width:40vw}
body[data-page=vorfuehrung] #demo-status{position:absolute;z-index:10;top:68px;left:14px;right:14px;width:max-content;max-width:calc(100% - 28px);padding:12px 16px;border:1px solid #ffffff33;background:#17211fed;border-radius:10px;color:#eee;font-size:13px}
.rw-world:not([data-state=quiet]) .rw-controls{position:absolute;left:0;right:0;bottom:0;z-index:10;backdrop-filter:blur(16px)}
.rw-world[data-state=intro] .rw-controls{left:50%;right:auto;bottom:14px;width:auto;background:transparent!important;border:0!important;backdrop-filter:none}
.b14-room-active{overflow:hidden!important}
.rw-world[data-state=active] .rw-sticky{position:fixed!important;inset:0!important;z-index:1000}
.rw-world[data-state=active] .rw-stage{height:100dvh!important}
.rw-world[data-state=active] .rw-controls{position:absolute!important;top:env(safe-area-inset-top,0px)!important;bottom:auto!important;height:52px!important;padding:4px 10px!important;border:0!important;background:#111c19d9!important}
.rw-world[data-state=active] .rw-toolbar{justify-content:flex-end!important;min-width:0}
.rw-world[data-state=active] .rw-actions{gap:8px!important;flex:0 1 auto!important;flex-wrap:nowrap!important;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none}
.rw-world[data-state=active] .rw-actions::-webkit-scrollbar{display:none}
.rw-world[data-state=active] .rw-actions #rw-bookmark{display:flex!important}
.rw-world[data-state=active] #rw-overview{min-width:0!important}
.rw-world[data-state=active] .rw-actions button{height:44px;min-height:44px;box-sizing:border-box;flex:0 0 auto;white-space:nowrap;padding-block:0}
@media(max-width:600px){body[data-page=vorfuehrung] .demo-heading .back{font-size:0;width:44px}body[data-page=vorfuehrung] .demo-heading .back:before{content:'←';font-size:22px}body[data-page=vorfuehrung] .demo-heading select{max-width:44vw}body[data-page=vorfuehrung] .demo-heading button{max-width:34vw;font-size:11px;padding-inline:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
body[data-page=vorfuehrung] .demo-heading,.rw-world[data-state=active] .rw-controls{background:linear-gradient(180deg,#101b185e,#101b1817)!important;backdrop-filter:blur(7px)}
