:root {
  --bg-deep: #0b0c18;
  --bg-panel: #15182c;
  --bg-card: #1c2038;
  --bg-card-hover: #242947;
  --bg-highlight: linear-gradient(145deg, rgba(46, 36, 22, 0.88), rgba(26, 28, 52, 0.95));
  --gold-main: #e7c27d;
  --gold-bright: #fae0a8;
  --gold-dim: rgba(231, 194, 125, 0.25);
  --gold-border: rgba(231, 194, 125, 0.42);
  --accent-coral: #ff6b6b;
  --accent-s: #e879f9;
  --accent-mount: #fbbf24;
  --accent-wing: #38bdf8;
  --text-primary: #f3f4f8;
  --text-secondary: #a5acc7;
  --text-muted: #6f7696;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(114, 78, 179, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 8%, rgba(218, 165, 75, 0.16) 0%, transparent 40%),
    var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ==================== Topbar ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(13, 15, 28, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-dim);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5d693, #b5802d);
  color: #1a1205;
  font-weight: 900;
  font-size: 21px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(231, 194, 125, 0.35);
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-mode-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  white-space: nowrap;
}

/* ==================== Buttons ==================== */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, #f0cf88, #c5913c);
  color: #1c1304;
  box-shadow: 0 4px 14px rgba(197, 145, 60, 0.28);
}

.btn-gold:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(231, 194, 125, 0.08);
  color: var(--gold-main);
  border-color: var(--gold-border);
}

.btn-outline:hover {
  background: rgba(231, 194, 125, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ==================== Main Container ==================== */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

/* ==================== Hall Search Palace ==================== */
.search-palace {
  background: linear-gradient(160deg, rgba(31, 35, 64, 0.92), rgba(20, 22, 41, 0.95));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
}

.palace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.palace-title {
  font-size: 22px;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.palace-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.hall-counter {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.hall-counter strong {
  color: var(--gold-bright);
  font-size: 16px;
  margin: 0 3px;
}

.item-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.autocomplete-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}

#itemSearchInput {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
  background: rgba(10, 12, 24, 0.78);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#itemSearchInput:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(231, 194, 125, 0.16);
}

.suggest-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1e36;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.72);
  z-index: 95;
  max-height: 300px;
  overflow-y: auto;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.suggest-item:hover {
  background: rgba(231, 194, 125, 0.14);
}

.suggest-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}

.suggest-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-item-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--gold-main);
  white-space: nowrap;
}

/* Selected Item Chips */
.selected-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(231, 194, 125, 0.09);
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-sm);
}

.selected-chips-label {
  font-size: 12px;
  color: var(--gold-bright);
  font-weight: 600;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(231, 194, 125, 0.24), rgba(181, 128, 45, 0.24));
  border: 1px solid var(--gold-main);
  color: var(--gold-bright);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Hot Tags */
.hot-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hot-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.hot-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(231, 194, 125, 0.2);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.16s;
  white-space: nowrap;
  flex-shrink: 0;
}

.hot-tag:hover {
  border-color: var(--gold-main);
  color: var(--gold-bright);
  background: rgba(231, 194, 125, 0.12);
}

.hot-tag img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Mobile Sort Bar (Hidden on Desktop) */
.cbg-mobile-sortbar {
  display: none;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 145px;
  flex: 1;
}

.filter-group label {
  font-size: 11px;
  color: var(--text-muted);
}

.filter-group input,
.filter-group select {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 12, 24, 0.72);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--gold-border);
}

/* ==================== Hall Account Cards ==================== */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
  gap: 20px;
}

.acc-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid rgba(231, 194, 125, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.acc-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-main);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.52), 0 0 20px rgba(231, 194, 125, 0.12);
}

.acc-card-portrait {
  width: 172px;
  min-height: 242px;
  background: radial-gradient(circle at 50% 35%, #2d325a, #121428);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border-subtle);
}

.acc-card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.acc-card-code {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(11, 12, 24, 0.84);
  border: 1px solid var(--gold-dim);
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  z-index: 2;
}

.acc-card-status {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 600;
  z-index: 2;
}

.acc-card-status.unlisted {
  background: rgba(239, 68, 68, 0.88);
  color: #fff;
}

.acc-card-body {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.acc-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.acc-card-role-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.acc-card-rolename {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-card-price {
  font-size: 21px;
  font-weight: 900;
  color: var(--accent-coral);
  white-space: nowrap;
  flex-shrink: 0;
}

.acc-card-owner-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.acc-card-owner {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(231, 194, 125, 0.16), rgba(197, 145, 60, 0.12));
  border: 1px solid rgba(231, 194, 125, 0.42);
  white-space: nowrap;
}

.acc-card-owner.empty {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  font-weight: 600;
}

.acc-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.42;
}

.acc-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.gender-pill {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.gender-pill.male {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.gender-pill.female {
  background: rgba(244, 114, 182, 0.16);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.35);
}

.mini-tag {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.mini-tag.gold {
  background: rgba(231, 194, 125, 0.15);
  color: var(--gold-bright);
  border-color: rgba(231, 194, 125, 0.38);
}

.mini-tag.red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(180, 83, 9, 0.32));
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.62);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.14);
  white-space: nowrap;
  flex-shrink: 0;
}

