/* Studio Star: approved 1280 × 720 artwork mapped to the game's 960 × 540 stage. */
.studio-star {
  --studio-ink: #38271d;
  --studio-gold: #fff1b2;
  --studio-well: #2b231e;
  --studio-cream: #fff8e8;
  position: absolute;
  inset: 0;
  isolation: isolate;
  z-index: 5;
  overflow: hidden;
  pointer-events: auto;
  color: var(--studio-ink);
  background: #eeb77f url('../assets/wardrobe/studio-background.webp') center / cover no-repeat;
  font-family: Montserrat, system-ui, sans-serif;
}
.studio-star *, .studio-star *::before, .studio-star *::after { box-sizing: border-box; }
.studio-star button { margin: 0; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.studio-star button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 5px #47301e; }
.studio-star button:disabled { cursor: wait; }
.studio-character { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.studio-floor-shadow { position: absolute; left: 161px; top: 492px; width: 186px; height: 18px; border-radius: 50%; background: #70422233; filter: blur(5px); }
.studio-star.is-zoomed .studio-floor-shadow { display: none; }
.studio-back { position: absolute; left: 13.5px; top: 13.5px; width: 45px; height: 45px; padding: 0; border: 0; background: none; border-radius: 50%; }
.studio-back img { display: block; width: 100%; height: 100%; }
.studio-categories { position: absolute; left: 424.5px; top: 93px; width: 67.5px; height: 363px; display: flex; flex-direction: column; gap: 4.5px; z-index: 1; }
.studio-category { position: relative; flex: 0 0 48px; width: 67.5px; padding: 0; border: 1.5px solid #bc965e; border-radius: 25px 4px 4px 25px; color: #fff6df; background: linear-gradient(#59483c, #2d241f); box-shadow: 0 1.5px 3px #5a331e66, inset 0 1px 1px #fff4ce55; }
.studio-category img { position: absolute; left: 2px; top: 1px; width: 39px; height: 39px; }
.studio-category-name { position: absolute; left: 0; right: 12px; bottom: 1px; text-align: center; font-size: 7.5px; font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.studio-category-arrow { display: none; position: absolute; right: 11px; top: 12px; font-size: 22px; line-height: 1; }
.studio-category[aria-selected='true'] { color: var(--studio-ink); border-color: #fff1ad; background: linear-gradient(#fff3bd 0%, #e5c379 55%, #c49542 100%); box-shadow: inset 0 1px 2px #fffce0, 0 1px 4px #65401e99; }
.studio-category[aria-selected='true'] .studio-category-arrow { display: block; }
.studio-panel { position: absolute; left: 488.25px; top: 82.5px; width: 441.75px; height: 388.5px; display: flex; flex-direction: column; gap: 10.5px; padding: 11px 12px 12px; border: 5.25px solid transparent; border-radius: 19.5px; background: linear-gradient(#49392f, #271f1a) padding-box, linear-gradient(#fff5ca, #a47934 50%, #f8d77c) border-box; outline: 2px solid #38241d; box-shadow: inset 0 0 0 1px #fff4c4, 0 4.5px 10.5px #29181070; }
.studio-grid { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 142.5px; align-content: start; gap: 10.5px 12px; padding: 0 1px 3px; scrollbar-color: #bca16b #2c221c; scrollbar-width: thin; }
.studio-panel[data-category='skin'] .studio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 166px; }
.studio-tile { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 2.25px solid #fffaf0; border-radius: 13.5px; background: linear-gradient(#fffaf2, #dfd0bb); color: #3e3028; box-shadow: inset 0 0 0 1.5px #d2c4ae, 0 2.25px 1px #0005; text-align: center; }
.studio-tile::after { position: absolute; inset: 2px; border: 1px solid #fff; border-radius: 9px; pointer-events: none; content: ''; }
.studio-tile[aria-pressed='true'] { border-color: #fff2a9; background: linear-gradient(#fff9dd, #e6c67f); box-shadow: 0 0 0 1.5px #a77926, 0 2.25px 1px #0005, inset 0 0 0 1.5px #b0812f; }
.studio-tile[aria-pressed='true']::after { border-color: #b0812f; }
.studio-tile-image { display: block; position: absolute; top: 1px; left: 50%; width: 123px; height: 123px; object-fit: contain; transform: translateX(-50%); pointer-events: none; }
.studio-tile-name { position: absolute; left: 3px; right: 3px; bottom: 3px; display: flex; align-items: center; justify-content: center; min-height: 20px; padding: 3px 5px; border-radius: 0 0 8px 8px; background: #e6d9c5; font-size: 9.75px; font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.studio-tile[aria-pressed='true'] .studio-tile-name { background: #7d542d; color: #fff6ce; }
.studio-selected-mark { display: none; position: absolute; top: 3px; right: 3px; width: 27px; height: 27px; }
.studio-tile[aria-pressed='true'] .studio-selected-mark { display: block; }
.studio-tile.is-locked { cursor: not-allowed; }
.studio-tile.is-locked .studio-tile-image { opacity: 1; }
.studio-lock { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff4cf; background: #35281ee8; }
.studio-loan { position: absolute; left: 5px; top: 5px; padding: 3px 6px; border-radius: 6px; color: #fff7e2; background: #504035; font-size: 8px; font-weight: 700; }
.studio-no-item { position: absolute; inset: 0 0 25px; display: grid; place-items: center; color: #796955; }
.studio-panel[data-category='skin'] .studio-tile-image { top: 4px; width: 150px; height: 150px; }
.studio-panel:not([data-category='hair']):not([data-category='skin']) .studio-tile-image { width: 126px; height: 108px; top: 3px; }
.studio-panel:not([data-category='hair']):not([data-category='skin']) .studio-tile-name { min-height: 29px; font-size: 8.75px; }
.studio-extra-tabs { display: flex; flex: 0 0 31px; gap: 4px; min-width: 0; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; }
.studio-extra-tab { flex: 1 0 auto; min-width: 58px; padding: 4px 6px; border: 1px solid #af8a51; border-radius: 9px; background: #594638; color: #fff3db; font-size: 8.75px; font-weight: 700; white-space: nowrap; }
.studio-extra-tab[aria-selected='true'] { background: #ead098; color: #38271d; border-color: #fff1b9; }
.studio-colours { display: flex; align-items: center; flex: 0 0 52.5px; gap: 13.5px; padding: 3px 4px 0 5.25px; }
.studio-colour-label { flex: 0 0 72px; min-width: 72px; font-size: 11.25px; font-weight: 800; text-transform: uppercase; color: #f3e4c9; }
.studio-colour { position: relative; flex: 0 0 43.5px; height: 43.5px; display: grid; place-items: center; padding: 0; border: 3.75px solid #dfc891; border-radius: 50%; background: var(--swatch); color: #fff; box-shadow: 0 1.5px 2px #0009, inset 0 0 0 1px #3e2b1e; }
.studio-colour .ic { visibility: hidden; filter: drop-shadow(0 1px 1px #000); }
.studio-colour[aria-pressed='true'] { border-color: #f9e5a8; outline: 1px solid #fff8e9; }
.studio-colour[aria-pressed='true'] .ic { visibility: visible; }
.studio-pearl { display: grid; place-items: center; padding: 0; border: 1px solid #6b4b26; border-radius: 50%; background: radial-gradient(circle at 45% 37%, #fffef6 0 56%, #eee3bc 58% 68%, #c3a56a 76%, #f7e1a4 90%); box-shadow: 0 2.25px 3px #6d421c66; color: #30363a; }
.studio-zoom { position: absolute; left: 355.5px; top: 411px; width: 45.75px; height: 45.75px; }
.studio-zoom .studio-glyph { width: 20.25px; height: 20.25px; }
.studio-randomise { position: absolute; left: 339.75px; top: 459px; width: 75px; height: 60px; padding: 0; border: 0; background: none; color: #5b4b34; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.studio-randomise-face { flex: 0 0 39px; width: 39px; display: grid; place-items: center; border: .75px solid #b6a383; border-radius: 50%; background: #f2e8d2; box-shadow: inset 0 0 0 2px #fff9ec, 0 2px 2px #76533055; }
.studio-randomise-face .studio-glyph { width: 18px; height: 18px; }
.studio-randomise-label { font-size: 9px; line-height: 1.2; font-weight: 600; }
.studio-note { position: absolute; left: 484.5px; top: 498px; width: 247.5px; text-align: center; font-size: 9.75px; font-weight: 700; line-height: 1.3; color: #3c291f; }
.studio-done { position: absolute; left: 750.75px; top: 482.25px; width: 177px; height: 45px; padding: 0 23px; display: flex; align-items: center; justify-content: center; gap: 22px; border: 2.25px solid #fff4c7; border-radius: 24px; outline: 1.5px solid #60401d; background: linear-gradient(#fff9d8, #eacd83 38%, #c79e4c 80%, #b2873a); box-shadow: inset 0 0 0 1px #ae7a2f, inset 0 3px 4px #fffce6cc, 0 3px 2px #69421f66; color: #25180f; font-size: 15px; line-height: 1; font-weight: 900; text-transform: uppercase; }
.studio-done:disabled { opacity: .62; }
.studio-done .ic { width: 16.5px; height: 16.5px; }
.studio-status { position: absolute; left: 85px; top: 18px; max-width: 324px; min-height: 30px; padding: 8px 12px; border-radius: 12px; background: #fff8e9ee; box-shadow: 0 2px 6px #59372233; color: #49321f; font-size: 10.5px; line-height: 1.35; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.studio-retry { flex-shrink: 0; min-height: 34px; padding: 4px 8px; border: 1px solid #b58f50; border-radius: 8px; background: #f8e3b1; color: #3c291f; font-size: 10px; font-weight: 800; }
@media (hover: hover) {
  .studio-tile:not(.is-locked):hover { filter: brightness(1.035); }
  .studio-category:hover, .studio-extra-tab:hover { filter: brightness(1.1); }
  .studio-done:not(:disabled):hover { filter: brightness(1.06); }
}
.studio-star button:not(:disabled):active { filter: brightness(.96); }

/* Short landscape screens keep large controls by giving the inventory more vertical space. */
@media (max-height: 500px), (max-width: 900px) {
  .studio-categories { left: 393px; top: 14px; width: 82px; height: 504px; gap: 0; }
  .studio-category { flex-basis: 72px; width: 82px; border-radius: 36px 4px 4px 36px; }
  .studio-category img { left: 3px; top: 4px; width: 54px; height: 54px; }
  .studio-category-name { right: 18px; bottom: 2px; font-size: 10.5px; }
  .studio-category-arrow { right: 11px; top: 20px; }
  .studio-panel { left: 472px; top: 22px; width: 466px; height: 438px; padding: 12px 13px; gap: 12px; }
  .studio-grid { grid-auto-rows: 161px; gap: 12px; }
  .studio-panel[data-category='hair'] .studio-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .studio-panel[data-category='skin'] .studio-grid { grid-auto-rows: 195px; }
  .studio-tile-image { width: 143px; height: 143px; }
  .studio-tile-name { min-height: 27px; font-size: 12px; }
  .studio-panel:not([data-category='hair']):not([data-category='skin']) .studio-tile-image { width: 138px; height: 117px; }
  .studio-panel:not([data-category='hair']):not([data-category='skin']) .studio-tile-name { min-height: 35px; font-size: 11px; }
  .studio-panel[data-category='skin'] .studio-tile-image { top: 18px; width: 165px; height: 165px; }
  .studio-selected-mark { width: 34px; height: 34px; }
  .studio-colours { flex-basis: 72px; gap: 14px; justify-content: space-between; padding: 0; }
  .studio-colour-label { display: none; }
  .studio-colour { flex-basis: 72px; height: 72px; }
  .studio-colour .ic { width: 24px; height: 24px; }
  .studio-extra-tabs { flex-basis: 72px; gap: 7px; scrollbar-width: thin; scrollbar-color: #bca16b #2c221c; }
  .studio-extra-tab { flex-basis: 100px; font-size: 12px; }
  .studio-back { left: 13px; top: 13px; width: 72px; height: 72px; }
  .studio-zoom { left: 310px; top: 364px; width: 72px; height: 72px; }
  .studio-zoom .studio-glyph { width: 27px; height: 27px; }
  .studio-randomise { left: 304px; top: 442px; width: 84px; height: 88px; gap: 3px; }
  .studio-randomise-face { width: 72px; flex-basis: 72px; }
  .studio-randomise-face .studio-glyph { width: 26px; height: 26px; }
  .studio-randomise-label { font-size: 11px; }
  .studio-done { left: 748px; top: 466px; width: 188px; height: 72px; border-radius: 36px; font-size: 19px; }
  .studio-note { left: 475px; top: 496px; width: 257px; font-size: 12px; }
  .studio-status { top: 16px; left: 94px; max-width: 287px; font-size: 13px; }
  .studio-retry { min-height: 72px; font-size: 13px; }
  .studio-floor-shadow { left: 137px; }
}
