/* ==========================================================
   My SW 官网样式（独立站点，不依赖主站任何 CSS）
   - 默认深色，.theme-light 切换浅色
   - 全部图标为内联 SVG symbol，不使用 emoji 与图标字体
   ========================================================== */

:root {
  --bg: #0c0e14;
  --bg-soft: #11141d;
  --bg-card: rgba(255, 255, 255, .035);
  --bg-card-solid: #151824;
  --bg-elev: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e8eaf1;
  --text-2: #aab1c2;
  --text-3: #7d8496;
  --gold: #e6c78a;
  --gold-soft: #f6e6c0;
  --blue: #8fd8ff;
  --violet: #b7a6ff;
  --grad: linear-gradient(115deg, #f6e6c0 0%, #e6c78a 38%, #8fd8ff 100%);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .28);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, .42);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .55);
  --header-bg: rgba(12, 14, 20, .72);
  --header-bg-solid: rgba(12, 14, 20, .9);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --header-h: 64px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, .68, .32, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html.theme-light {
  --bg: #f6f5f1;
  --bg-soft: #fffefa;
  --bg-card: rgba(20, 24, 38, .035);
  --bg-card-solid: #ffffff;
  --bg-elev: rgba(20, 24, 38, .06);
  --line: rgba(20, 24, 38, .12);
  --line-strong: rgba(20, 24, 38, .2);
  --text: #1b1f2a;
  --text-2: #4c5468;
  --text-3: #767e92;
  --gold: #a8813c;
  --gold-soft: #7d5f26;
  --blue: #2f7fa8;
  --violet: #6b57c9;
  --grad: linear-gradient(115deg, #a8813c 0%, #8d6c2c 40%, #2f7fa8 100%);
  --shadow-sm: 0 2px 8px rgba(24, 28, 44, .08);
  --shadow-md: 0 12px 30px rgba(24, 28, 44, .1);
  --shadow-lg: 0 26px 60px rgba(24, 28, 44, .14);
  --header-bg: rgba(246, 245, 241, .74);
  --header-bg-solid: rgba(246, 245, 241, .92);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--mono); font-size: .88em; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico { width: 1.15em; height: 1.15em; flex: none; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: fixed; top: 8px; left: 50%; translate: -50% -160%;
  z-index: 200; padding: 10px 18px; border-radius: 999px;
  background: var(--gold); color: #1a1508; font-weight: 600;
  transition: translate .2s var(--ease);
}
.skip-link:focus-visible { translate: -50% 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: .94rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease),
              background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.btn .ico { width: 1.1em; height: 1.1em; }
.btn-sm { padding: 8px 15px; font-size: .86rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

.btn-primary {
  background: var(--grad); color: #17130a;
  box-shadow: 0 8px 26px rgba(230, 199, 138, .24);
}
html.theme-light .btn-primary { color: #fff; box-shadow: 0 8px 24px rgba(168, 129, 60, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(230, 199, 138, .34); }

.btn-ghost {
  border-color: var(--line-strong); color: var(--text);
  background: var(--bg-card);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.btn-quiet { color: var(--text-2); }
.btn-quiet:hover { color: var(--gold); transform: translateY(-2px); }

.btn:active { transform: translateY(0) scale(.985); }

/* ============ 顶部导航 ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--header-bg-solid);
}

.header-inner { display: flex; align-items: center; gap: 18px; height: 100%; }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #17130a; box-shadow: var(--shadow-sm);
}
html.theme-light .brand-mark { color: #fff; }
.brand-mark .ico { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.02rem; letter-spacing: .02em; }
.brand-text small { font-size: .68rem; color: var(--text-3); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; padding: 8px 13px; border-radius: 999px;
  font-size: .9rem; color: var(--text-2);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-elev); }
.nav-link.is-active { color: var(--gold); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; translate: -50% 0;
  width: 16px; height: 2px; border-radius: 2px; background: var(--gold);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.icon-only {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-2); background: var(--bg-card);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.icon-only:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-1px); }
.icon-only .ico { width: 19px; height: 19px; }

#theme-toggle .ico-light { display: none; }
html.theme-light #theme-toggle .ico-light { display: block; }
html.theme-light #theme-toggle .ico-dark { display: none; }

.nav-toggle { display: none; }


/* ============ Hero ============ */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 56px) 0 96px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero-glow {
  position: absolute; left: 50%; top: -14%; translate: -50% 0;
  width: min(1100px, 130vw); aspect-ratio: 1.6;
  background:
    radial-gradient(46% 46% at 32% 40%, rgba(230, 199, 138, .2), transparent 70%),
    radial-gradient(42% 42% at 70% 52%, rgba(143, 216, 255, .16), transparent 72%),
    radial-gradient(38% 38% at 52% 74%, rgba(183, 166, 255, .12), transparent 74%);
  filter: blur(10px);
}
html.theme-light .hero-glow { opacity: .55; }

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 58% at 50% 34%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 58% at 50% 34%, #000 10%, transparent 78%);
  opacity: .5;
}

.orbit {
  position: absolute; left: 50%; top: 46%; border-radius: 50%;
  border: 1px solid var(--line);
  translate: -50% -50%;
}
.orbit-a { width: 520px; height: 520px; animation: spin 44s linear infinite; }
.orbit-b { width: 780px; height: 780px; border-style: dashed; opacity: .6; animation: spin 78s linear infinite reverse; }
.orbit-c { width: 1080px; height: 1080px; opacity: .4; animation: spin 120s linear infinite; }
.orbit::after {
  content: ""; position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 14px var(--gold);
}
.orbit-b::after { background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.orbit-c::after { background: var(--violet); box-shadow: 0 0 14px var(--violet); }
@keyframes spin { to { rotate: 360deg; } }

.stars { position: absolute; inset: 0; }
.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: var(--text-2); opacity: .5;
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .7; } }

.hero-inner { text-align: center; max-width: 900px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-card);
  font-size: .8rem; letter-spacing: .08em; color: var(--text-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.eyebrow .ico { width: 15px; height: 15px; color: var(--gold); }

.hero-title {
  margin: 0 0 22px; font-size: clamp(2.1rem, 6.2vw, 4.1rem);
  line-height: 1.18; font-weight: 800; letter-spacing: -.015em;
}
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin: 0 auto 34px; max-width: 720px;
  font-size: clamp(.95rem, 1.6vw, 1.07rem); color: var(--text-2); line-height: 1.9;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 34px; }

.hero-badges {
  list-style: none; margin: 0 0 44px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center;
}
.hero-badges li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .84rem; color: var(--text-3);
}
.hero-badges .ico { width: 15px; height: 15px; color: var(--gold); }

.hero-stats {
  margin: 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.hero-stats dt {
  font-size: clamp(1.35rem, 3.4vw, 2rem); font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.hero-stats dd { margin: 4px 0 0; font-size: .78rem; color: var(--text-3); letter-spacing: .04em; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--text-3);
  animation: bob 2.6s ease-in-out infinite;
}
.scroll-hint:hover { color: var(--gold); border-color: var(--gold); }
@keyframes bob { 0%, 100% { translate: -50% 0; } 50% { translate: -50% 7px; } }

/* ============ 区块通用 ============ */
.section { position: relative; padding: 104px 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

.sec-head { max-width: 760px; margin-bottom: 46px; }
.sec-head.is-center { margin-inline: auto; text-align: center; }
.sec-kicker {
  margin: 0 0 10px; font-size: .74rem; font-weight: 700;
  letter-spacing: .22em; color: var(--gold);
}
.sec-head h2 {
  margin: 0 0 14px; font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  line-height: 1.3; font-weight: 800; letter-spacing: -.01em;
}
.sec-desc { margin: 0; color: var(--text-2); font-size: .98rem; line-height: 1.9; }
.sec-desc a { color: var(--gold); border-bottom: 1px solid currentColor; }

.reveal { opacity: 0; translate: 0 22px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* ============ 入口卡片 ============ */
.entry-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px;
}
.entry-card {
  position: relative; display: flex; align-items: flex-start; gap: 14px;
  padding: 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-card);
  overflow: hidden; isolation: isolate;
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.entry-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(120% 100% at 0% 0%, rgba(230, 199, 138, .16), transparent 62%);
  transition: opacity .3s var(--ease);
}
.entry-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.entry-card:hover::before { opacity: 1; }
.entry-card.is-main { border-color: rgba(230, 199, 138, .42); background: linear-gradient(150deg, rgba(230, 199, 138, .12), var(--bg-card) 62%); }

.entry-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--gold);
}
.entry-ico .ico { width: 21px; height: 21px; }

.entry-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.entry-body strong { font-size: .98rem; letter-spacing: .01em; }
.entry-body small { font-size: .8rem; color: var(--text-2); line-height: 1.6; }
.entry-body code {
  margin-top: 3px; font-size: .74rem; color: var(--text-3);
  word-break: break-all; line-height: 1.5;
}
.entry-go { margin-left: auto; flex: none; color: var(--text-3); padding-top: 3px; }
.entry-go .ico { width: 17px; height: 17px; }
.entry-card:hover .entry-go { color: var(--gold); }

.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--text-2); background: var(--bg-elev);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.copy-btn:hover { color: var(--gold); border-color: var(--gold); }
.copy-btn .ico { width: 14px; height: 14px; }
.copy-btn.is-done { color: #6fdc8c; border-color: rgba(111, 220, 140, .5); }

/* ============ 功能卡片 ============ */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feat-card {
  padding: 26px 24px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.feat-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.feat-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 16px; color: var(--gold);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(230, 199, 138, .14), transparent 70%);
}
.feat-ico .ico { width: 23px; height: 23px; }
.feat-card h3 { margin: 0 0 10px; font-size: 1.06rem; font-weight: 700; }
.feat-card p { margin: 0; font-size: .88rem; color: var(--text-2); line-height: 1.85; }
.feat-card code { color: var(--gold); }

