:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e6e8ec;
  --text: #1f2430;
  --muted: #7a8290;
  --up: #e0483f;
  --down: #14946a;
  --accent: #3b6ef5;
  --accent-soft: #eaf0ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.btn {
  border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 13px;
  padding: 8px 15px; border-radius: 8px; cursor: pointer; transition: .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: #eef1f6; color: #4a5364; }
.btn.full { width: 100%; padding: 10px; font-size: 14px; }
.link {
  border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted);
  cursor: pointer; padding: 2px 4px;
}
.link:hover { color: var(--accent); }
.hint { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }

/* ==================== 登录 ==================== */
.auth {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #e8efff 0%, var(--bg) 60%);
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 356px; background: #fff; border-radius: 16px; padding: 26px 26px 20px;
  box-shadow: var(--shadow); border: 1px solid #eef0f4;
}
.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.auth-brand .paw { font-size: 24px; }
.auth-brand b { font-size: 17px; letter-spacing: .5px; }
.auth-sub { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 6px; background: #f2f4f8; padding: 3px; border-radius: 9px; margin-bottom: 16px; }
.tab {
  flex: 1; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted);
  padding: 7px 0; border-radius: 7px; cursor: pointer;
}
.tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.auth-card label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.auth-card input {
  width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; color: var(--text); background: #fff; outline: none;
}
.auth-card input:focus { border-color: #c9d6f8; box-shadow: 0 0 0 3px rgba(59,110,245,.1); }
.auth-error { color: var(--up); font-size: 12px; min-height: 18px; margin-bottom: 6px; }
.auth-note { color: var(--muted); font-size: 11.5px; line-height: 1.7; margin: 12px 0 0; text-align: center; }

/* ==================== 顶栏 ==================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px 22px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand .paw { font-size: 20px; }
.brand b { font-size: 15px; letter-spacing: .5px; }
.top-search { flex: 1; display: flex; gap: 10px; min-width: 0; }
.top-search input, .top-search select {
  font: inherit; font-size: 13px; padding: 8px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--text); outline: none;
}
.top-search input { flex: 1 1 auto; min-width: 0; }
.top-search input:focus { border-color: #c9d6f8; box-shadow: 0 0 0 3px rgba(59,110,245,.1); }
.top-search select { flex: 0 0 auto; }
.top-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.who span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; padding: 22px 22px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }
.main.dragging { outline: 2px dashed #c3d2f8; outline-offset: -14px; background: #fbfcff; }

/* ==================== 书架 ==================== */
.book-stat { margin: 2px 0 14px; font-size: 12px; color: var(--muted); }
.book-stat b { color: var(--text); }

.upload-queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.up-row {
  display: flex; align-items: center; gap: 10px; font-size: 12px;
  background: #fff; border: 1px solid #eef0f4; border-radius: 8px; padding: 8px 12px;
}
.up-row .up-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row .up-track { flex: 0 0 140px; height: 4px; background: #e6e8ec; border-radius: 3px; overflow: hidden; }
.up-row .up-track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up-row.done .up-track i { background: var(--down); }
.up-row.fail { color: var(--up); }
.up-row.fail .up-track i { background: var(--up); }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 22px 18px; }
.book-card { cursor: pointer; position: relative; }
.book-cover {
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--h, 220) 60% 62%), hsl(calc(var(--h, 220) + 32) 52% 44%));
  box-shadow: 0 2px 4px rgba(16,24,40,.07), 0 10px 22px rgba(16,24,40,.08);
  transition: transform .18s, box-shadow .18s;
}
.book-card:hover .book-cover { transform: translateY(-4px); box-shadow: 0 6px 12px rgba(16,24,40,.10), 0 18px 30px rgba(16,24,40,.14); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover .ph {
  position: absolute; inset: 0; padding: 14px 12px; display: flex; align-items: center;
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1.45;
  text-shadow: 0 1px 6px rgba(0,0,0,.28); word-break: break-word;
}
.book-cover .ph::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 4px;
  background: rgba(255,255,255,.35); border-radius: 3px 3px 0 0; transform: scaleX(.6); transform-origin: left;
}
.bk-fmt {
  position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: .6px;
  background: rgba(0,0,0,.42); color: #fff; padding: 2px 7px; border-radius: 20px;
  backdrop-filter: blur(2px); text-transform: uppercase;
}
.bk-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.25); }
.bk-progress i { display: block; height: 100%; background: #fff; opacity: .9; }
.book-meta { padding: 9px 2px 0; }
.book-meta b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; font-weight: 600; line-height: 1.45;
}
.book-meta small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-actions {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s;
}
.book-card:hover .bk-actions { opacity: 1; }
.bk-actions button {
  border: 0; background: rgba(255,255,255,.92); color: #4a5364; font-size: 11px;
  padding: 3px 8px; border-radius: 6px; cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.16);
}
.bk-actions button:hover { color: var(--accent); }
.bk-actions button.del:hover { color: var(--up); }
.book-empty { text-align: center; padding: 70px 0; color: var(--muted); }
.book-empty p { margin: 0 0 6px; }

