/* ===========================================================
   备忘录 · 手绘粗线风格
   白底 / 纯黑 2px 描边 / 无填充 / 无阴影 / 无渐变
   =========================================================== */

:root {
  --ink: #000;
  --ink-soft: #8e8e93;   /* 未选中标签、辅助文字 */
  --ink-faint: #b9b9be;  /* 占位符 */
  --paper: #fff;
  --line: 2px;
  --r-lg: 14px;
  --r: 8px;
  --pad: 20px;
  --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; }
button { touch-action: manipulation; }
textarea, input { font-size: 16px; } /* iOS：小于 16px 聚焦时会自动放大页面 */

/* ---------- 手机外框（只在宽屏上出现）---------- */
.frame {
  width: 375px;
  /* 屏幕够高就按 812 显示；不够高就缩到可视区域以内，底部导航不会被裁掉 */
  height: min(812px, calc(100dvh - 48px));
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 26px;
  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;
  }
  html, body { background: #ececea; }
}
@media (max-width: 479px) {
  html, body { background: var(--paper); }
  body { display: block; }
  .frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    /* 手机：刘海和底部横条让开 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ---------- 状态栏 + 搜索 ---------- */
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
}
.statusbar .right { display: flex; align-items: center; gap: 5px; }
.statusbar svg { display: block; }

/* ---------- 搜索：默认收起在右上，点击展开 ---------- */
.topline {
  flex: none;
  margin: 8px var(--pad) 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 展开后的搜索条 */
.search {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 10px;
  background: var(--paper);
  order: 1;
}
.search svg { flex: none; width: 14px; height: 14px; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 0;
}
.search input::placeholder { color: var(--ink-faint); font-weight: 700; }

/* 放大镜按钮：搜索收起时是方形图标，展开时变成长条上的 ✕ */
.search-toggle {
  flex: none;
  margin-left: auto;
  order: 2;
  width: 36px;
  height: 36px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  color: var(--ink);
}
.search-toggle svg { width: 16px; height: 16px; }
.search-toggle .i-close { display: none; font-size: 12px; font-weight: 800; line-height: 1; }
.topline.open .search-toggle .i-search { display: none; }
.topline.open .search-toggle .i-close { display: block; }
.topline:not(.open) .search { display: none; }

/* ---------- 底部标签栏（手机端：点按区域够大，避开底部横条）---------- */
.tabbar {
  flex: none;
  height: 56px;
  padding: 0 var(--pad);
  display: flex;
  align-items: stretch;
  border-top: var(--line) solid var(--ink);
}
.tabbar button {
  flex: 1;
  background: none;
  border: 0;
  padding: 0 0 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-soft);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.tabbar button::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: var(--line);
  background: var(--ink);
  opacity: 0;
}
.tabbar button.on { color: var(--ink); }
.tabbar button.on::after { opacity: 1; }

/* ---------- 内容滚动区 ---------- */
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px var(--pad) 20px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.panel { display: none; }
.panel.on { display: block; }

.panel > section + section { margin-top: 28px; }

/* ---------- 模块标题行 ---------- */
.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 .btn-box {
  margin-left: auto;
  font-family: inherit;
  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;
  cursor: pointer;
}
.head .btn-box:active { background: var(--ink); color: var(--paper); }
.head .count {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}

/* ---------- 任务分组 ---------- */

/* ---------- 回顾面板：从底部弹出，与添加任务同一套样式 ---------- */
.sheet.review {
  max-height: 88%;
  height: auto;
}
.review-list {
  overflow-y: auto;
  max-height: 60vh;
  margin: -4px -2px 0;
  padding: 0 2px 2px;
  -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-item .when {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  flex: none;
}
.rv-move {
  flex: none;
  font-family: inherit;
  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);
  cursor: pointer;
}

/* ---------- 感悟：文件夹列表（iOS 备忘录那种整块分组） ---------- */
.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 #e3e3e0;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.th-row:last-child { border-bottom: 0; }
.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-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 2px;
}
.th-row { -webkit-touch-callout: none; }
.th-tip {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
  text-align: center;
}

/* 新建文件夹那一行 */
.th-sep { height: 0; }
.th-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e3e3e0;
}
.th-new input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: none;
  font-family: inherit;
  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-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

/* 文件夹内页 */
.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-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.btn-box.hidden { display: none; }

/* ---------- 随笔 · 全部（独立页面） ---------- */
.all-view {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: none;
  flex-direction: column;
  z-index: 30;
}
.all-view.on { display: flex; }
.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 .back {
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.all-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.all-head .total { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--ink-soft); }

.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-family: inherit;
  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-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
/* 选中：全黑底白字 */
.folder.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.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;
}
.all-list .daymark { margin: 14px 0 8px; }

/* 标记：只改卡片里那颗小圆点，卡片本身的粗细和边框完全不变 */
.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-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.pin-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 50%;
  background: none;
}
/* 已标记：圆点填实 + 字变黑，不改变卡片外观 */
.pin-dot.on { color: var(--ink); }
.pin-dot.on::before {
  border-color: var(--ink);
  background: var(--ink);
}
.card .cd { display: flex; align-items: center; gap: 0; }

