.developer-notes-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 80px;
}

.developer-notes-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #151a26, #0e121b);
}

.developer-notes-hero h1 {
  margin: 7px 0 10px;
  font-size: 38px;
}

.developer-notes-hero p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.developer-notes-admin {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.developer-note-admin-status {
  color: var(--muted);
  font-size: 12px;
}

.developer-note-primary-button,
.developer-note-secondary-button,
.developer-note-icon-button,
.developer-note-editor-toolbar button,
.developer-note-editor-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.developer-note-primary-button {
  padding: 9px 14px;
  border-color: #80692c;
  color: #17130b;
  background: var(--accent-2);
  font-weight: 750;
}

.developer-note-secondary-button {
  padding: 9px 14px;
  color: var(--text);
  background: #111722;
}

.developer-note-primary-button:disabled,
.developer-note-secondary-button:disabled {
  opacity: .55;
  cursor: wait;
}

.developer-notes-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 20px;
}

.developer-note-board,
.developer-note-reader {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.developer-note-board {
  overflow: hidden;
  position: sticky;
  top: 16px;
}

.developer-note-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #0f141e;
}

.developer-note-board-head span {
  color: var(--muted);
  font-size: 12px;
}

.developer-note-list {
  display: grid;
  max-height: calc(100vh - 240px);
  overflow: auto;
}

.developer-note-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid #232b3b;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.developer-note-list-item:last-child {
  border-bottom: 0;
}

.developer-note-list-item:hover {
  background: #171e2b;
}

.developer-note-list-item.active {
  background: rgba(255, 217, 120, .08);
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.developer-note-list-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.developer-note-list-item strong {
  overflow: hidden;
  min-width: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

.developer-note-private-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #6e5d2e;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(255, 217, 120, .08);
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.developer-note-list-item time {
  color: var(--muted);
  font-size: 11px;
}

.developer-note-reader {
  min-height: 420px;
  padding: 30px 34px 42px;
}

.developer-note-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.developer-note-reader-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.developer-note-reader-head h1 {
  margin: 5px 0 8px;
  font-size: 30px;
}

.developer-note-reader-meta {
  color: var(--muted);
  font-size: 12px;
}

.developer-note-reader-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.developer-note-content {
  padding-top: 24px;
  color: #e9edf4;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.developer-note-content h1,
.developer-note-content h2,
.developer-note-content h3,
.developer-note-content h4 {
  margin: 1.25em 0 .55em;
  color: var(--text);
  line-height: 1.3;
}

.developer-note-content h1 { font-size: 30px; }
.developer-note-content h2 { font-size: 25px; }
.developer-note-content h3 { font-size: 20px; }
.developer-note-content h4 { font-size: 17px; }
.developer-note-content p { margin: .8em 0; }
.developer-note-content a { color: #8ebdff; }
.developer-note-content blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-2);
  color: #cbd3df;
  background: #0e141e;
}
.developer-note-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border: 1px solid #30394b;
  border-radius: 10px;
}
.developer-note-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.developer-note-content th,
.developer-note-content td {
  padding: 10px 12px;
  border: 1px solid #374156;
  vertical-align: top;
}
.developer-note-content th {
  color: var(--accent-2);
  background: #101722;
}
.developer-note-content pre {
  overflow: auto;
  padding: 14px 16px;
  border-radius: 9px;
  background: #080b10;
}

.developer-note-empty,
.developer-note-empty-state {
  color: var(--muted);
}

.developer-note-empty {
  margin: 0;
  padding: 22px 18px;
  font-size: 13px;
}

.developer-note-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 350px;
  text-align: center;
}

.developer-note-empty-state strong {
  color: var(--text);
  font-size: 20px;
}

