/* 小寻 · AI 订阅 —— 与 ansyn.me 同一套视觉：近白底、黑字、电光蓝、等宽细节 */

:root {
  --bg: #FCFCFB;
  --surface: #FFFFFF;
  --sunk: #F3F3F1;
  --ink: #0F0F0F;
  --ink-2: #686866;
  --ink-3: #A5A5A1;
  --line: #E7E7E3;
  --accent: #2E5BFF;
  --accent-soft: #EAF0FF;
  --on-accent: #FFFFFF;
  --ok: #1F9D55;
  --shadow: 0 1px 2px rgba(15,15,15,.04), 0 12px 32px -18px rgba(15,15,15,.18);

  --sans: ui-sans-serif, -apple-system, system-ui, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0D0E;
    --surface: #151517;
    --sunk: #1C1C1F;
    --ink: #F2F2F0;
    --ink-2: #A3A3A0;
    --ink-3: #66666A;
    --line: #29292D;
    --accent: #6B8BFF;
    --accent-soft: #1A2140;
    --on-accent: #0D0D0E;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }

/* ── 按钮：胶囊 + 按压回弹 ─────────────── */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: .01em;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.3,.7,.4,1.4), background-color .18s, color .18s, border-color .18s, box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--accent); color: var(--on-accent); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { box-shadow: 0 8px 22px -10px var(--accent); }
.btn-line { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-line:hover { background: var(--accent-soft); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .arr { font-family: var(--mono); font-weight: 500; transition: transform .2s; }
.btn:hover .arr { transform: translate(2px, -2px); }

/* ── 公告条 ───────────────────────────── */
.announce { padding: 10px 16px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; }
.notice {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 9px 16px; background: var(--sunk); font-size: 13px; color: var(--ink-2); text-align: center;
}
.notice-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font: 12px/1.4 var(--mono); }
.notice-steps li { display: flex; align-items: center; gap: 7px; }
.notice-steps li + li::before { content: "→"; margin-right: 17px; color: var(--ink-3); }
.notice-steps b { font-weight: 500; color: var(--accent); }
@media (max-width: 560px) {
  .notice { padding: 8px 10px; }
  .notice-steps { gap: 4px 10px; font-size: 11px; }
  .notice-steps li { gap: 4px; }
  .notice-steps li + li::before { margin-right: 6px; }
}

/* ── 顶栏 ─────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; height: 76px; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo .mark { display: block; width: 28px; height: 28px; transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.logo .mark svg { display: block; width: 100%; height: 100%; }
.logo:hover .mark { transform: rotate(-12deg); }
.logo b { font: 800 24px/1 var(--sans); letter-spacing: -.02em; }
.logo span { font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.top-end { justify-self: end; display: flex; align-items: center; gap: 14px; }
.lang-btn { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 12px/1 var(--mono); letter-spacing: .04em; cursor: pointer; transition: color .15s, border-color .15s; }
.lang-btn:hover { color: var(--ink); border-color: var(--ink-3); }
/* 中英双份的长段落：只显示当前语言那份 */
html[lang="en"] [data-l="zh"], html:not([lang="en"]) [data-l="en"] { display: none !important; }
html.i18n-wait body { visibility: hidden; }
.nav a { position: relative; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; right: 5px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); }
.status { display: flex; align-items: center; gap: 8px; font: 12px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: ping 2.4s infinite; }
.status.off .dot { background: var(--ink-3); animation: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; }

/* ── 区块 ─────────────────────────────── */
.section { padding: 88px 0 0; scroll-margin-top: 80px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.sec-head h2 { margin: 10px 0 0; font: 800 clamp(28px, 4vw, 40px)/1.15 var(--sans); letter-spacing: -.02em; }
.sec-head p { margin: 10px 0 0; color: var(--ink-2); }

/* ── 卡片 ─────────────────────────────── */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }

/* ── 表单 ─────────────────────────────── */
.field { display: block; margin-top: 18px; }
.field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field > span small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 16px/1.4 var(--sans); transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 13px 16px; resize: vertical; }
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: #E5484D; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--sunk); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 10px; border-radius: 10px; text-align: center; font-size: 14px; color: var(--ink-2); transition: background-color .18s, color .18s, box-shadow .18s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 14px 0 0; font-size: 14px; color: #E5484D; }
.form-note { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }

/* ── 联系浮窗 ─────────────────────────── */
.fab {
  position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  box-shadow: 0 12px 28px -10px var(--accent);
  transition: transform .2s cubic-bezier(.3,.7,.4,1.4);
}
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: scale(.92); }
.fab svg { width: 24px; height: 24px; }
.pop {
  position: fixed; right: 24px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 50;
  width: min(320px, calc(100vw - 32px)); padding: 18px; border-radius: 22px;
  background: var(--surface); box-shadow: 0 24px 60px -20px rgba(0,0,0,.35); border: 1px solid var(--line);
  transform-origin: bottom right; animation: pop .22s cubic-bezier(.3,.7,.4,1.2);
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(8px); } }
.pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pop-head b { font-size: 16px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.pop a, .pop button[data-copy-qq] { width: 100%; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.pop-hint { font-size: 12px; color: var(--ink-2); }
.pop a, .pop button[data-copy-qq] { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin-top: 8px; border-radius: 14px; background: var(--sunk); text-decoration: none; font-size: 15px; transition: background-color .15s, transform .15s; }
.pop a:hover, .pop button[data-copy-qq]:hover { background: var(--accent-soft); }
.pop a:active, .pop button[data-copy-qq]:active { transform: scale(.98); }
.pop a span:last-child { font-family: var(--mono); color: var(--ink-2); }
.pop p { margin: 12px 2px 0; font-size: 12px; color: var(--ink-3); }

/* ── 页脚 ─────────────────────────────── */
main { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

/* ── 提示 ─────────────────────────────── */
.toast {
  position: fixed; left: 50%; top: 20px; z-index: 100; transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px;
  transition: opacity .2s, transform .2s cubic-bezier(.3,.7,.4,1.3); max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 手机 ─────────────────────────────── */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .top-inner { display: flex; height: 64px; gap: 12px; }
  .menu-btn { display: grid; }
  .top-end { margin-left: auto; gap: 10px; }
  .status .tm { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; font-size: 17px; }
  .nav a + a { border-top: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { right: 4px; }
  .section { padding-top: 64px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .pop { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
