/* BuddyWorld 样式表 · 深海
   默认是浅色：接近白色、带一点冷调的细网格底，网格线很淡；深色是接近黑色的炭灰，四周压暗，底部透出一点冷灰色的光。
   选过深色的访客记在 localStorage 的 bw-theme 里，下次打开还是深色。
   背景里的星点和检索框四周的光晕都由 /assets/js/garden.js 用 three.js 画在固定的画布上；
   毛玻璃只用在检索框、History 按钮和首页的页头卡片上，内容靠半透明的底色、细分隔线和留白来组织，文字保持清楚 */

:root {
  --bg: #f8f9fb;
  --ink: #121418;
  --text: #1d2026;
  --text-2: #4b505a;
  --muted: #6b717c;
  --line: rgba(20, 28, 45, 0.08);
  --line-2: rgba(20, 28, 45, 0.14);
  /* 内容的底色：白色，半透明但足够实，文字对比度按不透明的底色算 */
  --surface: rgba(255, 255, 255, 0.82);
  --surface-hover: rgba(255, 255, 255, 0.96);
  --surface-solid: #fff;
  --surface-2: rgba(236, 239, 244, 0.72);
  /* 直接浮在背景上的小控件（往下看的提示、检索时的结果说明）：比卡片更透一点 */
  --float: rgba(255, 255, 255, 0.65);
  --soft: rgba(30, 45, 75, 0.05);
  /* 毛玻璃：检索框、History 按钮和首页页头 */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(20, 28, 45, 0.1);
  --glass-hi: rgba(255, 255, 255, 0.9);
  /* 石墨灰：主按钮、选中的筛选；深灰：链接和小图标；glow 是少数几个发光的小圆点，用蓝色 */
  --accent: #1a1d23;
  --accent-2: #4d5462;
  --on-accent: #f7f8fa;
  --glow: #5b8def;
  --ring: rgba(70, 100, 160, 0.2);
  --header-bg: rgba(248, 249, 251, 0.8);
  --shadow: 0 1px 2px rgba(20, 28, 45, 0.04), 0 14px 34px -26px rgba(20, 28, 45, 0.35);
  --shadow-lg: 0 26px 60px -32px rgba(20, 28, 45, 0.45);
  /* 价格与属性标签：都是压低饱和度的颜色，在浅色底上对比度不低于 4.5:1 */
  --free: #2f6b4f;
  --free-bg: rgba(60, 150, 110, 0.12);
  --freemium: #3d5f7a;
  --freemium-bg: rgba(70, 120, 170, 0.12);
  --paid: #7a5a24;
  --paid-bg: rgba(180, 130, 50, 0.13);
  --cn: #8a4a46;
  --cn-bg: rgba(180, 90, 80, 0.11);
  --oss: #4f4f8a;
  --oss-bg: rgba(100, 100, 190, 0.12);
  --danger: #a3403a;
  --radius: 14px;
  --radius-lg: 18px;
  --header-h: 60px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  /* 等宽字体只给拉丁字母和数字用，中文落到后面的黑体上 */
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, "Liberation Mono", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", monospace;
  /* 页脚那句话用的衬线体（不加载网络字体，用系统里有的） */
  --serif: "Iowan Old Style", Charter, Georgia, "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Noto Serif CJK SC", STSong,
    SimSun, serif;
  color-scheme: light;
}

