/* Private notes use the site's shared light and dark theme tokens. */
.notes-workspace { max-width: 960px; padding-top: 24px; overflow-wrap: anywhere; }
.notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ui-shell .notes-heading h1, .ui-shell .notes-heading h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; }
.notes-heading p { margin: 0; color: var(--ui-muted); font-size: 14px; }
.notes-heading > .btn { flex-shrink: 0; }
.notes-order { font-size: 12px; color: var(--ui-muted); margin: 0 0 12px; }
.notes-list { display: grid; gap: 14px; margin-bottom: 24px; }
.ui-shell .note-card { margin: 0; padding: 20px 24px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); min-width: 0; }
.note-card__header, .note-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--ui-muted); }
.note-security { display: inline-flex; padding: 3px 8px; border-radius: 5px; background: var(--ui-hover); color: var(--ui-ink); font-size: 12px; font-weight: 600; }
.note-card__edit { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 13px; }
.note-card__summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; overflow-wrap: anywhere; font-size: 15px; line-height: 1.75; margin: 10px 0 12px; }
.note-card__read { display: inline-flex; min-height: 44px; align-items: center; font-size: 13px; font-weight: 600; }
.note-card__footer .ui-action-menu > summary { letter-spacing: 2px; }
.notes-empty { padding: 48px 24px; text-align: center; background: var(--ui-surface); border: 1px dashed var(--ui-line); border-radius: 10px; }
.notes-empty__icon { display: block; font-size: 32px; color: var(--ui-link); margin-bottom: 12px; }
.ui-shell .notes-empty h3 { font-size: 20px; margin: 0 0 10px; }
.notes-empty p { max-width: 48ch; margin: 0 auto 20px; color: var(--ui-muted); font-size: 14px; }
.notes-editor-page, .notes-reader { width: 100%; max-width: 860px; margin: 0 auto; }
.notes-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; margin-bottom: 18px; }
.note-context { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--ui-muted); font-size: 12px; margin-bottom: 14px; }
.note-writing-surface, .note-paper { border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); }
.note-writing-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 24px; border-bottom: 1px solid var(--ui-line); font-size: 14px; }
.note-writing-heading span { color: var(--ui-muted); font-size: 12px; }
.note-writing-surface .field-note-content { margin: 0; padding: 20px 24px 8px; }
.ui-shell .note-writing-surface textarea.form-control { border: 0; border-radius: 0; padding: 0; min-height: 300px; resize: vertical; font-size: 16px; line-height: 1.8; box-shadow: none; }
.ui-shell .note-writing-surface textarea.form-control:focus-visible { outline: 2px solid var(--ui-link); outline-offset: 6px; }
.note-format-help { padding: 0 24px 18px; font-size: 12px; color: var(--ui-muted); }
.note-format-help summary { display: list-item; min-height: 36px; cursor: pointer; padding: 8px 0; }
.note-format-help p { margin: 8px 0 0; line-height: 1.7; }
.note-attachment { margin: 20px 0; padding: 20px 24px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); }
.ui-shell .note-attachment h2 { margin: 0 0 8px; font-size: 15px; }
.note-attachment h2 span { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--ui-muted); }
.note-attachment > p { color: var(--ui-muted); font-size: 13px; margin-bottom: 16px; }
.note-attachment input[type=file] { max-width: 100%; font-size: 13px; }
.note-attachment .form-group { margin-bottom: 8px; }
.note-attachment p.note-attachment-help { font-size: 12px; margin: 0; }
.note-selected-image > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
[data-note-image-name] { overflow-wrap: anywhere; }
.note-image-current, .note-image-preview { display: block; max-width: 100%; max-height: 360px; object-fit: contain; margin: 16px 0; border-radius: 6px; }
.note-form [hidden] { display: none !important; }
.note-form-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; position: sticky; bottom: 12px; z-index: 8; padding: 16px 20px; border: 1px solid var(--ui-line); border-radius: 10px; background: var(--ui-surface); box-shadow: 0 4px 16px rgba(15,23,42,.08); }
.note-save-status { display: block; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
.note-save-shortcut { display: block; margin-top: 3px; font-size: 11px; color: var(--ui-muted); }
.note-form-buttons { display: flex; gap: 8px; margin-left: auto; }
.note-view-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.note-paper { padding: 32px 36px; }
.note-prose { font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.note-prose > :last-child { margin-bottom: 0; }
.note-prose h1, .note-prose h2, .note-prose h3 { line-height: 1.4; margin-top: 24px; }
.note-prose > :first-child { margin-top: 0; }
.note-prose blockquote { border-left: 3px solid var(--ui-line); padding-left: 16px; color: var(--ui-muted); }
.note-prose img { max-width: 100%; height: auto; }
.note-prose pre { overflow-x: auto; padding: 12px; background: var(--ui-hover); border-radius: 6px; color: var(--ui-ink); }
.note-prose table { display: block; max-width: 100%; overflow-x: auto; }
.note-prose th, .note-prose td { border: 1px solid var(--ui-line); padding: 6px 10px; }
.note-attached-image { border-top: 1px solid var(--ui-line); margin: 24px 0 0; padding-top: 8px; }
.note-attached-image figcaption { color: var(--ui-muted); font-size: 12px; }
@media (max-width: 575.98px) {
    .notes-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
    .ui-shell .notes-heading h1, .ui-shell .notes-heading h2 { font-size: 23px; }
    .ui-shell .note-card { padding: 14px 16px; }
    .note-card__header { align-items: flex-start; }
    .note-attachment-label { flex-basis: 100%; }
    .note-writing-heading { padding: 14px 16px; }
    .note-writing-surface .field-note-content { padding: 20px 16px 8px; }
    .note-format-help { padding: 0 16px 12px; }
    .note-attachment { padding: 16px; }
    .note-form-actions { padding: 12px; bottom: 8px; gap: 10px; }
    .note-form-actions > div:first-child { flex-basis: 100%; }
    .note-form-buttons { width: 100%; }
    .note-form-buttons .btn { flex: 1; }
    .note-save-shortcut { display: none; }
    .note-paper { padding: 22px 18px; }
}
