/* ============================================================================
   Project: NOVA · 星际藏品总仓 V2 + 探索战绩记录样式 (css/hangar-vault.css)
   兼容全机型 Chromium 85+ WebView，零外层滚动条，适配四大旗舰主题皮肤
   ============================================================================ */

#view-hangar > #hangarModal.hv2-upgraded {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 8px 10px 0 !important;
  gap: 6px !important;
}

#hangarModal.hv2-upgraded > .page-head,
#hangarModal.hv2-upgraded > .hg-hero,
#hangarModal.hv2-upgraded > .hg-tabs,
#hangarModal.hv2-upgraded > .hg-note {
  display: none !important;
}

/* ==================== 1. 顶部 20% 上阵穿戴展台 + 藏品总估值 ==================== */
.hv2-pedestal {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(14, 22, 46, 0.94), rgba(8, 12, 26, 0.96));
  border: 1px solid rgba(255, 197, 61, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.32);
}

.hv2-pedestal[hidden] {
  display: none !important;
}

.hv2-hero-portrait {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(0, 240, 255, 0.24), rgba(10, 16, 36, 0.95));
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.hv2-hero-portrait img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 240, 255, 0.35));
}

.hv2-hero-lv-pill {
  position: absolute;
  bottom: 1px;
  right: 1px;
  font-size: 9px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(4, 8, 20, 0.9);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.5);
  line-height: 1.35;
}

.hv2-pedestal-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hv2-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.hv2-val-title {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}

.hv2-val-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  color: #ffd875;
  word-break: break-all;
}

.hv2-slots-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.hv2-slot-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.24);
  min-width: 0;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.hv2-slot-chip:active {
  transform: scale(0.97);
}

.hv2-slot-chip img {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 18px;
}

.hv2-slot-chip span {
  font-size: 9.5px;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 2. 单行 6 分类紧凑标签栏 (绝不折行) ==================== */
.hv2-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(7, 11, 24, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.hv2-tab {
  min-height: 31px;
  padding: 4px 2px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.hv2-tab.active {
  background: linear-gradient(180deg, rgba(255, 206, 92, 0.28), rgba(217, 119, 6, 0.26));
  color: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.22);
}

/* ==================== 3. 内部独立滚动仓体 (留足底部防导航圆球遮挡安全间距) ==================== */
.hv2-body-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 1px 44px;
  -webkit-overflow-scrolling: touch;
}

.hv2-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.hv2-pane.active {
  display: flex;
}

/* 分类小标题条 */
.hv2-sec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 2px 2px;
}

.hv2-sec-title {
  font-size: 12px;
  font-weight: 900;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hv2-sec-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
}

