/* Labor — compact Tech Factory (classic + modern) */
.page.lab { overflow-x: hidden; }

.lab-wrap {
  --accent: #5b9cff;
  --accent-2: #3dd6c8;
  --panel: rgba(7, 14, 24, 0.96);
  --line: rgba(66, 135, 245, 0.28);
  --text: #e8f4ff;
  --muted: rgba(170, 192, 214, 0.78);
  --ok: #5ee0a0;
  --bad: #ff7a85;
  --gold: #e8b86a;
  --modern: #e0a04a;
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
}
.lab-wrap *,
.lab-wrap *::before,
.lab-wrap *::after { box-sizing: border-box; }

.ht-loader {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 40;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(5, 10, 18, 0.92);
  border-radius: 14px;
  font-size: 17px;
  backdrop-filter: blur(8px);
}

.lab-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(91, 156, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(61, 214, 200, 0.08), transparent 50%),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.lab-card__shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 28%);
  z-index: 0;
}
.lab-card > * { position: relative; z-index: 1; }

.lab-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lab-eyebrow {
  margin: 0 0 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.lab-title {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 18px rgba(66, 135, 245, 0.35);
  line-height: 1.1;
}
.lab-tabs { display: flex; gap: 6px; flex-shrink: 0; }
.lab-tab {
  border: 1px solid var(--line);
  background: rgba(66, 135, 245, 0.06);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: 0.15s ease;
}
.lab-tab:hover {
  color: #fff;
  border-color: rgba(66, 135, 245, 0.55);
  background: rgba(66, 135, 245, 0.12);
}
.lab-tab.active {
  color: #fff;
  background: linear-gradient(180deg, #5b9cff, #3478e0);
  border-color: #7eb3ff;
  box-shadow: 0 4px 14px rgba(66, 135, 245, 0.35);
}

/* Catalog */
.ht-catalog {
  padding: 10px 14px 8px;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ht-group__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ht-group__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}
.ht-group--modern .ht-group__label { color: var(--modern); }
.ht-group--modern .ht-group__label::after {
  background: linear-gradient(90deg, rgba(224, 160, 74, 0.35), transparent);
}

.ht-picks {
  display: grid;
  gap: 6px;
}
.ht-picks--classic { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ht-picks--modern { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.ht-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 18, 30, 0.9);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ht-pick img {
  width: 40px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}
.ht-pick__name {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(220, 232, 245, 0.92);
}
.ht-pick__stock {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: var(--accent-2);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(61, 214, 200, 0.28);
}
.ht-pick:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 156, 255, 0.45);
}
.ht-pick.is-on {
  border-color: rgba(91, 156, 255, 0.75);
  background: linear-gradient(180deg, rgba(91, 156, 255, 0.22), rgba(10, 18, 30, 0.95));
  box-shadow: 0 0 0 1px rgba(91, 156, 255, 0.18), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.ht-pick.is-modern { border-color: rgba(224, 160, 74, 0.22); }
.ht-pick.is-modern.is-on {
  border-color: rgba(224, 160, 74, 0.8);
  background: linear-gradient(180deg, rgba(224, 160, 74, 0.18), rgba(10, 18, 30, 0.95));
  box-shadow: 0 0 0 1px rgba(224, 160, 74, 0.2), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.ht-pick.is-modern .ht-pick__stock {
  color: var(--gold);
  border-color: rgba(232, 184, 106, 0.35);
}

/* Workspace: detail + equipped */
.ht-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  min-width: 0;
}

.ht-detail {
  min-width: 0;
  padding: 12px 14px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ht-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.ht-hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 30%, rgba(91, 156, 255, 0.22), rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(91, 156, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.ht-hero__icon img {
  width: 54px;
  height: 56px;
  object-fit: contain;
}
.ht-hero__copy { min-width: 0; }
.tech-name {
  margin: 0 0 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1.15;
}
.ht-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}
.ht-badges span {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(91, 156, 255, 0.12);
  border: 1px solid rgba(91, 156, 255, 0.3);
  color: #b9d7ff;
}
.ht-badges .tech-effect {
  background: rgba(232, 184, 106, 0.1);
  border-color: rgba(232, 184, 106, 0.35);
  color: #f0d4a0;
}
.tech-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact cost chips */
.ht-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px;
}
.ht-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ht-stat > img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.ht-stat__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}
.ht-stat__body > span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.ht-stat__body strong {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ht-stat__body strong.ok { color: var(--ok); }
.ht-stat__body strong.bad { color: var(--bad); }
.ht-stat__body small {
  font-size: 9px;
  color: rgba(160, 180, 200, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ht-stat__body em {
  font-style: normal;
  color: #cfe0f2;
  font-weight: 700;
}

.ht-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ht-qty {
  display: inline-flex;
  align-items: stretch;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.ht-qty button {
  width: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.ht-qty button:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.tech-quantity {
  width: 44px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  outline: none;
}
.ht-btn {
  height: 38px;
  min-width: 120px;
  flex: 1;
  max-width: 200px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #6aacff, #3478e0);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(66, 135, 245, 0.28);
  transition: filter 0.15s, transform 0.15s;
}
.ht-btn:hover { filter: brightness(1.08); }
.ht-btn:active { transform: translateY(1px); }

/* Equipped — compact vertical rail */
.ht-equip {
  padding: 12px 10px;
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-height: 0;
}
.ht-equip__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.ht-equip__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}
.ht-stock-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(91, 156, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #c8d6e5;
  cursor: pointer;
  text-align: left;
  font: inherit;
  opacity: 0.55;
  transition: border-color 0.15s, opacity 0.15s, background 0.15s;
}
.ht-stock-row.has-stock {
  opacity: 1;
  border-color: rgba(91, 156, 255, 0.32);
}
.ht-stock-row.is-on {
  opacity: 1;
  border-color: rgba(120, 200, 255, 0.75);
  background: rgba(40, 80, 130, 0.45);
  box-shadow: inset 0 0 0 1px rgba(120, 200, 255, 0.25);
}
.ht-stock-row:hover {
  border-color: rgba(91, 156, 255, 0.55);
  background: rgba(30, 55, 90, 0.35);
}
.ht-stock-row img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.ht-stock-row__name {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ht-stock-row__qty {
  min-width: 22px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
}
.ht-equip__slots {
  display: none;
}
.ht-equip__slot {
  display: none;
}
.ht-equip__note {
  margin: 0;
  font-size: 10px;
  color: rgba(160, 180, 200, 0.62);
  line-height: 1.3;
  text-align: center;
}

/* Drones */
.lab-drones { padding: 14px; }
.drone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.drone-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.drone-card:hover {
  border-color: rgba(91, 156, 255, 0.35);
  transform: translateY(-1px);
}
.drone-card__art {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(91, 156, 255, 0.14), rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(91, 156, 255, 0.2);
}
.drone-card__art img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}
.drone-card__body { min-width: 0; }
.drone-card h3 {
  margin: 0 0 3px;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.drone-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.drone-card__meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.drone-card__meta b { color: #fff; }
.drone-card__meta b.ok { color: var(--ok); }
.drone-card__meta b.bad { color: var(--bad); }
.drone-card .ht-btn {
  width: 100%;
  max-width: none;
  flex: none;
  height: 36px;
}
.drone-card--zeus .ht-btn {
  background: linear-gradient(180deg, #e0b56a, #b07a30);
  box-shadow: 0 6px 16px rgba(176, 122, 48, 0.28);
}
.drone-card--zeus .drone-card__art {
  background: radial-gradient(circle at 50% 40%, rgba(224, 181, 106, 0.16), rgba(0, 0, 0, 0.4));
  border-color: rgba(224, 181, 106, 0.25);
}

@media (max-width: 920px) {
  .ht-picks--classic { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ht-picks--modern { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ht-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .ht-workspace { grid-template-columns: 1fr; }
  .ht-detail { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .ht-equip__list { max-height: 220px; flex-direction: row; flex-wrap: wrap; }
  .ht-stock-row { width: calc(50% - 2px); }
  .ht-equip { padding-bottom: 14px; }
  .ht-picks--classic,
  .ht-picks--modern { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .drone-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .lab-card__head { flex-direction: column; align-items: flex-start; }
  .ht-picks--classic,
  .ht-picks--modern { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ht-badges { justify-content: center; }
  .ht-stats { grid-template-columns: 1fr 1fr; }
  .ht-cta { flex-direction: column; align-items: stretch; }
  .ht-btn { max-width: none; }
  .drone-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
