.notes-shell {
  max-width: 960px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

/* Tab bar */
.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  padding-bottom: 0;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  overflow-x: auto;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 220px;
  position: relative;
  top: 2px;
}

.tab span.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab .tab-close {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  padding: 0 0.1rem;
}

.tab .tab-close:hover { opacity: 1; color: var(--error); }

.tab.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  border-bottom: 2px solid var(--surface);
  font-weight: 600;
}

.tab-add {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.tab-add:hover { background: var(--bg); }

/* Editor */
.editor-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  min-height: 60vh;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 60vh;
  color: var(--text-muted);
}

.editor-area {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.toolbar button {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.toolbar button:hover { background: #e8e8ec; }

.toolbar .btn-danger { color: var(--error); }
.toolbar .btn-danger:hover { background: #ffe9e7; }

.toolbar .divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 0.3rem;
}

.save-indicator {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.note-title {
  padding: 1.2rem 1.5rem 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.note-body {
  flex: 1;
  padding: 1rem 1.5rem 2rem;
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text);
  outline: none;
  overflow-y: auto;
}

.note-body ul, .note-body ol {
  padding-left: 1.6rem;
  margin: 0.4rem 0;
}

.note-body:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-size: 1.35rem;
}
