/* ===========================================================
   备忘录 · 手绘粗线风格
   白底 / 纯黑粗描边 / 无填充 / 无阴影 / 无渐变
   目录：
   01 基础与手机外框      06 随笔列表与左滑
   02 底部标签栏          07 随笔全文 / 全部 / 搜索
   03 标题行与通用按钮    08 笔记
   04 任务                09 感悟
   05 任务输入行          10 全屏编辑器 / 回顾 / 覆盖层
   =========================================================== */

/* ---------- 01 基础 ---------- */
:root {
  --ink: #000;
  --ink-soft: #8e8e93;
  --ink-faint: #b9b9be;
  --line-soft: #e3e3e0;
  --paper: #fff;
  --line: 2px;
  --r: 8px;
  --pad: 20px;
  --tabbar-h: 92px;      /* 标签栏总高（iPhone 14 Pro 上再叠加底部安全区） */
  --tab-font: 12px;     /* 标签文字：Apple 规范里图标下的说明文字，比正文小一档 */
  --font: "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
          BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #ececea;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

button, input, textarea { -webkit-tap-highlight-color: transparent; font-family: inherit; }
button { touch-action: manipulation; cursor: pointer; }
textarea, input { font-size: 16px; }   /* iOS 小于 16px 聚焦会放大页面 */

/* 可点的整行（随笔、任务、感悟文件夹）：iOS 上如果不声明 touch-action，
   手指按住时 Safari 会先等「是不是双击缩放 / 长按选区」，这一等经常把 click 吞掉，
   表现就是「点了没反应」。整行不可选中文字、不弹系统菜单、300ms 内直接响应。 */
.ios-row, .todo, .th-row, .card {
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hidden { display: none !important; }

/* 手机外框（电脑上按 iPhone 14 Pro 尺寸预览） */
.frame {
  width: 393px;
  height: min(852px, calc(100dvh - 48px));
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 480px) and (min-height: 520px) {
  body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
}
@media (max-width: 479px) {
  html, body { background: var(--paper); }
  body { display: block; }
  .frame {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    /* 安全区只在内容区内部让位，底部横条由标签栏自己负责，避免叠两层留白 */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ---------- 02 底部标签栏 ---------- */
.tabbar {
  flex: none;
  height: var(--tabbar-h);
  padding: 0 calc(var(--pad) + 4px);
  display: flex;
  align-items: stretch;
  border-top: var(--line) solid var(--ink);
}
.tabbar button {
  flex: 1;
  background: none;
  border: 0;
  /* 图标在上、文字在下，纵向居中；上下留白对称 */
  padding: 9px 0 8px;
  color: var(--ink-faint);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: color .18s ease;
}
/* 手绘线条图标：和整站同一笔触，描边 1.8px、圆头 */
.tabbar button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  transition: transform .18s ease;
}
.tabbar button span {
  font-size: var(--tab-font);
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1;
}
/* 选中：图标和字一起变黑加重，不加任何线条 */
.tabbar button.on { color: var(--ink); }
.tabbar button.on span { font-weight: 900; }
.tabbar button.on svg { stroke-width: 2.2; transform: translateY(-1px); }
.tabbar button:active { color: var(--ink); }
@media (max-width: 479px) {
  /* 真机：底部横条安全区(34px)算在栏高里，不再额外叠一层 */
  .tabbar {
    height: auto;
    min-height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: calc(var(--tabbar-h) * 0.34 + env(safe-area-inset-bottom));
  }
  .tabbar button { padding: 0; }
}

/* ---------- 03 内容区、标题行、通用按钮 ---------- */
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px var(--pad);
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.panel { display: none; }
.panel.on { display: block; }
/* 随笔页撑满高度：标题栏固定，列表自己滚 */
.panel[data-panel="essays"].on {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.scroll:has(> .panel.on[data-panel="essays"]) { padding: 0; overflow: hidden; }

.head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  padding: 8px 12px 7px;
}
.head .count { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.head .btn-box { margin-left: auto; }

.btn-box {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: none;
  color: var(--ink);
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  padding: 8px 10px 7px;
}
.btn-box:active { background: var(--ink); color: var(--paper); }

.btn-plain {
  border: 0;
  background: none;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.btn-plain:active { opacity: .5; }
.btn-plain.on { text-decoration: underline; }

.ios-round {
  flex: none;
  width: 38px; height: 38px;
  border: 0;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ios-round:active { opacity: .5; }

/* 动物按钮：图片完整露出，本身不带任何框 */
.animal-btn {
  flex: none;
  width: 68px; height: 68px;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.animal-btn:active { opacity: .55; }
.animal-btn img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.empty {
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 22px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  line-height: 1.8;
}

.add {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: var(--line) dashed var(--ink-faint);
  border-radius: var(--r);
  background: none;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-soft);
}
.add:active { border-style: solid; border-color: var(--ink); color: var(--ink); }

.daymark {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: .5px;
  margin: 8px 0 0;
}
.daymark:empty { display: none; }

/* ---------- 04 任务 ---------- */
[data-panel="today"] { position: relative; }
[data-panel="today"] #taskList { padding-bottom: 92px; }

.task-tip {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  margin: -4px 0 10px;
}
.task-tip:empty { display: none; }

/* 单条任务：左滑容器 + 任务框 */
.swipe { position: relative; overflow: hidden; }
.swipe[data-task] { padding: 5px 0; }
.swipe .swipe-acts {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  width: 216px;
  z-index: 0;
}
.swipe[data-task] .swipe-acts { top: 5px; bottom: 5px; border-radius: var(--r); overflow: hidden; }
.sa-act {
  flex: 1;
  border: 0;
  border-left: 2px solid var(--paper);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  line-height: 1.25;
}
.sa-act.sa-edit { background: #444; }
.sa-act.sa-del { background: #c8321e; }

.todo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 8px 0 0;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  transition: transform .2s ease;
  will-change: transform;
}
.swipe.open .todo { transform: translateX(-216px); }
.swipe.is-pinned .todo { border-left-width: 6px; }
.swipe[data-task] .todo { margin: 0; }

.todo .tick {
  flex: none;
  width: 46px;
  align-self: stretch;
  border: 0;
  border-right: var(--line) solid var(--ink);
  border-radius: var(--r) 0 0 var(--r);
  background: none;
  position: relative;
  padding: 0;
}
.todo .tick::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
}
.todo .txt { flex: 1; min-width: 0; padding: 11px 0; line-height: 1.4; }
.todo .when {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-left: 6px;
  white-space: nowrap;
}
.todo .flag {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px 4px;
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
}
.todo.lv-urgent { border-width: 3px; }
.todo.lv-urgent .txt { font-weight: 800; }
.todo.done { border-width: 1px; }
.todo.done .tick::after { background: var(--ink); }
.todo.done .txt { text-decoration: line-through; color: var(--ink-soft); }
.todo.done .flag { display: none; }

/* 狼头悬浮按钮 */
.fab-wolf {
  position: absolute;
  right: 10px;
  bottom: calc(var(--tabbar-h) + 8px);
  width: 88px; height: 88px;
  padding: 0;
  border: 0;
  background: none;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.fab-wolf img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12));
}
.fab-wolf:active { transform: scale(.86); transition-duration: .08s; }
.frame.show-fab .fab-wolf { opacity: 1; pointer-events: auto; }
/* 输入任务时先收起来，别挡住输入行 */
.frame.typing .fab-wolf { visibility: hidden; pointer-events: none; }
@media (max-width: 479px) {
  .fab-wolf { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 05 任务输入行 ---------- */
.te-typing {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: var(--line) solid var(--ink);
  margin-bottom: 10px;
}
.te-typing.on { display: flex; }
.te-typing input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16px;
  color: var(--ink);
  padding: 2px 0;
}
.te-typing input::placeholder { color: var(--ink-faint); }

.te-tag {
  flex: none;
  height: 26px;
  padding: 0 10px;
  border: 1.5px solid #dcdcda;
  border-radius: 13px;
  background: none;
  color: #8a8a87;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.te-tag.urgent { border-color: var(--ink); color: var(--ink); }

.te-submit {
  flex: none;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 800;
}
.te-submit:active { opacity: .7; }

.te-opts {
  display: none;
  gap: 8px;
  padding: 0 2px 10px;
  flex-wrap: wrap;
}
.te-opts.open { display: flex; }
.kb-chip {
  height: 30px;
  padding: 0 14px;
  border: 1.5px solid #dcdcda;
  border-radius: 15px;
  background: none;
  color: #8a8a87;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.kb-chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- 06 随笔列表 ---------- */
.ios-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--pad) 12px;
}
.ios-title { flex: 1; min-width: 0; text-align: center; }
.ios-title .t { font-size: 17px; font-weight: 800; line-height: 1.25; }
.ios-title .s { font-size: 11px; font-weight: 700; color: var(--ink-soft); line-height: 1.4; }

.ios-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--pad) 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ios-scroll::-webkit-scrollbar { display: none; }

.ios-group-h {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  margin: 20px 4px 10px;
}
.ios-group-h:first-child { margin-top: 6px; }

.ios-group {
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
}
.swipe[data-essay] { border-bottom: 1px solid var(--line-soft); }
.ios-group > .swipe:last-child { border-bottom: 0; }

.ios-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  position: relative;
  z-index: 1;
  background: var(--paper);
  transition: transform .2s ease;
  will-change: transform;
}
.ios-row:active { background: #f4f4f2; }
.swipe.open .ios-row { transform: translateX(-216px); }

.ios-row-main { flex: 1; min-width: 0; }
.r-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-sub, .r-folder {
  font-size: 13px;
  font-weight: 700;
  color: #6b6b70;
  line-height: 1.5;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-folder { color: var(--ink-faint); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.r-star {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.4;
}

/* ---------- 07 覆盖层：全文 / 全部 / 搜索 ---------- */
.cover {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: none;
  flex-direction: column;
  z-index: 30;
}
.cover.on { display: flex; }

.es-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  /* 顶部多留一点：小老虎是 68px，贴着手机圆角会被切掉 */
  padding: 22px var(--pad) 10px;
  border-bottom: var(--line) solid var(--ink);
}
.es-head .sp { flex: 1; }
.es-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px var(--pad) 28px;
  word-break: break-word;
}
.es-date { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin: 0 0 10px; }

.all-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px var(--pad) 10px;
  border-bottom: var(--line) solid var(--ink);
}
.all-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 800; }
.all-head .total { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.btn-back {
  flex: none;
  height: 34px;
  padding: 0 4px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.all-head .animal-back { width: 68px; height: 68px; min-width: 68px; }

.all-search { margin: 10px var(--pad) 0; }
.all-search input {
  width: 100%;
  height: 38px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  outline: 0;
  background: none;
}
.all-search input::placeholder { color: var(--ink-faint); font-weight: 700; }

.folders {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 12px var(--pad);
  overflow-x: auto;
}
.folders::-webkit-scrollbar { display: none; }
.folder {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  background: #efefed;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.folder.on { background: var(--ink); color: var(--paper); }
.folder .n { font-size: 11px; opacity: .7; }
.folder.red::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}
.folder.red.on::before { background: var(--paper); }

.all-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--pad) 24px;
  -webkit-overflow-scrolling: touch;
}

/* 卡片（笔记 / 感悟共用） */
.card {
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 12px;
  position: relative;
}
.card + .card { margin-top: 10px; }
.card .ct { font-size: 15px; font-weight: 800; line-height: 1.4; margin: 0 44px 6px 0; }
.card .cb {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 44px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .cd {
  display: flex;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}
.card .del {
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* 标记小圆点（重要 / 标为重要） */
.pin-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  height: 24px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}
.pin-dot::before {
  content: "";
  width: 9px; height: 9px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 50%;
}
.pin-dot.on { color: var(--ink); }
.pin-dot.on::before { border-color: var(--ink); background: var(--ink); }
.head .pin-dot { margin-left: auto; }
.head .pin-dot + .btn-box { margin-left: 8px; }

/* ---------- 08 笔记 ---------- */
.nsec + .nsec { margin-top: 14px; }
.nsec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.nsec-h .num { flex: none; min-width: 14px; }
.nsec-box {
  display: block;
  width: 100%;
  min-height: 44px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  background: none;
  outline: 0;
  resize: none;
  overflow: hidden;
}
.nsec-box::placeholder { color: var(--ink-faint); font-weight: 700; }

.note-card .ct { margin-right: 44px; }
.nrec {
  display: flex;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  padding: 6px 0;
  border-top: 1px dashed var(--ink-faint);
}
.nrec:first-of-type { border-top: 0; }
.nrec-t { flex: none; color: var(--ink-soft); font-size: 12px; padding-top: 1px; }
.nrec-b { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }

/* ---------- 09 感悟 ---------- */
.th-block {
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}
.th-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  -webkit-touch-callout: none;
}
.th-row:active { background: #f4f4f2; }
.th-icon { flex: none; font-size: 18px; line-height: 1; }
.th-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-n { flex: none; font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.th-arrow { flex: none; font-size: 20px; font-weight: 800; color: var(--ink-faint); line-height: 1; margin-left: -4px; }
.th-all .th-name { font-weight: 800; }

.th-rename {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  border-bottom: var(--line) solid var(--ink);
  outline: 0;
  background: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 2px;
}

.th-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
}
.th-new input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.th-new input::placeholder { color: var(--ink-faint); font-weight: 700; }
.th-new button {
  flex: none;
  width: 34px; height: 34px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: none;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  padding: 0;
}

.th-tip {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
  text-align: center;
}
.th-card .th-tag {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  border: 1.5px solid var(--ink-faint);
  border-radius: 4px;
  padding: 1px 5px;
}
.th-write {
  flex: none;
  margin: 0 var(--pad) 16px;
  height: 48px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

/* ---------- 10 全屏编辑器 ---------- */
.editor {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: none;
  flex-direction: column;
  z-index: 60;
}
.editor.on { display: flex; }

.ef-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #ececea;
}
.ef-back {
  flex: none;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ef-back:active { background: #f2f2f0; }
.ef-title { flex: 1; min-width: 0; text-align: center; font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.ef-save {
  flex: none;
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 17px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
}
.ef-save:active { opacity: .75; }

.ef-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #ececea;
}
.ef-group { display: flex; align-items: center; gap: 6px; }
.ef-group + .ef-group { margin-left: 4px; }

.ink-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--ink);
  padding: 0;
  position: relative;
}
.ink-dot.red { background: #c8321e; border-color: #c8321e; }
.ink-dot.blue { background: #1f5fd0; border-color: #1f5fd0; }
.ink-dot:not(.on) { opacity: .45; }
.ink-dot.on::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--ink-soft);
}

.ef-btn {
  height: 32px;
  min-width: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f2f2f0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.ef-btn:active { background: #e3e3e0; }
.ef-size {
  min-width: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.mark-btn { margin-left: auto; }
.mark-btn.on { background: var(--ink); color: var(--paper); }

.ef-bold {
  flex: none;
  width: 46px; height: 36px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}
.ef-bold:active { background: #e8e8e6; }
.ef-bold.on { background: var(--ink); color: var(--paper); }

.ef-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 40px;
  display: flex;
  flex-direction: column;
}
.ef-hint { flex: none; font-size: 11px; font-weight: 800; color: var(--ink-faint); margin: 12px 0 0; }

/* 富文本：空白时显示提示语 */
.rich {
  outline: 0;
  word-break: break-word;
  white-space: pre-wrap;
  min-height: 300px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
}
.rich:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-faint);
  font-weight: 700;
  pointer-events: none;
}
/* 加粗：字重之外再叠一层描边，中文也看得出发粗 */
.rich b, .rich strong { -webkit-text-stroke: .38px currentColor; }
.rich span[style*="font-weight"]:not([style*="400"]) { -webkit-text-stroke: .38px currentColor; }
.rich span[style*="font-weight: 400"] { -webkit-text-stroke: 0; }

/* ---------- 回顾 ---------- */
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .12);
  display: none;
  align-items: flex-end;
  z-index: 50;
}
.sheet-mask.on { display: flex; }
.sheet {
  width: 100%;
  background: var(--paper);
  border-top: var(--line) solid var(--ink);
  border-radius: 16px 16px 0 0;
  padding: 18px var(--pad) 22px;
  max-height: 88%;
  display: flex;
  flex-direction: column;
}
.sheet h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet h3 .x {
  margin-left: auto;
  width: 28px; height: 28px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: none;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.review-list {
  overflow-y: auto;
  max-height: 60vh;
  -webkit-overflow-scrolling: touch;
}
.rv-day + .rv-day { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--ink-faint); }
.rv-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rv-date { font-size: 14px; font-weight: 800; }
.rv-day.now .rv-date { border-bottom: var(--line) solid var(--ink); padding-bottom: 1px; }
.rv-num { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.rv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.rv-mark { flex: none; width: 14px; text-align: center; font-size: 13px; font-weight: 800; }
.rv-item .rv-txt { flex: 1; min-width: 0; }
.rv-item.no .rv-txt { color: var(--ink-soft); }
.rv-item .rv-txt .when {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-top: 1px;
}
.rv-move {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px 4px;
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  background: none;
  color: var(--ink);
}
