/* iAIuse GPTs — Claude 风格暖浅色系（米白底 + 陶土橙 + 衬线标题） */

:root {
  --bg: #f5f4ee;
  --surface: #ffffff;
  --surface-2: #f0eee6;
  --border: #e5e3dc;
  --border-strong: #d6d3c8;
  --accent: #c96442;
  --accent-hover: #b5573a;
  --accent-soft: #f7e9e2;
  --text: #1f1e1d;
  --text-muted: #87867f;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --shadow: 0 1px 3px rgba(31, 30, 29, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.dark-theme {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.icon { vertical-align: -3px; flex: none; }

.site-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 20px 48px; }

/* 工具页宽容器：通栏铺满窗口，两侧不留白 */
.site-main--wide { max-width: none; padding: 20px clamp(16px, 2.5vw, 40px) 48px; }

/* 聊天区下方的内容区块：限宽保证可读性，超宽屏不拉长行宽 */
.tool-docs { max-width: 1200px; }

/* ---------- Header ---------- */
.site-header {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 18px; }
.brand-logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand-logo:hover { text-decoration: none; }
.brand-img { width: 26px; height: 26px; border-radius: 7px; display: block; flex: none; }
.brand-name span { color: var(--accent); }
.main-nav { display: flex; gap: 14px; font-size: 14px; }
.main-nav a { color: var(--text-muted); }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 14px; }
.lang-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--text-muted);
  background: var(--surface);
}
.lang-selector .icon { color: var(--accent); }
.lang-selector select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  max-width: 120px;
}
.quota-badge {
  background: var(--accent-soft);
  border: 1px solid #ecd6cb;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
#user-profile-area { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 14px;
  font-family: inherit;
}
.primary-btn { background: var(--accent); color: #fff; }
.primary-btn:hover { background: var(--accent-hover); }
.ghost-btn { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.ghost-btn:hover { color: var(--text); background: var(--surface-2); }
.full-width { width: 100%; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 60px 0 36px; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.hero-subtitle { color: var(--text-muted); max-width: 640px; margin: 16px auto 0; line-height: 1.8; font-size: 15px; }
.hero-stats { display: flex; justify-content: center; gap: 44px; margin-top: 30px; }
.hero-stats div { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-family: var(--font-serif); font-size: 28px; color: var(--accent); }
.hero-stats span { font-size: 13px; color: var(--text-muted); }

/* ---------- Categories ---------- */
.category-nav, .all-tools { margin-top: 44px; }
.category-nav h2, .all-tools h2, .tool-related h2, .tool-howto h2 {
  font-size: 20px;
  margin-bottom: 16px;
  font-weight: 600;
}
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.category-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.category-icon { color: var(--accent); display: inline-flex; }
.category-name { font-weight: 600; font-size: 14px; }
.category-count { font-size: 12px; color: var(--text-muted); }

/* ---------- Tool cards ---------- */
.tool-group { margin-top: 34px; }
.tool-group h2 a { color: var(--text); font-size: 18px; display: inline-flex; align-items: center; gap: 8px; }
.tool-group h2 a:hover { text-decoration: none; color: var(--accent); }
.tool-group h2 a .icon { color: var(--accent); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
  overflow: hidden;
}
.tool-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.tool-cover {
  display: block;
  margin: -16px -16px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.tool-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-icon { color: var(--accent); display: inline-flex; }
.tool-title { font-weight: 600; font-size: 15px; }
.tool-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.tool-free {
  align-self: flex-start;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 9px;
  border-radius: 10px;
  margin-top: 4px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 分类页 ---------- */
.category-page h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-page h1 .icon { color: var(--accent); }
.category-intro { color: var(--text-muted); line-height: 1.8; max-width: 720px; }
.category-meta { color: var(--accent); font-size: 13px; margin: 8px 0 20px; }

/* ---------- 双栏 App 布局（工具页） ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.app-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
}

.new-chat-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.new-chat-btn:hover { background: var(--accent-hover); }

.sidebar-section h3 {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.sidebar-nav a {
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidebar-nav a .icon { color: var(--accent); }

.app-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 29, 0.4);
  z-index: 60;
  display: none;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

#sidebar-toggle-btn { display: none; }

.app-main-col { min-width: 0; }

/* ---------- 工具页（文章随栏宽铺满，聊天下方说明区另限宽） ---------- */
.tool-page { max-width: none; }
.tool-header { display: flex; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.gpt-avatar {
  width: 56px; height: 56px; flex: none;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.gpt-meta h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}
.gpt-num { color: var(--accent); font-size: 13px; margin-top: 4px; }
.gpt-desc { color: var(--text-muted); margin-top: 8px; line-height: 1.75; }
.external-link { font-size: 12.5px; display: inline-block; margin-top: 8px; }

.tool-banner {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 260px;
}
.tool-banner img { width: 100%; max-height: 260px; object-fit: cover; display: block; }

/* ---------- 聊天 ---------- */
.chat-container {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  height: min(74vh, 780px);
  min-height: 480px;
  box-shadow: var(--shadow);
}
.chat-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.chat-toolbar h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--text-muted); }
.chat-toolbar h2 .icon { color: var(--accent); }
.messages-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 4px; }

.starters-container h2 { font-size: 13.5px; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.starters-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.starter-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  text-align: left;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.starter-card:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.msg-bubble {
  max-width: 82%;
  padding: 13px 18px;
  border-radius: var(--radius);
  line-height: 1.75;
  font-size: 14.5px;
  word-break: break-word;
}
.msg-bubble.user {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid #ecd6cb;
}
.msg-bubble.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ---------- AI 回复的 Markdown 渲染 ---------- */
.md-p { margin: 0; }
.md-p + .md-p { margin-top: 8px; }
.md-h {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 6px;
  line-height: 1.4;
}
.msg-bubble > *:first-child,
.md-pre:first-child { margin-top: 0; }
.md-h:first-child { margin-top: 2px; }
h4.md-h { font-size: 15.5px; }
h5.md-h { font-size: 14.5px; }
.md-ul,
.md-ol { margin: 6px 0; padding-left: 22px; }
.md-ul + .md-p,
.md-ol + .md-p,
.md-pre + .md-p,
.md-h + .md-p,
blockquote + .md-p { margin-top: 8px; }
.md-ul li,
.md-ol li { margin: 3px 0; }
.md-ul li::marker { color: var(--accent); }
.md-ol li::marker { color: var(--accent); font-weight: 600; }
.md-quote {
  margin: 8px 0;
  padding: 4px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}
.md-pre {
  margin: 8px 0;
  padding: 12px 14px;
  background: #2d2a26;
  color: #f0ede6;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}
.md-pre code { background: transparent; padding: 0; color: inherit; }
code.md-code {
  background: rgba(201, 100, 66, 0.12);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
}
.md-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.md-content a, .msg-bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: md-blink 0.9s steps(2, start) infinite;
}
@keyframes md-blink { to { visibility: hidden; } }

.chat-input-wrapper { margin-top: auto; padding-top: 14px; }
.turnstile-box { display: flex; justify-content: center; padding-bottom: 8px; }
.chat-form {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 12px 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.08); }
.chat-form textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  max-height: 160px;
}
.send-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 12px;
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.send-btn:hover { background: var(--accent-hover); }

/* ---------- 使用方法 / 提示词 / 相关 ---------- */
.tool-howto { margin-top: 28px; }
.tool-howto ol { margin-left: 20px; color: var(--text-muted); line-height: 2.1; }

/* 可见 FAQ（与 FAQPage JSON-LD 一致，满足富摘要的可见内容要求） */
.tool-faq { margin-top: 28px; }
.tool-faq h2 { font-size: 20px; margin-bottom: 14px; font-weight: 600; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 16px 14px; color: var(--text-muted); font-size: 13.5px; line-height: 1.8; }

/* ---------- 示例问答（折叠 + 对话气泡） ---------- */
.tool-examples { margin-top: 28px; }
.tool-examples h2 { font-size: 20px; margin-bottom: 6px; font-weight: 600; }
.examples-note { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.example-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.example-item summary {
  cursor: pointer;
  padding: 13px 44px 13px 16px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.55;
  list-style: none;
  position: relative;
}
.example-item summary::-webkit-details-marker { display: none; }
.example-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 400;
}
.example-item[open] summary::after { content: "−"; }
.example-item[open] summary { border-bottom: 1px solid var(--border); }
.ex-dialog {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.ex-msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}
.ex-msg.user {
  justify-self: end;
  background: var(--accent-soft);
  border: 1px solid #ecd6cb;
}
.ex-msg.assistant {
  justify-self: start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: fit-content;
  min-width: 60%;
  max-width: 100%;
}
.ex-msg .md-pre { font-size: 12.5px; }
.ex-msg h4.md-h, .ex-msg h5.md-h { margin: 10px 0 4px; }

.prompt-details { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prompt-details summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--accent); }
.prompt-note { color: var(--text-muted); font-size: 12.5px; padding: 0 16px 10px; }
.prompt-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-muted);
  padding: 0 16px 16px;
  max-height: 420px;
  overflow-y: auto;
}

