:root {
  --phone-w: min(100vw, 430px);
  --menu-edge: clamp(22px, 6vw, 34px);
  --kai: "Kaiti SC", "Kaiti TC", "STKaiti", "KaiTi", "楷体", "华文楷体", serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #050505;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  background: #050505;
  font-family: var(--kai);
  letter-spacing: 0;
}

button,
a {
  font-family: inherit;
}

button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.phone-page {
  width: var(--phone-w);
  min-height: 100vh;
  position: relative;
  background: #111;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 22px 68px rgba(0,0,0,.62);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  height: 72px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: #101010;
  color: #f7ead2;
}

.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18);
}

.site-title {
  min-width: 0;
  line-height: 1.05;
  text-shadow: 0 1px 4px #000;
}

.site-title strong,
.site-title span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-title strong {
  font-size: 16px;
  color: #fff5df;
}

.site-title span {
  margin-top: 2px;
  font-size: 12px;
  color: #c9a66c;
}

.gold-button {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0 12px 2px;
  background-image: url("./assets/reserve-button.webp");
  background-size: 100% 100%;
  color: #4b2307;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.48), 0 -1px 0 rgba(83,37,4,.3);
}

.top-reserve {
  width: 96px;
  min-height: 36px;
  font-size: 16px;
}

.drawer {
  position: fixed;
  top: 82px;
  right: calc((100vw - var(--phone-w)) / 2 + var(--menu-edge));
  z-index: 59;
  width: 180px;
  max-height: calc(100vh - 96px);
  overflow: hidden;
  display: none;
  pointer-events: none;
}

.drawer.is-open {
  display: block;
  pointer-events: auto;
}

.drawer a {
  display: block;
  padding: 14px 18px;
  background: rgba(15, 14, 13, .96);
  border-bottom: 1px solid rgba(226, 177, 98, .28);
  color: #fff3d4;
  font-size: 18px;
  text-decoration: none;
}

.menu-float {
  position: fixed;
  right: calc((100vw - var(--phone-w)) / 2 + var(--menu-edge));
  top: 88px;
  z-index: 70;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.45));
}

.menu-float img {
  width: 100%;
  height: 100%;
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1179 / 2114;
  overflow: hidden;
  isolation: isolate;
}

.screen-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.game-logo {
  position: absolute;
  left: 5.5%;
  top: 7.4%;
  z-index: 12;
  width: 44%;
  max-width: 188px;
  transform: rotate(-5deg);
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.45));
}

.game-studio {
  position: absolute;
  left: 27%;
  top: 7.2%;
  z-index: 13;
  padding: 7px 8px 9px;
  background: #c71319;
  color: #fff6ef;
  writing-mode: vertical-rl;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
}

.age-badge {
  position: absolute;
  right: 5%;
  bottom: 35%;
  z-index: 20;
  width: 9.2%;
  min-width: 42px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.age-badge img {
  width: 100%;
  height: auto;
}

.hero-copy {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  top: 66%;
  z-index: 15;
  text-align: center;
}

.hero-slogan-art {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.58)) drop-shadow(0 8px 18px rgba(0,0,0,.9));
}

.feature-card h2 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 4px 0 rgba(0,0,0,.58), 0 8px 18px rgba(0,0,0,.9);
}

.hero-slogan {
  font-size: clamp(30px, 11.5vw, 54px);
}

.hero-subtitle {
  display: inline-block;
  margin: 8px 0 0;
  color: #f09b34;
  font-size: clamp(16px, 4.8vw, 24px);
  font-weight: 900;
  text-shadow: 0 3px 8px rgba(0,0,0,.85);
}

.reserve-row {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 80.5%;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5%;
}

.reserve-row .gold-button {
  min-height: 48px;
  font-size: clamp(17px, 5.2vw, 24px);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 4.4%;
  z-index: 20;
  width: 42px;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 0 rgba(0,0,0,.28));
}

.feature-carousel {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.brush-title {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 7.1%;
  z-index: 20;
  height: 7.4%;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, transparent 0%, #050505 13%, #050505 86%, transparent 100%);
  color: #e28d35;
  font-size: clamp(21px, 6.8vw, 32px);
  font-weight: 900;
  text-shadow: 0 2px 0 #000;
}

.brush-title::before,
.brush-title::after {
  content: "";
  position: absolute;
  inset: auto 1% 16% 1%;
  height: 27%;
  background: rgba(0,0,0,.9);
  transform: skewX(-18deg);
  z-index: -1;
}

.brush-title::after {
  inset: 18% 0 auto 0;
  transform: skewX(12deg);
}

.carousel-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  width: 500%;
  height: 100%;
  display: flex;
  transform: translateX(calc(var(--feature-index, 0) * -20%));
  transition: transform .34s ease;
}

