.wardrobe-sprite {
  display: block;
  aspect-ratio: 3 / 4;
  background: url("/wardrobe-song.webp") var(--cell-x, left) var(--cell-y, top) / 200% 200% no-repeat;
}
.wardrobe-sprite:is([data-piece], [data-current]):is(
  [data-piece="biker"], [data-piece="shirt"], [data-piece="qipao"], [data-piece="ivory"],
  [data-current="biker"], [data-current="shirt"], [data-current="qipao"], [data-current="ivory"]
) { background-image: url("/wardrobe-looks.webp"); }
.wardrobe-sprite:is([data-piece="weekend"], [data-piece="evening"], [data-piece="shirt"], [data-piece="ivory"],
  [data-current="weekend"], [data-current="evening"], [data-current="shirt"], [data-current="ivory"]) { --cell-x: right; }
.wardrobe-sprite:is([data-piece="trench"], [data-piece="evening"], [data-piece="qipao"], [data-piece="ivory"],
  [data-current="trench"], [data-current="evening"], [data-current="qipao"], [data-current="ivory"]) { --cell-y: bottom; }
.wardrobe-portrait .wardrobe-sprite { position: absolute; inset: 0; }
[data-wardrobe-item="biker"] .wardrobe-thumb { background: #ecdcd4; }
[data-wardrobe-item="shirt"] .wardrobe-thumb { background: #dfe9f3; }
[data-wardrobe-item="qipao"] .wardrobe-thumb { background: #e0eadd; }
[data-wardrobe-item="ivory"] .wardrobe-thumb { background: #f6eedc; }

.wardrobe-object {
  display: block;
  aspect-ratio: var(--object-ratio);
  background: url("/wardrobe-pieces.webp") no-repeat;
}
.wardrobe-object:is([data-piece="top-handle"], [data-current="top-handle"]) {
  --object-ratio: 246 / 253;
  background-size: 509.76% 495.65%;
  background-position: 4.27% 6.49%;
}
.wardrobe-object:is([data-piece="tote"], [data-current="tote"]) {
  --object-ratio: 275 / 268;
  background-size: 456.00% 467.91%;
  background-position: 34.42% 4.97%;
}
.wardrobe-object:is([data-piece="crossbody"], [data-current="crossbody"]) {
  --object-ratio: 268 / 253;
  background-size: 467.91% 495.65%;
  background-position: 65.62% 6.29%;
}
.wardrobe-object:is([data-piece="clutch"], [data-current="clutch"]) {
  --object-ratio: 237 / 225;
  background-size: 529.11% 557.33%;
  background-position: 95.77% 8.55%;
}
.wardrobe-object:is([data-piece="pearl-clip"], [data-current="pearl-clip"]) {
  --object-ratio: 286 / 104;
  background-size: 438.46% 1205.77%;
  background-position: 2.07% 37.48%;
}
.wardrobe-object:is([data-piece="bow"], [data-current="bow"]) {
  --object-ratio: 262 / 211;
  background-size: 478.63% 594.31%;
  background-position: 34.17% 37.68%;
}
.wardrobe-object:is([data-piece="star-pin"], [data-current="star-pin"]) {
  --object-ratio: 267 / 137;
  background-size: 469.66% 915.33%;
  background-position: 66.06% 36.88%;
}
.wardrobe-object:is([data-piece="flower"], [data-current="flower"]) {
  --object-ratio: 265 / 193;
  background-size: 473.21% 649.74%;
  background-position: 97.17% 37.13%;
}
.wardrobe-object:is([data-piece="gold-round"], [data-current="gold-round"]) {
  --object-ratio: 289 / 113;
  background-size: 433.91% 1109.73%;
  background-position: 1.87% 62.58%;
}
.wardrobe-object:is([data-piece="cat-eye"], [data-current="cat-eye"]) {
  --object-ratio: 291 / 100;
  background-size: 430.93% 1254.00%;
  background-position: 34.27% 62.39%;
}
.wardrobe-object:is([data-piece="tortoise"], [data-current="tortoise"]) {
  --object-ratio: 288 / 104;
  background-size: 435.42% 1205.77%;
  background-position: 66.25% 62.52%;
}
.wardrobe-object:is([data-piece="shades"], [data-current="shades"]) {
  --object-ratio: 292 / 104;
  background-size: 429.45% 1205.77%;
  background-position: 98.34% 62.35%;
}
.wardrobe-object:is([data-piece="loafers"], [data-current="loafers"]) {
  --object-ratio: 272 / 194;
  background-size: 461.03% 646.39%;
  background-position: 3.77% 94.25%;
}
.wardrobe-object:is([data-piece="ballet"], [data-current="ballet"]) {
  --object-ratio: 269 / 200;
  background-size: 466.17% 627.00%;
  background-position: 34.62% 94.59%;
}
.wardrobe-object:is([data-piece="ankle-boots"], [data-current="ankle-boots"]) {
  --object-ratio: 242 / 238;
  background-size: 518.18% 526.89%;
  background-position: 65.42% 93.90%;
}
.wardrobe-object:is([data-piece="sneakers"], [data-current="sneakers"]) {
  --object-ratio: 272 / 203;
  background-size: 461.03% 617.73%;
  background-position: 97.15% 94.39%;
}
.wardrobe-thumb > .wardrobe-object { width: 75%; max-height: 77%; }
.wardrobe-thumb > .wardrobe-empty-choice {
  position: relative;
  width: 1.35rem;
  aspect-ratio: 1;
  border: 1px solid #a58c85;
  border-radius: 50%;
}
.wardrobe-empty-choice::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid #a58c85;
  transform: rotate(-45deg);
}

.wardrobe-portrait {
  --shoe-cut: 91.6%;
  --shoe-bottom: 5%;
  --shoe-width: 26%;
  --bag-y: 64%;
}
.wardrobe-portrait[data-outfit="weekend"], .wardrobe-portrait[data-outfit="evening"] {
  --shoe-width: 25%;
  --shoe-cut: 91.8%;
  --bag-y: 64.65%;
}
.wardrobe-portrait[data-outfit="trench"] { --shoe-cut: 91.1%; --shoe-bottom: 3.7%; }
.wardrobe-portrait[data-outfit="qipao"], .wardrobe-portrait[data-outfit="ivory"] {
  --shoe-cut: 92.2%; --shoe-width: 23%; --shoe-bottom: 4.3%; --bag-y: 65%;
}
.wardrobe-portrait[data-outfit="shirt"] { --shoe-width: 24.5%; }
.wardrobe-portrait[data-replace-shoes] [data-layer="outfit"] { clip-path: inset(0 0 calc(100% - var(--shoe-cut)) 0); }
.wardrobe-portrait > .wardrobe-object { position: absolute; pointer-events: none; }
.wardrobe-portrait [data-layer="bag"] {
  width: 23%;
  top: var(--bag-y);
  left: 69%;
  translate: -50% 0;
  rotate: -4deg;
  filter: drop-shadow(.04rem .09rem .09rem #442c312a);
}
.wardrobe-portrait [data-layer="bag"][data-current="clutch"] { width: 18%; }
.wardrobe-portrait [data-layer="bag"][data-current="tote"] { width: 27%; }
.wardrobe-portrait [data-layer="accessory"] {
  width: 14%;
  top: 19%;
  left: 65%;
  rotate: 28deg;
}
.wardrobe-portrait [data-layer="accessory"][data-current="bow"] { width: 17%; top: 16.5%; }
.wardrobe-portrait [data-layer="accessory"][data-current="flower"] { width: 13%; top: 18%; left: 66%; }
.wardrobe-portrait [data-layer="glasses"] {
  width: 29%;
  top: 28.8%;
  left: 50.9%;
  translate: -50% -50%;
  rotate: -11deg;
}
.wardrobe-portrait [data-layer="shoes"] {
  width: var(--shoe-width);
  height: 5.5%;
  left: 52.2%;
  bottom: var(--shoe-bottom);
  translate: -50% 0;
}
.wardrobe-portrait [data-layer="shoes"][data-current="ankle-boots"] { height: 8.4%; }