/* =========================================================
   云链库 LinkPan — UI 原型样式
   仅静态样式，无外部依赖
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f7f9fe;
  --text: #0b1220;
  --text-2: #3d4760;
  --muted: #79839b;
  --line: #e6eaf3;
  --line-2: #d7deec;
  --accent: #2f5bff;
  --accent-2: #6a5af9;
  --accent-soft: #edf1ff;
  --accent-line: #d3ddff;
  --baidu: #2a35d8;
  --baidu-soft: #eef0ff;
  --quark: #6752f5;
  --quark-soft: #f2efff;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow-md: 0 22px 44px -26px rgba(11, 18, 32, .45);
  --shadow-lg: 0 30px 60px -30px rgba(47, 91, 255, .35);
  --radius: 18px;
  --toast-bg: #0b1220;
  --toast-text: #f4f7ff;
  --ring: rgba(47, 91, 255, .28);
}

[data-theme="dark"] {
  --bg: #070b14;
  --surface: #0e1422;
  --surface-2: #111829;
  --text: #e9eefb;
  --text-2: #b7c1d7;
  --muted: #7f8aa3;
  --line: #1d2537;
  --line-2: #2a3448;
  --accent: #7b96ff;
  --accent-2: #a294ff;
  --accent-soft: #141c33;
  --accent-line: #253256;
  --baidu: #8f98ff;
  --baidu-soft: #161b33;
  --quark: #ab98ff;
  --quark-soft: #1a1633;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 24px 50px -28px rgba(0, 0, 0, .9);
  --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, .9);
  --toast-bg: #f4f7ff;
  --toast-text: #0b1220;
  --ring: rgba(123, 150, 255, .35);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
               "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(900px 460px at 6% -10%, rgba(47, 91, 255, .13), transparent 62%),
    radial-gradient(820px 420px at 96% -14%, rgba(106, 90, 249, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background:
    radial-gradient(900px 460px at 6% -10%, rgba(47, 91, 255, .22), transparent 62%),
    radial-gradient(820px 420px at 96% -14%, rgba(140, 90, 255, .18), transparent 60%),
    var(--bg);
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, kbd { font-family: "SF Mono", ui-monospace, "JetBrains Mono", Consolas, monospace; }

[hidden] { display: none !important; }

.wrap {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

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

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, box-shadow .18s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px -12px rgba(47, 91, 255, .8);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(47, 91, 255, .85); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text-2);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px -10px rgba(47, 91, 255, .9);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { display: flex; align-items: baseline; gap: 7px; line-height: 1; }
.brand-text strong { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.brand-text em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}
.nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.nav a.is-active { color: var(--text); font-weight: 600; }

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-2);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.icon-btn svg { width: 18px; height: 18px; }

/* 浅色模式显示「月亮」= 切到深色，深色模式显示「太阳」= 切回浅色 */
.theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 62px 0 40px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: .01em;
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #20c47a;
  box-shadow: 0 0 0 0 rgba(32, 196, 122, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(32, 196, 122, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(32, 196, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(32, 196, 122, 0); }
}

.hero h1 {
  margin: 0;
  max-width: 15em;
  font-size: clamp(2.05rem, 4.6vw, 3.45rem);
  line-height: 1.14;
  letter-spacing: -.035em;
  font-weight: 700;
  text-wrap: balance;
}
.grad {
  color: #2f5bff;
  background: linear-gradient(96deg, #2f5bff 0%, #6a5af9 48%, #00a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 15.5px;
  color: var(--text-2);
}

/* 搜索框 */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(620px, 100%);
  margin-top: 30px;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 40px -26px rgba(11, 18, 32, .5);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--ring), 0 18px 40px -26px rgba(11, 18, 32, .5);
}
.search-ico { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.search input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14.5px;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  display: none;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}
@media (hover: hover) and (min-width: 720px) {
  .search kbd { display: block; }
}
.search .btn { height: 40px; padding-inline: 22px; border-radius: 11px; }

/* 热门词 */
.hot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.hot button {
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .16s ease;
}
.hot button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

/* 数据 */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 38px 0 0;
  padding: 20px 4px 0;
  border-top: 1px solid var(--line);
}
.stats > div {
  flex: 1 1 120px;
  padding-right: 18px;
}
.stats dt {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .02em;
}
.stats dd {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stats dd small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* ---------- 工具条 ---------- */
.catalog { padding: 26px 0 10px; scroll-margin-top: 88px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.seg:hover { color: var(--text); }
.seg.is-active {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  box-shadow: var(--shadow-sm), 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-baidu { background: var(--baidu); }
.dot-quark { background: var(--quark); }

.toolbar-right { display: flex; align-items: center; gap: 10px; }

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}
.sort select {
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding-right: 14px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 8px) 55%, calc(100% - 3px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .16s ease;
}
.chip:hover { border-color: var(--line-2); color: var(--text); background: var(--surface); }
.chip.is-active {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  font-weight: 600;
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.result-line .hint { display: inline-flex; align-items: center; gap: 5px; }
.result-line .hint svg { width: 13px; height: 13px; }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2, .7, .3, 1),
              box-shadow .22s ease, border-color .22s ease;
  animation: rise .45s cubic-bezier(.2, .7, .3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.card-head { display: flex; gap: 13px; align-items: flex-start; }

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  overflow: hidden;
  box-shadow: 0 8px 16px -12px rgba(11, 18, 32, .8);
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, .28), transparent 55%);
  pointer-events: none;
}
.thumb span { position: relative; z-index: 1; }