/* ==================== 4. 博物馆级 3×3 立体展柜网格 ==================== */
.hv2-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.hv2-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hv2-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px 7px;
  border-radius: 11px;
  background: linear-gradient(165deg, rgba(17, 25, 52, 0.92), rgba(9, 14, 30, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.hv2-item-card:active {
  transform: scale(0.97);
}

.hv2-item-card.equipped {
  border-color: rgba(16, 245, 160, 0.72);
  box-shadow: inset 0 0 14px rgba(16, 245, 160, 0.12);
}

.hv2-item-card.locked {
  opacity: 0.68;
}

.hv2-item-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.hv2-item-card.equipped .hv2-item-tag {
  background: rgba(16, 245, 160, 0.18);
  color: #10f5a0;
  border-color: rgba(16, 245, 160, 0.55);
}

.hv2-item-art {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(56, 189, 248, 0.18), rgba(4, 8, 20, 0.5));
}

.hv2-item-art img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hv2-item-art.painting img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.hv2-item-name {
  font-size: 11px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.hv2-item-meta {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.2;
}

/* ==================== 5. 双形态飞船进阶对调卡 (左: 3D星舰默认解锁 ➔ 右: 流光尾焰经典火箭等级进阶) ==================== */
.hv2-xp-card {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(12, 20, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.32);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hv2-xp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 900;
}

.hv2-xp-bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hv2-xp-bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #00f0ff, #10f5a0, #fde047);
}

.hv2-dual-ship-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hv2-dual-card {
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(15, 23, 48, 0.94), rgba(8, 12, 26, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hv2-dual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hv2-dual-series {
  font-size: 12px;
  font-weight: 900;
  color: #f8fafc;
}

.hv2-dual-sub {
  font-size: 10px;
  color: #94a3b8;
}

.hv2-dual-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.hv2-ship-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 7px 6px;
  border-radius: 10px;
  background: rgba(4, 8, 20, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hv2-ship-slot.active {
  border-color: rgba(16, 245, 160, 0.75);
  background: rgba(16, 245, 160, 0.08);
}

.hv2-ship-slot.locked {
  opacity: 0.72;
}

.hv2-ship-vis {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hv2-ship-vis img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transform: rotate(180deg);
}

.hv2-ship-vis canvas {
  width: 118px;
  height: 44px;
  display: block;
}

.hv2-ship-lbl {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
}

.hv2-evo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  font-weight: 900;
  color: #fde047;
  text-align: center;
  padding: 0 2px;
}

.hv2-evo-arrow b {
  font-size: 13px;
  line-height: 1;
}

.hv2-ship-btn {
  width: 100%;
  min-height: 27px;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 900;
  text-align: center;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.hv2-ship-btn.equipped {
  background: rgba(16, 245, 160, 0.2);
  color: #10f5a0;
  border-color: rgba(16, 245, 160, 0.55);
}

.hv2-ship-btn.buy {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.26), rgba(217, 119, 6, 0.24));
  color: #fde047;
  border-color: rgba(251, 191, 36, 0.55);
}

.hv2-ship-btn.lock {
  background: rgba(30, 41, 59, 0.7);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.24);
}

/* ==================== 6. 跃迁证书页精简 1 行工具栏 + 3 列展柜覆盖 ==================== */
#hv2Pane-certs #hgPane-certs {
  display: block !important;
}

#hv2Pane-certs .cc-vault-dash {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin-bottom: 6px !important;
}

#hv2Pane-certs .cc-vstat {
  padding: 5px 4px !important;
  border-radius: 8px !important;
}

#hv2Pane-certs .cc-vstat .k {
  font-size: 9.5px !important;
}

#hv2Pane-certs .cc-vstat .v {
  font-size: 11px !important;
}

#hv2Pane-certs .cc-sell-bar {
  margin-bottom: 6px !important;
  gap: 5px !important;
}

#hv2Pane-certs .cc-btn-sell-dup,
#hv2Pane-certs .cc-btn-lock-util {
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}

#hv2Pane-certs .cc-s16-ctrlbar {
  padding: 5px 7px !important;
  margin-bottom: 6px !important;
}

