.notes-panel { color: var(--text); min-width: 0; }
.notes-panel :is(h2,h3,h4,p) { overflow-wrap: anywhere; }
.notes-layout { display: grid; gap: 1rem; align-items: start; grid-template-columns: minmax(15rem, 1fr) minmax(0, 2fr); }
.notes-layout > *, .notes-field, .notes-field > *, .notes-editor-text { min-width: 0; }
.notes-layout > section { border: 1px solid var(--border); border-radius: .8rem; padding: 1rem; background: var(--panel); }
.notes-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-block: .55rem; }
.notes-field { display: grid; gap: .3rem; }
.notes-toolbar { display: grid; gap: .65rem; }
.notes-list, .notes-history { list-style: none; padding: 0; }
.notes-list li, .notes-history li { margin: .45rem 0; }
.notes-list button { width: 100%; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.notes-list button[aria-current="true"] { outline: 2px solid var(--primary); }
.notes-content { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes-content li { margin-block: .25rem; }
.notes-editor { display: grid; gap: .5rem; }
.notes-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; align-items: end; margin: .55rem 0; }
.notes-editor-row .notes-editor-text { grid-row: 2; grid-column: 1 / -1; }
.notes-editor-text { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 3rem; border: 1px solid var(--border); padding: .65rem; border-radius: .5rem; background: var(--panel); }
.notes-editor-text[data-kind="heading"] { font-size: 1.35rem; font-weight: 700; }
.notes-editor-text[data-kind="subheading"] { font-size: 1.15rem; font-weight: 700; }
.notes-editor-text[data-kind="bullet"] { list-style: disc inside; display: list-item; }
.notes-editor-text[data-kind="number"] { list-style: decimal inside; display: list-item; }
.notes-panel [role="alert"] { color: var(--sp-error-ink, var(--danger)); }
.notes-changes { font-size: .9rem; }
@media (max-width: 760px) {
  .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .notes-layout[data-detail="true"] .notes-sidebar { display: none; }
}

.notes-sharing-label { color: var(--muted); font-size: .87rem; }
.notes-collaboration-dialog { max-width: min(42rem, 94vw); width: 100%; max-height: 85dvh; overflow: auto; }
.notes-collaboration-dialog :is(ul,fieldset,input) { max-width: 100%; }
.notes-collaboration-dialog :is(li,p) { overflow-wrap: anywhere; }
.notes-collaboration-dialog form { display: grid; gap: .5rem; margin-block: .5rem; }
.notes-collaboration-dialog label:has(input[type="checkbox"]) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.notes-share-list, .notes-comment-list, .notes-notices ul { list-style: none; padding: 0; }
.notes-share-list > li, .notes-comment-list > li, .notes-notices li { border-block-start: 1px solid var(--border); padding: .55rem 0; }
.notes-comment-text { white-space: pre-wrap; }
.notes-comments textarea { width: 100%; box-sizing: border-box; }
.notes-notices summary { cursor: pointer; font-weight: 600; }
.notes-notices button { margin: .3rem .3rem 0 0; }
.notes-mobile-notices { display: none; }
@media (max-width: 760px) {
  .notes-mobile-notices { display: inline-flex; }
  .notes-sidebar .bd-folder-row:has(> .bd-category-menu[open]) { flex-wrap: wrap; }
  .notes-sidebar .bd-category-menu[open] { flex-basis: 100%; }
  .notes-sidebar .bd-category-menu[open] > summary { width: 44px; margin-inline-start: auto; }
  .notes-sidebar .bd-category-menu-options { position: static; width: 100%; }
}

.notes-files ul, .notes-library ul { list-style: none; padding: 0; }
.notes-files li, .notes-library li { padding: .4rem 0; border-block-start: 1px solid var(--border); overflow-wrap: anywhere; }
.notes-library { width: min(94vw, 46rem); max-width: 94vw; max-height: 85dvh; overflow: auto; }
.notes-library form { display: grid; gap: .5rem; margin-block: .5rem; }
.notes-library li button { margin: .2rem .35rem .2rem 0; }
.notes-viewer { overflow: auto; }
.notes-viewer h3 { overflow-wrap: anywhere; margin-block: .15rem; }
.notes-viewer-viewport { width: 100%; height: min(58dvh, 38rem); overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; background: var(--panel-soft); }
.notes-viewer-viewport:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.notes-viewer-stage { display: grid; place-items: center; }
.notes-viewer-stage img { display: block; max-width: none; max-height: none; }
.notes-viewer-stage img:not([src]) { display: none; }
.notes-viewer p:empty { display: none; }
.notes-zoom [aria-disabled="true"] { opacity: .55; }
.notes-print { display: none; }
@media print {
  body.notes-print-active > :not(.notes-print) { display: none !important; }
  body.notes-print-active > .notes-print { display: block; }
  .notes-print img { display: block; max-width: 100%; max-height: 94vh; margin: 0 auto; break-inside: avoid; }
  .notes-print img + img { break-before: page; }
}

.notes-maritime-dialog { width: min(94vw, 50rem); max-width: 94vw; max-height: 85dvh; overflow: auto; }
.notes-maritime-dialog ul { padding: 0; list-style: none; }
.notes-maritime-dialog li { padding-block: .4rem; border-block-start: 1px solid var(--border); overflow-wrap: anywhere; }
.notes-maritime-dialog form { display: grid; gap: .55rem; }
.notes-maritime-dialog :is(h3,h4,p) { overflow-wrap: anywhere; }
.notes-maritime-compare { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; }
.notes-maritime-compare section { padding: .5rem; border: 1px solid var(--border); }
@media (max-width: 600px) { .notes-maritime-compare { grid-template-columns: minmax(0,1fr); } }


.notes-category-field {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}
.notes-category-field > label { flex: 1 1 12rem; }
.notes-category-field > p { flex-basis: 100%; color: var(--sp-warning-ink); }
