.gp-dialog {
  --gp-line: #73558c;
  --gp-edge: #bf78ff;
  --gp-aura: #9145e6;
  --gp-accent: #d6aaff;
  --gp-highlight: #efdeff;
  --gp-glow: #aa71e8;
  --gp-fill: #292035;
  --gp-deep: #110e17;
  --gp-ink: #1e1525;
  --gp-dim: #c2b8ca;
  --gp-limit: calc(100vh - 24px);
  --gp-limit: calc(
    100dvh - 24px - env(safe-area-inset-top, 0px) -
      env(safe-area-inset-bottom, 0px)
  );
  inset: 0;
  position: fixed;
  margin: auto;
  width: min(430px, calc(100vw - 26px));
  height: fit-content;
  max-width: none;
  max-height: var(--gp-limit);
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
  color: #f6efed;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.gp-dialog[data-tier="ember"] {
  --gp-line: #a44e3b;
  --gp-edge: #ff9654;
  --gp-aura: #f24729;
  --gp-accent: #ffb56e;
  --gp-highlight: #ffe7ae;
  --gp-glow: #ec6946;
  --gp-fill: #382324;
  --gp-deep: #170f10;
  --gp-ink: #311711;
  --gp-dim: #d2bfb7;
}
.gp-dialog::backdrop {
  background: rgba(8, 6, 11, 0.57);
  backdrop-filter: blur(0.65px);
}
.gp-card {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: var(--gp-limit);
  min-height: 0;
  border: 1px solid var(--gp-edge);
  outline: 1px solid #1c1024;
  background: var(--gp-deep);
  box-shadow:
    0 0 3px 1px var(--gp-edge),
    0 0 12px 1px color-mix(in srgb, var(--gp-aura), transparent 47%),
    0 0 30px 4px color-mix(in srgb, var(--gp-aura), transparent 76%),
    0 18px 95px 8px #000b;
}
.gp-card::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--gp-edge), transparent 28%);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--gp-aura), transparent 66%),
    inset 0 0 9px 1px color-mix(in srgb, var(--gp-aura), transparent 63%);
}
.gp-dialog[open] .gp-card {
  animation: gp-arrive 0.24s cubic-bezier(0.19, 0.8, 0.3, 1) both;
}
.gp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}
.gp-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gp-line) var(--gp-deep);
}
.gp-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 63% 37%, var(--gp-fill) 0 10%, transparent 71%),
    linear-gradient(170deg, #19131f, var(--gp-deep) 83%);
}
.gp-dialog[data-tier="ember"] .gp-showcase {
  background: radial-gradient(
    ellipse at 62% 40%,
    #4b2724 0%,
    #291a19 45%,
    var(--gp-deep) 82%
  );
}
.gp-scene {
  position: relative;
  width: 100%;
  height: 172px;
}
.gp-scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.gp-sky {
  opacity: 0.82;
}
.gp-dialog[open] .gp-art {
  animation: gp-draw 0.64s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.gp-caption {
  position: absolute;
  top: 17px;
  left: 22px;
  pointer-events: none;
}
.gp-rarity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 4px 7px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 1.4px;
  border: 1px solid var(--gp-line);
  background: var(--gp-deep);
  color: var(--gp-highlight);
}
.gp-rarity::before {
  content: "";
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--gp-highlight);
  background: var(--gp-glow);
  box-shadow: 0 0 6px var(--gp-glow);
}
.gp-nameplate {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 23px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--gp-line);
}
.gp-nameplate::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 27px;
  height: 3px;
  background: var(--gp-accent);
}
.gp-nameplate h2 {
  margin: 0;
  color: var(--gp-highlight);
  font: 850 clamp(25px, 7vw, 32px)/1.22 var(--serif, "Songti SC", serif);
  letter-spacing: 1.4px;
}
.gp-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.gp-score span {
  color: var(--gp-dim);
  font-size: 10px;
}
.gp-score b {
  font: 700 19px/1.1 var(--mono, monospace);
  color: #fff5df;
}
.gp-score em,
.gp-stat em {
  color: #b4d5a7;
  font:
    600 11px/1.2 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
}
.gp-score em:empty {
  display: none;
}
.gp-body {
  padding: 12px 23px 15px;
}
.gp-statlist {
  display: grid;
  gap: 0;
}
.gp-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 3px;
  column-gap: 9px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.42;
}
.gp-stat span {
  margin-right: auto;
  color: var(--gp-dim);
}
.gp-stat b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #faf0d9;
}
.gp-stat:first-child b {
  color: var(--gp-highlight);
}
.gp-proc {
  margin-top: 12px;
  padding: 9px 12px 10px;
  border-left: 2px solid var(--gp-accent);
  background: linear-gradient(100deg, var(--gp-fill), transparent 124%);
}
.gp-proc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.4;
  font-size: 15px;
  color: var(--gp-highlight);
}
.gp-proc-title i {
  font-style: normal;
  font-size: 16px;
  color: var(--gp-accent);
}
.gp-proc p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #e7dfe2;
}
.gp-inscription {
  margin: 11px 0 0;
  font: 500 12px/1.55 var(--serif, "Songti SC", serif);
  letter-spacing: 0.4px;
  color: var(--gp-dim);
}
.gp-actions {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(130px, 1.8fr);
  align-items: stretch;
  height: auto;
  min-height: 0;
  gap: 10px;
  padding: 13px 23px 15px;
  border-top: 1px solid var(--gp-fill);
  background: var(--gp-deep);
}
.gp-actions button {
  box-sizing: border-box;
  position: relative;
  min-height: 42px;
  margin: 0;
  border-radius: 0;
  padding: 7px 13px;
  font:
    650 14px/1.35 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    sans-serif;
  letter-spacing: 1px;
}
.gp-actions button:focus-visible {
  outline: 2px solid var(--gp-highlight);
  outline-offset: 2px;
}
.gp-later {
  color: #dfd7d6;
  border: 1px solid #595156;
  background: #221e22;
}
.gp-equip {
  border: 1px solid var(--gp-highlight);
  color: var(--gp-ink);
  background: linear-gradient(
    110deg,
    var(--gp-accent),
    var(--gp-highlight) 62%,
    var(--gp-accent)
  );
  box-shadow:
    inset 0 0 0 2px var(--gp-accent),
    inset 0 0 0 3px color-mix(in srgb, var(--gp-line), transparent 35%);
}
.gp-equip::before,
.gp-equip::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 10px 3px;
  background: var(--gp-line);
  transform: rotate(45deg);
}
.gp-actions button:active {
  filter: brightness(0.93);
}
@keyframes gp-arrive {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.986);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gp-draw {
  from {
    opacity: 0.5;
    transform: translate(-4px, 4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 390px) {
  .gp-caption {
    left: 17px;
  }
  .gp-nameplate {
    margin-inline: 18px;
  }
  .gp-body,
  .gp-actions {
    padding-inline: 18px;
  }
  .gp-scene {
    height: 150px;
  }
}
@media (max-height: 530px) and (min-width: 560px) {
  .gp-dialog {
    width: min(706px, calc(100vw - 36px));
  }
  .gp-scroll {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.14fr);
  }
  .gp-showcase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 24px 12px;
  }
  .gp-scene {
    height: 125px;
  }
  .gp-caption {
    top: 11px;
    left: 15px;
  }
  .gp-nameplate {
    margin-inline: 15px;
    padding-bottom: 8px;
    gap: 5px 8px;
  }
  .gp-nameplate h2 {
    font-size: 25px;
  }
  .gp-body {
    align-self: center;
    padding: 12px 16px;
  }
  .gp-stat {
    padding-block: 2px;
  }
  .gp-proc {
    margin-top: 7px;
  }
  .gp-actions {
    padding: 9px 16px;
    grid-template-columns: minmax(90px, 0.8fr) minmax(144px, 1.2fr);
    justify-content: stretch;
  }
  .gp-inscription {
    margin-top: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gp-dialog[open] .gp-card,
  .gp-dialog[open] .gp-art {
    animation: none;
  }
}
