/* qqtx.org — 头像工坊 · 全站样式 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #12141f;
  background: #f7f8fc;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: #2b5ce6; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.32; letter-spacing: -.01em; color: #0e1120; }
h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.55rem; font-weight: 750; }
h3 { font-size: 1.14rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin: .35em 0; }
hr { border: 0; border-top: 1px solid #e7e9f2; margin: 2rem 0; }
code { background: #eef1f8; padding: .12em .4em; border-radius: 5px; font-size: .92em; }
::selection { background: #dbe4ff; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 40px); margin-inline: auto; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #e9ebf4;
}
.head-in { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; text-decoration: none; }
.brand img { height: 32px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 7px 12px; border-radius: 9px; color: #3d4257; font-size: .95rem;
  text-decoration: none; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: #f0f3fb; color: #16204a; }
.nav a.on { background: #eaf0ff; color: #1d3fa8; font-weight: 650; }
.head-cta {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: linear-gradient(135deg,#2b5ce6,#5b8cff);
  color: #fff !important; padding: 9px 16px; border-radius: 11px;
  font-size: .92rem; font-weight: 650; text-decoration: none;
  box-shadow: 0 6px 16px rgba(43,92,230,.24);
}
.head-cta:hover { text-decoration: none; filter: brightness(1.05); }
.burger { display: none; }

/* announcement */
.announce { background: #0f1730; color: #c9d2ee; font-size: .82rem; line-height: 1.62; border-top: 1px solid #1b2440; }
.announce .wrap { padding: 7px 0; display: flex; gap: 10px; align-items: flex-start; }
.announce b { color: #ffb27a; font-weight: 600; flex: 0 0 auto; letter-spacing: .04em; }
.announce span { color: #ccd5ec; }
.ann-toggle { display: none; }
.ann-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 58px 0 44px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px;
  background:
    radial-gradient(46% 46% at 18% 22%, rgba(43,92,230,.16), transparent 70%),
    radial-gradient(40% 40% at 82% 12%, rgba(255,122,69,.16), transparent 72%),
    radial-gradient(34% 34% at 62% 66%, rgba(124,92,255,.12), transparent 72%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,.98fr); gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; color: #2b5ce6;
  background: #eef3ff; border: 1px solid #dbe5ff; padding: 5px 11px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); }
.hero h1 em { font-style: normal; color: #2b5ce6; }
.hero .lede { font-size: 1.06rem; color: #545a70; margin: 16px 0 26px; max-width: 33em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px;
  font-weight: 650; font-size: .98rem; text-decoration: none; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-main { background: linear-gradient(135deg,#2b5ce6,#4f7cff); color: #fff; box-shadow: 0 10px 24px rgba(43,92,230,.26); }
.btn-ghost { background: #fff; color: #1c2547; border-color: #dfe4f2; box-shadow: 0 2px 6px rgba(16,22,45,.05); }
.hero-facts { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-facts b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.hero-facts small { color: #6b7189; font-size: .82rem; }

.avatar-cloud { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.avatar-cloud figure { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 30px rgba(20,28,60,.14); background: #fff; }
.avatar-cloud figure:nth-child(3n+2) { transform: translateY(-18px); }
.avatar-cloud figure:nth-child(3n) { transform: translateY(-7px); }
.avatar-cloud svg { display: block; width: 100%; height: auto; }

/* ---------- sections ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head p { color: #6b7189; margin: 6px 0 0; font-size: .95rem; }
.section-head .more { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.sec-label { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #8a90a6; font-weight: 700; margin-bottom: 7px; }

.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }

.card {
  background: #fff; border: 1px solid #e8eaf3; border-radius: 18px; padding: 22px;
  box-shadow: 0 1px 2px rgba(16,22,45,.04);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  min-width: 0;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20,28,60,.10); border-color: #d5dcf0; }
.card .ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 1.3rem; margin-bottom: 14px; background: #eef3ff; color: #2b5ce6;
}
.card h3 { margin-bottom: 6px; }
.card p { color: #646a80; font-size: .92rem; margin: 0; }
.card .go { display: inline-block; margin-top: 12px; font-size: .88rem; font-weight: 650; color: #2b5ce6; }

/* avatar library */
.av-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.av-item { margin: 0; background: #fff; border: 1px solid #e8eaf3; border-radius: 18px; overflow: hidden; min-width: 0; }
.av-item svg { display: block; width: 100%; height: auto; }
.av-item figcaption { padding: 10px 13px 12px; font-size: .82rem; color: #5d6379; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.av-item figcaption b { font-weight: 600; color: #1a2036; font-size: .86rem; }
.av-item figcaption a { font-size: .78rem; color: #2b5ce6; }

.cat-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.cat-pill {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 14px;
  background: #fff; border: 1px solid #e8eaf3; text-decoration: none; color: #1a2036; min-width: 0;
}
.cat-pill:hover { text-decoration: none; border-color: #cfd8f0; background: #fbfcff; }
.cat-pill .dot { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; }
.cat-pill b { display: block; font-size: .93rem; line-height: 1.3; }
.cat-pill small { color: #7b8198; font-size: .76rem; }

/* table */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.1em; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 480px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e8eaf3; text-align: left; vertical-align: top; }
th { background: #f6f8fe; font-weight: 650; color: #232a44; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* article */
.article-head { padding: 42px 0 10px; }
.crumb { font-size: .84rem; color: #7b8198; margin-bottom: 14px; }
.crumb a { color: #5a6a95; }
.article-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; color: #7b8198; font-size: .85rem; margin-top: 14px; }
.article-body { padding: 8px 0 50px; }
.article-body h2 { margin: 2em 0 .7em; padding-top: .2em; }
.article-body h3 { margin: 1.5em 0 .5em; }
.article-body p, .article-body li { color: #2c3249; }
.article-body .lead { font-size: 1.05rem; color: #3b4258; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 18px; background: #f4f7ff; border-left: 3px solid #2b5ce6;
  border-radius: 0 12px 12px 0; color: #2c3752;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption { font-size: .82rem; color: #7b8198; margin-top: 8px; text-align: center; }
.kv { background: #fff; border: 1px solid #e8eaf3; border-radius: 16px; padding: 6px 20px; margin: 1.4em 0; }
.kv dl { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 0; margin: 0; }
.kv dt { padding: 11px 0; color: #6b7189; font-size: .88rem; border-bottom: 1px solid #f0f2f9; }
.kv dd { padding: 11px 0; margin: 0; font-size: .92rem; border-bottom: 1px solid #f0f2f9; }
.kv dl > *:nth-last-child(-n+2) { border-bottom: 0; }

.article-foot { border-top: 1px solid #e8eaf3; margin-top: 34px; padding-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #f1f4fb; color: #4b5470; font-size: .78rem; text-decoration: none; }
.chip:hover { background: #e6ecfb; text-decoration: none; }

.cta-band {
  background: linear-gradient(120deg,#101a3a,#1e3470 55%,#2b5ce6);
  color: #fff; border-radius: 22px; padding: 30px 32px; margin: 40px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.cta-band h3 { color: #fff; font-size: 1.25rem; margin-bottom: 6px; }
.cta-band p { color: #c3cfef; margin: 0; font-size: .92rem; }
.cta-band .btn-ghost { background: #fff; }

/* tool */
.tool-shell { background: #fff; border: 1px solid #e8eaf3; border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(20,28,60,.06); }
.tool-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; align-items: start; }
.tool-panel label { display: block; font-size: .85rem; font-weight: 600; color: #3a4160; margin: 16px 0 7px; }
.tool-panel label:first-child { margin-top: 0; }
.inp, select.inp {
  width: 100%; padding: 10px 12px; border: 1px solid #d9deee; border-radius: 10px;
  font-size: .95rem; font-family: inherit; color: #12141f; background: #fff;
}
.inp:focus { outline: 2px solid #c9d8ff; border-color: #7d9dff; }
textarea.inp { min-height: 78px; resize: vertical; }
.row2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sw { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px #dfe4f2; cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px #2b5ce6; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row > span { font-size: .78rem; color: #7b8198; }
.cinp { width: 46px; height: 34px; padding: 2px; border: 1px solid #d9deee; border-radius: 8px; background: #fff; cursor: pointer; }
.color-row code { font-size: .8rem; color: #4c5471; }
.mini { border: 1px solid #dfe4f2; background: #fff; color: #3a4160; border-radius: 7px; font-size: .76rem;
        padding: 5px 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.color-row { flex-wrap: wrap; }
.mini:hover { border-color: #b9c6ea; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row > span { font-size: .78rem; color: #7b8198; }
.cinp { width: 46px; height: 34px; padding: 2px; border: 1px solid #d9deee; border-radius: 8px; background: #fff; cursor: pointer; }
.color-row code { font-size: .8rem; color: #4c5471; }
.mini { border: 1px solid #dfe4f2; background: #fff; color: #3a4160; border-radius: 7px; font-size: .76rem;
        padding: 5px 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.color-row { flex-wrap: wrap; }
.mini:hover { border-color: #b9c6ea; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  border: 1px solid #dfe4f2; background: #fff; color: #3a4160; padding: 7px 13px;
  border-radius: 9px; font-size: .86rem; cursor: pointer; font-family: inherit;
}
.seg button.on { background: #2b5ce6; color: #fff; border-color: #2b5ce6; }
.btn-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg,#2b5ce6,#4f7cff); color: #fff; border: 0; cursor: pointer;
  padding: 11px 18px; border-radius: 11px; font-size: .93rem; font-weight: 650; font-family: inherit;
  box-shadow: 0 8px 20px rgba(43,92,230,.22);
}
.btn-act:hover { filter: brightness(1.05); }
.btn-act.sec { background: #fff; color: #1e2a4d; border: 1px solid #d9deee; box-shadow: none; }
.preview-stage {
  background:
    repeating-conic-gradient(#f4f6fb 0% 25%, #ffffff 0% 50%) 50%/18px 18px;
  border: 1px solid #e8eaf3; border-radius: 18px; padding: 20px; display: grid; place-items: center;
}
.preview-stage canvas { width: min(320px, 100%); height: auto; border-radius: 14px; display: block; }
.hint { font-size: .8rem; color: #7b8198; margin: 10px 0 0; }
.out-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.note { background: #f6f8fe; border: 1px solid #e6ebfa; border-radius: 12px; padding: 12px 14px; font-size: .85rem; color: #4c5471; }

/* faq */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid #e8eaf3; border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: .96rem; list-style: none; position: relative; padding-right: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 13px; color: #7b8198; font-weight: 400; font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: #5a6078; font-size: .92rem; margin: 0 0 16px; }

/* list pages */
.post-list { display: grid; gap: 12px; }
.post-row {
  display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 16px; align-items: center;
  background: #fff; border: 1px solid #e8eaf3; border-radius: 16px; padding: 14px 18px;
  text-decoration: none; color: inherit; min-width: 0;
}
.post-row:hover { text-decoration: none; border-color: #cfd8f0; box-shadow: 0 8px 22px rgba(20,28,60,.07); }
.post-row .thumb { border-radius: 12px; overflow: hidden; }
.post-row .thumb svg { display: block; width: 100%; height: auto; }
.post-row h3 { font-size: 1.02rem; margin-bottom: 4px; }
.post-row p { margin: 0; color: #6b7189; font-size: .86rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-row .tag { font-size: .76rem; color: #2b5ce6; font-weight: 600; }

/* footer */
.site-foot { background: #0c1020; color: #9aa3bd; margin-top: 50px; padding: 46px 0 26px; }
.foot-in { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3,minmax(0,1fr)); gap: 30px; }
.site-foot h4 { color: #fff; font-size: .92rem; margin-bottom: 12px; font-weight: 650; }
.site-foot a { color: #9aa3bd; font-size: .86rem; text-decoration: none; display: block; padding: 3px 0; }
.site-foot a:hover { color: #fff; }
.site-foot p { font-size: .84rem; color: #7e879f; line-height: 1.8; }
.foot-brand img { height: 30px; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 12px; }
.foot-bottom { border-top: 1px solid #1b2136; margin-top: 32px; padding-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: #7a8399; }
.foot-bottom a { display: inline; color: #9aa3bd; }

/* misc */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pill-tag { display: inline-block; font-size: .74rem; padding: 3px 9px; border-radius: 999px; background: #eef3ff; color: #2b5ce6; font-weight: 600; }
.dim-tag { background: #fff1e8; color: #b4551d; }

/* 广告位自动注入兜底：隐藏空的 auto ads 占位，避免大块空白 */
main .google-auto-placed { display: none !important; }

@media (max-width: 980px) {
  .hero-in { grid-template-columns: minmax(0,1fr); }
  .avatar-cloud { max-width: 460px; }
  .grid-4, .av-grid, .cat-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tool-grid { grid-template-columns: minmax(0,1fr); }
  .foot-in { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  h1 { font-size: 1.9rem; }
  .announce span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .announce.open span { display: block; overflow: visible; }
  .ann-toggle { display: inline-block; flex: 0 0 auto; margin-left: auto; background: transparent;
    border: 1px solid #35405f; color: #c9d2ee; border-radius: 6px; font-size: .72rem;
    padding: 2px 8px; cursor: pointer; font-family: inherit; line-height: 1.5; }
  .announce span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .announce.open span { display: block; overflow: visible; }
  .ann-toggle { display: inline-block; flex: 0 0 auto; margin-left: auto; background: transparent;
    border: 1px solid #35405f; color: #c9d2ee; border-radius: 6px; font-size: .72rem;
    padding: 2px 8px; cursor: pointer; font-family: inherit; line-height: 1.5; }
  .head-in { height: 58px; gap: 10px; }
  .brand img { height: 27px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 58px; background: #fff;
         border-bottom: 1px solid #e9ebf4; padding: 10px 16px 14px; gap: 4px;
         box-shadow: 0 12px 24px rgba(16,22,45,.08); }
  .nav.open { display: flex; }
  .nav a { padding: 9px 12px; }
  .burger { display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
            width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e2e6f2; background: #fff; cursor: pointer; }
  .head-cta { padding: 8px 12px; font-size: .85rem; }
  .hero { padding: 34px 0 26px; }
  .hero-facts { gap: 18px; }
  .hero-facts b { font-size: 1.25rem; }
  .section { padding: 32px 0; }
  .grid-2, .grid-3, .grid-4, .av-grid, .cat-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cat-pill { padding: 9px 10px; gap: 8px; }
  .cat-pill b { font-size: .85rem; }
  .post-row { grid-template-columns: 68px minmax(0,1fr); gap: 12px; padding: 12px 14px; }
  .post-row h3 { font-size: .95rem; }
  .kv dl { grid-template-columns: 78px minmax(0,1fr); }
  .cta-band { padding: 22px 18px; border-radius: 18px; }
  .foot-in { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .article-head { padding: 28px 0 6px; }
}
@media (max-width: 420px) {
  .grid-2, .grid-3, .grid-4, .av-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .cat-strip { grid-template-columns: minmax(0,1fr); }
  .card { padding: 16px; border-radius: 16px; }
  .row2 { grid-template-columns: minmax(0,1fr); }
}

/* 打印/无 JS 兜底：不做透明度动画 */
@media print { .site-head, .site-foot, .cta-band { display: none; } }