.vip-pill.editable {
  cursor: pointer;
}

.vip-pill.editable:hover {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(180, 83, 9, 0.42));
}

.vip-quick-btn {
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-bright);
  background: rgba(231, 194, 125, 0.08);
  border: 1px dashed rgba(231, 194, 125, 0.5);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.vip-quick-btn:hover {
  background: rgba(231, 194, 125, 0.18);
  border-style: solid;
}

/* Matched items banner when searching */
.matched-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.matched-strip-label {
  font-size: 11px;
  color: #4ade80;
  font-weight: 700;
}

.matched-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #dcfce7;
}

.matched-mini img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Card Highlight Preview Strip */
.card-hl-strip {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.card-hl-label {
  font-size: 11px;
  color: var(--gold-main);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-hl-more {
  color: var(--text-muted);
}

.card-hl-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-share-poster-btn {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(231, 194, 125, 0.48);
  background: rgba(231, 194, 125, 0.14);
  color: var(--gold-bright);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.16s;
}

.card-share-poster-btn:hover {
  background: rgba(231, 194, 125, 0.28);
  border-color: var(--gold-bright);
}

.card-hl-icons {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.card-hl-tile {
  width: 52px;
  flex-shrink: 0;
  text-align: center;
}

.card-hl-tile-box {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: radial-gradient(circle, rgba(231, 194, 125, 0.16), rgba(11, 12, 24, 0.75));
  border: 1px solid rgba(231, 194, 125, 0.35);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-hl-tile-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-hl-tile-name {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

/* ==================== Detail View ==================== */
.detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-topbar-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: 345px 1fr;
  gap: 22px;
  align-items: start;
}

.detail-sidebar {
  position: sticky;
  top: 78px;
}

.portrait-card {
  background: var(--bg-panel);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
}

.portrait-hero-top {
  display: block;
}

.portrait-header-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 6px;
}

.code-pill {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-bright);
  background: rgba(231, 194, 125, 0.14);
  border: 1px solid var(--gold-dim);
  padding: 2px 9px;
  border-radius: 6px;
}

.status-pill {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 6px;
  font-weight: 700;
}

.status-pill.listed {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.status-pill.unlisted {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.portrait-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 398 / 580;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #2c3159, #101224);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  margin-bottom: 12px;
}

.portrait-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait-zoom-hint {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: rgba(11, 12, 24, 0.78);
  border: 1px solid rgba(231, 194, 125, 0.36);
  color: var(--gold-bright);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  pointer-events: none;
}

.no-portrait {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.role-identity {
  margin-bottom: 12px;
}

.role-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 6px;
}

.role-name-line h2 {
  font-size: 20px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-badges-line {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.price-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(231, 194, 125, 0.14));
  border: 1px solid rgba(255, 107, 107, 0.35);
  margin-bottom: 12px;
}

.price-banner.owner-banner {
  background: linear-gradient(135deg, rgba(231, 194, 125, 0.16), rgba(197, 145, 60, 0.11));
  border-color: rgba(231, 194, 125, 0.42);
  cursor: pointer;
  gap: 10px;
}

.price-banner.owner-banner:hover {
  border-color: var(--gold-bright);
}

.owner-main-text {
  font-size: 19px;
  font-weight: 800;
  color: var(--gold-bright);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-copy-chip {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231, 194, 125, 0.45);
  background: rgba(11, 12, 24, 0.55);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.price-label {
  font-size: 13px;
  color: var(--gold-bright);
  font-weight: 600;
}

.price-value {
  font-size: 25px;
  font-weight: 900;
  color: var(--accent-coral);
}

.currency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.curr-box {
  background: rgba(10, 12, 24, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.curr-name {
  color: var(--text-secondary);
}

.curr-box strong {
  color: var(--gold-bright);
  font-size: 13px;
}

.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 4px;
  text-align: center;
}

.stat-pill span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.stat-pill strong {
  font-size: 15px;
  color: var(--text-primary);
}

.seller-note-box {
  background: rgba(231, 194, 125, 0.06);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.note-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-main);
  margin-bottom: 4px;
}

.seller-note-box p {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* Mobile-only elements hidden on Desktop */
.cbg-detail-tabs,
.mobile-info-panel,
.mob-goto-wardrobe-wrap,
.cbg-bottom-bar {
  display: none;
}

/* ==================== Detail Main Right ==================== */
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.detail-headline-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}

.detail-title {
  font-size: 20px;
  color: var(--gold-bright);
}

/* ★ Highlight Showcase Box ★ */
.highlight-showcase {
  background: var(--bg-highlight);
  border: 1.5px solid var(--gold-main);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 0 28px rgba(231, 194, 125, 0.08);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.star-emblem {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fae0a8, #c58d34);
  color: #1d1404;
  font-size: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(250, 224, 168, 0.4);
}

.wardrobe-emblem {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(231, 194, 125, 0.16);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-title-wrap h3 {
  font-size: 17px;
  color: var(--gold-bright);
}

.section-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.hl-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hl-tab {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text-secondary);
  border: 1px solid var(--gold-dim);
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.hl-tab.active,
.hl-tab:hover {
  background: var(--gold-main);
  color: #1b1204;
  font-weight: 700;
}

/* Wardrobe Main Panel */
.wardrobe-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.wardrobe-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.merge-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

#inAccountSearch {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-dim);
  background: rgba(10, 12, 24, 0.78);
  color: var(--text-primary);
  font-size: 13px;
  width: 220px;
  outline: none;
}

#inAccountSearch:focus {
  border-color: var(--gold-main);
}

/* Category & Part Tabs */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.cat-tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: all 0.16s;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-tab small {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 2px;
}

.cat-tab:hover {
  color: var(--text-primary);
  border-color: var(--gold-dim);
}

.cat-tab.active {
  background: linear-gradient(135deg, rgba(231, 194, 125, 0.25), rgba(181, 128, 45, 0.28));
  color: var(--gold-bright);
  border-color: var(--gold-main);
}

.part-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.part-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-family: inherit;
}

.part-pill-cnt {
  font-style: normal;
  font-size: 11px;
  opacity: 0.72;
}

.part-pill.active {
  border-color: var(--gold-main);
  color: var(--gold-bright);
  background: rgba(231, 194, 125, 0.16);
  font-weight: 600;
}

/* ==================== Item Thumbnail + Name Grid ==================== */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(114px, 1fr));
  gap: 12px;
}

.item-grid.highlight-mode {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 14px;
}

.item-tile {
  position: relative;
  background: rgba(15, 17, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 10px 7px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  min-width: 0;
}

.item-tile:hover {
  transform: translateY(-3px);
  border-color: var(--gold-main);
  background: rgba(28, 32, 58, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* Rarity Accents */
.item-tile.rarity-mount {
  border-color: rgba(251, 191, 36, 0.55);
  background: radial-gradient(circle at 50% 35%, rgba(251, 191, 36, 0.16), rgba(15, 17, 33, 0.92));
}

.item-tile.rarity-s {
  border-color: rgba(232, 121, 249, 0.52);
  background: radial-gradient(circle at 50% 35%, rgba(232, 121, 249, 0.15), rgba(15, 17, 33, 0.92));
}

.item-tile.rarity-wing {
  border-color: rgba(56, 189, 248, 0.48);
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.14), rgba(15, 17, 33, 0.92));
}

.tile-icon-box {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 5px;
}

.highlight-mode .tile-icon-box {
  width: 90px;
  height: 90px;
}

.tile-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.tile-badge-left {
  position: absolute;
  top: 5px;
  left: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 2;
}

.badge-worn {
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.3;
}

.badge-s {
  background: linear-gradient(135deg, #f0abfc, #c026d3);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.3;
}

.badge-mount {
  background: linear-gradient(135deg, #fde68a, #d97706);
  color: #1c1202;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.3;
}

.tile-qty {
  position: absolute;
  right: 0;
  bottom: 0;
  background: rgba(11, 12, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--gold-bright);
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.4;
}

.tile-star-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 12, 24, 0.72);
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.15s;
}

.tile-star-btn:hover {
  transform: scale(1.12);
  color: var(--gold-bright);
  border-color: var(--gold-main);
}

.tile-star-btn.starred {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(45, 34, 10, 0.88);
}

.tile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-part {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.load-more-wrap {
  text-align: center;
  margin-top: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 38px 16px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ==================== Modals ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  position: relative;
  width: 100%;
  background: #181b31;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.72);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-sm {
  max-width: 460px;
}

.modal-lg {
  max-width: 780px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
}

.modal-title {
  font-size: 18px;
  color: var(--gold-bright);
  margin-bottom: 6px;
  padding-right: 32px;
}

.modal-hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-hint code {
  color: var(--gold-bright);
  background: rgba(231, 194, 125, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Forms */
.form-field {
  margin-bottom: 13px;
}

.form-field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 24, 0.78);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold-main);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.form-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.inline-pair {
  display: flex;
  gap: 6px;
}

.checkbox-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* Item Detail Modal */
.item-detail-body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.item-detail-icon-wrap {
  width: 108px;
  height: 108px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(231, 194, 125, 0.2), rgba(10, 12, 24, 0.85));
  border: 1px solid var(--gold-border);
  padding: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-detail-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-detail-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.item-detail-info h3 {
  font-size: 18px;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.item-detail-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.item-detail-loc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Lightbox */
.lightbox-wrap {
  position: relative;
  max-height: 92vh;
}

.lightbox-wrap img {
  max-height: 88vh;
  max-width: 92vw;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gold-main);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

/* Share Long Poster Modal */
.modal-poster {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.poster-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.poster-scope-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.poster-cfg-btn {
  padding: 4px 9px;
  font-size: 12px;
}

.poster-url-cfg {
  background: rgba(10, 12, 24, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.poster-url-cfg label {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.poster-url-cfg-row {
  display: flex;
  gap: 8px;
}

.poster-url-cfg-row input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 12, 24, 0.9);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.poster-url-cfg-row input:focus {
  border-color: var(--gold-main);
}

.poster-url-preview {
  margin-top: 5px;
  font-size: 11px;
  color: var(--gold-bright);
  word-break: break-all;
}

.poster-preview-stage {
  flex: 1;
  min-height: 260px;
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #0b0d1a;
  border: 1px solid rgba(231, 194, 125, 0.25);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poster-result-img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  -webkit-touch-callout: default;
  user-select: auto;
}

.poster-loading {
  padding: 60px 16px;
  color: var(--gold-bright);
  font-size: 13.5px;
  text-align: center;
}

.poster-footer-actions .btn {
  white-space: nowrap;
}

/* Rules List */
.rule-add-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

.rule-add-bar input,
.rule-add-bar select {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 24, 0.78);
  color: var(--text-primary);
  font-size: 13px;
}

.rules-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 8px;
}

.rules-sync-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rules-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.rule-chip-card {
  background: rgba(10, 12, 24, 0.68);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rule-chip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
}

.rule-chip-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.rule-del-btn {
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1f2442;
  border: 1px solid var(--gold-main);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

/* =====================================================================
   手机端 & 平板自适应（参考大话西游 / 网易藏宝阁 H5 经典布局）
   ===================================================================== */

@media (max-width: 900px) {
  .mob-tab-hide {
    display: none !important;
  }

  .main-container {
    padding: 12px 12px calc(86px + env(safe-area-inset-bottom, 0px));
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .detail-layout > *,
  .detail-main,
  .detail-main > *,
  .wardrobe-body-wrap,
  .wardrobe-grid-col {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .detail-sidebar {
    position: static;
    width: 100%;
  }

  /* 详情页顶部操作条紧凑化 */
  .detail-topbar {
    margin-bottom: 10px;
    gap: 6px;
  }

  .detail-topbar .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* ---- 详情页角色头卡：大话藏宝阁左立绘右档案黄金布局 ---- */
  .portrait-card {
    padding: 12px;
    border-radius: 12px;
  }

  .portrait-hero-top {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 12px;
    align-items: stretch;
  }

  .portrait-stage {
    width: 108px;
    height: 158px;
    aspect-ratio: auto;
    margin-bottom: 0;
    border-radius: 9px;
  }

  .portrait-zoom-hint {
    bottom: 4px;
    right: 4px;
    left: 4px;
    text-align: center;
    font-size: 10px;
    padding: 2px 4px;
  }

  .portrait-hero-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
  }

  .portrait-header-badges {
    margin-bottom: 4px;
  }

  .code-pill,
  .status-pill {
    font-size: 11px;
    padding: 1px 7px;
  }

  .role-identity {
    margin-bottom: 6px;
  }

  .role-name-line {
    margin-bottom: 4px;
    gap: 6px;
  }

  .role-name-line h2 {
    font-size: 17px;
  }

  .price-banner {
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
  }

  .owner-main-text {
    font-size: 15px;
  }

  .owner-copy-chip {
    padding: 2px 8px;
    font-size: 11px;
  }

  .price-label {
    font-size: 11.5px;
  }

  .price-value {
    font-size: 20px;
  }

  .stat-summary-grid {
    margin-bottom: 0;
    gap: 4px;
  }

  .stat-pill {
    padding: 4px 2px;
    border-radius: 6px;
  }

  .stat-pill span {
    font-size: 10px;
  }

  .stat-pill strong {
    font-size: 13px;
  }

  /* 4项游戏货币在手机头卡下方单行紧凑排列 */
  .currency-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 0;
  }

  .curr-box {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    gap: 1px;
    text-align: center;
  }

  .curr-name {
    font-size: 10px;
  }

  .curr-box strong {
    font-size: 12px;
  }

  /* 头卡里的长文案和主标题移入「资产说明」页签，让第一屏直接露出重点装备/时装 */
  #detSidebarNoteBox,
  #detHeadlineCard {
    display: none;
  }

  /* ---- 大话藏宝阁风格吸顶模块导航栏 ---- */
  .cbg-detail-tabs {
    display: flex;
    align-items: center;
    position: sticky;
    top: 51px;
    z-index: 90;
    width: 100%;
    background: rgba(18, 21, 39, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--gold-dim);
    border-radius: 10px;
    padding: 4px;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
  }

  .cbg-detail-tabs::-webkit-scrollbar {
    display: none;
  }

  .cbg-dtab {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 4px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.16s ease;
    text-align: center;
  }

  .cbg-dtab small {
    font-size: 10.5px;
    opacity: 0.85;
  }

  .cbg-dtab.active {
    background: linear-gradient(135deg, #f0cf88, #c5913c);
    color: #1b1204;
    font-weight: 800;
    box-shadow: 0 2px 10px rgba(197, 145, 60, 0.35);
  }

  /* 手机端「资产说明」面板 */
  .mobile-info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--gold-dim);
    border-radius: 12px;
    padding: 14px;
  }

  .mobile-info-block h4 {
    font-size: 13px;
    color: var(--gold-bright);
    margin-bottom: 6px;
  }

  .mobile-info-block p {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
  }

  .mob-goto-wardrobe-wrap {
    display: block;
    margin-top: 14px;
  }

  .mob-goto-wardrobe-btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
  }

  /* ---- 手机底部固定号主与操作栏 ---- */
  .cbg-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    background: rgba(14, 16, 30, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--gold-border);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.55);
  }

  .cbg-bottom-price-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .cbg-bottom-owner-wrap {
    cursor: pointer;
  }

  .cbg-bottom-code {
    font-size: 10.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cbg-bottom-price {
    font-size: 21px;
    font-weight: 900;
    color: var(--accent-coral);
    line-height: 1.15;
  }

  .cbg-bottom-price.cbg-bottom-owner {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--gold-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cbg-bottom-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }

  .cbg-bottom-actions .btn {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .poster-preview-stage {
    max-height: 56vh;
  }

  .poster-url-cfg-row input {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  /* ---- 顶栏精简 ---- */
  .topbar-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-emblem {
    width: 33px;
    height: 33px;
    font-size: 17px;
    border-radius: 8px;
  }

  .brand-title {
    font-size: 15.5px;
  }

  .brand-sub,
  .admin-mode-pill {
    display: none !important;
  }

  .topbar-actions {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .topbar-actions .btn {
    padding: 5px 9px;
    font-size: 12px;
  }

  /* ---- 选号大厅：紧凑搜索区 + 大话藏宝阁排序筛选栏 ---- */
  .search-palace {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .palace-header {
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
  }

  .palace-title {
    font-size: 16px;
    margin-bottom: 0;
  }

  .palace-desc {
    display: none;
  }

  .hall-counter {
    font-size: 11.5px;
    padding: 3px 9px;
  }

  .hall-counter strong {
    font-size: 13.5px;
  }

  .item-search-row {
    gap: 6px;
    margin-bottom: 10px;
  }

  #itemSearchInput {
    padding: 9px 10px 9px 34px;
    font-size: 16px; /* 防止 iOS Safari 点击输入框自动放大页面 */
    border-radius: 8px;
  }

  .search-icon {
    left: 10px;
    font-size: 14px;
  }

  #btnAddItemFilter {
    padding: 0 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  /* 热门亮点单行横向丝滑滚动 */
  .hot-tags-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 10px;
    padding-bottom: 2px;
  }

  .hot-tags-row::-webkit-scrollbar {
    display: none;
  }

  /* 大话藏宝阁式快捷排序 + 筛选按钮条 */
  .cbg-mobile-sortbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
    gap: 2px;
  }

  .cbg-sort-item,
  .cbg-filter-trigger {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 2px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
  }

  .cbg-sort-item.active {
    color: var(--gold-bright);
    background: rgba(231, 194, 125, 0.14);
    font-weight: 700;
  }

  .cbg-filter-trigger {
    border-left: 1px solid var(--border-subtle);
    border-radius: 0;
  }

  .cbg-filter-trigger.active {
    color: var(--gold-bright);
  }

  .filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-coral);
    display: inline-block;
  }

  /* 手机端默认收起二级筛选面板，点「筛选」展开 */
  .filter-bar {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .filter-bar.mob-open {
    display: grid;
  }

  .filter-bar .filter-group:first-child {
    grid-column: 1 / -1;
  }

  .desktop-sort-group {
    display: none;
  }

  .filter-group {
    min-width: 0;
  }

  .filter-group input,
  .filter-group select {
    font-size: 15px;
    padding: 7px 9px;
  }

  #btnResetFilters {
    grid-column: 1 / -1;
    width: 100%;
    padding: 8px;
  }

  /* ---- 选号大厅：藏宝阁紧凑左立绘右详情商品卡 ---- */
  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .acc-card {
    border-radius: 12px;
  }

  .acc-card:hover {
    transform: none;
  }

  .acc-card-portrait {
    width: 104px;
    min-height: 152px;
  }

  .acc-card-code {
    top: 5px;
    left: 5px;
    font-size: 10px;
    padding: 1px 5px;
  }

  .acc-card-body {
    padding: 10px 11px;
    gap: 6px;
  }

  .acc-card-rolename {
    font-size: 14.5px;
  }

  .acc-card-price {
    font-size: 18px;
  }

  .acc-card-owner {
    font-size: 11.5px;
    padding: 2px 8px;
  }

  .acc-card-title {
    font-size: 12.5px;
    -webkit-line-clamp: 1;
    color: var(--text-secondary);
  }

  .acc-card-meta {
    gap: 4px;
  }

  .acc-card-meta .mini-tag,
  .acc-card-role-wrap .mini-tag,
  .acc-card-role-wrap .gender-pill {
    font-size: 10px;
    padding: 1px 5px;
  }

  .card-hl-strip {
    padding-top: 6px;
  }

  .card-hl-label {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .card-hl-icons {
    gap: 5px;
    scrollbar-width: none;
  }

  .card-hl-icons::-webkit-scrollbar {
    display: none;
  }

  .card-hl-tile {
    width: 44px;
  }

  .card-hl-tile-box {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    padding: 3px;
  }

  .card-hl-tile-name {
    font-size: 9.5px;
    margin-top: 2px;
  }

  /* ---- 详情页：重点展示区 & 全量衣橱手机化 ---- */
  .highlight-showcase,
  .wardrobe-panel {
    padding: 12px;
    border-radius: 12px;
  }

  .section-header {
    gap: 8px;
    margin-bottom: 10px;
  }

  .star-emblem,
  .wardrobe-emblem {
    width: 28px;
    height: 28px;
    font-size: 15px;
    border-radius: 7px;
  }

  .section-title-wrap {
    gap: 8px;
  }

  .section-title-wrap h3 {
    font-size: 15px;
  }

  .section-sub {
    font-size: 11px;
  }

  /* 亮点分类、一级衣橱分类全部单行横滑，不占高度 */
  .hl-filter-tabs,
  .cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }

  .hl-filter-tabs::-webkit-scrollbar,
  .cat-tabs::-webkit-scrollbar {
    display: none;
  }

  .cat-tabs {
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .cat-tab {
    padding: 6px 11px;
    font-size: 12px;
  }

  .wardrobe-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .in-acc-search-wrap {
    flex: 1;
    min-width: 140px;
  }

  #inAccountSearch {
    width: 100%;
    font-size: 16px;
    padding: 6px 10px;
  }

  /* ---- 核心亮点：大话藏宝阁式「左侧竖向部位栏 + 右侧高密度图鉴宫格」 ---- */
  .wardrobe-body-wrap.has-side-parts {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .wardrobe-body-wrap.has-side-parts .part-subtabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
    position: sticky;
    top: 102px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    scrollbar-width: none;
    background: rgba(10, 12, 24, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    padding: 4px;
  }

  .wardrobe-body-wrap.has-side-parts .part-subtabs::-webkit-scrollbar {
    display: none;
  }

  .wardrobe-body-wrap.has-side-parts .part-pill {
    width: 100%;
    border-radius: 6px;
    padding: 8px 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    text-align: center;
    background: transparent;
    border: 1px solid transparent;
    font-size: 11.5px;
    line-height: 1.25;
  }

  .wardrobe-body-wrap.has-side-parts .part-pill.active {
    background: linear-gradient(135deg, rgba(231, 194, 125, 0.24), rgba(181, 128, 45, 0.24));
    border-color: var(--gold-main);
    color: var(--gold-bright);
    box-shadow: inset 2px 0 0 var(--gold-bright);
  }

  .wardrobe-body-wrap.has-side-parts .part-pill-cnt {
    font-size: 10px;
  }

  /* 无左侧栏时（重点区、全部、坐骑、道具）：4列高密度图鉴；有左侧部位栏时：3列图鉴 */
  .item-grid,
  .item-grid.highlight-mode {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .wardrobe-body-wrap.has-side-parts .item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .item-tile {
    padding: 7px 4px 6px;
    border-radius: 8px;
  }

  .item-tile:hover {
    transform: none;
  }

  .tile-icon-box,
  .highlight-mode .tile-icon-box {
    width: 58px;
    height: 58px;
    margin-bottom: 4px;
  }

  .tile-name {
    font-size: 11px;
  }

  .tile-part {
    font-size: 9.5px;
  }

  .badge-worn,
  .badge-s,
  .badge-mount {
    font-size: 9px;
    padding: 0 3px;
  }

  .tile-star-btn {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: 3px;
    right: 3px;
  }

  /* ---- 手机端弹窗升级为原生 App 底部抽屉（Bottom Sheet） ---- */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #lightboxModal.modal-backdrop {
    align-items: center;
    padding: 12px;
  }

  .modal-box {
    max-width: 100% !important;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .item-detail-icon-wrap {
    width: 88px;
    height: 88px;
    padding: 8px;
  }

  .item-detail-info h3 {
    font-size: 16.5px;
  }

  .form-grid-2,
  .form-grid-4,
  .form-grid-5,
  .rule-add-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-field input[type="text"],
  .form-field input[type="password"],
  .form-field input[type="number"],
  .form-field select,
  .form-field textarea {
    font-size: 16px;
  }

  .modal-footer .btn {
    flex: 1;
  }

  /* Toast 居中避开底部操作栏 */
  .toast-container {
    left: 14px;
    right: 14px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: 360px;
    text-align: center;
  }
}

/* 超小屏手机（<= 335px）微调列数防拥挤 */
@media (max-width: 335px) {
  .item-grid,
  .item-grid.highlight-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wardrobe-body-wrap.has-side-parts .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================== 升级功能包 (#2-#10) 样式 ==================== */
.fav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
  font-size: 11px;
  font-weight: 800;
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-range-inputs input {
  width: 76px;
  background: rgba(9, 10, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  font-size: 13px;
  outline: none;
}

.price-range-inputs input:focus {
  border-color: var(--gold-main);
}

.price-range-inputs span {
  color: var(--text-muted);
  font-size: 12px;
}

/* 收藏夹模式横幅 */
.fav-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(30, 24, 52, 0.92));
  border: 1px solid rgba(251, 113, 133, 0.38);
}

.fav-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.fav-banner-left em {
  font-style: normal;
  color: #fda4af;
  font-weight: 800;
}

.fav-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 状态标签 / 置顶 / 浏览热度 / 降价 */
.status-pill.listed {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.status-pill.reserved {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.42);
}

.status-pill.sold {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.38);
}

.status-pill.unlisted {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.pinned-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.16));
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.5);
  white-space: nowrap;
}

