.home-intro{position:absolute;inset:0;z-index:12;background:#0b0603;overflow:hidden;opacity:1;transition:opacity 180ms ease-out}
.home-intro[hidden]{display:none!important}.home-intro.intro-leaving{opacity:0;pointer-events:none}
.home-intro video{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.intro-actions{position:absolute;right:24px;bottom:24px;display:flex;gap:12px;align-items:center}
#introSkip,#introPlay{min-height:44px;padding:10px 18px;border:1px solid #ffffff50;border-radius:24px;background:#16100bd9;color:#fff4e8;font:inherit;font-size:13px;cursor:pointer}
#introPlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
#introPlay[hidden]{display:none}#introStatus{color:#eee;font-size:12px;max-width:240px}
#previewStage.intro-active :is(.product-intro,.scene-tools,.scene-caption,.mfj-stage-top){visibility:hidden;pointer-events:none}
#previewStage.intro-active #productStageCanvas{pointer-events:none}
@media(max-width:760px){.intro-actions{right:16px;bottom:20px;left:16px;justify-content:flex-end}#introStatus{margin-right:auto}}
@media(prefers-reduced-motion:reduce){.home-intro{transition:none}}
/* Full-height media: preserve the complete star at ultrawide and portrait sizes. */
body:has(#homeView:not([hidden])) header{position:absolute;inset:18px 0 auto;z-index:25;background:transparent;border:0;box-shadow:none;padding:18px 4%;min-height:64px;pointer-events:none}
body:has(#homeView:not([hidden])) header :is(a,button){pointer-events:auto;text-shadow:0 1px 10px #000}
body:has(#homeView:not([hidden])) .test-banner{position:absolute;top:0;left:0;right:0;z-index:26;background:transparent;padding:3px;font-size:9px;pointer-events:none}
body:has(#homeView:not([hidden])) header nav .pill{background:#15100b66;backdrop-filter:blur(12px)}
#homeView .mfj-layout,#homeView .mfj-layout .mfj-stage{height:100svh;min-height:580px}
#homeView .product-intro{top:max(130px,15%)}
.home-intro video{position:absolute;height:100%;width:auto;max-width:none;aspect-ratio:16/9;left:50%;top:0;transform:translateX(-50%);object-fit:fill}
@media(min-width:761px){#homeView .mfj-layout #sidePanel{top:100px;height:calc(100% - 100px)}#homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-stage{height:100svh;min-height:580px}}
@media(max-width:760px){
 body:has(#homeView:not([hidden])) header{top:18px;padding:12px 16px;gap:10px;display:flex;flex-wrap:wrap;align-items:center;min-height:0}
 body:has(#homeView:not([hidden])) header .brand{font-size:18px;letter-spacing:1px;white-space:nowrap}
 body:has(#homeView:not([hidden])) header nav{width:100%;justify-content:space-between;gap:4px;flex-wrap:nowrap}
 body:has(#homeView:not([hidden])) header nav button{font-size:11px;padding:8px 4px;min-height:40px;white-space:nowrap}
 body:has(#homeView:not([hidden])) header nav .pill{padding:8px}
 #homeView .product-intro{top:130px;left:18px;max-width:45%}#homeView .product-intro h1{font-size:22px!important;letter-spacing:1px}#homeView .product-intro p{display:none}
 #homeView .mfj-layout .mfj-stage{height:100svh;min-height:640px}
 .home-intro video{top:110px;height:calc(100% - 110px)}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-stage{height:44svh;min-height:260px}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro{display:none}
 body:has(#homeView:not([hidden]) #sidePanel:not([hidden])) header{display:none}
 body:has(#homeView:not([hidden]) #sidePanel:not([hidden])) .test-banner{font-size:8px}
 #homeView .mfj-layout #sidePanel{height:56svh;max-height:calc(var(--editor-vh,100svh) - 8px);padding:12px 16px max(12px,env(safe-area-inset-bottom))}
 #homeView .mfj-layout #sidePanel.short-viewport{height:calc(var(--editor-vh,100svh) - 8px)}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .scene-tools{top:20px;bottom:auto;right:12px}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .scene-caption{display:none}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-entry{font-size:10px;padding:10px;min-height:40px}
}
@media(max-height:520px) and (min-width:761px){
 #homeView .mfj-layout,#homeView .mfj-layout .mfj-stage,#homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-stage{height:100svh;min-height:0}
 body:has(#homeView:not([hidden])) header{padding:8px 20px;min-height:44px}
 #homeView .mfj-layout #sidePanel{top:72px;height:calc(100% - 72px);padding:10px 16px}
 #homeView #sidePanel .mfj-side-head{padding-bottom:6px}#homeView #sidePanel .editor-mode-tabs{margin:4px 0;padding-bottom:4px}
 #homeView .product-intro{top:100px}#homeView .product-intro h1{font-size:24px!important}
}

#homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro{display:none}

/* Use exactly the video viewport for the live wall plate, including mobile's header inset. */
@media(max-width:760px){
 #homeView .mfj-layout:not(:has(#sidePanel:not([hidden]))) #productStageCanvas{top:110px;height:calc(100% - 110px)}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) #productStageCanvas{top:0;height:100%}
}
/* Lighter glass editor: let the warm scene show through, with rounded exposed edges. */
#homeView .mfj-layout #sidePanel{border:1px solid rgba(255,255,255,.25);border-radius:28px;background:transparent;box-shadow:inset 0 1px 0 #ffffff26,0 18px 48px #0003}
#homeView #sidePanel .editor-glass-surface{border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.015) 55%),rgba(131,131,131,.10);backdrop-filter:blur(6px) saturate(1.2);-webkit-backdrop-filter:blur(6px) saturate(1.2)}
#homeView #sidePanel .minimal-placement{background:rgba(0,0,0,.06);border-color:#ffffff2e}
@media(min-width:761px){#homeView .mfj-layout #sidePanel{right:16px;width:calc(var(--editor-width) - 16px);height:calc(100% - 116px)}}
@media(max-width:760px){#homeView .mfj-layout #sidePanel{inset:auto 8px calc(var(--keyboard-inset,0px) + 8px) 8px!important;width:calc(100% - 16px);height:calc(56svh - 8px);max-height:calc(var(--editor-vh,100svh) - 16px);border-radius:24px}#homeView .mfj-layout #sidePanel.short-viewport{height:calc(var(--editor-vh,100svh) - 16px)}}
@media(max-height:520px) and (min-width:761px){#homeView .mfj-layout #sidePanel{height:calc(100% - 88px)}}
@supports not (backdrop-filter:blur(6px)){#homeView #sidePanel .editor-glass-surface{background:rgba(43,36,31,.92)}}
/* Equal desktop margins and a slightly clearer glass surface. */
@media(min-width:761px){#homeView .mfj-layout #sidePanel{top:16px;bottom:16px;height:calc(100% - 32px);max-height:calc(100% - 32px)}}
#homeView #sidePanel .editor-glass-surface{background:linear-gradient(135deg,rgba(255,255,255,.045),rgba(255,255,255,.008) 55%),rgba(131,131,131,.055);backdrop-filter:blur(4px) saturate(1.2);-webkit-backdrop-filter:blur(4px) saturate(1.2)}
body:has(#homeView #sidePanel:not([hidden])) header #lineSidebarToggle{display:none!important}
@supports not (backdrop-filter:blur(4px)){#homeView #sidePanel .editor-glass-surface{background:rgba(43,36,31,.88)}}

/* Replay is presentation-only and unavailable while a work/editor is active. */
.intro-replay{position:absolute;right:4%;bottom:120px;z-index:11;min-height:44px;padding:10px 18px;border:1px solid #ffffff50;border-radius:24px;background:#16100bd9;color:#fff4e8;font:inherit;font-size:13px;cursor:pointer}
.intro-replay[hidden]{display:none!important}
