:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.82);
  --hover: rgba(255, 255, 255, 0.055);
  --selected: rgba(255, 255, 255, 0.09);
  --button-bg: #ffffff;
  --button-fg: #000000;
  --danger: #ff8c8c;
  --backdrop: rgba(0, 0, 0, 0.68);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  --font-sans: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", "Roboto Mono", "Consolas", monospace;
}

[data-theme="light"] {
  --bg: #ffffff;
  --fg: #000000;
  --muted: rgba(0, 0, 0, 0.5);
  --line: rgba(0, 0, 0, 0.16);
  --line-strong: rgba(0, 0, 0, 0.82);
  --hover: rgba(0, 0, 0, 0.04);
  --selected: rgba(0, 0, 0, 0.07);
  --button-bg: #000000;
  --button-fg: #ffffff;
  --danger: #b42318;
  --backdrop: rgba(255, 255, 255, 0.68);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notes-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  animation: notes-in 450ms ease both;
}

@keyframes notes-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes note-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* -------------------------------------------------------------------------- */
/* Top bar                                                                    */
/* -------------------------------------------------------------------------- */

.notes-topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  border-bottom: 1px solid var(--line);
}

.notes-brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
}

.notes-brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.notes-brand > span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.notes-top-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line);
  background: var(--hover);
  color: var(--fg);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.theme-icon--moon {
  display: none;
}

[data-theme="light"] .theme-icon--sun {
  display: none;
}

[data-theme="light"] .theme-icon--moon {
  display: block;
}

.notes-auth-button {
  height: 32px;
  margin-left: 5px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--fg);
  font-size: 10px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.notes-auth-button:hover,
.notes-auth-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--hover);
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.notes-main {
  flex: 1;
}

.notes-hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(44px, 7vw, 86px) 0 clamp(35px, 5vw, 58px);
}

.notes-hero-copy {
  min-width: 0;
}

.notes-kicker {
  margin: 0 0 17px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.notes-hero h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 102px);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.notes-subtitle {
  max-width: 360px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.notes-new-button {
  display: inline-flex;
  flex: none;
  gap: 7px;
  align-items: center;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--fg);
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 11px;
  line-height: 1;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.notes-new-button:hover,
.notes-new-button:focus-visible {
  opacity: 0.82;
  transform: translateY(-1px);
}

.notes-new-button span {
  font-size: 17px;
  font-weight: 300;
  line-height: 0.8;
}

/* -------------------------------------------------------------------------- */
/* Toolbar                                                                    */
/* -------------------------------------------------------------------------- */

.notes-toolbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notes-tabs {
  display: flex;
  gap: 26px;
  align-items: stretch;
  height: 50px;
}

.notes-tab {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.notes-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: transparent;
  content: "";
}

.notes-tab:hover,
.notes-tab:focus-visible,
.notes-tab.is-active {
  color: var(--fg);
}

.notes-tab.is-active::after {
  background: var(--fg);
}

.notes-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
}

.notes-tab-lock {
  display: inline-flex;
  width: 13px;
  height: 13px;
}

.notes-tab-lock svg {
  width: 13px;
  height: 13px;
}

.notes-search {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 190px;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  transition: border-color 160ms ease;
}

.notes-search:focus-within {
  border-bottom-color: var(--line-strong);
  color: var(--fg);
}

.notes-search svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.notes-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-size: 11px;
}

.notes-search input::placeholder {
  color: var(--muted);
}

/* -------------------------------------------------------------------------- */
/* Notes                                                                      */
/* -------------------------------------------------------------------------- */

.notes-content {
  flex: 1;
  padding: 28px 0 50px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  display: flex;
  flex-direction: column;
  min-height: 208px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  animation: note-card-in 400ms ease both;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.note-card:hover,
.note-card:focus-visible {
  border-color: var(--line-strong);
  background: var(--hover);
  transform: translateY(-2px);
}

.note-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.note-card-scope {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.note-card-scope svg {
  width: 11px;
  height: 11px;
}

.note-card h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 25px 0 10px;
  color: var(--fg);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: pre-line;
}

.note-card-footer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.note-tag {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
}

.note-card-read {
  flex: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notes-empty,
.notes-private-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
}

.notes-empty-icon,
.notes-gate-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.notes-empty h2,
.notes-private-gate h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.notes-empty p,
.notes-private-gate p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.notes-empty-button,
.notes-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin-top: 20px;
  padding: 0 16px;
  border: 1px solid var(--fg);
  border-radius: 5px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 11px;
  transition: opacity 160ms ease;
}