.feature-card {
  position: relative;
  flex: 0 0 20%;
  width: 20%;
  height: 100%;
  overflow: hidden;
}

.feature-copy-art {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 17.6%;
  z-index: 18;
  width: 86%;
  height: auto;
  max-height: 13%;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.58)) drop-shadow(0 8px 18px rgba(0,0,0,.9));
}

.battle-frame {
  position: absolute;
  left: 2.3%;
  right: 2.3%;
  top: 28.8%;
  z-index: 14;
  aspect-ratio: 980 / 590;
  overflow: hidden;
  padding: 0;
}

.frame-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 101%;
  object-fit: fill;
}

.battle-frame::before {
  content: none;
}

.battle-art,
.portrait-art {
  position: absolute;
  z-index: 4;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.35));
}

.battle-art {
  left: 50%;
  top: 50%;
  width: 98%;
  height: 99%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
  z-index: 2;
}

.guanyu-line {
  width: 100%;
}

.zhangjiao-line {
  width: 100%;
}

.sunjian-line {
  width: 100%;
}

.lvbu-line {
  width: 100%;
}

.frame-bg {
  z-index: 3;
}

.portrait-art {
  width: 37%;
  opacity: .78;
  mix-blend-mode: multiply;
}

.portrait-left {
  left: 7%;
  bottom: 6%;
}

.portrait-right {
  right: 5%;
  bottom: 2%;
}

.feature-hero {
  position: absolute;
  z-index: 17;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,.62));
}

.feature-hero.xiahoudun {
  left: -31%;
  bottom: -5%;
  width: 137%;
}

.feature-hero.guanyu {
  left: -32%;
  bottom: -7%;
  width: 145%;
}

.feature-hero.zhangjiao {
  left: -17%;
  bottom: -3%;
  width: 127%;
}

.feature-hero.sunjian {
  bottom: -6%;
  width: 149%;
}

.feature-hero.lvbu {
  left: -20%;
  bottom: -6%;
  width: 151%;
}

.hero-name {
  position: absolute;
  right: 7.8%;
  bottom: 17.5%;
  z-index: 24;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.faction-badge {
  width: 30px;
  height: 30px;
}

.class-badge {
  width: 30px;
  height: 30px;
}

.arrow {
  position: absolute;
  z-index: 35;
  bottom: 21%;
  width: 36px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff2d0;
  font: 900 42px/1 Georgia, serif;
  text-shadow: 0 3px 0 #6b3309, 0 0 8px #000;
}

.arrow.left { left: 2%; }
.arrow.right { right: 2%; }

.big-icon {
  position: absolute;
  left: 50%;
  top: 12%;
  z-index: 12;
  width: 18%;
  border-radius: 18%;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.follow-grid {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 29.2%;
  z-index: 14;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12% 8%;
}

.panel-button {
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 0 8px 2px;
  background-image: url("./assets/social-button.webp");
  background-size: 100% 100%;
  color: #2d2016;
  font-size: clamp(16px, 4.8vw, 21px);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  white-space: nowrap;
}

.panel-button span {
  display: block;
  white-space: nowrap;
}

.legal {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 5.8%;
  z-index: 14;
  display: grid;
  gap: 5px;
  padding: 8px 12px 7px;
  color: rgb(255 248 231 / 82%);
  font-size: 8px;
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 2px 6px #000;
  background: linear-gradient(180deg, rgb(20 13 10 / 38%), rgb(15 10 8 / 76%));
  border-top: 1px solid rgb(205 162 91 / 30%);
  border-radius: 4px;
}

.footer-advice strong {
  display: inline-block;
  margin-bottom: 2px;
  color: #e8bd70;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.footer-advice p {
  margin: 0;
  color: rgb(255 249 235 / 88%);
  font-size: 8px;
  line-height: 1.45;
}

.footer-divider {
  width: min(100%, 320px);
  height: 1px;
  margin: 5px auto 4px;
  background: linear-gradient(90deg, transparent, rgb(221 176 101 / 58%), transparent);
}

.footer-licenses {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 8px;
  color: rgb(232 225 211 / 76%);
}

.footer-license-wide {
  grid-column: 1 / -1;
}

.footer-license-wide a,
.footer-license-wide a:link,
.footer-license-wide a:visited,
.footer-license-wide a:hover,
.footer-license-wide a:active {
  color: inherit;
  text-decoration: none !important;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-copyright {
  margin-top: 5px !important;
  padding-top: 5px;
  color: rgb(255 245 220 / 90%);
  font-weight: 700;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.footer-license-wide img {
  height: 1em;
  width: auto;
  vertical-align: middle;
}

.legal p {
  margin: 0;
}

.footer-copyright {
  margin-top: 5px !important;
  padding-top: 5px;
  color: rgb(255 245 220 / 90%);
  font-weight: 700;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(15,15,15,.94);
  color: #fff4ce;
  font: 16px/1.35 var(--kai);
  transform: translate(-50%, 140%);
  transition: transform .22s ease;
}

.toast.is-visible { transform: translate(-50%, 0); }

.launch-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 0;
}

.launch-modal[hidden] {
  display: none;
}

.launch-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
}

.launch-modal__panel {
  position: relative;
  width: min(100vw, var(--phone-w));
  height: min(100vh, 100svh);
  background: #111;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, .55);
}

.launch-modal__bg {
  position: absolute;
  inset: 0;
}

.launch-modal__bg-art,
.launch-modal__bg-shade {
  position: absolute;
  inset: 0;
}

.launch-modal__bg-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.launch-modal__bg-shade {
  background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.3) 14%, rgba(0,0,0,.74) 100%);
}

