.notes-command {
  width: min(1500px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 3rem;
}
.notes-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.2rem;
}
.notes-command-head h1 {
  margin: .25rem 0 .45rem;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.5rem, 5vw, 5.3rem);
  line-height: .92;
  letter-spacing: -.055em;
}
.notes-command-head p:last-child {
  max-width: 48rem;
  margin: 0;
  color: #9299a4;
}
.notes-command-seal {
  width: 8.5rem;
  min-height: 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  padding: .8rem 1rem;
  border: 1px solid #343942;
  border-left-color: #e76228;
  background: linear-gradient(135deg, #16191e, #0b0d10);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.notes-command-seal span,
.notes-command-seal small {
  font: 700 .57rem/1.2 "Space Grotesk", sans-serif;
  letter-spacing: .16em;
  color: #7f8793;
}
.notes-command-seal strong {
  grid-column: 1 / -1;
  font: 800 1.25rem/1 "Syne", sans-serif;
  color: #f4f2ee;
}
.notes-app {
  display: grid;
  grid-template-columns: 22rem minmax(0, 1fr);
  min-height: min(72vh, 780px);
  border: 1px solid #2b3038;
  border-radius: 1.4rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    #0a0c0f;
  background-size: 44px 44px;
  box-shadow: 0 30px 80px rgba(0,0,0,.38);
}
.notes-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid #272c33;
  background: rgba(14,16,20,.96);
}
.notes-sidebar-head,
.notes-list-line,
.notes-list-meta,
.notes-editor-top,
.notes-editor-meta,
.notes-editor-actions,
.notes-panel-title,
.notes-share-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notes-sidebar-head {
  gap: 1rem;
  margin-bottom: .8rem;
}
.notes-sidebar-head > div {
  display: grid;
  gap: .1rem;
}
.notes-kicker,
.notes-panel-title span,
.notes-editor-fields label > span {
  font: 700 .58rem/1.2 "Space Grotesk", sans-serif;
  letter-spacing: .16em;
  color: #e76228;
}
.notes-sidebar-head strong {
  font-family: "Syne", sans-serif;
  color: #f1f1ef;
}
.notes-create {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.4rem;
  padding: 0 .75rem;
  border: 1px solid #75401f;
  border-radius: .7rem;
  background: #21130e;
  color: #f2b28c;
  font: 700 .72rem/1 "Space Grotesk", sans-serif;
  cursor: pointer;
}
.notes-create span {
  font-size: 1.1rem;
}
.notes-search input,
.notes-member-search input,
.notes-member-search select,
.notes-editor-fields input {
  width: 100%;
  border: 1px solid #2a2f37;
  border-radius: .72rem;
  background: #0a0c0f;
  color: #f2f1ed;
  font: 500 .86rem/1.2 "Space Grotesk", sans-serif;
  outline: none;
}
.notes-search input {
  height: 2.55rem;
  padding: 0 .85rem;
}
.notes-search input:focus,
.notes-member-search input:focus,
.notes-member-search select:focus,
.notes-editor-fields input:focus,
.notes-body-field textarea:focus {
  border-color: #9c4a22;
  box-shadow: 0 0 0 3px rgba(231,98,40,.09);
}
.notes-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .25rem;
  margin: .65rem 0;
}
.notes-filters button {
  min-width: 0;
  min-height: 2rem;
  padding: 0 .25rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: #747c88;
  font: 700 .58rem/1 "Space Grotesk", sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}
