/* Pets and supporters, the glossary, progression and photo cards. Loaded in the order base, roster, fighter, team, companions, panels, pages, insights: a later file wins over an earlier one at equal weight. */
/* pets and supporters: pixel art, shown sharp at any size */
img.pixel { image-rendering: pixelated; }
.c-hero .f-info { flex: 1 1 520px; }
.c-art { flex: 0 1 420px; min-height: 0; aspect-ratio: 1 / 1; align-items: center; background: var(--tint); }
.c-art img { height: auto; width: 100%; max-width: 384px; margin: 0; }
.series-logo { flex: none; width: 28px; height: 28px; object-fit: contain; }
/* the logos have empty space around them, so they're drawn a little larger than the text */
.badge .series-logo, .facts .series-logo { width: 32px; height: 32px; margin: -8px 2px -8px -4px; vertical-align: middle; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.related .card-name { font-size: 17px; }

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  /* less empty space around the sections of a fighter page, and none after a closed drawer */
  .band > .wrap { padding-top: 28px; padding-bottom: 28px; }
  .wrap > .notes-grid:first-child { padding-top: 28px; padding-bottom: 0; }
  .notes-block { margin-top: 12px; padding-top: 12px; }
  .notes-drawer > summary .muted { display: none; }
  /* the star upgrade list: tighter */
  .tier { gap: 12px; padding: 10px 12px; }
  .tier-star { width: 46px; padding: 5px 0; }
  .tier-star b { font-size: 21px; }
  .tier-star span { font-size: 13px; }
  .tier-text { font-size: 14px; line-height: 1.45; }
  .tier-text .tier-head { font-size: 14px; }
  /* skill cards: tighter on a phone (the damage is already in the bars above, so the card's own damage line is left out) */
  .skills { gap: 12px; }
  .skill { gap: 8px; padding: 14px; }
  .skill-head { gap: 10px; }
  .skill-icon, .skill-letter { width: 44px; height: 44px; }
  .skill-name { font-size: 20px; }
  .skill-type { margin-left: 6px; padding: 0 6px; }
  .skill-lvl { padding: 1px 6px; font-size: 12px; }
  .skill-dmg { display: none; }
  .skill-text { font-size: 14px; line-height: 1.45; }
  .effect-notes { margin-top: 6px; font-size: 13px; }
  .skill-note { font-size: 12px; }
  /* the number sits inside the bar, over its fill */
  .bar-row { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .bar-label { grid-column: 1; grid-row: 1; }
  .bar { grid-column: 2; grid-row: 1; height: 30px; border-radius: 6px; }
  .bar-val { grid-column: 2; grid-row: 1; z-index: 1; padding: 0 10px; font-size: 13px; font-weight: 600; line-height: 30px; white-space: nowrap; overflow: hidden;
    color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 4px rgba(0, 0, 0, .6); }
  .bar-val em { color: rgba(255, 255, 255, .85); font-weight: 400; }
  .f-art { min-height: 440px; }
  .f-ghost { display: none; } /* the faded name behind a fighter is for wide screens only */
  .f-art img { height: 420px; }
  .rarity-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sort { margin-left: 0; }
  .auth-card { padding: 24px; }
  /* rosters three across, with smaller cards: the type tag keeps just its icon (a series name, which has none,
     is already under the name) */
  .grid { grid-template-columns: repeat(60, minmax(0, 1fr)); gap: 6px; }
  /* by rarity: Legendary four across, Unique five, every other six (sixty columns divide into all three) */
  .grid > .card { grid-column: span 10; }
  .grid > .card[data-r="Unique"] { grid-column: span 12; }
  .grid > .card[data-r="Legendary"] { grid-column: span 15; }
  .grid.by-rarity > .card.new-group { grid-column: 1 / span 10; }
  .grid.by-rarity > .card.new-group[data-r="Unique"] { grid-column: 1 / span 12; }
  .grid.by-rarity > .card.new-group[data-r="Legendary"] { grid-column: 1 / span 15; }
  /* the type and keepsake badges stay on the four-across Legendary cards, and go from the smaller ones */
  .grid > .card:not([data-r="Legendary"]) .tag-d, .grid > .card:not([data-r="Legendary"]) .tag-k { display: none; }
  .grid .card-foot { display: none; }
  .grid.has-stat .card-foot { display: flex; padding-top: 3px; font-size: 10px; }
  .grid.has-stat .card-syn { display: none; }
  .grid .card-name { font-size: 10px; line-height: 1.05; }
  .grid .card-style { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grid > .card[data-r="Unique"] .card-name { font-size: 11px; }
  .grid > .card[data-r="Legendary"] .card-name { font-size: 12px; }
  .grid > .card[data-r="Legendary"] .card-style { font-size: 10px; }
  /* the "also this synergy" cards (fighters, pets, supporters): four across, like a small roster */
  .related { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .related .card { border-radius: 8px; }
  .related .card-body { padding: 5px 5px 7px; gap: 1px; }
  .related .card-name { font-size: 12px; line-height: 1.1; overflow-wrap: anywhere; }
  .related .card-style { font-size: 10px; overflow-wrap: anywhere; }
  .grid .card { border-radius: 8px; }
  .grid .tag { top: 4px; }
  .grid .tag-r { left: 4px; }
  .grid .tag-d { right: 4px; padding: 4px; gap: 0; font-size: 0; }
  .grid .tag-d .glyph { width: 13px; height: 13px; }
  .grid .tag-d:not(:has(.glyph, .diamond)) { display: none; }
  .grid .card-art .tag img.rbadge { height: 13px; }
  .grid .tag-icon { padding: 2px 4px; }
  .grid .card-body { padding: 6px 7px 8px; gap: 1px; }
  .grid .card-name { overflow-wrap: anywhere; }
  .grid .card-foot { padding-top: 6px; gap: 4px; font-size: 11px; }
  .grid .card-syn .glyph { width: 14px; height: 14px; }
  .grid .card-fx { margin-top: 4px; }
  .grid .fx-line, .grid .fx-star { font-size: 11px; }
}

/* glossary: terms grouped by category */
.gloss { display: flex; flex-direction: column; gap: 40px; padding-bottom: 64px; }
.gloss-cat .h-sub { margin-bottom: 14px; }
.gloss-cat .h-sub .muted { font-weight: 500; }
.gloss-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.gloss-term { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.gloss-term dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 8px;
  font: 700 18px var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.gloss-term dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); white-space: pre-line; }
.gloss-term dd b { color: var(--tag); font-weight: 600; }
.gloss-note { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; font: 600 11px var(--cond); letter-spacing: .1em; color: var(--muted); }

/* progression: cost and rate tables */
a.chip { text-decoration: none; }
.chip[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.prog { padding-top: 24px; padding-bottom: 64px; }
.prog-pick { margin-bottom: 16px; }
.prog-calc { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 20px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.prog-calc label { display: flex; flex-direction: column; gap: 6px; font: 600 13px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.prog-calc input { width: 110px; height: 44px; padding: 0 12px; background: var(--ink); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; font-family: inherit; font-size: 16px; font-weight: 600; }
.prog-calc input:focus { outline: none; border-color: var(--accent); }
.prog-result { flex: 1 1 260px; margin: 0; font-size: 16px; color: var(--text-2); }
.prog-result strong { color: var(--text); font-size: 20px; }
.prog-note { margin: 16px 0 0; max-width: 760px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.tbl-wrap:focus-visible { outline: 2px solid var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--panel); font: 600 13px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.tbl thead th.rc { border-bottom: 3px solid var(--rc); color: var(--text); }
.tbl tbody th { text-align: left; font-weight: 700; color: var(--text); }
.tbl td.l { text-align: left; }
.tbl thead th:first-child { text-align: left; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr:hover > * { background: rgba(255, 255, 255, .03); }
.tbl-total { color: var(--muted); font-size: inherit; }

/* photo cards */
.pcard-filters { flex-wrap: wrap; }
.pcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding-bottom: 32px; }
.pcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-top: 3px solid var(--rc);
  border-radius: 10px; overflow: hidden; }
.pcard:has(details[open]) { grid-column: span 2; }
.pcard-img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: color-mix(in srgb, var(--rc) 12%, var(--ink)); }
.pcard-none { background: var(--ink); }
.pcard-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcard-name { margin: 0; font: 700 16px/1.1 var(--cond); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.pcard-meta { margin: 0; font-size: 12px; color: var(--muted); }
.pcard-rarity { color: var(--rc); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pcard-effect { margin: 0; font-size: 12px; font-weight: 600; color: var(--text); }
.pcard-effect em, .pcard-stats dt { font-style: normal; font: 600 12px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pcard-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); white-space: pre-line; }
.pcard-stats { margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.pcard-stats dd { margin: 2px 0 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
