#tutorWorkspaceHost{position:fixed;inset:0;z-index:10050;background:#f8f7fc;color:#19213a;overflow:auto;font:14px/1.5 Inter,system-ui,sans-serif}
body.tutor-workspace-active{overflow:hidden!important}
#tutorWorkspaceHost .tw-tools-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:14px;background:#fff;border-bottom:1px solid #e8e3f0;padding:18px 24px}
.tw-tools-header nav{display:flex;gap:8px;flex-wrap:wrap}.tw-tools-header button{border:1px solid #ddd5eb;border-radius:9px;padding:10px 14px;background:#fff;color:#6727c3;font:inherit;cursor:pointer;min-height:44px}
#tutorWorkspaceTools{max-width:1280px;margin:auto;padding:24px}
#tutorWorkspaceHost:not(.tw-show-tools)>.tw-tools-header,#tutorWorkspaceHost:not(.tw-show-tools)>#tutorWorkspaceTools{visibility:hidden}
#tutorWorkspaceHost.tw-show-tools #educationPanel{display:block!important;width:100%;min-height:70vh;background:#fff;border-radius:14px;padding:22px;box-sizing:border-box}
#tutorWorkspaceHost .td-exit{min-width:44px;min-height:44px}
@media(max-width:600px){#tutorWorkspaceTools{padding:12px}#tutorWorkspaceHost .tw-tools-header{padding:12px;align-items:flex-start}#tutorWorkspaceHost.tw-show-tools #educationPanel{padding:14px}.tw-tools-header nav{justify-content:flex-end}.tw-tools-header button{font-size:12px;padding:8px}}
#tutorWorkspaceHost .tw-embedded-tool{position:relative!important;inset:auto!important;display:block!important;width:100%!important;height:auto!important;min-height:65vh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}
#tutorWorkspaceHost .tw-embedded-tool .cu-sidebar{display:none!important}
#tutorWorkspaceHost .tw-embedded-tool .cu-main{margin:0!important;max-width:none!important;padding:20px!important;overflow:visible!important}
body.tutor-workspace-active .km-workspace .km-topbar [data-km-return]{font-size:12px;line-height:1.3;min-height:40px;max-width:125px;padding:8px 10px;border:1px solid #ded5ed;border-radius:8px;color:#6727c3;white-space:normal;flex-shrink:0}
@media(max-width:600px){body.tutor-workspace-active .km-workspace .km-topbar [data-km-return]{font-size:10px;max-width:82px;padding:6px}}
/* Tutor activity recovery: preserves the current workspace while retrying. */
.km-workspace .km-retry-notice{display:flex;align-items:center;gap:14px;padding:17px 19px;margin:0 0 22px;border:1px solid #e6dced;border-radius:14px;background:linear-gradient(110deg,#faf7ff,#fff);box-shadow:0 4px 16px #5b238505}
.km-retry-icon{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:12px;background:#eee5ff;color:#7b36cf}.km-retry-icon svg{width:22px;height:22px}
.km-retry-copy{flex:1;min-width:0}.km-retry-copy strong{display:block;font-size:14px;font-weight:650;color:#322747}.km-retry-copy p{font-size:12px!important;line-height:1.6!important;margin:4px 0 0!important;color:#746982!important}
.km-workspace button.km-retry-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 17px;border:1px solid #d8c4f3;border-radius:10px;background:#fff;color:#7130be;font:650 12px/1.4 Inter,system-ui,sans-serif;white-space:nowrap;cursor:pointer;box-shadow:0 2px 5px #6633a608;transition:background .15s,border-color .15s}
.km-workspace button.km-retry-button:hover{background:#f1e9ff;border-color:#a97ad8}.km-workspace button.km-retry-button:focus-visible{outline:3px solid #cdb3f4;outline-offset:3px}.km-workspace button.km-retry-button:disabled{cursor:wait;opacity:.72}.km-retry-button svg{width:17px;height:17px;flex-shrink:0}.km-retry-button.is-loading svg{animation:km-retry-spin 1s linear infinite}
@keyframes km-retry-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.km-retry-button.is-loading svg{animation:none}.km-workspace button.km-retry-button{transition:none}}
@media(max-width:600px){.km-workspace .km-retry-notice{padding:14px;gap:10px;flex-wrap:wrap}.km-retry-icon{width:35px;height:35px;border-radius:10px}.km-retry-copy strong{font-size:12px}.km-retry-copy p{font-size:11px!important}.km-workspace button.km-retry-button{width:100%;font-size:12px;min-height:44px}}
/* Lecture authoring and tutor chat share the persistent tutor workspace. */
.td-material-modes{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.td-material-modes button[aria-pressed=true]{background:#eee5ff;color:#6224b4;border-color:#a37bd7}
#tutorWorkspaceHost #keduAsk[data-teaching=true]{height:min(850px,85dvh);min-height:540px;border:1px solid #e5ddef;border-radius:16px;overflow:hidden}
#tutorWorkspaceHost .edu-purchase-notice{z-index:10070}
@media(max-width:600px){#tutorWorkspaceHost #keduAsk[data-teaching=true]{height:80dvh;min-height:450px}.td-material-modes .td-btn{flex:1;min-width:130px}}
