/* ============================================================
   Apple-like — 设计令牌 & 基础
   ============================================================ */

/* 注册自定义属性为颜色，使机身换色能被 CSS 平滑插值（Chromium/Safari/新版 Firefox） */
@property --dev-frame {
  syntax: "<color>";
  inherits: true;
  initial-value: #8f8f94;
}
@property --dev-frame-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #d6d6d8;
}
@property --dev-screen-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #1b2a6b;
}
@property --dev-screen-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #7b2ff7;
}
@property --dev-screen-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #f45d9c;
}

:root {
  --font-sans: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;

  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #fafafa;
  --dark: #000000;
  --dark-3: #161617;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --hairline: rgba(0, 0, 0, 0.12);
  --hairline-dark: rgba(255, 255, 255, 0.14);

  /* 设备配色（可在“色彩”区实时切换，带过渡） */
  --dev-frame: #8f8f94;
  --dev-frame-2: #d6d6d8;
  --dev-screen-1: #1b2a6b;
  --dev-screen-2: #7b2ff7;
  --dev-screen-3: #f45d9c;

  /* 动效 */
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.42, 0, 0.58, 1);
  --t-fast: 0.28s;
  --t: 0.5s;

  --nav-h: 48px;
  --local-h: 52px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1024px;

  /* 机身换色 / 屏幕墙纸的色彩补间 */
  --tint: 0.7s;
  --tint-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 让所有用到设备配色的元素跟随变量补间 */
.device,
.device use,
.device rect,
.device stop {
  transition: --dev-frame var(--tint) var(--tint-ease),
    --dev-frame-2 var(--tint) var(--tint-ease),
    --dev-screen-1 var(--tint) var(--tint-ease),
    --dev-screen-2 var(--tint) var(--tint-ease),
    --dev-screen-3 var(--tint) var(--tint-ease);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth; /* 原生平滑：滚动条与动画始终绑定，无滞后 */
}

html.is-smooth {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.5);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: #0071e3;
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

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

/* 顶部滚动进度条 */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 9000;
  background: transparent;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #0071e3, #7b2ff7, #f45d9c);
  will-change: transform;
}

/* ============================================================
   全局导航（毛玻璃）
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  height: var(--nav-h);
  background: rgba(22, 22, 23, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: #f5f5f7;
  transition: background var(--t) var(--ease), transform 0.45s var(--ease-out);
}

.nav.is-hidden {
  transform: translate3d(0, -100%, 0);
}

.nav__inner {
  max-width: var(--maxw);
  height: 100%;
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav__list {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-around;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: block;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: rgba(245, 245, 247, 0.88);
  opacity: 0.92;
  padding: 14px 6px;
  white-space: nowrap;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav__link:hover {
  opacity: 1;
  color: #fff;
  text-decoration: none;
}

.nav__brand,
.nav__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(245, 245, 247, 0.86);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.nav__brand:hover,
.nav__icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav__icon:active {
  transform: scale(0.92);
}

.nav__brand svg,
.nav__icon svg {
  width: 16px;
  height: 16px;
}

.nav__toggle {
  display: none;
}

@media (max-width: 833px) {
  .nav__list {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: rgba(22, 22, 23, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 8px 22px 26px;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    transform: translate3d(0, -12px, 0);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-out),
      visibility 0.35s linear;
  }

  .nav.is-open .nav__list {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__link {
    font-size: 17px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline-dark);
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }

  .nav.is-open .nav__link {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease-out);
    transition-delay: calc(0.04s * var(--i, 0));
  }

  .nav__toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #f5f5f7;
  }

  .nav__toggle span {
    position: relative;
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 0.35s var(--ease-out), opacity 0.2s var(--ease);
  }

  .nav__toggle span::before,
  .nav__toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 0.35s var(--ease-out);
  }

  .nav__toggle span::before {
    transform: translateY(-5px);
  }

  .nav__toggle span::after {
    transform: translateY(5px);
  }

  .nav.is-open .nav__toggle span {
    transform: rotate(45deg);
  }

  .nav.is-open .nav__toggle span::before {
    transform: rotate(-90deg);
  }

  .nav.is-open .nav__toggle span::after {
    opacity: 0;
  }
}

/* ============================================================
   局部导航
   ============================================================ */
.localnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 7000;
  height: var(--local-h);
  background: rgba(250, 250, 252, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.localnav__inner {
  max-width: var(--maxw);
  height: 100%;
  margin-inline: auto;
  padding-inline: 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.localnav__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  white-space: nowrap;
}

.localnav__links {
  display: flex;
  gap: 26px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.localnav__links::-webkit-scrollbar {
  display: none;
}

.localnav__links a {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.8;
  white-space: nowrap;
}

.localnav__links a:hover {
  opacity: 1;
  text-decoration: none;
}

.buy {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), transform 0.2s var(--ease-out),
    box-shadow var(--t-fast) var(--ease);
}

.buy:hover {
  background: var(--blue-hover);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.28);
}

.buy:active {
  transform: scale(0.97);
}

@media (max-width: 833px) {
  .localnav__links {
    display: none;
  }

  .buy {
    margin-left: auto;
  }
}

/* ============================================================
   通用排版
   ============================================================ */
.eyebrow {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--blue);
  margin: 0 0 8px;
}

.headline {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.06;
  font-size: clamp(40px, 7.4vw, 80px);
}

.subhead {
  margin: 18px 0 0;
  font-size: clamp(19px, 2.6vw, 28px);
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: -0.016em;
  color: var(--ink-2);
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 14px 0 0;
}

.gradient-text {
  background: linear-gradient(92deg, #0071e3 0%, #7b2ff7 42%, #f45d9c 72%, #ff8a3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.section {
  padding-block: clamp(72px, 11vw, 140px);
  position: relative;
}

.section--tight {
  padding-block: clamp(56px, 8vw, 96px);
}

.section--dark {
  background: var(--dark);
  color: #f5f5f7;
}

.section--dark .lede,
.section--dark .subhead {
  color: #a1a1a6;
}

.center {
  text-align: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  color: var(--blue);
  margin-top: 20px;
  transition: gap 0.3s var(--ease);
}

.cta::after {
  content: "›";
  font-size: 22px;
  line-height: 1;
  transform: translateY(-1px);
}

.cta:hover {
  text-decoration: none;
  gap: 10px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 900px);
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: clamp(40px, 7vw, 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% -10%, #ffffff 0%, #f2f3f7 46%, #eceef4 100%);
  isolation: isolate;
}

.hero__aura {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 140%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
      38% 30% at calc(50% + var(--mx, 0) * 8%) calc(28% + var(--my, 0) * 6%),
      rgba(0, 113, 227, 0.22),
      transparent 70%
    ),
    radial-gradient(
      34% 26% at calc(72% + var(--mx, 0) * 6%) calc(52% + var(--my, 0) * 5%),
      rgba(123, 47, 247, 0.2),
      transparent 72%
    ),
    radial-gradient(
      30% 24% at calc(26% - var(--mx, 0) * 6%) calc(60% - var(--my, 0) * 5%),
      rgba(244, 93, 156, 0.18),
      transparent 72%
    );
  filter: blur(6px);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.hero__badge b {
  color: var(--ink);
  font-weight: 600;
}

.hero__title {
  margin-top: 18px;
}

.hero__sub {
  max-width: 30ch;
  margin-inline: auto;
}

.hero__stage {
  position: relative;
  margin-top: clamp(28px, 5vw, 56px);
  perspective: 1400px;
  width: min(92vw, 420px);
  z-index: 3;
  isolation: isolate;
}

/* 显示器版（横向）：容器加宽，并整体抬升图层 */
.hero__stage:has(.device--monitor) {
  width: min(94vw, 780px);
  z-index: 5;
}

.device--monitor {
  position: relative;
  z-index: 6;               /* 抬到光晕(aura)与底部 glow 之上 */
  filter: drop-shadow(0 34px 72px rgba(20, 22, 40, 0.36));
  transform: translateZ(0); /* 独立合成层，避免被父级 isolation 裁掉阴影 */
}

.hero__glow {
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 120%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.28), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.device {
  width: 100%;
  height: auto;
  transform-style: preserve-3d;
  /* 注意：不要给 transform 加 transition。JS 每帧已在做插值缓动，
     再加 CSS transition 会形成「缓动叠加缓动」，手感发黏、有滞后。 */
  will-change: transform;
  filter: drop-shadow(0 30px 60px rgba(20, 22, 40, 0.28));
}

.device.is-tilt {
  transition: transform 0.18s linear;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  background: var(--blue);
  color: #fff;
  transition: transform 0.24s var(--ease-out), background var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
  will-change: transform;
}

.pill--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.pill:hover {
  text-decoration: none;
  transform: translateY(-2px) scale(1.014);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.pill--ghost:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.pill:active {
  transform: scale(0.975);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.scroll-cue__track {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue__track::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 16px;
  background: var(--ink);
  animation: cue 2.1s var(--ease-io) infinite;
}

@keyframes cue {
  0% {
    transform: translateY(-16px);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateY(46px);
    opacity: 0;
  }
}

/* ============================================================
   跑马灯
   ============================================================ */
.marquee {
  overflow: hidden;
  padding-block: 26px;
  background: var(--bg-2);
  border-block: 1px solid var(--hairline);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: marquee 34s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.marquee__item i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #f45d9c);
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ============================================================
   滚动叙事（sticky）
   ============================================================ */
.story {
  position: relative;
  background: var(--dark);
  color: #f5f5f7;
}

.story__stage {
  height: 400vh;
  position: relative;
}

.story__viewport {
  position: sticky;
  top: calc(var(--nav-h) + var(--local-h));
  height: calc(100vh - var(--nav-h) - var(--local-h));
  min-height: 520px;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.story__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(60% 50% at 50% 30%, rgba(41, 151, 255, 0.16), transparent 70%),
    radial-gradient(50% 44% at 78% 72%, rgba(168, 107, 255, 0.14), transparent 72%),
    radial-gradient(46% 40% at 20% 74%, rgba(255, 100, 130, 0.12), transparent 72%);
  opacity: calc(0.35 + var(--p, 0) * 0.65);
}

.story__deviceWrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78vw, 330px);
  transform: translate3d(-50%, -50%, 0) translate3d(0, calc(var(--p, 0) * -6vh), 0)
    scale(calc(0.86 + var(--p, 0) * 0.5)) rotate(calc(var(--p, 0) * 8deg));
  transform-origin: 50% 50%;
  will-change: transform;
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.55));
}

