.bg-0{--ground:#fc58a4;--print:repeating-conic-gradient(from 15deg at 45% 70%,#ee257f 0 9deg,transparent 10deg 24deg)}
.bg-1{--ground:#56cbed;--print:repeating-linear-gradient(-40deg,transparent 0 12px,#218fcb 13px 17px)}
.bg-2{--ground:#ffe34a;--print:radial-gradient(#cf9018 22%,transparent 24%);--repeat:8px 8px}
.bg-3{--ground:#202644;--print:radial-gradient(#a2afff 14%,transparent 18%);--repeat:19px 17px}
.bg-4{--ground:#bdecb8;--print:repeating-conic-gradient(#7bceae 0 25%,transparent 0 50%);--repeat:28px 28px}
.bg-5{--ground:#f46c56;--print:repeating-linear-gradient(88deg,transparent 0 4px,#c73b44 5px 8px,transparent 9px 20px)}
.bg-6{--ground:#ff9d34;--print:repeating-radial-gradient(circle at 50% 100%,#ffe261 0 8px,transparent 9px 25px)}
.bg-7{--ground:#9673c7;--print:repeating-linear-gradient(28deg,#bda1e4 0 7px,transparent 7px 20px)}
.portrait-skin,.swatch i,.fitting{background-color:var(--ground);background-image:var(--print);background-size:var(--repeat,cover)}
.comic-skin{background-color:var(--ground);background-image:var(--figure),var(--print);background-repeat:no-repeat,repeat;background-size:auto 98%,var(--repeat,cover);background-position:center bottom,center}
.hero.comic-skin{background-size:auto 100%,var(--repeat,cover);background-position:65% bottom,center}
.tile.comic-skin:first-child,.boardchamp.comic-skin{background-size:auto 139%,var(--repeat,cover);background-position:center 12%,center}
.mini.comic-skin{background-size:auto 95%,var(--repeat,cover);background-position:center top,center}
.dress{background:#f0d0ec}.closet{padding:12px 16px}.fitting-title{padding:12px 16px;background:#fff2cd;border-bottom:3px solid}.fitting-title h1{font-size:36px;margin-top:4px}
.fitting{position:relative;isolation:isolate;height:180px;border-bottom:3px solid;overflow:hidden}.neutral-stage{background-color:#f4e5bb;background-image:radial-gradient(#d7c69e 1px,transparent 1px);background-size:5px 5px}
.fitting img{position:absolute;height:100%;right:3%;bottom:0;width:66%;object-fit:contain;object-position:center bottom}.nameplate{position:absolute;bottom:13px;left:12px;transform:rotate(-3deg);background:var(--yellow);border:2px solid;padding:5px 9px;box-shadow:3px 3px var(--ink)}.nameplate small,.nameplate b{display:block}.nameplate small{font:750 11px ui-monospace,monospace}.nameplate b{font:italic 950 31px/.95 Impact,system-ui;text-transform:uppercase}
.cast-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.cast-tile,.swatch{border:2px solid var(--ink);background:#fffaf0;padding:0;position:relative;text-align:left}.cast-tile img{display:block;height:72px;width:100%;object-fit:contain}.cast-tile b,.swatch b{display:block;border-top:1px solid;padding:3px 5px;font:850 12px system-ui}.chosen{outline:3px solid #b01a73;outline-offset:-3px}.chosen b{background:var(--yellow)}.arrow{min-width:40px;min-height:36px;background:var(--yellow);border:2px solid;font-weight:950}.swatches{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.swatch i{height:43px;display:block}.swatch b{font-size:10px}.text-button{background:none;text-decoration:underline;min-height:38px}.closet .play{width:100%}

/* The moving print and the character use separate layers. Labels stay still. */
.comic-skin,.fitting:not(.neutral-stage){isolation:isolate;overflow:hidden}
.comic-skin{position:relative;background:var(--ground)}
.fitting:not(.neutral-stage){background-image:none}
.comic-skin::before,.fitting:not(.neutral-stage)::before{
 content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;
 background:var(--print);background-size:var(--repeat,cover);
}
.comic-skin::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--figure) center bottom/auto 98% no-repeat}
.hero.comic-skin::after{background-position:65% bottom;background-size:auto 100%}
.tile.comic-skin:first-child::after,.boardchamp.comic-skin::after{background-size:auto 139%;background-position:center 12%}
.mini.comic-skin::after{background-size:auto 95%;background-position:center top}
/* The ray angle and ring phase move the print without moving its center. */
@property --ray-angle{syntax:"<angle>";inherits:false;initial-value:15deg}
@property --ring-phase{syntax:"<length>";inherits:false;initial-value:0px}
.bg-0{--drift:print-turn;--cycle:2.8s}
.bg-1{--drift:print-diagonal;--cycle:1.5s}
.bg-2{--drift:print-dots;--cycle:2.1s}
.bg-3{--drift:print-night;--cycle:3.5s}
.bg-4{--drift:print-check;--cycle:3s}
.bg-5{--drift:print-slide;--cycle:1.25s}
.bg-6{--drift:print-sun;--cycle:2s}
.bg-7{--drift:print-haze;--cycle:2.3s}

@media(prefers-reduced-motion:no-preference){
 :is(.comic-skin,.fitting):not(.neutral-stage)::before{
  animation:var(--drift) var(--cycle) linear infinite;
 }
 .mini.comic-skin::before{animation-duration:calc(var(--cycle) * 2.4)}
 :is(.mini,.tile):nth-child(even)::before{animation-delay:-.8s}
 .bg-0:is(.comic-skin,.fitting)::before{
  background-image:repeating-conic-gradient(from var(--ray-angle) at 45% 70%,#ee257f 0 9deg,transparent 10deg 24deg);
 }
 :is(.bg-1,.bg-2,.bg-5,.bg-7):is(.comic-skin,.fitting)::before{inset:-24px}
 .bg-3:is(.comic-skin,.fitting)::before{
  /* Split the original 19 × 17 dot lattice into its even and odd rows. */
  --dot-row:radial-gradient(ellipse 13.435px 12.021px at center,#a2afff 14%,transparent 18%);
  background-image:var(--dot-row),var(--dot-row);background-size:19px 34px;
 }
 .bg-6:is(.comic-skin,.fitting)::before{
  background-image:repeating-radial-gradient(circle at 50% 100%,#ffe261 var(--ring-phase) calc(var(--ring-phase) + 8px),transparent calc(var(--ring-phase) + 9px) calc(var(--ring-phase) + 25px));
 }
 /* Each scroll ends exactly one repeat from where it started. Diagonal
    distances follow the normal to the stripes. Red moves horizontally. */
 @keyframes print-turn{from{--ray-angle:15deg}to{--ray-angle:39deg}}
 @keyframes print-diagonal{to{transform:translate(-10.928px,-13.023px)}}
 @keyframes print-dots{
  0%,35%,72%,100%{transform:translate(0,0)}
  44%,61%{transform:translate(1.8px,-1px)}
  52%,67%{transform:translate(-1.8px,1px)}
 }
 @keyframes print-night{
  from{background-position:0 -8.5px,0 8.5px}
  to{background-position:19px -8.5px,-19px 8.5px}
 }
 @keyframes print-check{to{background-position:28px 28px}}
 @keyframes print-slide{to{transform:translateX(20.012px)}}
 @keyframes print-sun{from{--ring-phase:-25px}to{--ring-phase:0px}}
 @keyframes print-haze{to{transform:translate(9.389px,-17.659px)}}
}

/* Narrow frames keep a clear sight line between the face and score placard. */
.tile.comic-skin:not(:first-child)::after{background-position:16% bottom}
.comic.cast-size-2 .tile.comic-skin:nth-child(2)::after{background-position:36% bottom}
