/* Isolated exercise overlay: no sixth navigation tab and no grading hooks. */
/* Keep the tutor clear of the grading row, with its own circular touch target. */
#screen-session #card{margin-bottom:12px;overflow-y:auto}
.tutor-launcher{display:flex;align-items:center;justify-content:center;align-self:flex-start;margin:auto auto 0 0;padding:6px;width:56px;height:56px;min-height:56px;border:1px solid #e0d1ef;border-radius:50%;background:var(--surface);color:var(--secondary);font:inherit;box-shadow:0 5px 18px #4c1d9512;cursor:pointer;flex-shrink:0;box-sizing:border-box}.tutor-launcher img{width:42px;height:42px;object-fit:contain;pointer-events:none}.tutor-launcher:focus-visible{outline:3px solid #a97ed2;outline-offset:3px}.tutor-launcher[hidden]{display:none}.tutor-launcher+.session-actions{margin-top:0;padding-top:32px;flex-shrink:0}
.modal-backdrop.tutor-backdrop{align-items:flex-end;z-index:120;backdrop-filter:blur(3px);background:#19112755}.tutor-backdrop[hidden]{display:none!important}
.tutor-sheet{display:flex;flex-direction:column;width:100%;height:82%;max-height:calc(var(--tutor-visible-height,100dvh) - 24px);gap:14px;padding:8px 20px max(15px,env(safe-area-inset-bottom));background:var(--bg);border:1px solid #e9dded;border-radius:28px 28px 0 0;box-shadow:0 -12px 50px #27143915;overflow:hidden;box-sizing:border-box;animation:slideup .2s ease}
.tutor-handle{width:35px;height:4px;border-radius:10px;background:#d8cbdc;align-self:center;flex-shrink:0;margin-bottom:-3px}.tutor-head{display:flex;align-items:center;gap:10px;flex-shrink:0}.tutor-avatar{width:48px;height:48px;object-fit:contain}.tutor-head>div{flex:1;min-width:0}.tutor-head h2{font-size:21px;color:var(--text);letter-spacing:-.6px;margin:0;line-height:1.2}.tutor-head p{font-size:12px;color:var(--muted);margin-top:5px}.tutor-head p span{color:var(--secondary)}.tutor-close{border:0;background:#efe7de;color:var(--muted);width:40px;height:44px;border-radius:50%;font:inherit;font-size:28px;cursor:pointer;flex-shrink:0}.tutor-footer{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted);flex-shrink:0}.tutor-quota{color:var(--secondary);font-weight:600}.tutor-welcome h3{font-size:19px;letter-spacing:-.4px;margin:9px 0 8px}.tutor-sheet .tutor-welcome{padding:8px 5px 5px}.tutor-sheet button:focus-visible{outline:3px solid #a97ed2;outline-offset:3px}
.tutor-log{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-behavior:smooth;padding:0 2px 8px;display:flex;flex-direction:column;gap:14px}.tutor-welcome{text-align:center;padding:6px 5px 0;margin:0}.tutor-welcome img{width:76px;height:76px;object-fit:contain}.tutor-welcome h2{font-size:22px;letter-spacing:-.5px;color:var(--text);margin:5px 0 9px}.tutor-welcome p{font-size:14px;line-height:1.55;color:var(--muted);max-width:285px;margin:auto}
.tutor-context{max-height:145px;overflow:auto;padding:13px 15px;border:1px solid #e3d5f2;border-left:3px solid #8656bf;border-radius:13px;background:#f7f1fc;flex-shrink:0}.tutor-context span{display:block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:#87629d;margin-bottom:7px}.tutor-context strong{display:block;color:var(--secondary);font-size:14px;line-height:1.45}.tutor-context p{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.5}
.tutor-user{align-self:flex-end;max-width:90%;padding:13px 16px;background:#4c1d95;color:white;border-radius:18px 18px 5px 18px;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;flex-shrink:0}.tutor-answer{background:var(--surface);padding:17px;border:1px solid var(--line);border-radius:5px 18px 18px;flex-shrink:0;overflow-wrap:anywhere}.tutor-answer-label{display:flex;align-items:center;gap:7px;color:var(--secondary);font-size:12px;font-weight:750;margin-bottom:10px}.tutor-answer-label svg{width:18px;height:18px}.tutor-answer-text{font-size:14px;line-height:1.65;white-space:pre-wrap}.tutor-examples{display:flex;flex-direction:column;gap:9px;margin-top:13px}.tutor-examples>div{border-left:3px solid #e9daf5;padding:4px 0 4px 11px}.tutor-examples strong{font-size:14px;font-weight:650;color:var(--secondary);line-height:1.5}.tutor-examples p{font-size:12px;color:var(--muted);line-height:1.5;margin-top:3px}.tutor-tip{font-size:12px;line-height:1.55;color:#8c5018;padding:10px 12px;background:#fff4e6;border-radius:10px;margin-top:13px}
.tutor-suggestions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;flex-shrink:0}.tutor-suggestions button{display:flex;justify-content:space-between;text-align:left;gap:10px;border:1px solid #e7dcf1;background:var(--surface);border-radius:12px;padding:9px 12px;color:var(--secondary);font:inherit;font-size:13px;font-weight:600;cursor:pointer;min-height:44px}.tutor-suggestions span{font-size:16px}.tutor-compose{display:flex;align-items:flex-end;gap:8px;border:1px solid #dbcbe9;border-radius:19px;background:var(--surface);padding:8px;flex-shrink:0;box-shadow:0 4px 15px #4c1d9508}.tutor-compose:focus-within{outline:2px solid #b794df;outline-offset:2px}.tutor-compose textarea{padding:12px 6px 9px 9px;resize:none;min-height:45px;max-height:100px;border:0;outline:0!important;box-shadow:none!important;background:transparent;width:100%;font:inherit;font-size:14px;line-height:1.4;color:var(--text)}.tutor-compose textarea::placeholder{color:#97899b;font-size:13px}.tutor-send{width:43px;height:43px;flex-shrink:0;background:var(--primary);color:#fff;border:0;border-radius:13px;cursor:pointer}.tutor-send svg{width:21px;height:21px}.tutor-send:disabled{opacity:.45;cursor:default}.tutor-footnote{font-size:10px;line-height:1.4;color:var(--muted);text-align:center;margin-top:-7px}.tutor-error{font-size:12px;color:#a64032;line-height:1.5}.tutor-error:empty{display:none}.tutor-back{border:0;background:none;font:inherit;font-size:12px;font-weight:600;color:var(--secondary);cursor:pointer;align-self:center;min-height:25px;margin-top:-6px}.tutor-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.tutor-thinking{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px;padding:7px 0}.tutor-thinking i{width:5px;height:5px;background:#ad94c9;border-radius:50%;animation:tutorPulse 1s infinite}.tutor-thinking i:nth-child(2){animation-delay:.15s}.tutor-thinking i:nth-child(3){animation-delay:.3s}.tutor-thinking span{margin-left:7px}
.tutor-preview-label{position:fixed;top:0;left:0;right:0;text-align:center;font:600 10px system-ui;color:#776a83;z-index:9999;padding:4px;background:#f6effa}.tutor-preview-course{position:fixed;right:18px;top:45px;max-width:150px;z-index:9000;padding:10px;border-radius:12px;border:1px solid #decee9;background:#fff;color:#4c1d95;font:13px system-ui}
html.web-desktop-capable .modal-backdrop.tutor-backdrop{position:absolute;align-items:flex-end;justify-content:center;padding:0;z-index:120}html.web-desktop-capable .tutor-sheet{max-width:540px}
@keyframes tutorPulse{50%{opacity:.25}}@media(prefers-reduced-motion:reduce){.tutor-thinking i,.tutor-sheet{animation:none}.tutor-log{scroll-behavior:auto}}
@media(max-width:600px){.tutor-preview-course{top:4px;right:6px;max-width:105px;font-size:10px;padding:3px;border-radius:5px}.tutor-preview-label{text-align:left;padding-left:12px}.tutor-sheet{gap:12px;padding-inline:16px}.tutor-head h2{font-size:20px}}
@media(max-height:640px){#screen-session #card{min-height:0}.tutor-sheet{height:91%;gap:8px}.tutor-context{max-height:92px}.tutor-avatar{width:38px;height:38px}.tutor-context p{display:none}.tutor-welcome{padding:0}.tutor-launcher{width:48px;height:48px;min-height:48px}.tutor-launcher img{width:36px;height:36px}.tutor-launcher+.session-actions{padding-top:24px}}

.tutor-consent{font-size:12px;line-height:1.45;color:var(--muted);flex-shrink:0}.tutor-activate{margin-top:10px;background:var(--primary);color:white;border:0;border-radius:12px;padding:12px 18px;font:inherit;font-weight:700;width:100%}
.tutor-compose textarea{font-size:16px}
html[data-theme="dark"] .tutor-context,body.dark .tutor-context{background:#33273f;border-color:#59466b}html[data-theme="dark"] .tutor-tip,body.dark .tutor-tip{background:#392c20;color:#f9cd9f}
