:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --surface: #f4f6fb;
  --paper: #ffffff;
  --line: #e8ecf4;
  --accent: #6366f1;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

html.dark {
  --ink: #f3f4f6;
  --ink-2: #d1d5db;
  --muted: #9ca3af;
  --surface: #0f1117;
  --paper: #181b24;
  --line: #2a3040;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(99, 102, 241, 0.08), transparent 60%),
    radial-gradient(500px 350px at 100% 10%, rgba(236, 72, 153, 0.06), transparent 55%),
    radial-gradient(400px 300px at 50% 100%, rgba(14, 165, 233, 0.05), transparent 50%);
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.site-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-head {
  margin-bottom: 24px;
}

.section-head .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-head h2,
.section-head h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-head p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

.hero {
  padding: 40px 0 32px;
}

.hero-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 600;
}

html.dark .hero-badge {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.hero-title {
  margin-top: 16px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero-title .grad {
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-stat span {
  font-size: 12px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-panel label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.hero-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.hero-panel input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cat-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cat-card.wide {
  grid-column: span 1;
}

@media (min-width: 960px) {
  .cat-card.wide {
    grid-column: span 2;
  }
}

.cat-card h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cat-card p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.local-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .local-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.local-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.local-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
}

.local-card strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.local-card span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.icon-box.sm {
  width: 40px;
  height: 40px;
  font-size: 20px;
  border-radius: 11px;
}

.icon-box.lg {
  width: 52px;
  height: 52px;
  font-size: 26px;
  border-radius: 14px;
}

.icon-box.cat-chat { background: #eef2ff; }
.icon-box.cat-image { background: #fce7f3; }
.icon-box.cat-video { background: #ffedd5; }
.icon-box.cat-audio { background: #dcfce7; }
.icon-box.cat-office { background: #fef3c7; }
.icon-box.cat-code { background: #cffafe; }
.icon-box.cat-writing { background: #ffe4e6; }
.icon-box.cat-study { background: #e0e7ff; }
.icon-box.cat-prompt { background: #f3e8ff; }
.icon-box.cat-local { background: #f0fdf4; }
.icon-box.cat-export { background: #ecfeff; }

html.dark .icon-box.cat-chat { background: #1e1b4b; }
html.dark .icon-box.cat-image { background: #500724; }
html.dark .icon-box.cat-video { background: #431407; }
html.dark .icon-box.cat-audio { background: #052e16; }
html.dark .icon-box.cat-office { background: #422006; }
html.dark .icon-box.cat-code { background: #083344; }
html.dark .icon-box.cat-writing { background: #4c0519; }
html.dark .icon-box.cat-study { background: #1e1b4b; }
html.dark .icon-box.cat-prompt { background: #3b0764; }
html.dark .icon-box.cat-local { background: #052e16; }
html.dark .icon-box.cat-export { background: #083344; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

html.dark .site-header {
  background: rgba(24, 27, 36, 0.85);
}

.site-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-link strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-link small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}

.header-search {
  flex: 1;
  min-width: 160px;
  max-width: 340px;
  margin-left: auto;
}

@media (max-width: 899px) {
  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
}

.header-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px 9px 36px;
  font-size: 13px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3 3'/%3E%3C/svg%3E") 12px center no-repeat;
  outline: none;
  color: var(--ink);
}

.header-search input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.nav-row {
  display: none;
  gap: 4px;
}

@media (min-width: 900px) {
  .nav-row {
    display: flex;
  }
}

.nav-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: 0.12s ease;
}

.nav-chip:hover,
.nav-chip.is-active {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

html.dark .nav-chip:hover,
html.dark .nav-chip.is-active {
  color: #a5b4fc;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  outline: none;
  color: var(--ink);
  font-family: inherit;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seg button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.seg button.is-on {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

.result-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
}

.result-hero .hint {
  font-size: 12px;
  opacity: 0.8;
}

.tools-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .tools-grid.cols-2,
  .tools-grid.cols-3,
  .tools-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .tools-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .tools-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #c7d2fe;
}

.tool-card-body {
  min-width: 0;
  flex: 1;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-card-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-card h3 {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-card p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tool-card-tags span {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.price-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-tag.is-free { background: #dcfce7; color: #15803d; }
.price-tag.is-freemium { background: #fef3c7; color: #b45309; }
.price-tag.is-paid { background: #fee2e2; color: #b91c1c; }

html.dark .price-tag.is-free { background: #14532d; color: #86efac; }
html.dark .price-tag.is-freemium { background: #78350f; color: #fcd34d; }
html.dark .price-tag.is-paid { background: #7f1d1d; color: #fca5a5; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-bar select,
.filter-bar input[type="search"] {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 140px;
}

a, button {
  cursor: pointer;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  font-family: inherit;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.ad-slot {
  border: 1px dashed var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: var(--radius);
  min-height: 80px;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.ad-slot.is-live { border-style: solid; padding: 8px 0; }
.ad-slot.is-auto { display: none; }

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-grid a { color: inherit; text-decoration: none; }
.footer-grid a:hover { color: #6366f1; }
.footer-title { color: var(--ink); font-weight: 700; font-size: 14px; margin-bottom: 10px; }

.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: #6366f1; }
.prose-muted { color: var(--muted); line-height: 1.65; }

.keywords-row { display: flex; flex-wrap: wrap; gap: 8px; }
.keywords-row a {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
}
.keywords-row a:hover { border-color: #c7d2fe; color: #4f46e5; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.prompt-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--paper);
}
.prompt-item pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}

.list-check li { position: relative; padding-left: 20px; margin: 6px 0; }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: #6366f1; font-weight: 700; }
.list-cross li { position: relative; padding-left: 20px; margin: 6px 0; }
.list-cross li::before { content: "×"; position: absolute; left: 0; color: #ef4444; font-weight: 700; }

.timeline-step {
  position: relative;
  padding-left: 28px;
  padding-bottom: 16px;
  border-left: 2px solid var(--line);
  margin-left: 8px;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6366f1;
}