.tool-related { margin-top: 34px; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 80px 0; }
.not-found h1 { font-family: var(--font-serif); font-size: 32px; margin-bottom: 12px; }
.not-found p { color: var(--text-muted); margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer p { margin: 4px 0; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 29, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 440px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.modal-box h3 { margin-bottom: 8px; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 24px; cursor: pointer;
}
.auth-options { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.github-btn { background: #1f1e1d; color: #fff; }
.github-btn:hover { background: #000; }
.divider { display: flex; justify-content: center; color: var(--text-muted); }
.magic-link-form { display: flex; gap: 8px; }
.magic-link-form input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.magic-link-form input:focus { border-color: var(--accent); }
.status-tip { font-size: 12.5px; min-height: 16px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }

/* ---------- 历史树（工具页侧栏） ---------- */
.history-list { list-style: none; margin: 0; }

.tree-group { margin-bottom: 2px; }

.tree-tool {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.tree-tool:hover { background: var(--surface-2); }
.tree-tool.active { background: var(--accent-soft); color: var(--accent); }
.tree-tool-icon { display: inline-flex; color: var(--accent); }
.tree-tool.active .tree-tool-icon { color: var(--accent); }
.tree-tool-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-tool-plus {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.12s;
}
.tree-tool:hover .tree-tool-plus { opacity: 1; }
.tree-tool-plus:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

.tree-convs { list-style: none; margin: 0; padding: 0 0 4px 14px; }
.tree-group.collapsed .tree-convs { display: none; }
.tree-group.collapsed .tree-tool { font-weight: 500; color: var(--text-muted); }

.history-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  border-left: 2px solid transparent;
}
.history-item:hover { background: var(--surface-2); }
.history-item.active { border-left-color: var(--accent); }
.history-item.active .history-title { color: var(--accent); font-weight: 600; }
.history-title {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  flex: none;
  font-size: 12px;
  opacity: 0;
}
.history-item:hover .history-del { opacity: 1; }
.history-del:hover { color: var(--accent-hover); }
.empty-tip { color: var(--text-muted); font-size: 12.5px; padding: 8px 6px; line-height: 1.6; }

/* ---------- 咨询浮动按钮 ---------- */
.consult-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(201, 100, 66, 0.3);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.consult-fab:hover { background: var(--accent-hover); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  #sidebar-toggle-btn { display: inline-flex; }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    max-height: none;
    width: 280px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    z-index: 70;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-backdrop:not([hidden]) { display: block; }
}

@media (max-width: 640px) {
  .hero-stats { gap: 20px; }
  .starters-grid { grid-template-columns: 1fr; }
  .tool-header { flex-direction: column; }
  .chat-container { height: 70vh; }
  .main-nav { display: none; }
}
