/* ---------- Linky's Closet (src/closet.js) */
.masc.head {
  aspect-ratio: 100/120;
}
.masc.head svg {
  overflow: hidden;
}
#closet .mapTitle {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: clamp(19px, 5.6vw, 24px);
  line-height: 1.05;
}
.htile i.clHead {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: visible;
}
.htile i.clHead .masc {
  --ms: 36px;
  margin-top: -2px;
}
.art .htile i.clHead svg {
  display: block;
}
.art .htile i.clHead {
  animation-delay: -2.7s;
}
.art .htile i.clHead .masc {
  --ms: 46px;
  width: 46px;
  margin-top: 2px;
}
@media (min-width: 1100px) and (min-height: 720px) {
  .art .htile i.clHead .masc {
    --ms: 56px;
    width: 56px;
  }
}
@media (max-height: 500px) {
  .art .htile i.clHead .masc {
    --ms: 36px;
    width: 36px;
  }
}
#closet {
  display: flex;
  flex-direction: column;
  padding-block: 12px 0;
}
.clWrap {
  flex: 1;
  min-height: 0;
  width: min(560px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}
.clStage {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mirror {
  position: relative;
  width: min(78%, 340px);
  height: clamp(190px, calc(40vh - 70px), 310px);
  padding: 10px;
  border-radius: 30px;
  background: linear-gradient(160deg, #ffe07a, #c98b17 45%, #ffd35a 70%, #b8770f);
  box-shadow:
    0 6px 0 #8a5608,
    0 14px 26px rgba(0, 0, 0, 0.35);
}
.mGlass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: radial-gradient(ellipse 80% 70% at 50% 38%, #4b2c68, #2a1846 78%);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9%;
}
.mGlass::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 5%;
  width: 7%;
  height: 46%;
  border-radius: 6px;
  background: linear-gradient(rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
  transform: skewX(-22deg);
  pointer-events: none;
}
/* a slow light sweep across the glass (behind Linky) */
.clShine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.clShine::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.075), transparent);
  transform: translateX(-130%) skewX(-12deg);
  animation: clShine 7s ease-in-out 1.2s infinite;
}
@keyframes clShine {
  0%,
  70% {
    transform: translateX(-130%) skewX(-12deg);
  }
  100% {
    transform: translateX(330%) skewX(-12deg);
  }
}
/* flat bulbs: a twinkle travels around the frame; .lit is the chase on a purchase or a new look */
.bulb {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff3c4;
  border: 1.5px solid #e8a500;
  animation: clBulb 2.4s ease-in-out var(--d, 0s) infinite;
  transition: transform 0.12s;
}
@keyframes clBulb {
  0%,
  100% {
    background: #fff3c4;
  }
  12% {
    background: #fff;
  }
  30% {
    background: #ffd98a;
  }
}
.bulb.lit {
  background: #fff;
  border-color: #ff9f1a;
  transform: scale(1.35);
  animation: none;
}
/* the round stage he stands on: a top face with a gold rim over a darker side band; the ring pops from its centre */
.clPed {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ms, 200px) * -0.07);
  width: calc(var(--ms, 200px) * 1.04);
  height: calc(var(--ms, 200px) * 0.26);
  transform: translateX(-50%);
  pointer-events: none;
}
.clPed::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 31%;
  bottom: 0;
  border-radius: 0 0 50% 50%/0 0 62% 62%;
  background: linear-gradient(#3e2468, #251341);
  border: 3px solid #2b1d3d;
  border-top: 0;
}
.clPed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, #8a63c6, #5b3796 75%);
  border: 3px solid #ffd35a;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}
.clRing {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 31%;
  width: 100%;
  height: 62%;
  border-radius: 50%;
  border: 4px solid #fff3c4;
  opacity: 0;
  transform: translate(-50%, -50%);
}
/* his speech bubble, top right of the glass, tail toward his face */
.clSay {
  position: absolute;
  z-index: 3;
  right: 5%;
  top: 5%;
  max-width: min(54%, 240px);
  margin: 0;
  padding: 8px 13px;
  border-radius: 16px;
  background: #fffaf1;
  color: var(--ink);
  font: 700 15px/1.2 var(--f-card);
  box-shadow:
    0 3px 0 #c9b79a,
    0 8px 18px rgba(0, 0, 0, 0.28);
  transform-origin: 15% 110%;
  pointer-events: none;
}
.clSay::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -9px;
  border: 9px solid transparent;
  border-bottom: 0;
  border-top-color: #fffaf1;
}
body.calm .bulb,
body.calm .clShine::after {
  animation: none;
}
.clMascBtn {
  position: relative;
  display: block;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.clMascBtn .masc {
  pointer-events: none;
  position: relative;
  z-index: 1;
}
.tryTag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ff4f7b;
  color: #fff;
  font: 800 12px/1 var(--f-card);
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 #b02750;
}
.clName {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  max-width: 92%;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 7, 28, 0.72);
  font: 700 14px/1.1 var(--f-card);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clName:empty {
  display: none;
}
.clCtl {
  width: min(94%, 400px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.clRound {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--c1), var(--c2));
  box-shadow:
    0 4px 0 var(--c3),
    0 8px 14px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}