/* 写随笔面板里的「归到」切换 */
#red-toggle { margin: 10px 0 4px; }
.lv-row.hidden { display: none; }

/* ---------- 笔记「全部」页里的卡片 ---------- */
.head .pin-dot { margin-left: auto; }
.head .pin-dot + .btn-box { margin-left: 8px; }

.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; }
.note-card .cd { min-height: 22px; }
.note-card .cd:empty { display: none; }

/* ---------- 「顺延 N 天」小标记（任务列表里）---------- */
.todo .when {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-left: 6px;
  white-space: nowrap;
}

/* ---------- 添加任务：底部弹出面板 ---------- */
.sheet-input {
  width: 100%;
  height: 46px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  outline: 0;
  background: none;
  margin-bottom: 14px;
}
.sheet-input::placeholder { color: var(--ink-faint); font-weight: 700; }
#task-mask .lv-row { margin-bottom: 12px; }
#task-mask .acts { margin-top: 4px; }

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

.tgroup + .tgroup { margin-top: 18px; }
.tgroup-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.tgroup-h::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
}
.tgroup.tg-can .tgroup-h,
.tgroup.tg-done .tgroup-h { color: var(--ink-soft); }
.tgroup.tg-can .tgroup-h::before,
.tgroup.tg-done .tgroup-h::before { background: var(--ink-faint); }
.tgroup-h span { margin-left: auto; font-size: 12px; color: var(--ink-soft); }

.tgroup.tg-done .todo {
  border-width: 1px;
  border-color: var(--ink-faint);
}
.tgroup.tg-can .todo { border-style: dashed; }
.tgroup.tg-can .todo.lv-urgent {
  border-style: solid;
  border-width: 3px;
}

/* ---------- 待办条目（带紧急度） ---------- */
.todo {
  display: flex;
  align-items: center;
  gap: 10px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 0 8px 0 0;
  min-height: 46px;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.todo + .todo { margin-top: 10px; }

/* 勾选圈（左侧，点它才打勾，避免误触） */
.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;
  cursor: pointer;
  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 .flag {
  flex: none;
  display: none;
  font-family: inherit;
  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);
  cursor: pointer;
}
.todo.lv-urgent .flag { display: block; }
.todo.lv-urgent { border-width: 3px; }
.todo.lv-urgent .txt { font-weight: 800; }

.todo.done .tick::after { background: var(--ink); }
.todo.done .txt {
  text-decoration: line-through;
  color: var(--ink-soft);
}
.todo.done { border-width: 1px; }
.todo.done .flag { display: none; }

/* ---------- 紧急度 / 今天 的胶囊切换 ---------- */
.lv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.lv-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-right: 2px;
}
.lv {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 12px 6px;
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.lv.on { background: var(--ink); color: var(--paper); }
.task-form .inline-add { margin-top: 0; }

/* ---------- 每日笔记模板（四段） ---------- */
.ntpl { display: block; }

.nsec + .nsec { margin-top: 14px; }

.nsec-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.nsec-h .num {
  flex: none;
  min-width: 14px;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
}
.nsec-h .tt { font-size: 15px; }

/* 每段一个粗线框，随内容长高 */
.nsec-box {
  display: block;
  width: 100%;
  min-height: 44px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;          /* 手机端不小于 16px，iOS 聚焦不放大 */
  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; }

/* ---------- 大文本框 ---------- */
.box {
  display: block;
  width: 100%;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  background: none;
  outline: 0;
  resize: none;
}
.box::placeholder { color: var(--ink-faint); }

/* ---------- 随笔 / 感悟 卡片 ---------- */
.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 {
  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-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ---------- 添加按钮（虚框）---------- */
.add {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: var(--line) dashed var(--ink-faint);
  border-radius: var(--r);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
}
.add:active { border-style: solid; color: var(--ink); border-color: var(--ink); }

/* ---------- 随手记一行输入 ---------- */
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.inline-add input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  padding: 0 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  outline: 0;
}
.inline-add input::placeholder { color: var(--ink-faint); }
.inline-add button {
  flex: none;
  padding: 0 14px;
  height: 44px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- 日期小标题 ---------- */
.daymark {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: .5px;
  margin: 0 0 8px;
}
.daymark + .card { margin-top: 0; }

/* ---------- 编辑抽屉 ---------- */
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .12);
  display: none;
  align-items: flex-end;
}
.sheet-mask.on { display: flex; }
.sheet {
  width: 100%;
  background: var(--paper);
  border-top: var(--line) solid var(--ink);
  padding: 18px var(--pad) 22px;
  max-height: 82%;
  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-family: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sheet .box { flex: 1; min-height: 160px; }
.sheet .acts { display: flex; gap: 8px; margin-top: 12px; }
.sheet .acts button {
  flex: 1;
  height: 46px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.sheet .acts button.primary { background: var(--ink); color: var(--paper); }

/* ---------- 空状态 ---------- */
.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;
}
