.sa-live-character {
  color-scheme: normal;
  position: absolute;
  left: -12.516%;
  top: -12.209%;
  width: 125.156%;
  height: 124.306%;
  border: 0;
  background: transparent;
  pointer-events: none;
  opacity: 0;
}
.sa-ready .sa-live-character {
  opacity: 1;
}
.sa-ready .character-base,
.sa-ready .eye-aperture {
  visibility: hidden;
}
#saShop {
  width: min(1120px, 96vw);
  max-width: 96vw;
  height: min(850px, 92dvh);
  max-height: 92dvh;
  padding: 0;
  border: 1px solid #d9c8ad;
  border-radius: 22px;
  background: #f7f1e8;
  color: #48352d;
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
  box-shadow: 0 30px 120px #0008;
}
#saShop::backdrop {
  background: #100d0bb8;
  backdrop-filter: blur(5px);
}
#saShop button,
#saShop input {
  font: inherit;
}
#saShop button {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #d9cabb;
  background: #fffaf4;
  color: #67413a;
}
#saShop button:disabled {
  cursor: default;
  opacity: 0.48;
}
#saShop button:focus-visible,
#saShop input:focus-visible {
  outline: 3px solid #bd875b;
  outline-offset: 3px;
}
.sa-shop-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid #e0d3c1;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.sa-shop-header small {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #93775d;
}
.sa-shop-header h2 {
  margin: 2px 0;
  font:
    30px Georgia,
    "Songti SC",
    serif;
  letter-spacing: 3px;
}
.sa-shop-header p {
  margin: 0;
  color: #8c7565;
}
.sa-wallet {
  text-align: right;
  min-width: 140px;
}
.sa-wallet b {
  display: block;
  color: #8d493d;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}
.sa-wallet span {
  font-size: 11px;
  color: #9a7e68;
}
.sa-shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  padding: 24px 28px;
}
.sa-look {
  align-self: start;
  background: radial-gradient(circle at 50% 35%, #fff9ed, #e9ddce);
  border-radius: 110px 110px 15px 15px;
  overflow: hidden;
}
.sa-look iframe {
  color-scheme: normal;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 1120;
  border: 0;
  background: transparent;
  display: block;
}
.sa-look p {
  text-align: center;
  color: #937967;
  font-size: 12px;
  margin: 0 0 13px;
}
.sa-side details {
  font-size: 12px;
  margin: 18px 0;
  color: #8a705e;
}
.sa-side summary {
  cursor: pointer;
  color: #724c3c;
}
.sa-side ul {
  padding-left: 18px;
  line-height: 1.9;
}
.sa-shop-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 17px;
}
#saShop [aria-pressed="true"],
#saShop .sa-primary {
  background: #82483e;
  color: #fff7ea;
  border-color: #82483e;
}
.sa-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.sa-product {
  background: #fffcf7;
  border: 1px solid #e7dac9;
  border-radius: 14px;
  overflow: hidden;
  padding: 0 15px 15px;
}
.sa-product img {
  width: calc(100% + 30px);
  height: 170px;
  object-fit: cover;
  object-position: 50% 35%;
  margin: 0 -15px 10px;
  background: #eee4d8;
}
.sa-product h3 {
  font-size: 15px;
  margin: 0 0 2px;
  font-weight: 600;
}
.sa-product[data-kind="outfit"] img {
  height: auto;
  aspect-ratio: 4 / 5;
  object-position: center;
}
.sa-product[data-kind="accessory"] img {
  box-sizing: border-box;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 26px;
  background: radial-gradient(circle, #fffaf0, #ebdfcd);
}
.sa-no-accessory {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #947b68;
  font-size: 14px;
  background: radial-gradient(circle, #fffaf0, #ebdfcd);
  width: calc(100% + 30px);
  margin: 0 -15px 10px;
}
.sa-product p {
  font-size: 12px;
  color: #a28b78;
  margin: 0 0 9px;
}
.sa-price {
  font-size: 11px;
  color: #956e47;
}
.sa-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.sa-card-actions button {
  flex: 1;
  font-size: 12px !important;
  padding: 7px 5px !important;
}
#saMessage {
  min-height: 26px;
  margin: 8px 0 13px;
  color: #a3503b;
  font-size: 13px;
}
.sa-login {
  padding: 17px;
  border-radius: 12px;
  background: #eee4d8;
  margin-bottom: 16px;
}
.sa-login label {
  display: block;
  font-size: 12px;
  color: #816955;
  margin: 8px 0;
}
.sa-login input {
  color: #37271f;
  caret-color: #82483e;
  -webkit-text-fill-color: #37271f;
  color-scheme: light;
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  border: 1px solid #cdbda8;
  background: #fffbf5;
  box-sizing: border-box;
}
.sa-login input::placeholder {
  color: #806e61;
  opacity: 1;
}
.sa-login input:-webkit-autofill {
  -webkit-text-fill-color: #37271f;
  box-shadow: 0 0 0 1000px #fffbf5 inset;
}
.sa-login h3 {
  font-size: 14px;
  margin: 0;
}
.sa-login a {
  color: #82483e;
}
.sa-login [hidden] {
  display: none !important;
}
#saHistory {
  font-size: 11px;
  color: #947b66;
  max-height: 160px;
  overflow: auto;
  padding-left: 18px;
}
#saStudyStatus {
  font-size: 10px;
  color: #c6b08f;
  line-height: 1.5;
  margin-top: 8px;
}
#outfitSelect,
label[for="outfitSelect"] {
  display: none;
}
@media (max-width: 720px) {
  .sa-shop-header {
    position: relative;
    display: block;
    min-height: 142px;
    padding-right: 72px !important;
  }
  .sa-shop-header h2 {
    white-space: nowrap;
    letter-spacing: 1px;
    font-size: 23px !important;
  }
  .sa-shop-header small {
    letter-spacing: 0.1em;
    font-size: 9px;
    white-space: nowrap;
  }
  #saClose {
    position: absolute;
    right: 14px;
    top: 16px;
    padding: 6px !important;
    white-space: nowrap;
  }
  .sa-wallet {
    position: absolute;
    right: 18px;
    bottom: 12px;
  }
  #saAccountName {
    display: none;
  }
  #saShop {
    width: 96vw;
    height: 94dvh;
    max-height: 94dvh;
  }
  .sa-shop-header {
    padding: 18px;
  }
  .sa-shop-header h2 {
    font-size: 24px;
  }
  .sa-shop-header p {
    font-size: 11px;
  }
  .sa-shop-layout {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 12px;
  }
  .sa-side {
    display: block;
    gap: 14px;
  }
  .sa-look iframe {
    height: auto;
  }
  .sa-look {
    width: min(100%, 270px);
    margin: 0 auto;
  }
  .sa-look p {
    font-size: 10px;
  }
  .sa-side details {
    margin: 4px 0;
  }
  .sa-product-grid {
    gap: 10px;
  }
  .sa-product img {
    height: 150px;
  }
  .sa-product {
    padding: 0 10px 12px;
  }
  .sa-product img {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
  }
  .sa-wallet {
    min-width: 90px;
  }
  .sa-wallet b {
    font-size: 27px;
  }
  .sa-wallet #saAccountName {
    max-width: 140px;
    overflow-wrap: anywhere;
  }
  .sa-product h3 {
    font-size: 13px;
  }
  .sa-product p {
    font-size: 11px;
  }
}
.sa-welcome {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 34px 28px 24px;
  border: 1px solid #decab7;
  border-radius: 24px;
  background: radial-gradient(ellipse at top, #fff3d9, #fcf8f0 65%);
  color: #37271f;
  color-scheme: light;
  text-align: center;
  box-shadow: 0 24px 90px #140d184d;
}
.sa-welcome::backdrop {
  background: #1713209c;
  backdrop-filter: blur(5px);
}
.sa-welcome-eyebrow {
  color: #987253;
  letter-spacing: 0.16em;
  font-size: 10px;
}
.sa-welcome h2 {
  font-size: 23px;
  line-height: 1.45;
  margin: 15px 0;
  color: #51362e;
}
.sa-welcome-points {
  display: grid;
  margin: 12px auto 20px;
  color: #874b43;
}
.sa-welcome-points strong {
  font-size: 84px;
  line-height: 1.1;
  font-family: Georgia, serif;
  font-weight: 500;
}
.sa-welcome-points span {
  font-size: 13px;
  letter-spacing: 0.14em;
}
#saWelcomeDescription {
  font-size: 14px;
  line-height: 1.8;
  color: #675247;
}
.sa-welcome-note {
  font-size: 11px;
  color: #806e62;
}
#saWelcomeMessage {
  font-size: 13px;
  line-height: 1.6;
  color: #874b43;
}
.sa-welcome button {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border-radius: 12px;
}
#saWelcomeLater {
  color: #756357;
  background: transparent;
  border: none;
}
#saWelcomeClaim {
  border: 1px solid #75473f;
  background: #874b43;
  color: #fff9ed;
  font: inherit;
  cursor: pointer;
}
#saWelcomeClaim:disabled {
  opacity: 0.6;
  cursor: wait;
}
.sa-welcome button:focus-visible {
  outline: 3px solid #bd875b;
  outline-offset: 3px;
}
.sa-welcome-entry {
  width: 100%;
  padding: 13px;
  margin: 12px 0;
  border: 1px solid #dec3a7;
  border-radius: 12px;
  background: #fcf0d9;
  color: #75493b;
}
#saWelcomeEntry[hidden] {
  display: none;
}