.feat-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.feat-tags li {
  padding: 3px 10px; border-radius: 999px; font-size: .72rem; color: var(--text-3);
  border: 1px solid var(--line); background: var(--bg-elev);
}


/* ============ 角色区 ============ */
.char-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 26px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card);
}
.char-search {
  display: flex; align-items: center; gap: 9px; flex: 1 1 260px;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text-3);
}
.char-search .ico { width: 16px; height: 16px; }
.char-search input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--text);
  font: inherit; font-size: .88rem; outline: none;
}
.char-search input::placeholder { color: var(--text-3); }

.char-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.char-filter {
  padding: 6px 13px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-2); background: transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.char-filter:hover { color: var(--text); border-color: var(--line-strong); }
.char-filter.is-active { color: #17130a; border-color: transparent; background: var(--grad); }
html.theme-light .char-filter.is-active { color: #fff; }

.char-count { margin: 0 0 0 auto; font-size: .78rem; color: var(--text-3); white-space: nowrap; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.char-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 12px 15px; border-radius: var(--r-md); text-align: center;
  border: 1px solid var(--line); background: var(--bg-card); overflow: hidden;
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.char-card::after {
  content: ""; position: absolute; inset: auto 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .24s var(--ease);
}
.char-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.char-card:hover::after { opacity: 1; }

.char-ava {
  width: 74px; height: 74px; border-radius: 50%; overflow: hidden; flex: none;
  border: 2px solid var(--line-strong); background: var(--bg-elev);
  display: grid; place-items: center; position: relative;
}
.char-ava img { width: 100%; height: 100%; object-fit: cover; }
.char-ava.is-fallback { color: var(--gold); font-weight: 800; font-size: 1.5rem; }
.char-ava.is-fallback span { line-height: 1; }

.char-name { font-size: .9rem; font-weight: 650; line-height: 1.35; }
.char-from { font-size: .7rem; color: var(--text-3); line-height: 1.4; }
.char-badge {
  position: absolute; top: 9px; right: 9px;
  padding: 2px 7px; border-radius: 999px; font-size: .62rem; letter-spacing: .04em;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-3);
}
.char-empty { margin: 26px 0 0; text-align: center; color: var(--text-3); font-size: .9rem; }

.char-note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 30px; padding: 16px 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-card);
  font-size: .82rem; color: var(--text-2); line-height: 1.8;
}
.char-note .ico { width: 19px; height: 19px; color: var(--gold); margin-top: 3px; }
.char-note p { margin: 0; }

