
:root{--bg:#07121b;--panel:#102331;--panel2:#142c3a;--stroke:#294554;--txt:#e6f3f3;--dim:#92aebb;--lime:#c9f682;--blue:#71d6eb;--amber:#ffc17a;--red:#ff8a89;--ok:#8ae7b7}
*{box-sizing:border-box}html,body{margin:0;height:100%}body{color:var(--txt);background:var(--bg);font:13px/1.4 Inter,system-ui,Arial,sans-serif}button,select,input{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.42;cursor:not-allowed}h1,h2,h3,p{margin:0}button{border:1px solid var(--stroke);background:#1a3241;border-radius:9px;padding:9px 11px;font-weight:750}button:hover:not(:disabled){border-color:var(--lime)}button.primary{background:var(--lime);border-color:var(--lime);color:#1c3016}button.blue{background:#214756;border-color:#4c8192}button.selected{background:#c9f682;color:#14271c}button.small{font-size:11px;padding:6px 9px}button.warn{color:#ffd39e}button.bad{color:var(--red)}.eyebrow{color:var(--lime);font-size:10px;letter-spacing:1.7px;text-transform:uppercase;font-weight:900}.muted,.hint{color:var(--dim)}.hint{font-size:11px}.logo{font-size:20px;font-weight:900;letter-spacing:-.9px}.logo b{color:var(--lime)}.header{display:flex;justify-content:space-between;align-items:center;padding:13px 18px;background:#0d1d28;border-bottom:1px solid var(--stroke);gap:16px}.brand small{display:block;color:var(--dim);font-size:9px;letter-spacing:1.4px}.stats{display:flex;gap:18px;flex-wrap:wrap}.stat span{display:block;font-size:9px;color:var(--dim);letter-spacing:1.5px;font-weight:800}.stat strong{font-size:19px}.layout{display:grid;grid-template-columns:214px minmax(350px,1fr) 380px;height:calc(100vh - 74px);min-height:650px}.sidebar,.right{background:#0e202d;overflow:auto;border-right:1px solid var(--stroke);padding:13px}.right{border-right:0;border-left:1px solid var(--stroke)}.sidebar h2{font-size:18px;margin:6px 0}.sidebar .help{font-size:11px;color:var(--dim);margin:8px 0 14px}.tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.tool{padding:10px 5px;min-height:72px;display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;background:#152b39}.tool .symbol{font-size:20px}.tool strong{font-size:11px}.tool small{font-size:10px;opacity:.72}.sub{margin-top:14px;background:#0c1b27;border:1px solid #25404e;border-radius:12px;padding:12px}.sub h3{font-size:13px;margin-bottom:9px}.sub .row{margin:6px 0}.mapcol{display:flex;flex-direction:column;min-width:0;overflow:hidden}.maphead{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:12px 16px;border-bottom:1px solid var(--stroke);background:#112531;flex-wrap:wrap}.maphead h1{font-size:20px}.actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.scene{position:relative;flex:1;min-height:370px;background:#122936;overflow:hidden;cursor:crosshair;touch-action:none}.scene canvas#floor{display:block;width:100%;height:100%}.badge-map{position:absolute;top:10px;left:10px;background:#0d2530de;border:1px solid #3c6268;padding:7px 10px;border-radius:9px;pointer-events:none;font-size:11px}.maphelp{position:absolute;bottom:10px;left:10px;background:#091c2bdc;padding:7px 9px;border-radius:7px;color:#b3ccd4;pointer-events:none;font-size:10px;max-width:70%}.scene .minimap{position:absolute;right:10px;bottom:12px;background:#0a1d29e8;border:1px solid #325061;border-radius:9px;width:160px;height:115px}.bar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:11px 14px;border-top:1px solid var(--stroke);background:#101f2b}.bar .grow{flex:1;min-width:120px}.tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;position:sticky;top:-13px;background:#0e202d;padding:2px 0 10px;z-index:3}.tabs button{font-size:11px;padding:9px 3px}.tabs button.active{background:var(--lime);border-color:var(--lime);color:#132318}.pane{display:block}.pane.hidden{display:none}.panehead{margin:4px 0 13px}.panehead h2{font-size:20px}.panehead p{color:var(--dim);font-size:11px;margin-top:5px}.card{background:#142b39;border:1px solid #2a4755;border-radius:12px;padding:12px;margin-bottom:9px}.card h3{font-size:14px}.row{display:flex;justify-content:space-between;align-items:center;gap:8px}.row.wrap{flex-wrap:wrap}.item{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;border-bottom:1px solid #26414c;padding:8px 0}.item:last-child{border-bottom:0}.subtext{font-size:11px;color:var(--dim);margin-top:3px}.chip{font-size:10px;font-weight:800;border-radius:999px;padding:3px 7px;background:#204352;color:var(--blue);white-space:nowrap}.chip.good{background:#204134;color:var(--ok)}.chip.warn{background:#413322;color:var(--amber)}.chip.bad{background:#48242a;color:var(--red)}.flow{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;margin:9px 0}.flow>div{background:#14303a;border:1px solid #28515a;text-align:center;padding:7px 3px;font-size:9px;border-radius:7px;color:#b0c8ce}.flow b{display:block;font-size:14px;color:var(--lime)}.split{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid #24404b}.split:last-child{border-bottom:0}.split strong{color:var(--txt)}.meter{height:7px;border-radius:999px;background:#1d3b47;overflow:hidden;margin-top:6px}.meter b{display:block;height:100%;background:var(--lime)}.address-list{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:10px 0}.address-list button{padding:7px 2px;font-size:10px}.address-list .full{border-color:#6c4949;color:#ffb0ab}.address-list .tall{border-color:#56749d;color:#a8d8ff}.boxline{padding:9px 0;border-bottom:1px solid #2a4651}.boxline:last-child{border:0}.boxline.active{background:#1c3b41;border-radius:6px;padding:9px}.quick{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}.note{color:#bed6de;background:#142e3a;border:1px solid #2c5058;border-radius:10px;padding:10px;margin-bottom:9px;font-size:11px}.note.warn{color:#ffdbac;background:#302718;border-color:#684b27}.event{padding:9px 0;border-bottom:1px solid #243c4b}.event strong{font-size:11px}.event p{font-size:11px;color:var(--dim);margin-top:4px}.feed{max-height:240px;overflow:auto}.toastbox{position:fixed;bottom:14px;right:14px;display:grid;gap:6px;z-index:30}.toast{background:#1e3c4a;padding:11px 14px;border:1px solid #6a94a2;border-radius:10px;max-width:340px;box-shadow:0 10px 24px #071017}.toast.bad{border-color:#c86666}.actions .small{padding:6px 8px}.foot{margin-top:14px;color:#7594a4;font-size:10px;line-height:1.65}.lineheight{line-height:1.6}
@media(max-width:1250px){.layout{grid-template-columns:178px minmax(310px,1fr) 335px}.sidebar,.right{padding:9px}.tools{gap:4px}}
@media(max-width:980px){.layout{height:auto;display:grid;grid-template-columns:minmax(0,1fr) 335px}.sidebar{grid-column:1/-1}.tools{grid-template-columns:repeat(6,minmax(90px,1fr))}.mapcol{min-height:580px}.scene{min-height:460px}.right{max-height:none}.stats{gap:10px}}
@media(max-width:730px){.header{align-items:flex-start;flex-wrap:wrap}.layout{display:flex;flex-direction:column}.sidebar{order:2}.mapcol{order:1;min-height:510px}.right{order:3}.scene{min-height:380px}.tools{grid-template-columns:repeat(4,1fr)}.minimap{width:125px;height:90px}.maphead{padding:10px}.maphead h1{font-size:18px}}


.cachepanel{background:linear-gradient(130deg,#24404a,#182a32);border:1px solid #a2c973;border-radius:10px;padding:9px;margin:10px 0;display:flex;flex-direction:column;gap:3px}
.cachepanel b{color:#dcf7a9;letter-spacing:.5px;font-size:11px}.cachepanel span{font-weight:850}.cachepanel small{color:#a9c1c8}

.alloc-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.alloc{background:#0b2330;border:1px solid #2c4c5b;border-radius:10px;padding:10px}.alloc label{font-weight:850;font-size:12px;display:block;margin-bottom:6px}.alloc select{display:block;width:100%;background:#172f3d;border:1px solid #355b69;border-radius:7px;padding:8px;color:#eaf5f6}.alloc p{font-size:10px;color:#93acba;margin:6px 0 0}.dockstaff{display:grid;gap:7px}.dockstaff-row{padding:8px 9px;border:1px solid #355462;border-radius:9px;background:#0e2937;display:flex;justify-content:space-between;gap:9px;align-items:center}.dockstaff-row .unit{color:#cde6e5}.taskrow{border:1px solid #294956;background:#102837;border-radius:10px;padding:10px;margin:7px 0}.taskrow .tasktitle{display:flex;gap:8px;justify-content:space-between;align-items:center}.taskrow .taskdesc{margin-top:5px;font-size:11px;color:#aec4cd;overflow-wrap:anywhere}.taskrow.waiting{border-color:#976a33}.taskrow.blocked{border-color:#a95555}.pill{border-radius:999px;padding:2px 6px;font-size:10px;font-weight:800;background:#254656;color:#bcf0ff}

.qty-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:7px;font-size:11px;font-weight:900;color:#091820;white-space:nowrap}
.qty-4{background:#8de8a4}.qty-3{background:#71c5ff}.qty-2{background:#ffdb72}.qty-1{background:#ff7775}.qty-0{background:#556877;color:#fff}.qty-unknown{background:#14171c;color:#f7f8f9;border:1px solid #82939d}.stock-colors{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 12px}.stock-colors .qty-pill{padding:6px 8px}.operation-progress{height:6px;background:#203844;border-radius:8px;margin-top:7px;overflow:hidden}.operation-progress b{display:block;background:#bdec83;height:100%}
.qty-dot{width:8px;height:8px;display:inline-block;border-radius:2px;margin:1px}

/* v6.5.2 — always-visible, semantically distinct physical vs reserved capacity */
.flow-stats{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:8px 10px;background:#112b3b;border-top:1px solid #375466;border-bottom:1px solid #375466;color:#c6dbe3;font-size:10px;line-height:1.35}
.flow-stats span{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border:1px solid #365263;border-radius:7px;background:#10212d;white-space:nowrap}
.flow-stats b{font-size:13px;color:#d5f68b}
.flow-stats span.amber b{color:#ffd18a}
@media(max-width:700px){.flow-stats{font-size:9px;padding:5px}.flow-stats span{padding:3px 5px}.flow-stats b{font-size:12px}}

/* v6.5.4 - exact in-game picking and packing deadlines */
.deadline-setup{margin-top:10px;padding:11px;border:1px solid #3d6173;border-radius:10px;background:#102d38}
.deadline-title{color:var(--lime);font-weight:850;margin-bottom:8px;font-size:12px}
.deadline-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.deadline-fields label{font-size:11px;color:#bfd6e1;font-weight:700}
.deadline-fields select{display:block;width:100%;margin-top:5px;padding:9px;background:#153645;color:#eaf5f6;border:1px solid #466776;border-radius:7px}
.deadline-preview{margin-top:9px;padding:9px;border-radius:8px;color:#e4f6d6;background:#172f32;border:1px solid #396c65;font-size:12px;line-height:1.6}
.deadline-milestones{display:grid;gap:6px;margin-top:9px}
.deadline-stage{display:flex;flex-direction:column;gap:3px;padding:8px 9px;border-radius:8px;border:1px solid #475866;background:#102b3c}
.deadline-stage b{font-size:11px}.deadline-stage span{font-size:11px}.deadline-stage small{color:#a9bec8}
.deadline-stage.done{border-color:#417858;background:#15332c}.deadline-stage.done b{color:#9decba}
.deadline-stage.late{border-color:#a95454;background:#39232b}.deadline-stage.late b{color:#ff9e98}
.deadline-stage.pending{border-color:#866e3b}.deadline-stage.pending b{color:#ffd490}
@media(max-width:360px){.deadline-fields{grid-template-columns:1fr}}

/* Dockline v6.6: unified operations workbench. All existing gameplay IDs preserved. */
:root{--bg:#08121b;--panel:#102330;--panel2:#162d3b;--stroke:#2b4554;--txt:#edf6f6;--dim:#adc1cc;--lime:#c8ef76;--shadow:0 12px 30px rgba(0,0,0,.17)}
body{font-size:14px;line-height:1.48;letter-spacing:0;-webkit-font-smoothing:antialiased}
button,input,select,summary{font-size:13px}button{min-height:38px;border-radius:10px;transition:border-color .14s,background .14s,filter .14s}button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #d0f68b;outline-offset:2px}button:hover:not(:disabled){filter:brightness(1.12)}
button.small{font-size:12px;min-height:33px;padding:7px 10px}button.primary{background:#c8ef76;color:#18271b}button.selected{background:#c8ef76;color:#18271b}
.header{min-height:88px;height:auto;display:grid;grid-template-columns:minmax(168px,205px) minmax(0,1fr) auto;gap:24px;padding:13px 22px;position:relative;z-index:10;box-shadow:0 5px 20px #0002}
.brand .logo{font-size:21px;line-height:1.13;letter-spacing:-.7px}.brand small{margin-top:6px;letter-spacing:1.2px}
.header-right{display:flex;align-items:center;gap:10px}.operating-status{padding:8px 11px;color:#f0c78e;border:1px solid #6b573b;background:#322c23;border-radius:9px;white-space:nowrap;font-weight:800;font-size:12px}.operating-status.live{background:#1c3a2a;border-color:#42674b;color:#bff1ae}
.help-button{border:1px solid #527083;background:#1c3645;white-space:nowrap}.stats{display:grid;grid-template-columns:repeat(9,minmax(72px,1fr));gap:4px;align-items:center;min-width:0}
.stat{padding:4px 9px;border-left:1px solid #2f4655;min-width:0}.stat span{font-size:9px;letter-spacing:.75px;line-height:1.3;white-space:normal}.stat strong{display:block;font-size:clamp(15px,1.38vw,20px);margin-top:3px;white-space:nowrap;letter-spacing:-.45px;overflow:hidden;text-overflow:ellipsis}.stat.primary-stat strong{color:#e5f4cf}
.layout{grid-template-columns:minmax(250px,262px) minmax(360px,1fr) minmax(370px,415px);height:calc(100dvh - 88px);min-height:620px;transition:grid-template-columns .22s ease}
.sidebar,.right{scrollbar-color:#496a79 transparent;scrollbar-width:thin;padding:18px 15px;background:#0c1e2b}.sidebar{border-right:1px solid #294452}.sidebar h2,.panehead h2{font-size:21px;line-height:1.18;margin:4px 0 6px}.builder-title{margin-bottom:12px}.tool-filters{margin:12px 0}.tool-filters label,.panel-tools label{display:block;color:#b3c9d2;font-size:11px;font-weight:800;margin-bottom:6px}.tool-filters input,.panel-tools input{border:1px solid #456374;border-radius:10px;background:#152e3c;padding:11px 12px;width:100%;color:#fff;outline:none;min-height:42px}
.tool-filters input:focus,.panel-tools input:focus{border-color:var(--lime)}.help-accordion{border:1px solid #365565;border-radius:10px;background:#102a39;margin:10px 0;padding:10px 12px;color:#c9dce2}.help-accordion summary,.section-guide summary{cursor:pointer;color:#cbebdd;font-size:12px;font-weight:800}.help-accordion[open] summary,.section-guide[open] summary{margin-bottom:7px}.help-accordion p,.section-guide p{font-size:12px;line-height:1.58;color:#bbd0da}
.tools{display:block}.tool-group{margin:16px 0}.tool-group h3{font-size:11px;text-transform:uppercase;letter-spacing:1.3px;font-weight:850;color:#92b1be;padding:0 2px 8px}.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tool{min-height:83px;padding:11px 6px;gap:4px;border-radius:12px;border:1px solid #2b4b59;background:#142c3a;justify-content:center}.tool .symbol{font-size:22px;line-height:1}.tool strong{font-size:12px;line-height:1.25}.tool small{font-size:11px;opacity:.85}.tool.selected{box-shadow:0 0 0 2px #aed26d45}.tool:hover{transform:translateY(-1px)}
.sidebar .sub{background:#112734;border-radius:13px;padding:13px;border:1px solid #344d60;margin:13px 0}.sidebar .sub h3{font-size:14px}.sidebar .foot{font-size:12px;line-height:1.6}
.mapcol{background:#0d2331}.maphead{padding:14px 20px;align-items:center;flex-wrap:nowrap}.maphead h1{font-size:23px;letter-spacing:-.45px;margin:0 0 3px}.maphead .hint{font-size:12px;line-height:1.4}.maphead .eyebrow{font-size:10px}.maphead .actions{justify-content:flex-end}.chip{font-size:10px;padding:5px 9px;letter-spacing:.15px}.builder-toggle{display:none}
.health-row{padding:8px 18px;background:#122c39;border-bottom:1px solid #2c4d5a;display:flex;justify-content:space-between;align-items:center;gap:10px}.health-pill{font-size:12px;font-weight:800;color:#c9efd0}.health-pill.warning{color:#ffd68b}.health-pill.critical{color:#ffacab}.quick-link{border:0;background:none;color:#b9e8f2;min-height:28px;padding:3px 7px;text-decoration:underline;text-underline-offset:3px}
.workflow-nav{display:flex;justify-content:space-between;background:#0f2634;border-bottom:1px solid #345262;padding:7px 12px;gap:5px;overflow-x:auto;scrollbar-width:thin}.workflow-step{flex:1 0 auto;white-space:nowrap;color:#bacdd5;min-height:34px;background:transparent;border:1px solid transparent;padding:7px 8px;font-size:11px;font-weight:800}.workflow-step.active{background:#23463c;border:1px solid #4b7859;color:#c5f4bb}.workflow-step:hover{background:#223d4a}
.flow-stats{gap:6px;padding:9px 14px;background:#132e3e}.flow-stats span{padding:5px 8px;font-size:10px;background:#0d2431;border:1px solid #365468}.flow-stats b{font-size:14px}.flow-stats span:first-child{background:#1d3a2b;border-color:#4f6c4a}.scene{min-height:400px;background:radial-gradient(ellipse at center,#1b3646,#0c2330);cursor:crosshair}.badge-map{font-size:12px;box-shadow:var(--shadow)}.map-legend{position:absolute;top:55px;left:12px;background:#0d2530ed;border:1px solid #3c6268;padding:8px 10px;border-radius:9px;pointer-events:none;font-size:11px;max-width:min(75%,420px);line-height:2}.maphelp{font-size:11px;padding:9px 12px;max-width:55%;line-height:1.35;border:1px solid #243f50;border-radius:9px}.scene .minimap{box-shadow:var(--shadow);width:160px;height:115px}
.bar{padding:11px 15px;gap:9px}.playback-controls,.save-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.playback-controls{flex:0 1 auto}.save-controls{margin-left:auto}.bar .grow{flex:1;min-width:155px;font-size:11px}.bar button{white-space:nowrap}.bar .primary{min-width:142px}
.right{background:#0c1e2b;padding:15px 15px 26px}.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;background:#0c1e2b;top:-15px;padding:1px 0 9px}.tabs button{font-size:12px;font-weight:800;padding:9px 2px;min-height:43px}.tabs button[aria-selected="true"]{background:#c8ef76;color:#102316}.context-summary{padding:12px 14px;margin:3px 0 11px;border:1px solid #395c6b;border-left:3px solid #c8ef76;background:#153140;border-radius:10px;font-size:12px;line-height:1.5;color:#d9e7ee}.context-summary strong{display:block;margin-bottom:3px;font-size:13px;color:#e9f8e8}.panel-tools{margin-bottom:14px}.panehead{margin:6px 0 14px}.panehead p{color:#bcd0d9;font-size:13px;line-height:1.5;margin-top:7px}.panehead .eyebrow{font-size:10px}.section-guide{margin-top:10px;padding:9px 11px;border:1px solid #344f60;background:#142c3a;border-radius:9px}.section-guide summary{font-size:12px}
.card{border:1px solid #355363;background:#142b39;border-radius:14px;padding:15px;margin-bottom:13px;overflow-wrap:anywhere;box-shadow:0 3px 10px #0001}.card h3{font-size:15px;line-height:1.35;margin-bottom:4px}.card .subtext,.subtext,.hint{font-size:12px;line-height:1.48}.note{font-size:12px;line-height:1.55;padding:12px;border-radius:11px;margin-bottom:10px}.item{padding:10px 0}.item,.split,.dockstaff-row{min-width:0}.split{font-size:12px;padding:9px 0}.flow{gap:5px}.flow>div{font-size:10px;padding:9px 3px}.flow b{font-size:16px}.quick button{white-space:normal}.alloc-grid{gap:9px}.alloc{padding:12px}.alloc label{font-size:13px}.alloc p{font-size:11px}.address-list{gap:7px}.address-list button{min-height:48px;font-size:11px}.taskrow{padding:13px;margin:9px 0}.taskrow .taskdesc{font-size:12px;line-height:1.5}.taskrow .tasktitle{font-size:13px}.pill{font-size:11px;padding:4px 7px}.feed{max-height:360px}.event strong,.event p{font-size:12px}.deadline-fields label,.deadline-stage span,.deadline-stage small{font-size:12px}.deadline-stage{padding:10px}.panel-empty{color:#a9beca;padding:14px;text-align:center;border:1px dashed #426073;border-radius:10px}
/* Collapse the construction area on wide screens for more map space */
body.builder-hidden .layout{grid-template-columns:0 minmax(420px,1fr) minmax(370px,415px)}body.builder-hidden .sidebar{visibility:hidden;overflow:hidden;padding:0;border:0}body.builder-hidden .builder-toggle{display:block}
.game-guide{background:#112735;color:var(--txt);border:1px solid #4c6877;border-radius:17px;padding:24px;max-width:min(620px,94vw);max-height:85vh;overflow:auto;box-shadow:0 20px 70px #000a}.game-guide::backdrop{background:#031018bb}.guide-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.guide-head h2{font-size:23px}.guide-head button{min-width:44px;font-size:16px}.guide-steps{display:grid;gap:12px}.guide-step{display:flex;gap:13px;border:1px solid #2d4f5e;border-radius:12px;padding:12px;background:#172e3c}.guide-step> b{display:grid;place-items:center;background:#c8ef76;color:#162719;width:30px;height:30px;border-radius:9px;flex:none}.guide-step strong{display:block;font-size:14px}.guide-step p{font-size:12px;color:#b9ced8;margin-top:5px}.key-help{color:#b8ccd8;border-top:1px solid #2d4b5a;margin-top:17px;padding-top:12px;font-size:12px}
@media(max-width:1500px){.header{grid-template-columns:185px 1fr auto;gap:12px;padding:12px}.stats{gap:0}.stat{padding:4px 7px}.stat span{font-size:8px}.stat strong{font-size:16px}.layout{grid-template-columns:235px minmax(335px,1fr) 370px}.sidebar,.right{padding:13px}.maphead .actions{gap:3px}.chip{font-size:9px;padding:4px 6px}.workflow-step{font-size:10px;padding:5px}.bar{gap:5px}.bar button{padding:8px;font-size:11px}}
@media(max-width:1160px){.header{grid-template-columns:1fr auto}.header .stats{grid-column:1 / -1;grid-row:2;display:flex;overflow-x:auto;gap:5px;padding:5px 0}.header-right{grid-column:2;grid-row:1}.stat{flex:0 0 auto;min-width:85px;padding:4px 12px}.layout{height:auto;min-height:0;grid-template-columns:minmax(0,1fr) minmax(340px,400px)}.sidebar{grid-column:1 / -1;grid-row:2;border-top:1px solid var(--stroke)}.mapcol{grid-column:1;grid-row:1;min-height:690px}.right{grid-column:2;grid-row:1;max-height:calc(100dvh - 120px)}.builder-toggle{display:block}.tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tool-group{margin:0}.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar .sub{max-width:900px}.sidebar .builder-title{display:flex;gap:10px;align-items:center}.sidebar .builder-title .eyebrow{display:none}body.builder-hidden .layout{grid-template-columns:minmax(0,1fr) minmax(340px,400px)}body.builder-hidden .sidebar{display:none}.workflow-step{font-size:10px}.bar{gap:6px}.bar .grow{order:3;flex-basis:100%}}
@media(max-width:830px){.header{gap:8px}.header .stats{grid-column:1/-1}.layout,.layout:not(#nope){display:flex;flex-direction:column}.mapcol{order:1;min-height:600px;overflow:visible}.right{order:2;max-height:none;border-left:0;border-top:1px solid var(--stroke);padding:14px}.sidebar{order:3}.right .tabs{position:sticky;top:0;z-index:11}.scene{min-height:420px}.maphead{flex-wrap:wrap}.maphead .actions{justify-content:flex-start}.workflow-nav{flex-wrap:nowrap}.workflow-step{min-width:92px}.bar{padding:10px}.bar .grow{order:3}.save-controls{margin-left:0}.tools{grid-template-columns:repeat(2,minmax(0,1fr))}body.builder-hidden .sidebar{display:none}.flow-stats{max-height:96px;overflow-y:auto}}
@media(max-width:520px){body{font-size:13px}.header{padding:10px}.logo{font-size:18px}.operating-status{font-size:10px}.help-button{padding:6px 9px}.header-right{gap:5px}.stat strong{font-size:16px}.mapcol{min-height:490px}.maphead{padding:10px 12px}.maphead h1{font-size:19px}.maphead .hint{font-size:11px}.maphead .actions{display:none}.health-row{padding:7px 10px}.scene{min-height:345px}.scene .minimap{width:100px;height:76px}.maphelp{max-width:65%;font-size:9px}.map-legend{font-size:9px;max-width:72%;line-height:1.4}.qty-pill{padding:2px 5px;font-size:10px}.flow-stats{max-height:83px}.playback-controls{width:100%}.playback-controls #run{flex:1}.save-controls{width:100%;margin:0}.bar .grow{order:0;flex:0 0 100%;max-width:100%;overflow-wrap:anywhere}.right{padding:11px}.tabs button{font-size:11px;min-height:41px}.card{padding:12px}.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tools{display:block}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
[hidden]{display:none!important}
.filter-result{font-size:11px;color:#b6d69f;margin:5px 0 0}.tool-group[hidden]{display:none!important}
.receiving-rules{background:#122a38;border:1px solid #3a5869;border-radius:10px;margin:8px 0 16px;padding:11px 12px}.receiving-rules>summary{font-weight:800;font-size:12px;cursor:pointer;color:#c8e4ed}.receiving-rules[open]>summary{margin-bottom:12px}.receiving-rules .note{font-size:12px;margin-bottom:8px}
/* Compact cards show decisions first, explanations on demand. */
#receivePane [data-dock]{border-left:3px solid #9fdab4}
#receivePane .card[data-dock]>.row>h3{font-size:16px}
#inboundOffers .item>div{min-width:0}
#inboundOffers button[data-truck]{min-width:71px;flex-shrink:0}
@media(max-width:830px){.sidebar{position:fixed;left:0;top:0;bottom:0;width:min(365px,95vw);z-index:150;overflow:auto;box-shadow:24px 0 80px #0009;border-right:2px solid #567486;padding:22px 16px}.sidebar .builder-title{padding-right:80px}.builder-toggle{display:block}.builder-title>.drawer-close{position:absolute;top:15px;right:15px;width:auto;font-size:12px}.tools{display:block}body.builder-hidden .sidebar{display:none}.sidebar:not([hidden]){visibility:visible}}
@media(min-width:1161px){.builder-toggle{display:block;white-space:nowrap;padding:7px 10px;min-height:35px;font-size:11px}}

/* v6.7 station-bound hiring and simultaneous order work */
.station-hire-row{border:1px solid #355366;background:#122c3d;border-radius:12px;padding:12px;margin:10px 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.station-hire-row .quick{display:flex;flex-wrap:wrap;gap:6px}.station-hiring{border-color:#6b9065}
.station-hiring h3{color:#d8f58a}

/* Region/world map — independently navigable from live warehouse */
.world-open-button{background:#bde887;color:#153021;border-color:#bde887;white-space:nowrap;font-size:12px}
.world-overlay{position:fixed;inset:0;z-index:90;background:#031017e8;padding:14px;display:flex;justify-content:center;align-items:center}
.world-overlay.hidden{display:none}
.world-window{width:min(1580px,100%);height:min(960px,97vh);display:flex;flex-direction:column;min-height:500px;background:#0d202b;border:1px solid #49737f;box-shadow:0 30px 90px #020b12;border-radius:16px;overflow:hidden}
.world-head{padding:15px 20px;border-bottom:1px solid #395461;display:flex;gap:20px;align-items:center;justify-content:space-between}
.world-head h2{font-size:23px;margin:3px 0}.world-head p{font-size:12px;color:#acc4ce}.world-close{background:#274455}
.world-main{display:grid;grid-template-columns:minmax(0,1fr) 350px;flex:1;min-height:0}
.world-map-panel{display:flex;flex-direction:column;min-width:0;min-height:0;background:#102b32}
.world-topline{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 15px;border-bottom:1px solid #365565;font-weight:700;font-size:12px}
.world-topline .quick{margin:0;flex-wrap:nowrap}.world-topline button{padding:6px 12px}
#worldCanvas{width:100%;height:100%;min-height:250px;flex:1;display:block;touch-action:none;cursor:crosshair}
.world-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;padding:8px 14px;background:#102631;border-top:1px solid #365665}
.world-legend span:nth-child(1){color:#bdec88}.world-legend span:nth-child(2){color:#70d3e8}.world-legend span:nth-child(3){color:#f5cb8c}.world-legend span:nth-child(5){color:#8cedb0}
.world-hint{padding:7px 14px;font-size:11px;color:#b1c5d1}
.world-controls{border-left:1px solid #395461;background:#10222e;overflow:auto;min-height:0;padding:14px}
.world-tabs{display:flex;gap:5px;margin-bottom:13px}.world-tabs button{font-size:11px;padding:8px 7px;flex:1}
.world-tabs button.selected{background:#c9f682;color:#17331c}
.world-tab-content .world-card{background:#153342;border:1px solid #345a66;border-radius:11px;padding:12px;margin-bottom:10px}
.world-card h3{font-size:14px;margin-bottom:7px}.world-card p{color:#bdd1da;font-size:12px;line-height:1.6;margin:4px 0}
.world-card label{display:block;font-size:11px;font-weight:800;margin:9px 0 3px;color:#bfd8e2}
.world-card select,.world-card input{width:100%;padding:9px;background:#0e2634;border:1px solid #426275;border-radius:8px;color:#e6f3f3}
.world-card button{margin-top:9px;width:100%;text-align:center}.world-card button:disabled{opacity:.5}
.world-card .muted{font-size:11px;color:#93b0c0}
.world-bar{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin:7px 0;padding:5px 0;border-bottom:1px solid #31515a}
.world-tag{padding:3px 6px;border:1px solid #426b64;border-radius:6px;background:#173d3c;font-size:10px;font-weight:750}
@media(max-width:850px){.world-overlay{padding:5px}.world-main{grid-template-columns:minmax(0,1fr)}.world-window{height:99vh}.world-controls{border-left:0;border-top:1px solid #395461;max-height:45vh}.world-map-panel{min-height:300px}.world-head{padding:10px 12px}.world-head h2{font-size:17px}.world-head p{display:none}}