.story__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(120vw, 900px);
  aspect-ratio: 1;
  transform: translate3d(-50%, -50%, 0) rotate(calc(var(--p, 0) * 180deg))
    scale(calc(0.7 + var(--p, 0) * 0.55));
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: -1;
  will-change: transform;
}

.story__ring--2 {
  width: min(96vw, 680px);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translate3d(-50%, -50%, 0) rotate(calc(var(--p, 0) * -120deg))
    scale(calc(0.6 + var(--p, 0) * 0.7));
}

.story__copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-inline: 22px;
  width: 100%;
  max-width: 760px;
  margin-top: min(30vh, 260px);
}

.story__line {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease-out),
    filter 0.55s var(--ease);
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.story__line.is-active {
  opacity: 1;
  transform: none;
  filter: blur(0);
  pointer-events: auto;
}

.story__line.is-past {
  opacity: 0;
  transform: translate3d(0, -26px, 0) scale(0.985);
  filter: blur(6px);
}

.story__kicker {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6ba8ff;
  margin: 0;
}

.story__title {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 62px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.story__text {
  margin: 0 auto;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #a1a1a6;
  line-height: 1.55;
}

.story__copySizer {
  visibility: hidden;
  pointer-events: none;
  display: grid;
  gap: 14px;
}

.story__progress {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.story__dot {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  position: relative;
}

.story__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: #fff;
  transition: transform 0.35s var(--ease);
}

.story__dot.is-on::after {
  transform: scaleX(1);
}

@media (max-width: 700px) {
  .story__stage {
    height: 340vh;
  }

  .story__copy {
    margin-top: min(34vh, 240px);
  }
}

/* ============================================================
   Bento 网格
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 46px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  padding: 30px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease);
  will-change: transform;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12);
}

.tile__k {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

.tile__k small {
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  margin-left: 4px;
}

.tile__t {
  margin: 10px 0 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile__d {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

.tile--dark {
  background: #101014;
  color: #f5f5f7;
}

.tile--dark .tile__d,
.tile--dark .tile__k small {
  color: #a1a1a6;
}

.tile--wide {
  grid-column: span 4;
}

.tile--half {
  grid-column: span 3;
}

.tile--third {
  grid-column: span 2;
}

.tile--glow {
  background: linear-gradient(160deg, #0b1220 0%, #131a35 55%, #1d1030 100%);
  color: #f5f5f7;
}

.tile--glow .tile__d,
.tile--glow .tile__k small {
  color: #a1a1a6;
}

.tile--blue {
  background: linear-gradient(150deg, #0071e3, #0057b8);
  color: #fff;
}

.tile--blue .tile__d {
  color: rgba(255, 255, 255, 0.82);
}

.tile--pink {
  background: linear-gradient(150deg, #ff7eb3, #ff6482);
  color: #fff;
}

.tile--pink .tile__d {
  color: rgba(255, 255, 255, 0.86);
}

.tile__art {
  position: absolute;
  right: -10%;
  top: 8%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.35), transparent 68%);
  filter: blur(2px);
  z-index: -1;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 84px;
  margin-bottom: 18px;
}

.bars span {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #2997ff, rgba(41, 151, 255, 0.15));
  height: var(--h, 40%);
  transform-origin: 50% 100%;
  animation: barsUp 1.1s var(--ease-out) backwards;
}

@keyframes barsUp {
  from {
    transform: scaleY(0.02);
    opacity: 0.2;
  }
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile--wide,
  .tile--half,
  .tile--third {
    grid-column: span 2;
  }
}

/* ============================================================
   横向画廊
   ============================================================ */
.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 22px 26px;
  margin-inline: -22px;
  cursor: grab;
}

.rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  flex: 0 0 clamp(240px, 30vw, 340px);
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 30px rgba(0, 0, 0, 0.07);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease);
  will-change: transform;
  user-select: none;
}

.card:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.14);
}

.card__media {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55));
}

.card__media i {
  position: absolute;
  inset: 0;
  background-size: cover;
  transition: transform 0.9s var(--ease-out);
}

.card:hover .card__media i {
  transform: scale(1.07);
}

.card__body {
  padding: 20px 22px 26px;
}

.card__tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card__title {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.card__desc {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

.rail__nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.rail__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font-size: 18px;
  transition: background var(--t-fast) var(--ease), transform 0.2s var(--ease),
    opacity var(--t-fast) var(--ease);
}

.rail__btn:hover {
  background: rgba(0, 0, 0, 0.12);
}

.rail__btn:active {
  transform: scale(0.9);
}

.rail__btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* ============================================================
   数字统计
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.stat {
  text-align: center;
}

.stat__num {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.stat__num em {
  font-style: normal;
  font-size: 0.42em;
  margin-left: 2px;
  color: var(--ink-2);
}

.stat__label {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-2);
}

.section--dark .stat__label,
.section--dark .stat__num em {
  color: #a1a1a6;
}

@media (max-width: 700px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* ============================================================
   色彩
   ============================================================ */
.colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.colors__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
  background: radial-gradient(70% 60% at 50% 40%, #ffffff, #f0f1f5 70%, #e7e9ef);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.colors__device {
  width: min(74%, 300px);
  filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.22));
  transition: transform 0.6s var(--ease-out);
}

.colors__swatches {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
}

.swatch::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease-out);
  transform: scale(0.86);
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch[aria-pressed="true"]::after {
  border-color: var(--ink);
  transform: scale(1);
}

.colors__name {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-2);
  min-height: 1.5em;
}

@media (max-width: 860px) {
  .colors {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   轮播
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #0b0b0d;
}

.carousel__track {
  display: flex;
  transition: transform 0.85s var(--ease-out);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 20px;
  min-height: clamp(360px, 48vw, 520px);
  padding: clamp(28px, 5vw, 64px);
  color: #f5f5f7;
}

.slide__kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6ba8ff;
  margin: 0 0 12px;
}

.slide__title {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.slide__text {
  margin: 14px 0 0;
  color: #a1a1a6;
  font-size: 17px;
  line-height: 1.6;
  max-width: 40ch;
}

.slide__art {
  aspect-ratio: 1;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.slide__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--art, linear-gradient(140deg, #0071e3, #7b2ff7));
}

.slide__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 30% 20%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}

.cdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease-out),
    width 0.35s var(--ease);
}

.cdot[aria-current="true"] {
  background: #fff;
  width: 26px;
  border-radius: 5px;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 3;
  font-size: 20px;
  transition: background var(--t-fast) var(--ease), transform 0.25s var(--ease-out);
}

.carousel__arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.carousel__arrow--prev {
  left: 16px;
}

.carousel__arrow--next {
  right: 16px;
}

@media (max-width: 820px) {
  .slide {
    grid-template-columns: 1fr;
    text-align: left;
    padding-bottom: 62px;
  }

  .slide__art {
    max-width: 320px;
    justify-self: center;
  }
}

