::highlight(medq-highlight) { background-color: #ffe27c; color: #342b13; }
::highlight(medq-underline) { text-decoration: underline #b36a16 2px; text-underline-offset: .2em; }
mark[data-annotation-paint] { background: none; color: inherit; padding: 0; }
mark.annotation-highlight { background: #ffe27c; color: #342b13; }
mark.annotation-underline { text-decoration: underline #b36a16 2px; text-underline-offset: .2em; }
[data-annotation-section] { -webkit-user-select: text; user-select: text; }
.annotation-entry { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: 8px; }
.annotation-entry button { min-height: 44px; }
.annotation-entry [data-annotation-sync] { flex-basis: 100%; color: var(--muted); font-size: .8rem; line-height: 1.6; overflow-wrap: anywhere; }
.annotation-entry [data-annotation-sync]:empty { display: none; }
.annotation-entry button[aria-pressed=true] { background: #fff1bb; color: #594013; border-color: #a57a1b; }
body.annotation-toolbar-open #appMain::after { content: ''; display: block; height: 175px; pointer-events: none; }
#annotationToolbar { position: fixed; z-index: 95; box-sizing: border-box; max-height: 55dvh; overflow: auto; padding: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 30px #18253b35; }
#annotationToolbar[hidden] { display: none !important; }
#annotationToolbar.is-mobile { border-radius: 16px 16px 0 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
#annotationToolbar p { font-size: .8125rem; line-height: 1.6; margin: 0 0 8px; overflow-wrap: anywhere; }
#annotationToolbar .annotation-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
#annotationToolbar button { display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-height: 44px; flex: 1 0 auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 600 .875rem/1.5 system-ui,sans-serif; background: var(--surface-2); color: var(--ink); cursor: pointer; }
#annotationToolbar button:disabled { opacity: .45; cursor: default; }
#annotationToolbar button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
#annotationToolbar [data-annotation-action=highlight] { background: #ffe27c; color: #342b13; border-color: #e2bd4b; }
.annotation-swatch { display: inline-block; width: 14px; height: 14px; border: 2px solid #795810; border-radius: 3px; background: #ffe27c; }
#annotationListDialog [data-annotation-items] article { padding: 16px 0; border-top: 1px solid var(--line); }
#annotationListDialog [data-annotation-items] p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
#annotationListDialog [data-annotation-items] small { display: block; color: var(--muted); margin-bottom: 12px; }
#annotationListDialog [data-annotation-items] button { min-height: 44px; }
@media (max-width: 768px) {
  body.annotation-toolbar-open .toast { bottom: calc(var(--annotation-toolbar-height, 175px) + var(--annotation-viewport-bottom, 0px) + 10px); }
}