.view-pill {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.sold-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  padding: 5px 16px;
  border: 2.5px solid rgba(248, 113, 113, 0.85);
  border-radius: 8px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.78);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.acc-card.card-sold {
  opacity: 0.82;
}

.acc-card.card-pinned {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.12);
}

.acc-card-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.card-portrait-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  z-index: 4;
}

.card-mini-act {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 13, 28, 0.78);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11.5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}

.card-mini-act:hover {
  border-color: var(--gold-main);
}

.card-mini-act.active-fav {
  background: rgba(225, 29, 72, 0.28);
  border-color: rgba(251, 113, 133, 0.65);
  color: #fecdd3;
}

.card-mini-act.active-cmp {
  background: rgba(56, 189, 248, 0.26);
  border-color: rgba(56, 189, 248, 0.65);
  color: #bae6fd;
}

.acc-card-status {
  bottom: 38px;
  z-index: 5;
}

.acc-card-status.reserved {
  background: rgba(217, 119, 6, 0.92);
  color: #fffbeb;
}

.acc-card-status.sold {
  background: rgba(51, 65, 85, 0.92);
  color: #f1f5f9;
}

.card-top-pin {
  position: absolute;
  top: 34px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fffbeb;
  font-size: 11px;
  font-weight: 800;
  z-index: 5;
}