/* ============================================================
   结尾 / 页脚
   ============================================================ */
.finale {
  text-align: center;
  background: linear-gradient(180deg, #fff, #f5f5f7);
}

/* ===== 项目专属背景与配色 ===== */
.section--project { background: linear-gradient(180deg, #fbfbfd 0%, #f2f3f6 100%); }
.section--mod { background: linear-gradient(180deg, #0c0d12 0%, #11131b 100%); color: #f5f5f7; }
.section--mod .eyebrow { color: #8a8ff0; }
.section--mod .lede { color: #c9cce0; }
.section--mod .headline { color: #fff; }
.section--mod .inline-link { color: #9aa6ff; }

/* ===== 截图展示（自托管图片）===== */
.shot {
  position: relative;
  margin-top: 48px;
  border-radius: 22px;
  overflow: hidden;
  background: #0a0b10;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.45);
  aspect-ratio: 16 / 9;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.shot__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 22px 14px;
  font-size: 13px; color: #fff; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7));
}
.section--project .shot { aspect-ratio: 16 / 8.5; }

/* 画廊网格 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
/* 截图完整显示：给一个宽松的 16:10 容器（接近 NiriMod 截图原生比例），
   并用 object-fit:contain —— 既不裁掉顶部标题栏/底部按钮，
   又保留固定高度（避免 height:auto 在懒加载前塌陷成 0）。 */
.gallery-grid .shot { aspect-ratio: 16 / 10; }
.gallery-grid .shot img { object-fit: contain; background: #0b0c12; }
.gallery-grid .shot:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.gallery-grid figure { margin: 0; }
.gallery-grid figcaption {
  margin-top: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600;
}

/* 仓库链接区 */
.repo-link {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  margin-top: 44px;
}

/* 行内链接 */
.inline-link {
  color: #2997ff; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.inline-link:hover { border-bottom-color: currentColor; }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.footer {
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
  padding-block: 44px 34px;
  border-top: 1px solid var(--hairline);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
}

.footer h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer a {
  color: var(--ink-2);
}

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

.footer__note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.footer__bottom {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  color: var(--ink-3);
}

.footer__bottom ul {
  grid-auto-flow: column;
  gap: 14px;
}

.linkish {
  color: var(--ink-2);
  text-decoration: underline;
  background: none;
  padding: 0;
  font-size: 12px;
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   悬浮控件
   ============================================================ */
.dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 7500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.94);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-out);
}

.dock.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.dock__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(22, 22, 23, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s var(--ease-out), background var(--t-fast) var(--ease);
}

.dock__btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-2px) scale(1.05);
}

.dock__btn:active {
  transform: scale(0.93);
}

.dock__btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   搜索覆盖层
   ============================================================ */
.search {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(250, 250, 252, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s linear;
}

.search.is-open {
  opacity: 1;
  visibility: visible;
}

.search__inner {
  max-width: 720px;
  margin: clamp(90px, 18vh, 190px) auto 0;
  padding-inline: 22px;
  transform: translate3d(0, -14px, 0);
  transition: transform 0.55s var(--ease-out);
}

.search.is-open .search__inner {
  transform: none;
}

.search__field {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 14px;
}

.search__field input {
  flex: 1;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  outline: none;
}

.search__field input::placeholder {
  color: #b9b9be;
}

.search__hints {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.search__hints h5 {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}

.search__hints a {
  display: block;
  font-size: 17px;
  color: var(--ink);
  padding: 6px 0;
}

.search__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  font-size: 20px;
}

.search__close:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* ============================================================
   入场动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease-out);
  /* --d 由 JS 根据 data-delay 写入，实现错峰入场 */
  transition-delay: calc(var(--d, 0) * 90ms);
  will-change: transform, opacity;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal.is-done {
  will-change: auto;
}

.reveal--scale {
  transform: translate3d(0, 30px, 0) scale(0.97);
}

.reveal--blur {
  filter: blur(8px);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease-out),
    filter 0.8s var(--ease);
}

.reveal--blur.is-in {
  filter: blur(0);
}

/* ============================================================
   动效开关（页脚按钮） & 降低动效偏好
   ============================================================ */
html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

html[data-motion="off"] .reveal,
html[data-motion="off"] .reveal--blur {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .reveal--scale,
  .reveal--blur {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .marquee__track {
    animation: none;
  }
}

/* ============================================================
   深色模式（默认开启；页脚可切换）
   ------------------------------------------------------------
   设计几乎全部走 --ink / --bg / --hairline 令牌，这里只覆盖令牌，
   再补少量硬编码浅色面的特例。切换时只有令牌重算，无布局抖动。
   ============================================================ */
html[data-theme="dark"] {
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #86868b;
  --bg: #000000;
  --bg-2: #111114;
  --bg-3: #161617;
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-dark: rgba(255, 255, 255, 0.2);
  --blue: #2997ff;
  --blue-hover: #47a8ff;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

/* 硬编码浅色面特例 */
html[data-theme="dark"] .localnav {
  background: rgba(22, 22, 24, 0.74);
  border-bottom: 1px solid var(--hairline);
}
html[data-theme="dark"] .localnav__title,
html[data-theme="dark"] .localnav__links a { color: var(--ink); }
html[data-theme="dark"] .localnav__links a:hover { color: var(--blue); }
html[data-theme="dark"] .buy { background: var(--blue); color: #fff; }

html[data-theme="dark"] .section--project {
  background: linear-gradient(180deg, #0a0b0f 0%, #101218 100%);
}
html[data-theme="dark"] .finale {
  background: linear-gradient(180deg, #0a0b0f, #101218);
}
html[data-theme="dark"] .tile--dark { background: #1c1c20; }

html[data-theme="dark"] .card {
  background: #16171c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .card:hover { box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6); }

html[data-theme="dark"] .pill--ghost {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
}
html[data-theme="dark"] .rail__btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}
html[data-theme="dark"] .rail__btn:hover { background: rgba(255, 255, 255, 0.2); }

html[data-theme="dark"] .shot {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
html[data-theme="dark"] .gallery-grid figcaption { color: var(--ink-2); }

html[data-theme="dark"] .footer {
  background: var(--bg-2);
  color: var(--ink-2);
  border-top: 1px solid var(--hairline);
}
html[data-theme="dark"] .footer h4 { color: var(--ink); }
html[data-theme="dark"] .footer a { color: var(--ink-2); }
html[data-theme="dark"] .footer a:hover { color: var(--ink); }
html[data-theme="dark"] .footer__note,
html[data-theme="dark"] .footer__bottom { border-color: var(--hairline); }

/* 搜索面板：原本是浅色毛玻璃，深色下改为深色 */
html[data-theme="dark"] .search { background: rgba(10, 10, 12, 0.86); }
html[data-theme="dark"] .search__inner { background: rgba(28, 28, 32, 0.92); color: var(--ink); }
html[data-theme="dark"] .search__field input { color: var(--ink); }
html[data-theme="dark"] .search__hints a { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
html[data-theme="dark"] .search__hints a:hover { background: rgba(255, 255, 255, 0.12); }
html[data-theme="dark"] .search__close { color: var(--ink-2); }

html[data-theme="dark"] .cta { color: var(--blue); }
html[data-theme="dark"] .linkish { color: var(--ink-3); }
html[data-theme="dark"] .linkish:hover { color: var(--blue); }

/* 选择高亮 & 焦点环在深色下的可读性 */
html[data-theme="dark"] ::selection { background: #0071e3; color: #fff; }
html[data-theme="dark"] :focus-visible { outline-color: rgba(41, 151, 255, 0.6); }

/* 深色下 section--mod 与相邻面的过渡更自然 */
html[data-theme="dark"] .section--mod {
  background: linear-gradient(180deg, #0c0d12 0%, #14161f 100%);
}

/* 主题切换按钮 */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.theme-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 980px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}
html[data-theme="dark"] .theme-switch__btn {
  background: rgba(255, 255, 255, 0.08);
}
.theme-switch__btn:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
}
.theme-switch__btn svg { width: 15px; height: 15px; }

/* ===== DSH 汉化标识徽章 ===== */
.dsh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 14px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  color: #0f7a5c;
  background: rgba(65, 211, 146, 0.12);
  border: 1px solid rgba(65, 211, 146, 0.35);
}
.dsh-badge b { font-weight: 600; }
.dsh-badge span {
  font-weight: 700; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(65, 211, 146, 0.2);
}
html[data-theme="dark"] .dsh-badge { color: #41d392; }

/* ===== 作者主页卡片 ===== */
.section--author { background: var(--bg-3); }
html[data-theme="dark"] .section--author { background: #0a0b0f; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease),
    border-color .35s var(--ease);
  color: var(--ink);
}
html[data-theme="dark"] .profile-card {
  background: #16171c;
  border-color: var(--hairline);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
}
.profile-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(0,0,0,.14);
}
html[data-theme="dark"] .profile-card:hover { box-shadow: 0 22px 50px rgba(0,0,0,.6); }

.profile-card__icon {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: #f5f5f7;
  color: var(--ink);
}
html[data-theme="dark"] .profile-card__icon { background: #23242b; color: #f5f5f7; }
.profile-card__icon svg { width: 22px; height: 22px; }

.profile-card--bili .profile-card__icon { background: rgba(251,114,153,.12); color: #fb7299; }
html[data-theme="dark"] .profile-card--bili .profile-card__icon { background: rgba(251,114,153,.18); }

.profile-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-card__body b { font-size: 16px; font-weight: 600; }
.profile-card__body small {
  font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-card__arrow {
  margin-left: auto;
  font-size: 17px; color: var(--ink-3);
  transition: transform .3s var(--ease-out);
}
.profile-card:hover .profile-card__arrow { transform: translateX(4px); color: var(--ink); }

@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* ===== DSH tile 文案可读性 ===== */
.tile--dsh { background: linear-gradient(160deg, #0b2018 0%, #10352a 100%); color: #f5f5f7; }
.tile--dsh .tile__d, .tile--dsh .tile__k small { color: #a9d8c4; }

/* ===== 主题切换过渡：只过渡颜色类属性，避免影响 transform 动画 ===== */
body,
.nav, .localnav, .footer, .tile, .card, .shot, .profile-card,
.section--project, .section--mod, .section--author, .finale,
.eyebrow, .headline, .lede, .tile__d, .tile__k, .stat__label {
  transition: background-color .32s var(--ease), color .32s var(--ease),
    border-color .32s var(--ease);
}

/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  body,
  .nav, .localnav, .footer, .tile, .card, .shot, .profile-card,
  .section--project, .section--mod, .section--author, .finale {
    transition: none;
  }
}

/* ============================================================
   深色模式：首屏 hero 背景修正（关键修复）
   ------------------------------------------------------------
   .hero 的背景是硬编码的白色 radial-gradient，深色模式下如果不覆盖，
   浅色文字（#f5f5f7）会画在白底上 —— 几乎全白、完全不显眼。
   这里改为深色底 + 提亮文字与渐变，保证对比度。
   ============================================================ */
html[data-theme="dark"] .hero {
  background: radial-gradient(120% 80% at 50% -10%, #14161f 0%, #0c0d13 46%, #05060a 100%);
}

/* 渐变标题在深色底上用更亮、更高饱和的色标 */
html[data-theme="dark"] .gradient-text {
  background: linear-gradient(92deg, #4da3ff 0%, #a78bfa 42%, #ff9ecd 72%, #ffb066 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 副标题与徽章对比度 */
html[data-theme="dark"] .hero__sub { color: #d8dbe4; }
html[data-theme="dark"] .hero__badge {
  background: rgba(255, 255, 255, 0.1);
  color: #d8dbe4;
}
html[data-theme="dark"] .hero__badge b { color: #fff; }
html[data-theme="dark"] .hero__title { color: #fff; }

/* 首屏光晕在深色下更明显但不过曝 */
html[data-theme="dark"] .hero__aura {
  background: radial-gradient(
      38% 30% at calc(50% + var(--mx, 0) * 8%) calc(28% + var(--my, 0) * 6%),
      rgba(77, 163, 255, 0.3),
      transparent 70%
    ),
    radial-gradient(
      34% 26% at calc(72% + var(--mx, 0) * 6%) calc(52% + var(--my, 0) * 5%),
      rgba(167, 139, 250, 0.26),
      transparent 72%
    ),
    radial-gradient(
      30% 24% at calc(26% - var(--mx, 0) * 6%) calc(60% - var(--my, 0) * 5%),
      rgba(255, 158, 205, 0.22),
      transparent 72%
    );
}

/* 滚动提示 */
html[data-theme="dark"] .scroll-cue { color: var(--ink-3); }


/* 翻页按钮：到顶/到底时禁用 */
.dock__btn[disabled] {
  opacity: 0.32;
  cursor: default;
  pointer-events: none;
}
