/* Mathsverse CAT 38.2 — Botó NOVA persistent, local i accessible */
#mvf-root{--mvf-bg:#fff;--mvf-ink:#182d48;--mvf-sub:#50647a;--mvf-stroke:#cbdbea;--mvf-strong:#006a79;--mvf-light:#edf7fa;--mvf-focus:#ea9a1b;position:fixed;z-index:2147480000;right:max(14px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--mvf-ink);direction:ltr;pointer-events:none}
html[data-theme=dark] #mvf-root,html[data-theme=night] #mvf-root,html[data-mode=dark] #mvf-root{--mvf-bg:#152540;--mvf-ink:#f3f8fe;--mvf-sub:#b9cbe2;--mvf-stroke:#48617d;--mvf-strong:#7de0e3;--mvf-light:#203655}
@media (prefers-color-scheme:dark){html:not([data-theme]) #mvf-root{--mvf-bg:#152540;--mvf-ink:#f3f8fe;--mvf-sub:#b9cbe2;--mvf-stroke:#48617d;--mvf-strong:#7de0e3;--mvf-light:#203655}}
#mvf-root *,#mvf-root *::before,#mvf-root *::after{box-sizing:border-box}
#mvf-root .mvf-launch{pointer-events:auto;display:flex;gap:8px;align-items:center;justify-content:center;margin-left:auto;width:auto;min-width:104px;height:52px;padding:0 17px;background:linear-gradient(120deg,#007c86,#354da4);color:white;border:2px solid rgba(255,255,255,.75);box-shadow:0 8px 26px #0006;border-radius:999px;font:800 16px system-ui,sans-serif;cursor:pointer}
#mvf-root .mvf-launch span[aria-hidden]{font-size:21px}#mvf-root .mvf-panel{pointer-events:auto;display:none;position:absolute;right:0;bottom:66px;width:min(430px,calc(100vw - 24px));height:min(670px,calc(100dvh - 118px));max-height:80vh;background:var(--mvf-bg);color:var(--mvf-ink);border:1px solid var(--mvf-stroke);border-radius:19px;box-shadow:0 15px 54px #0008;overflow:hidden;flex-direction:column;isolation:isolate}
#mvf-root[data-open=true] .mvf-panel{display:flex}
#mvf-root .mvf-head{background:linear-gradient(110deg,#006a76,#3045a1);color:white;padding:13px 14px;display:flex;gap:8px;align-items:center;justify-content:space-between}
#mvf-root .mvf-heading{font:800 17px system-ui,sans-serif;margin:0;color:white}#mvf-root .mvf-subheading{font-size:11px;color:#e9faff}#mvf-root .mvf-close{background:#ffffff21;border:1px solid #ffffff55;color:white;border-radius:9px;cursor:pointer;min-width:42px;min-height:42px;font-size:22px;line-height:1}
#mvf-root .mvf-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:9px;background:var(--mvf-light);border-bottom:1px solid var(--mvf-stroke)}#mvf-root .mvf-tab{background:var(--mvf-bg);color:var(--mvf-ink);border:1px solid var(--mvf-stroke);padding:10px 5px;border-radius:9px;font:750 11px system-ui,sans-serif;min-height:42px;cursor:pointer}#mvf-root .mvf-tab[aria-selected=true]{background:#006a76;color:#fff;border-color:#006a76}
#mvf-root .mvf-body{flex:1;min-height:0;overflow:auto;padding:14px}#mvf-root .mvf-body[hidden]{display:none}#mvf-root .mvf-label{display:block;font-weight:700;font-size:13px;margin:9px 0 4px}#mvf-root textarea{width:100%;border-radius:10px;border:1px solid var(--mvf-stroke);background:var(--mvf-bg);color:var(--mvf-ink);font:14px/1.45 system-ui,sans-serif;padding:10px;resize:vertical;min-height:82px;max-height:170px}
#mvf-root .mvf-cta{display:inline-flex;align-items:center;justify-content:center;min-height:41px;border-radius:9px;background:#006a76;color:white;border:1px solid #006a76;padding:8px 12px;font-weight:750;cursor:pointer;font-size:13px;text-decoration:none;margin:5px 5px 5px 0}#mvf-root .mvf-cta.mvf-alt{background:var(--mvf-bg);color:var(--mvf-ink);border-color:var(--mvf-stroke)}#mvf-root .mvf-out{padding:12px;border:1px solid var(--mvf-stroke);border-radius:12px;background:var(--mvf-light);margin:9px 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;color:var(--mvf-ink)}#mvf-root .mvf-desc{font-size:12px;color:var(--mvf-sub);line-height:1.5;margin:8px 0}#mvf-root .mvf-embed{padding:0;overflow:hidden}#mvf-root .mvf-iframe{border:0;width:100%;height:100%;background:var(--mvf-bg)}#mvf-root button:focus-visible,#mvf-root a:focus-visible,#mvf-root textarea:focus-visible{outline:3px solid var(--mvf-focus);outline-offset:2px}#mvf-root .mvf-toolbar{padding:9px 13px;border-top:1px solid var(--mvf-stroke);background:var(--mvf-bg);display:flex;gap:7px;justify-content:space-between;align-items:center}#mvf-root .mvf-link{font-size:12px;color:var(--mvf-strong);font-weight:750;text-decoration:underline}#mvf-root .mvf-tool{background:none;color:var(--mvf-sub);border:1px solid var(--mvf-stroke);border-radius:8px;cursor:pointer;padding:6px 9px;font-size:12px}
@media (max-width:560px){#mvf-root{bottom:calc(84px + env(safe-area-inset-bottom));right:12px}#mvf-root .mvf-panel{position:fixed;bottom:calc(147px + env(safe-area-inset-bottom));right:12px;left:12px;width:auto;height:min(640px,calc(100dvh - 165px));max-height:none}#mvf-root .mvf-launch{height:50px;min-width:102px}#mvf-root .mvf-body{padding:12px}#mvf-root .mvf-embed{padding:0}}
@media (max-height:550px){#mvf-root .mvf-panel{position:fixed;inset:8px 8px 65px 8px;width:auto;height:auto;max-height:none}}
@media print{#mvf-root{display:none!important}}

/* NOVA MathMind 40: una icona discreta i una bombolla efímera contextual. */
#mvf-root .mvf-launch{min-width:65px;width:65px;height:56px;padding:0;gap:2px;flex-direction:column;font-size:10px}
#mvf-root .mvf-launch .mvf-launch-text{font-size:10px;letter-spacing:.05em}
#mvf-root .mvf-bubble{pointer-events:auto;position:absolute;bottom:67px;right:0;width:min(340px,calc(100vw - 24px));background:var(--mvf-bg);color:var(--mvf-ink);border:1px solid var(--mvf-stroke);border-radius:17px;padding:12px 13px;box-shadow:0 12px 30px #0007;animation:mvf-bubble-in .22s ease-out}
#mvf-root .mvf-bubble[hidden]{display:none!important}
#mvf-root .mvf-bubble-head{display:flex;justify-content:space-between;align-items:center;color:var(--mvf-strong);font-size:13px}
#mvf-root .mvf-bubble-actions{display:flex;gap:4px}
#mvf-root .mvf-bubble-actions button{width:34px;height:34px;border:1px solid var(--mvf-stroke);background:var(--mvf-light);border-radius:10px;color:var(--mvf-ink);cursor:pointer;font-size:17px}
#mvf-root .mvf-bubble-text{font-size:14px;line-height:1.55;margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere;min-height:28px}
#mvf-root .mvf-bubble-foot{display:flex;gap:8px;justify-content:end;align-items:center;flex-wrap:wrap}
#mvf-root .mvf-bubble-foot button{min-height:37px;border:1px solid var(--mvf-stroke);border-radius:10px;background:var(--mvf-light);color:var(--mvf-ink);cursor:pointer;font-weight:700;font-size:12px;padding:6px 10px}
#mvf-root .mvf-bubble-foot button:last-child{background:#087b88;border-color:#087b88;color:#fff}
#mvf-root button:focus-visible{outline:3px solid var(--mvf-focus);outline-offset:2px}
@keyframes mvf-bubble-in{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){#mvf-root .mvf-bubble{animation:none}}
@media(max-width:560px){#mvf-root .mvf-launch{min-width:58px;width:58px;height:53px}#mvf-root .mvf-bubble{position:fixed;right:12px;bottom:calc(150px + env(safe-area-inset-bottom));width:min(340px,calc(100vw - 24px))}}
