:root {
  --bg: #f6f1e7;
  --surface: #fffaf1;
  --surface-2: #efe6d4;
  --text: #2b2620;
  --muted: #7d715f;
  --line: #e3d8c3;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fbe3d2;
  --hl: #ffe4a0;
  --danger: #b42318;
  --ok: #2f7d4f;
  --shadow: 0 1px 2px rgba(70, 45, 10, .06), 0 10px 30px rgba(70, 45, 10, .08);
  --radius: 14px;
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161411; --surface: #1f1c18; --surface-2: #2a2621; --text: #ece5d8; --muted: #a59a88;
    --line: #36302a; --accent: #f0874a; --accent-ink: #1a1009; --accent-soft: #3b2617; --hl: #4d3c12;
    --danger: #f27a6e; --ok: #6fcf97; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161411; --surface: #1f1c18; --surface-2: #2a2621; --text: #ece5d8; --muted: #a59a88;
  --line: #36302a; --accent: #f0874a; --accent-ink: #1a1009; --accent-soft: #3b2617; --hl: #4d3c12;
  --danger: #f27a6e; --ok: #6fcf97; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- 通用 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0;
  background: transparent; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
select {
  height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  max-width: 100%;
}

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.brand svg { width: 30px; height: 30px; }
.brand svg rect:first-child { fill: var(--accent); }
.brand svg path { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; }
.brand svg rect + path ~ rect { fill: var(--accent-ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.status-pill {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
}
.status-pill.ready { color: var(--ok); }
.status-pill.ready::before { content: "● "; }
.status-pill.loading::before { content: "◌ "; }
.status-pill.error { color: var(--danger); }

/* ---------- 书架 ---------- */
.shelf { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
.empty { text-align: center; padding: 70px 16px; border: 2px dashed var(--line); border-radius: 20px; color: var(--muted); }
.empty h2 { color: var(--text); margin: 10px 0 6px; font-size: 20px; }
.empty-icon { font-size: 44px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px; }
.book-card { position: relative; cursor: pointer; }
.cover {
  aspect-ratio: 3 / 4; border-radius: 6px 12px 12px 6px; padding: 16px 14px; display: flex; flex-direction: column;
  justify-content: space-between; color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s ease;
}
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: rgba(0, 0, 0, .18); }
.book-card:hover .cover { transform: translateY(-3px); }
.cover-title { font-size: 19px; font-weight: 700; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); word-break: break-all; }
.cover-author { font-size: 12px; opacity: .85; }
.book-meta { margin-top: 10px; font-size: 13px; }
.book-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 6px 0 4px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.book-del {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .35); color: #fff; opacity: 0; transition: opacity .15s; font-size: 16px; line-height: 1;
}
.book-card:hover .book-del, .book-del:focus { opacity: 1; }
@media (hover: none) { .book-del { opacity: .8; } }

.exports-section { margin-top: 44px; }
.lan-hint { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lan-hint:empty { display: none; }
.lan-hint b { color: var(--text); font-weight: 600; user-select: all; }
.exports-section h3 { font-size: 16px; margin: 0 0 12px; }

/* ---------- 导出任务 ---------- */
.job-list { display: grid; gap: 10px; }
.job { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.job-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.job-name { font-weight: 600; }
.job-state { font-size: 12.5px; margin-left: auto; }
.job-state.done { color: var(--ok); }
.job-state.error { color: var(--danger); }
.job .bar { height: 6px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.job-actions a.btn { text-decoration: none; height: 32px; }
.job-actions .btn { height: 32px; font-size: 13.5px; }
.job details { margin-top: 8px; font-size: 13px; }
.job details summary { cursor: pointer; color: var(--muted); }
.job details ol { margin: 6px 0 0; padding-left: 22px; max-height: 200px; overflow: auto; }
.job details a { color: var(--accent); text-decoration: none; }
.job-err { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ---------- 听书页 ---------- */
.reader-bar { gap: 6px; }
.reader-title { min-width: 0; flex: 1; line-height: 1.3; }
.reader-title > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#book-title { font-weight: 700; }
.reader-sub { font-size: 12.5px; color: var(--muted); }
#pos-label:not(:empty)::before { content: " · "; }
.player-status:not(:empty) { margin-left: 8px; color: var(--accent); }
.player-status.error { color: var(--danger); }

/* 顶栏里的播放控制 */
.player-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg { width: 17px; height: 17px; }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; margin: 0 3px; flex: none;
}
.play-btn:hover { filter: brightness(1.06); }
.play-btn svg { width: 17px; height: 17px; fill: currentColor; }
.play-btn .i-pause, .playing .play-btn .i-play { display: none; }
.playing .play-btn .i-pause { display: block; }
.settings-wrap { position: relative; margin-left: 4px; }
#settings-btn[aria-expanded="true"] { background: var(--surface-2); }
#settings-btn.timer::after {  /* 开了定时关闭时，按钮右上角亮个小点提醒 */
  content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
#settings-btn { position: relative; }
.settings-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px; padding: 12px 14px; display: grid; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.settings-pop label { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.settings-pop select { width: 100%; color: var(--text); }
.pop-left .settings-pop { left: 0; right: auto; }
#text-btn { font-weight: 700; padding: 0 10px; font-family: Georgia, "Times New Roman", serif; }
#text-btn[aria-expanded="true"] { background: var(--surface-2); }

/* 「Aa」调整文字面板 */
.tp-row { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stepper, .seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button, .seg button {
  flex: 1; height: 30px; border: 0; background: var(--surface); cursor: pointer; font-size: 13px; color: var(--text);
}
.seg button + button, .stepper b { border-left: 1px solid var(--line); }
.stepper b { flex: 1.2; display: grid; place-items: center; font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); }
.stepper button:hover, .seg button:hover { background: var(--surface-2); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg[data-key="font"] button[data-v="serif"] { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif; }
.seg[data-key="font"] button[data-v="kai"] { font-family: "LXGW WenKai", "KaiTi", "STKaiti", "Kaiti SC", serif; }
.tp-reset { justify-self: end; border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.tp-reset:hover { color: var(--accent); }
.tp-sep { height: 1px; background: var(--line); margin: 2px 0; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0;
  font-size: 13px; font-weight: 600; display: grid; place-items: center;
}
.swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch.auto { background: linear-gradient(135deg, #f6f1e7 50%, #161411 50%); color: #c2410c; }
/* RGB 调色：先选「文字 / 背景」，再拖 R G B 三根 0–255 的滑条，滑条底色就是这个通道 0→255 的渐变 */
#rgb-target button::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px;
  background: var(--chip, transparent); border: 1px solid rgba(128, 128, 128, .6);
}
.rgb { display: grid; gap: 7px; padding-left: 48px; }
.rgb label { display: grid; grid-template-columns: 14px 1fr 54px; align-items: center; gap: 8px; }
.rgb b { font: 600 12px Consolas, "Courier New", monospace; color: var(--muted); }
.rgb input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 0; border-radius: 6px;
  border: 1px solid rgba(128, 128, 128, .45); outline: none; cursor: pointer; background: #888;
}
.rgb input[type="range"]::-moz-range-track { background: transparent; border: 0; }
.rgb input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.rgb input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #444; box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.rgb input[type="number"] {
  width: 54px; height: 28px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  text-align: center; font: 13px Consolas, "Courier New", monospace;
}
.rgb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#rgb-hex { font: 12.5px Consolas, "Courier New", monospace; color: var(--muted); }
#rgb-pick {
  width: 38px; height: 26px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer;
}
.tp-hint { font-size: 12.5px; color: var(--danger); }
/* ⚙ 面板里的「进入阅读模式」 */
.pop-btn { height: 32px; justify-content: center; font-size: 13.5px; color: var(--text); }
.pop-note { margin: -2px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.settings-pop { max-height: calc(100vh - 90px); overflow: auto; }

/* 阅读区配色：默认跟随系统深浅色；在「Aa」里选了文字/背景颜色，就用内联变量覆盖 --read-fg / --read-bg，
   目录、悬停、高亮这些颜色都从这两个色混出来，保证搭配得上 */
#reader-view {
  --read-bg: var(--bg); --read-fg: var(--text); --read-hl: var(--hl);
  --read-muted: color-mix(in srgb, var(--read-fg) 58%, var(--read-bg));
  --read-rule: color-mix(in srgb, var(--read-fg) 14%, var(--read-bg));
  --read-hover: color-mix(in srgb, var(--read-fg) 8%, var(--read-bg));
  min-height: 100vh; background: var(--read-bg);
}
.reader-body { display: flex; max-width: 1180px; margin: 0 auto; }
.toc {
  width: 280px; flex: none; position: sticky; top: 63px; height: calc(100vh - 63px); overflow: auto;
  border-right: 1px solid var(--read-rule); padding: 0 0 24px;
}
.toc-head {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px;
  font-size: 13px; font-weight: 600; color: var(--read-muted); position: sticky; top: 0; z-index: 1; background: var(--read-bg);
}
.toc-head .icon-btn { color: var(--read-fg); }
.toc-head .icon-btn:hover { background: var(--read-hover); }
.toc-collapsed .toc { display: none; }  /* 电脑上收起目录 */
#toc-btn.active { background: var(--surface-2); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li {
  padding: 7px 18px; cursor: pointer; font-size: 14px; color: var(--read-muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; border-left: 3px solid transparent;
}
.toc li:hover { color: var(--read-fg); background: var(--read-hover); }
.toc li.active {
  color: var(--accent); border-left-color: var(--accent); font-weight: 600;
  background: color-mix(in srgb, var(--accent) 14%, var(--read-bg));
}
.toc-scrim { display: none; }

/* 正文的字号、行距、字体、页宽可以在「Aa」里调，调过的值以内联变量覆盖这里的默认值 */
.text {
  --read-size: 18.5px; --read-line: 2; --read-width: 760px; --read-font: var(--font);
  flex: 1; min-width: 0; max-width: var(--read-width); margin: 0 auto; padding: 28px 28px 80px;
  font-size: var(--read-size); line-height: var(--read-line); font-family: var(--read-font); color: var(--read-fg);
}
.text h2 { font-size: 1.25em; line-height: 1.5; margin: 8px 0 26px; cursor: pointer; }  /* 跟着正文字号一起变 */
.text p { margin: 0 0 .9em; text-indent: 2em; }
.text span { cursor: pointer; border-radius: 4px; transition: background .2s; }
.text span:hover { background: var(--read-hover); }
.text .cur, .text .cur:hover { background: var(--read-hl); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.text h2.cur { color: var(--accent); background: none; }
/* 阅读模式：顶栏收起，正文铺满；一个半透明小竖条飘在文字上面（上一页 / 播放 / 下一页 / 退出），按住可拖动 */
.reading .reader-bar { display: none; }
.reading .toc { top: 0; height: 100vh; }
/* 阅读模式下点正文不会开始朗读，所以也不显示手形光标和悬停底色 */
.reading .text span, .reading .text h2 { cursor: auto; }
.reading .text span:hover:not(.cur) { background: none; }
/* 阅读模式下，屏幕最下面只露出半截的那一行先遮住，翻到下一页再完整显示（位置由脚本按行算好） */
.page-mask { position: fixed; bottom: 0; z-index: 30; background: var(--read-bg); pointer-events: none; }
#read-mode-btn { margin-left: 2px; }
.read-pad {
  display: none; position: fixed; z-index: 35; top: 50%; transform: translateY(-50%); width: 40px;
  flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 20px;
  background: color-mix(in srgb, var(--read-fg) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--read-fg) 10%, transparent);
  touch-action: none; user-select: none; -webkit-user-select: none; transition: background .2s, opacity .2s;
  opacity: .45;  /* 飘在文字上面，平时淡一点，底下的字透得过来；按住时才变清楚 */
}
.reading .read-pad { display: flex; }
.read-pad.right { right: 4px; }
.read-pad.left { left: 4px; }
.read-pad:hover, .read-pad:active, .read-pad.dragging { opacity: 1; background: color-mix(in srgb, var(--read-bg) 80%, var(--read-fg) 12%); }
.read-pad.dragging { transition: none; cursor: grabbing; box-shadow: var(--shadow); }
.rp-btn {
  width: 36px; height: 40px; border: 0; border-radius: 16px; background: none; color: var(--read-fg);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.rp-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rp-btn:active { background: color-mix(in srgb, var(--read-fg) 14%, transparent); }
.rp-play svg { width: 18px; height: 18px; fill: var(--accent); stroke: none; }
.rp-play .i-pause, .playing .rp-play .i-play { display: none; }
.playing .rp-play .i-pause { display: block; }
.rp-exit { height: 32px; }
.rp-exit svg { width: 16px; height: 16px; stroke-width: 2; opacity: .8; }
/* 下一章自动接在下面：章与章之间一条细线隔开 */
.text .ch + .ch { margin-top: 3em; padding-top: 2.4em; border-top: 1px solid var(--read-rule); }
.book-end { margin: 3em 0 1em; text-align: center; font-size: 14px; color: var(--read-muted); letter-spacing: .3em; }

@media (max-width: 860px) {
  .toc-collapsed .toc { display: block; }  /* 手机上目录是抽屉，不受电脑上「收起」的影响 */
  .toc {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--read-bg);
    transform: translateX(-100%); transition: transform .2s ease; border-right: 1px solid var(--read-rule); padding-top: 0;
  }
  .toc.open { transform: none; box-shadow: var(--shadow); }
  .toc-head { padding: 10px 8px 10px 18px; font-size: 15px; font-weight: 700; color: var(--read-fg); }
  .toc-scrim.open { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .35); }
  .text { padding: 20px 18px 60px; --read-size: 18px; }
}
/* 窄屏：顶栏放不下，播放控制换到第二行居中 */
@media (max-width: 700px) {
  .reader-bar { flex-wrap: wrap; row-gap: 4px; }
  .player-ctl { order: 10; width: 100%; justify-content: center; }
  .settings-pop { position: fixed; left: 16px; right: 16px; top: auto; width: auto; margin-top: 8px; }
}
@media (max-width: 520px) {
  #export-btn { padding: 0 10px; }
  .text { --read-size: 17px; }
  .status-pill { max-width: 38vw; }
}

/* ---------- 导出对话框 ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: var(--text);
  width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 12, 4, .45); }
.dlg { padding: 18px 20px 20px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; }
.dlg-head h3 { margin: 0; font-size: 18px; }
.dlg p { margin: 4px 0 14px; }
.field-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.field-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); flex: 1; min-width: 200px; }
.field-row select { width: 100%; height: 36px; color: var(--text); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.quick button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-size: 13px; }
.quick button:hover { border-color: var(--accent); color: var(--accent); }
.estimate { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.8; }
.estimate b { color: var(--accent); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 16px 0 6px; }
#dlg-job-list:not(:empty) { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- 登录页 ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(360px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 26px 24px 20px;
}
.login-brand { justify-content: center; margin-bottom: 18px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.login-form input {
  height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
  font-size: 16px;  /* 16px 以下 iPhone 点输入框会自动放大页面 */
}
.login-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.login-form .btn { height: 42px; justify-content: center; font-size: 15px; }
.login-note { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13.5px; line-height: 1.6; }
.login-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 13.5px; color: var(--danger); text-align: center; }
/* 书架顶栏：当前用户、退出登录 */
.user-chip { font-size: 13px; color: var(--muted); white-space: nowrap; }
.user-chip b { color: var(--text); font-weight: 600; }

/* ---------- 其他 ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent);
  backdrop-filter: blur(2px); pointer-events: none;
}
.drop-overlay div { padding: 22px 34px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--accent); font-size: 18px; font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 200; background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: var(--shadow);
}
.toast.error { background: var(--danger); color: #fff; }
