/* Collection V1: page shell and CardFace adapter. */

:root {
  --dh-rarity-consumer: #cfd8e7;
  --dh-rarity-industrial: #66c9ff;
  --dh-rarity-milspec: #9066ff;
  --dh-rarity-restricted: #ff66e2;
  --dh-rarity-classified: #ff6c66;
  --dh-rarity-covert: #ff8a66;
  --dh-rarity-souvenir: #ffde66;
  --dh-recycle-danger: #ff2638;
}

#collection-page {
  --collection-panel: rgba(18, 22, 34, 0.72);
  --collection-panel-strong: rgba(24, 29, 43, 0.84);
  --collection-line: rgba(255, 255, 255, 0.12);
  --collection-muted: rgba(235, 238, 247, 0.64);
  --collection-text: #f7f9ff;
  --collection-blue: #61a8ff;
  --collection-pink: #ff4fd8;
  --collection-green: #66f0a7;
  --collection-gold: #ffd166;
}

#collection-page .collection-v1-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 680px;
  padding: 26px;
  color: var(--collection-text);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background-color: #07080c;
  background-image: linear-gradient(180deg, rgba(15, 17, 25, 0.96) 0, rgba(9, 12, 20, 0.98) 720px, rgba(7, 8, 12, 0.98) 1440px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

#collection-page .collection-v1-shell::before,
#collection-page .collection-v1-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#collection-page .collection-v1-shell::before {
  background:
    radial-gradient(560px 360px at 120px 70px, rgba(97, 168, 255, 0.15), transparent 72%),
    radial-gradient(600px 380px at calc(100% - 110px) 120px, rgba(255, 79, 216, 0.12), transparent 74%),
    linear-gradient(158deg, transparent 0 560px, rgba(97, 168, 255, 0.035) 561px 760px, transparent 1010px);
}

#collection-page .collection-v1-shell::after {
  opacity: 0.7;
  background:
    linear-gradient(24deg, transparent 0 980px, rgba(255, 209, 102, 0.025) 981px 1160px, transparent 1420px),
    radial-gradient(640px 380px at 18% 1080px, rgba(97, 168, 255, 0.055), transparent 76%);
}

#collection-page .collection-v1-hero,
#collection-page .collection-v1-stats,
#collection-page .collection-v1-filter-panel,
#collection-page .collection-v1-result-head,
#collection-page .collection-v1-grid,
#collection-page .collection-v1-pagination {
  position: relative;
  z-index: 1;
}

#collection-page .collection-v1-hero {
  align-items: flex-start;
  margin-bottom: 20px;
}

#collection-page .collection-v1-hero .section-kicker {
  color: #9fc6ff;
}

#collection-page .collection-v1-hero .page-panel-title {
  color: #fff;
  letter-spacing: 0;
}

#collection-page .collection-v1-hero .page-panel-desc {
  color: var(--collection-muted);
  line-height: 1.65;
}

.collection-v1-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.collection-v1-stat {
  --collection-stat-soft: rgba(97, 168, 255, 0.11);
  position: relative;
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(180, 195, 220, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.020)),
    radial-gradient(180px 110px at 92% 88%, var(--collection-stat-soft), transparent 70%),
    rgba(10, 14, 25, 0.68);
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 42px rgba(0, 0, 0, 0.20);
  overflow: hidden;
}

.collection-v1-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 42%);
  opacity: 0.72;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.collection-v1-stat:hover::after {
  opacity: 1;
}

.collection-v1-stat[data-tone="green"] {
  --collection-stat-soft: rgba(102, 240, 167, 0.10);
}

.collection-v1-stat[data-tone="pink"] {
  --collection-stat-soft: rgba(255, 126, 216, 0.10);
}

.collection-v1-stat[data-tone="dark"] {
  --collection-stat-soft: rgba(210, 220, 238, 0.07);
}

