/* Private reader highlights, V5.0. No third-party font or network asset. */
.tgf-re-hl-module, .tgf-re-hl-module * {box-sizing:border-box}
.tgf-re-hl-module {border-top:1px solid #dce4eb;margin-top:12px;padding-top:8px;font-family:inherit;color:#263644;}
.tgf-re-hl-module__summary {display:flex;align-items:center;gap:12px;cursor:pointer;font-size:14px;font-weight:650;min-height:44px;list-style:revert;}
.tgf-re-hl-count {font-size:12px;font-weight:400;color:#657480;margin-left:auto;}
.tgf-re-hl-module__body {padding:4px 0 12px;}
.tgf-re-hl-intro, .tgf-re-hl-help {font-size:13px;line-height:1.5;color:#526575;margin:0 0 12px;}
.tgf-re-hl-examples {font-size:12px;color:#526575;margin:0 0 12px;}
.tgf-re-hl-examples summary {cursor:pointer;min-height:30px;color:#31536c;}
.tgf-re-hl-examples p {margin:3px 0 0;line-height:1.5;}
.tgf-re-hl-module__actions {display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px;}
.tgf-re-hl-module button:not(.tgf-re-hl-swatch),.tgf-re-hl-popover button:not(.tgf-re-hl-swatch),.tgf-re-hl-dialog button {border:1px solid #b8c4cd;border-radius:6px;background:#fff;color:#293b49;min-height:44px;padding:8px 12px;cursor:pointer;font:inherit;font-size:13px;box-shadow:none;text-transform:none;}
.tgf-re-hl-visibility {display:inline-flex;align-items:center;gap:8px;font-size:13px;cursor:pointer;margin:0;}
.tgf-re-hl-visibility input {width:18px;height:18px;accent-color:#275d89;}
.tgf-re-hl-status {font-size:12px;line-height:1.5;color:#526575;}
.tgf-re-hl-status:empty {display:none;}
.tgf-re-hl-items {padding:0;margin:0;list-style:none;max-height:290px;overflow:auto;}
.tgf-re-hl-item {display:flex;gap:9px;align-items:center;padding:9px 0;border-top:1px solid #e1e5e9;}
.tgf-re-hl-dot {width:18px;height:18px;flex:0 0 18px;border:1px solid #a8b4bc;border-radius:3px;}
.tgf-re-hl-item__info {flex:1;min-width:0;display:grid;gap:3px;}
.tgf-re-hl-item__label {font-size:12px;font-weight:600;color:#263948;overflow-wrap:anywhere;}
.tgf-re-hl-item__excerpt {font-size:12px;color:#64737e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tgf-re-hl-module .tgf-re-hl-remove {min-height:38px!important;font-size:12px!important;padding:6px 9px!important;}
.tgf-re-hl-empty {font-size:13px;color:#667480;margin:0;}
.tgf-re-hl-popover[hidden], .tgf-re-hl-all[hidden] {display:none!important;}
.tgf-re-hl-popover {box-sizing:border-box;position:absolute;z-index:99999;width:min(420px,calc(100vw - 24px));max-height:min(70vh,500px);overflow:auto;background:#fff;color:#203341;border:1px solid #b8c4cd;border-radius:9px;box-shadow:0 6px 24px rgba(20,31,39,.17);padding:10px;font:14px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.tgf-re-hl-popover__title {display:flex;align-items:center;justify-content:space-between;font-weight:650;font-size:13px;margin-bottom:7px;}
.tgf-re-hl-popover .tgf-re-hl-close {min-height:32px!important;min-width:32px;padding:3px!important;font-size:22px!important;border:0!important;margin-left:auto;}
.tgf-re-hl-swatches {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;}
.tgf-re-hl-swatches--all {grid-template-columns:repeat(5,minmax(0,1fr));margin-top:10px;}
.tgf-re-hl-swatch {display:grid;justify-items:center;align-content:center;gap:5px;padding:5px 2px!important;margin:0!important;min-height:56px;border:1px solid transparent!important;border-radius:6px;background:transparent!important;color:#2b3947!important;box-shadow:none!important;cursor:pointer!important;font:inherit;font-size:10px!important;text-transform:none!important;min-width:0;}
.tgf-re-hl-swatch:hover,.tgf-re-hl-swatch:focus-visible {border-color:#7e929f!important;background:#f6f8fa!important;}
.tgf-re-hl-swatch__color {display:block;width:27px;height:27px;background:var(--tgf-color);border:1px solid #aab5bf;border-radius:5px;}
.tgf-re-hl-swatch__name {display:block;width:100%;overflow:hidden;text-overflow:ellipsis;text-align:center;white-space:nowrap;line-height:1.2;}
.tgf-re-hl-popover__actions {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;}
.tgf-re-hl-popover__actions button {flex:1;font-size:12px!important;}
.tgf-re-hl-dialog {border:1px solid #b6c2cb;background:#fff;color:#243747;border-radius:10px;width:min(700px,calc(100vw - 24px));max-height:min(85vh,800px);padding:18px;box-shadow:0 15px 60px rgba(14,24,32,.26);font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.tgf-re-hl-dialog::backdrop {background:rgba(19,29,41,.50);}
.tgf-re-hl-dialog h2 {font-size:20px;line-height:1.3;margin:0 0 7px;color:#243747;}
.tgf-re-hl-manage-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:60vh;overflow-y:auto;padding:3px;}
.tgf-re-hl-manage-row {display:flex;gap:10px;align-items:center;color:#2d4050;font-size:13px;min-width:0;}
.tgf-re-hl-manage-chip {width:34px;height:36px;min-width:34px;border-radius:5px;border:1px solid #a6b2bb;}
.tgf-re-hl-manage-fields {min-width:0;display:grid;gap:4px;flex:1;}
.tgf-re-hl-default-name {font-size:12px;font-weight:650;}
.tgf-re-hl-manage-fields input {box-sizing:border-box;width:100%;min-width:0;max-width:none;min-height:42px;border:1px solid #b7c5ce;border-radius:5px;padding:7px 9px;background:#fff;color:#263848;font:inherit;font-size:13px;}
.tgf-re-hl-manage-actions {display:flex;gap:10px;justify-content:flex-end;border-top:1px solid #e2e6ea;margin-top:14px;padding-top:14px;}
.tgf-re-hl-dialog button.tgf-re-hl-primary {background:#244a68;color:#fff;border-color:#244a68;}
.tgf-re-hl-popover :is(button):focus-visible, .tgf-re-hl-dialog :is(button,input):focus-visible, .tgf-re-hl-module :is(button,input,summary):focus-visible {outline:3px solid #225b8b!important;outline-offset:2px;}
.tgf-re-fallback-highlight {box-decoration-break:clone;-webkit-box-decoration-break:clone;}
@media(max-width:600px){
  .tgf-re-hl-popover {position:fixed;width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:55dvh;}
  .tgf-re-hl-swatches {grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;}
  .tgf-re-hl-swatch__color {width:24px;height:24px;}
  .tgf-re-hl-manage-grid {grid-template-columns:minmax(0,1fr);max-height:55vh;}
  .tgf-re-hl-dialog {padding:12px;}
}
@media print { .tgf-re-hl-popover,.tgf-re-hl-dialog,.tgf-re-hl-module {display:none!important;} .tgf-re-fallback-highlight {background:transparent!important;color:inherit!important;} }
@media(prefers-reduced-motion:reduce){.tgf-re-hl-popover,.tgf-re-hl-dialog {transition:none!important;}}

/* CSS Custom Highlights preserve text DOM and survive layout/style changes. */
::highlight(tgf-re-color-0) {background-color:#FFF0AC;color:#152333;}
::highlight(tgf-re-color-1) {background-color:#FFE0B5;color:#152333;}
::highlight(tgf-re-color-2) {background-color:#FFD0C3;color:#152333;}
::highlight(tgf-re-color-3) {background-color:#FBD5E6;color:#152333;}
::highlight(tgf-re-color-4) {background-color:#F6CAD8;color:#152333;}
::highlight(tgf-re-color-5) {background-color:#EFCFF1;color:#152333;}
::highlight(tgf-re-color-6) {background-color:#E6D5FD;color:#152333;}
::highlight(tgf-re-color-7) {background-color:#DDD5FF;color:#152333;}
::highlight(tgf-re-color-8) {background-color:#D5DEFF;color:#152333;}
::highlight(tgf-re-color-9) {background-color:#D0E8FD;color:#152333;}
::highlight(tgf-re-color-10) {background-color:#D5F0FB;color:#152333;}
::highlight(tgf-re-color-11) {background-color:#C8EDED;color:#152333;}
::highlight(tgf-re-color-12) {background-color:#CDEFE4;color:#152333;}
::highlight(tgf-re-color-13) {background-color:#D5F1D2;color:#152333;}
::highlight(tgf-re-color-14) {background-color:#DDECCB;color:#152333;}
::highlight(tgf-re-color-15) {background-color:#E7F1BB;color:#152333;}
::highlight(tgf-re-color-16) {background-color:#F4E9CB;color:#152333;}
::highlight(tgf-re-color-17) {background-color:#EAD9C9;color:#152333;}
::highlight(tgf-re-color-18) {background-color:#DCE5EE;color:#152333;}
::highlight(tgf-re-color-19) {background-color:#E8E8E8;color:#152333;}
@media print {
  ::highlight(tgf-re-color-0) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-1) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-2) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-3) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-4) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-5) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-6) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-7) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-8) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-9) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-10) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-11) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-12) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-13) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-14) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-15) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-16) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-17) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-18) {background-color:transparent;color:inherit;}
  ::highlight(tgf-re-color-19) {background-color:transparent;color:inherit;}
}

/* Compact, accessible private notes and cross-article retrieval. */
.tgf-re-visually-hidden {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.tgf-re-hl-choices[hidden],.tgf-re-hl-existing-info[hidden],.tgf-re-hl-hover[hidden]{display:none!important;}
.tgf-re-hl-choices {margin-top:8px;border-top:1px solid #e1e7eb;padding-top:8px;}
.tgf-re-hl-selection-actions {display:flex;gap:7px;align-items:center;}
.tgf-re-hl-selection-actions button {flex:1;min-width:0;font-size:12px!important;min-height:44px!important;padding:7px 9px!important;}
.tgf-re-hl-existing-info {display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 0 8px;font-size:12px;font-weight:600;}
.tgf-re-hl-existing-note {flex-basis:100%;font-size:12px;font-weight:400;color:#4b5c69;overflow-wrap:anywhere;}
.tgf-re-hl-hover {position:fixed;z-index:99998;display:flex;align-items:flex-start;gap:8px;max-width:min(290px,calc(100vw - 24px));padding:9px 11px;border:1px solid #bcc8cf;border-radius:7px;background:#fff;color:#263947;font:12px/1.45 system-ui,sans-serif;box-shadow:0 5px 15px rgba(25,36,48,.16);pointer-events:none;}
.tgf-re-hl-hover span:last-child {display:grid;gap:2px;min-width:0;overflow-wrap:anywhere;}
.tgf-re-hl-hover__chip {display:inline-flex;align-items:center;justify-content:center;flex:0 0 19px;width:19px;height:19px;border:1px solid #abb7c0;border-radius:4px;font-size:10px;color:#253847;}
.tgf-re-hl-item {align-items:flex-start;}
.tgf-re-hl-item__actions {display:flex;align-items:center;gap:5px;flex-wrap:wrap;}
.tgf-re-hl-item__actions button {min-height:38px!important;padding:6px 8px!important;font-size:12px!important;}
.tgf-re-hl-item__note {font-size:12px;line-height:1.4;color:#3c5364;overflow-wrap:anywhere;max-width:100%;}
.tgf-re-hl-dot--note {font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;}
.tgf-re-note-form {display:grid;gap:9px;}
.tgf-re-note-form label {font-weight:600;font-size:13px;}
.tgf-re-note-excerpt {margin:7px 0 13px;padding:7px 10px;background:#f5f7f8;border-left:3px solid #899cac;line-height:1.5;font-size:13px;overflow-wrap:anywhere;}
.tgf-re-note-form textarea {width:100%;max-width:100%;min-height:116px;box-sizing:border-box;border:1px solid #b6c3cc;border-radius:6px;padding:10px;color:#243847;background:#fff;font:14px/1.5 system-ui,sans-serif;}
.tgf-re-note-hint {font-size:12px;color:#556876;margin:0;}
.tgf-re-collection {width:min(770px,calc(100vw - 18px));max-height:88vh;overflow:auto;}
.tgf-re-collection__header {display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px;}
.tgf-re-collection__header h2 {margin:0;}
.tgf-re-collection__controls {display:grid;grid-template-columns:minmax(76px,1fr) minmax(94px,110px) minmax(94px,110px);gap:7px;align-items:center;min-width:0;}
.tgf-re-collection__controls :is(input,select) {box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;border:1px solid #b8c5ce;border-radius:7px;background:#fff;color:#253747;padding:7px 9px;font:13px/1.3 system-ui,sans-serif;}
.tgf-re-collection__controls input {text-overflow:ellipsis;}
.tgf-re-collection__controls :is(input,select):focus-visible,.tgf-re-note-form textarea:focus-visible {outline:3px solid #275d89;outline-offset:2px;}
.tgf-re-collection__results {overflow:auto;max-height:55vh;}
.tgf-re-collection__list {list-style:none;padding:0;margin:0;}
.tgf-re-collection__item {padding:12px 0;border-top:1px solid #e2e7ec;font-size:13px;overflow-wrap:anywhere;}
.tgf-re-collection__item strong {display:block;font-size:14px;color:#203748;margin-bottom:5px;}
.tgf-re-collection__tag {display:inline-block;border-radius:5px;border:1px solid #c4cbd1;background:var(--tag-color,#fff);padding:2px 6px;font-size:11px;color:#263747;}
.tgf-re-collection__item p {margin:7px 0;font-size:13px;line-height:1.5;color:#354b5c;}
.tgf-re-collection__note {border-left:2px solid #a7b8c5;padding-left:8px;}
.tgf-re-collection__item a {display:inline-flex;align-items:center;min-height:44px;color:#245c86;text-decoration:underline;text-underline-offset:3px;}
::highlight(tgf-re-return) {background-color:#b7dbf8;color:#132c42;}
@media(max-width:420px){
 .tgf-re-hl-dialog {padding:10px;}
 .tgf-re-collection__controls {grid-template-columns:minmax(65px,1fr) minmax(80px,87px) minmax(78px,87px);gap:4px;}
 .tgf-re-collection__controls :is(input,select) {font-size:11px;padding:6px 5px;}
 .tgf-re-hl-item {flex-wrap:wrap;}
 .tgf-re-hl-item__actions {width:100%;padding-left:25px;}
 .tgf-re-hl-item__actions button {flex:1;}
 .tgf-re-hl-selection-actions {gap:4px;}
 .tgf-re-hl-selection-actions button {font-size:11px!important;}
}
@media print { .tgf-re-hl-hover,.tgf-re-collection,.tgf-re-note-dialog {display:none!important;}::highlight(tgf-re-return){background-color:transparent!important;color:inherit!important;} }

/* V5.0: one saved-highlights area and integrated, opt-in Meaning action. */
.tgf-re-hl-module__actions {justify-content:flex-end;gap:10px;}
.tgf-re-hl-module__actions .tgf-re-hl-browse {background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:3px;color:#31536c;}
.tgf-re-hl-meaning-trigger {margin-left:auto;min-height:34px!important;padding:4px 10px!important;font-size:12px!important;}
.tgf-re-hl-popover .tgf-re-hl-close {margin-left:0;}
.tgf-re-hl-meaning-panel {margin-top:9px;padding:11px 12px;border:1px solid #dce5eb;border-radius:7px;background:#fbfcfd;line-height:1.5;overflow-wrap:anywhere;}
.tgf-re-hl-meaning-panel[hidden],.tgf-re-hl-meaning-trigger[hidden] {display:none!important;}
.tgf-re-hl-meaning-term {display:block;font-size:14px;margin-bottom:6px;font-weight:650;}
.tgf-re-hl-meaning-definitions {margin:0 0 4px;padding-left:20px;}
.tgf-re-hl-meaning-definitions li {margin:0 0 5px;}
.tgf-re-hl-meaning-source {font-size:11px;line-height:1.5;color:#526575;margin-top:7px;}
.tgf-re-hl-meaning-source a {color:#275b7c;text-decoration:underline;text-underline-offset:2px;}
.tgf-re-hl-meaning-privacy {display:block;}
@media(max-width:420px){.tgf-re-hl-module__actions{justify-content:flex-start;}}
@media print {.tgf-re-hl-meaning-panel{display:none!important;}}

::highlight(tgf-re-color-20) {background-color:#FFE06B;color:#172733;}

::highlight(tgf-re-color-21) {background-color:#FFC078;color:#172733;}

::highlight(tgf-re-color-22) {background-color:#FFA08A;color:#172733;}

::highlight(tgf-re-color-23) {background-color:#F5A9C9;color:#172733;}

::highlight(tgf-re-color-24) {background-color:#D3ADFA;color:#172733;}

::highlight(tgf-re-color-25) {background-color:#A4B5FF;color:#172733;}

::highlight(tgf-re-color-26) {background-color:#83DAD2;color:#172733;}

::highlight(tgf-re-color-27) {background-color:#A4DF97;color:#172733;}

::highlight(tgf-re-color-28) {background-color:#D3E87E;color:#172733;}

::highlight(tgf-re-color-29) {background-color:#94D6FF;color:#172733;}

::highlight(tgf-re-color-30) {background-color:#936100;color:#FFFFFF;}

::highlight(tgf-re-color-31) {background-color:#9B512E;color:#FFFFFF;}

::highlight(tgf-re-color-32) {background-color:#A83255;color:#FFFFFF;}

::highlight(tgf-re-color-33) {background-color:#793E8C;color:#FFFFFF;}

::highlight(tgf-re-color-34) {background-color:#5845A4;color:#FFFFFF;}

::highlight(tgf-re-color-35) {background-color:#2F5A9B;color:#FFFFFF;}

::highlight(tgf-re-color-36) {background-color:#146776;color:#FFFFFF;}

::highlight(tgf-re-color-37) {background-color:#397047;color:#FFFFFF;}

::highlight(tgf-re-color-38) {background-color:#606827;color:#FFFFFF;}

::highlight(tgf-re-color-39) {background-color:#485567;color:#FFFFFF;}

@media (forced-colors:active) {
::highlight(tgf-re-color-20) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-21) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-22) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-23) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-24) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-25) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-26) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-27) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-28) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-29) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-30) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-31) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-32) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-33) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-34) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-35) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-36) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-37) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-38) {background-color:Highlight;color:HighlightText;}
::highlight(tgf-re-color-39) {background-color:Highlight;color:HighlightText;}
}

/* TGF Reader 1.4: Kindle-style, contextual word meanings */
.tgf-re-hl-popover__title:empty{display:none!important;}
.tgf-re-hl-meaning-panel{padding:10px 11px!important;max-height:260px;overflow:auto;background:#fff!important;}
.tgf-re-hl-meaning-head{display:grid;gap:4px;}
.tgf-re-hl-meaning-label{font-size:11px;text-transform:none;color:#667887;}
.tgf-re-hl-meaning-word{display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.tgf-re-hl-meaning-term{font-size:17px!important;line-height:1.35;margin:0!important;color:#243747;}
.tgf-re-hl-meaning-phonetic{font-size:11px;color:#647584;}
.tgf-re-hl-popover .tgf-re-hl-meaning-audio{min-height:32px!important;min-width:32px!important;padding:2px 6px!important;border:0!important;font-size:13px!important;margin-left:auto;}
.tgf-re-hl-meaning-audio[hidden]{display:none!important;}
.tgf-re-hl-meaning-primary{font-size:13px;line-height:1.6;margin:8px 0 0;}
.tgf-re-hl-meaning-more{margin-top:7px;font-size:12px;}
.tgf-re-hl-meaning-more summary{cursor:pointer;color:#315b77;min-height:30px;padding:4px 0;}
.tgf-re-hl-meaning-definitions{margin:4px 0!important;padding-left:18px!important;}
.tgf-re-hl-meaning-source{margin-top:8px!important;font-size:10px!important;}
.tgf-re-hl-meaning-privacy{margin-top:4px;}
@media(max-width:600px){.tgf-re-hl-meaning-panel{max-height:32vh;}}


/* v1.5.7 | Give empty highlights state comfortable separation from filters. */
.tgf-re-collection{box-sizing:border-box}
.tgf-re-collection__controls{margin-bottom:16px}
.tgf-re-collection__results{padding-top:3px}
.tgf-re-collection__results>.tgf-re-hl-empty{
  margin:4px 0 10px;padding:2px 2px 0;
  font-size:14px;line-height:1.6;
}
@media(max-width:420px){
  .tgf-re-collection{width:calc(100vw - 48px);max-width:100%}
  .tgf-re-collection__controls{margin-bottom:14px}
}

/* v1.6.3: mobile action and annotation panel are positioned by selected text. */
.tgf-re-hl-mobile-action {display:none!important;}
@media (max-width:600px) {
  .tgf-re-hl-mobile-action:not([hidden]) {
    position:fixed!important;z-index:99990!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:auto!important;max-width:calc(100vw - 20px)!important;
    min-height:44px!important;padding:9px 12px!important;
    border:1px solid #284b64!important;border-radius:22px!important;
    color:#fff!important;background:#284b64!important;
    box-shadow:0 4px 16px rgba(18,38,51,.20)!important;
    font:600 13px/1.35 system-ui,sans-serif!important;
    cursor:pointer!important;
  }
  .tgf-re-hl-mobile-action:focus-visible {outline:3px solid #f2c85f!important;outline-offset:2px!important;}
  .tgf-re-hl-popover {max-height:55dvh;overscroll-behavior:contain;}
}
@media print {.tgf-re-hl-mobile-action {display:none!important;}}

/* v1.6.5: Stable, scrollable color selection panel. Scrolling and touch do not
   dismiss the palette; explicit Close or selecting a swatch ends the action. */
.tgf-re-hl-popover--palette-open {
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}
.tgf-re-hl-popover--palette-open .tgf-re-hl-popover__title {
  position:sticky;top:0;z-index:2;
  background:#fff;padding:4px 0 7px;
}
@media(max-width:600px){
  .tgf-re-hl-popover--palette-open {
    position:fixed!important;
    width:min(420px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    border-radius:10px!important;
    box-shadow:0 10px 38px rgba(16,31,43,.24)!important;
    padding:11px!important;
  }
  .tgf-re-hl-popover--palette-open .tgf-re-hl-swatch {min-height:56px!important;}
}

/* v1.6.6 | Independent, compact highlights and notes sections. */
.tgf-re-hl-list {display:grid;gap:0;}
.tgf-re-hl-subsection {border-top:1px solid #e2e8ed;min-width:0;}
.tgf-re-hl-subsection__toggle {
  display:flex!important;align-items:center!important;width:100%!important;gap:10px!important;
  min-height:44px!important;padding:10px 4px!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;background:transparent!important;text-align:left!important;
  color:#263b4c!important;font-size:13px!important;font-weight:600!important;
}
.tgf-re-hl-subsection__toggle:hover {background:#f6f9fa!important;}
.tgf-re-hl-subsection__count {font-size:12px;font-weight:400;color:#5d7180;}
.tgf-re-hl-subsection__chevron {width:17px;height:17px;flex:0 0 17px;margin-left:auto;transition:transform .16s ease;}
.tgf-re-hl-subsection__toggle[aria-expanded="true"] .tgf-re-hl-subsection__chevron {transform:rotate(180deg);}
.tgf-re-hl-subsection__body {min-width:0;padding:0 4px 10px;}
.tgf-re-hl-subsection .tgf-re-hl-items {max-height:min(35vh,260px);overflow-y:auto;overscroll-behavior:contain;}
.tgf-re-hl-subsection .tgf-re-hl-item:first-child {border-top:0;}
.tgf-re-hl-subsection .tgf-re-hl-empty {padding:8px 0 12px;}
@media(prefers-reduced-motion:reduce){.tgf-re-hl-subsection__chevron{transition:none;}}

/* Private-note visual anchors, without permanently editing article markup. */
::highlight(tgf-re-note-marker) {
  text-decoration-line:underline;
  text-decoration-style:dotted;
  text-decoration-color:#49728a;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.tgf-re-fallback-note-marker {
  text-decoration-line:underline!important;
  text-decoration-style:dotted!important;
  text-decoration-color:#49728a!important;
  text-decoration-thickness:2px!important;
  text-underline-offset:3px!important;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.tgf-re-hl-popover .tgf-re-hl-existing-edit {
  flex-basis:100%;min-height:38px!important;padding:6px 10px!important;
  font-size:12px!important;margin-top:3px;text-align:left;
}
@media (forced-colors:active) {
  ::highlight(tgf-re-note-marker){text-decoration-color:CanvasText;}
  .tgf-re-fallback-note-marker{text-decoration-color:CanvasText!important;}
}
@media print {
  ::highlight(tgf-re-note-marker){text-decoration:none!important;}
  .tgf-re-fallback-note-marker{text-decoration:none!important;}
}
/* Respect the native hidden state on each per-entry action menu. */
.tgf-re-hl-item__actions[hidden] {display:none!important;}