.developer-note-dialog {
  width: min(1100px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #394357;
  border-radius: 16px;
  color: var(--text);
  background: #10151f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.developer-note-dialog::backdrop {
  background: rgba(0, 0, 0, .7);
}

.developer-note-login-dialog {
  width: min(460px, calc(100vw - 32px));
}

.developer-note-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.developer-note-dialog-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.developer-note-icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: #141b27;
  font-size: 22px;
}

.developer-note-login-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.developer-note-login-form label,
.developer-note-title-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.developer-note-login-form input,
.developer-note-title-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #354056;
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #0b1018;
  font: inherit;
}

.developer-note-login-form input:focus,
.developer-note-title-field input:focus {
  border-color: #80692c;
  box-shadow: 0 0 0 2px rgba(255, 217, 120, .08);
}

.developer-note-form-error {
  min-height: 18px;
  margin: 0;
  color: #e98b94;
  font-size: 12px;
}

.developer-note-editor-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.developer-note-editor-meta-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.developer-note-private-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #354056;
  border-radius: 8px;
  color: var(--text);
  background: #0b1018;
  cursor: pointer;
}

.developer-note-private-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 16px;
  accent-color: var(--accent-2);
}

.developer-note-private-field span {
  display: grid;
  gap: 2px;
}

.developer-note-private-field strong {
  font-size: 12px;
}

.developer-note-private-field small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.developer-note-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 9px;
  border: 1px solid #303a4d;
  border-radius: 10px;
  background: #0d121b;
}

.developer-note-editor-toolbar button,
.developer-note-editor-toolbar select {
  min-height: 32px;
  padding: 6px 9px;
  color: #dce3ee;
  background: #151c28;
}

.developer-note-editor-toolbar button:hover,
.developer-note-editor-toolbar select:hover {
  border-color: #66572d;
  color: var(--accent-2);
}

.developer-note-color-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dce3ee;
  background: #151c28;
  font-size: 12px;
}

.developer-note-color-tool input {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.developer-note-toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #313a4c;
}

.developer-note-editor {
  min-height: 480px;
  max-height: 62vh;
  overflow: auto;
  padding: 22px;
  border: 1px solid #354056;
  border-radius: 10px;
  outline: none;
  color: #edf1f7;
  background: #0a0f17;
  line-height: 1.75;
}

.developer-note-editor:focus {
  border-color: #80692c;
}

.developer-note-editor:empty::before {
  content: attr(data-placeholder);
  color: #697487;
  pointer-events: none;
}

.developer-note-editor h1 { font-size: 30px; }
.developer-note-editor h2 { font-size: 25px; }
.developer-note-editor h3 { font-size: 20px; }
.developer-note-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto;
  border-radius: 8px;
}
.developer-note-editor table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.developer-note-editor th,
.developer-note-editor td {
  min-width: 70px;
  padding: 8px 10px;
  border: 1px solid #465169;
}
.developer-note-editor th {
  background: #151d2a;
}

.developer-note-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.developer-note-editor-footer > div {
  display: flex;
  gap: 8px;
}

.developer-note-editor-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 820px) {
  .developer-notes-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .developer-notes-admin {
    justify-content: flex-start;
  }
  .developer-notes-shell {
    grid-template-columns: 1fr;
  }
  .developer-note-board {
    position: static;
  }
  .developer-note-list {
    max-height: 280px;
  }
  .developer-note-reader {
    padding: 24px 20px 34px;
  }
  .developer-note-reader-head {
    flex-direction: column;
  }
  .developer-note-editor-meta-fields {
    grid-template-columns: 1fr;
  }
  .developer-note-private-field {
    justify-self: stretch;
  }
  .developer-note-editor {
    min-height: 380px;
  }
}

@media (max-width: 560px) {
  .developer-notes-layout {
    padding: 24px 14px 60px;
  }
  .developer-notes-hero {
    padding: 22px 20px;
  }
  .developer-notes-hero h1 {
    font-size: 32px;
  }
  .developer-note-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .developer-note-editor-footer > div {
    justify-content: flex-end;
  }
}