.collection-v1-stat-label {
  position: relative;
  z-index: 1;
  color: rgba(235, 238, 247, 0.58);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.collection-v1-stat-value {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 28px;
  line-height: 1;
  font-weight: 1000;
  color: #fff;
}

.collection-v1-filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) repeat(5, minmax(108px, 1fr));
  gap: 8px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(12, 15, 24, 0.54);
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 54px rgba(0, 0, 0, 0.20);
  z-index: 4;
}

#collection-page .collection-v1-filter-panel {
  z-index: 4;
}

.collection-v1-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.collection-v1-field span {
  color: rgba(235, 238, 247, 0.68);
  font-size: 12px;
  font-weight: 1000;
}

/* 标题略左于框内文字，避免粗体字形造成视觉偏右。 */
.collection-v1-field > span:first-child {
  padding: 0 8px;
}

.collection-v1-input,
.collection-v1-trigger {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(180, 195, 220, 0.22);
  border-radius: 10px;
  background: rgba(12, 17, 29, 0.86);
  color: #eef4ff;
  padding: 0 12px;
  font: 800 14px/1.2 "Microsoft YaHei", Arial, sans-serif;
  outline: none;
}

.collection-v1-input:focus,
.collection-v1-trigger:focus-visible,
.collection-v1-dropdown.is-open .collection-v1-trigger {
  border-color: rgba(120, 172, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(92, 145, 255, 0.16);
}

.collection-v1-dropdown {
  --ui-select-line: rgba(180, 195, 220, 0.22);
  --ui-select-focus: rgba(120, 172, 255, 0.62);
  --ui-select-focus-shadow: rgba(92, 145, 255, 0.16);
  --ui-select-hover: rgba(97, 168, 255, 0.14);
  --ui-select-active: rgba(97, 168, 255, 0.18);
  --ui-select-active-text: #dceaff;
}

.collection-v1-trigger {
  padding: 0 12px;
  text-align: left;
}

.collection-v1-menu {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.20) rgba(0, 0, 0, 0.20);
}

.collection-v1-menu::-webkit-scrollbar {
  width: 6px;
}

.collection-v1-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.20);
  border-radius: 10px;
}

.collection-v1-menu::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.20);
}

/* 品质固定只有八项，完整展开，避免最后一项被滚动条遮住。 */
[data-collection-filter-dropdown="rarity"] > .collection-v1-menu,
[data-inventory-filter-dropdown="rarity"] > .collection-v1-menu,
[data-market-filter-dropdown="rarity"] > .collection-v1-menu {
  max-height: none;
  overflow-y: visible;
  scrollbar-width: none;
}

[data-collection-filter-dropdown="rarity"] > .collection-v1-menu::-webkit-scrollbar,
[data-inventory-filter-dropdown="rarity"] > .collection-v1-menu::-webkit-scrollbar,
[data-market-filter-dropdown="rarity"] > .collection-v1-menu::-webkit-scrollbar {
  display: none;
}

.collection-v1-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collection-v1-rarity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.collection-v1-trigger[data-rarity="consumer"] [data-collection-filter-current],
.collection-v1-option[data-rarity="consumer"],
.collection-v1-option--consumer {
  color: var(--dh-rarity-consumer) !important;
}

.collection-v1-trigger[data-rarity="industrial"] [data-collection-filter-current],
.collection-v1-option[data-rarity="industrial"],
.collection-v1-option--industrial {
  color: var(--dh-rarity-industrial) !important;
}

.collection-v1-trigger[data-rarity="milspec"] [data-collection-filter-current],
.collection-v1-option[data-rarity="milspec"],
.collection-v1-option--milspec {
  color: var(--dh-rarity-milspec) !important;
}

.collection-v1-trigger[data-rarity="restricted"] [data-collection-filter-current],
.collection-v1-option[data-rarity="restricted"],
.collection-v1-option--restricted {
  color: var(--dh-rarity-restricted) !important;
}

.collection-v1-trigger[data-rarity="classified"] [data-collection-filter-current],
.collection-v1-option[data-rarity="classified"],
.collection-v1-option--classified {
  color: var(--dh-rarity-classified) !important;
}

.collection-v1-trigger[data-rarity="covert"] [data-collection-filter-current],
.collection-v1-option[data-rarity="covert"],
.collection-v1-option--covert {
  color: var(--dh-rarity-covert) !important;
}

