/* AI Study Guru — Study Studio v3
   A fresh application surface; intentionally independent from the legacy theme. */
:root { --studio-ink:#162033; --studio-panel:#1d2a42; --studio-paper:#fbfaf7; --studio-line:#e5e4df; --studio-orange:#f37b46; --studio-blue:#3168d8; --studio-muted:#6d7685; }
body.tutor.wt-in-workspace, body.tutor:has(#workspace:not([hidden])) { background:var(--studio-paper) !important; }
body.tutor.wt-in-workspace .wt-status { display:none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-workspace { background:var(--studio-paper) !important; }

/* The tools rail is intentionally quiet, giving students a clear place to start. */
body.tutor.wt-in-workspace .wt-chatgpt-sidebar { width:276px !important; background:var(--studio-panel) !important; border:0 !important; box-shadow:10px 0 32px rgba(16,26,45,.1) !important; }
body.tutor.wt-in-workspace .wt-sb-header { padding:22px 18px 16px !important; border-color:rgba(255,255,255,.1) !important; }
body.tutor.wt-in-workspace .wt-sb-logo { width:36px; height:36px; display:grid; place-items:center; background:var(--studio-orange) !important; border:0 !important; border-radius:11px !important; box-shadow:0 8px 18px rgba(243,123,70,.25) !important; }
body.tutor.wt-in-workspace .wt-sb-title { color:#fff !important; font-size:1.02rem !important; letter-spacing:-.025em; }
body.tutor.wt-in-workspace .wt-sb-title::after { content:"BETA"; color:#aebbd3; background:transparent; border:1px solid rgba(255,255,255,.16); box-shadow:none; font-size:.57rem; }
body.tutor.wt-in-workspace .wt-new-chat-btn { margin:16px 14px 18px !important; min-height:48px !important; border:1px solid rgba(255,255,255,.12) !important; background:rgba(255,255,255,.1) !important; color:#fff !important; box-shadow:none !important; border-radius:12px !important; }
body.tutor.wt-in-workspace .wt-new-chat-btn:hover { background:rgba(255,255,255,.17) !important; transform:none; }
body.tutor.wt-in-workspace .wt-plus-icon { background:var(--studio-orange) !important; color:#fff !important; border-radius:8px !important; }
body.tutor.wt-in-workspace .wt-kbd { background:rgba(255,255,255,.1) !important; color:#b8c5db !important; }
body.tutor.wt-in-workspace .wt-sb-scroll { padding:0 14px 18px !important; }
body.tutor.wt-in-workspace .wt-sb-heading { color:#92a1bd !important; margin:10px 2px 9px !important; font-size:.62rem !important; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-grid { gap:8px !important; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-card { background:rgba(255,255,255,.065) !important; border:1px solid rgba(255,255,255,.08) !important; border-radius:12px !important; padding:10px 5px !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-card:hover { background:rgba(255,255,255,.13) !important; border-color:rgba(255,255,255,.18) !important; transform:none; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-card-emoji { width:35px !important; height:35px !important; border-radius:10px !important; font-size:1.08rem !important; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-card-label { color:#edf2fb !important; font-size:.72rem !important; }
body.tutor.wt-in-workspace #quick-tools, body.tutor.wt-in-workspace .wt-more-tools, body.tutor.wt-in-workspace .wt-badges-section, body.tutor.wt-in-workspace .wt-leaderboard-section, body.tutor.wt-in-workspace .wt-sb-telegram-box, body.tutor.wt-in-workspace .wt-sb-quota-wrap { display:none !important; }
body.tutor.wt-in-workspace .wt-progress-card { margin-top:6px; padding:13px !important; background:rgba(255,255,255,.07) !important; border:1px solid rgba(255,255,255,.1) !important; border-radius:14px !important; }
body.tutor.wt-in-workspace .wt-sb-profile { background:rgba(9,16,30,.28) !important; border-top-color:rgba(255,255,255,.1) !important; }

/* Command bar: the brand, context, and only necessary actions. */
body.tutor.wt-in-workspace .wt-chat-area { min-width:0; position:relative; background:var(--studio-paper) !important; }
body.tutor.wt-in-workspace .wt-chat-header { height:74px !important; min-height:74px !important; flex:0 0 74px; padding:0 26px !important; background:rgba(251,250,247,.94) !important; border-bottom:1px solid var(--studio-line) !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-hamburger-btn { width:38px !important; height:38px !important; border:1px solid #deddd7 !important; background:#fff !important; color:#40506a !important; border-radius:10px !important; }
body.tutor.wt-in-workspace .wt-model-badge { gap:9px !important; padding:0 !important; background:transparent !important; border:0 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-model-icon { width:34px !important; height:34px !important; display:grid !important; place-items:center; background:#e9edff !important; border-radius:10px !important; font-size:1rem !important; }
body.tutor.wt-in-workspace .wt-model-name { color:var(--studio-ink) !important; font-size:1rem !important; }
body.tutor.wt-in-workspace .wt-online-dot { width:7px !important; height:7px !important; background:#52b788 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-student-profile-pill { background:#fff !important; border:1px solid #e0dfda !important; color:#35425a !important; box-shadow:none !important; border-radius:10px !important; }
body.tutor.wt-in-workspace .wt-header-action-btn, body.tutor.wt-in-workspace .wt-dark-toggle { height:38px !important; min-height:38px; background:#fff !important; border:1px solid #e0dfda !important; color:#40506a !important; box-shadow:none !important; border-radius:10px !important; }
body.tutor.wt-in-workspace #header-timer-display { display:none !important; }
body.tutor.wt-in-workspace .wt-timer-trigger { width:38px !important; padding:0 !important; justify-content:center; }
body.tutor.wt-in-workspace .wt-hub-btn { background:#eef1ff !important; color:#4350b8 !important; border-color:#dfe2fb !important; }
body.tutor.wt-in-workspace .wt-quick-new-btn { min-height:38px !important; padding:8px 14px !important; background:var(--studio-ink) !important; color:#fff !important; box-shadow:none !important; border-radius:10px !important; }
body.tutor.wt-in-workspace .wt-study-hub-dropdown { z-index:1000; }

/* A compact study context replaces the stacked banners in the old application. */
body.tutor.wt-in-workspace #tip-banner, body.tutor.wt-in-workspace #quest-strip, body.tutor.wt-in-workspace #chapter-bar, body.tutor.wt-in-workspace #study-accelerator-bar { display:none !important; }
body.tutor.wt-in-workspace #study-controls { display:flex !important; align-items:center; gap:18px; padding:12px 26px !important; margin:0 !important; background:#fffdfa !important; border-bottom:1px solid var(--studio-line) !important; box-shadow:none !important; overflow:visible !important; }
body.tutor.wt-in-workspace .wt-teacher-modes-bar { flex:1; display:flex !important; gap:6px !important; margin:0 !important; padding:0 !important; overflow-x:auto; background:transparent !important; border:0 !important; }
body.tutor.wt-in-workspace .wt-mode-pill { border:0 !important; background:transparent !important; color:#6f7787 !important; box-shadow:none !important; border-radius:8px !important; padding:8px 10px !important; font-size:.76rem !important; }
body.tutor.wt-in-workspace .wt-mode-pill:hover { background:#f0efeb !important; transform:none !important; }
body.tutor.wt-in-workspace .wt-mode-pill.active { background:#edf0ff !important; color:#3747b8 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-subjects-bar { display:flex !important; gap:5px !important; margin:0 !important; padding:0 !important; background:transparent !important; border:0 !important; overflow-x:auto; }
body.tutor.wt-in-workspace .wt-subj-caption { display:none; }
body.tutor.wt-in-workspace .wt-subj-chip { background:#f5f3ef !important; border:0 !important; color:#667085 !important; padding:7px 9px !important; border-radius:999px !important; box-shadow:none !important; font-size:.7rem !important; }
body.tutor.wt-in-workspace .wt-subj-chip.active { background:#ffe9dd !important; color:#b84f25 !important; }

/* Reading canvas — deliberately spacious and paper-like. */
body.tutor.wt-in-workspace .wt-chatgpt-messages { width:100%; max-width:none !important; padding:clamp(26px,5vh,56px) clamp(18px,6vw,96px) 168px !important; background:radial-gradient(circle at 80% 8%, rgba(235,229,255,.44), transparent 26%), var(--studio-paper) !important; }
body.tutor.wt-in-workspace .wt-chatgpt-messages > * { max-width:860px !important; }
body.tutor.wt-in-workspace .wt-message { margin:18px auto !important; gap:12px !important; }
body.tutor.wt-in-workspace .wt-msg-avatar { width:38px !important; height:38px !important; border:0 !important; border-radius:11px !important; background:var(--studio-orange) !important; box-shadow:0 7px 16px rgba(243,123,70,.2) !important; }
body.tutor.wt-in-workspace .wt-message.user .wt-msg-avatar { background:var(--studio-blue) !important; }
body.tutor.wt-in-workspace .wt-msg-content { padding:20px 22px !important; border:1px solid #e6e4df !important; border-radius:14px !important; background:#fff !important; color:#273248 !important; box-shadow:0 10px 28px rgba(37,43,55,.055) !important; line-height:1.75 !important; }
body.tutor.wt-in-workspace .wt-message:not(.user) .wt-msg-content::before { height:3px !important; background:var(--studio-orange) !important; }
body.tutor.wt-in-workspace .wt-message.user .wt-msg-content { background:var(--studio-ink) !important; color:#fff !important; border:0 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-msg-author { background:#fff0e9 !important; color:#ba552c !important; }

/* The first screen is now an actual learning studio, not a generic chat welcome. */
body.tutor.wt-in-workspace .wt-chatgpt-welcome { max-width:800px !important; margin:0 auto !important; padding:0 !important; text-align:left !important; align-items:flex-start !important; background:transparent !important; border:0 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-welcome::before { display:none !important; }
body.tutor.wt-in-workspace .wt-desk-kicker { display:inline-flex; align-items:center; gap:8px; background:#fff0e9; border-radius:999px; padding:7px 11px; color:#b4542d; font-size:.7rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
body.tutor.wt-in-workspace .wt-desk-status { width:7px; height:7px; border-radius:50%; background:#ef7441; box-shadow:none; }
body.tutor.wt-in-workspace .wt-welcome-teacher-avatar { width:64px !important; height:64px !important; margin:22px 0 14px !important; display:grid !important; place-items:center; background:var(--studio-ink) !important; border:4px solid #fff !important; border-radius:20px !important; box-shadow:0 13px 24px rgba(22,32,51,.16) !important; animation:none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-welcome h2 { margin:0 0 8px !important; color:var(--studio-ink) !important; font-size:clamp(2rem,4vw,3rem) !important; letter-spacing:-.05em !important; }
body.tutor.wt-in-workspace .wt-welcome-mode-badge { margin:0 0 12px !important; background:#edf0ff !important; color:#3d4fc1 !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-welcome > p:not(.wt-desk-note) { max-width:630px; margin:0 !important; color:var(--studio-muted) !important; font-size:1rem !important; }
body.tutor.wt-in-workspace .wt-chatgpt-prompts { width:100%; display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px !important; margin:28px 0 0 !important; }
body.tutor.wt-in-workspace .wt-prompt-card { min-height:126px; padding:18px !important; background:#fff !important; border:1px solid #e3e2de !important; border-radius:14px !important; box-shadow:none !important; }
body.tutor.wt-in-workspace .wt-prompt-card:hover { transform:translateY(-2px) !important; border-color:#f0ad8d !important; box-shadow:0 12px 22px rgba(37,43,55,.07) !important; }
body.tutor.wt-in-workspace .wt-prompt-icon { width:38px !important; height:38px !important; background:#fff0e9 !important; border-radius:11px !important; }
body.tutor.wt-in-workspace .wt-prompt-title { color:var(--studio-ink) !important; }
body.tutor.wt-in-workspace .wt-prompt-desc { color:#758094 !important; }
body.tutor.wt-in-workspace .wt-desk-note { margin:18px 0 0 !important; color:#8a92a0 !important; font-size:.78rem !important; }

/* Composer dock uses a deliberate, app-quality input treatment. */
body.tutor.wt-in-workspace .wt-composer-wrapper { padding:10px clamp(16px,6vw,88px) 14px !important; background:linear-gradient(to top, var(--studio-paper) 70%, rgba(251,250,247,0)) !important; }
body.tutor.wt-in-workspace .wt-chatgpt-composer { max-width:860px !important; }
body.tutor.wt-in-workspace .wt-compose-capsule { padding:9px 10px !important; background:#fff !important; border:1.5px solid #dcdad4 !important; border-radius:16px !important; box-shadow:0 14px 30px rgba(37,43,55,.1) !important; }
body.tutor.wt-in-workspace .wt-compose-capsule:focus-within { border-color:#f09a74 !important; box-shadow:0 0 0 4px rgba(243,123,70,.12),0 14px 30px rgba(37,43,55,.1) !important; }
body.tutor.wt-in-workspace .wt-tool-btn, body.tutor.wt-in-workspace .wt-upload-btn, body.tutor.wt-in-workspace .wt-voice-btn { width:38px !important; height:38px !important; background:#f6f5f2 !important; border:0 !important; border-radius:10px !important; color:#69758a !important; }
body.tutor.wt-in-workspace .wt-send-btn { width:42px !important; height:42px !important; background:var(--studio-orange) !important; border-radius:11px !important; box-shadow:0 7px 15px rgba(243,123,70,.25) !important; }
body.tutor.wt-in-workspace .wt-composer-disclaimer { color:#9aa1ac !important; }

@media (max-width:960px) { body.tutor.wt-in-workspace .wt-chatgpt-sidebar { width:min(290px,86vw) !important; } body.tutor.wt-in-workspace #study-controls { gap:9px; padding:10px 14px !important; flex-direction:column; align-items:stretch; } body.tutor.wt-in-workspace .wt-subjects-bar { padding-bottom:1px !important; } }
@media (max-width:700px) { body.tutor.wt-in-workspace .wt-chat-header { height:60px !important; min-height:60px !important; flex-basis:60px; padding:0 12px !important; } body.tutor.wt-in-workspace .wt-model-name, body.tutor.wt-in-workspace .wt-student-profile-pill, body.tutor.wt-in-workspace .wt-hub-label, body.tutor.wt-in-workspace .wt-hub-chevron { display:none !important; } body.tutor.wt-in-workspace .wt-model-badge { padding:0 !important; } body.tutor.wt-in-workspace .wt-hub-btn { width:38px; padding:0 !important; justify-content:center; } body.tutor.wt-in-workspace .wt-quick-new-btn { padding:8px 10px !important; font-size:.72rem !important; } body.tutor.wt-in-workspace .wt-chatgpt-messages { padding:26px 14px 155px !important; } body.tutor.wt-in-workspace .wt-chatgpt-prompts { grid-template-columns:1fr !important; } body.tutor.wt-in-workspace .wt-prompt-card { min-height:94px; } body.tutor.wt-in-workspace .wt-chatgpt-welcome h2 { font-size:2rem !important; } }
@media (prefers-reduced-motion:reduce) { body.tutor.wt-in-workspace *, body.tutor.wt-in-workspace *::before, body.tutor.wt-in-workspace *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; } }

/* Header action layout guard: legacy theme rules treated every control as a
   compact circle, which caused the Study Tools trigger to collide with its
   neighbouring actions. Keep each control in the normal flex flow. */
body.tutor.wt-in-workspace .wt-chat-header-right {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex:0 0 auto !important;
  min-width:max-content !important;
  gap:8px !important;
  position:relative !important;
  overflow:visible !important;
}
body.tutor.wt-in-workspace .wt-chat-header-right > * {
  position:relative !important;
  inset:auto !important;
  flex:0 0 auto !important;
  margin:0 !important;
  transform:none !important;
}
body.tutor.wt-in-workspace .wt-study-hub-wrapper {
  display:block !important;
  position:relative !important;
  width:auto !important;
  min-width:max-content !important;
  z-index:5 !important;
}
body.tutor.wt-in-workspace .wt-header-action-btn,
body.tutor.wt-in-workspace .wt-dark-toggle,
body.tutor.wt-in-workspace .wt-quick-new-btn {
  display:inline-flex !important;
  position:relative !important;
  inset:auto !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  margin:0 !important;
  transform:none !important;
}
body.tutor.wt-in-workspace .wt-timer-trigger {
  width:38px !important;
  min-width:38px !important;
  padding:0 !important;
}
body.tutor.wt-in-workspace .wt-hub-btn,
body.tutor.wt-in-workspace .wt-header-action-btn.wt-hub-btn {
  width:auto !important;
  min-width:128px !important;
  padding:0 12px !important;
  gap:6px !important;
  border-radius:10px !important;
}
body.tutor.wt-in-workspace .wt-dark-toggle {
  width:38px !important;
  min-width:38px !important;
  padding:0 !important;
}
body.tutor.wt-in-workspace .wt-quick-new-btn {
  min-width:126px !important;
  padding:8px 14px !important;
}
body.tutor.wt-in-workspace .wt-study-hub-dropdown {
  position:absolute !important;
  top:calc(100% + 9px) !important;
  right:0 !important;
  left:auto !important;
}
@media (max-width:700px) {
  body.tutor.wt-in-workspace .wt-chat-header-right { gap:5px !important; }
  body.tutor.wt-in-workspace .wt-hub-btn,
  body.tutor.wt-in-workspace .wt-header-action-btn.wt-hub-btn {
    width:38px !important;
    min-width:38px !important;
    padding:0 !important;
  }
  body.tutor.wt-in-workspace .wt-quick-new-btn { min-width:0 !important; }
}

/* Class / curriculum picker: it needs its own stacking context. Previously
   the fixed backdrop sat above the static dialog, so the screen blurred while
   the picker itself was inaccessible. */
body.tutor.wt-in-workspace #quick-class-modal:not([hidden]) {
  position:fixed !important;
  inset:0 !important;
  z-index:2000 !important;
  display:grid !important;
  place-items:center !important;
  padding:20px !important;
  isolation:isolate !important;
}
body.tutor.wt-in-workspace #quick-class-modal .wt-modal-backdrop {
  position:absolute !important;
  inset:0 !important;
  z-index:0 !important;
  display:block !important;
}
body.tutor.wt-in-workspace #quick-class-modal .wt-class-switcher-card {
  position:relative !important;
  z-index:1 !important;
  max-height:calc(100dvh - 40px) !important;
  overflow:auto !important;
}
body.tutor.wt-in-workspace #quick-class-modal .wt-custom-board-field {
  display:grid !important;
  gap:6px !important;
  margin-top:12px !important;
  color:#42526b !important;
  font-size:.78rem !important;
  font-weight:700 !important;
}
body.tutor.wt-in-workspace #quick-class-modal .wt-custom-board-field input {
  width:100% !important;
  min-height:40px !important;
  border:1px solid #cfd6e5 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#24324a !important;
  padding:9px 11px !important;
  font:inherit !important;
  font-weight:500 !important;
}
body.tutor.wt-in-workspace #quick-class-modal .wt-custom-board-field input:focus {
  outline:3px solid rgba(79,70,229,.16) !important;
  border-color:#6d63db !important;
}

/* ── Studio v4: a denser, editorial learning workspace ─────────────── */
body.tutor.wt-in-workspace .wt-chatgpt-sidebar {
  width:280px !important;
  background:
    radial-gradient(420px 300px at -16% -8%, rgba(106,92,255,.3), transparent 62%),
    radial-gradient(300px 260px at 108% 42%, rgba(34,211,238,.12), transparent 65%),
    linear-gradient(180deg,#15213a 0%,#101a2e 54%,#0c1425 100%) !important;
  box-shadow:12px 0 38px rgba(10,18,36,.14) !important;
}
body.tutor.wt-in-workspace .wt-sb-header {
  padding:18px 18px 14px !important;
  border-bottom:1px solid rgba(255,255,255,.09) !important;
}
body.tutor.wt-in-workspace .wt-sb-logo {
  width:38px !important;
  height:38px !important;
  background:linear-gradient(135deg,#ff9562,#f26045) !important;
  box-shadow:0 10px 24px rgba(242,96,69,.28) !important;
}
body.tutor.wt-in-workspace .wt-sb-title { font-size:1.04rem !important; font-weight:800 !important; }
body.tutor.wt-in-workspace .wt-new-chat-btn {
  margin:14px 14px 17px !important;
  min-height:46px !important;
  border:1px solid rgba(255,255,255,.16) !important;
  background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.07)) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.09),0 8px 18px rgba(1,8,22,.14) !important;
}
body.tutor.wt-in-workspace .wt-new-chat-btn:hover {
  background:linear-gradient(135deg,rgba(255,255,255,.24),rgba(255,255,255,.11)) !important;
  border-color:rgba(255,255,255,.26) !important;
}
body.tutor.wt-in-workspace .wt-sb-scroll { padding:0 14px 16px !important; }
body.tutor.wt-in-workspace .wt-sb-heading {
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
  margin:11px 2px 10px !important;
  color:#9faccc !important;
  letter-spacing:.105em !important;
}
body.tutor.wt-in-workspace .wt-sb-heading::before {
  content:"";
  width:5px;
  height:5px;
  border-radius:50%;
  background:#7c73ff;
  box-shadow:0 0 0 4px rgba(124,115,255,.12);
}
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-grid { gap:9px !important; }
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-card {
  position:relative !important;
  min-height:62px !important;
  padding:9px 7px !important;
  overflow:hidden !important;
  background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.045)) !important;
  border:1px solid rgba(255,255,255,.105) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.05),0 5px 12px rgba(4,10,24,.1) !important;
}
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-card::after {
  content:"";
  position:absolute;
  inset:auto -18px -24px auto;
  width:54px;
  height:54px;
  border-radius:50%;
  background:rgba(255,255,255,.055);
  pointer-events:none;
}
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-action-card:hover {
  background:linear-gradient(145deg,rgba(255,255,255,.17),rgba(255,255,255,.085)) !important;
  border-color:rgba(255,255,255,.2) !important;
  transform:translateY(-1px) !important;
}
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-card-emoji {
  width:34px !important;
  height:34px !important;
  box-shadow:0 6px 13px rgba(0,0,0,.14) !important;
}
body.tutor.wt-in-workspace .wt-chatgpt-sidebar .wt-card-label { font-size:.73rem !important; font-weight:700 !important; }
body.tutor.wt-in-workspace .wt-progress-card {
  padding:14px !important;
  background:linear-gradient(145deg,rgba(121,108,255,.2),rgba(40,203,214,.07)) !important;
  border:1px solid rgba(163,155,255,.23) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.09),0 8px 22px rgba(0,0,0,.11) !important;
}
body.tutor.wt-in-workspace .wt-sb-profile {
  padding:13px 14px !important;
  background:rgba(4,10,22,.46) !important;
  border-top:1px solid rgba(255,255,255,.09) !important;
  backdrop-filter:blur(12px) !important;
}

/* One compact command bar replaces the tall stacked header. */
body.tutor.wt-in-workspace .wt-chat-header {
  height:62px !important;
  min-height:62px !important;
  flex:0 0 62px !important;
  padding:0 26px !important;
  background:rgba(255,254,251,.93) !important;
  backdrop-filter:blur(18px) saturate(140%) !important;
}
body.tutor.wt-in-workspace .wt-chat-header-left,
body.tutor.wt-in-workspace .wt-chat-header-right { gap:10px !important; }
body.tutor.wt-in-workspace .wt-hamburger-btn { width:36px !important; height:36px !important; }
body.tutor.wt-in-workspace .wt-model-icon { width:32px !important; height:32px !important; }
body.tutor.wt-in-workspace .wt-model-name { font-size:.95rem !important; }
body.tutor.wt-in-workspace .wt-student-profile-pill { height:34px !important; padding:0 10px !important; font-size:.74rem !important; }
body.tutor.wt-in-workspace .wt-quick-new-btn {
  min-height:36px !important;
  min-width:118px !important;
  padding:7px 13px !important;
  background:linear-gradient(135deg,#f47749,#e95d45) !important;
  box-shadow:0 7px 16px rgba(233,93,69,.23) !important;
}
body.tutor.wt-in-workspace #study-controls {
  height:58px !important;
  min-height:58px !important;
  padding:8px 26px !important;
  gap:18px !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  background:rgba(255,254,251,.97) !important;
  overflow:hidden !important;
}
body.tutor.wt-in-workspace .wt-teacher-modes-bar {
  flex:1 1 auto !important;
  min-width:0 !important;
  gap:3px !important;
  overflow:hidden !important;
}
body.tutor.wt-in-workspace .wt-mode-pill {
  flex:0 0 auto !important;
  padding:7px 9px !important;
  font-size:.72rem !important;
  white-space:nowrap !important;
}
body.tutor.wt-in-workspace .wt-subjects-bar {
  flex:0 0 auto !important;
  max-width:510px !important;
  gap:4px !important;
  overflow:hidden !important;
}
body.tutor.wt-in-workspace .wt-subj-chip { padding:6px 8px !important; font-size:.67rem !important; white-space:nowrap !important; }

/* A wider reading column gives generated teaching answers room to breathe. */
body.tutor.wt-in-workspace .wt-chatgpt-messages {
  padding:clamp(24px,4vh,46px) clamp(26px,5.5vw,112px) 164px !important;
  background:
    radial-gradient(760px 310px at 72% 0%,rgba(219,231,255,.46),transparent 62%),
    radial-gradient(520px 260px at 4% 24%,rgba(255,232,221,.38),transparent 65%),
    var(--studio-paper) !important;
}
body.tutor.wt-in-workspace .wt-chatgpt-messages > * { max-width:1100px !important; }
body.tutor.wt-in-workspace .wt-message { margin:16px auto !important; }
body.tutor.wt-in-workspace .wt-message:not(.user) .wt-msg-content {
  padding:24px 28px !important;
  border-radius:16px !important;
  box-shadow:0 14px 32px rgba(35,49,76,.06) !important;
}
body.tutor.wt-in-workspace .wt-message:not(.user) .wt-msg-content p,
body.tutor.wt-in-workspace .wt-message:not(.user) .wt-msg-content li { max-width:100% !important; }
body.tutor.wt-in-workspace .wt-composer-wrapper { padding:10px clamp(26px,5.5vw,112px) 14px !important; }
body.tutor.wt-in-workspace .wt-chatgpt-composer { max-width:1100px !important; }

@media (max-width:1180px) {
  body.tutor.wt-in-workspace .wt-mode-pill { padding:7px !important; }
  body.tutor.wt-in-workspace .wt-mode-pill:nth-last-child(-n+2) { display:none !important; }
  body.tutor.wt-in-workspace .wt-subjects-bar { max-width:405px !important; }
  body.tutor.wt-in-workspace .wt-subj-chip:last-child { display:none !important; }
}
@media (max-width:960px) {
  body.tutor.wt-in-workspace #study-controls { height:auto !important; min-height:0 !important; flex-direction:column !important; align-items:stretch !important; overflow:visible !important; }
  body.tutor.wt-in-workspace .wt-teacher-modes-bar,
  body.tutor.wt-in-workspace .wt-subjects-bar { max-width:none !important; overflow-x:auto !important; }
  body.tutor.wt-in-workspace .wt-mode-pill:nth-last-child(-n+2),
  body.tutor.wt-in-workspace .wt-subj-chip:last-child { display:inline-flex !important; }
}
