/* v1.53 — portrait browser lists each distinct costume, not one card per character. */
.portrait-costume-grid {
 display:grid;
 grid-template-columns:repeat(auto-fill,minmax(119px,1fr));
 max-height:min(58vh,570px);
 overflow-y:auto;
 overscroll-behavior:contain;
 gap:10px;
 padding:4px 7px 14px 3px;
 scrollbar-color:#e7aed0 #f9f3f9;
 align-content:start;
}
.portrait-costume-card {
 position:relative;
 appearance:none;
 display:flex;
 flex-direction:column;
 align-items:center;
 gap:5px;
 min-width:0;
 padding:10px 8px 9px;
 border-radius:15px;
 border:1px solid #e9dbe9;
 background:#fff;
 text-align:center;
 color:#60465d;
 cursor:pointer;
 transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.portrait-costume-card:hover {transform:translateY(-2px);border-color:#dc8bba;box-shadow:0 6px 16px #b55d971b}
.portrait-costume-card:focus-visible{outline:3px solid #81d4b3;outline-offset:2px}
.portrait-costume-card.is-active {border:2px solid #5fce9a;background:#f1fff7;padding:9px 7px 8px;box-shadow:0 0 0 2px #c6f4de}
.portrait-costume-art {
 width:87px;height:87px;position:relative;
 display:grid;place-items:center;overflow:hidden;
 border-radius:17px;border:1px solid #ecdeeb;
 background:linear-gradient(125deg,#f4ddfa,#dffaf0);
 flex-shrink:0;
}
.portrait-costume-art .portrait-gallery-img {
 position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 21%;background:#fff;
}
.portrait-costume-card>strong {font-size:13px;line-height:1.25;font-weight:850;word-break:keep-all;overflow-wrap:anywhere}
.portrait-costume-card>small {font-size:11px;line-height:1.35;color:#8a7589;word-break:keep-all;overflow-wrap:anywhere;min-height:29px}
.portrait-costume-selection {font-size:10px;line-height:1.3;font-weight:800;color:#ab7c9c}
.portrait-costume-card.is-active .portrait-costume-selection{color:#1e9d69}
.portrait-costume-card .portrait-source-note{
 position:absolute;bottom:1px;left:3px;right:3px;border-radius:4px;
 background:#fffde6e0;color:#98692e;font-size:9px;font-weight:750;
}
.portrait-gallery-summary{font-size:13px;line-height:1.5;color:#685d6a;margin:3px 0 11px}
.portrait-gallery-summary b{color:#4e946e}
.portrait-gallery-source-note{font-size:11px;color:#958596;line-height:1.5;padding:8px 10px;margin:8px 0 0;border-radius:8px;background:#faf5fa}
@media (max-width:740px){.portrait-costume-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));max-height:55vh;gap:7px}.portrait-costume-art{width:76px;height:76px}}
@media (max-width:450px){.portrait-costume-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.portrait-costume-art{width:66px;height:66px}.portrait-costume-card{padding:7px 4px}.portrait-costume-card>strong{font-size:11px}.portrait-costume-card>small{font-size:10px}}
