/* 个人数据 · 记录本（personal.css）
   页签 / 输入 / 抽屉 / 弹窗基础样式全部复用 ui.css，这里只写业务布局与阅读排版 */
.personal-tabs { margin-bottom: 16px; }

.personal-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.personal-hint { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ── 卡片流（苹果备忘录式） ── */
.notes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 14px;
}
.note-card {
  display: flex; flex-direction: column; gap: 8px; min-height: 156px;
  padding: 15px 16px 11px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; outline: none;
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.note-card:hover, .note-card:focus-visible {
  border-color: var(--brand-line-2); box-shadow: var(--shadow-2); transform: translateY(-1px);
}
.note-card__head { display: flex; align-items: flex-start; gap: 8px; }
.note-card__title {
  flex: 1; min-width: 0; margin: 0; font-size: 14.5px; font-weight: 600;
  line-height: 1.4; color: var(--ink); word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-card__badges { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--muted); padding-top: 2px; }
.note-card__icon { display: inline-flex; align-items: center; gap: 2px; }
.note-card__icon svg { width: 14px; height: 14px; }
.note-card__icon i { font-style: normal; font-size: 11px; }
.note-card__summary {
  flex: 1; margin: 0; font-size: 12.5px; line-height: 1.62; color: var(--muted);
  word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.note-labels { display: flex; flex-wrap: wrap; gap: 5px; }
.note-label {
  padding: 1px 8px; border-radius: 999px; font-size: 11px;
  color: var(--brand); background: var(--brand-soft);
}
.note-card__foot {
  display: flex; justify-content: space-between; gap: 8px;
  padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums;
}
.notes-loading { padding: 40px 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ── 抽屉：编辑 / 阅读 ── */
.note-panel .ui-drawer__body {
  display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--card);
}
.note-panel--read .ui-drawer__body { display: block; overflow: auto; }

.note-editor { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.note-editor__bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.note-editor__pwd { width: 152px; height: 32px; }
.note-editor__tags { width: 190px; height: 32px; margin-left: auto; }
.note-editor__save { height: 32px; padding: 0 18px; }
.note-editor__host { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.note-editor__host [class~="ql-toolbar"] { border: 0; border-bottom: 1px solid var(--line); padding: 7px 14px; background: var(--card); }
.note-editor__host .ql-container.ql-snow { flex: 1; min-height: 0; border: 0; overflow-y: auto; font-size: 15px; }
.note-editor__host .ql-editor {
  width: 100%; max-width: 800px; margin: 0 auto; min-height: 100%;
  padding: 20px 26px 80px; line-height: 1.8;
}
.note-editor__host .ql-editor img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.note-editor__fail { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── 阅读模式：800px 居中、行高 1.8、字号 15px ── */
.note-reader__head {
  max-width: 800px; margin: 0 auto; padding: 26px 32px 14px; border-bottom: 1px solid var(--line);
}
.note-reader__title { margin: 0 0 8px; font-size: 22px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.note-reader__meta { margin: 0; font-size: 12px; color: var(--muted-2); }
.note-reader__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.note-reader {
  max-width: 800px; margin: 0 auto; padding: 20px 32px 48px;
  font-size: 15px; line-height: 1.8; color: var(--ink-2); word-break: break-word;
}
.note-reader p { margin: 0 0 .8em; }
.note-reader h1, .note-reader h2, .note-reader h3 { color: var(--ink); line-height: 1.35; margin: 1em 0 .5em; }
.note-reader img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0; }
.note-reader blockquote {
  margin: .8em 0; padding: .15em 0 .15em 14px;
  border-left: 3px solid var(--brand-line-2); color: var(--muted);
}
.note-reader pre {
  padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-soft);
  overflow: auto; font-size: 13px; line-height: 1.6;
}
.note-reader__blank { color: var(--muted); }
.note-reader__acts { display: flex; gap: 8px; }

/* ── 密码验证 / 邮箱重置弹窗 ── */
.note-pwd, .note-reset { display: flex; flex-direction: column; gap: 10px; }
.note-pwd__tip { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.note-pwd__forgot {
  align-self: flex-start; padding: 0; border: 0; background: transparent;
  color: var(--brand); font-size: 12.5px; cursor: pointer;
}
.note-pwd__forgot:hover { text-decoration: underline; }
.note-reset__send { align-self: flex-start; }

@media (max-width: 720px) {
  .notes-grid { grid-template-columns: 1fr; }
  .note-editor__tags { margin-left: 0; width: 100%; }
  .note-reader__head, .note-reader { padding-left: 18px; padding-right: 18px; }
  .note-editor__host .ql-editor { padding: 16px 18px 60px; }
}
