/* SkillHub Design System — 方案A·静谧茶白：纸感 × 衬线大标题 × 橙色仅作唯一强调 */
:root {
  --bg: #faf9f6;
  --bg-subtle: #f1efe8;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --border: #e2ded4;          /* 加深一档：卡片与底层次更清楚 */
  --border-strong: #cfcbc0;
  --text: #1a1815;
  --text-1: #1a1815;
  --text-2: #63605a;
  --text-3: #9a958a;
  --accent: #cf5327;          /* 唯一强调色：陶土橙（比珊瑚橙沉一档，减刺眼感） */
  --accent-hover: #b84519;
  --accent-soft: #f8ece5;
  --accent-text: #b84519;
  --accent-coral: #cf5327;
  --accent-ring: rgba(207, 83, 39, .13);
  --ink: #1a1815;             /* 墨色：文字 / logo / 大数字专用，与主行动色分离 */
  --glyph-bg: #f0ede5;        /* 中性图标底：替代满屏的橙底图标 */
  --glyph-fg: #7a766c;
  --green: #3d7a44;
  --green-soft: #edf3ea;
  --red: #c24040;
  --red-soft: #f9ecea;
  --amber: #b87a14;
  --amber-soft: #f7efdc;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(70, 45, 25, .06);
  --shadow-md: 0 10px 28px rgba(70, 45, 25, .10);
  --shadow-lg: 0 24px 60px rgba(70, 45, 25, .15);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
::selection { background: rgba(216,90,48,.18); }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); }
a { color: inherit; text-decoration: none; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  transition: all .15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--bg-subtle); border-color: var(--text-3); }
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: auto;
}
.btn:disabled:hover, .btn[disabled]:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---------- 标签 / 徽章 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg-subtle); color: var(--text-2);
  border: 1px solid transparent;
  cursor: default;
}
.chip-click { cursor: pointer; transition: all .15s; }
.chip-click:hover { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-soft); }
.chip-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 600;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--bg-subtle); color: var(--text-3); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(50, 35, 20, .05);
  box-shadow: 0 2px 10px rgba(50, 35, 20, .05);
  border-radius: var(--radius);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(50, 35, 20, .14); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 60px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 8px;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-right: 16px; cursor: pointer; letter-spacing: -0.01em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 800;
}
.logo-dot { color: var(--accent-coral); font-weight: 800; }
.topbar-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-item {
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center;
  border-radius: 9px; font-size: 13.5px; font-weight: 450;
  color: var(--text-2);
  transition: all .15s;
  cursor: pointer; background: none; border: none;
}
.nav-item:hover { color: var(--text); background: var(--bg-subtle); }
.nav-item.active { color: var(--text); background: transparent; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-coral);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 布局 ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }
.page-narrow { max-width: 820px; }
.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.section-title { position: relative; padding-left: 28px; font-size: 16px; font-weight: 600; margin: 32px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 2px; background: var(--accent-coral); border-radius: 1px; }
.section-title:first-child { margin-top: 0; }

/* ---------- Hero（编辑部大标题） ---------- */
.hero { padding: 52px 0 8px; text-align: left; }
.hero h1 {
  font-family: var(--serif);
  font-size: 40px; font-weight: 500; letter-spacing: .02em;
  line-height: 1.3;
}
.hero h1 em { font-style: italic; color: var(--accent-coral); }
.hero p { color: var(--text-2); margin-top: 12px; font-size: 15px; max-width: 520px; }
.hero-box { margin-top: 26px; }
.mode-switch {
  display: inline-flex; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 3px; margin-bottom: 12px; gap: 2px;
}
.mode-btn {
  height: 30px; padding: 0 14px; border: none; background: transparent;
  border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 5px; transition: all .15s;
}
.mode-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mode-btn.mode-ai.active { color: var(--accent-text); }
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px 6px 6px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search-bar.mode-ai { border-color: rgba(216,90,48,.45); }
.search-bar input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; height: 40px; }
.search-bar .btn { height: 40px; border-radius: 9px; }
.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-height: 420px; overflow-y: auto; z-index: 40;
}
.suggest-item { padding: 10px 16px; cursor: pointer; transition: background .1s; }
.suggest-item:hover { background: var(--bg-subtle); }
.hero-stats { margin-top: 16px; color: var(--text-3); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }

/* ---------- Skill 卡片（AI Skill Tool Card） ---------- */
.skill-card {
  padding: 16px 16px 14px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 9px; min-height: 190px;
}
.skill-card-top { display: flex; align-items: flex-start; gap: 10px; }
.skill-glyph {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--glyph-bg); color: var(--glyph-fg);
  transition: transform .2s ease-out, background .2s, color .2s;
}
.skill-card:hover .skill-glyph { background: var(--accent-soft); color: var(--accent-text); }
.skill-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.skill-card .tagline { font-size: 12.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 19px; }
.skill-meta { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.skill-meta .sm-item { display: inline-flex; align-items: center; gap: 4px; }
.skill-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.skill-cta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border);
}
.skill-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.live-dot.big { width: 10px; height: 10px; animation: hhPulse 2.5s ease-in-out infinite; }
.use-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 13px; border-radius: 9px;
  border: 1.5px solid var(--accent-coral); background: var(--surface);
  color: var(--accent-text); font-size: 12.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .18s ease-out; flex-shrink: 0;
}
.use-btn .use-arrow { display: inline-block; transition: transform .18s ease-out; }
.use-btn:hover { background: var(--accent); color: #fff; }
.use-btn:hover .use-arrow { transform: translateX(3px); }
.use-btn:active { transform: scale(.97); }
.use-btn.ghost { border-color: var(--border-strong); color: var(--text-2); }
.use-btn.ghost:hover { border-color: var(--accent-coral); background: var(--surface); color: var(--accent-text); }
.fav-btn {
  width: 28px; height: 28px; border: none; background: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; color: var(--text-3); opacity: .55; transition: all .15s; flex-shrink: 0;
}
.skill-card:hover .fav-btn { opacity: 1; }
.fav-btn:hover { background: var(--bg-subtle); color: var(--amber); opacity: 1; }
.fav-btn.active { color: var(--amber); opacity: 1; }
.fav-btn.active svg { animation: favPop .3s ease; }
@keyframes favPop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.copy-feedback { color: var(--green) !important; }

/* ---------- 详情页 ---------- */
.detail-head { padding: 28px; }
.detail-head h1 { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: 0; }
.detail-tagline { font-size: 15px; color: var(--text-2); margin-top: 6px; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 22px; border-top: 1px solid var(--border); }
.info-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-item .k { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.info-item .v { font-size: 13.5px; line-height: 1.55; }
.content-block { margin-top: 20px; }
.content-block-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; cursor: pointer; user-select: none;
}
.content-block-head:hover { background: var(--surface-2); }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; }
.section-row h4 { font-size: 14.5px; font-weight: 600; }

/* ---------- Markdown 渲染 ---------- */
.md { font-size: 14px; line-height: 1.75; color: var(--text); }
.md h1, .md h2, .md h3, .md h4 { margin: 1.4em 0 .5em; font-weight: 600; line-height: 1.4; }
.md h1:first-child, .md h2:first-child, .md h3:first-child { margin-top: 0; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md p { margin: .6em 0; }
.md ul, .md ol { padding-left: 1.5em; margin: .5em 0; }
.md li { margin: .25em 0; }
.md code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 5px;
}
.md pre {
  background: #1a1815; color: #f0ede6; padding: 14px 16px;
  border-radius: 10px; overflow-x: auto; margin: .8em 0;
}
.md pre code { background: none; padding: 0; color: inherit; font-size: 12.5px; }
.md blockquote { border-left: 3px solid var(--accent-coral); padding-left: 14px; color: var(--text-2); margin: .8em 0; }
.md table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.md th { background: var(--bg-subtle); font-weight: 600; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 1.2em 0; }

/* ---------- AI 抽屉 ---------- */
.ai-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  height: 46px; padding: 0 18px;
  border-radius: 999px; border: none;
  background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md);
  transition: transform .15s, box-shadow .15s;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- 匿名反馈悬浮球 ---------- */
