.my-notes-shell .topbar {
  flex: 0 0 auto;
}

.my-notes-main {
  display: grid;
  gap: 12px;
  width: min(1180px, calc(100% - 40px));
  margin: 20px auto 72px;
}

/* 文件夹 / 编辑：全宽工作区 */
.my-notes-shell.is-browsing .my-notes-main,
.my-notes-shell.is-editing .my-notes-main {
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0;
  min-height: calc(100vh - 64px);
}

.my-notes-shell.is-browsing .my-notes-head,
.my-notes-shell.is-editing .my-notes-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  margin: 0;
  padding: 6px 14px;
  border-bottom: 1px solid #ecefeb;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.my-notes-shell.is-browsing .my-notes-head > div:first-child,
.my-notes-shell.is-editing .my-notes-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}

.my-notes-shell.is-browsing .my-notes-back,
.my-notes-shell.is-editing .my-notes-back {
  margin: 0;
}

.my-notes-shell.is-browsing .my-notes-head .eyebrow,
.my-notes-shell.is-browsing .my-notes-head p,
.my-notes-shell.is-editing .my-notes-head .eyebrow,
.my-notes-shell.is-editing .my-notes-head p {
  display: none;
}

.my-notes-shell.is-browsing .my-notes-head h1,
.my-notes-shell.is-editing .my-notes-head h1 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  white-space: nowrap;
}

.my-notes-shell.is-browsing .mn-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-notes-shell.is-editing .mn-head-actions {
  display: none;
}

.my-notes-shell.is-browsing .mn-folder-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 118px);
  height: calc(100vh - 118px);
  padding: 10px 16px 16px;
}

.my-notes-head h1 {
  margin: 4px 0 6px;
  font: 750 1.85rem/1.15 "Noto Serif SC", "Songti SC", serif;
  letter-spacing: 0.01em;
  color: #1a1f1c;
}

.mn-drag-hint {
  margin: 0 0 12px;
  color: #8a918c;
  font-size: 0.78rem;
  line-height: 1.45;
}

.my-notes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.my-notes-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #6f7671;
  text-decoration: none;
  font-size: 0.86rem;
}

.my-notes-head h1 {
  margin: 4px 0 6px;
  font: 800 1.8rem/1.2 "Noto Serif SC", "Songti SC", serif;
  color: #1f2421;
}

.my-notes-head p {
  margin: 0;
  color: #6f7671;
  font-size: 0.92rem;
}

.my-notes-view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ecefeb;
  border-radius: 10px;
  background: #f4f5f2;
}

.my-notes-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6f7671;
  font: 600 0.78rem/1 inherit;
  cursor: pointer;
}

.my-notes-view-switch button.is-on {
  background: #fff;
  color: var(--front-red, #8c0000);
  box-shadow: 0 1px 2px rgba(20, 24, 22, 0.05);
}

.my-notes-view-switch button svg {
  width: 14px;
  height: 14px;
}

.mn-folder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mn-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #66706a;
  font-size: 0.9rem;
}

.mn-breadcrumb button,
.mn-level-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #3c4440;
  font: 500 0.8rem/1 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(30, 40, 35, 0.05);
}

.mn-level-back:hover {
  background: #fff;
  color: var(--front-red, #8c0000);
}

.mn-folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mn-folder-list {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 22px 18px 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 16px 40px rgba(30, 40, 35, 0.05);
}

.my-notes-shell.is-browsing .mn-folder-list {
  border-radius: 18px;
  border-color: rgba(255, 255, 255, 0.62);
}

.mn-folder-list.is-dragging-live,
.mn-folder-list.is-dragging-live * {
  user-select: none;
}

.mn-folder-list.is-finder {
  padding: 22px 18px 28px;
}

.mn-finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 16px;
  align-content: start;
}

.mn-finder-item,
button.mn-finder-item,
.mn-finder-item.mn-note-row,
.mn-finder-item.mn-folder-row {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 164px;
  padding: 14px 8px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #1f2421;
  text-align: center;
  font: 500 0.78rem/1.3 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  grid-template-columns: none !important;
  transition: background 120ms ease;
}