.card-photo-cnt {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(10, 12, 24, 0.75);
  color: #e2e8f0;
  font-size: 11px;
  z-index: 5;
}

.price-main-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.orig-price-wrap,
.card-orig-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.orig-price-wrap del,
.card-orig-wrap del {
  color: var(--text-muted);
  font-size: 12.5px;
}

.drop-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

/* 详情页多图相册 */
.portrait-media-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.photo-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(11, 13, 28, 0.78);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  z-index: 4;
}

.gallery-thumb-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.gallery-thumb-item {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: #0d0f1c;
  padding: 0;
  transition: border-color 0.15s ease;
}

.gallery-thumb-item.active,
.gallery-thumb-item:hover {
  border-color: var(--gold-main);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-status-select {
  background: rgba(28, 32, 56, 0.95);
  color: var(--gold-bright);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Lightbox 多图切换 */
.lightbox-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(12, 14, 28, 0.72);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-nav-btn:hover {
  background: rgba(231, 194, 125, 0.28);
  border-color: var(--gold-main);
}

.lb-prev {
  left: 10px;
}

.lb-next {
  right: 10px;
}

.lb-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10, 12, 24, 0.8);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 700;
}

/* 编辑弹窗多图管理 */
.edit-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.edit-gallery-chip {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.edit-gallery-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-gallery-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.form-checkbox-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

/* 套装齐套检测 (#6) */
.badge-fullset {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(245, 158, 11, 0.25));
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.item-set-info {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  font-size: 12.5px;
  color: var(--text-primary);
}

.item-set-info.partial {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(251, 191, 36, 0.28);
}

.set-parts-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.set-part-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

/* 悬浮对比条 & PK对比弹窗 (#4) */
.compare-float-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 160;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(18, 22, 42, 0.96);
  border: 1px solid var(--gold-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
}

.compare-slots-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cmp-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  max-width: 160px;
}

