.wr-entry { flex-shrink: 0; padding: 12px 16px; background: #131b29; color: #eee9df; border: 0; border-left: 3px solid #ef3b2d; font: 11px monospace; letter-spacing: .1em; text-align: left; cursor: pointer; min-height: 44px; }
#weaponResearchPanel { --wr-accent: #60d9ff; position: absolute; inset: 16px; z-index: 450; display: flex; flex-direction: column; background: #05070f; border: 1px solid #334057; color: #eee9df; pointer-events: auto; overflow: hidden; box-shadow: 0 20px 70px #000b; }
#weaponResearchPanel[data-tree="torpedo"] { --wr-accent: #ff934f; }
#weaponResearchPanel * { box-sizing: border-box; }
#weaponResearchPanel button, #weaponResearchPanel select { font: 11px monospace; letter-spacing: .06em; min-height: 44px; padding: 8px 12px; color: #eee9df; background: #111722; border: 1px solid #344054; cursor: pointer; }
#weaponResearchPanel button:disabled { color: #6b778a; border-color: #222d3c; cursor: not-allowed; }
#weaponResearchPanel button:focus-visible, #weaponResearchPanel select:focus-visible { outline: 2px solid var(--wr-accent); outline-offset: -3px; }
.wr-header { flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-bottom: 1px solid #243043; }
.wr-header h2 { font: 600 clamp(17px, 2.3vw, 30px) 'Arial Narrow', sans-serif; letter-spacing: .06em; margin: 7px 0 0; }
.wr-header h2 span { color: #ef3b2d; }
.wr-eyebrow { font: 9px monospace; letter-spacing: .14em; color: #95a1b6; }
.wr-budget { margin-left: auto; text-align: right; font: 12px monospace; }
.wr-budget strong { color: var(--wr-accent); display: block; }
.wr-budget small { display: block; color: #8c9bb1; font-size: 9px; margin-top: 7px; }
#wrClose { font-size: 24px !important; min-width: 44px; }
.wr-toolbar { flex-shrink: 0; display: flex; align-items: center; gap: 24px; padding: 10px 22px; border-bottom: 1px solid #243043; font: 10px monospace; }
.wr-tabs { display: flex; gap: 6px; }
.wr-tabs button[aria-pressed="true"] { border-bottom: 2px solid #ef3b2d !important; background: #1c202b !important; }
.wr-toolbar label { display: flex; gap: 8px; align-items: center; }
#wrDockState { margin-left: auto; color: #96a6bc; font-size: 9px; }
.wr-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
.wr-map-wrap { position: relative; min-width: 0; min-height: 0; background-image: linear-gradient(#2330471c 1px, transparent 1px), linear-gradient(90deg, #2330471c 1px, transparent 1px); background-size: 40px 40px; overflow: hidden; }
#wrMap { width: 100%; height: 100%; touch-action: none; user-select: none; display: block; }
.wr-trace { fill: none; stroke: #273449; stroke-width: 1.2; }
.wr-trace.energized { stroke: var(--wr-accent); opacity: .7; }
.wr-node { cursor: pointer; outline: none; }
.wr-chip { fill: #101722; stroke: #455066; stroke-width: 1.3; }
.wr-pins { fill: none; stroke: #455066; stroke-width: 1; }
.wr-icon { fill: none; stroke: #9aa6b9; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: bevel; }
.wr-node.owned .wr-chip, .wr-node.owned .wr-pins, .wr-node.owned .wr-icon { stroke: var(--wr-accent); }
.wr-node.available .wr-chip { stroke: #eee9df; }
.wr-node.active .wr-chip { fill: #162738; stroke-width: 2; }
.wr-selection { stroke: #ef3b2d; stroke-width: 2; fill: none; }
.wr-node:focus-visible .wr-chip { stroke: #fff; stroke-width: 3; }
.wr-node-label { fill: #dddfe5; font: 11px sans-serif; }
.wr-node-cost { fill: #8596ad; font: 9px monospace; letter-spacing: .06em; }
.wr-node.owned .wr-node-cost { fill: var(--wr-accent); }
.wr-map-tools { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 5px; }
.wr-map-caption { position: absolute; right: 14px; bottom: 18px; color: #748299; font: 8px/1.8 monospace; pointer-events: none; }
.wr-details { border-left: 1px solid #273449; padding: 22px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.wr-details h3 { margin: 12px 0; font-size: 23px; font-weight: 500; }
.wr-details h4 { font: 10px monospace; letter-spacing: .12em; margin: 22px 0 12px; }
.wr-details p { font-size: 12px; line-height: 1.65; margin: 10px 0; overflow-wrap: anywhere; }
.wr-muted { color: #91a0b7; font-size: 10px !important; }
#wrNodeState { font: 10px/1.6 monospace; color: var(--wr-accent); }
.wr-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
#wrBuy:not(:disabled) { background: #ef3b2d; border-color: #ef3b2d; }
#wrFeedback { color: #f4c99a; min-height: 20px; font-size: 11px; }
.wr-loadout { padding-top: 4px; border-top: 1px solid #273449; }
#wrLoadout { font: 11px/1.8 monospace; white-space: pre-line; color: #b6c5d8; margin-bottom: 10px; overflow-wrap: anywhere; }
#wrPreview { width: 100%; display: block; border: 1px solid #273449; }
#wrPlay { width: 100%; margin-top: 6px; }
#wrStats { font: 10px/1.6 monospace; }
#wrStats > div { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid #202c3e; }
#wrStats > div > span { overflow-wrap: anywhere; }
#wrStats > div > span:last-child { color: var(--wr-accent); }
@media (max-width: 850px) {
  #weaponResearchPanel { inset: 8px; }
  .wr-main { grid-template-columns: minmax(0, 1fr) 280px; }
  .wr-header { padding: 12px; gap: 8px; }
  .wr-toolbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .wr-details { padding: 14px; }
  .wr-map-caption { display: none; }
}
@media (max-width: 600px) {
  .wr-main { display: flex; flex-direction: column; overflow-y: auto; }
  .wr-map-wrap { flex: 0 0 390px; }
  .wr-details { overflow: visible; border-left: 0; border-top: 1px solid #273449; }
  .wr-budget { font-size: 10px; }
  .wr-header h2 { font-size: 16px; }
  .wr-eyebrow { font-size: 8px; }
  #wrDockState { flex-basis: 100%; }
}
@media (max-height: 500px) and (min-width: 601px) {
  .wr-header { padding: 6px 12px; }
  .wr-header h2 { font-size: 17px; margin: 2px 0; }
  .wr-toolbar { padding: 4px 12px; }
}
