:root {
  --brand: #3b6ef6;
  --brand2: #2bd0ff;
  --ink: #1b2740;
  --sub: #5b6b86;
  --line: #e6ebf3;
  --bg: #f5f8ff;
  --card: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 980px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--sub); font-size: 15px; }
.nav-links a.active, .nav-links a:hover { color: var(--brand); text-decoration: none; }

/* Layout */
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 56px; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 10px; }
.hero p.lead { color: var(--sub); margin: 0 auto; max-width: 640px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.badge { font-size: 13px; color: var(--brand); background: #eaf1ff; border: 1px solid #d6e3ff; padding: 4px 12px; border-radius: 999px; }

/* Tool card */
.tool {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 18px;
  box-shadow: 0 6px 24px rgba(40,80,160,.06);
}
.step { margin-bottom: 18px; }
.step > .label { display: block; font-weight: 700; margin-bottom: 8px; }
.step .hint { color: var(--sub); font-size: 13px; margin-top: 6px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ctrl { display: flex; align-items: center; gap: 8px; }
.ctrl label { font-size: 14px; color: var(--sub); min-width: 48px; }
input[type="text"], input[type="file"] { font-size: 15px; }
input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
input[type="range"] { width: 180px; }
input[type="color"] { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 2px; }
button {
  font-size: 15px; cursor: pointer; border: none; border-radius: 10px;
  padding: 10px 18px; background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-weight: 700;
}
button.ghost { background: #eef3ff; color: var(--brand); }
button:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: #fff; color: var(--sub); border-radius: 0; padding: 8px 16px; font-weight: 600; }
.seg button.active { background: var(--brand); color: #fff; }

canvas#preview {
  width: 100%; max-height: 460px; object-fit: contain;
  border: 1px dashed #c7d3ea; border-radius: 10px; background:
    repeating-conic-gradient(#f0f3f8 0% 25%, #fff 0% 50%) 50% / 22px 22px;
  cursor: pointer; margin-top: 6px;
}
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { width: 88px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; color: var(--sub); }
.thumb canvas { width: 100%; display: block; background: #f0f3f8; }
.note {
  background: #f3f8ff; border: 1px solid #d9e7ff; color: #2c4a7a;
  padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 14px 0;
}

/* Sections */
section.block { margin-top: 40px; }
section.block h2 { font-size: 22px; margin: 0 0 12px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--sub); font-size: 14px; }

/* FAQ */
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq-item h3 { margin: 0 0 6px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--sub); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { max-width: 980px; margin: 0 auto; padding: 24px 16px; color: var(--sub); font-size: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a { color: var(--sub); }
.breadcrumb { font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.breadcrumb a { color: var(--sub); }
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.article h2 { margin-top: 28px; }
.article ol, .article ul { padding-left: 22px; }
.article li { margin: 6px 0; }
.tip { background: #fff8ec; border: 1px solid #ffe2ad; color: #8a5a00; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
@media (max-width: 560px) {
  .nav-links { gap: 12px; font-size: 14px; }
  input[type="range"] { width: 130px; }
}
