.catalog-card-content { display: block; width: 100%; }
.catalog-preview { position: relative; box-sizing: border-box; width: 72px; height: 88px; overflow: hidden; border: 1px solid var(--ui-line, #dce2e9); border-radius: 10px; background: var(--ui-muted, #f4f4f4); color: var(--text-sub, #888); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 11px; }
.catalog-preview[hidden] { display: none !important; }
.catalog-preview:has(img) { display: block; background: #fff; }
.catalog-preview img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; background: #fff; }
.catalog-preview img.catalog-crossfade-in { animation: catalog-preview-in .5s ease-in-out both; }
.catalog-preview img.catalog-crossfade-out { animation: catalog-preview-out .5s ease-in-out both; }
@keyframes catalog-preview-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes catalog-preview-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .catalog-preview img.catalog-crossfade-in, .catalog-preview img.catalog-crossfade-out { animation: none; } }
.catalog-preview svg { width: 26px; height: 26px; }
#previewChar, #previewOutfit { position: absolute; left: 24px; top: calc(50% + 29px); transform: translateY(-50%); width: min(calc(38% - 18px), 190px); height: auto; aspect-ratio: 260 / 360; max-height: calc(100% - 106px); z-index: 1; pointer-events: none; }
#cardChar > .source-badge, #cardOutfit > .source-badge, #cardChar > .name-display, #cardOutfit > .name-display { position: relative; z-index: 2; }
#cardChar > .source-badge, #cardOutfit > .source-badge { align-self: flex-end; margin-right: calc((100% - min(38%, 190px) - 16px) / 2); max-width: calc(100% - min(38%, 190px) - 16px); transform: translateX(50%); text-align: center; overflow-wrap: anywhere; }
#cardChar > .name-display, #cardOutfit > .name-display { width: calc(100% - min(38%, 190px) - 16px); margin-left: auto; margin-right: 0; text-align: center; text-shadow: none; filter: none; opacity: 1; }
:root #cardChar .catalog-card-content > .prompt-box, :root #cardOutfit .catalog-card-content > .prompt-box { position: relative; z-index: 2; width: calc(100% - min(38%, 190px) - 16px); margin-left: auto; min-width: 0; text-align: center; background: transparent; border: 0; box-shadow: none; text-shadow: none; filter: none; opacity: 1; }
.catalog-preview-result { flex: 0 0 72px; width: 72px; height: 88px; border-radius: 8px; font-size: 9px; text-align: center; }
.filter-chip.catalog-result { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px; min-width: 0; }
#searchResultList:has(.catalog-result) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important; }
.catalog-result-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.catalog-result-label small { display: block; margin-top: 4px; font-size: 11px; color: var(--text-sub, #888); }
@media (max-width: 600px) {
  #previewChar, #previewOutfit { left: 16px; top: calc(50% + 29px); width: min(calc(38% - 12px), 140px); max-height: calc(100% - 90px); }
  #cardChar > .name-display, #cardOutfit > .name-display, :root #cardChar .catalog-card-content > .prompt-box, :root #cardOutfit .catalog-card-content > .prompt-box { width: calc(100% - min(38%, 140px) - 12px); }
  #cardChar > .source-badge, #cardOutfit > .source-badge { margin-right: calc((100% - min(38%, 140px) - 12px) / 2); max-width: calc(100% - min(38%, 140px) - 12px); }
  .catalog-preview-result { flex-basis: 64px; width: 64px; height: 80px; }
}