/* ============ 界面预览 ============ */
.preview-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 26px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-card);
}
.ptab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--text-2); transition: color .2s var(--ease), background .2s var(--ease);
}
.ptab .ico { width: 16px; height: 16px; }
.ptab:hover { color: var(--text); }
.ptab.is-active { color: #17130a; background: var(--grad); }
html.theme-light .ptab.is-active { color: #fff; }

.pv-panel[hidden] { display: none; }
.pv-panel { animation: fadeUp .42s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

.mock {
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-card-solid); box-shadow: var(--shadow-lg);
}
.mock-titlebar {
  display: flex; align-items: center; gap: 7px; padding: 11px 15px;
  border-bottom: 1px solid var(--line); background: var(--bg-elev);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.mock-url {
  margin-left: 12px; padding: 4px 14px; border-radius: 999px; flex: 1; max-width: 420px;
  font-size: .74rem; color: var(--text-3); font-family: var(--mono);
  background: var(--bg-card); border: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- 聊天示意 --- */
.mock-body { display: grid; grid-template-columns: 250px 1fr; min-height: 460px; }
.mock-side { border-right: 1px solid var(--line); padding: 14px; background: var(--bg-elev); }
.mock-side-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: .86rem; font-weight: 700;
}
.mock-forum-tag {
  padding: 2px 9px; border-radius: 999px; font-size: .68rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--text-3);
}
.mock-search {
  display: flex; align-items: center; gap: 7px; padding: 7px 11px; margin-bottom: 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-card);
  font-size: .74rem; color: var(--text-3);
}
.mock-search .ico { width: 14px; height: 14px; }
.mock-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mock-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 11px;
  transition: background .2s var(--ease);
}
.mock-list li:hover { background: var(--bg-card); }
.mock-list li.is-active { background: linear-gradient(120deg, rgba(230, 199, 138, .2), transparent); }
.mock-ava { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg-card); }
.mock-ava img { width: 100%; height: 100%; object-fit: cover; }
.mock-meta { min-width: 0; flex: 1; }
.mock-meta b { display: block; font-size: .78rem; font-weight: 650; }
.mock-meta span {
  display: block; font-size: .68rem; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mock-dot-badge {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--gold); opacity: 0;
}
.mock-list li.is-active .mock-dot-badge { opacity: 1; }

