/* Card frames use the same purple as their caption, regardless of rarity. */
.card-frame { position: relative; isolation: isolate; }
.card-frame::after,
.character-related-art.card-frame::after {
  content: ''; position: absolute; z-index: 7; inset: 0;
  border: var(--card-outline-width, .125rem) solid var(--purple);
  border-image: none;
  border-radius: inherit;
  pointer-events: none;
}
.rarity-frame { border: var(--card-outline-width, .125rem) solid var(--purple); border-image: none; border-radius: var(--card-corner-radius, .375rem); }

/* Attribute and band circles share one dimension within each artwork size. */
.card-visual, .art-tile, .tile.song { --art-badge-size: 1.75rem; }
.card-thumb, .character-related-art { --art-badge-size: 1.375rem; }
body .art-tile .corner-attribute,
body .art-tile :is(.card-band-mark, .song-band-mark),
body .tile.song :is(.corner-attribute, .song-band-mark),
body .card-thumb .thumb-attribute,
body #cards .card-thumb .thumb-attribute,
body .character-related-art :is(.related-attribute, .related-band-mark) {
  position: absolute; z-index: 5; display: grid; place-items: center;
  width: var(--art-badge-size); height: var(--art-badge-size);
  padding: 0; border: 0; border-radius: 50%; box-shadow: none;
}
body :is(.card-visual, .art-tile, .tile.song) .corner-attribute,
body .card-thumb .thumb-attribute,
body .character-related-art .related-attribute { top: .25rem; left: .25rem; }
body :is(.art-tile, .tile.song) :is(.card-band-mark, .song-band-mark),
body .character-related-art .related-band-mark { bottom: .25rem; right: .25rem; }
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark) > img {
  display: block; width: 100%; height: 100%; padding: .125rem;
  aspect-ratio: 1; object-fit: contain; border: .0625rem solid #fff; border-radius: 50%;
  background: transparent;
}
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark).band-1 { background: #318fd0; }
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark).band-2 { background: #651a2e; }
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark).band-3 { background: #9a5962; }
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark).band-4 { background: #593178; }
body :is(.card-band-mark, .song-band-mark, .thumb-band-mark, .related-band-mark).band-5 { background: #76511c; }

/* Card names belong to the normal view, including touch and keyboard use. */
body[data-page="cards"] .card-hover-caption { opacity: 1; pointer-events: none; }
body[data-page="cards"] .card-hover-caption > strong { max-width: calc(100% - 1.75rem); }