.notes-primary-button:hover,
.notes-primary-button:focus-visible {
  opacity: 0.82;
}

.notes-primary-button.is-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--bg);
}

.notes-private-gate .notes-kicker {
  margin-bottom: 13px;
}

.notes-private-gate h2 {
  margin-bottom: 8px;
}

.notes-private-gate .notes-primary-button {
  width: auto;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.notes-footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* Dialogs                                                                    */
/* -------------------------------------------------------------------------- */

.notes-dialog,
.notes-reader {
  width: min(92vw, 420px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.notes-dialog[open],
.notes-reader[open] {
  animation: dialog-in 180ms ease-out both;
}

.notes-dialog::backdrop,
.notes-reader::backdrop {
  background: var(--backdrop);
}

.notes-dialog form {
  padding: 27px;
}

.notes-dialog h2,
.notes-reader h2 {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.13;
}

.notes-dialog-copy {
  max-width: 300px;
  margin: 0 0 21px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.notes-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.notes-field span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.notes-field input,
.notes-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.notes-field input {
  height: 42px;
}

.notes-field textarea {
  min-height: 210px;
  max-height: 52vh;
  font-family: var(--font-sans);
}

.notes-field input:focus,
.notes-field textarea:focus {
  border-color: var(--line-strong);
}

.notes-field input::placeholder,
.notes-field textarea::placeholder {
  color: var(--muted);
}

.notes-error {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.4;
}

.notes-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 15px;
}

.notes-delete-attachments {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  cursor: pointer;
}

.notes-delete-attachments input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--fg);
}

.notes-dialog-actions .notes-primary-button {
  margin-top: 0;
}

.notes-ghost-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--fg);
  font-size: 11px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.notes-ghost-button:hover,
.notes-ghost-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--hover);
}

.notes-ghost-button.is-danger {
  color: var(--danger);
}

.notes-close-button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}

.notes-close-button:hover,
.notes-close-button:focus-visible {
  background: var(--hover);
  color: var(--fg);
}

/* Editor */

.notes-editor {
  width: min(94vw, 760px);
}

.notes-editor form {
  max-height: 88vh;
  overflow-y: auto;
}

.notes-editor-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.notes-editor-head .notes-kicker {
  margin-bottom: 9px;
}

.notes-editor-head h2 {
  margin-bottom: 0;
}

.notes-editor .notes-field--body {
  margin-top: 16px;
}

.notes-format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.notes-format-button {
  display: inline-grid;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.notes-format-button:hover,
.notes-format-button:focus-visible {
  background: var(--hover);
  color: var(--fg);
}

.notes-format-button:disabled {
  cursor: wait;
  opacity: 0.4;
}

.notes-format-button strong {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
}

.notes-format-button em {
  font-family: var(--font-sans);
  font-size: 13px;
}

.notes-format-button svg {
  width: 13px;
  height: 13px;
}

.notes-format-strike {
  font-family: var(--font-sans);
  font-size: 12px;
  text-decoration: line-through;
}

.notes-format-divider {
  width: 1px;
  height: 16px;
  margin: 0 3px;
  background: var(--line);
}

.notes-format-hint {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.5;
}

.notes-upload-status {
  min-height: 13px;
  margin: -2px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.45;
}

.notes-upload-status.is-error {
  color: var(--danger);
}

.notes-editor .notes-field textarea {
  min-height: 250px;
}

/* Reader */

.notes-reader {
  width: min(94vw, 780px);
  max-height: 88vh;
}

.notes-reader[open] {
  display: flex;
  flex-direction: column;
}

.notes-reader-head {
  display: flex;
  flex: none;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.notes-reader-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.notes-reader-actions .notes-ghost-button {
  height: 30px;
  padding: 0 10px;
  font-size: 10px;
}

.notes-scope-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notes-reader-body {
  min-height: 0;
  padding: 28px 30px 36px;
  overflow-y: auto;
}

.notes-reader-body h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 45px);
}

.notes-reader-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.notes-reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 18px;
}

