.notes-page {
  --notes-bg: #07152d;
  --notes-line: rgba(190, 220, 255, .22);
  --notes-text: #f3f7ff;
  --notes-muted: #afc1df;
  --notes-accent: #ff7a18;
  --notes-focus: #67d9ed;
  min-height: 100vh;
  background: var(--notes-bg);
  color: var(--notes-text);
  color-scheme: dark;
  font: 14px system-ui, sans-serif;
}
html:has(.notes-page) {
  background: #07152d;
}
body:has(> .notes-page) {
  min-height: 100%;
  margin: 0;
  background: #07152d;
  color: #f3f7ff;
}
.notes-page *,
.notes-module * {
  box-sizing: border-box;
}
.notes-page .notes-header {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--notes-line);
  background: #05132b;
}
.notes-page .notes-header h1,
.notes-page .notes-header p {
  margin: 0;
}
.notes-page .notes-header h1 {
  font-size: 18px;
}
.notes-page .notes-header p {
  color: var(--notes-muted);
  font-size: 12px;
}
.notes-page .notes-header a {
  color: var(--notes-text);
  text-decoration: none;
  font-size: 24px;
  line-height: 1;
}
.notes-page .notes-home {
  margin-left: auto;
}
.notes-page .notes-content {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 20px 65px;
}
.notes-module {
  width: min(760px, 100%);
  margin: 0 auto;
  color: var(--wr-text, var(--text, #f3f7ff));
}
.notes-module .notes-content {
  width: 100%;
  margin: 0;
  padding: 0;
}
.notes-page .notes-content h2,
.notes-module .notes-content h2 {
  margin: 0 0 16px;
  font-size: 21px;
}
.notes-page .notes-form,
.notes-module .notes-form {
  display: grid;
  gap: 8px;
}
.notes-page .notes-form label,
.notes-module .notes-form label {
  color: var(--wr-text-muted, var(--muted, #afc1df));
  font-size: 12px;
  font-weight: 600;
}
.notes-page .notes-audience,
.notes-module .notes-audience {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--wr-line, var(--line, var(--notes-line, rgba(190, 220, 255, .22))));
  border-radius: 5px;
}
.notes-page .notes-audience legend,
.notes-module .notes-audience legend {
  padding: 0 4px;
  color: var(--wr-text-muted, var(--muted, #afc1df));
  font-size: 12px;
  font-weight: 600;
}
.notes-page .notes-form .notes-audience-mode,
.notes-module .notes-form .notes-audience-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--wr-text, var(--text, var(--notes-text, #f3f7ff)));
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.notes-page .notes-audience-mode input,
.notes-module .notes-audience-mode input {
  margin: 0;
  accent-color: var(--wr-accent, var(--accent, #ff7a18));
}
.notes-page .notes-audience-dialog,
.notes-module .notes-audience-dialog {
  width: min(460px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(82vh, 640px);
  margin: auto;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--wr-line, var(--line, var(--notes-line, rgba(190, 220, 255, .22))));
  border-radius: 9px;
  background: var(--panel, var(--panel-soft, #102447));
  color: var(--wr-text, var(--text, var(--notes-text, #f3f7ff)));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
}
.notes-page .notes-audience-dialog::backdrop,
.notes-module .notes-audience-dialog::backdrop {
  background: rgba(4, 12, 28, .48);
  backdrop-filter: blur(2px);
}
.notes-page .notes-audience-dialog h3,
.notes-module .notes-audience-dialog h3 {
  margin: 0 0 12px;
  color: inherit;
  font-size: 17px;
}
.notes-page .notes-audience-dialog-actions,
.notes-module .notes-audience-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.notes-page .notes-audience-dialog .notes-dialog-cancel,
.notes-module .notes-audience-dialog .notes-dialog-cancel {
  border-color: var(--wr-line, var(--line, rgba(190, 220, 255, .35)));
  background: transparent;
  color: inherit;
}
.notes-page .notes-recipients-panel,
.notes-module .notes-recipients-panel {
  margin-left: 22px;
}
.notes-page .notes-recipient-list,
.notes-module .notes-recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
}
.notes-page .notes-form .notes-recipient-option,
.notes-module .notes-form .notes-recipient-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--wr-text, var(--text, var(--notes-text, #f3f7ff)));
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}
.notes-page .notes-recipient-option input,
.notes-module .notes-recipient-option input {
  margin: 0;
  accent-color: var(--wr-accent, var(--accent, #ff7a18));
}
.notes-page .notes-form-message,
.notes-module .notes-form-message {
  margin: 0;
  color: var(--wr-text-muted, var(--muted, #afc1df));
  font-size: 12px;
}
.notes-page textarea,
.notes-module textarea {
  width: 100%;
  resize: vertical;
  min-height: 100px;
  padding: 8px;
  border: 1px solid var(--wr-line, var(--line, var(--notes-line, rgba(190, 220, 255, .22))));
  border-radius: 4px;
  background: var(--panel-soft, rgba(6, 20, 43, .55));
  color: var(--wr-text, var(--text, var(--notes-text, #f3f7ff)));
  font: inherit;
}
.notes-page button,
.notes-module button {
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid var(--wr-accent, var(--accent, #ff7a18));
  border-radius: 5px;
  background: var(--wr-accent, var(--accent, #ff7a18));
  color: var(--button-text, #fff);
  font: inherit;
  cursor: pointer;
  font-weight: 700;
}
.notes-page .notes-list,
.notes-module .notes-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
.notes-page .note-item,
.notes-module .note-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--wr-line, var(--line, var(--notes-line, rgba(190, 220, 255, .22))));
  border-radius: 5px;
  background: var(--panel-soft, rgba(255, 255, 255, .04));
  color: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notes-page .note-item-meta,
.notes-module .note-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-top: 7px;
  border-top: 1px solid var(--wr-line, var(--line, var(--notes-line, rgba(190, 220, 255, .22))));
  color: var(--wr-text-muted, var(--muted, var(--notes-muted, #afc1df)));
  font-size: 12px;
  line-height: 1.45;
}
.notes-page .notes-empty,
.notes-module .notes-empty {
  margin: 0;
  color: var(--wr-text-muted, var(--muted, #afc1df));
}
.notes-page button:focus-visible,
.notes-page a:focus-visible,
.notes-page textarea:focus-visible,
.notes-page input:focus-visible,
.notes-module button:focus-visible,
.notes-module textarea:focus-visible,
.notes-module input:focus-visible {
  outline: 2px solid var(--focus, var(--notes-focus, #67d9ed));
  outline-offset: 2px;
}
