/* Notes live in the same quiet workspace as the paper. */
.paper-reading { --notes-width: 292px; }
.paper-reading main { transition: margin-right .15s; }
.annotation-toggle { position: fixed; top: 22px; right: 24px; z-index: 7; display: flex; align-items: center; gap: 7px; padding: 7px 11px; background: #fff; border: 1px solid #dfe6ec; border-radius: 5px; color: #526e81; font-size: 12px; box-shadow: 0 2px 8px #203e5605; }
.annotation-toggle svg { width: 15px; height: 15px; }
.annotation-toggle-count:empty { display: none; }
.annotation-toggle-count { color: #8a99a4; font-variant-numeric: tabular-nums; }
.annotations-open .annotation-toggle { display: none; }
.annotation-panel { position: fixed; right: 0; top: 0; bottom: 0; width: var(--notes-width); z-index: 8; background: #f9fbfc; border-left: 1px solid #e0e7ed; padding: 24px 18px; overflow-y: auto; overscroll-behavior: contain; font-size: 12px; line-height: 1.7; }
.annotation-panel[hidden], .annotation-selection[hidden], .annotation-notice[hidden], #annotation-editor[hidden] { display: none; }
.annotation-panel button { border: 0; background: none; color: #627b8d; font-size: 12px; padding: 3px 0; }
.annotation-panel button:hover { color: #244f6c; }
.annotation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.annotation-kicker { font-size: 9px; letter-spacing: 1.5px; color: #91a0ab; }
.paper-reading .annotation-heading h2 { font-size: 17px; margin: 4px 0 0; letter-spacing: 0; }
#annotation-count { font-size: 11px; font-weight: 400; color: #91a0ab; margin-left: 6px; }
.annotation-panel #annotation-close { font-size: 23px; padding: 2px 7px; color: #8a9aa6; }
.annotation-identity { display: flex; justify-content: space-between; color: #8696a2; font-size: 11px; margin-top: 18px; align-items: center; }
.annotation-identity button { font-size: 11px; }
.annotation-filters { display: flex; border-bottom: 1px solid #e1e8ed; margin: 13px 0 18px; gap: 20px; }
.annotation-filters button { padding: 7px 1px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.annotation-filters button[aria-pressed="true"] { color: #2e536d; border-bottom-color: #5a7b91; }
.annotation-empty { color: #8b9aa5; padding: 24px 3px 40px; }
.annotation-empty-symbol { display: block; font-size: 28px; color: #b9c8d2; margin-bottom: 12px; }
.annotation-empty strong { font-size: 13px; color: #6d8392; font-weight: 500; }
.paper-reading .annotation-empty p { font-size: 12px; margin: 8px 0; }
.annotation-card { padding: 14px 12px; background: #fff; border: 1px solid #e2e8ed; border-radius: 5px; margin: 10px 0; overflow-wrap: anywhere; }
.annotation-card.is-active { border-color: #9db4c4; box-shadow: 0 0 0 2px #ebf1f5; }
.annotation-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: #9aa8b3; }
.annotation-meta strong { color: #5b7384; font-weight: 500; }
.annotation-section-name { font-size: 10px; color: #96a3ac; margin: 5px 0 10px; }
.annotation-panel .annotation-card-quote { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; border-left: 2px solid #e2d49a; background: #fcfbf5; padding: 5px 9px; width: 100%; text-align: left; font-size: 11px; line-height: 1.8; color: #7d806f; white-space: pre-wrap; }
.paper-reading .annotation-note-text { margin: 12px 0 8px; font-size: 12px; line-height: 1.9; color: #435e71; white-space: pre-wrap; }
.paper-reading .annotation-highlight-only { color: #a1acb3; font-size: 10px; margin: 10px 0 0; }
.annotation-card-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.annotation-card-actions button { font-size: 10px; color: #8c9ba6; }
.paper-reading .annotation-unmatched { color: #967d53; font-size: 11px; }
.paper-reading .annotation-sync { border: 0; border-top: 1px solid #e0e7ed; background: transparent; border-radius: 0; padding: 14px 0 0; margin-top: 24px; font-size: 11px; }
.annotation-sync summary { font-size: 11px; color: #7d919f; }
.paper-reading .annotation-sync p { font-size: 11px; color: #8a99a4; line-height: 1.85; margin: 9px 0; }
.annotation-sync>div { display: flex; gap: 18px; }
.annotation-sync code { overflow-wrap: anywhere; }
.annotation-selection { position: fixed; display: flex; gap: 0; z-index: 15; background: #fff; border: 1px solid #d9e3e9; border-radius: 6px; padding: 4px; box-shadow: 0 4px 18px #233e5920; }
.annotation-selection button { background: none; border: 0; color: #45647a; font-size: 12px; padding: 6px 11px; border-radius: 3px; }
.annotation-selection button:hover { background: #f0f5f8; }
.annotation-mark { background: #f7edbb; color: inherit; border-radius: 2px; cursor: pointer; padding: 1px 0; }
.annotation-mark.others { background: #e5eef4; border-bottom: 1px solid #bacfdd; }
.annotation-mark.annotation-active { background: #f0df95; box-shadow: 0 1px #c6ac50; }
.annotation-mark:focus-visible { outline: 2px solid #7696ad; outline-offset: 2px; }
#annotation-editor { padding: 14px 0 20px; border-bottom: 1px solid #dce5ec; }
.annotation-editor-title { display: flex; justify-content: space-between; align-items: center; }
.annotation-editor-title strong { font-size: 12px; color: #4a677b; }
#annotation-editor blockquote { margin: 12px 0; font-size: 11px; color: #8c8b78; border-left: 2px solid #dfd39c; padding-left: 10px; max-height: 100px; overflow: auto; white-space: pre-wrap; }
#annotation-editor label { font-size: 11px; color: #708896; }
#annotation-editor label span { font-size: 10px; color: #a0acb5; }
#annotation-note { display: block; width: 100%; resize: vertical; min-height: 100px; background: #fff; border: 1px solid #d9e3ea; border-radius: 4px; padding: 9px; font: inherit; color: #36546a; margin: 7px 0 10px; }
#annotation-note::placeholder { color: #a3afb8; }
.annotation-panel .annotation-save { border: 1px solid #d3dfe7; background: #eef4f8; color: #3a607a; padding: 6px 13px; border-radius: 4px; }
.annotation-notice { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; max-width: min(580px,90vw); border: 1px solid #dce5eb; border-radius: 6px; background: #fff; color: #526f82; box-shadow: 0 5px 25px #24425918; padding: 10px 16px; font-size: 12px; }
.annotation-notice button { border: 0; background: none; color: #386889; font-size: 12px; margin-left: 14px; }
.annotation-profile-dialog { width: min(420px,90vw); padding: 26px; color: #506b7e; }
.paper-reading .annotation-profile-dialog h2 { font-size: 20px; margin: 0 0 10px; }
.paper-reading .annotation-profile-dialog p { font-size: 12px; }
.annotation-profile-dialog label { display: block; font-size: 12px; }
.annotation-profile-dialog input { width: 100%; border: 1px solid #d8e2e9; border-radius: 4px; padding: 9px 10px; margin: 7px 0; font: inherit; font-size: 14px; }
.annotation-profile-dialog form>div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#annotation-profile-error { color: #987453; }
@media (min-width: 1200px) {
  .annotations-open main { margin-right: var(--notes-width); max-width: 1240px; padding: 30px 28px; }
  .annotations-open .paper-document { padding: 28px; }
  .annotations-open .split { grid-template-columns: 1fr; }
  .annotations-open .top { right: calc(var(--notes-width) + 16px); }
}
@media (min-width: 1600px) { .annotations-open .split { grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); } }
@media (max-width: 1199px) {
  .annotation-panel { width: min(336px,92vw); box-shadow: -8px 0 36px #24425913; }
  .paper-breadcrumb { padding-right: 80px; }
}
@media (max-width: 760px) {
  .annotation-toggle { top: 74px; right: 14px; padding: 5px 9px; }
  .annotation-panel { top: 61px; padding-top: 18px; }
  .paper-breadcrumb { padding-right: 72px; }
}
@media print { .annotation-panel,.annotation-toggle,.annotation-selection,.annotation-notice,.annotation-profile-dialog { display: none !important; } .annotations-open main { margin-right: 0; } }
