:root{--factory-steel:#274348;--factory-paper:#f7faf7;--factory-line:#d6e1dd;--factory-muted:#667d79}
.arcade-page{background:var(--factory-paper)}
.arcade-header h1{font-size:17px}
.arcade-stage{height:calc(100svh - 188px);min-height:400px;background:#bdcdcc}
.arcade-hud{top:12px;border:0;border-radius:4px;box-shadow:0 2px 12px #253e3d12;background:#f9fcf6ee}
.arcade-stat{padding:6px 18px;min-width:102px}.arcade-stat>strong{font-size:21px}
.factory-dispatch{position:absolute;top:82px;left:20px;right:20px;display:flex;justify-content:space-between;gap:20px;pointer-events:none;z-index:2}
.factory-next{display:flex;align-items:center;gap:12px;background:#f9fcf5f2;padding:7px 12px;border-left:3px solid var(--factory-steel);min-height:48px}
.factory-next>span:first-child{font-size:11px;font-weight:800;color:var(--factory-muted)}
.factory-next>strong{font-size:22px;min-width:60px;white-space:nowrap;line-height:1}
.factory-next>strong[data-urgent=true]{text-decoration:underline;text-underline-offset:5px}
.factory-queue{display:flex;gap:10px;font-size:13px;border-left:1px solid var(--factory-line);padding-left:12px;font-weight:900}
.factory-queue>span{white-space:nowrap}
.factory-progress{display:grid;grid-template-columns:1fr auto;gap:3px 16px;align-content:center;min-width:190px;color:var(--factory-steel);font-size:12px;font-weight:800;background:#f9fcf5e8;padding:7px 12px}
.factory-progress progress{grid-column:1/-1;width:100%;height:5px;accent-color:#177f77;border:0;border-radius:0;background:#d6e1dd}
.factory-progress progress::-webkit-progress-bar{background:#d6e1dd}.factory-progress progress::-webkit-progress-value{background:#177f77}
.arcade-controls{gap:12px;padding:12px 20px;min-height:76px}
.factory-controls-label{font-size:12px;color:var(--factory-muted);font-weight:800;margin-right:4px}
.factory-gate{width:100px;min-width:0;min-height:46px;border-radius:5px;border:1px solid var(--factory-line);border-bottom:4px solid var(--gate-color);color:var(--gate-color);font-size:17px;gap:14px}
.factory-gate[aria-pressed=true]{background:var(--gate-color);border-color:var(--gate-color);color:#fff;box-shadow:0 0 0 2px #fff,0 0 0 4px var(--gate-color)}
.factory-gate:active,.factory-slow:active{transform:scale(.97)}
.factory-slow{margin-left:12px;min-width:117px;color:var(--factory-steel);background:#eaf0e9}
.arcade-status{border-left:3px solid var(--game-accent);border-radius:2px;bottom:14px;font-size:12px;min-height:29px}
.arcade-dialog{width:320px;border-radius:6px;padding:24px;background:#f9fcf7f7}
.arcade-dialog h2{font-size:21px;margin:0 0 12px}
.factory-brief{color:var(--factory-muted);font-size:12px;margin:0 0 18px;line-height:1.8}
.factory-home{display:flex;align-items:center;justify-content:center;gap:8px;border:0;background:transparent;color:var(--factory-muted);font-size:12px;font-weight:700;width:100%;min-height:40px;margin-top:8px}
.factory-home svg{width:15px;height:15px}
.arcade-result-score{font-size:38px}.arcade-result-detail{font-size:12px}
.arcade-stage[data-state=ready] .factory-dispatch,.arcade-stage[data-state=ready] .arcade-hud{visibility:hidden}
.arcade-stage[data-state=paused] .factory-dispatch,.arcade-stage[data-state=finished] .factory-dispatch{visibility:hidden}
@media(max-width:640px){
 .arcade-header{height:58px;gap:7px;padding:8px}.arcade-header h1{font-size:14px}.arcade-brand img{width:26px;height:26px}.arcade-icon{width:32px}.arcade-tools{gap:1px}
 .arcade-stage{height:calc(100svh - 201px);min-height:390px}.arcade-hud{top:10px;max-width:calc(100% - 16px);width:100%}.arcade-stat{flex:1;min-width:0;padding:7px 6px}.arcade-stat>strong{font-size:18px}.arcade-stat>span{font-size:10px}
 .factory-dispatch{top:73px;left:8px;right:8px;gap:5px;flex-direction:column}.factory-next{min-height:40px;padding:7px 9px;gap:9px}.factory-next>strong{font-size:19px;min-width:52px}.factory-queue{font-size:12px;gap:10px;flex:1;justify-content:flex-end;padding-left:8px}
 .factory-progress{padding:3px 10px;background:transparent;font-size:10px;gap:0 10px;min-width:0}.factory-progress progress{height:3px}
 .arcade-controls{min-height:90px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 94px;gap:8px;padding:12px 10px}.factory-controls-label{display:none}.factory-gate{width:100%;min-height:47px;padding:8px 6px;font-size:16px;gap:7px}.factory-gate svg{width:18px;height:18px}.factory-slow{margin:0;min-width:0;width:100%;font-size:11px;padding:8px 5px;gap:3px}.factory-slow svg{width:16px;height:16px}
 .arcade-status{bottom:10px;max-width:calc(100% - 16px);font-size:11px;white-space:normal}
 .arcade-footer{min-height:53px;gap:6px;padding:5px 10px}.arcade-switcher select{max-width:135px}.arcade-volume{flex-basis:78px}.arcade-volume input{width:58px}
}
@media(max-width:350px){.arcade-header h1{font-size:12px}.arcade-icon{width:29px}.arcade-tools{gap:0}.arcade-controls{grid-template-columns:repeat(3,minmax(0,1fr)) 82px;gap:6px}.factory-next{gap:6px}.factory-queue{gap:6px}.factory-queue>span:last-child{display:none}.arcade-footer{min-height:62px}}
@media(max-height:500px) and (orientation:landscape){
 .arcade-header{height:44px;padding:5px 16px}.arcade-header h1{font-size:15px}.arcade-stage{height:calc(100svh - 100px);min-height:250px}.arcade-controls{min-height:56px;padding:7px 16px;gap:12px}.factory-gate{min-height:40px;width:88px;padding:5px 12px}.factory-slow{min-height:40px}.arcade-footer{display:none}
 .arcade-hud{top:8px;left:10px;transform:none;width:250px}.arcade-stat{padding:5px 8px;min-width:0;flex:1}.arcade-stat>strong{font-size:15px}.arcade-stat>span{font-size:9px}
 .factory-dispatch{top:8px;left:auto;right:10px;width:240px;display:flex;flex-direction:column;gap:4px}.factory-next{min-height:36px;padding:6px 8px;gap:8px}.factory-next>span:first-child{font-size:10px}.factory-next>strong{font-size:18px;min-width:44px}.factory-queue{font-size:11px;gap:8px;padding-left:8px}.factory-queue>span:last-child{display:none}.factory-progress{font-size:10px;min-width:0;padding:3px 8px;background:#f9fcf5cc}.factory-progress progress{height:3px}
 .arcade-dialog{padding:14px 20px;width:310px}.arcade-dialog h2{font-size:18px;margin-bottom:6px}.factory-brief{margin-bottom:10px;font-size:11px}.arcade-result-score{font-size:27px;margin:7px 0}.arcade-result-detail{margin:7px 0 10px}.factory-home{min-height:30px;margin-top:4px}.arcade-start{min-height:40px;padding:6px 15px;font-size:14px}.arcade-status{bottom:7px}
}