.mock-main { display: flex; flex-direction: column; min-width: 0; }
.mock-chat-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg-elev);
}
.mock-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--bg-card); }
.mock-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mock-chat-name { font-size: .9rem; font-weight: 700; }
.mock-chat-sub { font-size: .7rem; color: var(--text-3); }
.mock-head-actions { margin-left: auto; display: flex; gap: 12px; color: var(--text-3); }
.mock-head-actions .ico { width: 17px; height: 17px; }

.mock-msgs {
  flex: 1; padding: 20px 18px; display: flex; flex-direction: column; gap: 13px;
  background:
    radial-gradient(80% 60% at 20% 0%, rgba(230, 199, 138, .07), transparent 60%),
    radial-gradient(70% 60% at 90% 100%, rgba(143, 216, 255, .06), transparent 62%);
  overflow: hidden;
}
.mrow { display: flex; gap: 9px; max-width: 82%; opacity: 0; animation: msgIn .5s var(--ease) forwards; }
.mrow.me { margin-left: auto; flex-direction: row-reverse; }
.mava { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg-card); }
.mava img { width: 100%; height: 100%; object-fit: cover; }
.mava.is-me { display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line-strong); }
.mava.is-me .ico { width: 15px; height: 15px; }
.mbub {
  padding: 9px 13px; border-radius: 14px; font-size: .82rem; line-height: 1.7;
  border: 1px solid var(--line); background: var(--bg-card-solid); color: var(--text-2);
}
.mrow.me .mbub { background: linear-gradient(140deg, rgba(230, 199, 138, .2), rgba(230, 199, 138, .07)); color: var(--text); border-color: rgba(230, 199, 138, .3); }
@keyframes msgIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