.tone-blue    { background: linear-gradient(140deg, #4b7bff, #2b3ed8); }
.tone-violet  { background: linear-gradient(140deg, #8c6bff, #5333d6); }
.tone-emerald { background: linear-gradient(140deg, #2fbf8a, #128a70); }
.tone-amber   { background: linear-gradient(140deg, #ffb545, #e2761b); }
.tone-rose    { background: linear-gradient(140deg, #ff7a94, #d93b66); }
.tone-cyan    { background: linear-gradient(140deg, #43c6f0, #1479c9); }
.tone-slate   { background: linear-gradient(140deg, #7c8aa5, #46536b); }

.head-text { min-width: 0; }
.card-title {
  margin: 1px 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card-meta .cat {
  padding: 1px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-2);
  font-size: 11.5px;
}
.sep { color: var(--line-2); }
.card-meta .hot-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--muted);
}
.hot-count svg { width: 12px; height: 12px; }

/* 起始页入口（有 start 字段时出现） */
.start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  border-radius: 11px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 22px -14px rgba(47, 91, 255, .95);
  transition: transform .16s ease, box-shadow .16s ease;
}
.start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -14px rgba(47, 91, 255, .95);
}
.start-btn:active { transform: translateY(0); }
.start-btn svg { width: 14px; height: 14px; }

/* 提取码 */
.code-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  background: var(--surface-2);
}
.code-key { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.code-row code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--text);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: all .16s ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.is-done { color: #128a5b; border-color: #b6e6d2; background: #ebfaf3; }
[data-theme="dark"] .copy-btn.is-done { color: #6ee0b0; border-color: #1f4d3d; background: #0f2a22; }

/* 平台按钮 */
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}
.actions.is-single { grid-template-columns: 1fr; }

.dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease,
              border-color .16s ease, box-shadow .16s ease;
}
.dl svg { width: 14px; height: 14px; opacity: .9; }
.dl:hover { transform: translateY(-1px); }
.dl:active { transform: translateY(0); }

.dl-baidu { color: var(--baidu); background: var(--baidu-soft); border-color: color-mix(in srgb, var(--baidu) 22%, transparent); }
.dl-baidu:hover { border-color: color-mix(in srgb, var(--baidu) 45%, transparent); box-shadow: 0 8px 18px -14px var(--baidu); }

.dl-quark { color: var(--quark); background: var(--quark-soft); border-color: color-mix(in srgb, var(--quark) 22%, transparent); }
.dl-quark:hover { border-color: color-mix(in srgb, var(--quark) 45%, transparent); box-shadow: 0 8px 18px -14px var(--quark); }

/* 空状态 */
.empty {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 64px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.empty svg { width: 36px; height: 36px; color: var(--line-2); }
.empty p { margin: 0; font-size: 14px; }

/* ---------- 使用说明 ---------- */
.how {
  padding: 78px 0 26px;
  scroll-margin-top: 80px;
}
.how-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.how-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.02em;
}
.how-head p { margin: 0; font-size: 13px; color: var(--muted); }

.how-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.how-list li { position: relative; }
.how-list .num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.how-list h3 { margin: 7px 0 5px; font-size: 15px; font-weight: 600; }
.how-list p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ---------- 提交入口 ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 54px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(420px 180px at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--surface);
  scroll-margin-top: 90px;
}
.cta h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.cta p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  scroll-margin-top: 80px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 40px 0 26px;
}
.footer-brand strong { font-size: 15px; letter-spacing: -.01em; }
.footer-brand p {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-content: flex-start;
  font-size: 13px;
  color: var(--text-2);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 100;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .header-actions { margin-left: auto; }
  .how-list { grid-template-columns: 1fr; gap: 22px; }
  .how-list li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; }
  .how-list .num { grid-row: span 2; padding-top: 3px; }
  .how-list h3 { margin-top: 0; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 40px 0 28px; }
  .hero h1 { max-width: none; font-size: clamp(1.75rem, 7.6vw, 2.4rem); }
  .lede { font-size: 14.5px; }
  .search { padding-left: 13px; }
  .search .btn { padding-inline: 16px; }
  .stats { margin-top: 28px; padding-top: 16px; gap: 14px 0; }
  .stats > div { flex-basis: 50%; }
  .stats dd { font-size: 21px; }
  .toolbar { gap: 10px; }
  .segmented { width: 100%; }
  .seg { flex: 1; justify-content: center; padding: 0 8px; }
  .toolbar-right { width: 100%; justify-content: flex-end; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .result-line { font-size: 12px; }
  .result-line .hint { display: none; }

  /* 手机端分类做成单行横滑，避免 8 个标签堆三行 */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  .footer-inner { padding: 30px 0 20px; }
  .toast { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