.clRound:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--c3),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}
.clDanceB {
  --c1: #b48cff;
  --c2: #7646e0;
  --c3: #4f28a2;
  color: #fff;
}
.clDanceB svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
  filter: drop-shadow(0 2px 0 #2e1468);
}
.clRandB {
  --c1: #7cc8ff;
  --c2: #2f86e8;
  --c3: #1d5aa6;
}
.clRandB svg {
  width: 30px;
  height: 30px;
}
.clCta {
  flex: 1;
  min-width: 0;
  display: flex;
}
.clCta > * {
  flex: 1;
  min-width: 0;
}
.clBtn {
  min-height: 56px;
  padding: 0 12px;
  gap: 6px;
  font-size: 19px;
  white-space: nowrap;
}
.clBtn .coin {
  width: 24px;
  height: 24px;
  flex: none;
}
.clBtn svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.clBtn > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.clPill {
  min-height: 56px;
  padding: 8px 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 7, 28, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.16);
  font: 700 15px/1.15 var(--f-card);
  position: relative;
  overflow: hidden;
}
.clPill.ok {
  justify-content: center;
  background: rgba(40, 190, 110, 0.2);
  border-color: rgba(98, 221, 147, 0.6);
  font-size: 18px;
}
.clPill.ok svg {
  width: 24px;
  height: 24px;
  flex: none;
  background: #3fd67a;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid #fff;
}
.clPill .lk {
  width: 24px;
  height: 24px;
  flex: none;
}
.clPill .gl {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clPill b {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: #ffe9a0;
}
.clPill .pb {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
}
.clPill .pb i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffd35a, #ff8a3d);
}
/* the wardrobe panel: tabs, the collection bar and the grid on one card (a drawer sheet on phones) */
.clRight {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 10px 0;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 60%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
}
.clHd {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  font: 700 13px/1 var(--f-card);
  color: var(--txt2);
}
.clHd .hdBar {
  flex: 1;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25);
}
.clHd .hdBar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd35a, #ff8a3d);
  transition: width 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.clHd b {
  display: inline-block;
  color: #ffe9a0;
  font: 800 15px/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}
.clTabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.clTab {
  position: relative;
  height: 64px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font: 700 12px/1 var(--f-card);
  color: var(--txt);
  transition:
    transform 0.15s var(--spring),
    background 0.2s;
}
.clTab:active {
  transform: scale(0.93);
}
.clTab i {
  width: 30px;
  height: 30px;
}
.clTab i svg {
  width: 100%;
  height: 100%;
}
.clTab span {
  max-width: 100%;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clTab.on {
  background: #fffaf1;
  color: var(--ink);
  border-color: #fff;
  box-shadow: 0 4px 0 #c9b79a;
  transform: translateY(-2px);
}
.clTab .dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}
.clGrid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), var(--tile, minmax(0, 1fr)));
  grid-auto-rows: var(--tile, auto);
  justify-content: center;
  gap: 10px;
  scrollbar-width: thin;
  padding: 4px 2px max(16px, env(safe-area-inset-bottom, 0px));
  align-content: start;
  -webkit-overflow-scrolling: touch;
}
.clTile {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.15s var(--spring);
}
.clTile:active {
  transform: scale(0.93);
}
.clTile .tv {
  width: 76%;
  height: 76%;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: transform 0.18s var(--spring);
}
/* how rare it is: blue, purple, then amber with a slow sheen */
.clTile.t2 {
  background: linear-gradient(170deg, rgba(90, 169, 255, 0.26), rgba(90, 169, 255, 0.07));
  border-color: rgba(130, 195, 255, 0.34);
}
.clTile.t3 {
  background: linear-gradient(170deg, rgba(197, 139, 255, 0.28), rgba(197, 139, 255, 0.08));
  border-color: rgba(210, 170, 255, 0.38);
}
.clTile.t4 {
  background: linear-gradient(170deg, rgba(255, 180, 70, 0.3), rgba(255, 120, 60, 0.08));
  border-color: rgba(255, 205, 120, 0.48);
}
.clTile.t4::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.2) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: clSheen 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes clSheen {
  0%,
  72% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}
