/* v5: components read as physical machines, with the same sockets and HP language. */
.machined .battle{padding:22px 22px 16px;background:#e4e5ce;border:1px solid #a7b293;border-radius:12px;position:relative;isolation:isolate;box-shadow:inset 0 0 0 5px #edf0dc66}.machined .battle:before{content:'';position:absolute;inset:9px;z-index:-1;border:1px solid #bac3a077;border-radius:5px;background:radial-gradient(#82977640 .75px,transparent .75px);background-size:16px 16px;pointer-events:none}.machined .enemy-heading{padding:0 3px}.machined .arena{background:radial-gradient(ellipse at 50% 50%,#fff8d05c,transparent 68%)}.machined .arena:before{display:none}.machined .enemy svg{filter:drop-shadow(0 7px 3px #183b3315)}.machined .enemy-slots .slot{background:#f4eedc;border-color:#9eac8a;box-shadow:0 4px 0 #8d9f7e35}.machined .slot header{letter-spacing:1.5px}.machined .slot-line{border-radius:5px}.machined .enemy-plan{background:#d3dbc0;border-color:#a6b393}.machined .subsystems{margin:27px auto 17px;gap:22px;position:relative;max-width:810px}.machined .subsystem{--component:#2b8073;width:360px;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(100px,.9fr);grid-template-areas:'title title' 'machine socket' 'health health';gap:7px 12px;padding:13px 16px 14px;background:#f2efdc;border:1px solid #97ab8c;border-bottom:4px solid #9baa8d;border-radius:12px;box-shadow:0 7px 12px #193f3010;isolation:isolate}.machined .subsystem.boost{--component:#b85232}.machined .subsystem:before{top:-29px;height:27px;width:5px;background:linear-gradient(90deg,#9e9665 0 1px,#c7b481 1px 4px,#8d8e60 4px);border-radius:0}.machined .subsystem:after{content:'';position:absolute;width:9px;height:9px;background:#d0b579;border:2px solid #647c59;border-radius:50%;top:-5px;left:calc(50% - 4px)}.machined .subsystem header{grid-area:title;gap:6px;font-size:10px;letter-spacing:1px}.machined .sub-name{color:var(--ink)}.component-state{font:9px ui-monospace,monospace;color:var(--component);letter-spacing:1px}.component-stage{grid-area:machine;position:relative;min-width:0;display:flex;align-items:center;justify-content:center;min-height:132px}.component-art{width:100%;max-width:220px;line-height:0;transform-origin:50% 85%;filter:drop-shadow(0 3px 1px #2c463b10)}.component-art svg{display:block;width:100%;height:auto}.effect-badge{position:absolute;bottom:0;right:0;color:var(--component);background:#faf5e5;border:1px solid #a3b797;border-radius:4px;padding:3px 7px;font:700 12px ui-monospace,monospace}.component-socket{grid-area:socket;align-self:center;position:relative;min-width:0}.component-socket:before{content:'';position:absolute;left:-12px;top:50%;height:3px;width:12px;background:#b59e70}.machined .component-socket .slot-line{background:#dfe3cf;border:1px solid #acb798;padding:9px 6px;display:flex;gap:4px;flex-wrap:wrap;align-items:center;justify-content:center}.machined .component-socket .line-label{display:none}.machined .component-socket .line-value{min-height:12px;width:100%;text-align:center;font-size:10px}.component-health{grid-area:health;display:flex;gap:10px;align-items:center;margin-top:6px}.machined .sub-track{height:9px;flex:1;min-width:0;background:#d5dac3}.machined .sub-fill{background:var(--orange)}.machined .sub-hp{font:600 11px ui-monospace,monospace;white-space:nowrap}.component-burst{position:absolute;left:60%;top:15px;font:800 28px 'Avenir Next',sans-serif;color:#b83422;opacity:0;z-index:3}.machined .subsystem.destroyed,.machined .subsystem.offline{background:#d4d8c8;border-color:#9faa92;border-style:solid}.machined .subsystem.offline .sub-name,.machined .subsystem.destroyed .sub-name{color:#536451;text-decoration:none}.machined .subsystem.offline .sub-hp{color:#536451}.subsystem.offline .component-art,.subsystem.destroyed .component-art,.subsystem.pending-down .component-art{filter:grayscale(1);opacity:.4;transform:translateY(4px) rotate(-5deg)}.subsystem.offline .effect-badge,.subsystem.destroyed .effect-badge{color:#65745d;background:#dce0d0}.machined .subsystem.offline:before{background:repeating-linear-gradient(#9f9674 0 4px,transparent 4px 9px)}.severed-port{display:flex;align-items:center;justify-content:center;height:63px;border:2px dashed #9da98f;border-radius:7px;color:#75876b;font:24px monospace}.machined .rig{border-radius:12px;box-shadow:inset 0 0 0 1px #9eae7560,0 5px 0 #183b33}.machined .player-core{box-shadow:0 0 0 4px #17372e,0 0 0 5px #729265;border-radius:8px}.machined .player-core svg{filter:drop-shadow(0 0 5px #c8e3a025)}.machined .hand{background:#173e34;border:1px solid #54765a;box-shadow:inset 0 3px 6px #102b2950,0 4px 0 #1f382e}.component-signal{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:9000;color:#7bdfb6;filter:drop-shadow(0 0 5px #52ca9c)}.component-signal.shot{color:#ffac63;filter:drop-shadow(0 0 5px #f69c46)}.component-hit .component-art{animation:component-recoil .65s ease-out}.component-hit .component-burst{animation:damage .65s ease-out}.component-repairing .pump-rotor{transform-box:fill-box;transform-origin:center;animation:pump-turn .5s linear infinite}.component-repairing .coolant{animation:coolant-glow .65s ease-in-out}.component-repairing .effect-badge{box-shadow:0 0 16px #64d8ac}.component-firing .turret-head{transform-box:fill-box;transform-origin:center;animation:turret-recoil .7s ease-out}.component-firing .target-eye{fill:#fff3a2;filter:drop-shadow(0 0 5px #ffdf6d)}.host-repairing .enemy{filter:drop-shadow(0 0 12px #78c9a4)}@keyframes component-recoil{25%{transform:translateX(7px) rotate(6deg)}60%{transform:translateX(-3px) rotate(-3deg)}100%{transform:none}}@keyframes pump-turn{to{rotate:360deg}}@keyframes coolant-glow{50%{fill:#d8ffe1}}@keyframes turret-recoil{25%{transform:translate(-9px,2px) rotate(-4deg)}65%{transform:translate(2px,-1px)}100%{transform:none}}
@media(max-width:900px){.machined .battle{padding:16px 12px 12px}.machined .enemy-slots .slot{width:190px}.machined .subsystems{gap:13px}.machined .subsystem{width:calc(50% - 7px);min-width:0;grid-template-columns:1fr;grid-template-areas:'title' 'machine' 'socket' 'health';padding:11px}.machined .subsystem:only-child{width:320px;grid-template-columns:1.4fr 1fr;grid-template-areas:'title title' 'machine socket' 'health health'}.component-stage{min-height:110px}.component-art{max-width:170px}.component-socket:before{display:none}.machined .component-socket .line-value{width:auto;min-height:0}}
@media(max-width:700px){.machined .enemy-slots .slot{width:auto}.machined .subsystems{display:flex;flex-wrap:wrap}.machined .subsystem{width:calc(50% - 7px)}.machined .subsystem:only-child{width:100%;max-width:340px}.machined .component-stage{min-height:105px}.machined .subsystem header{font-size:9px;letter-spacing:.3px}.machined .sub-name{max-width:100%}}
@media(max-width:580px){.machined .battle{padding:12px 9px;border-radius:10px}.machined .gameboard{padding:15px 10px;gap:18px}.machined .enemy-slots{gap:7px}.machined .slot{padding:6px 4px}.machined .subsystem{padding:9px 7px;gap:6px}.machined .subsystems{gap:10px;margin-top:24px}.machined .subsystem{width:calc(50% - 5px)}.machined .component-socket .slot-line{padding:6px 3px;gap:3px}.machined .component-stage{min-height:93px}.effect-badge{font-size:10px;padding:3px 5px}.machined .sub-hp{font-size:9px}.component-health{gap:5px}.machined .subsystem header{align-items:flex-start}.component-state{font-size:8px}.machined .subsystem .port-hole{width:36px;height:36px}.machined .subsystem .port-hole.mod{width:29px;height:29px}.machined .enemy-plan{padding:9px}.machined .hp-value{font-size:10px}.machined .repair-tag{font-size:11px}}
@media(max-width:360px){.machined .slot .port-hole{width:32px;height:34px}.machined .slot .port-hole.mod{width:26px;height:28px}.machined .slot .enemy-chip{width:29px;height:30px}.machined .slot .enemy-chip.modifier{width:25px;height:26px}.machined .slot-line{gap:3px;padding:3px}.machined .slot-result{font-size:15px}.machined .component-stage{min-height:78px}}
@media(prefers-reduced-motion:reduce){.machined *{animation:none!important;transition:none!important}.component-signal{display:none}}
