/* =========================================================
 *  modal.css — 通用弹窗、表单、Markdown 预览、Zen 大编辑器、阅读视图
 *  1:1 从 style.css 拆分，视觉零改动
 * ========================================================= */

/* =========================================================
 *  弹窗
 * ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 10, 16, 0.74);
  backdrop-filter: blur(5px);
  animation: fade-in 140ms ease-out;
  /* 仅在打开态允许接收点击；关闭态由下方规则彻底移出命中测试 */
  pointer-events: auto;
}

/* 🛡️ 关闭态：必须完全退出命中测试。
 * 仅设置 opacity: 0 不够——透明图层依然会拦截整页的点击事件，
 * 表现为「所有按钮偶发点不动，刷新才恢复」。 */
.modal-backdrop[hidden],
.modal-backdrop.hidden,
.modal-backdrop.is-closing {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal {
  width: min(760px, 100%);
  max-height: min(90vh, 880px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  /* 无回弹缓动：避免动画收尾越过终点（overshoot）造成 1~3px 回落抖动 */
  animation: modal-in 190ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.modal-cat {
  width: min(560px, 100%);
}

/* 🏷️ 专题重命名：紧凑单字段弹窗 */
.modal.modal-topic {
  width: min(420px, 100%);
}

.modal-topic .modal-body {
  gap: 10px;
}

.modal-topic .topic-hint {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #64748b;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 650;
  flex-shrink: 0;
}

.create-time {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.create-time:empty {
  display: none;
}

.modal-close {
  appearance: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: #101827;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input[type="date"] {
  cursor: pointer;
  color-scheme: dark;
  font-variant-numeric: tabular-nums;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5c6c82;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.2);
}

.field input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(254, 76, 97, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 240px;
  line-height: 1.65;
  font-family: "JetBrains Mono", "Consolas", "SF Mono", "PingFang SC",
    "Microsoft YaHei", monospace;
  font-size: 13.5px;
}

.modal-cat .field textarea {
  min-height: 160px;
  font-family: inherit;
  font-size: 14px;
}

.field-note {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-note textarea {
  min-height: 240px;
}

.field-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.field-note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.expand-note-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background 130ms ease, color 130ms ease, border-color 130ms ease,
    box-shadow 130ms ease;
}

.expand-note-btn:hover {
  color: #7dd3fc;
  border-color: var(--accent);
  background: rgba(61, 139, 253, 0.14);
  box-shadow: 0 2px 10px rgba(61, 139, 253, 0.24);
}

.expand-note-btn:active {
  transform: translateY(1px);
}

.note-tabs {
  display: inline-flex;
  padding: 2px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex-shrink: 0;
}

.note-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  white-space: nowrap;
}

.note-tab:hover {
  color: var(--text);
}

.note-tab.is-active {
  background: linear-gradient(180deg, #4d95ff, #2f7ae8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61, 139, 253, 0.4);
}

/* =========================================================
 *  🎛️ 刷题状态按钮组（题目编辑弹窗）
 * ========================================================= */

.field-status {
  display: grid;
  gap: 6px;
}

.status-btn-group {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  flex-wrap: nowrap;
}

.status-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #101827;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, transform 80ms ease;
}

.status-btn:hover {
  color: var(--text);
  border-color: #3d5470;
  background: #131d2e;
}

.status-btn:active {
  transform: translateY(1px);
}

.status-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.24);
}

/* 选中态（含每种状态的专属色） */
.status-btn.is-active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(61, 139, 253, 0.18);
  box-shadow: 0 0 0 1px rgba(61, 139, 253, 0.32) inset;
}

.status-btn[data-status="none"].is-active {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16) inset;
}

.status-btn[data-status="ac"].is-active {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.16) inset;
}

.status-btn[data-status="hint"].is-active {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.16) inset;
}

.status-btn[data-status="fail"].is-active {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.16) inset;
}

@media (max-width: 480px) {
  .status-btn-group {
    flex-wrap: wrap;
  }
  .status-btn {
    flex: 1 1 calc(50% - 3px);
    font-size: 12px;
  }
}

/* =========================================================
 *  Markdown 预览区（暗黑系排版）
 * ========================================================= */

.markdown-preview {
  width: 100%;
  min-height: 240px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 14px 18px;
  background: #0d131e;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #d3dcea;
  font-size: 13.5px;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: #24334a transparent;
  overflow-wrap: break-word;
  word-break: break-word;
}

.markdown-preview[hidden] {
  display: none;
}

.markdown-preview::-webkit-scrollbar {
  width: 8px;
}

.markdown-preview::-webkit-scrollbar-thumb {
  background: #24334a;
  border-radius: 4px;
}

