.nav-left {
  display: flex;
  align-items: flex-end;
  align-items: end;
  justify-content: flex-start;
  --xhs-width:100%;
  width: 100%;
  min-width: 0;
}
.nav-left .illustrated-entry {
  --xhs-width:50%;
  width: 50%;
  min-width: 44px;
}
.nav-left .illustrated-entry img {
  --xhs-width:var(--xhs-local-66);
  width: var(--xhs-local-66);
  width: min(100%, 58px);
  --xhs-height:63px;
  height: 63px;
}
.nav-left .illustrated-entry b {
  font-size: 12px;
  padding: 3px 5px;
}
#gachaButton img {
  --xhs-transform:none;
  transform: none;
  --xhs-width:64px;
  width: 64px;
}
.nav-row {
  position: relative;
}
.nav-left #upgradeButton {
  position: absolute;
  left: calc(67% - 24px);
  bottom: calc(100% + 6px);
  --xhs-width:48px;
  width: 48px;
  --xhs-height:62px;
  height: 62px;
}
.nav-left #upgradeButton img {
  --xhs-width:48px;
  width: 48px;
  --xhs-height:46px;
  height: 46px;
}
.nav-left #upgradeButton b {
  font-size: 12px;
  padding: 2px 5px;
}
.gacha-modal {
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 8px;
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 8px;
  max-height: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  --xhs-row-gap:7px;
  --xhs-column-gap:7px;
  grid-gap: 7px;
  gap: 7px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 80% 10%,
      #ffe4ee,
      transparent 65%),
    #fff9ed;
  border: 2px solid #cba87d;
  border-radius: 25px;
  animation: gacha-enter .32s ease-out;
  isolation: isolate;
}
.gacha-modal button {
  color: #705549;
}
.gacha-header {
  display: grid;
  grid-template-columns: 40px 1fr;
  --xhs-row-gap:4px;
  --xhs-column-gap:8px;
  grid-gap: 4px 8px;
  gap: 4px 8px;
  align-items: center;
  flex: none;
}
.gacha-header .close-btn {
  grid-row: 1/3;
  --xhs-width:38px;
  width: 38px;
  --xhs-height:42px;
  height: 42px;
}
.gacha-header h2 {
  font-size: 17px;
  margin: 0;
  letter-spacing: .03em;
}
.gacha-wallet {
  display: flex;
  justify-content: flex-end;
  --xhs-row-gap:4px;
  --xhs-column-gap:4px;
  grid-gap: 4px;
  gap: 4px;
  min-width: 0;
}
.gacha-wallet span {
  display: flex;
  align-items: center;
  --xhs-row-gap:2px;
  --xhs-column-gap:2px;
  grid-gap: 2px;
  gap: 2px;
  font-size: 10px;
  min-width: 0;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
  background: #fffdf7;
  border: 1px solid #e7d5b3;
  border-radius: 12px;
  padding: 3px 5px;
}
.gacha-wallet img {
  --xhs-width:17px;
  width: 17px;
  --xhs-height:17px;
  height: 17px;
  object-fit: contain;
  flex: none;
}
.gacha-status {
  font-size: 10px;
  text-align: center;
  color: #846950;
  min-height: 13px;
}
.gacha-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.gacha-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px 7px;
  color: #967038;
}
.gacha-heading span {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
}
.gacha-heading small {
  font-size: 10px;
}
[data-quality=common] {
  --quality:#83a878;
  --wash:#f2f9ec;
}
[data-quality=fine] {
  --quality:#87afd2;
  --wash:#f0f7ff;
}
[data-quality=rare] {
  --quality:#b28ac9;
  --wash:#f6edff;
}
[data-quality=legendary] {
  --quality:#d0a458;
  --wash:#fff2cd;
}
.gacha-legends {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  padding: 3px 3px 9px;
}
.gacha-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 7px 5px 9px;
  border: 2px solid var(--quality);
  border-radius: 18px;
  background: linear-gradient(#fffefa, var(--wash));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--quality) 65%, white);
  overflow: hidden;
}
.gacha-card:active {
  --xhs-transform:scale(.97);
  transform: scale(.97);
}
.gacha-card b {
  font-size: 12px;
  line-height: 1.4;
}
.gacha-card small {
  font-size: 10px;
  margin-top: 3px;
}
.gacha-quality {
  align-self: flex-start;
  border: 1px solid var(--quality);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  color: #775937;
  background: #fff9e7;
}
.gacha-model {
  display: block;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:115px;
  height: 115px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.gacha-legend .gacha-model {
  --xhs-height:var(--xhs-math-21);
  height: var(--xhs-math-21);
  height: clamp(125px, 24dvh, 205px);
  filter: drop-shadow(0 8px 4px #a3763233);
}
.gacha-legend:before {
  content: "";
  position: absolute;
  top: 25px;
  right: 3px;
  bottom: 39px;
  left: 3px;
  top: 25px;
  right: 3px;
  bottom: 39px;
  left: 3px;
  background:
    radial-gradient(
      ellipse,
      #fffdf4 18%,
      #ffe8a978,
      transparent 70%);
}
.gacha-legend:after {
  content: "✦";
  position: absolute;
  right: 9px;
  top: 13px;
  color: #d8ae56;
  animation: gacha-star 3s ease-in-out infinite;
}
.gacha-legend b {
  background: linear-gradient(#fff4d0, #ebcd91);
  border: 1px solid #d9b473;
  border-radius: 50%;
  --xhs-width:100%;
  width: 100%;
  padding: 8px 1px;
  box-shadow: 0 3px 0 #caa464;
}
.gacha-pool h3 {
  font-size: 12px;
  color: #715a69;
  margin: 8px 3px;
}
.gacha-pool h3 small {
  float: right;
  font-size: 10px;
  font-weight: 400;
}
.gacha-rail {
  display: flex;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  overflow: auto;
  padding: 2px 3px 8px;
  scroll-snap-type: x proximity;
}
.gacha-rail .gacha-card {
  flex: 0 0 124px;
  scroll-snap-align: start;
}
.gacha-footer {
  flex: none;
  padding: 8px 0 0;
  border-top: 1px solid #e8ccae;
  background: #fff9ed;
}
.gacha-pity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  --xhs-row-gap:12px;
  --xhs-column-gap:12px;
  grid-gap: 12px;
  gap: 12px;
  font-size: 10px;
}
.gacha-pity span {
  display: flex;
  justify-content: space-between;
}
.gacha-pity progress {
  -webkit-appearance: none;
  appearance: none;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:7px;
  height: 7px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eee3da;
}
.gacha-pity progress::-webkit-progress-bar {
  background: #eee3da;
}
.gacha-pity progress::-webkit-progress-value {
  background: var(--quality);
}
.gacha-pity progress::-moz-progress-bar {
  background: var(--quality);
}
.gacha-draws {
  display: grid;
  grid-template-columns: 1fr 1fr;
  --xhs-row-gap:10px;
  --xhs-column-gap:10px;
  grid-gap: 10px;
  gap: 10px;
  margin-top: 9px;
}
.gacha-draw {
  --xhs-width:100%;
  width: 100%;
  min-height: 56px;
  border: 2px solid #c39a6e;
  border-radius: 16px;
  background: linear-gradient(#fff3cf, #f0cb86);
  box-shadow: 0 3px 0 #be8f5e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  --xhs-row-gap:4px;
  --xhs-column-gap:4px;
  grid-gap: 4px;
  gap: 4px;
  transition: transform .15s;
}
.gacha-draws > div:first-child .gacha-draw {
  background: linear-gradient(#fff9f5, #f7dee5);
  border-color: #d1a7b7;
  box-shadow: 0 3px 0 #c29aad;
}
.gacha-draw:active {
  --xhs-transform:translateY(3px) scale(.96);
  transform: translateY(3px) scale(.96);
}
.gacha-draw b {
  font-size: 15px;
}
.gacha-draw span {
  font-size: 11px;
}
.gacha-draw:disabled {
  filter: saturate(.35);
  opacity: .75;
  cursor: default;
}
.gacha-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  --xhs-row-gap:1px;
  --xhs-column-gap:1px;
  grid-gap: 1px;
  gap: 1px;
  font-size: 9px;
  min-height: 44px;
}
.gacha-under s {
  color: #9e8e82;
}
.gacha-info {
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  align-items: center;
  justify-items: center;
  place-items: center;
  padding: 0;
}
.gacha-info i {
  font-family: Georgia, serif;
  font-size: 12px;
  border: 1px solid #aa9280;
  border-radius: 50%;
  --xhs-width:17px;
  width: 17px;
  --xhs-height:17px;
  height: 17px;
  line-height: 16px;
}
.gacha-claim {
  display: block;
  margin: 5px auto 0;
  border: 1px solid #c8a264;
  border-radius: 12px;
  padding: 5px 12px;
  background: #fff0bf;
  font-size: 11px;
  min-height: 32px;
}
.gacha-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  padding: 12px;
  background: rgba(98, 78, 93, .46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.gacha-sheet {
  --xhs-width:100%;
  width: 100%;
  max-height: 100%;
  overflow: auto;
  padding: 14px;
  border: 2px solid #d3b18b;
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: 0 8px 25px rgba(89, 74, 98, .22);
  animation: gacha-enter .25s ease-out;
}
.gacha-sheet > header {
  position: sticky;
  top: -14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  background: #fffaf0;
  padding: 6px 0;
}
.gacha-sheet h3 {
  font-size: 16px;
  margin: 0;
}
.gacha-sheet h4 {
  font-size: 13px;
  margin: 15px 0 6px;
}
.gacha-sheet p {
  font-size: 12px;
  line-height: 1.7;
}
.gacha-rule {
  border-left: 3px solid var(--quality);
  padding-left: 9px;
}
.gacha-rule p {
  display: flex;
  justify-content: space-between;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  margin: 4px 0;
  font-size: 11px;
}
.gacha-sheet button:not(.close-btn) {
  min-height: 44px;
  border: 1px solid #c5a77d;
  border-radius: 12px;
  background: #fff0cf;
  padding: 7px 12px;
  font-size: 12px;
}
.gacha-sheet button:disabled {
  opacity: .55;
  cursor: default;
}
.gacha-detail {
  text-align: center;
  display: flex;
  flex-direction: column;
  --xhs-row-gap:12px;
  --xhs-column-gap:12px;
  grid-gap: 12px;
  gap: 12px;
}
.gacha-detail > .gacha-model {
  --xhs-height:var(--xhs-math-22);
  height: var(--xhs-math-22);
  height: min(37dvh, 300px);
}
.gacha-detail span {
  font-size: 12px;
}
.gacha-detail small {
  font-size: 10px;
}
.gacha-detail-actions {
  display: flex;
  justify-content: center;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.gacha-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  text-align: center;
}
.gacha-choice-grid > div {
  min-width: 0;
}
.gacha-choice-grid b {
  display: block;
  font-size: 12px;
  margin: 6px 0;
}
.gacha-choice-grid .gacha-model {
  --xhs-height:180px;
  height: 180px;
}
.gacha-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  --xhs-row-gap:7px;
  --xhs-column-gap:7px;
  grid-gap: 7px;
  gap: 7px;
  margin-top: 10px;
}
.gacha-results article {
  min-width: 0;
  text-align: center;
  padding: 5px;
  border: 2px solid var(--quality);
  border-radius: 12px;
  background: var(--wash);
  animation: gacha-reveal .5s backwards;
  animation-delay: var(--delay);
}
.gacha-results article[data-quality=legendary] {
  box-shadow: 0 0 14px rgba(223, 185, 84, .533);
}
.gacha-results .gacha-model {
  --xhs-height:94px;
  height: 94px;
}
.gacha-results b,
.gacha-results small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
}
.gacha-result-actions {
  position: sticky;
  bottom: -14px;
  background: #fffaf0;
  display: flex;
  --xhs-row-gap:10px;
  --xhs-column-gap:10px;
  grid-gap: 10px;
  gap: 10px;
  justify-content: center;
  padding: 10px 0;
}
.skip .gacha-results article {
  animation: none;
}
@keyframes gacha-enter {
  from {
    opacity: 0;
    --xhs-transform:translateY(22px) scale(.96);
    transform: translateY(22px) scale(.96);
  }
  to {
    opacity: 1;
    --xhs-transform:none;
    transform: none;
  }
}
@keyframes gacha-reveal {
  from {
    opacity: 0;
    --xhs-transform:translateY(15px) rotate(-4deg) scale(.8);
    transform: translateY(15px) rotate(-4deg) scale(.8);
  }
  to {
    opacity: 1;
    --xhs-transform:none;
    transform: none;
  }
}
@keyframes gacha-star {
  50% {
    opacity: .45;
    --xhs-transform:scale(.75) rotate(25deg);
    transform: scale(.75) rotate(25deg);
  }
}
@media (max-width: 360px) {
  .gacha-modal {
    top: 3px;
    right: 3px;
    bottom: 3px;
    left: 3px;
    top: 3px;
    right: 3px;
    bottom: 3px;
    left: 3px;
    padding: 9px;
  }
  .gacha-header h2 {
    font-size: 15px;
  }
  .gacha-wallet span {
    font-size: 9px;
    padding: 3px;
  }
  .gacha-under {
    font-size: 8px;
  }
  .gacha-draws {
    --xhs-row-gap:7px;
    --xhs-column-gap:7px;
    grid-gap: 7px;
    gap: 7px;
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .gacha-modal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .6fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    --xhs-row-gap:5px;
    --xhs-column-gap:12px;
    grid-gap: 5px 12px;
    gap: 5px 12px;
  }
  .gacha-header {
    grid-column: 1/-1;
    grid-template-columns: 40px 1fr auto;
  }
  .gacha-header .close-btn {
    grid-row: auto;
  }
  .gacha-status {
    grid-column: 1/-1;
  }
  .gacha-scroll {
    grid-column: 1;
    grid-row: 3;
  }
  .gacha-footer {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    border: 0;
    min-width: 0;
  }
  .gacha-legend .gacha-model {
    --xhs-height:115px;
    height: 115px;
  }
  .gacha-legends {
    --xhs-row-gap:5px;
    --xhs-column-gap:5px;
    grid-gap: 5px;
    gap: 5px;
  }
  .gacha-heading {
    display: none;
  }
  .gacha-card b {
    font-size: 10px;
  }
  .gacha-draws {
    --xhs-row-gap:5px;
    --xhs-column-gap:5px;
    grid-gap: 5px;
    gap: 5px;
  }
  .gacha-pity {
    --xhs-row-gap:8px;
    --xhs-column-gap:8px;
    grid-gap: 8px;
    gap: 8px;
  }
  .gacha-under {
    font-size: 8px;
  }
  .gacha-choice-grid .gacha-model {
    --xhs-height:120px;
    height: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gacha-modal,
  .gacha-sheet,
  .gacha-results article,
  .gacha-legend:after {
    animation: none;
  }
  .gacha-draw {
    transition: none;
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  body {
    display: block;
  }
  .desk-note {
    display: none;
  }
  .phone {
    --xhs-width:100vw;
    width: 100vw;
    --xhs-height:100vh;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .gacha-modal {
    inset: 5px var(--xhs-local-67) var(--xhs-local-68) var(--xhs-local-69);
    top: 5px;
    right: var(--xhs-local-67);
    bottom: var(--xhs-local-68);
    left: var(--xhs-local-69);
    inset: 5px max(8px, var(--safe-area-inset-right,env(safe-area-inset-right,0px))) max(5px, var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px))) max(8px, var(--safe-area-inset-left,env(safe-area-inset-left,0px)));
  }
  .gacha-header {
    padding-top: var(--safe-area-inset-top,0px);
    padding-top: var(--safe-area-inset-top,env(safe-area-inset-top,0px));
  }
  .gacha-legend .gacha-model {
    --xhs-height:112px;
    height: 112px;
  }
  .gacha-card {
    padding: 4px;
  }
  .gacha-legend b {
    padding: 5px 1px;
  }
}
.panda-walker[data-outfit=moonlight-ballet][data-pose=idle]:after {
  content: "✦";
  position: absolute;
  left: 80%;
  top: 0;
  color: #ceb9ee;
  font-size: 13px;
  pointer-events: none;
  animation: gacha-star 3s ease-in-out infinite;
}
.gacha-status:empty {
  display: none;
}
.legend-showcase {
  display: flex;
  flex-direction: column;
  justify-content: center;
  --xhs-row-gap:10px;
  --xhs-column-gap:10px;
  grid-gap: 10px;
  gap: 10px;
  background:
    radial-gradient(
      ellipse at 15% 45%,
      #e9d9f880,
      transparent 55%),
    radial-gradient(
      ellipse at 95% 45%,
      #f4cb9780,
      transparent 60%);
  border-radius: 18px;
}
.legend-showcase .gacha-heading {
  padding: 9px 8px 1px;
  flex: none;
}
.legend-showcase .gacha-heading > span {
  font-size: 15px;
  letter-spacing: .06em;
}
.legend-showcase .gacha-legends {
  align-items: center;
  padding: 3px 3px 7px;
  --xhs-row-gap:9px;
  --xhs-column-gap:9px;
  grid-gap: 9px;
  gap: 9px;
  margin: auto 0;
}
.legend-panel {
  min-width: 0;
  border: 2px solid #c7a46b;
  border-radius: 19px;
  overflow: hidden;
  background: #fff8e9;
  box-shadow: 0 4px 0 #dabf90, 0 9px 14px rgba(147, 116, 89, .125);
}
.legend-mage {
  border-color: #b09abf;
  background: #f6effa;
  box-shadow: 0 4px 0 #c4add0, 0 9px 14px rgba(134, 96, 152, .14);
}
.legend-art {
  display: block;
  position: relative;
  --xhs-width:100%;
  width: 100%;
  --xhs-aspect-ratio:3/4;
  aspect-ratio: 3/4;
  border: 0;
  padding: 0;
  background: #daccdf;
  isolation: isolate;
  overflow: hidden;
  touch-action: manipulation;
}
.legend-illustration {
  display: block;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform-origin: 50% 80%;
}
.legend-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #fff5c9;
  border: 1px solid #e7cc82;
  background: rgba(96, 74, 99, .49);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .08em;
}
.legend-dragon .legend-tag {
  background: rgba(110, 66, 30, .565);
}
.legend-interact-hint {
  position: absolute;
  bottom: 6px;
  left: 50%;
  --xhs-transform:translateX(-50%);
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(255, 248, 232, .87);
  border: 1px solid #ebd6a0;
  padding: 3px 6px;
  border-radius: 20px;
  font-size: 9px;
  color: #735146;
}
.legend-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  --xhs-row-gap:4px;
  --xhs-column-gap:4px;
  grid-gap: 4px;
  gap: 4px;
  padding: 10px 4px 5px;
  min-width: 0;
}
.legend-caption > b {
  font-size: 14px;
  color: #704c6e;
  line-height: 1.35;
}
.legend-dragon .legend-caption > b {
  color: #83552b;
}
.legend-caption > small {
  font-size: 10px;
  color: #917355;
}
.legend-caption > button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #73536f;
  font-size: 11px;
  padding: 4px 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.legend-stage-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  --xhs-row-gap:5px;
  --xhs-column-gap:5px;
  grid-gap: 5px;
  gap: 5px;
  padding: 3px 5px 9px;
  flex: none;
}
#legendResponse {
  font-size: 11px;
  line-height: 1.6;
  color: #987b80;
  text-align: center;
  min-height: 18px;
}
.legend-stage-bottom > button {
  min-height: 44px;
  border: 1px solid #cbb28f;
  border-radius: 24px;
  background: #fffaf0;
  padding: 6px 30px;
  font-size: 12px;
  box-shadow: 0 2px 0 #dfc9a8;
  color: #79614e;
}
.legend-fx {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}
.spell-star,
.sugar-pearl {
  position: absolute;
  left: 50%;
  top: 42%;
  display: block;
  animation: legend-particles 1.25s ease-out both;
  animation-delay: calc(var(--n)*25ms);
}
.spell-star {
  color: #fff4b6;
  font-size: 16px;
  text-shadow: 0 0 6px #ab80ff;
}
.sugar-pearl {
  --xhs-width:8px;
  width: 8px;
  --xhs-height:8px;
  height: 8px;
  border: 1px solid #dbae66;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 30% 25%,
      #b47646,
      #4b2819 60%);
  box-shadow: 0 0 6px #ffd99f;
}
.spell-ring {
  position: absolute;
  left: 17%;
  top: 35%;
  --xhs-width:66%;
  width: 66%;
  --xhs-aspect-ratio:1;
  aspect-ratio: 1;
  border: 2px solid #fff0b3;
  border-radius: 50%;
  box-shadow: 0 0 12px #dec3ff, inset 0 0 14px #dbc4fc;
  animation: spell-open 1.4s ease-out both;
}
.spell-ring:after {
  content: "✧";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  place-items: center;
  font-size: 50px;
  color: #fff1be;
  text-shadow: 0 0 12px #c9a0ff;
}
.dragon-wings {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:100%;
  height: 100%;
  fill: rgba(255, 230, 164, .2);
  stroke: #fff0ae;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px #ffc066);
  animation: dragon-flare 1.4s ease-out both;
  transform-origin: 50% 55%;
}
.legend-mage .is-awake .legend-illustration {
  animation: mage-awake 1.4s ease-in-out;
}
.legend-dragon .is-awake .legend-illustration {
  animation: knight-awake 1.4s ease-in-out;
}
@keyframes legend-particles {
  0% {
    opacity: 0;
    --xhs-transform:translate(0,10px) scale(.4);
    transform: translate(0, 10px) scale(.4);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    --xhs-transform:translate(var(--dx),var(--dy)) rotate(80deg) scale(.8);
    transform: translate(var(--dx), var(--dy)) rotate(80deg) scale(.8);
  }
}
@keyframes spell-open {
  0% {
    opacity: 0;
    --xhs-transform:scale(.35) rotate(-30deg);
    transform: scale(.35) rotate(-30deg);
  }
  35% {
    opacity: .95;
  }
  100% {
    opacity: 0;
    --xhs-transform:scale(1.5) rotate(65deg);
    transform: scale(1.5) rotate(65deg);
  }
}
@keyframes dragon-flare {
  0% {
    opacity: 0;
    --xhs-transform:scaleX(.45);
    transform: scaleX(.45);
  }
  40% {
    opacity: .9;
    --xhs-transform:scaleX(1.05);
    transform: scaleX(1.05);
  }
  100% {
    opacity: 0;
    --xhs-transform:scaleX(1.2);
    transform: scaleX(1.2);
  }
}
@keyframes mage-awake {
  45% {
    --xhs-transform:translateY(-4px) scale(1.035);
    transform: translateY(-4px) scale(1.035);
  }
}
@keyframes knight-awake {
  25% {
    --xhs-transform:scale(1.035) rotate(-1deg);
    transform: scale(1.035) rotate(-1deg);
  }
  65% {
    --xhs-transform:scale(1.02) rotate(1deg);
    transform: scale(1.02) rotate(1deg);
  }
}
@media (max-height: 680px) and (orientation: portrait) {
  .legend-showcase {
    --xhs-row-gap:3px;
    --xhs-column-gap:3px;
    grid-gap: 3px;
    gap: 3px;
  }
  .legend-showcase .gacha-heading {
    padding-top: 3px;
  }
  .legend-caption {
    padding: 5px 2px 1px;
    --xhs-row-gap:2px;
    --xhs-column-gap:2px;
    grid-gap: 2px;
    gap: 2px;
  }
  .legend-caption > b {
    font-size: 12px;
  }
  .legend-caption > button {
    min-height: 32px;
  }
  .legend-stage-bottom {
    padding-bottom: 0;
    --xhs-row-gap:0;
    --xhs-column-gap:0;
    grid-gap: 0;
    gap: 0;
  }
  #legendResponse {
    font-size: 9px;
  }
  .legend-stage-bottom > button {
    min-height: 38px;
  }
  .legend-art {
    --xhs-aspect-ratio:4/5;
    aspect-ratio: 4/5;
  }
}
@media (orientation: landscape) and (max-height: 540px) {
  .legend-showcase {
    --xhs-row-gap:3px;
    --xhs-column-gap:3px;
    grid-gap: 3px;
    gap: 3px;
  }
  .legend-showcase .gacha-legends {
    margin: 0;
    --xhs-row-gap:10px;
    --xhs-column-gap:10px;
    grid-gap: 10px;
    gap: 10px;
    align-items: stretch;
  }
  .legend-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(78px, .65fr);
    border-radius: 14px;
  }
  .legend-art {
    --xhs-aspect-ratio:3/4;
    aspect-ratio: 3/4;
  }
  .legend-caption {
    justify-content: center;
    padding: 3px;
  }
  .legend-caption > b {
    font-size: 11px;
  }
  .legend-caption > small {
    font-size: 9px;
  }
  .legend-interact-hint {
    font-size: 8px;
    padding: 2px;
  }
  .legend-stage-bottom {
    flex-direction: row;
    justify-content: space-between;
    --xhs-row-gap:8px;
    --xhs-column-gap:8px;
    grid-gap: 8px;
    gap: 8px;
    padding: 0 4px;
  }
  .legend-stage-bottom > button {
    min-height: 40px;
    padding: 5px 13px;
    white-space: nowrap;
  }
  #legendResponse {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-awake .legend-illustration,
  .spell-star,
  .sugar-pearl,
  .spell-ring,
  .dragon-wings {
    animation: none !important;
  }
  .legend-fx {
    opacity: .45;
  }
  .legend-panel:focus-within {
    outline: 2px solid #ba9c68;
    outline-offset: 2px;
  }
}
@media (max-height: 680px) and (orientation: portrait) {
  .legend-showcase .gacha-heading {
    display: none;
  }
}