.cmp-slot-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-slot-pill button {
  background: none;
  border: none;
  color: #fca5a5;
  cursor: pointer;
  font-size: 14px;
}

.compare-float-actions {
  display: flex;
  gap: 6px;
}

.modal-box.modal-xl {
  max-width: 1020px;
}

.compare-grid-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13.5px;
}

.compare-grid-table th,
.compare-grid-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.compare-grid-table th:first-child,
.compare-grid-table td:first-child {
  text-align: left;
  color: var(--text-secondary);
  width: 110px;
}

.compare-win {
  color: #4ade80;
  font-weight: 800;
}

.compare-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compare-col-box {
  background: rgba(11, 13, 28, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
}

.compare-col-box h4 {
  font-size: 13px;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.compare-mini-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
}

.compare-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
}

.compare-mini-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 管理员数据弹窗 (#9) */
.stats-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stats-kpi-box {
  background: rgba(12, 15, 30, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.stats-kpi-box span {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.stats-kpi-box strong {
  font-size: 18px;
  color: var(--gold-bright);
}

.stats-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stats-panel-card {
  background: rgba(11, 13, 28, 0.62);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
}

.stats-panel-card h4 {
  font-size: 14px;
  color: var(--gold-main);
  margin-bottom: 10px;
}

.hot-search-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 310px;
  overflow-y: auto;
}

.hot-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
}

.hot-search-row.clickable {
  cursor: pointer;
}

.hot-search-row.clickable:hover {
  background: rgba(231, 194, 125, 0.12);
}

.opp-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.opp-tag.missing {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.opp-tag.stocked {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

@media (max-width: 768px) {
  body.is-admin .topbar-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  body.is-admin .topbar-actions {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .price-range-inputs input {
    flex: 1;
    width: auto;
  }

  .cbg-bottom-actions .btn {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .mob-icon-btn {
    padding: 7px 8px !important;
  }

  .compare-float-bar {
    left: 10px;
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .compare-diff-grid,
  .stats-panels-grid {
    grid-template-columns: 1fr;
  }

  .card-top-pin {
    top: 25px;
    left: 5px;
    font-size: 9.5px;
    padding: 1px 5px;
  }

  .card-photo-cnt {
    top: 5px;
    right: 5px;
    font-size: 9.5px;
    padding: 1px 4px;
  }

  .acc-card-status {
    bottom: 30px;
    left: 5px;
    font-size: 9.5px;
    padding: 1px 5px;
  }

  .card-portrait-actions {
    left: 4px;
    right: 4px;
    bottom: 4px;
    gap: 3px;
  }

  .card-mini-act {
    font-size: 10px;
    padding: 2px 4px;
  }

  .acc-card-portrait .sold-stamp,
  .portrait-stage .sold-stamp {
    font-size: 12px;
    padding: 3px 8px;
    letter-spacing: 1.5px;
  }

  .gallery-thumb-item {
    width: 34px;
    height: 34px;
  }
}
