.reader-notes, .reader-note-preview, .reader-leaf-notes {
  color: var(--reader-text, #25231f);
  background: var(--reader-surface, #fffdf8);
  font-family: inherit;
  font-size: var(--reader-font-size, 18px);
  line-height: var(--reader-line-height, 1.6);
  text-align: left;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.reader-notes { margin: 2rem 0; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--reader-border, #827b6f); border-radius: .35rem; min-width: 0; }
.reader-leaf-notes { margin: .6rem 0 1rem; padding: .2rem .8rem; border: 1px solid var(--reader-border, #827b6f); border-radius: .25rem; scroll-margin-top: 5rem; }
.reader-leaf-notes summary { color: inherit; font: inherit; font-size: .85em; cursor: pointer; min-height: 44px; padding: .5rem 0; }
.reader-leaf-notes * { box-sizing: border-box; }
.reader-notes-shortcut { margin: .6rem 0; }
.reader-notes-shortcut button { color: var(--reader-accent, #684924); background: var(--reader-surface, #fffdf8); border: 1px solid var(--reader-border, #827b6f); border-radius: .25rem; font: inherit; font-size: .9rem; min-height: 44px; padding: .5rem .8rem; cursor: pointer; }
.reader-notes-shortcut button:focus-visible { outline: 3px solid var(--reader-focus, #005ea8); outline-offset: 3px; }
.reader-notes *, .reader-note-preview * { box-sizing: border-box; }
.reader-notes h2, .reader-notes h3, .reader-notes h4, .reader-note-preview h3 { color: inherit; font: inherit; font-weight: 650; line-height: 1.4; text-transform: none; letter-spacing: normal; margin: 0 0 .65em; }
.reader-notes h2 { font-size: 1.2em; }
.reader-notes p, .reader-note-preview p { margin: .6em 0; }
.reader-notes-intro, .reader-notes-muted, .reader-notes-hint, .reader-note-origin, .reader-notes-results, .reader-note-kicker { color: var(--reader-muted, #575147); font-size: .86em; }
.reader-notes-held { border-left: .2rem solid var(--reader-border, #827b6f); padding-left: .85rem; }
.reader-notes-current { margin: 1.5rem 0; scroll-margin-top: 6rem; }
.reader-note-markers { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; padding: 0; margin: .8rem 0; list-style: none; }
.reader-note-markers li { max-width: 100%; margin: 0; }
.reader-notes button, .reader-note-preview button, .reader-leaf-notes button { appearance: none; color: inherit; background: var(--reader-bg, #f6f2e9); border: 1px solid var(--reader-border, #827b6f); border-radius: .25rem; font: inherit; font-size: .85em; font-weight: 550; line-height: 1.45; min-height: 44px; padding: .55rem .75rem; text-align: left; white-space: normal; cursor: pointer; max-width: 100%; letter-spacing: normal; text-transform: none; }
.reader-note-markers button[aria-expanded="true"] { border-color: var(--reader-accent, #684924); box-shadow: inset 0 0 0 1px var(--reader-accent, #684924); }
.reader-notes a, .reader-note-preview a { color: var(--reader-accent, #684924); text-decoration: underline; text-underline-offset: .18em; }
.reader-notes :focus-visible, .reader-note-preview :focus-visible, .reader-leaf-notes :focus-visible, .reader-note-anchor:focus-visible { outline: 3px solid var(--reader-focus, #005ea8); outline-offset: 3px; }
.reader-notes summary { cursor: pointer; padding: .65rem 0; min-height: 44px; color: inherit; font: inherit; font-weight: 600; list-style: revert; }
.reader-notes-all { border-top: 1px solid var(--reader-border, #827b6f); margin-top: 1.2rem; }
.reader-notes-search-label { display: grid; gap: .4rem; font-size: .9em; margin: .8rem 0; }
.reader-notes input, .reader-notes textarea, .reader-note-preview textarea { width: 100%; min-width: 0; color: var(--reader-text, #25231f); background: var(--reader-bg, #f6f2e9); border: 1px solid var(--reader-border, #827b6f); border-radius: .25rem; font: inherit; padding: .65rem; min-height: 44px; }
.reader-notes input::placeholder { color: var(--reader-muted, #575147); opacity: 1; }
.reader-notes textarea, .reader-note-preview textarea { resize: vertical; overflow-wrap: anywhere; }
.reader-notes-page { margin: .5rem 0; border-top: 1px solid var(--reader-border, #827b6f); }
.reader-note-card { padding: 1.2rem 0; border-top: 1px dotted var(--reader-border, #827b6f); scroll-margin-top: 6rem; }
.reader-note-prose { white-space: pre-wrap; max-width: var(--reader-measure, 68ch); font-size: inherit; line-height: inherit; }
.reader-note-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.reader-note-copy { font-size: .9em; }
.reader-note-copy label { display: grid; gap: .5rem; margin: 1rem 0; }
.reader-note-anchor { text-decoration: underline dotted; text-decoration-color: var(--reader-accent, currentColor); text-underline-offset: .22em; cursor: pointer; border-radius: .1rem; }
.reader-note-preview { position: fixed; z-index: 1200; max-width: calc(100vw - 24px); max-height: min(70vh, 38rem, var(--reader-note-space, 70vh)); max-height: min(70dvh, 38rem, var(--reader-note-space, 70dvh)); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--reader-border, #827b6f); border-radius: .4rem; padding: 1rem; box-shadow: 0 .5rem 2rem rgb(0 0 0 / .22); }
.reader-note-preview-toolbar { position: sticky; top: -1rem; z-index: 1; background: var(--reader-surface, #fffdf8); display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .8rem; padding: .4rem 0; }
.reader-note-preview-toolbar .reader-note-kicker { flex: 1 1 100%; }
.reader-note-preview[hidden], .reader-notes [hidden] { display: none !important; }
html[data-reader-menus="hidden"] :is(.reader-leaf-notes, .reader-notes-shortcut, .reader-notes-search-label, .reader-notes-results, .reader-note-actions, .reader-notes-current > button, .reader-notes-hint) { display: none !important; }
@media (max-width: 480px) {
  .reader-notes { padding: .8rem; margin: 1.25rem 0; }
  .reader-note-markers { display: grid; }
  .reader-note-markers button { width: 100%; }
  .reader-note-preview { padding: .8rem; }
}
@media (forced-colors: active) {
  .reader-note-anchor { text-decoration-color: LinkText; }
  .reader-notes button, .reader-note-preview button { border-color: ButtonText; }
}
@media print {
  .reader-note-preview, .reader-note-actions, .reader-notes-search-label { display: none !important; }
  .reader-notes { break-before: auto; color: #000; background: #fff; }
}