.markdown-preview::-webkit-scrollbar-thumb:hover {
  background: #2f4159;
}

.markdown-preview .preview-empty {
  color: #5c6c82;
  font-style: italic;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  color: #e8eef7;
  font-weight: 700;
  line-height: 1.35;
  margin: 18px 0 8px;
}

.markdown-preview > :first-child {
  margin-top: 0;
}

.markdown-preview h1 {
  font-size: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.markdown-preview h2 {
  font-size: 17px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-preview h3 { font-size: 15px; }
.markdown-preview h4 { font-size: 14px; }

.markdown-preview h5,
.markdown-preview h6 {
  font-size: 13.5px;
  color: #b8cce8;
}

.markdown-preview p {
  margin: 8px 0;
}

.markdown-preview a {
  color: #5aa0ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(90, 160, 255, 0.5);
  transition: color 130ms ease, border-color 130ms ease;
}

.markdown-preview a:hover {
  color: #7dd3fc;
  border-bottom-color: #7dd3fc;
}

.markdown-preview strong {
  color: #ffffff;
  font-weight: 700;
}

.markdown-preview em {
  color: #dbe6f5;
  font-style: italic;
}

.markdown-preview del {
  color: #6a7b93;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 8px 0;
  padding-left: 24px;
}

.markdown-preview li {
  margin: 3px 0;
}

.markdown-preview li::marker {
  color: #5aa0ff;
}

.markdown-preview li > ul,
.markdown-preview li > ol {
  margin: 2px 0;
}

.markdown-preview blockquote {
  margin: 10px 0;
  padding: 6px 14px;
  border-left: 3px solid #5aa0ff;
  background: rgba(90, 160, 255, 0.07);
  border-radius: 0 6px 6px 0;
  color: #b8cce8;
}

.markdown-preview blockquote > :first-child { margin-top: 0; }
.markdown-preview blockquote > :last-child { margin-bottom: 0; }

.markdown-preview hr {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 14px 0;
}

.markdown-preview code:not(pre code) {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "SF Mono", monospace;
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: #9ecbff;
  white-space: pre-wrap;
  word-break: break-word;
}

.markdown-preview pre {
  margin: 12px 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #22304a;
  overflow: hidden;
  background: #0a101a;
}

.markdown-preview pre code {
  display: block;
  padding: 12px 14px;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "SF Mono", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
  background: transparent;
  color: #e8eef7;
  scrollbar-width: thin;
  scrollbar-color: #24334a transparent;
}

.markdown-preview pre code::-webkit-scrollbar {
  height: 8px;
}

.markdown-preview pre code::-webkit-scrollbar-thumb {
  background: #24334a;
  border-radius: 4px;
}

.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 12.5px;
}

.markdown-preview th,
.markdown-preview td {
  padding: 7px 10px;
  border: 1px solid #22304a;
  text-align: left;
  vertical-align: top;
}

.markdown-preview th {
  background: rgba(61, 139, 253, 0.12);
  color: #e8eef7;
  font-weight: 650;
}

.markdown-preview tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.markdown-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin: 6px 0;
}

.markdown-preview .katex {
  color: #e8eef7;
  font-size: 1.02em;
}

.markdown-preview .katex-display {
  margin: 14px 0;
  padding: 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #24334a transparent;
}

.markdown-preview .katex-display::-webkit-scrollbar {
  height: 8px;
}

.markdown-preview .katex-display::-webkit-scrollbar-thumb {
  background: #24334a;
  border-radius: 4px;
}

.markdown-preview .katex-display > .katex {
  color: #dbe6f5;
}

.markdown-preview .hljs {
  background: #0a101a;
  color: #e8eef7;
}

/* =========================================================
 *  📖 题解阅读视图（Reader View）
 * ========================================================= */

.reader-backdrop {
  z-index: 105;
}

.reader {
  width: min(880px, 100%);
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  animation: modal-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
  /* 🎯 头部抗抖动：常驻独立合成层，动画前后保持同一变换矩阵，
   * 避免动画结束、transform 被移除时文本重新栅格化产生位移。 */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.reader-header {
  display: flex;
  /* 顶部对齐：右侧操作按钮高度微调不会牵连左侧标题的垂直位置 */
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), rgba(20, 29, 42, 0.96));
  flex-shrink: 0;
  /* 头部容器参与合成：避免入场动画期间文本被单独重绘产生亚像素抖动 */
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.reader-header-main {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.reader-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #e8eef7;
  word-break: break-word;
  padding-right: 4px;
}

.reader-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  /* 固定行高：避免字体度量变化引起头部高度微变 */
  line-height: 1.5;
}