/* ==================== 7. 探索战绩与星币记录 (ngh-*) ==================== */
.ngh-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ngh-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.ngh-range-group {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(8, 13, 28, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.ngh-range-btn {
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
}

.ngh-range-btn.active {
  background: rgba(0, 240, 255, 0.2);
  color: #e0f2fe;
  border: 1px solid rgba(0, 240, 255, 0.5);
}

.ngh-cat-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ngh-cat-select {
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(12, 19, 40, 0.95);
  color: #f1f5f9;
  border: 1px solid rgba(251, 191, 36, 0.38);
  font-size: 11px;
  font-weight: 800;
}

.ngh-refresh-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 900;
}

.ngh-summary-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ngh-sum-cell {
  padding: 6px 7px;
  border-radius: 9px;
  background: rgba(12, 19, 40, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ngh-sum-cell .k {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
}

.ngh-sum-cell .v {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 900;
  color: #f8fafc;
  word-break: break-all;
}

.ngh-sum-cell .v.cyan { color: #38bdf8; }
.ngh-sum-cell .v.gold { color: #ffd875; }

.ngh-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ngh-empty {
  padding: 26px 12px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  border-radius: 11px;
  background: rgba(12, 19, 40, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

.ngh-row {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(13, 21, 44, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
}

.ngh-row.win {
  border-color: rgba(251, 191, 36, 0.42);
}

.ngh-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ngh-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(4, 8, 20, 0.7);
  padding: 2px;
}

.ngh-mid {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ngh-title-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ngh-gname {
  font-size: 12px;
  font-weight: 900;
  color: #f8fafc;
}

.ngh-mult {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.ngh-trial-tag {
  font-size: 9.5px;
  font-weight: 900;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(16, 245, 160, 0.16);
  color: #10f5a0;
}

.ngh-sub-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: #94a3b8;
}

.ngh-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.ngh-pay {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.ngh-pay.pos { color: #ffd875; }
.ngh-pay.zero { color: #64748b; }

.ngh-chevron {
  font-size: 9px;
  color: #64748b;
}

.ngh-row-detail {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10.5px;
  color: #cbd5e1;
}

.ngh-row-detail[hidden] {
  display: none !important;
}

.ngh-modal-card {
  max-width: 440px;
  max-height: 82vh;
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
}

.ngh-modal-mount {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

/* ==================== 8. 藏品鉴赏/正气人文铭牌详情弹窗 ==================== */
.hv2-modal-card {
  max-width: 400px;
}

.hv2-detail-art {
  width: 100%;
  height: 150px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.22), rgba(6, 10, 24, 0.92));
  border: 1px solid rgba(251, 191, 36, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.hv2-detail-art img {
  max-width: 88%;
  max-height: 132px;
  object-fit: contain;
}

.hv2-detail-art.painting img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.hv2-detail-bio {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.28);
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.55;
  margin-bottom: 10px;
}

/* ==================== 9. 四大旗舰皮肤 (千里江山白玉 / 皇冠酒红 / 星月夜) 适配 ==================== */
body[data-nova-skin="qianli"] .hv2-pedestal,
body[data-nova-skin="qianli"] .hv2-item-card,
body[data-nova-skin="qianli"] .hv2-dual-card,
body[data-nova-skin="qianli"] .hv2-xp-card,
body[data-nova-skin="qianli"] .ngh-sum-cell,
body[data-nova-skin="qianli"] .ngh-row {
  background: linear-gradient(180deg, #fffdf7 0%, #f1e9d5 100%) !important;
  border-color: #c59b27 !important;
  color: #103029 !important;
}

body[data-nova-skin="qianli"] .hv2-tabs,
body[data-nova-skin="qianli"] .ngh-range-group,
body[data-nova-skin="qianli"] .hv2-ship-slot {
  background: rgba(235, 226, 204, 0.92) !important;
  border-color: rgba(197, 155, 39, 0.55) !important;
}

body[data-nova-skin="qianli"] .hv2-item-name,
body[data-nova-skin="qianli"] .hv2-dual-series,
body[data-nova-skin="qianli"] .ngh-gname,
body[data-nova-skin="qianli"] .ngh-sum-cell .v,
body[data-nova-skin="qianli"] .hv2-slot-chip span,
body[data-nova-skin="qianli"] .hv2-ship-lbl {
  color: #103029 !important;
}

body[data-nova-skin="qianli"] .hv2-val-num,
body[data-nova-skin="qianli"] .ngh-pay.pos,
body[data-nova-skin="qianli"] .hv2-sec-title {
  color: #991b1b !important;
}

body[data-nova-skin="qianli"] .hv2-tab {
  color: #36584f !important;
}

body[data-nova-skin="qianli"] .hv2-tab.active {
  background: linear-gradient(180deg, #1d6f5e, #134e42) !important;
  color: #fffdf7 !important;
  border-color: #c59b27 !important;
}

body[data-nova-skin="royal"] .hv2-pedestal,
body[data-nova-skin="royal"] .hv2-item-card,
body[data-nova-skin="royal"] .hv2-dual-card,
body[data-nova-skin="royal"] .ngh-row {
  background: linear-gradient(165deg, rgba(64, 9, 21, 0.92), rgba(36, 4, 12, 0.95)) !important;
  border-color: rgba(245, 158, 11, 0.42) !important;
}

body[data-nova-skin="starry"] .hv2-pedestal,
body[data-nova-skin="starry"] .hv2-item-card,
body[data-nova-skin="starry"] .hv2-dual-card,
body[data-nova-skin="starry"] .ngh-row {
  background: linear-gradient(165deg, rgba(16, 38, 92, 0.92), rgba(9, 22, 56, 0.95)) !important;
  border-color: rgba(251, 191, 36, 0.42) !important;
}
