/* Map-first SLG presentation. Detail panels share the existing game controls. */
.slg-mode{height:100dvh;min-height:500px;overflow:hidden;background:#0b191d}
.slg-mode .local-banner{display:none}
.slg-mode .topbar{height:59px;padding:9px 22px;gap:19px;background:#101f25}
.slg-mode .brand{font-size:18px}.slg-mode .brand-mark{width:34px;height:34px;line-height:32px;font-size:27px;border-radius:8px}.slg-mode .brand small{display:none}.slg-mode .connection small{display:none}.slg-mode .connection::after{content:'本地测试';font-size:10px;color:#7d9e96;margin-left:6px}
.slg-mode .game-layout{max-width:none;margin:0;padding:12px 18px 9px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:54px minmax(0,1fr) 57px;gap:9px;height:calc(100dvh - 59px)}
.slg-mode .inventory-bar{height:54px;min-height:0;flex-wrap:nowrap;gap:30px;padding:8px 18px;border-radius:7px;background:#173029;border-color:#34584a;box-shadow:0 2px 8px #0002}
.slg-mode .inventory-bar strong{font-size:19px;line-height:1.1;font-variant-numeric:tabular-nums}.slg-mode .inventory-bar small{font-size:10px;margin-bottom:3px}.slg-mode .inventory-bar .eyebrow{display:none}.slg-mode .base-title{padding-right:22px;min-width:120px}.slg-mode .base-title h2{font-size:15px}.slg-mode #save-status{font-size:9px}
.slg-stage{position:relative;min-height:0;overflow:hidden;border-radius:9px;border:1px solid #37534a;background:#18362d}
.slg-mode .scene-panel{height:100%;border:0;border-radius:0;display:flex;flex-direction:column;background:#132c26}
.slg-mode .scene-toolbar{height:47px;min-height:47px;padding:8px 13px;flex-wrap:nowrap;background:#122720;border-bottom:1px solid #304c40}.slg-mode .scene-toolbar .eyebrow{display:none}.slg-mode .scene-toolbar h2{font-size:14px;font-weight:500;color:#b4d4bb}.slg-mode .scene-tools{flex-wrap:nowrap}.slg-mode .scene-tools button{font-size:10px;padding:6px 9px;background:#19392e;border-color:#3c5b49}
.slg-mode .scene-wrap{height:auto;min-height:0;flex:1;border:0;background:#1b382b}
.slg-mode .scene-badge{top:10px;left:12px;font-size:9px;background:#162d22dc;border-color:#52795b;padding:4px 7px}
.slg-mode .coordinate-label{font-size:9px;top:10px;background:#162d22dc;border-color:#3e5a44}
.slg-mode .scene-legend{bottom:10px;left:auto;right:12px;background:#10251ddf;font-size:9px;gap:11px}
.slg-mode .scene-empty{z-index:4;background:radial-gradient(ellipse,#17382ce8,#0d211be8)}
.slg-mode .scene-empty>span{font-size:45px}.slg-mode .scene-empty h3{font-size:19px}
.slg-task-card{position:absolute;left:18px;bottom:20px;width:292px;padding:14px 16px;background:#10271fef;border:1px solid #698865;border-radius:7px;box-shadow:0 8px 25px #0003;z-index:2}
.slg-task-card>small{font-size:10px;color:#c7b57b}.slg-task-card h2{font-size:15px;line-height:1.6;margin:5px 0;color:#e2e9d7}.slg-task-card p{font-size:11px;line-height:1.7;color:#b4c8b5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:10px}.slg-task-card button{padding:7px 13px;font-size:11px}
.slg-placement{position:absolute;z-index:3;top:63px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;border:1px solid #b79859;background:#3b311feF;color:#f1d5a2;max-width:90%;padding:9px 11px;border-radius:6px;font-size:12px;box-shadow:0 5px 20px #0004}.slg-placement button{font-size:10px;padding:5px 8px}
.slg-expedition-status{position:absolute;z-index:3;top:64px;right:16px;border-color:#7c976b;background:#1b3528eE;font-size:11px;color:#d4e9bf;max-width:calc(100% - 32px)}
.slg-mode .expedition-live-chip{bottom:13px;left:auto;right:12px;max-width:54%;font-size:9px}.slg-mode .scene-legend:has(+ *){opacity:.8}
.slg-nav{display:flex;align-items:stretch;justify-content:center;gap:9px;max-width:640px;width:100%;margin:auto;height:57px}
.slg-nav button{flex:1;min-width:0;border:1px solid #355449;border-radius:7px;background:#162e26;padding:6px 12px;color:#d3e2d4}.slg-nav strong{display:block;font-size:13px;font-weight:500;letter-spacing:2px}.slg-nav small{display:block;font-size:9px;margin-top:3px;color:#859f8e}.slg-nav button[aria-pressed=true]{background:#2c4b35;border-color:#a49a68;color:#f0e5b8}
.slg-drawer{position:fixed;z-index:15;top:71px;right:18px;bottom:75px;width:min(570px,calc(100vw - 36px));display:flex;flex-direction:column;background:#10231f;border:1px solid #66846a;border-radius:10px;box-shadow:-14px 8px 45px #0007;overflow:hidden}
.slg-mode[data-slg-panel=editor] .slg-drawer,.slg-mode[data-slg-panel=expedition] .slg-drawer{width:min(650px,calc(100vw - 36px))}
.slg-drawer-heading{display:flex;gap:12px;align-items:center;padding:10px 13px;min-height:49px;background:#213c2c;border-bottom:1px solid #4d6952}.slg-drawer-heading h2{font-size:14px;flex:1}.slg-close{font-size:24px;line-height:25px;padding:0 5px;background:none;border:0;color:#bacbbd}.slg-back{font-size:11px;padding:5px 8px;background:#193526;border-color:#4e6c52}
.slg-drawer-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#506d54 transparent;flex:1;padding:12px}
.slg-panel{min-width:0}.slg-panel>section,.slg-panel>details,.slg-panel>aside{margin:0 0 12px;width:100%;max-width:none}
.slg-mode .campaign-panel{position:static;max-height:none;display:flex;padding:10px;border:0;background:transparent}.slg-mode .campaign-panel>p,.slg-mode .campaign-panel .eyebrow,.slg-mode .campaign-footer small{display:none}.slg-mode .campaign-panel .panel-heading{margin-bottom:13px}.slg-mode .campaign-panel h1{font-size:16px}.slg-mode #mission-list{display:block;max-height:none;overflow:visible;min-height:0}.slg-mode .mission-item{min-width:0;max-width:none;margin-bottom:3px}.slg-mode .mission-label strong{font-size:12px}.slg-mode .mission-label small{font-size:10px}
.slg-mode .story-journal{margin-top:9px}.slg-mode .story-journal ol{max-height:none}
.slg-mode .workbench{display:block;border:0;border-radius:0;background:transparent}.slg-mode .workbench-tabs{padding:0 4px;background:none}.slg-mode .workbench-tabs>span{display:none}.slg-mode .order-heading{padding:13px 4px 6px}.slg-mode .order-heading h2{font-size:17px}.slg-mode .order-brief{font-size:12px;padding:0 4px}.slg-mode .topic-tags{padding:9px 4px}.slg-mode .goal-panel{max-height:none;overflow:visible;border:1px solid #345343;border-radius:6px;padding:12px 14px;margin:9px 0;background:#142d24;font-size:12px}.slg-mode .learning-objective{font-size:12px}
.slg-story-details,.slg-schedule,.slg-advanced,.slg-fleet{border:1px solid #345143;border-radius:6px;padding:9px 11px;margin:10px 0;color:#a8c6b3;background:#12291f}
.slg-story-details>summary,.slg-schedule>summary,.slg-advanced>summary,.slg-fleet>summary{cursor:pointer;font-size:12px;line-height:1.7}.slg-mode .mission-story{margin:10px 0 0;padding:11px;border:0;background:#1e3428}.slg-mode .schedule-panel{border:0;padding:12px 0 0}.slg-mode .guided-code{font-size:13px;line-height:2;min-height:230px;border-radius:0 0 6px 6px}.slg-mode #source-code{font-size:13px;line-height:1.8;min-height:290px;height:340px}.slg-mode .editor-heading{padding:10px;font-size:12px}.slg-mode .editor-heading small{max-width:140px}.slg-mode .editor-actions{position:sticky;bottom:-12px;z-index:3;background:#152e24;border:1px solid #45644e;border-radius:5px;padding:10px;box-shadow:0 -4px 18px #0004}.slg-mode .terminal{margin-top:10px}
.slg-mode .selection-panel,.slg-mode .robots-panel,.slg-mode .operations-panel,.slg-mode .history-panel{border-color:#345345;background:#132b22;padding:13px}.slg-mode .device-guide{margin-top:10px;padding-top:10px}.slg-mode .device-interface{background:#10271f;border-color:#345348}.slg-mode .device-mode{background:#21372b}.slg-mode .device-example{background:#0c1e19;border-color:#345344}.slg-mode .device-guide>small{display:none}.slg-mode .selection-panel>small{display:none}.slg-mode .selection-panel .coordinate-controls{margin-top:8px}.slg-facility-actions{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.slg-facility-actions button{font-size:12px}.slg-camp-note{width:100%;font-size:11px!important;margin:0!important}.slg-mode .robots-panel{border:0;background:transparent;padding:9px 0}.slg-mode .robots-panel>.section-heading{display:none}.slg-mode .robot-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.slg-mode .construction-panel{border:0;background:transparent}.slg-mode .construction-panel>summary{display:none}.slg-mode .building-catalog{padding:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.slg-mode .blueprint{min-height:96px;background:#163228;border-color:#365244;padding:10px}.slg-mode .blueprint strong{font-size:12px}.slg-mode .blueprint small{font-size:10px}.slg-mode .blueprint.selected{border-color:#b1a36f;background:#323a24}.slg-build-intro{padding:0 2px 12px;color:#bfd0bd;font-size:12px;line-height:1.8}.slg-build-actions{position:sticky;bottom:-12px;display:flex;gap:8px;padding:12px 0;background:#10231f}.slg-build-actions button{flex:1}
.construction-guide{padding:12px;margin-bottom:14px;border:1px solid #48604f;border-radius:8px;background:#152c25;line-height:1.7}.construction-guide h3{font-size:14px;margin:0 0 6px}.construction-guide p,.construction-guide small{font-size:12px;margin:6px 0}.construction-guide pre{font-size:12px;white-space:pre;overflow:auto;margin:9px 0;padding:10px;background:#0c1e18;border-radius:5px}.construction-guide [data-valid="false"]{color:#e8bc83}.construction-guide details{margin-top:8px;font-size:12px}.slg-task-card #slg-task-build{margin-left:6px}@media(max-width:600px){.slg-task-card #slg-task-build{grid-column:2;grid-row:3;margin:0}}
.slg-mode .expedition-panel{padding:0;border:0;background:transparent}.slg-mode .expedition-intro{font-size:11px}.slg-mode .expedition-panel>.section-heading{display:none}.slg-mode .expedition-layout{display:flex;flex-direction:column;gap:12px}.slg-mode .expedition-sites{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.slg-mode .expedition-site{padding:9px}.slg-mode .expedition-site strong{font-size:11px}.slg-mode .expedition-site small{display:none}.slg-mode .expedition-reward{font-size:11px}.slg-mode #expedition-source{height:310px;min-height:230px;font-size:12px}.slg-mode .expedition-fields{grid-template-columns:1fr 1fr}.slg-mode .expedition-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.slg-mode .expedition-log{max-height:210px}
.slg-map-help{position:absolute;right:17px;bottom:43px;font-size:9px;z-index:2;color:#8da995}.slg-map-help>summary{cursor:pointer;text-align:right}.slg-map-help[open]{max-width:300px;background:#11271feF;padding:9px;border:1px solid #3f614b;border-radius:5px}.slg-mode .slg-map-help .scene-description{padding:8px 0 0;font-size:10px}.slg-mode .timeline{background:#1a3428;border-top:1px solid #3b5943}.slg-mode [hidden]{display:none!important}
@media(min-width:1050px){.slg-mode[data-slg-panel] .slg-task-card{max-width:265px}.slg-mode[data-slg-panel] .slg-expedition-status{right:auto;left:18px;top:64px}}
@media(max-width:900px){.slg-mode .inventory-bar{gap:22px}.slg-mode #save-status{display:none}.slg-mode .base-title{min-width:100px}.slg-mode .connection{display:none}.slg-mode .game-layout{padding:9px 11px}.slg-drawer{right:11px;top:68px;bottom:75px;width:min(590px,calc(100vw - 22px))}.slg-mode .scene-toolbar h2{font-size:13px}.slg-task-card{width:260px;left:12px;bottom:12px}.slg-mode .scene-legend{display:none}.slg-mode .slg-map-help{display:none}}
@media(max-width:600px){.slg-mode{min-height:450px}.slg-mode .topbar{height:49px;padding:6px 12px}.slg-mode .brand{font-size:16px}.slg-mode .brand-mark{width:29px;height:29px;font-size:23px;line-height:27px}.slg-mode .game-layout{height:calc(100dvh - 49px);padding:7px;gap:7px;grid-template-rows:51px minmax(0,1fr) 50px}.slg-mode .inventory-bar{gap:0;justify-content:space-around;padding:6px;height:51px}.slg-mode .base-title{display:none}.slg-mode .inventory-bar strong{font-size:16px}.slg-mode .inventory-bar small{font-size:9px}.slg-mode .scene-toolbar{height:43px;min-height:43px;padding:6px 8px}.slg-mode .scene-toolbar h2{display:none}.slg-mode .scene-tools{margin-left:0;justify-content:space-between;width:100%}.slg-mode .scene-tools button{font-size:9px;padding:5px 8px}.slg-task-card{bottom:10px;left:10px;width:calc(100% - 20px);padding:10px 12px;display:grid;grid-template-columns:1fr auto;gap:3px 9px}.slg-task-card>small{grid-column:1}.slg-task-card h2{font-size:14px;margin:0;grid-column:1}.slg-task-card p{display:none}.slg-task-card button{grid-column:2;grid-row:1/3;align-self:center}.slg-nav{gap:6px;height:50px}.slg-nav button{padding:5px}.slg-nav strong{font-size:12px}.slg-nav small{font-size:8px}.slg-drawer,.slg-mode[data-slg-panel=editor] .slg-drawer,.slg-mode[data-slg-panel=expedition] .slg-drawer{top:55px;left:7px;right:7px;bottom:64px;width:auto;border-radius:9px}.slg-drawer-body{padding:9px}.slg-drawer-heading{padding:8px 10px;min-height:43px}.slg-mode .campaign-panel{padding:0}.slg-mode .campaign-panel>input,.slg-mode .campaign-panel>select{margin-bottom:8px}.slg-mode .campaign-footer{display:block}.slg-mode .workbench .goal-panel{padding:10px 11px}.slg-mode .workbench-tabs{gap:17px}.slg-mode .order-heading h2{font-size:15px}.slg-mode .order-heading a{font-size:10px}.slg-mode .editor-heading small{display:none}.slg-mode .editor-actions{bottom:-9px;flex-wrap:wrap}.slg-mode .guided-code{font-size:11px;padding:14px 5px}.slg-mode .line-number{width:22px}.slg-mode #source-code{font-size:12px;height:300px}.slg-mode .blueprint{min-height:88px}.slg-mode .blueprint small:last-child{display:none}.slg-mode .expedition-live-chip{display:none}.slg-expedition-status{top:53px;right:10px;left:10px;max-width:none;font-size:10px}.slg-placement{top:53px;font-size:11px;width:calc(100% - 20px);max-width:none;justify-content:space-between}.slg-mode .scene-empty{padding:18px}.slg-mode .scene-empty h3{font-size:17px}.slg-mode .scene-empty p{font-size:11px}}

.slg-task-help>summary{font-weight:600;color:#c9ddbd}.slg-expedition-options,.slg-expedition-code{border:1px solid #365444;border-radius:6px;padding:11px;background:#142c22}.slg-expedition-options>summary,.slg-expedition-code>summary{font-size:12px;color:#c5d7bd;cursor:pointer}.slg-expedition-options[open]>.expedition-fields{margin-top:12px}.slg-expedition-code .expedition-code-panel{margin-top:12px}.slg-mode .toast{z-index:25}

.slg-mode .game-layout>#inventory{grid-column:1;grid-row:1}.slg-mode .game-layout>#slg-stage{grid-column:1;grid-row:2}.slg-mode .game-layout>#slg-nav{grid-column:1;grid-row:3}
.slg-has-replay .slg-task-card{bottom:65px}.slg-has-replay .slg-map-help{bottom:90px}
.slg-mode .slg-guided-intro .guided-code{min-height:190px;padding-top:10px;padding-bottom:10px;line-height:1.65}
.course-track-summary{font-size:11px;color:#a5bdad;line-height:1.7;margin:7px 0 10px}.mission-track-heading{font-size:12px;color:#d6c58d;margin:17px 0 8px;font-weight:500}.mission-track-heading small{display:block;font-size:10px;color:#99b3a1;font-weight:400;margin-top:4px}.mission-reward,.challenge-rewards{font-size:11px;line-height:1.8;color:#dccb99;background:#253426;border:1px solid #576348;border-radius:5px;padding:9px 11px;margin:8px 0 12px}.challenge-rewards p{margin:0 0 7px}.challenge-rewards button{font-size:11px}.slg-mode .campaign-panel>.course-track-summary{display:block}.slg-mode .mission-reward{padding:8px 10px}.slg-mode .campaign-panel .panel-heading{gap:10px}.slg-mode #progress-count{white-space:nowrap;font-size:11px}
.restart-panel{border:1px solid #654b43;border-radius:7px;background:#251f1c;overflow:hidden}.restart-panel>summary{padding:13px;cursor:pointer;font-size:12px;color:#dfc5b7}.restart-panel>summary span{display:block;padding-top:5px;font-size:10px;color:#a69a8e}.restart-panel>div{padding:0 13px 14px}.restart-panel p{font-size:11px;line-height:1.8;color:#c2b8ae;margin-bottom:12px}.danger-button{border-color:#946e5c;background:#4a3028;color:#f2d4c4}.danger-button:hover:not(:disabled){background:#634031;border-color:#c39172}#restart-dialog{max-width:470px;background:#152a24}#restart-dialog h2{font-size:18px}.restart-scope{margin:12px 0;padding-left:20px;color:#c8c3b5;font-size:11px;line-height:1.9}.restart-kept{color:#e1bf8d}#restart-summary{margin-top:10px;color:#a7c3ae}#restart-message{margin-top:12px;color:#e1bf8d}.restart-actions{display:flex;gap:9px;margin-top:18px;flex-wrap:wrap}.restart-actions button{flex:1;font-size:12px;min-width:145px}#restart-dialog input:focus{outline:2px solid #c29775;outline-offset:2px}@media(max-width:600px){#restart-dialog{padding:18px;max-height:calc(100dvh - 30px);overflow-y:auto}.restart-actions button{min-width:110px}}
.work-queue-panel{margin:14px 0;border:1px solid #52704d;border-radius:7px;background:#162e23;padding:12px}.work-queue-panel>.section-heading h3{font-size:13px}.work-queue-panel>.section-heading>span{font-size:10px;color:#a8c5ae}.work-operation{padding:12px 0;border-bottom:1px solid #35523d}.work-operation:last-child{border-bottom:0}.work-operation-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.work-operation-heading strong{font-size:12px;color:#dce5c6}.work-countdown{font-size:11px;color:#e2c98e;white-space:nowrap;font-variant-numeric:tabular-nums}.work-progress{width:100%;height:7px;margin:9px 0 0;accent-color:#94c89d}.work-stage{font-size:11px;color:#a8c4b0;line-height:1.7;margin:7px 0}.work-benefit{font-size:12px;margin:3px 0 5px}.work-benefit-note{display:block;color:#d8c696;font-size:10px;line-height:1.7}.work-details{margin-top:9px;color:#aac1ae;font-size:11px}.work-details summary{cursor:pointer}.work-details ol{padding-left:22px;margin:7px 0}.work-details li{padding:3px 0}.work-recent-list{margin:10px 0 0;padding:0;list-style:none;font-size:10px;color:#99b5a2;line-height:1.8}#work-message{color:#dfc789;font-size:11px;line-height:1.7;margin-top:9px}.work-queue-summary{position:absolute;right:18px;top:69px;z-index:2;max-width:370px;text-align:left;font-size:11px;padding:9px 12px;background:#263b26ee;border-color:#65734d;color:#dddfaf;box-shadow:0 2px 12px #0004}.slg-expedition-status:not([hidden])~.work-queue-summary{top:110px}@media(min-width:1050px){.slg-mode[data-slg-panel] .work-queue-summary{right:auto;left:18px;max-width:320px;top:102px}}@media(max-width:600px){.work-queue-summary{top:53px;left:10px;right:10px;max-width:none;font-size:10px}.work-operation-heading{align-items:flex-start;flex-direction:column;gap:4px}}

.work-manage-panel{margin:0 0 14px;background:#122b2c;border-color:#426764}.work-manage-panel>.section-heading{align-items:flex-start}.work-manage-panel h2{font-size:15px}.work-manage-panel .section-heading>span{text-align:right;line-height:1.7;color:#b6cdbd}.work-manage-intro{font-size:11px;line-height:1.8;color:#a2beb9;margin:9px 0 3px}.work-operation-meta{font-size:10px;line-height:1.7;margin:5px 0 0;color:#8eaea6}.work-managed-history{margin-top:12px;border-top:1px solid #35534b;padding-top:10px;font-size:11px;color:#a8c6b8}.work-managed-history summary{cursor:pointer}.work-message,#work-manage-message{color:#dfc789;font-size:11px;line-height:1.7;margin-top:9px}.work-manage-activities{border-top:1px solid #42615a;margin-top:8px}.work-activity .work-benefit-note{color:#96b7bc}.work-manage-panel .work-stage{white-space:normal}
.program-entity-panel{padding:12px;border:1px solid #344c4a;border-radius:10px;background:#13231f;margin:12px 0}
.program-entity-choice{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.program-entity-choice label{font-size:12px;color:#aec4b9}
.program-entity-choice select{flex:1;min-width:180px;max-width:100%;padding:8px;border:1px solid #425c52;border-radius:6px;background:#172e25;color:#edf4ec}
.program-entity-choice button{white-space:nowrap}
#entity-program-state{font-size:12px;color:#b7c8bb;margin:9px 0 0;line-height:1.65}
#entity-program-guide{margin-top:10px;font-size:12px;line-height:1.65}
#entity-program-guide summary{cursor:pointer;color:#c7dfd3}
#entity-program-methods{padding-left:18px;margin:10px 0}
#entity-program-methods li{padding:4px 0}
#entity-program-methods code{display:block;overflow-wrap:anywhere;color:#a5d9f0}
#entity-program-methods span{color:#b6c5be}
#entity-program-guide-note{color:#b6c5be}
.lesson-program-panel{border-left:3px solid #8bb99d;background:#142c25;padding:10px 12px;margin:10px 0 12px;border-radius:5px;font-size:11px;line-height:1.7;color:#b4cdbc}
.editor-actions .tutorial-benefit-button{border-color:#9c8956;color:#ead598;background:#3a3622}.editor-actions .tutorial-benefit-button:disabled{color:#c3b58b;opacity:.7}.tutorial-benefit-note{flex-basis:100%;color:#c6b788;font-size:10px;line-height:1.7}
.lesson-program-heading{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#d5e6d3}.lesson-program-heading code{color:#a6d8e4;overflow-wrap:anywhere}.lesson-program-panel p{margin:6px 0}.lesson-program-panel ul{display:flex;gap:5px 14px;flex-wrap:wrap;list-style:none;padding:0;margin:5px 0}.lesson-program-panel summary{cursor:pointer;color:#b6d2bf}.lesson-program-panel details p{color:#a2bca9}
