/* Optical workshop: original low-resolution equipment, one normalized table. */
#expeditionDialog[data-mode=tweezer]{width:min(1360px,calc(100vw - 48px))}
#expeditionDialog .tw-root{position:relative;background:#e8b982;color:#432711;font-size:16px;padding:12px;line-height:1.6}
#expeditionDialog .tw-root button{font-size:14px;min-height:44px;padding:8px;touch-action:manipulation}
.tw-guide{display:flex;gap:12px;align-items:center;background:#f4d8a8;border:3px solid #8c5230;padding:10px}.tw-guide span{flex:1}.tw-objective{padding:8px 0;font-size:14px}.tw-sprite{width:80px;height:80px;image-rendering:pixelated;display:block;flex-shrink:0}
.tw-room{height:auto;aspect-ratio:16/9;min-height:420px;position:relative;background:url('../../assets/art/ops-neutral.png') center/cover,#34504e;border:4px solid #6b3e22;overflow:hidden}
#expeditionDialog .tw-hotspot{position:absolute;transform:translate(-50%,-50%);padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;min-width:64px}
.tw-hotspot canvas{margin:auto;background:#4a3527;border:3px solid #ceac6c;transition:transform .2s steps(2)}.tw-hotspot.opened canvas{opacity:.55;transform:translateY(-4px)}.tw-hotspot span{display:block;background:#704528;color:#ffe0a3;padding:2px 4px;font-size:12px}.tw-hotspot:hover canvas,.tw-hotspot:focus canvas{outline:3px solid #ffe18a;transform:translateY(-4px)}
.tw-room-caption{position:absolute;top:10px;left:10px;padding:6px 12px;background:#efca92;border:3px solid #87542c;z-index:1}.tw-room-caption small{font-size:12px}.tw-room-status{position:absolute;bottom:5px;right:8px;background:#eed2a6;padding:4px;font-size:12px}
#expeditionDialog .tw-blueprint{position:absolute;left:75%;top:3%;background:#f4d8a8!important;color:#432711!important}
#expeditionDialog .tw-bench-entry{position:absolute;left:50%;top:55%;transform:translate(-50%,-50%);width:180px;background:#385f59!important;color:#ffdf9d!important;border:4px solid #d4a861!important}.tw-bench-entry canvas{margin:auto}
.tw-phases,.tw-status,.tw-actions{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0;align-items:center}.tw-phases span,.tw-status span{background:#3d5550;color:#ffe4ac;padding:4px 8px;font-size:14px;border:2px solid #b0884d}.tw-modules{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.tw-modules button{display:flex;flex-direction:column;align-items:center;min-width:0;gap:6px}.tw-modules .part-art{width:min(100%,180px);height:auto;aspect-ratio:1 / 1;flex:0 0 auto;margin:0 auto}.tw-modules small{font-size:12px}
.tw-bench-scroll{overflow:auto;width:calc(100% - 275px);border:4px solid #75401f;background:#213c3b;animation:tw-zoom .3s steps(3)}.tw-table{position:relative;width:100%;min-width:720px;aspect-ratio:1000/560;isolation:isolate}.tw-table-art,.tw-cables{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}.tw-cables{overflow:visible;pointer-events:none;z-index:2}.tw-wire{fill:none;stroke-width:5;pointer-events:stroke;cursor:pointer;stroke-linejoin:miter}.tw-wire.power{stroke:#e9b657}.tw-wire.data{stroke:#79d99a}.tw-wire:hover,.tw-wire:focus{stroke:#fff4c1;stroke-width:8}.tw-optical line{stroke:#62e9eb;stroke-width:4}.tw-optical .fluorescence{stroke:#c399ff;fill:none;stroke-width:3;stroke-dasharray:8 6}#twWirePreview{fill:none;stroke:#fff2ae;stroke-width:4;stroke-dasharray:8 6}
#expeditionDialog .tw-device{position:absolute;transform:translate(-50%,-50%);background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;width:10%;min-height:44px;color:#ffdfa6!important;z-index:3}
.tw-device canvas{width:100%;height:auto;aspect-ratio:1}.tw-device>span{position:absolute;left:50%;transform:translateX(-50%);top:90%;font-size:12px;white-space:nowrap;background:#293f3d;padding:0 3px}.tw-mount{display:block;width:50px;height:36px;margin:auto;border:3px dashed #9baf9b;background:#263d3a}.tw-device.empty>span{top:100%}.tw-device.installed{animation:tw-install .2s steps(3)}
#expeditionDialog .tw-chassis-slot{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:30%;height:28%;background:#486762!important;border:4px dashed #dfc996!important;z-index:3;color:#f4ddb3!important}
#expeditionDialog .tw-port{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;padding:14px!important;background:transparent!important;border:0!important;box-shadow:none!important;z-index:5;touch-action:none}.tw-port i{display:block;width:12px;height:12px;background:#7d5f3c;border:3px solid #edc26e;box-shadow:2px 2px #192e2c!important}.tw-port.data i{border-color:#7ed7a5;background:#305e50}.tw-port.connected i{background:#fff4c1}.tw-port:hover i,.tw-port.selected i,.tw-port:focus-visible i{outline:3px solid #fff}.tw-led{position:absolute;top:35%;right:25%;width:4px;height:4px;background:#b9e460}
#expeditionDialog .tw-power-switch{position:absolute;transform:translate(-50%,-50%);z-index:6;min-height:28px;padding:0 6px;background:#866041!important;color:#fff4cd!important}.tw-power-switch.on{outline:3px solid #a6df7f}
.tw-chamber{position:absolute;left:84.8%;top:29%;width:7%;height:13%;z-index:4}.tw-traps{display:grid;width:100%;height:100%;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px}.tw-traps i{display:block;border:1px solid #4a6871;background:#193b4b;min-width:0;min-height:3px}.tw-traps .lit{border:2px solid #3fa4be;background:#2c6070}.tw-traps.defocused .lit{box-shadow:0 0 0 2px #588e8e!important;opacity:.6}.tw-traps.focused .lit{border-color:#80e5e9}.tw-traps .occupied{background:#fff4a6;border-color:#d5ffed;box-shadow:0 0 0 2px #78d4cf!important}.tw-traps.no-signal{opacity:.12}.tw-camera-screen{position:absolute;left:58%;top:3%;width:9%;height:15%;border:4px solid #cba164;background:#182c38;z-index:4}.tw-camera-screen small{position:absolute;left:0;right:0;top:28%;text-align:center;color:#f6cf9d;font-size:12px}.tw-chamber-label{position:absolute;left:79%;top:49%;color:#f5e0af;font-size:14px;text-align:center}.tw-chamber-label small{font-size:10px}.tw-preview-label{position:absolute;right:5%;bottom:6%;font-size:12px;color:#f5e0af}.tw-progress-lamps{position:absolute;left:45%;bottom:5%;display:flex;gap:10px}.tw-progress-lamps i{width:8px;height:8px;background:#263a32;border:2px solid #ba955f}.tw-progress-lamps .on{background:#99e550}
.tw-inventory{display:flex;gap:10px;overflow-x:auto;padding:8px 4px 14px;background:#ba814f}.tw-inventory button{min-width:112px;max-width:112px;flex-shrink:0;touch-action:none!important;user-select:none}.tw-inventory canvas{width:64px;height:64px;margin:auto}.tw-inventory b,.tw-inventory small{display:block;font-size:12px}.tw-inventory .unknown canvas{filter:grayscale(1)!important;opacity:.25}.tw-inventory .installed{opacity:.65}#expeditionDialog .tw-inventory .selected{outline:3px solid #fff7c6}.tw-tools{position:absolute;top:120px;right:12px;width:254px;z-index:10}.tw-tool{border:4px solid #8b552d;background:#f4d5a0;padding:12px;max-height:440px;overflow:auto;font-size:14px}.tw-tool p{font-size:14px!important;color:#432711!important;line-height:1.6}.tw-tool h3{font-size:18px;margin:0 0 8px}.tw-tool>button:first-child{float:right}.tw-tool input{width:100%;min-height:44px}.tw-matrix{display:grid;grid-template-columns:repeat(3,44px);gap:5px;justify-content:center;margin:10px 0}.tw-matrix i,.tw-matrix button{width:44px;height:44px;background:#314d50!important;border:3px solid #967b4f!important}.tw-matrix .on{background:#6cd9db!important;box-shadow:inset 4px 4px #d6f8ed!important}.tw-matrix.reference{grid-template-columns:repeat(3,20px);gap:3px}.tw-matrix.reference i{width:20px;height:20px}
#expeditionDialog .tw-root button[aria-disabled=true]{opacity:.6}.tw-success{background:#cbe6ac;border:4px solid #63804c;padding:12px;color:#254428}.tw-drag{position:fixed;pointer-events:none;transform:translate(-50%,-50%);z-index:9999;filter:drop-shadow(4px 4px #25221b)!important}.tw-drag canvas{width:96px;height:96px}#expeditionDialog .tw-near{outline:4px dashed #99e550}.tw-error .tw-guide{animation:tw-shake .3s steps(4)}.tw-pickup{position:absolute;left:45%;top:180px;display:flex;align-items:center;background:#ffdda4;border:3px solid #b67f42;z-index:30;pointer-events:none;animation:tw-pickup .6s steps(4) both}.tw-pickup canvas{width:48px;height:48px}
@keyframes tw-pickup{from{transform:translateY(-20px);opacity:0}30%{opacity:1}to{transform:translateY(90px);opacity:0}}@keyframes tw-install{from{scale:1.12}to{scale:1}}@keyframes tw-shake{25%,75%{translate:-4px 0}50%{translate:4px 0}}@keyframes tw-zoom{from{opacity:.3;scale:.97}to{opacity:1;scale:1}}
@media(max-width:1000px){.tw-bench-scroll{width:100%}.tw-tools{position:sticky;top:auto;bottom:0;right:auto;width:100%}.tw-tool{max-height:250px}.tw-modules{grid-template-columns:repeat(2,1fr)}.tw-room{min-width:0;min-height:460px}.tw-room .tw-sprite{width:48px;height:48px}.tw-room-caption{font-size:12px}.tw-hotspot span{max-width:78px}.tw-bench-entry{max-width:130px}.tw-guide{flex-wrap:wrap}.tw-tool .tw-matrix{float:right;margin:0 12px}.tw-chamber-label{font-size:12px}}
@media(prefers-reduced-motion:reduce){.tw-root *{animation:none!important;transition:none!important}}.reduced .tw-root *{animation:none!important;transition:none!important}

.tw-traps.loading .occupied{position:relative}.tw-traps.loading .occupied:after{content:'';position:absolute;width:4px;height:4px;background:#fff0a1;left:30%;top:30%;animation:tw-atom-load .25s steps(4) both}@keyframes tw-atom-load{from{transform:translateY(80px);opacity:0}30%{opacity:1}to{transform:translateY(0);opacity:1}}
.tw-hotspot.opened:before{content:'';position:absolute;top:-5px;left:10%;width:80%;height:8px;background:#c69b5b;border:2px solid #5d3c23;transform:translateY(-4px)}
#expeditionDialog[data-mode=tweezer] #expeditionBody{padding:0}.tw-room-scroll{max-width:100%;overflow:auto}.tw-room{width:100%;height:auto;min-height:0;aspect-ratio:16/9}.tw-guide span{min-width:180px}.tw-pan-help{font-size:12px!important;color:#684024!important;margin:4px 0 8px}.tw-root{min-width:0}.tw-root *{box-sizing:border-box}
@media(max-width:700px){.tw-room{width:640px;min-width:640px;min-height:0;height:420px;aspect-ratio:auto}.tw-root .tw-guide{gap:8px}.tw-tools{top:auto}.tw-modules{grid-template-columns:repeat(2,minmax(0,1fr))}.tw-modules b{font-size:14px}.tw-root .tw-guide span{flex-basis:180px}}

/* Assembly feedback stays on the selected socket, not every installed device. */
.tw-device.installed{animation:none}
#expeditionDialog .tw-target{outline:3px solid #ffd84d;outline-offset:4px;animation:tw-target-pulse .8s steps(2,end) infinite}
#expeditionDialog .tw-land{animation:tw-seat .24s steps(3,end)}
.tw-dust{position:absolute;left:50%;top:75%;width:4px;height:4px;background:#b7b4a5;pointer-events:none;z-index:9;animation:tw-seat-dust .34s steps(3,end) both}
.tw-status .tw-badge{border:2px solid #382215;border-top:3px solid #b18b65;border-bottom:4px solid #342016;box-shadow:2px 2px 0 #5b331e;background:#594333;color:#ddd6cd;font-size:14px;padding:5px 10px;line-height:1.6}
.tw-status .pending{background:#e5b653;color:#4a2511;border-top-color:#ffe59b;border-bottom-color:#99672c}
.tw-status .done{background:#528f36;color:#fff;border-top-color:#a2cf77;border-bottom-color:#315e2c}
.tw-inventory{margin-bottom:14px}
.tw-tools + .tw-actions{margin-top:14px;padding-top:10px;border-top:3px solid #bb8249;gap:12px}
#expeditionDialog .tw-root [data-action=start][aria-disabled=false]{background:#5ab552!important;color:#fff!important;animation:tw-ready 1s steps(2,end) infinite;outline:2px solid #cce892;outline-offset:2px}
#expeditionDialog .tw-root .tw-hint{margin-left:auto;position:relative;background:#e8b84e!important;color:#4a2511!important;border:2px solid #634019!important;border-top:4px solid #ffe391!important;border-bottom:4px solid #9d6729!important;white-space:nowrap;overflow:visible}
.tw-hint i{display:inline-block;font-style:normal;filter:grayscale(.65);image-rendering:pixelated}
.tw-hint-due i{filter:none;animation:tw-bulb .8s steps(2,end) infinite}
.tw-hint-due:after{content:'';position:absolute;left:8px;top:2px;width:3px;height:3px;background:#fff3a3;box-shadow:16px -7px 0 #ffd84d,-6px 10px 0 #fff3a3,28px 8px 0 #ffd84d;pointer-events:none;animation:tw-bulb .8s steps(2,end) infinite}
@keyframes tw-target-pulse{50%{outline-color:#fff4ac;box-shadow:0 0 0 6px #9b742e!important}}
@keyframes tw-seat{0%{translate:0 -6px}65%{translate:0 2px}100%{translate:0 0}}
@keyframes tw-seat-dust{from{transform:translate(0,0);opacity:1}to{transform:translate(var(--dx),var(--dy));opacity:0}}
@keyframes tw-ready{50%{translate:0 -2px;outline-color:#fff2a4}}
@keyframes tw-bulb{50%{translate:0 -2px;opacity:.6}}
@media(prefers-reduced-motion:reduce){.tw-root .tw-dust{display:none}}
.reduced .tw-root .tw-dust{display:none}
.tw-target:after{content:'';position:absolute;inset:-6px;border:2px solid #fff2a4;box-shadow:0 0 0 3px #b48832;pointer-events:none;animation:tw-target-halo .8s steps(2,end) infinite}
@keyframes tw-target-halo{50%{opacity:.35}}
/* Capture epilogue: local boot vignette, no chapter jump or completion awards. */
#expeditionDialog .tw-boot{width:min(740px,calc(100vw - 44px));max-height:90dvh;overflow:auto;padding:20px;background:#edc38d;color:#452814;border:4px solid #341c10;border-radius:0;box-shadow:0 0 0 4px #d79550,0 0 0 8px #764323;font-family:'Fusion Pixel',monospace}
.tw-boot::backdrop{background:#171622cc;backdrop-filter:none}
.tw-boot h2{font-size:22px;color:#452814;text-shadow:none;margin:8px 0 16px}.tw-boot small{font-size:12px;letter-spacing:1px}
.tw-boot-scene{height:280px;position:relative;overflow:hidden;background:#1d2930 url('../../assets/art/ops-neutral.png') center/cover;border:4px solid #634124;box-shadow:inset 0 0 0 4px #1d2930}
.tw-boot-array{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);display:grid;grid-template-columns:repeat(3,36px);gap:10px;background:#172c36;padding:18px;border:6px double #d4aa65;box-shadow:4px 4px 0 #172027}
.tw-boot-array i{width:36px;height:36px;background:#1b3444;border:2px solid #45606c;position:relative}.tw-boot-array .trap{border-color:#65d7df;background:#256076;animation:tw-boot-glint 1s steps(2,end) infinite}
.tw-boot-array .atom:after{content:'';position:absolute;inset:10px;background:#fff4a6;box-shadow:0 0 0 3px #8bcfce;opacity:0}
.tw-boot:not([data-phase="0"]) .atom:after{opacity:1;animation:tw-boot-arrive .4s steps(4,end)}
.tw-boot-beam{position:absolute;left:0;top:39%;width:50%;height:4px;background:#7fe9db;box-shadow:0 4px 0 #297b83;animation:tw-boot-beam 1.1s steps(6,end) both}
.tw-boot-console{position:absolute;bottom:44px;left:50%;transform:translateX(-50%);display:flex;gap:12px;padding:10px;background:#252a31;border:3px solid #c6a15e}.tw-boot-console i{width:12px;height:8px;background:#495b59}
.tw-boot[data-phase="2"] .tw-boot-console i,.tw-boot[data-phase="3"] .tw-boot-console i{background:#a5e478;animation:tw-boot-glint .8s steps(2,end) infinite}
.tw-boot-caption{position:absolute;bottom:8px;left:0;right:0;text-align:center;color:#ffe2a1;background:#24383b;font-size:14px}
.tw-boot .tw-boot-line{color:#452814!important;font-size:17px!important;min-height:50px}.tw-boot-stages{display:flex;gap:8px;flex-wrap:wrap}.tw-boot-stages span{padding:4px 12px;background:#635040;color:#e0d5c3;border:2px solid #382213}.tw-boot-stages .done{background:#568d3e;color:white;border-top-color:#a6ce78}
.tw-boot .tw-boot-note{font-size:13px!important;line-height:1.7;color:#684528!important}
@keyframes tw-boot-beam{from{scale:0 1;transform-origin:left}to{scale:1 1;transform-origin:left}}
@keyframes tw-boot-glint{50%{filter:brightness(1.25)}}
@keyframes tw-boot-arrive{from{translate:0 -16px;opacity:0}to{translate:0 0;opacity:1}}
@media(max-width:600px){#expeditionDialog .tw-boot{padding:12px}.tw-boot h2{font-size:18px}.tw-boot-scene{height:250px}}
