:root {
  --bg-canvas: #050707;
  --ink-primary: #f2f7f7;
  --ink-secondary: rgba(226, 238, 239, 0.72);
  --ink-muted: rgba(186, 209, 212, 0.56);
  --cyan-pulse: #55e6df;
  --cyan-glow: rgba(85, 230, 223, 0.34);
  --rose-rim: #ff6eb4;
  --glass-hero: linear-gradient(
    152deg,
    rgba(11, 20, 26, 0.76) 0%,
    rgba(6, 11, 15, 0.70) 64%,
    rgba(19, 11, 20, 0.72) 100%
  );
  --glass-rail: rgba(6, 11, 15, 0.52);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

button,
a {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan-pulse);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan-pulse);
  color: var(--bg-canvas);
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.15s ease;
}

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

/* =========================================================
   全屏主视觉舞台（左侧虹膜与脸颊心跳印记保持 100% 通透）
   ========================================================= */
.hero-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg-canvas);
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 34% center;
}

.hero-vignette-right {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(5, 7, 7, 0) 0%,
    rgba(5, 7, 7, 0) 50%,
    rgba(5, 7, 7, 0.24) 70%,
    rgba(5, 7, 7, 0.56) 100%
  );
}

.hero-vignette-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14vh;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 7, 0) 0%, rgba(5, 7, 7, 0.3) 100%);
}

/* =========================================================
   左上角极简品牌标识
   ========================================================= */
.site-header {
  position: fixed;
  top: 26px;
  left: 28px;
  z-index: 12;
  pointer-events: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.brand-mark__icon {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(85, 230, 223, 0.35));
}

.brand-mark__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.94);
}

/* =========================================================
   主舞台与右侧纵深退后平面
   ========================================================= */
.stage-layout {
  position: relative;
  z-index: 5;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 28px clamp(22px, 4vw, 60px);
}

.hero-clear-zone {
  flex: 1 1 auto;
}

.site-registration {
  position: relative;
  z-index: 5;
  padding: 0.5rem 1rem;
  text-align: center;
  background: rgba(5, 7, 7, 0.92);
}

.site-registration a {
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  text-underline-offset: 0.2em;
}

.menu-stage {
  flex: 0 0 auto;
  width: min(444px, 39vw);
  min-width: 0;
  perspective: 1380px;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

body.is-zen .menu-stage {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28px);
}

.menu-stack {
  /* The perspective container sits in front of its recessed controls. */
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transform-style: preserve-3d;
  transform-origin: right center;
  transform: rotateY(-10deg) rotateX(0.8deg);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-stack > * {
  pointer-events: auto;
}

/* =========================================================
   前景层：核心下载光学玻璃主平面
   ========================================================= */
.hero-download-plane {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 18px;
  background: var(--glass-hero);
  border: 1px solid var(--border-subtle);
  border-top-color: rgba(85, 230, 223, 0.44);
  border-right-color: rgba(255, 110, 180, 0.26);
  backdrop-filter: blur(22px) saturate(135%);
  box-shadow:
    -18px 22px 48px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateZ(14px);
}

.hero-download-plane__refraction {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 240px;
  height: 154px;
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
}

.hero-download-plane__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}

.channel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ink-muted);
}

.channel-dot[data-state="available"] {
  background: var(--cyan-pulse);
  box-shadow: 0 0 10px rgba(85, 230, 223, 0.85);
}

.channel-dot[data-state="pending"] {
  background: #e2b86b;
}

.channel-dot[data-state="error"] {
  background: #fb7185;
}

.subtle-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.subtle-link-btn:hover {
  color: #ffffff;
  border-color: rgba(85, 230, 223, 0.48);
  background: rgba(85, 230, 223, 0.08);
}

.subtle-link-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hero-download-plane__title {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: #ffffff;
}

.hero-download-plane__subtitle {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
}

/* 原创心跳脉搏分割线 */
.pulse-divider {
  position: relative;
  z-index: 1;
  height: 20px;
  margin: 14px 0 14px;
}

.pulse-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

.download-cta-wrap {
  position: relative;
  z-index: 1;
}

.download-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.download-cta__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.download-cta__label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.download-cta__detail {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0.86;
}

