/* ===== 全局基础样式 ===== */
* { box-sizing: border-box; }

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #eef2ff 100%);
  min-height: 100vh;
}

/* ===== 导航按钮 ===== */
.nav-btn {
  display: inline-flex; align-items: center;
  padding: 0.4rem 0.9rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500; color: #1e40af;
  transition: all 0.2s ease; border: none; background: transparent;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.nav-btn:hover { background: #dbeafe; color: #1d4ed8; }
.nav-btn.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* 导航栏横向滚动时隐藏滚动条 */
header nav::-webkit-scrollbar { display: none; }

/* 移动端操作按钮：只显示图标，更紧凑 */
@media (max-width: 639px) {
  .nav-btn-action-mobile {
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
  }
}

.nav-btn-action {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.8rem; border-radius: 9999px;
  font-size: 0.8rem; font-weight: 500; color: #1d4ed8;
  transition: all 0.2s ease; border: 1.5px solid #93c5fd;
  background: white; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.nav-btn-action:hover {
  background: #eff6ff; border-color: #3b82f6; color: #2563eb;
  transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.page-content { display: none; animation: fadeIn 0.3s ease; }
.page-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-primary {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; border-radius: 9999px; font-size: 0.875rem;
  font-weight: 500; border: none; cursor: pointer;
  transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }

.btn-secondary {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1.25rem; background: white; color: #2563eb;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 500;
  border: 1.5px solid #93c5fd; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.btn-secondary:hover { background: #eff6ff; border-color: #3b82f6; }

.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1.25rem; background: transparent; color: #1e40af;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.btn-ghost:hover { background: #dbeafe; }

.btn-danger {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1.25rem; background: #fee2e2; color: #dc2626;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.btn-danger:hover { background: #fecaca; }

.input-field {
  padding: 0.5rem 0.75rem; border: 1.5px solid #bfdbfe;
  border-radius: 0.75rem; font-size: 0.875rem; color: #1f2937;
  background: white; transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none; font-family: 'Noto Sans SC', sans-serif;
}
.input-field:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.input-field::placeholder { color: #93c5fd; }

.select-field {
  padding: 0.5rem 0.75rem; border: 1.5px solid #bfdbfe;
  border-radius: 0.75rem; font-size: 0.875rem; color: #1f2937;
  background: white; transition: border-color 0.2s ease;
  outline: none; cursor: pointer; font-family: 'Noto Sans SC', sans-serif;
}
.select-field:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.8125rem; font-weight: 500; color: #1e40af; }

.upload-area {
  border: 2px dashed #93c5fd; border-radius: 1rem; padding: 1.5rem;
  text-align: center; cursor: pointer; transition: all 0.2s ease;
  background: #eff6ff; min-height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.upload-area:hover, .upload-area.drag-over { border-color: #3b82f6; background: #dbeafe; }
.upload-area.drag-over { transform: scale(1.01); }

.stat-card {
  background: white; border-radius: 1rem; padding: 1rem 1.25rem;
  border: 1px solid #bfdbfe; text-align: center;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.08); transition: transform 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-num { font-size: 1.5rem; font-weight: 700; color: #2563eb; font-family: 'Playfair Display', serif; }
.stat-label { font-size: 0.75rem; color: #93c5fd; margin-top: 0.25rem; }

.item-card {
  background: white; border-radius: 1.25rem; overflow: hidden;
  border: 1px solid #bfdbfe; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06);
  transition: all 0.25s ease; cursor: pointer; position: relative;
  /* 性能优化：视口外的卡片跳过布局/绘制，极大改善 1000+ 卡片场景 */
  content-visibility: auto;
  contain-intrinsic-size: 280px 320px;
}
.item-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); border-color: #60a5fa; }

.item-card-img { width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #f8faff; }
.item-card-img-placeholder {
  width: 100%; aspect-ratio: 3/4;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.item-card-body { padding: 0.4rem 0.5rem 0.45rem; }
.item-card-name { font-size: 0.75rem; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.item-card-meta { font-size: 0.625rem; color: #9ca3af; margin-top: 0.08rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-card-badge { display: inline-flex; align-items: center; padding: 0.02rem 0.32rem; border-radius: 9999px; font-size: 0.5625rem; font-weight: 500; margin-top: 0; line-height: 1.35; }
/* 标签行 + 价格行紧凑化 */
.item-card-body .flex.flex-wrap.gap-1.mt-1\.5 { margin-top: 0.2rem !important; gap: 0.15rem !important; }
.item-card-body .flex.items-center.justify-between.mt-1\.5 { margin-top: 0.22rem !important; }
.item-card-body .text-xs { font-size: 0.625rem; }

.item-card-actions {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  opacity: 0; transition: opacity 0.22s ease;
  backdrop-filter: blur(1px);
}
.item-card:hover .item-card-actions { opacity: 1; }

.item-card-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  border: none; cursor: pointer; font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25); transition: all 0.18s ease;
  transform: translateY(6px);
}
.item-card:hover .item-card-action-btn { transform: translateY(0); }
.item-card-action-edit { background: white; color: #2563eb; }
.item-card-action-edit:hover {
  background: #3b82f6; color: white;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}
.item-card-action-delete { background: white; color: #dc2626; }
.item-card-action-delete:hover {
  background: #ef4444; color: white;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
}

.outfit-count-badge {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: rgba(59, 130, 246, 0.85); color: white;
  font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: 9999px; font-weight: 600;
}

.outfit-card {
  background: white; border-radius: 1.25rem; overflow: hidden;
  border: 1px solid #bfdbfe; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06);
  transition: all 0.25s ease; cursor: pointer; position: relative;
  /* 性能优化：视口外的卡片跳过布局/绘制 */
  content-visibility: auto;
  contain-intrinsic-size: 300px 340px;
}
.outfit-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); }

/* 搭配卡片图片区域包裹层（用于定位悬浮按钮） */
.outfit-card-thumb-wrap {
  position: relative; overflow: hidden;
  height: 240px;
  background: #f8fafc;
}
.outfit-card-imgs { height: 100%; }
.outfit-img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: unset; }
/* 单图模式：用 contain 显示完整图片，避免人物的"脚"被裁掉 */
.outfit-card-imgs.count-1 .outfit-img {
  object-fit: contain;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}
.outfit-img-placeholder {
  width: 100%; height: 100%; aspect-ratio: unset;
}

/* 悬浮操作按钮层 */
.outfit-card-actions {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  opacity: 0; transition: opacity 0.22s ease;
  backdrop-filter: blur(1px);
}
.outfit-card:hover .outfit-card-actions { opacity: 1; }

.outfit-card-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  border: none; cursor: pointer; font-size: 0.875rem;
  transition: all 0.18s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transform: translateY(6px);
}
.outfit-card:hover .outfit-card-action-btn { transform: translateY(0); }

.outfit-card-action-edit {
  background: white; color: #2563eb;
}
.outfit-card-action-edit:hover {
  background: #3b82f6; color: white;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.outfit-card-action-delete {
  background: white; color: #dc2626;
}
.outfit-card-action-delete:hover {
  background: #ef4444; color: white;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
}

.outfit-card-imgs { display: grid; gap: 2px; background: #bfdbfe; }
.outfit-card-imgs.count-1 { grid-template-columns: 1fr; }
.outfit-card-imgs.count-2 { grid-template-columns: 1fr 1fr; }
.outfit-card-imgs.count-3 { grid-template-columns: 1fr 1fr; }
.outfit-card-imgs.count-3 .outfit-img:first-child { grid-column: span 2; }
.outfit-card-imgs.count-4 { grid-template-columns: 1fr 1fr; }

.outfit-img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.outfit-img-placeholder {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
}
.outfit-card-body { padding: 0.4rem 0.55rem 0.5rem; }
.outfit-card-date-row {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 0.18rem;
}
.outfit-card-date { font-size: 0.75rem; font-weight: 600; color: #2563eb; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outfit-card-items-count {
  display: inline-flex; align-items: center; gap: 0.18rem;
  font-size: 0.625rem; color: #94a3b8; font-weight: 500;
  white-space: nowrap;
}
.outfit-card-items-count i { font-size: 0.625rem; }
.outfit-card-rating-mini {
  display: inline-flex; align-items: center;
  font-size: 0.5625rem; line-height: 1;
  white-space: nowrap;
}
.outfit-card-rating-mini .rating-display-badge { font-size: 0.5625rem; padding: 0; background: transparent; gap: 0.1rem; }
.outfit-card-rating-mini .rating-display-val { font-size: 0.5625rem; color: #f59e0b; font-weight: 600; }
.outfit-card-tags { display: flex; flex-wrap: wrap; gap: 0.18rem; margin-top: 0; max-height: 2.4em; overflow: hidden; }
.outfit-card-tags .tag { font-size: 0.625rem; padding: 0.05rem 0.4rem; line-height: 1.4; }
.outfit-card-notes {
  font-size: 0.6875rem; color: #94a3b8;
  margin-top: 0.2rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 多图角标 */
.outfit-card-img-badge {
  position: absolute; top: 0.5rem; right: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: rgba(0,0,0,0.55); color: white;
  font-size: 0.6875rem; font-weight: 500;
  padding: 0.15rem 0.45rem; border-radius: 9999px;
  pointer-events: none;
  z-index: 2;
}

.inspiration-card {
  break-inside: avoid; background: white;
  border-radius: 1.25rem; overflow: hidden; border: 1px solid #bfdbfe;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06); transition: all 0.25s ease;
  cursor: pointer; position: relative;
  /* 整齐网格：让所有卡片高度一致由 grid-auto-rows 控制 */
  display: flex;
  flex-direction: column;
  /* 性能优化：视口外的卡片跳过布局/绘制 */
  content-visibility: auto;
  contain-intrinsic-size: 240px 320px;
}
.inspiration-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); }
/* 图片归一化：所有灵感图统一 4:5 长宽比、cover 裁切，保证网格整齐 */
.inspiration-card > .relative,
.inspiration-card > .insp-img-wrap {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: linear-gradient(135deg,#fff1f2,#fce7f3);
  flex-shrink: 0;
}
.inspiration-card > .relative > img {
  width: 100%; height: 100%;
  display: block; object-fit: cover;
  transition: opacity 0.2s ease;
}
/* thumb 占位时透明度略低，避免被拉伸的颗粒感被强调；原图加载完后类被移除 */
.inspiration-card > .relative > img.insp-img-thumb-blur {
  /* 不使用 blur 滤镜（会让用户感觉"看不清"），改用轻微的对比度衰减 */
  filter: brightness(0.96) saturate(0.92);
}
/* 占位（无图）也保持同样比例 */
.inspiration-card .insp-img-placeholder {
  width: 100%; aspect-ratio: 4/5;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg,#fff1f2,#fce7f3);
}
.inspiration-card-body {
  padding: 0.5rem 0.625rem 0.625rem;
  /* 固定 body 最小高度，避免有/无标签造成卡片高度差 */
  min-height: 2.5rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  flex: 1 1 auto;
}
.inspiration-card-body .insp-title-line {
  font-size: 0.8125rem; font-weight: 600; color: #1f2937;
  /* 单行省略，避免标题超长撑高卡片 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.inspiration-card-body .insp-tags-line {
  display: flex; flex-wrap: wrap; gap: 0.2rem;
  /* 标签最多两行，超出隐藏 */
  max-height: 2.4rem;
  overflow: hidden;
}
.inspiration-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  padding: 1.5rem 0.75rem 0.75rem; opacity: 0; transition: opacity 0.2s ease;
}
.inspiration-card:hover .inspiration-card-overlay { opacity: 1; }
/* 网格行高对齐：行内每张卡片等高 */
#inspiration-grid {
  grid-auto-rows: 1fr;
  align-items: stretch;
}
/* 移动端：紧凑标签区域，提升单屏信息量 */
@media (max-width: 768px) {
  .inspiration-card-body {
    padding: 0.375rem 0.5rem 0.5rem;
    min-height: 0;
    gap: 0.15rem;
  }
  .inspiration-card-body .insp-title-line {
    font-size: 0.75rem;
    line-height: 1.15;
  }
  .inspiration-card-body .insp-tags-line {
    /* 移动端只显示一行标签，避免占用过多垂直空间 */
    max-height: 1.2rem;
    gap: 0.15rem;
  }
  .inspiration-card-body .insp-tags-line .tag {
    font-size: 0.625rem;
    padding: 0.05rem 0.35rem;
  }
  /* 移动端图片用 3:4 比例，单屏可显示更多卡片 */
  .inspiration-card > .relative,
  .inspiration-card > .insp-img-wrap,
  .inspiration-card .insp-img-placeholder {
    aspect-ratio: 3/4;
  }
  .inspiration-card {
    contain-intrinsic-size: 160px 240px;
  }
}

.tag { display: inline-flex; align-items: center; padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 500; }
.tag-rose { background: #dbeafe; color: #1e40af; }
.tag-pink { background: #e0f2fe; color: #0c4a6e; }
.tag-purple { background: #f3e8ff; color: #7e22ce; }
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-yellow { background: #fef9c3; color: #854d0e; }
.tag-gray { background: #f3f4f6; color: #374151; }
.tag-orange { background: #ffedd5; color: #9a3412; }

.color-dot { width: 0.875rem; height: 0.875rem; border-radius: 9999px; border: 1.5px solid rgba(0,0,0,0.1); display: inline-block; }
.color-tag-option { display: inline-flex; align-items: center; gap: 0.3rem; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: white; border-radius: 1.5rem; width: 100%;
  max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid #bfdbfe; flex-shrink: 0; }
.modal-close {
  width: 2rem; height: 2rem; border-radius: 9999px; background: #eff6ff;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #1e40af; font-size: 0.875rem; transition: all 0.15s ease;
}
.modal-close:hover { background: #dbeafe; color: #1d4ed8; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid #bfdbfe; flex-shrink: 0; }

.item-selector-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.75rem;
  border: 1.5px solid #bfdbfe; cursor: pointer; transition: all 0.15s ease;
  background: white; color: #1e40af;
}
.item-selector-chip:hover { border-color: #3b82f6; background: #eff6ff; }
.item-selector-chip.selected { background: linear-gradient(135deg, #3b82f6, #6366f1); color: white; border-color: transparent; }

.inspiration-selector-item {
  width: 4rem; height: 4rem; border-radius: 0.75rem; overflow: hidden;
  border: 2px solid #bfdbfe; cursor: pointer; transition: all 0.15s ease; position: relative;
}
.inspiration-selector-item:hover { border-color: #3b82f6; }
.inspiration-selector-item.selected { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); }
.inspiration-selector-item.selected::after {
  content: '✓'; position: absolute; inset: 0;
  background: rgba(59, 130, 246, 0.6); display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.25rem; font-weight: bold;
}

.toast {
  background: white; border-radius: 0.875rem; padding: 0.75rem 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); display: flex; align-items: center;
  gap: 0.625rem; font-size: 0.875rem; color: #1f2937;
  border-left: 3px solid #3b82f6; animation: slideInRight 0.3s ease;
  min-width: 200px; max-width: 320px;
}
.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #3b82f6; }

@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

.stats-section {
  background: white; border-radius: 1.25rem; padding: 1.5rem;
  border: 1px solid #bfdbfe; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06); margin-bottom: 1.25rem;
}
.stats-section-title { font-family: 'Playfair Display', serif; font-size: 1.125rem; font-weight: 600; color: #1e40af; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }

.progress-bar-wrap { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.625rem; }
.progress-bar-label { font-size: 0.8125rem; color: #374151; width: 4rem; flex-shrink: 0; text-align: right; }
.progress-bar-track { flex: 1; height: 0.5rem; background: #e0f2fe; border-radius: 9999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); border-radius: 9999px; transition: width 0.6s ease; }
.progress-bar-count { font-size: 0.75rem; color: #9ca3af; width: 2rem; flex-shrink: 0; }

.color-黑色 { background: #1f2937; }
.color-白色 { background: #f9fafb; border: 1px solid #e5e7eb; }
.color-灰色 { background: #9ca3af; }
.color-红色 { background: #ef4444; }
.color-粉色 { background: #f472b6; }
.color-蓝色 { background: #3b82f6; }
.color-绿色 { background: #22c55e; }
.color-黄色 { background: #eab308; }
.color-棕色 { background: #92400e; }
.color-紫色 { background: #a855f7; }
.color-米色 { background: #d4b896; }

@media (max-width: 640px) {
  .nav-btn span { display: none; }
  .modal-box { border-radius: 1rem; }
  /* 搭配卡片移动端极致紧凑 */
  .outfit-card-thumb-wrap { height: 180px; }
  .outfit-card-body { padding: 0.3rem 0.4rem 0.4rem; }
  .outfit-card-date-row { gap: 0.3rem; margin-bottom: 0.12rem; }
  .outfit-card-date { font-size: 0.6875rem; }
  .outfit-card-items-count { font-size: 0.5625rem; gap: 0.12rem; }
  .outfit-card-items-count i { font-size: 0.5625rem; }
  .outfit-card-tags { gap: 0.14rem; max-height: 1.4em; }
  .outfit-card-tags .tag { font-size: 0.5625rem; padding: 0.02rem 0.3rem; line-height: 1.3; }
  .outfit-card-notes { display: none; }
  .outfit-card-img-badge {
    font-size: 0.5625rem; padding: 0.08rem 0.32rem;
    top: 0.3rem; right: 0.3rem;
  }
  /* 单品卡片移动端极致紧凑 */
  .item-card-body { padding: 0.3rem 0.4rem 0.35rem; }
  .item-card-name { font-size: 0.6875rem; line-height: 1.2; }
  .item-card-meta { font-size: 0.5625rem; margin-top: 0.05rem; }
  .item-card-badge { font-size: 0.5rem; padding: 0.02rem 0.28rem; line-height: 1.3; }
  .item-card-body .flex.flex-wrap.gap-1.mt-1\.5 { margin-top: 0.15rem !important; gap: 0.12rem !important; }
  .item-card-body .flex.items-center.justify-between.mt-1\.5 { margin-top: 0.18rem !important; }
  .item-card-body .text-xs { font-size: 0.5625rem; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #eff6ff; border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: #93c5fd; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

.detail-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid #eff6ff; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 0.8125rem; color: #93c5fd; width: 4.5rem; flex-shrink: 0; padding-top: 0.125rem; }
.detail-value { font-size: 0.875rem; color: #374151; flex: 1; }

.outfit-preview-img { width: 5rem; height: 5rem; object-fit: contain; border-radius: 0.75rem; border: 1.5px solid #bfdbfe; background: #f8faff; }
.outfit-preview-img-wrap { position: relative; display: inline-block; }
.outfit-preview-img-remove {
  position: absolute; top: -0.375rem; right: -0.375rem;
  width: 1.25rem; height: 1.25rem; background: #3b82f6; color: white;
  border-radius: 9999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.outfit-detail-imgs { display: grid; gap: 0.5rem; margin-bottom: 1rem; touch-action: manipulation; }
.outfit-detail-imgs.count-1 { grid-template-columns: 1fr; }
.outfit-detail-imgs.count-2 { grid-template-columns: 1fr 1fr; }
.outfit-detail-imgs.count-3 { grid-template-columns: 1fr 1fr 1fr; }
.outfit-detail-imgs.count-4 { grid-template-columns: 1fr 1fr; }
.outfit-detail-img {
  width: 100%; border-radius: 0.875rem; object-fit: cover; aspect-ratio: 1;
  transition: transform 0.18s ease;
  cursor: zoom-in; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.outfit-detail-img:hover { transform: scale(1.02); }
.outfit-detail-img-more {
  width: 100%; border: none; border-radius: 0.875rem; aspect-ratio: 1;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #be185d;
  font-weight: 600; font-size: 0.95rem; cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
}
.outfit-detail-img-more:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(244,114,182,0.35); }

/* ===== 全屏图片 Lightbox ===== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.lightbox-overlay.lightbox-show { opacity: 1; }
.lightbox-overlay.lightbox-fadeout { opacity: 0; }

.lightbox-stage {
  flex: 1 1 auto; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 0.75rem 5.5rem;
  box-sizing: border-box; overflow: hidden;
}
.lightbox-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 0.5rem;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  -webkit-user-drag: none;
  pointer-events: auto;
}

.lightbox-close, .lightbox-nav {
  position: absolute; z-index: 2;
  width: 2.75rem; height: 2.75rem;
  border: none; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox-close:hover, .lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28); transform: scale(1.05);
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

.lightbox-counter {
  position: absolute; top: 1.1rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.875rem; font-weight: 500;
  background: rgba(255,255,255,0.14);
  padding: 0.3rem 0.85rem; border-radius: 9999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  letter-spacing: 0.5px;
}

.lightbox-thumbs {
  position: absolute; left: 0; right: 0; bottom: 0.85rem;
  display: flex; gap: 0.5rem; padding: 0 1rem;
  justify-content: center; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox-thumbs img {
  width: 3rem; height: 3rem; flex: 0 0 auto;
  object-fit: cover; border-radius: 0.5rem;
  border: 2px solid transparent; opacity: 0.55;
  cursor: pointer; transition: all 0.18s ease;
}
.lightbox-thumbs img:hover { opacity: 0.85; }
.lightbox-thumbs img.active { border-color: #fff; opacity: 1; transform: scale(1.05); }

@media (max-width: 640px) {
  .lightbox-stage { padding: 3.5rem 0.5rem 5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; width: 2.4rem; height: 2.4rem; }
  .lightbox-prev { left: 0.5rem; width: 2.4rem; height: 2.4rem; }
  .lightbox-next { right: 0.5rem; width: 2.4rem; height: 2.4rem; }
  .lightbox-thumbs img { width: 2.4rem; height: 2.4rem; }
}

/* ===== 多选标签组件 ===== */
.tag-selector {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.5rem; background: #f8faff; border: 1.5px solid #bfdbfe;
  border-radius: 0.875rem; min-height: 2.75rem;
}
.tag-option {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.875rem; border-radius: 9999px; font-size: 0.8125rem;
  font-weight: 500; cursor: pointer; transition: all 0.18s ease;
  border: 1.5px solid #bfdbfe; background: white; color: #1e40af;
  user-select: none;
}
.tag-option:hover { border-color: #3b82f6; background: #eff6ff; transform: translateY(-1px); }
.tag-option.selected {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; border-color: transparent;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}
.tag-option.selected::before { content: '✓ '; font-size: 0.75rem; }

.filter-tag-count {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.3rem; padding: 0 0.3rem; min-width: 1.1rem; height: 1.1rem;
  border-radius: 9999px; font-size: 0.65rem; font-weight: 600;
  background: rgba(59, 130, 246, 0.12); color: #2563eb;
  line-height: 1;
}
.tag-option.selected .filter-tag-count {
  background: rgba(255,255,255,0.25); color: white;
}

.form-tag-count {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 0.3rem; padding: 0 0.3rem; min-width: 1.1rem; height: 1.1rem;
  border-radius: 9999px; font-size: 0.65rem; font-weight: 600;
  background: rgba(59, 130, 246, 0.12); color: #2563eb;
  line-height: 1;
}
.tag-option.selected .form-tag-count {
  background: rgba(255,255,255,0.25); color: white;
}
.tag-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 9999px; font-size: 0.75rem;
  cursor: pointer; transition: all 0.18s ease;
  border: 1.5px dashed #93c5fd; background: white; color: #3b82f6;
  user-select: none; flex-shrink: 0;
}
.tag-add-btn:hover { border-color: #3b82f6; background: #eff6ff; transform: scale(1.1); }

/* ===== 多图预览 ===== */
.multi-img-preview-wrap {
  position: relative; display: inline-block;
  width: 5rem; height: 5rem; flex-shrink: 0;
}
.multi-img-preview-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 0.75rem; border: 1.5px solid #bfdbfe;
  cursor: pointer; transition: all 0.15s ease;
}
.multi-img-preview-wrap img:hover { border-color: #3b82f6; transform: scale(1.03); }
.multi-img-preview-remove {
  position: absolute; top: -0.375rem; right: -0.375rem;
  width: 1.25rem; height: 1.25rem; background: #3b82f6; color: white;
  border-radius: 9999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}
.multi-img-preview-remove:hover { transform: scale(1.15); }
.multi-img-preview-crop {
  position: absolute; bottom: -0.375rem; right: -0.375rem;
  width: 1.25rem; height: 1.25rem; background: #6366f1; color: white;
  border-radius: 9999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}
.multi-img-preview-crop:hover { transform: scale(1.15); }
.multi-img-add-btn {
  width: 5rem; height: 5rem; border-radius: 0.75rem;
  border: 2px dashed #93c5fd; background: #f8faff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s ease; color: #93c5fd; font-size: 0.7rem;
  flex-shrink: 0;
}
.multi-img-add-btn:hover { border-color: #3b82f6; background: #eff6ff; color: #3b82f6; }

/* ===== 图片裁剪弹窗 ===== */
.crop-handle {
  position: absolute; width: 12px; height: 12px;
  background: white; border: 2px solid #3b82f6; border-radius: 2px;
}
#crop-box { min-width: 60px; min-height: 60px; }

/* ===== 灵感专辑侧边栏 ===== */
.album-sidebar-wrap {
  width: 180px; flex-shrink: 0;
  background: white; border-radius: 1.25rem; padding: 1rem 0.75rem;
  border: 1px solid #bfdbfe; box-shadow: 0 2px 8px rgba(59,130,246,0.06);
  height: fit-content; position: sticky; top: 5rem;
}
.album-sidebar-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem; border-radius: 0.75rem; cursor: pointer;
  transition: all 0.15s ease; font-size: 0.8125rem; color: #6b7280;
  margin-bottom: 0.25rem; position: relative;
}
.album-sidebar-item:hover { background: #eff6ff; color: #1d4ed8; }
.album-sidebar-item.active { background: linear-gradient(135deg, #eff6ff, #e0f2fe); color: #2563eb; font-weight: 600; }
.album-cover-thumb {
  width: 1.75rem; height: 1.75rem; border-radius: 0.375rem;
  object-fit: cover; flex-shrink: 0; border: 1px solid #bfdbfe;
}
.album-cover-empty {
  display: flex; align-items: center; justify-content: center;
  background: #eff6ff; font-size: 0.75rem;
}
.album-count {
  font-size: 0.6875rem; color: #93c5fd; background: #eff6ff;
  padding: 0.1rem 0.4rem; border-radius: 9999px; flex-shrink: 0;
}
.album-edit-btn {
  opacity: 0; width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  border: none; background: transparent; cursor: pointer; color: #93c5fd;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
  transition: all 0.15s ease; flex-shrink: 0;
}
.album-sidebar-item:hover .album-edit-btn { opacity: 1; }
.album-edit-btn:hover { background: #e0f2fe; color: #2563eb; }
.album-add-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0.5rem; border-radius: 0.75rem; font-size: 0.8125rem;
  border: 1.5px dashed #93c5fd; background: transparent; color: #93c5fd;
  cursor: pointer; transition: all 0.15s ease; margin-top: 0.5rem;
}
.album-add-btn:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }

/* ===== 专辑右键菜单 ===== */
.album-context-menu {
  position: fixed; background: white; border-radius: 0.875rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); border: 1px solid #bfdbfe;
  z-index: 500; overflow: hidden; min-width: 140px;
  animation: fadeIn 0.15s ease;
}
.album-menu-item {
  display: flex; align-items: center; padding: 0.625rem 1rem;
  font-size: 0.875rem; color: #374151; cursor: pointer; transition: background 0.1s;
}
.album-menu-item:hover { background: #eff6ff; }
.album-menu-item.danger { color: #dc2626; }
.album-menu-item.danger:hover { background: #fee2e2; }

.insp-img-index {
  position: absolute; bottom: 0.5rem; right: 0.5rem;
  background: rgba(0,0,0,0.50); color: white; font-size: 0.7rem;
  font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 9999px;
  pointer-events: none;
}
.insp-detail-imgs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.insp-detail-img-wrap { aspect-ratio: 1; overflow: hidden; border-radius: 0.875rem; }
.insp-detail-img-wrap.col-span-2 { grid-column: span 2; aspect-ratio: 2/1; }

.album-checkbox-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: 0.75rem; cursor: pointer;
  transition: background 0.15s; border: 1.5px solid #bfdbfe; background: white;
}
.album-checkbox-item:hover { background: #eff6ff; border-color: #3b82f6; }
.album-checkbox {
  width: 1rem; height: 1rem; accent-color: #3b82f6; cursor: pointer; flex-shrink: 0;
}

@media (max-width: 640px) {
  .album-sidebar-wrap {
    width: 100%; position: static; background: white; border-radius: 1rem;
    padding: 0.625rem 0.75rem; border: 1px solid #bfdbfe;
    box-shadow: 0 2px 8px rgba(59,130,246,0.06); height: auto; flex-shrink: 0;
  }
  .album-sidebar-wrap .text-xs { display: none; }
  #album-sidebar {
    display: flex; flex-direction: row; overflow-x: auto; gap: 0.375rem;
    padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  #album-sidebar::-webkit-scrollbar { display: none; }
  .album-sidebar-item {
    flex-shrink: 0; white-space: nowrap; padding: 0.35rem 0.625rem;
    margin-bottom: 0; border-radius: 999px; font-size: 0.75rem;
  }
  .album-cover-thumb { width: 1.25rem; height: 1.25rem; }
  .album-edit-btn { display: none; }
  .album-add-btn {
    flex-shrink: 0; width: auto; padding: 0.35rem 0.75rem;
    border-radius: 999px; margin-top: 0; font-size: 0.75rem; white-space: nowrap;
  }
  #page-inspiration .flex.gap-5 { flex-direction: column; gap: 0.75rem; }
}

/* ===== 搭配弹窗单品选择器 ===== */
.outfit-items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem; max-height: 220px; overflow-y: auto; padding: 0.25rem;
}
.outfit-item-thumb {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.25rem; cursor: pointer; border-radius: 0.75rem;
  padding: 0.375rem 0.25rem; border: 1.5px solid #bfdbfe;
  background: white; transition: all 0.15s ease; position: relative;
}
.outfit-item-thumb:hover { border-color: #3b82f6; background: #eff6ff; }
.outfit-item-thumb.selected { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px #93c5fd; }
.outfit-item-thumb-img {
  width: 48px; height: 56px; border-radius: 0.5rem;
  overflow: hidden; background: #eff6ff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.outfit-item-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.outfit-item-thumb-emoji { font-size: 1.5rem; }
.outfit-item-thumb-check {
  position: absolute; inset: 0; background: rgba(59,130,246,0.55);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem; border-radius: 0.5rem;
}
.outfit-item-thumb-name {
  font-size: 0.6875rem; color: #374151; text-align: center;
  line-height: 1.2; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.outfit-item-thumb-brand {
  font-size: 0.625rem; color: #9ca3af; text-align: center;
  max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.outfit-cat-tab {
  padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem;
  border: 1.5px solid #bfdbfe; background: white; color: #9ca3af;
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.outfit-cat-tab:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.outfit-cat-tab.active { border-color: #3b82f6; background: #3b82f6; color: white; font-weight: 600; }
.outfit-subcat-tab {
  padding: 0.15rem 0.6rem; font-size: 0.7rem;
  border-color: #93c5fd; color: #1d4ed8; background: #eff6ff;
}
.outfit-subcat-tab:hover { border-color: #3b82f6; color: #3b82f6; background: #dbeafe; }
.outfit-subcat-tab.active { border-color: #2563eb; background: linear-gradient(135deg, #60a5fa, #3b82f6); color: white; font-weight: 600; }
.outfit-selected-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 9999px;
  padding: 0.25rem 0.5rem 0.25rem 0.375rem; font-size: 0.75rem; color: #374151;
}
.outfit-selected-chip-remove {
  width: 1rem; height: 1rem; border-radius: 9999px; border: none;
  background: #93c5fd; color: white; cursor: pointer; font-size: 0.625rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; flex-shrink: 0;
}
.outfit-selected-chip-remove:hover { background: #3b82f6; }

/* ===== 品牌/分类/尺码 Combo Box ===== */
.brand-combo { position: relative; display: flex; align-items: center; }
.brand-combo .input-field { padding-right: 2.25rem; }
.brand-combo-arrow {
  position: absolute; right: 0.625rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #93c5fd;
  font-size: 0.75rem; padding: 0.25rem; transition: transform 0.2s ease, color 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.brand-combo-arrow:hover { color: #3b82f6; }
.brand-combo-arrow.open { transform: translateY(-50%) rotate(180deg); color: #3b82f6; }
.brand-combo-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 250;
  background: white; border: 1.5px solid #bfdbfe; border-radius: 0.875rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
  max-height: 220px; overflow-y: auto; animation: fadeIn 0.15s ease;
}
.brand-combo-option {
  padding: 0.5rem 0.875rem; font-size: 0.875rem; color: #374151;
  cursor: pointer; transition: background 0.1s ease;
}
.brand-combo-option:hover { background: #eff6ff; color: #2563eb; }
.brand-combo-option.no-match { color: #93c5fd; cursor: default; font-style: italic; }
.brand-combo-option.no-match:hover { background: transparent; color: #93c5fd; }
.brand-add-new {
  display: flex; align-items: center;
  color: #3b82f6 !important; font-weight: 500;
  border-top: 1px solid #e0f2fe; background: #f8faff;
}
.brand-add-new:hover { background: #eff6ff !important; color: #2563eb !important; }

/* ===== 分类 Combo 二级分组样式 ===== */
.brand-combo-dropdown.category-dropdown { max-height: 320px; }
.cat-combo-group { border-bottom: 1px solid #e0f2fe; }
.cat-combo-group:last-child { border-bottom: none; }
.cat-combo-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.875rem 0.25rem;
  font-size: 0.75rem; font-weight: 600; color: #1d4ed8;
  background: #f8faff; letter-spacing: 0.02em;
  position: sticky; top: 0; z-index: 1;
}
.cat-combo-group-items {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.25rem 0.625rem 0.5rem;
}
.cat-combo-sub-item {
  padding: 0.25rem 0.625rem !important; border-radius: 9999px !important;
  font-size: 0.8rem !important; border: 1px solid #bfdbfe;
  display: inline-flex !important; align-items: center; gap: 0.25rem;
}
.cat-combo-sub-item:hover { background: #eff6ff !important; border-color: #3b82f6 !important; }
.cat-option-main { color: #93c5fd; font-size: 0.75rem; }
.cat-option-count {
  font-size: 0.7rem; color: #93c5fd; margin-left: 0.25rem;
  background: #eff6ff; border-radius: 9999px; padding: 0 0.3rem;
}

/* ===== 分类筛选标签行（紧凑横向布局） ===== */
.cat-filter-row {
  display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center;
  margin-bottom: 0.375rem;
}
.cat-filter-row:last-child { margin-bottom: 0; }

/* 分类筛选容器 - 横向流式 */
#filter-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
}

/* 分类标签：一级 */
.cat-filter-btn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.625rem; border-radius: 9999px;
  font-size: 0.78rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid #bfdbfe; background: white; color: #1e40af;
  transition: all 0.15s ease; white-space: nowrap;
  line-height: 1.4;
}
.cat-filter-btn:hover { border-color: #3b82f6; background: #eff6ff; color: #2563eb; }
.cat-filter-btn.active {
  border-color: #3b82f6; background: #3b82f6; color: white; font-weight: 600;
}
.cat-filter-btn .cat-filter-count { font-size: 0.65rem; opacity: 0.7; margin-left: 0.1rem; }
.cat-filter-btn.active .cat-filter-count { opacity: 0.85; }
.cat-filter-btn .cat-tree-arrow {
  font-size: 0.5rem; margin-left: 0.15rem; opacity: 0.5; transition: transform 0.2s ease;
}
.cat-filter-btn.active .cat-tree-arrow { opacity: 0.85; }

/* 子分类展开行 */
.cat-sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  width: 100%;
  padding: 0.375rem 0.5rem;
  margin-top: 0.125rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-radius: 0.625rem;
  border: 1px solid #bfdbfe;
  animation: catSubFadeIn 0.15s ease;
}
@keyframes catSubFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.cat-sub-row-label {
  font-size: 0.65rem; color: #60a5fa; font-weight: 500; margin-right: 0.25rem;
  display: inline-flex; align-items: center; gap: 0.2rem;
}

/* 分类标签：二级子分类 */
.cat-filter-sub-btn {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.5rem; border-radius: 9999px;
  font-size: 0.72rem; cursor: pointer;
  border: 1px solid #bfdbfe; background: white; color: #1d4ed8;
  transition: all 0.15s ease; white-space: nowrap;
  line-height: 1.4;
}
.cat-filter-sub-btn:hover { border-color: #3b82f6; background: #eff6ff; }
.cat-filter-sub-btn.active {
  border-color: #2563eb; background: #2563eb; color: white; font-weight: 600;
}
.cat-filter-sub-btn .cat-filter-count { font-size: 0.6rem; opacity: 0.7; }

/* 分类分隔符 */
.cat-filter-sep {
  width: 1px; height: 1rem; background: #bfdbfe; margin: 0 0.125rem; flex-shrink: 0;
}

/* 折叠/展开按钮 */
.filter-collapse-toggle {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.72rem; color: #60a5fa; cursor: pointer;
  padding: 0.2rem 0.5rem; border-radius: 9999px;
  border: 1px dashed #93c5fd; background: transparent;
  transition: all 0.15s ease; white-space: nowrap;
  margin-left: auto;
}
.filter-collapse-toggle:hover { background: #eff6ff; color: #3b82f6; border-color: #3b82f6; }
.filter-collapse-toggle i { font-size: 0.6rem; transition: transform 0.2s ease; }
.filter-collapse-toggle.expanded i { transform: rotate(180deg); }

/* 筛选区域折叠状态 */
.filter-section-collapsible {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}
.filter-section-collapsible.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== 衣橱二级分类分组 ===== */
.wardrobe-sub-groups { display: flex; flex-direction: column; gap: 0; }
.wardrobe-sub-group { border-top: 1px solid #eff6ff; }
.wardrobe-sub-group-header {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem; background: #fafafa;
}
.wardrobe-sub-group-name { font-size: 0.8rem; font-weight: 500; color: #1d4ed8; }
.wardrobe-sub-group-count {
  font-size: 0.7rem; color: #93c5fd; background: #eff6ff;
  border-radius: 9999px; padding: 0.05rem 0.4rem; border: 1px solid #bfdbfe;
}

/* ===== 衣橱分类分组展示 ===== */
.wardrobe-grid-container { display: flex; flex-direction: column; gap: 1.5rem; }
.wardrobe-category-group {
  background: white; border-radius: 1.25rem;
  border: 1px solid #dbeafe; overflow: hidden;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.06);
}
.wardrobe-category-header {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(90deg, #eff6ff, #f0f9ff);
  border-bottom: 1px solid #dbeafe;
}
.wardrobe-category-emoji { font-size: 1.25rem; line-height: 1; }
.wardrobe-category-name {
  font-size: 0.95rem; font-weight: 600; color: #1e40af;
  font-family: 'Noto Sans SC', sans-serif;
}
.wardrobe-category-count {
  font-size: 0.75rem; color: #93c5fd; background: white;
  border-radius: 9999px; padding: 0.1rem 0.5rem; border: 1px solid #bfdbfe;
}
.wardrobe-flat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 0.875rem;
}
@media (min-width: 480px) { .wardrobe-flat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .wardrobe-flat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .wardrobe-flat-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .wardrobe-flat-grid { grid-template-columns: repeat(6, 1fr); } }

/* ===== 五星打分组件 ===== */
.outfit-rating-container {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.75rem; background: #f8faff; border: 1.5px solid #bfdbfe;
  border-radius: 0.875rem; min-height: 2.75rem;
}
.star-rating-wrap { display: inline-flex; align-items: center; gap: 0.15rem; position: relative; }
.star-wrap { position: relative; display: inline-flex; align-items: center; width: 1.75rem; height: 1.75rem; cursor: pointer; }
.star-half-left, .star-half-right { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; cursor: pointer; }
.star-half-left { left: 0; }
.star-half-right { right: 0; }
.star-icon {
  font-size: 1.5rem; line-height: 1; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); pointer-events: none; transition: transform 0.1s ease;
}
.star-full { color: #f59e0b; }
.star-empty { color: #fde68a; }
.star-half-overlay {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  color: #f59e0b; font-size: 1.5rem; line-height: 1;
  clip-path: inset(0 50% 0 0); pointer-events: none;
}
.star-wrap:hover .star-icon { transform: translateY(-50%) scale(1.2); }
.star-rating-label { font-size: 0.8125rem; color: #93c5fd; font-weight: 500; min-width: 3rem; }
.star-clear-btn {
  width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  border: none; background: #bfdbfe; color: #1e40af;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem; transition: all 0.15s ease; flex-shrink: 0;
}
.star-clear-btn:hover { background: #93c5fd; color: white; }

/* ===== 只读星星展示 ===== */
.star-display-wrap { display: inline-flex; align-items: center; gap: 0.1rem; }
.star-display-icon { font-size: 0.875rem; line-height: 1; }
.star-display-icon.star-full { color: #f59e0b; }
.star-display-icon.star-empty { color: #fde68a; }
.star-display-half-wrap {
  position: relative; display: inline-flex; align-items: center;
  width: 0.875rem; height: 0.875rem;
}
.star-display-half-wrap .star-display-icon { position: absolute; left: 0; top: 0; }
.star-half-overlay-display { color: #f59e0b !important; clip-path: inset(0 50% 0 0); }
.star-display-val { font-size: 0.75rem; color: #f59e0b; font-weight: 600; margin-left: 0.25rem; }

/* ===== 分类管理弹窗样式 ===== */
.cat-mgr-tip {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.75rem;
  padding: 0.6rem 1rem; font-size: 0.8rem; color: #1e40af;
  margin-bottom: 1rem; display: flex; align-items: center;
}
.cat-mgr-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.cat-mgr-main-row { background: #fff; border: 1px solid #bfdbfe; border-radius: 1rem; overflow: hidden; }
.cat-mgr-main-header {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.875rem;
  background: linear-gradient(to right, #eff6ff, #fff); cursor: default;
}
.cat-mgr-emoji { font-size: 1.1rem; flex-shrink: 0; }
.cat-mgr-main-name {
  font-size: 0.9rem; font-weight: 600; color: #1d4ed8; cursor: pointer;
  border-radius: 0.375rem; padding: 0.1rem 0.3rem; transition: background 0.15s; flex: 1;
}
.cat-mgr-main-name:hover { background: #dbeafe; }
.cat-mgr-count {
  font-size: 0.7rem; color: #60a5fa; background: #eff6ff;
  border: 1px solid #bfdbfe; border-radius: 999px; padding: 0.1rem 0.5rem; flex-shrink: 0;
}
.cat-mgr-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.cat-mgr-btn {
  width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; transition: all 0.15s;
}
.cat-mgr-btn-add { background: #eff6ff; color: #2563eb; }
.cat-mgr-btn-add:hover { background: #bfdbfe; color: #1d4ed8; }
.cat-mgr-btn-delete { background: #fef2f2; color: #ef4444; }
.cat-mgr-btn-delete:hover { background: #fee2e2; color: #dc2626; }
.cat-mgr-sub-list {
  padding: 0.25rem 0.875rem 0.5rem 2.5rem; display: flex; flex-direction: column;
  gap: 0.25rem; border-top: 1px solid #eff6ff; background: #fafafa;
}
.cat-mgr-sub-row {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem;
  border-radius: 0.5rem; transition: background 0.15s;
}
.cat-mgr-sub-row:hover { background: #eff6ff; }
.cat-mgr-sub-name {
  font-size: 0.82rem; color: #6b7280; cursor: pointer; flex: 1;
  border-radius: 0.375rem; padding: 0.1rem 0.3rem; transition: background 0.15s;
}
.cat-mgr-sub-name:hover { background: #dbeafe; color: #1d4ed8; }
.cat-mgr-sub-delete { opacity: 0; transition: opacity 0.15s; }
.cat-mgr-sub-row:hover .cat-mgr-sub-delete { opacity: 1; }
.cat-mgr-add-main-btn {
  width: 100%; padding: 0.65rem; border: 2px dashed #bfdbfe; border-radius: 0.875rem;
  background: transparent; color: #60a5fa; font-size: 0.85rem; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 0.25rem;
}
.cat-mgr-add-main-btn:hover { background: #eff6ff; border-color: #60a5fa; color: #2563eb; }
.cat-mgr-inline-input-wrap {
  display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.5rem;
  background: #fff; border: 1px solid #93c5fd; border-radius: 0.625rem; margin: 0.25rem 0;
}
.cat-mgr-inline-input {
  flex: 1; border: none; outline: none; font-size: 0.85rem; color: #374151;
  background: transparent; min-width: 0;
}
.cat-mgr-inline-confirm, .cat-mgr-inline-cancel {
  width: 1.5rem; height: 1.5rem; border-radius: 0.375rem; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; flex-shrink: 0; transition: all 0.15s;
}
.cat-mgr-inline-confirm { background: #2563eb; color: #fff; }
.cat-mgr-inline-confirm:hover { background: #1d4ed8; }
.cat-mgr-inline-cancel { background: #f3f4f6; color: #6b7280; }
.cat-mgr-inline-cancel:hover { background: #e5e7eb; }

/* ===== 统一确认弹窗 ===== */
.alert-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px); z-index: 9999;
  display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease;
}
.alert-overlay.alert-fadeout { animation: fadeOut 0.25s ease forwards; }
.alert-box {
  background: white; border-radius: 1.5rem; padding: 2rem 2.25rem;
  max-width: 360px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); animation: slideUp 0.25s ease;
  border-top: 4px solid #2563eb;
}
.alert-box-success { border-top-color: #22c55e; }
.alert-box-info { border-top-color: #3b82f6; }
.alert-box-error { border-top-color: #ef4444; }
.alert-icon { font-size: 2.5rem; margin-bottom: 0.875rem; line-height: 1; }
.alert-message {
  font-size: 0.9375rem; color: #374151; line-height: 1.6;
  margin-bottom: 1.5rem; font-family: 'Noto Sans SC', sans-serif;
}
.alert-confirm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.55rem 2rem; color: white; border-radius: 9999px;
  font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.2s ease; font-family: 'Noto Sans SC', sans-serif;
}
.alert-confirm-btn:hover { transform: translateY(-1px); }
.alert-btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35); }
.alert-btn-success:hover { box-shadow: 0 4px 14px rgba(34, 197, 94, 0.45); }
.alert-btn-info { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35); }
.alert-btn-info:hover { box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45); }
.alert-btn-error { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35); }
.alert-btn-error:hover { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45); }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ===== 统计页 Tab 切换 ===== */
.stats-tab-bar {
  display: flex; gap: 0.5rem; margin-bottom: 1.25rem;
  background: white; border-radius: 1rem; padding: 0.375rem;
  border: 1px solid #bfdbfe; box-shadow: 0 1px 4px rgba(59,130,246,0.06); width: fit-content;
}
.stats-tab-btn {
  display: inline-flex; align-items: center; padding: 0.45rem 1.1rem;
  border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500; color: #1e40af;
  border: none; background: transparent; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.stats-tab-btn:hover { background: #eff6ff; color: #1d4ed8; }
.stats-tab-btn.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.stats-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.3rem;
  border-radius: 9999px; font-size: 0.7rem; font-weight: 700;
  background: #bfdbfe; color: #1d4ed8; margin-left: 0.4rem; line-height: 1; transition: all 0.2s ease;
}
.stats-tab-btn.active .stats-tab-count { background: rgba(255,255,255,0.3); color: white; }
.stats-tab-panel { display: none; }
.stats-tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* ===== 满意度展示徽章 ===== */
.rating-display-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fde68a; border-radius: 999px;
  padding: 0.15rem 0.65rem; font-size: 0.78rem; color: #92400e;
}
.rating-display-val { font-weight: 600; color: #b45309; }

/* ===== 轻提示 Snackbar ===== */
.snackbar-tip {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: rgba(30, 30, 30, 0.88); color: #fff;
  padding: 0.55rem 1.4rem; border-radius: 999px; font-size: 0.88rem;
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 99999; white-space: nowrap; backdrop-filter: blur(4px);
}
.snackbar-tip.snackbar-tip-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 排列模式切换按钮 ===== */
.sort-mode-btn {
  display: inline-flex; align-items: center; padding: 0.3rem 0.75rem;
  border-radius: 999px; font-size: 0.78rem; font-weight: 500; color: #1e40af;
  background: #eff6ff; border: 1.5px solid #bfdbfe; cursor: pointer;
  transition: all 0.18s ease; white-space: nowrap;
}
.sort-mode-btn:hover { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.sort-mode-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  border-color: transparent; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* ===== 单品卡片额外徽章 ===== */
.item-extra-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(59, 130, 246, 0.85); color: #fff;
  font-size: 0.7rem; font-weight: 600; padding: 2px 7px;
  border-radius: 999px; backdrop-filter: blur(4px); pointer-events: none; z-index: 2;
}

/* ===== 设置页 ===== */
.settings-section {
  background: white; border-radius: 1.25rem; padding: 1.5rem;
  border: 1px solid #bfdbfe; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06); margin-bottom: 1.25rem;
}
.settings-section-title {
  font-size: 1rem; font-weight: 600; color: #1e40af; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; border-bottom: 1px solid #eff6ff;
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 0.875rem; color: #374151; }
.settings-desc { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.settings-action { display: flex; align-items: center; gap: 0.5rem; }

/* ===== 设置页：分组标题 ===== */
.settings-section-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; padding: 0.5rem 0;
}
.settings-section-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-section-title {
  font-size: 1.05rem; font-weight: 700; color: #1e293b;
}
.settings-section-subtitle {
  font-size: 0.78rem; color: #94a3b8; margin-top: 0.125rem;
}

/* ===== 设置页：卡片网格 ===== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* ===== 设置页：卡片 ===== */
.settings-card {
  background: white; border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden; transition: box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.settings-card:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}
.settings-card-header {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}
.settings-card-icon {
  width: 2rem; height: 2rem; border-radius: 0.625rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.settings-card-title {
  font-size: 0.9rem; font-weight: 600; color: #1e293b;
}
.settings-card-desc {
  font-size: 0.72rem; color: #94a3b8; margin-top: 0.125rem;
}
.settings-count-badge {
  display: inline-flex; align-items: center;
  padding: 0.1rem 0.45rem; border-radius: 9999px;
  font-size: 0.65rem; font-weight: 600;
  background: #eff6ff; color: #3b82f6; border: 1px solid #bfdbfe;
}

/* ===== 设置页：卡片内容区 ===== */
.settings-card-body {
  padding: 0.75rem 1rem;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: flex-start;
  align-content: flex-start;
  min-height: 3rem;
  max-height: 220px;
  overflow-y: auto;
}

/* ===== 设置页：标签行（横向紧凑药丸） ===== */
.settings-tag-row {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem 0.25rem 0.625rem;
  border-radius: 9999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.settings-tag-row:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.settings-tag-name {
  color: #334155;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}
.settings-tag-name:hover { color: #2563eb; }
.settings-tag-default { color: #475569; }
.settings-tag-custom { color: #6366f1; }
.settings-tag-count {
  font-size: 0.65rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.05rem 0.35rem;
  border-radius: 9999px;
  font-weight: 500;
}
.settings-default-badge {
  font-size: 0.6rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.05rem 0.35rem;
  border-radius: 9999px;
  font-weight: 500;
}

/* ===== 设置页：操作按钮 ===== */
.settings-action-btn {
  width: 1.375rem; height: 1.375rem;
  border-radius: 9999px; border: none;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.6rem; transition: all 0.15s;
  flex-shrink: 0; opacity: 0;
}
.settings-tag-row:hover .settings-action-btn,
.settings-cat-main-header:hover .settings-action-btn,
.settings-cat-sub-row:hover .settings-action-btn {
  opacity: 1;
}
.settings-action-add { background: #eff6ff; color: #3b82f6; }
.settings-action-add:hover { background: #dbeafe; color: #1d4ed8; }
.settings-action-delete { background: #fef2f2; color: #ef4444; }
.settings-action-delete:hover { background: #fee2e2; color: #dc2626; }

/* ===== 设置页：分类管理（横向紧凑） ===== */
.settings-cat-main-row {
  display: inline-flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: white;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.settings-cat-main-row:hover { border-color: #93c5fd; }
.settings-cat-main-header {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.35rem 0.5rem 0.35rem 0.625rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  cursor: default;
}
.settings-cat-name {
  font-size: 0.8rem; font-weight: 600; color: #1e40af;
  cursor: pointer; border-radius: 0.25rem;
  padding: 0.05rem 0.2rem; transition: background 0.15s;
}
.settings-cat-name:hover { background: #dbeafe; }
.settings-cat-custom { color: #6366f1; }
.settings-cat-actions {
  display: flex; align-items: center; gap: 0.15rem; flex-shrink: 0;
}
.settings-cat-sub-list {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.3rem 0.5rem;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}
.settings-cat-sub-row {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.15rem 0.4rem; border-radius: 9999px;
  font-size: 0.72rem; transition: background 0.15s;
  background: white; border: 1px solid #e2e8f0;
}
.settings-cat-sub-row:hover { background: #eff6ff; border-color: #93c5fd; }
.settings-cat-sub-name {
  color: #64748b; cursor: pointer; font-weight: 500;
  transition: color 0.15s;
}
.settings-cat-sub-name:hover { color: #2563eb; }

/* ===== 设置页：卡片底部新增按钮 ===== */
.settings-card-add-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0.5rem;
  border: none; border-top: 1px solid #f1f5f9;
  background: #fafbfc; color: #94a3b8;
  font-size: 0.78rem; cursor: pointer;
  transition: all 0.15s ease;
}
.settings-card-add-btn:hover {
  background: #eff6ff; color: #3b82f6;
}

/* ===== 设置页：行内编辑输入框 ===== */
.settings-inline-wrap {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.35rem;
  background: white; border: 1.5px solid #93c5fd;
  border-radius: 0.625rem;
  animation: fadeIn 0.15s ease;
}
.settings-inline-input {
  border: none; outline: none; font-size: 0.8rem;
  color: #374151; background: transparent;
  min-width: 0; width: 8rem;
  font-family: 'Noto Sans SC', sans-serif;
}
.settings-inline-confirm,
.settings-inline-cancel {
  width: 1.375rem; height: 1.375rem;
  border-radius: 0.375rem; border: none;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.65rem; flex-shrink: 0;
  transition: all 0.15s;
}
.settings-inline-confirm { background: #3b82f6; color: white; }
.settings-inline-confirm:hover { background: #2563eb; }
.settings-inline-cancel { background: #f1f5f9; color: #94a3b8; }
.settings-inline-cancel:hover { background: #e2e8f0; color: #64748b; }

/* ===== 搭配展示模式切换 ===== */
.outfit-view-mode-group {
  display: flex; gap: 0.25rem;
  background: white; border-radius: 0.75rem; padding: 0.25rem;
  border: 1px solid #bfdbfe;
}
.outfit-view-mode-btn {
  display: inline-flex; align-items: center; padding: 0.35rem 0.75rem;
  border-radius: 0.5rem; font-size: 0.78rem; font-weight: 500; color: #1e40af;
  border: none; background: transparent; cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.outfit-view-mode-btn:hover { background: #eff6ff; color: #1d4ed8; }
.outfit-view-mode-btn.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* ===== 灵感图批量管理底部栏 ===== */
.inspiration-batch-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: white; border-top: 1px solid #bfdbfe;
  box-shadow: 0 -4px 16px rgba(59, 130, 246, 0.1);
  padding: 0.75rem 1.25rem;
  animation: slideUpBar 0.25s ease;
}

/* ===== 批量上传提示 ===== */
.batch-upload-hint {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 0.75rem;
  padding: 0.625rem 0.875rem; font-size: 0.78rem; color: #1e40af; line-height: 1.5;
}

/* ===== 移动端底部导航 ===== */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: white; border-top: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-around;
  padding: 0.375rem 0 calc(0.375rem + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.25rem 0.5rem; border: none; background: transparent;
  color: #94a3b8; font-size: 0.625rem; cursor: pointer; transition: color 0.15s;
}
.mobile-nav-btn i { font-size: 1.125rem; }
.mobile-nav-btn.active { color: #3b82f6; }
.mobile-nav-btn:hover { color: #3b82f6; }

/* 移动端更多菜单 */
.mobile-more-menu {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.mobile-more-menu.hidden { display: none; }
.mobile-more-menu-inner {
  background: white; border-radius: 1.25rem 1.25rem 0 0;
  width: 100%; max-width: 480px; padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
  animation: slideUpBar 0.25s ease;
}
.mobile-more-title {
  font-size: 0.78rem; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem; padding: 0 0.25rem;
}
.mobile-more-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin-bottom: 1rem;
}
.mobile-more-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
  padding: 0.5rem; border: none; background: transparent;
  color: #374151; font-size: 0.72rem; cursor: pointer; transition: all 0.15s;
  border-radius: 0.75rem;
}
.mobile-more-item:hover { background: #f1f5f9; }
.mobile-more-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
}
.mobile-more-close {
  width: 100%; padding: 0.625rem; border: 1px solid #e2e8f0;
  border-radius: 0.75rem; background: #f8fafc; color: #64748b;
  font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.mobile-more-close:hover { background: #f1f5f9; }

/* 安全区域底部间距 */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* ===== 格式转换弹窗 ===== */
.convert-format-card {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem; border: 1.5px solid #bfdbfe; border-radius: 1rem;
  cursor: pointer; transition: all 0.18s ease; background: white;
}
.convert-format-card:hover { border-color: #3b82f6; background: #eff6ff; }
.convert-format-card.selected { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15); }
.convert-format-card input[type="radio"] { accent-color: #3b82f6; margin-top: 0.25rem; flex-shrink: 0; }
.convert-format-info { flex: 1; }
.convert-format-name { font-size: 0.875rem; font-weight: 600; color: #1e40af; }
.convert-format-desc { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; line-height: 1.4; }
.convert-format-badge {
  display: inline-flex; align-items: center; padding: 0.1rem 0.5rem;
  border-radius: 9999px; font-size: 0.65rem; font-weight: 600;
  margin-top: 0.375rem;
}
.convert-badge-recommended { background: #dcfce7; color: #166534; }
.convert-badge-light { background: #dbeafe; color: #1e40af; }
.convert-badge-native { background: #f3f4f6; color: #374151; }
.convert-preview-wrap {
  margin-top: 1rem; background: #1e293b; border-radius: 0.875rem;
  padding: 1rem; overflow-x: auto; max-height: 200px;
}
.convert-preview-wrap pre {
  font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.75rem;
  color: #e2e8f0; line-height: 1.5; white-space: pre; margin: 0;
}

/* ===== 灵感图批量上传 ===== */
.batch-upload-preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem; margin-top: 0.75rem;
}
.batch-upload-preview-item {
  position: relative; border-radius: 0.75rem; overflow: hidden;
  border: 1.5px solid #bfdbfe; aspect-ratio: 1;
}
.batch-upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.batch-upload-preview-remove {
  position: absolute; top: 0.25rem; right: 0.25rem;
  width: 1.25rem; height: 1.25rem; background: rgba(0,0,0,0.5); color: white;
  border-radius: 9999px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 0.625rem;
}
.batch-upload-preview-remove:hover { background: #ef4444; }

/* ===== 灵感图批量关联单品弹窗 ===== */
.batch-link-items-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem; max-height: 260px; overflow-y: auto; padding: 0.25rem;
}
.batch-link-item-thumb {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.25rem; cursor: pointer; border-radius: 0.75rem;
  padding: 0.375rem 0.25rem; border: 1.5px solid #bfdbfe;
  background: white; transition: all 0.15s ease; position: relative;
}
.batch-link-item-thumb:hover { border-color: #3b82f6; background: #eff6ff; }
.batch-link-item-thumb.selected { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px #93c5fd; }
.batch-link-item-thumb-img {
  width: 48px; height: 56px; border-radius: 0.5rem;
  overflow: hidden; background: #eff6ff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.batch-link-item-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.batch-link-item-thumb-check {
  position: absolute; inset: 0; background: rgba(59,130,246,0.55);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem; border-radius: 0.5rem;
}
.batch-link-item-thumb-name {
  font-size: 0.6875rem; color: #374151; text-align: center;
  line-height: 1.2; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== 灵感图批量管理 ===== */
.batch-manage-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: white; border-top: 1px solid #bfdbfe;
  box-shadow: 0 -4px 16px rgba(59, 130, 246, 0.1);
  padding: 0.75rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
  animation: slideUpBar 0.25s ease;
}
@keyframes slideUpBar {
  from { transform: translateY(100%); } to { transform: translateY(0); }
}
.batch-manage-bar-info { font-size: 0.875rem; color: #1e40af; font-weight: 500; }
.batch-manage-bar-actions { display: flex; align-items: center; gap: 0.5rem; }
.inspiration-card.batch-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.45), 0 8px 24px rgba(59, 130, 246, 0.28);
  transform: translateY(-3px) scale(1.01);
  position: relative;
}
.inspiration-card.batch-selected::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(147,197,253,0.08));
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
}
.insp-batch-check {
  position: absolute; top: 0.625rem; left: 0.625rem; z-index: 15;
  width: 1.85rem; height: 1.85rem; border-radius: 9999px;
  background: rgba(255,255,255,0.92); border: 2.5px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: transparent; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer; backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.insp-batch-check:hover {
  border-color: #3b82f6; background: rgba(255,255,255,1);
  transform: scale(1.08);
}
.inspiration-card.batch-selected .insp-batch-check {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #1d4ed8; color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.6), 0 0 0 4px rgba(59, 130, 246, 0.2);
  transform: scale(1.12);
  animation: batchCheckPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes batchCheckPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1.12); }
}
/* 兼容旧类名 */
.inspiration-batch-check {
  position: absolute; top: 0.625rem; left: 0.625rem; z-index: 15;
  width: 1.85rem; height: 1.85rem; border-radius: 9999px;
  background: rgba(255,255,255,0.92); border: 2.5px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: transparent; transition: all 0.2s ease;
  cursor: pointer; backdrop-filter: blur(4px);
}
.inspiration-batch-check:hover { border-color: #3b82f6; background: rgba(255,255,255,1); }
.inspiration-card.batch-selected .inspiration-batch-check {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #1d4ed8; color: white;
}

/* ===== 灵感图关联单品弹窗分类筛选 ===== */
.insp-link-cat-tabs {
  display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem;
}
.insp-link-cat-tab {
  padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem;
  border: 1.5px solid #bfdbfe; background: white; color: #9ca3af;
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.insp-link-cat-tab:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.insp-link-cat-tab.active { border-color: #3b82f6; background: #3b82f6; color: white; font-weight: 600; }

/* ===== 分类筛选组样式（灵感图关联弹窗用） ===== */
.insp-link-cat-group {
  margin-bottom: 0.5rem;
  border: 1px solid #e0f2fe;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fafcff;
}
.insp-link-cat-group-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(90deg, #eff6ff, #f8faff);
  font-size: 0.78rem; font-weight: 600; color: #1d4ed8;
  border-bottom: 1px solid #e0f2fe;
  cursor: pointer;
  transition: background 0.15s;
}
.insp-link-cat-group-header:hover { background: #dbeafe; }
.insp-link-cat-group-header .cat-group-arrow {
  font-size: 0.65rem; color: #93c5fd; transition: transform 0.2s;
}
.insp-link-cat-group-header.collapsed .cat-group-arrow { transform: rotate(-90deg); }
.insp-link-cat-group-subs {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.375rem 0.625rem;
}
.insp-link-cat-group-subs.collapsed { display: none; }

/* ===== 灵感关联单品弹窗 - 分类分组展示 ===== */
.item-select-group {
  margin-bottom: 0.25rem;
}
.item-select-group-title {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.5rem; margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff1f2, #fdf2f8);
  border-radius: 0.5rem;
  border-left: 3px solid #fb7185;
}
.item-select-group-label {
  font-size: 0.78rem; font-weight: 600; color: #be123c;
}
.item-select-group-count {
  font-size: 0.65rem; color: #fb7185;
  background: #fff1f2; border: 1px solid #fecdd3;
  border-radius: 9999px; padding: 0.05rem 0.4rem;
  min-width: 1.2rem; text-align: center;
}
.item-select-card {
  position: relative; border-radius: 0.75rem; overflow: hidden;
  border: 2.5px solid #f3e8ff; background: white;
  cursor: pointer; transition: all 0.2s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.item-select-card:hover {
  border-color: #c084fc; transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168,85,247,0.15);
}
.item-select-card:active { transform: scale(0.97); }
.item-select-card.selected {
  border-color: #a855f7; background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.18), 0 4px 12px rgba(168,85,247,0.12);
}
/* 选中时图片加半透明紫色遮罩 */
.item-select-card.selected::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 0; padding-bottom: 100%;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(192,132,252,0.12));
  pointer-events: none;
}
.item-select-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: filter 0.2s ease;
}
.item-select-card.selected img { filter: brightness(0.95) saturate(1.1); }
.item-select-placeholder {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: #faf5ff; color: #c084fc; font-size: 1.5rem;
}
/* 选中角标：序号圆圈 */
.item-select-check {
  position: absolute; top: 0.3rem; right: 0.3rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: 2px solid #d8b4fe;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: transparent;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(4px);
}
.item-select-card:hover .item-select-check {
  border-color: #a855f7; background: rgba(255,255,255,0.95);
}
.item-select-card.selected .item-select-check {
  background: linear-gradient(135deg, #a855f7, #7c3aed); border-color: transparent;
  color: white; transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(139,92,246,0.4);
}
/* 选中时底部名称区高亮 */
.item-select-info {
  padding: 0.3rem 0.4rem;
  transition: background 0.2s ease;
}
.item-select-card.selected .item-select-info {
  background: linear-gradient(90deg, #f3e8ff, #faf5ff);
}
.item-select-name {
  font-size: 0.7rem; font-weight: 500; color: #374151;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.15s ease;
}
.item-select-card.selected .item-select-name { color: #7c3aed; font-weight: 600; }
.item-select-brand {
  font-size: 0.6rem; color: #9ca3af;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 选中动画：弹跳 */
@keyframes itemSelectPop {
  0% { transform: scale(1); }
  40% { transform: scale(0.95); }
  70% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.item-select-card.select-animate {
  animation: itemSelectPop 0.3s cubic-bezier(.4,0,.2,1);
}
/* 取消选中动画 */
@keyframes itemDeselectFade {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}
.item-select-card.deselect-animate {
  animation: itemDeselectFade 0.25s ease;
}

/* ===== 一级分类标签（候选单品弹窗） ===== */
.batch-link-cat-tab {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.9rem; border-radius: 9999px;
  font-size: 0.8rem; font-weight: 500;
  border: 1.5px solid #e9d5ff; background: white; color: #6b7280;
  cursor: pointer; transition: all 0.25s cubic-bezier(.4,0,.2,1);
  white-space: nowrap; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.batch-link-cat-tab::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(236,72,153,0.06));
  opacity: 0; transition: opacity 0.25s ease;
  border-radius: inherit;
}
.batch-link-cat-tab:hover {
  border-color: #c084fc; color: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(168,85,247,0.12);
}
.batch-link-cat-tab:hover::before { opacity: 1; }
.batch-link-cat-tab:active { transform: scale(0.96); }
.batch-link-cat-tab.active {
  border-color: #a855f7;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white; font-weight: 600;
  box-shadow: 0 3px 12px rgba(168,85,247,0.3), 0 1px 3px rgba(236,72,153,0.2);
  transform: translateY(-1px);
}
.batch-link-cat-tab.active::before { opacity: 0; }
.batch-link-cat-tab .cat-icon {
  font-size: 0.85rem; transition: transform 0.2s ease;
}
.batch-link-cat-tab:hover .cat-icon { transform: scale(1.15); }
.batch-link-cat-count {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
  min-width: 1.2rem; height: 1.2rem;
  padding: 0 0.3rem; border-radius: 9999px;
  background: #f3e8ff; color: #9333ea;
  transition: all 0.2s ease;
  line-height: 1;
}
.batch-link-cat-tab.active .batch-link-cat-count {
  background: rgba(255,255,255,0.3); color: white;
}
.batch-link-cat-tab:hover .batch-link-cat-count {
  background: #ede9fe; color: #7c3aed;
}
/* 一级分类标签容器 */
#item-select-cat-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.5rem 0; margin-bottom: 0.25rem;
}
/* 二级分类标签容器 */
#item-select-subcat-tabs {
  display: flex; flex-wrap: wrap; gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(90deg, #faf5ff, #fdf2f8);
  border-radius: 0.75rem; margin-bottom: 0.5rem;
}
#item-select-subcat-tabs:empty { display: none; }

/* ===== 已选单品名称标签（灵感图编辑弹窗） ===== */
.insp-linked-item-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  background: linear-gradient(135deg, #faf5ff, #fdf4ff);
  border: 1.5px solid #e9d5ff;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  cursor: default; position: relative;
  box-shadow: 0 1px 3px rgba(168,85,247,0.06);
  animation: chipAppear 0.3s cubic-bezier(.4,0,.2,1);
}
@keyframes chipAppear {
  0% { opacity: 0; transform: scale(0.8) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.insp-linked-item-chip:hover {
  border-color: #c084fc;
  box-shadow: 0 3px 10px rgba(168,85,247,0.15);
  transform: translateY(-1px);
}
.insp-linked-item-chip img {
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%; object-fit: cover;
  border: 2px solid #e9d5ff;
  box-shadow: 0 1px 3px rgba(168,85,247,0.12);
  transition: border-color 0.2s ease;
}
.insp-linked-item-chip:hover img {
  border-color: #a855f7;
}
.insp-linked-item-placeholder {
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e9d5ff, #f3e8ff);
  color: #a855f7; font-size: 0.7rem;
  border: 2px solid #e9d5ff;
}
.insp-linked-item-name {
  font-size: 0.78rem; font-weight: 600;
  color: #6b21a8; max-width: 7rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.01em;
}
.insp-linked-item-remove {
  display: flex; align-items: center; justify-content: center;
  width: 1.2rem; height: 1.2rem;
  border-radius: 50%; border: none;
  background: #f3e8ff; color: #a855f7;
  cursor: pointer; font-size: 0.55rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.insp-linked-item-remove:hover {
  background: #ef4444; color: white;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 2px 6px rgba(239,68,68,0.3);
}
/* 已选单品预览区域 */
#insp-linked-items-previews:empty::after {
  content: '暂未关联单品';
  display: block; padding: 0.75rem 0;
  font-size: 0.78rem; color: #c4b5fd;
  text-align: center; font-style: italic;
}
/* 选择单品按钮优化 */
#btn-insp-select-items {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 1rem !important;
  border: 2px dashed #d8b4fe !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #faf5ff, #fdf4ff) !important;
  color: #7c3aed !important; font-weight: 600 !important;
  font-size: 0.78rem !important;
  transition: all 0.25s cubic-bezier(.4,0,.2,1) !important;
  cursor: pointer;
}
#btn-insp-select-items:hover {
  border-color: #a855f7 !important;
  background: linear-gradient(135deg, #f3e8ff, #fce7f3) !important;
  box-shadow: 0 3px 12px rgba(168,85,247,0.15) !important;
  transform: translateY(-1px) !important;
}

/* ===== 顶部筛选面板折叠头 ===== */
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0.25rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease;
}
.filter-panel-header:hover {
  background: linear-gradient(135deg, #fff1f2, #fef2f2);
}
.filter-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #9f1239;
}
.filter-panel-title i.fa-filter {
  font-size: 0.85rem;
  color: #f472b6;
}
.filter-active-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fb7185, #f472b6);
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.filter-panel-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: #fff1f2;
  color: #fb7185;
  font-size: 0.7rem;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.filter-panel-header:hover .filter-panel-chevron {
  background: #ffe4e6;
  color: #e11d48;
}
.filter-panel-header.expanded .filter-panel-chevron {
  transform: rotate(180deg);
}
.filter-panel-body {
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}
.filter-panel-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0 !important;
}