@import url('./style.css');
:root{--accent:#ffac79;--mint:#a7e0cf;--ink:#101722;--soft:#9caec1;--line:#ffffff16}
*{box-sizing:border-box}body{margin:0;background:var(--ink);color:#edf4f3;font-family:'Space Grotesk',system-ui,sans-serif}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #a7e0cf;outline-offset:4px}button:disabled{cursor:default;opacity:.55}button:hover:not(:disabled){filter:brightness(1.12)}[hidden]{display:none!important}.factory-app{max-width:1800px;padding:20px 28px;margin:0 auto}.topbar{display:flex;align-items:center;gap:26px;margin-bottom:24px}.topbar .identity{display:flex;gap:12px;align-items:center;min-width:0;color:#edf4f3;text-decoration:none;font-size:13px;letter-spacing:.12em}.identity>b{display:grid;place-items:center;background:#ffad77;color:#15202b;font-size:31px;width:43px;height:43px;border-radius:13px;letter-spacing:-.08em}.identity small{display:block;font-size:10px;letter-spacing:.15em;color:#8fa4b7;margin-top:5px}.topbar nav{display:flex;gap:5px;padding:4px;border:1px solid var(--line);border-radius:11px;margin-left:auto}.topbar nav a{padding:10px 16px;color:#9badc0;font-size:14px;text-decoration:none;border-radius:7px}.topbar nav a[aria-current]{background:#26384a;color:#eaf5f1}.icon-button{background:#1b2a39;border:1px solid var(--line);border-radius:10px;color:#cad9e7;min-height:44px;min-width:44px;font-size:22px}.factory-heading{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:22px}.eyebrow{font-size:12px;letter-spacing:.15em;color:#9fafbf}.factory-heading h1{font-size:32px;font-weight:500;letter-spacing:-.045em;margin:7px 0 0;line-height:1.1}.factory-heading p{font-size:14px;line-height:1.5;color:#98acc0;margin:0}.factory-layout{display:grid;grid-template-columns:minmax(0,1fr) 326px;gap:20px}.factory-main{min-width:0}.factory-world{height:clamp(410px,57vh,780px);position:relative;border-radius:20px;background:radial-gradient(ellipse at 45% 50%,#354c60,#1a2c3d 76%);overflow:hidden;border:1px solid #accadd1c}#factory-canvas{position:absolute;inset:0;touch-action:none;cursor:grab}#factory-canvas canvas{display:block;width:100%;height:100%}#factory-loading{position:absolute;inset:0;display:grid;place-items:center;background:#192b3c;color:#bbcedc}.world-top{position:absolute;top:16px;left:18px;right:18px;display:flex;justify-content:space-between;align-items:start;pointer-events:none}.clock{display:flex;align-items:center;gap:12px;background:#102033d9;border:1px solid var(--line);border-radius:12px;padding:10px 13px}#f-sun{font-size:25px;color:#ffd8a0}.clock small{display:block;font-size:10px;letter-spacing:.12em;color:#a0b7cc}.clock strong{font-size:25px;font-weight:500}#f-period{font-size:12px;color:#b3c7d8;border-left:1px solid var(--line);padding-left:12px}.world-tag{font-size:10px;letter-spacing:.12em;color:#99b2c7;padding:10px 0}.world-tag>span{color:#f0b992;margin-left:12px}.world-bottom{position:absolute;bottom:14px;left:18px;right:14px;display:flex;gap:16px;align-items:center;pointer-events:none}.people-key{display:flex;align-items:center;gap:7px;color:#b5c9da;font-size:12px}.people-key i{width:7px;height:12px;background:#8bbad1;border-top:3px solid #ffd77e;border-radius:2px}.people-key i:nth-child(2){background:#edf6ef;border-top:0;margin-left:8px}.touch-hint{font-size:11px;color:#89a4ba}.view-controls{margin-left:auto;display:flex;background:#102133df;border:1px solid var(--line);border-radius:10px;pointer-events:auto}.view-controls button{background:none;border:0;color:#d6e9ed;font-size:22px;width:40px;height:40px}.station-label{position:absolute;transform:translate(-50%,-100%);border:1px solid #91b4cc42;border-radius:9px;background:#112235ee;box-shadow:0 5px 20px #0002;color:#e2eeed;padding:7px 9px;white-space:nowrap;text-align:left;min-height:38px;font-size:12px;transition:border-color .2s}.station-label b{font-weight:500;color:var(--accent);margin-right:6px}.station-label small{display:block;font-size:10px;color:#a4bed0;margin-top:3px}.station-label[aria-pressed=true]{border-color:var(--mint);box-shadow:0 0 0 3px #a7e0cf18}.station-label.bottleneck{border-bottom:3px solid #eac26e}.station-label[data-status=blocked]{background:#4c3228ed}.transport{display:flex;gap:17px;align-items:center;margin-top:14px}.primary{background:var(--accent);border:0;color:#182433;border-radius:11px;padding:14px 19px;min-height:48px;font-size:15px;font-weight:600}.day-progress{flex:1;min-width:0}.day-progress>span{font-size:11px;color:#95aabd}.day-progress>div{height:4px;background:#2c4054;margin-top:9px;border-radius:4px;overflow:hidden}.day-progress i{display:block;background:var(--accent);height:100%;width:0}.transport label{font-size:10px;color:#9aafc4;display:grid;gap:4px}.transport select{color:#e0ebee;background:#1e2e3e;border:1px solid var(--line);border-radius:6px;font-size:14px;padding:6px}.time-jumps{display:flex;gap:8px;margin-top:10px}.time-jumps button{background:none;border:1px solid var(--line);color:#b3c6d8;border-radius:8px;padding:8px 12px;font-size:12px;min-height:36px}.time-jumps button:last-child{margin-left:auto}.production{display:grid;grid-template-columns:1fr 1.15fr 1.2fr;gap:16px;margin-top:20px;border-top:1px solid var(--line);padding:17px 0 0}.production>div+div{padding-left:18px;border-left:1px solid var(--line)}.production span{display:block;font-size:12px;color:#9eb2c5}.production strong{display:block;font-weight:500;font-size:35px;line-height:1.2;margin:7px 0;color:#ecf5f2;font-variant-numeric:tabular-nums}.production>div:first-child strong{color:var(--mint)}.production small{font-size:11px;line-height:1.4;color:#869fb7}.production .constraint strong{font-size:22px;margin:12px 0;color:#eacb8a}.station-panel{padding:22px;background:#172433;border:1px solid var(--line);border-radius:18px;align-self:start}.panel-heading{display:flex;justify-content:space-between;gap:6px;align-items:center}.panel-heading .eyebrow{font-size:10px}.status{font-size:11px;color:#eacb8a}.status[data-state=working]{color:var(--mint)}.station-panel h2{font-size:27px;line-height:1.15;letter-spacing:-.035em;margin:14px 0 8px;font-weight:500}.station-panel>p{font-size:14px;line-height:1.55;color:#a7bdce;margin:0 0 20px}.crew{display:flex;gap:15px;align-items:center;border-top:1px solid var(--line);padding-top:16px}.crew>div{display:grid;gap:3px}.crew strong{font-size:29px;font-weight:500}.crew span{font-size:11px;color:#9cb4c9}.crew>.crew-arrow{color:var(--accent);font-size:17px}.crew-rate{margin-left:auto;text-align:right}.crew-rate strong{color:var(--mint)}.job-progress{margin:18px 0}.job-progress>span{display:flex;justify-content:space-between;color:#9db5ca;font-size:11px}.job-progress b{font-weight:400;color:#d1e2eb}.job-progress>div{height:5px;background:#2b4054;border-radius:4px;margin-top:9px;overflow:hidden}.job-progress i{display:block;background:var(--mint);height:100%;width:0}.queue-row{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#aac1d3}.queue-row strong{font-weight:500;color:#e9d1a4}.queue-dots{display:grid;grid-template-columns:repeat(16,1fr);gap:3px;margin:9px 0 19px}.queue-dots i{height:15px;border-radius:3px;background:#2a3b4c}.queue-dots i.filled{background:#e8bb79}.automate{width:100%;font-size:14px}.station-panel>p.secondary{font-size:11px;line-height:1.5;color:#8fa8bd;margin:9px 0 20px}.insight{border-left:2px solid #efba7e;background:#efba7e08;padding:12px 13px;margin:0 -2px 22px}.insight>span{font-size:10px;letter-spacing:.13em;color:#edba84}.insight p{font-size:13px;line-height:1.6;color:#c2d2dc;margin:7px 0 0}.daily-comparison{border-top:1px solid var(--line);padding-top:18px}.daily-comparison h3{font-size:15px;font-weight:500;margin:0 0 7px}.daily-comparison p{font-size:11px;line-height:1.6;color:#8fa8bd;margin:0 0 13px}.bar-label{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#afc0d1}.bar-label strong{font-weight:500}.bar-label.current{color:var(--mint)}.bar-track{height:8px;background:#283b4e;border-radius:4px;margin:7px 0 13px;overflow:hidden}.bar-track i{display:block;height:100%;background:#879eb5;transition:width .35s}.bar-track:last-of-type i{background:var(--mint)}.daily-comparison>small{font-size:10px;line-height:1.6;color:#829cb3;display:block}.line-strip{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.strip-title{display:flex;gap:18px;align-items:center;margin-bottom:12px}.strip-title>span:last-child{font-size:12px;color:#8fa7bd}#station-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.station-tab{display:flex;gap:10px;align-items:center;text-align:left;background:#1b2b3a;border:1px solid var(--line);border-radius:11px;color:#d5e5ea;padding:13px 14px;font-size:14px}.station-tab b{color:#efb482;font-weight:400}.station-tab small{font-size:11px;color:#8faac1;display:block;margin-top:3px}.station-tab[aria-pressed=true]{border-color:#a7e0cf91;background:#233d42}.factory-app footer{font-size:11px;line-height:1.5;color:#849db4;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding:0}.factory-app footer button{border:0;background:none;color:#b1c6d7;font-size:12px;text-decoration:underline;padding:8px}#factory-about{max-width:610px;width:calc(100% - 28px);max-height:85svh;overflow:auto;border-radius:20px;background:#192b3d;border:1px solid #aac7df33;padding:30px;color:#d8e7ed}#factory-about h2{font-size:29px}#factory-about p{font-size:15px;line-height:1.7;color:#b8cdda}#factory-about dl>div{font-size:13px;display:grid;grid-template-columns:95px 1fr;gap:14px;padding:14px 0}#factory-about dd{text-align:left;line-height:1.6}#factory-about .close{position:absolute;right:12px;top:12px}
.day-result{padding:11px 14px;border:1px solid #a7e0cf24;border-radius:9px;color:#b8e7d6;background:#a7e0cf08;font-size:13px;line-height:1.5;margin:12px 0 0}
@media(min-width:1500px){.factory-layout{grid-template-columns:minmax(0,1fr) 360px}.factory-world{height:64vh}.station-panel{padding:25px}}
@media(max-width:1050px){.factory-app{padding:15px}.factory-layout{grid-template-columns:minmax(0,1fr) 290px;gap:14px}.station-panel{padding:18px}.factory-heading h1{font-size:28px}.factory-heading p{font-size:12px}.touch-hint,.world-tag{display:none}.world-top{left:12px;top:12px}.clock{gap:9px;padding:8px 10px}#f-period{font-size:10px}.station-label .label-name{display:none}.station-label b{margin:0}.station-label small{font-size:9px}.station-label{padding:6px 8px}.production{gap:9px}.production>div+div{padding-left:9px}.production span{font-size:10px}.production .constraint strong{font-size:18px}.transport{gap:9px}.transport .primary{padding:12px;font-size:13px}.day-progress>span{font-size:9px}.time-jumps button{font-size:10px;padding:7px}.station-tab{padding:11px;font-size:12px;gap:7px}}
@media(max-width:760px){.factory-app{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 18px max(10px,env(safe-area-inset-left))}.topbar{gap:9px;margin-bottom:18px}.topbar .identity>span{display:none}.identity>b{width:37px;height:37px;font-size:29px;border-radius:11px}.topbar nav{margin-left:0;flex:1}.topbar nav a{flex:1;text-align:center;padding:9px 6px;font-size:12px}.topbar>.icon-button{min-width:37px;min-height:37px}.factory-heading{margin-bottom:14px}.factory-heading .eyebrow{font-size:10px}.factory-heading h1{font-size:23px;margin-top:6px}.factory-heading p{display:none}.factory-layout{display:flex;flex-direction:column;gap:18px}.factory-world{height:clamp(335px,53svh,570px);border-radius:15px}.world-bottom{left:12px;bottom:12px;right:10px}.people-key{font-size:10px;gap:5px}.view-controls button{width:40px;height:40px}.world-top{right:12px}.clock strong{font-size:22px}.clock small{font-size:9px}.station-label{min-width:33px;min-height:34px}.station-label small{font-size:9px}.station-label b{font-size:11px}.transport{display:grid;grid-template-columns:1fr auto auto;gap:10px}.transport .primary{font-size:14px;min-height:45px}.transport label{display:flex;align-items:center;gap:8px;font-size:11px}.transport .day-progress{grid-row:2;grid-column:1/-1}.day-progress>span{font-size:10px}.transport .icon-button{min-height:43px}.time-jumps{gap:6px}.time-jumps button{font-size:11px;padding:7px 8px;min-height:40px}.production{margin-top:16px;padding-top:14px;grid-template-columns:1fr 1fr;gap:12px}.production strong{font-size:31px}.production span{font-size:11px}.production small{font-size:10px}.production .constraint{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;border:0;border-top:1px solid var(--line);padding:12px 0 0}.production .constraint strong{font-size:16px;margin:0}.production .constraint small{flex-basis:100%}.station-panel{padding:20px;border-radius:15px}.station-panel h2{font-size:27px}.station-panel>p{font-size:14px}.panel-heading .eyebrow,.status{font-size:12px}.crew span,.queue-row{font-size:12px}.station-panel>p.secondary{font-size:12px}.insight p{font-size:14px}.daily-comparison p{font-size:12px}.daily-comparison>small{font-size:11px}.line-strip{order:0;margin-top:18px}#station-tabs{grid-template-columns:1fr 1fr;gap:8px}.station-tab{font-size:14px;padding:12px}.station-tab:last-child{grid-column:1/-1}.strip-title{gap:10px;justify-content:space-between}.strip-title .eyebrow{font-size:10px}.strip-title>span:last-child{font-size:11px}.factory-app footer{font-size:10px;align-items:start}.factory-app footer button{white-space:nowrap}.job-progress>span,.bar-label{font-size:12px}}
@media(max-height:520px) and (orientation:landscape){.topbar{margin-bottom:10px}.factory-heading{display:none}.factory-layout{grid-template-columns:minmax(0,1fr) 280px;display:grid}.factory-world{height:70svh;min-height:240px}.factory-app{padding:10px}.station-panel{padding:16px}.clock strong{font-size:19px}.clock small{font-size:9px}.people-key{display:none}.world-bottom{bottom:8px}.world-top{top:8px}.time-jumps{flex-wrap:wrap}.production{grid-template-columns:1fr 1fr}.production .constraint{grid-column:1/-1;border:0;padding:0}.day-progress{display:none}}

/* Keep the walkthrough legible when a narrow phone is turned sideways. */
@media(max-width:760px) and (max-height:520px) and (orientation:landscape){.factory-layout{display:flex;flex-direction:column}.factory-world{min-height:360px}}