.download-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* 可下载状态：通透虹膜青高对比主行动 */
.download-cta.is-available {
  background: linear-gradient(135deg, #35ddd8 0%, #55e6df 58%, #88f5ef 100%);
  color: #031518;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(85, 230, 223, 0.34);
  cursor: pointer;
}

.download-cta.is-available .download-cta__icon {
  background: rgba(5, 7, 7, 0.88);
  color: var(--cyan-pulse);
}

.download-cta.is-available:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(85, 230, 223, 0.46);
}

/* 预发布态：克制、单一清晰的灰玻待开放状态 */
.download-cta.is-pending,
.download-cta.is-loading {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(236, 244, 245, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
  cursor: not-allowed;
}

.download-cta.is-pending .download-cta__icon,
.download-cta.is-loading .download-cta__icon {
  color: var(--ink-muted);
}

/* 读取失败重试态 */
.download-cta.is-error {
  background: rgba(159, 18, 57, 0.24);
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, 0.5);
  cursor: pointer;
}

.download-cta.is-error:hover {
  background: rgba(159, 18, 57, 0.36);
}

.hero-download-plane__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.quiet-action {
  padding: 2px 4px;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.quiet-action:hover {
  color: var(--cyan-pulse);
}

.quiet-sep {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}

/* =========================================================
   退后层：轻盈细线核心能力导航
   ========================================================= */
.capability-rail {
  display: flex;
  flex-direction: column;
  background: var(--glass-rail);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  box-shadow: -12px 16px 36px rgba(0, 0, 0, 0.42);
  transform: translateZ(-8px);
}

.rail-item {
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 18px 13px 20px;
  background: transparent;
  border: none;
  color: var(--ink-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, padding-left 0.18s ease;
}

.rail-item + .rail-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan-pulse), var(--rose-rim));
  opacity: 0.36;
  transition: opacity 0.16s ease, top 0.16s ease, bottom 0.16s ease;
}

.rail-item:hover {
  background: rgba(85, 230, 223, 0.07);
  padding-left: 24px;
}

.rail-item:hover::before {
  opacity: 1;
  top: 0;
  bottom: 0;
}

.rail-item__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rail-item__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.rail-item__desc {
  font-size: 12px;
  color: var(--ink-secondary);
}

.rail-item__arrow {
  font-size: 14px;
  color: var(--ink-muted);
  transition: transform 0.16s ease, color 0.16s ease;
}

.rail-item:hover .rail-item__arrow {
  color: var(--cyan-pulse);
  transform: translateX(3px);
}

/* =========================================================
   最退后层：轻量画面控制条
   ========================================================= */
.ambient-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  transform: translateZ(-16px);
}

.ambient-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(6, 11, 15, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.ambient-btn:hover {
  color: #ffffff;
  border-color: rgba(85, 230, 223, 0.45);
  background: rgba(85, 230, 223, 0.1);
}

.ambient-btn__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-pulse);
}

.ambient-btn[aria-pressed="false"] .ambient-btn__dot {
  background: var(--ink-muted);
}

/* 纯享模式恢复钮 */
.zen-restore-btn {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: rgba(8, 14, 18, 0.78);
  border: 1px solid rgba(85, 230, 223, 0.48);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48);
}

.zen-restore-btn:hover {
  background: var(--cyan-pulse);
  color: var(--bg-canvas);
}

.zen-restore-btn__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* =========================================================
   右侧克制详情抽屉（不遮挡左侧虹膜与心跳印记）
   ========================================================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(5, 7, 7, 0.24);
}

.detail-drawer {
  position: fixed;
  top: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: min(464px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  background: rgba(9, 15, 20, 0.92);
  border: 1px solid rgba(85, 230, 223, 0.3);
  border-top: 2px solid var(--cyan-pulse);
  backdrop-filter: blur(20px);
  box-shadow: -20px 22px 48px rgba(0, 0, 0, 0.62);
  color: var(--ink-primary);
}

.detail-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-drawer__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan-pulse);
}

.detail-drawer__title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.detail-drawer__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
}

.detail-drawer__close:hover {
  background: rgba(85, 230, 223, 0.16);
  border-color: var(--cyan-pulse);
}