.mn-finder-item:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(35, 45, 40, 0.06);
}

.mn-finder-item.is-selected {
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--front-red, #8c0000) 18%, transparent),
    0 10px 22px rgba(35, 45, 40, 0.06);
}

.mn-note-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(40, 55, 50, 0.05);
}

.mn-finder-item.is-drop-target {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1.5px rgba(126, 176, 240, 0.75);
}

.mn-finder-item.is-dragging { opacity: 0.35; }

.mn-folder-list.is-dragging-live .mn-finder-item {
  transition: none;
}

.mn-finder-folder {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 80px;
}

.mn-finder-folder svg,
.mn-note-glyph svg {
  display: block;
  overflow: visible;
}

.mn-note-glyph {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 92px;
}

.mn-note-paper {
  fill: #fff;
  stroke: #d5dee8;
  stroke-width: 1;
  filter: drop-shadow(0 6px 6px rgba(40, 55, 70, 0.1));
}
.mn-note-fold { fill: #e7eef6; stroke: #d5dee8; stroke-width: 0.8; }
.mn-note-lines {
  fill: none;
  stroke: #7EB0F0;
  stroke-width: 2;
  stroke-linecap: round;
}

.mn-finder-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  width: 100%;
  max-width: 112px;
  margin: 0 auto;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-align: center;
  color: #2a312d;
}

.mn-finder-meta {
  min-height: 1em;
  writing-mode: horizontal-tb;
  color: #959c96;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.mn-status {
  display: inline-block;
  margin: 0;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
}

.mn-status.is-published {
  background: #e8f4ec;
  color: #3a7a52;
}

.mn-status.is-draft {
  background: #eef0f4;
  color: #5a6578;
}

.mn-side-doc {
  width: 14px;
  height: 16px;
  border: 1.5px solid #9aa3ab;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff, #eef2f6);
  box-shadow: inset 0 -6px 0 -4px #c5d3e4;
}

.mn-finder-gear {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #7a827d;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
}

.mn-finder-item:hover .mn-finder-gear,
.mn-finder-item:focus-within .mn-finder-gear {
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
}

.mn-note-card .mn-pick {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0;
}

.mn-note-card:hover .mn-pick,
.mn-note-card.is-selected .mn-pick {
  opacity: 1;
}

.mn-note-card-actions {
  display: none;
  flex: 0 0 auto;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

.mn-note-card:hover .mn-note-card-actions,
.mn-note-card.is-selected .mn-note-card-actions {
  display: flex;
}

.mn-note-card-actions a,
.mn-note-card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #66706a;
  cursor: pointer;
}

.mn-color-field {
  display: grid;
  gap: 8px;
  font-size: 0.78rem;
  color: #6b736e;
  letter-spacing: 0.02em;
}

.mn-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 0;
}