.notes-reader-content {
  margin-top: 28px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.notes-reader-content > :first-child {
  margin-top: 0;
}

.notes-reader-content > :last-child {
  margin-bottom: 0;
}

.notes-reader-content p {
  margin: 0 0 1.1em;
}

.notes-reader-content h3,
.notes-reader-content h4,
.notes-reader-content h5,
.notes-reader-content h6 {
  margin: 1.6em 0 0.55em;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.notes-reader-content h3 {
  font-size: 24px;
}

.notes-reader-content h4 {
  font-size: 20px;
}

.notes-reader-content h5,
.notes-reader-content h6 {
  font-size: 16px;
}

.notes-reader-content ul,
.notes-reader-content ol {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
}

.notes-reader-content li {
  margin: 0.28em 0;
}

.notes-reader-content li.is-task {
  list-style: none;
}

.notes-reader-content li.is-task input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--fg);
  vertical-align: -1px;
}

.notes-reader-content blockquote {
  margin: 1.2em 0;
  padding-left: 1em;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
}

.notes-reader-content hr {
  height: 1px;
  margin: 1.8em 0;
  border: 0;
  background: var(--line);
}

.notes-reader-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.notes-reader-content strong {
  font-weight: 600;
}

.notes-reader-content code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.notes-reader-content .code-block {
  margin: 1.2em 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--hover);
}

.code-block-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px 5px 12px;
  border-bottom: 1px solid var(--line);
}

.code-lang {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.code-copy {
  flex: none;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.code-copy:hover,
.code-copy:focus-visible {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--fg);
}

.code-copy.is-copied {
  border-color: var(--line-strong);
  color: var(--fg);
}

.notes-reader-content .code-block pre {
  margin: 0;
  padding: 13px 14px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.6;
}

.notes-reader-content .code-block pre code {
  padding: 0;
  border: 0;
  font-size: 11px;
}

.tok-comment {
  color: var(--muted);
  font-style: italic;
}

.tok-string {
  color: var(--fg);
  opacity: 0.72;
}

.tok-number {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

.tok-keyword {
  color: var(--fg);
  font-weight: 600;
}

.tok-boolean {
  color: var(--fg);
  font-style: italic;
}

.tok-function {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tok-tag {
  color: var(--fg);
  font-weight: 500;
}

.tok-attr {
  color: var(--muted);
}

.notes-reader-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.2em 0;
  border-radius: 6px;
}

.notes-reader-content del {
  color: var(--muted);
}

.notes-reader-content:empty::before {
  color: var(--muted);
  content: "（无正文）";
}

/* Confirm */

.notes-confirm {
  width: min(92vw, 400px);
}

/* Fallback */

.notes-noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .notes-shell {
    width: min(100% - 30px, 620px);
    min-height: 100svh;
  }

  .notes-topbar {
    min-height: 68px;
  }

  .notes-brand-copy small {
    display: none;
  }

  .notes-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding: 38px 0 32px;
  }

  .notes-hero h1 {
    font-size: clamp(54px, 17vw, 78px);
  }

  .notes-new-button {
    height: 36px;
  }

  .notes-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
  }

  .notes-tabs {
    height: 40px;
  }

  .notes-search {
    flex-basis: 100%;
    order: 2;
    width: 100%;
    padding: 2px 0 5px;
  }

  .notes-content {
    padding: 18px 0 34px;
  }

  .notes-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .note-card {
    min-height: 180px;
    padding: 18px;
    border-radius: 12px;
  }

  .note-card h2 {
    margin-top: 21px;
  }

  .notes-empty,
  .notes-private-gate {
    min-height: 290px;
    padding: 38px 18px;
    border-radius: 12px;
  }

  .notes-footer {
    min-height: 46px;
    font-size: 7px;
  }

  .notes-footer span:last-child {
    display: none;
  }

  .notes-dialog,
  .notes-reader {
    width: calc(100vw - 20px);
    max-height: 92svh;
    border-radius: 12px;
  }

  .notes-dialog form {
    padding: 22px 18px;
  }

  .notes-reader-body {
    padding: 22px 18px 28px;
  }

  .notes-reader-head {
    padding: 10px 12px;
  }

  .notes-editor form {
    max-height: 94svh;
  }

  .notes-field textarea {
    max-height: 44vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