.detail-drawer__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-tab {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-tab:hover {
  color: #ffffff;
  border-color: rgba(85, 230, 223, 0.45);
}

.drawer-tab[aria-selected="true"] {
  background: var(--cyan-pulse);
  border-color: var(--cyan-pulse);
  color: var(--bg-canvas);
  font-weight: 700;
}

.detail-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(232, 243, 244, 0.88);
}

.feature-article {
  width: min(100%, 33rem);
  margin-left: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--glass-hero), rgba(5, 7, 7, 0.8);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--cyan-pulse);
  backdrop-filter: blur(16px);
}

.feature-article h1 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.feature-article .drawer-list {
  margin: 1.25rem 0;
}

.feature-article .drawer-list__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.feature-article .drawer-list__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.feature-article footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.feature-article footer a {
  color: var(--cyan-pulse);
  text-underline-offset: 0.28em;
}

.drawer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-list__item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 2px solid var(--cyan-pulse);
}

.drawer-list__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.drawer-list__desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.hash-box {
  padding: 14px;
  background: rgba(5, 7, 7, 0.68);
  border: 1px solid rgba(85, 230, 223, 0.25);
}

.hash-box__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-pulse);
}

.hash-box__code {
  margin: 8px 0 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  color: #ffffff;
}

.hash-box__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-action-btn {
  padding: 8px 14px;
  background: var(--cyan-pulse);
  color: var(--bg-canvas);
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.verify-dropzone {
  position: relative;
  padding: 18px 14px;
  border: 1px dashed rgba(85, 230, 223, 0.45);
  background: rgba(85, 230, 223, 0.04);
  text-align: center;
  cursor: pointer;
}

.verify-dropzone.is-dragover {
  background: rgba(85, 230, 223, 0.14);
  border-style: solid;
}

.verify-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.verify-result {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  line-height: 1.55;
}

.verify-result.is-match {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  color: #d1fae5;
}

.verify-result.is-mismatch {
  border-color: #fb7185;
  background: rgba(225, 29, 72, 0.16);
  color: #ffe4e6;
}

/* =========================================================
   窄桌面与移动端适配：上方完整保留视频主视觉，下方平铺
   ========================================================= */
@media (max-width: 1180px) and (min-width: 960px) {
  .menu-stage {
    width: min(418px, 43vw);
  }
  .menu-stack {
    transform: rotateY(-7deg) rotateX(0.5deg);
  }
}

@media (max-width: 959px) {
  .hero-stage {
    position: relative;
    height: 41svh;
    min-height: 245px;
    max-height: 390px;
  }

  .hero-video {
    object-position: 36% 42%;
  }

  .hero-vignette-right {
    display: none;
  }

  .hero-vignette-bottom {
    height: 48%;
    background: linear-gradient(180deg, rgba(5, 7, 7, 0) 0%, rgba(5, 7, 7, 0.72) 72%, var(--bg-canvas) 100%);
  }

  .site-header {
    position: absolute;
    top: 14px;
    left: 16px;
  }

  .stage-layout {
    min-height: auto;
    display: block;
    padding: 0 14px 28px;
    margin-top: -20px;
  }

  .hero-clear-zone {
    display: none;
  }

  .menu-stage {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    perspective: none;
  }

  .menu-stack {
    transform: none;
    gap: 12px;
  }

  .hero-download-plane,
  .capability-rail,
  .ambient-controls {
    transform: none;
  }

  .hero-download-plane {
    padding: 20px 18px 16px;
  }

  .hero-download-plane__title {
    font-size: 27px;
  }

  .detail-drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 78svh;
  }
}

/* =========================================================
   动态减弱支持
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .menu-stack,
  .menu-stage,
  .hero-download-plane,
  .capability-rail,
  .ambient-controls,
  .rail-item,
  .download-cta,
  .skip-link {
    transition: none !important;
  }

  .menu-stack,
  .hero-download-plane,
  .capability-rail,
  .ambient-controls {
    transform: none;
  }

  .download-cta.is-available:hover,
  .rail-item:hover {
    transform: none;
    padding-left: 20px;
  }
}
