/* ============================================================
 *  主题市场
 * ============================================================ */
.theme-market {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
}

.theme-card {
  position: relative;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background-color: var(--bg);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  overflow: hidden;
  font-family: var(--font-ui);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.theme-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 0 16px var(--accent-soft);
}

.theme-card-preview {
  display: flex;
  gap: 4px;
  margin-bottom: 0.6rem;
  height: 32px;
}
.theme-card-swatch {
  flex: 1;
  border-radius: 3px;
  height: 100%;
}

.theme-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.15rem;
}
.theme-card-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.theme-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  background-color: var(--accent);
  color: #0d1117;
  font-weight: 700;
  opacity: 0;
}
.theme-card.active .theme-card-badge { opacity: 1; }