/* LIBRAS+ 0.3.1: catalog-driven videos overlay the static illustrated character. */
#librasplus-root { position: static; --lp-blue:#0649aa; --lp-navy:#063883; --lp-green:#34f030; }
#librasplus-root *, #librasplus-root *::before, #librasplus-root *::after { box-sizing:border-box; }
#librasplus-root button, #librasplus-root textarea, #librasplus-root select { font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
#librasplus-root .lp-launcher { position:fixed; z-index:1084; right:16px; top:50%; transform:translateY(-50%); width:40px; height:40px; padding:4px; border:2px solid #2ad83b; border-radius:8px; background:linear-gradient(135deg,#126cdd,#063b9f); color:#fff; box-shadow:0 4px 13px #071b3650; font-size:11px; font-weight:800; line-height:1.05; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
#librasplus-root .lp-launcher:active { cursor:grabbing; }
#librasplus-root .lp-launcher:focus-visible { outline:3px solid #ffb64a; outline-offset:2px; }
#librasplus-root .lp-launch-icon { width:30px; height:30px; display:block; color:#fff; pointer-events:none; flex-shrink:0; }
#librasplus-root .lp-plus { color:#55f443; }
#librasplus-root .lp-dialog { z-index:1083; position:fixed; width:min(300px,calc(100vw - 16px)); height:min(480px,calc(100vh - 16px)); height:min(480px,calc(100dvh - 16px)); max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); max-height:calc(100dvh - 16px); background:#fff; border:1px solid #b9cbe5; border-radius:15px; box-shadow:0 10px 30px #001c4f4d; color:#13284b; font:12px/1.35 system-ui,-apple-system,"Segoe UI",sans-serif; overflow:hidden; display:flex; flex-direction:column; }
#librasplus-root .lp-dialog[hidden] { display:none!important; }
#librasplus-root .lp-dialog.lp-expanded { width:min(450px,calc(100vw - 16px)); height:min(670px,calc(100dvh - 16px)); }
#librasplus-root .lp-dialog.lp-minimized { height:auto!important; }
#librasplus-root .lp-dialog.lp-minimized .lp-content { display:none; }
#librasplus-root .lp-header { flex:none; min-height:44px; background:linear-gradient(115deg,#073787,#0661d8); border-radius:13px 13px 0 0; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:4px 8px 4px 11px; color:#fff; }
#librasplus-root .lp-brand { font-size:19px; font-weight:850; line-height:1; white-space:nowrap; letter-spacing:-.5px; }
#librasplus-root .lp-brand > span:first-child { font-size:18px; vertical-align:1px; }
#librasplus-root .lp-header-actions { display:flex; align-items:center; gap:1px; }
#librasplus-root .lp-header-actions button { border:0; background:transparent; color:#fff; font-size:23px; line-height:1; width:30px; height:32px; border-radius:6px; cursor:pointer; }
#librasplus-root .lp-header-actions button:hover, #librasplus-root .lp-header-actions button:focus-visible { background:#ffffff2e; }
#librasplus-root .lp-content { flex:1; display:flex; flex-direction:column; min-height:0; gap:5px; padding:7px; }
#librasplus-root .lp-stage { flex:0 1 275px; min-height:130px; position:relative; background:linear-gradient(130deg,#c8dcff 0%,#77b3fc 100%); border-radius:12px; overflow:hidden; }
#librasplus-root .lp-avatar-image { display:block; position:absolute; height:95%; width:auto; max-width:75%; bottom:0; left:50%; transform:translateX(-50%); object-fit:contain; object-position:bottom; mix-blend-mode:multiply; pointer-events:none; }
#librasplus-root .lp-stage-chip { position:absolute; left:8px; top:8px; padding:2px 5px; color:#17447f; background:#f4f9ffd9; border-radius:5px; font-size:9px; font-weight:650; }
#librasplus-root .lp-media-controls { position:absolute; top:8px; right:7px; display:flex; flex-direction:column; gap:5px; }
#librasplus-root .lp-media-controls button { background:#fff; color:#0a51b2; border:1px solid #e1e9fb; border-radius:8px; box-shadow:0 2px 5px #08295535; width:30px; height:30px; padding:0; font-size:18px; font-weight:800; cursor:pointer; }
#librasplus-root .lp-media-controls #lp-speed { font-size:10px; }
#librasplus-root .lp-media-controls button:disabled { opacity:.55; cursor:not-allowed; }
#librasplus-root .lp-character { position:absolute; bottom:6px; right:6px; z-index:2; }
#librasplus-root #lp-character-toggle { display:flex; gap:5px; align-items:center; background:#064cbb; color:#fff; border:1px solid #38d938; border-radius:20px; padding:3px 9px 3px 4px; font-weight:700; font-size:10px; min-height:30px; cursor:pointer; }
#librasplus-root #lp-character-toggle img { width:22px; height:22px; border-radius:50%; object-fit:cover; background:#fff; }
#librasplus-root .lp-character-menu { position:absolute; bottom:35px; right:0; width:min(215px,calc(100vw - 40px)); background:#fff; border:1px solid #b6c7e0; border-radius:10px; box-shadow:0 6px 20px #11386a50; padding:7px; color:#1d385c; }
#librasplus-root .lp-character-menu[hidden] { display:none!important; }
#librasplus-root .lp-character-title { font-size:10px; font-weight:800; padding:3px 3px 6px; }
#librasplus-root .lp-character-selected { width:100%; display:flex; align-items:center; gap:6px; padding:5px 6px; background:#d8ffdb; border:1px solid #66ce72; border-radius:7px; font-size:11px; font-weight:750; color:#173b2b; cursor:pointer; }
#librasplus-root .lp-character-selected img { width:24px; height:24px; object-fit:cover; border-radius:50%; background:#fff; }
#librasplus-root .lp-character-selected span { margin-left:auto; color:#168924; }
#librasplus-root .lp-filter-section { flex:none; position:relative; z-index:6; border-radius:9px; background:#e3ffdf; padding:5px; }
#librasplus-root .lp-filterbar { display:flex; gap:7px; align-items:center; min-height:33px; }
#librasplus-root .lp-filter-label { color:#0c2646; font-size:12px; font-weight:800; white-space:nowrap; }
#librasplus-root .lp-filter-toggle { flex:1; min-width:0; border:1px solid #8aa7d0; height:31px; border-radius:7px; background:#fff; color:#113d83; padding:3px 7px; font-size:12px; font-weight:750; display:flex; align-items:center; justify-content:space-between; text-align:left; cursor:pointer; }
#librasplus-root .lp-filter-toggle[aria-expanded="true"] { border-color:#0865d9; box-shadow:0 0 0 1px #0865d9; }
#librasplus-root .lp-filter-menu { position:absolute; z-index:20; bottom:calc(100% - 4px); right:5px; left:40px; background:white; border:1px solid #a8c3e6; border-radius:10px; box-shadow:0 8px 20px #173c7160; padding:5px; display:grid; gap:2px; }
#librasplus-root .lp-filter-menu[hidden], #librasplus-root .lp-filter-composer[hidden] { display:none!important; }
#librasplus-root .lp-filter-menu button { background:#fff; color:#0b3e89; border:0; border-radius:6px; padding:8px 7px; font-size:12px; font-weight:650; text-align:left; cursor:pointer; }
#librasplus-root .lp-filter-menu button[aria-current="true"], #librasplus-root .lp-filter-menu button:hover { background:#d2e4ff; }
#librasplus-root .lp-filter-composer { border-top:1px solid #cae9cf; padding:6px 1px 1px; }
#librasplus-root .lp-composer { display:flex; gap:5px; align-items:stretch; min-height:64px; }
#librasplus-root #lp-query { flex:1; width:100%; min-width:0; min-height:64px; padding:7px 8px; margin:0; border:1px solid #9cb6df; background:#fff; border-radius:7px; color:#19324e; font-size:11px; line-height:1.35; resize:vertical; max-height:90px; }
#librasplus-root #lp-query::placeholder { color:#667486; }
#librasplus-root .lp-find { flex:none; align-self:stretch; width:36px; padding:0; background:#086ce9; color:#fff; border:0; border-radius:7px; font-size:22px; cursor:pointer; }
#librasplus-root .lp-find:hover { background:#064da6; }
#librasplus-root .lp-counter { margin-top:2px; text-align:right; font-size:9px; color:#475466; }
#librasplus-root .lp-dialog.lp-active-translate .lp-stage { flex-basis:200px; }
#librasplus-root .lp-details { flex:1; min-height:0; overflow-y:auto; padding:2px 4px; scrollbar-width:thin; }
#librasplus-root .lp-details [hidden] { display:none!important; }
#librasplus-root .lp-results { width:100%; }
#librasplus-root .lp-details p { margin:3px 0 7px; }
#librasplus-root .lp-muted { font-size:10px; color:#4a627b; }
#librasplus-root .lp-result { padding:7px; margin:4px 0 7px; border:1px solid #cbdced; border-radius:8px; background:#f7fbff; }
#librasplus-root .lp-result h4 { font-size:12px; color:#0b458e; margin:0 0 6px; }
#librasplus-root .lp-result video { width:100%; max-height:145px; border-radius:7px; background:#15283a; }
#librasplus-root .lp-result p { font-size:10px; }
#librasplus-root .lp-list-entry { width:100%; display:block; padding:6px; margin:3px 0; text-align:left; font-size:11px; color:#0a4791; background:#f7fbff; border:1px solid #c4d8f2; border-radius:7px; cursor:pointer; }
#librasplus-root .lp-reset-position { color:#08438f; border:1px solid #9eb2c8; padding:5px; border-radius:7px; background:#fff; font-size:11px; cursor:pointer; }
#librasplus-root .lp-disclaimer { flex:none; text-align:center; padding:0; margin:0; font-size:9px; line-height:1.1; color:#697589; }
#librasplus-root .lp-sr-only { 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; }
#librasplus-root button:focus-visible, #librasplus-root select:focus-visible, #librasplus-root textarea:focus-visible { outline:2px solid #ffbc3b; outline-offset:2px; }
#librasplus-root .lp-dialog.lp-expanded .lp-stage { flex-basis: min(355px,52dvh); }
#librasplus-root .lp-dialog.lp-expanded.lp-active-translate .lp-stage { flex-basis: min(280px,42dvh); }
/* On short or narrow screens the avatar may shrink, while the editor stays in the Filter. */
@media (max-height:570px) { #librasplus-root .lp-dialog.lp-active-translate .lp-stage { flex-basis:135px; min-height:95px; } }
@media (max-height:390px) { #librasplus-root .lp-dialog.lp-active-translate .lp-stage { flex-basis:82px; min-height:65px; } }
/* Site-wide admin layout from the existing plugin remains unchanged. */
.lp-admin { margin:0 auto 40px; max-width:1000px; }
.lp-admin-card { border:1px solid #d1dfed; background:#fff; padding:18px; border-radius:12px; margin:15px 0; }
.lp-admin-card h3 { color:#093a7a; font-size:1.2rem; }
.lp-admin-card label { display:block; font-weight:650; margin:12px 0 5px; }
.lp-admin-card .form-control { width:100%; max-width:850px; }
.lp-admin-card small { color:#617285; }
.lp-admin-checkbox { display:flex; gap:9px; align-items:center; margin:15px 0; }
.lp-admin-checkbox label { margin:0; }
.lp-admin-table { width:100%; }
.lp-admin-back { margin:18px; }
@media (max-height:570px) { #librasplus-root .lp-stage { flex-basis:140px; } #librasplus-root .lp-disclaimer { display:none; } }
@media (max-height:390px) { #librasplus-root .lp-stage { flex-basis:80px; } #librasplus-root .lp-stage-chip, #librasplus-root .lp-disclaimer { display:none; } }
@media (max-width:480px) { #librasplus-root .lp-dialog { width:min(300px,calc(100vw - 12px)); } #librasplus-root .lp-launcher { width:40px; height:40px; border-radius:8px; } }

#librasplus-root .lp-filter-menu .lp-restore-defaults { border-top:1px solid #c6d7e9; border-radius:3px 3px 6px 6px; padding-top:10px; font-weight:750; color:#18548b; }

/* Library clips replace the static avatar only while the real signed video is active. */
#librasplus-root .lp-avatar-video { position:absolute; z-index:1; inset:0; width:100%; height:100%; object-fit:contain; background:#152c4d; }
#librasplus-root .lp-avatar-video[hidden] { display:none!important; }
#librasplus-root .lp-stage.lp-with-video .lp-avatar-image { visibility:hidden; }
#librasplus-root .lp-stage.lp-with-video .lp-stage-chip { display:none; }
#librasplus-root .lp-stage-status { position:absolute; z-index:3; bottom:40px; left:6px; right:6px; padding:3px 5px; text-align:left; background:#042a5dd9; color:#fff; border-radius:5px; font-size:10px; pointer-events:none; }
#librasplus-root .lp-stage-status[hidden] { display:none!important; }
#librasplus-root .lp-media-controls { z-index:4; }
#librasplus-root .lp-character { z-index:5; }
#librasplus-root .lp-coverage { font-weight:700; color:#0a437d; }
#librasplus-root .lp-warning { padding:6px; border:1px solid #e8b45b; background:#fff9ed; border-radius:6px; color:#66450a; font-size:10px; }
#librasplus-root .lp-play-sequence { display:block; width:100%; border:1px solid #2b6ad7; border-radius:7px; background:#eaf2ff; color:#084584; padding:6px; font-size:11px; font-weight:750; text-align:left; cursor:pointer; }
#librasplus-root .lp-clip-step { display:block; text-align:left; padding:4px 5px; border:1px solid #cedcec; border-radius:6px; background:#f4f8ff; margin:3px 0; font-size:10px; color:#1c4d87; width:100%; cursor:pointer; }

/* This applies only while the user points at an eligible page text element.
 * The cursor image supplied by the user replaces the standard arrow; no layout changes.
 * The final point of the speech-pin is the click hotspot. */
.lp-page-text-cursor {
    cursor: url('assets/cursor-duas-maos.png') 19 39, pointer !important;
}

/* LIBRAS+ 0.5.0: opt-in 3D calibration preview; disabled until explicitly started. */
#librasplus-root .lp-avatar-3d { position:absolute; z-index:1; inset:0; width:100%; height:100%; background:transparent; }
#librasplus-root .lp-avatar-3d[hidden] { display:none!important; }
#librasplus-root .lp-stage.lp-with-3d .lp-avatar-image { visibility:hidden; }
#librasplus-root .lp-stage.lp-with-3d .lp-stage-chip { background:#fff3cc; color:#6b4800; }
#librasplus-root .lp-3d-settings { border-top:1px solid #ccd9e8; margin-top:9px; padding-top:8px; font-size:11px; }
#librasplus-root .lp-3d-settings > strong { display:block; margin-bottom:5px; }
#librasplus-root .lp-3d-settings button { margin:4px 4px 4px 0; }
#librasplus-root .lp-3d-settings select { display:block; width:100%; max-width:100%; padding:5px; margin:5px 0; border:1px solid #9eb2c8; background:#fff; border-radius:6px; color:#1c385c; font-size:11px; }
#librasplus-root #lp-preview3d-status { min-height:14px; color:#5d4105; font-size:10px; line-height:1.3; }
#librasplus-root #lp-preview3d-controls[hidden] { display:none!important; }
