@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Sans:wght@400;500;600;650;700;750;800&display=swap');

:root{--ink:#142c3d;--muted:#59717f;--paper:#deebf0;--panel:#e8f0f3;--line:#c2d3dc;--blue:#b7d8f1;--blue-dark:#8fbfe0;--green:#9bd9b6;--red:#e7a198;--navy:#142e40;--mint:#8fd6b5;--font:"DM Sans",system-ui,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--font);font-size:14px}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:var(--ink)}button:focus-visible,a:focus-visible{outline:3px solid #df614c;outline-offset:4px}button:disabled{cursor:not-allowed;opacity:.55}button svg,svg.icon{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}button{transition:background .15s,box-shadow .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.97)}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}a{color:inherit}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.app-shell{max-width:1800px;margin:auto}.app-header{height:88px;background:var(--navy);color:#dceaf1;display:flex;align-items:center;justify-content:space-between;padding:0 34px;border-bottom:1px solid #405564;gap:20px}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;flex-shrink:0}.brand-mark{display:flex;width:44px;height:48px;align-items:center;justify-content:center;border:1px solid #4d7387;border-radius:11px;background:#214357}.brand-mark svg{width:27px;height:27px;stroke:#b9daf0;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:1.8px;line-height:1.5}.brand-eyebrow{font-size:8px;color:#9eb9c9;letter-spacing:1.8px;margin-bottom:3px;display:flex;align-items:center;gap:7px}.brand-eyebrow i{display:inline-block;width:3px;height:3px;background:#85bddb;border-radius:50%}.brand strong{font-family:"Barlow Condensed","Arial Narrow",sans-serif;font-size:27px;font-weight:600;letter-spacing:1.9px}.header-center{display:flex;align-items:center;gap:10px;font-size:9px;font-weight:700;letter-spacing:1.5px;color:#acc5d1}.coordinates{font-size:9px;color:#7696aa;letter-spacing:.5px;margin-left:16px}.status-dot{display:inline-block;width:6px;height:6px;background:var(--mint);border-radius:50%;flex-shrink:0}.header-actions{display:flex;gap:8px}.icon-btn{height:36px;width:37px;background:#b5d4e8;border:0;border-radius:7px;display:flex;align-items:center;justify-content:center}.icon-btn[aria-pressed="true"]{background:#9bd9b6}.icon-btn svg{width:18px;height:18px}main{padding:25px 32px 0}.shift-bar{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:23px}.shift-heading .eyebrow{font-size:9px;color:var(--muted);letter-spacing:1.7px;margin-bottom:7px}h1{font-size:25px;letter-spacing:-.8px;line-height:1.15;font-weight:650;margin:0}h2{margin:0;letter-spacing:-.5px;font-size:24px;line-height:1.13}h3{margin:0;font-size:14px}.stats{display:flex;align-items:center;gap:34px}.stat{display:flex;gap:12px;align-items:center;min-width:125px}.stat-icon{display:flex;align-items:center;justify-content:center;width:39px;height:39px;border:1px solid #bdcfd9;border-radius:50%}.stat-icon svg{width:18px;height:18px;stroke:#527286;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.stat div>span{display:block;font-size:10px;color:var(--muted);font-weight:650;margin-bottom:3px}.stat strong{font-size:23px;line-height:1;font-weight:750;letter-spacing:-.7px;font-variant-numeric:tabular-nums}.stat:first-child strong{color:#24644f}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;align-items:stretch}.scene-panel{background:#0b2534;border:1px solid #3e5c6d;border-radius:12px;overflow:hidden;box-shadow:0 7px 25px #1c405418;min-width:0;display:flex;flex-direction:column}.scene-topbar{height:55px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #3f59656b;background:#163343;color:#a4bdcd;gap:12px}.steps{display:flex;align-items:center;gap:11px}.step{font-size:10px;font-weight:650;display:flex;align-items:center;gap:7px;white-space:nowrap;color:#7c9aa9}.step b{font-size:8px;display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border:1px solid #537382;border-radius:50%;font-weight:650}.step.active{color:#d5e9f4}.step.active b{background:#b3d5ed;color:#112c3d;border-color:#b3d5ed}.step.done b{background:#80bfa7;color:#122e3e;border-color:#80bfa7}.step-line{width:19px;height:1px;background:#537180}.live-label{font-size:8px;letter-spacing:1.4px;display:flex;align-items:center;gap:7px;white-space:nowrap}.scene-viewport{position:relative;min-height:530px;flex:1;background:#061827;isolation:isolate;overflow:hidden}.scene-viewport>canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.map-title{position:absolute;z-index:2;left:27px;top:26px;pointer-events:none;background:linear-gradient(90deg,#061d2ee8,#061d2e80 75%,transparent);padding:15px 28px 17px 17px;border-left:2px solid #9ac6e0;border-radius:0 10px 10px 0}.map-title .eyebrow{color:#abcadd;font-size:8px;letter-spacing:2px;margin-bottom:11px}.map-title h2{color:#e0eff4;font-size:33px;line-height:1.08;font-weight:600;letter-spacing:-1.2px}.map-title p{color:#a6c4d1;font-size:11px;line-height:1.7;margin:13px 0 0}.scene-footer{height:32px;background:#122e3d;border-top:1px solid #36586890;display:flex;align-items:center;justify-content:space-between;padding:0 16px;font-size:8px;color:#8eacbc;gap:8px}.scene-footer span{display:inline-flex;gap:6px;align-items:center}.scene-footer a{text-decoration:none;color:#adc5d1}.scene-footer a:hover{text-decoration:underline}.legend-dot{width:5px;height:5px;background:#96b6ca;border-radius:50%;display:inline-block}.legend-dot.coral{background:#faab8e}.legend-dot.mint{background:#91e8b8}.operation-panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:23px;display:flex;flex-direction:column;min-width:0}.panel-heading .eyebrow,.operation-head .eyebrow{color:#638092;font-size:8px;letter-spacing:1.6px;margin-bottom:8px}.panel-heading h2{font-size:23px;margin-bottom:10px;letter-spacing:-.8px}.panel-heading p{font-size:11px;line-height:1.65;color:var(--muted);margin:0 0 21px}.ship-list{display:flex;flex-direction:column;gap:9px}.ship-card{background:#d6e6f0;border:1px solid #c0d5e2;border-radius:8px;display:flex;align-items:center;text-align:left;width:100%;gap:10px;padding:13px 11px;position:relative;min-height:78px}.ship-card:hover{background:#cbe1f0}.ship-card.selected{border:1.5px solid #679cbe;background:#bedaf0;box-shadow:0 0 0 2px #94bddd24}.ship-card>svg{width:48px;height:35px;flex-shrink:0}.ship-card-content{flex:1}.ship-card-content strong{font-size:12px;display:block;margin-bottom:5px}.ship-card-content>span{font-size:8px;color:#567286;display:flex;align-items:center;gap:4px}.ship-card-content svg{width:10px;height:10px;stroke-width:1.7}.ship-radio{width:15px;height:15px;border:1.3px solid #7b9fb7;border-radius:50%;display:flex;align-items:center;justify-content:center}.selected .ship-radio{border-color:#3b7298}.selected .ship-radio:after{content:"";width:7px;height:7px;background:#255f89;border-radius:50%}.ship-number{font-size:7px;color:#5f839a;position:absolute;top:7px;left:9px;font-weight:800}.sealed-note{display:flex;align-items:center;gap:10px;color:#617d8c;font-size:10px;margin:15px 0}.sealed-note>svg{width:19px;height:21px;stroke:#658598;fill:none;stroke-width:1.5;flex-shrink:0}.sealed-note p{margin:0;line-height:1.7}.sealed-note strong{font-weight:500}.btn{height:48px;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:7px;background:var(--blue);border:1px solid #93b9d2;color:#112d3c;font-size:12px;font-weight:800;padding:0 17px;width:100%}.btn span:last-child:not(:first-child){font-size:18px;font-weight:500}.btn-green{background:var(--green);border-color:#76b992}.btn-red{background:var(--red);border-color:#ca8279}.operation-rule{padding-top:25px;margin-top:auto;padding-bottom:14px}.tiny-rule{display:block;width:25px;height:3px;background:#88b5d4;border-radius:1px;margin-bottom:13px}.operation-rule h3{font-size:13px}.operation-rule p{font-size:10px;color:var(--muted);line-height:1.7;margin:7px 0 0}.text-button{border:0;background:transparent;text-decoration:none;color:#5a788b;font-size:9px;padding:6px 0;text-align:left}.text-button:hover{text-decoration:underline}.danger-text{color:#9d493f!important;font-weight:700}.app-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;color:#6e8798;font-size:9px;min-height:53px;padding:4px 0 12px}.app-footer strong{font-size:8px;letter-spacing:1px;color:#4c697d}.footer-separator{margin:0 9px;color:#a1b9c5}.version{font-size:8px;margin-left:5px;color:#8ba5b4}.save-status{font-size:8px;display:flex;align-items:center;gap:6px}.save-status .status-dot{width:4px;height:4px;background:#4f927a}.app-footer .text-button{font-size:8px}.crane-panel{padding:18px 20px}.operation-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:17px}.operation-head h2{font-size:22px}.operation-head .eyebrow{margin-bottom:4px}.crane-badge{font-size:7px;letter-spacing:1px;white-space:nowrap;padding:6px 7px;background:#d6e6ee;border:1px solid #bdd2df;border-radius:4px;font-weight:700;color:#50738a}.operation-progress>div:first-child{display:flex;justify-content:space-between;font-size:10px;color:#658091;margin-bottom:7px}.operation-progress strong{color:var(--ink);font-size:10px}.progress-track{height:5px;background:#cbdce5;border-radius:3px;overflow:hidden}.progress-track span{height:100%;display:block;background:#589b7b;width:0;transition:width .4s}.time-box{display:flex;align-items:center;justify-content:space-between;padding:12px 0 15px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}.time-box>div{display:flex;align-items:center;gap:6px;font-size:9px;color:#617f8c}.time-box svg{width:15px;height:15px;stroke:#567d8b;fill:none;stroke-width:1.6}.time-box strong{font-size:22px;letter-spacing:-.6px}.time-box.overdue strong,.time-box.overdue span{color:#ad493b}.controls-heading{display:flex;align-items:center;justify-content:space-between;margin:15px 0 10px}.controls-heading h3{font-size:12px}.controls-heading>span{font-size:6px;letter-spacing:1px;color:#718b9b;font-weight:700}.crane-controls{display:grid;gap:9px}.axis-label{font-size:7px;letter-spacing:.8px;font-weight:800;color:#53718a;display:block;margin-bottom:5px}.axis-label small{font-size:8px;letter-spacing:0;font-weight:500;color:#6f8794}.control-pair{display:grid;grid-template-columns:1fr 1fr;gap:7px}.control{user-select:none;-webkit-user-select:none;touch-action:none;min-height:42px;border:1px solid #9fbfd4;background:#c0dcf0;border-radius:6px;display:flex;gap:5px;align-items:center;justify-content:center;font-weight:800;font-size:10px;padding:7px 6px;box-shadow:0 2px 0 #8fb1c53d}.control>span{font-size:17px;font-weight:500;line-height:1}.control.is-held{background:#7fb4d9;transform:translateY(2px);box-shadow:inset 0 2px 4px #34557222;border-color:#4b8cb8}kbd{font-family:var(--font);font-size:7px;line-height:1;border:1px solid #85a9c1;border-radius:3px;background:#d9eaf5;padding:3px;min-width:15px;text-align:center;font-weight:700;color:#486c83}.control kbd{margin-left:auto}.latch-button{height:43px;min-height:43px;background:#c4dded;border-color:#8dacc2;margin-top:3px;justify-content:center;font-size:12px;touch-action:manipulation}.latch-button svg{width:17px;height:17px}.latch-button kbd{margin-left:auto;font-size:6px;padding:4px}.latch-button.ready{background:#a5ddbd;border-color:#68a786}.latch-button.carrying{background:#b6d9cb}.alignment-block{display:flex;align-items:center;gap:10px;margin:15px 0 12px;padding-top:12px;border-top:1px solid var(--line)}.alignment-block canvas{width:105px;height:60px;border-radius:5px;border:1px solid #b3c9d6;flex-shrink:0}.alignment-block>div{display:flex;flex-direction:column;gap:5px}.alignment-block .eyebrow{font-size:6px;letter-spacing:1px;color:#6b899a}.alignment-block strong{font-size:10px}.alignment-block #heightText{font-size:8px;color:#52768a}.mini-legend{font-size:6px;color:#7d96a4}.maneuver-message{font-size:9px;color:#557587;line-height:1.5;display:flex;align-items:flex-start;gap:6px;padding:9px;border:1px solid #c6dbe4;border-radius:5px;background:#dce9ee;min-height:43px;margin-top:auto}.maneuver-message .status-dot{margin-top:4px;width:5px;height:5px;background:#5f9c9a}.maneuver-message.warning{border-color:#d4a6a0;background:#f0d4ce;color:#813d37}.maneuver-message.warning .status-dot{background:#b95c50}.scene-hint{position:absolute;z-index:2;left:19px;top:18px;right:19px;max-width:455px;background:#102e41ed;border:1px solid #57788a9c;border-radius:8px;display:flex;align-items:center;gap:12px;padding:12px 15px;pointer-events:none;box-shadow:0 4px 16px #04131c24}.hint-step{width:29px;height:29px;display:flex;align-items:center;justify-content:center;background:#a7d0e9;color:#16384d;border-radius:50%;font-size:10px;font-weight:800}.scene-hint .eyebrow{font-size:7px;color:#86adbf;margin-bottom:3px;letter-spacing:1px}.scene-hint strong{font-size:12px;color:#e1edf1;font-weight:600}.pause-button{border:1px solid #7395ad;background:#b7d4e7;border-radius:5px;display:flex;gap:6px;align-items:center;justify-content:center;color:#1e3b50;padding:5px 9px;font-size:9px;font-weight:800}.pause-button svg{width:12px;height:12px;stroke-width:3}.voyage-overlay{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);z-index:4;display:flex;align-items:center;gap:10px;white-space:nowrap;background:#153e50eb;border:1px solid #6592a5;color:#dcedf4;padding:13px 19px;border-radius:7px;font-size:12px;font-weight:600;box-shadow:0 5px 25px #08162144}.voyage-overlay .status-dot{animation:blink 1.4s ease-in-out infinite}.pause-overlay{position:absolute;inset:0;z-index:10;background:#0a203caf;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:20px}.pause-card{max-width:335px;background:#dcebf1;border-radius:12px;padding:28px;border:1px solid #9eb9cc;text-align:center}.pause-card .eyebrow{font-size:8px;color:#5c7a91;margin-bottom:13px}.pause-card h2{font-size:26px;line-height:1.05}.pause-card p{font-size:11px;color:#607d8f;margin:16px 0 22px}.pause-card .text-button{margin-top:13px;font-size:9px}.reward-float{position:absolute;left:66%;top:50%;z-index:6;pointer-events:none;opacity:0;color:#b3f1cc;background:#164535d9;padding:10px 15px;border:1px solid #8dd2ad;border-radius:7px;font-size:21px;font-weight:800;letter-spacing:-1px}.reward-float.show{animation:reward 1.7s ease-out both}.result-panel{text-align:center;padding-top:30px;align-items:center}.result-icon{width:43px;height:43px;background:#b3dfc7;border:1px solid #87bda0;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:16px}.result-icon svg{width:22px;height:22px;stroke:#35614d;stroke-width:2;fill:none}.result-panel>.eyebrow{font-size:8px;color:#588573;margin-bottom:9px}.result-panel h2{font-size:27px}.result-panel>p{font-size:10px;color:#6b8798;margin:9px 0 0;line-height:1.7}.result-total{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:21px 0;width:100%;margin:22px 0 16px}.result-total>span{font-size:9px;color:#658394;display:block;margin-bottom:7px}.result-total strong{font-size:40px;font-weight:750;color:#25614b;letter-spacing:-1.8px}.result-total.negative strong{color:#a4483f}.receipt{margin:0 0 24px;width:100%;font-size:10px}.receipt>div{display:flex;justify-content:space-between;gap:10px;margin-bottom:14px}.receipt dt{color:#648190;text-align:left}.receipt dd{margin:0;font-weight:750;white-space:nowrap}.receipt .positive dt,.receipt .positive dd{color:#367356}.receipt-time{padding-top:12px;border-top:1px dashed #bdcfda}.result-panel .btn{margin-top:auto}.result-panel .next-note{font-size:9px;margin-top:13px}.modal{width:min(480px,calc(100% - 30px));border:1px solid #94b4c7;border-radius:15px;background:#e0edf2;color:#173449;padding:26px;box-shadow:0 25px 100px #04172366;max-height:90dvh;overflow:auto}.modal::backdrop{background:#071f36aa;backdrop-filter:blur(5px)}.modal-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.modal-top .eyebrow{font-size:8px;color:#658496}.close-btn{border:1px solid #c0847c;background:#e4b0a9;min-width:31px;height:31px;border-radius:6px;font-size:23px;line-height:1}.modal h2{font-size:36px;line-height:1.02;letter-spacing:-1.2px;margin:13px 0}.modal-intro{font-size:12px;line-height:1.7;color:#5d7b8e;margin-bottom:23px}.help-steps{padding:0;list-style:none;margin:0 0 20px;display:flex;flex-direction:column;gap:19px}.help-steps li{display:flex;gap:13px}.help-steps li>span{min-width:29px;height:29px;border-radius:50%;background:#b3d4e9;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:10px}.help-steps strong{font-size:13px}.help-steps p{font-size:11px;line-height:1.65;color:#5c7a8c;margin:5px 0 0}.keyboard-guide{display:flex;flex-wrap:wrap;gap:9px 14px;border-top:1px solid #bbd0dc;padding-top:17px;font-size:9px;color:#52758a}.keyboard-guide>span{display:flex;align-items:center;gap:4px}.keyboard-guide kbd{padding:5px;min-width:20px;font-size:8px}.touch-note{font-size:10px;color:#688595;line-height:1.6;margin:16px 0 20px}.credits-modal p{font-size:12px;line-height:1.75;color:#58768a}.credits-modal h2{font-size:31px}.source-card{background:#c9dfeb;padding:17px;border-radius:7px;border:1px solid #b0c9d9;margin:19px 0}.source-card strong{font-size:12px}.source-card p{font-size:10px}.source-card a{display:block;font-size:10px;margin-top:9px;color:#255a7b}.credits-modal .small{font-size:10px}.small-modal h2{font-size:27px}.small-modal p{font-size:12px;color:#58768a;line-height:1.7}.confirm-actions{display:flex;gap:10px;margin-top:23px}.confirm-actions .btn{font-size:10px;justify-content:center}.noscript{background:#e8b1a9;color:#5c2924;padding:30px;position:fixed;inset:25%;z-index:20}.app-footer #saveStatus.error{color:#9c4c40}.app-footer #saveStatus.error .status-dot{background:#b35445}
.voyage-overlay button{background:#b9d9ee;color:#15364b;border:0;border-radius:4px;font-size:10px;font-weight:800;padding:7px 9px;margin-left:6px}.voyage-overlay{max-width:calc(100% - 28px)}
@keyframes reward{0%{opacity:0;transform:translateY(15px) scale(.9)}15%{opacity:1;transform:translateY(0) scale(1)}75%{opacity:1}100%{opacity:0;transform:translateY(-25px)}}@keyframes blink{50%{opacity:.35}}
@media(min-width:1500px){main{padding:30px 40px 0}.app-header{padding:0 42px}.workspace{grid-template-columns:minmax(0,1fr) 335px;gap:24px}.scene-viewport{min-height:620px}.operation-panel{padding:25px}.control{min-height:47px}.crane-panel .alignment-block{margin:20px 0 15px}.stats{gap:48px}}
@media(max-width:1150px){.header-center{display:none}.workspace{grid-template-columns:minmax(0,1fr) 285px;gap:15px}main{padding:20px 22px 0}.app-header{padding:0 24px}.stats{gap:17px}.stat{min-width:100px;gap:8px}.stat-icon{width:32px;height:32px}.stat strong{font-size:21px}.stat div>span{font-size:8px}.shift-heading h1{font-size:22px}.scene-topbar{padding:0 13px}.steps{gap:8px}.live-label{font-size:7px;letter-spacing:.7px}.step-line{width:12px}.map-title{left:17px;top:20px;padding-left:12px}.map-title h2{font-size:27px}.operation-panel{padding:20px}.panel-heading h2{font-size:21px}.crane-panel{padding:17px}.scene-viewport{min-height:550px}}
@media(max-width:850px){.app-header{height:67px;padding:0 18px}.brand-mark{width:35px;height:39px;border-radius:9px}.brand-mark svg{width:23px;height:23px}.brand{gap:10px}.brand strong{font-size:23px;letter-spacing:1.5px}.brand-eyebrow{font-size:6px;letter-spacing:1.4px}.icon-btn{height:33px;width:33px}.header-actions{gap:6px}main{padding:17px 16px 0}.shift-bar{gap:15px;margin-bottom:17px}.shift-heading h1{font-size:19px;max-width:200px;line-height:1.15}.shift-heading .eyebrow{font-size:7px;letter-spacing:1px}.stat-icon{display:none}.stats{gap:20px}.stat{min-width:70px}.stat strong{font-size:20px}.workspace{grid-template-columns:minmax(0,1fr) 260px;gap:12px}.scene-viewport{min-height:535px}.map-title{left:13px;top:17px;right:30px;padding-right:12px}.map-title h2{font-size:25px}.map-title p{font-size:10px}.live-label{display:none}.operation-panel{padding:16px}.ship-card{min-height:72px;padding:11px 9px;gap:8px}.ship-card>svg{width:38px}.ship-card-content strong{font-size:11px}.ship-card-content>span{font-size:7px}.sealed-note{font-size:9px}.panel-heading h2{font-size:21px}.btn{font-size:11px;padding:0 13px}.scene-hint{left:12px;right:12px;top:13px;padding:10px;gap:9px}.scene-hint strong{font-size:10px}.hint-step{width:25px;height:25px;min-width:25px}.scene-footer{font-size:7px;padding:0 10px}.desktop-only{display:none!important}.app-footer{flex-wrap:wrap;gap:7px}.save-status{font-size:7px}.controls-heading>span{font-size:5px}.crane-panel{padding:14px}.alignment-block canvas{width:85px;height:53px}.alignment-block strong{font-size:9px}.control{font-size:9px}.axis-label small{font-size:7px}.operation-head h2{font-size:20px}.crane-badge{font-size:6px}.result-panel h2{font-size:24px}}
@media(max-width:680px){.app-header{height:62px;padding:0 13px}.brand-mark{width:30px;height:35px}.brand strong{font-size:21px}.brand-eyebrow{font-size:5px;letter-spacing:1px}.brand{gap:8px}.header-actions{gap:5px}.icon-btn{width:31px;height:31px}.icon-btn svg{width:16px;height:16px}.fullscreen-btn{display:none}main{padding:14px 12px 0}.shift-bar{margin-bottom:13px;gap:10px}.shift-heading .eyebrow{font-size:6px;letter-spacing:.8px;margin-bottom:4px}.shift-heading h1{font-size:17px;max-width:155px;letter-spacing:-.5px}.stats{gap:15px;justify-content:flex-end;flex:1}.stat{min-width:0;gap:0}.stat div>span{font-size:6px;line-height:1.3;max-width:56px;margin-bottom:4px}.stat strong{font-size:17px;letter-spacing:-.5px}.stat:first-child div>span{max-width:70px}.workspace{display:flex;flex-direction:column;gap:12px}.scene-topbar{height:43px;padding:0 13px}.step{font-size:9px;gap:6px}.step b{width:17px;height:17px;font-size:7px}.steps{gap:9px}.step-line{width:18px}.live-label{display:flex;font-size:6px;letter-spacing:.5px}.scene-viewport{min-height:0;height:440px;flex:none}.map-title{left:15px;top:17px;right:auto;padding:9px 14px 11px 12px}.map-title .eyebrow{font-size:6px;letter-spacing:1.2px;margin-bottom:7px}.map-title h2{font-size:24px}.map-title p{font-size:9px;margin-top:9px;line-height:1.55}.scene-footer{height:29px;font-size:6px;padding:0 11px}.scene-panel{border-radius:10px}.operation-panel{border-radius:10px;padding:18px}.panel-heading{position:relative}.panel-heading .eyebrow{font-size:7px;margin-bottom:6px}.panel-heading h2{font-size:22px;margin-bottom:7px}.panel-heading p{font-size:10px;margin-bottom:15px}.ship-list{flex-direction:row;gap:7px}.ship-card{flex-direction:column;justify-content:center;gap:4px;padding:11px 5px;min-height:105px;text-align:center;flex:1}.ship-card-content strong{font-size:10px;margin-bottom:5px}.ship-card-content>span{font-size:6px;justify-content:center;line-height:1.4}.ship-radio{position:absolute;top:7px;right:6px;width:11px;height:11px}.selected .ship-radio:after{width:5px;height:5px}.ship-card>svg{width:43px;height:30px}.ship-number{font-size:6px;top:8px;left:7px}.sealed-note{margin:12px 0;font-size:8px}.sealed-note p br{display:none}.sealed-note strong{margin-left:3px}.sealed-note>svg{width:14px;height:17px}.btn{height:46px;min-height:46px;font-size:12px}.operation-rule{display:none}#resetBtn{margin-top:9px;font-size:8px;text-align:center}.app-footer{padding:12px 0;min-height:60px;font-size:7px;align-items:center}.app-footer strong{font-size:6px}.save-status{font-size:6px}.app-footer .text-button{font-size:7px}.app-footer>.save-status{order:3;flex-basis:100%;justify-content:center}.footer-separator{margin:0 6px}.version{font-size:6px}.workspace.is-operation{gap:10px}.is-operation .scene-viewport{height:min(43dvh,350px);min-height:255px}.is-operation .scene-topbar{height:37px}.is-operation .scene-footer{height:25px}.is-operation .scene-hint{top:10px;left:10px;right:10px;padding:9px 10px;max-width:none;border-radius:6px}.scene-hint .eyebrow{font-size:6px;letter-spacing:.8px;margin-bottom:2px}.scene-hint strong{font-size:10px}.hint-step{width:24px;height:24px;min-width:24px;font-size:9px}.crane-panel{padding:13px 14px;display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}.operation-head{margin:0;gap:5px}.operation-head .eyebrow{font-size:6px;margin-bottom:3px}.operation-head h2{font-size:19px}.crane-badge{display:none}.operation-progress{align-self:center}.operation-progress>div:first-child{font-size:8px;margin-bottom:6px}.operation-progress strong{font-size:9px}.time-box{grid-column:1/-1;padding:7px 0 0;border:0;position:absolute;visibility:hidden;height:0;overflow:hidden}.controls-heading{grid-column:1/-1;margin:0;display:none}.crane-controls{grid-column:1/-1;grid-template-columns:1fr 1fr 1fr;gap:8px}.control-group{min-width:0}.axis-label{font-size:6px;letter-spacing:.6px;margin-bottom:5px}.axis-label small{display:none}.control-pair{grid-template-columns:1fr;gap:5px}.control{min-height:39px;font-size:9px;gap:5px;padding:4px 7px;justify-content:flex-start;box-shadow:0 1px 0 #8fb1c540}.control kbd{display:none}.control>span{font-size:17px;min-width:14px;text-align:center}.latch-button{grid-column:1/-1;min-height:41px;height:41px;margin-top:0;justify-content:center;font-size:12px}.latch-button kbd{display:none}.alignment-block{grid-column:1;margin:0;padding:0;border:0;gap:7px}.alignment-block canvas{width:79px;height:46px}.alignment-block>div{gap:4px}.alignment-block strong{font-size:8px}.alignment-block .eyebrow{font-size:5px;letter-spacing:.6px}.alignment-block #heightText{font-size:7px}.mini-legend{display:none}.maneuver-message{grid-column:2;min-height:46px;margin:0;font-size:8px;line-height:1.45;padding:6px;align-self:stretch}.pause-button{font-size:8px;padding:4px 7px}.pause-button svg{width:10px;height:10px}.reward-float{font-size:17px;padding:8px 12px}.result-panel{padding:22px}.result-panel .receipt{max-width:360px}.result-panel .result-total{padding:16px 0;margin:15px 0}.result-panel .result-icon{margin-bottom:12px}.result-panel .result-total strong{font-size:36px}.result-panel>.eyebrow{font-size:7px}.result-panel h2{font-size:27px}.result-panel>.btn{margin-top:0}.voyage-overlay{font-size:10px;padding:11px 15px;bottom:20px}.modal{padding:23px}.modal h2{font-size:31px}.help-steps{gap:15px}.help-steps p{font-size:10px}.help-steps strong{font-size:12px}.touch-note{font-size:9px}.keyboard-guide{font-size:8px}.modal-intro{font-size:11px}.credits-modal h2{font-size:27px}}
@media(max-width:360px){.brand strong{font-size:18px}.brand-mark{display:none}.stats{gap:10px}.shift-heading h1{font-size:15px}.stat strong{font-size:16px}.live-label{display:none}.crane-panel{padding:11px;gap:9px}.alignment-block canvas{width:67px}.alignment-block{gap:5px}.scene-viewport{height:410px}}
@media(max-width:680px){.is-operation .scene-viewport{height:min(40dvh,335px)}.control{min-height:44px;font-size:10px}.axis-label{font-size:7px}.voyage-overlay{white-space:normal;flex-wrap:wrap;justify-content:center;text-align:center;gap:7px;width:max-content}.voyage-overlay button{font-size:9px}.scene-footer a{font-size:7px}}
@media(max-height:580px) and (min-width:681px){.app-header{height:57px}main{padding-top:12px}.shift-bar{margin-bottom:12px}.shift-heading .eyebrow{display:none}.scene-viewport{min-height:450px}.operation-panel{padding:15px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Selective discharge: the manifest is the task, the rest stays aboard. */
.manifest-panel{margin:12px 0 0;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.manifest-heading{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-bottom:8px}
.manifest-heading strong{font-size:9px;font-weight:650;color:#537183;line-height:1.5}
.manifest-heading>span{font-size:5px;font-weight:800;letter-spacing:.8px;color:#8098a5;flex-shrink:0}
.manifest-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(68px,1fr));gap:6px}
.manifest-item{border:1px solid #b4cbd9;background:#d2e6f1;border-radius:5px;padding:7px 5px;min-height:41px;display:flex;flex-direction:column;gap:4px;text-align:left;touch-action:manipulation}
.manifest-item strong{font-size:10px;color:#193b50;font-weight:800}
.manifest-item span{font-size:8px;color:#526d7e;line-height:1.25;white-space:normal}
.manifest-item.selected{border-color:#bc6755;background:#f0d3c6;box-shadow:inset 0 0 0 1px #bc67553b}
.manifest-item.delivered{background:#bfe1d0;border-color:#87b39d;opacity:1}
.manifest-item:disabled:not(.delivered){opacity:.72}
.restow-status{font-size:9px;color:#647e8d;line-height:1.5;margin:8px 0 0}
.restow-status.restow-required{font-weight:800;color:#994b3d;background:#f2d7cc;padding:6px 7px;border-radius:4px}
.storage-actions>div{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:5px}
.storage-actions button{padding:7px 4px;min-height:34px;border:1px solid #a6c4d7;background:#c2dff0;border-radius:5px;font-size:8px;line-height:1.35;font-weight:800;touch-action:manipulation}
.storage-actions button.selected{border-color:#ba6f5d;background:#efd3c6}
.storage-actions{padding-top:4px}
.cargo-legend{font-size:8px;justify-content:space-between}
.cargo-legend b{font-size:9px;letter-spacing:.5px;color:#b7d9ec}
.cargo-legend .legend-lp{color:#ffb79d}
.cargo-legend .legend-tr{color:#b4d4ed}
.pause-card .legacy-notice{font-size:10px;color:#885743;background:#efd8c8;padding:9px;border-radius:5px;margin:12px 0 16px;line-height:1.5}
.crane-panel .operation-head{margin-bottom:12px}
.crane-panel .time-box{border-bottom:0;padding-bottom:5px}
.crane-panel .controls-heading{margin-top:11px}
.crane-panel .alignment-block{margin-top:12px}
@media(max-width:850px){.manifest-heading>span{display:none}.manifest-item{padding:6px 4px}.manifest-item span{font-size:7px}.storage-actions button{font-size:7px}.manifest-heading strong{font-size:8px}.restow-status{font-size:8px}}
@media(max-width:680px){
  .is-operation .scene-viewport{height:min(36dvh,300px);min-height:245px}
  .crane-panel .operation-head{margin-bottom:0}
  .manifest-panel{grid-column:1/-1;padding:7px 0 0;margin:0;border-top:1px solid var(--line);border-bottom:0}
  .manifest-heading{margin-bottom:5px}.manifest-heading strong{font-size:8px}.manifest-heading>span{display:block;font-size:5px}
  .manifest-list{gap:6px;grid-template-columns:repeat(auto-fit,minmax(70px,1fr))}
  .manifest-item{min-height:36px;padding:5px 6px;gap:3px}
  .manifest-item strong{font-size:9px}.manifest-item span{font-size:7px}
  .restow-status{font-size:8px;margin-top:5px;line-height:1.35}
  .restow-status.restow-required{padding:4px 6px}
  .storage-actions{grid-column:1/-1;padding-top:0}
  .storage-actions button{min-height:37px;font-size:9px}
  .cargo-legend{font-size:6px;padding:0 8px}.cargo-legend b{font-size:7px}
  .crane-panel .alignment-block{margin-top:0;gap:6px}
  .alignment-block canvas{width:100px;height:58px}.alignment-block>div{min-width:0}.alignment-block strong{font-size:8px}.alignment-block #heightText{font-size:7px}
  .maneuver-message{min-height:58px}
}

/* One set of inputs serves both the desktop panel and the phone controller. */
.control .control-caption{font-size:inherit;font-weight:inherit;min-width:0}
.control .control-arrow{font-size:17px;line-height:1;min-width:14px;text-align:center}
.collision-notice{position:absolute;z-index:7;left:50%;bottom:16px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 28px);padding:11px 15px;border:1px solid #a95344;border-radius:8px;background:#efb0a3;color:#40251f;box-shadow:0 5px 18px #12293650;font-size:12px;font-weight:800;line-height:1.45;text-align:center;pointer-events:none}
.collision-notice.show{animation:impact-notice .22s ease-out both}
@keyframes impact-notice{from{opacity:0}to{opacity:1}}

/* During a phone operation the scene takes all space above seven fixed actions.
   Hidden secondary panels remain in the DOM for their shared game-state updates. */
@media(max-width:680px),(max-width:950px) and (max-height:520px){
  .app-shell:has(.workspace.is-operation){height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
  .app-shell:has(.workspace.is-operation) .app-header{height:48px;min-height:48px;flex-shrink:0;padding:0 10px;gap:8px}
  .app-shell:has(.workspace.is-operation) .brand{gap:7px}
  .app-shell:has(.workspace.is-operation) .brand-mark{width:25px;height:29px;border-radius:7px}
  .app-shell:has(.workspace.is-operation) .brand-mark svg{width:19px;height:19px}
  .app-shell:has(.workspace.is-operation) .brand strong{font-size:18px;line-height:1;letter-spacing:1px}
  .app-shell:has(.workspace.is-operation) .brand-eyebrow{font-size:5px;line-height:1.2;letter-spacing:.8px;margin-bottom:3px}
  .app-shell:has(.workspace.is-operation) .header-center{display:none}
  .app-shell:has(.workspace.is-operation) .header-actions{gap:4px}
  .app-shell:has(.workspace.is-operation) .icon-btn{height:44px;width:44px}
  .app-shell:has(.workspace.is-operation) .fullscreen-btn{display:none}
  .app-shell:has(.workspace.is-operation) main{display:flex;flex-direction:column;flex:1;min-height:0;padding:6px 10px calc(5px + env(safe-area-inset-bottom,0px))}
  .app-shell:has(.workspace.is-operation) .shift-bar{flex:0 0 27px;min-height:27px;margin:0 0 5px;gap:0}
  .app-shell:has(.workspace.is-operation) .shift-heading{display:none}
  .app-shell:has(.workspace.is-operation) .stats{display:flex;align-items:center;width:100%;gap:8px;justify-content:space-between}
  .app-shell:has(.workspace.is-operation) .stat{flex:1;min-width:0;gap:6px;justify-content:center;white-space:nowrap}
  .app-shell:has(.workspace.is-operation) .stat-icon{display:none}
  .app-shell:has(.workspace.is-operation) .stat div{display:flex;align-items:center}
  .app-shell:has(.workspace.is-operation) .stat div>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .app-shell:has(.workspace.is-operation) .stat strong{font-size:18px;line-height:1;letter-spacing:-.4px}
  .app-shell:has(.workspace.is-operation) .stat:nth-child(3){order:-1;justify-content:flex-start}
  .app-shell:has(.workspace.is-operation) .stat:nth-child(3)::before{content:'LP';font-size:10px;line-height:1;font-weight:800;color:#3b6075}
  .app-shell:has(.workspace.is-operation) .stat:nth-child(2){justify-content:flex-end}
  .app-shell:has(.workspace.is-operation) .stat:nth-child(2)::before{content:'Tiempo';font-size:8px;line-height:1;font-weight:700;color:#4c697d}
  .workspace.is-operation{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px}
  .is-operation .scene-panel{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;border-radius:10px}
  .is-operation .scene-topbar{position:absolute;z-index:5;right:7px;top:7px;width:58px;height:44px;min-height:44px;padding:0;gap:0;background:transparent;border:0}
  .is-operation .steps,.is-operation .live-label{display:none}
  .is-operation .pause-button{height:44px;width:58px;min-width:58px;padding:0 6px;gap:5px;font-size:10px;flex-shrink:0}
  .is-operation .pause-button svg{width:12px;height:12px}
  .is-operation .scene-viewport{height:auto;min-height:0;flex:1}
  .is-operation .scene-footer{height:20px;min-height:20px;flex-shrink:0;padding:0 10px}
  .is-operation .cargo-legend{font-size:8px;gap:8px}
  .is-operation .cargo-legend b{font-size:9px}
  .is-operation .cargo-legend>span:last-child{display:none}
  .is-operation .scene-hint{top:7px;left:8px;right:73px;min-height:44px;padding:7px 9px;gap:0;max-width:none;border-radius:6px}
  .is-operation .scene-hint .eyebrow,.is-operation .hint-step{display:none}
  .is-operation .scene-hint strong{display:block;font-size:11px;line-height:1.3}
  .is-operation .crane-panel{display:block;flex:0 0 auto;min-height:0;padding:7px;border-radius:10px}
  .is-operation .operation-head,.is-operation .operation-progress,.is-operation .manifest-panel,.is-operation .time-box,.is-operation .controls-heading,.is-operation .alignment-block,.is-operation .maneuver-message,.is-operation #storageActions{display:none!important}
  .is-operation .crane-controls{display:grid;grid-template-columns:repeat(3,clamp(44px,13.4vw,52px)) minmax(108px,1fr);grid-template-rows:repeat(3,50px);gap:6px}
  .is-operation .crane-controls .control-group,.is-operation .crane-controls .control-pair{display:contents}
  .is-operation .crane-controls .axis-label{display:none}
  .is-operation .control{height:50px;min-height:50px;min-width:44px;padding:4px;gap:0;justify-content:center;border-radius:8px;background:#bddaf0;color:#163549;font-size:12px;font-weight:800;touch-action:none}
  .is-operation .control[data-axis='x'][data-sign='-1']{grid-column:1;grid-row:2}
  .is-operation .control[data-axis='x'][data-sign='1']{grid-column:3;grid-row:2}
  .is-operation .control[data-axis='y'][data-sign='-1']{grid-column:2;grid-row:1}
  .is-operation .control[data-axis='y'][data-sign='1']{grid-column:2;grid-row:3}
  .is-operation .control[data-axis='z'][data-sign='1']{grid-column:4;grid-row:1}
  .is-operation .control[data-axis='z'][data-sign='-1']{grid-column:4;grid-row:2}
  .is-operation .control[data-axis='z']{margin-left:8px}
  .is-operation .axis-carro .control-caption,.is-operation .axis-portico .control-caption,.is-operation .axis-hoist .control-arrow,.is-operation .control kbd{display:none}
  .is-operation .control .control-arrow{font-size:29px;font-weight:700;line-height:1;min-width:0}
  .is-operation .control .control-caption{font-size:12px;line-height:1;font-weight:800}
  .is-operation .control.is-held{background:#8dbddd;box-shadow:inset 0 2px 5px #38586e30}
  .is-operation .latch-button{grid-column:4;grid-row:3;width:auto;height:50px;min-height:50px;min-width:0;margin:0 0 0 8px;padding:4px 7px;justify-content:center;border-radius:8px;background:#bddaf0;color:#163549;font-size:12px;font-weight:800;gap:0;touch-action:manipulation}
  .is-operation .latch-button svg,.is-operation .latch-button kbd{display:none}
  .is-operation .latch-button #latchText{font-size:12px;line-height:1.1;font-weight:800;white-space:nowrap}
  .is-operation .latch-button.ready{background:#9bd9b6;border-color:#5b9f79;color:#163d2b;box-shadow:0 0 0 2px #9bd9b632}
  .is-operation .collision-notice{bottom:12px;max-width:calc(100% - 20px);padding:9px 12px;font-size:11px;line-height:1.35}
  .is-operation .pause-overlay{padding:8px}
  .is-operation .pause-card{padding:12px 15px;max-width:320px;max-height:100%;overflow:auto;border-radius:9px}
  .is-operation .pause-card>.eyebrow{display:none}
  .is-operation .pause-card h2{font-size:21px;line-height:1.1}
  .is-operation .pause-card p{font-size:11px;line-height:1.35;margin:8px 0}
  .is-operation .pause-card .btn{height:46px;min-height:46px;font-size:12px}
  .is-operation .pause-card .text-button{display:flex;align-items:center;justify-content:center;min-height:44px;width:100%;margin:0;font-size:10px;padding:4px}
  .is-operation .pause-card .legacy-notice{padding:7px;margin:7px 0;font-size:10px;line-height:1.3}
  .app-shell:has(.workspace.is-operation) .app-footer{flex:0 0 auto;min-height:17px;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:8px;padding:3px 0 0;margin:0}
  .app-shell:has(.workspace.is-operation) .app-footer>span:first-child{font-size:0;line-height:0}
  .app-shell:has(.workspace.is-operation) .app-footer>span:first-child>strong,.app-shell:has(.workspace.is-operation) .app-footer .footer-separator,.app-shell:has(.workspace.is-operation) .app-footer>.text-button,.app-shell:has(.workspace.is-operation) .save-status:not(.error){display:none}
  .app-shell:has(.workspace.is-operation) .app-footer .version{display:block;font-size:8px;line-height:1.2;margin:0;color:#587789}
  .app-shell:has(.workspace.is-operation) .save-status.error{display:flex;flex:0 1 auto;max-width:76%;font-size:8px;line-height:1.25;justify-content:flex-end;text-align:right}
  .keyboard-guide{display:none}
}
@media(max-width:360px){
  .app-shell:has(.workspace.is-operation) .brand strong{font-size:17px}
  .is-operation .crane-controls{grid-template-columns:repeat(3,44px) minmax(106px,1fr);gap:5px}
  .is-operation .control[data-axis='z'],.is-operation .latch-button{margin-left:5px}
}
@media(max-width:680px) and (max-height:650px){
  .is-operation .crane-controls{grid-template-rows:repeat(3,44px)}
  .is-operation .control,.is-operation .latch-button{height:44px;min-height:44px}
}
@media(min-width:681px) and (max-width:950px) and (max-height:520px){
  .app-shell:has(.workspace.is-operation) .app-header{height:44px;min-height:44px}
  .app-shell:has(.workspace.is-operation) main{padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px))}
  .app-shell:has(.workspace.is-operation) .shift-bar{flex-basis:23px;min-height:23px;margin-bottom:4px}
  .app-shell:has(.workspace.is-operation) .stat strong{font-size:16px}
  .workspace.is-operation{display:grid;grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr);gap:8px}
  .is-operation .scene-panel{height:100%}
  .is-operation .crane-panel{align-self:center}
  .is-operation .crane-controls{grid-template-columns:repeat(3,44px) minmax(92px,1fr);grid-template-rows:repeat(3,44px);gap:5px}
  .is-operation .control,.is-operation .latch-button{height:44px;min-height:44px;font-size:11px}
  .is-operation .control[data-axis='z'],.is-operation .latch-button{margin-left:4px}
  .is-operation .control .control-caption,.is-operation .latch-button #latchText{font-size:11px}
}

/* The highlighted control and the green latch share the engine's real cue. */
.control.is-guided:not(:disabled){outline:2px solid #c76149;outline-offset:1px;box-shadow:0 0 0 4px #e7a48b38}
.scene-hint.is-ready{border-color:#8ad9b0;background:#103d37ee}
.scene-hint.is-ready .hint-step{background:#a2dfbc;color:#183c31;border-color:#8ad9b0}
.alignment-block #alignmentText{line-height:1.25}
.alignment-block #heightText{line-height:1.35}

/* v0.4: camera and load state stay separate from the seven crane actions. */
.catalog-back{font-size:11px;font-weight:800;text-decoration:none;color:#bedcf1;white-space:nowrap;margin-left:auto;min-height:44px;display:flex;align-items:center}
.camera-tools{position:absolute;right:12px;bottom:28px;z-index:4;display:flex;gap:4px;padding:4px;background:#102e41e8;border:1px solid #62869c;border-radius:10px;box-shadow:0 4px 16px #06182350}
.camera-tools button{height:44px;min-width:44px;border:1px solid #96bcd4;background:#b7d8f1;color:#102c3c;border-radius:6px;font-size:22px;font-weight:800;touch-action:manipulation}
.camera-tools #cameraMode{font-size:11px;padding:0 10px}
.camera-tools #cameraMode[aria-pressed=true]{background:#9bd9b6;border-color:#76b992}
.work-telemetry{position:absolute;bottom:88px;right:12px;z-index:3;max-width:240px;display:grid;grid-template-columns:1fr auto;gap:5px 14px;background:#102e41ed;border:1px solid #6b91a9;border-radius:8px;padding:9px 12px;color:#dcebf1;pointer-events:none;font-size:10px;font-weight:700;box-shadow:0 4px 16px #06182335}
.work-telemetry strong{font-size:15px;color:#b6dbf2;font-variant-numeric:tabular-nums}
.work-telemetry #destinationState{grid-column:1/-1;font-size:11px;color:#ffd0be}
.work-telemetry.ready{border:2px solid #8ad9b0;background:#103d37ed}
.work-telemetry.ready #destinationState{color:#b9f5cf}
.alignment-block canvas{width:112px;height:120px;object-fit:contain;background:#d5e5ea}
.result-rating{display:flex;flex-direction:column;gap:6px;margin-top:15px;width:100%;padding:14px 8px;border-radius:8px;background:#c5e2ed;color:#193e54}
.result-rating strong{font-size:28px;letter-spacing:7px;color:#326e91}
.result-rating span{font-size:14px;font-weight:800}.result-rating small{font-size:9px;line-height:1.5}
.result-total{margin-top:14px}
@media(max-width:850px){.catalog-back span{display:none}.catalog-back{margin-left:auto;font-size:21px}.app-header{gap:10px}}
@media(max-width:680px),(max-width:950px) and (max-height:520px){
 .camera-tools{right:8px;bottom:24px;padding:3px;gap:3px}.camera-tools #cameraMode{font-size:10px;padding:0 7px}
 .work-telemetry{right:8px;bottom:81px;padding:6px 9px;max-width:205px;font-size:9px;gap:3px 12px}.work-telemetry strong{font-size:13px}.work-telemetry #destinationState{font-size:10px}
 .is-operation .collision-notice{bottom:138px}
 .app-shell:has(.workspace.is-operation) .catalog-back{display:none}
}
@media(max-height:430px){.work-telemetry{grid-template-columns:1fr auto;font-size:9px;max-width:190px}.work-telemetry #destinationState{display:none}}

/* The ledger is a paused sheet; the seven crane actions keep their space. */
.market-button{min-height:44px;padding:0 13px;border:1px solid #86abc4;border-radius:8px;background:#b9d9ee;color:#142f40;font-size:12px;font-weight:800;white-space:nowrap;flex-shrink:0}
.market-modal{width:min(900px,calc(100vw - 28px));max-width:900px;max-height:90dvh;overflow:auto;padding:28px;background:#deedf3}
.market-modal h2{font-size:34px}.market-modal h3{font-size:16px;margin:24px 0 12px}.market-modal .modal-intro{font-size:13px;line-height:1.6}
.market-modal .close-btn{min-width:44px;min-height:44px}.market-modal .modal-top{position:sticky;top:-28px;background:#deedf3;z-index:1;padding:5px 0}
.market-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.market-stats>div{display:flex;flex-direction:column;gap:6px;border:1px solid #a9c8d8;background:#c3deeb;border-radius:9px;padding:14px}
.market-stats span{font-size:11px}.market-stats strong{font-size:25px;color:#173c52;font-variant-numeric:tabular-nums}
.market-vessel{background:#193e53;color:#dceaf2;padding:12px 15px;border-radius:7px;font-size:13px;font-weight:800}
.warehouse-slots{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stock-card{border:1px solid #9abfce;background:#cce3ed;border-radius:9px;padding:14px;display:flex;flex-direction:column;gap:9px}.stock-card.empty{border-style:dashed;background:#d8e8ee;min-height:145px;justify-content:center}.stock-card .eyebrow{font-size:10px}.stock-card>strong{font-size:15px}.stock-card p{font-size:12px;line-height:1.5;margin:0}.stock-card .btn{margin-top:auto;font-size:11px;min-height:48px;height:auto;padding:10px}
.cargo-swatch{display:block;font-size:14px;font-weight:800;border-left:7px solid var(--cargo-color,#789cbb);padding-left:8px;color:#16394e}
.trade-gain{color:#18553a;font-weight:800}.trade-loss{color:#a43732;font-weight:800}.trade-reason{display:block;font-size:11px;line-height:1.5;color:#415e70}
.purchase-offers{display:flex;flex-direction:column;gap:9px}.offer-card{display:grid;grid-template-columns:1fr auto;gap:8px 14px;padding:14px;border:1px solid #aec7d4;background:#d0e4ee;border-radius:9px}.offer-copy{display:flex;flex-direction:column;gap:7px}.offer-copy strong{font-size:14px}.offer-copy small{font-size:11px}.offer-card>.trade-reason{grid-column:1/-1}.offer-card .btn{min-width:148px;align-self:center;min-height:46px;font-size:12px;padding:10px}
.market-tip,.market-empty{font-size:12px;line-height:1.65;background:#c4ddec;padding:14px;border-radius:7px;color:#27485d}.market-feedback{background:#ecc5bd;border:1px solid #b95a4b;color:#632f26;border-radius:7px;padding:12px;font-weight:800}.market-modal ul{padding-left:18px;font-size:12px;line-height:1.7}.market-modal>.btn{margin-top:16px;width:100%}.market-modal button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:680px),(max-width:950px) and (max-height:520px){
 .app-header .market-button{font-size:10px;padding:0 8px;margin-left:auto}.app-shell:has(.workspace.is-operation) .brand-mark{display:none}.app-shell:has(.workspace.is-operation) .brand strong{font-size:15px}.app-shell:has(.workspace.is-operation) .brand-eyebrow{font-size:4px}.app-header .header-center{display:none}
 .market-modal{padding:18px;width:calc(100vw - 18px);max-height:94dvh}.market-modal h2{font-size:27px}.market-modal .modal-top{top:-18px}.market-stats{gap:5px}.market-stats>div{padding:9px 6px}.market-stats span{font-size:9px}.market-stats strong{font-size:18px}.warehouse-slots{grid-template-columns:1fr}.stock-card.empty{min-height:80px}.stock-card .btn{font-size:12px}.offer-card{grid-template-columns:1fr}.offer-card .btn{width:100%}.market-modal .modal-intro{font-size:12px}
}
@media(max-width:380px){.app-shell:has(.workspace.is-operation) .brand strong{font-size:13px}.app-header .market-button{padding:0 6px;font-size:9px}.app-header .header-actions{gap:2px}.app-header{gap:5px}}

/* Compact corner controller: the operation scene uses the whole available area. */
@media(max-width:680px),(max-width:950px) and (max-height:520px){
 .workspace.is-operation{display:block;position:relative;flex:1;min-height:0}
 .is-operation .scene-panel{position:absolute;inset:0;width:100%;height:100%;border-radius:8px}
 .is-operation .crane-panel{position:absolute;right:8px;bottom:8px;z-index:8;background:transparent;border:0;box-shadow:none;padding:0;width:auto;min-width:0}
 .is-operation .crane-controls{display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);gap:5px}
 .is-operation .control,.is-operation .latch-button{width:46px;height:46px;min-width:46px;min-height:46px;padding:2px;margin:0!important;border-radius:8px;box-shadow:0 2px 5px #092c4655;background:#bddaf0f5}
 .is-operation .control[data-axis='x'][data-sign='-1']{grid-column:1;grid-row:2}
 .is-operation .control[data-axis='x'][data-sign='1']{grid-column:3;grid-row:2}
 .is-operation .control[data-axis='y'][data-sign='-1']{grid-column:2;grid-row:1}
 .is-operation .control[data-axis='y'][data-sign='1']{grid-column:2;grid-row:3}
 .is-operation .control[data-axis='z'][data-sign='1']{grid-column:3;grid-row:1}
 .is-operation .control[data-axis='z'][data-sign='-1']{grid-column:3;grid-row:3}
 .is-operation .latch-button{grid-column:2;grid-row:2}
 .is-operation .control .control-caption,.is-operation .latch-button #latchText{font-size:9px;white-space:normal}
 .is-operation .control .control-arrow{font-size:26px}
 .is-operation .scene-footer,.app-shell:has(.workspace.is-operation) .app-footer{display:none}
 .camera-tools{left:8px;right:auto;bottom:8px;gap:3px;padding:3px}
 .camera-tools button{min-width:40px;height:40px}.camera-tools #cameraMode{font-size:9px;padding:0 5px;max-width:62px}
 .work-telemetry{left:8px;right:auto;bottom:64px;max-width:155px;padding:6px;gap:3px;font-size:8px}
 .work-telemetry strong{font-size:12px}.work-telemetry #destinationState{font-size:9px}
 .is-operation .collision-notice{bottom:172px}
}

@media(max-width:680px),(max-width:950px) and (max-height:520px){.app-shell:has(.workspace.is-operation) .brand{display:none}.app-header #cabinBtn{margin-left:0}.app-header #marketBtn{margin-left:0}.app-header .header-actions{margin-left:auto}#cabinBtn{min-width:58px}}
#cabinBtn[aria-pressed=true]{background:#a2dcbd}

/* Touch controls are controls, never selectable text or iOS callout targets. */
.crane-controls,.crane-controls button,.crane-controls button *,.camera-tools,.camera-tools button,.camera-tools button *,#cabinBtn,#marketBtn,#pauseBtn{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;
}
.crane-controls button>*{pointer-events:none}
.crane-controls .latch-button{touch-action:manipulation}

/* Compact, persistent warnings share the hint panel; controls remain usable. */
.time-notice{display:block;margin-top:5px;padding-top:5px;border-top:1px solid #e2a99d;color:#ffd5ca;font-size:11px;font-weight:800;line-height:1.35}
.scene-hint.time-warning{border-color:#e49c8c;background:#233946}
@media(max-width:700px){.time-notice{font-size:10px;margin-top:3px;padding-top:3px}}