.collection-v1-trigger[data-rarity="souvenir"] [data-collection-filter-current],
.collection-v1-option[data-rarity="souvenir"],
.collection-v1-option--souvenir {
  color: var(--dh-rarity-souvenir) !important;
}

.collection-v1-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
}

.collection-v1-result-count {
  color: rgba(235, 238, 247, 0.70);
  font-size: 13px;
  font-weight: 900;
}

.collection-v1-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.collection-v1-pagination[hidden] {
  display: none;
}

.collection-v1-pagination-bottom {
  justify-content: center;
  margin-top: 18px;
}

.collection-v1-page-btn,
.collection-v1-page-status {
  min-height: 34px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(180, 195, 220, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.018)),
    rgba(9, 13, 24, 0.76);
  color: rgba(238, 244, 255, 0.88);
  font: 900 12px/1.2 "Microsoft YaHei", Arial, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.collection-v1-page-btn {
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.collection-v1-page-btn:hover:not(:disabled) {
  border-color: rgba(120, 172, 255, 0.42);
  background-color: rgba(27, 45, 78, 0.72);
  color: #fff;
  transform: translateY(-1px);
}

.collection-v1-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.collection-v1-page-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0 12px;
  color: #dceaff;
  border-color: rgba(120, 172, 255, 0.24);
  background: rgba(97, 168, 255, 0.10);
}

.collection-v1-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.collection-v1-card {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.collection-v1-card > .card-face {
  width: 100%;
  max-width: 248px;
  min-height: 100%;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.collection-v1-card--held > .card-face {
  border-color: rgba(102, 240, 167, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(102, 240, 167, 0.08), 0 18px 50px rgba(0, 0, 0, 0.24);
}

.collection-v1-card--discovered > .card-face {
  border-color: rgba(97, 168, 255, 0.28);
}

.collection-v1-card--undiscovered > .card-face {
  filter: grayscale(0.46) saturate(0.54) brightness(0.72);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(0, 0, 0, 0.28);
}

.collection-v1-card--undiscovered .card-face-art {
  opacity: 0.76;
}

.collection-v1-card--undiscovered .card-face-name,
.collection-v1-card--undiscovered .card-face-desc,
.collection-v1-card--undiscovered .card-face-chip {
  color: rgba(238, 244, 255, 0.78);
}

.collection-v1-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--collection-muted);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 1180px) {
  .collection-v1-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .collection-v1-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #collection-page .collection-v1-shell {
    padding: 18px 14px;
    min-height: 560px;
  }

  #collection-page .collection-v1-hero {
    flex-direction: column;
  }

  .collection-v1-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .collection-v1-stat {
    min-height: 94px;
    padding: 14px;
  }

  .collection-v1-stat-value {
    font-size: 23px;
  }

  .collection-v1-filter-panel {
    grid-template-columns: 1fr;
  }

  .collection-v1-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection-v1-pagination {
    justify-content: flex-start;
  }

  .collection-v1-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

/* ===== v24 no-ellipsis card text patch ===== */
#inventory-grid .inventory-card {
  min-height: 352px !important;
}

#goods-grid .goods-card {
  min-height: 372px !important;
}

