/* Approved grey glass over one continuous amber scene. No changes to artwork. */
:root{--glass-ink:#fff;--glass-muted:#e2e2e2;--glass-edge:#ffffff59}
#homeView .mfj-layout{position:relative;display:block;isolation:isolate}
#homeView .mfj-layout:has(#sidePanel:not([hidden])){display:block}
#homeView .mfj-layout #sidePanel{position:absolute;inset:0 0 0 auto;width:50%;height:100%;max-height:100%;margin:0;padding:22px 32px;z-index:8;isolation:isolate;background:transparent;border:0;border-left:1px solid #ffffff59;border-radius:0;box-shadow:none;color:#fff;overflow:hidden}
#sidePanel[hidden]{display:none!important}
.editor-glass-surface{position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(135deg,#ffffff12,transparent 55%),rgba(131,131,131,.3);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);mask-size:100% 100%;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;-webkit-mask-repeat:no-repeat}
#homeView #sidePanel .mfj-side-head{position:relative;top:auto;background:transparent;padding:0 0 16px;border-bottom:1px solid #ffffff26;gap:16px}
#homeView #sidePanel .mfj-side-head h2{color:#fff;font-size:21px;margin:0}
#homeView #sidePanel #closeSide{min-height:44px;min-width:44px;color:#fff;border-color:#ffffff59}
.editor-cutout{flex:none;font-family:'DM Sans',sans-serif;font-size:clamp(60px,7vw,105px);font-weight:800;letter-spacing:-5px;line-height:1.08;margin:15px 0;color:#fff;pointer-events:none}.editor-cutout.is-cutout{color:transparent}
.editor-mode-tabs{display:flex;gap:10px;flex:none;margin-bottom:16px}.editor-mode-tabs button{background:#0004;border:1px solid #ffffff59;border-radius:6px;min-height:44px;padding:10px 18px;color:#fff;font-size:14px}.editor-mode-tabs button[aria-pressed=true]{background:#fff;color:#000;border-color:#fff}
#homeView #sidePanel #photoPanel,#homeView #sidePanel #shadowPanel{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#ffffff66 transparent;padding:0 12px 14px 0}
#homeView #sidePanel .mfj-side-foot{background:#171717bf;border-top:1px solid #ffffff33;border-radius:10px;padding:12px;flex:none;margin-top:12px}
#homeView #sidePanel .field{color:#fff;font-size:14px;margin:16px 0 8px}
#homeView #sidePanel .field input,#homeView #sidePanel .field select,#homeView #sidePanel textarea{background:#141414de;color:#fff;border-color:#ffffff66;font-size:16px;border-radius:6px}
#sidePanel option{background:#202020;color:#fff}
#homeView #sidePanel .mfj-help,#homeView #sidePanel .mfj-hint{color:#e2e2e2;font-size:12px;line-height:1.65}
#homeView #sidePanel h3,#homeView #sidePanel h4{color:#fff}
#homeView #sidePanel .mfj-primary{background:#fff;color:#111;border-color:#fff}#homeView #sidePanel .mfj-primary:disabled{background:#353535;color:#c4c4c4;border-color:#777}
#homeView #sidePanel .mfj-secondary{background:#ffffff0d;color:#fff;border-color:#ffffff59}
#homeView #sidePanel .mfj-style-card{background:#181818bd;border-color:#ffffff33;color:#fff}#homeView #sidePanel .mfj-style-card.selected{border-color:#fff;box-shadow:0 0 0 1px #fff}#homeView #photoStyleCards .mfj-style-card.selected::after{background:#fff;color:#111}
#homeView #sidePanel input[type=file]::file-selector-button{background:#ffffff14;color:#fff;border-color:#ffffff59}#homeView #sidePanel input[type=range],#homeView #sidePanel input[type=checkbox]{accent-color:#fff}
#homeView #sidePanel :focus-visible{outline-color:#fff!important}
@media(min-width:761px){
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-stage{width:100%;height:calc(100svh - 112px);min-height:600px}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro{left:3%;right:auto;top:5%;text-align:left;max-width:26%}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro h1{font-size:28px!important}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) #openWorkbench{left:18px;bottom:105px}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .scene-caption{left:18px;right:calc(50% + 18px)}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .scene-gesture{display:none}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-stage.editing-source #homeEditArea{left:12px;right:calc(50% + 12px);top:70px;bottom:190px}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .mfj-degraded{left:5%;width:40%}
 #homeView #sidePanel:not([hidden]){animation:glass-in .32s cubic-bezier(.22,1,.36,1)}
}
@keyframes glass-in{from{opacity:0;translate:28px 0}to{opacity:1;translate:0 0}}
@media(max-height:800px){.editor-cutout{font-size:58px;margin:6px 0}.editor-mode-tabs{margin-bottom:8px}}
@media(max-width:760px){
 #homeView .mfj-layout #sidePanel{position:fixed!important;inset:auto 0 var(--keyboard-inset,0px) 0!important;width:100%;height:min(58svh,calc(var(--editor-vh,100svh) - 12px));max-height:calc(var(--editor-vh,100svh) - 12px);padding:14px 18px max(12px,env(safe-area-inset-bottom));border-right:0;border-left:0;border-top:1px solid #ffffff59;border-radius:16px 16px 0 0;z-index:30}
 .editor-cutout{display:none}.editor-mode-tabs{margin:10px 0}.editor-mode-tabs button{flex:1}
 #homeView #sidePanel .mfj-side-head{padding-bottom:10px}#homeView #sidePanel .mfj-side-head h2{font-size:18px}
 #homeView #sidePanel .mfj-side-foot{padding:9px;margin-top:7px}#homeView #sidePanel .mfj-side-foot .mfj-help{font-size:10px;margin:4px 0}
 .editor-glass-surface{background:rgba(70,70,70,.85)}
}
@supports not (backdrop-filter:blur(20px)){.editor-glass-surface{background:#333}.editor-cutout.is-cutout{color:#fff}.editor-glass-surface{mask-image:none!important;-webkit-mask-image:none!important}}
@media(prefers-reduced-motion:reduce){#homeView #sidePanel:not([hidden]){animation:none}}
/* Readable content over the brightest projection; glass remains visible around it. */
#homeView #sidePanel #photoPanel,#homeView #sidePanel #shadowPanel{background:#0008;border-radius:8px;padding:0 14px 14px}
@media(max-width:760px){
 #homeView .mfj-layout #sidePanel.short-viewport{height:calc(var(--editor-vh,100svh) - 8px);max-height:calc(var(--editor-vh,100svh) - 8px);padding:8px 12px}
 #homeView #sidePanel.short-viewport .mfj-side-head{padding-bottom:4px}#homeView #sidePanel.short-viewport .editor-mode-tabs{margin:4px 0}
 #homeView #sidePanel.short-viewport .mfj-side-foot{margin-top:4px;padding:5px}
 #homeView #sidePanel.short-viewport .mfj-side-foot #testEnvNotice{display:none}
}

/* Right editor reserves the left viewport for the complete product and projection.
   Existing renderer ResizeObserver reframes it without resetting camera or artwork. */
@media(min-width:761px){
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) #productStageCanvas{width:50%;right:auto}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .scene-tools{right:calc(50% + 18px)}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro h1{font-size:22px!important}
 #homeView .mfj-layout:has(#sidePanel:not([hidden])) .product-intro p{display:none}
}
