.scene-image{transition:object-position .32s cubic-bezier(.2,.7,.2,1),filter .2s;object-fit:cover}


.scene-image.camera-feed{object-position:center!important}


.fan-frame{transition:left .32s cubic-bezier(.2,.7,.2,1)}


@media (pointer:coarse) and (max-width:900px){.menu-layout{padding:20px}.menu-logo,.menu-logo-art{width:151px;height:159px}.menu-options{margin-top:clamp(90px,17vh,145px)}.menu-option-image{height:34px;width:190px}.menu-option-image img{width:180px;height:30px}.menu-option-text{font-size:18px}.menu-freddy-frame{object-fit:contain;object-position:center right;opacity:.42}}


@media (orientation:landscape) and (max-height:500px){.menu-layout{padding:12px 24px}.menu-logo,.menu-logo-art{width:120px;height:126px}.menu-options{margin-top:5vh}.menu-option-image{height:29px}.menu-option-image img{height:27px}.menu-option-text{min-height:25px;font-size:15px}}



.stage{isolation:isolate}


.scene-image{object-fit:cover;object-position:var(--office-look,50%) center;will-change:object-position}


.scene-image.camera-feed{object-position:center center!important}


.fan-frame,.door-frame{will-change:transform;transition:transform .32s cubic-bezier(.2,.7,.2,1),left .32s cubic-bezier(.2,.7,.2,1)}


.menu-logo{display:block;width:201px;height:212px;min-height:0;flex:0 0 auto;margin:0}


.menu-logo-art{display:block;width:201px;height:212px;object-fit:contain;object-position:left top}


.menu-options{margin-top:clamp(100px,17vh,145px);gap:0}


.menu-option-image{height:38px;width:224px}


.menu-option-image img{width:203px;height:33px;object-fit:contain;object-position:left center}


.menu-option-text{min-height:32px;font-size:19px}


.menu-freddy-frame{opacity:.5;object-fit:cover;object-position:center;mix-blend-mode:screen}


@media (pointer:coarse) and (max-width:900px){.menu-logo,.menu-logo-art{width:151px;height:159px}.menu-options{margin-top:clamp(88px,16vh,135px)}.menu-option-image{width:190px;height:34px}.menu-option-image img{width:180px;height:30px}.menu-option-text{font-size:18px}.menu-freddy-frame{object-fit:contain;object-position:center right;opacity:.42}}


@media (orientation:landscape) and (max-height:500px){.menu-logo,.menu-logo-art{width:120px;height:126px}.menu-options{margin-top:5vh}.menu-option-image{height:29px}.menu-option-image img{height:27px}.menu-option-text{min-height:25px;font-size:15px}}



/* Shared world-space pan: panorama and in-world props translate together. */
#stage{--office-pan:0px;--office-image-width:125%;}


#stage #sceneImage:not(.camera-feed){left:0!important;right:auto!important;width:var(--office-image-width)!important;max-width:none!important;height:100%!important;object-fit:fill!important;object-position:left center!important;transform:translate3d(var(--office-pan),0,0)!important;transition:transform .28s cubic-bezier(.2,.7,.2,1)!important;}


#stage #sceneImage.camera-feed{left:0!important;width:100%!important;max-width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important;transform:none;}


#stage #fanFrame,#stage .door-frame{transform:translate3d(var(--office-pan),0,0);transition:transform .28s cubic-bezier(.2,.7,.2,1);}


/* Door panels and hitboxes live beside #stage, so they must inherit the pan from .game. */
.game .sprite-panel,.game .control-hit{transform:translate3d(var(--office-pan,0px),0,0)!important;transition:transform .28s cubic-bezier(.2,.7,.2,1)!important;}


#stage #leftDoorFrame{left:0!important;}


#stage #rightDoorFrame{right:0!important;}


.game .left-panel{left:0!important;}


/* Anchor the right panel and its hitboxes to the far edge of the full panorama. */
.game .right-panel,.game .right-door-hit,.game .right-light-hit{right:calc(100% - var(--office-image-width,125%))!important;left:auto!important;}



/* Original FNaF asset fidelity and responsive camera monitor */
#cameraImage{object-fit:contain!important;background:#000!important}