.notes-filters button.is-active {
  background: #22262d;
  color: #f0efeb;
}
.notes-list {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a4f57 transparent;
}
.notes-list-item {
  width: 100%;
  display: grid;
  gap: .42rem;
  padding: .85rem;
  margin-bottom: .42rem;
  border: 1px solid transparent;
  border-radius: .82rem;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.notes-list-item:hover {
  background: #171a1f;
}
.notes-list-item.is-selected {
  border-color: #75401f;
  background: linear-gradient(110deg, rgba(231,98,40,.14), rgba(28,31,37,.92) 52%);
}
.notes-list-line {
  gap: .5rem;
}
.notes-list-line strong {
  overflow: hidden;
  color: #efeeea;
  font: 700 .88rem/1.2 "Space Grotesk", sans-serif;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notes-shared-badge {
  flex: 0 0 auto;
  color: #e9a47c;
  font: 700 .48rem/1 "Space Grotesk", sans-serif;
  letter-spacing: .1em;
}
.notes-list-excerpt {
  overflow: hidden;
  color: #7d8590;
  font-size: .72rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notes-list-meta {
  gap: .7rem;
  color: #626a75;
  font-size: .62rem;
}
.notes-list-meta em {
  overflow: hidden;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notes-list-empty,
.notes-panel-empty {
  color: #6f7782;
  font-size: .74rem;
  text-align: center;
}
.notes-workspace {
  min-width: 0;
  padding: 1.35rem;
  background: radial-gradient(circle at 90% 0, rgba(139,57,25,.12), transparent 28%);
}
.notes-welcome {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}
.notes-welcome-mark {
  width: 5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid #6f391f;
  border-radius: 1rem;
  background: #1a100d;
  color: #e76228;
  font: 800 2.2rem/1 "Syne", sans-serif;
  transform: rotate(45deg);
}
.notes-welcome-mark::first-letter {
  transform: rotate(-45deg);
}
.notes-welcome[hidden] {
  display: none;
}
.notes-welcome h2 {
  margin: .2rem 0;
  font-family: "Syne", sans-serif;
}
.notes-welcome p:last-child {
  color: #777f8a;
}
.notes-editor {
  display: grid;
  gap: .9rem;
  min-height: 100%;
}
.notes-editor[hidden] {
  display: none;
}
.notes-editor-top {
  gap: 1rem;
  align-items: end;
}
.notes-editor-fields {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, .45fr);
  gap: .7rem;
}
.notes-editor-fields label {
  display: grid;
  gap: .35rem;
}
.notes-editor-fields input {
  height: 2.8rem;
  padding: 0 .85rem;
}
.notes-editor-fields label:first-child input {
  font: 700 1.05rem/1 "Syne", sans-serif;
}
.notes-save-state {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 2rem;
  color: #7f8792;
  font-size: .67rem;
}
.notes-save-state span {
  width: .45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #4ea772;
  box-shadow: 0 0 10px rgba(78,167,114,.4);
}
.notes-save-state[data-state="dirty"] span,
.notes-save-state[data-state="saving"] span,
.notes-save-state[data-state="loading"] span {
  background: #df8a3b;
}
.notes-save-state[data-state="saving"] span,
.notes-save-state[data-state="loading"] span {
  animation: notesPulse 1s infinite;
}
.notes-save-state[data-state="error"] span {
  background: #cc4135;
}
.notes-editor-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid #252a31;
  color: #69717c;
  font: 500 .66rem/1.2 "Space Grotesk", sans-serif;
}
.notes-body-field {
  position: relative;
  display: flex;
  min-height: 17rem;
}
.notes-body-field textarea {
  width: 100%;
  min-height: 17rem;
  resize: vertical;
  padding: 1rem 1rem 2rem;
  border: 1px solid #292e35;
  border-radius: 1rem;
  background: rgba(7,9,11,.94);
  color: #dededb;
  font: 500 .92rem/1.7 "Space Grotesk", sans-serif;
  outline: none;
}
.notes-body-field small {
  position: absolute;
  right: .85rem;
  bottom: .7rem;
  color: #626a74;
  font-size: .62rem;
}
.notes-editor-actions {
  gap: 1rem;
  flex-wrap: wrap;
}
.notes-editor-actions > div {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.notes-editor-actions .button {
  min-height: 2.4rem;
  padding: 0 .8rem;
}
.notes-editor-actions > span {
  color: #777f89;
  font-size: .68rem;
}
.notes-danger {
  color: #d9786d;
}
.notes-lower-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: .8rem;
}
.notes-share-panel,
.notes-history-panel {
  position: relative;
  min-width: 0;
  padding: .9rem;
  border: 1px solid #292e35;
  border-radius: 1rem;
  background: rgba(20,23,28,.82);
}
.notes-panel-title {
  gap: 1rem;
  margin-bottom: .65rem;
}
.notes-panel-title h3 {
  margin: .1rem 0 0;
  font: 700 .92rem/1.2 "Syne", sans-serif;
}
.notes-panel-title small {
  color: #676f7a;
  font-size: .58rem;
}
.notes-member-search {
  display: grid;
  grid-template-columns: 1fr 7rem;
  gap: .45rem;
}
.notes-member-search input,
.notes-member-search select {
  height: 2.35rem;
  padding: 0 .7rem;
}
.notes-member-results {
  position: absolute;
  z-index: 8;
  width: min(26rem, calc(100% - 3rem));
  max-height: 15rem;
  overflow: auto;
  margin-top: .3rem;
  padding: .35rem;
  border: 1px solid #343a43;
  border-radius: .8rem;
  background: #101318;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.notes-member-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: #e9e8e5;
  text-align: left;
  cursor: pointer;
}
.notes-member-results button:hover {
  background: #20242b;
}
.notes-member-results button > span:last-child,
.notes-share-entry > div {
  display: grid;
}
.notes-member-results small,
.notes-share-entry small {
  color: #777f8a;
  font-size: .6rem;
}
.notes-member-avatar {
  width: 2rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #3a4049;
  border-radius: .55rem;
  background: #23272e;
  color: #e5e3de;
  font-size: .65rem;
}
.notes-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notes-share-list {
  display: grid;
  gap: .35rem;
  margin-top: .55rem;
}
.notes-share-entry {
  justify-content: flex-start;
  gap: .55rem;
  padding: .45rem;
  border-radius: .65rem;
  background: #111419;
}
.notes-share-entry > div {
  min-width: 0;
  flex: 1;
}
.notes-share-entry > div strong {
  overflow: hidden;
  font-size: .74rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notes-share-entry button {
  border: 0;
  background: transparent;
  color: #9c6b62;
  font-size: 1rem;
  cursor: pointer;
}
.notes-history-list {
  display: grid;
  gap: .35rem;
  max-height: 10rem;
  overflow: auto;
}
.notes-history-list article {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  padding: .48rem;
  border-radius: .65rem;
  background: #111419;
}
.notes-history-list article > span {
  color: #e76228;
  font: 700 .62rem/1 "Space Grotesk", sans-serif;
}
.notes-history-list article > div {
  min-width: 0;
  display: grid;
}
.notes-history-list strong,
.notes-history-list small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notes-history-list strong {
  font-size: .72rem;
}
.notes-history-list small {
  color: #707883;
  font-size: .58rem;
}
.notes-toast {
  position: fixed;
  z-index: 80;
  right: 1.2rem;
  bottom: 1.2rem;
  max-width: min(25rem, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid #66503d;
  border-radius: .85rem;
  background: #18130f;
  color: #f0e6dc;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  font-size: .78rem;
}
.notes-toast[hidden] {
  display: none;
}
.notes-toast.is-error {
  border-color: #71372f;
  background: #1b100f;
}
.notes-toast button {
  border: 0;
  background: transparent;
  color: #9ca2aa;
  cursor: pointer;
}
@keyframes notesPulse {
  50% { opacity: .35; transform: scale(.72); }
}
@media (max-width: 960px) {
  .notes-command-head { grid-template-columns: 1fr; }
  .notes-command-seal { display: none; }
  .notes-app { grid-template-columns: 17rem minmax(0, 1fr); }
  .notes-editor-fields { grid-template-columns: 1fr; }
  .notes-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .notes-command {
    width: min(100% - 1rem, 1500px);
    padding-top: 1rem;
  }
  .notes-command-head h1 { font-size: 2.65rem; }
  .notes-app {
    display: block;
    min-height: 0;
    overflow: visible;
    border-radius: 1rem;
  }
  .notes-sidebar {
    max-height: 22rem;
    border-right: 0;
    border-bottom: 1px solid #272c33;
    border-radius: 1rem 1rem 0 0;
  }
  .notes-filters { grid-template-columns: repeat(2, 1fr); }
  .notes-workspace { padding: .8rem; }
  .notes-welcome { min-height: 18rem; }
  .notes-editor-top { align-items: flex-start; }
  .notes-editor-top,
  .notes-editor-actions { align-items: stretch; flex-direction: column; }
  .notes-save-state { align-self: flex-end; }
  .notes-body-field,
  .notes-body-field textarea { min-height: 15rem; }
  .notes-editor-actions > div { display: grid; grid-template-columns: repeat(2, 1fr); }
  .notes-editor-actions .button { width: 100%; }
  .notes-member-search { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .notes-save-state span { animation: none !important; }
}
