:root {
  --note-ink: #f3f9fc;
  --note-muted: #9eb6c7;
  --note-line: rgba(255, 255, 255, 0.12);
  --note-accent: #6ed4ff;
  --note-blue: #32b9f5;
}

.notes-open-button {
  gap: 7px;
  padding: 7px 13px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(7, 27, 42, 0.4);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  font-size: 0.95rem;
}

.notes-open-button:hover {
  border-color: rgba(110, 212, 255, 0.7);
  background: rgba(50, 185, 245, 0.2);
}

.notes-open-button:focus-visible,
.notes-manager button:focus-visible,
.notes-manager input:focus-visible,
.notes-manager textarea:focus-visible,
.notes-password-dialog button:focus-visible,
.notes-password-dialog input:focus-visible {
  outline: 3px solid rgba(110, 212, 255, 0.42);
  outline-offset: 2px;
}

.notes-manager,
.notes-password-dialog {
  box-sizing: border-box;
  padding: 16px;
  font-family: "Noto Sans TC", sans-serif;
}

.notes-manager__backdrop,
.notes-password-dialog__backdrop {
  background: radial-gradient(circle at 18% 12%, rgba(46, 174, 231, 0.12), transparent 36%), rgba(2, 11, 18, 0.56);
  backdrop-filter: blur(3px) saturate(0.95);
}

.notes-manager__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 100%);
  height: min(820px, calc(100dvh - 32px));
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  color: var(--note-ink);
  background: radial-gradient(circle at 8% 0%, rgba(70, 184, 231, 0.2), transparent 32%), linear-gradient(145deg, rgba(15, 51, 72, 0.99), rgba(7, 27, 42, 0.99));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.58);
}

.notes-manager__header {
  align-items: center;
  margin: 0;
  padding: 22px 24px 19px;
  border-bottom: 1px solid var(--note-line);
}

.notes-manager__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.notes-manager__brand-icon {
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(110, 212, 255, 0.28);
  border-radius: 15px;
  color: #dff6ff;
  background: linear-gradient(145deg, rgba(110, 212, 255, 0.2), rgba(50, 185, 245, 0.08));
  font-size: 1.3rem;
}

.notes-manager__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.notes-manager__header h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.notes-manager__eyebrow {
  margin-bottom: 3px;
  color: var(--note-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.notes-manager__sync-state {
  color: var(--note-muted);
  font-size: 0.84rem;
}

.notes-manager__sync-state::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #76e5ad;
  box-shadow: 0 0 0 4px rgba(118, 229, 173, 0.1);
  content: "";
}

.notes-icon-button {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #d8e8f2;
  background: rgba(255, 255, 255, 0.07);
}

.notes-icon-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.13);
}

.notes-manager__layout {
  grid-template-columns: minmax(310px, 0.78fr) minmax(430px, 1.35fr);
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.notes-form,
.notes-library {
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: transparent;
}

.notes-form {
  gap: 17px;
  overflow-y: auto;
  padding: 24px;
  border-right: 1px solid var(--note-line);
  background: rgba(1, 14, 23, 0.18);
  scrollbar-gutter: stable;
}

.notes-form__heading,
.notes-label-row,
.notes-library__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notes-form__heading {
  margin: -4px -4px 0;
  padding: 12px 14px;
  border: 1px solid rgba(110, 212, 255, 0.13);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(110, 212, 255, 0.09), rgba(255, 255, 255, 0.025));
}

.notes-form__heading h3,
.notes-library__heading h3 {
  margin: 0;
  font-size: 1.08rem;
}