.camera-name-art{display:block!important;position:relative!important;inset:auto!important;width:auto!important;height:auto!important;max-width:min(46vw,360px)!important;max-height:12vh!important;object-fit:contain!important;background:transparent!important;margin:0!important}


#cameraCaption{display:flex;position:absolute;left:2%;top:2%;z-index:4;padding:0!important;background:transparent!important;pointer-events:none}


@media (orientation:portrait){#camview{inset:0!important;height:100%!important;width:100%!important}#cameraImage{object-fit:contain!important}#cameraCaption .camera-name-art{max-width:42vw!important;max-height:9vh!important}#cameraMap{object-fit:contain!important}}



/* Input safety: disjoint, mode-aware hit regions. */
.sprite-controls{z-index:7!important;pointer-events:none!important}


.control-hit{z-index:9!important;height:10%!important;min-height:28px;pointer-events:auto!important;touch-action:manipulation;transform:none!important}


.left-door-hit,.right-door-hit{top:40%!important}


.left-light-hit,.right-light-hit{top:51%!important}


@media (orientation:portrait){.control-hit{width:13vw!important;height:9%!important;min-height:34px}.left-door-hit,.right-door-hit{top:39%!important}.left-light-hit,.right-light-hit{top:50%!important}}


.sprite-controls.monitor-hidden{display:none!important;visibility:hidden!important;pointer-events:none!important}


#stage.monitor-up .sprite-controls,#stage.monitor-up .fan-frame,#stage.monitor-up .door-frame,#stage.monitor-up .door-hotspot{display:none!important;pointer-events:none!important}


/* neutralized conflicting fan absolute box */
#stage #sceneImage.camera-feed{object-fit:contain!important;background:#000!important}


.cams{display:none!important;pointer-events:none!important}


.cams.show{display:block!important;pointer-events:auto!important}


.cams .camera-map{pointer-events:none!important}

.cams .camera-map .camgrid{pointer-events:auto!important}


.cams .camgrid button{touch-action:manipulation;z-index:13!important}


.cams .camview{pointer-events:none!important}



/* CAM 6 is audio-only in the original FNaF 1. Never reveal a room image here. */
#stage.camera-disabled #sceneImage.camera-feed{visibility:hidden!important}


#stage.camera-disabled::after{content:"-CAMERA DISABLED-\A AUDIO ONLY";white-space:pre;position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;text-align:center;padding:12%;color:#d5d5d5;background-color:#030303;background-image:repeating-linear-gradient(0deg,transparent 0 2px,#ffffff0b 3px,transparent 4px),repeating-linear-gradient(90deg,#ffffff05 0 1px,transparent 1px 5px);font-family:monospace;font-weight:bold;font-size:clamp(16px,2.4vw,32px);letter-spacing:.08em;text-shadow:0 0 5px #fff;line-height:1.8;pointer-events:none}


#stage.camera-disabled .static-frame{opacity:.18!important;mix-blend-mode:screen!important;z-index:3!important}



/* Camera map geometry: image and hitbox layer must share the exact same square. */
.camera-map>img,
.camera-map .camgrid{width:min(32vw,260px,42vh)!important;height:min(32vw,260px,42vh)!important;max-height:none!important;aspect-ratio:1!important;object-fit:fill!important;right:2%!important;bottom:3%!important}


@media (orientation:portrait){
  .camera-map>img,
  .camera-map .camgrid{width:min(54vw,240px,42vh)!important;height:min(54vw,240px,42vh)!important;max-height:none!important;right:1%!important;bottom:2%!important}
}


/* JS viewport classes follow real viewport orientation; pointer type stays separate. */
html.viewport-portrait .camera-map>img,
html.viewport-portrait .camera-map .camgrid{width:min(54vw,240px,42vh)!important;height:min(54vw,240px,42vh)!important;right:1%!important;bottom:2%!important}


html.viewport-landscape .camera-map>img,
html.viewport-landscape .camera-map .camgrid{width:min(32vw,260px,42vh)!important;height:min(32vw,260px,42vh)!important;right:2%!important;bottom:3%!important}