.mock-input { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--line); background: var(--bg-elev); }
.mock-input-box {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card);
  font-size: .82rem; color: var(--text); display: flex; align-items: center;
}
.mock-input-box em { font-style: normal; }
.caret { width: 1px; height: 15px; background: var(--gold); margin-left: 1px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-send {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--grad); color: #17130a;
}
html.theme-light .mock-send { color: #fff; }
.mock-send .ico { width: 17px; height: 17px; }

/* --- 视觉小说示意 --- */
.vn-stage { position: relative; aspect-ratio: 16 / 9; min-height: 380px; overflow: hidden; background: #0a0c12; }
.vn-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 22% 24%, rgba(230, 199, 138, .34), transparent 62%),
    radial-gradient(56% 66% at 78% 30%, rgba(143, 216, 255, .28), transparent 64%),
    radial-gradient(70% 60% at 50% 108%, rgba(183, 166, 255, .3), transparent 66%),
    linear-gradient(180deg, #171a26 0%, #0d0f17 60%, #08090e 100%);
  animation: bgDrift 18s ease-in-out infinite alternate;
}
@keyframes bgDrift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); } }

.vn-fig {
  position: absolute; bottom: 0; width: 27%; aspect-ratio: .56;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 58%, transparent);
  border: 1px solid rgba(255, 255, 255, .12); border-bottom: 0;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.vn-fig-l { left: 8%; }
.vn-fig-r { right: 8%; opacity: .55; filter: brightness(.7); }

.vn-box {
  position: absolute; left: 50%; bottom: 5%; translate: -50% 0;
  width: min(86%, 760px); padding: 18px 22px 15px;
  border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(10, 12, 18, .74);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.vn-name {
  position: absolute; top: -14px; left: 20px; padding: 3px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: #17130a; background: var(--grad);
}
.vn-text { margin: 6px 0 12px; font-size: .92rem; line-height: 1.85; color: #e8eaf1; min-height: 3.4em; }
.vn-hint { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .7rem; color: #98a0b2; }
.vn-hint kbd {
  padding: 1px 6px; margin-right: 4px; border-radius: 5px; font-family: var(--mono); font-size: .68rem;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #cfd5e2;
}

/* --- 论坛示意 --- */
.fm-body { display: grid; grid-template-columns: 190px 1fr; min-height: 440px; }
.fm-side { border-right: 1px solid var(--line); padding: 14px 12px; background: var(--bg-elev); }
.fm-brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-weight: 700; font-size: .88rem; }
.fm-brand span { font-size: .7rem; color: var(--text-3); font-weight: 500; }
.fm-nav {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 11px; margin-bottom: 4px; border-radius: 10px;
  font-size: .8rem; color: var(--text-2); text-align: left;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.fm-nav .ico { width: 16px; height: 16px; }
.fm-nav:hover { background: var(--bg-card); color: var(--text); }
.fm-nav.is-active { color: var(--gold); background: linear-gradient(120deg, rgba(230, 199, 138, .18), transparent); }

.fm-main { display: flex; flex-direction: column; min-width: 0; }
.fm-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--bg-elev); }
.fm-head strong { font-size: .9rem; }
.fm-new { padding: 5px 13px; border-radius: 999px; font-size: .74rem; font-weight: 600; color: #17130a; background: var(--grad); }
html.theme-light .fm-new { color: #fff; }
.fm-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.fm-post { padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-card); }
.fm-post-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.fm-post-ava { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg-elev); }
.fm-post-ava img { width: 100%; height: 100%; object-fit: cover; }
.fm-post-name { font-size: .78rem; font-weight: 650; }
.fm-post-board { font-size: .66rem; color: var(--text-3); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); }
.fm-post-time { margin-left: auto; font-size: .66rem; color: var(--text-3); }
.fm-post-title { margin: 0 0 4px; font-size: .84rem; font-weight: 650; }
.fm-post-text { margin: 0; font-size: .76rem; color: var(--text-2); line-height: 1.7; }
.fm-post-foot { display: flex; gap: 14px; margin-top: 8px; font-size: .68rem; color: var(--text-3); }
.fm-post-foot span { display: inline-flex; align-items: center; gap: 4px; }
.fm-post-foot .ico { width: 13px; height: 13px; }