#inventory-grid .item-desc-line,
#goods-grid .item-desc-line,
.unified-card-desc,
.collection-desc-line {
  display: block !important;
  height: calc(2 * 1.34em) !important;
  min-height: calc(2 * 1.34em) !important;
  max-height: calc(2 * 1.34em) !important;
  line-height: 1.34 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#inventory-grid .item-desc-line.unified-marquee,
#goods-grid .item-desc-line.unified-marquee,
.unified-card-desc.unified-marquee,
.collection-desc-line.unified-marquee {
  display: block !important;
  white-space: normal !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc,
#collection-page .collection-v1-card .card-face-desc {
  display: block !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-with-series,
#collection-page .collection-v1-card .card-face-desc-with-series {
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-series,
#collection-page .collection-v1-card .card-face-desc-series {
  max-height: 1.2em !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-body,
#collection-page .collection-v1-card .card-face-desc-body {
  display: block !important;
  height: calc(2 * 1.35em) !important;
  max-height: calc(2 * 1.35em) !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .market-seller-line,
#goods-grid .unified-seller-box,
.card-face-seller {
  overflow: hidden !important;
}

#goods-grid .market-seller-line strong,
#goods-grid .market-seller-line span,
#goods-grid .unified-seller-id,
#goods-grid .unified-seller-note,
.card-face-seller-id,
.card-face-seller-note {
  display: block !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .market-seller-line strong,
#goods-grid .unified-seller-id,
.card-face-seller-id {
  max-height: calc(2 * 1.2em) !important;
}

#goods-grid .market-seller-line span,
#goods-grid .unified-seller-note,
.card-face-seller-note {
  max-height: calc(2 * 1.28em) !important;
}

/* ===== v25 card-face readable two-line patch ===== */
#inventory-grid .market-v1-card--card-face .card-face-desc,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc,
#collection-page .collection-v1-card .card-face-desc,
.market-v1-card-desc,
#inventory-grid .item-desc-line,
#goods-grid .item-desc-line,
.unified-card-desc,
.collection-desc-line {
  display: block !important;
  box-sizing: border-box !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  line-height: 1.48 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-with-series,
#collection-page .collection-v1-card .card-face-desc-with-series {
  height: 88px !important;
  min-height: 88px !important;
  max-height: 88px !important;
  padding: 9px 10px 8px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-series,
#collection-page .collection-v1-card .card-face-desc-series {
  display: block !important;
  min-height: 20px !important;
  max-height: 20px !important;
  padding-bottom: 8px !important;
  margin-bottom: 7px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-body,
#collection-page .collection-v1-card .card-face-desc-body {
  display: block !important;
  height: calc(2 * 1.42em) !important;
  min-height: calc(2 * 1.42em) !important;
  max-height: calc(2 * 1.42em) !important;
  padding-top: 0 !important;
  line-height: 1.42 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .card-face-seller,
#market-v1-community-grid .card-face-seller,
#goods-grid .market-seller-line,
#goods-grid .unified-seller-box {
  min-height: 54px !important;
}

#goods-grid .card-face-seller-id,
#goods-grid .card-face-seller-note,
#goods-grid .market-seller-line strong,
#goods-grid .market-seller-line span,
#goods-grid .unified-seller-id,
#goods-grid .unified-seller-note {
  display: block !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .card-face-seller-id,
#market-v1-community-grid .card-face-seller-id,
#goods-grid .market-seller-line strong,
#goods-grid .unified-seller-id {
  height: auto !important;
  max-height: calc(2 * 1.22em) !important;
  line-height: 1.22 !important;
}

#goods-grid .card-face-seller-note,
#market-v1-community-grid .card-face-seller-note,
#goods-grid .market-seller-line span,
#goods-grid .unified-seller-note {
  height: auto !important;
  max-height: calc(2 * 1.34em) !important;
  padding-top: 6px !important;
  line-height: 1.34 !important;
}

/* ===== v26 compact CardFace text rhythm patch ===== */
#inventory-grid .market-v1-card--card-face .card-face-desc,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc,
#collection-page .collection-v1-card .card-face-desc,
.market-v1-card-desc,
#inventory-grid .item-desc-line,
#goods-grid .item-desc-line,
.unified-card-desc,
.collection-desc-line {
  display: block !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(2.76em + 16px) !important;
  padding: 7px 10px !important;
  line-height: 1.38 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-with-series,
#collection-page .collection-v1-card .card-face-desc-with-series {
  height: auto !important;
  min-height: 0 !important;
  max-height: 74px !important;
  padding: 8px 10px 7px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-series,
#collection-page .collection-v1-card .card-face-desc-series {
  display: block !important;
  min-height: 0 !important;
  max-height: 18px !important;
  padding-bottom: 4px !important;
  margin-bottom: 3px !important;
  line-height: 1.22 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: clip !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-body,
#collection-page .collection-v1-card .card-face-desc-body {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 2.72em !important;
  padding-top: 0 !important;
  line-height: 1.36 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .card-face-seller,
#market-v1-community-grid .card-face-seller,
#goods-grid .market-seller-line,
#goods-grid .unified-seller-box {
  height: auto !important;
  min-height: 0 !important;
  max-height: 62px !important;
  padding-top: 8px !important;
  padding-bottom: 7px !important;
}

#goods-grid .card-face-seller-id,
#market-v1-community-grid .card-face-seller-id,
#goods-grid .market-seller-line strong,
#goods-grid .unified-seller-id {
  display: block !important;
  height: auto !important;
  max-height: 2.44em !important;
  padding-bottom: 4px !important;
  margin-bottom: 3px !important;
  line-height: 1.22 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

#goods-grid .card-face-seller-note,
#market-v1-community-grid .card-face-seller-note,
#goods-grid .market-seller-line span,
#goods-grid .unified-seller-note {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 2.68em !important;
  padding-top: 0 !important;
  line-height: 1.34 !important;
  white-space: normal !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

/* ===== v27 fixed two-line text blocks ===== */
#inventory-grid .market-v1-card--card-face .card-face-desc,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc,
#collection-page .collection-v1-card .card-face-desc,
.market-v1-card-desc,
#inventory-grid .item-desc-line,
#goods-grid .item-desc-line,
.unified-card-desc,
.collection-desc-line {
  height: calc(2.76em + 14px) !important;
  min-height: calc(2.76em + 14px) !important;
  max-height: calc(2.76em + 14px) !important;
  padding: 7px 10px !important;
  line-height: 1.38 !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-with-series,
#collection-page .collection-v1-card .card-face-desc-with-series {
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  padding: 8px 10px 7px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-body,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-body,
#collection-page .collection-v1-card .card-face-desc-body {
  height: 2.72em !important;
  min-height: 2.72em !important;
  max-height: 2.72em !important;
  line-height: 1.36 !important;
}

#goods-grid .card-face-seller,
#market-v1-community-grid .card-face-seller,
#goods-grid .market-seller-line,
#goods-grid .unified-seller-box {
  height: 62px !important;
  min-height: 62px !important;
  max-height: 62px !important;
}