.reader-difficulty {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.reader-tags {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.reader-tags:empty {
  display: none;
}

.reader-times {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5f7086;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-wrap: wrap;
}

.reader-times > span:empty {
  display: none;
}

.reader-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.reader-edit-btn {
  font-size: 12.5px;
  padding: 7px 14px;
}

/* 主体：富文本阅读区（复用 .markdown-preview 排版，覆盖容器属性） */
.reader-body.markdown-preview {
  flex: 1;
  min-height: 0;
  max-height: none;
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 26px 34px 36px;
  background: #0d131e;
  font-size: 14.5px;
  line-height: 1.82;
  color: #d3dcea;
  /* 滚动条出现/消失时不改变内容宽度，避免文本重新折行 */
  scrollbar-gutter: stable;
}

.reader-body.markdown-preview > :first-child {
  margin-top: 0;
}

.reader-body.markdown-preview > :last-child {
  margin-bottom: 0;
}

.reader-body.markdown-preview h1 {
  font-size: 22px;
}

.reader-body.markdown-preview h2 {
  font-size: 18px;
}

.reader-body.markdown-preview h3 {
  font-size: 16px;
}

.reader-body.markdown-preview p {
  margin: 10px 0;
}

.reader-body.markdown-preview .preview-empty {
  padding: 60px 20px;
  font-size: 14px;
  line-height: 1.9;
}

/* 阅读视图顶部状态徽标 */
.reader-status {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.reader-status[hidden] {
  display: none;
}

/* =========================================================
 *  沉浸式大编辑器（Zen Mode）
 * ========================================================= */

.zen-backdrop {
  z-index: 110;
  padding: 24px;
}

.zen-container {
  width: min(92vw, 1680px);
  height: min(88vh, 1040px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modal-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.zen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  flex-shrink: 0;
}

.zen-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.zen-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.zen-title {
  font-size: 15px;
  font-weight: 700;
  color: #dbe6f5;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
}

.zen-subtitle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}

.zen-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  overflow: hidden;
}

.zen-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.zen-pane-edit {
  border-right: 1px solid var(--line);
  background: #0d131e;
}

#zen-input {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  outline: none;
  resize: none;
  padding: 20px 24px;
  background: transparent;
  color: var(--text);
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "SF Mono",
    "PingFang SC", "Microsoft YaHei", monospace;
  font-size: 14px;
  line-height: 1.75;
  scrollbar-width: thin;
  scrollbar-color: #24334a transparent;
}

#zen-input::placeholder {
  color: #4d5c73;
}

#zen-input::-webkit-scrollbar {
  width: 10px;
}

#zen-input::-webkit-scrollbar-thumb {
  background: #24334a;
  border-radius: 5px;
}

#zen-input::-webkit-scrollbar-thumb:hover {
  background: #2f4159;
}

.zen-pane-preview {
  background: #0b1017;
  overflow: hidden;
}

.zen-preview {
  flex: 1;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: none;
  border-radius: 0;
  padding: 20px 24px;
  background: transparent;
  font-size: 14px;
}

.zen-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  flex-shrink: 0;
}

.zen-footer-right {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* =========================================================
 *  弹窗底部与其它
 * ========================================================= */

.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.modal-footer-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

#modal-delete[hidden],
#cat-modal-delete[hidden] {
  display: none;
}

/* =========================================================
 *  移动端适配
 * ========================================================= */

@media (max-width: 900px) {
  .zen-backdrop {
    padding: 12px;
  }

  .zen-container {
    width: 96vw;
    height: 92vh;
  }

  .zen-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .zen-pane-edit {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .zen-title,
  .zen-subtitle {
    max-width: 60vw;
  }
}

@media (max-width: 720px) {
  .modal-backdrop {
    padding: 12px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field textarea {
    min-height: 180px;
  }

  .create-time {
    display: none;
  }

  .expand-note-btn span,
  .expand-note-btn {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Reader 移动端 */
  .reader-backdrop {
    padding: 0;
  }

  .reader {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .reader-header {
    padding: 14px 16px;
  }

  .reader-title {
    font-size: 16px;
  }

  .reader-header-actions {
    gap: 4px;
  }

  .reader-edit-btn {
    font-size: 11.5px;
    padding: 6px 10px;
  }

  .reader-body.markdown-preview {
    padding: 18px 18px 28px;
    font-size: 14px;
  }

  .status-btn {
    font-size: 11.5px;
    padding: 0 6px;
    min-height: 34px;
  }
}

/* 尊重系统「减少动态效果」偏好：跳过入场动画，杜绝任何位移抖动 */
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal,
  .reader,
  .zen-container {
    animation: none;
  }
}