.anon-fab {
  position: fixed; right: 24px; bottom: 80px; z-index: 90;
  height: 40px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 550;
  display: flex; align-items: center; gap: 7px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, color .15s;
}
.anon-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.anon-hint {
  background: var(--green-soft); color: var(--green);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12.5px; line-height: 1.55; margin-bottom: 14px;
}
.anon-done { text-align: center; padding: 22px 0 10px; }
.anon-done .icon { font-size: 34px; margin-bottom: 8px; }
.anon-done .t1 { font-size: 15.5px; font-weight: 650; }
.anon-done .t2 { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.ai-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: 420px; max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(26,24,21,.08);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.ai-drawer.open { transform: translateX(0); }
.ai-drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.ai-drawer-head .t { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-coral); animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
.ai-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { max-width: 92%; font-size: 13.5px; line-height: 1.65; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.ai-msg.assistant { align-self: flex-start; }
.ai-msg.assistant .bubble { background: var(--surface-2); border: 1px solid var(--border); padding: 10px 14px; border-radius: 4px 14px 14px 14px; }
.ai-skill-card {
  margin-top: 8px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); transition: all .15s;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ai-skill-card:hover { border-color: var(--accent-coral); background: var(--accent-soft); }
.ai-skill-card .n { font-weight: 600; font-size: 13px; }
.ai-skill-card .g { font-size: 11.5px; color: var(--text-3); }
/* AI 消息内嵌 Skill 内容卡片 */
.ai-attach-card { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.ai-attach-card:first-of-type { margin-top: 12px; }
.ai-attach-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--accent-soft); border-bottom: 1px solid var(--border);
}
.ai-attach-head .t { font-weight: 600; font-size: 12.5px; }
.ai-attach-head .v { font-weight: 400; font-size: 11px; color: var(--text-3); margin-left: 4px; }
.ai-attach-body {
  padding: 10px 12px; font-size: 12px; line-height: 1.6; color: var(--text-2);
  font-family: var(--mono);
  white-space: pre-wrap; word-break: break-word; cursor: pointer;
  max-height: 180px; overflow: hidden; position: relative;
}
.ai-attach-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, var(--surface)); }
.ai-attach-foot { padding: 6px 12px 8px; font-size: 11px; color: var(--text-3); cursor: pointer; }
.ai-attach-foot:hover, .ai-attach-body:hover { color: var(--accent-text); }
.ai-thinking { display: flex; gap: 5px; padding: 12px 4px; }
.ai-thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-coral); animation: think 1.2s ease-in-out infinite; }
.ai-thinking span:nth-child(2) { animation-delay: .15s; }
.ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.ai-input-bar { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.ai-input-bar textarea { flex: 1; min-height: 42px; max-height: 120px; }
.drawer-mask { position: fixed; inset: 0; background: rgba(26,24,21,.2); z-index: 95; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 后台 ---------- */
.admin-layout { display: flex; min-height: calc(100vh - 56px); }
.admin-side {
  width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.admin-side .nav-item { width: 100%; justify-content: flex-start; margin-bottom: 2px; }
.admin-side .nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.admin-main { flex: 1; padding: 28px 32px; min-width: 0; }
.admin-main h2 { font-family: var(--serif); font-size: 22px; font-weight: 400; margin-bottom: 4px; letter-spacing: 0; }
.admin-sub { color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { padding: 18px 20px; }
.stat-card .v { font-family: var(--serif); font-size: 28px; font-weight: 400; letter-spacing: 0; line-height: 1.2; }
.stat-card .k { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
/* 排版修复：chip/badge/时间列禁止被挤压成竖排；操作列给足最小宽度 */
.tbl td .chip, .tbl td .badge { white-space: nowrap; display: inline-block; max-width: none; }
.tbl td .actions { min-width: 128px; }
.tbl td .actions .btn { white-space: nowrap; flex-shrink: 0; }
/* 成员管理：9 列宽表禁止竖排挤压，超出宽度走容器横滑 */
.tbl-users { min-width: 980px; }
.tbl-users td { white-space: nowrap; }
.tbl-users td .chip, .tbl-users td .badge { display: inline-flex; }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,24,21,.4);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
  animation: fadeIn .18s;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 640px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s cubic-bezier(.32,.72,0,1);
}
.modal-lg { max-width: 860px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 22px 24px; max-height: 72vh; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.icon-x { width: 30px; height: 30px; border: none; background: none; border-radius: 7px; color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.icon-x:hover { background: var(--bg-subtle); color: var(--text); }

/* ---------- 空状态 / Loading ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty .icon { font-size: 34px; margin-bottom: 10px; opacity: .55; }
.empty .t1 { font-size: 14.5px; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.empty .t2 { font-size: 12.5px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--accent-coral); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1a1815; color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn .25s cubic-bezier(.32,.72,0,1);
  display: flex; align-items: center; gap: 7px;
}
.toast.success::before { content: '✓'; color: #7fc98a; font-weight: 700; }
.toast.error::before { content: '✕'; color: #ef8f8f; font-weight: 700; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(216,90,48,.06), transparent),
    var(--bg);
  padding: 20px;
}
.login-card { width: 100%; max-width: 380px; padding: 36px; }
.login-icp { margin: 18px 0 0; text-align: center; font-size: 12px; }
.login-icp a { color: var(--text-3); text-decoration: none; }
.login-icp a:hover { color: var(--text-2); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-logo .logo-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.login-logo h1 { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.login-logo p { color: var(--text-3); font-size: 13px; }

/* ---------- 页面切换 ---------- */
.view-enter { animation: viewIn .22s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 汉堡按钮 & 手机抽屉菜单（桌面隐藏） ---------- */
.hamburger { display: none; }
.mobile-menu { display: none; }
.mobile-menu-mask { display: none; }

/* ---------- 手机端适配（≤640px 全量重排） ---------- */
@media (max-width: 640px) {
  /* 基础排版 */
  body { font-size: 14.5px; }
  .page { padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .hide-mobile { display: none !important; }

  /* 顶栏：导航收进汉堡抽屉，汉堡按钮固定在最左（更符合手机操作习惯） */
  .topbar { padding: 0 16px 0 10px; gap: 6px; height: 52px; }
  .topbar-nav { display: none; }
  .topbar-right { gap: 8px; margin-left: auto; }
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 36px; height: 36px; padding: 8px;
    border: none; background: transparent; border-radius: 8px; cursor: pointer;
  }
  .hamburger:active { background: var(--bg-subtle); }
  .hamburger span {
    display: block; height: 2px; width: 100%; border-radius: 2px;
    background: var(--text); transition: transform .22s ease, opacity .18s ease;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* 全屏抽屉菜单 */
  .mobile-menu-mask {
    display: block; position: fixed; inset: 0; z-index: 210;
    background: rgba(26,24,21,.34); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    animation: fadeIn .18s;
  }
  .mobile-menu {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; right: 0; z-index: 220;
    background: var(--surface);
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow-lg);
    padding: 14px 18px calc(16px + env(safe-area-inset-top, 0px));
    transform: translateY(-102%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
    max-height: 82vh; overflow-y: auto;
  }
  .mobile-menu.open { transform: translateY(0); }
  .mobile-menu-head { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px; border-bottom: 1px solid var(--border); }
  .mobile-menu-head .avatar { width: 38px; height: 38px; font-size: 15px; }
  .mobile-menu-nav { display: flex; flex-direction: column; padding-top: 10px; }
  .mobile-menu-nav button {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 10px; border: none; background: none;
    font-size: 15px; font-weight: 500; color: var(--text-1);
    border-radius: 10px; text-align: left; transition: background .15s;
  }
  .mobile-menu-nav button:active { background: var(--bg-subtle); }
  .mobile-menu-nav button.active { background: var(--bg-subtle); color: var(--text); font-weight: 600; }
  .mobile-menu-nav button.mm-admin { color: var(--accent-text); font-weight: 600; }

  /* Hero 与首页 */
  .hero { padding: 30px 0 4px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 10px; font-size: 12.5px; }
  .search-bar input { font-size: 16px; }   /* ≥16px 防止 iOS 聚焦自动放大 */
  .info-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* 详情页 */
  .detail-head { padding: 20px 18px; }
  .detail-head h1 { font-size: 21px; }
  .detail-actions .btn { flex: 1; }

  /* AI 抽屉 & 浮钮：适配 iOS 安全区 */
  .ai-drawer { width: 100vw; }
  .ai-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); height: 44px; padding: 0 15px; font-size: 13.5px; }
  .anon-fab { right: 14px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); height: 38px; padding: 0 13px; font-size: 12.5px; }

  /* Toast 位置 */
  .toast-wrap { top: calc(60px + env(safe-area-inset-top, 0px)); width: calc(100vw - 32px); }
  .toast { max-width: 100%; }

  /* Modal */
  .modal-mask { padding: 4vh 12px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; animation: sheetIn .26s cubic-bezier(.32,.72,0,1); }
  .modal-head { padding: 16px 18px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
  .modal-body { padding: 16px 18px; max-height: 70vh; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1; height: 42px; }

  /* 表格：容器留负边距让表格撑满屏宽横滑 */
  .table-wrap { margin: 0 -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 640px; }
  .tbl td { padding: 12px 10px; white-space: nowrap; }
  .tbl td div[style*="writing-mode"], .tbl td .vertical { writing-mode: horizontal-tb !important; }

  /* 表单双列 → 单列 */
  .form-grid-2, .field-grid-2, div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* 输入控件 ≥16px 防 iOS 缩放 */
  .input, .select, .textarea { font-size: 16px; }

  /* ---------- 管理后台 ---------- */
  .admin-side { display: none; }
  .admin-layout { display: block; min-height: calc(100vh - 52px); }
  .admin-mobile-nav {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 16px 10px; position: sticky; top: 52px; z-index: 40;
    background: rgba(250,249,246,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .admin-mobile-nav::-webkit-scrollbar { display: none; }
  .admin-mobile-nav .chip { height: 30px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); flex-shrink: 0; font-size: 12.5px; }
  .admin-mobile-nav .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .admin-main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .admin-main h2 { font-size: 19px; }
  .admin-sub { margin-bottom: 16px; }

  /* 工作台 */
  .wb-examples { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .wb-title { font-size: 22px; }
  .wb-run { height: auto; min-height: calc(100vh - 220px); }
  .wb-run-body { position: relative; }
  .wb-side {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; width: auto; max-height: 62vh;
    border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform .25s ease;
    box-shadow: 0 -8px 30px rgba(26,24,21,.14);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .wb-side.open { transform: translateY(0); }
  .wb-side-close { display: block; }
  .wb-side-mask { display: block; position: fixed; inset: 0; background: rgba(26,24,21,.3); z-index: 55; }
  .wb-side-fab { display: block; position: absolute; top: 8px; right: 10px; z-index: 40; font-size: 12px; padding: 5px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; color: var(--text-2); cursor: pointer; }
  .wb-run-top { flex-wrap: wrap; }
  .wb-run-actions { margin-left: 0; }
  .wb-bubble { max-width: 92%; }
  .wb-inputbar { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

  /* 登录页 */
  .login-card { padding: 28px 22px; }
  .login-card .input { font-size: 16px; }
}

@keyframes sheetIn { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }
/* 桌面端隐藏 admin-mobile-nav */
.admin-mobile-nav { display: none; }
@media (max-width: 640px) {
  .admin-mobile-nav { display: flex; }
}

/* ---------- AI 工作台 V3（三阶段：描述任务 → AI 匹配 → 在线试用） ---------- */
.wb-page { max-width: 1180px; }

/* 阶段进度指示 */
.wb-steps {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 26px 0 0; font-size: 13px; font-weight: 550;
}
.wb-step { display: inline-flex; align-items: center; gap: 7px; color: var(--text-3); }
.wb-step-num { font-style: normal; font-size: 14px; }
.wb-step.now { color: var(--accent-text); font-weight: 650; }
.wb-step.done { color: var(--text-1); }
.wb-step.future { color: var(--text-3); }
.wb-step-line { width: 44px; height: 1px; background: var(--border-strong); }

/* 阶段 1：任务输入 */
.wb-hero { text-align: center; padding: 34px 0 10px; }
.wb-title { font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: 0; line-height: 1.3; }
.wb-sub { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.wb-task-wrap { margin: 24px auto 0; max-width: 720px; padding: 16px 16px 14px; text-align: left; }
.wb-task-label { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .05em; margin-bottom: 8px; }
.wb-task-input {
  width: 100%; min-height: 140px; border: none; outline: none; resize: vertical;
  font-size: 14.5px; line-height: 1.65; background: transparent; color: var(--text-1); font-family: inherit;
}
.wb-task-input::placeholder { color: var(--text-3); }
.wb-task-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.wb-task-hint { font-size: 11.5px; color: var(--text-3); }
.wb-task-count { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.wb-task-count.max { color: var(--amber); font-weight: 600; }
.wb-match-btn { margin-top: 12px; width: 100%; height: 42px; background: var(--accent-coral); border-color: var(--accent-coral); color: #fff; font-weight: 600; font-size: 14px; }
.wb-match-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.wb-match-btn:disabled, .wb-match-btn[disabled] { opacity: 1; background: #f0a98e; border-color: #f0a98e; color: #fff; cursor: not-allowed; }
.wb-match-arrow { display: inline-block; transition: transform .2s; margin-left: 2px; }
.wb-match-btn:hover:not(:disabled) .wb-match-arrow { transform: translateX(4px); }

/* 示例任务（换一批轮换） */
.wb-examples { max-width: 720px; margin: 18px auto 0; }
.wb-ex-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.wb-ex-row { display: flex; gap: 10px; align-items: stretch; }
.wb-ex-card {
  flex: 1; padding: 12px 13px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px;
  transition: transform .15s, box-shadow .15s, border-color .15s; border: 1px solid var(--border);
}
.wb-ex-card:hover { transform: translateY(-2px); border-color: var(--accent-coral); box-shadow: var(--shadow-md); }
.wb-ex-card .t { font-weight: 600; font-size: 13px; color: var(--text-1); }
.wb-ex-card .d {
  font-size: 11.5px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wb-ex-shuffle {
  flex-shrink: 0; align-self: center; border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 7px 13px; font-size: 12px; color: var(--text-2); cursor: pointer;
  transition: all .15s; font-family: var(--font); white-space: nowrap;
}
.wb-ex-shuffle:hover { color: var(--accent-text); border-color: var(--accent-coral); }

/* AI 分析状态（等待真实 API 响应） */
.wb-thinking { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 18px; margin: 22px auto 0; max-width: 720px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }
.wb-thinking span { transition: color .35s, opacity .35s; opacity: .45; display: inline-flex; align-items: center; gap: 5px; }
.wb-thinking span.on { opacity: 1; color: var(--text-1); font-weight: 550; }
.wb-think-star { color: var(--accent-coral); font-size: 12px; animation: wbPulse 1.6s infinite; }

/* 最近使用 / 空态 */
.wb-recent { margin-top: 30px; }
.wb-recent-title { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.wb-empty { margin-top: 30px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 阶段 2：匹配结果 */
.wb-results { margin-top: 18px; }
.wb-results-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.wb-result-title { font-size: 17px; font-weight: 650; }
.wb-result-sub { font-size: 12.5px; color: var(--text-2); margin-top: 5px; }
.wb-results-hint {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.wb-rec-list { display: flex; flex-direction: column; gap: 12px; max-width: 880px; }
.wb-rec-card { position: relative; padding: 18px 20px 16px; animation: wbFadeIn .45s ease both; border: 1px solid var(--border); }
@keyframes wbFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wb-rec-card.is-main { border-color: rgba(216,90,48,.5); box-shadow: var(--shadow-md); }
.wb-rec-tag {
  position: absolute; top: -10px; left: 18px; z-index: 2;
  background: var(--accent-coral); color: #fff; font-size: 11px; font-weight: 650;
  padding: 3px 11px; border-radius: 999px; letter-spacing: .05em;
}
.wb-rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wb-rec-head .n { font-size: 15.5px; font-weight: 600; }
.wb-rec-head .v { font-size: 12px; color: var(--text-3); font-weight: 500; }
.wb-rec-card .tag { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.wb-rec-card .chips { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.wb-rec-card .reason { margin-top: 10px; font-size: 13px; color: var(--text-2); background: var(--bg-subtle); border-radius: 8px; padding: 9px 12px; line-height: 1.6; }
.wb-rec-card .reason b { color: var(--text-1); font-weight: 600; }
.wb-rec-trial { display: flex; align-items: center; gap: 10px; margin-top: 11px; flex-wrap: wrap; }
.wb-trial-usage { font-size: 12px; color: var(--text-2); }
.wb-trial-remain { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
.wb-trial-remain.done { color: var(--red); background: var(--red-soft); }
.wb-rec-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.wb-disabled { font-size: 12px; color: var(--text-3); }
.wb-nomatch { padding: 18px 20px; }
.wb-nomatch .t1 { font-weight: 600; }
.wb-nomatch .t2 { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.wb-results-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; max-width: 880px; }

/* 运行模式（阶段 3） */
.wb-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--text-2); }
.wb-run { display: flex; flex-direction: column; height: calc(100vh - 130px); min-height: 520px; }
.wb-run-top { display: flex; align-items: center; gap: 14px; padding: 10px 2px; flex-wrap: wrap; }
.wb-run-now { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wb-run-now .n { font-weight: 600; font-size: 15px; }
.wb-run-now .v { font-size: 12px; color: var(--text-3); }
.wb-run-now .loaded { font-size: 12px; color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.wb-run-now .loaded .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; animation: wbPulse 2s infinite; }
@keyframes wbPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.wb-trial-now { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
.wb-trial-now.done { color: var(--red); background: var(--red-soft); }
.wb-run-actions { margin-left: auto; display: flex; gap: 4px; }
.wb-run-actions .fav-on { color: var(--amber); }
.wb-run-body { display: flex; gap: 14px; flex: 1; min-height: 0; }
.wb-chat { flex: 68; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.wb-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.wb-msg { display: flex; }
.wb-msg.user { justify-content: flex-end; }
.wb-bubble { max-width: 82%; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.65; }
.wb-bubble.user { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.wb-bubble.ai { background: var(--bg-subtle); border-bottom-left-radius: 4px; }
.wb-ai-name { font-size: 11.5px; color: var(--accent-text); font-weight: 600; margin-bottom: 4px; }
.wb-cursor { display: inline-block; animation: wbBlink 1s steps(2) infinite; color: var(--accent-text); }
@keyframes wbBlink { 0% { opacity: 1; } 50% { opacity: 0; } }
.wb-err { color: var(--amber); font-size: 12.5px; margin-top: 6px; }
.wb-quick { padding: 0 14px 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wb-quick-label { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }
.wb-inputbar { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.wb-inputbar .textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; }
.wb-inputbar .btn { height: 40px; flex-shrink: 0; }

/* 右侧栏（30-35%） */
.wb-side { flex: 32; max-width: 380px; min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; overflow-y: auto; }
.wb-side-name { font-size: 15px; font-weight: 600; margin-top: 4px; }
.wb-side-name .v { font-size: 11.5px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.wb-side-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.wb-side-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin-top: 10px; }
.wb-side-sec { margin-top: 16px; }
.wb-side-sec .t { font-size: 11.5px; color: var(--text-3); margin-bottom: 7px; letter-spacing: .03em; }
.wb-side-item { font-size: 12.5px; color: var(--text-1); padding: 8px 10px; border-radius: 8px; background: var(--bg-subtle); margin-bottom: 6px; cursor: pointer; transition: background .15s, transform .15s; line-height: 1.5; }
.wb-side-item:hover { background: var(--accent-soft); transform: translateX(2px); }
.wb-side-progress { background: var(--bg-subtle); border-radius: 10px; padding: 11px 12px; }
.wb-progress-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.wb-progress-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent-coral); transition: width .4s ease; }
.wb-progress-txt { font-size: 12px; font-weight: 600; color: var(--text-1); margin-top: 8px; }
.wb-progress-note { font-size: 11px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.wb-side-dl { border-top: 1px dashed var(--border); padding-top: 14px; }
.wb-side-dl-txt { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-bottom: 9px; }

/* 移动端 */
@media (max-width: 860px) {
  .wb-title { font-size: 24px; }
  .wb-ex-row { flex-direction: column; }
  .wb-ex-shuffle { align-self: flex-end; }
  .wb-run { height: calc(100vh - 150px); }
  .wb-run-body { position: relative; flex-direction: column; overflow-y: auto; }
  .wb-chat { min-height: 420px; }
  .wb-side { max-width: none; width: auto; }
  .wb-run-top { flex-wrap: wrap; }
  .wb-run-actions { margin-left: 0; }
  .wb-bubble { max-width: 92%; }
  .wb-results-foot { flex-direction: column; }
}

/* 后台：AI 试用配置 */
.trial-cfg { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-subtle); }
.trial-cfg-title { font-weight: 600; font-size: 13.5px; }
.trial-cfg-sub { font-size: 12px; color: var(--text-3); margin: 6px 0 10px; line-height: 1.6; }
.trial-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; }
.trial-switch input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent-coral); }
.trial-switch-state { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }

/* 卡片上的 AI 试用入口 */
.trial-btn {
  border: none; background: var(--accent-soft); color: var(--accent-text);
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  font-family: inherit; margin-left: 6px; flex-shrink: 0;
}
.trial-btn:hover {
  background: var(--accent); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.trial-btn:active { transform: scale(.95); }

/* ============================================================
   Skill 库（AI 能力探索中心）— lib- 前缀
   ============================================================ */
.page-lib { max-width: 1440px; }

/* ---------- Hero ---------- */
.lib-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: start;
  padding: 6px 0 22px;
}
.lib-title {
  font-family: var(--serif); font-size: 46px; font-weight: 400;
  color: var(--ink); line-height: 1.15; letter-spacing: .01em;
}
.lib-sub { margin-top: 10px; font-size: 15.5px; color: var(--text-2); }
.lib-search {
  display: flex; align-items: center; gap: 12px;
  max-width: 720px; margin-top: 20px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 7px 7px 7px 18px;
  transition: border-color .2s ease-out, box-shadow .2s ease-out;
}
.lib-search:focus-within {
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.lib-search-ic { color: var(--text-3); display: flex; flex-shrink: 0; }
.lib-search:focus-within .lib-search-ic { color: var(--accent-text); }
.lib-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--text); height: 44px; font-family: inherit;
}
.lib-search input::placeholder { color: var(--text-3); }
.lib-search-go {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 44px; padding: 0 20px; border: none; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .15s, transform .15s;
}
.lib-search-go:hover { background: var(--accent-hover); transform: translateY(-1px); }
.lib-search-go:active { transform: scale(.98); }
.lib-try { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lib-try-label { font-size: 12.5px; color: var(--text-3); }
.lib-try-word {
  height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); font-family: inherit; cursor: pointer;
  transition: all .16s ease-out;
}
.lib-try-word:hover { border-color: var(--accent-coral); color: var(--accent-text); background: var(--accent-soft); }

/* Hero 右侧：品牌视觉 + Stat */
.lib-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; min-width: 280px; }
.lib-hand {
  font-family: var(--serif); font-style: italic; font-size: 14.5px;
  color: var(--accent-text); display: flex; align-items: center; gap: 6px;
  transform: rotate(-1.5deg); align-self: flex-end; margin-right: 8px;
}
.lib-brand { position: relative; width: 150px; height: 74px; }
.lib-brand-s {
  position: absolute; right: 0; top: 4px; z-index: 2;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(26,24,21,.18);
}
.lib-brand::after {
  content: ''; position: absolute; right: -14px; top: -10px; z-index: 0;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,90,48,.14) 0%, rgba(216,90,48,0) 70%);
}
.lib-brand-cards { position: absolute; left: 0; top: 0; width: 110px; height: 74px; }
.lib-brand-cards i {
  position: absolute; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.65);
}
.lib-brand-cards i:nth-child(1) { left: 44px; top: 12px; width: 62px; height: 46px; transform: rotate(-4deg); }
.lib-brand-cards i:nth-child(2) { left: 14px; top: 8px; width: 62px; height: 46px; transform: rotate(3deg); }
.lib-brand-cards i:nth-child(3) { left: 28px; top: 18px; width: 62px; height: 46px; transform: rotate(-1deg); background: rgba(255,255,255,.82); }
.lib-stats { display: flex; align-items: stretch; }
.lib-stat {
  display: flex; align-items: center; gap: 9px; padding: 0 18px; cursor: pointer;
  transition: background .15s ease-out; border-radius: 10px;
}
.lib-stat:hover { background: var(--accent-soft); }
.lib-stat + .lib-stat { border-left: 1px solid var(--border); }
.lib-stat b { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.lib-stat b.ls-live { display: flex; align-items: center; }
.lib-stat i { display: block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
.lib-stat em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

/* ---------- 分类平铺 ---------- */
.lib-cats-flat { margin: 4px 0 6px; }
.lib-cats-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.lib-cats-label::before { content: ''; width: 14px; height: 2.5px; border-radius: 2px; background: var(--accent-coral); }
.lib-cats-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.lib-cat {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 10px; border-radius: 13px;
  border: 1.5px solid var(--border); background: var(--bg-subtle);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .2s ease-out, background .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out;
}
.lib-cat:hover { border-color: var(--border-strong); background: var(--surface); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.lib-cat.active { border-color: var(--accent-coral); background: var(--accent-soft); }
.lib-cat-ic {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--accent-text);
}
.lib-cat.active .lib-cat-ic { border-color: rgba(216,90,48,.35); }
.lib-cat-txt b { display: block; font-size: 13.5px; font-weight: 650; color: var(--text); line-height: 1.25; }
.lib-cat-txt i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.lib-cat.active .lib-cat-txt b { color: var(--accent-text); }

/* ---------- 标签 ---------- */
.lib-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.lib-tags-label { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.tag-pill {
  height: 27px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-subtle);
  font-size: 12px; color: var(--text-2); font-family: inherit; cursor: pointer;
  transition: all .15s ease-out;
}
.tag-pill:hover { border-color: var(--accent-coral); color: var(--accent-text); }
.tag-pill.active { background: var(--accent-soft); border-color: var(--accent-coral); color: var(--accent-text); font-weight: 600; }
.tag-more {
  height: 27px; padding: 0 10px; border: none; background: none;
  font-size: 12px; color: var(--accent-text); cursor: pointer; font-family: inherit;
}
.tag-more:hover { text-decoration: underline; }

/* ---------- 工具栏 ---------- */
.lib-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.lib-filter-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-fname {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 12.5px; font-weight: 600;
}
.lib-fcount { font-size: 12.5px; color: var(--text-3); margin-left: 2px; }
.lib-clear {
  border: none; background: none; font-size: 12.5px; color: var(--text-3);
  cursor: pointer; font-family: inherit; padding: 4px 6px;
}
.lib-clear:hover { color: var(--accent-text); }
.lib-sort { width: auto; height: 32px; font-size: 12.5px; }

/* ---------- 网格与筛选动画 ---------- */
.lib-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
/* 网格子项不再自带入场动画：卡片统一由 .fv-card-item 的 fvIn 负责
   （旧版 hhIn 会覆盖 fvIn 且 opacity:0 基础态导致卡片播完隐身，已移除）。
   --d 级联延迟透传给卡片动画。 */
.lib-grid > .fv-card-item { animation-delay: var(--d, 0ms); }
.lib-grid.switching { opacity: 0; transform: translateY(4px); transition: all .16s ease-out; }
@media (min-width: 1440px) { .lib-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1099px) { .lib-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-empty { padding: 46px 20px; }
.lib-empty .icon { font-size: 0; color: var(--text-3); display: flex; justify-content: center; margin-bottom: 10px; }

/* ============================================================
   首页 Hero 任务启动台（hh- 前缀，仅首页使用）
   ============================================================ */
.page-home { max-width: 1280px; }

/* 进入动画：单元素 fade+up，--d 为延迟 */
.an { opacity: 0; transform: translateY(10px); animation: hhIn .5s ease-out forwards; animation-delay: var(--d, 0ms); }
@keyframes hhIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .an { animation: none; opacity: 1; transform: none; } }

/* ---------- 双栏布局 ---------- */
.hh-hero {
  display: grid; grid-template-columns: 55% 45%; align-items: center; gap: 36px;
  min-height: 0; padding: 64px 0 8px; position: relative;
}
.hh-hero::before {
  content: ""; position: absolute; inset: -60px -200px auto -200px; height: 480px;
  background: radial-gradient(ellipse 55% 60% at 30% 30%, rgba(207,83,39,.05), transparent 70%);
  pointer-events: none;
}

/* ---------- 左栏 ---------- */
.hh-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 2.6px;
  color: var(--accent-coral); text-transform: uppercase; margin-bottom: 18px;
}
.hh-title {
  font-family: var(--serif); font-size: 52px; font-weight: 500;
  line-height: 1.18; color: var(--ink, var(--text)); position: relative;
  letter-spacing: .01em; margin: 0;
}
.hh-title em { font-style: italic; color: var(--accent-coral); }
.hh-arrow {
  position: absolute; right: -58px; bottom: 8px;
  color: var(--accent-coral); opacity: 0; animation: hhFadeIn .5s .9s ease-out forwards;
}
@keyframes hhFadeIn { to { opacity: 1; } }
.hh-arrow path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: hhDraw .8s .9s ease-out forwards; }
@keyframes hhDraw { to { stroke-dashoffset: 0; } }
.hh-sub { margin: 18px 0 0; font-size: 16.5px; line-height: 1.75; color: var(--text-2); max-width: 520px; }

/* 分段切换（滑块式） */
.hh-seg {
  position: relative; display: inline-flex; margin-top: 32px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.hh-seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 16px; border: none; background: transparent;
  border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: color .2s ease-out;
}
.hh-seg button.active { color: var(--accent-text); font-weight: 600; }
.hh-seg-thumb {
  position: absolute; top: 3px; left: 3px;
  height: calc(100% - 6px);
  background: var(--surface); border-radius: 999px;
  border: 1px solid rgba(216,90,48,.4);
  box-shadow: var(--shadow-sm);
  transition: left .2s ease-out, width .2s ease-out;
}
.hh-badge {
  font-style: normal; font-size: 10px; font-weight: 600; line-height: 1;
  color: var(--accent-text); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 6px; margin-left: 4px; white-space: nowrap;
}

/* AI Task Launcher */
.hh-launch-wrap { position: relative; margin-top: 14px; }
.hh-launcher {
  display: flex; align-items: center; gap: 12px;
  max-width: 640px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 15px 15px 15px 20px;
  box-shadow: 0 10px 34px rgba(50, 35, 20, .07);
  transition: border-color .22s ease-out, box-shadow .22s ease-out;
}
.hh-launcher.focus {
  box-shadow: 0 14px 44px rgba(50, 35, 20, .11);
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 4px var(--accent-ring), 0 8px 30px rgba(60,40,20,.05);
}
.hh-launch-ic { color: var(--accent-coral); display: flex; flex-shrink: 0; }
.hh-launcher input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15.5px; color: var(--text); height: 44px;
  font-family: inherit;
}
.hh-launcher input::placeholder { color: var(--text-3); }
.hh-go {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 52px; padding: 0 22px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600;
  font-family: inherit; transition: transform .14s ease-out, background .14s ease-out, filter .14s ease-out;
}
.hh-go .hh-go-arrow { display: inline-flex; transition: transform .14s ease-out; }
.hh-go:hover { background: var(--accent-hover); transform: translateY(-1px); }
.hh-go:hover .hh-go-arrow { transform: translateX(3px); }
.hh-go:active { transform: scale(.98); }
.hh-go:disabled { opacity: .75; cursor: default; transform: none; }
.hh-go-spark { display: inline-flex; animation: hhSpin 1.1s linear infinite; }
@keyframes hhSpin { to { transform: rotate(360deg); } }

/* AI 寻找三步状态 */
.hh-steps { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; padding: 2px 4px; }
.hh-steps div {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-3);
  opacity: .4; transition: opacity .22s ease-out, color .22s ease-out;
}
.hh-steps div.on { opacity: 1; color: var(--accent-text); }
.hh-steps div span { display: inline-flex; }

/* 快捷任务 */
.hh-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.hh-quick-label { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }
.hh-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  font-family: inherit; cursor: pointer;
  transition: all .16s ease-out;
}
.hh-chip span { display: inline-flex; color: var(--text-3); transition: color .16s ease-out; }
.hh-chip:hover { background: var(--bg-subtle); border-color: var(--accent-coral); color: var(--accent-text); transform: translateY(-1px); }
.hh-chip:hover span { color: var(--accent-text); }
.hh-chip-more { border-style: dashed; color: var(--text-3); }

/* ---------- 右栏 Skill Stack ---------- */
.hh-right { display: flex; flex-direction: column; justify-content: center; min-height: 380px; position: relative; z-index: 1; }
.hh-hand {
  font-family: var(--serif); font-size: 15px; font-weight: 500; font-style: italic;
  color: var(--accent-text); display: flex; align-items: center; gap: 6px;
  margin: 0 0 14px 12px; transform: rotate(-2deg);
}
.hh-hand svg { color: var(--accent-coral); transform: rotate(6deg); margin-top: 4px; }
.hh-stack { display: flex; flex-direction: column; gap: 14px; }
.stack-item { display: flex; }
.stack-item:nth-child(1) { justify-content: flex-start; padding-right: 8%; }
.stack-item:nth-child(2) { justify-content: flex-end; padding-left: 6%; }
.stack-item:nth-child(3) { justify-content: center; }
.stack-item:nth-child(4) { justify-content: flex-end; padding-left: 10%; }
.stack-item:nth-child(5) { justify-content: flex-start; padding-right: 4%; }
.stack-float { width: 100%; max-width: 300px; transition: transform .25s ease-out; }
.stack-float.float { animation: hhFloat 5.2s ease-in-out infinite; }
@keyframes hhFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .stack-float.float { animation: none; } }
.stack-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(50,35,20,.06);
  transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
}
.stack-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(60,40,20,.08); border-color: rgba(207,83,39,.35); }
.stack-card:hover .stack-arrow { transform: translateX(3px); color: var(--accent-text); }
.stack-glyph {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--glyph-bg); color: var(--glyph-fg);
  transition: background .18s ease-out, color .18s ease-out;
}
.stack-card:hover .stack-glyph { background: var(--accent-soft); color: var(--accent-text); }
.stack-txt { flex: 1; min-width: 0; }
.stack-txt b { display: block; font-size: 14px; font-weight: 650; color: var(--text); }
.stack-txt i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.stack-arrow { display: inline-flex; color: var(--text-3); transition: transform .18s ease-out, color .18s ease-out; }

/* ---------- 底部统计 ---------- */
.hh-stats {
  display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap;
  margin-top: 40px; padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.hh-stat { display: flex; align-items: center; gap: 11px; padding: 0 26px; }
.hh-stat.click { cursor: pointer; border-radius: 12px; transition: background .15s ease-out; }
.hh-stat.click:hover { background: var(--bg-subtle); }
.hh-stat.click:hover b { color: var(--text); }
.hh-stat:first-child { padding-left: 0; }
.hh-stat + .hh-stat { border-left: 1px solid var(--border); }
.hh-stat .ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--glyph-bg); color: var(--glyph-fg); flex-shrink: 0; }
.hh-stat .ic-live { background: var(--green-soft); color: var(--green); }
.hh-stat b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.hh-stat i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.hh-live { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: hhPulse 2.5s ease-in-out infinite; }
@keyframes hhPulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ---------- Skill 库分类区（旧白容器版已废弃，新样式见 lib- 区块） ---------- */

/* ---------- 平板 ---------- */
@media (max-width: 1024px) {
  .hh-hero { grid-template-columns: 60% 40%; gap: 28px; }
  .hh-title { font-size: 42px; }
  .hh-arrow { display: none; }
  .stack-float { max-width: 290px; }
}

/* ---------- 手机端 ---------- */
@media (max-width: 640px) {
  .hh-hero { display: block; min-height: 0; padding-top: 24px; }
  .hh-hero::before { display: none; }
  .hh-title { font-size: 30px; }
  .hh-arrow { right: -40px; bottom: -6px; width: 34px; display: none; }
  .hh-sub { font-size: 14.5px; }
  .hh-seg { margin-top: 20px; }
  .hh-launcher { padding: 10px 10px 10px 14px; }
  .hh-launcher input { font-size: 16px; height: 40px; }  /* ≥16px 防 iOS 缩放 */
  .hh-go { height: 44px; padding: 0 16px; font-size: 13.5px; }
  .hh-go .hh-go-arrow, .hh-go-spark { display: none; }
  .hh-quick { margin-top: 14px; }
  /* Skill Stack：横向滑动 */
  .hh-right { min-height: 0; margin-top: 30px; }
  .hh-hand { display: none; }
  .hh-stack {
    display: flex; flex-direction: row; gap: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px; scrollbar-width: none;
  }
  .hh-stack::-webkit-scrollbar { display: none; }
  .stack-item { flex: 0 0 78%; }
  .stack-item:nth-child(n) { padding: 0; }
  .stack-float, .stack-float.float { max-width: none; animation: none; width: 100%; }
  .hh-stats { margin-top: 22px; padding: 14px 0; gap: 10px; }
  .hh-stat { padding: 0 14px; }
  .hh-stat:first-child { padding-left: 0; }
  .hh-stat b { font-size: 12.5px; }
  .hh-stat i { font-size: 10.5px; }
  .hh-stat .ic { width: 32px; height: 32px; }

  /* --- Skill 库移动端 --- */
  .page-lib { padding-top: 20px; }
  .lib-hero { display: block; padding-bottom: 14px; }
  .lib-title { font-size: 34px; }
  .lib-sub { font-size: 14px; }
  .lib-hero-right { display: none; }          /* 品牌视觉/Stat 移动端隐藏 */
  .lib-search { padding: 5px 5px 5px 14px; border-radius: 13px; }
  .lib-search input { font-size: 16px; height: 40px; }  /* ≥16px 防 iOS 缩放 */
  .lib-search-go { height: 40px; padding: 0 14px; font-size: 13px; }
  .lib-search-go svg { display: none; }
  .lib-try { margin-top: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .lib-try::-webkit-scrollbar { display: none; }
  .lib-try-label { flex-shrink: 0; white-space: nowrap; }
  .lib-try-word { flex-shrink: 0; }
  /* 分类横向滑动 */
  .lib-cats-grid { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .lib-cats-grid::-webkit-scrollbar { display: none; }
  .lib-cat { flex-shrink: 0; }
  /* 标签横向滑动 */
  .lib-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .lib-tags::-webkit-scrollbar { display: none; }
  .tag-pill, .tag-more { flex-shrink: 0; }
  /* 工具栏 Sticky */
  .lib-toolbar {
    position: sticky; top: 52px; z-index: 30;
    background: var(--bg); padding: 8px 0; margin: 8px 0 12px;
  }
}

/* ============================================================
   AI 应用中心（ac- 前缀）— 会员专属权益感
   品牌配色：米白 #faf9f6 / 墨 #1a1815 / 珊瑚橙 #d85a30
   ============================================================ */

/* ---------- 应用图标（独立图标 / 平台默认 emoji） ---------- */
.app-icon {
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-icon span { line-height: 1; }

/* ---------- Hero ---------- */
.ac-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
  padding: 10px 0 26px;
}
.ac-title {
  font-family: var(--serif); font-size: 46px; font-weight: 400;
  color: var(--ink); line-height: 1.15; letter-spacing: .01em;
}
.ac-title em { font-style: italic; color: var(--accent-coral); }
.ac-sub { margin-top: 10px; font-size: 15.5px; color: var(--text-2); max-width: 560px; }
.ac-sub-line { display: block; }
.ac-search-row {
  display: flex; align-items: center; gap: 12px;
  max-width: 640px; margin-top: 20px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 7px 7px 7px 18px;
  transition: border-color .2s ease-out, box-shadow .2s ease-out;
}
.ac-search-row:focus-within {
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.ac-search-ic { color: var(--text-3); display: flex; flex-shrink: 0; }
.ac-search-row:focus-within .ac-search-ic { color: var(--accent-text); }
.ac-search {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--text); height: 42px; font-family: inherit;
}
.ac-search::placeholder { color: var(--text-3); }
.ac-search-clear {
  border: none; background: var(--bg-subtle); color: var(--text-3);
  width: 26px; height: 26px; border-radius: 50%; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .15s;
}
.ac-search-clear:hover { background: var(--accent-soft); color: var(--accent-text); }
.ac-search-go {
  display: inline-flex; align-items: center; flex-shrink: 0;
  height: 42px; padding: 0 22px; border: none; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .15s, transform .15s;
}
.ac-search-go:hover { background: var(--accent-hover); transform: translateY(-1px); }
.ac-search-go:active { transform: scale(.98); }
.ac-try { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ac-try-label { font-size: 12.5px; color: var(--text-3); }
.ac-try-word {
  height: 27px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); font-family: inherit;
  transition: all .15s ease-out;
}
.ac-try-word:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-text); transform: translateY(-1px); }

/* Hero 右侧品牌视觉 */
.ac-hero-right { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-right: 12px; }
.ac-brand { position: relative; width: 190px; height: 150px; }
.ac-brand-glow {
  position: absolute; inset: -20px;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, rgba(216,90,48,.10), transparent 72%);
  pointer-events: none;
}
.ac-brand-s {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: 62px; height: 62px; border-radius: 17px; z-index: 2;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 34px; font-weight: 600;
  box-shadow: 0 14px 30px rgba(26,24,21,.22);
}
.ac-brand-windows { position: absolute; inset: 0; }
.ac-win {
  position: absolute; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(50, 35, 20, .10);
}
.ac-win-1 { width: 84px; height: 58px; left: 0; top: 8px; transform: rotate(-5deg); }
.ac-win-1 .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-coral); opacity: .8; margin-right: 4px; }
.ac-win-1 .dot:nth-child(2) { opacity: .5; }
.ac-win-1 .dot:nth-child(3) { opacity: .3; }
.ac-win-1 { padding: 10px; }
.ac-win-2 { width: 66px; height: 48px; right: 6px; top: 26px; transform: rotate(4deg); display: flex; align-items: center; justify-content: center; }
.ac-win-3 { width: 74px; height: 50px; left: 34px; bottom: 0; transform: rotate(-2deg); display: flex; align-items: center; justify-content: center; }
.ac-win-glyph { font-size: 18px; color: var(--accent-coral); opacity: .75; }
.ac-brand-words {
  font-family: var(--serif); font-style: italic; font-size: 14.5px;
  color: var(--text-2); text-align: center; line-height: 1.7;
}

/* ---------- 真实数据条（点击即切 Tab） ---------- */
.ac-stats {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 0; margin-bottom: 22px;
}
.ac-stat {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 12px; border: none; background: transparent; border-radius: 11px;
  font-family: inherit; transition: background .15s;
}
.ac-stat.static { cursor: default; }
.ac-stat.clickable { cursor: pointer; }
.ac-stat:hover { background: var(--accent-soft); }
.ac-stat.active { background: var(--accent-soft); }
.ac-stat.active b { color: var(--accent-text); }
.ac-stat b { font-family: var(--serif); font-size: 27px; font-weight: 600; color: var(--ink); line-height: 1; }
.ac-stat-platform { font-size: 19px !important; letter-spacing: .01em; }
.ac-stat div { text-align: left; }
.ac-stat i { display: block; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--text); }
.ac-stat em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* ---------- Tab + 排序工具栏 ---------- */
.ac-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ac-tabs { display: inline-flex; gap: 4px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.ac-tabs button {
  height: 32px; padding: 0 16px; border: none; background: transparent; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-2); font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; transition: all .16s ease-out;
}
.ac-tabs button span {
  font-size: 10.5px; font-weight: 600; line-height: 1;
  background: var(--surface); color: var(--text-3);
  border-radius: 999px; padding: 3px 6px;
}
.ac-tabs button.active { background: var(--surface); color: var(--accent-text); font-weight: 600; box-shadow: var(--shadow-sm); }
.ac-tabs button.active span { background: var(--accent-soft); color: var(--accent-text); }
.ac-sort {
  height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 12.5px; color: var(--text-2); outline: none; cursor: pointer;
}

/* ---------- 分类 chips ---------- */
.ac-cats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.ac-cats button {
  height: 30px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); font-family: inherit;
  transition: all .15s ease-out;
}
.ac-cats button:hover { border-color: var(--accent-coral); color: var(--accent-text); }
.ac-cats button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 区块标题 ---------- */
.ac-sec-head { margin: 26px 0 14px; }
.ac-sec-title { font-family: var(--serif); font-size: 21px; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.ac-sec-count { font-family: var(--font); font-size: 11.5px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ac-sec-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

/* ---------- 应用卡片网格 ---------- */
.ac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ac-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.ac-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(50, 35, 20, .12); }
.ac-card-top { display: flex; align-items: center; gap: 13px; }
.ac-card-name-wrap { min-width: 0; flex: 1; }
.ac-card-name { font-size: 15px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-card-ver { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.ac-card-desc {
  font-size: 12.8px; color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 41px;
}
.ac-card-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.ac-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }

/* 权益状态文案 */
.ac-state { font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ac-state.ok { color: var(--green); }
.ac-state.pending { color: var(--amber); }
.ac-state.locked { color: var(--text-3); }
.ac-state.soon { color: var(--accent-text); }

/* 卡片按钮（区别于 .btn：更紧凑） */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--text); font-family: inherit;
  white-space: nowrap; transition: all .15s ease-out;
}
.ac-btn:hover { background: var(--bg-subtle); border-color: var(--text-3); }
.ac-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ac-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ac-btn.pending { background: var(--amber-soft); border-color: transparent; color: var(--amber); opacity: .9; }
.ac-btn.pending:hover { background: var(--amber-soft); }
.ac-btn.disabled { opacity: .5; cursor: not-allowed; }
.ac-btn.disabled:hover { background: var(--surface); border-color: var(--border-strong); }

/* ---------- 应用截图（详情页横向滚动） ---------- */
.ac-shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.ac-shots img {
  height: 300px; width: auto; max-width: 85%; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-subtle);
  object-fit: cover;
}

