/* 文献库页 */
.topbar .search {
  display: flex; align-items: center; gap: 8px; width: min(520px, 46vw); height: 34px; margin-left: 28px;
  padding: 0 10px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink-3);
}
.topbar .search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.topbar .search input { flex: 1; border: 0; outline: 0; background: none; height: 100%; color: var(--ink); font-size: 13.5px; }
.topbar .search input::-webkit-search-cancel-button { display: none; }

.lib { display: grid; grid-template-columns: 216px minmax(0, 1fr) 0; height: 100vh; padding-top: var(--bar-h); transition: grid-template-columns .25s ease; }
.lib.has-detail { grid-template-columns: 216px minmax(0, 1fr) 400px; }

/* 侧栏 */
.side { border-right: 1px solid var(--rule); padding: 16px 10px 40px; overflow-y: auto; }
.side h3 { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--ink-3); margin: 18px 10px 6px; }
.side h3:first-child { margin-top: 2px; }
.side button { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; text-align: left; }
.side button:hover { background: var(--accent-soft); color: var(--ink); }
.side button.on { background: var(--accent-soft-2); color: var(--ink); font-weight: 500; }
.side button .n { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side button .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-2); flex: none; margin: 0 2px; }
.side .empty { font-size: 12.5px; color: var(--ink-3); padding: 2px 10px; line-height: 1.7; }