/* The product list is the wardrobe's only scrolling region. */
#saShop { overflow: hidden; box-sizing: border-box; }
#saShop[open] { display: flex; flex-direction: column; }
#saShop * { box-sizing: border-box; }
.sa-shop-header { flex: none; align-items: center; }
.sa-shop-layout { flex: 1; min-height: 0; overflow: hidden; }
.sa-side { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.sa-look { flex: 0 1 auto; min-height: 0; width: 100%; }
.sa-look iframe { max-height: min(38dvh, 314px); object-fit: contain; }
.sa-fitting-info { color: #806657; font-size: 13px; }
.sa-fitting-info p { margin: 0 0 12px; }
.sa-collection { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sa-collection > :not(.sa-product-grid) { flex: none; }
#saMessage { margin: 0 0 10px; min-height: 22px; line-height: 1.5; }
.sa-shop-tabs { margin: 0 0 12px; }
.sa-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sa-filters label { display: grid; gap: 4px; font-size: 11px; color: #806657; min-width: 0; }
.sa-filters select { width: 100%; min-width: 0; margin: 0; font: inherit; font-size: 13px; color: #573d32; background: #fffcf7; border: 1px solid #d9cabb; border-radius: 8px; padding: 8px 5px; }
#saResultCount { margin: 6px 0; color: #806657; font-size: 11px; }
.sa-product-grid { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; align-content: start; grid-auto-rows: max-content; scrollbar-gutter: stable; padding: 2px 4px 14px 2px; }
.sa-product { flex: none; }
.sa-rarity { font-size: 12px; letter-spacing: 1px; color: #896240; margin: 0 0 7px; }
.sa-product[data-rarity="5"] .sa-rarity { color: #9b6325; }
.sa-product[data-rarity="6"] { border-color: #b48a61; background: linear-gradient(150deg, #fffcf7, #f1e8dc); box-shadow: inset 0 0 0 1px #e8d4b7; }
.sa-product[data-rarity="6"] .sa-rarity { color: #8b483d; }
.sa-ownership { display: block; font-size: 12px; color: #77533d; }
.sa-series { display: inline-block; margin: 4px 0 7px; padding: 2px 7px; border: 1px solid #d9c4a7; border-radius: 5px; color: #806449; background: #f6eddf; font-size: 10px; }
.sa-product .sa-acquisition { margin: 4px 0 0; color: #806657; }
.sa-empty { grid-column: 1 / -1; padding: 35px 12px; text-align: center; color: #806657; }
#saShop select:focus-visible, #saProducts:focus-visible { outline: 3px solid #bd875b; outline-offset: -3px; }
#saAccountPanel { box-sizing: border-box; width: min(480px, 94vw); max-height: 90dvh; overflow: auto; background: #f7f1e8; color: #48352d; border: 1px solid #d9c8ad; border-radius: 18px; padding: 22px; }
#saAccountPanel::backdrop { background: #100d0b99; backdrop-filter: blur(4px); }
#saAccountPanel button, #saAccountPanel input { font: inherit; }
#saAccountPanel button { cursor: pointer; border: 1px solid #d9cabb; border-radius: 9px; background: #fffaf4; color: #67413a; padding: 8px 14px; }
#saAccountPanel .sa-primary { background: #82483e; color: #fff7ea; }
#saAccountPanel [hidden] { display: none !important; }
#saAccountPanel details { margin: 16px 0; }
#saAccountMessage { color: #a3503b; font-size: 13px; }

@media (max-width: 720px) {
  #saShop { height: 96dvh; max-height: 96dvh; }
  .sa-shop-header { display: flex; min-height: 0; padding: 12px 56px 12px 14px !important; gap: 8px; }
  .sa-shop-header h2 { font-size: 20px !important; }
  .sa-shop-header small { font-size: 8px; }
  .sa-shop-header p { display: none; }
  .sa-wallet { position: static; margin-left: auto; min-width: 64px; }
  .sa-wallet b { font-size: 23px; }
  .sa-wallet span { font-size: 9px; }
  #saClose { right: 8px; top: 17px; }
  .sa-shop-layout { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
  .sa-side { flex: none; flex-direction: row; align-items: center; justify-content: center; gap: 20px; }
  .sa-look { flex: none; width: 115px; margin: 0; border-radius: 50px 50px 12px 12px; }
  .sa-look iframe { width: 115px; height: 128.8px; max-height: none; }
  .sa-look p { font-size: 10px; margin: 0 0 5px; }
  .sa-fitting-info { font-size: 11px; }
  .sa-fitting-info p { margin-bottom: 8px; }
  .sa-collection { flex: 1; }
  #saMessage { font-size: 11px; margin-bottom: 6px; }
  .sa-shop-tabs { gap: 6px; margin-bottom: 7px; }
  .sa-shop-tabs button { flex: 1; padding: 5px !important; }
  .sa-filters { gap: 6px; }
  .sa-filters label { gap: 2px; font-size: 10px; }
  .sa-filters select { font-size: 12px; padding: 6px 3px; }
  #saResultCount { margin: 4px 0; }
  .sa-product-grid { gap: 8px; }
  .sa-rarity { font-size: 10px; letter-spacing: 0; }
  .sa-no-accessory { width: calc(100% + 20px); margin-left: -10px; margin-right: -10px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .sa-shop-header { padding: 8px 18px; }
  .sa-shop-header p, .sa-shop-header small, #saAccountName { display: none; }
  .sa-shop-header h2 { font-size: 22px; }
  .sa-wallet b { font-size: 23px; }
  .sa-shop-layout { display: grid; grid-template-columns: 160px minmax(0, 1fr); padding: 10px; gap: 12px; }
  .sa-side { flex-direction: column; gap: 6px; justify-content: start; }
  .sa-look { width: 130px; }
  .sa-look iframe { width: 130px; height: 145.6px; max-height: none; }
  .sa-look p { margin: 0 0 4px; }
  .sa-fitting-info p { display: none; }
  #saMessage { margin-bottom: 4px; font-size: 11px; }
  .sa-shop-tabs { margin-bottom: 4px; gap: 6px; }
  .sa-shop-tabs button { padding: 4px 12px !important; }
  .sa-filters select { padding: 4px; }
  #saResultCount { margin: 3px 0; }
}
