/* ==========================================================================
   🧪 tech.css - 마법 연구소 & 테크트리 (자동 상자 가속 및 영구 특성 연구)
   ========================================================================== */

.tech-tab-container {
  padding: 12px 10px 80px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  height: 100%;
}

/* 1. 상단 연구소 대표 헤더 배너 */
.tech-header-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.tech-header-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tech-emblem-box {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 35%, #0284c7 0%, #0369a1 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.tech-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tech-header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tech-header-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.tech-total-progress-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
}

.tech-header-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

.tech-header-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.25);
  padding: 3px 7px;
  border-radius: 6px;
  margin-top: 2px;
}

/* 2. 연구 목록 그리드 */
.tech-nodes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 연구 카드 개별 스타일 */
.tech-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  position: relative;
}

.tech-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* ⚡ 자동 상자 가속 핵심 카드 강조 스타일 */
.tech-card.card-featured {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(254, 240, 138, 0.2);
}

.tech-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tech-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-card-icon-box {
  width: 40px;
  height: 40px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.tech-card.card-featured .tech-card-icon-box {
  border-color: rgba(245, 158, 11, 0.5);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.tech-card-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tech-card-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-card-name {
  font-size: 0.85rem;
  font-weight: 900;
  color: #f1f5f9;
}

.tech-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 4px;
}

.badge-core { background: #b45309; color: #fef08a; }
.badge-gold { background: #854d0e; color: #fef08a; }
.badge-combat { background: #991b1b; color: #fca5a5; }
.badge-forge { background: #475569; color: #cbd5e1; }

.tech-card-level-badge {
  font-size: 0.72rem;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 8px;
}

.tech-card.card-featured .tech-card-level-badge {
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.15);
}

.tech-card-desc {
  font-size: 0.66rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* 단계별 진행도 프로그레스 바 */
.tech-level-dots-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tech-level-dot {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  transition: all 0.25s ease;
}

.tech-level-dot.active {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.tech-card.card-featured .tech-level-dot.active {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

/* 수치 비교 및 강화 액션 영역 */
.tech-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  padding: 8px 10px;
  gap: 8px;
}

.tech-effect-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tech-cur-effect {
  font-size: 0.72rem;
  font-weight: 800;
  color: #e2e8f0;
}

.tech-next-effect {
  font-size: 0.65rem;
  font-weight: 800;
  color: #4ade80;
}

.btn-tech-upgrade {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  transition: all 0.15s ease;
  flex-shrink: 0;
  min-width: 110px;
}

.tech-card.card-featured .btn-tech-upgrade {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.btn-tech-upgrade:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-tech-upgrade:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-tech-upgrade:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.6);
  box-shadow: none;
}

.tech-cost-sub {
  font-size: 0.58rem;
  font-weight: 700;
  color: #fef08a;
  margin-top: 2px;
}

.btn-tech-upgrade.maxed {
  background: rgba(100, 116, 139, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: default;
  box-shadow: none;
}

/* ============================================================================
   🏛️ 연구실 4곳 탭 + 사다리형 단계 목록
   ============================================================================ */
.tech-header-card { border-color: var(--lab-color, rgba(56, 189, 248, 0.4)); }

.lab-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0 10px;
}
.lab-tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px; padding: 6px 2px; cursor: pointer; color: #94a3b8;
}
.lab-tab-icon { font-size: 18px; line-height: 1.1; }
.lab-tab-name { font-size: 11px; font-weight: 800; }
.lab-tab-prog { font-size: 9px; font-weight: 700; opacity: 0.8; }
.lab-tab.active {
  color: #fff;
  border-color: var(--lab-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 10px color-mix(in srgb, var(--lab-color) 45%, transparent);
}

/* 2줄 사다리: 좌우 두 개의 레일 + 층마다 카드 2장 + 층 사이 가로대 */
.lab-ladder2 { position: relative; padding: 4px 0 14px; }
.ladder2-rail {
  position: absolute; top: 0; bottom: 0; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #475569, #334155);
}
.ladder2-rail.center { left: 50%; transform: translateX(-50%); }
.ladder2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; z-index: 1; }
.ladder2-cross { position: relative; height: 26px; }
.ladder2-cross::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px;
  transform: translateY(-50%); background: #334155; border-radius: 2px;
}
.ladder2-cross.lit::before { background: var(--lab-color); box-shadow: 0 0 8px var(--lab-color); }
.ladder2-cross-node {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #94a3b8; background: #1e293b; border: 2px solid #475569;
}
.ladder2-cross.lit .ladder2-cross-node { background: var(--lab-color); border-color: #fff; color: #0f172a; }

.ladder-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 8px; margin: 0; min-width: 0;
}
.ladder-card-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.ladder-card .tech-card-icon-box { width: 34px; height: 34px; font-size: 15px; }
.ladder-card .tech-card-name { font-size: 12px; line-height: 1.25; }
.ladder-card .tech-effect-box { display: flex; flex-direction: column; gap: 2px; font-size: 10px; }
.ladder-card .btn-tech-upgrade { width: 100%; }
.ladder-card.current { border-color: var(--lab-color); }
.ladder-card.done { border-color: #4ade80; }
.ladder-card.locked { opacity: 0.55; filter: grayscale(0.5); }
.ladder-lock-note { font-size: 10px; font-weight: 700; color: #94a3b8; }

/* 내용이 길어져도 헤더/탭/사다리가 찌그러지지 않게 (스크롤로 처리) */
.tech-tab-container > * { flex-shrink: 0; }
.tech-header-card { min-height: 64px; }


/* ==========================================================================
   연구소 리뉴얼: 본관(슬롯/부산물) + 연구 의뢰 + 연구 지도 + 노드 상세
   ========================================================================== */
.lab-root { display: flex; flex-direction: column; gap: 10px; }
.lab-hq {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1.5px solid rgba(56, 189, 248, 0.35); border-radius: 14px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.lab-hq-top { display: flex; justify-content: space-between; align-items: center; }
.lab-hq-title { font-size: 14px; font-weight: 900; color: #e0f2fe; }
.lab-currency { display: flex; gap: 6px; }
.lab-chip { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 9999px; background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255, 255, 255, 0.14); color: #fde68a; }
.lab-stock { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; background: rgba(15, 23, 42, 0.6); border-radius: 10px; padding: 7px 8px; }
.lab-stock-text { display: flex; flex-direction: column; gap: 1px; }
.lab-stock-text strong { font-size: 12px; color: #e2e8f0; }
.lab-stock-text small { font-size: 9.5px; color: #94a3b8; }
.lab-stock-bar { grid-column: 1 / 2; height: 6px; background: #1e293b; border-radius: 3px; overflow: hidden; }
.lab-stock-bar > div { height: 100%; background: linear-gradient(90deg, #34d399, #38bdf8); }
.lab-stock .lab-btn { grid-row: 1 / 3; grid-column: 2 / 3; }
.lab-slots { display: flex; flex-direction: column; gap: 6px; }
.lab-slot { border-radius: 10px; padding: 8px; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); }
.lab-slot.empty, .lab-slot.locked { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #94a3b8; border-style: dashed; }
.lab-slot small { font-size: 10px; font-weight: 600; opacity: 0.85; margin-left: auto; }
.lab-slot.working { border-color: var(--lab-color); box-shadow: 0 0 10px color-mix(in srgb, var(--lab-color) 30%, transparent); display: flex; flex-direction: column; gap: 6px; }
.lab-slot-head { display: flex; align-items: center; gap: 8px; }
.lab-slot-icon { font-size: 20px; }
.lab-slot-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.lab-slot-title strong { font-size: 12px; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-slot-title small { margin: 0; font-size: 10px; color: var(--lab-color); font-weight: 800; }
.lab-slot-timer { font-size: 12px; color: #fde68a; font-variant-numeric: tabular-nums; }
.lab-slot-bar { height: 7px; background: #1e293b; border-radius: 4px; overflow: hidden; }
.lab-slot-fill { height: 100%; background: linear-gradient(90deg, var(--lab-color), #fff); transition: width 0.9s linear; }
.lab-slot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lab-btn {
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(51, 65, 85, 0.85); color: #e2e8f0;
  border-radius: 9px; padding: 7px 8px; font-size: 11px; font-weight: 800; cursor: pointer;
}
.lab-btn small { font-size: 10px; opacity: 0.9; margin: 0; }
.lab-btn.primary { background: linear-gradient(180deg, #fbbf24, #d97706); color: #1c1917; border-color: #92400e; }
.lab-btn:disabled { opacity: 0.45; cursor: default; }

.lab-quests { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.lab-section-title { font-size: 12px; font-weight: 900; color: #e2e8f0; }
.lab-section-title small { font-size: 9.5px; font-weight: 600; color: #94a3b8; margin-left: 6px; }
.lab-quest { display: flex; align-items: center; gap: 8px; background: rgba(30, 41, 59, 0.7); border-radius: 9px; padding: 6px 8px; }
.lab-quest.ready { box-shadow: inset 0 0 0 1.5px #fbbf24; }
.lab-quest.claimed { opacity: 0.5; }
.lab-quest-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lab-quest-main strong { font-size: 11.5px; color: #f1f5f9; }
.lab-quest-main small { font-size: 9.5px; color: #94a3b8; }
.lab-quest-bar { height: 5px; background: #0f172a; border-radius: 3px; overflow: hidden; }
.lab-quest-bar > div { height: 100%; background: linear-gradient(90deg, #38bdf8, #4ade80); }

.lab-desc-line { font-size: 11px; font-weight: 700; color: var(--lab-color); text-align: center; }
.lab-tab.off { opacity: 0.6; }

/* 연구 지도 */
.lab-map { display: flex; flex-direction: column; align-items: stretch; padding: 4px 0 12px; }
.lab-map-row { display: flex; justify-content: center; gap: 10px; }
.lab-link { align-self: center; width: 4px; height: 20px; background: #334155; border-radius: 2px; }
.lab-link.lit { background: var(--lab-color); box-shadow: 0 0 8px var(--lab-color); }
.lab-node {
  position: relative; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: rgba(15, 23, 42, 0.78); border: 1.5px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 8px 4px 6px; cursor: pointer; color: #e2e8f0;
}
.lab-node-ring {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--lab-color) var(--p), #1e293b 0);
  padding: 3px;
}
.lab-node-icon { width: 100%; height: 100%; border-radius: 50%; background: #0f172a; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.lab-node-name { font-size: 10px; font-weight: 800; line-height: 1.2; text-align: center; min-height: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lab-node-lv { font-size: 9.5px; font-weight: 800; color: var(--lab-color); }
.lab-node.ready, .lab-node.active { border-color: var(--lab-color); }
.lab-node.done { border-color: #4ade80; }
.lab-node.done .lab-node-lv { color: #4ade80; }
.lab-node.locked { opacity: 0.5; filter: grayscale(0.6); }
/* 성능: 그림자 크기를 바꾸지 않고, 그림자를 가진 겹(::after)의 투명도만 움직임 */
.lab-node.working { border-color: #fbbf24; }
.lab-node.working::after, .lab-wpn-row.working::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 12px rgba(251, 191, 36, 0.7); opacity: 0; animation: labPulse 1.4s ease-in-out infinite; pointer-events: none; will-change: opacity; }
@keyframes labPulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.lab-node-badge { position: absolute; top: -6px; right: -4px; font-size: 9px; font-weight: 900; background: #f59e0b; color: #1c1917; padding: 1px 6px; border-radius: 9999px; }
.lab-locked-map { text-align: center; padding: 24px 10px; font-size: 12px; font-weight: 800; color: #94a3b8; background: rgba(15, 23, 42, 0.6); border: 1px dashed rgba(255, 255, 255, 0.15); border-radius: 12px; }

.lab-keystone { border: 1.5px solid var(--lab-color); border-radius: 12px; padding: 8px; background: rgba(15, 23, 42, 0.8); display: flex; flex-direction: column; gap: 6px; }
.lab-keystone.locked { opacity: 0.55; border-style: dashed; }
.lab-keystone-head { display: flex; flex-direction: column; gap: 1px; }
.lab-keystone-head strong { font-size: 12px; color: #f1f5f9; }
.lab-keystone-head small { font-size: 10px; color: #94a3b8; }
.lab-keystone-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-keystone-opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  background: rgba(30, 41, 59, 0.9); border: 1.5px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #e2e8f0; cursor: pointer;
}
.lab-keystone-opt .lab-ks-icon { font-size: 20px; }
.lab-keystone-opt strong { font-size: 11.5px; }
.lab-keystone-opt small { font-size: 9.5px; color: #cbd5e1; text-align: center; }
.lab-keystone-opt.chosen { border-color: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, 0.55); }
.lab-keystone-opt em { position: absolute; top: -7px; right: -3px; font-style: normal; font-size: 9px; font-weight: 900; background: #fbbf24; color: #1c1917; padding: 1px 6px; border-radius: 9999px; }
.lab-keystone-opt:disabled { cursor: default; }
.lab-master { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(15, 23, 42, 0.7); border: 1px dashed rgba(251, 191, 36, 0.4); opacity: 0.75; }
.lab-master.on { opacity: 1; border: 1.5px solid #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
.lab-master-icon { font-size: 22px; }
.lab-master > div { flex: 1; display: flex; flex-direction: column; }
.lab-master strong { font-size: 12px; color: #fde68a; }
.lab-master small { font-size: 10px; color: #cbd5e1; }
.lab-master b { font-size: 11px; color: #fbbf24; }

/* 연구 상세 모달 */
#lab-node-modal { z-index: 1215; }
.lab-node-sheet { max-height: 86%; overflow-y: auto; }
.lab-lv-list { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; }
.lab-lv-row { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; padding: 6px 8px; border-radius: 9px; background: rgba(30, 41, 59, 0.7); font-size: 11.5px; }
.lab-lv-row b { color: #94a3b8; }
.lab-lv-row small { grid-column: 2; font-size: 10px; color: #94a3b8; }
.lab-lv-row.done { opacity: 0.5; }
.lab-lv-row.done b { color: #4ade80; }
.lab-lv-row.next { box-shadow: inset 0 0 0 1.5px var(--lab-color); }
.lab-lv-row.next b { color: var(--lab-color); }
.lab-node-cost { font-size: 11.5px; font-weight: 800; color: #fde68a; text-align: center; margin: 4px 0; }
.lab-node-reason { font-size: 11px; font-weight: 800; color: #f87171; text-align: center; margin-bottom: 6px; }

.lab-slot-actions-3 { grid-template-columns: 1fr 1fr 1fr; }
.lab-btn-wide { grid-column: 1 / -1; }


/* ===== 장비연구실: 두 줄 + 합류 + 무기 연구 목록 ===== */
.lab-cols { display: flex; justify-content: center; }
.lab-cols .lab-col + .lab-col { margin-left: 36px; }
.lab-col { display: flex; flex-direction: column; align-items: center; }
.lab-merge { width: 128px; height: 18px; margin: 0 auto; box-sizing: border-box; border: 4px solid #334155; border-top: none; border-radius: 0 0 8px 8px; }
.lab-merge.lit { border-color: var(--lab-color); box-shadow: 0 4px 8px -4px var(--lab-color); }
.lab-wpn-box { margin: 0 6px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: rgba(15, 23, 42, 0.7); border: 1.5px solid var(--lab-color); border-radius: 12px; }
.lab-wpn-box.locked { border-color: rgba(255, 255, 255, 0.12); }
.lab-wpn-head { display: flex; flex-direction: column; gap: 1px; padding: 0 2px 2px; }
.lab-wpn-head strong { font-size: 12px; color: #fff; }
.lab-wpn-head small { font-size: 10.5px; color: #94a3b8; }
.lab-wpn-row { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; color: #e2e8f0; background: rgba(30, 41, 59, 0.85); border: 1.5px solid rgba(255, 255, 255, 0.1); border-radius: 10px; cursor: pointer; text-align: left; }
.lab-wpn-row.ready, .lab-wpn-row.active { border-color: var(--lab-color); }
.lab-wpn-row.done { border-color: #4ade80; }
.lab-wpn-row.locked { opacity: 0.5; filter: grayscale(0.6); }
.lab-wpn-row.working { border-color: #fbbf24; }
.lab-wpn-row.equipped { box-shadow: 0 0 0 1.5px var(--lab-color), 0 0 10px -2px var(--lab-color); }
.lab-wpn-ico { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.lab-wpn-name { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lab-wpn-name em { font-style: normal; font-size: 9px; font-weight: 900; color: #0f172a; background: var(--lab-color); padding: 1px 5px; border-radius: 9999px; }
.lab-wpn-pips { display: flex; gap: 3px; flex-shrink: 0; }
.lab-pip { position: relative; display: block; width: 14px; height: 14px; border-radius: 3px; background: #0f172a; border: 1.5px solid rgba(255, 255, 255, 0.25); overflow: hidden; }
.lab-pip b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--lab-color); }
.lab-wpn-row.done .lab-pip b { background: #4ade80; }


/* ===== 상자연구실: 원하는 장비 확률 (켜기/끄기) ===== */
.lab-tgt-sub { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.lab-tgt-bonus { font-style: normal; font-size: 10px; font-weight: 900; color: #fde68a; margin-left: 4px; }
.lab-tgt-switch { flex-shrink: 0; min-width: 38px; text-align: center; font-size: 10px; font-weight: 900; padding: 3px 7px; border-radius: 9999px;
  color: #94a3b8; background: #0f172a; border: 1.5px solid rgba(255, 255, 255, 0.2); cursor: pointer; }
.lab-tgt-switch.on { color: #0f172a; background: #4ade80; border-color: #4ade80; }
.lab-tgt-switch.dis { opacity: 0.4; }
.lab-wpn-name em.lab-tgt-bonus { color: #0f172a; background: #fde68a; }
.lab-wpn-name em.lab-tgt-bonus:empty { display: none; }