/* ============ 快速开始 ============ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.step:hover { transform: translateX(4px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.step-no {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; font-size: 1.05rem; font-weight: 800;
  color: #17130a; background: var(--grad); box-shadow: var(--shadow-sm);
}
html.theme-light .step-no { color: #fff; }
.step-body { min-width: 0; }
.step-body h3 { margin: 4px 0 8px; font-size: 1.06rem; font-weight: 700; }
.step-body p { margin: 0 0 8px; font-size: .9rem; color: var(--text-2); line-height: 1.85; }
.step-body p:last-child { margin-bottom: 0; }
.step-body a { color: var(--gold); border-bottom: 1px solid rgba(230, 199, 138, .4); }
.step-body code {
  padding: 1px 6px; border-radius: 5px; font-size: .8em; color: var(--gold);
  border: 1px solid var(--line); background: var(--bg-elev);
}
.step-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 10px !important; padding: 10px 13px; border-radius: var(--r-sm);
  font-size: .8rem !important; color: var(--text-3) !important;
  border: 1px dashed var(--line-strong); background: var(--bg-elev);
}
.step-tip .ico { width: 15px; height: 15px; color: var(--gold); margin-top: 3px; }
.step-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  font-size: .84rem; font-weight: 650; color: var(--gold);
}
.step-link .ico { width: 16px; height: 16px; transition: translate .2s var(--ease); }
.step-link:hover .ico { translate: 4px 0; }

.billing {
  margin-top: 30px; padding: 28px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--bg-card);
}
.billing > h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; font-size: 1.05rem; font-weight: 700; }
.billing > h3 .ico { width: 19px; height: 19px; color: var(--gold); }
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.bill-item { padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-elev); }
.bill-item strong { display: block; margin-bottom: 7px; font-size: .92rem; color: var(--gold); }
.bill-item p { margin: 0; font-size: .82rem; color: var(--text-2); line-height: 1.8; }
.billing-note { margin: 18px 0 0; font-size: .8rem; color: var(--text-3); }

/* ============ FAQ ============ */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-card); overflow: hidden;
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 20px; cursor: pointer; list-style: none;
  font-size: .95rem; font-weight: 650;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold); }
.faq-plus { width: 17px; height: 17px; color: var(--gold); flex: none; transition: rotate .3s var(--ease); }
.faq-item[open] .faq-plus { rotate: 45deg; }
.faq-chev { width: 17px; height: 17px; margin-left: auto; color: var(--text-3); flex: none; transition: rotate .3s var(--ease); }
.faq-item[open] .faq-chev { rotate: 180deg; }
.faq-body { padding: 0 20px 20px 49px; }
.faq-body p { margin: 0; font-size: .88rem; color: var(--text-2); line-height: 1.9; }
.faq-body code { padding: 1px 6px; border-radius: 5px; color: var(--gold); border: 1px solid var(--line); background: var(--bg-elev); font-size: .84em; }

/* ============ 社区 ============ */
.comm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.comm-card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  padding: 26px 24px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: transform .24s var(--ease), border-color .24s var(--ease), box-shadow .24s var(--ease);
}
.comm-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.comm-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 6px; color: var(--gold); border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(230, 199, 138, .14), transparent 70%);
}
.comm-ico .ico { width: 23px; height: 23px; }
.comm-card h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.comm-id { margin: 0; font-family: var(--mono); font-size: .78rem; color: var(--gold); word-break: break-all; }
.comm-card p:not(.comm-id) { margin: 0; font-size: .84rem; color: var(--text-2); line-height: 1.8; }
.comm-go {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  font-size: .84rem; font-weight: 650; color: var(--gold);
}
.comm-go .ico { width: 16px; height: 16px; transition: translate .2s var(--ease); }
.comm-card:hover .comm-go .ico { translate: 4px 0; }
.comm-card .copy-btn { margin-top: 10px; }

.cta-final {
  margin-top: 60px; padding: 54px 32px; text-align: center;
  border-radius: var(--r-xl); border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 130% at 50% 0%, rgba(230, 199, 138, .14), transparent 68%),
    var(--bg-card);
  position: relative; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5;
}
.cta-final h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; }
.cta-final p { margin: 0 0 28px; color: var(--text-2); font-size: .96rem; }
.cta-final-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 56px 0 26px; }
.footer-inner { display: grid; grid-template-columns: minmax(240px, 1.2fr) 2fr; gap: 40px; padding-bottom: 34px; }
.footer-brand { display: flex; gap: 13px; align-items: flex-start; }
.footer-brand strong { font-size: 1.05rem; letter-spacing: .02em; }
.footer-brand p { margin: 5px 0 0; font-size: .82rem; color: var(--text-3); line-height: 1.7; }

