/* ═══════════════════════════════════════════
   青沐书笺 · 笺（便签墙）· Esther Editorial
   手绘感 · 温暖便签
   ═══════════════════════════════════════════ */

/* ─── 工具栏 ─── */
.notes-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.notes-add-btn {
  padding: 9px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  background: var(--accent-tint);
  font-family: var(--font-disp);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: all .2s var(--ease);
  letter-spacing: .02em;
}
.notes-add-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(196,154,108,.25);
  transform: translateY(-1px);
}

/* ─── 便签墙 ─── */
.notes-wall {
  column-count: 2;
  column-gap: 14px;
  padding-bottom: 28px;
}
.note-card {
  width: 100%;
  break-inside: avoid;
  padding: 28px 16px 16px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: 0 2px 8px rgba(42,38,32,.06), 0 1px 3px rgba(42,38,32,.04);
  transition: all .25s var(--ease);
  cursor: default;
}
.note-card:hover {
  transform: rotate(0deg) translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(42,38,32,.1);
}
.note-pin {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  pointer-events: none;
}
.note-weather {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 16px;
  z-index: 1;
}
.note-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(42,38,32,.04);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
  z-index: 2;
}
.note-card:hover .note-del { opacity: 1; }
.note-del:hover {
  background: rgba(192,57,43,.1);
  color: #c0392b;
}
.note-content {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
  padding-top: 6px;
}
.note-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(42,38,32,.1);
}
.note-date {
  position: absolute;
  bottom: 4px; right: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(42,38,32,.25);
}

/* ─── 共用遮罩 ─── */
/* overlay-mask 已合并到 index.css .modal-overlay */

/* ─── 写笺弹窗 ─── */
.note-editor-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 26px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-panel);
  max-height: 90vh;
  overflow-y: auto;
}
.note-editor-header {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.note-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── 颜色选择器 ─── */
.note-color-picker { display: flex; gap: 5px; }
.note-color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(42,38,32,.12);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.note-color-swatch:hover { transform: scale(1.12); }
.note-color-swatch.selected {
  border-color: var(--text);
  border-width: 3px;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text);
}

/* ─── Emoji ─── */
.note-emoji-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
  transition: all .15s;
  background: var(--bg);
}
.note-emoji-btn:hover { border-color: var(--accent); }
.note-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  max-height: 120px;
  overflow-y: auto;
}
.note-emoji-item {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .1s;
}
.note-emoji-item:hover { background: var(--bg); }

/* ─── 文本输入 ─── */
.note-editor-textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.note-editor-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,154,108,.08);
}
.note-editor-textarea::placeholder { color: var(--muted); opacity: .7; }

.note-editor-source {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.note-editor-source:focus { border-color: var(--accent); }
.note-editor-source::placeholder { color: var(--muted); opacity: .7; }

/* ─── 操作按钮 ─── */
.note-editor-actions { display: flex; gap: 10px; }
.note-editor-cancel, .note-editor-save {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-align: center;
}
.note-editor-cancel {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.note-editor-cancel:hover { background: var(--border); }
.note-editor-save {
  background: linear-gradient(135deg, var(--ink) 0%, #4a4035 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(61,53,41,.15);
}
.note-editor-save:hover { opacity: .9; }
.note-editor-save:disabled { opacity: .4; cursor: not-allowed; }

/* ─── 删除确认弹窗 ─── */
.note-del-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 26px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  box-shadow: var(--shadow-panel);
}
.note-del-panel .pub-icon { font-size: 34px; margin-bottom: 10px; }
.note-del-panel .pub-title {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.note-del-panel .pub-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.note-del-btns { display: flex; gap: 10px; }
.note-del-cancel, .note-del-confirm {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
  text-align: center;
}
.note-del-cancel {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.note-del-cancel:hover { background: var(--border); }
.note-del-confirm {
  background: #c0392b;
  border: none;
  color: #fff;
}
.note-del-confirm:hover { opacity: .85; }
