/* =====================================================
 * 好好工具 - 主样式
 * 设计风格: 现代渐变 + 大圆角 + 柔和阴影, 参考 fontgenerator.page
 * ===================================================== */

/* ---- 1. 设计令牌 ---- */
:root {
  --bg:        #f7f9fc;
  --bg-2:      #eef2f7;
  --surface:   #ffffff;
  --surface-2: #f9fafb;
  --border:    #e5e7eb;
  --border-2:  #d1d5db;
  --text:      #0f172a;
  --text-2:    #334155;
  --muted:     #64748b;
  --muted-2:   #94a3b8;
  --primary:   #0ea5e9;
  --primary-2: #38bdf8;
  --primary-d: #0284c7;
  --accent:    #6366f1;
  --accent-2:  #818cf8;
  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --gradient:  linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --gradient-2:linear-gradient(135deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow:    0 4px 12px rgba(15,23,42,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --container: 1200px;
  --header-h:  68px;
  --t: 0.2s ease;
}

[data-theme="dark"] {
  --bg:        #0b1220;
  --bg-2:      #0f172a;
  --surface:   #111827;
  --surface-2: #0b1220;
  --border:    #1f2937;
  --border-2:  #334155;
  --text:      #e2e8f0;
  --text-2:    #cbd5e1;
  --muted:     #94a3b8;
  --muted-2:   #64748b;
  --primary:   #38bdf8;
  --primary-2: #7dd3fc;
  --primary-d: #0ea5e9;
  --accent:    #818cf8;
  --accent-2:  #a5b4fc;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 4px 12px rgba(0,0,0,.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
}

/* ---- 2. 基础重置 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t), color var(--t);
}
a { color: var(--primary-d); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary); }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

h1, h2, h3, h4 { line-height: 1.3; color: var(--text); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.notice.ok  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.notice.warn{ background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
[data-theme="dark"] .notice.ok  { background: #022c22; color: #6ee7b7; border-color: #064e3b; }
[data-theme="dark"] .notice.warn{ background: #2a1d05; color: #fbbf24; border-color: #78350f; }

/* ---- 3. 顶部导航 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; }
.foot-col .brand { color: inherit; }
.foot-col .brand-name { color: #0f172a !important; }
[data-theme="dark"] .foot-col .brand-name { color: #f1f5f9 !important; }
.brand-logo {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: var(--gradient); color: #fff; font-weight: 800;
  box-shadow: 0 6px 20px rgba(14,165,233,.35);
}
.brand-logo-img { background: transparent; box-shadow: none; display: inline-block; object-fit: contain; padding: 2px; border-radius: 8px; }
.brand-name { letter-spacing: 0.5px; color: #0f172a; font-weight: 700; }
[data-theme="dark"] .brand-name { color: #f1f5f9 !important; }

.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-2);
  font-weight: 500; transition: all var(--t);
}
.nav a:hover { background: var(--bg-2); color: var(--text); }
.nav a.active { background: var(--bg-2); color: var(--primary-d); }

.search { flex: 1; max-width: 460px; position: relative; }
.search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  transition: all var(--t);
}
.search input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(14,165,233,.15); }
.search button {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; padding: 6px 10px; font-size: 14px; color: var(--muted);
}

.actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); transition: all var(--t);
}
.icon-btn:hover { background: var(--bg-2); color: var(--primary-d); }
.nav-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: all var(--t); white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 20px rgba(14,165,233,.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(14,165,233,.4); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-ghost.active { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
[data-theme="dark"] .btn-ghost.active { background: #422006; color: #fbbf24; border-color: #78350f; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }

.site-main { min-height: 60vh; }

/* ---- 4. 英雄区 ---- */
.hero {
  position: relative; overflow: hidden; padding: 100px 0 80px;
  background: var(--bg);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(50% 50% at 80% 30%, rgba(99,102,241,.18), transparent 60%),
    radial-gradient(40% 40% at 50% 80%, rgba(192,132,252,.12), transparent 60%);
}
[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(14,165,233,.25), transparent 60%),
    radial-gradient(50% 50% at 80% 30%, rgba(99,102,241,.25), transparent 60%),
    radial-gradient(40% 40% at 50% 80%, rgba(192,132,252,.15), transparent 60%);
}
.hero-inner { position: relative; text-align: center; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.hero-eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--bg-2); color: var(--primary-d); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(36px, 5vw, 56px); font-weight: 800; margin: 0 auto 16px;
  background: var(--gradient-2); -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -1px; text-align: center;
}
.hero-sub { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 auto 36px; text-align: center; }
.hero-search {
  max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow-md);
}
.hero-search-icon { color: var(--muted); font-size: 18px; }
.hero-search input {
  flex: 1; border: 0; background: transparent; padding: 10px 0; outline: none; color: var(--text);
}
.hero-search .btn { border-radius: 999px; }
.hero-tags { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-tags a {
  padding: 6px 14px; border-radius: 999px; background: var(--bg-2); color: var(--text-2);
  font-size: 13px; border: 1px solid var(--border);
}
.hero-tags a:hover { background: var(--surface); color: var(--primary-d); transform: translateY(-1px); }

/* ---- 5. 分类条 ---- */
.cat-strip { margin-top: -30px; position: relative; z-index: 2; }
.cat-strip-inner { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-2); font-weight: 500; box-shadow: var(--shadow-sm);
  transition: all var(--t);
}
.cat-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--primary-d); border-color: var(--primary); }
.cat-pill-icon { font-size: 18px; }

