/* Photographic imagery is left intact; interaction and activity are separate layers. */
/* Fill the available viewport, not a percentage of it. The next row starts below the fold. */
#surface.has-factory-scene.floor-surface{
 --scene-header-height:76px;--scene-metrics-height:66px;
 --scene-gap:14px;--scene-top-space:16px;--scene-bottom-space:8px;
 --scene-frame-height:max(360px,calc(100dvh - var(--scene-header-height) - var(--scene-metrics-height) - var(--scene-top-space) - var(--scene-gap) - var(--scene-bottom-space)));
 display:grid;height:auto;grid-template-rows:var(--scene-metrics-height) var(--scene-frame-height) auto auto;
 gap:var(--scene-gap);padding-top:var(--scene-top-space)
}
#surface.has-factory-scene>.metric-strip{margin:0;min-height:0}
#surface.has-factory-scene>.metric-strip>div{padding:4px 16px;min-width:0}
#surface.has-factory-scene>.metric-strip span{display:block;font-size:11px;line-height:14px}
#surface.has-factory-scene>.metric-strip strong{font-size:24px;line-height:26px;margin:2px 0}
#surface.has-factory-scene>.metric-strip strong small{font-size:15px;line-height:1}
#surface.has-factory-scene>.metric-strip p{font-size:10px;line-height:12px}
.has-factory-scene .floor-layout{grid-template-columns:minmax(0,1fr) clamp(292px,19vw,332px);gap:16px}
.has-factory-scene .area-detail{padding:22px;min-width:0}
.has-factory-scene .featured-machine>img{height:clamp(120px,15dvh,160px);max-height:160px;margin:18px 0 12px}
.has-factory-scene .featured-machine>div:first-of-type{gap:8px;flex-wrap:wrap}
.has-factory-scene .pair-metrics{margin:22px 0}
.scene-card{background:#071522;border-color:#345467;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.scene-card .floor-toolbar{padding:12px 14px;gap:10px;flex-wrap:wrap;background:#102537;border-bottom:1px solid #41617266}
.scene-card .floor-toolbar button,.scene-card .plan-caption button{font-size:13px;white-space:nowrap;min-height:34px}
.scene-card .segmented button{padding:8px 12px}
.scene-card .map-options{gap:10px;flex-wrap:wrap}
.scene-card #floorCanvas{padding:0;position:relative;isolation:isolate;min-height:0!important;height:auto!important;display:block;background:#071522;overflow:hidden}
#floorCanvas .factory-scene-svg{max-height:none;filter:none;display:block;position:absolute;inset:0;width:100%;height:100%;overflow:hidden;cursor:default;outline-offset:-3px;user-select:none}
#floorCanvas .factory-scene-svg.can-pan{cursor:grab}
#floorCanvas .factory-scene-svg.is-panning{cursor:grabbing}
/* Heading and logo occupy the clear left margin of the approved 1672 × 941 image. */
.scene-brand-anchor{pointer-events:none;overflow:visible}
.scene-brand-logo{opacity:.4;pointer-events:none}
.scene-mobile-brand{display:none}
.scene-brand{margin:0!important;font-size:42px!important;font-weight:550;letter-spacing:2px;pointer-events:none;line-height:1.15;white-space:nowrap}
.scene-brand span{display:inline-block;color:#92bfd3;background:linear-gradient(105deg,#7ca8bf 0%,#7ca8bf 39%,#daf7ff 45%,#fff 50%,#daf7ff 55%,#7ca8bf 61%,#7ca8bf 100%);background-size:270% 100%;background-position:150% 0;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:factory-title-sheen 3.8s linear infinite;filter:drop-shadow(0 1px 5px #0a192e)}
@keyframes factory-title-sheen{0%{background-position:150% 0}80%,100%{background-position:-50% 0}}
.factory-scene-svg .scene-pin rect{fill:#102a3ced;stroke:var(--scene-status,#7893a4);stroke-width:2}
.factory-scene-svg .scene-pin text{fill:#f3fbff;font:600 23px Inter,Arial,sans-serif;letter-spacing:.2px;pointer-events:none}
.factory-scene-svg .scene-status-light{fill:var(--scene-status,#92aabb)}
.factory-scene-svg .scene-leader{fill:none;stroke:#a4c9d8;stroke-width:1.5;opacity:.75}
.factory-scene-svg .scene-hit{fill:transparent;stroke:var(--scene-status,#8ba5b5);stroke-width:1.5;stroke-opacity:.3;vector-effect:non-scaling-stroke}
.scene-machine{--scene-status:#8ba5b5;cursor:pointer;outline:none}
.scene-machine[data-machine-status=run]{--scene-status:#5fefb6}
.scene-machine[data-machine-status=wait]{--scene-status:#f8d079}
.scene-machine[data-machine-status=stop]{--scene-status:#ff807e}
/* Yellow means awaiting data for K2–K13; telemetry and status labels remain unchanged. */
.scene-machine[data-machine-status=offline]:not([data-cnc="1"]){--scene-status:#f8d079}
.scene-machine[data-machine-status=offline]:not([data-cnc="1"]) .scene-hit{stroke-opacity:.9;stroke-width:2}
.scene-machine:not([data-machine-status=offline]) .scene-hit{stroke-opacity:1;stroke-width:3.5}
.scene-machine:hover .scene-pin rect,.scene-machine:focus-visible .scene-pin rect{stroke:#effcff;stroke-width:3;fill:#19465b}
.scene-machine:hover .scene-hit,.scene-machine:focus-visible .scene-hit{stroke-opacity:1;fill:#b2e1fa14;stroke-width:3.5}
.scene-area,.scene-equipment,.scene-panel{cursor:pointer;outline:none}
.factory-scene-svg .scene-area rect{fill:#0b243ce8;stroke:#628799;stroke-width:1}
.factory-scene-svg .scene-area text{fill:#dcebf4;font:500 23px Inter,Arial,sans-serif;pointer-events:none}
.factory-scene-svg .scene-area-qr{cursor:zoom-in}
.factory-scene-svg .scene-area-qr image,.factory-scene-svg .scene-area-qr text{pointer-events:none}
.factory-scene-svg .scene-area-qr image{filter:drop-shadow(0 2px 5px #061625a8)}
.factory-scene-svg .scene-area-qr .scene-area-code{fill:#f1faff;font:700 14px Inter,Arial,sans-serif;letter-spacing:.5px;paint-order:stroke;stroke:#102537;stroke-width:3px}
.area-qr-dialog{width:min(480px,94vw);max-height:92dvh;overflow:auto}
.area-qr-large{display:flex;flex-direction:column;align-items:center;gap:10px;margin:12px auto 16px}
.area-qr-large img{width:min(320px,82vw);height:min(320px,82vw);background:#fff;image-rendering:pixelated;border-radius:6px}
.area-qr-large strong{font-size:20px;letter-spacing:1px}
.area-qr-dialog .subtle{text-align:center;line-height:1.5}
.area-qr-detail-button{width:100%;margin-top:14px;min-height:44px}
.factory-scene-svg .scene-area-native rect{fill:transparent;stroke:transparent}.factory-scene-svg .scene-area-native text{opacity:0}.factory-scene-svg .scene-area-native:hover text,.factory-scene-svg .scene-area-native:focus-visible text{opacity:1}
.factory-scene-svg .scene-area:hover rect,.factory-scene-svg .scene-area:focus-visible rect,.factory-scene-svg .area-selected rect{fill:#134457;stroke:#78d4d6;stroke-width:2}
.factory-scene-svg .scene-equipment rect{fill:#292a43ed;stroke:#a0a4c1;stroke-width:1.5}
.factory-scene-svg .scene-equipment text{fill:#f0edff;font:600 23px Inter,Arial,sans-serif;pointer-events:none}
.factory-scene-svg .scene-equipment:hover rect,.factory-scene-svg .scene-equipment:focus-visible rect{fill:#4a4562;stroke:#e7e5ff;stroke-width:3}
.factory-scene-svg .scene-equipment .scene-equipment-hit{fill:transparent;stroke:transparent}.factory-scene-svg .scene-equipment:hover .scene-equipment-hit,.factory-scene-svg .scene-equipment:focus-visible .scene-equipment-hit{fill:#bcc8ff12;stroke:#cdd2f0;stroke-width:2;vector-effect:non-scaling-stroke}
.scene-panels{display:none}.show-scene-panels .scene-panels{display:initial}
.factory-scene-svg .scene-panel rect{fill:#342f20;stroke:#dfbf79;stroke-width:1.5}
.factory-scene-svg .scene-panel text{fill:#ffe5a3;font:600 18px Inter,Arial,sans-serif}
.factory-scene-svg .scene-panel:focus-visible rect,.factory-scene-svg .scene-panel:hover rect{stroke:#fff;stroke-width:3}
.scene-corner{position:absolute;right:14px;bottom:14px;z-index:2}
.scene-equipment-picker{display:flex;gap:9px;align-items:center;color:#b4d2df;background:#081d30d9;border:1px solid #50708788;border-radius:10px;padding:7px 9px;font-size:12px;backdrop-filter:blur(12px)}
.scene-equipment-picker select{background:#123248;color:#e5f6ff;border:1px solid #456479;border-radius:6px;padding:6px;max-width:170px;font:inherit}
.scene-card .scene-caption{padding:10px 14px;background:#102537;border-top:1px solid #41617266;display:flex;flex-direction:column;gap:9px;align-items:stretch}
.scene-display-options,.scene-caption-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.scene-display-options{justify-content:flex-start;gap:16px}
.scene-display-options button{background:transparent;border:0;color:#c0d9e6;padding:0}
.scene-display-options label{display:flex;align-items:center;gap:5px;font-size:12px;color:#a8c0d2}
.scene-display-options input{accent-color:#77ceb9}
.scene-provenance{color:#8ca8bb;font-size:11px;line-height:1.5}
.scene-caption .status-legend{gap:12px;font-size:11px;flex-wrap:wrap}
.scene-caption .legend-wait{background:#f8d079}
.scene-caption #sceneDrawing{margin-left:auto;color:#8eb3c6}
.factory-people{pointer-events:none;isolation:isolate}
.factory-person{filter:drop-shadow(1px 2px 1.1px #030b0f80)}
.factory-station{filter:drop-shadow(.6px 1px .7px #030b0f66)}
#login .factory-person{filter:none}
#login .factory-person-body{filter:brightness(1.48) contrast(1.06) drop-shadow(.6px .8px .6px #06132366)}
#login .login-contact-shadow{fill:#030b14;opacity:.38}
#login .login-worklight{animation:login-worklight-cycle 6.8s ease-in-out infinite;mix-blend-mode:screen}
#login.factory-motion-paused .login-worklight{animation-play-state:paused}
@keyframes login-worklight-cycle{0%,100%{opacity:.2}35%,60%{opacity:.85}}
.equipment-dialog{width:min(660px,94vw)!important}
.equipment-detail{padding:12px 2px}.equipment-location{display:block;color:#a9bfcd;font-size:14px;margin-bottom:14px}.equipment-detail .detail-numbers{margin-top:20px}
.aux-machine{cursor:pointer}.aux-machine:focus-visible rect,.aux-machine:hover rect{stroke:#cbd8ff!important;stroke-width:3}
#login .login-ambience{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;overflow:hidden}
#login .login-main,#login .login-milestones,#login .login-footer{z-index:1}
.ambient-light{animation:factory-light-breathe 9s ease-in-out infinite alternate;opacity:.3}
@keyframes factory-light-breathe{from{opacity:.16}to{opacity:.65}}
#login .login-cinema{position:absolute;inset:0;z-index:-2;overflow:hidden;pointer-events:none;opacity:0;transition:opacity 1.1s ease;background:#091320}
#login.login-cinema-ready .login-cinema{opacity:1}
#login .login-cinema-video{display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:cover;object-position:center}
#login .login-cinema:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#07111cdf 0%,#07111c75 32%,#07111c0d 60%),linear-gradient(90deg,#07111c38,transparent 42%)}
@media(prefers-reduced-motion:reduce){#login .login-cinema{display:none}}
.factory-motion-paused .ambient-light,.factory-motion-paused .scene-brand span{animation-play-state:paused}
@media(max-width:1250px){#surface.has-factory-scene.floor-surface{--scene-header-height:66px}.scene-card .floor-toolbar{padding:10px;gap:7px}.scene-card .segmented button{padding:8px;font-size:12px}.scene-card .map-options{margin-left:0}.scene-equipment-picker>span{display:none}}
@media(max-height:850px) and (min-width:681px){#surface.has-factory-scene.floor-surface{--scene-header-height:64px}.has-factory-scene .area-detail{padding:18px}.has-factory-scene .pair-metrics{margin:16px 0}}
@media(max-width:1100px){#surface.has-factory-scene.floor-surface{grid-template-rows:var(--scene-metrics-height) auto auto auto}.has-factory-scene .floor-layout{display:flex;flex-direction:column}.has-factory-scene .area-detail{display:flex;max-height:none}.has-factory-scene .floor-card{height:var(--scene-frame-height);min-height:360px;flex:none}.has-factory-scene .featured-machine{display:grid;grid-template-columns:150px minmax(0,1fr);column-gap:22px;align-items:center}.has-factory-scene .featured-machine>img{grid-row:1/5;width:150px;margin:0}.has-factory-scene .featured-machine>p{margin:4px 0}.has-factory-scene .featured-machine>button{grid-column:2}.has-factory-scene .area-footer{margin-top:18px}}
@media(max-width:800px){.scene-card .floor-toolbar{justify-content:space-between}.scene-card .map-options{width:100%;justify-content:space-between}.scene-floor-tabs{width:100%}.scene-floor-tabs button{flex:1}.scene-corner{bottom:10px;right:10px}.scene-equipment-picker select{font-size:14px}.scene-caption-bottom{gap:10px}.scene-provenance{font-size:11px}.scene-display-options{gap:12px}.scene-card .scene-caption{padding:10px}#login .login-motion-control{right:16px;top:16px;font-size:11px}}
@media(max-width:680px){#surface.has-factory-scene.floor-surface{--scene-header-height:63px;--scene-metrics-height:132px}.has-factory-scene .floor-layout{min-height:0}.has-factory-scene .featured-machine{grid-template-columns:95px minmax(0,1fr);gap:10px 14px}.has-factory-scene .featured-machine>img{width:95px;height:95px}.has-factory-scene .pair-metrics{margin:8px 0}.has-factory-scene .featured-machine .badge{font-size:9px}.has-factory-scene .floor-bottom{margin:0}}
@media(max-width:480px){.scene-display-options button{font-size:11px!important}.scene-card .floor-toolbar button{font-size:11px}.scene-caption .status-legend{gap:8px}.scene-equipment-picker{padding:5px}.scene-caption #sceneDrawing{margin-left:0}}
@media(prefers-reduced-motion:reduce){.scene-brand span,.ambient-light{animation:none!important}.factory-person{filter:none}}
/* Keep the tenant identity out of the map on touch-sized screens. It must not
   scale with map zoom or depend on Safari's SVG image sizing. */
@media(max-width:800px){
 .scene-card .scene-mobile-brand{display:flex;flex:0 0 100%;min-width:0;align-items:center;justify-content:space-between;gap:16px;padding:2px 2px 8px;border-bottom:1px solid #41617266}
 .scene-mobile-brand .scene-brand{font-size:18px!important;letter-spacing:1.3px;line-height:1.2;min-width:0}
 .scene-mobile-brand img{display:block;flex:0 1 auto;width:clamp(70px,20vw,108px);max-width:32%;height:34px;object-fit:contain;opacity:.65;pointer-events:none}
 .factory-scene-svg .scene-brand-anchor,.factory-scene-svg .scene-brand-logo{display:none}
 .has-factory-scene .floor-card.scene-card{height:auto;min-height:0;grid-template-rows:auto auto auto}
 .scene-card #floorCanvas{display:flex;flex-direction:column;height:auto!important;min-height:0!important}
 .scene-card #floorCanvas .factory-scene-svg{position:relative;inset:auto;flex:none;min-width:0;max-width:100%;width:100%;height:auto;min-height:180px;aspect-ratio:1672/941}
 .scene-card .scene-corner{position:static;display:flex;justify-content:flex-end;margin:6px 10px 10px}
}
