/* ---------- REFURBISHED: the unit ---------- */
#bomb.refurb .face-metal { background:
  radial-gradient(ellipse at 18% 82%, rgba(140,70,30,.55), transparent 32%),
  radial-gradient(ellipse at 88% 12%, rgba(120,60,25,.5), transparent 26%),
  radial-gradient(ellipse at 60% 96%, rgba(110,55,20,.45), transparent 30%),
  repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 2px, transparent 2px 5px),
  linear-gradient(160deg, #5a5e60 0%, #3d4144 45%, #2a2c2e 100%); }
#bomb.refurb .face.side { border-radius: 8px; }
#bomb.refurb .slot .plate { background: linear-gradient(#c9b9a0, #8d7a5f); color: #2a1d10; transform: translateX(-50%) rotate(-1.2deg); font-size: 15px; }
#bomb.refurb .face.side[data-face="2"] .slot:first-child .plate { transform: translateX(-50%) rotate(2deg); }
#bomb.refurb .mod-well { background: #2a2b2c; }
#bomb.refurb .face.side::after { content: 'SOLD AS-IS'; position: absolute; right: 18px; bottom: 6px; font: 800 12px var(--mono); letter-spacing: 3px; color: rgba(255,200,150,.35); }

.rust-label { font: 800 13px var(--mono); fill: #b5652d; text-anchor: middle; }
.rust-note { font: 700 13px var(--mono); fill: #c9b39a; text-anchor: middle; letter-spacing: 2px; }
.stencil { font: 800 26px 'Future'; fill: rgba(255,255,255,.12); text-anchor: middle; letter-spacing: 4px; }
.post.rusty { fill: #3b2a1f; stroke: #7a4a2a; }

/* chess */
.rchess-mod { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.rchess-svg { width: 330px; height: 330px; }
.qc-sticker.big { text-align: center; line-height: 1.2; font-size: 12px; }
.qc-sticker small { display: block; font-weight: 600; font-size: 10px; color: #7a1410; opacity: .8; }
.eval-lamp { font: 800 11px var(--sans); letter-spacing: 2px; padding: 3px 10px; border-radius: 4px; background: #222; color: #555; }
.eval-lamp.on { background: #22c55e; color: #052; box-shadow: 0 0 14px #22c55e; animation: blink 1s steps(2) infinite; }

/* survey */
.survey-mod { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.survey-map { width: 392px; height: 245px; border-radius: 6px; }
.map-bg { fill: #d9cfb6; }
.map-road { fill: none; stroke: #f4eedf; stroke-width: 9; }
.map-lm { fill: #6b5b45; }
.map-lm-t { font: 800 10px var(--sans); fill: #3b2f20; text-anchor: middle; }
.map-pin { cursor: pointer; }
.map-pin circle { fill: #c0392b; stroke: #fff; stroke-width: 2; }
.map-pin text { font: 800 12px var(--sans); fill: #fff; text-anchor: middle; pointer-events: none; }
.map-pin.sel circle { fill: #f5c518; stroke: #111; }
.map-pin.sel text { fill: #111; }
.map-north { fill: #222; }
.map-n { font: 800 11px var(--sans); fill: #222; text-anchor: middle; }
.map-n.small { font-size: 9px; }
.svy-bottom { display: flex; align-items: center; gap: 14px; padding-left: 8px; }
.cal-dial { width: 136px; height: 136px; }
.dial-face { fill: #1d1f21; stroke: #555; stroke-width: 2; }
.dial-pos { cursor: pointer; }
.dial-pos circle { fill: #3a3d40; stroke: #777; }
.dial-pos text { font: 800 10px var(--sans); fill: #e5e5e5; text-anchor: middle; pointer-events: none; }
.dial-pos.sel circle { fill: #f5c518; }
.dial-pos.sel text { fill: #111; }
.cal-drift { font: 800 9px var(--mono); fill: #b5652d; text-anchor: middle; letter-spacing: 1px; }
.svy-side { display: flex; flex-direction: column; gap: 10px; }
.svy-sel { font: 700 15px var(--mono); color: #c9ced4; }
.svy-sel b { color: var(--hazard); font-size: 20px; }
.svy-confirm { font-family: 'Future'; font-size: 22px; padding: 10px 26px; border: none; border-radius: 8px; background: var(--hazard); color: #111; box-shadow: 0 4px 0 #8a6d00; }

/* memory */
.mem-mod { position: absolute; inset: 0; }
.mem-show { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 8px; background: #0b0c0d; color: #e7e2d6; border-radius: 10px; z-index: 3; }
.mem-mod.flashing .mem-show { display: flex; }
.mem-input { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.mem-prompt { font: 800 22px var(--mono); color: #4ade80; letter-spacing: 3px; }
.mem-slots { display: flex; gap: 8px; }
.mem-slot { width: 50px; height: 50px; border-radius: 8px; background: #0b0d0f; box-shadow: inset 0 0 0 2px #2c3138; color: #4ade80; display: grid; place-items: center; }
.mem-pads { display: grid; grid-template-columns: repeat(4, 74px); gap: 10px; }
.mem-pad { height: 70px; border: none; border-radius: 10px; background: linear-gradient(#e9e4d6, #c9c1ad); box-shadow: 0 5px 0 #7d7563; color: #1a1a1a; display: grid; place-items: center; }
.mem-pad:active { transform: translateY(4px); box-shadow: 0 1px 0 #7d7563; }
.mem-clear { font: 700 13px var(--sans); padding: 6px 14px; border-radius: 6px; border: 1px solid #555; background: #222; color: #ccc; }

/* gauge + manifest */
.gauge-mod { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 6px; }
.g-top { position: relative; display: flex; flex-direction: column; align-items: center; background: #1b1c1d; border-radius: 10px; padding: 6px; }
.g-dial { width: 250px; height: 140px; }
.g-arc { fill: none; stroke: #e7e2d6; stroke-width: 3; }
.g-tick { stroke: #e7e2d6; stroke-width: 2; }
.g-num { font: 700 10px var(--sans); fill: #c9c1ad; text-anchor: middle; }
.g-needle { stroke: #ef4444; stroke-width: 4; stroke-linecap: round; transition: all 150ms; }
.g-hub { fill: #888; }
.g-ctrl { display: flex; align-items: center; gap: 8px; }
.g-ctrl button { font: 800 15px var(--sans); padding: 6px 12px; border: none; border-radius: 6px; background: linear-gradient(#e7e9ec, #aeb4bb); box-shadow: 0 3px 0 #6b7179; }
.g-ctrl .g-set { background: var(--hazard); box-shadow: 0 3px 0 #8a6d00; }
.g-read { font: 800 16px var(--mono); color: #4ade80; min-width: 70px; text-align: center; }
.g-cover { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; border-radius: 10px; background: linear-gradient(rgba(8,9,11,.15), rgba(8,9,11,.92) 70%); color: #8b929b; font: 700 15px 'FutureNarrow'; letter-spacing: 2px; }
.manifest { background: #efe6cf; color: #2b2214; border-radius: 3px; padding: 8px 12px; font: 700 12.5px var(--mono); transform: rotate(-.8deg); box-shadow: 0 2px 4px rgba(0,0,0,.5); background-image: radial-gradient(circle at 85% 30%, rgba(120,80,30,.25) 0 18px, transparent 19px); }
.mf-h { font-weight: 800; border-bottom: 1px dashed #8a7a5a; margin-bottom: 4px; padding-bottom: 2px; letter-spacing: 1px; }
.mf-l { display: flex; justify-content: space-between; line-height: 1.55; }

/* final panel */
.final-mod { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 6px; }
.etched { position: absolute; right: 8px; top: 2px; font: 800 12px var(--mono); color: rgba(255,255,255,.35); letter-spacing: 2px; }
.x-body2 { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.x-onfile { font: 700 14px var(--mono); color: #c9ced4; }
.x-onfile b { color: var(--hazard); }
.x-knob { width: 230px; height: 230px; }
.knob-ring { fill: #1d1f21; stroke: #555; stroke-width: 2; }
.knob { fill: url(#none); fill: #8d949c; stroke: #3a3f45; stroke-width: 3; }
.knob-ptr { fill: #ef4444; }
.knob-lab { font: 800 13px var(--sans); fill: #c9ced4; text-anchor: middle; cursor: pointer; }
.knob-lab.on { fill: var(--hazard); }
.x-unseal { font-family: 'Future'; font-size: 22px; padding: 8px 28px; border: none; border-radius: 8px; background: var(--hazard); color: #111; box-shadow: 0 4px 0 #8a6d00; }
.x-tabs { display: flex; gap: 6px; }
.x-tab2 { font: 800 14px var(--sans); padding: 8px 12px; border-radius: 8px; border: 2px solid #3b4048; background: #22262c; color: #ddd; }
.x-tab2.on { border-color: var(--hazard); color: var(--hazard); }
.x-tab2.done { border-color: var(--green); color: var(--green); }
.x-pane { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.x-open { font: 800 26px 'Future'; color: var(--green); }
.rust-tag { font: 800 16px var(--mono); color: #3a1c0c; background: linear-gradient(90deg, #c87a3e, #a65a28 60%, #8a4a20); padding: 6px 14px; border-radius: 3px; transform: rotate(-2deg); letter-spacing: 1px; }
.x-wires { width: 300px; height: 170px; }
.stripe { fill: none; stroke-width: 5; stroke-dasharray: 14 10; }
.stripe-red { stroke: #e11d1d; } .stripe-orange { stroke: #ff8a1f; } .stripe-white { stroke: #ffffff; }
.x-wire .wire-hit-box { fill: transparent; cursor: pointer; }
.x-wire:hover path { filter: brightness(1.2); }
.fade-note { font: 700 10px var(--mono); color: #b5652d; align-self: flex-start; margin-left: 40px; }
.x-mini svg { width: 220px; height: 220px; }
.x-code { font: 800 40px var(--mono); color: #4ade80; letter-spacing: 8px; background: #0b0d0f; padding: 4px 16px; border-radius: 8px; }
.x-kp { display: grid; grid-template-columns: repeat(3, 66px); gap: 6px; }
.x-kp button { height: 40px; border: none; border-radius: 6px; background: linear-gradient(#e7e9ec, #aeb4bb); box-shadow: 0 3px 0 #6b7179; font: 800 16px var(--sans); }

/* HUD fan */
.fan-hud { position: absolute; left: 18px; top: 596px; width: 214px; padding: 12px 14px; border-radius: 12px; background: rgba(10,11,12,.85); border: 2px solid #3a3d40; pointer-events: auto; }
.fan-hud.hot { border-color: var(--red); box-shadow: 0 0 24px rgba(255,59,48,.6); }
.fan-h { font: 800 14px 'FutureNarrow'; letter-spacing: 2px; color: #c9ced4; margin-bottom: 8px; }
.fan-bar { position: relative; height: 22px; border-radius: 6px; background: linear-gradient(90deg, #1f3a2a, #3a3a1f 60%, #3a1f1f 80%); }
.fan-red { position: absolute; left: 80%; right: 0; top: 0; bottom: 0; background: rgba(255,59,48,.55); border-radius: 0 6px 6px 0; }
.fan-needle { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 6px #fff; }
.fan-idle { position: absolute; left: 5%; top: 26px; font: 700 10px var(--mono); color: #888; }
.fan-btn { margin-top: 22px; width: 100%; font-family: 'Future'; font-size: 26px; padding: 8px; border: none; border-radius: 8px; background: #2563eb; color: #fff; box-shadow: 0 4px 0 #1e3a8a; }
.fan-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1e3a8a; }
.fan-msg { height: 16px; margin-top: 6px; font: 700 12px var(--sans); color: var(--hazard); }
.pdot.dim { opacity: .45; }
#flash.stage { background: repeating-linear-gradient(-45deg, rgba(245,197,24,.35) 0 40px, rgba(0,0,0,.55) 40px 80px); animation-duration: 3.2s; }
#flash.stage .f-big { font-size: 110px; color: var(--hazard); text-shadow: 0 6px 0 #000; transform: rotate(-4deg); }
#flash.stage .f-small { font: 700 30px var(--sans); color: #fff; background: rgba(0,0,0,.7); padding: 8px 18px; border-radius: 8px; margin-top: 18px; }
.lm-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.lm-legend > div { background: #9fc3dd; border-radius: 6px; padding: 4px 6px 2px; text-align: center; font: 700 12px var(--mono); color: #1b2a36; }
.lm-legend svg { display: block; width: 90px; height: 70px; }
.r-epi { font: 600 22px var(--mono); color: #c9b39a; margin: -10px 0 18px; }

/* ---------- REFURBISHED: expert (HELM) ---------- */
.x-body.refurb { grid-template-columns: minmax(420px, 46%) 1fr; }
.helm { display: flex; flex-direction: column; background: #050806; border-right: 2px solid #1d3b26; min-height: 0; font-family: var(--mono); color: #7cf29a; }
.helm-h { padding: 12px 16px; border-bottom: 1px solid #1d3b26; font-size: 15px; color: #4ade80; }
.helm-st { color: #9ef7b4; }
.helm-log { flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 17px; line-height: 1.45; min-height: 0; }
.helm-entry { margin-bottom: 14px; }
.helm-entry .cmd { color: #4ade80; opacity: .7; }
.helm-entry.local { color: #6c8f78; }
.helm-queue { padding: 6px 16px; border-top: 1px solid #1d3b26; }
.hq { margin: 6px 0; }
.hq-l { font-size: 14px; color: #9ef7b4; }
.hq-bar { height: 8px; background: #0f2416; border-radius: 4px; overflow: hidden; margin: 3px 0; }
.hq-bar > div { height: 100%; background: #4ade80; }
.hq-t { font-size: 12px; color: #4f8a62; }
.hq-tax { font-size: 13px; color: #fbbf24; margin-top: 4px; }
.helm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px; }
.helm-btns button { font: 800 15px var(--mono); padding: 12px; border-radius: 6px; border: 1px solid #2f6b44; background: #0c1a11; color: #7cf29a; }
.helm-btns button:hover { background: #12301c; }
.helm-prompt { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; color: #4ade80; }
.helm-in { flex: 1; font: 16px var(--mono); background: transparent; border: none; border-bottom: 1px solid #1d3b26; color: #9ef7b4; outline: none; padding: 6px 0; }
.helm-foot { padding: 6px 16px 12px; font-size: 12px; color: #3f6f50; }
.r-man { display: flex; flex-direction: column; min-height: 0; }
.r-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid #23272e; }
.r-tab { font: 800 14px var(--mono); padding: 8px 10px; border-radius: 6px; border: 1px solid #3b4048; background: #171a1f; color: #c9ced4; }
.r-tab.on { background: #efe6cf; color: #2b2214; border-color: #efe6cf; }
.r-page { flex: 1; overflow-y: auto; padding: 20px 26px 60px; }
.mp.dry { font-family: var(--mono); font-size: 18px; color: #d9d2c0; max-width: 820px; }
.mp.dry p { margin: 0 0 14px; }
.mp.dry .rule { background: rgba(245,197,24,.1); border-left: 4px solid var(--hazard); padding: 10px 12px; }
.mp.dry code { background: #0c1a11; color: #7cf29a; padding: 1px 6px; border-radius: 4px; }
.clean-board { margin-top: 10px; background: #1a1d22; border-radius: 10px; padding: 10px; width: fit-content; }
.cb-h { font: 700 14px var(--sans); color: var(--dim); margin-bottom: 6px; }
.chess-svg.clean { width: 320px; height: 320px; }
.photo-wrap { margin: 10px 0; border: 6px solid #efe6cf; border-radius: 4px; width: fit-content; transform: rotate(-.6deg); box-shadow: 0 6px 16px rgba(0,0,0,.6); }
.survey-photo { display: block; width: 480px; height: 300px; }
.survey-photo .sky { fill: #9fc3dd; }
.survey-photo .ground { fill: #c9b48a; }
.survey-photo .lm { fill: #4a4f57; stroke: #2c3036; stroke-width: 1; }
.survey-photo .lm-line { fill: none; stroke: #3d4249; stroke-width: 3; stroke-linecap: round; }
.survey-photo .lm-win { fill: #c9d7e3; }
.photo-stamp { font: 700 12px var(--mono); fill: #ff9a3c; }
.r-status { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 4px; font: 800 14px var(--mono); }
.r-stage { padding: 2px 8px; border-radius: 4px; background: #222; color: #aaa; }
.r-stage.s2 { background: var(--hazard); color: #111; }
.r-fan { padding: 2px 8px; border-radius: 4px; background: #13261a; color: #7cf29a; }
.r-fan.hot { background: var(--red); color: #fff; }
.x-flash.stage { background: repeating-linear-gradient(-45deg, rgba(245,197,24,.35) 0 40px, rgba(0,0,0,.6) 40px 80px); }
.x-flash.stage .f-big { color: var(--hazard); }
.mp.dry .dial-fig { font-family: var(--sans); }