/* ---- 6. 通用 section ---- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-2); border-radius: var(--radius-xl); padding: 60px 24px; margin: 30px auto; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.sec-eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--bg-2); color: var(--primary-d); font-size: 12px; font-weight: 600; margin-bottom: 8px; border: 1px solid var(--border); }
.sec-title { font-size: 30px; margin: 0; }
.sec-more { color: var(--primary-d); font-weight: 600; font-size: 14px; }
.sec-foot { text-align: center; margin-top: 24px; }

/* ---- 7. 工具卡片 ---- */
.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.tool-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; color: var(--text); transition: all var(--t);
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: var(--gradient); transition: opacity var(--t);
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
  border-color: transparent;
}
.tool-card-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  font-size: 24px; background: var(--bg-2); border-radius: 12px; flex-shrink: 0;
}
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-body h3 { font-size: 16px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-card-body p { font-size: 13px; color: var(--muted); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card-meta { font-size: 12px; color: var(--muted-2); }
.tool-card-go { color: var(--primary-d); font-weight: 600; font-size: 13px; align-self: center; }

/* ---- 8. 徽章 ---- */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
}
.badge-free     { background: #dcfce7; color: #166534; }
.badge-freemium { background: #fef3c7; color: #92400e; }
.badge-paid     { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .badge-free     { background: #052e16; color: #86efac; }
[data-theme="dark"] .badge-freemium { background: #422006; color: #fcd34d; }
[data-theme="dark"] .badge-paid     { background: #450a0a; color: #fca5a5; }

.tag-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--muted); font-size: 12px;
  border: 1px solid var(--border); margin-right: 4px;
}

/* ---- 9. 特色区 ---- */
.feature-block { text-align: center; }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-top: 32px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px; text-align: left;
  transition: all var(--t);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--gradient); color: #fff; border-radius: 14px;
  font-size: 26px; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(14,165,233,.3);
}
.feature-card h3 { font-size: 18px; margin: 0 0 8px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---- 10. 评论 ---- */
.review-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  transition: all var(--t);
}
.review-card:hover { box-shadow: var(--shadow); }
.review-stars { color: #f59e0b; font-size: 16px; margin-bottom: 10px; }
.review-text { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.review-author strong { display: block; font-size: 14px; }
.review-author small { color: var(--muted); font-size: 12px; }

/* ---- 11. FAQ ---- */
.faq-list { max-width: 820px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 18px;
  transition: all var(--t);
}
.faq-item[open] { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 22px; color: var(--muted); transition: transform var(--t);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 16px; color: var(--text-2); font-size: 14px; }

/* ---- 12. 文章卡片 ---- */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.article-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; color: var(--text);
  transition: all var(--t);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.article-card h3 { font-size: 17px; margin: 0 0 8px; }
.article-card p { color: var(--muted); font-size: 14px; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card small { color: var(--muted-2); font-size: 12px; }

/* ---- 13. CTA ---- */
.cta-block {
  text-align: center; padding: 80px 24px;
  background: var(--gradient); border-radius: var(--radius-xl); color: #fff; margin: 40px auto;
  position: relative; overflow: hidden;
}
.cta-block::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(40% 40% at 80% 20%, rgba(255,255,255,.2), transparent 60%),
    radial-gradient(40% 40% at 20% 80%, rgba(255,255,255,.15), transparent 60%);
}
.cta-block h2 { color: #fff; font-size: 32px; position: relative; }
.cta-block p  { color: rgba(255,255,255,.9); position: relative; }
.cta-block .btn { background: #fff; color: var(--primary-d); position: relative; }
.cta-block .btn:hover { background: #f1f5f9; }

/* ---- 14. 页脚 ---- */
.site-foot {
  background: var(--surface); border-top: 1px solid var(--border);
  margin-top: 60px; padding: 50px 0 0;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.foot-col h4 { font-size: 15px; margin: 0 0 14px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 8px; }
.foot-col a { color: var(--muted); font-size: 14px; }
.foot-col a:hover { color: var(--primary-d); }
.foot-brand .brand { margin-bottom: 12px; }
.foot-slogan { line-height: 1.7; max-width: 320px; }
.foot-bar {
  border-top: 1px solid var(--border); padding: 16px 0; margin-top: 30px;
  font-size: 13px; color: var(--muted);
}
.foot-bar-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.beian { display: inline; white-space: nowrap; }
.beian a { color: #cbd5e1; text-decoration: none; }
.beian a:hover { color: #38bdf8; }
.beian-sep { color: #475569; margin: 0 4px; }
.beian-gongan { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.beian-gongan-icon { height: 18px; width: auto; display: inline-block; vertical-align: middle; }

.back-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px;
  background: var(--gradient); color: #fff; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(14,165,233,.4); opacity: 0; pointer-events: none;
  transition: opacity var(--t);
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* ---- 15. 通用页头 / 面包屑 / 分页 ---- */
.page-head { padding: 50px 0 20px; }
.page-head h1 { font-size: 32px; margin: 0 0 6px; }
.bread { padding: 20px 0; font-size: 13px; color: var(--muted); }
.bread a { color: var(--muted); }
.bread a:hover { color: var(--primary-d); }
.bread span { margin: 0 6px; color: var(--muted-2); }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px;
  background: var(--surface); padding: 12px; border-radius: var(--radius); border: 1px solid var(--border);
}
.filter-bar input, .filter-bar select {
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-2); color: var(--text); flex: 1; min-width: 140px;
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--primary); }
.filter-bar .btn { flex: 0; }

.pagination { display: flex; justify-content: center; gap: 6px; margin: 32px 0; flex-wrap: wrap; }
.page-link {
  padding: 8px 14px; border-radius: 8px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-2); font-weight: 500;
}
.page-link:hover { color: var(--primary-d); border-color: var(--primary); }
.page-link.active { background: var(--gradient); color: #fff; border-color: transparent; }
.page-link.disabled { opacity: .4; pointer-events: none; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---- 16. 工具详情页 ---- */
.tool-detail { padding: 20px 0 60px; }
.tool-head {
  display: flex; gap: 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 30px; box-shadow: var(--shadow); margin-bottom: 30px;
}
.tool-head-icon {
  width: 100px; height: 100px; display: grid; place-items: center;
  background: var(--gradient); color: #fff; border-radius: 22px; font-size: 48px; flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(14,165,233,.35);
}
.tool-head-body h1 { font-size: 30px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-tags { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tool-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.tool-views { color: var(--muted); font-size: 14px; margin-left: auto; }

.tool-app {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow);
}
.tool-app-inner { min-height: 320px; }
.placeholder-app { text-align: center; padding: 30px 20px; }
.placeholder-app h2 { font-size: 24px; }
.placeholder-features { max-width: 480px; margin: 24px auto 0; text-align: left; }
.placeholder-features h3 { font-size: 16px; }
.placeholder-features ul { padding-left: 20px; color: var(--text-2); }
.placeholder-features li { margin: 4px 0; }

.tool-section { margin: 30px 0; }
.tool-section h2 { font-size: 22px; margin-bottom: 14px; }

.prose, .prose-section { line-height: 1.8; color: var(--text-2); }
.prose h2, .prose h3, .prose-section h2, .prose-section h3 { color: var(--text); margin-top: 1.6em; }
.prose p, .prose-section p { margin: 0 0 1em; }
.prose ul, .prose ol, .prose-section ul, .prose-section ol { padding-left: 22px; }
.prose li, .prose-section li { margin: 4px 0; }

.article-page { max-width: 780px; margin: 0 auto; padding-bottom: 60px; }
.article-head h1 { font-size: 32px; margin-bottom: 10px; }

/* ---- 17. 用户系统 ---- */
.auth-page { padding: 60px 20px; display: grid; place-items: center; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 36px 30px; box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card label { display: block; font-size: 13px; margin: 14px 0 4px; color: var(--muted); }
.auth-card input, .auth-card textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-2); color: var(--text);
}
.auth-card input:focus, .auth-card textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }

.user-grid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.user-info { text-align: center; }
.user-info .avatar-lg {
  width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--gradient); color: #fff; display: grid; place-items: center;
  font-size: 32px; font-weight: 700;
}
.user-info h3 { margin: 0 0 4px; }
.user-nav { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.user-nav li a {
  display: block; padding: 10px 14px; border-radius: 10px; color: var(--text-2);
  font-size: 14px; transition: all var(--t);
}
.user-nav li a:hover { background: var(--bg-2); color: var(--primary-d); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card label { display: block; font-size: 13px; margin: 14px 0 4px; color: var(--muted); }
.card input, .card textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-2); color: var(--text);
}
.card input:focus, .card textarea:focus { outline: none; border-color: var(--primary); }

.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex; gap: 16px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text);
  transition: all var(--t);
}
.history-item:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.hi-icon { font-size: 28px; }
.hi-body { flex: 1; }
.hi-body h3 { font-size: 15px; margin: 0 0 4px; }
.hi-body p { color: var(--muted); font-size: 13px; margin: 0; }
.history-item time { color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* ---- 18. 响应式 ---- */
@media (max-width: 980px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .user-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .tool-head { flex-direction: column; }
  .tool-head-icon { width: 72px; height: 72px; font-size: 36px; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .topbar-inner { gap: 8px; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 20px; }
  .search { order: 99; flex: 0 0 100%; max-width: 100%; }
  .actions .btn { display: none; }
  .actions .btn-primary { display: inline-flex; }
  .nav-toggle { display: grid; }
  .hero { padding: 60px 0 50px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 15px; }
  .section { padding: 40px 0; }
  .section-alt { padding: 40px 16px; }
  .sec-title { font-size: 22px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .tool-head { padding: 20px; }
  .tool-head-body h1 { font-size: 22px; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; padding: 12px; border-radius: 18px; gap: 10px; }
  .hero-search input { width: 100%; }
  .hero-search .btn { width: 100%; }
}
