/* The anime pages (C1-115, /anime and /anime/<slug>, worker/anime-pages.mjs):
   the catalogue pilot's sheet (public-catalogue.css: crumbs, roster, rarity
   chips) plus an album's poster and its characters as cards. Script-free and
   still. Every colour is a DESIGN.md token; the rarity is never colour alone:
   each card prints its diamonds and its name. */

/* The album: its poster beside its title and its finishers. */
.anime-hero { display: grid; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 16px 20px; align-items: start; margin-top: 8px; }
.anime-hero.no-cover { grid-template-columns: minmax(0, 1fr); }
.anime-cover { display: block; width: 100%; max-width: 230px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; background: #1f1f36; outline: 1px solid rgb(255 255 255 / 0.1); outline-offset: -1px; }
.anime-intro { min-width: 0; }
.anime-intro h1 { margin: 0 0 12px; }
.anime-intro .lede { margin: 0 0 12px; }
.collectors { display: inline-block; margin: 0; padding: 6px 12px; border-radius: 14px; background: #1f1f36; border: 1px solid rgb(255 255 255 / 0.16); font-size: .875rem; font-weight: 800; line-height: 1.5; color: #f6f3ee; }
.anime-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 24px 0 0; }
.anime-start a.play { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 28px; border-radius: 26px; font-size: 1.05rem; }
.anime-start + .note { margin-top: 12px; }

/* How many characters each rarity holds, the rarest first. */
.anime-tiers { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.anime-tiers li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.anime-tiers strong { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* The characters as cards: two a row on a phone, four on a computer. The
   frame takes the rarity's ink; the two top tiers wear their foils. The
   name takes what a row leaves: rarity and chance line up at the bottom. */
.anime-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: 16px 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.anime-card { display: grid; grid-template-rows: auto 1fr auto auto; align-items: start; justify-items: start; gap: 6px; margin: 0; padding: 6px 6px 10px; border-radius: 16px; background: #1f1f36; border: 2px solid #a7aeb8; }
.anime-card[data-rarity="uncommon"] { border-color: #37c172; }
.anime-card[data-rarity="rare"] { border-color: #528ee9; }
.anime-card[data-rarity="epic"] { border-color: #9b47fb; }
.anime-card[data-rarity="legendary"] { border-color: transparent; background: linear-gradient(#1f1f36, #1f1f36) padding-box, linear-gradient(135deg, #f2b632, #fef2e1 30%, #f2b632 58%, #fef2e1 82%, #f2b632) border-box; }
.anime-card[data-rarity="mythic"] { border-color: transparent; background: linear-gradient(#1f1f36, #1f1f36) padding-box, linear-gradient(115deg, #ff7eb6, #ffd3b0 22%, #aaefe6 44%, #b2ebf8 66%, #d9ddfe 88%, #ff7eb6) border-box; }
.anime-card picture { justify-self: stretch; }
.anime-face { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; object-position: 50% 0; border-radius: 10px; background: #131426; }
.anime-card-name { padding: 0 4px; font-size: 1rem; font-weight: 800; line-height: 1.3; color: #f6f3ee; overflow-wrap: anywhere; }
.anime-card .rarity { margin: 0 4px; font-size: .8125rem; padding: 0 10px 0 8px; }
.anime-card-odds { padding: 0 4px; font-size: .8125rem; font-weight: 700; line-height: 1.4; color: #c4bfd2; font-variant-numeric: tabular-nums; }
.anime-cards + .note { margin-top: 16px; }

@media (min-width: 600px) {
  .anime-hero { grid-template-columns: 200px minmax(0, 1fr); column-gap: 32px; }
}
@media print {
  .anime-card { break-inside: avoid; }
  .anime-start { display: none; }
}