/* ===== v28 compact card titles ===== */
#inventory-grid .market-v1-card--card-face .card-face-name,
#market-v1-community-grid .market-v1-card--card-face .card-face-name,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name,
#shop-page .shop-v1-card .card-face-name,
#collection-page .collection-v1-card .card-face-name {
  font-size: 18px !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

/* 共用卡槽的完整长标题也按长度缩小，商店、市场、库存与图鉴保持一致。 */
#inventory-grid .market-v1-card--card-face .card-face-name.card-face-name--long,
#market-v1-community-grid .market-v1-card--card-face .card-face-name.card-face-name--long,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name.card-face-name--long,
#shop-page .shop-v1-card .card-face-name.card-face-name--long,
#collection-page .collection-v1-card .card-face-name.card-face-name--long {
  font-size: 16px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-name.card-face-name--extra-long,
#market-v1-community-grid .market-v1-card--card-face .card-face-name.card-face-name--extra-long,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name.card-face-name--extra-long,
#shop-page .shop-v1-card .card-face-name.card-face-name--extra-long,
#collection-page .collection-v1-card .card-face-name.card-face-name--extra-long {
  font-size: 14px !important;
}

#inventory-grid .item-title-line,
#goods-grid .item-title-line,
.unified-card-title,
.collection-title-line,
.market-v1-card-title {
  font-size: 13px !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
}

/* ===== v29 collection filters and CS item title polish ===== */
.collection-v1-option.collection-v1-option--rarity {
  color: var(--collection-rarity-color) !important;
}

/* 库存、市场、图鉴共用品质下拉：文字与圆点必须同色，不受通用激活态覆盖。 */
#inventory-page .collection-v1-option.collection-v1-option--rarity,
#market-page .collection-v1-option.collection-v1-option--rarity,
#collection-page .collection-v1-option.collection-v1-option--rarity,
.collection-v1-option.collection-v1-option--rarity.is-active {
  color: var(--collection-rarity-color) !important;
}

