.native-app-main {
  min-height: 0;
  overflow: hidden;
  background: #f5f4f0;
}

.native-app-loading,
.native-app-error {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 40px;
  color: var(--text);
  text-align: center;
}

.native-app-error p { margin: 0; color: var(--muted); }

.notes-app {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  color: #252823;
}

.notes-app * { box-sizing: border-box; }
.notes-app button,
.notes-app input,
.notes-app textarea { font: inherit; }

.notes-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-right: 1px solid #deddd6;
  background: #eeede8;
}

.notes-sidebar > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 18px 16px;
}

.notes-sidebar header span,
.notes-editor > header > span {
  color: #777a72;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.notes-sidebar h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.04em; }
.notes-new,
.notes-save,
.notes-delete {
  border: 1px solid #d1d0c8;
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
  color: #353832;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.notes-new,
.notes-save { border-color: #385f54; background: #385f54; color: #fff; }

.notes-list { min-height: 0; overflow-y: auto; padding: 0 10px 16px; }
.notes-list-item {
  display: grid;
  width: 100%;
  gap: 5px;
  border: 0;
  border-radius: 9px;
  padding: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.notes-list-item:hover { background: rgba(255, 255, 255, .55); }
.notes-list-item.active { background: #fff; box-shadow: 0 1px 2px rgba(38, 40, 35, .08); }
.notes-list-item strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notes-list-item span { overflow: hidden; color: #85877f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notes-empty-list { padding: 18px 12px; color: #85877f; font-size: 12px; }

.notes-editor {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 24px clamp(24px, 6vw, 88px) 20px;
  background: #fbfaf7;
}
.notes-editor > header { display: flex; align-items: center; justify-content: space-between; }
.notes-editor > header > div { display: flex; gap: 8px; }
.notes-title {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 40px 0 18px;
  background: transparent;
  color: #22251f;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 720;
  letter-spacing: -.05em;
}
.notes-body {
  width: 100%;
  min-height: 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3b3e37;
  font-size: 15px;
  line-height: 1.7;
}
.notes-status { margin: 10px 0 0; color: #898b83; font-size: 11px; text-align: right; }
.notes-empty-editor { align-self: center; max-width: 520px; }
.notes-empty-editor span { color: #477167; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.notes-empty-editor h2 { margin: 10px 0; font-size: 30px; letter-spacing: -.045em; }
.notes-empty-editor p { margin: 0; color: #777a72; line-height: 1.6; }

@media (max-width: 720px) {
  .notes-app { grid-template-columns: 150px minmax(0, 1fr); }
  .notes-sidebar > header { align-items: stretch; flex-direction: column; }
  .notes-editor { padding-inline: 18px; }
}
