/* Voxel Sector UI. Look: the user's refit mockup in amber (concept D4, assets/ui/concepts/r1/title_amber_5233.png):
   dark navy glass panels, thin steel-blue frame lines with an inner second line, amber accents, chamfered buttons. */
@import url('vendor/fonts/fonts.css');

:root {
  --bg: #070b10;
  --glass: rgba(9, 14, 21, 0.9);
  --glass2: rgba(14, 21, 31, 0.94);
  --glass3: rgba(20, 30, 43, 0.95);
  --line: rgba(140, 172, 204, 0.22);
  --line2: rgba(150, 182, 214, 0.42);
  --amber: #f39a3c;
  --amber-hi: #ffc66e;
  --amber-lo: #9a5a22;
  --amber-glow: rgba(243, 154, 60, 0.35);
  --text: #dfe6ee;
  --muted: #8d9eb0;
  --ui: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --display: "Exo 2", "Rajdhani", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 500 14px/1.3 var(--ui); user-select: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#hud { position: fixed; inset: 0; pointer-events: none; }
.bad { color: #ff6a5a; } .warn { color: #ffc35a; } .ok { color: #7ee07a; }
b, strong { font-weight: 700; }

/* ---- HUD ---------------------------------------------------------------------------------------- */
#top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; text-shadow: 0 1px 2px #000; }
#lvl { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--amber); display: grid; place-items: center; font: 700 17px var(--display); color: var(--amber-hi); background: var(--glass); box-shadow: 0 0 10px var(--amber-glow); }
#xpbar { width: 420px; height: 10px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line2); overflow: hidden; }
#xpfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--amber-lo), var(--amber), var(--amber-hi)); box-shadow: 0 0 8px var(--amber-glow); }
#clock { font: 700 18px var(--display); font-variant-numeric: tabular-nums; min-width: 52px; }
#kills { color: var(--muted); font-weight: 600; }

#status { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 10px; align-items: flex-end; background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); padding: 11px; }
#schem { width: 225px; height: 285px; display: block; }   /* 1.5x (the user's request); drawn at 2x for the top-view picture */
#stat-lines { width: 300px; }
.sname { font: 700 16px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-hi); margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.row span { width: 34px; color: var(--muted); }
.bar { flex: 1; height: 9px; background: rgba(255, 255, 255, 0.07); position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.bar.flux i:last-child { opacity: 0.85; height: 3px; top: auto; }
.state { margin: 5px 0; font-size: 13px; }
.wlist { margin-top: 4px; font-size: 13px; }
.w { display: flex; align-items: center; gap: 6px; }
.w i { width: 7px; height: 7px; display: inline-block; }
.w em { margin-left: auto; font-style: normal; color: var(--muted); }

#help { position: absolute; right: 14px; bottom: 12px; color: var(--muted); font-size: 13px; text-shadow: 0 1px 2px #000; }
#notes { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.note { background: var(--glass); border: 1px solid var(--line); border-left: 2px solid var(--amber); padding: 4px 12px; font-weight: 600; transition: opacity 1s; }
.note.fade { opacity: 0; }
#fxtext { position: absolute; inset: 0; overflow: hidden; }
.ftext { position: absolute; left: 0; top: 0; font-weight: 700; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.6); white-space: nowrap; will-change: transform; }

/* ---- overlay, panels, buttons ------------------------------------------------------------------ */
#overlay { position: fixed; inset: 0; display: none; place-items: center; background: rgba(4, 7, 11, 0.6); backdrop-filter: blur(2px); }
#overlay.show { display: grid; }
.panel { position: relative; background: var(--glass2); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass2), inset 0 0 0 4px var(--line), 0 12px 48px rgba(0, 0, 0, 0.65); padding: 20px 24px; }
.panel h1 { margin: 0; font: 800 46px/1.05 var(--display); letter-spacing: 0.05em; color: var(--amber); }
.panel h2 { margin: 0 0 4px; font: 700 23px var(--display); letter-spacing: 0.06em; color: var(--amber-hi); }
.panel h3 { margin: 4px 0; font-weight: 700; } .panel h4 { margin: 14px 0 6px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12.5px; }
.sub { color: var(--muted); font-size: 15px; font-weight: 500; }
.small { font-size: 12.5px; color: var(--muted); }
.title { text-align: center; max-width: 640px; }
.title ul { text-align: left; line-height: 1.8; margin: 18px 0; }
.btn { pointer-events: auto; background: var(--glass3); color: var(--text); border: 1px solid var(--line2); padding: 6px 16px; cursor: pointer; font: 700 14px var(--ui); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.btn:hover { border-color: var(--amber); color: var(--amber-hi); }

/* the big chamfered amber button (Launch, Choose a ship) */
.btn.big { position: relative; isolation: isolate; border: 0; padding: 14px 72px; margin-top: 14px; font: 800 24px var(--display); letter-spacing: 0.12em; color: #ffe2b0; text-shadow: 0 1px 0 #4a2508, 0 0 12px rgba(255, 190, 100, 0.5);
  background: linear-gradient(180deg, #ffd38a, #d27a2a); clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%); transition: filter 0.15s; }
.btn.big::before { content: ''; position: absolute; inset: 2px; z-index: -1; background: radial-gradient(120% 140% at 50% 0%, #c27a32, #8a4a17 60%, #5c2e0c);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0 50%); }
.btn.big::after { content: ''; position: absolute; inset: 6px; z-index: -1; border-top: 1px solid rgba(255, 220, 160, 0.35); border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%); }
.btn.big:hover { filter: brightness(1.15) drop-shadow(0 0 14px var(--amber-glow)); color: #fff1d6; }

/* ---- level up ------------------------------------------------------------------------------------ */
.levelup { text-align: center; }
.cards { display: flex; gap: 14px; margin-top: 14px; }
.card { position: relative; width: 230px; min-height: 200px; text-align: left; background: var(--glass); color: inherit; font: inherit; border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); padding: 14px; cursor: pointer; }
.card:hover { border-color: var(--amber); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px rgba(243, 154, 60, 0.3), 0 0 18px var(--amber-glow); }
.card.hull { border-color: var(--amber-lo); } .card.hull:hover { border-color: var(--amber-hi); }
.card h3 { color: var(--amber-hi); font-family: var(--display); letter-spacing: 0.03em; }
.card .tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.card p { margin: 6px 0; }
.card table { width: 100%; font-size: 13px; margin-top: 6px; } .card td:last-child { text-align: right; }
.card .slots i { display: inline-block; width: 18px; height: 18px; margin-right: 3px; color: #111; font-style: normal; font-weight: 700; font-size: 12px; text-align: center; line-height: 18px; }
.card .key { position: absolute; top: 9px; right: 11px; color: var(--amber); opacity: 0.7; font: 700 15px var(--display); }

/* ---- refit ------------------------------------------------------------------------------------------ */
.refit { width: min(1180px, 96vw); max-height: 94vh; overflow: auto; }
.rcols { display: flex; gap: 18px; margin-top: 10px; }
.rleft { position: relative; width: 360px; height: 460px; flex: none; border: 1px solid var(--line);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px, radial-gradient(#142030, #070b10); }
.rleft canvas { position: absolute; inset: 0; image-rendering: pixelated; }
.slot { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid; background: rgba(7, 11, 16, 0.88); color: #fff; font: 700 12px sans-serif; cursor: pointer; pointer-events: auto; }
.slot.hp { border-radius: 3px; width: 30px; height: 30px; box-shadow: 0 0 0 2px #ffc84a, 0 0 10px rgba(255, 200, 74, 0.45); }   /* hardpoints: gold frame and an HP tag */
.slot.hp::after { content: 'HP'; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); padding: 0 3px; font: 800 11px var(--ui); color: #16120a; background: #ffc84a; border-radius: 2px; pointer-events: none; }
.slot.sel { box-shadow: 0 0 0 3px var(--amber-hi), 0 0 12px var(--amber); }
.slot.off { background: rgba(120, 20, 20, 0.85); }
.rmid { flex: 1; min-width: 0; }
.rright { width: 300px; flex: none; }
.cur { background: var(--glass); border: 1px solid var(--line); padding: 8px; }
.inv { display: flex; flex-direction: column; gap: 5px; max-height: 300px; overflow: auto; }
.item { position: relative; text-align: left; background: var(--glass); color: inherit; font: inherit; border: 1px solid var(--line); padding: 6px 50px 6px 8px; cursor: pointer; }
.item:hover { border-color: var(--amber); background: var(--glass3); }
.item.noop { opacity: 0.45; }
.item .cnt { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.wc .sz { display: inline-block; font-style: normal; color: #111; font-weight: 700; font-size: 11px; padding: 0 4px; }
.stats table { width: 100%; } .stats td:first-child { color: var(--muted); } .stats td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.stats .op { font-size: 15px; margin-bottom: 6px; } .stats .op b { color: var(--amber-hi); } .stats .op.bad b { color: #ff6a5a; }
.panel ::-webkit-scrollbar { width: 8px; } .panel ::-webkit-scrollbar-thumb { background: var(--line2); } .panel ::-webkit-scrollbar-track { background: transparent; }

/* ---- full-screen menu (title, game over): space backdrop and the outer screen frame ------------- */
#overlay.menu { background: radial-gradient(ellipse at 50% 45%, rgba(5, 8, 13, 0.5), rgba(5, 8, 13, 0.62) 55%, rgba(5, 8, 13, 0.2) 100%), url('assets/ui/menu_bg.jpg') center / cover, var(--bg); backdrop-filter: none; }
#overlay.menu::before { content: ''; position: absolute; inset: 22px 10px; pointer-events: none; border: 1px solid var(--line2); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.25), inset 0 0 0 5px var(--line);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px); }
#overlay.menu::after { content: ''; position: absolute; inset: 22px 10px; pointer-events: none;
  background: linear-gradient(var(--amber), var(--amber)) 0 0 / 46px 2px, linear-gradient(var(--amber), var(--amber)) 0 0 / 2px 46px,
    linear-gradient(var(--amber), var(--amber)) 100% 0 / 46px 2px, linear-gradient(var(--amber), var(--amber)) 100% 0 / 2px 46px,
    linear-gradient(var(--amber), var(--amber)) 0 100% / 46px 2px, linear-gradient(var(--amber), var(--amber)) 0 100% / 2px 46px,
    linear-gradient(var(--amber), var(--amber)) 100% 100% / 46px 2px, linear-gradient(var(--amber), var(--amber)) 100% 100% / 2px 46px;
  background-repeat: no-repeat; opacity: 0.55; }
.mbar { position: absolute; left: 10px; right: 10px; height: 18px; display: flex; align-items: center; gap: 14px; padding: 0 16px; pointer-events: none;
  font: 600 12px var(--ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.mbar.top { top: 2px; } .mbar.bot { bottom: 2px; }
.mbar i { flex: 1; height: 6px; background: repeating-linear-gradient(90deg, var(--line2) 0 18px, transparent 18px 26px); opacity: 0.6; }
.mbar i.short { flex: none; width: 90px; background: repeating-linear-gradient(90deg, var(--amber) 0 10px, transparent 10px 14px); opacity: 0.5; }
#overlay.menu .panel { background: transparent; border: 0; box-shadow: none; }

/* title */
.title h1, .over h1 { position: relative; display: inline-block; padding: 0 0.3em 12px; font: 800 clamp(44px, 7vw, 84px)/1 var(--display); letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffd690 10%, #f39a3c 55%, #c8681f 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(60, 25, 5, 0.9)) drop-shadow(0 0 22px rgba(243, 140, 50, 0.35)); }
.title h1::after, .over h1::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line2) 20%, var(--amber) 50%, var(--line2) 80%, transparent); }
.start { max-width: 1120px; }
.start .sub { margin: 10px 0 0; letter-spacing: 0.22em; text-transform: uppercase; font-size: 13.5px; font-weight: 600; }
.start h3.pick { margin: 20px 0 10px; font: 700 13px var(--ui); letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; gap: 14px; }
.start h3.pick::before, .start h3.pick::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line2)); }
.start h3.pick::after { background: linear-gradient(270deg, transparent, var(--line2)); }

/* ship cards */
.starters { display: flex; gap: 16px; justify-content: center; }
.scard { position: relative; width: 330px; text-align: left; color: inherit; font: inherit; padding: 0 0 12px; cursor: pointer; pointer-events: auto;
  background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); transition: border-color 0.15s, background 0.15s; }
.scard:hover { border-color: rgba(243, 154, 60, 0.6); }
.scard.sel { border-color: var(--amber); background: rgba(22, 20, 20, 0.92); box-shadow: inset 0 0 0 3px rgba(22, 20, 20, 0.92), inset 0 0 0 4px rgba(243, 154, 60, 0.45), inset 0 0 40px rgba(243, 154, 60, 0.08); }
.shead { display: flex; align-items: center; gap: 10px; height: 34px; margin: 4px 4px 0; padding: 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(150, 182, 214, 0.08), transparent); }
.scard.sel .shead { background: linear-gradient(90deg, rgba(243, 154, 60, 0.22), rgba(243, 154, 60, 0.02)); border-bottom-color: rgba(243, 154, 60, 0.4); }
.shead .key { display: grid; place-items: center; width: 22px; height: 20px; border: 1px solid var(--line2); color: var(--muted); font: 700 13px var(--display); }
.scard.sel .shead .key { border-color: var(--amber); color: var(--amber-hi); background: rgba(243, 154, 60, 0.15); }
.shead h3 { margin: 0; font: 700 18px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.scard.sel .shead h3 { color: var(--amber-hi); }
.shead .tier { margin-left: auto; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sview { position: relative; margin: 10px 14px 0; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 55%, #141c27, #05080c 80%); }
.sview::before, .sview::after { content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; border: solid var(--amber); opacity: 0.6; }
.sview::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; } .sview::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.scard canvas { display: block; width: 300px; height: 170px; }
.scard p { margin: 10px 14px 8px; color: var(--muted); min-height: 36px; font-size: 14px; }
.sbar { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 3px 14px; }
.sbar span { width: 64px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; font-size: 12px; }
.sbar i { flex: 1; height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 22px, transparent 22px 25px); }
.sbar b { display: block; height: 100%; background: linear-gradient(90deg, var(--amber-lo), var(--amber) 70%, var(--amber-hi));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 25px); mask: repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 25px); }
.scard .small { margin: 8px 14px 0; }
.scard .loadout { margin: 8px 14px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.scard .chip { font-size: 12px; padding: 1px 7px 1px 6px; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-left: 3px solid var(--c, #ccc); }

.controls { list-style: none; padding: 0; text-align: center; line-height: 2; margin: 18px auto 2px; font-size: 13.5px; color: var(--muted); max-width: 820px; }
.controls b { color: var(--text); }
.controls li.goal { color: var(--text); font-weight: 600; font-size: 14.5px; letter-spacing: 0.02em; } .controls li.goal b { color: var(--amber-hi); }
.controls kbd { display: inline-block; min-width: 20px; padding: 0 5px; margin: 0 1px; line-height: 18px; text-align: center; font: 700 12px var(--ui); color: var(--amber-hi); border: 1px solid rgba(243, 154, 60, 0.45); background: rgba(243, 154, 60, 0.08); }

/* game over */
.over { text-align: center; }
.over .sub { margin: 14px 0 6px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.over .ostats { display: flex; gap: 12px; justify-content: center; margin: 22px 0 10px; }
.over .ostats div { min-width: 120px; padding: 10px 14px; background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); }
.over .ostats b { display: block; font: 700 26px var(--display); color: var(--amber-hi); }
.over .ostats span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* weapon pictures on cards */
.wc { display: flex; align-items: center; gap: 10px; }
.wc .wtext { min-width: 0; }
.wicon { width: 76px; height: 58px; object-fit: contain; flex: none; opacity: 0; transition: opacity 0.2s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.wicon.ready { opacity: 1; }
.cur .wicon { width: 120px; height: 90px; }

@media (max-height: 820px) {
  #overlay.menu .panel { padding: 8px 24px; }
  .title h1, .over h1 { font-size: clamp(40px, 5.6vw, 60px); padding-bottom: 8px; }
  .start .sub { margin-top: 6px; }
  .start h3.pick { margin: 10px 0 8px; }
  .scard p { min-height: 0; margin: 8px 14px 6px; }
  .controls { margin-top: 8px; line-height: 1.75; }
  .btn.big { padding: 10px 60px; margin-top: 8px; font-size: 20px; }
}

/* ---- refit screen (main session; layout after assets/ui/concepts/user/refit_ref.png) ------------- */
#overlay.refitx { display: block; }
.rx { position: absolute; inset: 34px 22px 32px; display: grid; grid-template-columns: 50% minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; pointer-events: auto; }
.rx > div { background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); padding: 10px 12px; min-height: 0; }
.rx-label { font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin: 6px 0; }
.rx-left { grid-column: 2; grid-row: 2 / 4; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.rx-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line2); padding-bottom: 6px; }
.rx-head h3 { margin: 0; font: 700 20px var(--display); letter-spacing: 0.04em; color: var(--amber-hi); flex: 1; }
.rx-head .key { font: 700 13px var(--ui); color: #111; background: var(--amber); padding: 0 6px; }
.rx-head .tier { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; }
.rx-pic { height: 170px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, rgba(243, 154, 60, 0.12), transparent 70%), rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.wicon.big { width: 92%; height: 160px; }
.rx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rx-table td { padding: 2px 2px; border-bottom: 1px solid rgba(140, 172, 204, 0.08); }
.rx-table td:first-child { color: var(--muted); } .rx-table td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rx-left .inv { max-height: none; }
.rx-hold { grid-column: 2 / 4; grid-row: 1; }
.rx-tiles { display: flex; flex-wrap: wrap; gap: 6px; max-height: 66px; overflow: auto; }
.rx-tile { position: relative; width: 74px; height: 58px; padding: 2px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); cursor: pointer; opacity: 0.45; }
.rx-tile.fit { opacity: 1; border-color: var(--amber-lo); }
.rx-tile.fit:hover { border-color: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.rx-tile.noop { opacity: 0.7; border-color: #7a3a32; }
.rx-tile .wicon { width: 100%; height: 100%; }
.rx-tile .n { position: absolute; right: 3px; bottom: 1px; font: 700 12px var(--ui); color: var(--text); text-shadow: 0 1px 2px #000; }
.rx-tile .sz { position: absolute; left: 2px; top: 2px; font-size: 11px; padding: 0 3px; }
.rx-stats { grid-column: 3; grid-row: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.rx-stat { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); padding: 6px 8px; }
.rx-stat span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rx-stat b { font: 700 19px var(--display); font-variant-numeric: tabular-nums; }
.rx-stat.hi { border-color: var(--amber-lo); } .rx-stat.hi b { color: var(--amber-hi); }
.rx-stat.bad b { color: #ff6a5a; }
.rx-view { grid-column: 3; grid-row: 2; min-height: 200px; position: relative; padding: 0 !important; overflow: hidden;
  background: linear-gradient(rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px, radial-gradient(ellipse at 50% 55%, rgba(30, 44, 62, 0.8), rgba(6, 9, 14, 0.9)) !important; }
.rx-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.rx-view .slot { position: absolute; z-index: 2; }
.rx-hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; pointer-events: none; }
.rx-mods { grid-column: 2 / 4; grid-row: 4; }
.rx-mrow { display: flex; gap: 6px; overflow-x: auto; }
.rx-mod { flex: none; width: 170px; text-align: left; background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; border: 1px solid var(--line); padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.rx-mod b { font-size: 13px; } .rx-mod span { font-size: 12px; color: var(--muted); } .rx-mod em { font-style: normal; font-size: 12px; color: var(--amber); margin-top: auto; }
.rx-mod.on { border-color: var(--amber-lo); background: rgba(243, 154, 60, 0.08); }
.rx-mod.empty { cursor: default; border-style: dashed; justify-content: center; align-items: center; opacity: 0.5; }
.rx-mod.noop { opacity: 0.45; }
.rx-mod:hover:not(.empty) { border-color: var(--amber); }

/* in-game outer frame: the menu border, lighter, so play is framed like the menus */
#hud::before { content: ''; position: absolute; inset: 6px; pointer-events: none; border: 1px solid var(--line); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), inset 0 0 0 4px rgba(140, 172, 204, 0.1); }
#hud::after { content: ''; position: absolute; inset: 6px; pointer-events: none;
  background: linear-gradient(var(--amber), var(--amber)) 0 0 / 26px 2px no-repeat, linear-gradient(var(--amber), var(--amber)) 0 0 / 2px 26px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 0 / 26px 2px no-repeat, linear-gradient(var(--amber), var(--amber)) 100% 0 / 2px 26px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 0 100% / 26px 2px no-repeat, linear-gradient(var(--amber), var(--amber)) 0 100% / 2px 26px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 100% / 26px 2px no-repeat, linear-gradient(var(--amber), var(--amber)) 100% 100% / 2px 26px no-repeat; opacity: 0.7; }

/* ---- credits, shipyard marker and dock prompt, perk cards, shipyard screen (main session) ------------- */
#credits { display: flex; align-items: baseline; gap: 3px; padding: 2px 10px; background: var(--glass); border: 1px solid var(--line2); border-left: 2px solid #ffd35a; }
#credits b { font: 700 17px var(--display); color: #ffd98a; font-variant-numeric: tabular-nums; }
#credits i, .cr i { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: #c9a24a; margin-left: 2px; }
#credits.pulse b { animation: crpulse 0.35s ease-out; }
@keyframes crpulse { 0% { color: #fff6d8; text-shadow: 0 0 10px #ffd35a; } 100% { color: #ffd98a; text-shadow: none; } }
.cr { font-weight: 700; color: #ffd98a; font-variant-numeric: tabular-nums; white-space: nowrap; }

#stmark { position: absolute; left: 0; top: 0; display: none; pointer-events: none; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000; }
#stmark.show { display: block; }
#stmark .lab { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
#stmark b { font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-hi); padding: 1px 8px; background: var(--glass); border: 1px solid var(--amber-lo); }
#stmark span { font: 700 13px var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
#stmark .arr { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: none; }
#stmark .arr::before { content: ''; position: absolute; left: 22px; top: 7px; border: 7px solid transparent; border-left: 12px solid var(--amber); filter: drop-shadow(0 0 4px var(--amber-glow)); }
#stmark.edge .arr { display: block; }
#stmark.edge .lab { transform: translate(-50%, -50%); }
#stmark.on .lab { top: -18px !important; left: 0 !important; }
#stmark.on .lab::after { content: ''; height: 16px; border-left: 1px dashed var(--amber); }

#dockhint { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); display: none; padding: 8px 20px; background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line);
  font: 700 16px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#dockhint.show { display: block; }
#dockhint.ok { color: var(--text); border-color: var(--amber); animation: dockglow 1.2s ease-in-out infinite alternate; }
#dockhint b { color: var(--amber-hi); }
#dockhint span { color: #ffc35a; margin-left: 8px; font-variant-numeric: tabular-nums; }
#dockhint kbd, .yd kbd { display: inline-block; min-width: 22px; padding: 0 5px; margin-right: 6px; text-align: center; font: 700 13px var(--ui); color: var(--amber-hi); border: 1px solid rgba(243, 154, 60, 0.6); background: rgba(243, 154, 60, 0.12); }
@keyframes dockglow { from { box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line), 0 0 0 transparent; } to { box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line), 0 0 18px var(--amber-glow); } }

/* perk cards */
.pcard { --rc: #b9c6d4; width: 236px; min-height: 290px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 14px 14px; border-color: color-mix(in srgb, var(--rc) 55%, transparent);
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--rc) 12%, transparent), transparent 65%), var(--glass); }
.pcard:hover { border-color: var(--rc); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px color-mix(in srgb, var(--rc) 35%, transparent), 0 0 20px color-mix(in srgb, var(--rc) 40%, transparent); }
.pcard.epic { box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px color-mix(in srgb, var(--rc) 40%, transparent), 0 0 16px color-mix(in srgb, var(--rc) 30%, transparent); }
.pcard .ptop { align-self: stretch; display: flex; justify-content: space-between; padding-right: 22px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pcard .rar { color: var(--rc); } .pcard .own { color: var(--muted); }
.pcard .picon { width: 76px; height: 76px; margin: 12px 0 6px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent); background: rgba(0, 0, 0, 0.3);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
.pcard svg { width: 46px; height: 46px; fill: none; stroke: var(--amber-hi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px var(--amber-glow)); }
.pcard.rare svg, .pcard.epic svg { stroke: var(--rc); filter: drop-shadow(0 0 6px var(--rc)); }
.pcard h3 { margin: 6px 0 2px; font-size: 17px; }
.pcard p { flex: 1; margin: 4px 0 10px; color: var(--text); }
.pcard .pstat { align-self: stretch; display: flex; align-items: baseline; gap: 6px; padding: 6px 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pcard .pstat span { flex: 1; text-align: left; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pcard .pstat b { font: 700 14px var(--display); color: var(--muted); } .pcard .pstat b.up { color: #7ee07a; } .pcard .pstat i { font-style: normal; color: var(--muted); }

/* shipyard screen: header with tabs, then one tab's body */
#overlay.yard { display: block; }
.yd { position: absolute; inset: 34px 22px 32px; display: flex; flex-direction: column; gap: 10px; pointer-events: auto; }
.yd > div { background: var(--glass); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); padding: 10px 14px; min-height: 0; }
.yd-head { flex: none; display: flex; align-items: center; gap: 22px; }
.yd-title h2 { margin: 0; font: 700 24px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-hi); }
.yd-tabs { flex: 1; display: flex; gap: 6px; justify-content: center; }
.yd-tab { position: relative; padding: 10px 26px; font: 700 16px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); cursor: pointer;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px); }
.yd-tab:hover { color: var(--text); border-color: var(--amber-lo); }
.yd-tab.on { color: var(--amber-hi); border-color: var(--amber); background: linear-gradient(180deg, rgba(243, 154, 60, 0.28), rgba(243, 154, 60, 0.06)); box-shadow: inset 0 -2px 0 var(--amber); }
.yd-tab kbd { font-size: 12px; min-width: 18px; margin-right: 8px; opacity: 0.8; }
.yd-wallet { text-align: right; } .yd-wallet > span { display: block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.yd-wallet .cr { font: 700 28px var(--display); }
.yd .btn.big.yd-undock { margin: 0; padding: 10px 44px; font-size: 20px; }
.yd-body { flex: 1; overflow: auto; }
.yd kbd { display: inline-block; min-width: 22px; padding: 0 5px; margin-right: 6px; text-align: center; font: 700 13px var(--ui); color: var(--amber-hi); border: 1px solid rgba(243, 154, 60, 0.6); background: rgba(243, 154, 60, 0.12); }
.yd .btn:disabled { opacity: 0.45; cursor: default; border-color: var(--line2); color: var(--muted); background: var(--glass3); }
.yd-note { text-align: center; margin: 2px 0 10px; color: var(--muted); }
.yd-buy { display: block; width: 100%; padding: 10px; font-size: 16px; border-color: var(--amber); color: var(--amber-hi); background: rgba(243, 154, 60, 0.12); }

/* ships tab: big hull cards */
.yd-ships { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.yd-sc { position: relative; display: flex; flex-direction: column; padding-bottom: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.3), inset 0 0 0 4px var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); transition: border-color 0.15s; }
.yd-sc:hover { border-color: var(--amber); }
.yd-sc.cur { border-color: var(--amber-lo); }
.yd-sc.lock .sview canvas, .yd-sc.lock p, .yd-sc.lock .sbar { opacity: 0.45; }
.yd-sc .shead h3 { font-size: 20px; }
.yd-sc .sview { margin: 10px 12px 0; } .yd-sc canvas { display: block; width: 100%; aspect-ratio: 440 / 230; }
.yd-sc p { margin: 8px 14px 6px; color: var(--muted); font-size: 14px; min-height: 36px; }
.yd-sc .sbar em { width: 44px; text-align: right; font-style: normal; font-weight: 700; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.yd-sc .sbar em.ok { color: #7ee07a; } .yd-sc .sbar em.bad { color: #ff8a7a; }
.yd-slots { margin: 8px 14px 0; }
.yd-slots i { display: inline-block; width: 20px; height: 20px; margin-right: 3px; color: #111; font-style: normal; font-weight: 700; font-size: 12px; text-align: center; line-height: 20px; }
.yd-scfoot { margin: auto 14px 0; padding-top: 10px; display: flex; align-items: flex-end; gap: 12px; }
.yd-scfoot .yd-pr { flex: 1; } .yd-pr .small { display: block; } .yd-pr .cr { font: 700 24px var(--display); }
.yd-scfoot .yd-buy { width: auto; min-width: 130px; margin: 0; }
.ylock, .ycur { position: absolute; display: flex; align-items: center; gap: 6px; font: 700 14px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; }
.ylock { inset: 0; justify-content: center; flex-direction: column; color: var(--text); background: rgba(5, 8, 13, 0.45); }
.ylock svg { width: 40px; height: 40px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linejoin: round; }
.ycur { left: 8px; top: 8px; padding: 2px 8px; color: #111; background: var(--amber); font-size: 12px; }

/* weapons tab: tile grids and a detail pane */
.yd-gear { display: grid; grid-template-columns: 1fr minmax(300px, 360px); gap: 14px; min-height: 100%; }
.yd-filters { display: flex; gap: 4px; margin-bottom: 6px; }
.yd-filter { padding: 5px 16px; font: 700 13px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); cursor: pointer; }
.yd-filter:hover { color: var(--text); } .yd-filter.on { color: #111; background: var(--amber); border-color: var(--amber); }
.yd-grid { position: relative; display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 12px; }
.yd-tile { position: relative; aspect-ratio: 1 / 0.9; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 6px 6px; font: inherit; color: var(--text); cursor: pointer;
  background: radial-gradient(ellipse at 50% 45%, rgba(243, 154, 60, 0.07), transparent 70%), rgba(0, 0, 0, 0.32); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.yd-tile.mine { background: radial-gradient(ellipse at 50% 45%, rgba(90, 184, 255, 0.07), transparent 70%), rgba(0, 0, 0, 0.32); }
.yd-tile:not(.empty):hover { background-color: rgba(243, 154, 60, 0.1); box-shadow: inset 0 0 0 1px var(--amber-lo); }
.yd-tile.sel { box-shadow: inset 0 0 0 2px var(--amber), inset 0 0 24px rgba(243, 154, 60, 0.25); }
.yd-tile.empty { cursor: default; background: rgba(0, 0, 0, 0.18); }
.yd-tile.poor .wicon, .yd-tile.poor .ymod { opacity: 0.4; } .yd-tile.poor .pr .cr { color: #b06a5a; }
.yd-tile .wicon { width: 92%; height: 62%; flex: 1; }
.yd-tile .ymod { width: 48%; height: 52%; flex: 1; }
.yd-tile .sz { position: absolute; left: 6px; top: 6px; font-style: normal; color: #111; font-weight: 700; font-size: 12px; padding: 0 5px; }
.yd-tile .sz.mod { background: #9fd0ff; }
.yd-tile .n { position: absolute; right: 8px; top: 4px; font: 700 18px var(--display); color: var(--text); text-shadow: 0 1px 2px #000; }
.yd-tile .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.yd-tile .pr .cr { font-size: 14px; } .yd-tile.mine .pr .cr { color: #9be08a; }
.yd-empty { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; }
.ymod { fill: none; stroke: #9fd0ff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(90, 184, 255, 0.45)); }
.yd-detail { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.3); }
.yd-detail .rx-pic .ymod { width: 110px; height: 110px; }
.yd-detail p { margin: 0; }
.yd-dprice { text-align: right; } .yd-dprice .small { float: left; margin-top: 8px; } .yd-dprice .cr { font: 700 26px var(--display); }

/* shipyard tab: service cards */
.yd-serv { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 6px 0 14px; }
.yd-card { position: relative; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.3); padding: 16px 16px 14px 86px; min-height: 170px; }
.yd-card h4 { margin: 0; font: 700 18px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-hi); }
.ycard-ic { position: absolute; left: 16px; top: 16px; width: 54px; height: 54px; fill: none; stroke: var(--amber-hi); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--amber-glow)); }
.yd-card .row b { width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.yd-card .btn { width: 100%; margin-top: auto; padding: 9px; }
.yd-card .btn kbd { margin: 0 0 0 6px; font-size: 12px; }
.yd-own { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 14px; }
.yd-own .sview { margin: 0; } .yd-own canvas { display: block; width: 100%; aspect-ratio: 440 / 230; }
.yd-perks { display: flex; flex-direction: column; gap: 5px; overflow: auto; }
.yd-perk { padding: 6px 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-left: 3px solid var(--rc); }
.yd-perk b { display: block; font-size: 14px; } .yd-perk span { font-size: 12.5px; color: var(--muted); }

/* shipyard confirm dialog */
.yd-confirm { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(4, 7, 11, 0.62); pointer-events: auto; }
.yd-cbox { width: min(460px, 92vw); padding: 18px 22px 16px; background: var(--glass2); border: 1px solid var(--amber-lo); box-shadow: inset 0 0 0 3px var(--glass2), inset 0 0 0 4px rgba(243, 154, 60, 0.3), 0 16px 60px rgba(0, 0, 0, 0.7);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.yd-cbox h3 { margin: 0 0 10px; font: 700 21px var(--display); letter-spacing: 0.04em; color: var(--amber-hi); }
.yd-cbox .rx-table { font-size: 14px; }
.yd-cbox tr.sep td { border-top: 1px solid var(--line2); padding-top: 6px; }
.yd-cbox tr.tot td { font-size: 15px; }
.yd-cbox td.neg .cr { color: #ff9a7a; } .yd-cbox td.pos .cr { color: #9be08a; } .yd-cbox td.bad .cr { color: #ff6a5a; }
.yd-cbox p { margin: 10px 0 0; line-height: 1.4; }
.yd-cbtns { display: flex; gap: 10px; margin-top: 14px; }
.yd-cbtns .btn { flex: 1; margin: 0; padding: 10px; font-size: 15px; }
.yd-cbtns kbd { font-size: 12px; }

/* shipyard: hover tooltip on tiles (owned, fit) */
.yd-tip { position: fixed; z-index: 20; display: none; min-width: 250px; max-width: 330px; padding: 8px 12px; pointer-events: none; background: var(--glass2); border: 1px solid var(--amber-lo); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); font-size: 13px; }
.yd-tip.show { display: block; }
.yd-tip b { display: block; margin-bottom: 4px; font: 700 15px var(--display); color: var(--amber-hi); }
.yd-tip table { width: 100%; border-collapse: collapse; }
.yd-tip td { padding: 2px 0; vertical-align: top; } .yd-tip td:first-child { color: var(--muted); padding-right: 10px; white-space: nowrap; } .yd-tip td:last-child { text-align: right; font-weight: 700; }
.yd-tip em, .yd-fit em { font-style: normal; font-weight: 500; color: var(--muted); }

/* slot overview (top view with firing arcs): refit screen left of the turntable, shipyard hull cards */
.rx-slotmap { grid-column: 1; grid-row: 1 / 5; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 50%, rgba(30, 44, 62, 0.55), rgba(6, 9, 14, 0.9)), linear-gradient(rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px !important; }
.mp-host { position: relative; flex: 1; min-height: 0; }
.rx-slotlab { min-height: 26px; font-size: 15px; font-weight: 700; color: var(--text); }
.rx-slotlab em { font-style: normal; color: var(--amber-hi); }
.rx-slotlab .key { display: inline-block; margin-right: 6px; padding: 0 5px; font: 700 12px var(--ui); color: #111; background: var(--amber); }
.rx-turn { position: absolute; inset: 0; }
.rx-turn canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.rx-turn .slot { position: absolute; z-index: 2; }
.yd-sc .sview { position: relative; }
.rx-slotmap canvas { flex: 1; min-height: 0; width: 100%; }
.rx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }
.rx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rx-legend i { display: inline-block; width: 11px; height: 11px; border: 1.5px solid #d9d9d9; }
.rx-legend .lg-t { border-radius: 50%; } .rx-legend .lg-f { background: #d9d9d9; border-radius: 50%; } .rx-legend .lg-e { background: #0a0e14; border-radius: 50%; }
.rx-legend .lg-h { border-color: #ffc84a !important; box-shadow: 0 0 0 1px #ffc84a; border-radius: 1px; }   /* hardpoints: gold frame */
.rx-legend .lg-o { background: #ff5a4a; border-color: #ff5a4a; border-radius: 50%; } .rx-legend .lg-c { border: 0; border-radius: 2px; }
/* shipyard Ships tab: big slot overview (left half) and the hull cards (right half) */
.yd-body.split { overflow: hidden; }
.yd-split { display: grid; grid-template-columns: 50% minmax(0, 1fr); gap: 14px; height: 100%; }
.yd-bigmap { display: flex; flex-direction: column; min-height: 0; padding: 8px 12px; border: 1px solid var(--line2); background: radial-gradient(ellipse at 50% 50%, rgba(30, 44, 62, 0.55), rgba(6, 9, 14, 0.9)), linear-gradient(rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(140, 172, 204, 0.05) 1px, transparent 1px) 0 0 / 40px 40px; }

.yd-bigmap .yd-note { margin: 6px 0 0; text-align: left; }
.yd-split .yd-ships { overflow: auto; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-content: start; padding-right: 4px; }
.yd-sc { cursor: pointer; } .yd-sc.sel { border-color: var(--amber); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(243, 154, 60, 0.45), 0 0 16px var(--amber-glow); }
.mpanel canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mpanel .mp-bg, .mpanel .mp-3d { pointer-events: none; }
.mpanel .mp-fg { cursor: grab; }

/* boost energy bar (Shift) in the status panel */
.row.boost .bar i { background: linear-gradient(90deg, var(--amber-lo), var(--amber), var(--amber-hi)); transition: width 0.12s linear; }
.row.boost.on .bar i { box-shadow: 0 0 8px var(--amber-glow); filter: brightness(1.25); }
.row.boost.lock .bar i { background: #7a4a2a; }

/* combined slot panel: the 3D ship's clickable mount markers sit above the top-view layer */
.mpanel .slot { position: absolute; z-index: 3; }
.mpanel .slot.hov { box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(255, 255, 255, 0.5); }

/* Rotate toggle in the ship views (mountPanel) */
.mp-rot { position: absolute; top: 6px; right: 8px; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; cursor: pointer;
  font: 700 12px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--glass); border: 1px solid var(--line2); }
.mp-rot i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--muted); box-sizing: border-box; }
.mp-rot.on { color: var(--amber-hi); border-color: var(--amber-lo); }
.mp-rot.on i { border-color: var(--amber); background: radial-gradient(circle, var(--amber-hi) 0 35%, transparent 45%); box-shadow: 0 0 6px var(--amber-glow); }
.mp-rot:hover { border-color: var(--amber); color: var(--text); }

.mp-tools { position: absolute; top: 6px; right: 8px; z-index: 4; display: flex; gap: 6px; }
.mp-tools .mp-rot { position: static; }

/* weapon comparison (tooltips and detail panes) */
.wcmp { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 12.5px; }
.wcmp-h { color: var(--muted); margin-bottom: 3px; } .wcmp-h b { color: var(--text); }
.wcmp-h .key { display: inline-block; padding: 0 4px; font: 700 12px var(--ui); color: #111; background: var(--amber); }
.wcmp table { width: 100%; border-collapse: collapse; }
.wcmp td { padding: 1px 4px 1px 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wcmp td:first-child { text-align: left; color: var(--muted); }
.wcmp td.was { color: var(--muted); font-weight: 500; }
.wcmp td.new { color: var(--text); font-weight: 600; }
.wcmp tr.th td { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.yd-tip { max-width: 380px; }

/* named ships: stars, class line, bonus chips (shipyard cards, HUD, yard tab) */
.stars { color: #ffc66e; letter-spacing: 1px; font-size: 0.8em; text-shadow: 0 0 6px var(--amber-glow); white-space: nowrap; }
.stars i { font-style: normal; color: rgba(255, 198, 110, 0.18); text-shadow: none; }
.shead .cls, .yd-sc .cls { display: block; font: 600 11px var(--ui); letter-spacing: 0.16em; color: var(--muted); }
.yd-sc .shead { height: auto; min-height: 34px; padding-top: 4px; padding-bottom: 4px; align-items: flex-start; }
.yd-sc .shead h3 { line-height: 1.1; }
.yd-sc.s5 { border-color: #ffc66e; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(255, 198, 110, 0.4), 0 0 18px rgba(255, 198, 110, 0.25); }
.yd-sc.s4 { border-color: var(--amber-lo); }
.yd-bonus { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 14px 0; }
.yd-bonus span { font-size: 12px; font-weight: 700; padding: 1px 7px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.yd-bonus .ok { border-color: rgba(126, 224, 122, 0.4); } .yd-bonus .bad { border-color: rgba(255, 106, 90, 0.4); }
.sname .stars { font-size: 12px; margin-left: 4px; }
.sname .cls { display: block; font: 600 11px var(--ui); font-style: normal; letter-spacing: 0.16em; color: var(--muted); }
.yd-card h4 .stars { font-size: 13px; }
.yd-sc .shead .nm { flex: 1; min-width: 0; }

/* named ships: changed mounts on the shipyard cards (wider arc / universal / size up: outlined; extra 4+ star mount: gold) */
.yd-slots i.var { outline: 2px solid #ffd27a; outline-offset: 1px; }
.yd-slots i.ex { outline: 2px solid #ffb43a; outline-offset: 1px; width: auto; padding: 0 4px; box-shadow: 0 0 8px #ffb43a88; }


/* refit, round 3 (the user's request): the stats column is gone (two columns), the ship sheet sits top left in the
   mount panel, the weapon picker opens over the right part of the mount panel */
.rx { grid-template-columns: 50% minmax(0, 1fr); }
.rx-hold, .rx-left, .rx-mods { grid-column: 2; }
.rx-slotmap { position: relative; }
.rx-btns { display: flex; gap: 8px; } .rx-btns .btn { flex: 1; }
.rx-ship { position: absolute; left: 14px; top: 40px; width: 250px; z-index: 5; padding: 10px 12px; background: rgba(6, 10, 16, 0.72); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px rgba(6, 10, 16, 0.4), inset 0 0 0 4px var(--line); backdrop-filter: blur(2px); }
.rx-ship .nm h3 { margin: 0; font: 700 21px var(--display); letter-spacing: 0.03em; color: var(--amber-hi); line-height: 1.1; text-transform: uppercase; }
.rx-ship .nm .stars { display: block; font-size: 15px; letter-spacing: 0.08em; margin-top: 2px; }
.rx-ship .nm .cls { display: block; font: 700 12px var(--ui); letter-spacing: 0.14em; color: var(--muted); margin-top: 2px; }
.rs-rows { margin-top: 8px; border-top: 1px solid var(--line2); padding-top: 4px; }
.rs-row { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; font-size: 13px; border-bottom: 1px solid rgba(140, 172, 204, 0.07); }
.rs-row span { color: var(--muted); flex: 1; }
.rs-row b { font-variant-numeric: tabular-nums; }
.rs-row.over b { color: #ff6a5a; }
.rs-row i { font-style: normal; color: var(--muted); }
.rs-row em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-row em.ok { color: #7ee07a; } .rs-row em.bad { color: #ff6a5a; } .rs-row em.warn { color: #ffd27a; }
.rx-ship.pv { border-color: var(--amber-lo); }
.rx-ship.pv .rs-row:not(.chg) { opacity: 0.55; }
.rs-bonus { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.rs-bonus .rs-h { width: 100%; font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.rs-bonus .rs-h span { color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-weight: 400; }
.rs-bonus > span { font-size: 12px; font-weight: 700; padding: 1px 6px; border: 1px solid currentColor; background: rgba(0, 0, 0, 0.3); }
.rs-bonus > span.ok { color: #7ee07a; } .rs-bonus > span.bad { color: #ff8a7a; }
.rx-picker { position: absolute; right: 12px; top: 40px; bottom: 64px; width: min(440px, 52%); z-index: 6; display: flex; flex-direction: column; background: rgba(4, 7, 11, 0.94); border: 1px solid var(--amber-lo); box-shadow: 0 0 0 1px #000, 0 10px 40px rgba(0, 0, 0, 0.7); }
.pk-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.pk-head .key { font: 700 12px var(--ui); color: #111; background: var(--amber); padding: 0 6px; }
.pk-head b { flex: 1; text-transform: capitalize; color: var(--amber-hi); font: 700 15px var(--display); letter-spacing: 0.03em; }
.pk-x { background: none; border: 1px solid var(--line2); color: var(--text); font-size: 18px; line-height: 1; width: 26px; height: 26px; cursor: pointer; }
.pk-x:hover { border-color: var(--amber); color: var(--amber-hi); }
.pk-filt { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.pk-f { font: 700 12px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 9px; color: var(--muted); background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; gap: 5px; }
.pk-f i { width: 8px; height: 8px; display: inline-block; opacity: 0.5; }
.pk-f span { opacity: 0.7; }
.pk-f.on { color: var(--amber-hi); border-color: var(--amber-lo); background: rgba(243, 154, 60, 0.12); } .pk-f.on i { opacity: 1; }
.pk-list { flex: 1; min-height: 0; overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pk-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; }
.pk-row:hover { border-color: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.pk-row.cur { border-color: var(--amber-lo); }
.pk-row.no { opacity: 0.42; cursor: not-allowed; } .pk-row.no:hover { border-color: #7a3a32; box-shadow: none; }
.pk-pic { position: relative; width: 64px; height: 64px; flex: none; border: 2px solid var(--amber-lo); background: rgba(0, 0, 0, 0.5); }
.pk-pic .wicon { width: 100%; height: 100%; }
.pk-pic .sz { position: absolute; left: 2px; top: 2px; font-size: 11px; padding: 0 3px; color: #111; font-style: normal; font-weight: 700; }
.pk-empty .pk-pic { border-style: dashed; border-color: var(--line2); }
.pk-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-txt b { font: 700 15px var(--display); letter-spacing: 0.02em; }
.pk-t { font-size: 12px; font-weight: 700; }
.pk-n { font-size: 12px; color: var(--muted); }
.pk-why { font-size: 12px; color: #ff8a7a; }
.pk-op { text-align: right; flex: none; }
.pk-op b { display: block; font: 700 24px var(--display); color: var(--amber-hi); line-height: 1; font-variant-numeric: tabular-nums; }
.pk-op span { font: 700 11px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pk-none { padding: 10px; }

/* refit, round 4 (the user's request, assets/ui/concepts/user/refit_widen_left.webp): the mount panel gets about 70% of
   the width, the right column (hold, weapon detail, modules) about 30% */
.rx { grid-template-columns: minmax(0, 1fr) clamp(360px, 30%, 600px); }
.rx-mods .rx-mod { width: 158px; }


/* hardpoint bonus chip (refit detail, picker head, comparisons) */
.hp-chip { display: inline-block; margin-left: 6px; padding: 0 6px; font: 700 11px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: #ffd27a; border: 1px solid #a8823a; background: rgba(243, 154, 60, 0.12); vertical-align: middle; white-space: nowrap; }
.rx-hpnote { margin-top: -2px; } .rx-hpnote .hp-chip { margin-left: 0; }


/* level-up cards: the perk picture full width at the top (assets/ui/perks/<id>.webp, 4:3), rarity-coloured edge */
.pcard { width: 256px; }
.pcard .ppic { order: -1; align-self: stretch; margin: -12px -14px 10px; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid color-mix(in srgb, var(--rc) 65%, transparent); background: rgba(0, 0, 0, 0.4); }
.pcard .ppic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard.epic .ppic, .pcard.rare .ppic { box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc) 35%, transparent); }
.pcard .key { z-index: 2; background: rgba(6, 10, 16, 0.7); padding: 0 6px; opacity: 1; }


/* stat explanations ([data-help], ui.js STAT_HELP) and the armor line in weapon comparisons */
[data-help] { cursor: help; text-decoration: underline dotted rgba(200, 210, 220, 0.35); text-underline-offset: 3px; }
.yd-tip.help { max-width: 340px; }
.yd-tip p.help { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--text); font-weight: 400; }
.wcmp-armor { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.wcmp-armor .ok { color: #7ee07a; } .wcmp-armor .warn { color: #ffd27a; } .wcmp-armor .bad { color: #ff8a7a; }
.wcmp-armor em { font-style: normal; color: var(--muted); }


/* HUD ship readout, 1.5x: top view with the damage overlay (ui.js drawHudShip), a label and a legend */
#status { padding: 12px 14px; gap: 14px; }
#schem-box { display: flex; flex-direction: column; gap: 4px; }
.sch-label { font: 700 12px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.sch-legend { display: flex; flex-wrap: wrap; gap: 2px 8px; width: 225px; font-size: 12px; color: var(--muted); }
.sch-legend span { display: inline-flex; align-items: center; gap: 4px; }
.sch-legend i { width: 7px; height: 7px; display: inline-block; }
#status .sname { font-size: 19px; }
#status .row { margin: 5px 0; } #status .row span { width: 44px; font-size: 14px; } #status .bar { height: 11px; }
#status .state { font-size: 14px; } #status .wlist { font-size: 14px; } #status .w i { width: 8px; height: 8px; }


/* minimap (minimap.js), top right under the sound button (audiohooks.js keeps that at top 12px, right 14px) */
#minimap { position: absolute; top: 54px; right: 14px; width: 200px; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
#minimap canvas { width: 200px; height: 200px; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
#minimap .mm-label { font: 700 11px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); text-shadow: 0 1px 2px #000; }
#minimap .mm-label span { color: var(--muted); letter-spacing: 0.08em; margin-left: 6px; }


/* weapon loading bars in the HUD status panel (the user's request): same track and column as Hull / Core / Boost */
#status .wlist { margin-top: 6px; }
#status .row.wrow { margin: 4px 0; }
#status .row.wrow span.wn { width: 132px; flex: none; display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#status .row.wrow span.wn i { width: 8px; height: 8px; flex: none; display: inline-block; }
#status .row.wrow .bar { height: 9px; }
#status .row.wrow .bar i { background: linear-gradient(90deg, #8a5a22, #d8923a); transition: width 0.12s linear; }
#status .row.wrow.ready .bar i { background: linear-gradient(90deg, var(--amber), var(--amber-hi)); box-shadow: 0 0 6px var(--amber-glow); }
#status .row.wrow.fire .bar i { background: linear-gradient(90deg, #5ab8ff, #c8ecff); box-shadow: 0 0 8px rgba(90, 184, 255, 0.6); }
#status .row.wrow.off .bar { background: rgba(255, 70, 50, 0.22); }
#status .row.wrow .bar b.segs { position: absolute; inset: 0; background-image: linear-gradient(90deg, transparent calc(100% - 2px), rgba(8, 12, 18, 0.95) calc(100% - 2px)); background-repeat: repeat-x; pointer-events: none; }
#status .row.wrow em { width: 46px; flex: none; text-align: right; font-style: normal; font-size: 12px; color: var(--muted); }
/* one column for every bar in the panel: Hull / Core / Boost labels take the weapon-name width, and leave the status gap */
#status .row:not(.wrow) > span { width: 132px; flex: none; }
#status .row:not(.wrow) > .bar { margin-right: 52px; }
#stat-lines { width: 340px; }   /* room for the weapon loading bars */

/* ---- weapon quality (weaponquality.js): amber stars like the named ships, quality colour as --qc ---- */
.wq-stars { color: #ffc66e; letter-spacing: 0.5px; font-size: 0.82em; text-shadow: 0 0 6px var(--amber-glow); white-space: nowrap; }
.wq-stars i { font-style: normal; color: rgba(255, 198, 110, 0.18); text-shadow: none; }
.wq-tile { position: absolute; left: 3px; bottom: 1px; font-size: 11px; line-height: 1; pointer-events: none; }
.wq-tile .wq-stars i { display: none; }
.yd-tile .wq-tile { left: auto; right: 6px; top: 6px; bottom: auto; font-size: 12px; }
.rx-tile.wq2, .rx-tile.wq3, .rx-tile.wq4, .rx-tile.wq5 { box-shadow: inset 0 -2px 0 var(--qc); }
.rx-tile.wq4, .rx-tile.wq5 { background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--qc) 22%, transparent), transparent 75%), rgba(0, 0, 0, 0.35); }
.yd-tile.wq2, .yd-tile.wq3, .yd-tile.wq4, .yd-tile.wq5 { box-shadow: inset 0 -2px 0 var(--qc); }
.yd-tile.wq4, .yd-tile.wq5 { background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--qc) 20%, transparent), transparent 72%), rgba(0, 0, 0, 0.32); }
.yd-tile.sel.wq2, .yd-tile.sel.wq3, .yd-tile.sel.wq4, .yd-tile.sel.wq5 { box-shadow: inset 0 0 0 2px var(--amber), inset 0 -3px 0 var(--qc), inset 0 0 24px rgba(243, 154, 60, 0.25); }
.wq { margin: 6px 0 8px; padding: 6px 8px; background: rgba(0, 0, 0, 0.3); border-left: 2px solid var(--line2); font-size: 12px; }
.wq-h { display: flex; gap: 8px; align-items: baseline; }
.wq-h .wq-stars { font-size: 13px; }
.wq-h b { font: 700 12px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; }
.wq-b { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; }
.wq-r { margin-top: 4px; color: var(--muted); } .wq-r b { color: var(--text); }
.rx-wq .wq { margin-top: 8px; }
.pk-txt .wq-stars { font-size: 12px; }
.over .over-weps { margin: 4px auto 16px; max-width: 520px; text-align: left; }
.over .ow-best { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 12px; background: var(--glass); border: 1px solid var(--line2); }
.over .ow-best > span { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); width: 100%; }
.over .ow-best em { font-style: normal; color: var(--amber-hi); margin-left: auto; }
.over .over-weps table { width: 100%; margin-top: 6px; font-size: 13px; border-collapse: collapse; }
.over .over-weps td { padding: 3px 12px; border-bottom: 1px solid var(--line); }
.over .over-weps td:last-child { text-align: right; color: var(--muted); }

/* ---- pirate hub (stationsites.js PIRATE): red station marker, "pirate space" tag, hostile pad note ---- */
#pmark { position: absolute; left: 0; top: 0; display: none; pointer-events: none; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000; }
#pmark.show { display: block; }
#pmark .lab { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
#pmark b { font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: #ff8a7a; padding: 1px 8px; background: rgba(40, 6, 4, 0.72); border: 1px solid rgba(255, 74, 58, 0.6); }
#pmark span { font: 700 13px var(--display); color: #ffc2b8; font-variant-numeric: tabular-nums; }
#pmark .arr { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: none; }
#pmark .arr::before { content: ''; position: absolute; left: 22px; top: 7px; border: 7px solid transparent; border-left: 12px solid #ff4a3a; filter: drop-shadow(0 0 4px rgba(255, 60, 40, 0.6)); }
#pmark.edge .arr { display: block; }
#pmark.edge .lab { transform: translate(-50%, -50%); }
#pmark.on .lab { top: -18px !important; left: 0 !important; }
#pzone { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: none; pointer-events: none; text-align: center; padding: 4px 18px 5px;
  background: linear-gradient(90deg, transparent, rgba(80, 8, 4, 0.75) 18%, rgba(80, 8, 4, 0.75) 82%, transparent); border-top: 1px solid rgba(255, 74, 58, 0.55); border-bottom: 1px solid rgba(255, 74, 58, 0.55); }
#pzone.show { display: block; animation: pzpulse 2.4s ease-in-out infinite; }
#pzone b { display: block; font: 700 14px var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: #ff6a56; text-shadow: 0 0 10px rgba(255, 60, 40, 0.6); }
#pzone span { font: 600 12px var(--ui); letter-spacing: 0.12em; color: #ffc2b8; }
@keyframes pzpulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
#dockhint.hostile b { color: #ff6a56; }
#dockhint.hostile { border-color: rgba(255, 74, 58, 0.6) !important; color: #ffc2b8; }

/* ---- missions (missions.js): board tab, cards, HUD tracker, log (J), target markers (cyan) ---- */
.ms-board { padding: 4px 2px 20px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.ms-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: linear-gradient(180deg, rgba(127, 224, 255, 0.05), rgba(0, 0, 0, 0.35)); border: 1px solid var(--line2); box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); }
.ms-card.ms-active { border-color: rgba(127, 224, 255, 0.55); }
.ms-top { display: flex; justify-content: space-between; align-items: center; }
.ms-type { font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: #7fe0ff; }
.ms-diff { color: #ff8a5a; letter-spacing: 1px; font-size: 12px; } .ms-diff i { font-style: normal; color: rgba(255, 138, 90, 0.18); }
.ms-card h4 { margin: 0; font: 700 17px var(--display); color: var(--amber-hi); }
.ms-fl { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.ms-obj { font-size: 13px; color: var(--text); padding: 4px 8px; border-left: 2px solid #7fe0ff; background: rgba(127, 224, 255, 0.06); }
.ms-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--muted); } .ms-meta b { color: var(--text); }
.ms-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.ms-rew { display: flex; flex-direction: column; } .ms-rew .cr { font: 700 20px var(--display); color: var(--amber-hi); }
.ms-bonus { font-size: 12px; }
.ms-foot .btn { min-width: 96px; }
.ms-foot .btn:disabled { opacity: 0.45; cursor: not-allowed; }
#overlay.mlog { display: flex; align-items: center; justify-content: center; }
.ms-log { width: min(1100px, 92vw); max-height: 84vh; overflow: auto; padding: 18px 22px; background: var(--glass); border: 1px solid var(--line2); }
.ms-loghead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; } .ms-loghead h2 { margin: 0; font: 700 24px var(--display); color: var(--amber-hi); }
.ms-recent { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 16px; font-size: 13px; }
.ms-r.ms-done b { color: #7ee07a; } .ms-r.ms-failed b { color: #ff6a56; }
#mtrack { position: absolute; top: 284px; right: 14px; width: 220px; display: none; padding: 6px 8px; background: rgba(6, 12, 18, 0.62); border: 1px solid rgba(127, 224, 255, 0.35); pointer-events: auto; cursor: pointer; font-size: 12px; }
#mtrack.show { display: block; }
#mtrack:hover { border-color: rgba(127, 224, 255, 0.7); }
#mtrack .mt-h { font: 700 11px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: #7fe0ff; margin-bottom: 3px; } #mtrack .mt-h span { color: var(--muted); letter-spacing: 0.08em; margin-left: 6px; }
#mtrack .mt-row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 3px 0; border-top: 1px solid rgba(127, 224, 255, 0.12); }
#mtrack .mt-row b { grid-column: 1 / -1; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mtrack .mt-p { color: #bff0ff; } #mtrack .mt-d { color: var(--muted); font-variant-numeric: tabular-nums; }
.msmark { position: absolute; left: 0; top: 0; display: none; pointer-events: none; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.msmark.show { display: block; }
.msmark .lab { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.msmark b { font: 700 12px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: #bff0ff; padding: 1px 7px; background: rgba(4, 20, 28, 0.72); border: 1px solid rgba(127, 224, 255, 0.6); }
.msmark span { font: 700 12px var(--display); color: #dff7ff; font-variant-numeric: tabular-nums; }
.msmark .arr { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: none; }
.msmark .arr::before { content: ''; position: absolute; left: 22px; top: 7px; border: 6px solid transparent; border-left: 11px solid #7fe0ff; filter: drop-shadow(0 0 4px rgba(127, 224, 255, 0.6)); }
.msmark.edge .arr { display: block; }
.msmark.edge .lab { transform: translate(-50%, -50%); }
.msmark.on .lab { top: -18px !important; left: 0 !important; }

/* ---- support drones HUD (drones.js): one chip per drone with a health/charge bar or the respawn countdown ---- */
#drones { position: absolute; left: 14px; bottom: 196px; display: none; flex-direction: column; gap: 3px; pointer-events: none; }
#drones.show { display: flex; }
#drones .dr { display: grid; grid-template-columns: 8px 92px 64px 52px; align-items: center; gap: 6px; padding: 2px 7px; background: rgba(6, 12, 18, 0.62); border: 1px solid var(--line); font-size: 12px; }
#drones .dr i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
#drones .dr b { font: 600 12px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#drones .bar { height: 4px; background: rgba(255, 255, 255, 0.1); } #drones .bar span { display: block; height: 100%; background: #9fd0ff; }
#drones .dr em { font-style: normal; color: var(--muted); text-align: right; }
#drones .dr.down { opacity: 0.6; } #drones .dr.down b { color: #ff8a7a; }

/* ---- weapon picker: owned vs buy (the user's request, assets/ui/concepts/user/picker_owned_vs_buy.webp) ---- */
.pk-sect { display: flex; align-items: center; gap: 8px; margin: 6px 2px 0; padding: 3px 8px; font: 700 12px var(--ui); letter-spacing: 0.18em; text-transform: uppercase; }
.pk-sect span { font-weight: 600; letter-spacing: 0.06em; opacity: 0.7; }
.pk-sect.own { color: #9fe0a8; border-left: 3px solid #6ee07a; background: linear-gradient(90deg, rgba(110, 224, 122, 0.12), transparent); }
.pk-sect.buy { color: #ffd27a; border-left: 3px solid var(--amber); background: linear-gradient(90deg, rgba(243, 154, 60, 0.14), transparent); margin-top: 10px; }
.pk-row.pk-own { border-left: 3px solid rgba(110, 224, 122, 0.7); }
.pk-row.pk-buy { border-left: 3px solid rgba(243, 154, 60, 0.7); background: linear-gradient(90deg, rgba(243, 154, 60, 0.07), rgba(0, 0, 0, 0.35) 40%); }
.pk-owned { font-style: normal; font: 700 11px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: #0c1a0e; background: #6ee07a; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.pk-price { flex: none; display: flex; flex-direction: column; align-items: center; padding: 3px 8px; border: 1px solid rgba(243, 154, 60, 0.75); background: rgba(243, 154, 60, 0.14); min-width: 72px; }
.pk-price svg { width: 14px; height: 14px; fill: none; stroke: #ffd27a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-price b { font: 700 17px var(--display); color: #ffd27a; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pk-price span { font: 600 11px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pk-row.poor .pk-price { border-color: #7a3a32; background: rgba(255, 70, 50, 0.08); } .pk-row.poor .pk-price b { color: #c07a6a; }
/* the mount readout on the slot markers (ui.js mountTip) */
.yd-tip .mt-mount { margin: 4px 0 6px; padding: 3px 6px; background: rgba(0, 0, 0, 0.3); border-left: 2px solid var(--line2); font-size: 12px; }
.yd-tip .mt-mount b { color: var(--amber-hi); }
.yd-tip .mt-tab { width: 100%; font-size: 12px; } .yd-tip .mt-tab td:last-child { text-align: right; color: var(--text); }
.pk-txt .pk-owned { align-self: flex-start; margin: 1px 0 1px; }

/* ---- refit modules panel, roomier (the user, 2026-11-21): tiles with a picture (assets/ui/modules, else the glyph), name and effect ---- */
.rx .rx-mods { display: flex; flex-direction: column; min-height: 0; max-height: 44vh; }
.rx .rx-mrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.rx .rx-mods .rx-mod { width: auto; flex-direction: row; align-items: stretch; gap: 8px; padding: 6px; min-height: 76px; }
.rx-mpic { flex: none; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.rx-mpic .ymod { width: 40px; height: 40px; } .rx-mpic .ymod.mpic { width: 100%; height: 100%; object-fit: cover; }
.rx-mtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rx-mtxt b { font-size: 13px; } .rx-mtxt span { font-size: 12px; color: var(--muted); line-height: 1.25; } .rx-mtxt em { font-style: normal; font-size: 12px; color: var(--amber); margin-top: auto; }
.rx .rx-mods .rx-mod.empty { min-height: 76px; }
.rx-msect { grid-column: 1 / -1; font: 700 11px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.ymod.mpic { object-fit: cover; }

/* module pictures at the top of module tooltips (2026-11-21) */
.yd-tip .tip-pic { margin: -8px -12px 8px; height: 150px; display: flex; align-items: center; justify-content: center; background: #0a1322; border-bottom: 1px solid var(--line); overflow: hidden; }
.yd-tip .tip-pic .ymod { width: 56px; height: 56px; } .yd-tip .tip-pic .ymod.mpic { width: 150px; height: 150px; object-fit: cover; }

/* mission result screen (missions.js showMissionResult, 2026-11-21) */
.ms-res { width: min(620px, 92vw); max-height: 88vh; overflow: auto; text-align: center; border-color: var(--amber-lo); }
.ms-res h2 { margin: 0 0 12px; font: 700 30px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-hi); text-shadow: 0 0 18px rgba(255, 190, 90, 0.45); }
.ms-res.allfail { width: min(480px, 92vw); border-color: rgba(255, 106, 86, 0.6); } .ms-res.allfail h2 { color: #ff8a7a; text-shadow: 0 0 18px rgba(255, 90, 70, 0.4); }
.mr-card { margin: 0 0 12px; padding: 12px 14px; text-align: left; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-left: 3px solid var(--amber); }
.mr-card.bad { border-left-color: #ff6a56; padding: 9px 12px; }
.mr-head { display: flex; align-items: center; gap: 12px; } .mr-head > div { flex: 1; } .mr-head h3 { margin: 0; font: 700 18px var(--display); color: var(--text); }
.mr-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; font-size: 20px; color: var(--amber-hi); background: rgba(255, 190, 90, 0.08); border: 1px solid var(--amber-lo); }
.mr-card.bad .mr-icon { color: #ff8a7a; border-color: rgba(255, 106, 86, 0.5); background: rgba(255, 90, 70, 0.08); }
.mr-tag { font: 700 12px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: #ff8a7a; }
.mr-line { margin: 10px 0; font-size: 15px; color: #a8f0a0; } .mr-card.bad .mr-line { color: #ffb0a4; margin: 7px 0; font-size: 14px; }
.mr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.mr-stat { padding: 5px 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); } .mr-stat span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); } .mr-stat b { font-size: 15px; }
.mr-reward { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.mr-cr b { display: block; font: 700 26px var(--display); color: var(--amber-hi); } .mr-cr i, .mr-total i { font-style: normal; font-size: 0.6em; margin-left: 3px; color: var(--muted); }
.mr-wpn { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--qc); box-shadow: 0 0 14px -4px var(--qc); }
.mr-wpn .wicon { width: 64px; height: 64px; object-fit: contain; } .mr-wpn b { font: 700 15px var(--display); }
.mr-total { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 4px 0 14px; } .mr-total b { font: 700 22px var(--display); } .mr-total .mr-to { color: var(--amber-hi); min-width: 5ch; text-align: left; } .mr-total > i { font-style: normal; color: var(--muted); }
.mr-stat b { color: var(--text); } .mr-wpn .small { display: block; } .mr-card.bad .mr-stat b { color: #ffb0a4; }

/* ship price chip (shipyard.js shipPriceChip, 2026-11-21) */
.yd-pchip { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 4px 10px 5px; background: rgba(255, 190, 90, 0.1); border: 1px solid var(--amber-lo); box-shadow: inset 0 0 12px rgba(255, 190, 90, 0.08); }
.yd-pchip b { font: 700 26px/1.05 var(--display); color: var(--amber-hi); text-shadow: 0 0 12px rgba(255, 190, 90, 0.35); white-space: nowrap; } .yd-pchip b i { font-style: normal; font-size: 0.55em; margin-left: 3px; color: var(--amber); }
.yd-pchip small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.yd-pchip.gain { background: rgba(120, 230, 120, 0.08); border-color: rgba(120, 230, 120, 0.45); } .yd-pchip.gain b { color: #8ef08a; text-shadow: 0 0 12px rgba(120, 230, 120, 0.35); } .yd-pchip.gain b i { color: #6cc86a; }
.yd-sc.poor .yd-pchip b { color: #ff8a7a; text-shadow: none; }
.yd-cbox .yd-pchip { align-items: flex-end; } .yd-cbox .yd-pchip b { font-size: 20px; }

/* Weapons & modules / Hold: ship-sized item cards (shipyard.js gearTab, 2026-11-21) */
.yd-gear.one { grid-template-columns: 1fr; }
.yd-icards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-content: start; margin-bottom: 14px; }
.yd-ic { cursor: default; } .yd-ic .shead .nm { flex: 1; min-width: 0; } .yd-ic .shead h3 { font-size: 18px; } .yd-ic .shead .tier { font-size: 12px; }
.yd-ic .ic-view { position: relative; margin: 8px 12px 4px; aspect-ratio: 440 / 200; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 55%, rgba(120, 160, 200, 0.08), transparent 70%), rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.yd-ic .ic-view .wicon { width: 70%; height: 92%; object-fit: contain; } .yd-ic .ic-view .ymod { width: 46%; height: 92%; } .yd-ic .ic-view .ymod.mpic { width: auto; height: 100%; aspect-ratio: 1; object-fit: cover; }
.yd-ic .ic-view .sz { position: absolute; left: 6px; top: 6px; font-style: normal; color: #111; font-weight: 700; font-size: 12px; padding: 0 6px; } .yd-ic .ic-view .sz.mod { background: #9fd0ff; }
.yd-ic .ic-view .n { position: absolute; right: 8px; top: 4px; font: 700 20px var(--display); text-shadow: 0 1px 2px #000; }
.yd-ic .rx-table { margin: 0 14px; width: calc(100% - 28px); font-size: 13px; } .yd-ic .rx-table td { padding: 2px 0; }
.yd-ic .ic-desc { color: var(--text); font-weight: 500; padding-bottom: 6px !important; text-align: left !important; }
.yd-ic .wq { margin: 6px 14px 0; } .yd-ic .rx-label { margin: 8px 14px 2px; } .yd-ic .ic-fit { font-size: 12px; }
.yd-ic.poor .ic-view img, .yd-ic.poor .ic-view .ymod { opacity: 0.45; }
.yd-ic.wq2, .yd-ic.wq3, .yd-ic.wq4, .yd-ic.wq5 { border-bottom: 2px solid var(--qc); }
/* quality warms the card toward amber (all star-rated cards, 2026-11-21): 1 star neutral, 5 stars ~18% amber */
.amb1 { --amb: 0; } .amb2 { --amb: 0.04; } .amb3 { --amb: 0.08; } .amb4 { --amb: 0.13; } .amb5 { --amb: 0.18; }
.amb2, .amb3, .amb4, .amb5 { background-image: linear-gradient(165deg, rgba(243, 154, 60, var(--amb)), rgba(243, 154, 60, calc(var(--amb)*0.45)) 65%, rgba(243, 154, 60, calc(var(--amb)*0.25))) !important; }
.yd-gear.one { grid-template-columns: minmax(0, 1fr); } .yd-gear.one .yd-grids { min-width: 0; }
.yd-ic .ic-view { overflow: hidden; } .yd-ic .ic-view .ymod.mpic { width: 44%; height: auto; max-height: 100%; aspect-ratio: 1; }

/* weapon cards tinted by type (the user, 2026-11-21): ballistic yellow, energy blue, missile green */
.yd-ic.wt-ballistic { background-color: rgba(232, 193, 90, 0.07); } .yd-ic.wt-energy { background-color: rgba(90, 184, 255, 0.07); } .yd-ic.wt-missile { background-color: rgba(126, 224, 122, 0.07); }
.yd-ic.wt-ballistic .ic-view { background-color: rgba(232, 193, 90, 0.05); } .yd-ic.wt-energy .ic-view { background-color: rgba(90, 184, 255, 0.05); } .yd-ic.wt-missile .ic-view { background-color: rgba(126, 224, 122, 0.05); }
/* size badge with 1-3 bars on the right (ui.js sizeBadge) */
i.sz.szb { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; padding: 1px 6px; font-size: 14px; line-height: 1.15; margin-right: 12px; border-radius: 2px; }
.szb u { position: absolute; left: calc(100% - 1px); width: 9px; height: 3px; border-radius: 0 3px 3px 0; background: inherit; }
.szb.n1 u { top: calc(50% - 1.5px); }
.szb.n2 u:nth-of-type(1) { top: 28%; } .szb.n2 u:nth-of-type(2) { top: calc(72% - 3px); }
.szb.n3 u:nth-of-type(1) { top: 16%; } .szb.n3 u:nth-of-type(2) { top: calc(50% - 1.5px); } .szb.n3 u:nth-of-type(3) { top: calc(84% - 3px); }
.yd-ic .ic-view .sz.szb { font-size: 16px; padding: 2px 8px; }
.rx-tile .sz.szb, .pk-pic .sz.szb { font-size: 12px; padding: 0 4px; min-width: 1.5em; color: #111; font-style: normal; font-weight: 700; }
.szb u { display: block; }
/* stronger type tint, pill bars (2026-11-21 follow-up) */
.yd-ic.wt-ballistic { background-color: rgba(232, 193, 90, 0.1); } .yd-ic.wt-energy { background-color: rgba(90, 184, 255, 0.1); } .yd-ic.wt-missile { background-color: rgba(126, 224, 122, 0.1); }
.szb u { width: 11px; height: 4px; border-radius: 0 4px 4px 0; }
.szb.n1 u { top: calc(50% - 2px); } .szb.n2 u:nth-of-type(1) { top: 25%; } .szb.n2 u:nth-of-type(2) { top: calc(75% - 4px); }
.szb.n3 u:nth-of-type(1) { top: 12%; } .szb.n3 u:nth-of-type(2) { top: calc(50% - 2px); } .szb.n3 u:nth-of-type(3) { top: calc(88% - 4px); }
.rx-tile .szb u, .pk-pic .szb u { width: 7px; height: 3px; }
/* 2026-11-21, the user: only the picture carries the weapon type colour; the card itself runs from blue (1 star) to amber (5 stars) */
.yd-ic.wt-ballistic, .yd-ic.wt-energy, .yd-ic.wt-missile { background-color: rgba(0, 0, 0, 0.3); }
.yd-ic.wt-ballistic .ic-view { background: radial-gradient(ellipse at 50% 55%, rgba(232, 193, 90, 0.2), rgba(232, 193, 90, 0.07) 75%), rgba(0, 0, 0, 0.35); border-color: rgba(232, 193, 90, 0.3); }
.yd-ic.wt-energy .ic-view { background: radial-gradient(ellipse at 50% 55%, rgba(90, 184, 255, 0.2), rgba(90, 184, 255, 0.07) 75%), rgba(0, 0, 0, 0.35); border-color: rgba(90, 184, 255, 0.3); }
.yd-ic.wt-missile .ic-view { background: radial-gradient(ellipse at 50% 55%, rgba(126, 224, 122, 0.2), rgba(126, 224, 122, 0.07) 75%), rgba(0, 0, 0, 0.35); border-color: rgba(126, 224, 122, 0.3); }
.amb1 { --ambc: 90, 150, 230; --amb: 0.1; } .amb2 { --ambc: 128, 151, 188; --amb: 0.08; } .amb3 { --ambc: 167, 152, 145; --amb: 0.08; } .amb4 { --ambc: 205, 153, 103; --amb: 0.12; } .amb5 { --ambc: 243, 154, 60; --amb: 0.18; }
.amb1, .amb2, .amb3, .amb4, .amb5 { background-image: linear-gradient(165deg, rgba(var(--ambc), var(--amb)), rgba(var(--ambc), calc(var(--amb)*0.45)) 65%, rgba(var(--ambc), calc(var(--amb)*0.25))) !important; }
/* picker rows: the weapon type colour on the picture only (the user, 2026-11-21) */
.pk-pic.wt-ballistic { background: radial-gradient(ellipse at 50% 55%, rgba(232, 193, 90, 0.24), rgba(232, 193, 90, 0.08) 75%), rgba(0, 0, 0, 0.35); }
.pk-pic.wt-energy { background: radial-gradient(ellipse at 50% 55%, rgba(90, 184, 255, 0.24), rgba(90, 184, 255, 0.08) 75%), rgba(0, 0, 0, 0.35); }
.pk-pic.wt-missile { background: radial-gradient(ellipse at 50% 55%, rgba(126, 224, 122, 0.24), rgba(126, 224, 122, 0.08) 75%), rgba(0, 0, 0, 0.35); }

/* blueprint ship pictures (shipyard.js hullPreviews, 2026-11-21) */
/* (blueprint navy background removed: the ship pictures are full colour again) */

/* ship cards about twice as big for the side + top views with mounts (the user, 2026-11-21) */
.yd-split .yd-ships { grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); }
.yd-sc canvas, .yd-own canvas { aspect-ratio: 880 / 720; }

/* run goal and stages (piratebase.js, 2026-11-21) */
#basehud { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); display: none; pointer-events: none; text-align: center; padding: 3px 16px 4px; background: rgba(8, 12, 18, 0.62); border: 1px solid var(--line2); }
#basehud.show { display: block; }
#basehud .st { display: block; font: 700 11px var(--ui); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
#basehud b { display: block; font: 700 24px var(--display); letter-spacing: 0.06em; color: var(--amber-hi); font-variant-numeric: tabular-nums; line-height: 1.05; }
#basehud .ob { display: block; font: 600 12px var(--ui); letter-spacing: 0.08em; color: var(--text); }
#basehud.low b { color: #ff8a5a; } #basehud.over b { color: #ff4a3a; animation: pzpulse 1.2s ease-in-out infinite; } #basehud.done b { color: #9fe4ff; font-size: 18px; }
#pzone { top: 116px; }
#bossbar { position: absolute; left: 50%; top: 168px; transform: translateX(-50%); width: min(460px, 60vw); display: none; pointer-events: none; }
#bossbar.show { display: block; }
#bossbar .bh { display: flex; justify-content: space-between; align-items: baseline; font: 700 12px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: #ff8a7a; text-shadow: 0 1px 2px #000; }
#bossbar .bh span { color: #ffc2b8; letter-spacing: 0.08em; }
#bossbar .bb { height: 10px; margin-top: 3px; background: rgba(40, 6, 4, 0.75); border: 1px solid rgba(255, 74, 58, 0.6); }
#bossbar .bb i { display: block; height: 100%; background: linear-gradient(90deg, #ff3a2a, #ff8a4a); box-shadow: 0 0 10px rgba(255, 70, 40, 0.6); transition: width 0.2s; }
#portalmark { position: absolute; left: 0; top: 0; display: none; pointer-events: none; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000; }
#portalmark.show { display: block; }
#portalmark .lab { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
#portalmark b { font: 700 12px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: #bfeaff; padding: 1px 8px; background: rgba(4, 20, 40, 0.75); border: 1px solid rgba(90, 184, 255, 0.7); }
#portalmark span { font: 700 13px var(--display); color: #dff4ff; font-variant-numeric: tabular-nums; }
#portalmark .arr { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: none; }
#portalmark .arr::before { content: ''; position: absolute; left: 22px; top: 7px; border: 7px solid transparent; border-left: 12px solid #5ab8ff; filter: drop-shadow(0 0 4px #5ab8ff); }
#portalmark.edge .arr { display: block; }
#warp { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 0.9s ease;
  background: radial-gradient(ellipse at 50% 50%, rgba(220, 240, 255, 0.98), rgba(90, 150, 255, 0.95) 40%, rgba(20, 10, 60, 0.98) 100%); }
#warp.in { opacity: 1; } #warp.out { opacity: 0; }
#warp div { text-align: center; color: #0a1424; }
#warp span { display: block; font: 700 22px var(--ui); letter-spacing: 0.6em; text-transform: uppercase; }
#warp b { display: block; font: 700 140px/1 var(--display); text-shadow: 0 0 40px rgba(255, 255, 255, 0.9); }
#warp em { display: block; font: 600 18px var(--ui); font-style: normal; letter-spacing: 0.12em; }
#notes { top: 212px; }   /* below the stage timer, pirate-space tag and boss bar (piratebase.js) */

/* Weapons & modules / Hold: your ship's top view on the left, the cards on the right (2026-11-21) */
.yd-gear.withmap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
.yd-gmap { position: sticky; top: 0; height: min(78vh, 760px); display: flex; flex-direction: column; }
.yd-gmap .mp-host { flex: 1; min-height: 0; position: relative; }
.yd-gear.withmap .yd-icards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.yd-slotchip { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 6px 8px 6px 12px; background: rgba(243, 154, 60, 0.12); border: 1px solid var(--amber-lo); font-size: 13px; }
.yd-slotchip b { color: var(--amber-hi); } .yd-slotchip em { font-style: normal; color: var(--muted); }
.yd-slotchip button { margin-left: auto; width: 26px; height: 26px; border: 1px solid var(--amber-lo); background: rgba(0, 0, 0, 0.3); color: var(--amber-hi); font: 700 16px var(--ui); cursor: pointer; }
.yd-slotchip button:hover { border-color: var(--amber); }
.yd-ic.noop { opacity: 0.55; } .yd-ic.noop .yd-pr .small::after { content: ' · not enough ordnance'; color: #ff8a7a; }

/* target readout, bottom right (ui.js updateTarget, 2026-11-21): the left ship panel's look, smaller */
#target { position: absolute; right: 14px; bottom: 36px; display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; background: var(--glass); border: 1px solid var(--line2);
  box-shadow: inset 0 0 0 3px var(--glass), inset 0 0 0 4px var(--line); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
#target.show { opacity: 1; transform: none; }
#target canvas { width: 96px; height: 120px; display: block; }
#target .tg-lines { width: 190px; font-size: 12px; }
#target .sname { font: 700 15px var(--display); color: #ff9a86; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#target .tg-tags { display: flex; gap: 4px; margin: 2px 0 3px; } #target .tg-tags span { padding: 0 5px; font: 700 11px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; }
#target .tg-pir { background: rgba(255, 90, 70, 0.2); color: #ff8a7a; } #target .tg-elite { background: rgba(255, 198, 110, 0.18); color: var(--amber-hi); text-transform: none !important; letter-spacing: 0 !important; } #target .tg-mark { background: rgba(255, 230, 120, 0.2); color: #ffe27a; }
#target .row { display: flex; align-items: center; gap: 6px; margin: 3px 0; } #target .row span { width: 34px; color: var(--muted); } #target .row .bar { flex: 1; height: 8px; } #target .row em { width: 34px; text-align: right; font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
#target .tg-meta { display: flex; justify-content: space-between; margin: 4px 0; color: var(--muted); } #target .tg-meta b { color: var(--text); }
#target .tg-w div { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); } #target .tg-w i { width: 7px; height: 7px; flex: none; }
#target .tg-w div.off { color: #ff8a7a; } #target .tg-w em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

/* trade lane hint (lanes.js, 2026-11-22) */
#lanehint { position: absolute; left: 50%; top: 118px; transform: translateX(-50%); display: none; gap: 8px; align-items: baseline; padding: 3px 12px; background: rgba(6, 20, 30, 0.6); border: 1px solid rgba(110, 210, 255, 0.5); pointer-events: none; font-size: 12px; }
#lanehint.show { display: flex; } #lanehint b { font: 700 12px var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: #8fdcff; } #lanehint span { color: #d8f2ff; }

/* minimum font size one step up (the user, 2026-11-22: "please make the minimum font size one size bigger"): every rule
   below 11 px went to 11 px and 11-11.5 px to 12 px across this file (except the UI window's title/menu block, which
   it updates itself) and the starter pick; canvas text on the blueprint cards was enlarged the same way (shipyard.js). */
/* mission givers twice as big on the board, the log and the result screen (the user: "make the portraits twice the size") */
#overlay .gv-row img { width: 88px; height: 114px; }
#overlay .gv-row .gv-t b { font-size: 17px; } #overlay .gv-row .gv-t i { font-size: 13px; }
#overlay .gv-head { width: 76px; height: 98px; }

/* hardpoint readout (mountTip): the hardpoint line, and base → with-bonus values */
.mt-hp { margin: 3px 0 2px; padding: 2px 6px; font: 700 12px var(--ui); color: #ffd27a; border-left: 2px solid #ffc84a; background: rgba(255, 200, 74, 0.08); }
.mt-tab .was { color: var(--muted); } .mt-tab .hpv { color: #ffc84a; }
.hp-tag { display: inline-block; padding: 0 3px; font: 800 11px var(--ui); color: #16120a; background: #ffc84a; border-radius: 2px; vertical-align: 1px; }
