html.factory-active, .factory-active body { overflow: hidden !important; }
#factory-intro { display: none; position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2147483000; background: #06080C; }
.factory-active #factory-intro { display: block; }
#factory-site-window { display: contents; }
.factory-active #factory-site-window { display: block; position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; z-index: 2147483001; visibility: hidden; transform-origin: center; pointer-events: none; will-change: transform, opacity; background-color: inherit; }
#factory-controls { display: none; }
.factory-active #factory-controls { display: flex; position: fixed; right: 24px; bottom: max(20px,env(safe-area-inset-bottom)); z-index: 2147483002; gap: 4px; padding: 5px; background: #06080Ce8; border: 1px solid #63F5DF40; }
#factory-controls button, #factory-controls a { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #dce6e9; cursor: pointer; font: 12px "JetBrains Mono", monospace; text-decoration: none; white-space: nowrap; }
#factory-controls #factory-enter { color: #63F5DF; }
#factory-controls button:disabled { opacity: .5; cursor: default; }
#factory-controls [hidden] { display: none; }
#factory-controls :focus-visible { outline: 2px solid #63f5df; outline-offset: -2px; }
#factory-controls button:hover:not(:disabled), #factory-controls a:hover { background: #63f5df12; }
@media (max-width: 700px) { .factory-active #factory-controls { right: 50%; transform: translateX(50%); bottom: max(12px,env(safe-area-inset-bottom)); } }
@media (max-height: 450px) { .factory-active #factory-controls { bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { #factory-intro, #factory-controls { display: none !important; } .factory-active #factory-site-window { display: contents; visibility: visible; } }
html { scrollbar-gutter: stable; }
#factory-site-window h1[tabindex="-1"]:focus { outline: none; }