/* 列表 */
.main { overflow-y: auto; min-width: 0; }
.list-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 18px 28px 12px; background: var(--bg); }
.list-head h1 { font: 600 20px/1.3 var(--serif-zh); margin: 0; letter-spacing: .02em; }
.list-head .count { font-size: 13px; color: var(--ink-3); }
.list-head .grow { flex: 1; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.sort select { width: auto; height: 30px; font-size: 13px; }
.list { padding: 0 20px 60px; outline: 0; }

.row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 14px 10px; border-radius: 10px; cursor: default; position: relative;
}
.row + .row::before { content: ""; position: absolute; left: 78px; right: 10px; top: 0; border-top: 1px solid var(--rule); }
.row:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.row.on { background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
.row.on::before, .row.on + .row::before { display: none; }
.thumb { width: 52px; height: 68px; border-radius: 3px; background: #fff center top / cover no-repeat; box-shadow: 0 0 0 1px var(--rule), 0 1px 3px rgba(0,0,0,.08); }
.thumb.blank { background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.row .t1 { font: 600 16px/1.5 var(--serif-zh); color: var(--ink); letter-spacing: .01em; display: flex; gap: 6px; align-items: baseline; }
.row .t1 .star { color: #c9a24a; flex: none; }
.row .t1 .star svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.row .t2 { font: italic 13.5px/1.5 var(--serif-en); color: var(--ink-2); margin-top: 1px; }
.row .t2:not([lang="en"]), .detail .title-sub:not([lang="en"]) { font-style: normal; font-family: var(--serif-zh); }  /* 译文标题放第二行时不要斜体 */
.row .t3 { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.row .t3 .chip { height: 20px; font-size: 11.5px; }
.row .side-info { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 120px; padding-top: 3px; }
.meter { width: 96px; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.row .stat { font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.row .stat.job { color: var(--accent); }
.row .stat.err { color: var(--danger); }
.empty-state { text-align: center; padding: 90px 20px; color: var(--ink-3); }
.empty-state .big { font: 600 20px/1.5 var(--serif-zh); color: var(--ink-2); margin-bottom: 8px; }
.empty-state .btn { margin-top: 18px; }

/* 详情 */
.detail { border-left: 1px solid var(--rule); background: var(--surface); overflow-y: auto; overflow-x: hidden; }
.detail-inner { padding: 22px 24px 50px; width: 400px; }
.detail .cover { display: flex; gap: 16px; }
.detail .cover .thumb { width: 92px; height: 120px; flex: none; }
.detail .cover .actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.detail .cover .btn { justify-content: flex-start; }
.detail .cover .act-row { display: flex; gap: 6px; }
.detail .cover .act-row .btn { flex: none; }
.detail .cover .act-row .btn:first-child { flex: 1; }
.detail .cover .btn.icon { justify-content: center; width: 32px; }
.detail .cover .btn.icon svg.i { stroke-width: 2.4; }
.detail .title-main { font: 600 19px/1.45 var(--serif-zh); margin: 18px 0 4px; outline: 0; border-radius: 4px; }
.detail .title-sub { font: italic 14px/1.5 var(--serif-en); color: var(--ink-2); margin: 0 0 12px; outline: 0; border-radius: 4px; }
.detail [contenteditable]:hover { box-shadow: 0 0 0 4px var(--accent-soft); background: var(--accent-soft); }
.detail [contenteditable]:focus { box-shadow: 0 0 0 4px var(--accent-soft-2); background: var(--accent-soft-2); }
.kv { display: grid; grid-template-columns: 58px 1fr; gap: 6px 10px; font-size: 13px; margin: 14px 0; }
.kv > span:nth-child(odd) { color: var(--ink-3); }
.kv [contenteditable] { outline: 0; border-radius: 3px; min-height: 1.4em; }
.detail h4 { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--ink-3); margin: 20px 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags input { border: 0; outline: 0; background: none; font-size: 12.5px; width: 90px; height: 22px; color: var(--ink); }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag-suggest button { font-size: 11.5px; color: var(--ink-3); padding: 1px 7px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--rule); }
.tag-suggest button:hover { color: var(--ink); }
.abstract { font: 13.5px/1.85 var(--serif-zh); color: var(--ink-2); max-height: 13em; overflow: hidden; position: relative; }
.abstract.open { max-height: none; }
.abstract:not(.open)::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3em; background: linear-gradient(transparent, var(--surface)); }
.linkish { font-size: 12.5px; color: var(--accent); margin-top: 4px; }
.jobbox { padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--ink-2); }
.jobbox .bar { height: 4px; border-radius: 2px; background: var(--rule); margin: 8px 0 10px; overflow: hidden; }
.jobbox .bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.jobbox .row2 { display: flex; gap: 6px; flex-wrap: wrap; }
.jobbox .err { color: var(--danger); font-size: 12.5px; margin: 6px 0; word-break: break-all; }
.counts { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.counts b { font: 600 18px/1 var(--ui); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); display: block; margin-bottom: 4px; }
.pnote { font: 13.5px/1.8 var(--serif-zh); color: var(--ink-2); white-space: pre-wrap; max-height: 10em; overflow: hidden; }

/* 拖放、导入、设置 */
.drop-overlay { position: fixed; inset: 10px; z-index: 85; border: 2px dashed var(--accent); border-radius: 18px; background: color-mix(in srgb, var(--bg) 88%, transparent); display: grid; place-items: center; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.drop-overlay.on { opacity: 1; }
.drop-overlay .big { font: 600 26px/1.4 var(--serif-zh); color: var(--accent); }
.dropzone { border: 1.5px dashed var(--rule-2); border-radius: 12px; padding: 26px 18px; text-align: center; color: var(--ink-2); cursor: pointer; }
.dropzone:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.dropzone .big { font-size: 15px; margin-bottom: 4px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.inline { display: flex; gap: 8px; }

@media (max-width: 1100px) {
  .lib, .lib.has-detail { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .side { display: none; }
  .lib > .main { grid-column: 2; }  /* 侧栏 display:none 后不占格子，不钉住的话 main 会掉进 0 宽的第一列，整页空白 */
  .lib.has-detail .detail { position: fixed; right: 0; top: var(--bar-h); bottom: 0; width: min(400px, 100vw); box-shadow: var(--shadow-lg); z-index: 20; }
}
@media (max-width: 640px) {
  .topbar .search { margin-left: 8px; width: auto; flex: 1; }
  .topbar .search kbd, #importBtn span { display: none; }
  .row { grid-template-columns: 40px minmax(0, 1fr); }
  .row .side-info { display: none; }
  .thumb { width: 40px; height: 52px; }
  .list-head { padding: 14px 16px 10px; }
  .list { padding: 0 6px 60px; }
}

/* 顶栏引擎状态 */
.engine-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px; font-size: 12.5px; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule); max-width: 240px; }
.engine-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engine-chip:hover { color: var(--ink); background: var(--accent-soft); }
.engine-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.engine-chip.bad { color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent); }
.engine-chip.bad .dot { background: var(--danger); }

/* 首次使用 */
.welcome { max-width: 620px; margin: 56px auto 40px; padding: 0 20px; }
.welcome .hero { width: 56px; height: 56px; display: block; }
.welcome h2 { font: 600 26px/1.4 var(--serif-zh); margin: 18px 0 8px; letter-spacing: .02em; }
.welcome .sub { color: var(--ink-2); font-size: 14.5px; line-height: 1.8; margin: 0 0 26px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
.steps li::before { content: counter(s); grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--ui); color: var(--accent); background: var(--accent-soft-2); }
.steps li.done::before { content: "✓"; color: #fff; background: var(--ok); }
.steps li b { font-size: 14.5px; }
.steps li span { grid-column: 2; font-size: 13px; color: var(--ink-3); display: block; }
.steps li span .spin { display: inline-block; margin-right: 4px; vertical-align: -2px; }
.steps li .btn { grid-column: 3; grid-row: 1 / 3; }
.welcome .try { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* 设置 */

/* 导入选项 */
.imp-opts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.imp-opts .check { margin: 0; }
.imp-opts[hidden] { display: none; }
.imp-lbl { font-size: 13px; color: var(--ink-3); min-width: 3em; }
#impModel { width: auto; max-width: 340px; height: 30px; font-size: 13px; }
#impTarget { width: auto; height: 30px; font-size: 13px; margin-left: -4px; }  /* 紧跟在“翻译成”后面 */
#impTarget[hidden] { display: none; }
.imp-opts.dim { opacity: .4; pointer-events: none; }  /* 先不处理：范围用不上，留着位置不让对话框跳 */
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.first-n { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.first-n .input { width: 64px; height: 28px; }
.first-n[hidden] { display: none; }

/* 顶栏问号（js/library/help.js）：版本和更新放最上面，下面四块是遇到问题时要找的东西 */
.help-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.help-head .hero { width: 44px; height: 44px; }
.help-head h2 { margin: 0 0 2px; font-family: var(--ui); }
.help-btn { position: relative; }
.help-btn .help-dot { display: none; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.help-btn.has-update .help-dot { display: block; }
.help-update { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.help-update .check { margin: 10px 0 0; font-size: 13px; }
.hu-row { display: flex; align-items: center; gap: 12px; }
.hu-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.hu-dot.new { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hu-dot.fail { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); }
.hu-dot.busy { background: var(--ink-3); }
.hu-text .hu-fail { color: var(--danger); }
.hu-text { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.hu-text b { font-weight: 600; }
.hu-text .hint { font-size: 12.5px; }
.help-h { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; color: var(--ink-3); margin: 18px 0 8px; }
.help-faq details { border-top: 1px solid var(--rule); }
.help-faq details:last-child { border-bottom: 1px solid var(--rule); }
.help-faq summary { list-style: none; cursor: pointer; padding: 11px 26px 11px 2px; position: relative; font-size: 14px; font-weight: 500; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 18px; color: var(--ink-3); }
.help-faq details[open] summary::after { content: "−"; }
.help-faq summary:hover { color: var(--accent); }
.help-faq p { margin: 0 0 12px; padding-right: 26px; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.help-faq .linkish { font-size: 13.5px; }
.help-ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }

@media (max-width: 760px) {
  .engine-cards { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .engine-chip { display: none; }
  .steps li { grid-template-columns: 30px 1fr; }
  .steps li .btn { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* 侧栏：最近阅读 */
.side a.recent { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.side a.recent span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side a.recent em { font-style: normal; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side a.recent:hover { background: var(--accent-soft); color: var(--ink); }
.side button svg.i { color: var(--ink-3); flex: none; }
.side button.on svg.i { color: var(--accent); }
@media (min-width: 1101px) {
  .lib { grid-template-columns: var(--side-w, 248px) minmax(0, 1fr) 0; }
  .lib.has-detail { grid-template-columns: var(--side-w, 248px) minmax(0, 1fr) 400px; }
}

/* 列表行上的“+ 标签” */
.row .add-tag { height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule-2); opacity: 0; transition: opacity .12s; }
.row:hover .add-tag, .row.on .add-tag { opacity: 1; }
.row .add-tag:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* 详情：顶上一条标题栏，关闭按钮放显眼处 */
.detail-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 12px 0 24px; background: var(--surface); border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }
.detail-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-2); background: var(--bg); box-shadow: inset 0 0 0 1px var(--rule-2); }
.detail-close:hover { color: var(--ink); background: var(--accent-soft-2); }
.detail-inner { padding-top: 18px; }
.detail .tags { margin: 2px 0 12px; }
.detail .tags input { width: 120px; }
.detail .seg { margin-bottom: 4px; }
.mine-line { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

/* 侧栏（sidebar.js）：置顶 / 分类 / 最近阅读 */
.side h3 { display: flex; align-items: center; justify-content: space-between; }
.side .h-add { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-3); }
.side .h-add:hover { background: var(--accent-soft-2); color: var(--ink); }
.side .sgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.side { overflow-x: hidden; }
.side .srow { box-sizing: border-box; position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 8px 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; user-select: none; }
.side .srow svg.i { color: var(--ink-3); flex: none; }
.side .srow .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .srow .n, .side .srow em { font-size: 12px; font-style: normal; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side .srow .more { display: none; width: 22px; height: 22px; border-radius: 6px; place-items: center; color: var(--ink-3); flex: none; margin-right: -4px; }
.side .srow:hover { background: var(--accent-soft); color: var(--ink); }
.side .srow:hover .more { display: grid; }
.side .srow:hover .n, .side .srow:hover em { display: none; }
.side .srow .more:hover { background: var(--surface); color: var(--ink); }
.side .srow.on { background: var(--accent-soft-2); color: var(--ink); font-weight: 500; }
.side .srow.on svg.i { color: var(--accent); }
.side .srow.paper svg.i { color: var(--accent); }
.side .srow.editing { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); cursor: text; }  /* 和普通行同高同缩进，只多一圈细框 */
.side .side-input { flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); caret-color: var(--accent); }
.side .hint-row, .side .toggle-more { color: var(--ink-3); font-size: 12.5px; }
.side .toggle-more { height: 28px; }  /* 和上面的论文标题左对齐 */
.side.dragging [data-drop-zone] .srow:is([data-cat], [data-view="starred"], [data-view="reading"], [data-view="unread"], [data-view="done"]) { outline: 1px dashed var(--rule-2); outline-offset: -1px; }
.side .srow.drop { background: var(--accent-soft-2); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--ink); }

/* 列表行上的分类、详情里的分类开关 */
.row .chip.cat { display: inline-flex; align-items: center; gap: 3px; }
.row .chip.cat svg { width: 11px; height: 11px; color: var(--ink-3); }
.row[draggable="true"] { -webkit-user-drag: element; }
.detail .cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 12px; }
.detail .catchip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12.5px; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--rule-2); }
.detail .catchip svg { width: 12px; height: 12px; }
.detail .catchip:hover { color: var(--ink); }
.detail .catchip.on { color: var(--accent); background: var(--accent-soft-2); box-shadow: inset 0 0 0 1px var(--accent); }
.detail .catchip.add { border: 0; background: none; cursor: pointer; box-shadow: none; outline: 1px dashed var(--rule-2); outline-offset: -1px; }
.detail .catchip.add:hover { color: var(--accent); outline-color: var(--accent); }
.detail #catInput { border: 0; outline: 0; background: var(--surface); font-size: 12.5px; width: 150px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.detail #catInput[hidden], .detail .catchip[hidden] { display: none; }
.lib { position: relative; transition: none; }
.side-grip { position: absolute; top: var(--bar-h); bottom: 0; left: calc(var(--side-w, 248px) - 3px); width: 6px; cursor: col-resize; z-index: 5; }
.side-grip:hover, body.resizing .side-grip { background: linear-gradient(90deg, transparent 2px, var(--accent) 2px, var(--accent) 4px, transparent 4px); }
body.resizing { cursor: col-resize; user-select: none; }
@media (max-width: 1100px) { .side-grip { display: none; } }
.side.dragging .sgroup[data-drop-zone] { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); border-radius: 10px; }
.side.dragging .srow[data-add] { color: var(--accent); }
.row[draggable="true"] { cursor: grab; }
/* 回收站 */
.side-trash { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--rule); }
.trash-list { max-height: 60vh; overflow-y: auto; margin: 4px -4px 0; }
.trash-row { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.trash-row:last-child { border-bottom: 0; }
.trash-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trash-t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-t small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#trashDlg .actions .grow { flex: 1; }

/* 新版本提示（js/library/update.js） */
.update-chip { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.update-chip .dot { background: var(--accent); }
.update-notes { max-height: 52vh; overflow: auto; margin: 6px 0 10px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; line-height: 1.65; }
.update-notes h4 { margin: 10px 0 4px; }
.update-notes p { margin: 6px 0; }
.update-notes ul { margin: 4px 0; padding-left: 20px; }
.up-status { margin: 0 0 12px; }
.up-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 6px; }
.up-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.up-foot { align-items: center; }
.up-foot .hint { margin: 0 auto 0 0; }
.up-err { color: var(--danger, #c0392b); }
@media (max-width: 760px) { .update-chip { display: inline-flex; } }
.update-chip[hidden] { display: none !important; }

/* 换界面语言时整页重新加载：新旧两页淡入淡出，不白闪（只在文献库页之间生效） */
@view-transition { navigation: auto; }