.mn-color-dot {
  width: 26px;
  height: 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mn-color-dot:hover {
  transform: scale(1.08);
}

.mn-color-dot.is-on {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3.5px #2a312d,
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.mn-color-dot[data-folder-color="blue"] { background: linear-gradient(180deg, #8fc0f8, #4f98eb); }
.mn-color-dot[data-folder-color="red"] { background: linear-gradient(180deg, #f0a0a0, #e07070); }
.mn-color-dot[data-folder-color="orange"] { background: linear-gradient(180deg, #f5c08a, #e9944a); }
.mn-color-dot[data-folder-color="yellow"] { background: linear-gradient(180deg, #f3e08a, #e2c246); }
.mn-color-dot[data-folder-color="green"] { background: linear-gradient(180deg, #9ed6a8, #66b878); }
.mn-color-dot[data-folder-color="teal"] { background: linear-gradient(180deg, #8fd4d0, #4fb3ad); }
.mn-color-dot[data-folder-color="purple"] { background: linear-gradient(180deg, #c5b0e8, #9878d0); }
.mn-color-dot[data-folder-color="gray"] { background: linear-gradient(180deg, #c8cdc9, #98a099); }

.mn-dialog-spacer { flex: 1; }

.mn-dialog [hidden] {
  display: none !important;
}

.mn-dialog {
  width: min(400px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 24px 60px rgba(25, 30, 28, 0.18),
    0 2px 8px rgba(25, 30, 28, 0.06);
}

.mn-dialog::backdrop {
  background: rgba(22, 26, 24, 0.28);
  backdrop-filter: blur(6px);
}

.mn-dialog form {
  display: grid;
  gap: 14px;
  padding: 22px 22px 18px;
}

.mn-dialog h2 {
  margin: 0;
  font: 650 1.05rem/1.35 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em;
  color: #1f2421;
}

.mn-dialog-lead {
  margin: -4px 0 0;
  color: #818983;
  font-size: 0.8rem;
  line-height: 1.45;
}

.mn-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: #6b736e;
}

.mn-field input,
.mn-dialog input,
.mn-dialog select {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #e2e6e1;
  border-radius: 10px;
  background: #fafbf9;
  color: #1f2421;
  font: 500 0.92rem/1.3 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.mn-field input:focus,
.mn-dialog input:focus,
.mn-dialog select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--front-red, #8c0000) 45%, #cfd5cf);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--front-red, #8c0000) 12%, transparent);
}

.mn-field input.is-invalid {
  border-color: #d8897a;
  background: #fff8f6;
}

.mn-field-hint {
  color: #c45b4a;
  font-size: 0.74rem;
}

.mn-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.mn-dialog-actions .button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.mn-dialog-actions .button.ghost,
.mn-dialog-actions .button:not(.primary):not(.subtle) {
  background: #f4f5f2;
  border: 1px solid transparent;
  color: #4a524e;
}

.mn-dialog-actions .button.ghost:hover,
.mn-dialog-actions .button:not(.primary):not(.subtle):hover {
  background: #eceeea;
}

.mn-head-actions .button,
.my-notes-shell .mn-sidebar-head .button,
.my-notes-shell .mn-sidebar-head .icon-button {
  min-height: 28px;
  height: 28px;
  padding: 0 11px;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22));
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: #5c6560;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 4px 14px rgba(30, 40, 35, 0.04);
}

.mn-head-actions .button svg,
.my-notes-shell .mn-sidebar-head .button svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.6;
}

.mn-head-actions .button:hover,
.my-notes-shell .mn-sidebar-head .button:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.36));
  color: #2f3834;
}

.mn-head-actions .button.primary,
.my-notes-shell .mn-sidebar-head .button.primary {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), color-mix(in srgb, var(--front-red, #8c0000) 16%, rgba(255, 255, 255, 0.16)));
  color: #8a3a34;
  font-weight: 450;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 6px 16px color-mix(in srgb, var(--front-red, #8c0000) 7%, transparent);
}

.mn-head-actions .button.primary:hover,
.my-notes-shell .mn-sidebar-head .button.primary:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), color-mix(in srgb, var(--front-red, #8c0000) 24%, rgba(255, 255, 255, 0.22)));
  color: #6e241f;
}

.mn-side-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mn-folder-color, #8a918c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.mn-row {
  display: grid;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #232926;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.mn-folder-list.is-list .mn-note-row {
  grid-template-columns: 28px 22px minmax(0, 1fr) auto;
  cursor: grab;
}

.mn-folder-list.is-list .mn-folder-row {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  cursor: grab;
}

.mn-row.is-dragging {
  opacity: 0.45;
}

.mn-row.is-drop-target,
.mn-breadcrumb.is-drop-target {
  outline: 2px solid color-mix(in srgb, var(--front-red, #8c0000) 55%, white);
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 70%, white);
}

.mn-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.mn-pick input {
  width: 16px;
  height: 16px;
  accent-color: var(--front-red, #8c0000);
}

.mn-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #e2e5e1;
  border-radius: 12px;
  background: #f4f5f2;
}

.mn-batch-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: #5f6862;
}

.mn-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.mn-drag-hint {
  margin: 0 0 10px;
  color: #85908a;
  font-size: 0.78rem;
}

.mn-row:hover,
.mn-row.is-selected {
  background: #fff;
}

.mn-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.mn-row small {
  color: #85908a;
  font-size: 0.75rem;
}

.mn-row-actions {
  display: flex;
  gap: 4px;
}

.mn-row-actions button,
.mn-row-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #66706a;
  text-decoration: none;
  cursor: pointer;
}

.mn-row-actions button:hover,
.mn-row-actions a:hover {
  background: #eef0ed;
  color: var(--front-red, #8c0000);
}

.mn-status {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ecefe9;
  color: #5f6862;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 500;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.mn-status.is-published { background: #e7f2ea; color: #2f6b45; }
.mn-status.is-draft { background: #eceff5; color: #445472; }

.mn-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 20px;
  color: #7a827d;
  text-align: center;
}

.mn-editor-view {
  position: relative;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  min-height: min(78vh, 860px);
  border: 1px solid #e8ebe6;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

/* 编辑视图：铺满可用视口，方便写作 */
.my-notes-shell.is-editing .mn-editor-view {
  min-height: calc(100vh - 108px);
  height: calc(100vh - 108px);
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.my-notes-shell.is-editing .mn-editor-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: #fff;
}

.my-notes-shell.is-editing .mn-note-form {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  grid-template-rows: none;
}

.my-notes-shell.is-editing .mn-editor-pane.has-note .mn-note-form {
  display: flex;
}

.my-notes-shell.is-editing #editor-mount {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.my-notes-shell.is-editing .markdown-workbench {
  --writer-height: calc(100vh - 188px);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.my-notes-shell.is-editing .editor-panes {
  flex: 1;
  min-height: 0;
}

.my-notes-shell.is-editing .CodeMirror,
.my-notes-shell.is-editing .preview-scroll {
  height: var(--writer-height) !important;
}

.my-notes-shell.is-editing .source-pane,
.my-notes-shell.is-editing .preview-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.my-notes-shell.is-editing .source-pane .CodeMirror,
.my-notes-shell.is-editing .preview-pane .preview-scroll {
  height: auto !important;
  flex: 1 1 auto;
  min-height: 0;
}

.my-notes-shell.is-editing .source-pane .CodeMirror {
  font: 20px/1.75 Consolas, "Microsoft YaHei", monospace;
}

.my-notes-shell.is-editing .source-pane .CodeMirror-linenumber {
  font-size: 13px;
}

.my-notes-shell.is-editing .editor-doc-title {
  font-size: 1.35rem;
  line-height: 1.45;
}

.my-notes-main.is-sidebar-collapsed .mn-editor-view {
  grid-template-columns: 0 minmax(0, 1fr);
}

.mn-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  min-width: 0;
  overflow: hidden;
}

.my-notes-main.is-sidebar-collapsed .mn-sidebar {
  width: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.mn-sidebar-head {
  display: grid;
  grid-template-columns: 28px 1fr 28px 28px;
  gap: 4px;
  align-items: center;
  padding: 8px 8px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
}

.mn-sidebar-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0;
  color: #2a312e;
}

.mn-sidebar-head .icon-button,
.mn-sidebar-head .button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #6a716c;
  box-shadow: none;
  font-weight: 500;
}

.mn-sidebar-head .button.primary {
  background: color-mix(in srgb, var(--front-red, #8c0000) 72%, transparent);
  color: #fff;
}

.mn-sidebar-head .icon-button:hover,
.mn-sidebar-head .button:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #2a312d;
}

.mn-sidebar-head .button.primary:hover {
  background: color-mix(in srgb, var(--front-red, #8c0000) 84%, transparent);
  color: #fff;
}

.mn-sidebar-head svg {
  width: 14px;
  height: 14px;
}

.mn-side-tree {
  overflow: auto;
  padding: 6px;
}

.mn-side-folder,
.mn-side-note {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2a312e;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.mn-side-folder {
  grid-template-columns: 10px minmax(0, 1fr) auto 14px;
  font-weight: 500;
  font-size: 0.82rem;
  color: #3a413d;
}

.mn-side-folder .mn-side-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mn-folder-color, #8a918c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.mn-side-folder small {
  color: #a0a6a1;
  font-size: 0.68rem;
  font-weight: 550;
}

.mn-side-note {
  grid-template-columns: minmax(0, 1fr) 8px;
  padding-left: 10px;
  color: #4a524e;
  font-size: 0.82rem;
  font-weight: 500;
}

.mn-side-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mn-side-mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c5cac4;
}

.mn-side-mark.is-public {
  background: #3d9a6a;
}

.mn-side-mark.is-private {
  background: #9a7a4a;
}

.mn-side-folder:hover,
.mn-side-note:hover {
  background: rgba(255, 255, 255, 0.72);
}

.mn-side-note.is-active {
  background: rgba(255, 255, 255, 0.78);
  color: #1c221f;
  font-weight: 550;
  box-shadow: 0 1px 2px rgba(25, 27, 26, 0.04);
}

.mn-side-group {
  margin-bottom: 4px;
}

.mn-side-root-notes {
  margin-bottom: 6px;
}

.mn-side-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 2px;
}

.mn-side-folder svg,
.mn-side-back svg {
  width: 14px;
  height: 14px;
  color: #a0a6a1;
}

.mn-side-back {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 34px;
  margin: 2px 0 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: #5c6560;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.mn-side-back:hover {
  background: rgba(255, 255, 255, 0.86);
  color: #2a312e;
}

.mn-side-more {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a918c;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.mn-side-more:hover,
.mn-side-line:hover .mn-side-more {
  background: rgba(255, 255, 255, 0.8);
  color: #3a413d;
}

.mn-side-empty {
  margin: 18px 10px;
  color: #8a918c;
  font-size: 0.8rem;
  line-height: 1.5;
}

.mn-item-menu {
  position: fixed;
  z-index: 80;
  min-width: 168px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: #fffdfb;
  box-shadow: 0 16px 40px rgba(28, 32, 29, 0.16);
}

.mn-item-menu[hidden] {
  display: none !important;
}

.mn-item-menu button[hidden] {
  display: none !important;
}

.mn-item-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2a312e;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.mn-item-menu button svg {
  width: 15px;
  height: 15px;
  color: #6d756f;
}

.mn-item-menu button:hover {
  background: #f3efe9;
}

.mn-item-menu button.is-danger {
  color: #8c3d32;
}

.mn-item-menu button.is-danger svg {
  color: #8c3d32;
}

.mn-sidebar-reopen {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 6;
  display: none;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  color: #4a524e;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30, 40, 35, 0.08);
}

.mn-sidebar-reopen svg {
  width: 14px;
  height: 14px;
}

.my-notes-main.is-sidebar-collapsed .mn-sidebar-reopen {
  display: inline-flex;
}

.mn-editor-pane {
  position: relative;
  min-width: 0;
  background: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.mn-note-form {
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

.mn-editor-pane.has-note .mn-note-form {
  display: grid;
}

.mn-editor-pane.has-note .mn-editor-empty {
  display: none;
}

.mn-editor-toolbar {
  position: relative;
  display: grid;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 22px 14px;
  border-bottom: 1px solid #f0f2ef;
  background: #fff;
  overflow: visible;
}

.mn-toolbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.mn-title-field {
  display: block;
  margin: 0;
  min-width: 0;
}

.mn-title-field input,
.mn-title-field .article-title-input,
.mn-editor-pane .article-title-input {
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1a1f1c !important;
  font: 600 1.22rem/1.4 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif !important;
  letter-spacing: -0.01em;
  box-shadow: none !important;
}

.mn-title-field textarea.article-title-input {
  display: block;
  height: auto;
  max-height: 4.8em;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  field-sizing: content;
}

.mn-title-field input::placeholder {
  color: #b8beb9;
  font-weight: 500;
}

.mn-publish-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.mn-publish-row .save-status {
  margin: 0;
  max-width: 240px;
  overflow: hidden;
  color: #a0a6a1;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mn-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.mn-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mn-toggle span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f3f4f2;
  color: #6a716c;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.mn-toggle input:checked + span {
  border-color: color-mix(in srgb, var(--front-red, #8c0000) 22%, transparent);
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 85%, white);
  color: var(--front-red, #8c0000);
}

.mn-toggle:hover span {
  background: #ebeceb;
}

.mn-toggle input:checked + span:hover {
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 70%, white);
}

.mn-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a827d;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.mn-icon-btn:hover {
  background: #f3f4f2;
  color: #2a312d;
}

.mn-icon-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 80%, white);
  color: var(--front-red, #8c0000);
}

.mn-icon-btn svg {
  width: 14px;
  height: 14px;
}

.mn-save-btn.button.primary,
.mn-editor-pane .mn-save-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--front-red, #8c0000) !important;
  color: #fff !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

.mn-save-btn:hover {
  filter: brightness(1.06);
}

.mn-save-btn svg {
  width: 13px;
  height: 13px;
}

.mn-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 34px;
  padding: 2px 0 0;
}

.mn-chip {
  display: inline-flex;
  align-items: center;
  max-width: 200px;
  min-height: 32px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #e6e8e4;
  border-radius: 999px;
  background: #f6f7f5;
  color: #6a716c;
  font: 500 0.78rem/1 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.mn-chip[hidden] {
  display: none !important;
}

.mn-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mn-chip.is-set {
  background: rgba(255, 255, 255, 0.72);
  color: #2c332f;
}

.mn-chip.is-open {
  border-color: color-mix(in srgb, var(--front-red, #8c0000) 28%, transparent);
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 80%, white);
  color: var(--front-red, #8c0000);
}

.mn-chip.is-dim {
  opacity: 0.55;
}

.mn-slate {
  position: absolute;
  top: 78px;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: 232px;
  margin: 0;
  padding: 14px 14px 12px;
  border: 0;
  border-radius: 0 16px 16px 0;
  background: rgba(32, 36, 34, 0.94);
  color: #f3efe6;
  box-shadow: 8px 12px 28px rgba(20, 24, 22, 0.18);
  transform: translateX(-105%);
  opacity: 1;
  pointer-events: none;
  transition: transform 220ms ease;
}

.mn-slate.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.mn-slate[hidden] {
  display: none !important;
}

.mn-slate-card[hidden] {
  display: none !important;
}

.mn-slate-card p {
  margin: 0 0 8px;
  color: rgba(243, 239, 230, 0.62);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.mn-slate input,
.mn-slate select {
  width: 100%;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f4ee;
  font: 500 0.82rem/1.3 inherit;
}

.mn-slate input::placeholder {
  color: rgba(243, 239, 230, 0.4);
}

.mn-slate input:focus,
.mn-slate select:focus {
  outline: 0;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.mn-slate .mn-toggle span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #f3efe6;
}

.mn-slate .mn-kind span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f3efe6;
}

.mn-slate .mn-share-fields {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.mn-slate .mn-share-fields .button {
  min-height: 28px;
  justify-self: start;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: #f3efe6;
  font-size: 0.72rem;
  font-weight: 500;
}

.mn-slate-done {
  justify-self: end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3c7c2;
  font-size: 0.74rem;
  font-weight: 550;
  cursor: pointer;
}

.mn-meta-more > summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
  padding: 2px 0 4px;
  color: #a0a6a1;
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.mn-meta-more > summary::-webkit-details-marker {
  display: none;
}

.mn-meta-more > summary::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 5px;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 5px solid #b0b6b1;
  transform: translateY(-0.5px);
  transition: transform 120ms ease;
}

.mn-meta-more[open] > summary::before {
  transform: rotate(90deg) translateX(1px);
}

.mn-meta-more[open] {
  padding: 0 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.mn-meta-more .mn-meta-inline,
.mn-meta-more .mn-kinds,
.mn-meta-more .mn-share-fields {
  margin-top: 6px;
}

.mn-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mn-meta-inline input,
.mn-meta-inline select {
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid #e8ebe6;
  border-radius: 7px;
  background: #fafaf9;
  color: #3a413d;
  font: 500 0.76rem/1.3 -apple-system, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}

.mn-meta-inline input:focus,
.mn-meta-inline select:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--front-red, #8c0000) 30%, #e8ebe6);
  background: #fff;
}

.mn-kinds {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.mn-kind {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.mn-kind input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mn-kind span {
  display: inline-flex !important;
  align-items: center;
  min-height: 26px;
  width: auto !important;
  max-width: none !important;
  padding: 0 10px !important;
  border: 1px solid #e8ebe6;
  border-radius: 999px !important;
  background: #fff;
  color: #6a716c;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap;
  grid-template-columns: none !important;
}

.mn-kind input:checked + span {
  border-color: color-mix(in srgb, var(--front-red, #8c0000) 28%, #e8ebe6);
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 80%, white);
  color: var(--front-red, #8c0000);
}

/* 编辑器菜单条：与笔记顶栏统一 */
.mn-editor-pane.note-writing #editor-mount {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: hidden;
}

.mn-editor-pane.note-writing .markdown-workbench {
  border: 0;
  box-shadow: none;
}

.mn-editor-pane.note-writing .editor-menubar {
  min-height: 48px !important;
  padding: 8px 18px !important;
  border-bottom: 1px solid #f0f2ef !important;
  background: #fff !important;
  gap: 12px;
}

.mn-editor-pane.note-writing .editor-modes {
  padding: 2px !important;
  border-radius: 8px !important;
  background: #f1f2f0 !important;
}

.mn-editor-pane.note-writing .editor-modes button {
  min-width: 56px !important;
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  color: #6a716c !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
}

.mn-editor-pane.note-writing .editor-modes button.active {
  color: var(--front-red, #8c0000) !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(25, 27, 26, 0.06) !important;
}

.mn-editor-pane.note-writing .editor-menubar-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mn-editor-pane.note-writing .editor-assist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mn-editor-pane.note-writing .editor-utilities {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.mn-editor-pane.note-writing .editor-chip {
  min-height: 28px;
  padding: 0 10px;
  border-color: #e8ebe6;
  background: #f7f8f6;
  color: #5a625c;
  font-size: 0.68rem;
}

.mn-editor-pane.note-writing .editor-chip:hover {
  background: #fff;
  color: var(--front-red, #8c0000);
}

.mn-editor-pane.note-writing .editor-focus-chip[aria-pressed="true"] {
  background: var(--front-red, #8c0000);
  border-color: var(--front-red, #8c0000);
  color: #fff;
}

.mn-editor-pane.note-writing .sync-control {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 0;
  width: auto !important;
  min-height: 26px;
  margin: 0 2px 0 0 !important;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f3f4f2;
  color: #6a716c !important;
  font-size: 0.68rem !important;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 120ms ease, color 120ms ease;
}

.mn-editor-pane.note-writing .sync-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0 !important;
  height: 0 !important;
}

.mn-editor-pane.note-writing .sync-control:has(input:checked) {
  background: color-mix(in srgb, var(--front-soft, #fff6f4) 85%, white);
  color: var(--front-red, #8c0000) !important;
}

.mn-editor-pane.note-writing .editor-utilities .icon-button,
.mn-editor-pane.note-writing .editor-toolbar > #find-editor {
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #7a827d !important;
  transition: background 120ms ease, color 120ms ease;
}

.mn-editor-pane.note-writing .editor-utilities .icon-button:hover,
.mn-editor-pane.note-writing .format-tools .icon-button:hover {
  background: #f1f2f0 !important;
  color: #2a312d !important;
}

.mn-editor-pane.note-writing .copy-rich-button {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  min-height: 26px !important;
  padding: 0 9px !important;
  border: 1px solid #ead9d5 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--front-red, #8c0000) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.mn-editor-pane.note-writing .copy-rich-button:hover {
  background: #faf3f1 !important;
}

.mn-editor-pane.note-writing .editor-toolbar {
  min-height: 34px !important;
  padding: 2px 8px !important;
  border-bottom: 1px solid #f3f4f2 !important;
  background: #fbfbfa !important;
}

.mn-editor-pane.note-writing .format-tools .icon-button {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  color: #6a716c !important;
}

.mn-editor-pane.note-writing .pane-heading,
.mn-editor-pane.note-writing .preview-controls {
  height: 32px !important;
  padding: 0 12px !important;
  border-bottom: 1px solid #f3f4f2 !important;
  background: #fbfbfa !important;
  color: #a0a6a1 !important;
  font-size: 0.64rem !important;
  font-weight: 550;
}

/* 专注模式：整页留给写作 */
body.editor-focused.mn-editing .my-notes-head,
body.editor-focused.mn-editing .mn-sidebar,
body.editor-focused.mn-editing .mn-sidebar-reopen,
body.editor-focused.mn-editing .mn-editor-toolbar,
body.editor-focused.mn-editing .site-footer {
  display: none !important;
}

body.editor-focused.mn-editing .mn-editor-view {
  height: 100vh;
  min-height: 100vh;
}

body.editor-focused.mn-editing .markdown-workbench {
  --writer-height: calc(100vh - 100px);
}

body.editor-focused .mn-focus-exit {
  display: inline-flex;
}

.mn-share-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mn-share-fields input {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #e2e6e1;
  border-radius: 9px;
  background: #fff;
  font: 500 0.82rem/1.3 inherit;
}

@media (max-width: 900px) {
  .mn-toolbar-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mn-publish-row {
    justify-content: flex-start;
  }

  .mn-publish-row .save-status {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.mn-editor-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 24px;
  color: #7a827d;
  text-align: center;
}

.mn-editor-pane #editor-mount {
  min-height: 0;
  overflow: auto;
}

.mn-editor-pane .markdown-workbench {
  border: 0;
  border-radius: 0;
  min-height: 520px;
}

.mn-share-link {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f5f2;
  color: #44504a;
  font-size: 0.82rem;
  word-break: break-all;
}

@media (max-width: 900px) {
  .mn-editor-view {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mn-sidebar {
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid #e4e7e2;
  }

  .my-notes-main.is-sidebar-collapsed .mn-editor-view {
    grid-template-columns: 1fr;
  }
}

.mn-drag-ghost {
  position: fixed;
  left: -140px;
  top: 8px;
  z-index: 1;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #3c4440;
  font-size: 0.72rem;
  font-weight: 500;
  pointer-events: none;
}

html[data-theme="dark"] .my-notes-shell,
html[data-theme="dark"] .my-notes-main,
html[data-theme="dark"] .mn-folder-view {
  background: #121414;
  color: #eceee9;
}

html[data-theme="dark"] .my-notes-head h1,
html[data-theme="dark"] .mn-finder-name,
html[data-theme="dark"] .mn-side-title,
html[data-theme="dark"] .article-title-input {
  color: #f4f6f3;
}

html[data-theme="dark"] .my-notes-head p,
html[data-theme="dark"] .mn-drag-hint,
html[data-theme="dark"] .mn-finder-meta,
html[data-theme="dark"] .mn-side-empty {
  color: #c5ccc6;
}

html[data-theme="dark"] .mn-sidebar,
html[data-theme="dark"] .mn-editor-pane,
html[data-theme="dark"] .mn-note-card,
html[data-theme="dark"] .mn-finder-item,
html[data-theme="dark"] .mn-item-menu,
html[data-theme="dark"] .mn-dialog {
  background: #1c1f1e;
  color: #eceee9;
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .mn-editor-pane .article-title-input,
html[data-theme="dark"] .mn-editor-pane .CodeMirror,
html[data-theme="dark"] .mn-editor-pane .CodeMirror-gutters,
html[data-theme="dark"] .mn-editor-pane .CodeMirror-linenumber {
  background: #1c1f1e;
  color: #e6ebe7;
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .mn-item-menu button {
  color: #e6ebe7;
}

html[data-theme="dark"] .mn-item-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}
