@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

:root {
  --bg: #f5f6f8;
  --page: #ffffff;
  --ink: #1f2329;
  --muted: #8f959e;
  --line: #e5e6eb;
  --acc: #1a5fb4;
  --acc-soft: #e8f1fb;
  --side-bg: #f5f7fa;
  --danger: #d93026;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --side-font: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "SimHei", sans-serif;
  --brand-font: "Great Vibes", "Segoe Script", "Apple Chancery", cursive;
  --mono: "Cascadia Code", "Sarasa Mono SC", ui-monospace, monospace;
  --side: 240px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--acc); }
.brand {
  margin: 0;
  font-family: var(--brand-font);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.1;
  color: #111;
  font-style: normal;
}
.muted { color: var(--muted); }
.hidden { display: none !important; }
.mobile-only { display: none; }
.m-compose, .m-notes, .m-tabbar, .m-overlay, .m-sheet, .m-sheet-mask, .m-ai-card, .m-fab-tools, .m-doc-meta { display: none; }
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 6px; padding: .4rem .65rem; font: inherit; cursor: pointer;
}
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: .25rem .5rem; font-size: .84rem; }
.btn:disabled { opacity: .55; cursor: default; }

body.auth {
  display: grid; place-items: start center; min-height: 100vh;
  padding: 1rem .75rem 2rem;
  background: var(--bg);
}
.auth-card {
  width: min(340px, 100%); background: var(--page); border: 1px solid var(--line);
  border-radius: 8px; padding: .85rem .9rem 1rem;
  margin-top: 1.2vh;
  font-size: .88rem;
}
.auth-card h1 { margin: .1rem 0 .55rem; font-size: 1.05rem; font-weight: 700; color: #111; }
.auth-card label {
  display: block; margin: .45rem 0 .15rem; color: var(--muted); font-size: .78rem;
}
.auth-card input {
  width: 100%; padding: .4rem .5rem; border: 1px solid var(--line);
  border-radius: 5px; font: inherit; font-size: .88rem;
}
.auth-card button[type=submit] {
  margin-top: .75rem; width: 100%; padding: .45rem .55rem; border: 0; border-radius: 5px;
  background: #111; color: #fff; font: inherit; font-size: .88rem; cursor: pointer;
}
.err { color: var(--danger); font-size: .82rem; margin: .35rem 0; }
.ok { color: var(--acc); font-size: .82rem; margin: .35rem 0; }
.auth-links { margin-top: .65rem; font-size: .8rem; }

body.app {
  display: grid;
  grid-template-columns: var(--side) 1fr;
  height: 100vh;
  overflow: hidden;
  position: relative;
}
body.app.side-collapsed {
  grid-template-columns: 0 1fr;
}
body.app.side-collapsed .sidebar {
  width: 0; min-width: 0; border: 0; overflow: hidden; padding: 0; opacity: 0; pointer-events: none;
}
.side-expand {
  position: fixed; left: 10px; top: 12px; z-index: 8;
  width: 36px; height: 36px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: #333; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.side-expand.hidden { display: none !important; }
.sidebar {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--side-bg);
  height: 100vh;
  overflow: hidden;
  transition: opacity .15s;
  font-family: var(--side-font);
}
.side-head {
  padding: .85rem .7rem .7rem;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand icons"
    "search search";
  align-items: center;
  gap: .4rem .4rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(165deg, #2a2f36 0%, #3a414b 55%, #32383f 100%);
  border-bottom: 1px solid #1c2026;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.side-head .brand { color: #f5f6f8; }
.side-head .icon-btn { color: #d7dbe0; }
.side-head .icon-btn:hover,
.side-head .icon-btn.on {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.side-head .search-wrap input {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .18);
  color: #f0f2f5;
}
.side-head .search-wrap input::placeholder { color: rgba(240, 242, 245, .55); }
.side-head .search-wrap input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .14);
}
.side-head .brand {
  grid-area: brand;
  font-size: 1.85rem;
  padding-top: .1rem;
}
.empty .brand { font-size: 2.6rem; margin-bottom: .35rem; }
.auth-card .brand { font-size: 1.65rem; margin-bottom: 0; line-height: 1; }
.share-top .brand { font-size: 1.75rem; margin-bottom: .2rem; }
.icon-bar {
  grid-area: icons;
  display: flex;
  gap: .15rem;
}
.icon-btn {
  width: 32px; height: 32px; border: 0; border-radius: 6px;
  background: transparent; color: #333; cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:hover, .icon-btn.on { background: #e8ecf0; color: #111; }
.new-wrap { position: relative; }
.new-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 132px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: .3rem;
  box-shadow: 0 8px 24px rgba(20, 24, 30, .12);
}
.new-menu.hidden { display: none !important; }
.new-menu-item {
  display: block; width: 100%; text-align: left; border: 0;
  background: transparent; border-radius: 6px;
  padding: .5rem .65rem; font: inherit; font-size: .88rem;
  color: #111; cursor: pointer;
}
.new-menu-item:hover { background: #f0f2f5; }
.search-wrap { grid-area: search; }
.search-wrap input {
  width: 100%; padding: .4rem .55rem; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; font-size: .88rem; background: #fff;
}

.tree {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .55rem .35rem 1rem;
  min-height: 0;
  background: #fafbfc;
}
.folder-block { margin-bottom: .35rem; }
.folder-head {
  display: flex; align-items: center; gap: .35rem;
  width: 100%; border: 0; background: transparent;
  padding: .42rem .4rem; border-radius: 6px;
  cursor: pointer; font-family: var(--side-font);
  color: #5c6370; font-size: 1.02rem; font-weight: 600;
}
.folder-head:hover { background: #e8ecf0; color: #3d4450; }
.folder-ico-wrap {
  flex: none; width: 18px; height: 18px;
  display: grid; place-items: center;
  color: #7a8494;
}
.folder-head:hover .folder-ico-wrap { color: #5c6b7a; }
.folder-ico { display: block; }
.folder-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { flex: none; opacity: .55; font-weight: 500; font-size: .78rem; color: #8b929a; }
.overview-item .t { font-style: normal; color: #5c6370 !important; font-weight: 500 !important; }
.overview-item.active .t { color: var(--acc) !important; }
.overview-under { margin-top: .15rem; }
.ov-side-note {
  display: block; width: 100%; text-align: left; border: 0;
  background: transparent; padding: .28rem .45rem; margin: .15rem 0 0;
  border-radius: 4px; font-family: var(--side-font);
  font-size: .9rem; font-weight: 500;
  color: #111; cursor: pointer;
}
.ov-side-note:hover { background: #eef1f5; color: #000; }
.rename-input {
  flex: 1; min-width: 0; width: 100%;
  margin: .15rem .35rem; padding: .35rem .45rem;
  border: 1px solid var(--acc); border-radius: 6px;
  font: inherit; font-size: .88rem; font-weight: 400; color: #1f2329;
  outline: none; background: #fff;
}
.note-block { margin-bottom: .15rem; padding-left: .15rem; }
.note-row {
  display: flex; align-items: center;
  border-radius: 6px;
}
.note-row.selected { background: #e8f1fb; }
.note-item {
  display: flex; align-items: center; gap: .25rem;
  flex: 1; min-width: 0;
  width: 100%; text-align: left; border: 0;
  background: transparent; border-radius: 6px; padding: .4rem .4rem .4rem .55rem; cursor: pointer;
  font-family: var(--side-font);
  color: #111;
  -webkit-touch-callout: none; user-select: none;
}
.note-item:hover { background: #e8ecf0; color: #111; }
.note-row.selected .note-item:hover { background: transparent; }
.note-item.active {
  background: transparent;
  color: var(--acc);
}
.note-item .t {
  flex: 1; min-width: 0;
  font-size: .92rem; font-weight: 500;
  color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.note-item.active .t { font-weight: 500; color: var(--acc); }
.kp-under {
  margin: 0 0 .35rem .15rem;
  padding: 0 0 .2rem .55rem;
  border-left: 2px solid #e5e6eb;
}
.kp-under[hidden] { display: none !important; }
.kp-under .kp-status {
  margin: 0 0 .25rem; padding-left: .45rem;
  font-size: .72rem; color: #9aa0a8;
}
.kp-under .kp-list {
  list-style: none; margin: 0; padding: 0;
}
.kp-under .kp-list li { margin: 0; }
.kp-under .kp-list a {
  display: block;
  padding: .38rem .45rem .38rem .55rem;
  border-radius: 0 6px 6px 0;
  border-left: 3px solid transparent;
  margin-left: -2px;
  color: #8b929a;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kp-under .kp-list a:hover { background: #eef1f5; color: #5c6370; }
.kp-under .kp-list a.active {
  color: var(--acc);
  background: var(--acc-soft);
  border-left-color: var(--acc);
  font-weight: 500;
}

.side-foot {
  display: flex; gap: .65rem; align-items: center; padding: .55rem .75rem;
  border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); flex-shrink: 0;
  background: #fafbfc;
}
.side-foot form { margin: 0; }
.linkish { border: 0; background: none; color: #333; cursor: pointer; font: inherit; padding: 0; }
.side-foot a { color: #333; text-decoration: none; }
.side-foot a:hover, .linkish:hover { color: var(--acc); }

/* 右侧抽屉：设置 / 备份 / 分享 / 账号 */
.panel-mask {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(20, 24, 30, .28);
}
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
  width: min(400px, 100%);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 28px rgba(0, 0, 0, .08);
  display: flex; flex-direction: column;
  transform: translateX(0);
  transition: transform .2s ease;
}
.side-panel.hidden { display: none !important; }
.panel-head {
  display: flex; align-items: center; gap: .35rem;
  padding: .55rem .65rem .45rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.panel-tabs {
  flex: 1; display: flex; gap: .15rem; flex-wrap: wrap; min-width: 0;
}
.panel-tab {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .82rem; padding: .28rem .45rem;
  border-radius: 5px; cursor: pointer;
}
.panel-tab:hover { color: #333; background: #f3f4f6; }
.panel-tab.active {
  color: #111; font-weight: 600; background: #eef1f5;
}
.panel-head .icon-btn {
  flex: none; width: 28px; height: 28px; font-size: 1.15rem; line-height: 1;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 5px;
}
.panel-head .icon-btn:hover { background: #f3f4f6; color: #111; }
.panel-msg {
  margin: 0; padding: .4rem .75rem; font-size: .8rem;
  border-bottom: 1px solid var(--line);
}
.panel-msg.ok { color: #1a7f37; background: #f0faf2; }
.panel-msg.err { color: var(--danger); background: #fef2f1; }
.panel-body {
  flex: 1; overflow-y: auto; padding: .55rem .85rem 1.4rem;
}
.panel-body .set-block:first-child { border-top: 0; padding-top: 0; margin-top: .2rem; }
.panel-body h2 { margin: 0 0 .35rem; font-size: .92rem; font-weight: 700; color: #111; }
.panel-intro { margin: 0 0 .35rem; font-size: .75rem; line-height: 1.35; color: var(--muted); }

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  max-width: min(92vw, 420px);
  padding: .72rem 1.05rem;
  border-radius: 10px;
  background: #1c2430;
  color: #fff;
  font-size: .88rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  text-align: center;
  word-break: break-word;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.app-toast.ok { background: #163a2a; }
.app-toast.err { background: #5c1d1d; }
.app-toast.hidden { display: none; }

.crypto-gate {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 24, 30, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.crypto-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.crypto-card h1 { margin: .35rem 0 .4rem; font-size: 1.15rem; }
.crypto-card label { display: block; margin: .35rem 0 .12rem; color: var(--muted); font-size: .75rem; }
.crypto-card input[type="password"],
.crypto-card input[type="text"] {
  width: 100%; padding: .4rem .55rem; border: 1px solid var(--line);
  border-radius: 5px; font: inherit; font-size: .9rem;
}
.recovery-key {
  margin: .5rem 0;
  padding: .65rem .7rem;
  background: #f5f6f8;
  border: 1px dashed #c5cad3;
  border-radius: 6px;
  font-size: .82rem;
  word-break: break-all;
  white-space: pre-wrap;
  user-select: all;
}

.workspace {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  background: #fff;
}
.empty {
  max-width: 420px; margin: 18vh auto; padding: 1rem; color: var(--muted);
}

.doc { min-height: 100%; }
.doc-toolbar {
  position: sticky; top: 0; z-index: 4;
  display: flex; flex-wrap: nowrap; gap: .35rem; align-items: center;
  min-height: 48px;
  padding: .35rem .65rem;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tb-back {
  flex: none;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--acc);
  font: inherit; font-size: 1.55rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.tb-back:active { background: var(--acc-soft); }
.crumb {
  flex: 1; color: var(--muted); font-size: .86rem; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumb strong { color: #111; font-weight: 700; }
.status {
  flex: none; font-size: .75rem; color: var(--muted);
  max-width: 6.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-actions {
  flex: none; display: flex; flex-wrap: nowrap; gap: .2rem; align-items: center;
}
.tb-edit {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: .38rem .75rem;
  font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer;
  min-height: 36px;
}
.tb-edit:active { background: #f3f4f6; }
.tb-edit.is-editing,
.tb-edit.primary {
  background: var(--acc); border-color: var(--acc); color: #fff;
}
.tb-edit.is-editing:active { filter: brightness(.95); }
.tb-icon {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); cursor: pointer;
  display: inline-grid; place-items: center; position: relative;
}
.tb-icon .tb-text { display: none; }
.tb-icon:active,
.tb-icon[aria-pressed="true"],
.tb-icon.on {
  background: var(--acc-soft); color: var(--acc);
}
.tb-more-wrap { position: relative; display: flex; align-items: center; }
.tb-more-menu {
  display: contents;
}
.tb-menu-item {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 6px; padding: .25rem .5rem; font: inherit; font-size: .84rem;
  cursor: pointer;
}
.tb-menu-item:hover { background: #f3f4f6; }
.tb-menu-item.danger { color: var(--danger); }
.tb-menu-item.star-on {
  color: #a67c00; border-color: #e6d59a; background: #fff8e6;
}
#btnMore { display: none; }

@media (min-width: 861px) {
  #btnShare.tb-icon {
    width: auto; min-height: 36px; height: 36px;
    padding: 0 .55rem; gap: .3rem;
    border: 1px solid var(--line); border-radius: 6px;
    grid-auto-flow: column; justify-content: center;
  }
  #btnShare.tb-icon .tb-text {
    display: inline; font-size: .84rem; font-weight: 550;
  }
  #btnShare.tb-icon.on {
    border-color: #b7d0ef; background: var(--acc-soft);
  }
  .tb-more-wrap { gap: .28rem; }
  .tb-menu-item { margin: 0; }
}

.doc-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.1rem 1.35rem 4rem;
  background: var(--page);
  min-height: calc(100vh - 48px);
}

.title-row {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  margin-bottom: .35rem;
}
.note-title {
  flex: 1; min-width: 0; width: auto; border: 0; background: transparent;
  font-size: clamp(1.55rem, 3.2vw, 2.05rem); font-weight: 800;
  padding: .15rem 0 .4rem; color: #111; line-height: 1.25;
}
.note-title:focus { outline: none; }
.copy-btn {
  flex: none;
  width: 32px; height: 32px;
  margin-top: .35rem;
  border: 0; border-radius: 6px;
  background: transparent;
  color: #8f959e;
  cursor: pointer;
  display: grid; place-items: center;
}
.copy-btn:hover { background: #f0f2f5; color: #1f2329; }
.copy-btn.ok { color: #1a5fb4; }
.copy-btn .hidden { display: none !important; }

.doc-read { min-height: 40vh; font-size: 1.05rem; color: #1f2329; }
.doc-read:empty::before {
  content: "正文为空。点「编辑正文」或粘贴资料。";
  color: var(--muted);
}
.doc-edit {
  display: block; width: 100%;
  min-height: calc(100vh - 280px);
  border: 0; padding: .2rem 0 2rem; margin: 0; resize: none;
  background: transparent; color: #111;
  font-family: var(--mono); font-size: 1rem; line-height: 1.65;
}
.doc-edit:focus { outline: none; }
.share-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem;
  padding: .45rem .9rem;
  border-bottom: 1px solid var(--line);
  background: #f8f9fb;
  font-size: .86rem;
  color: var(--muted);
  position: sticky; top: 48px; z-index: 3;
}
.share-bar.hidden { display: none !important; }
.share-bar .share-label { color: #111; font-weight: 650; flex: none; }
.share-bar a {
  color: var(--acc); word-break: break-all; flex: 1; min-width: 140px;
}
.share-bar .btn { flex: none; }

.prose { line-height: 1.75; color: #1f2329; }
.prose h1, .prose h2, .prose h3 { line-height: 1.3; scroll-margin-top: 3.5rem; color: #111; }
.prose h2 { font-size: 1.28rem; margin-top: 1.4rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.15rem; }
.prose pre { overflow: auto; padding: .85rem 1rem; background: #f5f6f8; border-radius: 8px; }
.prose code { font-family: var(--mono); font-size: .9em; }
.prose blockquote {
  margin: .85rem 0; padding-left: .9rem; border-left: 3px solid #c9cdd4; color: var(--muted);
}
.prose table { border-collapse: collapse; width: 100%; margin: .8rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: .4rem .55rem; }
.prose th { background: #f5f6f8; }
.prose .wikilink { color: var(--acc); }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: .7rem 0;
  display: block;
  background: #f5f6f8;
}

body.share {
  height: auto; overflow: auto;
  max-width: 820px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem;
  background: var(--page);
}
.share-top h1 { margin: .35rem 0 0; font-size: clamp(1.4rem, 4vw, 2rem); color: #111; }
.doc-summary, .share-ai {
  padding: 0 0 1rem; margin: 1rem 0; border-bottom: 1px solid var(--line);
}
.kp-list { margin: 0; padding-left: 1.2rem; }
.kp-list a { color: #4e5969; text-decoration: none; }
.kp-list a:hover { color: var(--acc); }

dialog {
  border: 1px solid var(--line); border-radius: 10px; padding: 0;
  width: min(720px, calc(100vw - 2rem));
}
dialog::backdrop { background: rgba(20, 24, 30, .35); }
.dlg { padding: 1rem 1.1rem 1.1rem; }
.dlg h2 { margin: 0 0 .4rem; font-size: 1.1rem; color: #111; }
.dlg pre {
  max-height: 50vh; overflow: auto; background: #f5f6f8; border: 1px solid var(--line);
  border-radius: 8px; padding: .8rem; white-space: pre-wrap; font-family: var(--mono); font-size: .88rem;
}
.dlg-actions { display: flex; justify-content: flex-end; gap: .45rem; margin-top: .8rem; }

.ctx-menu {
  position: fixed; z-index: 40;
  min-width: 180px; max-width: min(280px, 90vw);
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: .35rem;
  box-shadow: 0 8px 28px rgba(20, 24, 30, .14);
}
.ctx-menu.hidden { display: none !important; }
.ctx-item {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 6px;
  padding: .55rem .65rem; font: inherit; font-size: .9rem; color: #1f2329; cursor: pointer;
}
.ctx-item:hover { background: #f0f2f5; }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: #fdecea; }
.ctx-item.disabled { color: var(--muted); cursor: default; font-size: .78rem; padding: .35rem .65rem; }
.ctx-item.disabled:hover { background: transparent; }
.ctx-sep { height: 1px; background: var(--line); margin: .25rem .35rem; }

.overview {
  height: 100%;
  overflow-y: auto;
  background: #fff;
}
.ov-title {
  margin: .15rem 0 .35rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800; color: #111;
}
.ov-hint { margin: 0 0 1.2rem; font-size: .9rem; }
.ov-note { margin: 0 0 1.35rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.ov-note-title {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 0; margin: 0 0 .45rem; font: inherit;
  font-size: 1.1rem; font-weight: 700; color: #111; cursor: pointer;
}
.ov-note-title:hover { color: var(--acc); }
.ov-empty { margin: 0; font-size: .86rem; }
.ov-kp-list { margin: 0; padding-left: 1.15rem; }
.ov-kp-list li { margin: .2rem 0; }
.ov-kp {
  border: 0; background: none; padding: 0; font: inherit;
  font-size: .92rem; font-weight: 400; color: #8b929a; cursor: pointer; text-align: left;
}
.ov-kp:hover { color: #5c6370; }

.settings-card,
.mgmt-card { width: min(360px, 100%); }
.settings-card h2,
.mgmt-card h2 { margin: 0 0 .35rem; font-size: .92rem; font-weight: 700; color: #111; }
.settings-hint { margin: 0 0 .45rem; font-size: .75rem; line-height: 1.35; }
.set-block {
  margin: .65rem 0 0; padding-top: .55rem;
  border-top: 1px solid var(--line);
}
.set-block label {
  display: block; margin: .35rem 0 .12rem; color: var(--muted); font-size: .75rem;
}
.set-block input {
  width: 100%; padding: .38rem .5rem; border: 1px solid var(--line);
  border-radius: 5px; font: inherit; font-size: .86rem;
}
.set-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.set-actions .btn {
  padding: .28rem .5rem; font-size: .8rem; border-radius: 5px;
}
.set-actions .btn.primary { background: #111; border-color: #111; color: #fff; }
.chk-row {
  display: flex !important; align-items: center; gap: .35rem;
  margin: .45rem 0 .2rem !important; font-size: .78rem !important; color: var(--muted);
}
.chk-row input { width: auto !important; margin: 0; }
.note-item .star-mark {
  flex: none; color: #c4a000; font-size: .75rem; margin-right: .15rem;
}
.btn.star-on { color: #a67c00; border-color: #e6d59a; background: #fff8e6; }

/* 管理列表（分享管理等） */
.mgmt-list { margin: .35rem 0 0; padding: 0; list-style: none; }
.mgmt-row {
  display: grid; grid-template-columns: 1fr auto; gap: .25rem .4rem;
  align-items: center;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .82rem;
}
.mgmt-row .mgmt-title {
  font-weight: 500; color: #111;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mgmt-row .mgmt-meta {
  grid-column: 1 / -1;
  color: var(--muted); font-size: .72rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mgmt-row .mgmt-acts { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.mgmt-row .mgmt-acts .btn { padding: .2rem .4rem; font-size: .75rem; }

@media (max-width: 860px) {
  :root { --m-tabh: calc(56px + env(safe-area-inset-bottom, 0px)); }
  body.app {
    grid-template-columns: 1fr;
    background: #f5f7fa;
  }
  body.app.side-collapsed { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }

  /* 手机：彻底隐藏桌面侧栏主路径 */
  .sidebar, .side-expand { display: none !important; }

  .m-compose, .m-notes {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 20; background: #f7f8fa;
  }
  .m-compose.hidden, .m-notes.hidden { display: none !important; }
  body.app.m-reading .m-compose,
  body.app.m-reading .m-notes { display: none !important; }
  .m-compose-home {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
  }
  body.app.m-composing .m-compose-home { display: none !important; }
  body.app.m-composing .m-tabbar { display: none !important; }

  .m-brand-bar {
    flex: none; display: flex; align-items: center; justify-content: space-between;
    height: calc(52px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 18px 0;
  }
  .m-brand.brand {
    display: inline-block;
    font-family: var(--brand-font);
    font-size: 1.85rem;
    font-weight: 400;
    letter-spacing: .04em;
    line-height: 1;
    color: #111;
  }
  .m-brand-sub { font-size: .72rem; color: var(--muted); }
  .m-compose-scroll {
    flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 16px calc(var(--m-tabh) + 72px);
  }
  .m-greeting {
    display: block; width: 100%; border: 0; background: transparent; font: inherit;
    text-align: center; padding: 36px 8px 22px; cursor: pointer; color: inherit;
  }
  .m-greeting:active { opacity: .85; }
  .m-greet-mark.brand {
    width: auto; height: auto; margin: 0 auto 10px; padding: 0;
    background: transparent; color: #111;
    font-family: var(--brand-font); font-size: 2.6rem; font-weight: 400;
    letter-spacing: .04em; line-height: 1; display: block;
  }
  .m-greeting h1 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 700; }
  .m-greeting p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.5; }

  /* 底栏上的单行入口：平铺，不是套窗卡片 */
  .m-dock {
    position: absolute; left: 12px; right: 12px;
    bottom: calc(var(--m-tabh) + 10px); z-index: 21;
  }
  .m-dock-input {
    width: 100%; min-height: 48px; border: 1px solid #e4e7ec; border-radius: 14px;
    background: #fff; color: #9aa1ab; font: inherit; font-size: .95rem;
    text-align: left; padding: 0 16px; cursor: pointer;
  }
  .m-dock-input:active { background: #f5f7fa; }

  /* 真全屏编辑：整屏即纸面，无卡片框 */
  .m-compose-fs {
    display: flex; flex-direction: column; flex: 1; min-height: 0;
    background: #fff;
  }
  .m-compose-fs.hidden { display: none !important; }
  body.app.m-composing .m-compose-fs { display: flex !important; }
  .m-compose-fs-bar {
    flex: none; display: flex; align-items: center; gap: 8px;
    min-height: calc(48px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 10px 0;
    border-bottom: 1px solid #eef0f3;
  }
  .m-fs-btn {
    flex: none; min-width: 52px; height: 40px; border: 0; border-radius: 10px;
    background: transparent; color: var(--acc); font: inherit; font-size: .92rem;
    font-weight: 650; cursor: pointer; padding: 0 10px;
  }
  .m-fs-btn.primary {
    margin-left: auto; background: var(--acc); color: #fff; padding: 0 14px;
  }
  .m-fs-btn.primary:disabled { background: #d7dfe9; color: #fff; cursor: default; }
  .m-folder-chip {
    flex: 1; min-width: 0; border: 0; background: #f4f6f9; color: #5d6672; border-radius: 999px;
    padding: 8px 12px; font: inherit; font-size: .8rem; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  }
  .m-folder-chip span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .m-compose-title-fs {
    flex: none; width: 100%; border: 0; outline: none; background: #fff; font: inherit;
    font-size: 1.35rem; font-weight: 700; color: var(--ink);
    padding: 18px 18px 8px;
  }
  .m-compose-body-fs {
    flex: 1; min-height: 0; width: 100%; border: 0; outline: none; resize: none;
    background: #fff; font: inherit; font-size: 1.08rem; line-height: 1.8;
    color: var(--ink); padding: 8px 18px 12px;
  }
  .m-compose-title-fs::placeholder, .m-compose-body-fs::placeholder { color: #b6bcc5; }
  .m-compose-fs-foot {
    flex: none; padding: 8px 18px calc(10px + env(safe-area-inset-bottom, 0px));
    font-size: .72rem; color: var(--muted); border-top: 1px solid #f0f2f4;
  }

  .m-recent { margin-top: 10px; }
  .m-recent-head {
    display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px;
  }
  .m-recent-head h2 { margin: 0; font-size: .9rem; font-weight: 650; color: #5d6672; }
  .m-recent-head button {
    border: 0; background: transparent; color: var(--acc); font: inherit; font-size: .8rem; cursor: pointer;
  }
  .m-recent-row {
    width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
    background: transparent; border: 0; border-bottom: 1px solid #eef0f3;
    padding: 12px 2px; margin-bottom: 0; cursor: pointer; font: inherit; color: inherit;
  }
  .m-recent-row:active { background: #f3f6fb; }
  .m-rr-main { flex: 1; min-width: 0; }
  .m-recent-row h3 {
    margin: 0; font-size: .95rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .m-recent-row time { flex: none; font-size: .78rem; color: var(--muted); }

  .m-tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 22;
    height: var(--m-tabh); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  body.app.m-reading .m-tabbar { display: none; }
  .m-tab {
    border: 0; background: transparent; font: inherit; color: #a3a9b2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: .68rem; min-height: 48px; cursor: pointer;
  }
  .m-tab svg { width: 22px; height: 22px; }
  .m-tab.active { color: var(--acc); font-weight: 650; }
  .m-tab.new { color: inherit; }
  .m-tab.new .m-plus {
    width: 50px; height: 50px; border-radius: 50%; background: var(--acc); color: #fff;
    display: grid; place-items: center; margin-top: -20px;
    box-shadow: 0 8px 18px rgba(47, 111, 237, .32);
  }
  .m-tab.new.active .m-plus { box-shadow: 0 8px 20px rgba(47, 111, 237, .42); }
  .m-topbar {
    flex: none; min-height: calc(48px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 8px 0;
    display: flex; align-items: center; background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
  }
  .m-back-compose {
    flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: transparent; color: var(--acc); display: grid; place-items: center; cursor: pointer;
  }
  .m-back-compose:active { background: #eef1f5; }
  .m-title-btn {
    flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.05rem;
    font-weight: 700; color: #111; padding: .4rem; border-radius: 8px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
  }
  .m-title-btn:active { background: #eef1f5; }
  .m-top-spacer { width: 44px; flex: none; }
  .m-top-act {
    flex: none; min-width: 52px; height: 40px; border: 0; border-radius: 10px;
    background: transparent; color: var(--acc); font: inherit; font-weight: 650; cursor: pointer;
  }
  .m-top-act.hidden { display: none !important; }

  /* 栏目文件夹列表 */
  .m-folder-row {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: #fff; border: 0; border-bottom: 1px solid #eef0f3;
    padding: 14px 4px; font: inherit; color: inherit; cursor: pointer;
  }
  .m-folder-row:active { background: #f3f6fb; }
  .m-folder-ico {
    flex: none; width: 40px; height: 40px; border-radius: 11px; background: #eef3fb;
    color: var(--acc); display: grid; place-items: center;
  }
  .m-folder-ico svg { width: 22px; height: 22px; }
  .m-folder-main { flex: 1; min-width: 0; }
  .m-folder-main h3 {
    margin: 0 0 3px; font-size: 1rem; font-weight: 650;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .m-folder-main p { margin: 0; font-size: .78rem; color: var(--muted); }
  .m-folder-chev { flex: none; color: #c2c8d0; font-size: 1.2rem; }

  .m-card.select-on { background: #f3f7ff; }
  .m-card .m-check {
    flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c5ccd6;
    margin-right: 10px; display: inline-grid; place-items: center; font-size: .7rem; color: #fff;
  }
  .m-card.selected .m-check { background: var(--acc); border-color: var(--acc); }
  .m-card-row { display: flex; align-items: flex-start; width: 100%; }
  .m-card-body { flex: 1; min-width: 0; text-align: left; }

  /* 左右滑动：卡片下露出操作 */
  .m-swipe {
    position: relative; margin-bottom: 8px; border-radius: 12px; overflow: hidden;
    background: #eef1f5; touch-action: pan-y;
  }
  .m-swipe-actions {
    position: absolute; inset: 0; display: flex; align-items: stretch;
    pointer-events: none;
  }
  .m-swipe-actions.left { justify-content: flex-start; }
  .m-swipe-actions.right { justify-content: flex-end; }
  .m-swipe-actions button {
    pointer-events: auto; border: 0; min-width: 76px; padding: 0 12px;
    font: inherit; font-size: .82rem; font-weight: 650; color: #fff; cursor: pointer;
  }
  .m-swipe-actions .act-star { background: #e6a700; }
  .m-swipe-actions .act-move { background: var(--acc); }
  .m-swipe-actions .act-del { background: var(--danger); }
  .m-swipe-front {
    position: relative; z-index: 1; margin: 0 !important;
    transform: translate3d(0,0,0);
    transition: transform .18s ease;
    will-change: transform;
  }
  .m-swipe.dragging .m-swipe-front { transition: none; }
  .m-swipe.open-left .m-swipe-front { transform: translate3d(76px,0,0); }
  .m-swipe.open-right .m-swipe-front { transform: translate3d(-152px,0,0); }
  .m-swipe.open-right .m-swipe-actions.left,
  .m-swipe.open-left .m-swipe-actions.right { visibility: hidden; }
  .m-swipe.drag-right .m-swipe-actions.right { visibility: hidden; }
  .m-swipe.drag-left .m-swipe-actions.left { visibility: hidden; }
  body.app.m-selecting .m-swipe-actions { display: none; }

  .m-select-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 23;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.98); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(20,30,50,.08);
  }
  .m-select-bar.hidden { display: none !important; }
  body.app.m-selecting .m-notes .m-scroll { padding-bottom: 88px; }
  body.app.m-selecting .m-tabbar { display: none !important; }
  .m-select-bar span { font-size: .9rem; color: var(--muted); }
  .m-select-bar button {
    border: 0; border-radius: 12px; background: var(--acc); color: #fff;
    padding: 10px 16px; font: inherit; font-weight: 650; cursor: pointer;
  }
  .m-scroll {
    flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(var(--m-tabh) + 14px);
  }
  .m-card {
    display: block; background: #fff; border: 1px solid #ebedf0; border-radius: 12px;
    padding: 12px 14px; margin-bottom: 9px; cursor: pointer; text-align: left;
    width: 100%; font: inherit; color: inherit; appearance: none; -webkit-appearance: none;
  }
  .m-card:active { background: #f0f4fa; }
  /* 单行：标题省略 + 日期 */
  .m-card-line {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 14px; margin-bottom: 0;
  }
  .m-card-line h3,
  .m-card-line h4 {
    flex: 1; min-width: 0; margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .m-card-line time {
    flex: none; font-size: .78rem; color: var(--muted); white-space: nowrap;
  }
  .m-result.m-card-line {
    border: 1px solid #edf0f3; border-radius: 12px; background: #fff;
    padding: 13px 14px; margin-bottom: 8px;
  }
  .m-empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: .86rem; line-height: 1.7; }

  body.app:not(.m-reading) .workspace {
    visibility: hidden !important;
    pointer-events: none !important;
    position: fixed !important;
    inset: 0;
    z-index: 0;
  }
  body.app.m-reading .workspace {
    visibility: visible !important;
    pointer-events: auto !important;
    display: block !important;
    position: fixed; inset: 0; z-index: 25; height: 100dvh;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.app.m-reading .empty, body.app.m-reading .overview { display: none !important; }
  body.app.m-reading #work { display: block !important; }
  .doc-page { padding: 0.85rem 0.9rem 5.5rem; }
  .doc-toolbar {
    padding: .3rem .5rem .3rem .35rem;
    gap: .15rem;
    padding-top: max(.3rem, env(safe-area-inset-top, 0px));
  }
  .status { display: none; }
  .crumb { font-size: .82rem; }
  .tb-edit { padding: .36rem .7rem; font-size: .8rem; }
  .tb-icon .tb-text { display: none; }
  #btnMore { display: inline-grid; }
  .tb-more-wrap { display: flex; }
  .tb-more-menu {
    display: none;
    position: absolute; right: 0; top: calc(100% + 6px);
    min-width: 9.5rem;
    flex-direction: column; gap: 0;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 10px 28px rgba(31, 35, 41, .14);
    padding: .3rem;
    z-index: 20;
  }
  .tb-more-menu.open { display: flex; }
  .tb-menu-item {
    width: 100%; border: 0; border-radius: 8px;
    padding: .7rem .75rem; text-align: left; font-size: .9rem; font-weight: 550;
    background: transparent;
  }
  .tb-menu-item:active { background: #f3f4f6; }
  .tb-menu-item.star-on { background: #fff8e6; }
  .tb-menu-item.danger { color: var(--danger); }
  body.note-editing .tb-edit {
    background: var(--acc); border-color: var(--acc); color: #fff;
  }

  /* 正文内 AI 卡片：手机端不用（对齐 life：浮标+抽屉） */
  .m-ai-card { display: none !important; }
  .m-doc-meta { display: block; font-size: .72rem; color: var(--muted); margin: 0 0 10px; }
  .m-doc-meta.hidden { display: none !important; }
  .prose h1, .prose h2, .prose h3, .doc-read h1, .doc-read h2, .doc-read h3 {
    scroll-margin-top: 64px;
  }
  .doc-read .m-hl { background: #fff3bf !important; transition: background 1.5s; }

  /* 沉浸阅读：下滚收起顶栏，只留「要点」浮标 */
  .doc-toolbar {
    transition: transform .25s ease, opacity .25s ease;
  }
  body.app.m-reading.m-immersive .doc-toolbar {
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
  }
  body.app.m-reading.m-immersive .m-fab-tools {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
  }
  .m-kp-badge {
    display: none;
    position: fixed;
    top: max(10px, env(safe-area-inset-top, 0px));
    left: 12px;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid #d7dde6;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(20,30,50,.16);
    z-index: 32;
    font: inherit; font-size: .72rem; font-weight: 700;
    color: var(--acc);
    cursor: pointer;
    align-items: center; justify-content: center;
    padding: 0;
  }
  body.app.m-reading.m-immersive .m-kp-badge { display: flex; }
  body.app.note-editing .m-kp-badge { display: none !important; }

  .m-fab-tools {
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
    position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30;
    transition: opacity .2s ease, transform .2s ease;
  }
  body.app.note-editing .m-fab-tools { display: none; }
  .m-fab-tools.hidden { display: none !important; }
  .m-fab {
    width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink);
    box-shadow: 0 6px 18px rgba(20,30,50,.16); cursor: pointer; display: grid; place-items: center;
    font-size: .78rem; font-weight: 700;
  }
  .m-fab.primary { background: var(--acc); color: #fff; }

  /* 要点抽屉条目（对齐 life：序号块 + 短句） */
  .m-kp-item {
    display: flex; align-items: flex-start; gap: 10px;
    width: 100%; text-align: left; border: 0; background: none;
    border-radius: 10px; padding: 10px 6px; font: inherit; font-size: .92rem;
    line-height: 1.5; color: #2f3742; cursor: pointer; min-height: 44px;
  }
  .m-kp-item:active { background: #f0f3f7; }
  .m-kp-item .kp-n {
    flex: none; display: inline-grid; place-items: center;
    min-width: 22px; height: 22px; border-radius: 7px;
    background: var(--acc-soft); color: var(--acc);
    font-size: .72rem; font-weight: 700;
  }
  .m-kp-item .kp-t { flex: 1; min-width: 0; }

  .m-overlay {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 30; background: #f5f7fa;
  }
  .m-overlay.hidden { display: none !important; }
  .m-overlay-title { flex: 1; text-align: center; font-weight: 700; font-size: .95rem; }
  .m-search-wrap { padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--line); }
  .m-search-wrap input {
    width: 100%; height: 40px; border: 0; outline: none; background: #f4f6f8;
    border-radius: 10px; padding: 0 12px; font: inherit;
  }
  .m-overlay .text-btn {
    border: 0; background: transparent; color: var(--acc); font: inherit; font-weight: 650;
    min-width: 52px; height: 44px; cursor: pointer;
  }
  .m-result {
    display: block; width: 100%; text-align: left; border: 1px solid #edf0f3; background: #fff;
    border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font: inherit; cursor: pointer;
  }
  .m-result h4 { margin: 0 0 4px; font-size: .92rem; }
  .m-result p { margin: 0; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .m-sheet-mask {
    display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20,26,36,.38);
  }
  .m-sheet-mask.hidden { display: none !important; }
  .m-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    background: #fff; border-radius: 18px 18px 0 0;
    padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    max-height: 78dvh; overflow: auto;
  }
  .m-sheet.hidden { display: none !important; }
  .m-sheet-grip { width: 36px; height: 4px; border-radius: 99px; background: #d7dbe2; margin: 4px auto 10px; }
  .m-sheet h3 { margin: 0 0 8px; font-size: 1rem; }
  .m-sheet-item {
    width: 100%; min-height: 48px; border: 0; border-bottom: 1px solid #f0f2f4;
    background: transparent; text-align: left; font: inherit; font-size: .92rem; cursor: pointer; padding: 0 4px;
  }
  .m-sheet-item:last-child { border-bottom: 0; }
  .m-sheet-item.danger { color: var(--danger); }
  .m-sheet-item.on { color: var(--acc); font-weight: 650; }
  .m-sheet-note { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0 0 8px; }

  .app-toast {
    bottom: calc(var(--m-tabh, 56px) + 14px);
  }
  body.app.m-reading .app-toast,
  body.app.m-composing .app-toast {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  /* 我的：复用 side-panel 改底部 Sheet */
  .side-panel {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none;
    height: min(82dvh, 720px); border-radius: 18px 18px 0 0;
    border-left: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -12px 40px rgba(20,28,42,.16);
  }
  .panel-mask { background: rgba(20,26,36,.38); }
  .doc-read.fs-sm { font-size: .9rem; }
  .doc-read.fs-md { font-size: 1.05rem; }
  .doc-read.fs-lg { font-size: 1.15rem; }
}
