/* ============================================================
   星念AI Ostaru · 官网样式
   配色与圆角刻度与 lib/app/ostaru_theme.dart 同源：
   主紫 #7968EE / 亮紫 #A295FF / 渐变 #8C79FF → #7968EE → #5B49D8
   玫瑰粉 #F09BCB / 暖金 #FFC878 / 转账用语义色 warning #FF9F43
   圆角 6 / 8 / 12 / 16 / 20 / 胶囊
   动效由 js/site.js（GSAP + ScrollTrigger + SplitText + Lenis）驱动，
   这里只放初始状态与纯 CSS 的循环动画。

   性能约定：循环动画只动 transform / opacity；不给气泡、浮标做毛玻璃；
   页面上唯一一处 backdrop-filter 是顶栏。
   ============================================================ */

@font-face {
  font-family: "Noto Sans SC";
  /* 按页面用到的字裁过的子集（tools/subset-font.py 生成），改文案后重新生成 */
  src: local("Noto Sans SC"), local("NotoSansSC-Regular"),
       url("/assets/fonts/NotoSansSC-site.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0E0E12;
  --bg-2: #131318;
  --card: #19191F;
  --raised: #202027;
  --sunken: #0B0B0F;
  --border: #2D2D35;
  --border-soft: rgba(255, 255, 255, .08);
  --ink: #E1DEF5;
  --ink-strong: #F4F2F8;
  --muted: #A8A5BE;
  --faint: #6E6B82;

  --primary: #A295FF;
  --primary-solid: #7968EE;
  --primary-hover: #6D5ED6;
  --grad-a: #8C79FF;
  --grad-b: #7968EE;
  --grad-c: #5B49D8;
  --rose: #F09BCB;
  --warm: #FFC878;
  --warm-2: #FFB65C;
  --warning: #FF9F43;
  --success: #28C76F;
  --info: #00BAD1;
  --on-primary: #FFFFFF;

  --tonal: rgba(162, 149, 255, .14);
  --tonal-strong: rgba(162, 149, 255, .24);
  --glow: rgba(121, 104, 238, .45);
  --chip-bg: rgba(32, 32, 39, .92);

  --r-compact: 6px;
  --r-control: 8px;
  --r-surface: 12px;
  --r-feature: 16px;
  --r-overlay: 20px;
  --r-full: 999px;

  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --container: 1200px;
  --nav-h: 72px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F8F7FC;
  --bg-2: #F1EFF7;
  --card: #FFFFFF;
  --raised: #FFFFFF;
  --sunken: #F0EFF5;
  --border: #E3E0EC;
  --border-soft: rgba(47, 43, 61, .08);
  --ink: #2F2B3D;
  --ink-strong: #28242F;
  --muted: #6B6880;
  --faint: #9A97AD;
  --primary: #7968EE;
  --tonal: rgba(121, 104, 238, .12);
  --tonal-strong: rgba(121, 104, 238, .2);
  --glow: rgba(121, 104, 238, .28);
  --chip-bg: rgba(255, 255, 255, .94);
  color-scheme: light;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol { margin: 0; }
/* 标题按行均衡折行，正文避免孤字挂行；标题一律不手写 <br> */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 640px) { .container { width: calc(100% - 32px); } }

::selection { background: var(--primary-solid); color: #fff; }

/* 通用图标：线性描边 */
.btn svg, .hero-meta svg, .float-chip svg, .detail-ic svg, 
.composer-mic svg, .composer-send svg, .theme-toggle svg, .badge-ok svg, .qr svg, .t-ic svg {
  width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 预加载 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; gap: 18px; align-content: center;
  background: #0E0E12;
  transition: opacity .7s var(--ease), visibility .7s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark { overflow: visible; }
.loader-ring {
  fill: none; stroke: #FFFFFF; stroke-width: 82; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: ringDraw 1.15s var(--ease-out) .15s forwards;
}
.loader-star {
  fill: #FFC878; transform-origin: 701px 322px; transform: scale(0); opacity: 0;
  animation: starPop .6s var(--ease-out) 1.05s forwards;
}
.loader-word { text-align: center; opacity: 0; animation: fadeUp .6s var(--ease) 1.2s forwards; }
.loader-word b { display: block; font-size: 22px; font-weight: 900; color: #F4F2F8; line-height: 1.1; }
.loader-word i { display: block; font-style: normal; font-size: 10px; letter-spacing: .38em; font-weight: 800; color: #A8A5BE; margin-top: 6px; padding-left: .38em; }
@keyframes ringDraw { to { stroke-dashoffset: 0; } }
@keyframes starPop { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.18) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 光标 & 进度 ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; width: 22px; height: 22px; border-radius: 50%;
  pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(162, 149, 255, .55), rgba(162, 149, 255, 0) 70%);
  transition: width .25s var(--ease), height .25s var(--ease), opacity .3s;
}
.cursor.hot { width: 64px; height: 64px; }
@media (pointer: coarse) { .cursor { display: none; } }

.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 80; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--grad-a), var(--rose)); }

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 70; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: clamp(16px, 4vw, 40px);
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; box-shadow: 0 6px 18px rgba(101, 88, 216, .35); }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark b { font-size: 18px; font-weight: 900; color: var(--ink-strong); }
.wordmark i { font-style: normal; font-size: 8px; font-weight: 800; letter-spacing: .34em; padding-left: .34em; color: var(--muted); margin-top: 4px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: var(--r-full); font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .25s, background-color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink-strong); background: var(--tonal); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; border: 1px solid var(--border-soft); transition: background-color .25s; }
.theme-toggle:hover { background: var(--tonal); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }
.burger { display: none; width: 40px; height: 40px; border-radius: var(--r-full); position: relative; }
.burger span { position: absolute; left: 11px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; padding: 12px 16px 20px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); box-shadow: 0 20px 40px rgba(0,0,0,.25); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .burger { display: block; }
  .nav-actions .btn { display: none; }
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 0 20px; height: 44px; border-radius: var(--r-control); font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: background-color .25s, border-color .25s, box-shadow .35s var(--ease), color .25s;
  will-change: transform;
}
.btn-sm { height: 38px; padding-inline: 16px; font-size: 14px; }
.btn-lg { height: 54px; padding-inline: 26px; font-size: 16px; border-radius: var(--r-surface); }
.btn-primary { background: linear-gradient(135deg, var(--grad-a), var(--grad-b) 50%, var(--grad-c)); color: #fff; box-shadow: 0 10px 30px -8px var(--glow); }
.btn-primary::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.25), transparent 60%); opacity: 0; transition: opacity .3s; }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { box-shadow: 0 16px 40px -8px var(--glow); }
.btn-ghost { background: var(--tonal); border-color: var(--border-soft); color: var(--ink-strong); }
.btn-ghost:hover { background: var(--tonal-strong); }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg:last-child { transform: translateX(3px); }
.shake { animation: shake .4s var(--ease); }
@keyframes shake { 0%, 100% { translate: 0; } 25% { translate: -5px; } 50% { translate: 5px; } 75% { translate: -3px; } }

