.factory-game{--ink:#e8f0f2;--muted:#b5c7ce;--line:#496370;--raise:#f3b644;--bolt:#69c7dd;--weld:#dba2d8;--detail:#b8d787;--release:#e7f2e8;margin:2.4rem 0;padding:1.2rem;background:#142a36;color:var(--ink);border:1px solid #365361;box-shadow:0 14px 35px #13273222;font-family:Inter,Arial,sans-serif;line-height:1.4}.factory-game *{box-sizing:border-box}.factory-game-head{display:flex;justify-content:space-between;gap:1rem;align-items:start}.factory-game .factory-kicker{font-size:.75rem;letter-spacing:.13em;color:var(--raise);font-weight:750}.factory-game h2{font-family:inherit;font-size:clamp(1.3rem,3vw,1.8rem);margin:.35rem 0!important;color:#fff}.factory-game-head p{color:var(--muted);font-size:.9rem;margin:0 0 1rem!important}.factory-day{white-space:nowrap;font-size:1rem;letter-spacing:.07em;font-weight:800;color:#142a36;background:var(--raise);padding:.45rem .6rem}.factory-options{display:flex;gap:.8rem;margin:.8rem 0 1rem}.factory-options label{flex:1;color:#d2e0e4;font-size:.78rem;font-weight:650}.factory-options select{display:block;width:100%;margin-top:.3rem;background:#203c4b;color:#fff;border:1px solid #6b8996;border-radius:2px;padding:.65rem;font:inherit;font-size:.88rem}
.factory-board{background:#1b3542;border:1px solid #526b77;overflow:hidden}.factory-board svg{display:block;width:100%;height:auto}.factory-board .gridline{stroke:#37515d;stroke-width:1}.factory-board .planned{stroke:#67808a;stroke-width:2;stroke-dasharray:5 5;fill:none;opacity:.45}.factory-board .frame-steel{stroke:#a9c5ce;stroke-width:5;fill:none;stroke-linecap:square;transition:opacity .3s}.factory-board .area-panel{fill:#23404d;stroke:#708994;stroke-width:1}.factory-board .area-panel.wip{fill:#6e582e;stroke:#f3b644}.factory-board .area-panel.released{fill:#315545;stroke:#b8d787}.factory-board .area-number{fill:#e8f0f2;font-size:13px;font-weight:800;letter-spacing:1px}.factory-board .area-state{fill:#d2dfe3;font-size:11px}.factory-board .floor-label{fill:#bed0d7;font-size:11px;letter-spacing:1px;font-weight:700}.factory-board .pathline{stroke:#f3b644;stroke-width:2;stroke-dasharray:5 7;fill:none;opacity:.7}.factory-board .access{stroke:#8fb3bf;stroke-width:2}.factory-board .crew-marker{transition:transform .42s ease,opacity .25s;opacity:0;pointer-events:none}.factory-board .crew-marker.active{opacity:1}.factory-board .crew-marker.waiting .crew-badge,.factory-board .crew-marker.waiting rect{fill:#f6d781;stroke:#3d3021}.factory-board .crew-person{stroke:#0c2734;stroke-width:2.5;stroke-linecap:round;fill:none}.factory-board .crew-head{fill:#0c2734}.factory-board .crew-tag{fill:#0c2734;font-size:11px;font-weight:800;text-anchor:middle}.factory-board .crew-badge{stroke:#102a35;stroke-width:1}.factory-board .wip-tag{fill:#f3b644;font-size:11px;font-weight:750;text-anchor:middle}
.factory-legend{display:flex;flex-wrap:wrap;gap:.45rem .85rem;margin:.8rem 0;color:#d8e3e7;font-size:.72rem}.factory-legend span{display:flex;align-items:center;gap:.3rem}.factory-legend .key{width:.7rem;height:.7rem;background:var(--raise)}.factory-legend .bolt{background:var(--bolt)}.factory-legend .weld{background:var(--weld)}.factory-legend .detail{background:var(--detail)}.factory-legend .release{background:var(--release)}
.factory-schedule{margin:.8rem 0 1rem;padding:.75rem;background:#1d3947;border:1px solid #4a6673}.schedule-title{display:flex;justify-content:space-between;color:#e9f1f3;font-size:.72rem;font-weight:800;letter-spacing:.08em;margin-bottom:.5rem}.schedule-ruler,.schedule-row{display:flex;align-items:center;gap:.45rem;min-height:27px}.schedule-label{width:108px;flex:none;font-size:.68rem;color:#d2e0e4}.schedule-track{position:relative;flex:1;height:20px;background:repeating-linear-gradient(90deg,#ffffff0d 0,#ffffff0d 1px,transparent 1px,transparent 10%)}.schedule-ruler .schedule-track{height:18px;background:none;color:#a9c2ca;font-size:.65rem}.schedule-tick{position:absolute;top:0;transform:translateX(-50%)}.schedule-bar{position:absolute;top:4px;height:12px;background:var(--bar);min-width:2px}.schedule-bar:nth-child(even){opacity:.78}.schedule-cursor{position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 0 1px #16313a;z-index:2;pointer-events:none}.schedule-ruler .schedule-cursor{height:18px}.factory-controls{display:flex;align-items:center;gap:.8rem}.factory-controls button{background:var(--raise);color:#142a36;border:0;padding:.72rem .8rem;min-width:7.3rem;font-size:.86rem;font-weight:750;cursor:pointer}.factory-controls button.quiet{color:#f2f5f5;background:transparent;border:1px solid #63808e;min-width:auto}.factory-controls label{display:flex;align-items:center;gap:.5rem;flex:1;font-size:.82rem;font-weight:750;white-space:nowrap}.factory-controls input{width:100%;accent-color:var(--raise);cursor:pointer;min-height:32px}.factory-results{display:grid;grid-template-columns:repeat(3,1fr);margin-top:.85rem;border-top:1px solid #48616d;border-bottom:1px solid #48616d}.factory-results div{padding:.7rem .3rem;border-right:1px solid #48616d;display:flex;flex-direction:column;gap:.1rem}.factory-results div:last-child{border:0}.factory-results strong{font-size:1.35rem;color:#fff}.factory-results span{font-size:.7rem;color:#c0d0d5}.factory-game p.factory-insight{margin:1rem 0 .35rem!important;color:#fff;font-size:.88rem;font-weight:650}.factory-game p.factory-fineprint{margin:.5rem 0 0!important;color:#adc0c7;font-size:.73rem}
@media(max-width:630px){.factory-game{margin:2rem -1rem;padding:.8rem}.factory-game-head{align-items:start}.factory-day{font-size:.72rem}.factory-options{flex-direction:column}.factory-board svg{min-width:0}.factory-schedule{padding:.5rem}.schedule-label{width:57px;font-size:.58rem}.schedule-title{font-size:.62rem}.schedule-tick{font-size:.55rem}.factory-controls{flex-wrap:wrap}.factory-controls label{order:-1;flex:0 0 100%}.factory-controls button{flex:1}.factory-results span{font-size:.65rem}}
@media(prefers-reduced-motion:reduce){.factory-board .crew-marker,.factory-board .frame-steel{transition:none}}
