* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  background: #170707;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ffda95;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.nav-links {
  display: flex;
  gap: 12px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 40px;
  min-height: 44px;
  font-size: 10px;
  line-height: 16px;
  color: white;
  white-space: nowrap;
}
.nav-symbol {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.nav-item:hover {
  filter: brightness(1.2);
}
.distribution-error {
  position: fixed;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  z-index: 90;
  width: min(94%, 380px);
  padding: 8px 12px;
  border: 1px solid #bd8746;
  border-radius: 10px;
  background: #2a170ff5;
  color: #ffe1b0;
  font-size: 12px;
  text-align: center;
}
.distribution-error button {
  min-height: 32px;
  border: 0;
  background: none;
  color: #ffda95;
  text-decoration: underline;
  margin-left: 8px;
}
.distribution-toast {
  position: fixed;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: 90%;
  padding: 12px 20px;
  border-radius: 12px;
  background: #211810ed;
  color: #fff;
  font-size: 14px;
  text-align: center;
}
.distribution-browser-guide {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(90%, 380px);
  padding: 24px;
  border: 1px solid #c89752;
  border-radius: 16px;
  background: #321b12;
  color: #ffdda1;
  line-height: 1.7;
}
.distribution-browser-guide::backdrop {
  background: #0009;
}
.distribution-browser-guide h2 {
  font-size: 20px;
}
.distribution-close {
  float: right;
  border: 0;
  background: none;
  color: inherit;
  font-size: 28px;
  min-width: 40px;
  min-height: 40px;
}

body {
  color: #fff;
  background: #220708;
}
.page-wrapper {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(100%, 390px);
  /* Keep controls readable; compress artwork and spacing to fit the visible screen. */
  --layout-unit: clamp(
    0.25px,
    calc((100svh - var(--safe-area-top) - var(--safe-area-bottom) - 102px) / 742),
    1px
  );
  min-height: 100svh;
  margin: auto;
  padding-top: calc(64 * var(--layout-unit) + var(--safe-area-top));
  padding-bottom: calc(26 * var(--layout-unit) + var(--safe-area-bottom));
  overflow: hidden;
  background: #220708;
}
.page-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, #220708 61.315%, #881c2000 70.735%) 0 0/100% 844px no-repeat,
    url("../assets/design/landing-backdrop.webp") center top/100% auto no-repeat;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 9px 0 14px;
}
.logo img {
  display: block;
  width: 118px;
  height: 40px;
  object-fit: contain;
}
.hero-title {
  position: relative;
  margin: calc(45 * var(--layout-unit)) auto calc(26 * var(--layout-unit));
  width: calc(280 * var(--layout-unit));
  height: calc(143 * var(--layout-unit));
}
.hero-title img {
  display: block;
  object-fit: contain;
}
.hero-title img:first-child {
  width: 77.857%;
  height: auto;
  margin-left: 12.5%;
}
.hero-title img:last-child {
  width: 100%;
  height: auto;
  margin-top: calc(6 * var(--layout-unit));
}
.recommendations {
  position: relative;
  margin: 0 12px;
  padding: calc(55 * var(--layout-unit)) 12px calc(41 * var(--layout-unit));
  background: url("../assets/design/film-panel.svg") center/100% 100% no-repeat;
  display: grid;
  gap: calc(12 * var(--layout-unit));
}
.section-title {
  position: absolute;
  top: calc(-10 * var(--layout-unit));
  left: calc(50% - 7px);
  transform: translateX(-50%);
  width: calc(202 * var(--layout-unit));
  height: calc(50 * var(--layout-unit));
}
.film-art {
  position: absolute;
  left: 0;
  top: calc(7 * var(--layout-unit));
  width: calc(59 * var(--layout-unit));
  height: calc(38 * var(--layout-unit));
  transform: rotate(12.62deg) scaleX(-1);
  object-fit: contain;
}
.recommend-art {
  position: absolute;
  left: calc(43 * var(--layout-unit));
  top: calc(13 * var(--layout-unit));
  width: calc(166 * var(--layout-unit));
  height: calc(38 * var(--layout-unit));
  object-fit: contain;
}
.scroll-gallery {
  height: calc(148 * var(--layout-unit));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.scroll-gallery::-webkit-scrollbar {
  display: none;
}
.scroll-track {
  display: flex;
  position: relative;
  width: max-content;
  gap: 12px;
  height: 100%;
}
.gallery-item {
  position: relative;
  flex: 0 0 106px;
  width: 106px;
  height: 100%;
  border: 1px solid #e59f8b;
  border-radius: 10px;
  overflow: hidden;
  background: #260b08;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item img[src$="poster-5.webp"] {
  object-position: center top;
}
.gallery-item figcaption,
.distribution-version {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.gallery-item[data-loop-clone="true"] {
  pointer-events: none;
}
.download-section {
  display: flex;
  gap: 12px;
  margin-top: calc(4 * var(--layout-unit));
}
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #ffdda1, #e9ae30);
  color: #843700;
}
.btn-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.btn-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.btn-main {
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}
.btn-sub {
  font-size: 6px;
  line-height: 8px;
}
.download-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.6);
}
.download-btn:not(:disabled):active {
  transform: translateY(1px);
}
.slogan {
  text-align: center;
  margin-top: calc(18 * var(--layout-unit));
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 18px;
  letter-spacing: 10px;
  white-space: nowrap;
}
.slogan span {
  color: #fdd896;
}
@media (max-width: 389px) {
  .gallery-item {
    flex-basis: calc((100cqw - 72px) / 3);
    width: calc((100cqw - 72px) / 3);
    height: 100%;
  }
  .logo img {
    width: 106px;
    height: 36px;
  }
  .nav-links {
    gap: 8px;
  }
  .slogan {
    font-size: 18px;
    letter-spacing: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