#inventory-page .collection-v1-option.collection-v1-option--rarity > span,
#market-page .collection-v1-option.collection-v1-option--rarity > span,
#collection-page .collection-v1-option.collection-v1-option--rarity > span,
.collection-v1-option.collection-v1-option--rarity.is-active > span {
  color: inherit !important;
}

.collection-v1-option.collection-v1-option--rarity .collection-v1-rarity-dot {
  background: var(--collection-rarity-color) !important;
  box-shadow: 0 0 12px var(--collection-rarity-color) !important;
}

.collection-v1-trigger[data-rarity] [data-collection-filter-current] {
  color: var(--collection-rarity-color) !important;
}

#inventory-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#market-v1-community-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#collection-page .collection-v1-card .card-face-name.card-face-name--csitem {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 25px !important;
  line-height: 1 !important;
}

.card-face-name--csitem .card-face-csitem-prefix,
.card-face-name--csitem .card-face-csitem-main {
  display: inline-flex !important;
  align-items: center !important;
}

.card-face-name--csitem .card-face-csitem-prefix {
  min-height: 22px !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  line-height: 1 !important;
  transform: none !important;
}

.card-face-name--csitem .card-face-csitem-main {
  min-height: 25px !important;
  line-height: 1 !important;
}

.card-face-name--csitem-tight {
  gap: 6px !important;
}

.card-face-name--csitem-tight .card-face-csitem-prefix {
  max-width: 46% !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  font-size: 11px !important;
}

.card-face-name--csitem-tight .card-face-csitem-main {
  font-size: 17px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  transform: none !important;
}

.card-face-name--csitem-extra-tight {
  gap: 5px !important;
}

.card-face-name--csitem-extra-tight .card-face-csitem-prefix {
  max-width: 43% !important;
  padding-left: 7px !important;
  padding-right: 7px !important;
  font-size: 10px !important;
}

.card-face-name--csitem-extra-tight .card-face-csitem-main {
  font-size: 16px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  transform: none !important;
}

/* CS 饰品标题最小对齐：前缀胶囊不再把信息区整体挤低。 */
#inventory-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#market-v1-community-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name.card-face-name--csitem,
#collection-page .collection-v1-card .card-face-name.card-face-name--csitem {
  min-height: 20px !important;
  line-height: 1 !important;
}

#inventory-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-prefix,
#market-v1-community-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-prefix,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-prefix,
#collection-page .collection-v1-card .card-face-name--csitem .card-face-csitem-prefix {
  min-height: 20px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  transform: translateY(1px) !important;
}

#inventory-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-main,
#market-v1-community-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-main,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name--csitem .card-face-csitem-main,
#collection-page .collection-v1-card .card-face-name--csitem .card-face-csitem-main {
  min-height: 22px !important;
  line-height: 1 !important;
  transform: none !important;
}

/* ===== v30 card description and normal CS item title alignment ===== */
#inventory-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-community-grid .market-v1-card--card-face .card-face-desc-with-series,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-desc-with-series,
#collection-page .collection-v1-card .card-face-desc-with-series {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  padding: 8px 10px 5px !important;
}

#inventory-grid .market-v1-card--card-face .card-face-name--csitem:not(.card-face-name--csitem-tight):not(.card-face-name--csitem-extra-tight) .card-face-csitem-prefix,
#market-v1-community-grid .market-v1-card--card-face .card-face-name--csitem:not(.card-face-name--csitem-tight):not(.card-face-name--csitem-extra-tight) .card-face-csitem-prefix,
#market-v1-showcase-grid .market-v1-card--card-face .card-face-name--csitem:not(.card-face-name--csitem-tight):not(.card-face-name--csitem-extra-tight) .card-face-csitem-prefix,
#collection-page .collection-v1-card .card-face-name--csitem:not(.card-face-name--csitem-tight):not(.card-face-name--csitem-extra-tight) .card-face-csitem-prefix {
  transform: translateY(1px) !important;
}