html.dark {
  --bg: #18191d;
  --ink: #f5f6f8;
  --text: #e5e7eb;
  --text-2: #b5b9c2;
  --muted: #959aa4;
  --line: rgba(225, 230, 240, 0.11);
  --line-2: rgba(225, 230, 240, 0.19);
  --surface: rgba(32, 33, 38, 0.78);
  --surface-hover: rgba(40, 42, 48, 0.92);
  --surface-solid: #1f2025;
  --surface-2: rgba(58, 61, 70, 0.55);
  --float: rgba(32, 33, 38, 0.58);
  --soft: rgba(230, 235, 245, 0.07);
  --glass: rgba(42, 44, 51, 0.4);
  --glass-line: rgba(230, 235, 245, 0.16);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --accent: #eef0f3;
  --accent-2: #cbd0d8;
  --on-accent: #16171a;
  --glow: #8fb4ff;
  --ring: rgba(205, 213, 230, 0.22);
  --header-bg: rgba(24, 25, 29, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 14px 34px -24px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 26px 60px -28px rgba(0, 0, 0, 0.85);
  --free: #8fd3b0;
  --free-bg: rgba(110, 200, 160, 0.11);
  --freemium: #93bde0;
  --freemium-bg: rgba(120, 170, 220, 0.11);
  --paid: #e0bd85;
  --paid-bg: rgba(220, 175, 110, 0.11);
  --cn: #e3a59c;
  --cn-bg: rgba(225, 150, 135, 0.11);
  --oss: #b7b8f0;
  --oss-bg: rgba(170, 172, 240, 0.11);
  --danger: #ef9f94;
  color-scheme: dark;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(91, 141, 239, 0.25); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
mark { background: rgba(120, 160, 240, 0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
html.dark mark { background: rgba(110, 150, 235, 0.3); }

.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
/* 只给读屏软件和搜索引擎看的文字 */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { left: 16px; top: 12px; z-index: 100; padding: 8px 14px; border-radius: 999px; background: var(--surface-solid); box-shadow: var(--shadow); }

/* ---------- 背景：深海与细网格 ---------- */
/* garden.js 的画布出来之前、或者浏览器不支持 WebGL2 时，露出的是这层渐变和网格（格子和画布上的字符格一样大） */
.garden-bg {
  --cell: 14px;
  position: fixed; left: 0; top: 0; z-index: -1; width: 100%; height: 100vh; height: 100lvh; pointer-events: none;
  background:
    radial-gradient(60% 46% at 50% 44%, rgba(237, 240, 246, 0.4), transparent 70%),
    radial-gradient(80% 40% at 50% 112%, rgba(226, 232, 243, 0.45), transparent 70%),
    linear-gradient(rgba(153, 163, 184, 0.09) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(90deg, rgba(153, 163, 184, 0.09) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(180deg, #f8f9fb 0%, #f4f6f9 100%);
}
html.dark .garden-bg {
  background:
    radial-gradient(60% 46% at 50% 44%, rgba(64, 69, 87, 0.2), transparent 70%),
    radial-gradient(80% 40% at 50% 112%, rgba(41, 48, 69, 0.5), transparent 70%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.5)),
    linear-gradient(rgba(158, 168, 189, 0.06) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(90deg, rgba(158, 168, 189, 0.06) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(180deg, #141518 0%, #1a1b1f 100%);
}
@media (max-width: 700px) {
  .garden-bg { --cell: 12px; }
}
.garden-bg canvas { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.garden-bg canvas.on { opacity: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn small { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 22px -14px rgba(20, 28, 45, 0.5); }
.btn-primary:hover { filter: brightness(1.1); }
html.dark .btn-primary { box-shadow: none; }
html.dark .btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent-2); }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; font-size: 18px; color: var(--text-2);
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--soft); color: var(--text); }

/* ---------- 页头 ---------- */
/* 半透明加模糊；主导航在正中（版式参考 DeepTutor），页头比内容宽一些，两边的品牌和按钮离导航远一点 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  transition: background-color 0.35s, border-color 0.35s;
}
.header-inner { position: relative; display: flex; align-items: center; gap: 28px; max-width: 1440px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; }
.main-nav { position: absolute; left: 50%; display: flex; gap: 2px; transform: translateX(-50%); }
.main-nav a { position: relative; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--text-2); transition: color 0.2s, background-color 0.2s; }
.main-nav a:hover { color: var(--text); background: var(--soft); }
.main-nav a.active { color: var(--ink); font-weight: 600; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent-2);
}
/* 页头搜索框夹在居中的导航和右边的按钮之间，宽度跟着窗口变；窗口再窄就换成搜索图标（见响应式） */
.header-search { position: relative; width: min(240px, calc(50vw - 510px)); margin-left: auto; display: flex; align-items: center; }
.header-search .suggest { left: auto; width: 360px; }
.header-search > .icon { position: absolute; left: 13px; font-size: 15px; color: var(--muted); pointer-events: none; }
.header-search input {
  width: 100%; height: 36px; padding: 0 14px 0 36px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-search + .header-actions { margin-left: 0; }
.submit-link { margin-left: 6px; }
.search-link, .menu-btn { display: none; }
.when-dark { display: none; }
html.dark .when-light { display: none; }
html.dark .when-dark { display: inline-flex; }
.when-light, .when-dark { align-items: center; }
.badge-count {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; line-height: 15px; text-align: center;
  color: var(--on-accent); background: var(--accent);
}
.mobile-nav { border-top: 1px solid var(--line); background: var(--surface-solid); }
.mobile-nav .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; padding-bottom: 14px; }
.mobile-nav a { padding: 8px 10px; border-radius: 10px; text-align: center; font-size: 14px; color: var(--text-2); border: 1px solid var(--line); }
.mobile-nav a.active { color: var(--ink); font-weight: 600; border-color: var(--accent-2); }

/* ---------- 首页页头：橙色广告条和浮起的页头卡片（_header_home.html） ---------- */
/* 广告条在最上面，随页面滚走。页头是一块浮在深海上的毛玻璃卡片：顶边一道高光、底边一道暗线、几层由近到远的投影，
   底下一圈淡淡的光像映在水面上；打开页面时卡片带着透视从背景里升起来，里面的几项依次浮出。往下滚动后卡片停在顶上，
   底色更实一些（app.js 加 stuck）。首页页头不带 data-header，garden.js 就不会把卡片四周的背景磨砂 */
/* 站名的字体取自 Orbitron 800（SIL OFL 授权，见 static/fonts/OFL-Orbitron.txt），只留了英文字母、数字和空格。
   按授权，改动过的字体不能再用 Orbitron 这个名字，所以文件里的字体名改成了 BW Brand */
@font-face { font-family: "BW Brand"; src: url("/assets/fonts/bw-brand.woff2") format("woff2"); font-weight: 800; font-display: swap; }
body[data-page="home"] { --ad-bar-h: 32px; --ad-h: 0px; --hh-gap: 14px; }
body[data-page="home"]:has(> .ad-bar:not([hidden])) { --ad-h: var(--ad-bar-h); }
/* 一整块饱满的深橙色，整行文字底下压着一团暖光，慢慢地忽明忽暗；文字是白色粗体，两边各一个 emoji */
.ad-bar {
  position: relative; z-index: 51; height: var(--ad-bar-h); overflow: hidden;
  color: #fff; text-shadow: 0 1px 2px rgba(80, 20, 0, 0.35); background: #c94300;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(60, 14, 0, 0.25);
}
.ad-bar .ad-inner {
  display: flex; align-items: center; justify-content: center; height: 100%; padding-left: 44px; padding-right: 44px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.35;
}
.ad-line { position: relative; display: flex; align-items: center; gap: 18px; min-width: 0; }
.ad-msg { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 光晕中心落在 32px 横幅的底边上，只露出上半截；横着铺满整行文字，两头淡出 */
.ad-line::before {
  content: ""; position: absolute; z-index: -1; left: -8%; right: -8%; bottom: -29px; height: 44px; pointer-events: none;
  background: linear-gradient(0deg, transparent, rgba(255, 180, 100, 0.35) 22%, rgba(255, 210, 150, 0.8) 50%, rgba(255, 180, 100, 0.35) 78%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  filter: blur(4px); animation: ad-glow 2.5s ease-in-out infinite alternate;
}
.ad-emoji { flex-shrink: 0; font-size: 14px; line-height: 1; text-shadow: none; }
.ad-tag { flex-shrink: 0; padding: 0 5px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 4px; font-size: 11px; line-height: 16px; }
.ad-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ad-link {
  flex-shrink: 0; font-size: 12.5px; font-weight: 500; color: #fff;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.7);
  transition: text-decoration-color 0.2s;
}
.ad-link:hover { text-decoration-color: #fff; text-decoration-thickness: 2px; }
.ad-close {
  position: absolute; right: 8px; top: 50%; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; font-size: 14px; color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.2s, color 0.2s;
}
.ad-close:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* 光从上面照下来：卡片上亮下暗，边框也是上沿亮、两侧淡；底下露出一道窄边是卡片的厚度 */
.home-header {
  --hh-bg: rgba(255, 255, 255, 0.72);
  --hh-gloss: rgba(255, 255, 255, 0.55);
  --hh-hi: rgba(255, 255, 255, 0.95);
  --hh-shade: rgba(20, 28, 45, 0.07);
  --hh-side: rgba(20, 28, 45, 0.09);
  --hh-rim: rgba(255, 255, 255, 1), rgba(20, 28, 45, 0.08) 45%, rgba(20, 28, 45, 0.2);
  --hh-lift: 0 1px 2px rgba(20, 28, 45, 0.06), 0 12px 26px -12px rgba(20, 28, 45, 0.22), 0 36px 72px -36px rgba(20, 28, 45, 0.4);
  --hh-glow: rgba(140, 160, 200, 0.25);
  --hh-sheen: rgba(255, 255, 255, 0.6);
  --hh-brand: #e2560b;
  --hh-brand-glow: rgba(255, 140, 60, 0.22);
  position: sticky; top: 0; z-index: 50; padding: var(--hh-gap) 20px 0; pointer-events: none;
}
html.dark .home-header {
  --hh-bg: rgba(36, 38, 44, 0.58);
  --hh-gloss: rgba(230, 236, 248, 0.07);
  --hh-hi: rgba(230, 236, 248, 0.2);
  --hh-shade: rgba(0, 0, 0, 0.5);
  --hh-side: rgba(205, 214, 232, 0.13);
  --hh-rim: rgba(235, 240, 250, 0.45), rgba(215, 222, 236, 0.1) 45%, rgba(200, 210, 230, 0.22);
  --hh-lift: 0 1px 2px rgba(0, 0, 0, 0.45), 0 14px 30px -12px rgba(0, 0, 0, 0.8), 0 26px 60px -26px rgba(150, 165, 195, 0.2);
  --hh-glow: rgba(200, 210, 230, 0.25);
  --hh-sheen: rgba(230, 236, 248, 0.1);
  --hh-brand: #ff8a3d;
  --hh-brand-glow: rgba(255, 138, 61, 0.4);
}
.home-header.stuck { --hh-bg: rgba(255, 255, 255, 0.9); }
html.dark .home-header.stuck { --hh-bg: rgba(26, 27, 32, 0.84); }
/* 卡片底下映在水面上的一圈光 */
.home-header::after {
  content: ""; position: absolute; left: 50%; top: calc(var(--hh-gap) + var(--header-h) + 2px); width: min(960px, 76%); height: 30px;
  border-radius: 50%; background: radial-gradient(50% 60% at 50% 0, var(--hh-glow), transparent); filter: blur(6px);
  transform: translateX(-50%); animation: hh-fade 1.4s ease 0.5s backwards;
}
.hh-card {
  position: relative; display: flex; align-items: center; max-width: 1200px; height: var(--header-h); margin: 0 auto;
  padding: 0 10px 0 18px; border-radius: 18px; pointer-events: auto;
  background: linear-gradient(180deg, var(--hh-gloss), transparent 58%), var(--hh-bg);
  box-shadow: inset 0 1px 0 var(--hh-hi), inset 0 -12px 20px -14px var(--hh-shade), 0 3px 0 -1px var(--hh-side), var(--hh-lift);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  transition: background-color 0.35s;
  animation: hh-rise 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
/* 跟着鼠标走的一点反光（位置由 app.js 写进 --mx、--my） */
.hh-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--hh-sheen), transparent 70%);
}
.hh-card:hover::before { opacity: 1; }
.hh-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--hh-rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.hh-rise { animation: hh-item 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards; animation-delay: calc(0.22s + var(--d, 0) * 0.06s); }
.hh-brand { gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.hh-brand .brand-mark {
  width: 36px; height: 36px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 10px var(--hh-glow));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: hh-logo 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}
.hh-brand:hover .brand-mark { transform: translateY(-2px) rotate(-8deg) scale(1.08); }
.hh-brand .brand-name {
  font-family: "BW Brand", "Segoe UI", system-ui, sans-serif; font-size: 21px; font-weight: 800; font-synthesis: none; letter-spacing: normal; line-height: 1;
  color: var(--hh-brand); text-shadow: 0 1px 1px var(--hh-shade), 0 0 20px var(--hh-brand-glow);
}
.hh-nav { display: flex; align-items: center; gap: 2px; margin-left: 28px; }
.hh-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.hh-link {
  position: relative; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 13px; border-radius: 11px;
  font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.hh-link:hover, .hh-drop.is-open > .hh-link {
  color: var(--ink); background: var(--soft); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 var(--hh-hi), 0 2px 0 -1px var(--hh-side), 0 8px 16px -10px rgba(0, 0, 0, 0.5);
}
.hh-link > .icon { font-size: 15px; }
/* 深色模式下导航的字再提亮一些，压在深色毛玻璃上也看得清 */
html.dark .hh-link { color: #eceef2; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
html.dark .hh-link:hover, html.dark .hh-drop.is-open > .hh-link { color: #fff; }
.hh-link[data-soon]::after {
  content: "即将上线"; position: absolute; left: 50%; top: calc(100% + 8px); padding: 3px 8px; border-radius: 6px;
  font-size: 11.5px; line-height: 1.5; white-space: nowrap; color: var(--on-accent); background: var(--accent);
  opacity: 0; transform: translate(-50%, -4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.hh-link[data-soon]:hover::after, .hh-link[data-soon]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* “免费开始”是一颗橙色按钮（进登录页），和广告条、站名同一个色系 */
.hh-account, html.dark .hh-account {
  margin-left: 8px; padding: 0 18px; color: #fff; text-shadow: 0 1px 1px rgba(120, 35, 0, 0.35);
  background: linear-gradient(180deg, #ff8a3d, #e2560b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 -1px #a83c00, 0 8px 18px -8px rgba(226, 86, 11, 0.75);
}
.hh-account:hover, html.dark .hh-account:hover {
  color: #fff; background: linear-gradient(180deg, #ff9a52, #ea600f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 -1px #a83c00, 0 12px 22px -8px rgba(226, 86, 11, 0.85);
}
.hh-in, .hh-account.signed-in .hh-out { display: none; }
.hh-account.signed-in .hh-in { display: inline; }
.hh-account .member-tag { height: 18px; margin-left: 2px; padding: 0 6px; font-size: 10.5px; }
/* 下拉菜单：按钮和菜单之间的空隙也算在悬停范围里 */
.hh-drop { position: relative; }
.hh-menu {
  position: absolute; top: calc(100% + 12px); left: -6px; z-index: 60; display: none; padding: 8px;
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--hh-hi), var(--shadow-lg);
  transform-origin: 40px 0; animation: hh-menu 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hh-menu::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; }
.hh-drop.is-open > .hh-menu { display: grid; }
@media (hover: hover) {
  .hh-drop:hover > .hh-menu { display: grid; }
  .hh-drop:hover > .hh-link { color: var(--ink); background: var(--soft); }
}
.hh-lang-menu { left: auto; right: -6px; width: 190px; transform-origin: calc(100% - 20px) 0; }
.hh-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px;
  font-size: 14px; text-align: left; color: var(--text);
}
.hh-opt.is-current { font-weight: 600; color: var(--ink); }
.hh-opt.is-current .icon { color: var(--accent-2); }
.hh-opt.is-off { color: var(--muted); }
.hh-opt small, .hh-mobile small { padding: 1px 7px; border-radius: 6px; font-size: 11px; color: var(--muted); background: var(--surface-2); }
.hh-mobile-foot span > .icon { margin-right: 7px; }
/* 客服、语言和深浅色只放图标 */
.hh-icon { justify-content: center; width: 38px; padding: 0; }
.hh-icon .icon { font-size: 18px; }
/* 窗口放不下整条导航时，卡片里只留 Logo、“免费开始”和菜单按钮，其余的放进展开的面板 */
.hh-burger { display: none; }
.hh-mobile {
  position: absolute; left: 20px; right: 20px; top: calc(100% + 8px); z-index: 1; padding: 12px; pointer-events: auto;
  max-height: calc(100vh - var(--ad-h) - var(--hh-gap) - var(--header-h) - 24px);
  max-height: calc(100svh - var(--ad-h) - var(--hh-gap) - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: inset 0 1px 0 var(--hh-hi), var(--shadow-lg); animation: hh-menu 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hh-mobile-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hh-mobile-links, .hh-mobile-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hh-mobile-links a, .hh-mobile-links button, .hh-mobile-foot button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); border: 1px solid var(--line-2);
}
.hh-mobile-foot { justify-content: space-between; font-size: 13px; color: var(--muted); }
.hh-mobile-foot > span { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 961px) {
  .hh-mobile { display: none; }
}
@media (max-width: 960px) {
  .hh-nav, .hh-service, .hh-lang, .hh-theme { display: none; }
  .hh-burger { display: inline-flex; }
}
@media (max-width: 760px) {
  body[data-page="home"] { --ad-bar-h: 44px; --hh-gap: 10px; }
  .ad-bar .ad-inner { justify-content: flex-start; padding-left: 12px; padding-right: 38px; font-size: 12px; }
  .ad-line { gap: 12px; }
  .ad-msg .ad-emoji:last-child { display: none; }
  .ad-link { font-size: 12px; }
  .ad-text { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .home-header { padding-left: 10px; padding-right: 10px; }
  .hh-mobile { left: 10px; right: 10px; }
  .hh-card { padding: 0 6px 0 14px; border-radius: 16px; }
  .hh-brand .brand-name { font-size: 18px; }
  .hh-brand .brand-mark { width: 32px; height: 32px; }
}
/* 手机上卡片放不下会员档位：登录后的按钮只写“我的账号”，档位在个人主页看 */
@media (max-width: 420px) {
  .hh-account, html.dark .hh-account { margin-left: 6px; padding: 0 14px; }
  .hh-account .member-tag { display: none; }
}
/* 320px 一类的小屏：Logo、站名和按钮再收一点，菜单按钮才不出屏 */
@media (max-width: 360px) {
  .home-header { padding-left: 8px; padding-right: 8px; }
  .hh-card { padding: 0 4px 0 12px; }
  .hh-brand { gap: 8px; }
  .hh-brand .brand-mark { width: 30px; height: 30px; }
  .hh-brand .brand-name { font-size: 16px; }
  .hh-account, html.dark .hh-account { padding: 0 12px; font-size: 15px; }
}

/* 搜索联想（页头搜索框、404 页） */
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  max-height: 440px; overflow: auto; padding: 6px; text-align: left;
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.suggest a:hover, .suggest a.active { background: var(--soft); }
.suggest .s-text { min-width: 0; flex: 1; }
.suggest .s-name { display: block; font-size: 14px; font-weight: 600; }
.suggest .s-brief { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-cat { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.suggest .s-all { justify-content: center; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-size: 13px; color: var(--accent-2); }
.suggest .s-empty { padding: 14px 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- 首页第一屏：收录数、标语、“免费开始”和检索过程的演示 ---------- */
/* 第一屏：上面是收录数的小气泡、标语、一行说明和橙色按钮，下面是毛玻璃的演示面板。
   演示面板和页头卡片一样宽：两边留的空和 .home-header 的左右 padding 一致（20px，760px 以下 10px，360px 以下 8px）。
   整块内容贴着页头，窗口比内容高时多出来的高度留在面板下面。
   电脑上上面几行收小一点，面板往下撑满第一屏剩下的高度，最高 760px */
.lp-hero {
  position: relative; display: flex; flex-direction: column;
  min-height: calc(100vh - var(--ad-h) - var(--hh-gap) - var(--header-h));
  min-height: calc(100svh - var(--ad-h) - var(--hh-gap) - var(--header-h));
  padding: 20px 0 32px; text-align: center;
}
.lp-stage { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.lp-hero .lp-stage { max-width: 1240px; padding-left: 20px; padding-right: 20px; }
@media (max-width: 760px) { .lp-hero .lp-stage { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 360px) { .lp-hero .lp-stage { padding-left: 8px; padding-right: 8px; } }

/* 演示面板：顶上一条窗口栏（场景圆点和暂停）；上面一行左边是工具目录，右边是候选工具，下面一行是对话框。
   home.js 按步骤切换面板上的 class：menu-open 打开了画像菜单，has-persona 选好了画像，has-q 打出了需求，
   is-sent 发了出去（目录里对得上的分类描蓝边，候选工具里对得上的描蓝边，其余的变淡），show-res 右边换成检索结果 */
.dm {
  width: 100%; max-width: 1200px; margin: 0; overflow: hidden; text-align: left;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.dm-bar { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); }
.dm-bar > i { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.dm-title { min-width: 0; margin-left: 8px; overflow: hidden; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.dm-ctrl { display: flex; align-items: center; margin-left: auto; }
.dm-ctrl[hidden], .dm-pause[hidden] { display: none; }
.dm-dot { display: inline-grid; place-items: center; width: 24px; height: 28px; border-radius: 8px; }
.dm-dot::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width 0.3s, background-color 0.3s; }
.dm-dot:hover::before { background: var(--muted); }
.dm-dot[aria-pressed="true"]::before { width: 16px; background: var(--accent-2); }
/* 暂停是两道竖线，暂停后换成三角形 */
.dm-pause { position: relative; width: 28px; height: 28px; margin-left: 4px; border-radius: 8px; color: var(--muted); transition: color 0.2s, background-color 0.2s; }
.dm-pause:hover { color: var(--ink); background: var(--soft); }
.dm-pause::before, .dm-pause::after { content: ""; position: absolute; top: 9px; width: 3px; height: 10px; border-radius: 1px; background: currentColor; }
.dm-pause::before { left: 10px; }
.dm-pause::after { left: 15px; }
.dm-pause[aria-pressed="true"]::before {
  top: 8.5px; left: 11px; width: 0; height: 0; border-radius: 0; background: none;
  border-style: solid; border-width: 5.5px 0 5.5px 9px; border-color: transparent transparent transparent currentColor;
}
.dm-pause[aria-pressed="true"]::after { display: none; }

.dm-body {
  display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-areas: "cats pane" "chat chat";
  transition: opacity 0.35s ease;
}
.dm.is-leaving .dm-body { opacity: 0; }
/* 有脚本时先藏起来，等 home.js 摆好第一步再淡入；脚本两秒半还没来就直接显示 */
.dm-js .dm:not(.is-ready) .dm-body { animation: dm-late 0.4s 2.5s backwards; }
.dm.is-ready .dm-body { animation: dm-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.dm-label { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.dm-label::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background-color 0.3s, box-shadow 0.3s; }
.dm-label small { min-width: 0; overflow: hidden; font-size: inherit; text-overflow: ellipsis; opacity: 0.85; }
.dm.is-sent .dm-label::before { background: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.2), 0 0 10px 1px rgba(91, 141, 239, 0.7); }

/* 目录：五个大类，下面是各自的分类和收录数；发出需求后对得上的分类描蓝边，其余的变淡 */
.dm-cats { grid-area: cats; position: relative; display: flex; flex-direction: column; row-gap: 9px; min-width: 0; padding: 16px 16px 18px 18px; border-right: 1px solid var(--line); }
.dm-cats > .dm-label { margin-bottom: 3px; }
.dm-group-name { font-size: 11.5px; font-weight: 600; line-height: 1.25; letter-spacing: 0.04em; color: var(--text-2); }
.dm-group-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.dm-cat {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 23px; padding: 0 7px; border-radius: 7px;
  font-size: 12px; white-space: nowrap; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: opacity 0.4s, color 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.dm-cat small { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.dm.is-sent .dm-cat { opacity: 0.38; }
.dm.is-sent .dm-cat.is-hit { opacity: 1; color: var(--ink); background: var(--surface-solid); border-color: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16); }
.dm.is-sent .dm-cat.is-hit small { color: var(--glow); }

/* 右边：候选工具和各个场景的检索结果叠在同一格里，高度取最高的那个，换来换去面板不会跳 */
.dm-pane { grid-area: pane; display: grid; min-width: 0; padding: 16px 18px 18px; }
.dm-pane > * { grid-area: 1 / 1; min-width: 0; transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.45s; }
.dm.show-res .dm-cands, .dm-res { opacity: 0; visibility: hidden; transform: translateY(8px); }
.dm.show-res .dm-res.is-cur { opacity: 1; visibility: visible; transform: none; }
.dm-busy { display: none; align-items: center; gap: 6px; font-style: normal; color: var(--glow); }
.dm.is-sent .dm-total { display: none; }
.dm.is-sent .dm-busy { display: inline-flex; }
.dm-think { display: inline-flex; gap: 3px; }
.dm-think i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: think 1.2s ease-in-out infinite; }
.dm-think i:nth-child(2) { animation-delay: 0.15s; }
.dm-think i:nth-child(3) { animation-delay: 0.3s; }
/* 候选工具：发出需求后对得上的描蓝边，其余的变淡 */
.dm-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dm-tile {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  transition: opacity 0.45s, filter 0.45s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.dm-tile p { display: flex; flex-direction: column; min-width: 0; }
.dm-tile b { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.dm-tile small { font-size: 11px; color: var(--muted); }
.dm.is-sent .dm-tile { opacity: 0.28; filter: grayscale(1); }
.dm.is-sent .dm-tile.is-pick {
  opacity: 1; filter: none; border-color: var(--glow); transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16), 0 8px 18px -12px rgba(91, 141, 239, 0.7);
}

/* 检索结果：排名、Logo、名字和标签，下面一行是按画像写的理由；三条依次浮上来 */
.dm-res ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dm-hit {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 14px 10px 12px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.dm.show-res .dm-res.is-cur .dm-hit { opacity: 1; transform: none; }
.dm.show-res .dm-res.is-cur .dm-hit:nth-child(2) { transition-delay: 0.12s; }
.dm.show-res .dm-res.is-cur .dm-hit:nth-child(3) { transition-delay: 0.24s; }
.dm-rank { flex-shrink: 0; width: 12px; font-family: var(--mono); font-size: 12px; font-style: normal; text-align: center; color: var(--muted); }
.dm-hit > div { flex: 1; min-width: 0; }
.dm-hit-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dm-hit-name b { overflow: hidden; font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.dm-hit-name .tag { flex-shrink: 0; }
.dm-hit-why { margin-top: 3px; overflow: hidden; font-size: 12.5px; line-height: 1.5; color: var(--text-2); white-space: nowrap; text-overflow: ellipsis; }
/* 目录里这款工具的标签，面板够高时才显示 */
.dm-hit-tags { display: none; gap: 6px; margin-top: 7px; overflow: hidden; }
.dm-hit-tags span { flex-shrink: 0; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; line-height: 1.6; white-space: nowrap; color: var(--muted); background: var(--soft); }
.dm-best, .ai-best {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 22px; margin-left: auto; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; color: #2f62d0; background: rgba(91, 141, 239, 0.13);
}
html.dark .dm-best, html.dark .ai-best { color: var(--glow); background: rgba(143, 180, 255, 0.14); }

/* 对话框：左边选用户画像，中间是需求（打字出现），右边是发送；画像菜单从对话框上方弹出 */
.dm-chat { grid-area: chat; position: relative; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.dm-box {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px; border-radius: 16px;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.dm-persona {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 36px; padding: 0 8px 0 11px; border-radius: 11px;
  font-size: 13px; white-space: nowrap; color: var(--text); background: var(--soft); border: 1px solid var(--line);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.dm-persona b { font-weight: 600; }
.dm-persona .icon { font-size: 15px; color: var(--muted); }
.dm-pv-none, .dm.has-persona .dm-pv { display: inline-flex; align-items: center; gap: 6px; }
.dm-pv, .dm.has-persona .dm-pv-none { display: none; }
.dm.has-persona .dm-pv .icon { color: var(--glow); }
.dm-chev { display: inline-flex; transition: transform 0.25s; }
.dm-persona .dm-chev .icon { font-size: 13px; }
.dm.menu-open .dm-persona { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16); }
.dm.menu-open .dm-chev { transform: rotate(180deg); }
.dm-input { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.dm-ph { color: var(--muted); }
.dm-q:not(:empty) + .dm-ph { display: none; }
.dm-q.typing::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em;
  background: currentColor; animation: caret 1s steps(1) infinite;
}
.dm-send {
  display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
  font-size: 18px; color: var(--on-accent); background: var(--accent); opacity: 0.3; transition: opacity 0.3s;
}
.dm.has-q .dm-send { opacity: 1; }
.dm.is-sent .dm-send { animation: dm-press 0.4s ease; }
.dm-menu {
  position: absolute; left: -7px; bottom: calc(100% + 14px); z-index: 2; width: 188px; margin: 0; padding: 6px; border-radius: 14px; list-style: none;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px) scale(0.98); transform-origin: 32px 100%;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.dm.menu-open .dm-menu { opacity: 1; visibility: visible; transform: none; }
.dm-menu-head { padding: 6px 10px 4px; font-size: 11.5px; color: var(--muted); }
.dm-p { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); transition: background-color 0.2s, color 0.2s; }
.dm-p .icon { font-size: 15px; color: var(--muted); }
.dm-p .icon:last-child { margin-left: auto; color: var(--glow); opacity: 0; }
.dm-p.is-on { color: var(--ink); background: var(--soft); }
.dm-p.is-sel .icon:last-child { opacity: 1; }

/* 电脑上演示面板往下撑满第一屏：目录的几组分类上下排开；候选工具不撑高面板，放得下几行露几行，底下渐隐
   （左右各多出 4px，描边的光圈才不被裁掉）；检索结果的三张卡片一起拉高 */
@media (min-width: 901px) {
  .lp-hero .lp-stage { flex: 1 1 auto; }
  .dm { flex: 1 1 auto; display: flex; flex-direction: column; max-height: 760px; }
  .dm-bar { flex: none; }
  .dm-body { flex: 1 1 auto; grid-template-rows: 1fr auto; }
  .dm-group + .dm-group { margin-top: auto; }
  .dm-cat { height: clamp(21px, 2.5vh, 27px); }
  .dm-cands {
    contain: size; overflow: hidden; margin: 0 -4px; padding: 0 4px;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent); mask-image: linear-gradient(#000 calc(100% - 44px), transparent);
  }
  .dm-tile { padding-block: clamp(6px, 1vh, 12px); }
  .dm-res { display: flex; flex-direction: column; }
  .dm-res ol { flex: 1 1 auto; grid-auto-rows: 1fr; }
}
@media (min-width: 901px) and (min-height: 761px) {
  .dm-hit-tags { display: flex; }
}
/* 1000px 以上高的窗口里面板更高，检索结果的卡片字放大一些 */
@media (min-width: 901px) and (min-height: 1001px) {
  .dm-hit { gap: 14px; padding: 14px 20px 14px 16px; }
  .dm-hit-name b { font-size: 16px; }
  .dm-hit-why { margin-top: 5px; font-size: 13.5px; }
}

/* 收录数、标语、一行说明和“免费开始” */
.lp-pitch { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
/* 收录数和累计检索次数：标语上方一个浅灰色的小气泡，前面一个小绿点；底色不透明，免得背后的字符动画透出来 */
.lp-stats {
  display: inline-flex; align-items: center; height: 30px; max-width: 100%; margin-bottom: 16px; padding: 0 14px 0 12px; border-radius: 999px;
  font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; color: var(--text-2);
  background: #eef0f3; border: 1px solid var(--line);
}
.lp-stats::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 3px rgba(47, 166, 106, 0.16); }
.lp-stats b { margin: 0 4px; font-family: var(--mono); font-weight: 600; color: var(--ink); }
.lp-stats > b { margin-right: 0; }
.lp-stats i { margin: 0 8px; font-style: normal; color: var(--muted); }
html.dark .lp-stats { background: #26272d; }
html.dark .lp-stats::before { background: #5fd394; box-shadow: 0 0 0 3px rgba(95, 211, 148, 0.16); }
/* 标语里的“AI 好搭子”和站名是橙色渐变加一圈淡淡的光晕，打开页面时有一道柔和的高光从左往右扫过一次；站名用页头那个字体 */
.lp-title { font-size: clamp(34px, min(5.2vw, 7.4vh), 68px); font-weight: 800; line-height: 1.22; letter-spacing: 0.01em; color: var(--ink); text-wrap: balance; }
/* 渐变只画在字的框里，站名里 y 的下半截会出框，底下补一点 padding */
.lp-hl, .lp-brand {
  display: inline-block; padding-bottom: 0.06em; white-space: nowrap; color: #e2560b;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 244, 214, 0.55) 50%, transparent 60%) 100% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, #ffa04d, #e8530a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 14px rgba(255, 106, 43, 0.16));
  animation: lp-shine 2.2s ease-in-out 1.2s;
}
.lp-brand { font-family: "BW Brand", "Segoe UI", system-ui, sans-serif; font-synthesis: none; letter-spacing: normal; animation-delay: 1.6s; }
html.dark .lp-hl, html.dark .lp-brand { filter: drop-shadow(0 4px 16px rgba(255, 128, 50, 0.22)); }
.lp-sub { margin-top: 14px; font-size: clamp(18px, 2.1vw, 26px); font-weight: 700; line-height: 1.45; letter-spacing: 0.02em; color: var(--text); text-wrap: balance; }
.lp-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; margin-top: 24px; padding: 0 30px; border-radius: 14px;
  font-size: 16.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(120, 35, 0, 0.35);
  background: linear-gradient(180deg, #ff8a3d, #e2560b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 -1px #a83c00, 0 14px 28px -12px rgba(226, 86, 11, 0.8);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lp-cta:hover {
  color: #fff; background: linear-gradient(180deg, #ff9a52, #ea600f); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 -1px #a83c00, 0 18px 32px -12px rgba(226, 86, 11, 0.9);
}
.lp-cta .icon { font-size: 18px; transition: transform 0.2s; }
.lp-cta:hover .icon { transform: translateX(3px); }
/* 按钮下面一句小字：和页脚那句一样用衬线体，两边各一道细线；字距留在最后一个字后面的那一截用负边距抵掉，两道线才对称 */
.lp-motto {
  display: flex; align-items: center; gap: 14px; margin-top: 18px;
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.24em; color: var(--text-2);
}
.lp-motto span { margin-right: -0.24em; }
.lp-motto::before, .lp-motto::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.35; }

/* ---------- 首页第一屏下面的几节：解决方案、社区、定价（卡片在 vip.css）、常见问题 ---------- */
/* 每节一个居中的大标题和一行说明。节与节之间的空大半用 margin 留：从页头跳过来时，标题停在页头下面不远的地方
   （html 的 scroll-padding-top 已经让开了页头）。卡片和第一屏的演示面板一样宽，也是毛玻璃 */
.lp-sec { margin-top: 72px; padding-top: 24px; text-align: center; scroll-margin-top: 18px; }
.lp-sec .container { max-width: 1240px; padding-left: 20px; padding-right: 20px; }
.lp-sec-title { font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: 0.02em; color: var(--ink); }
.lp-sec-sub { margin-top: 10px; font-size: 16px; color: var(--text-2); text-wrap: balance; }
.sol-card, .review-card, .review-empty, .faq-list {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}

/* 解决方案：三张卡片，图标、标题、两三行说明，底下是数字和一个链接，几张卡片的链接对齐 */
.sol-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; text-align: left; }
.sol-card { display: flex; flex-direction: column; padding: 26px 24px 0; }
.sol-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  font-size: 21px; color: var(--ink); background: var(--soft); border: 1px solid var(--line);
}
.sol-name { margin-top: 18px; font-size: 19px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink); }
.sol-desc { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--text-2); text-wrap: pretty; }
.sol-facts { display: flex; gap: 28px; margin-top: auto; padding-top: 22px; font-size: 12.5px; color: var(--muted); }
.sol-facts span { display: flex; flex-direction: column; }
.sol-facts b { font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
.sol-link {
  display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 14px 0 16px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); transition: color 0.2s;
}
.sol-link .icon { font-size: 16px; transition: transform 0.2s; }
.sol-link:hover { color: var(--ink); }
.sol-link:hover .icon { transform: translateX(3px); }

/* 社区：用户评价一行最多三条，不满一行的居中，署名对齐在卡片底部；还没有评价时一张居中的卡片请大家来写 */
.review-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; text-align: left; }
.review-card { display: flex; flex-direction: column; flex: 0 1 calc((100% - 32px) / 3); margin: 0; padding: 22px 22px 18px; }
.review-text { margin: 0; font-size: 15px; line-height: 1.8; color: var(--text); }
.review-text::before { content: "“"; display: block; height: 22px; font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--muted); }
.review-who { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; }
.review-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  font-size: 14px; font-weight: 700; color: var(--ink); background: var(--soft); border: 1px solid var(--line);
}
.review-who b { display: block; font-size: 14px; line-height: 1.4; color: var(--ink); }
.review-who small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.review-empty { display: flex; flex-direction: column; align-items: center; max-width: 720px; margin: 36px auto 0; padding: 34px 28px 30px; }
.review-empty-title { margin-top: 16px; font-size: 18px; font-weight: 700; color: var(--ink); }
.review-empty-text { max-width: 520px; margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--text-2); text-wrap: pretty; }
.review-empty .btn { margin-top: 20px; }

/* 常见问题：一张卡片里上下排开，点问题展开答案 */
.lp-faq { padding-bottom: 104px; }
.faq-list { max-width: 860px; margin: 36px auto 0; padding: 4px 28px; text-align: left; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0;
  font-size: 16px; font-weight: 600; color: var(--ink); list-style: none; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { flex-shrink: 0; font-size: 18px; color: var(--muted); transition: transform 0.25s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item summary:hover .icon { color: var(--ink); }
.faq-item summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 6px; }
.faq-a { padding: 0 34px 20px 0; font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.faq-a a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.faq-more { margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.faq-more a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.faq-more a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .sol-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-left: auto; margin-right: auto; }
  .review-card { flex-basis: 100%; max-width: 640px; }
}
@media (max-width: 760px) {
  .lp-sec .container { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 600px) {
  .lp-motto { gap: 10px; margin-top: 14px; font-size: 14px; letter-spacing: 0.18em; }
  .lp-motto span { margin-right: -0.18em; }
  .lp-motto::before, .lp-motto::after { width: 20px; }
  .lp-sec { margin-top: 40px; padding-top: 16px; }
  .lp-sec-title { font-size: 26px; }
  .lp-sec-sub { margin-top: 6px; padding: 0 8px; font-size: 14.5px; }
  .sol-grid { gap: 10px; margin-top: 24px; }
  .sol-card { padding: 20px 18px 0; border-radius: 16px; }
  .sol-name { margin-top: 14px; font-size: 17.5px; }
  .sol-facts { padding-top: 16px; }
  .sol-facts b { font-size: 21px; }
  .sol-link { margin-top: 14px; padding: 12px 0 14px; }
  .review-grid { gap: 10px; margin-top: 24px; }
  .review-card { border-radius: 16px; }
  .review-empty { margin-top: 24px; padding: 26px 18px 22px; border-radius: 16px; }
  .lp-faq { padding-bottom: 64px; }
  .faq-list { margin-top: 24px; padding: 2px 16px; border-radius: 16px; }
  .faq-item summary { padding: 15px 0; font-size: 15px; }
  .faq-a { padding-right: 0; font-size: 14px; }
}

/* ---------- 检索框和检索状态 ---------- */
.lp-top { position: absolute; left: 0; right: 0; top: 14px; z-index: 10; display: flex; justify-content: center; transition: opacity 0.3s, visibility 0.3s; }
.history { position: relative; }
.history-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px 0 13px; border-radius: 999px;
  font-size: 13px; letter-spacing: 0.01em; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  transition: color 0.2s, border-color 0.2s;
}
.history-pill .icon { font-size: 15px; }
.history-pill:hover, .history-pill[aria-expanded="true"] { color: var(--ink); border-color: var(--line-2); }
.history-panel {
  position: absolute; left: 50%; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); padding: 6px; text-align: left;
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
}
.history-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 4px; font-size: 12px; color: var(--muted); }
.history-head button { padding: 2px 4px; font-size: 12px; color: var(--muted); }
.history-head button:hover { color: var(--ink); }
.history-list { display: grid; margin: 0; padding: 0; list-style: none; }
.history-list button {
  display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 12px;
  font-size: 14px; text-align: left; color: var(--text); transition: background-color 0.15s;
}
.history-list button:hover { background: var(--soft); }
.history-list span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-list time { flex-shrink: 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.history-empty { padding: 8px 10px 4px; font-size: 13px; color: var(--muted); }
.history-empty a {
  display: block; margin: 6px -4px 0; padding: 6px 10px; border-radius: 10px; font-size: 13.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.15s, color 0.15s;
}
.history-empty a:hover { color: var(--ink); background: var(--soft); }
.lp-results { display: none; margin-top: 36px; text-align: left; }
/* 检索状态（app.js 给 body 加上 searching，不跳转）：检索框移到上方，结果在检索框下方浮现 */
body.searching .lp-hero { padding-top: 0; padding-bottom: 72px; }
body.searching .lp-top { opacity: 0; visibility: hidden; }
body.searching .lp-results { display: block; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--text-2); }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.22), 0 0 12px 2px rgba(91, 141, 239, 0.7); }
html.dark .eyebrow-dot { box-shadow: 0 0 0 3px rgba(143, 180, 255, 0.14), 0 0 14px 2px rgba(143, 180, 255, 0.7); }
/* 检索框：毛玻璃，透出后面模糊了的背景 */
.finder, .hero-search {
  position: relative; z-index: 5; display: flex; align-items: center; max-width: 660px; margin: 34px auto 0;
  padding: 6px 6px 6px 50px; border-radius: 999px; text-align: left;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  transition: border-color 0.2s, box-shadow 0.25s;
}
.finder > .icon, .hero-search > .icon { position: absolute; left: 20px; font-size: 19px; color: var(--muted); pointer-events: none; }
.finder input, .hero-search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.finder input::placeholder, .hero-search input::placeholder { color: var(--muted); }
.finder:focus-within, .hero-search:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring), inset 0 1px 0 var(--glass-hi), var(--shadow-lg); }
.finder .btn, .hero-search .btn { height: 46px; padding: 0 26px; font-size: 15px; }
.finder-key {
  margin-right: 10px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 6px;
  font-family: var(--mono); font-size: 12px; line-height: 20px; color: var(--muted);
}
.finder:focus-within .finder-key { display: none; }
/* 检索框下面的一行小字，以及 AI 检索页上的同一句提示 */
.finder-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px;
  font-size: 13px; color: var(--muted); transition: opacity 0.3s;
}
.finder-hint .icon { color: var(--accent-2); }
body.searching .lp-hero .finder-hint { display: none; }
.page-head .finder-hint { margin-left: auto; margin-right: auto; color: var(--muted); }
/* ---------- AI 检索结果里的“理解”“条件”两行和小标签（discover.js 填入） ---------- */
.ai-intent { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 14.5px; color: var(--text); }
.ai-intent > .icon { align-self: center; font-size: 15px; color: var(--accent-2); }
.ai-label { flex-shrink: 0; padding: 1px 7px; border-radius: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-2); }
.ai-cond { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ai-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; color: var(--free); background: var(--free-bg); }
.ai-chip::before { content: "✓"; font-size: 11px; }

/* 加载中的占位 */
.is-loading { gap: 14px; }
.is-loading > span {
  display: block; width: 72%; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 30%, var(--soft) 50%, var(--surface-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.is-loading > span:first-child { width: 36%; }
.is-loading > span:nth-child(2) { width: 94%; height: 16px; }

/* ---------- 工具卡片：弱边界、半透明底色、细分隔线 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 16px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover { background: var(--surface-hover); border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.fav-btn, .visit-btn {
  position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; font-size: 16px; color: var(--muted); transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}
.fav-btn { align-self: flex-start; opacity: 0.7; }
.card:hover .fav-btn, .fav-btn.active { opacity: 1; }
.fav-btn:hover, .visit-btn:hover { background: var(--soft); color: var(--text); }
.fav-btn.active, .fav-toggle.active { color: var(--cn); }
.fav-btn.active svg, .fav-toggle.active svg { fill: currentColor; }
.fav-toggle.active { border-color: var(--cn); }
.card-brief {
  min-height: calc(1.6em * 2); font-size: 13.5px; line-height: 1.6; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); }
/* 只显示一行：放不下的标签整枚折到被裁掉的第二行，不会被拦腰截断 */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; height: 22px; overflow: hidden; }
.tag, .badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 11.5px; white-space: nowrap; color: var(--text-2); background: var(--surface-2);
}
.badge { height: 24px; padding: 0 9px; font-size: 12px; border: 1px solid transparent; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.price-free { color: var(--free); background: var(--free-bg); }
.price-freemium { color: var(--freemium); background: var(--freemium-bg); }
.price-paid { color: var(--paid); background: var(--paid-bg); }
.region-cn { color: var(--cn); background: var(--cn-bg); }
.oss { color: var(--oss); background: var(--oss-bg); }
a.badge.cat { border-color: var(--line); background: transparent; }
a.badge.cat:hover { border-color: var(--accent-2); color: var(--text); }
/* 明确的访问入口 */
.visit {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  height: 28px; padding: 0 9px 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--accent-2); border: 1px solid var(--line-2); transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.visit .icon { font-size: 14px; transition: transform 0.2s; }
.visit:hover { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.visit:hover .icon { transform: translate(1px, -1px); }

/* Logo：图片加载失败时露出首字母头像（低饱和的底色） */
.logo {
  position: relative; display: inline-block; flex-shrink: 0; overflow: hidden;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * 0.26); background: #fff;
}
html.dark .logo { background: #e6e8ec; }
.logo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(15, 18, 25, 0.08); pointer-events: none; }
.logo-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--s) * 0.44); font-weight: 600; color: #f6f7f9;
  background: linear-gradient(145deg, hsl(var(--h) 22% 56%), hsl(var(--h) 26% 40%));
}
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: calc(var(--s) * 0.06); background: inherit; }

/* ---------- 通用区块 ---------- */
.section { margin-bottom: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: 19px; }
.section-head h2 .icon, .panel-title > .icon { font-size: 17px; color: var(--accent-2); }
.section-head p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.count-note { margin-left: 4px; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); }
.more-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; transition: color 0.2s, gap 0.2s; }
.more-link:hover { gap: 5px; color: var(--ink); }

/* ---------- 页面头 ---------- */
.page-head { position: relative; padding: 44px 0 30px; }
.page-head h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; font-size: 32px; letter-spacing: -0.025em; color: var(--ink); }
.page-head h1 small { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.page-head p { max-width: 760px; color: var(--text-2); }
.page-head p a { color: var(--accent-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .icon { font-size: 11px; opacity: 0.7; }
.page-body { padding-top: 8px; padding-bottom: 64px; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.aside-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.main-col { min-width: 0; }
.cat-title { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; }
.cat-title h1 { margin-top: 0; }

/* 面板 */
.panel { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 15.5px; }
.panel-title a { display: flex; align-items: center; gap: 8px; }
.panel-title a:hover { color: var(--accent-2); }

.mini-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.mini-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 14px; transition: background-color 0.2s; }
.mini-item:hover { background: var(--soft); }
.mini-item a { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item a::after { content: ""; position: absolute; inset: 0; }
.mini-rank { flex-shrink: 0; width: 20px; font-family: var(--mono); font-size: 12px; font-weight: 600; text-align: center; color: var(--muted); }
.mini-rank.rank-1, .mini-rank.rank-2, .mini-rank.rank-3 { color: var(--accent-2); }
.mini-heat { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.scene-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.scene-list li { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); }
.scene-list strong { font-size: 14px; font-weight: 600; }
.scene-list span { font-size: 13px; color: var(--text-2); }
.chip-links { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-links a { padding: 3px 11px; border-radius: 999px; font-size: 13px; color: var(--text-2); border: 1px solid var(--line); transition: border-color 0.2s, color 0.2s; }
.chip-links a:hover { color: var(--ink); border-color: var(--accent-2); }

/* ---------- 筛选 ---------- */
.filters { margin-bottom: 16px; padding: 6px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.filter-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.filter-row + .filter-row { border-top: 1px solid var(--line); }
.filter-label { flex-shrink: 0; width: 36px; font-size: 13px; line-height: 30px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); white-space: nowrap; transition: background-color 0.15s, color 0.15s;
}
.chip:hover { color: var(--ink); background: var(--soft); }
.chip.active { color: var(--on-accent); background: var(--accent); }
.chip small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.chip.active small { color: inherit; opacity: 0.75; }
.toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; line-height: 30px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); transition: background-color 0.2s; }
.toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.25s; }
.toggle input:checked + .toggle-ui { background: var(--accent-2); }
.toggle input:checked + .toggle-ui::after { transform: translateX(14px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 14px; color: var(--text-2); }
.result-bar strong { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
select { cursor: pointer; }
.sort select, .field select {
  -webkit-appearance: none; appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385988e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 13px;
}
.sort select { height: 34px; padding: 0 32px 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--text); }
.sort select:disabled { opacity: 0.6; cursor: default; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 16px; text-align: center;
  color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg);
}
.empty > .icon { font-size: 36px; color: var(--line-2); }
.empty a:not(.btn) { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 分类页 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.cat-card:hover { background: var(--surface-hover); border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.cat-card-head { display: flex; align-items: center; gap: 12px; }
.cat-card-head h3 { font-size: 16.5px; }
.cat-card-head small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cat-card p { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card-logos { display: flex; align-items: center; margin-top: auto; padding-left: 2px; }
.cat-card-logos .logo { margin-right: -6px; box-shadow: 0 0 0 2px var(--surface-solid); }
.more-count { margin-left: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
/* 分类图标：分类色压低饱和度后的浅底圆角块 */
.cat-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 11px; font-size: 18px;
  color: var(--accent-2); background: var(--soft);
  color: color-mix(in srgb, var(--c) 45%, var(--muted));
  background: color-mix(in srgb, var(--c) 10%, transparent);
}
html.dark .cat-icon { color: color-mix(in srgb, var(--c) 40%, #c9cdd6); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cat-icon-lg { width: 56px; height: 56px; border-radius: 15px; font-size: 26px; }
.cat-icon-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }

/* ---------- 排行榜 ---------- */
.rank-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.tab-bar {
  display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px; border-radius: 999px;
  font-size: 14px; color: var(--text-2); white-space: nowrap; transition: background-color 0.2s, color 0.2s;
}
.tab:hover { color: var(--ink); background: var(--soft); }
.tab.active { color: var(--on-accent); background: var(--accent); }
.rank-toolbar .sort select { height: 40px; }
.rank-list { display: grid; margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.rank-row {
  position: relative; display: grid; grid-template-columns: 36px 40px minmax(0, 1fr) 110px 150px 130px 30px;
  align-items: center; gap: 14px; padding: 12px 16px; transition: background-color 0.2s;
}
.rank-row + .rank-row { border-top: 1px solid var(--line); }
.rank-row:hover { background: var(--soft); }
.rank-list > .rank-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.rank-list > .rank-row:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.rank-no { justify-self: center; font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-row[data-top] .rank-no { color: var(--ink); }
.rank-row[data-top="1"] .rank-no::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px -12px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px 2px var(--glow); }
.rank-info { min-width: 0; }
.rank-info h3 { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 15px; }
.rank-info h3 a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-org { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.rank-info p { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cat { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.rank-badges { flex-wrap: nowrap; }
.rank-heat { display: flex; align-items: center; gap: 8px; }
.rank-heat b { width: 24px; font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: right; color: var(--text-2); }
.heat-bar { display: block; flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: var(--line); }
.heat-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #d3d8e1, #4d5462); }
html.dark .heat-bar > span { background: linear-gradient(90deg, #3a3f4a, #bcc1cb); }
.rank-row .visit-btn { position: relative; z-index: 2; }
.top5-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* ---------- 最新收录 ---------- */
.timeline { display: grid; gap: 32px; }
.timeline-day { position: relative; padding-left: 28px; }
.timeline-day::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -32px; width: 1px; background: var(--line-2); }
.timeline-day:last-child::before { bottom: 0; }
.timeline-date { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 16px; }
.timeline-date::before {
  content: ""; position: absolute; left: -28px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
  border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--accent-2); box-shadow: 0 0 0 4px var(--ring);
}
.timeline-date .icon { color: var(--accent-2); }
.timeline-date small { padding: 0 8px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); background: var(--surface-2); }

/* ---------- 工具详情 ---------- */
.tool-hero { position: relative; padding: 36px 0 32px; }
.tool-head { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.tool-head > .logo { box-shadow: 0 0 0 6px var(--surface), var(--shadow-lg); }
.tool-head-main { flex: 1; min-width: 0; }
.tool-head h1 { font-size: 32px; letter-spacing: -0.025em; color: var(--ink); }
.tool-brief { margin: 6px 0 12px; font-size: 16px; color: var(--text-2); }
.tool-cta { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; min-width: 176px; }
.tool-content { display: flex; flex-direction: column; gap: 16px; }
.tool-content > .section { margin: 12px 0 0; }
.lead { font-size: 15.5px; line-height: 1.85; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 14px; background: var(--surface-2); }
.feature-list .icon { margin-top: 4px; color: var(--free); }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: flex-start; gap: 12px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; margin-top: 1px;
  border-radius: 50%; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--accent-2); border: 1px solid var(--line-2);
}
.steps p { padding-top: 2px; color: var(--text-2); }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scene { padding: 13px 15px; border-radius: 10px; background: var(--surface-2); }
.scene strong { font-size: 14.5px; font-weight: 600; }
.scene p { margin-top: 4px; font-size: 13.5px; color: var(--text-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { position: relative; padding: 12px 36px 12px 2px; font-size: 14.5px; font-weight: 600; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s, margin 0.2s;
}
.faq details[open] summary::after { margin-top: -1px; transform: rotate(-135deg); }
.faq-a { padding: 0 2px 14px; font-size: 14px; color: var(--text-2); }
.faq-a a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.info-list { display: grid; margin: 0; }
.info-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--muted); }
.info-list dd { min-width: 0; margin: 0; font-weight: 500; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-list dd a { color: var(--accent-2); }
.info-list .info-heat { display: flex; align-items: center; gap: 8px; width: 140px; }
.info-heat b { font-family: var(--mono); font-weight: 600; color: var(--text-2); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag-cloud a { padding: 2px 10px; border-radius: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--surface-2); transition: color 0.2s, background-color 0.2s; }
.tag-cloud a:hover { color: var(--ink); background: var(--soft); }
.notice { display: flex; gap: 10px; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.notice > .icon { margin-top: 3px; font-size: 17px; color: var(--accent-2); }
.notice a { color: var(--accent-2); }

/* ---------- AI 检索页：工作台 ----------
   和首页的检索过程演示一个样子：顶上一条窗口栏（右边是今天还能检索几次），上面一行左边是目录，右边是候选工具或检索结果，
   下面一行是对话框。电脑上撑满一屏，目录和右边各自滚动；手机上目录是一行横滑的分类，对话框贴在屏幕底部 */
.ws-stage { padding-top: 16px; padding-bottom: 24px; }
.ws {
  display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.ws-bar { display: flex; align-items: center; gap: 6px; flex: none; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.ws-bar > i { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.ws-title { margin-left: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; color: var(--muted); }
.ws-quota { min-width: 0; margin-left: auto; overflow: hidden; font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.ws-quota a { color: var(--accent-2); }
.ws-quota a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ws-body { display: grid; grid-template-columns: 256px minmax(0, 1fr); flex: 1 1 auto; min-height: 0; }
.ws-label { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; white-space: nowrap; color: var(--muted); }
.ws-label::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.ws-label small { font-size: inherit; opacity: 0.85; }

/* 目录：选中的分类填满主色；AI 推荐的工具所在的分类描蓝边，其余的变淡一些 */
.ws-cats { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 16px 18px 18px; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
.ws-cats > .ws-label { margin-bottom: 0; }
.ws-group-name { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-2); }
.ws-group-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ws-cat {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 27px; padding: 0 8px; border-radius: 8px;
  font-size: 12.5px; white-space: nowrap; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: opacity 0.3s, color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ws-cat small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.ws-cat:hover { color: var(--ink); border-color: var(--line-2); }
.ws-all { align-self: flex-start; }
.ws.has-hits .ws-cat:not(.is-hit):not(:hover):not([aria-pressed="true"]) { opacity: 0.5; }
.ws-cat.is-hit { color: var(--ink); background: var(--surface-solid); border-color: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16); }
.ws-cat.is-hit small { color: var(--glow); }
.ws-cat[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.ws-cat[aria-pressed="true"] small { color: inherit; opacity: 0.75; }

/* 右边：没在检索时是候选工具；检索时换成结果，在目录里点了分类（.is-browsing）就先列这一类的工具 */
.ws-pane { min-width: 0; padding: 16px 18px 20px; overflow-y: auto; overscroll-behavior: contain; }
.ws-results, body.searching .ws:not(.is-browsing) .ws-cands { display: none; }
body.searching .ws:not(.is-browsing) .ws-results { display: block; }
.ws-back { display: none; margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: 12px; letter-spacing: 0; color: var(--accent-2); border: 1px solid var(--line-2); transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
body.searching .ws.is-browsing .ws-back { display: block; }
.ws-back:hover { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ws-tiles > li[hidden] { display: none; }
.ws-tile {
  display: flex; align-items: center; gap: 9px; min-width: 0; height: 100%; padding: 9px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ws-tile:hover { background: var(--surface-hover); border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.ws-tile-text { display: flex; flex-direction: column; min-width: 0; }
.ws-tile b { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.ws-tile small { font-size: 11px; color: var(--muted); }
/* 检索结果放在工作台里：面板收紧一些，关键词匹配的卡片一行三张 */
.ws .ai-panel { margin-bottom: 18px; padding: 16px 18px; border-radius: 16px; }
.ws .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 对话框：左边选用户画像，中间输入，右边发送；画像菜单从对话框上方弹出。没在检索时上面一行是示例问题 */
.ws-chat { position: relative; flex: none; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.ws-examples { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; font-size: 12.5px; color: var(--muted); }
.ws-examples::-webkit-scrollbar { display: none; }
.ws-examples > span { flex-shrink: 0; font-family: var(--mono); font-size: 11.5px; }
.ws-examples a {
  flex-shrink: 0; padding: 3px 11px; border-radius: 999px; white-space: nowrap; color: var(--text-2);
  background: var(--float); border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s;
}
.ws-examples a:hover { color: var(--ink); border-color: var(--line-2); }
body.searching .ws-examples { display: none; }
.ws-box {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px; border-radius: 16px;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: border-color 0.2s, box-shadow 0.2s;
}
.ws-box:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring), var(--shadow); }
.ws-persona { position: relative; flex-shrink: 0; }
.ws-pbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px 0 11px; border-radius: 11px;
  font-size: 13px; white-space: nowrap; color: var(--text); background: var(--soft); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s;
}
.ws-pbtn:hover { border-color: var(--line-2); }
.ws-pbtn[aria-expanded="true"] { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16); }
.ws-pbtn .icon { font-size: 15px; color: var(--muted); }
.ws-pbtn > .icon:last-child { font-size: 13px; transition: transform 0.25s; }
.ws-pbtn[aria-expanded="true"] > .icon:last-child { transform: rotate(180deg); }
.ws-pv { display: inline-flex; align-items: center; gap: 6px; }
.ws-pv[hidden] { display: none; }
.ws-pv b { font-weight: 600; }
.ws.has-persona .ws-pv .icon { color: var(--glow); }
.ws-input { flex: 1; min-width: 0; height: 40px; padding: 0 4px; font-size: 15px; color: var(--ink); background: none; border: 0; outline: 0; }
.ws-input::placeholder { color: var(--muted); }
.ws-send {
  display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  font-size: 18px; color: var(--on-accent); background: var(--accent); transition: opacity 0.2s, transform 0.2s;
}
.ws-input:placeholder-shown ~ .ws-send { opacity: 0.35; }
.ws-send:active { transform: scale(0.94); }
.ws-menu {
  position: absolute; left: -7px; bottom: calc(100% + 14px); z-index: 5; width: 236px; padding: 6px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
}
.ws-menu[hidden] { display: none; }
.ws-menu-head { padding: 6px 10px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.ws-p { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); transition: background-color 0.2s, color 0.2s; }
.ws-p:hover, .ws-p:focus-visible { color: var(--ink); background: var(--soft); outline: 0; }
.ws-p .icon { font-size: 15px; color: var(--muted); }
.ws-p .icon:last-child { margin-left: auto; color: var(--glow); opacity: 0; }
.ws-p[aria-pressed="true"] { color: var(--ink); }
.ws-p[aria-pressed="true"] .icon:last-child { opacity: 1; }

@media (min-width: 901px) {
  .ws { height: calc(100vh - var(--header-h) - 40px); height: calc(100svh - var(--header-h) - 40px); min-height: 560px; max-height: 1100px; }
}
@media (max-width: 900px) {
  .ws-stage { padding: 10px 10px 16px; }
  .ws { border-radius: 18px; }
  .ws-body { display: block; }
  .ws-cats {
    flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .ws-cats::-webkit-scrollbar { display: none; }
  .ws-cats > .ws-label, .ws-group-name { display: none; }
  .ws-group, .ws-group-cats { display: contents; }
  .ws-cat { height: 30px; }
  .ws-pane { padding: 14px 12px 16px; overflow: visible; }
  .ws .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-chat {
    position: sticky; bottom: 0; z-index: 3; padding: 8px 10px 10px; border-radius: 0 0 18px 18px;
    background: var(--header-bg); -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  }
}
@media (max-width: 600px) {
  .ws-bar { padding: 0 12px; }
  .ws-bar > i { display: none; }
  .ws-title { margin-left: 0; }
  .ws-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ws .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .ws .ai-panel { padding: 14px 12px; }
  .ai-best { justify-content: center; gap: 0; width: 22px; padding: 0; font-size: 0; }
  .ai-best .icon { width: 12px; height: 12px; }
  .ws-box { gap: 6px; min-height: 48px; padding: 4px; }
  .ws-pbtn { height: 36px; padding: 0 6px 0 9px; }
  .ws-input { font-size: 16px; }
  .ws-send { width: 36px; height: 36px; }
}
/* AI 推荐：discover.js 逐条填入大模型挑出的工具；改了问题还没提交时变淡 */
.ai-panel {
  margin-bottom: 28px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: opacity 0.25s;
}
.ai-panel.is-stale { opacity: 0.55; }
.ai-panel-head { display: grid; gap: 10px; }
.ai-badge { display: inline-flex; align-items: center; gap: 7px; width: fit-content; font-size: 14px; font-weight: 600; color: var(--accent-2); }
.ai-panel .ai-intent:empty { display: none; }
.ai-panel.is-offer .ai-intent, .ai-panel.is-error .ai-intent { font-size: 14px; color: var(--text-2); }
.ai-panel .ai-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.ai-panel .ai-picks:empty { display: none; }
.ai-picks > li { display: flex; min-width: 0; }
.ai-picks > li > .card { flex: 1; }
.ai-picks > .card.is-loading { flex: 1; min-height: 172px; }
/* AI 推荐一行一款：排名、Logo、名字和标签（第一款标“最佳匹配”）、推荐理由和目录里的标签，右边是收藏和官网，整行点进工具页 */
.ai-panel .ai-picks[data-ai-picks] { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ai-hit {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px 12px 12px; border-radius: 14px;
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.2s;
}
.ai-hit:hover { border-color: var(--glow); transform: translateY(-1px); }
.ai-hit.is-loading { display: grid; align-content: center; gap: 10px; min-height: 80px; box-shadow: none; }
.ai-rank { flex-shrink: 0; width: 14px; font-family: var(--mono); font-size: 12px; font-style: normal; text-align: center; color: var(--muted); }
.ai-hit-main { flex: 1; min-width: 0; }
.ai-hit-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ai-hit-name a { overflow: hidden; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.ai-hit-name .tag { flex-shrink: 0; }
.ai-hit-why { margin-top: 4px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.ai-hit-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ai-hit-tags span { padding: 1px 8px; border-radius: 6px; font-size: 11.5px; line-height: 1.6; color: var(--muted); background: var(--soft); }
.ai-hit .fav-btn { align-self: center; }
@media (max-width: 600px) {
  .ai-hit { gap: 10px; padding: 10px 6px 10px 12px; }
  .ai-rank, .ai-hit .visit, .ai-hit-tags, .ai-hit-name .tag { display: none; }
}
.ai-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.ai-status:empty { display: none; }
.ai-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.ai-thinking { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.ai-thinking i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: think 1.2s ease-in-out infinite; }
.ai-thinking i:first-of-type { margin-left: 5px; }
.ai-thinking i:nth-of-type(2) { animation-delay: 0.15s; }
.ai-thinking i:nth-of-type(3) { animation-delay: 0.3s; }
/* AI 有推荐时，关键词没有匹配结果的提示就不必显示了 */
body.ai-has-picks [data-search-empty] { display: none !important; }
.search-meta { margin-bottom: 12px; font-size: 14px; color: var(--text-2); }
.search-meta:empty { display: none; }
.search-meta strong { font-family: var(--mono); color: var(--ink); }
.search-cats { margin-bottom: 16px; }
.search-cats:empty { display: none; }
/* 检索时直接写在背景上的文字垫一层半透明的底，不和后面的星点混在一起 */
body.searching .search-meta, body.searching .search-cats { width: fit-content; max-width: 100%; background: var(--float); border: 1px solid var(--line); }
body.searching .search-meta { padding: 4px 14px; border-radius: 16px; }
body.searching .search-cats { padding: 3px; border-radius: 19px; }
/* 结果浮现：先是模糊、透明、略低一点，再变清楚。只在提交后的一小段时间里（.is-revealing）播放，边输入边更新时不播放 */
.is-revealing .ai-panel, .is-revealing .search-meta, .is-revealing .search-cats, .is-revealing .empty {
  animation: emerge 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s backwards;
}
.is-revealing [data-search-results] > .card { animation: emerge 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.2s + var(--i, 0) * 0.05s) backwards; }
/* AI 推荐每到一条浮现一条 */
.ai-panel .ai-picks > li:not(.is-loading) { animation: emerge 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 0.08s) backwards; }
/* 帖子找工具：读到的帖子（平台、作者、标题和正文开头）、提到的工具、提到了但没收录的名字 */
.ai-badge small { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.post-source { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--accent-2); border-radius: 4px var(--radius) var(--radius) 4px; background: var(--surface-2); }
.post-source.is-share { border-left-style: dashed; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.post-platform { padding: 1px 8px; border-radius: 6px; font-weight: 600; color: var(--accent-2); background: var(--soft); }
.post-author { min-width: 0; max-width: 16em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-link { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--accent-2); }
.post-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-title { margin-top: 8px; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.post-text {
  display: -webkit-box; margin-top: 4px; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  font-size: 13.5px; line-height: 1.65; color: var(--text-2); overflow-wrap: anywhere;
}
.post-notice { display: flex; gap: 8px; margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.post-notice .icon { flex-shrink: 0; margin-top: 0.3em; color: var(--accent-2); }
.post-as { margin: -4px 0 10px; font-size: 12.5px; color: var(--accent-2); overflow-wrap: anywhere; }
.post-panel:not(.show-all) .ai-picks > li.is-more { display: none; }
.post-more { margin-top: 12px; }
.post-unlisted { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.post-names { display: contents; }
.post-name { padding: 1px 10px; border: 1px dashed var(--line-2); border-radius: 999px; overflow-wrap: anywhere; }
.post-unlisted a { display: inline-flex; align-items: center; color: var(--accent-2); }
.post-unlisted a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field label em { margin-left: 2px; font-style: normal; color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background-color: var(--surface-solid); font-size: 14.5px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field select { padding-right: 34px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--ring); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field-error { font-size: 12.5px; color: var(--danger); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.form-tip { font-size: 12.5px; color: var(--muted); }
.form-tip a { color: var(--accent-2); }
.form-status { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.form-status.ok { color: var(--free); background: var(--free-bg); }
.form-status.err { color: var(--danger); background: var(--cn-bg); }
.plain-list { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.plain-list a { color: var(--accent-2); }
.text-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; font-size: 13.5px; color: var(--accent-2); }

/* ---------- 登录弹窗（_login_dialog.html）：和登录页同一张卡片，弹在页面正中，背后压暗；打开时页面不跟着滚 ---------- */
.login-dialog {
  width: min(440px, calc(100% - 24px)); max-width: none; max-height: none; margin: auto; padding: 0;
  color: inherit; background: none; border: 0; overflow: visible;
}
.login-dialog::backdrop { background: rgba(12, 14, 18, 0.46); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.login-dialog .auth-card {
  position: relative; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 28px 26px 24px;
  background: var(--surface-solid); border-color: var(--line-2); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.login-dialog .auth-title { padding-right: 32px; }
.login-close { position: absolute; top: 14px; right: 14px; }
html:has(.login-dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: no-preference) {
  .login-dialog[open] { animation: login-in 0.22s ease-out; }
  .login-dialog[open]::backdrop { animation: login-fade 0.22s ease-out; }
}
@keyframes login-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes login-fade { from { opacity: 0; } }
@media (max-width: 600px) {
  .login-dialog .auth-card { padding: 22px 18px 18px; border-radius: 18px; }
  .login-close { top: 10px; right: 10px; }
}

/* ---------- 关于 ---------- */
.prose { display: flex; flex-direction: column; gap: 16px; }
.prose p { color: var(--text-2); }
.prose p + p { margin-top: 10px; }
.prose ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--text-2); }
.prose ul ::marker { color: var(--accent-2); }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.cta-panel p { margin-bottom: 14px; font-size: 14px; color: var(--text-2); }
.about-badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.about-badge img { width: 150px; height: 150px; }
.about-badge p { font-size: 14px; color: var(--text-2); }

/* ---------- 服务条款、隐私政策 ---------- */
.page-head .doc-dates { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.prose ol { display: grid; gap: 8px; margin: 0; padding-left: 22px; color: var(--text-2); }
.prose ol ::marker { color: var(--accent-2); }
.prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p { margin-top: 10px; }
.prose h3 { margin: 18px 0 6px; font-size: 14.5px; color: var(--ink); }
.prose .panel-title + h3 { margin-top: 0; }
.doc .aside-col { position: sticky; top: calc(var(--header-h) + 20px); }
.doc-toc .plain-list { padding-left: 22px; }
.doc-contact p { font-size: 14px; color: var(--text-2); }
.doc-contact p + p { margin-top: 8px; }
.doc-contact a { color: var(--accent-2); }

/* ---------- 付款后的感谢页 ---------- */
.page-body.thanks-page { max-width: 560px; padding-top: 48px; padding-bottom: 72px; }
.thanks-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 32px 30px; text-align: center; }
.thanks-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--soft); color: var(--accent-2); font-size: 28px; }
.thanks-icon > span { display: none; }
.thanks-card[data-state="done"] .ti-done,
.thanks-card[data-state="wait"] .ti-wait,
.thanks-card[data-state="info"] .ti-info { display: contents; }
.thanks-card[data-state="info"] .thanks-icon { color: var(--muted); }
.thanks-title { font-size: 24px; color: var(--ink); }
.thanks-text { max-width: 420px; color: var(--text-2); text-wrap: balance; }
.thanks-order { align-self: stretch; margin-top: 6px; text-align: left; }
.thanks-no { font-family: var(--mono); font-size: 13px; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.thanks-help { margin-top: 6px; font-size: 13px; color: var(--muted); text-wrap: balance; }
.thanks-help a { color: var(--accent-2); }

/* ---------- 个人主页 ---------- */
.me-page { display: flex; flex-direction: column; gap: 16px; }
.me-page > .section { margin: 24px 0 0; }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-avatar {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%;
  font-size: 22px; color: var(--accent-2); background: var(--soft); border: 1px solid var(--line-2);
}
.me-who { flex: 1; min-width: 0; }
.me-email { font-size: 16px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.me-plan { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.me-plan:empty { display: none; }
.me-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.me-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-stat-label { font-size: 13px; color: var(--muted); }
.me-stat-num { font-size: 14px; color: var(--text-2); }
.me-stat-num b { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.me-stat small { font-size: 12px; color: var(--muted); }
.me-stat.me-stat-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

/* ---------- 404 ---------- */
.notfound { padding: 64px 0 48px; text-align: center; }
.notfound h1 { justify-content: center; }
.notfound p { margin: 0 auto; }
.notfound .hero-search { margin: 26px auto; }
.notfound .notfound-code { font-family: var(--mono); font-size: 84px; font-weight: 300; line-height: 1; letter-spacing: -0.04em; color: var(--accent-2); }

/* ---------- 页脚 ---------- */
.site-footer { position: relative; padding-top: 48px; border-top: 1px solid var(--line); background: rgba(248, 249, 251, 0.92); }
html.dark .site-footer { background: rgba(24, 25, 29, 0.88); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { max-width: 440px; margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.footer-brand .footer-stat { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.site-footer h3 { margin-bottom: 16px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.site-footer ul a { transition: color 0.2s; }
.site-footer ul a:hover { color: var(--ink); }
/* 分隔线下面居中的一句话（衬线体，站名用强调色），参考 DeepTutor 的页脚 */
.footer-motto {
  margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line); text-align: center;
  font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.3; color: var(--ink);
}
.footer-motto em { font-style: normal; color: var(--accent-2); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 28px; padding-bottom: 28px;
  font-size: 12.5px; color: var(--muted);
}

/* ---------- 浮层 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 100; padding: 9px 18px; border-radius: 999px;
  font-size: 14px; color: var(--on-accent); background: var(--accent); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; font-size: 17px; color: var(--text-2);
  background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: color 0.2s, border-color 0.2s;
}
.to-top:hover { color: var(--ink); border-color: var(--accent-2); }

/* ---------- 动画 ---------- */
@keyframes caret { 50% { opacity: 0; } }
@keyframes dm-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes dm-late { from { opacity: 0; } }
@keyframes dm-press { 40% { transform: scale(0.86); } }
@keyframes lp-shine { from { background-position: 100% 0, 0 0; } to { background-position: 0 0, 0 0; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes think { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes emerge { from { opacity: 0; filter: blur(10px); transform: translateY(14px) scale(0.985); } }
@keyframes hh-rise { from { opacity: 0; filter: blur(10px); transform: perspective(900px) translateY(20px) rotateX(32deg) scale(0.95); } }
@keyframes hh-item { from { opacity: 0; filter: blur(4px); transform: translateY(10px) scale(0.96); } }
@keyframes hh-menu { from { opacity: 0; transform: perspective(800px) translateY(-6px) rotateX(-12deg) scale(0.97); } }
@keyframes hh-logo { from { opacity: 0; transform: perspective(300px) rotateY(-110deg) scale(0.6); } }
@keyframes hh-fade { from { opacity: 0; } }
@keyframes ad-glow { from { opacity: 0.4; } to { opacity: 1; } }
/* ---------- 响应式 ---------- */
/* 页头搜索框放不下（窗口窄于 1360px，导航居中后两边的地方不够）时换成搜索图标；再窄一些“提交工具”只留图标 */
@media (max-width: 1359px) {
  .header-search { display: none; }
  .search-link { display: inline-flex; }
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .rank-row { grid-template-columns: 36px 40px minmax(0, 1fr) 150px 130px 30px; }
  .rank-cat { display: none; }
  .submit-link { width: 36px; padding: 0; margin-left: 0; border-color: transparent; background: none; font-size: 18px; }
  .submit-link span { display: none; }
}
@media (max-width: 1024px) {
  .with-aside { grid-template-columns: minmax(0, 1fr); }
  .doc .aside-col { position: static; }
  .dm-body { grid-template-columns: 240px minmax(0, 1fr); }
  .dm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 电脑上收录数、标语、说明和按钮收小一点；离页头的距离和每行之间的间距跟着窗口高度变：
   1080px 高的窗口里离页头 36px，再高的更宽松；800px 以下的笔记本窗口基本不加，高度让给下面的演示面板 */
@media (min-width: 901px) {
  .lp-hero { padding: clamp(8px, 9vh - 61px, 52px) 0 14px; }
  .lp-stage { gap: clamp(16px, 4.5vh - 18px, 36px); }
  .lp-stats { height: 26px; margin-bottom: clamp(10px, 3.1vh - 13px, 24px); font-size: 12.5px; }
  .lp-title { font-size: clamp(34px, min(4.4vw, 5.4vh), 60px); line-height: 1.18; }
  .lp-sub { margin-top: clamp(10px, 3.1vh - 11px, 26px); font-size: clamp(18px, min(1.7vw, 2.5vh), 22px); }
  .lp-cta { height: 42px; margin-top: clamp(20px, 4.1vh - 10px, 40px); padding: 0 26px; font-size: 15.5px; }
}
/* 笔记本上的浏览器窗口大多不到 1000px 高，面板里的上下间距也收紧，让对话框露在第一屏 */
@media (min-width: 901px) and (max-height: 1000px) {
  .dm-bar { height: 38px; }
  .dm-cats, .dm-pane { padding-top: 11px; padding-bottom: 12px; }
  .dm-label { margin-bottom: 7px; }
  .dm-cats { row-gap: 4px; }
  .dm-group-cats { margin-top: 2px; }
  .dm-cat { height: 21px; }
  .dm-tile { padding-block: 6px; }
  .dm-hit { padding-block: 8px; }
  .dm-chat { padding: 8px 14px 10px; }
  .dm-box { min-height: 44px; padding: 3px; }
}
@media (max-width: 900px) {
  .grid-4, .grid-3, .ai-panel .ai-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 演示面板排成一列：目录收成一行（发出需求后滚到亮起的分类），下面是候选工具和结果，最下面是对话框 */
  .dm-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cats" "pane" "chat"; }
  .dm-cats {
    flex-direction: row; align-items: center; gap: 5px; padding: 12px 16px; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .dm-cats > .dm-label { flex-shrink: 0; margin: 0 4px 0 0; }
  .dm-cats > .dm-label small, .dm-group-name { display: none; }
  .dm-group, .dm-group-cats { display: contents; }
  .dm-tile:nth-child(n+13) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .rank-row { grid-template-columns: 32px 40px minmax(0, 1fr) 120px 30px; }
  .rank-badges { display: none; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .tool-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tool-cta { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .tool-cta .btn { flex: 1; }
}
@media (max-width: 600px) {
  :root { --header-h: 56px; }
  .container { padding: 0 16px; }
  .page-body.thanks-page { padding-top: 24px; padding-bottom: 48px; }
  .thanks-card { padding: 32px 20px 24px; }
  .header-inner { gap: 12px; }
  .lp-hero { padding: 16px 0 40px; }
  .lp-stage { gap: 24px; }
  .dm { border-radius: 18px; }
  .dm-pane { padding: 14px; }
  .dm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dm-tile { flex-direction: column; gap: 6px; padding: 10px 6px 9px; text-align: center; }
  .dm-tile p { align-items: center; max-width: 100%; }
  .dm-tile b { font-size: 12.5px; }
  .dm-tile small, .dm-hit-name .tag { display: none; }
  .dm-hit { gap: 10px; padding: 10px 12px 10px 10px; }
  .dm-hit-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
  /* “最佳匹配”只留勾，名字不被挤掉 */
  .dm-best { justify-content: center; gap: 0; width: 22px; padding: 0; font-size: 0; }
  .dm-best .icon { width: 12px; height: 12px; }
  /* 手机上对话框分两行：上面是需求，下面左边选画像、右边发送 */
  .dm-chat { padding: 10px 12px 12px; }
  .dm-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "input input input" "persona . send"; gap: 8px; padding: 10px 6px 6px 12px; }
  .dm-input { grid-area: input; font-size: 13.5px; }
  .dm-persona { grid-area: persona; margin-left: -6px; }
  .dm-send { grid-area: send; width: 36px; height: 36px; }
  .lp-cta { height: 48px; padding: 0 26px; font-size: 16px; }
  body.searching .lp-hero { padding-top: 0; padding-bottom: 56px; }
  .lp-results { margin-top: 28px; }
  .finder, .hero-search { margin-top: 26px; padding-left: 42px; }
  .finder > .icon, .hero-search > .icon { left: 16px; font-size: 18px; }
  .finder input, .hero-search input { height: 44px; }
  .finder .btn, .hero-search .btn { height: 44px; padding: 0 18px; }
  .finder-key { display: none; }
  .finder-hint { margin-top: 14px; font-size: 12.5px; }
  .footer-motto { margin-top: 32px; padding-top: 28px; font-size: 19px; }
  .ai-panel { padding: 16px; }
  .grid, .grid-4, .grid-3, .ai-panel .ai-picks { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { padding: 14px 14px 11px; }
  .card-brief { min-height: 0; }
  .page-head { padding: 32px 0 22px; }
  .page-head h1 { font-size: 25px; }
  .tool-head h1 { font-size: 26px; }
  .panel { padding: 18px; }
  .filter-row { flex-wrap: wrap; }
  .filter-row .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filter-row .chips::-webkit-scrollbar { display: none; }
  .toggle { margin-left: 48px; }
  .rank-row { grid-template-columns: 26px 40px minmax(0, 1fr) 30px; gap: 10px; padding: 10px 12px; }
  .rank-heat { display: none; }
  .feature-list, .scene-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
  .me-head { flex-wrap: wrap; }
  .me-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-stat.me-stat-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mobile-nav .container { grid-template-columns: repeat(2, 1fr); }
  .to-top { right: 16px; bottom: 16px; }
}
/* 手机上页头只留搜索、深浅色、账号和菜单四个图标，收藏和提交工具在菜单里 */
@media (max-width: 480px) {
  .fav-link, .submit-link { display: none; }
}
@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 0; }
  .lp-stats { padding: 0 12px 0 10px; font-size: 12px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