.notes-form__heading p {
  margin: 3px 0 0;
  color: var(--note-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.notes-mode-badge {
  padding: 4px 9px;
  border: 1px solid rgba(110, 212, 255, 0.22);
  border-radius: 999px;
  color: var(--note-accent);
  background: rgba(110, 212, 255, 0.08);
  font-size: 0.78rem;
  white-space: nowrap;
}

.notes-form label {
  color: #dce9f1;
  font-size: 0.92rem;
  font-weight: 600;
}

.notes-form > label:not(.notes-checkbox-label) {
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.notes-field-hint,
.notes-character-count,
.notes-count {
  color: #7f9bae;
  font-size: 0.78rem;
  font-weight: 400;
}

.notes-form__content-field {
  flex: 1 1 auto;
  min-height: 210px;
  grid-template-rows: auto minmax(0, 1fr);
}

.notes-form input,
.notes-form textarea,
.notes-library__toolbar input,
.notes-password-dialog__panel input {
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--note-ink);
  background: rgba(3, 19, 30, 0.58);
  font-size: 0.95rem;
  font-weight: 400;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.notes-form input::placeholder,
.notes-form textarea::placeholder,
.notes-library__toolbar input::placeholder,
.notes-password-dialog__panel input::placeholder {
  color: #7390a4;
}

.notes-form textarea {
  height: 100%;
  min-height: 210px;
  resize: none;
  line-height: 1.7;
}

.notes-form input:focus,
.notes-form textarea:focus,
.notes-library__toolbar input:focus,
.notes-password-dialog__panel input:focus {
  border-color: var(--note-blue);
  background: rgba(3, 19, 30, 0.82);
  box-shadow: 0 0 0 3px rgba(50, 185, 245, 0.13);
}

.notes-checkbox-label {
  width: fit-content;
  padding: 2px 1px;
  cursor: pointer;
  user-select: none;
}

.notes-checkbox-label input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--note-blue);
}

.notes-form__actions {
  margin-top: 0;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notes-primary-button,
.notes-secondary-button,
.notes-danger-button,
.notes-pin-button {
  min-height: 38px;
  border: 1px solid transparent;
  padding: 8px 13px;
  font-size: 0.9rem;
  transition: transform 0.16s ease, background 0.16s ease;
}

.notes-primary-button {
  color: #052437;
  background: linear-gradient(135deg, #8ce0ff, #54c7f7);
}

.notes-secondary-button {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.notes-danger-button {
  color: #ffc8c8;
  background: rgba(255, 84, 84, 0.1);
}

.notes-pin-button {
  color: #ffe7a7;
  background: rgba(255, 205, 90, 0.1);
}

.notes-primary-button:hover,
.notes-secondary-button:hover,
.notes-danger-button:hover,
.notes-pin-button:hover {
  transform: translateY(-1px);
}

.notes-library {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  padding: 22px 14px 14px 22px;
}

.notes-library__toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px);
  gap: 16px;
  padding-right: 8px;
}

.notes-library__heading {
  justify-content: flex-start;
}

.notes-search {
  position: relative;
}

.notes-search__icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: #7793a5;
  pointer-events: none;
  transform: translateY(-50%);
}

.notes-library__toolbar .notes-search input {
  padding: 9px 34px;
}

.notes-search__clear {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  color: #a8bdca;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.notes-search__clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.notes-message {
  min-height: 25px;
  padding: 9px 8px 2px 1px;
  color: #a8dbf5;
  font-size: 0.88rem;
}

.notes-list {
  align-content: start;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 8px 8px 1px;
  scrollbar-color: rgba(130, 193, 223, 0.55) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.notes-list::-webkit-scrollbar,
.notes-form::-webkit-scrollbar {
  width: 8px;
}

.notes-list::-webkit-scrollbar-thumb,
.notes-form::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(130, 193, 223, 0.48);
  background-clip: padding-box;
}

.note-card {
  border-color: rgba(255, 255, 255, 0.09);
  padding: 14px 15px 12px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.note-card:hover {
  border-color: rgba(110, 212, 255, 0.22);
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

.note-card.is-pinned {
  border-color: rgba(255, 214, 117, 0.3);
  background: linear-gradient(145deg, rgba(255, 209, 97, 0.11), rgba(255, 255, 255, 0.055));
}

.note-card__title-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.note-card__pin {
  flex: none;
  color: #ffd675;
  font-size: 0.78rem;
}

.note-card__header strong {
  color: #f5fbff;
  font-size: 1rem;
}

.note-card__header time {
  color: #7895a8;
  font-size: 0.78rem;
  white-space: nowrap;
}

.note-card__content {
  color: #c6d6df;
  font-size: 0.93rem;
  -webkit-line-clamp: 4;
}

.note-card__actions {
  flex-wrap: wrap;
  gap: 6px;
}

.note-card__actions button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.notes-empty {
  min-height: 230px;
  padding: 28px;
  color: #7896a8;
  background: rgba(255, 255, 255, 0.025);
  line-height: 1.7;
  font-size: 0.95rem;
  white-space: pre-line;
}

.notes-password-dialog__panel {
  width: min(400px, 100%);
  box-sizing: border-box;
  gap: 0;
  border-color: rgba(110, 212, 255, 0.22);
  border-radius: 20px;
  padding: 26px;
  color: var(--note-ink);
  background: linear-gradient(155deg, rgba(13, 50, 69, 0.99), rgba(4, 23, 36, 0.995));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
}

.notes-password-dialog__header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.notes-password-dialog__header h3 {
  margin: 0;
  font-size: 1.24rem;
  letter-spacing: 0.01em;
}

.notes-password-dialog__intro {
  margin: 14px 0 20px !important;
  color: var(--note-muted);
  font-size: 0.91rem !important;
  line-height: 1.5;
}

.notes-password-message {
  min-height: 24px;
  padding: 7px 2px 2px;
  font-size: 0.84rem;
}

.notes-password-dialog__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(110, 212, 255, 0.28);
  border-radius: 13px;
  color: #bcecff;
  background: linear-gradient(145deg, rgba(110, 212, 255, 0.2), rgba(110, 212, 255, 0.06));
  box-shadow: none;
  font-size: 1rem;
}

.notes-password-field {
  display: grid;
  gap: 9px;
  color: #dcebf3;
  font-size: 0.86rem;
  font-weight: 700;
}

.notes-password-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.notes-password-field__control > i {
  position: absolute;
  z-index: 1;
  left: 15px;
  color: #6e9aaf;
  font-size: 0.86rem;
  pointer-events: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.notes-password-field__control:focus-within > i {
  color: var(--note-accent);
  transform: scale(1.08);
}

.notes-password-dialog__panel .notes-password-field input {
  min-height: 52px;
  padding: 12px 48px 12px 43px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(2, 17, 28, 0.68);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.notes-password-toggle {
  position: absolute;
  z-index: 2;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #8eacbc;
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.notes-password-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.notes-password-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.notes-password-dialog__actions button {
  min-height: 42px;
  border-radius: 11px;
}

.notes-password-dialog__actions .notes-secondary-button {
  min-width: 82px;
}

.notes-password-dialog__actions .notes-primary-button {
  min-width: 122px;
}

.notes-password-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
}

.notes-password-submit__spinner,
.notes-password-submit__check {
  display: none;
}

.notes-password-submit__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(5, 36, 55, 0.28);
  border-top-color: #052437;
  border-radius: 50%;
}

.notes-password-dialog.is-checking .notes-password-submit__spinner {
  display: block;
  animation: notes-auth-spin 0.7s linear infinite;
}

.notes-password-dialog.is-success .notes-password-submit__check {
  display: inline-block;
}

.notes-password-dialog.is-success .notes-password-submit {
  color: #063421;
  background: linear-gradient(135deg, #8af0bd, #50d99a);
}

@keyframes notes-auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notes-auth-item-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notes-auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

@keyframes notes-auth-spin {
  to { transform: rotate(360deg); }
}

@keyframes notes-auth-success {
  0% { transform: scale(1); }
  48% { transform: scale(1.13) rotate(-7deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes notes-workspace-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notes-column-left-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notes-column-right-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notes-password-dialog:not([hidden]) .notes-password-dialog__panel {
  animation: notes-auth-panel-in 360ms ease-out backwards;
}

.notes-password-dialog.is-shaking .notes-password-dialog__panel {
  animation: notes-auth-shake 420ms ease both;
}

.notes-password-dialog.is-checking .notes-password-dialog__icon {
  box-shadow: 0 0 0 7px rgba(110, 212, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.22);
}

.notes-password-dialog.is-success .notes-password-dialog__icon {
  border-color: rgba(118, 229, 173, 0.62);
  color: #baf5d5;
  background: rgba(118, 229, 173, 0.14);
  animation: notes-auth-success 430ms ease both;
}

.notes-manager.is-entering .notes-manager__panel {
  animation: notes-workspace-in 560ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.notes-manager.is-entering .notes-manager__header {
  animation: notes-auth-item-in 460ms cubic-bezier(0.22, 1, 0.36, 1) 120ms backwards;
}

.notes-manager.is-entering .notes-form {
  animation: notes-column-left-in 520ms cubic-bezier(0.22, 1, 0.36, 1) 200ms backwards;
}

.notes-manager.is-entering .notes-library {
  animation: notes-column-right-in 520ms cubic-bezier(0.22, 1, 0.36, 1) 260ms backwards;
}

@media (max-width: 820px) {
  .notes-manager { padding: 8px; }
  .notes-manager__panel { height: calc(100dvh - 16px); max-height: none; overflow: hidden; border-radius: 20px; }
  .notes-manager__header { padding: 16px 17px 14px; }
  .notes-manager__brand-icon { flex-basis: 40px; width: 40px; height: 40px; border-radius: 13px; }
  .notes-manager__layout { display: block; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  .notes-form { overflow: visible; padding: 18px 16px 20px; border-right: 0; border-bottom: 1px solid var(--note-line); }
  .notes-form__content-field, .notes-form textarea { min-height: 230px; }
  .notes-form textarea { resize: vertical; }
  .notes-library { grid-template-rows: auto auto minmax(0, 1fr); height: min(600px, 70dvh); padding: 20px 10px 10px 16px; }
  .notes-library__toolbar { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 520px) {
  .notes-manager__sync-state { display: none; }
  .notes-manager__identity { gap: 10px; }
  .notes-manager__eyebrow { font-size: 0.76rem; }
  .notes-manager__header h2 { font-size: 1.2rem; }
  .notes-form__actions > button { flex: 1; }
  .notes-password-dialog { padding: 12px; }
  .notes-password-dialog__panel { padding: 22px; border-radius: 18px; }
  .note-card__header { display: grid; gap: 5px; }
  .note-card__header time { padding-left: 22px; }
  .note-card__actions { display: grid; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 360px) {
  .notes-password-dialog__actions { flex-direction: column-reverse; }
  .notes-password-dialog__actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .notes-open-button, .notes-icon-button, .notes-primary-button, .notes-secondary-button, .notes-danger-button, .notes-pin-button, .note-card { transition: none; }
}

/* Bright private notes interface */
.notes-manager__eyebrow, .notes-manager__sync-state { display: none; }
.notes-manager__panel, .notes-password-dialog__panel { --note-ink:#17364a; --note-muted:#617d8e; --note-line:#dce9ef; --note-accent:#006d9a; --note-blue:#0086be; color:#17364a; background:#fff; border-color:#cfe2ec; box-shadow:0 24px 70px rgba(3,33,52,.28); }
.notes-manager__brand-icon, .notes-password-dialog__icon { color:#006f9e; background:#e4f5fc; border-color:#b9dfef; }
.notes-icon-button { color:#31586a; background:#edf5f8; }
.notes-icon-button:hover { background:#dceef5; }
.notes-form { background:#f5fafc; }
.notes-form__heading { background:#e8f5fa; border-color:#cbe5ef; }
.notes-form label { color:#244758; }
.notes-form > label:not(.notes-checkbox-label) { background:#fff; border-color:#dbeaf0; }
.notes-form input, .notes-form textarea, .notes-library__toolbar input, .notes-password-dialog__panel input { color:#17364a; background:#f8fbfd; border-color:#cadde7; }
.notes-form input:focus, .notes-form textarea:focus, .notes-library__toolbar input:focus, .notes-password-dialog__panel input:focus { background:#fff; border-color:#0086be; }
.notes-primary-button { color:white; background:#007fad; }
.notes-secondary-button { color:#30576b; background:#e8f1f5; border-color:#d5e5ec; }
.notes-danger-button { color:#ae3d48; background:#fff0f0; }
.notes-pin-button { color:#8a6817; background:#fff5d7; }
.note-card, .note-card:hover { background:#f6fafc; border-color:#dce9ef; }
.note-card.is-pinned { background:#fff9e9; border-color:#f0dc9f; }
.note-card__header strong { color:#183b4e; }
.note-card__content { color:#426173; }
.notes-empty { color:#668394; background:#f5fafc; }
.notes-message { color:#006e9a; }
.notes-search__clear { color:#587788; }
.notes-search__clear:hover { color:#005b85; background:#e8f1f5; }

/* Softer blue-gray notes theme */
.notes-manager__panel, .notes-password-dialog__panel { --note-ink:#18384c; --note-muted:#526e7f; --note-line:#cddfe7; color:#18384c; background:#edf4f6; }
.notes-manager__header { background:#e4eff3; }
.notes-form { background:#e8f1f4; }
.notes-library { background:#f3f7f8; }
.notes-form__heading { background:#dbeef2; }
.notes-form label, .notes-password-field, .notes-password-dialog__intro { color:#29495a; }
.notes-form > label:not(.notes-checkbox-label), .note-card, .note-card:hover { background:#fff; border-color:#d0e0e6; }
.notes-form input, .notes-form textarea, .notes-library__toolbar input, .notes-password-dialog__panel input { color:#18384c; background:#f8fbfc; border-color:#b7cdd7; }
.notes-password-dialog__panel input { color:#18384c !important; background:#f8fbfc !important; }
.notes-password-message { color:#17627c; }
.note-card.is-pinned { background:#fff7e7; border-color:#ead59f; }
.note-card__header strong { color:#18384c; }
.note-card__content { color:#385868; white-space:pre-wrap; }
.notes-format-toolbar { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.notes-format-toolbar button { border:1px solid #bcd5df; background:#e6f1f5; color:#245367; border-radius:8px; padding:6px 10px; cursor:pointer; }
.notes-format-toolbar button:hover { background:#d1e8f0; }
.note-text-large { font-size:1.25em; } .note-text-small { font-size:.82em; }
.note-card mark { background:#ffedaa; color:#493b10; border-radius:3px; }
.notes-manager__panel, .notes-password-dialog__panel { animation:notesSoftOpen .22s ease-out; }
@keyframes notesSoftOpen { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .notes-manager__panel, .notes-password-dialog__panel { animation:none; } }


/* Sea mist studio */
.notes-manager__panel { --note-ink:#213f4d; --note-muted:#5b7581; --note-line:#ccdfe4; --note-accent:#006b87; --note-blue:#007999; color:#213f4d; background:#f3f7f8; border-color:#cbdde2; box-shadow:0 24px 70px rgba(4,29,43,.35); }
.notes-manager__header { background:#f9fcfc; border-bottom:1px solid #d2e2e6; }
.notes-manager__header h2 { color:#193b49; }
.notes-manager__layout { display:grid; grid-template-columns:minmax(240px, .65fr) minmax(0, 1.35fr); }
.notes-library { grid-column:1; grid-row:1; background:#e8f1f3; border-right:1px solid #d2e2e6; padding:22px 14px 16px; }
.notes-form { grid-column:2; grid-row:1; background:#f7fafb; border:0; padding:24px 28px; }
.notes-library__toolbar { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:0; }
.notes-library__heading { display:flex; justify-content:space-between; flex-wrap:wrap; }
.notes-library__heading h3 { color:#244653; }
.mist-new-note { border:0; border-radius:8px; padding:8px 10px; color:#fff; background:#087995; cursor:pointer; }
.notes-list { padding:3px 3px 8px; }
.note-card, .note-card:hover { padding:13px; border:1px solid #d4e4e7; background:#fbfdfd; box-shadow:0 2px 5px rgba(18,54,65,.05); }
.note-card.is-pinned { background:#f5fbfa; border-color:#9ecfd2; }
.note-card__header strong { color:#214452; }
.note-card__content { color:#486776; white-space:pre-wrap; -webkit-line-clamp:2; }
.note-card__actions button { min-height:28px; padding:4px 7px; }
.notes-form__heading { background:transparent; border:0; padding:0; margin:0; }
.notes-form__heading h3, .notes-form label { color:#244653; }
.notes-form > label:not(.notes-checkbox-label) { background:transparent; border:0; padding:0; }
.notes-form input, .notes-form textarea, .notes-library__toolbar input, .notes-password-dialog__panel input { color:#183c4a; background:#fff; border:1px solid #bfd4dc; }
.notes-form input:focus, .notes-form textarea:focus, .notes-library__toolbar input:focus, .notes-password-dialog__panel input:focus { color:#183c4a; background:#fff; }
.notes-form__content-field { display:flex; flex-direction:column; gap:9px; min-height:270px; }
.notes-form__content-field textarea { flex:1 1 auto; min-height:200px; }
.notes-format-toolbar { display:flex; flex:none; flex-wrap:wrap; gap:6px; margin:0; }
.notes-format-toolbar button { padding:6px 11px; border:1px solid #c9dce2; border-radius:7px; color:#2a5261; background:#edf5f7; cursor:pointer; }
.notes-format-toolbar button:hover { background:#dbeef2; }
.note-text-large { font-size:1.25em; } .note-text-small { font-size:.82em; }
.note-card mark { color:#574516; background:#fff0b9; }
.notes-primary-button { color:#fff; background:#087995; }
.notes-secondary-button { color:#315565; background:#e2eff3; border-color:#cbdfe6; }
.notes-danger-button { color:#a63746; background:#fcebed; }
.notes-pin-button { color:#785b18; background:#f9efd4; }
.notes-message { color:#146982; }
.notes-password-dialog__panel { --note-ink:#213f4d; --note-muted:#536f7d; color:#213f4d; background:#f4f9fa; border-color:#c5dce4; }
.notes-password-dialog__intro, .notes-password-field, .notes-password-message { color:#436675 !important; }
.notes-password-dialog__panel input { color:#183c4a !important; background:#fff !important; }
.notes-manager__panel, .notes-password-dialog__panel { animation:mistOpen .22s ease-out; }
@keyframes mistOpen { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:none; } }
@media (max-width:820px) { .notes-manager__layout { display:flex; flex-direction:column; overflow:auto; } .notes-library { order:0; flex:none; border-right:0; border-bottom:1px solid #d2e2e6; min-height:200px; max-height:38vh; } .notes-form { order:1; flex:none; overflow:visible; padding:20px; } .notes-manager__panel { height:min(820px,calc(100dvh - 24px)); } }
@media (prefers-reduced-motion:reduce) { .notes-manager__panel, .notes-password-dialog__panel { animation:none; } }

/* Rich editor: compact toolbar and direct formatting */
.notes-form__content-field { display:flex !important; flex-direction:column !important; gap:10px !important; }
.notes-format-toolbar { display:flex !important; flex:none !important; align-items:center; flex-wrap:wrap; gap:6px; min-height:0 !important; }
.notes-format-toolbar button { height:auto !important; min-height:32px !important; flex:none !important; padding:5px 11px !important; }
.notes-rich-editor { flex:1 1 auto; min-height:220px; padding:14px; overflow:auto; border:1px solid #bfd4dc; border-radius:10px; background:#fff; color:#183c4a; font-size:15px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.notes-rich-editor:empty:before { content:attr(data-placeholder); color:#829ba8; pointer-events:none; }
.notes-rich-editor:focus { outline:2px solid #58aeca; outline-offset:1px; }
.notes-rich-editor font[size="5"], .note-card font[size="5"] { font-size:1.35em; }
.notes-rich-editor font[size="2"], .note-card font[size="2"] { font-size:.82em; }
.notes-rich-editor mark, .note-card__content mark { color:#493b10; }

.notes-format-toolbar button.is-active { background:#087995 !important; color:#fff !important; border-color:#087995 !important; }
.notes-format-divider { width:1px; height:22px; margin:0 2px; background:#c9dce2; }
.notes-format-toolbar .notes-color-button { min-width:32px; padding-left:8px !important; padding-right:8px !important; font-weight:800; }
.notes-format-toolbar .notes-color-black { color:#1f2933; background:#f5f6f7; }
.notes-format-toolbar .notes-color-blue { color:#005b85; background:#e5f3f9; }
.notes-format-toolbar .notes-color-green { color:#187a63; background:#e8f6ef; }
.notes-format-toolbar .notes-color-red { color:#be4f54; background:#fcecee; }
.notes-rich-editor font[size="3"], .note-card font[size="3"] { font-size:1em; }