body.calm .clTile.t4::after {
  animation: none;
  opacity: 0;
}
@media (hover: hover) {
  .clTile:hover {
    transform: translateY(-3px);
  }
  .clTile:hover .tv {
    transform: scale(1.07);
  }
  .clTile:active {
    transform: scale(0.93);
  }
}
/* the buy button catches the eye with a light sweep (its box never moves) */
.clCta .btn.gold {
  overflow: hidden;
}
.clCta .btn.gold::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: clSheen 2.6s ease-in-out 0.4s infinite;
  pointer-events: none;
}
body.calm .clCta .btn.gold::after {
  animation: none;
  opacity: 0;
}
.clTile .tv > svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.clTile .tv .masc.head {
  --ms: 84%;
  width: 84%;
}
.clTile.sel {
  border-color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
}
.clTile.eq {
  border: 3px solid #ffd34d;
  background: linear-gradient(170deg, rgba(255, 211, 90, 0.22), rgba(255, 211, 90, 0.07));
}
.clTile.locked .tv {
  opacity: 0.6;
}
.clTile .chk {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3fd67a;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.clTile .chk svg {
  width: 17px;
  height: 17px;
}
.clTile .lk {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
}
.cst {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  font: 700 13px/1 var(--f-card);
  font-style: normal;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.cPrice {
  background: #2b1752;
  border: 2px solid #ffd34d;
  color: #ffe9a0;
}
.cPrice .coin {
  width: 17px;
  height: 17px;
}
.cProg {
  background: rgba(15, 7, 28, 0.88);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 3px 8px;
}
.newRib {
  position: absolute;
  top: 9px;
  left: -26px;
  width: 92px;
  padding: 3px 0;
  transform: rotate(-40deg);
  background: #ff4f7b;
  color: #fff;
  font: 800 10px/1 var(--f-card);
  font-style: normal;
  text-align: center;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 0 #b02750;
}
/* chip on the win sheet and the new-world sheet */
.clChip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px 8px 8px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 111, 168, 0.24), rgba(255, 201, 74, 0.2));
  border: 1px solid rgba(255, 201, 74, 0.55);
  text-align: left;
}
.clChip .cv {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(15, 7, 28, 0.5);
  display: grid;
  place-items: center;
}
.clChip .cv .tv {
  width: 88%;
  height: 88%;
  display: grid;
  place-items: center;
}
.clChip .cv .tv > svg {
  width: 100%;
  height: 100%;
}
.sheet .clChip .cv .masc.head {
  --ms: 44px;
  width: 44px;
  position: relative;
  left: auto;
  top: auto;
  margin: 0;
}
.clChip .ct {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.clChip .ct small {
  font: 700 11px/1 var(--f-card);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffd35a;
}
.clChip .ct b {
  font: 800 17px/1.1 var(--f-display);
}
.clChip .ct em {
  font-style: normal;
  color: var(--txt2);
  font-size: 14px;
}
.clChip .btn {
  flex: none;
}
/* Party Pack: the shop tile and the pack card */
/* parental gate */
@media (max-aspect-ratio: 5/4) and (max-height: 700px) {
  .clHd {
    display: none;
  }
}
/* landscape and PC: mirror column and wardrobe panel side by side, same height, centred as one block (clSize sizes the panel) */
@media (min-aspect-ratio: 5/4) {
  .clWrap {
    flex: 1 1 auto;
    max-height: 650px;
    margin-block: auto;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    width: min(1160px, 100%);
    gap: clamp(14px, 3vw, 40px);
    padding-block: 6px 14px;
  }
  .clStage {
    flex: 1 1 0;
    min-width: 0;
    max-width: 500px;
    justify-content: center;
  }
  .mirror {
    width: 100%;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
  }
  .clRight {
    flex: none;
    border-radius: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  }
  .clGrid {
    padding: 4px 2px;
  }
}
@media (min-aspect-ratio: 5/4) and (max-height: 480px) {
  .clWrap {
    padding-block: 4px 8px;
    gap: 12px;
  }
  .clStage {
    gap: 10px;
  }
  .clRight {
    padding: 8px;
    gap: 8px;
  }
  .clHd {
    display: none;
  }
  .clTab {
    height: 54px;
    gap: 2px;
  }
  .clTab i {
    width: 24px;
    height: 24px;
  }
  .clGrid {
    gap: 8px;
    align-content: start;
  }
}

/* optional art for the two shop offers (assets/game/pack-starter.webp, pack-party.webp, 384x384 transparent): used when the file loads, the built icons otherwise */

/* shop: title and coins on one line, tighter art, so the boosters already show under the fold */
.sheet.shop {
  padding-top: 16px;
  gap: 9px;
}
.sheet.shop h2 {
  text-align: left;
  min-height: 38px;
  display: flex;
  align-items: center;
}
.sheet.shop .sheetCoins {
  position: absolute;
  top: 16px;
  right: 60px;
  margin: 0;
}
.art .shop .pile {
  height: 50px;
}
.shop .pile .pk {
  height: 50px;
  width: 50px;
}
.shop .ptile {
  padding: 10px 6px 8px;
  gap: 5px;
}
/* End of css/closet.css */