/* ---------- 首屏 ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-top: var(--nav-h); overflow: hidden; isolation: isolate; }
.hero-gl, .hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-stars { z-index: -1; }
.hero-fade { position: absolute; inset: auto 0 0 0; height: 30%; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg)); }
.hero-gl.fallback { background:
  radial-gradient(60% 55% at 70% 25%, rgba(121, 104, 238, .55), transparent 70%),
  radial-gradient(45% 45% at 25% 70%, rgba(91, 73, 216, .45), transparent 70%),
  radial-gradient(30% 30% at 55% 60%, rgba(240, 155, 203, .18), transparent 70%), var(--bg); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 40px; padding-block: 60px 90px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-strong); background: var(--tonal); border: 1px solid var(--border-soft); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--warm); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--warm); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.4); opacity: 0; } }
.hero-title { margin-top: 22px; font-size: clamp(38px, 5.6vw, 72px); line-height: 1.12; font-weight: 900; letter-spacing: -.01em; color: var(--ink-strong); }
.hero-title-part { white-space: nowrap; }
.hero-title .ch { display: inline-block; }
.hero-sub { margin-top: 22px; max-width: 520px; font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; font-weight: 600; color: var(--faint); }
.hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; z-index: 1; width: 26px; height: 42px; border: 2px solid var(--border); border-radius: var(--r-full); transform: translateX(-50%); }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--primary); animation: scrollHint 1.8s var(--ease) infinite; }
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* 手机 */
.hero-visual { display: flex; justify-content: center; perspective: 1400px; }
/* 机身按 iPhone 17 Pro Max：78 × 163.4 mm，四边 10px 等宽边框，屏幕约 440 × 956 pt；圆角随宽度等比缩放 */
.phone-stage { position: relative; --pw: min(340px, 78vw); width: var(--pw); aspect-ratio: 78 / 163.4; transform-style: preserve-3d; }
.phone {
  position: absolute; inset: 0; border-radius: calc(var(--pw) * .162); padding: 10px;
  background: linear-gradient(160deg, #2A2A33, #101015);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08) inset, 0 30px 80px -30px var(--glow);
  transform-style: preserve-3d; will-change: transform;
}
.phone-stage .phone { animation: phoneFloat 7s ease-in-out infinite; }
@keyframes phoneFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.phone::before { content: ""; position: absolute; top: calc(10px + var(--pw) * .024); left: 50%; width: calc(var(--pw) * .268); height: calc(var(--pw) * .079); border-radius: 999px; background: #08080B; transform: translateX(-50%); z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: calc((var(--pw) - 20px) * .141); overflow: hidden; background: #131318; display: flex; flex-direction: column; color: #E1DEF5; }
/* 会话默认背景：和应用 OstaruBackdrop 一样，是深底上两团主紫的柔光，不是图片 */
.chat-bg { position: absolute; inset: 0; transition: opacity .5s;
  background:
    radial-gradient(60% 40% at 15% 8%, rgba(121, 104, 238, .42), transparent 70%),
    radial-gradient(50% 36% at 100% 30%, rgba(121, 104, 238, .22), transparent 70%),
    radial-gradient(1.5px 1.5px at 22% 48%, rgba(255,255,255,.55), transparent 100%),
    radial-gradient(1px 1px at 68% 22%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 82% 66%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.4), transparent 100%),
    #0E0E12; }
/* 用户自定义的背景：这里用一张暖色晚霞渐变示意「相册里的图」 */
.chat-bg.custom { background:
    linear-gradient(to bottom, rgba(14,14,18,.55), rgba(14,14,18,.2) 40%, rgba(14,14,18,.65)),
    radial-gradient(70% 45% at 50% 62%, rgba(255, 200, 120, .55), transparent 70%),
    linear-gradient(180deg, #2A1F4E 0%, #6E4A8C 45%, #E08A8A 70%, #FFB65C 100%); }
.chat-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 52px 18px 12px; }
.chat-title { flex: 1; line-height: 1.2; }
.chat-title b { display: block; font-size: 15px; font-weight: 800; }
.chat-title i { display: block; font-style: normal; font-size: 11px; color: #A8A5BE; margin-top: 2px; }
.chat-more { color: #A8A5BE; letter-spacing: 1px; font-weight: 800; }
.chat-stream { position: relative; z-index: 1; flex: 1; padding: 6px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; justify-content: flex-end; }
.chat-composer { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px 22px; }
.composer-input { flex: 1; height: 38px; display: flex; align-items: center; padding: 0 14px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 13px; color: #6E6B82; }
.composer-mic, .composer-send { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #A8A5BE; }
.composer-send { background: linear-gradient(135deg, var(--grad-a), var(--grad-c)); color: #fff; }

/* 消息 */
.msg { max-width: 82%; font-size: 13.5px; line-height: 1.55; opacity: 0; transform: translateY(12px) scale(.96); animation: msgIn .55s var(--ease-out) forwards; }
@keyframes msgIn { to { opacity: 1; transform: none; } }
.msg.narr { align-self: center; max-width: 92%; text-align: center; font-size: 12px; color: #A8A5BE; font-style: italic; padding: 2px 8px; }
.msg.ai { align-self: flex-start; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: rgba(40, 40, 52, .92); }
.msg.me { align-self: flex-end; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: linear-gradient(135deg, var(--grad-a), var(--grad-c)); color: #fff; }
.msg.sys { align-self: center; font-size: 11px; color: #8D8AA3; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); }
.msg.proactive { align-self: flex-start; }
.msg .lab { display: inline-block; font-size: 10px; font-weight: 700; color: var(--warm); margin-bottom: 4px; letter-spacing: .04em; }
.msg.voice { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.msg.voice .play { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; flex: none; }
.msg.voice .play::after { content: ""; border-left: 8px solid #0E0E12; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.msg.voice b { font-weight: 600; font-size: 12px; color: #A8A5BE; }
/* 波形只动 transform，不动 height，否则每帧都要重排 */
.wave { display: inline-flex; align-items: center; gap: 2px; height: 18px; }
.wave i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; opacity: .85; transform: scaleY(.3); animation: wave 1.2s ease-in-out infinite; animation-delay: calc(var(--d, 0) * -.1s); }
.wave i:nth-child(1) { --d: 1; } .wave i:nth-child(2) { --d: 4; } .wave i:nth-child(3) { --d: 2; } .wave i:nth-child(4) { --d: 6; }
.wave i:nth-child(5) { --d: 3; } .wave i:nth-child(6) { --d: 7; } .wave i:nth-child(7) { --d: 1; } .wave i:nth-child(8) { --d: 5; }
.wave i:nth-child(9) { --d: 2; } .wave i:nth-child(10) { --d: 6; } .wave i:nth-child(11) { --d: 4; } .wave i:nth-child(12) { --d: 8; }
.wave i:nth-child(13) { --d: 3; } .wave i:nth-child(14) { --d: 5; } .wave i:nth-child(15) { --d: 2; } .wave i:nth-child(16) { --d: 7; }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.msg.voice .transcript { display: block; width: 100%; font-size: 12px; color: #C9C6DA; margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.14); }
.msg.voice.expanded { flex-wrap: wrap; }
/* 转账卡：照应用里 ChatTransferBubble 的样子——warning 色实心、金额、状态、说明、底部一行「转账」 */
.msg.transfer { width: 220px; padding: 0; background: var(--warning); color: #fff; overflow: hidden; }
.msg.transfer.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; }
.msg.transfer.ai { align-self: flex-start; border-radius: 16px 16px 16px 4px; }
.msg.transfer .t-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px 12px; }
.msg.transfer .t-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.msg.transfer .t-ic svg { width: 16px; height: 16px; }
.msg.transfer b { display: block; font-size: 20px; font-weight: 900; line-height: 1.1; }
.msg.transfer i { display: block; font-style: normal; font-size: 12.5px; opacity: .88; margin-top: 2px; }
.msg.transfer em { display: block; font-style: normal; font-size: 12px; opacity: .78; margin-top: 4px; line-height: 1.35; }
.msg.transfer .t-foot { display: block; padding: 6px 14px 7px; font-size: 11.5px; opacity: .72; border-top: 1px solid rgba(255,255,255,.24); }
.msg.typing { align-self: flex-start; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: rgba(40, 40, 52, .92); display: inline-flex; gap: 4px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #C9C6DA; animation: dots 1s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.chat-stream.fade .msg { animation: msgOut .4s var(--ease) forwards; }
@keyframes msgOut { to { opacity: 0; transform: translateY(-8px); } }

/* 头像：不用任何人像图。按应用 DefaultAvatar 的做法——底色 + 人形，底色按角色换一组品牌色渐变 */
.avatar {
  --av: 36px;
  position: relative; width: var(--av); height: var(--av); flex: none; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #8C79FF, #5B49D8);
  box-shadow: 0 0 0 2px rgba(255,255,255,.14);
}
.avatar::after {
  content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.9);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='5'/><path d='M20 21a8 8 0 0 0-16 0'/></svg>") center / 50% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='5'/><path d='M20 21a8 8 0 0 0-16 0'/></svg>") center / 50% no-repeat;
}
.avatar.c1 { background: linear-gradient(135deg, #8C79FF, #5B49D8); }
.avatar.c2 { background: linear-gradient(135deg, #F09BCB, #B86AD6); }
.avatar.c3 { background: linear-gradient(135deg, #FFC878, #FF9F43); }
.avatar.c4 { background: linear-gradient(135deg, #4FDF92, #00A7BC); }
.avatar.c5 { background: linear-gradient(135deg, #22D3E8, #5B49D8); }
.avatar.c6 { background: linear-gradient(135deg, #A295FF, #F09BCB); }
.avatar.c7 { background: linear-gradient(135deg, #FF7A7E, #FF9F43); }
.avatar.c8 { background: linear-gradient(135deg, #7968EE, #22D3E8); }

/* 浮动标签 */
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-surface);
  background: var(--chip-bg); border: 1px solid var(--border-soft);
  font-size: 13px; font-weight: 700; color: var(--ink-strong); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
  animation: chipFloat 6s ease-in-out infinite;
}
.float-chip svg { color: var(--primary); }
.chip-a { right: -8%; top: 16%; }
.chip-b { left: -14%; top: 46%; animation-delay: -2s; --amp: -10px; }
.chip-c { right: -12%; bottom: 14%; animation-delay: -4s; --amp: 8px; }
@keyframes chipFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 var(--amp, -8px); } }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 60px; padding-block: 40px 100px; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .chip-a { right: -4%; top: 12%; } .chip-b { left: -4%; top: 40%; }
  .chip-c { display: none; } /* 手机上手机模型几乎占满宽度，第三个标签会压住消息 */
}

/* ---------- 跑马灯（两端用同色渐变盖住，不用 mask，mask 会让每一帧都重新合成） ---------- */
.marquee { position: relative; overflow: hidden; padding: 18px 0; border-block: 1px solid var(--border-soft); background: var(--bg-2); }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14%; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; gap: 28px; animation: marquee 42s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.marquee-track em, .soon-tag { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: var(--r-compact); color: var(--warm); background: rgba(255, 200, 120, .14); vertical-align: middle; }
.marquee-track i { width: 8px; height: 8px; background: var(--warm); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 章节通用 ---------- */
.section { position: relative; padding-block: clamp(80px, 10vw, 140px); }
.section-head { max-width: 680px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .18em; color: var(--primary); text-transform: uppercase; }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head.center .kicker::before { display: none; }
.section-head h2 { margin-top: 14px; font-size: clamp(30px, 4vw, 48px); line-height: 1.18; font-weight: 900; letter-spacing: -.01em; color: var(--ink-strong); }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--muted); }

/* 滚动显现：初始态，由 ScrollTrigger 分批推到可见 */
.reveal { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 便当格 ---------- */
.bento { margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-feature); background: var(--card); border: 1px solid var(--border-soft);
  transition: translate .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.card:hover { translate: 0 -4px; border-color: var(--tonal-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5), 0 0 0 1px var(--tonal); }
.card.spot::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(360px circle at var(--mx) var(--my), var(--tonal-strong), transparent 60%); }
.card.spot:hover::before { opacity: 1; }
.card-wide { grid-column: span 2; }
.card-visual { position: relative; z-index: 1; height: 190px; display: flex; align-items: center; justify-content: center; padding: 22px; background: var(--bg-2); overflow: hidden; }
.card-wide .card-visual { height: 230px; }
.card-body { position: relative; z-index: 1; padding: 22px 24px 26px; }
.card-tag { display: inline-block; padding: 4px 10px; border-radius: var(--r-compact); font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--primary); background: var(--tonal); }
.card-tag.soon { color: var(--warm); background: rgba(255, 200, 120, .14); }
.card h3 { margin-top: 12px; font-size: 19px; font-weight: 900; line-height: 1.35; color: var(--ink-strong); }
.card p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

/* 卡片里的小演示 */
.mini-chat { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 8px; }
.mc-line { font-size: 13px; max-width: 78%; padding: 8px 12px; border-radius: 14px; opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.card.in .mc-line { opacity: 1; transform: none; }
.card.in .mc-line:nth-child(1) { transition-delay: .3s; } .card.in .mc-line:nth-child(2) { transition-delay: .7s; }
.card.in .mc-line:nth-child(3) { transition-delay: 1.1s; } .card.in .mc-line:nth-child(4) { transition-delay: 1.5s; }
.mc-line.narr { align-self: center; font-style: italic; font-size: 12px; color: var(--muted); background: none; }
.mc-line.ai { align-self: flex-start; background: var(--raised); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }
.mc-line.me { align-self: flex-end; background: linear-gradient(135deg, var(--grad-a), var(--grad-c)); color: #fff; border-bottom-right-radius: 4px; }

/* 聊天背景：一块小屏幕 + 三个可选的背景色板，全部是 CSS 渐变，不用图片 */
.mini-bg { gap: 18px; }
.bg-preview { width: 150px; height: 190px; flex: none; border-radius: 18px; padding: 5px; background: #101015; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset; }
.bg-screen { position: relative; height: 100%; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px; }
.bg-bubble { font-size: 10px; padding: 5px 8px; border-radius: 10px; color: #fff; max-width: 88%; }
.bg-bubble.ai { align-self: flex-start; background: rgba(40,40,52,.85); border-bottom-left-radius: 3px; }
.bg-bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--grad-a), var(--grad-c)); border-bottom-right-radius: 3px; }
.bg-swatches { display: flex; flex-direction: column; gap: 10px; }
.sw { position: relative; width: 84px; height: 52px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; transition: border-color .3s; }
.sw i { position: absolute; left: 8px; bottom: 5px; font-style: normal; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.9); }
.sw.on { border-color: var(--primary); }
.sw.on::after { content: ""; position: absolute; right: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-solid);
  -webkit-mask: none; box-shadow: 0 0 0 2px rgba(255,255,255,.85) inset; }
.bg-night { background:
    radial-gradient(60% 40% at 15% 8%, rgba(121, 104, 238, .55), transparent 70%),
    radial-gradient(50% 36% at 100% 30%, rgba(121, 104, 238, .28), transparent 70%),
    radial-gradient(1.5px 1.5px at 30% 45%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,.5), transparent 100%), #0E0E12; }
.bg-dusk { background: radial-gradient(70% 45% at 50% 70%, rgba(255, 200, 120, .6), transparent 70%), linear-gradient(180deg, #2A1F4E, #6E4A8C 45%, #E08A8A 70%, #FFB65C); }
.bg-mist { background: radial-gradient(60% 50% at 30% 30%, rgba(34, 211, 232, .35), transparent 70%), linear-gradient(180deg, #0F1B2E, #1E3A5F 60%, #7FB3C8); }

.mini-plaza { flex-direction: column; align-items: stretch; gap: 8px; padding: 16px 18px; }
.mp-tabs { display: flex; gap: 14px; padding: 0 4px 4px; font-size: 12.5px; font-weight: 800; color: var(--faint); }
.mp-tabs span { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.mp-tabs span.on { color: var(--ink-strong); border-color: var(--primary); }
.mp-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: var(--r-surface); background: var(--raised); border: 1px solid var(--border-soft); transform: translateX(var(--tx, 0)); transition: transform .8s var(--ease-out), opacity .8s; opacity: 0; --tx: 24px; }
.mp-card .avatar { --av: 30px; }
.mp-card div { flex: 1; min-width: 0; line-height: 1.25; }
.card.in .mp-card { opacity: 1; --tx: 0; }
.card.in .mp-card:nth-child(3) { transition-delay: .15s; } .card.in .mp-card:nth-child(4) { transition-delay: .3s; }
.mp-card b { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink-strong); }
.mp-card i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--primary); background: var(--tonal); padding: 3px 8px; border-radius: var(--r-compact); white-space: nowrap; }

.mini-voice { gap: 14px; color: var(--primary); }
.mini-voice .wave { height: 46px; gap: 4px; }
.mini-voice .wave i { width: 5px; border-radius: 3px; }
.mini-voice b { font-size: 14px; color: var(--muted); }

.mini-toast { align-items: flex-start; padding-top: 34px; }
.toast { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r-surface); background: var(--raised); border: 1px solid var(--border-soft); box-shadow: 0 16px 40px -16px rgba(0,0,0,.6); opacity: 0; transform: translateY(-16px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.card.in .toast { opacity: 1; transform: none; transition-delay: .5s; }
.toast b { display: block; font-size: 13.5px; color: var(--ink-strong); }
.toast i { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

.mini-persona { flex-direction: column; align-items: stretch; gap: 10px; padding: 18px; }
.persona { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-surface); background: var(--raised); border: 1px solid var(--tonal-strong); }
.persona.ghost { border-color: var(--border-soft); opacity: .6; }
.persona div { flex: 1; }
.persona b { display: block; font-size: 13.5px; color: var(--ink-strong); }
.persona i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.persona em { font-style: normal; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: var(--r-compact); background: var(--primary-solid); color: #fff; }
.persona.ghost em { background: var(--tonal); color: var(--primary); }

.mini-person { flex-direction: column; gap: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-control); background: var(--raised); border: 1px solid var(--border-soft); }
.seg span { padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.seg span.on { background: var(--primary-solid); color: #fff; }
.mp-sample { font-size: 14px; font-style: italic; color: var(--muted); }
.mp-sample b { color: var(--primary); font-style: normal; }

.mini-transfer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 26px; }
.mini-transfer .msg { animation: none; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.mini-transfer .msg.transfer { width: 240px; }
.t-actions { display: flex; gap: 8px; opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.t-btn { padding: 7px 16px; border-radius: var(--r-control); font-size: 12.5px; font-weight: 800; color: var(--ink-strong); background: var(--raised); border: 1px solid var(--border-soft); }
.t-btn.primary { background: var(--warning); color: #fff; border-color: transparent; }
.card.in .mini-transfer .msg { opacity: 1; transform: none; transition-delay: .3s; }
.card.in .t-actions { opacity: 1; transform: none; transition-delay: .8s; }

@media (max-width: 1080px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .card-wide { grid-column: auto; } .mini-bg { gap: 14px; } .bg-preview { width: 130px; height: 170px; } }

/* ---------- 即将上线：横向钉住画廊 ---------- */
.worlds { position: relative; height: 100svh; overflow: hidden; }
.worlds-pin { height: 100%; display: flex; flex-direction: column; }
.worlds-head { position: relative; z-index: 2; padding-top: calc(var(--nav-h) + 24px); display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.worlds-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.18; font-weight: 900; color: var(--ink-strong); margin-top: 10px; width: 100%; }
.worlds-head .kicker { width: 100%; color: var(--warm); }
.worlds-hint { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .1em; }
.worlds-track { flex: 1; display: flex; gap: 22px; padding: 28px clamp(24px, 6vw, 80px) 40px; align-items: stretch; will-change: transform; }
.world { position: relative; flex: none; width: min(78vw, 880px); border-radius: var(--r-overlay); overflow: hidden; background: var(--card); border: 1px solid var(--border-soft); display: flex; align-items: flex-end; }
.world-ribbon { position: absolute; z-index: 2; top: 22px; right: 22px; padding: 6px 12px; border-radius: var(--r-compact); font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #3A2A08; background: linear-gradient(135deg, #FFE3AE, #FFB65C); box-shadow: 0 10px 24px -10px rgba(255,182,92,.7); }
.world-body { position: relative; z-index: 1; padding: clamp(24px, 4vw, 44px); max-width: 560px; color: var(--ink); }
.world-body .card-tag.soon { color: var(--warm); background: rgba(255, 200, 120, .14); }
.world-body h3 { margin-top: 14px; font-size: clamp(26px, 3.2vw, 40px); font-weight: 900; letter-spacing: .02em; color: var(--ink-strong); line-height: 1.25; }
.world-body p { margin-top: 10px; font-size: 15.5px; color: var(--muted); }
.world-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.world-chips li { padding: 6px 12px; border-radius: var(--r-full); font-size: 12.5px; font-weight: 700; color: var(--ink-strong); background: var(--tonal); border: 1px solid var(--border-soft); }

/* 群聊预告卡：左上一段群聊，右下文案 */
.world-group { background: radial-gradient(70% 70% at 20% 10%, var(--tonal-strong), transparent), var(--card); }
.group-mock { position: absolute; inset: 28px 28px auto 28px; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.gm-top { display: flex; align-items: center; margin-bottom: 6px; }
.gm-top .avatar { --av: 26px; margin-right: -8px; box-shadow: 0 0 0 2px var(--card); }
.gm-top b { margin-left: 16px; font-size: 13px; color: var(--ink-strong); }
.gm-line { display: flex; align-items: flex-start; gap: 10px; }
.gm-line .avatar { --av: 28px; margin-top: 2px; }
.gm-line div { padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--raised); border: 1px solid var(--border-soft); max-width: 300px; }
.gm-line b { display: block; font-size: 11px; font-weight: 800; color: var(--primary); }
.gm-line i { display: block; font-style: normal; font-size: 12.5px; color: var(--ink); line-height: 1.45; }
.gm-line.me { justify-content: flex-end; }
.gm-line.me div { border-radius: 14px 4px 14px 14px; background: linear-gradient(135deg, var(--grad-a), var(--grad-c)); border: 0; }
.gm-line.me i { color: #fff; }
.world-group .world-body { margin-left: auto; max-width: 400px; padding-top: 300px; }

/* 开放世界的两张预告：纯 CSS/SVG 画的抽象场景，不是任何作品的截图 */
.world-art .art { position: absolute; inset: 0; overflow: hidden; }
/* 场景铺满整张卡，文案压在下半部；用一层同色渐变把字底下的画面压暗 */
.world-art .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--card) 16%, color-mix(in srgb, var(--card) 72%, transparent) 42%, transparent 70%); }
.world-art .world-body { padding-top: 0; }
.art-portal { background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.7), transparent 100%),
    radial-gradient(1px 1px at 28% 62%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 76% 14%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1px 1px at 88% 48%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,.4), transparent 100%),
    radial-gradient(55% 55% at 68% 42%, rgba(140, 121, 255, .55), transparent 70%),
    radial-gradient(40% 40% at 20% 90%, rgba(240, 155, 203, .25), transparent 70%),
    linear-gradient(180deg, #16132C 0%, #0E0E12 100%); }
.art-portal .ring { position: absolute; left: 68%; top: 42%; border-radius: 50%; border: 1px solid rgba(162, 149, 255, .45); translate: -50% -50%; }
.art-portal .r1 { width: 180px; height: 180px; border-width: 2px; box-shadow: 0 0 40px rgba(121, 104, 238, .35), 0 0 0 1px rgba(162,149,255,.15) inset; }
.art-portal .r2 { width: 300px; height: 300px; border-style: dashed; opacity: .7; animation: spinSlow 60s linear infinite; }
.art-portal .r3 { width: 440px; height: 440px; opacity: .35; }
@keyframes spinSlow { to { rotate: 360deg; } }
.art-star { position: absolute; left: 68%; top: 42%; width: 26px; height: 26px; translate: -50% -50%; background: var(--warm);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); filter: none; }
.art-star.s2 { left: 34%; top: 26%; width: 12px; height: 12px; opacity: .8; }
.art-star.s3 { left: 86%; top: 72%; width: 9px; height: 9px; opacity: .6; }
.art-dawn { background:
    radial-gradient(60% 50% at 50% 78%, rgba(255, 200, 120, .45), transparent 70%),
    linear-gradient(180deg, #1B1638 0%, #4A3A7A 38%, #B77A9E 62%, #F1B07A 78%, #0E0E12 78.5%); }
.art-dawn .sun { position: absolute; left: 50%; top: 66%; width: 120px; height: 120px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #FFE3AE, #FFB65C 70%); box-shadow: 0 0 80px rgba(255, 200, 120, .55); }
.art-dawn .horizon { position: absolute; left: 0; right: 0; bottom: 18%; width: 100%; height: 42%; }
.art-dawn .horizon path { fill: #1A1530; }
.art-dawn .horizon path.far { fill: #2A2247; }

.world-end { width: min(70vw, 560px); align-items: center; justify-content: center; background: radial-gradient(80% 80% at 50% 20%, var(--tonal-strong), transparent), var(--card); }
.world-end-inner { text-align: center; padding: 40px; }
.world-end-mark { width: 84px; height: 84px; margin-inline: auto; color: var(--ink-strong); }
.world-end h3 { margin-top: 20px; font-size: 28px; font-weight: 900; color: var(--ink-strong); }
.world-end p { margin-top: 10px; color: var(--muted); }
.world-end .btn { margin-top: 22px; }
@media (max-width: 820px) {
  .worlds { height: auto; overflow: visible; padding-bottom: 40px; }
  .worlds-pin { height: auto; }
  .worlds-track { transform: none !important; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .worlds-track::-webkit-scrollbar { display: none; }
  .world { width: 84vw; height: 560px; scroll-snap-align: center; }
  .world-end, .world-group { width: 84vw; }
  .world-group { height: auto; min-height: 560px; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .group-mock { position: relative; inset: auto; max-width: none; padding: 20px 20px 0; }
  .world-group .world-body { padding-top: 18px; max-width: none; margin-left: 0; }
  .world-art .world-body { padding-top: 200px; }
  .art-portal .ring, .art-star { left: 50%; top: 22%; }
  .art-portal .r3 { width: 360px; height: 360px; }
  .art-portal .art-star.s2 { left: 22%; top: 12%; } .art-portal .art-star.s3 { left: 82%; top: 34%; }
  .art-dawn .sun { top: 24%; }
  .art-dawn { background: radial-gradient(60% 40% at 50% 30%, rgba(255, 200, 120, .45), transparent 70%), linear-gradient(180deg, #1B1638 0%, #4A3A7A 14%, #B77A9E 26%, #F1B07A 34%, #0E0E12 34.5%); }
  .art-dawn .horizon { bottom: 64%; height: 18%; }
  .world-art .art::after { background: linear-gradient(to top, var(--card) 40%, color-mix(in srgb, var(--card) 72%, transparent) 55%, transparent 72%); }
  .worlds-hint { display: none; }
}

/* ---------- 对话设置演示 ---------- */
.chat-demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 60px; align-items: center; }
.settings { margin-top: 36px; border-radius: var(--r-feature); background: var(--card); border: 1px solid var(--border-soft); overflow: hidden; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-top: 1px solid var(--border-soft); }
.setting:first-child { border-top: 0; }
.setting-sub { padding-left: 38px; background: var(--bg-2); transition: opacity .3s; }
.setting-sub.off { opacity: .35; pointer-events: none; }
.setting-text b { display: block; font-size: 15.5px; font-weight: 800; color: var(--ink-strong); }
.setting-text i { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: var(--r-full); background: var(--border); transition: background-color .3s var(--ease); }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .35s var(--ease-out); }
.switch.on { background: var(--primary-solid); }
.switch.on span { transform: translateX(20px); }
.segmented { display: inline-flex; flex: none; padding: 3px; border-radius: var(--r-control); background: var(--sunken); border: 1px solid var(--border-soft); }
.segmented button { padding: 7px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: background-color .3s, color .3s; white-space: nowrap; }
.segmented button.on { background: var(--primary-solid); color: #fff; }
.chat-demo-visual { display: flex; justify-content: center; }
.phone-static { position: relative; --pw: min(340px, 84vw); width: var(--pw); aspect-ratio: 78 / 163.4; }
.phone-static .chat-stream { justify-content: flex-start; padding-top: 10px; }
@media (max-width: 960px) {
  .chat-demo { grid-template-columns: 1fr; gap: 40px; }
  .setting { flex-wrap: wrap; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}

/* ---------- 创作：星座 ---------- */
.constellation { position: relative; margin-top: 60px; }
.const-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.const-path-bg { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 8; vector-effect: non-scaling-stroke; }
/* 发光不用 filter：filter 会让滚动时每一帧都重绘整张 SVG，改成一条更粗的半透明描边垫在下面 */
.const-path-glow { fill: none; stroke: var(--primary); stroke-width: 10; opacity: .18; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.const-path { fill: none; stroke: var(--primary); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
/* 四个节点钉在曲线上：--x / --y 就是路径上那四个点在 viewBox 里的百分比 */
.steps { position: relative; height: 420px; }
.step { position: absolute; left: var(--x); top: var(--y); width: 250px; translate: -50% 0; padding-top: 38px; text-align: center; }
.star-node { position: absolute; left: 50%; top: 0; width: 46px; height: 46px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); color: var(--faint); transition: color .5s, border-color .5s, box-shadow .5s, scale .5s var(--ease-out); }
.star-node svg { width: 22px; height: 22px; fill: currentColor; }
.step.lit .star-node { color: var(--warm); border-color: var(--warm); box-shadow: 0 0 0 6px rgba(255,200,120,.12), 0 0 30px rgba(255,200,120,.35); scale: 1.1; }
.step b { display: block; font-size: 17px; font-weight: 900; color: var(--ink-strong); }
.step p { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.create-foot { margin-top: 30px; display: flex; justify-content: center; }
.publish-card { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-radius: var(--r-feature); background: var(--card); border: 1px solid var(--border-soft); max-width: 680px; }
.badge-ok { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-compact); font-size: 12.5px; font-weight: 800; color: var(--success); background: rgba(40,199,111,.14); }
.publish-card b { display: block; font-size: 15.5px; color: var(--ink-strong); }
.publish-card i { display: block; font-style: normal; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) {
  .const-svg { display: none; }
  .steps { height: auto; display: grid; grid-template-columns: 1fr; gap: 26px; }
  .step { position: static; translate: none; width: auto; padding: 0 0 0 64px; text-align: left; }
  .star-node { left: 0; top: 2px; translate: 0 0; }
  .step.lit .star-node { scale: 1; }
}

/* ---------- 细节 ---------- */
.details { background: linear-gradient(to bottom, var(--bg), var(--bg-2)); }
.detail-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.detail { padding: 26px 24px; border-radius: var(--r-feature); background: var(--card); border: 1px solid var(--border-soft); transition: translate .45s var(--ease), border-color .3s; }
.detail:hover { translate: 0 -4px; border-color: var(--tonal-strong); }
.detail-wide { grid-column: span 3; display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; }
.detail-wide .detail-ic { grid-row: span 2; margin: 0; }
.detail-ic { width: 46px; height: 46px; margin-bottom: 18px; border-radius: var(--r-surface); display: grid; place-items: center; background: var(--tonal); color: var(--primary); }
.detail-ic svg { width: 22px; height: 22px; }
.detail-ic.warm { color: var(--warm); background: rgba(255,200,120,.14); }
.detail b { display: block; font-size: 17px; font-weight: 900; color: var(--ink-strong); }
.detail p { margin-top: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail-wide { grid-column: span 2; } }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } .detail-wide { grid-column: auto; } }

/* ---------- 下载 ---------- */
.download-card { position: relative; overflow: hidden; text-align: center; padding: clamp(48px, 7vw, 90px) 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--border-soft); }
.download-glow { position: absolute; inset: -40% -20% auto; height: 120%; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 40%, var(--glow), transparent 70%); opacity: .8; animation: glowDrift 12s ease-in-out infinite alternate; will-change: transform; }
@keyframes glowDrift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
/* 图标是正圆，用 box-shadow 代替 drop-shadow 滤镜 */
.download-icon { position: relative; margin: 0 auto; width: 120px; height: 120px; border-radius: 50%; box-shadow: 0 20px 40px var(--glow); animation: phoneFloat 6s ease-in-out infinite; }
.download-card h2 { position: relative; margin-top: 28px; font-size: clamp(30px, 4vw, 46px); font-weight: 900; color: var(--ink-strong); }
.download-card > p { position: relative; margin: 14px auto 0; max-width: 520px; color: var(--muted); }
.download-actions { position: relative; margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.qr-row { position: relative; margin: 40px auto 0; display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.qr { width: 112px; height: 112px; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: var(--r-surface); border: 1.5px dashed var(--border); color: var(--faint); }
.qr svg { width: 40px; height: 40px; }
.qr i { font-style: normal; font-size: 11.5px; font-weight: 700; }
.qr-row p { font-size: 13.5px; color: var(--muted); text-align: left; }
@media (max-width: 560px) { .qr-row p { text-align: center; } }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border-soft); background: var(--bg-2); padding-block: 60px 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand .wordmark { margin-top: 14px; }
.footer-brand p { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.mark-light { display: none; }
[data-theme="light"] .mark-dark { display: none; }
[data-theme="light"] .mark-light { display: block; }
.palette { margin-top: 18px; display: flex; gap: 6px; }
.palette span { width: 22px; height: 22px; border-radius: 6px; background: var(--c); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset; transition: translate .3s var(--ease); }
.palette span:hover { translate: 0 -3px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col b { font-size: 13px; letter-spacing: .1em; color: var(--ink-strong); margin-bottom: 6px; }
.footer-col a { font-size: 14px; color: var(--muted); transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--faint); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }

/* ---------- 离站入口：创作中心、充值 ---------- */
.nav-links .nav-out { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.nav-out svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
/* 宽屏上充值是顶栏右侧的按钮；窄屏按钮收起，菜单里补一项 */
.nav-links .nav-out-mobile { display: none; }
@media (max-width: 900px) { .nav-links .nav-out-mobile { display: inline-flex; } }

.create-foot { flex-wrap: wrap; align-items: center; gap: 16px; }

/* ---------- 下载区：版本信息与二维码 ---------- */
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn[aria-disabled="true"]:hover::after { opacity: 0; }
.release-meta { position: relative; margin: 18px auto 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.release-meta li { white-space: nowrap; }
/* 二维码要在任何主题下都扫得出来：白底深色码 */
.qr { width: auto; height: auto; padding: 10px 10px 8px; background: #FFFFFF; border: 1px solid var(--border-soft); color: #6B6880; }
.qr canvas { display: block; width: 96px; height: 96px; }
.qr-row p a { color: var(--primary); }

/* ---------- 404 ---------- */
.missing {
  min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 16px;
  padding: 48px 24px; text-align: center;
  background: radial-gradient(60% 46% at 50% 36%, var(--tonal), transparent 72%);
}
.missing-mark { width: 96px; height: 96px; margin-bottom: 8px; color: var(--ink-strong); overflow: visible; }
.missing-mark .ring {
  fill: none; stroke: currentColor; stroke-width: 82; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: ringDraw 1.15s var(--ease-out) .1s forwards;
}
.missing-mark .star {
  fill: var(--warm); transform-origin: 701px 322px; transform: scale(0); opacity: 0;
  animation: starPop .6s var(--ease-out) 1s forwards;
}
.missing h1 { font-size: clamp(26px, 4.4vw, 40px); font-weight: 900; line-height: 1.25; color: var(--ink-strong); white-space: nowrap; }
.missing p { color: var(--muted); }
.missing .btn { margin-top: 12px; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .loader { display: none; }
  .cursor { display: none; }
}
