/* Studio E-book V13: nomes isolados; não alteram a tipografia ou cores do livro. */
#textReviewPanel{position:fixed;right:12px;top:72px;bottom:15px;width:min(430px,calc(100vw - 24px));z-index:30000;display:flex;flex-direction:column;border:1px solid #ccdaee;border-radius:17px;background:#fff;color:#172b4d;box-shadow:0 18px 55px #18274735;font:14px/1.45 Inter,system-ui,Arial,sans-serif;overflow:hidden}
#textReviewPanel[hidden]{display:none!important}
.tr-head{background:#edf3ff;padding:12px 15px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.tr-head h2{font-size:17px;line-height:1.3;margin:0;color:#203f81}
.tr-body{padding:13px 15px;overflow:auto;min-height:0;flex:1}
.tr-label{display:block;font-size:12px;color:#596b86;margin:9px 0 3px;font-weight:650}
.tr-input,.tr-select{font:inherit;color:#172b4d;background:white;border:1px solid #cbd5e5;border-radius:9px;padding:8px;width:100%;min-width:0;box-sizing:border-box}
.tr-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.tr-btn{font:inherit;font-weight:650;font-size:12px;padding:8px 10px;border-radius:9px;border:1px solid #cad6e7;color:#28509a;background:white;cursor:pointer;max-width:100%}
.tr-btn:disabled{opacity:.5;cursor:not-allowed}.tr-primary{color:#fff;background:#2855ad;border-color:#2855ad}.tr-danger{color:#ab2d30}
.tr-muted{color:#65728b;font-size:12px}.tr-summary{padding:10px 12px;background:#f2f6fd;border-radius:9px;margin:12px 0;line-height:1.65}
.tr-result{border:1px solid #d7e1ee;border-radius:10px;margin:9px 0;padding:10px;background:#fff;overflow-wrap:anywhere}
.tr-result strong{color:#182f60}.tr-result small{font-size:11px;color:#607391}.tr-result .tr-context{padding:7px 8px;background:#f6f9fd;border-radius:6px;margin:7px 0}
.tr-result.tr-stale{opacity:.65}.tr-results{margin-top:10px}.tr-status{min-height:20px;font-size:12px;margin-top:10px;color:#355690}
.tr-progress{height:6px;border-radius:9px;background:#e4e9f1;margin:6px 0}.tr-progress > div{height:100%;background:#366ad4;border-radius:9px;width:0%}
.tr-dictionary{border-top:1px solid #dae2ef;margin-top:14px;padding-top:8px}.tr-words{max-height:130px;overflow:auto;padding:4px 0}.tr-word{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 0;border-bottom:1px solid #f0f3f8;font-size:12px}
.tr-word button{font:inherit;background:none;border:0;color:#a43b3b;cursor:pointer}.tr-note{background:#fff8e9;padding:9px 11px;border-radius:8px;color:#78550d;margin:9px 0;font-size:12px}
.tr-input-row{display:flex;gap:6px}.tr-input-row > .tr-input{flex:1}.tr-input-row > .tr-select{width:40%}
#textReviewBtn{white-space:nowrap}
@media(max-width:750px){#textReviewPanel{top:5px;bottom:5px;right:5px;width:calc(100vw - 10px)}.tr-body{padding:10px}}
/* Custom Highlight API: marcações efêmeras que NÃO modificam o HTML exportado. */
::highlight(studio-review-spelling){text-decoration:underline wavy #d23b43;text-decoration-thickness:1.5px;text-underline-offset:3px;background:#fdd3d322}
::highlight(studio-review-grammar){text-decoration:underline wavy #3d70ca;text-underline-offset:3px;background:#dceaff33}
::highlight(studio-review-other){text-decoration:underline dashed #b47c19;text-underline-offset:3px;background:#fff2d633}
/* Sobrescreve apenas cores do painel quando a interface global está escura. */
body.dark-mode #textReviewPanel,body.theme-dark #textReviewPanel,body.dark #textReviewPanel{color:#172b4d;background:white}

/* Ajuda do Vivaldi e campo isolado de teste da correção nativa */
#textReviewPanel .tr-native-help{margin:10px 0;padding:10px;border-radius:9px;border:1px solid #d5e1f2;background:#f5f8ff;color:#314566}
#textReviewPanel .tr-native-help summary{cursor:pointer;font-size:12px}
#textReviewPanel .tr-native-help p{font-size:11px;line-height:1.65;margin:8px 0}
#textReviewPanel .tr-native-test{display:block;box-sizing:border-box;width:100%;min-height:60px;padding:9px;border:1px solid #c9d8eb;border-radius:7px;background:#fff;color:#1c2d45;font:13px/1.5 Inter,sans-serif;resize:vertical}
#textReviewPanel .tr-native-help .tr-native-note{color:#64748b}
body.dark-ui #textReviewPanel .tr-native-help{background:#26334b;border-color:#435a7f;color:#dce7fc}
body.dark-ui #textReviewPanel .tr-native-test{background:#172234;color:#f3f7ff;border-color:#4b648b}
