:root {
  --blue: #315f9b;
  --blue-dark: #244b80;
  --ink: #263241;
  --muted: #667181;
  --line: #d8dee6;
  --surface: #f3f5f7;
  --surface-raised: #f9fafb;
  --soft: #edf1f4;
  --navy: #263241;
  --edge: #cbd3dc;
  --radius-card: 12px;
  --radius-control: 8px;
  --shadow-soft: 0 18px 45px #39495c12;
  --danger: #c2414c;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(180deg, #f6f7f9 0, var(--surface) 420px); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.site-header { position: relative; z-index: 10; height: 72px; max-width: 1240px; margin: auto; padding: 0 28px; display: flex; align-items: center; gap: 48px; border-bottom: 1px solid var(--edge); }
.brand-lockup { display: inline-flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.brand { display: inline-flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.brand strong { font-family: Bahnschrift, "Arial Narrow", sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.brand strong span { color: var(--blue); }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.brand-community { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.brand-community:hover { color: var(--blue); }
.site-header nav { display: flex; gap: 30px; margin-left: auto; height: 100%; align-items: center; }
.site-header nav a { position: relative; height: 100%; display: grid; place-items: center; color: #475467; font-size: 13px; font-weight: 700; }
.site-header nav a::after { content: ""; position: absolute; bottom: 15px; left: 50%; width: 0; height: 2px; background: var(--blue); transform: translateX(-50%); transition: width .15s ease; }
.site-header nav a:hover, .site-header nav a.active { color: var(--blue); }
.site-header nav a:hover::after, .site-header nav a.active::after { width: 18px; }
main { max-width: 1240px; margin: auto; padding: 0 28px; }
.tool-hero { position: relative; display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(52px, 7vw, 96px); align-items: center; min-height: 548px; padding: 72px 0 68px; }
.eyebrow, .kicker { color: var(--blue); font: 700 11px/1.2 Consolas, "Microsoft YaHei UI", monospace; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: block; }
.eyebrow-open-source { color: #16a34a; }
.tool-hero h1 { margin: 22px 0; font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: clamp(42px, 4.55vw, 62px); font-weight: 600; line-height: 1.14; letter-spacing: -.045em; text-wrap: balance; }
.tool-hero h1 span { color: var(--blue); }
.hero-copy > p, .page-title p { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 25px; margin-top: 30px; }
.hero-actions .button b { margin-left: 10px; font-size: 16px; }
.text-link { color: var(--ink); font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--blue); }
.hero-workspace { overflow: hidden; border: 1px solid var(--edge); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: inset 0 1px #ffffffa6, var(--shadow-soft); }
.workspace-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.workspace-head code { color: var(--muted); font: 700 10px Consolas, monospace; letter-spacing: .12em; }
.workspace-head span { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.workspace-body { padding: 40px 38px 32px; }
.workspace-label { margin: 0 0 12px; color: var(--blue); font: 700 10px Consolas, "Microsoft YaHei UI", monospace; letter-spacing: .14em; }
.workspace-body > strong { font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: clamp(27px, 3vw, 39px); font-weight: 600; line-height: 1.3; letter-spacing: -.04em; }
.workspace-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.workspace-data span { color: var(--muted); font: 11px Consolas, "Microsoft YaHei UI", monospace; }
.workspace-data b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 23px; }
.workspace-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.workspace-search input { min-width: 0; padding: 11px 13px; border: 1px solid transparent; border-radius: var(--radius-control); outline: 0; background: var(--soft); color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.workspace-search input:focus { border-color: var(--blue); background: var(--surface-raised); }
.workspace-search button { padding: 11px 17px; border: 1px solid #254e82; border-radius: var(--radius-control); background: var(--blue); color: #f8fafc; font-weight: 700; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.workspace-search button:hover { background: var(--blue-dark); }
.button { border: 1px solid #254e82; border-radius: var(--radius-control); background: linear-gradient(180deg, #3b6da8, var(--blue)); color: #f8fafc; font-weight: 700; padding: 11px 21px; display: inline-block; box-shadow: inset 0 1px #ffffff26, 0 4px 12px #315f9b1a; transition: background .15s ease, border-color .15s ease; }
.button:hover { background: var(--blue-dark); }
.button:active { transform: translateY(1px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.category-rail { display: flex; align-items: center; gap: 12px; overflow-x: auto; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.category-rail > span { margin-right: auto; color: var(--muted); font: 600 13px Consolas, "Microsoft YaHei UI", monospace; letter-spacing: .06em; white-space: nowrap; }
.category-rail a { padding: 8px 13px; border: 1px solid var(--edge); border-radius: var(--radius-control); background: #f7f8fa; color: #4f5c6d; font-size: 12px; white-space: nowrap; transition: border-color .15s ease, color .15s ease; }
.category-rail a:hover { border-color: #9cabc0; color: var(--blue-dark); }
.category-rail sup { margin-left: 4px; color: #98a2b3; }
.section, .article-section { padding: 82px 0 88px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.section-heading h2 { margin: 9px 0 0; font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.section-heading > a { color: var(--blue); font-size: 13px; font-weight: 700; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool-card { position: relative; display: flex; gap: 15px; align-items: center; justify-content: space-between; padding: 23px; border: 1px solid var(--edge); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: inset 0 1px #ffffffa6; transition: border-color .15s ease, background .15s ease; }
.tool-card:hover { border-color: #9eacbd; background: #f6f8fa; }
.card-link { min-width: 0; flex: 1 1 auto; display: flex; gap: 15px; align-items: center; color: inherit; overflow: hidden; }
.tool-icon { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #c7d3e2; border-radius: var(--radius-control); background: #edf2f7; color: var(--blue); font-size: 23px; font-weight: 800; box-shadow: inset 0 1px #ffffffc7; }
.program-icon { object-fit: contain; padding: 5px; }
.tool-main { min-width: 0; flex: 1; }
.tool-title { display: flex; gap: 8px; align-items: center; }
.tool-title h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.tool-title span, .tool-meta { color: var(--muted); font-size: 11px; }
.tool-main p {
  color: #657089;
  font-size: 12px;
  margin: 6px 0 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.6;
  max-height: calc(1.6em * 2);
  white-space: normal;
  word-break: break-word;
}
.tool-meta { display: flex; gap: 15px; }
.platform-list { display: inline-flex; align-items: center; gap: 5px; }
.platform-icon { display: inline-flex; width: 17px; height: 17px; color: #56647b; }
.platform-icon svg { width: 100%; height: 100%; fill: currentColor; }
.button-small { position: relative; z-index: 2; flex: 0 0 auto; margin-left: auto; padding: 8px 13px; font-size: 12px; }
.article-section { position: relative; background: var(--soft); max-width: none; width: 100vw; margin-left: calc(50% - 50vw); padding-left: max(28px, calc((100vw - 1184px) / 2)); padding-right: max(28px, calc((100vw - 1184px) / 2)); }
.article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.article-list.wide { grid-template-columns: 1fr; max-width: 850px; }
.article-row { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 20px; background: var(--surface-raised); border: 1px solid var(--edge); border-radius: var(--radius-card); padding: 16px; box-shadow: inset 0 1px #ffffffa6; transition: border-color .15s ease, background .15s ease; }
.article-row:hover { border-color: #aab7c7; background: #f6f8fa; }
.article-cover { width: 120px; height: 110px; object-fit: cover; display: grid; place-items: center; background: var(--navy); color: #b4c8de; border-radius: var(--radius-control); font-family: Bahnschrift, sans-serif; font-size: 20px; font-weight: 700; }
.article-row h3 { margin: 6px 0; font-size: 16px; }
.article-row h3 a:hover { color: var(--blue); }
.article-row p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 8px; }
.article-row small { color: #8a94a8; }
.tag { color: var(--blue); background: #eaf2ff; padding: 4px 8px; border-radius: 3px; font: 700 10px Consolas, "Microsoft YaHei UI", monospace; }
.sponsor-strip { position: relative; overflow: hidden; margin: 82px 0; padding: 42px 48px; border: 1px solid #c6d0db; border-radius: var(--radius-card); background: linear-gradient(135deg, #e9edf2, #e4eaf0); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: inset 0 1px #ffffff9e; }
.sponsor-strip h2 { margin: 8px 0; font-size: 27px; }
.sponsor-strip span { color: var(--blue); font-size: 12px; font-weight: 700; }
.sponsor-strip p { color: var(--muted); margin: 0; }
.site-footer { max-width: 1240px; margin: 48px auto 0; padding: 48px 28px 24px; border-top: 1px solid var(--edge); color: var(--muted); font-size: 12px; }
.footer-primary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); gap: clamp(52px, 8vw, 110px); align-items: start; padding-bottom: 42px; }
.footer-brand { display: flex; max-width: 430px; flex-direction: column; gap: 10px; }
.footer-brand strong { color: var(--ink); font: 600 20px/1.2 Bahnschrift, "Microsoft YaHei UI", sans-serif; letter-spacing: -.025em; }
.footer-brand span { font-size: 13px; line-height: 1.8; }
.footer-feedback { padding-left: 34px; border-left: 1px solid var(--edge); }
.footer-feedback-label { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.footer-feedback h2 { margin: 9px 0 8px; color: var(--ink); font: 600 22px/1.35 Bahnschrift, "Microsoft YaHei UI", sans-serif; letter-spacing: -.025em; }
.footer-feedback p { margin: 0; font-size: 13px; line-height: 1.8; }
.footer-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.footer-contact-primary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #9cabbc; border-radius: var(--radius-control); background: var(--surface-raised); color: var(--blue-dark); font-weight: 700; white-space: nowrap; box-shadow: inset 0 1px #ffffff8f; }
.footer-contact-primary:hover { border-color: var(--blue); color: var(--blue); }
.footer-contact-primary:active { transform: translateY(1px); }
.footer-contact-secondary { color: var(--muted); line-height: 1.6; text-decoration: underline; text-decoration-color: #aeb8c4; text-underline-offset: 3px; }
.footer-contact-secondary:hover { color: var(--blue); text-decoration-color: currentColor; }
.footer-legal { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); color: #7a8593; }
.footer-legal small { font-size: 11px; }
.footer-legal > a:hover { color: var(--blue); }
.inner-page, .article-page { padding-top: 68px; padding-bottom: 82px; min-height: 65vh; }
.page-title { max-width: 720px; margin-bottom: 38px; }
.sponsor-page .page-title, .sponsor-page .page-title p { max-width: none; }
.page-title h1, .article-page h1 { font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: 46px; font-weight: 600; letter-spacing: -.045em; margin: 12px 0; text-wrap: balance; }
.toolbar { display: grid; grid-template-columns: 1fr 210px auto; gap: 10px; margin-bottom: 24px; }
.toolbar input, .toolbar select, .editor-form input, .editor-form select, .editor-form textarea, .login-card input { width: 100%; border: 1px solid #cfd6df; border-radius: 8px; background: var(--surface-raised); padding: 11px 13px; outline: none; }
.toolbar input:focus, .toolbar select:focus, .editor-form input:focus, .editor-form textarea:focus, .login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #315f9b1f; }
.article-page { max-width: 760px; }
.tool-detail { padding-top: 46px; padding-bottom: 72px; }
.tool-detail-hero { display: grid; grid-template-columns: minmax(300px, .85fr) 1.15fr; gap: 48px; align-items: center; padding: 38px; border: 1px solid var(--edge); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: inset 0 1px #ffffffa6, var(--shadow-soft); }
.tool-detail-cover, .tool-detail-placeholder { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-control); object-fit: cover; background: var(--navy); }
.tool-detail-image-link { position: relative; display: block; width: 100%; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; cursor: zoom-in; }
.tool-detail-image-link span { position: absolute; right: 12px; bottom: 12px; padding: 7px 11px; border-radius: 7px; background: #111827d9; color: white; font-size: 12px; opacity: 0; transform: translateY(4px); transition: .2s ease; }
.tool-detail-image-link:hover span, .tool-detail-image-link:focus-visible span { opacity: 1; transform: translateY(0); }
.image-preview { width: min(94vw, 1600px); max-width: none; height: min(92vh, 1000px); max-height: none; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: #10141d; box-shadow: 0 30px 100px #0008; }
.image-preview::backdrop { background: #10141dcc; backdrop-filter: blur(5px); }
.image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-preview-close { position: absolute; z-index: 1; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid #ffffff40; border-radius: 50%; background: #111827d9; color: white; font-size: 26px; line-height: 1; }
.tool-detail-placeholder { display: grid; place-items: center; color: #9bbcff; font-size: 72px; font-weight: 800; }
.tool-detail-intro h1 { margin: 12px 0; font-size: 42px; letter-spacing: -.04em; }
.tool-detail-intro > p { color: var(--muted); line-height: 1.8; font-size: 16px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0; color: var(--muted); font-size: 13px; }
.detail-download { min-width: 150px; text-align: center; }
.tool-detail-grid { max-width: 850px; margin-top: 42px; }
.back { color: var(--muted); display: block; margin-bottom: 30px; }
.article-info { color: var(--muted); font-size: 13px; }
.lead { color: #536173; font-size: 19px; line-height: 1.8; border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.article-hero-image { width: 100%; max-height: 430px; object-fit: cover; border-radius: 14px; margin: 12px 0 28px; }
.prose { font-size: 16px; line-height: 2.05; color: #344254; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.4; margin: 1.4em 0 .7em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose blockquote { padding: 12px 16px; border-left: 4px solid #bfd1f6; background: #f7f9fe; color: #51607a; border-radius: 0 10px 10px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose a { color: var(--blue); text-decoration: underline; }
.prose span[style], .prose p[style], .prose div[style] { max-width: 100%; }
.sponsor-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.sponsor-card, .funding { border: 1px solid var(--edge); border-radius: var(--radius-card); padding: 32px; background: var(--surface-raised); box-shadow: inset 0 1px #ffffffa6; }
.sponsor-card { background: #f0f4f8; }
.sponsor-card p, .funding p { color: var(--muted); line-height: 1.8; }
.sponsor-qr { margin-top: 22px; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border: 1px solid #d8dee6; border-radius: 12px; background: var(--surface-raised); }
.sponsor-qr img { width: min(260px, 100%); aspect-ratio: 1; object-fit: contain; display: block; }
.sponsor-qr span { color: var(--ink); font-size: 13px; font-weight: 700; }
.funding ul { list-style: none; padding: 0; }
.funding li { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.douyin-page { max-width: 1060px; }
.douyin-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 22px; align-items: start; }
.douyin-main, .douyin-guide { border: 1px solid var(--edge); border-radius: var(--radius-card); background: var(--surface-raised); box-shadow: inset 0 1px #ffffffa6, var(--shadow-soft); }
.douyin-main { padding: clamp(26px, 5vw, 48px); }
.douyin-heading { max-width: 650px; }
.douyin-heading h1 { margin: 13px 0 12px; font-family: Bahnschrift, "Microsoft YaHei UI", sans-serif; font-size: clamp(34px, 5vw, 48px); font-weight: 600; line-height: 1.16; letter-spacing: -.045em; }
.douyin-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.douyin-form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 32px; }
.douyin-form label { font-size: 13px; font-weight: 700; }
.douyin-form textarea { width: 100%; min-height: 132px; resize: vertical; padding: 15px 16px; border: 1px solid #cfd6df; border-radius: var(--radius-control); outline: 0; background: var(--surface); color: var(--ink); line-height: 1.75; }
.douyin-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #315f9b1f; }
.douyin-form textarea:disabled { opacity: .72; cursor: wait; }
.douyin-actions { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 7px; }
.douyin-actions .button { min-width: 0; margin: 0; }
.douyin-actions #douyinSubmit { flex: 1 1 132px; }
.douyin-action-secondary { flex: 0 1 92px; border-color: #b7c1cd; background: var(--surface); color: var(--ink); box-shadow: none; }
.douyin-action-secondary:hover { border-color: #8e9cad; background: var(--soft); }
.douyin-form .button:disabled { border-color: #8290a1; background: #8290a1; cursor: wait; }
.douyin-status { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 24px; padding: 18px 20px; border: 1px solid #b9c9dc; border-radius: var(--radius-control); background: #edf3f9; }
.douyin-status-copy { min-width: 0; }
.douyin-status strong { display: block; margin-bottom: 5px; font-size: 14px; }
.douyin-status p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.douyin-status .douyin-file { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.douyin-file span { color: var(--muted); }
.douyin-file b { color: var(--ink); font-weight: 600; }
.douyin-status[data-state="failed"] { border-color: #e0b7bc; background: #fbf0f1; }
.douyin-status[data-state="failed"] strong, .douyin-error { color: var(--danger); }
.douyin-status .button { flex: 0 0 auto; white-space: nowrap; }
.douyin-guide { padding: 27px; }
.douyin-guide h2 { margin: 0 0 20px; font: 600 22px/1.3 Bahnschrift, "Microsoft YaHei UI", sans-serif; }
.douyin-guide ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.douyin-guide li { display: grid; gap: 5px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.douyin-guide li:first-child { padding-top: 0; }
.douyin-guide strong { font-size: 13px; }
.douyin-guide span, .douyin-guide > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.douyin-guide > p { margin: 20px 0 0; }
.douyin-error { margin-top: 18px; font-size: 13px; }
.message { min-height: 60vh; display: grid; place-items: center; }
.empty { padding: 50px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.admin-body { background: #f4f6fa; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(410px, 100%); background: white; padding: 38px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 25px 70px #17203314; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { margin: 14px 0 2px; }
.login-card label, .editor-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; }
.login-card > a:last-child { text-align: center; color: var(--muted); font-size: 13px; }
.form-error { color: var(--danger); margin: 0; font-size: 13px; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 235px 1fr; }
.admin-nav { position: sticky; top: 0; align-self: start; height: 100vh; background: var(--navy); color: #d8deea; padding: 25px 18px; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; }
.admin-nav .brand { padding: 0 10px; }
.admin-nav nav { display: flex; flex-direction: column; gap: 5px; }
.admin-nav nav a, .admin-nav > a, .admin-nav button { padding: 11px 13px; border-radius: 7px; color: #aeb8c9; font-size: 13px; background: none; border: 0; text-align: left; width: 100%; }
.admin-nav nav a:hover, .admin-nav nav a.active { color: white; background: #243047; }
.admin-nav > a { margin-top: 0; }
.admin-main { max-width: 1300px; width: 100%; margin: 0 auto; padding: 36px 42px; }
.admin-main > header span { color: var(--blue); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.admin-main > header h1 { margin: 7px 0 28px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stats div { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.stats span { color: var(--muted); font-size: 12px; }
.stats strong { font-size: 32px; }
.admin-panel, .editor-form { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 23px; overflow-x: auto; }
.admin-panel { margin-bottom: 18px; }
.category-manager { max-width: 980px; margin-bottom: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.category-manager .panel-heading { margin-bottom: 14px; }
.category-manager .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.category-add { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 12px; }
.category-add input, .category-list input { min-width: 0; border: 1px solid #d8deea; border-radius: 7px; padding: 9px 11px; }
.category-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.category-list form { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 7px; }
.category-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.category-save, .category-delete { border: 0; background: none; padding: 7px; font-size: 12px; }
.category-save { color: var(--blue); }
.category-delete { color: var(--danger); }
.category-delete:disabled { color: #aeb6c5; cursor: not-allowed; }
.panel-heading, .admin-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 18px; }
.admin-actions p { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-align: left; padding: 11px; border-bottom: 1px solid var(--line); }
td { padding: 14px 11px; border-bottom: 1px solid #edf0f5; }
td small { color: var(--muted); display: block; margin-top: 5px; }
.admin-tools-table { table-layout: fixed; min-width: 1050px; }
.admin-tools-table th:nth-child(1) { width: 220px; }
.admin-tools-table th:nth-child(2) { width: 115px; }
.admin-tools-table th:nth-child(3), .admin-tools-table th:nth-child(5) { width: 58px; }
.admin-tools-table th:nth-child(6) { width: 70px; }
.admin-tools-table th:nth-child(7) { width: 95px; }
.admin-tools-table .file-cell { overflow-wrap: anywhere; word-break: break-word; line-height: 1.55; }
.admin-tools-table .number-cell { white-space: nowrap; }
.source-kind { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 999px; background: #edf0f5; color: #526078; font-size: 10px; font-weight: 700; }
.source-link { color: var(--blue); font-weight: 700; }
.row-actions { white-space: nowrap; }
.row-actions a { color: var(--blue); }
.row-actions form { display: inline-block; margin-left: 12px; }
.row-actions button { border: 0; background: none; color: var(--danger); padding: 0; }
.status { color: #7c879c; background: #edf0f5; padding: 4px 8px; border-radius: 999px; font-size: 10px; }
.status.live { color: #237a57; background: #e4f6ed; }
.editor-form { display: flex; flex-direction: column; gap: 20px; max-width: 980px; }
.editor-form.compact { max-width: 520px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.editor-form textarea { resize: vertical; line-height: 1.7; }
.editor-form label small { font-weight: 400; color: var(--muted); }
.rich-editor { border: 1px solid #d8deea; border-radius: 10px; overflow: hidden; background: white; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); background: #f7f9fd; }
.rich-toolbar button, .rich-toolbar select { border: 1px solid #d8deea; border-radius: 8px; background: white; color: var(--ink); padding: 8px 10px; font-size: 12px; }
.rich-toolbar button:hover, .rich-toolbar select:hover { border-color: #b8c8e7; }
.color-picker { display: inline-flex !important; align-items: center; gap: 8px; flex-direction: row !important; font-size: 12px !important; font-weight: 600 !important; color: var(--muted); }
.color-picker input { width: 34px; height: 34px; padding: 3px; border-radius: 8px; }
.rich-surface, .rich-source { width: 100%; padding: 14px 16px; border: 0; outline: 0; font-size: 15px; line-height: 1.8; color: #303b51; background: white; }
.rich-surface:focus, .rich-source:focus { box-shadow: inset 0 0 0 2px #2563eb18; }
.rich-surface[contenteditable="true"]:empty::before { content: "在这里输入内容，支持字号、颜色、缩进、列表等排版样式"; color: #98a3b8; }
.rich-source { font-family: Consolas, "Courier New", monospace; resize: vertical; }
.field-note { margin: 0; padding: 13px; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: 13px; }
.platform-fieldset { margin: 0; padding: 15px; border: 1px solid #d8deea; border-radius: 8px; }
.platform-fieldset legend { padding: 0 7px; font-size: 13px; font-weight: 700; }
.platform-fieldset > small { display: block; margin-top: 10px; color: var(--muted); }
.choice-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-option { flex-direction: row !important; align-items: center; min-width: 110px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); cursor: pointer; }
.choice-option input { width: auto; margin: 0; }
.editor-form .check { flex-direction: row; align-items: center; align-self: end; min-height: 43px; }
.editor-form .check input { width: auto; }
.form-buttons { display: flex; align-items: center; gap: 18px; }
.form-buttons a { color: var(--muted); }
:focus-visible { outline: 3px solid #315f9b52; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media (max-width: 800px) {
  main { padding-inline: 20px; }
  .site-header { height: 70px; padding: 0 20px; gap: 15px; }
  .brand small { display: none; }
  .site-header nav { position: fixed; z-index: 20; bottom: 10px; left: 12px; right: 12px; height: 58px; padding: 0 8px; border: 1px solid #cbd3dd; border-radius: 8px; background: #f7f8fa; box-shadow: 0 6px 20px #5262731a; justify-content: space-around; gap: 0; }
  .site-header nav a { flex: 1; height: 100%; font-size: 12px; }
  .site-header nav a::after { bottom: 7px; }
  .tool-hero { grid-template-columns: 1fr; gap: 42px; min-height: 0; padding: 58px 0 55px; }
  .tool-hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-workspace { width: 100%; }
  .workspace-body { padding: 30px 24px 26px; }
  .category-rail > span { display: none; }
  .category-rail { margin-inline: -20px; padding-inline: 20px; }
  .section, .article-section { padding-top: 55px; padding-bottom: 58px; }
  .section-heading h2 { font-size: 27px; }
  .tool-grid, .article-list, .sponsor-layout, .tool-detail-hero, .douyin-layout { grid-template-columns: 1fr; }
  .article-section { padding-left: 20px; padding-right: 20px; }
  .sponsor-strip { align-items: flex-start; flex-direction: column; margin: 55px 0; padding: 30px 25px; }
  .toolbar, .form-grid { grid-template-columns: 1fr; }
  .category-list { grid-template-columns: 1fr; }
  .site-footer { padding: 36px 20px 95px; }
  .footer-primary { grid-template-columns: 1fr; gap: 28px; padding-bottom: 30px; }
  .footer-feedback { padding: 26px 0 0; border-top: 1px solid var(--edge); border-left: 0; }
  .footer-contact-actions { align-items: flex-start; flex-direction: column; }
  .footer-legal { grid-template-columns: 1fr; gap: 8px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; }
  .admin-nav nav { flex-direction: row; overflow-x: auto; }
  .admin-nav > a, .admin-nav form { display: none; }
  .admin-main { padding: 24px 15px; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tool-card { align-items: flex-start; padding: 17px; }
  .tool-icon { width: 42px; height: 42px; }
  .button-small { padding: 8px 10px; }
  .article-row { grid-template-columns: 86px 1fr; gap: 14px; }
  .article-cover { width: 86px; height: 100%; min-height: 105px; }
  .workspace-body > strong { font-size: 27px; }
  .workspace-data { gap: 8px; }
  .workspace-data b { font-size: 19px; }
  .workspace-search button { padding-inline: 12px; }
  .douyin-main, .douyin-guide { padding: 23px; }
  .douyin-actions { gap: 8px; }
  .douyin-actions .button { padding-inline: 12px; }
  .douyin-status { align-items: flex-start; flex-direction: column; }
  .douyin-status .button { width: 100%; text-align: center; }
}
@media (prefers-color-scheme: dark) {
  body:not(.admin-body) {
    --blue: #87a9d3;
    --blue-dark: #a2bddd;
    --ink: #dce2e9;
    --muted: #a6b0bc;
    --line: #414b57;
    --surface: #222a33;
    --surface-raised: #28313b;
    --soft: #252e38;
    --navy: #dce2e9;
    --edge: #46515e;
    --shadow-soft: 0 18px 45px #10171f38;
    color-scheme: dark;
    background: var(--surface);
  }
  .site-header nav a, .category-rail a, .tool-main p, .prose, .lead { color: #b4bdc8; }
  .site-header nav a:hover, .site-header nav a.active, .category-rail a:hover { color: var(--blue); }
  .hero-workspace, .category-rail a, .tool-card, .article-row, .toolbar input, .toolbar select, .sponsor-qr { background: var(--surface-raised); }
  .hero-workspace, .tool-card, .article-row, .tool-icon, .sponsor-strip, .sponsor-card, .funding, .tool-detail-hero { box-shadow: inset 0 1px #ffffff0f; }
  .tool-card:hover, .article-row:hover { border-color: #586574; background: #2c3641; }
  .tool-icon, .tag { border-color: #45566c; background: #303d4c; color: var(--blue); }
  .article-cover, .tool-detail-placeholder { background: #303b47; color: #a9c0da; }
  .sponsor-strip, .sponsor-card, .funding, .tool-detail-hero, .douyin-main, .douyin-guide { border-color: var(--line); background: #29333e; color: var(--ink); }
  .article-info, .article-row p, .article-row small, .tool-detail-intro > p, .detail-meta, .back { color: var(--muted); }
  .button, .workspace-search button { border-color: #416b9f; background: #416b9f; color: #f3f5f7; }
  .button:hover, .workspace-search button:hover { background: #4d78aa; }
  .douyin-action-secondary { border-color: #566371; background: #222a33; color: var(--ink); }
  .douyin-action-secondary:hover { border-color: #718093; background: #303a45; }
  .site-footer a, .section-heading > a, .text-link { color: var(--blue); }
  .footer-contact-primary { border-color: #5b6876; background: var(--surface-raised); box-shadow: inset 0 1px #ffffff0f; }
  .footer-contact-secondary { color: var(--muted); }
  .douyin-form textarea { border-color: #4b5663; background: #222a33; }
  .douyin-status { border-color: #50647a; background: #2c3947; }
  .douyin-status[data-state="failed"] { border-color: #765059; background: #3a2b31; }
}
@media (prefers-color-scheme: dark) and (max-width: 800px) {
  .site-header nav { border-color: #4b5663; background: #29323c; box-shadow: 0 6px 20px #11182038; }
}
