/* A small corner disclosure; only its visible controls receive pointer events. */
.study-companion{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:8;width:80px;color:#40364f;font:14px/1.5 "Segoe UI",Arial,sans-serif;pointer-events:none;isolation:isolate}
.study-companion *{box-sizing:border-box}
.study-companion [hidden]{display:none!important}
.study-companion button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;pointer-events:auto;min-height:44px;border:0}
.study-companion button:focus-visible{outline:3px solid #7555b5;outline-offset:3px}
.sc-launcher{display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;padding:0 0 5px;border-radius:24px;background:#fffcf6;box-shadow:0 4px 20px #4a36511c;animation:sc-arrive .32s ease-out both}
.sc-launcher:hover,.sc-launcher[aria-expanded="true"]{background:#eee7fa}
.sc-character{display:block;width:72px;height:80px;overflow:visible}
.sc-name{display:block;font-size:12px;font-weight:750;line-height:1.2;margin-top:-1px;letter-spacing:.02em}
.sc-bubble{position:absolute;right:0;bottom:100px;width:min(260px,calc(100vw - 32px));max-height:calc(100dvh - 132px);overflow-y:auto;overscroll-behavior:contain;padding:14px 16px 10px;border:1px solid #d8cee6;border-radius:20px 20px 7px 20px;background:#fffdf9;box-shadow:0 12px 36px #3b254322;pointer-events:auto;animation:sc-arrive .24s ease-out both}
.sc-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:35px;margin:-8px -8px 2px 0;color:#71617f;font-size:11px;font-weight:700}
.sc-heading .sc-close{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;background:transparent;border-radius:12px;font-size:25px;font-weight:400;color:#756185}
.sc-close:hover{background:#f2ecf7}
.sc-message{font-size:16px;line-height:1.55;margin:0 0 10px;letter-spacing:0}
.sc-actions{display:flex;align-items:stretch;gap:6px;flex-wrap:wrap}
.sc-actions button{flex:1 1 auto;border-radius:12px;padding:9px 10px;background:#ede6f9;color:#574375;font-size:12px;font-weight:700;line-height:1.3}
.sc-actions button:last-child{background:#e2f1e9;color:#355d4a}
.sc-actions button:hover{filter:brightness(.97)}
.study-companion .sc-hide{width:100%;margin-top:3px;padding:9px 0 5px;text-align:center;background:transparent;color:#78697f;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.study-companion .sc-reopen{position:absolute;right:0;bottom:0;min-width:84px;padding:10px 12px;border:1px solid #ddd3e8;border-radius:16px;background:#fffdf9;color:#685477;font-size:12px;font-weight:650;white-space:nowrap;box-shadow:0 2px 10px #3b25430a}
.sc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes sc-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.study-companion[data-reduced-motion="true"] *{animation:none!important;transition:none!important}
[data-reduced-motion="true"] .study-companion *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.study-companion *{animation:none!important;transition:none!important}}
@media(max-width:600px){.study-companion{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));width:64px}.sc-launcher{width:64px;border-radius:20px}.sc-character{width:60px;height:68px}.sc-bubble{bottom:88px;max-height:calc(100dvh - 120px)}}