/* ==================== 阅读器 ==================== */
.reader {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: #faf9f6; color: #26282d;
}
.rd-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 18px;
  background: rgba(255,255,255,.92); border-bottom: 1px solid #e8e6e1; backdrop-filter: blur(6px);
}
.rd-btn {
  border: 1px solid #e2e4ea; background: #fff; color: #4a5364; font-size: 12px;
  padding: 6px 11px; border-radius: 7px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.rd-btn:hover { border-color: #c9d6f8; color: var(--accent); background: #f7f9ff; }
.rd-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.rd-title b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-title small { color: #8b909c; font-size: 11px; white-space: nowrap; }
.rd-tools { display: flex; gap: 6px; flex: 0 0 auto; }

.rd-main { flex: 1; min-height: 0; display: flex; position: relative; }
.rd-stage { flex: 1; min-width: 0; height: 100%; }
.rd-pdf { flex: 1; width: 100%; height: 100%; border: 0; background: #525659; }
.rd-txt { flex: 1; overflow-y: auto; overflow-x: hidden; }
.rd-txt-inner {
  max-width: 720px; margin: 0 auto; padding: 34px 26px 80px;
  font-size: var(--rd-fs, 17px); line-height: 1.95; white-space: pre-wrap; word-break: break-word;
}
.rd-txt-inner h3 { font-size: 1.05em; margin: 1.6em 0 .7em; color: #3d4351; }
.rd-txt-inner p { margin: 0 0 .85em; }

.rd-toc {
  flex: 0 0 258px; width: 258px; border-right: 1px solid #e8e6e1; background: #fff;
  display: flex; flex-direction: column; overflow: hidden;
}
.rd-toc-head { padding: 12px 16px; font-size: 12px; color: #8b909c; border-bottom: 1px solid #f0eeea; }
.rd-toc-list { overflow-y: auto; padding: 6px 0; }
.rd-toc-list a {
  display: block; padding: 7px 16px; font-size: 13px; color: #4a5364; text-decoration: none;
  cursor: pointer; line-height: 1.5;
}
.rd-toc-list a:hover { background: #f5f7fb; color: var(--accent); }
.rd-toc-list a.lv2 { padding-left: 30px; font-size: 12.5px; color: #6c7482; }

.rd-foot {
  flex: 0 0 auto; height: 32px; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; border-top: 1px solid #e8e6e1; background: rgba(255,255,255,.92);
  font-size: 11px; color: #8b909c;
}
.rd-bar { flex: 1; height: 3px; background: #e8e6e1; border-radius: 2px; overflow: hidden; }
.rd-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.rd-pct { font-variant-numeric: tabular-nums; }

.rd-tip {
  position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%);
  background: rgba(31,36,48,.88); color: #fff; font-size: 12px; padding: 7px 14px;
  border-radius: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 65;
}
.rd-tip.on { opacity: 1; }

.rd-msg { max-width: 520px; margin: 12vh auto 0; text-align: center; line-height: 2; color: #5a6272; font-size: 14px; }
.rd-msg b { font-size: 16px; color: #2a3040; }
.rd-msg .rd-btn { display: inline-block; margin-top: 8px; }

/* 阅读器配色 */
.reader[data-theme="sepia"] { background: #f6efdf; color: #3b3222; }
.reader[data-theme="sepia"] .rd-top,
.reader[data-theme="sepia"] .rd-foot { background: rgba(246,239,223,.94); border-color: #e3d8c0; }
.reader[data-theme="sepia"] .rd-toc { background: #fbf6ec; border-color: #e3d8c0; }
.reader[data-theme="dark"] { background: #14161a; color: #c8cdd6; }
.reader[data-theme="dark"] .rd-top,
.reader[data-theme="dark"] .rd-foot { background: rgba(20,22,26,.94); border-color: #262b33; color: #8d95a2; }
.reader[data-theme="dark"] .rd-toc { background: #171a1f; border-color: #262b33; color: #aab2bf; }
.reader[data-theme="dark"] .rd-btn { background: #1c2027; border-color: #2c323c; color: #b9c1cd; }
.reader[data-theme="dark"] .rd-title b { color: #e2e6ec; }
.reader[data-theme="dark"] .rd-bar { background: #2a303a; }
.reader[data-theme="dark"] .rd-toc-list a { color: #b9c1cd; }
.reader[data-theme="dark"] .rd-toc-list a:hover { background: #1f242c; }
.reader[data-theme="dark"] .rd-txt-inner h3 { color: #d5dae2; }

/* ==================== 弹层 ==================== */
.be-mask {
  position: fixed; inset: 0; z-index: 70; background: rgba(20, 24, 33, .38);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.be-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 20px 50px rgba(16,24,40,.22);
}
.be-card h3 { margin: 0 0 14px; font-size: 15px; }
.be-card label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.be-card input, .be-card textarea {
  width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13px; outline: none;
}
.be-card input:focus, .be-card textarea:focus { border-color: #c9d6f8; box-shadow: 0 0 0 3px rgba(59,110,245,.1); }
.be-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.usr-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 8px 0; border-bottom: 1px solid #f2f4f8;
}
.usr-row:last-child { border-bottom: 0; }
.usr-row .usr-name { flex: 1; }
.usr-row .tag { font-size: 10.5px; padding: 1px 7px; border-radius: 20px; background: #f0f2f6; color: var(--muted); }
.usr-row .tag.pending { background: #fff4e5; color: #b9700b; }
.usr-row .tag.admin { background: var(--accent-soft); color: var(--accent); }
.usr-row button { border: 0; background: none; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; }
.usr-row button.del { color: var(--up); }
.usr-row .usr-wb { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.usr-row .usr-wb input { width: 13px; height: 13px; accent-color: var(--accent); margin: 0; cursor: pointer; }


/* ==================== 移动端 ==================== */
@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .top-search { order: 3; flex: 1 1 100%; }
  .top-actions { margin-left: auto; }
  .main { padding: 16px 14px 50px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }
  .rd-top { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .rd-title { order: 3; flex: 1 1 100%; }
  .rd-tools { margin-left: auto; }
  .rd-toc { position: absolute; z-index: 2; height: 100%; box-shadow: 0 0 30px rgba(0,0,0,.14); }
  .rd-txt-inner { padding: 22px 18px 60px; }
}

/* ==================== 译站 ==================== */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

.doc-head { max-width: 1080px; margin: 0 auto; padding: 34px 22px 0; }
.doc-head h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: .2px; }
.doc-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }

.doc-list {
  max-width: 1080px; margin: 0 auto; padding: 22px 22px 70px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.doc-card {
  display: block; text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow); transition: .16s; position: relative; overflow: hidden;
}
.doc-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #3b6ef5, #7aa7ee);
}
.doc-card:hover { transform: translateY(-2px); border-color: #c9d6f8; box-shadow: 0 8px 22px rgba(16,24,40,.09); }
.doc-card .d-tag {
  display: inline-block; font-size: 10.5px; letter-spacing: .5px; color: #2f6fd0;
  background: var(--accent-soft); padding: 2px 8px; border-radius: 20px; margin-bottom: 9px;
}
.doc-card h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.45; }
.doc-card .d-sec { font-size: 12.5px; color: #4a5364; margin-bottom: 10px; }
.doc-card .d-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.doc-card .d-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.doc-empty { max-width: 1080px; margin: 0 auto; padding: 60px 22px; text-align: center; color: var(--muted); }
.doc-back { max-width: 1080px; margin: 0 auto; padding: 18px 22px 0; }
.doc-back a { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.doc-back a:hover { color: var(--accent); }

@media (max-width: 620px) {
  .doc-head { padding: 22px 16px 0; }
  .doc-list { padding: 16px 16px 60px; grid-template-columns: 1fr; }
  .doc-back { padding: 14px 16px 0; }
}

/* ==================== 文档中心（首页） ==================== */
a.brand { text-decoration: none; color: inherit; }
.brand .logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: #1f2430; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .3px;
}

.top-search { position: relative; }
.top-search .q-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: #eef0f4; color: #7a8290; width: 18px; height: 18px;
  border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; padding: 0;
}
.top-search .q-clear:hover { background: #e2e6ec; color: #4a5364; }
.top-search input[type="search"] { padding-right: 34px; }
.top-search input[type="search"]::-webkit-search-cancel-button { display: none; }

.dc-main { max-width: 1180px; padding-top: 24px; }

.hero {
  background: linear-gradient(135deg, #eef3ff 0%, #f7f9fd 52%, #fdfdff 100%);
  border: 1px solid #e4eaf8; border-radius: 16px; padding: 28px 30px 24px;
}
.hero-kicker {
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
  color: #5b7fd0; margin-bottom: 8px; font-weight: 600;
}
.hero h1 { margin: 0 0 10px; font-size: 27px; letter-spacing: .3px; line-height: 1.3; }
.hero p { margin: 0; max-width: 760px; font-size: 13px; line-height: 1.95; color: #5a6272; }
.hero p b { color: #3d4351; }
.hero-stat { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; font-size: 12px; color: #7a8290; }
.hero-stat b { color: #1f2430; font-size: 14px; margin-right: 3px; font-variant-numeric: tabular-nums; }
.hero-stat .dot { width: 3px; height: 3px; border-radius: 50%; background: #c3cad6; }

.cat-nav {
  position: sticky; top: 56px; z-index: 15;
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 10px; margin-bottom: 4px;
  background: linear-gradient(180deg, var(--bg) 72%, rgba(245,246,248,0));
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: #4a5364;
  font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 20px; cursor: pointer;
  transition: .15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.chip span { font-size: 10.5px; color: #9aa1ad; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: #c9d6f8; color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on span { color: rgba(255,255,255,.72); }

.cat { margin-top: 30px; scroll-margin-top: 108px; }
.cat-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.cat-code {
  flex: 0 0 auto; margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 1.4px;
  color: #2f6fd0; background: var(--accent-soft); padding: 4px 7px; border-radius: 6px;
}
.cat-title { flex: 1; min-width: 0; }
.cat-title h2 { margin: 0; font-size: 16px; letter-spacing: .3px; }
.cat-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.cat-count { flex: 0 0 auto; font-size: 12px; color: #a7aeb9; font-variant-numeric: tabular-nums; padding-top: 2px; }
.cat-count b { color: #3b6ef5; }

.item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px; margin-top: 14px;
}
.it-card {
  display: flex; flex-direction: column; position: relative;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid #dfe3ea;
  border-radius: 11px; padding: 13px 15px 14px; text-decoration: none; color: inherit;
  transition: transform .16s, box-shadow .16s, border-color .16s; min-width: 0;
}
.it-card.has { border-left-color: #3b6ef5; }
.it-card.ext { border-left-color: #eda33b; }
.it-card.empty { background: #fbfbfc; border-left: 1px dashed #dfe3ea; }
.it-card.has:hover, .it-card.ext:hover {
  transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.08); border-color: #c9d6f8;
}
.it-card.has:hover { border-left-color: #3b6ef5; }
.it-card.ext:hover { border-left-color: #eda33b; }
.it-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.it-name { font-size: 14px; font-weight: 600; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-badge {
  flex: 0 0 auto; margin-left: auto; font-size: 10.5px; color: #9aa1ad;
  background: #f2f4f8; padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.it-badge.on { background: var(--accent-soft); color: #2f6fd0; }
.it-badge.ext { background: #fff4e3; color: #b9700b; }
.it-full { margin-top: 5px; font-size: 11.5px; line-height: 1.5; color: #8b929e; }
.it-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.it-ver {
  font-size: 10.5px; color: #6b7280; background: #f6f7f9;
  padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.it-vendor { font-size: 10.5px; color: #a7aeb9; }
.it-docs { margin-top: 9px; padding-top: 8px; border-top: 1px dashed #edeff3; display: flex; flex-direction: column; gap: 5px; }
.it-docs a {
  font-size: 12px; color: #3b6ef5; text-decoration: none; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.it-docs a:hover { text-decoration: underline; }
.it-docs a i { font-style: normal; color: #b9c0cc; margin-right: 4px; }
.it-more { font-size: 11px; color: #a7aeb9; }
.it-link { margin-top: 9px; font-size: 11.5px; color: #b9700b; }
.it-alt { margin-top: 7px; padding-top: 7px; border-top: 1px dashed #edeff3; }
.it-alt a {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px;
  color: #b9700b; text-decoration: none;
}
.it-alt a:hover { text-decoration: underline; }
.it-alt a i {
  font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  background: #fff4e3; color: #b9700b; padding: 1px 4px; border-radius: 3px;
}

/* 多版本卡片：版本行 = 版本号 + 译文入口 + 原文 PDF 按钮 */
.it-eds {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed #edeff3;
  display: flex; flex-direction: column; gap: 7px;
}
.it-ed { display: flex; align-items: center; gap: 8px; }
.it-ed-ver {
  flex: none; min-width: 36px; text-align: center;
  font-size: 11px; font-weight: 700; color: #4a5464; background: #f2f4f8;
  padding: 2px 7px; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.it-ed-doc {
  flex: 1 1 auto; min-width: 0; font-size: 12px; color: #3b6ef5; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.it-ed-doc:hover { text-decoration: underline; }
.it-ed-doc.off { color: #c3c9d3; cursor: default; font-size: 11.5px; }
.it-ed-pdf {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #b9700b; background: #fff6e9; border: 1px solid #f6e0bf;
  padding: 2px 7px; border-radius: 6px; text-decoration: none;
}
.it-ed-pdf:hover { background: #ffeed6; }
.it-ed-pdf i { font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.it-ed-pdf.off { color: #ccd1d9; background: #f7f8fa; border-color: #eceef2; }
.it-ed-todo {
  flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: #c3c9d3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.it-eds-rest { display: flex; flex-direction: column; gap: 7px; }
.it-eds-rest[hidden] { display: none; }
.it-eds-toggle {
  align-self: flex-start; margin-top: 1px; font: inherit; font-size: 11.5px;
  color: #7b8494; background: none; border: 1px dashed #dfe3ea; border-radius: 6px;
  padding: 3px 9px; cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.it-eds-toggle:hover { color: #3b6ef5; border-color: #c9d6f8; background: #f7f9ff; }
.it-eds-toggle[data-open="1"] { border-style: solid; color: #9aa1ad; }

/* 文档集：一套官方手册的篇目清单（折叠，点标题在线看原文） */
.it-docset { margin-top: 9px; }
.it-docs-toggle {
  width: 100%; display: flex; align-items: center; gap: 5px; text-align: left;
  font: inherit; font-size: 11.5px; color: #5b6474; background: #fafbfd;
  border: 1px solid #eaeef4; border-radius: 7px; padding: 6px 9px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.it-docs-toggle:hover { color: #3b6ef5; border-color: #c9d6f8; background: #f7f9ff; }
.it-docs-toggle b { color: #3b6ef5; font-weight: 700; }
.it-docs-ver { margin-left: auto; font-size: 10px; color: #a7aeb9; white-space: nowrap; }
.it-docs-body { margin-top: 7px; max-height: 330px; overflow-y: auto; padding-right: 4px; }
.it-docs-body[hidden] { display: none; }
.it-doc-g {
  position: sticky; top: 0; z-index: 1; display: flex; gap: 6px; align-items: baseline;
  background: #fff; padding: 6px 0 4px; font-size: 10.5px; font-weight: 600;
  color: #8a93a3; letter-spacing: .02em;
}
.it-doc-g i { font-style: normal; font-weight: 400; color: #bcc3cd; }
.it-doc-row {
  display: flex; align-items: baseline; gap: 8px; padding: 5px 0;
  border-bottom: 1px solid #f4f6f9; text-decoration: none; color: #3d4551; font-size: 11.5px;
}
.it-doc-row:hover { color: #3b6ef5; }
.it-doc-row:hover .it-doc-t { text-decoration: underline; }
.it-doc-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-doc-p { flex: none; color: #aab1bc; font-size: 10.5px; font-variant-numeric: tabular-nums; }

/* 文档集卡片（layout=docs）：独占一行，篇目直接铺开、可多列 */
.it-card.docs { grid-column: 1 / -1; }
.it-docs-hint { margin-left: auto; font-size: 10.5px; color: #b6bdc7; }
.it-docset.flat { margin-top: 10px; }
.it-docs-sum {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 0 6px; border-top: 1px dashed #edeff3;
  font-size: 11.5px; color: #5b6474;
}
.it-docs-sum b { color: #3b6ef5; font-weight: 700; }
.it-docset.flat .it-docs-body {
  margin-top: 0; max-height: none; overflow: visible; padding-right: 0;
}
.it-doc-sec + .it-doc-sec { margin-top: 1px; }
button.it-doc-g {
  width: 100%; box-sizing: border-box; text-align: left; cursor: pointer;
  border: 0; background: #fff; font: inherit;
  display: flex; gap: 6px; align-items: baseline;
  position: sticky; top: 0; z-index: 1;
  padding: 9px 0 5px; margin: 0;
  font-size: 10.5px; font-weight: 600; color: #8a93a3; letter-spacing: .02em;
}
button.it-doc-g:hover { color: #3b6ef5; }
button.it-doc-g[data-open="0"] { color: #79818f; }
button.it-doc-g[data-open="0"]:hover { background: #f8faff; }
button.it-doc-g .it-doc-gv { margin-left: auto; font-size: 9px; color: #c3cad4; }
button.it-doc-g[data-open="0"] .it-doc-gv { color: #ccd2db; }
.it-doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0 20px; }
.it-doc-list[hidden] { display: none; }

.search-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px 6px; margin-top: 16px; box-shadow: var(--shadow);
}
.sr-head { font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.sr-head b { color: var(--accent); }
.sr-list { display: flex; flex-direction: column; }
.sr-row { display: block; padding: 10px 2px; border-top: 1px dashed #eef0f4; text-decoration: none; color: inherit; }
.sr-row:hover { background: #fafbff; }
.sr-top { display: flex; align-items: baseline; gap: 8px; font-size: 11px; min-width: 0; }
.sr-doc { color: #2f6fd0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.sr-sec { color: #a7aeb9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-zh {
  margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; color: #3d4351;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sr-en {
  margin: 3px 0 0; font-size: 11px; line-height: 1.6; color: #9aa1ad;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
mark { background: #fff0a8; color: inherit; padding: 0 1px; border-radius: 2px; }

.filter-bar { font-size: 12px; color: var(--muted); margin-top: 16px; }
.filter-bar b { color: var(--text); }
.filter-bar button {
  border: 0; background: none; font: inherit; font-size: 12px; color: var(--accent);
  cursor: pointer; padding: 0 2px;
}

.catalog-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.catalog-empty p { margin: 0 0 6px; }

.dc-tip {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: rgba(31,36,48,.88); color: #fff; font-size: 12px; padding: 7px 14px;
  border-radius: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 65;
}
.dc-tip.on { opacity: 1; }

@media (max-width: 720px) {
  .dc-main { padding-top: 14px; }
  .hero { padding: 20px 18px 18px; border-radius: 13px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 12.5px; }
  .cat-nav { top: 0; position: static; padding: 12px 0 6px; }
  .item-grid { grid-template-columns: 1fr; gap: 10px; }
  .cat { margin-top: 24px; }
  .cat-head { flex-wrap: wrap; }
  .cat-count { margin-left: auto; }
}
