:root {
  --library-ink: #37352f;
  --library-muted: #787774;
  --library-line: #ebeae5;
  --library-paper: #fff;
  --library-side: #f7f7f5;
  --library-accent: #725d9c;
  --library-accent-soft: #f2eef8;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--library-ink);
  background: var(--library-paper);
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(114, 93, 156, 0.2);
  outline-offset: 2px;
}

.sidebar {
  width: 316px;
  border-right-color: var(--library-line);
  background:
    linear-gradient(rgba(247, 247, 245, 0.965), rgba(247, 247, 245, 0.965)),
    repeating-linear-gradient(0deg, transparent, transparent 31px, #e9e8e4 32px);
}

.sidebar-header {
  gap: 12px;
  padding: 22px 18px 12px;
}

.nav-back {
  width: fit-content;
  gap: 7px;
  margin: -4px 0 5px;
  padding: 7px 9px;
}

.library-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 7px;
}

.library-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid #ded8e8;
  border-radius: 11px;
  color: var(--library-accent);
  background: var(--library-accent-soft);
  font-size: 20px;
}

.library-eyebrow,
.note-list-heading,
.page-kicker {
  color: #96938c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.library-brand h1 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.library-intro {
  margin: 0 2px 4px;
  color: #73716d;
  font-size: 13px;
  line-height: 1.6;
}

.new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-color: #665185;
  border-radius: 9px;
  color: #fff;
  background: #725d9c;
  box-shadow: 0 8px 18px rgba(83, 67, 116, 0.13);
}

.new-btn:hover {
  border-color: #5f4d7b;
  background: #665185;
}

.note-search-field {
  position: relative;
  display: block;
}

.note-search-field > i {
  position: absolute;
  top: 50%;
  left: 11px;
  color: #9b9993;
  transform: translateY(-50%);
}

#note-search-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px 8px 34px;
  border: 1px solid #dfded9;
  border-radius: 8px;
  color: #46443f;
  background: rgba(255, 255, 255, 0.78);
}

#note-search-input::placeholder {
  color: #aaa8a2;
}

.library-filters {
  display: flex;
  gap: 5px;
}

.library-filter {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: #787671;
  background: transparent;
  cursor: pointer;
}

.library-filter:hover,
.library-filter.active {
  color: #5f4d7b;
  background: #ebe7f1;
}

.note-list-heading {
  padding: 8px 22px 5px;
}

.note-list {
  min-height: 0;
  padding: 0 10px 12px;
  overflow-y: auto;
}

.note-item {
  margin: 3px 0;
  padding: 10px 34px 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.note-item:hover {
  border-color: #e2e0da;
  background: rgba(255, 255, 255, 0.7);
  transform: none;
}

.note-item.active {
  border-color: #ded8e8;
  background: #ede9f3;
  box-shadow: inset 3px 0 0 var(--library-accent);
}

.note-item-header {
  gap: 8px;
  font-size: 13px;
}

.note-item-icon {
  display: inline-flex;
  color: #85817b;
  font-size: 15px;
}

.note-item-time {
  margin: 5px 0 0 23px;
  color: #9a9891;
  font-size: 10px;
}

.delete-btn {
  top: 50%;
  right: 8px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 6px;
  color: #9a817f;
  transform: translateY(-50%);
}

.note-list-empty {
  margin: 10px 7px;
  padding: 18px 12px;
  border: 1px dashed #dcd9d2;
  border-radius: 9px;
  color: #96938c;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
}

.library-utility {
  padding: 10px 13px 14px;
  border-top: 1px solid var(--library-line);
}

.utility-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 7px;
  padding: 8px 7px;
  border: 0;
  border-radius: 7px;
  color: #787671;
  background: transparent;
  cursor: pointer;
}

.utility-toggle .ph-caret-up-down {
  margin-left: auto;
}

.utility-toggle:hover {
  background: #ecece8;
}

.library-settings-panel {
  padding: 7px;
}

.library-settings-panel[hidden] {
  display: none;
}

.utility-row {
  margin-top: 9px;
}

.utility-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
}

.sidebar-hint {
  margin-top: 6px;
  line-height: 1.45;
}

.main-content {
  background:
    linear-gradient(90deg, rgba(250, 249, 247, 0.82) 0, rgba(255, 255, 255, 0) 12rem),
    #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.container {
  max-width: 900px;
  padding: 42px 70px 100px;
}

.document-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 70px;
  color: #99968f;
  font-size: 12px;
}

.document-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.document-breadcrumb strong {
  color: #6f6c66;
  font-weight: 600;
}

.document-updated {
  font-size: 11px;
}

.page-header {
  align-items: flex-start;
  gap: 17px;
  margin-bottom: 0;
}

.page-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid #ded8e8;
  border-radius: 13px;
  color: var(--library-accent);
  background: var(--library-accent-soft);
  font-size: 25px;
  cursor: default;
}

.page-title-wrap {
  flex: 1;
  min-width: 0;
}

.page-kicker {
  margin: 1px 0 6px;
  color: #a19d95;
}

.page-title {
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  color: #2f2d29;
  background: transparent;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-title::placeholder {
  color: #c8c5bf;
}

.help-text {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 25px 0 21px 69px;
  padding: 10px 12px;
  border: 1px solid #ebe8ef;
  border-radius: 8px;
  color: #86827b;
  background: #faf9fb;
  font-size: 12px;
}

.help-text strong {
  color: #665185;
}

#editorjs {
  min-height: 500px;
  margin-left: 53px;
  padding-top: 8px;
}

.ce-block__content,
.ce-toolbar__content {
  max-width: 720px;
}

.ce-paragraph,
.cdx-list,
.cdx-checklist,
.cdx-quote {
  color: #403e39;
  font-size: 16px;
  line-height: 1.75;
}

.ce-header {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: -0.025em;
}

@media (max-width: 820px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    top: 14px;
    left: 14px;
    z-index: 70;
  }

  .sidebar {
    width: min(316px, calc(100vw - 36px));
  }

  .container {
    padding: 88px 24px 80px;
  }

  .document-topline {
    margin-bottom: 48px;
  }
}

@media (max-width: 560px) {
  .document-topline {
    align-items: flex-start;
    gap: 12px;
  }

  .document-updated {
    text-align: right;
  }

  .page-header {
    gap: 12px;
  }

  .page-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 21px;
  }

  .page-title {
    font-size: 37px;
  }

  .help-text,
  #editorjs {
    margin-left: 0;
  }
}
