/* shop.css: retained cascade position */ /* Shop A: large artwork, one purchase/equip action and five portrait choices. */
body[data-screen='shop']:before {
  background: #0a111a var(--art-shop-background) center/cover no-repeat;
}
body[data-screen='shop']:after {
  background: linear-gradient(180deg, #02070c0a, #02070c0a 65%, #02070c55);
}
.screen-shop {
  --shop-margin: clamp(20px, 2.1vw, 44px);
}
.shop-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 106px;
  padding: 18px var(--shop-margin);
  background: none;
}
.shop-heading,
.shop-account {
  display: flex;
  align-items: center;
  gap: 26px;
}
.shop-heading h1 {
  font:
    700 clamp(30px, 3vw, 50px) / 1.3 'Noto Serif KR',
    Batang,
    serif;
  color: #f8e6bf;
  text-shadow: 0 2px 4px #000;
}
.shop-back {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  min-width: 145px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #262525, #080c10);
  border: 2px solid #bf9757;
  box-shadow:
    inset 0 0 0 3px #080c10,
    inset 0 0 0 4px #bf975766,
    0 3px 9px #0009;
  color: #f5dbab;
  font:
    700 20px 'Noto Serif KR',
    Batang,
    serif;
  border-radius: 3px;
}
.shop-back:after {
  content: '';
  position: absolute;
  left: calc(100% + 14px);
  height: 30px;
  width: 1px;
  background: #c49b66aa;
}
.shop-back .ui-icon {
  width: 30px;
  height: 30px;
}
.shop-account {
  --settings-size: 68px;
  --wallet-width: 230px;
  --coin-font: 34px;
  gap: 24px;
}
.shop-wallet .coin-illustrated {
  position: relative;
  isolation: isolate;
  width: var(--wallet-width);
  height: calc(var(--wallet-width) / 4);
  min-height: 0;
  padding: 0;
  border-radius: 999px;
}
.shop-wallet .coin-illustrated.art-ready {
  background: none;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 3px #0009);
}
.shop-account .lobby-tools {
  position: static;
}
.screen-shop #main {
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 0 var(--shop-margin) 14px;
}
.screen-shop #main > .banner {
  position: relative;
  z-index: 4;
  margin: 0 0 10px;
}
.shop-stage {
  display: grid;
  grid-template-columns: minmax(0, 59fr) minmax(0, 41fr);
  height: max(410px, calc(68dvh - 120px));
  min-width: 0;
}
.shop-figure {
  position: relative;
  min-width: 0;
  margin-top: -100px;
  overflow: clip;
  pointer-events: none;
}
.shop-preview-image {
  position: absolute;
  width: auto;
  height: 170%;
  max-width: none;
  left: 59%;
  top: 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 12px #0006);
}
.shop-figure > .image-fallback {
  position: absolute;
  inset: 25% 18%;
  display: grid;
  place-items: center;
  background: #131b25cf;
  border: 1px solid #8d7048;
  border-radius: 4px;
}
.shop-details {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 20px 20px 0;
  text-align: center;
  border-top: 1px solid #b89258a6;
  background: linear-gradient(90deg, transparent, #080c1099 12%, #080c1099 88%, transparent);
}
.shop-details:before,
.shop-details:after {
  content: '◇';
  position: absolute;
  top: -14px;
  color: #c6a368;
  font-size: 21px;
  line-height: 24px;
}
.shop-details:before {
  left: -7px;
}
.shop-details:after {
  right: -7px;
}
.shop-details h2 {
  font:
    700 clamp(34px, 4.2vw, 68px) / 1.35 'Noto Serif KR',
    Batang,
    serif;
  color: #f9e9c9;
  letter-spacing: 2px;
  text-shadow: 0 3px 5px #000;
}
.shop-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b89455 10%, #b89455 90%, transparent);
  margin: 20px 4% 16px;
}
.shop-divider:after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: #ead095;
  box-shadow: 0 0 0 4px #171513;
}
.shop-ownership {
  color: #e4d7bf;
  font-size: clamp(16px, 1.5vw, 23px);
  line-height: 1.5;
}
.shop-poses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 26px;
}
.shop-pose {
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  color: #c2bcae;
  font-size: clamp(13px, 1.3vw, 19px);
  min-height: 44px;
}
.shop-pose-picture {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.24;
  overflow: hidden;
  border: 1px solid #9d9274a3;
  border-radius: 4px;
  background: radial-gradient(ellipse at center, #35404b, #0e141c);
}
.shop-pose-art {
  position: absolute;
  width: 210%;
  max-width: none;
  height: auto;
  left: -55%;
  top: -3%;
  pointer-events: none;
}
.shop-pose[aria-pressed='true'] {
  color: #ffedc4;
}
.shop-pose[aria-pressed='true'] .shop-pose-picture {
  border: 2px solid #f2d18e;
  box-shadow:
    0 0 9px #d6ab5c66,
    inset 0 0 0 1px #ffdfae;
}
.shop-pose-picture .image-fallback {
  position: absolute;
  inset: 0;
  padding: 4px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.shop-action {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  min-height: 58px;
  aspect-ratio: 5/1;
  margin: 0 auto;
  padding: 10px 24px;
  border: 2px solid #bd9556;
  background: linear-gradient(130deg, #225153, #0c292d);
  color: #f8e7c3;
  font:
    700 clamp(22px, 2.7vw, 40px) / 1.3 'Noto Serif KR',
    Batang,
    serif;
  text-shadow: 0 2px 3px #000;
}
.shop-action > .button-art {
  display: none;
  position: absolute;
  pointer-events: none;
  max-width: none;
  z-index: -1;
  left: var(--shop-art-left, 0);
  top: var(--shop-art-top, -50%);
  width: var(--shop-art-width, 100%);
  height: var(--shop-art-height, 200%);
}
.shop-action.art-ready {
  border: 0;
  background: none;
  box-shadow: none;
}
.shop-action.art-ready > .button-art {
  display: block;
}
.shop-action {
  --shop-art-left: -1.4925373134%;
  --shop-art-top: -41.2213740458%;
  --shop-art-width: 102.8917910448%;
  --shop-art-height: 181.4249363868%;
}
.shop-action:disabled {
  opacity: 1;
  color: #b7b2a4;
}
.shop-action:disabled > .button-art {
  filter: saturate(0.18) brightness(0.65);
}
.shop-purchase-note {
  min-height: 26px;
  padding-top: 10px;
  font-size: 13px;
  color: #e8c394;
}
.shop-roster {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.shop-character-choice {
  position: relative;
  isolation: isolate;
  min-width: 0;
  height: clamp(170px, 27dvh, 286px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #aa874c;
  background: #0d151ee8;
  box-shadow:
    inset 0 0 0 3px #100f0e,
    inset 0 0 0 4px #a7864d55;
  text-align: center;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.shop-character-choice:before,
.shop-character-choice:after {
  content: '';
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-color: #e2bb75;
  border-style: double;
  pointer-events: none;
}
.shop-character-choice:before {
  top: 4px;
  left: 4px;
  border-width: 3px 0 0 3px;
}
.shop-character-choice:after {
  bottom: 4px;
  right: 4px;
  border-width: 0 3px 3px 0;
}
.shop-character-choice[aria-pressed='true'] {
  border-color: #ffe2a5;
  box-shadow:
    inset 0 0 0 2px #e8bd70,
    0 0 12px #e7b25d7a;
}
.shop-choice-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 0, #2e3b46, #0d151e);
}
.shop-choice-portrait .portrait-art {
  width: 220%;
  left: -65%;
  top: -4%;
  opacity: 1;
}
.shop-choice-portrait[data-character='black_fan_01'] .portrait-art {
  left: -62%;
  top: -2%;
}
.shop-choice-portrait[data-character='knight'] .portrait-art {
  left: -57%;
  top: -2%;
}
.shop-choice-portrait[data-character='mage'] .portrait-art {
  left: -65%;
  top: -4%;
}
.shop-choice-portrait[data-character='archer'] .portrait-art {
  left: -64%;
  top: -4%;
}
.shop-choice-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 30px 18px 14px;
  background: linear-gradient(transparent, #080c10e8 28%, #080c10 100%);
  z-index: 2;
}
.shop-choice-info strong {
  font:
    700 clamp(17px, 1.6vw, 25px) / 1.3 'Noto Serif KR',
    Batang,
    serif;
  color: #f6dfb5;
  white-space: nowrap;
  text-shadow: 0 2px 3px #000;
}
.shop-choice-state {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  font-size: clamp(11px, 1vw, 16px);
  line-height: 1.3;
  border: 1px solid #806238;
  background: #0c1015b8;
  border-radius: 2px;
  color: #e5d4b8;
}
.shop-choice-state.equipped {
  background: #174044b8;
  border-color: #a78348;
  color: #f0e2be;
}
.shop-choice-state .ui-icon {
  width: 18px;
  height: 18px;
  color: #d5ad5e;
}
.shop-note {
  text-align: center;
  font-size: 12px;
  color: #c1bbb0;
  padding: 12px 0 0;
  text-shadow: 0 1px 2px #000;
}
@media (min-width: 761px) and (max-height: 700px) {
  .shop-stage {
    height: 410px;
  }
  .shop-character-choice {
    height: 175px;
  }
}
@media (min-width: 1101px) and (max-height: 850px) {
  .shop-header {
    min-height: 84px;
    padding-block: 12px;
  }
  .shop-heading h1 {
    font-size: 38px;
  }
  .shop-account {
    --settings-size: 58px;
    --wallet-width: 210px;
    --coin-font: 30px;
  }
  .shop-stage {
    height: max(450px, calc(100dvh - 84px - 23dvh - 56px));
  }
  .shop-figure {
    margin-top: -78px;
  }
  .shop-details {
    padding-top: 12px;
  }
  .shop-details h2 {
    font-size: 40px;
  }
  .shop-ownership {
    font-size: 18px;
  }
  .shop-divider {
    margin: 12px 4% 10px;
  }
  .shop-poses {
    margin: 12px 0 16px;
  }
  .shop-pose {
    font-size: 16px;
  }
  .shop-pose-picture {
    aspect-ratio: auto;
    height: 70px;
  }
  .shop-action {
    width: min(90%, 400px);
    font-size: 28px;
  }
  .shop-character-choice {
    height: clamp(150px, 23dvh, 196px);
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .shop-header {
    min-height: 90px;
  }
  .shop-account {
    --wallet-width: 175px;
    --settings-size: 55px;
    --coin-font: 27px;
    gap: 18px;
  }
  .shop-back {
    min-width: 110px;
    font-size: 17px;
  }
  .shop-heading {
    gap: 22px;
  }
  .shop-stage {
    grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
    height: max(440px, calc(65dvh - 90px));
  }
  .shop-figure {
    margin-top: 0;
  }
  .shop-preview-image {
    left: 57%;
    height: 155%;
  }
  .shop-details {
    padding: 20px 10px 0;
  }
  .shop-details h2 {
    font-size: 36px;
  }
  .shop-poses {
    gap: 7px;
    margin: 22px 0;
  }
  .shop-pose {
    font-size: 14px;
  }
  .shop-roster {
    gap: 10px;
  }
  .shop-character-choice {
    height: 210px;
  }
  .shop-choice-info {
    padding: 26px 8px 12px;
  }
  .shop-choice-info strong {
    font-size: 17px;
  }
}
@media (max-width: 760px) {
  .screen-shop {
    --shop-margin: 16px;
  }
  .shop-header {
    min-height: 84px;
    gap: 10px;
    padding: 16px var(--shop-margin);
  }
  .shop-heading {
    gap: 12px;
  }
  .shop-heading h1 {
    font-size: 24px;
    white-space: nowrap;
  }
  .shop-back {
    min-width: 70px;
    min-height: 42px;
    padding: 6px 9px;
    gap: 4px;
    font-size: 14px;
  }
  .shop-back .ui-icon {
    width: 20px;
    height: 20px;
  }
  .shop-back:after {
    display: none;
  }
  .shop-account {
    --settings-size: 42px;
    --wallet-width: 104px;
    --coin-font: 20px;
    gap: 12px;
  }
  .screen-shop #main {
    display: flex;
    padding-bottom: 24px;
  }
  .shop-stage {
    display: contents;
  }
  .shop-figure {
    order: 2;
    height: 380px;
    margin: 14px 0 0;
    mask-image: linear-gradient(#000 90%, transparent);
  }
  .shop-preview-image {
    height: 157%;
    left: 50%;
    top: 0;
  }
  .shop-details {
    order: 3;
    width: 100%;
    padding: 20px 8px 0;
    margin-top: 0;
    background: linear-gradient(90deg, #060c1190, #080d13db, #060c1190);
  }
  .shop-details h2 {
    font-size: 34px;
    letter-spacing: 1px;
  }
  .shop-divider {
    margin: 15px 5% 12px;
  }
  .shop-ownership {
    font-size: 15px;
  }
  .shop-poses {
    gap: 10px;
    margin: 20px 0 24px;
  }
  .shop-pose {
    font-size: 14px;
  }
  .shop-action {
    width: 96%;
    min-height: 60px;
    font-size: 26px;
  }
  .shop-purchase-note {
    font-size: 12px;
    min-height: 30px;
    padding-top: 12px;
  }
  .shop-roster {
    order: 1;
    gap: 6px;
    margin-top: 4px;
  }
  .shop-character-choice {
    height: 111px;
  }
  .shop-character-choice:before,
  .shop-character-choice:after {
    width: 9px;
    height: 9px;
  }
  .shop-choice-info {
    padding: 20px 2px 5px;
    gap: 4px;
  }
  .shop-choice-info strong {
    font-family: 'Malgun Gothic', sans-serif;
    font-size: 10px;
    line-height: 1.4;
    white-space: normal;
    word-break: keep-all;
  }
  .shop-choice-state {
    min-height: 18px;
    font-size: 9px;
    border: 0;
    background: none;
  }
  .shop-choice-state.equipped {
    border: 0;
    background: none;
    color: #e9d29b;
  }
  .shop-choice-state .ui-icon {
    display: none;
  }
  .shop-choice-portrait .portrait-art {
    width: 240%;
    left: -75%;
  }
  .shop-choice-portrait[data-character='black_fan_01'] .portrait-art {
    left: -70%;
  }
  .shop-choice-portrait[data-character='knight'] .portrait-art {
    left: -65%;
  }
  .shop-choice-portrait[data-character='mage'] .portrait-art {
    left: -75%;
  }
  .shop-choice-portrait[data-character='archer'] .portrait-art {
    left: -72%;
  }
  .shop-note {
    order: 4;
    font-size: 11px;
    padding-top: 18px;
  }
  .screen-shop #main > .banner {
    order: 0;
    z-index: 5;
  }
}
@media (max-width: 370px) {
  .screen-shop {
    --shop-margin: 12px;
  }
  .shop-heading {
    gap: 9px;
  }
  .shop-heading h1 {
    font-size: 21px;
  }
  .shop-back {
    min-width: 62px;
    font-size: 12px;
    padding: 6px;
  }
  .shop-account {
    --wallet-width: 86px;
    --settings-size: 38px;
    --coin-font: 18px;
    gap: 10px;
  }
  .shop-header {
    gap: 8px;
  }
  .shop-character-choice {
    height: 104px;
  }
  .shop-figure {
    height: 335px;
  }
  .shop-choice-info strong {
    font-size: 9px;
  }
  .shop-roster {
    gap: 5px;
  }
}