.launch-modal__middle-art {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 3;
  width: 176%;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.82));
}

.launch-modal__title-art {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 10%;
  z-index: 3;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.8));
}

.launch-modal__reward-strip {
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: 22%;
  z-index: 3;
}

.launch-modal__reward-strip-bg {
  width: 100%;
  height: auto;
}

.launch-modal__avatars {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  padding: 4% 6% 10%;
  transform: translateY(-5%);
}

.launch-modal__avatar {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,.6);
}

.launch-modal__avatar {
  position: relative;
  opacity: .42;
  filter: grayscale(1) brightness(.78);
  transition: opacity .2s ease, filter .2s ease;
}

.launch-modal__avatar.is-unlocked {
  opacity: 1;
  filter: none;
}

.launch-modal__avatar-ring {
  position: relative;
  z-index: 2;
  width: 78%;
  height: auto;
}

.launch-modal__avatar-head {
  position: absolute;
  left: 50%;
  top: 11%;
  z-index: 1;
  width: 57%;
  transform: translateX(-50%);
}

.launch-modal__avatar figcaption {
  position: absolute;
  left: 50%;
  bottom: -20%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.82), 0 0 2px rgba(0,0,0,.95);
}

.launch-modal__meta {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 6.2%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.launch-modal__count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding: 6px 12px;
  background: rgba(20, 10, 8, .36);
  color: #fff3d6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .65);
}

.launch-modal__count span {
  font-size: clamp(17px, 5vw, 24px);
  font-weight: 900;
}

.launch-modal__count strong {
  color: #ffb14f;
  font-size: clamp(28px, 8.6vw, 40px);
  font-style: italic;
}

.launch-modal__count em {
  font-style: normal;
  font-size: clamp(17px, 5vw, 24px);
  font-weight: 900;
}

.launch-modal__cta {
  width: min(52vw, 224px);
  min-height: 58px;
  font-size: clamp(20px, 6vw, 30px);
}

.launch-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 121;
  display: grid;
  place-items: center;
  padding: 0;
}

.wechat-modal[hidden] {
  display: none;
}

.wechat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
}

.wechat-modal__panel {
  position: relative;
  width: min(88vw, 360px);
  max-width: var(--phone-w);
  padding: 22px 18px 18px;
  background: #f7efe2;
  border: 4px solid #b58b4c;
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, .55);
}

.wechat-modal__qrcode {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.wechat-modal__close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 360px) {
  :root {
    --menu-edge: clamp(18px, 6vw, 22px);
  }

  .topbar {
    grid-template-columns: 36px minmax(0, 1fr) 88px;
    gap: 7px;
    padding-inline: 9px;
  }

  .app-icon {
    width: 36px;
    height: 36px;
  }

  .top-reserve {
    width: 88px;
    font-size: 15px;
  }

  .site-title strong { font-size: 15px; }
  .site-title span { font-size: 11px; }
  .panel-button { font-size: 14px; }
  .menu-float {
    top: 84px;
    width: 40px;
    height: 40px;
  }

  .launch-modal__count {
    gap: 8px;
  }

  .launch-modal__cta {
    width: min(58vw, 210px);
  }

  .launch-modal__avatar {
    font-size: 14px;
  }
}
