/* 渠道合作落地页：画廊编辑室。首屏左文案 + 右 DriftWall。
   渐变终点用 0 alpha，不用关键字插值。封面舞台暗化走 overlay，不用灰度滤镜。 */
:root {
  --paper: #fafafa;
  --ink: #18181b;
  --muted: #52525b;
  --accent: #b56e78;
  --line: #e4e4e7;
  --photo-bg: #18181b;
  --radius: 3px;
  --nav-h: 64px;
  --z-hero-ui: 3;
  --z-nav: 4;
  --z-scan: 20;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: only light;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
}

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

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  color: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-solid {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.btn-solid:hover {
  background: #ffffff;
  color: var(--ink);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-ink:hover {
  background: #27272a;
  color: var(--paper);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  color: var(--paper);
  background: var(--photo-bg);
}

.nav {
  position: relative;
  z-index: var(--z-nav);
  flex: 0 0 var(--nav-h);
  height: var(--nav-h);
  max-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 40px;
  overflow: hidden;
  background: transparent;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
  overflow: hidden;
}

.nav-anchors {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
}

.nav-anchors a,
.nav-login {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-anchors a:hover,
.nav-login:hover,
.brand:hover {
  color: var(--paper);
  text-decoration: underline;
}

.nav-login {
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: var(--paper);
}

.hero a:focus-visible,
.hero button:focus-visible,
.hero [tabindex="0"]:focus-visible {
  outline-color: var(--accent);
}

.hero-body {
  position: relative;
  z-index: var(--z-hero-ui);
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(22rem, 34rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 24px 36px;
  align-items: center;
  padding: 0 40px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  max-width: 34rem;
  min-width: min(100%, 22em);
  margin-left: 5vw;
  padding-left: 56px;
}

.hero-gallery {
  min-width: 0;
  min-height: 240px;
  width: 100%;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  background: #18181b;
}

.hero-gallery > [data-hero-gallery] {
  width: 100%;
  height: 100%;
  min-height: 240px;
  min-width: 0;
  flex: 1 1 auto;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  background: #18181b;
}

.hero-still {
  position: relative;
  overflow: hidden;
  background: #18181b;
}

.hero-still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-gallery img {
  max-width: none;
}

.hero-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: none;
  color: rgb(250 250 250 / 0.72);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.18;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  padding-bottom: 4px;
}

.lede {
  margin: 14px 0 28px;
  font-size: 1.02rem;
  color: rgb(250 250 250 / 0.78);
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-qr {
  margin: 28px 0 0;
  padding: 0;
  width: 128px;
  cursor: pointer;
}

.hero-qr img {
  width: 128px;
  height: 128px;
  border-radius: 0;
  background: var(--paper);
}

.shelf-section,
.path-section,
.rules-section,
.templates-section,
.faq-section,
.promote-section {
  scroll-margin-top: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 112px 40px 24px;
}

.shelf-section h2,
.path-section h2,
.rules-section h2,
.templates-section h2,
.faq-section h2,
.promote-copy h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-copy {
  margin: 0 0 48px;
  color: var(--muted);
  max-width: 28ch;
}

.shelf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 16px;
  align-items: start;
}

.tile {
  margin: 0;
  min-width: 0;
}

.shelf-note {
  margin: 0;
  max-width: 36ch;
}

.shelf-note h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.shelf-note p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.shelf-note p + p {
  margin-top: 18px;
}

.tile img,
.tile-ph,
.tile-skel {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 0;
  object-fit: cover;
  background: var(--photo-bg);
  box-shadow: none;
}

.tile:nth-child(6n+2) img,
.tile:nth-child(6n+5) img {
  aspect-ratio: 3 / 4;
}

.tile-name {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.tile-skel {
  background: linear-gradient(90deg, #ececee, #d4d4d8, #ececee);
  background-size: 200% 100%;
}

.shelf-empty {
  margin: 12px 0;
  color: var(--muted);
  grid-column: 1 / -1;
}

.path-list {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  max-width: 40rem;
}

.path-list li {
  padding: 0;
}

.path-list li + li {
  margin-top: 72px;
}

.path-list h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.path-list p {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
  font-size: 1.05rem;
}

.templates-section {
  padding-bottom: 8px;
}

.tpl-tabs {
  display: flex;
  align-items: stretch;
  gap: 28px;
  margin: 0 0 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tpl-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid rgb(24 24 27 / 0);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.tpl-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.tpl-tab:hover {
  color: var(--ink);
}

.tpl-stage {
  min-width: 0;
}

.tpl-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tpl-rail[hidden] {
  display: none !important;
}

.tpl-card {
  flex: 0 0 220px;
  width: 220px;
  margin: 0;
  scroll-snap-align: start;
  min-width: 0;
}

.tpl-card img,
.tpl-ph,
.tpl-skel {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--photo-bg);
}

.tpl-ph,
.tpl-skel {
  height: auto;
}

.tpl-skel {
  background: linear-gradient(90deg, #ececee, #d4d4d8, #ececee);
  background-size: 200% 100%;
}

.tpl-meta {
  padding-top: 10px;
}

.tpl-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tpl-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.tpl-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tpl-same {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.tpl-same:hover {
  background: #27272a;
  color: var(--paper);
}

.tpl-same:active {
  transform: scale(0.98);
}

.tpl-empty {
  margin: 12px 0;
  color: var(--muted);
}

.tpl-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.rules-section {
  padding-bottom: 32px;
}

.faq-list {
  margin: 28px 0 0;
  max-width: 42rem;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  color: var(--ink);
}

.faq-list details p {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 42ch;
}

.promote-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.95fr);
  gap: 36px 48px;
  align-items: center;
  padding-bottom: 48px;
}

.promote-copy h2 span {
  display: block;
}

.promote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.promote-stack {
  position: relative;
  min-height: 380px;
}

.promote-shot {
  position: absolute;
  width: min(46%, 200px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--photo-bg);
  box-shadow: 0 18px 40px rgb(24 24 27 / 0.22);
}

.promote-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.promote-shot:nth-child(1) {
  left: 4%;
  top: 16%;
  transform: rotate(-12deg);
  z-index: 2;
}

.promote-shot:nth-child(2) {
  left: 36%;
  top: 2%;
  transform: rotate(9deg);
  z-index: 3;
}

.promote-shot:nth-child(3) {
  left: 16%;
  top: 44%;
  transform: rotate(3deg);
  z-index: 4;
}

.promote-shot:nth-child(4) {
  left: 50%;
  top: 38%;
  transform: rotate(-8deg);
  z-index: 5;
}

.promote-shot:nth-child(5) {
  left: 68%;
  top: 12%;
  transform: rotate(13deg);
  z-index: 1;
}

.promote-shot[hidden] {
  display: none !important;
}

.rules-section ul {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  max-width: 42ch;
}

.rules-section li {
  padding: 14px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.rules-section li:first-child {
  border-top: 1px solid var(--line);
}

.foot {
  max-width: 1280px;
  margin: 96px auto 0;
  padding: 40px 40px 72px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.foot-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-slogan {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}

.foot-login {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.foot-login:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot-qr {
  margin: 0;
}

.foot-qr img {
  width: 96px;
  height: 96px;
  border-radius: 0;
  background: var(--paper);
  cursor: pointer;
}

.scan-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-scan);
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(24 24 27 / 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scan-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scan-layer[hidden] {
  display: none !important;
}

.scan-dialog {
  position: relative;
  width: min(100%, 320px);
  padding: 44px 28px 28px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.scan-code {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 0;
  background: #ffffff;
}

.scan-dialog p {
  margin: 14px 0 0;
  font-weight: 600;
}

.scan-fallback {
  margin: 24px 8px 8px;
  color: var(--ink);
}

.scan-close {
  position: absolute;
  top: 12px;
  right: 16px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.scan-close:hover {
  text-decoration: underline;
}

.noscript {
  padding: 16px 40px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .hero-body {
    align-items: center;
    padding: 0 40px;
  }

  .hero-copy {
    justify-content: center;
    margin-left: 5vw;
    padding-left: 56px;
  }

  .shelf-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 28px 48px;
  }

  .shelf-grid > .tile {
    grid-column: span 5;
  }

  .shelf-grid > .shelf-note {
    grid-column: span 7;
    padding-top: 8px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tile-skel,
  .tpl-skel {
    animation: shimmer 1.2s ease-in-out infinite;
  }

  .hero-copy {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .scan-layer {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .scan-dialog {
    transform: translateY(6px);
    transition: transform 0.2s ease;
  }

  .scan-layer.is-open .scan-dialog {
    transform: none;
  }

  @media (hover: hover) and (pointer: fine) {
    .tile img,
    .tpl-card img {
      transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .tile:hover img,
    .tpl-card:hover img {
      transform: scale(1.03);
    }
  }
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .nav-anchors {
    gap: 14px;
  }
}

@media (max-width: 767px) {
  .nav {
    padding: 0 20px;
    gap: 8px;
  }

  .nav-left {
    gap: 12px;
  }

  .nav-anchors {
    gap: 10px;
  }

  .nav-anchors a {
    font-size: 12px;
  }

  .hero-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 4px 20px 20px;
    align-items: stretch;
  }

  .hero-copy {
    max-width: none;
    margin-left: 12px;
    padding-left: 20px;
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: clamp(1.25rem, 5vw, 1.65rem);
  }

  .lede {
    font-size: clamp(0.78rem, 3.1vw, 1.02rem);
  }

  .hero-gallery {
    height: 100%;
    min-height: 280px;
  }

  .hero-qr {
    display: none;
  }

  .shelf-section,
  .path-section,
  .rules-section,
  .templates-section,
  .faq-section,
  .promote-section {
    padding: 72px 20px 16px;
  }

  .tpl-card {
    flex-basis: 168px;
    width: 168px;
  }

  .promote-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .promote-stack {
    min-height: 280px;
  }

  .path-list li + li {
    margin-top: 48px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    margin-top: 64px;
    padding: 32px 20px 56px;
  }
}

@media (max-width: 640px) {
  .nav-anchors {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-gallery {
    min-height: 280px;
  }
}

@media (max-height: 640px) {
  .hero-copy h1 {
    font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  }

  .lede {
    margin: 8px 0 16px;
  }

  .hero-gallery {
    min-height: 220px;
  }

  .hero-qr {
    margin-top: 16px;
    width: 96px;
  }

  .hero-qr img {
    width: 96px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-copy,
  .tile-skel,
  .tpl-skel {
    animation: none;
  }

  .tile img,
  .tile:hover img,
  .tpl-card img,
  .tpl-card:hover img {
    transform: none;
    transition: none;
  }

  .scan-layer,
  .scan-dialog,
  .btn,
  .tpl-same {
    transition: none;
  }

  .scan-dialog,
  .scan-layer.is-open .scan-dialog {
    transform: none;
  }
}