.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fcol { display: flex; flex-direction: column; gap: 9px; }
.fcol h4 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; }
.fcol a, .fcol .fstatic, .fcol .flink {
  font-size: .85rem; color: var(--text-2); text-align: left;
  transition: color .2s var(--ease);
}
.fcol a:hover, .fcol .flink:hover { color: var(--gold); }
.fcol .fstatic { color: var(--text-3); cursor: default; }
.fcol .flink { padding: 0; }

.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; }
.footer-bottom p { margin: 0 0 8px; font-size: .76rem; color: var(--text-3); line-height: 1.85; }
.foot-copy { text-align: right; letter-spacing: .06em; }

/* ============ 回到顶部 / 提示条 / 弹窗 ============ */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--bg-card-solid); color: var(--text-2);
  box-shadow: var(--shadow-md);
  transition: color .2s var(--ease), border-color .2s var(--ease), translate .2s var(--ease), opacity .25s var(--ease);
}
.to-top:hover { color: var(--gold); border-color: var(--gold); translate: 0 -3px; }
.to-top[hidden] { display: grid; opacity: 0; pointer-events: none; translate: 0 12px; }
.to-top .ico { width: 20px; height: 20px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; translate: -50% 0; z-index: 300;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-card-solid);
  box-shadow: var(--shadow-lg); font-size: .86rem; font-weight: 600;
  animation: toastIn .3s var(--ease) both;
}
.toast .ico { width: 16px; height: 16px; color: #6fdc8c; }
.toast.is-out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; translate: -50% 14px; } to { opacity: 1; translate: -50% 0; } }
@keyframes toastOut { to { opacity: 0; translate: -50% 14px; } }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 22px; }
.modal-mask { position: absolute; inset: 0; background: rgba(4, 5, 9, .68); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fadeIn .25s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box {
  position: relative; width: min(720px, 100%); max-height: min(84svh, 760px);
  display: flex; flex-direction: column;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--bg-card-solid); box-shadow: var(--shadow-lg);
  padding: 26px 28px; animation: modalIn .3s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; translate: 0 18px; scale: .97; } }
.modal-box h2 { margin: 0 0 16px; font-size: 1.2rem; font-weight: 800; padding-right: 34px; }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-3);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.modal-close:hover { color: var(--gold); border-color: var(--gold); }
.modal-close .ico { width: 17px; height: 17px; }
.modal-body { overflow-y: auto; padding-right: 6px; }
.modal-body h3 { margin: 18px 0 7px; font-size: .95rem; color: var(--gold); font-weight: 700; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 0 0 10px; font-size: .86rem; color: var(--text-2); line-height: 1.9; }
.modal-body a { color: var(--gold); border-bottom: 1px solid currentColor; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .mock-body { grid-template-columns: 200px 1fr; }
  .fm-body { grid-template-columns: 160px 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 14px 18px 20px;
    background: var(--header-bg-solid);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; translate: 0 -12px;
    transition: opacity .26s var(--ease), translate .26s var(--ease), visibility .26s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; translate: 0 0; }
  .nav-link { padding: 12px 14px; border-radius: var(--r-sm); font-size: .95rem; }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { background: var(--bg-elev); }
  .nav-toggle { display: grid; }
  .header-actions .btn-sm span { display: none; }
  .header-actions .btn-sm { padding: 9px 12px; }

  .hero { min-height: auto; padding: calc(var(--header-h) + 46px) 0 76px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .section { padding: 72px 0; }
  .mock-body, .fm-body { grid-template-columns: 1fr; }
  .mock-side, .fm-side { display: none; }
  .mock-msgs { min-height: 340px; }
  .vn-stage { aspect-ratio: 4 / 3; min-height: 320px; }
  .vn-fig { width: 34%; }
  .vn-box { width: 92%; padding: 16px; }
  .vn-hint { display: none; }
  .step { flex-direction: column; gap: 12px; padding: 20px; }
  .faq-body { padding-left: 20px; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .foot-copy { text-align: left; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .brand-text small { display: none; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .char-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); }
  .char-count { margin-left: 0; width: 100%; }
  .footer-cols { grid-template-columns: 1fr; }
  .cta-final { padding: 40px 20px; }
  .to-top { right: 14px; bottom: 14px; }
}

/* ============ 减少动效 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; translate: none; }
  .orbit, .stars i, .hero-glow, .vn-bg { animation: none !important; }
}