/* ---------- 核心功能 / 使用流程 ---------- */
.ac-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ac-feat {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  background: var(--bg-subtle); border-radius: 10px; padding: 11px 13px;
}
.ac-feat .n {
  flex-shrink: 0; width: 19px; height: 19px; border-radius: 6px; margin-top: 1px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.ac-steps { display: flex; flex-direction: column; gap: 0; }
.ac-step { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 13px; color: var(--text-2); line-height: 1.65; }
.ac-step + .ac-step { border-top: 1px dashed var(--border); }
.ac-step .dot {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 下载 Modal 信息表 ---------- */
.ac-dl-info { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ac-dl-info > div { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; font-size: 12.5px; }
.ac-dl-info > div + div { border-top: 1px solid var(--border); }
.ac-dl-info span { color: var(--text-3); }
.ac-dl-info b { font-weight: 600; color: var(--text); }

/* ---------- 底部需求反馈 ---------- */
.ac-feedback {
  margin-top: 30px; padding: 26px 28px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 55%);
  border-color: var(--accent-soft);
}
.ac-fb-title { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.ac-fb-sub { flex: 1; min-width: 220px; font-size: 13px; color: var(--text-2); }

/* ---------- 少量应用期待提示 ---------- */
.ac-more-hint { margin-top: 22px; padding: 18px 22px; text-align: center; background: var(--bg-subtle); border-style: dashed; }
.ac-more-hint .t1 { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.ac-more-hint .t2 { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ---------- 后台：主动授权成员列表 ---------- */
.ac-grant-users {
  margin-top: 8px; max-height: 240px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px;
}
.ac-grant-user {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.ac-grant-user:last-child { border-bottom: none; }
.ac-grant-user:hover { background: var(--bg-subtle); }
.ac-grant-user.checked { background: var(--accent-soft); }
.ac-grant-user input { flex-shrink: 0; }
.ac-grant-user span { font-weight: 550; }
.ac-grant-user i { font-style: normal; font-size: 11.5px; color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 1099px) { .ac-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .ac-hero { grid-template-columns: 1fr; }
  .ac-hero-right { display: none; }
  .ac-title { font-size: 34px; }
  .ac-feats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ac-grid { grid-template-columns: 1fr; }
  .ac-title { font-size: 30px; }
  .ac-search { font-size: 16px; }  /* ≥16px 防 iOS 缩放 */
  .ac-search-go { padding: 0 14px; }
  .ac-try { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .ac-try::-webkit-scrollbar { display: none; }
  .ac-try-label, .ac-try-word { flex-shrink: 0; white-space: nowrap; }
  .ac-stats { flex-direction: column; gap: 2px; padding: 6px; }
  .ac-stat { justify-content: flex-start; padding: 10px 12px; }
  .ac-stat + .ac-stat { border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; }
  .ac-toolbar { flex-direction: column; align-items: stretch; }
  .ac-tabs { justify-content: stretch; }
  .ac-tabs button { flex: 1; justify-content: center; }
  .ac-shots img { height: 220px; max-width: 92%; }
}

/* ============================================================ */
/* ============ 我的收藏 V2.0（AI 工具箱）+ 个人中心 V3 ============ */
/* ============================================================ */
.page-fav, .page-me { max-width: 1440px; }

/* ---- Hero ---- */
.fv-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; animation: fadeUp .45s ease-out; }
.fv-title { font-family: var(--serif); font-size: 42px; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.fv-title em { font-style: normal; color: var(--accent); }
.fv-sub { margin-top: 8px; font-size: 13.5px; color: var(--text-2); max-width: 520px; line-height: 1.7; }
.fv-search-row { position: relative; margin-top: 18px; max-width: 480px; display: flex; align-items: center; }
.fv-search-ic { position: absolute; left: 14px; color: var(--text-3); display: flex; }
.fv-search {
  width: 100%; padding: 10px 38px 10px 38px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px; background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s; font-family: var(--font);
}
.fv-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fv-search-clear { position: absolute; right: 10px; border: none; background: var(--bg-subtle); color: var(--text-2); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
/* 收藏 Stack 视觉（轻量） */
.fv-hero-right { position: relative; width: 200px; height: 128px; }
.fv-stack { position: relative; width: 100%; height: 100%; }
.fv-card {
  position: absolute; width: 64px; height: 46px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center;
}
.fv-card-glyph { color: var(--accent); display: flex; opacity: .85; }
.fv-card-1 { top: 8px; left: 22px; transform: rotate(-7deg); animation: fvFloat 5.2s ease-in-out infinite; }
.fv-card-2 { top: 34px; left: 74px; transform: rotate(4deg); z-index: 2; animation: fvFloat 5.2s ease-in-out 1.2s infinite; }
.fv-card-3 { top: 62px; left: 34px; transform: rotate(-3deg); animation: fvFloat 5.2s ease-in-out 2.4s infinite; }
.fv-star {
  position: absolute; top: 20px; right: 26px; z-index: 3;
  width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(26,24,21,.24);
}
.fv-star svg { color: #f2b84b; }
.fv-glow { position: absolute; right: 8px; top: 6px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(216,90,48,.16), transparent 70%); }
.fv-words { position: absolute; right: 0; bottom: -34px; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--text-3); text-align: right; line-height: 1.6; }
.fv-words::first-line { color: var(--accent); }
@keyframes fvFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* ---- 工具栏：Tab + 排序 + 计数 ---- */
.fv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.fv-tabs { position: relative; display: inline-flex; background: var(--bg-subtle); border-radius: 999px; padding: 4px; }
.fv-tabs button {
  position: relative; z-index: 2; border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2); padding: 8px 18px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; transition: color .2s; font-family: var(--font);
}
.fv-tabs button.active { color: var(--text-1); }
.fv-tabs button span {
  font-size: 11px; font-weight: 700; background: var(--surface); color: var(--text-2);
  border-radius: 999px; padding: 0 7px; line-height: 18px; min-width: 18px; text-align: center;
  border: 1px solid var(--border);
}
.fv-tabs button.active span { background: var(--accent); border-color: var(--accent); color: #fff; }
.fv-tab-thumb {
  position: absolute; z-index: 1; top: 4px; left: 4px; height: calc(100% - 8px);
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-sm);
  width: calc(50% - 4px); transition: transform .2s ease;
}
.fv-tab-thumb.right { transform: translateX(100%); }
.fv-tabs > button:nth-child(3) ~ .fv-tab-thumb.me-tab-thumb { width: calc(33.33% - 3px); }
.me-tab-thumb.right1 { transform: translateX(100%); }
.me-tab-thumb.right2 { transform: translateX(200%); }
.fv-toolbar-right { display: flex; align-items: center; gap: 12px; }
.fv-sort {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 7px 12px; font-size: 12.5px; color: var(--text-2); outline: none; cursor: pointer; font-family: var(--font);
}
.fv-count { display: flex; align-items: center; gap: 9px; }
.fv-count b { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fv-count div { display: flex; flex-direction: column; line-height: 1.35; }
.fv-count i { font-style: normal; font-size: 12px; color: var(--text-2); font-weight: 600; }
.fv-count em { font-style: normal; font-size: 10.5px; color: var(--text-3); }

/* ---- 卡片网格 ---- */
.fv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; animation: fadeUp .4s ease-out; }
.fv-card-item {
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 9px; cursor: pointer;
  animation: fvIn .35s ease-out both; animation-delay: var(--d, 0ms); transition: transform .2s, box-shadow .2s, border-color .2s;
}
@keyframes fvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fv-card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.fv-item-top { display: flex; align-items: flex-start; gap: 10px; position: relative; padding-right: 22px; }
.fv-item-top .skill-glyph { flex-shrink: 0; margin-top: 1px; }
.fv-item-name { font-weight: 700; font-size: 15px; line-height: 1.4; flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fv-star-btn {
  position: absolute; right: 0; top: 0; border: none; background: none; cursor: pointer;
  color: var(--text-3); padding: 3px; border-radius: 6px; display: flex; transition: color .15s, transform .15s;
}
.fv-star-btn:hover { color: var(--accent); transform: scale(1.1); }
.fv-star-btn.active { color: var(--accent); }
.fv-star-btn.app-fav { position: static; margin-left: auto; flex-shrink: 0; }
.fv-star-btn.app-fav.detail {
  position: static; flex-direction: row; align-items: center; gap: 5px;
  border: 1px solid var(--border); padding: 7px 12px; border-radius: 10px; font-size: 12.5px; color: var(--text-2); background: var(--surface);
}
.fv-star-btn.app-fav.detail.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.fv-more {
  position: absolute; right: 26px; top: 0; cursor: pointer; color: var(--text-3);
  font-size: 15px; font-weight: 700; padding: 0 4px; border-radius: 6px; line-height: 20px;
}
.fv-more:hover { color: var(--text-1); background: var(--bg-subtle); }
.fv-menu {
  position: absolute; right: 0; top: 26px; z-index: 30; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md);
  min-width: 116px; overflow: hidden; padding: 4px;
}
.fv-menu button { display: block; width: 100%; border: none; background: none; text-align: left; padding: 7px 12px; font-size: 12.5px; cursor: pointer; border-radius: 7px; color: var(--text-1); font-family: var(--font); }
.fv-menu button:hover { background: var(--bg-subtle); }
.fv-menu button.danger { color: var(--red); }
.fv-item-tagline { font-size: 12.5px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.fv-item-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.fv-item-tags .chip { font-size: 11px; padding: 2px 7px; opacity: .85; }
.fv-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); margin-top: auto; }
.fv-meta-stats { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 550; min-width: 0; }
.fv-meta-stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fv-meta-stat svg { color: var(--text-3); flex-shrink: 0; }
.fv-meta-dot { font-style: normal; color: var(--text-3); }
.fv-meta-usage { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 550; white-space: nowrap; }
.fv-meta-usage svg { color: var(--text-3); }
.fv-meta-last { white-space: nowrap; }
.fv-trial-chip { font-size: 10.5px; color: var(--accent-text); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.fv-trial-chip.done { color: var(--red); background: var(--red-soft); }
.fv-item-try { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.fv-item-foot { display: flex; gap: 8px; margin-top: 2px; }
.fv-btn {
  flex: 1; border-radius: 9px; padding: 7px 10px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .18s; border: 1px solid transparent; font-family: var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.fv-btn.primary { background: var(--accent); color: #fff; }
.fv-btn.primary:hover { background: var(--accent-hover); }
.fv-btn.ghost { background: var(--surface); color: var(--accent-text); border-color: var(--border-strong); }
.fv-btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.fv-btn:disabled:hover { border-color: var(--border-strong); background: var(--surface); }

/* ---- 空状态 / 底部引导 ---- */
.fv-empty { text-align: center; padding: 52px 24px; margin-top: 16px; animation: fadeUp .4s ease-out; }
.fv-empty-box {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--glyph-bg); color: var(--glyph-fg); display: flex; align-items: center; justify-content: center;
}
.fv-empty .t1 { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.fv-empty .t2 { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.fv-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; margin-top: 26px; flex-wrap: wrap; }
.fv-bottom .t1 { font-weight: 650; font-size: 14px; }
.fv-bottom .t2 { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* ---- 推荐区 ---- */
.fv-recs { margin-top: 34px; padding: 22px 22px 24px; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(216,90,48,.045), rgba(216,90,48,.015)); border: 1px solid rgba(216,90,48,.1); animation: fadeUp .45s ease-out; }
.fv-rec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fv-rec-title { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.fv-rec-title::before { content: ''; display: inline-block; width: 16px; height: 2px; background: var(--accent); margin: 0 8px 5px 0; }
.fv-rec-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.fv-rec-shuffle { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--text-2); cursor: pointer; transition: all .15s; font-family: var(--font); }
.fv-rec-shuffle:hover { color: var(--accent-text); border-color: var(--accent); }
.fv-rec-shuffle .sh-arrow { display: inline-block; transition: transform .3s; }
.fv-rec-shuffle:hover .sh-arrow { transform: rotate(180deg); }
.fv-rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.fv-rec-card { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.fv-rec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.fv-rec-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fv-add-btn {
  border: 1px solid var(--accent); color: var(--accent-text); background: var(--surface);
  font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; transition: all .15s; font-family: var(--font);
}
.fv-add-btn:hover { background: var(--accent); color: #fff; }
.fv-add-btn.done { border-color: var(--green); color: var(--green); background: var(--green-soft); cursor: default; }

/* ============================================================ */
/* ==================== 个人中心 V3 =========================== */
/* ============================================================ */
.me-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; flex-wrap: wrap; animation: fadeUp .4s ease-out; }
.me-hero-left { display: flex; align-items: center; gap: 16px; }
.me-avatar { width: 54px; height: 54px; font-size: 20px; background: var(--ink); color: #fff; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.me-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me-name { font-size: 18px; font-weight: 700; }
.me-role { font-size: 11px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border-strong); padding: 2px 9px; border-radius: 999px; }
.me-role.admin { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.me-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; animation: fadeUp .45s ease-out; }
.me-stat {
  text-align: left; display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .18s; font-family: var(--font);
}
.me-stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.me-stat.static { cursor: default; }
.me-stat.static:hover { transform: none; border-color: var(--border); box-shadow: none; }
.me-stat b { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.me-stat div { display: flex; flex-direction: column; line-height: 1.4; }
.me-stat i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.me-stat em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.me-hint {
  margin-top: 14px; padding: 10px 16px; font-size: 12.5px; color: var(--accent-text);
  background: var(--accent-soft); border-radius: 10px; display: flex; align-items: center; gap: 8px;
}
.me-hint::before { content: ''; width: 14px; height: 14px; flex-shrink: 0; background: var(--accent); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='black'/%3E%3Cpath d='M12 8v5M12 16.5v.01' stroke='white' stroke-width='2.4' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='black'/%3E%3Cpath d='M12 8v5M12 16.5v.01' stroke='white' stroke-width='2.4' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
  background: var(--accent);
}
.me-search { margin-top: 12px; max-width: 420px; }
/* 试用进度 */
.me-trial { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; background: var(--surface-2); border-radius: 10px; }
.me-trial-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); }
.me-trial-head b { color: var(--text-1); }
.me-trial-head .warn { color: var(--red); font-weight: 600; }
.me-trial-bar { height: 5px; border-radius: 999px; background: #eeeae4; overflow: hidden; }
.me-trial-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s ease; }
.me-trial-bar span.full { background: var(--red); }
.me-dl-ok { color: var(--green); font-weight: 600; }
.me-dl-no { color: var(--text-3); }
.sm-item.my-trial { color: var(--accent-text); font-weight: 600; }
.sm-item.my-trial.done { color: var(--red); }
/* 收藏摘要（个人中心第三 Tab） */
.me-fav-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.me-fav-cell { padding: 26px 24px; cursor: pointer; transition: all .18s; }
.me-fav-cell:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.me-fav-cell .n { font-size: 34px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.me-fav-cell .t { font-size: 13px; font-weight: 600; margin-top: 4px; }
.me-fav-cell .go { font-size: 12px; color: var(--accent-text); margin-top: 12px; }
/* 右侧栏 */
.me-side { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 26px; }
.me-side-card { padding: 18px 20px; }
.me-side-title { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.me-side-tag { font-size: 10.5px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.me-benefit { display: flex; gap: 9px; padding: 6px 0; align-items: flex-start; }
.me-benefit span { font-size: 12px; font-weight: 700; width: 16px; flex-shrink: 0; text-align: center; }
.me-benefit span.ok { color: var(--green); }
.me-benefit span.dim { color: var(--text-3); }
.me-benefit b { display: block; font-size: 12.5px; font-weight: 600; }
.me-benefit i { font-style: normal; font-size: 11px; color: var(--text-3); }
.me-benefit-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.me-side-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; }
.me-side-row:first-of-type { border-top: none; }
.me-side-row:hover b { color: var(--accent-text); }
.me-side-kind { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; }
.me-side-kind.skill { background: var(--accent-soft); color: var(--accent-text); }
.me-side-kind.app { background: var(--green-soft); color: var(--green); }
.me-side-main { flex: 1; min-width: 0; }
.me-side-main b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.me-side-main i { font-style: normal; font-size: 11px; color: var(--text-3); }
.me-trial-pill { font-size: 11px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.me-trial-pill.done { color: var(--red); background: var(--red-soft); }
.me-side-empty { font-size: 12.5px; color: var(--text-3); padding: 6px 0; }
.me-account-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; }
.me-account-row span { color: var(--text-2); }
.me-account-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- 响应式：收藏页 + 个人中心 ---------- */
@media (max-width: 1099px) {
  .fv-grid { grid-template-columns: repeat(3, 1fr); }
  .me-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .fv-hero { grid-template-columns: 1fr; }
  .fv-hero-right { display: none; }
  .fv-title { font-size: 34px; }
  .fv-grid { grid-template-columns: repeat(2, 1fr); }
  .fv-rec-grid { grid-template-columns: 1fr 1fr; }
  .me-side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fv-grid { grid-template-columns: 1fr; }
  .fv-rec-grid { grid-template-columns: 1fr; }
  .fv-title { font-size: 30px; }
  .fv-search { font-size: 16px; }  /* ≥16px 防 iOS 缩放 */
  .fv-toolbar { flex-direction: column; align-items: stretch; }
  .fv-tabs { justify-content: stretch; width: 100%; }
  .fv-tabs button { flex: 1; justify-content: center; }
  .fv-toolbar-right { justify-content: space-between; }
  .fv-bottom { flex-direction: column; align-items: flex-start; }
  .me-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .me-stat { padding: 12px 14px; }
  .me-stat b { font-size: 20px; }
  .me-fav-summary { grid-template-columns: 1fr; }
}

/* ---- 管理员权限管理 ---- */
.hover-soft:hover { background: var(--bg-subtle); }
