/* Directory presentation consumes each fighter's existing approved cosmetics. */
.fac-fighter-directory__grid { max-width: 1240px; margin-inline: auto; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.fac-fighter-directory .fac-fighter-card--collectible { --fac-profile-primary: var(--fac-card-primary); --fac-profile-accent: var(--fac-card-accent); position: relative; isolation: isolate; border: 3px solid var(--fac-card-primary); border-radius: 18px; background: linear-gradient(160deg, #16171bf5, #09090de8), var(--fac-card-background, none); background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px #ffffff35, 0 20px 40px #0009, 0 0 18px color-mix(in srgb, var(--fac-card-primary) 20%, transparent); transition: transform .2s ease, box-shadow .2s ease; }
.fac-fighter-card--collectible::before { content: ''; position: absolute; z-index: 2; pointer-events: none; inset: 0; border-radius: inherit; background: linear-gradient(125deg, #ffffff24 0%, #ffffff06 25%, transparent 40%, #ffffff12 52%, transparent 64%); }
.fac-fighter-card--collectible::after { content: ''; position: absolute; z-index: 2; pointer-events: none; inset: 5px; border: 1px solid #ffffff25; border-radius: 11px; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__portrait { display: block; min-height: 0; height: auto; aspect-ratio: 4 / 4.7; padding: 18px 18px 0; background: transparent; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-portrait { min-height: 0; height: 100%; aspect-ratio: auto; padding: 5px; background: var(--fac-card-primary); }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-portrait--lozenge { padding: 15%; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-portrait > div { min-height: 0; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__portrait img { min-height: 0; height: 100%; object-fit: cover; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__copy { position: relative; padding: 22px; background: linear-gradient(#10101555, #09090de8); }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-kicker { color: color-mix(in srgb, var(--fac-card-primary) 35%, white); font-size: .7rem; letter-spacing: .12em; line-height: 1.5; }
.fac-fighter-directory .fac-fighter-card--collectible h2 { color: color-mix(in srgb, var(--fac-card-primary) 32%, white) !important; font-family: 'FAC Cinzel', Georgia, serif; font-size: clamp(1.4rem, 2vw, 1.8rem); line-height: 1.25; overflow-wrap: anywhere; }
.fac-fighter-directory .fac-fighter-card--collectible h2 a { color: #f7f3e8; text-decoration: none; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-epithet { color: color-mix(in srgb, var(--fac-card-primary) 30%, white); font-size: .95rem; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__copy > p { line-height: 1.65; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__copy > p:not(.fac-fighter-kicker):not(.fac-fighter-epithet) { color: #e6e3dd; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__copy > p:last-of-type { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--fac-card-primary); border-radius: 6px; background: #08080bb3; color: #fff; font-size: .75rem; letter-spacing: .08em; text-decoration: none; }
.fac-fighter-directory .fac-fighter-card--collectible a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.fac-fighter-directory .fac-fighter-card--collectible .fac-insignia { z-index: 3; }
.fac-fighter-profile--sheet { position: relative; }
.fac-card-butterfly { position: absolute; z-index: 4; top: 16px; right: 15px; width: 44px; height: 40px; pointer-events: none; filter: drop-shadow(0 0 5px #ff68e466); animation: fac-card-butterfly-drift 14s ease-in-out infinite; }
.fac-card-butterfly svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fac-card-butterfly__left, .fac-card-butterfly__right { transform-box: view-box; transform-origin: 32px 27px; animation: fac-card-butterfly-wings 14s ease-in-out infinite; }
@keyframes fac-card-butterfly-wings { 0%, 8%, 16%, 24%, 100% { transform: scaleX(1); } 4%, 12%, 20% { transform: scaleX(.18); } }
@keyframes fac-card-butterfly-drift { 0%, 26%, 100% { transform: translate(0, 0) rotate(-8deg); } 8% { transform: translate(-5px, -5px) rotate(5deg); } 16% { transform: translate(3px, -3px) rotate(-4deg); } }
.fac-color-control { min-width: 0; padding: 12px; border: 1px solid #8886; border-radius: 8px; display: grid; grid-template-columns: auto minmax(90px, 1fr); gap: 10px; }
.fac-color-control legend { padding-inline: 4px; font-weight: 600; }
.fac-color-control label { display: flex; flex-direction: column; gap: 5px; }
.fac-color-control input[type='color'] { width: 72px; height: 40px; padding: 3px; cursor: pointer; }
.fac-color-control input[type='text'], .fac-color-control input[type='number'] { width: 100%; min-width: 0; }
.fac-color-control__rgb { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fac-color-control small { grid-column: 1 / -1; line-height: 1.5; }
@media (hover: hover) and (pointer: fine) { .fac-fighter-card--collectible:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px #ffffff55, 0 25px 50px #000a, 0 0 24px color-mix(in srgb, var(--fac-card-primary) 35%, transparent); } }
@media (max-width: 600px) { .fac-fighter-directory__grid { grid-template-columns: minmax(0, 1fr); } .fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-card__portrait { height: auto; min-height: 0; } .fac-card-butterfly { width: 34px; height: 32px; top: 11px; right: 10px; } }
@media (prefers-reduced-motion: reduce) { .fac-card-butterfly, .fac-card-butterfly * { animation: none !important; } .fac-fighter-directory .fac-fighter-card--collectible { transition: none; } .fac-fighter-card--collectible:hover { transform: none; } }

/* The native shell marks legacy link buttons important; keep each card themed. */
.fac-fighter-directory .fac-fighter-card--collectible .fac-fighter-link { border: 1px solid var(--fac-card-primary) !important; background: color-mix(in srgb, var(--fac-card-primary) 12%, #08080b) !important; color: #fff !important; }

.fac-portrait-frost { position: relative; min-width: 0; filter: drop-shadow(0 0 5px #bdefff) drop-shadow(0 0 14px #5bd4f466); }
.fac-portrait-frost__ice { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fac-fighter-directory .fac-portrait-frost { height: 100%; }
.fac-fighter-profile--sheet .fac-sheet__rail > .fac-portrait-frost { width: min(100%, 320px); }
.fac-fighter-profile--sheet .fac-portrait-frost .fac-sheet__portrait { width: 100%; }
.fac-insignia__badge--hema { color: #c8dce9; }
.fac-insignia__badge--jouster { width: 42px; color: #c8dce9; }
