/* =====================================================================
   AI Study Guru — ChatGPT-Style AI Teacher Interface
   Modern, ultra-clean web application layout inspired by ChatGPT/Claude.
   Collapsible slate sidebar, floating capsule composer, clean message thread.
   ===================================================================== */

/* ── CRITICAL: Hidden elements must NEVER be displayed ───────────────── */
[hidden],
section[hidden],
aside[hidden],
div[hidden],
p[hidden],
span[hidden],
article[hidden] {
  display: none !important;
}

/* ── Base & Body ─────────────────────────────────────────────────────── */
:root {
  --wt-primary: #0052ff;
  --wt-primary-hover: #0040cc;
  --wt-primary-light: #eff5ff;
  --wt-sidebar-bg: #0f172a;
  --wt-sidebar-text: #e2e8f0;
  --wt-sidebar-muted: #94a3b8;
  --wt-sidebar-border: rgba(255, 255, 255, 0.08);
  --wt-chat-bg: #ffffff;
  --wt-card-border: #e2e8f0;
  --wt-radius-sm: 8px;
  --wt-radius-md: 14px;
  --wt-radius-lg: 20px;
  --wt-radius-pill: 28px;
}

body.tutor {
  background: #f8fafc;
  color: #0f172a;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* When logged in: hide website header/footer for an immersive ChatGPT experience */
body.tutor.wt-in-workspace,
body.tutor:has(#workspace:not([hidden])) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
body.tutor.wt-in-workspace .sg-header,
body.tutor.wt-in-workspace .sg-footer,
body.tutor.wt-in-workspace .skip-link,
body.tutor:has(#workspace:not([hidden])) .sg-header,
body.tutor:has(#workspace:not([hidden])) .sg-footer,
body.tutor:has(#workspace:not([hidden])) .skip-link {
  display: none !important;
}
body.tutor.wt-in-workspace .wt-main,
body.tutor:has(#workspace:not([hidden])) .wt-main {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
}

.tutor .wt-main {
  max-width: 1320px;
  padding: 1.5rem;
  margin: auto;
}

/* ── Status indicator ────────────────────────────────────────────────── */
.tutor .wt-status {
  padding: 0.5rem 1rem;
  margin: 0;
  color: #254269;
  font-weight: 600;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.tutor .wt-status.error {
  color: #dc2626;
  background: #fef2f2;
}

/* ── Auth / Welcome Section (pre-login) ──────────────────────────────── */
.tutor .wt-welcome {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}
.tutor .wt-eyebrow {
  color: #0052ff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .74rem;
}
.tutor h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; margin: .5rem 0 1rem; }
.tutor h2 { font-size: 1.3rem; margin: .5rem 0; }
.tutor .lead { font-size: 1.15rem; line-height: 1.6; }
.tutor .wt-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--wt-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.tutor .wt-narrow { max-width: 800px; margin: 2rem auto; }
.tutor .wt-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.tutor .wt-pills span {
  background: #eff6ff; border: 1px solid #dbeafe;
  border-radius: 100px; padding: .5rem .9rem; font-size: .88rem; font-weight: 500;
}
.tutor label { display: block; font-weight: 650; margin: .9rem 0; font-size: .92rem; }
.tutor input:not([type=checkbox]):not([type=file]),
.tutor select,
.tutor textarea {
  display: block; width: 100%; box-sizing: border-box; font: inherit;
  padding: .75rem .9rem; border: 1.5px solid #cbd5e1; border-radius: 10px;
  background: #fff; color: #0f172a; margin-top: .4rem;
}
.tutor input:focus, .tutor select:focus, .tutor textarea:focus {
  border-color: var(--wt-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}
.tutor .wt-check { display: flex; gap: .65rem; font-weight: 400; align-items: flex-start; }
.tutor input[type=checkbox] { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--wt-primary); }
.tutor .btn {
  min-height: 42px; border-radius: 10px; font-weight: 650; font-size: .92rem;
  cursor: pointer; padding: .6rem 1.2rem; transition: all .2s; border: none;
}
.tutor .btn-primary { background: var(--wt-primary); color: #fff; }
.tutor .btn-primary:hover { background: var(--wt-primary-hover); }
.tutor .btn-outline { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.tutor .btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
.tutor .btn-sm { min-height: 34px; padding: .4rem .8rem; font-size: .82rem; }
.tutor #phone-code {
  display: block; font-size: 1.3rem; letter-spacing: .06em;
  background: #f1f5f9; padding: 1.2rem; margin: 1rem 0; border-radius: 12px;
  font-weight: 700; text-align: center; color: #0052ff;
}
.tutor .wt-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.tutor .wt-small, .tutor small { font-size: .8rem; color: #64748b; line-height: 1.5; }
.tutor .wt-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.tutor .wt-profile .wt-actions { grid-column: 1 / -1; }

/* =====================================================================
   CHATGPT-STYLE WORKSPACE APPSHELL
   ===================================================================== */
.wt-chatgpt-workspace {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--wt-chat-bg);
  position: relative;
}
.wt-chatgpt-workspace[hidden] {
  display: none !important;
}

/* ── Left Sidebar (ChatGPT Slate Style) ──────────────────────────────── */
.wt-chatgpt-sidebar {
  width: 290px;
  background: var(--wt-sidebar-bg);
  color: var(--wt-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--wt-sidebar-border);
  height: 100%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

/* Sidebar Header */
.wt-sb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--wt-sidebar-border);
}
.wt-sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.wt-sb-logo { font-size: 1.3rem; }
.wt-sb-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--wt-sidebar-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.wt-sb-close-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Prominent New Chat Button (ChatGPT pill/box) */
.wt-new-chat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 14px 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.wt-new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}
.wt-new-chat-btn:active { transform: scale(0.98); }
.wt-plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wt-primary);
  font-size: 1rem;
  line-height: 1;
}
.wt-kbd {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--wt-sidebar-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
}

/* Sidebar Scrollable Body */
.wt-sb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.wt-sb-scroll::-webkit-scrollbar { width: 5px; }
.wt-sb-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

.wt-sb-section { margin-bottom: 16px; }
.wt-sb-heading {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--wt-sidebar-muted);
  text-transform: uppercase;
  margin: 10px 0 8px;
}

/* Action Cards Grid in Dark Sidebar */
.wt-chatgpt-sidebar .wt-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.wt-chatgpt-sidebar .wt-action-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: var(--wt-sidebar-text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.wt-chatgpt-sidebar .wt-action-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.wt-chatgpt-sidebar .wt-card-emoji { font-size: 1.1rem; }
.wt-chatgpt-sidebar .wt-card-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sidebar Accordions */
.wt-sb-details {
  margin-top: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.wt-sb-details summary {
  padding: 8px 10px;
  color: var(--wt-sidebar-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.wt-sb-details summary:hover { color: #fff; }

/* Quick shortcuts inside sidebar */
.wt-chatgpt-sidebar .wt-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 8px;
}
.wt-chatgpt-sidebar .wt-shortcuts button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-chatgpt-sidebar .wt-shortcuts button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Progress & Gamification Widget in Sidebar */
.wt-progress-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}
.wt-progress-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 8px;
}
.wt-chatgpt-sidebar .wt-streak-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 180, 0, 0.12);
  border: 1px solid rgba(255, 180, 0, 0.3);
  padding: 6px 12px;
  border-radius: 10px;
}
.wt-chatgpt-sidebar .wt-streak-fire { font-size: 1.2rem; }
.wt-chatgpt-sidebar .wt-streak-count { font-size: 1.25rem; font-weight: 800; color: #ffb703; }
.wt-chatgpt-sidebar .wt-streak-label { font-size: 0.65rem; color: #ffd166; text-transform: uppercase; }

.wt-chatgpt-sidebar .wt-daily-goal {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wt-chatgpt-sidebar .wt-goal-ring { width: 100%; height: 100%; }
.wt-chatgpt-sidebar .wt-goal-ring circle:first-child { stroke: rgba(255, 255, 255, 0.1); }
.wt-chatgpt-sidebar .wt-goal-ring circle:last-child { stroke: #38bdf8; transition: stroke-dashoffset 0.8s; }
.wt-chatgpt-sidebar .wt-goal-pct { position: absolute; font-size: 0.72rem; font-weight: 800; color: #38bdf8; }

.wt-chatgpt-sidebar .wt-week-tracker { margin: 6px 0; }
.wt-chatgpt-sidebar .wt-week-days { display: flex; justify-content: space-between; gap: 2px; }
.wt-chatgpt-sidebar .wt-day {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--wt-sidebar-muted);
  background: rgba(255, 255, 255, 0.05);
}
.wt-chatgpt-sidebar .wt-day.active {
  background: var(--wt-primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 82, 255, 0.6);
}
.wt-chatgpt-sidebar .wt-day.today { border: 1.5px solid #38bdf8; }

/* Gamification 4-box mini stats */
.wt-chatgpt-sidebar .wt-gamification-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.wt-chatgpt-sidebar .wt-gstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 2px;
  border-radius: 8px;
}
.wt-chatgpt-sidebar .wt-gstat span { font-size: 0.95rem; }
.wt-chatgpt-sidebar .wt-gstat strong { font-size: 0.78rem; color: #fff; }
.wt-chatgpt-sidebar .wt-gstat small { font-size: 0.55rem; color: var(--wt-sidebar-muted); text-transform: uppercase; }

/* Badges inside sidebar */
.wt-chatgpt-sidebar .wt-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
}
.wt-chatgpt-sidebar .wt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  color: #f8fafc;
}

/* Leaderboard inside sidebar */
.wt-chatgpt-sidebar .wt-leaderboard { padding: 6px; }
.wt-chatgpt-sidebar .wt-lb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  color: #cbd5e1;
}
.wt-chatgpt-sidebar .wt-lb-row:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.wt-chatgpt-sidebar .wt-lb-you { background: rgba(0, 82, 255, 0.25) !important; color: #fff; font-weight: 700; }
.wt-chatgpt-sidebar .wt-lb-rank { font-size: 0.85rem; }
.wt-chatgpt-sidebar .wt-lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-chatgpt-sidebar .wt-lb-coins { color: #facc15; font-weight: 600; font-size: 0.72rem; }
.wt-chatgpt-sidebar .wt-lb-streak { color: #f87171; font-weight: 600; font-size: 0.72rem; }

/* Quota & Manage Chat */
.wt-sb-quota-wrap {
  margin-top: 10px;
  padding: 8px 4px;
}
.wt-chatgpt-sidebar .wt-quota {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 8px;
  margin: 0 0 6px;
}
.wt-chatgpt-sidebar .wt-revision-link {
  display: block;
  font-size: 0.78rem;
  color: #38bdf8;
  text-decoration: none;
  padding: 4px 0;
}
.wt-chatgpt-sidebar .wt-revision-link:hover { text-decoration: underline; }
.wt-sb-clear-chat summary { font-size: 0.72rem; color: #64748b; cursor: pointer; }
.wt-sb-clear-chat form { margin-top: 6px; }
.wt-sb-clear-chat input { font-size: 0.75rem; padding: 4px 6px; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: #fff; }

/* Sidebar Profile Footer (ChatGPT Style user card) */
.wt-sb-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--wt-sidebar-border);
  background: rgba(0, 0, 0, 0.2);
}
.wt-sb-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wt-sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.wt-sb-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wt-sb-user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-sb-user-meta {
  font-size: 0.7rem;
  color: var(--wt-sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-sb-user-actions {
  display: flex;
  gap: 4px;
}
.wt-sb-icon-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--wt-sidebar-muted);
  transition: all 0.2s;
}
.wt-sb-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* =====================================================================
   MAIN CHAT CONVERSATION VIEW (ChatGPT Style)
   ===================================================================== */
.wt-chatgpt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  min-width: 0;
  position: relative;
}

/* Minimalist Top Bar */
.wt-chat-header {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  z-index: 10;
}
.wt-chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wt-hamburger-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.wt-hamburger-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
.wt-model-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
}
.wt-model-icon { font-size: 1rem; }
.wt-online-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: wtPulse 2s infinite;
}
.wt-quick-new-btn {
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Floating Study Tip Strip */
.wt-tip-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 16px 0;
  padding: 6px 12px;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #713f12;
}
.wt-tip-icon { font-size: 1rem; }
.wt-tip-text { flex: 1; margin: 0; line-height: 1.4; }
.wt-tip-close {
  background: transparent;
  border: none;
  color: #a16207;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
}
.wt-tip-banner.hidden { display: none; }

/* ── Messages Stream Container ───────────────────────────────────────── */
.wt-chatgpt-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 140px; /* bottom padding gives room for floating composer */
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.wt-chatgpt-messages::-webkit-scrollbar { width: 6px; }
.wt-chatgpt-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Centered Reading Width (ChatGPT Style 800px max) */
.wt-chatgpt-messages > * {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ── ChatGPT Empty Welcome Hero State ────────────────────────────────── */
.wt-chatgpt-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 16px 20px;
  animation: wtFadeIn 0.4s ease;
}
.wt-welcome-teacher-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 10px 25px rgba(0, 82, 255, 0.25);
  margin-bottom: 16px;
}
.wt-chatgpt-welcome h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
}
.wt-chatgpt-welcome p {
  color: #64748b;
  font-size: 0.95rem;
  max-width: 500px;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* Prompt Starter Cards (2x2 Grid like ChatGPT) */
.wt-chatgpt-prompts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 760px;
}
.wt-prompt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.wt-prompt-card:hover {
  border-color: var(--wt-primary);
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 82, 255, 0.08);
}
.wt-prompt-card:active { transform: scale(0.98); }
.wt-prompt-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.wt-prompt-icon { font-size: 1.25rem; }
.wt-prompt-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}
.wt-prompt-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

/* ── Message Bubble System ───────────────────────────────────────────── */
.wt-message {
  margin-bottom: 24px;
  position: relative;
  animation: wtMsgIn 0.3s ease;
  line-height: 1.68;
  font-size: 0.96rem;
}
@keyframes wtMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wtFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Assistant Message (ChatGPT Left-Aligned Clean Row) */
.wt-message:not(.user) {
  display: flex;
  gap: 14px;
  background: transparent;
  padding: 0;
  border: none;
}
.wt-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
}
.wt-msg-content {
  flex: 1;
  min-width: 0;
  color: #1e293b;
}
.wt-msg-author {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--wt-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* User Message (ChatGPT Right-Aligned Bubble) */
.wt-message.user {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}
.wt-message.user .wt-msg-content {
  background: #f1f5f9;
  color: #0f172a;
  padding: 12px 18px;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  max-width: 80%;
  font-size: 0.96rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.wt-message.user .wt-msg-avatar,
.wt-message.user .wt-msg-author { display: none; }

/* Markdown & Content Formatting */
.wt-message p { margin: 0.5rem 0; }
.wt-message p:first-child { margin-top: 0; }
.wt-message p:last-child { margin-bottom: 0; }
.wt-message h3 { font-size: 1.15rem; font-weight: 750; margin: 1rem 0 0.4rem; color: #0f172a; }
.wt-message pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px 16px;
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  margin: 12px 0;
}
.wt-message code {
  background: #f1f5f9;
  color: #0951d6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: ui-monospace, monospace;
}
.wt-message pre code { background: transparent; color: inherit; padding: 0; }
.wt-message ul, .wt-message ol { padding-left: 1.4rem; margin: 0.6rem 0; }
.wt-message li { margin: 0.3rem 0; }

/* Message Action Bar (Copy, Read aloud, Save PDF, Print) */
.wt-answer-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.wt-answer-actions button {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 10px;
  min-height: 32px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.wt-answer-actions button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.wt-answer-actions button:active { transform: scale(0.97); }

/* Quick Follow-Up Chips */
.wt-follow-up-chip {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
  border-radius: 16px !important;
  padding: 5px 12px !important;
}
.wt-follow-up-chip:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

/* ── Thinking Indicator ──────────────────────────────────────────────── */
.wt-chatgpt-thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 0 16px;
}
.wt-teacher-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}
.wt-thinking-bubble {
  background: #f1f5f9;
  padding: 8px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}
.wt-thinking-dots { display: flex; gap: 3px; }
.wt-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wt-primary);
  animation: wtBounce 1.4s infinite ease-in-out;
}
.wt-thinking-dots span:nth-child(2) { animation-delay: .16s; }
.wt-thinking-dots span:nth-child(3) { animation-delay: .32s; }

/* =====================================================================
   PINNED FLOATING CAPSULE COMPOSER (ChatGPT Style)
   ===================================================================== */
.wt-composer-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px 14px;
  background: linear-gradient(to top, #ffffff 75%, rgba(255, 255, 255, 0.85) 90%, rgba(255, 255, 255, 0));
  z-index: 20;
}
.wt-chatgpt-composer {
  max-width: 800px;
  margin: 0 auto;
}
.wt-compose-capsule {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: var(--wt-radius-pill);
  padding: 6px 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wt-compose-capsule:focus-within {
  border-color: var(--wt-primary);
  box-shadow: 0 4px 24px rgba(0, 82, 255, 0.15);
}

/* Upload Clip Button */
.wt-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  margin: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}
.wt-upload-btn:hover { background: #f1f5f9; color: #0f172a; }
.wt-upload-btn input { display: none; }

/* Textarea inside Capsule */
.wt-compose-capsule textarea {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 8px 4px;
  margin: 0;
  min-height: 38px;
  max-height: 180px;
  resize: none;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #0f172a;
}
.wt-compose-capsule textarea::placeholder { color: #94a3b8; }
.wt-compose-capsule textarea:focus { outline: none; }

/* Voice Mic Button */
.wt-voice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.wt-voice-btn:hover { background: #f1f5f9; color: #0f172a; }
.wt-voice-btn.recording {
  background: #fee2e2;
  color: #ef4444;
  animation: wtPulseRec 1.2s infinite;
}

/* Circular Send Button */
.wt-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--wt-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.3);
}
.wt-send-btn:hover { background: var(--wt-primary-hover); transform: scale(1.05); }
.wt-send-btn:active { transform: scale(0.95); }
.wt-send-btn:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.wt-composer-disclaimer {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin: 6px 0 0;
}

/* ── Mobile Overlay & Responsiveness ─────────────────────────────────── */
.wt-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 95;
}
.wt-sidebar-overlay.active { display: block; }

@media (max-width: 900px) {
  .tutor .wt-welcome {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
  }
  .tutor .wt-profile {
    grid-template-columns: 1fr;
  }
  .tutor h1 {
    font-size: 1.8rem;
  }

  .wt-chatgpt-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }
  .wt-chatgpt-sidebar.open {
    transform: translateX(0);
  }
  .wt-sb-close-btn { display: block; }

  .wt-chatgpt-prompts {
    grid-template-columns: 1fr;
  }
  .wt-composer-wrapper { padding: 8px 10px 10px; }
  .wt-compose-capsule { border-radius: 22px; padding: 4px 8px; }
}

@media (min-width: 901px) {
  .wt-chatgpt-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
  }
}


/* =====================================================================
   Upgraded AI Teacher Assistant Enhancements
   Teacher Modes, Subject Chips, Pomodoro Timer, Flashcards,
   Staged Attachment Preview, MCQ Interactive Options, In-Chat Reactions
   ===================================================================== */

/* ── Header Action Buttons ───────────────────────────────────────────── */
.wt-header-action-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  height: 32px;
}
.wt-header-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.wt-timer-trigger {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}
.wt-timer-trigger:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.wt-timer-icon { font-size: 0.95rem; }
.wt-sound-btn {
  padding: 5px 8px;
  min-width: 32px;
  justify-content: center;
}

/* ── Interactive Teacher Mode Selector Bar ───────────────────────────── */
.wt-teacher-modes-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wt-teacher-modes-bar::-webkit-scrollbar { display: none; }

.wt-mode-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.wt-mode-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  transform: translateY(-1px);
}
.wt-mode-pill.active {
  background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #0052ff;
  box-shadow: 0 3px 10px rgba(0, 82, 255, 0.28);
}
.wt-mode-icon { font-size: 0.95rem; }

/* ── Subject Quick-Pick Chips Bar ────────────────────────────────────── */
.wt-subjects-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 8px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wt-subjects-bar::-webkit-scrollbar { display: none; }
.wt-subj-caption {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.wt-subj-chip {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 3px 11px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.wt-subj-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.wt-subj-chip.active {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

/* ── Staged Attachment Preview Capsule ───────────────────────────────── */
.wt-attach-preview {
  max-width: 800px;
  margin: 0 auto 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 82, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: wtSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wtSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.wt-attach-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}
.wt-attach-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.wt-attach-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wt-attach-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wt-attach-size {
  font-size: 0.72rem;
  color: #64748b;
}
.wt-attach-remove {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.wt-attach-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Drag-over indicator */
body.wt-drag-over .wt-compose-capsule {
  border-color: #0052ff !important;
  border-style: dashed !important;
  background: #eff6ff !important;
}

/* ── Pomodoro Focus Timer Popover ────────────────────────────────────── */
.wt-timer-popover {
  position: absolute;
  top: 56px;
  right: 16px;
  width: 310px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
  padding: 18px;
  z-index: 100;
  animation: wtPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wtPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.wt-timer-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wt-timer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.wt-timer-mode-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
}
.wt-timer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  padding: 4px;
}
.wt-timer-close:hover { color: #0f172a; }
.wt-timer-clock {
  font-size: 2.3rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
  margin: 6px 0;
}
.wt-timer-progress-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}
.wt-timer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0052ff, #22c55e);
  transition: width 0.3s ease;
}
.wt-timer-subtext {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin: 4px 0 12px;
  line-height: 1.4;
}
.wt-timer-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.wt-timer-footer {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* ── Interactive Flashcard Deck Modal ────────────────────────────────── */
.wt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  animation: wtFadeIn 0.2s ease;
}
@keyframes wtFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wt-flashcard-box {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wt-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.wt-card-counter {
  background: #f1f5f9;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}
.wt-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.1rem;
  padding: 4px;
}
.wt-modal-close:hover { color: #0f172a; }
.wt-flashcard-stage {
  perspective: 1200px;
  min-height: 250px;
}
.wt-flashcard-card {
  position: relative;
  width: 100%;
  min-height: 250px;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.wt-flashcard-card.is-flipped {
  transform: rotateY(180deg);
}
.wt-card-side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.wt-card-front {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 2px solid #bfdbfe;
}
.wt-card-back {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 2px solid #86efac;
  transform: rotateY(180deg);
}
.wt-card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 10px;
  border-radius: 12px;
}
.wt-card-tag-ans {
  background: #dcfce7 !important;
  color: #166534 !important;
}
.wt-card-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-wrap;
  margin: 16px 0;
  flex: 1;
}
.wt-card-hint {
  font-size: 0.74rem;
  color: #94a3b8;
  text-align: center;
}
.wt-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Interactive MCQ Option Buttons ──────────────────────────────────── */
.wt-mcq-choice-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.wt-mcq-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.wt-mcq-choice-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wt-mcq-choice-btn:hover {
  border-color: #0052ff;
  background: #eff6ff;
  color: #0052ff;
  transform: translateX(2px);
}

/* ── In-Chat Reaction & Speaking Controls ────────────────────────────── */
.wt-reactions-wrap {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}
.wt-reaction-btn {
  padding: 4px 8px !important;
  min-height: 30px !important;
  border-radius: 14px !important;
  font-size: 0.75rem !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  cursor: pointer;
}
.wt-reaction-btn.reacted {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #e11d48 !important;
}
.wt-speaking {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
  animation: wtPulseSpeaking 1.5s infinite;
}
@keyframes wtPulseSpeaking {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ── Toast Notification Pill ─────────────────────────────────────────── */
.wt-toast {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 22px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  z-index: 9999;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.wt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Empty State Mode Badge ──────────────────────────────────────────── */
.wt-welcome-mode-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 6px 0 10px;
}

/* ── Mobile Tweaks ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wt-header-action-btn span:not(.wt-timer-icon):not(#header-timer-display):not(#sound-icon) {
    display: none;
  }
  .wt-timer-popover {
    right: 8px;
    left: 8px;
    width: auto;
  }
}


/* ── Live Student Profile & Grade Switcher Pill ─────────────────────── */
.wt-student-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.wt-student-profile-pill:hover {
  background: linear-gradient(135deg, #dcfce7 0%, #bae6fd 100%);
  border-color: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.15);
}
.wt-student-profile-pill .wt-badge-icon {
  font-size: 0.95rem;
}
.wt-student-profile-pill .wt-prof-grade {
  font-weight: 700;
  color: #0f172a;
}
.wt-student-profile-pill .wt-prof-divider {
  color: #94a3b8;
  font-weight: 400;
}
.wt-student-profile-pill .wt-prof-board {
  color: #2563eb;
  font-weight: 600;
}
.wt-student-profile-pill .wt-prof-edit-icon {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 2px;
  transition: opacity 0.2s ease;
}
.wt-student-profile-pill:hover .wt-prof-edit-icon {
  opacity: 1;
}

/* ── Profile Form Quick Chips ───────────────────────────────────────── */
.wt-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.wt-chip-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
}
.wt-quick-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wt-quick-chip:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  transform: scale(1.03);
}

/* ── Quick Class / Board Switcher Modal ─────────────────────────────── */
.wt-class-switcher-card {
  max-width: 540px;
  width: 92vw;
  background: #ffffff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  z-index: 10001;
}
.wt-modal-desc {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.45;
}
.wt-switcher-section {
  margin-bottom: 18px;
}
.wt-switcher-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wt-switcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 8px;
}
.wt-switcher-chip {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.wt-switcher-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.wt-switcher-chip.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.wt-class-switcher-card .wt-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

/* KaTeX Math & Formula Typesetting */
.katex {
  font-size: 1.05em !important;
  text-rendering: auto;
}
.katex-display {
  margin: 0.65rem 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0.35rem 0 !important;
  -webkit-overflow-scrolling: touch;
}
.katex-display > .katex {
  max-width: 100%;
  text-align: center;
}

/* ?? Daily Study Quest & Streak Banner ?????????????????????????????????? */
.wt-quest-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 40%, #f0fdf4 100%);
  border-bottom: 1px solid #fef08a;
  font-size: 0.78rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wt-quest-strip::-webkit-scrollbar { display: none; }
.wt-quest-streak {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #b45309;
  font-weight: 700;
}
.wt-quest-flame { font-size: 1.05rem; }
.wt-quest-streak-lbl { font-size: 0.72rem; color: #92400e; font-weight: 600; }
.wt-quest-divider { width: 1px; height: 16px; background: #cbd5e1; flex-shrink: 0; }
.wt-quest-tasks {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.wt-quest-tasks::-webkit-scrollbar { display: none; }
.wt-quest-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wt-quest-badge:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
}
.wt-quest-badge.completed {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}
.wt-quest-badge .wt-qcheck { font-weight: 800; font-size: 0.75rem; }
.wt-quest-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #b45309;
  font-weight: 700;
  margin-left: auto;
}

/* ?? Subject Chapter & Topic Navigator Strip ??????????????????????????? */
.wt-chapter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 8px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wt-chapter-bar::-webkit-scrollbar { display: none; }
.wt-chap-caption {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.wt-chap-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.wt-chap-scroll::-webkit-scrollbar { display: none; }
.wt-chap-pill {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.wt-chap-pill:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}
.wt-chap-pill.active {
  background: #0052ff;
  border-color: #0052ff;
  color: #ffffff;
}

/* ?? Fast Math & Chemistry Symbol Palette ?????????????????????????????? */
.wt-math-palette {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px 14px 0 0;
  border-bottom: none;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.04);
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
}
.wt-palette-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  flex-shrink: 0;
}
.wt-palette-scroll {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.wt-palette-scroll::-webkit-scrollbar { display: none; }
.wt-sym-btn {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.1s ease;
  min-width: 28px;
  text-align: center;
  font-family: KaTeX_Main, Times New Roman, serif;
}
.wt-sym-btn:hover {
  background: #0052ff;
  border-color: #0052ff;
  color: #ffffff;
  transform: scale(1.08);
}
.wt-palette-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
}
.wt-palette-close:hover { color: #ef4444; }

.wt-tool-btn {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.wt-tool-btn:hover, .wt-tool-btn.active {
  background: #eff6ff;
  color: #0052ff;
}


/* === Rich Markdown Elements (Tables, Quotes, Headings, KaTeX) === */
.wt-table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}
.wt-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.wt-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
  line-height: 1.5;
}
.wt-table tr:last-child td {
  border-bottom: none;
}
.wt-table tr:hover td {
  background: #f8fafc;
}

.wt-quote {
  border-left: 3.5px solid #0052ff;
  background: #f8fafc;
  padding: 8px 14px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
  color: #334155;
  font-style: italic;
  font-size: 0.95rem;
}

.wt-heading {
  font-weight: 750;
  color: #0f172a;
  margin: 1.1rem 0 0.4rem;
}
h2.wt-heading { font-size: 1.25rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 4px; }
h3.wt-heading { font-size: 1.12rem; }
h4.wt-heading { font-size: 1.02rem; }

.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  margin: 10px 0;
}
.katex {
  font-size: 1.08em;
}


/* === Study Accelerator Strip (Quick Starters) === */
.wt-accelerator-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px 10px;
  margin-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wt-accelerator-strip::-webkit-scrollbar {
  display: none;
}
.wt-accel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.wt-accel-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.wt-accel-chip:active {
  transform: scale(0.97);
}

/* === Code Block with Header & Copy Button === */
.wt-code-wrap {
  margin: 14px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.wt-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 14px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.wt-code-lang {
  font-size: 0.76rem;
  font-weight: 750;
  color: #94a3b8;
  letter-spacing: 0.05em;
  font-family: ui-monospace, monospace;
}
.wt-code-copy-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wt-code-copy-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #64748b;
}
.wt-code-wrap pre {
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 12px 16px !important;
}


/* === Interactive Practice Challenge Card === */
.wt-challenge-box {
  margin: 16px 0 10px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(240, 253, 250, 0.95));
  border: 1.5px solid #6366f1;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}
.wt-challenge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.wt-ch-icon {
  font-size: 1.15rem;
}
.wt-ch-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #312e81;
  letter-spacing: -0.01em;
}
.wt-ch-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.18);
  color: #4f46e5;
}
.wt-challenge-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #1e1b4b;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.wt-challenge-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.wt-ch-btn {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.wt-ch-btn-primary {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.wt-ch-btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}
.wt-ch-btn-outline {
  background: #ffffff;
  color: #4f46e5;
  border: 1.5px solid #6366f1;
}
.wt-ch-btn-outline:hover {
  background: #e0e7ff;
}
.wt-ch-btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.wt-ch-btn-ghost:hover {
  background: #f1f5f9;
  color: #1e293b;
}


/* ── Formula & Constant Cheat Sheet Modal ───────────────────────────── */
.wt-formula-box {
  width: 100%;
  max-width: 660px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  animation: wtFadeIn 0.2s ease;
}
.wt-formula-search-bar input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 0.9rem;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.wt-formula-search-bar input:focus {
  border-color: #0052ff;
  background: #ffffff;
}
.wt-formula-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}
.wt-formula-tab {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.wt-formula-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.wt-formula-tab.active {
  background: #0052ff;
  color: #ffffff;
}
.wt-formula-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  max-height: 52vh;
}
.wt-formula-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.wt-formula-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.08);
  transform: translateY(-1px);
}
.wt-formula-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wt-formula-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}
.wt-formula-card-grade {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 8px;
}
.wt-formula-card-eq {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0052ff;
  background: #eff6ff;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #0052ff;
  word-break: break-word;
}
.wt-formula-card-vars {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}
.wt-formula-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-formula-ask, .btn-formula-copy {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s;
}
.btn-formula-ask {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
.btn-formula-ask:hover {
  background: #dcfce7;
}
.btn-formula-copy:hover {
  background: #f1f5f9;
}


/* ── PYQ Bank Header Button ─────────────────────────────────── */
#btn-open-pyq {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wt-text-secondary, #475569);
  background: var(--wt-bg-tertiary, #f1f5f9);
  border: 1px solid var(--wt-border, #e2e8f0);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
#btn-open-pyq:hover {
  background: var(--wt-primary, #0052ff);
  color: #fff;
  border-color: var(--wt-primary, #0052ff);
}

/* ── New Accelerator Chips Styles (enhanced) ─────────────────── */
.wt-accel-chip[data-prompt*="pyq"],
.wt-accel-chip[data-prompt*="exam countdown"],
.wt-accel-chip[data-prompt*="mistake vault"],
.wt-accel-chip[data-prompt*="score predict"],
.wt-accel-chip[data-prompt*="adaptive practice"],
.wt-accel-chip[data-prompt*="speed math"] {
  border-color: var(--wt-primary, #0052ff) !important;
  background: linear-gradient(135deg, rgba(0,82,255,0.05), rgba(0,82,255,0.1)) !important;
}

.wt-accel-chip[data-prompt*="pyq"]:hover,
.wt-accel-chip[data-prompt*="exam countdown"]:hover,
.wt-accel-chip[data-prompt*="mistake vault"]:hover,
.wt-accel-chip[data-prompt*="score predict"]:hover,
.wt-accel-chip[data-prompt*="adaptive practice"]:hover,
.wt-accel-chip[data-prompt*="speed math"]:hover {
  background: var(--wt-primary, #0052ff) !important;
  color: #fff !important;
}

/* ── Extended Formula Tabs ───────────────────────────────────── */
.wt-formula-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wt-formula-tabs::-webkit-scrollbar { display: none; }

.wt-formula-tab[data-tab="biology"] { color: #16a34a; }
.wt-formula-tab[data-tab="biology"].active { background: #16a34a; color: #fff; }
.wt-formula-tab[data-tab="sst"] { color: #d97706; }
.wt-formula-tab[data-tab="sst"].active { background: #d97706; color: #fff; }
.wt-formula-tab[data-tab="english"] { color: #7c3aed; }
.wt-formula-tab[data-tab="english"].active { background: #7c3aed; color: #fff; }

/* ── New Sidebar Shortcuts Styling ───────────────────────────── */
.wt-shortcuts button[data-command="pyq"],
.wt-shortcuts button[data-command="exam countdown"],
.wt-shortcuts button[data-command="mistake vault"],
.wt-shortcuts button[data-command="score predict"],
.wt-shortcuts button[data-command="smart course"],
.wt-shortcuts button[data-command="adaptive practice"],
.wt-shortcuts button[data-command="speed math"],
.wt-shortcuts button[data-command="study plan"] {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #818cf8;
  font-weight: 600;
}
.wt-shortcuts button[data-command="pyq"]:hover,
.wt-shortcuts button[data-command="exam countdown"]:hover,
.wt-shortcuts button[data-command="mistake vault"]:hover,
.wt-shortcuts button[data-command="score predict"]:hover,
.wt-shortcuts button[data-command="smart course"]:hover,
.wt-shortcuts button[data-command="adaptive practice"]:hover,
.wt-shortcuts button[data-command="speed math"]:hover,
.wt-shortcuts button[data-command="study plan"]:hover {
  background: #4f46e5;
  color: #fff;
  border-color: #4338ca;
}

/* ── Sidebar scrollbar improvements ──────────────────────────── */
.wt-sb-scrollable::-webkit-scrollbar { width: 4px; }
.wt-sb-scrollable::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.wt-sb-scrollable::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* ═══════════════════════════════════════════════════════════════
   DARK MODE — Professional 4K UHD Night Study Theme
   Toggled via body.wt-dark class
   ═══════════════════════════════════════════════════════════════ */
body.wt-dark {
  --wt-bg: #0b0f19;
  --wt-bg-secondary: #111827;
  --wt-bg-tertiary: #1f2937;
  --wt-text: #f1f5f9;
  --wt-text-secondary: #94a3b8;
  --wt-border: #1e293b;
  --wt-primary: #3b82f6;
  --wt-primary-hover: #2563eb;
  --wt-shadow: rgba(0,0,0,0.6);
  --wt-msg-user-bg: #1e3a5f;
  --wt-msg-ai-bg: #111827;
  --wt-sidebar-bg: #0c101c;
  --wt-composer-bg: #131b2e;
  background: #0b0f19 !important;
  color: #f1f5f9 !important;
  color-scheme: dark;
}

/* ── Global Header & Navigation ──────────────────────────────────────── */
body.wt-dark .sg-header {
  background: #0f172a !important;
  border-color: #1e293b !important;
}
body.wt-dark .wt-sidebar,
body.wt-dark .wt-chatgpt-sidebar {
  background: #0c101c !important;
  border-color: #1e293b !important;
}
body.wt-dark .wt-sb-details summary {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-shortcuts button {
  background: #161f33 !important;
  color: #e2e8f0 !important;
  border-color: #273549 !important;
}
body.wt-dark .wt-shortcuts button:hover {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* ── Main Chatgpt Area & Workspace Canvas ────────────────────────────── */
body.wt-dark .wt-chatgpt-main,
body.wt-dark .wt-chat-area {
  background: #0b0f19 !important;
  color: #f1f5f9 !important;
}

/* ── Minimalist Top Header Bar ───────────────────────────────────────── */
body.wt-dark .wt-chat-header {
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  color: #f1f5f9 !important;
}
body.wt-dark .wt-hamburger-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}
body.wt-dark .wt-hamburger-btn:hover {
  background: #334155 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-model-badge {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
}
body.wt-dark .wt-student-profile-pill {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid #334155 !important;
}
body.wt-dark .wt-header-action-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-header-action-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}

/* ── Dark Mode Toggle Button ─────────────────────────────────────────── */
.wt-dark-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 6px 11px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}
body:not(.wt-dark) .wt-dark-toggle {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
body:not(.wt-dark) .wt-dark-toggle:hover {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}
body.wt-dark .wt-dark-toggle {
  background: #1e293b !important;
  color: #fbbf24 !important;
  border: 1px solid #334155 !important;
}
body.wt-dark .wt-dark-toggle:hover {
  background: #fbbf24 !important;
  color: #0f172a !important;
  border-color: #fbbf24 !important;
}

/* ── Study Tip Banner & Quest Strip ──────────────────────────────────── */
body.wt-dark .wt-tip-banner {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  color: #fde68a !important;
}
body.wt-dark .wt-tip-close {
  color: #fbbf24 !important;
}
body.wt-dark .wt-quest-strip {
  background: #111827 !important;
  border-bottom: 1px solid #1f2937 !important;
}
body.wt-dark .wt-quest-streak { color: #f59e0b !important; }
body.wt-dark .wt-quest-streak-lbl { color: #fbbf24 !important; }
body.wt-dark .wt-quest-divider { background: #374151 !important; }
body.wt-dark .wt-quest-badge {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-quest-badge:hover {
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-quest-badge.completed {
  background: rgba(34, 197, 94, 0.18) !important;
  border-color: rgba(34, 197, 94, 0.45) !important;
  color: #4ade80 !important;
}
body.wt-dark .wt-quest-coins { color: #fbbf24 !important; }

/* ── Teacher Mode Selector Bar ───────────────────────────────────────── */
body.wt-dark .wt-teacher-modes-bar {
  background: #0d1322 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.wt-dark .wt-mode-pill {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-mode-pill:hover {
  background: #202b42 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-mode-pill.active {
  background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 3px 12px rgba(0, 82, 255, 0.4) !important;
}

/* ── Subject Quick-Pick Bar ──────────────────────────────────────────── */
body.wt-dark .wt-subjects-bar {
  background: #0d1322 !important;
  border-bottom: 1px solid #1e293b !important;
}
body.wt-dark .wt-subj-caption {
  color: #64748b !important;
}
body.wt-dark .wt-subj-chip {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-subj-chip:hover {
  background: #202b42 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-subj-chip.active {
  background: #0052ff !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.35) !important;
}

/* ── Chapter / Topic Strip ───────────────────────────────────────────── */
body.wt-dark .wt-chapter-bar {
  background: #090d16 !important;
  border-bottom: 1px solid #1a2234 !important;
}
body.wt-dark .wt-chap-caption {
  color: #64748b !important;
}
body.wt-dark .wt-chap-chip {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-chap-chip:hover {
  background: #202b42 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-chap-chip.active {
  background: #0052ff !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* ── Messages Stream ─────────────────────────────────────────────────── */
body.wt-dark .wt-chatgpt-messages {
  background: #0b0f19 !important;
  color: #f1f5f9 !important;
}
body.wt-dark .wt-chatgpt-messages::-webkit-scrollbar-thumb {
  background: #334155 !important;
}

/* ── Empty Welcome State & Prompt Cards ──────────────────────────────── */
body.wt-dark .wt-chatgpt-welcome h2 {
  color: #f8fafc !important;
}
body.wt-dark .wt-chatgpt-welcome p {
  color: #94a3b8 !important;
}
body.wt-dark .wt-prompt-card {
  background: #131b2e !important;
  border-color: #273549 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
body.wt-dark .wt-prompt-card:hover {
  background: #1a253d !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 8px 24px rgba(0, 82, 255, 0.22) !important;
}
body.wt-dark .wt-prompt-title {
  color: #f1f5f9 !important;
}
body.wt-dark .wt-prompt-desc {
  color: #94a3b8 !important;
}

/* ── Message Content & High-Contrast Typography ──────────────────────── */
body.wt-dark .wt-message:not(.user) {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-msg-content {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-msg-content p {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-msg-content li {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-msg-content h1,
body.wt-dark .wt-msg-content h2,
body.wt-dark .wt-msg-content h3,
body.wt-dark .wt-msg-content h4 {
  color: #f8fafc !important;
}
body.wt-dark .wt-msg-content strong,
body.wt-dark .wt-msg-content b {
  color: #ffffff !important;
  font-weight: 700 !important;
}
body.wt-dark .wt-msg-author {
  color: #38bdf8 !important;
}
body.wt-dark .wt-message.user .wt-msg-content {
  background: #1e3a5f !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}
body.wt-dark .wt-message code {
  background: #162032 !important;
  color: #60a5fa !important;
  border: 1px solid #273549 !important;
}
body.wt-dark .wt-message pre {
  background: #090d16 !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

/* ── Answer Action Buttons (Copy, Read aloud, Save Note, PDF) ────────── */
body.wt-dark .wt-answer-actions button,
body.wt-dark .wt-action-chip {
  background: #161f33 !important;
  border: 1px solid #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-answer-actions button:hover,
body.wt-dark .wt-action-chip:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.3) !important;
}

/* ── MCQ Choice Buttons & Practice Challenge ─────────────────────────── */
body.wt-dark .wt-mcq-choice-row {
  background: #101726 !important;
  border: 1px solid #1e293b !important;
}
body.wt-dark .wt-mcq-label {
  color: #94a3b8 !important;
}
body.wt-dark .wt-mcq-choice-btn {
  background: #161f33 !important;
  border: 1px solid #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-mcq-choice-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
body.wt-dark .wt-challenge-box {
  background: #101726 !important;
  border: 1.5px solid #1e3a8a !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}
body.wt-dark .wt-challenge-header {
  border-bottom: 1px solid #1e3a8a !important;
}
body.wt-dark .wt-ch-title {
  color: #93c5fd !important;
}
body.wt-dark .wt-challenge-body {
  color: #e2e8f0 !important;
}

/* ── Thinking Indicator ──────────────────────────────────────────────── */
body.wt-dark .wt-thinking-bubble {
  background: #161f33 !important;
  border: 1px solid #273549 !important;
  color: #cbd5e1 !important;
}

/* ── Floating Bottom Composer & Accelerator Bar ──────────────────────── */
body.wt-dark .wt-composer-wrapper {
  background: linear-gradient(to top, #0b0f19 75%, rgba(11, 15, 25, 0.9) 90%, rgba(11, 15, 25, 0)) !important;
}
body.wt-dark .wt-compose-capsule {
  background: #131b2e !important;
  border-color: #273549 !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.45) !important;
}
body.wt-dark .wt-compose-capsule:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 28px rgba(0, 82, 255, 0.25) !important;
}
body.wt-dark .wt-compose-capsule textarea {
  color: #f8fafc !important;
}
body.wt-dark .wt-compose-capsule textarea::placeholder {
  color: #64748b !important;
}
body.wt-dark .wt-upload-btn,
body.wt-dark .wt-voice-btn {
  color: #94a3b8 !important;
}
body.wt-dark .wt-upload-btn:hover,
body.wt-dark .wt-voice-btn:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}
body.wt-dark .wt-accel-chip {
  background: #131b2e !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}
body.wt-dark .wt-accel-chip:hover {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3) !important;
}

/* ── Fast Math Symbol Palette ────────────────────────────────────────── */
body.wt-dark .wt-math-palette {
  background: #131b2e !important;
  border-color: #273549 !important;
}
body.wt-dark .wt-palette-label {
  color: #94a3b8 !important;
}
body.wt-dark .wt-sym-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-sym-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}
body.wt-dark .wt-palette-close {
  color: #94a3b8 !important;
}
body.wt-dark .wt-palette-close:hover {
  color: #ffffff !important;
}

/* ── Attachment Preview Capsule ──────────────────────────────────────── */
body.wt-dark .wt-attach-preview {
  background: #131b2e !important;
  border-color: #273549 !important;
}
body.wt-dark .wt-attach-name {
  color: #f1f5f9 !important;
}
body.wt-dark .wt-attach-size {
  color: #94a3b8 !important;
}
body.wt-dark .wt-attach-remove {
  color: #94a3b8 !important;
}
body.wt-dark .wt-attach-remove:hover {
  color: #ef4444 !important;
}

/* ── Modals (Dashboard, Flashcards, Formulas, Class Switcher) ────────── */
body.wt-dark .wt-modal-backdrop {
  background: rgba(0, 0, 0, 0.78) !important;
}
body.wt-dark .wt-dashboard-box,
body.wt-dark .wt-flashcard-box,
body.wt-dark .wt-formula-box,
body.wt-dark .wt-modal-card {
  background: #101726 !important;
  border: 1px solid #1e293b !important;
  color: #f1f5f9 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}
body.wt-dark .wt-dash-card {
  background: #162032 !important;
  border: 1px solid #273549 !important;
  color: #f1f5f9 !important;
}
body.wt-dark .wt-dash-card-label {
  color: #94a3b8 !important;
}
body.wt-dark .wt-dash-day {
  background: #162032 !important;
  border-color: #273549 !important;
  color: #94a3b8 !important;
}
body.wt-dark .wt-dash-day.active {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}
body.wt-dark .wt-dash-subject-tag {
  background: #162032 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-modal-header {
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}
body.wt-dark .wt-modal-close {
  color: #94a3b8 !important;
}
body.wt-dark .wt-modal-close:hover {
  color: #ffffff !important;
}
body.wt-dark .wt-modal-footer {
  border-top: 1px solid #1e293b !important;
  background: #0d1322 !important;
}
body.wt-dark .wt-formula-card {
  background: #0b0f19 !important;
  border-color: #1e293b !important;
}
body.wt-dark .wt-formula-card-eq {
  color: #93c5fd !important;
}
body.wt-dark .wt-formula-tab {
  color: #94a3b8 !important;
  border-color: #273549 !important;
}
body.wt-dark .wt-formula-tab.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* ── KaTeX LaTeX Formulas in Dark Mode ───────────────────────────────── */
body.wt-dark .katex {
  color: #f8fafc !important;
}
body.wt-dark .katex-display {
  background: rgba(19, 27, 46, 0.7) !important;
  border: 1px solid #1e293b !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
}


/* ── Formula Insert Button ──────────────────────────────────── */
.btn-formula-insert {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  transition: all 0.15s;
}
.btn-formula-insert:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
body.wt-dark .btn-formula-insert {
  background: #1e3a5f;
  border-color: #2563eb;
  color: #93c5fd;
}


/* ==========================================================================
   AI Study Guru — Professional Upgrade v25
   1. Focus Mode & Distraction-Free Study Space
   2. Pedagogical Callout Cards (Trap, Topper, Marking Scheme, Formula)
   3. 2-Tier Message Actions: Floating Toolbar & Study Starters
   4. Night Mode White-Button Fixes & Contrast Perfection
   5. Sleek Typography & Responsive Polish
   ========================================================================== */

/* ── 1. Collapsible Study Controls Strip ───────────────────────────────── */
.wt-study-controls {
  display: flex;
  flex-direction: column;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.25s ease;
  max-height: 320px;
  opacity: 1;
  overflow: visible;
}
.wt-study-controls.wt-collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0 !important;
  padding: 0 !important;
}
.wt-tip-banner.wt-collapsed,
.wt-quest-strip.wt-collapsed {
  display: none !important;
}
.wt-focus-bar-hint {
  display: flex;
  justify-content: center;
  padding: 4px 16px;
  background: transparent;
  animation: wtFadeIn 0.3s ease;
}
.wt-mini-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 3px 14px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  color: #2563eb;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wt-mini-expand-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  border-style: solid;
  transform: translateY(-1px);
}
body.wt-dark .wt-mini-expand-btn {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}
.wt-focus-toggle.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3) !important;
}

/* ── 2. Pedagogical Callout Cards ──────────────────────────────────────── */
.wt-callout {
  margin: 12px 0;
  border-radius: 12px;
  border: 1px solid;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: wtFadeIn 0.25s ease-out;
}
.wt-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 750;
  border-bottom: 1px solid;
}
.wt-callout-icon { font-size: 1.05rem; }
.wt-callout-title { flex: 1; letter-spacing: -0.01em; }
.wt-callout-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wt-callout-body {
  padding: 10px 14px;
  font-size: 0.91rem;
  line-height: 1.6;
}
.wt-callout-body p { margin: 0.35rem 0; }
.wt-callout-body p:first-child { margin-top: 0; }
.wt-callout-body p:last-child { margin-bottom: 0; }
.wt-callout-list { margin: 0.4rem 0; padding-left: 1.3rem; }
.wt-callout-list li { margin: 0.25rem 0; }

/* Trap Alert: Amber / Red (Danger / Warning) */
.wt-callout-trap {
  background: #fffdf5;
  border-color: #fca5a5;
  border-left: 4px solid #ef4444;
}
.wt-callout-trap .wt-callout-header {
  background: linear-gradient(90deg, #fef2f2 0%, #fffbeb 100%);
  border-bottom-color: #fecaca;
  color: #991b1b;
}
.wt-callout-trap .wt-callout-badge {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.wt-callout-trap .wt-callout-body { color: #7f1d1d; }

/* Topper Tip: Purple / Indigo (Excellence / Secrets) */
.wt-callout-topper {
  background: #faf5ff;
  border-color: #d8b4fe;
  border-left: 4px solid #8b5cf6;
}
.wt-callout-topper .wt-callout-header {
  background: linear-gradient(90deg, #f3e8ff 0%, #e0e7ff 100%);
  border-bottom-color: #e9d5ff;
  color: #581c87;
}
.wt-callout-topper .wt-callout-badge {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}
.wt-callout-topper .wt-callout-body { color: #4c1d95; }

/* Marking Scheme: Blue / Cyan (Official / Accurate) */
.wt-callout-marking {
  background: #f0f9ff;
  border-color: #bae6fd;
  border-left: 4px solid #0284c7;
}
.wt-callout-marking .wt-callout-header {
  background: linear-gradient(90deg, #e0f2fe 0%, #f0fdf4 100%);
  border-bottom-color: #bae6fd;
  color: #0369a1;
}
.wt-callout-marking .wt-callout-badge {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
}
.wt-callout-marking .wt-callout-body { color: #0c4a6e; }

/* Formula & Concept: Emerald / Green (High-yield recall) */
.wt-callout-formula {
  background: #f0fdf4;
  border-color: #a7f3d0;
  border-left: 4px solid #10b981;
}
.wt-callout-formula .wt-callout-header {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 100%);
  border-bottom-color: #a7f3d0;
  color: #065f46;
}
.wt-callout-formula .wt-callout-badge {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.wt-callout-formula .wt-callout-body { color: #064e3b; }

/* Night Mode Callouts */
body.wt-dark .wt-callout {
  background: #0f1626 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}
body.wt-dark .wt-callout-trap {
  border-color: rgba(239, 68, 68, 0.4) !important;
  border-left: 4px solid #ef4444 !important;
}
body.wt-dark .wt-callout-trap .wt-callout-header {
  background: rgba(239, 68, 68, 0.15) !important;
  border-bottom-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}
body.wt-dark .wt-callout-trap .wt-callout-badge {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fecaca !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}
body.wt-dark .wt-callout-trap .wt-callout-body { color: #fecaca !important; }

body.wt-dark .wt-callout-topper {
  border-color: rgba(139, 92, 246, 0.4) !important;
  border-left: 4px solid #a855f7 !important;
}
body.wt-dark .wt-callout-topper .wt-callout-header {
  background: rgba(139, 92, 246, 0.15) !important;
  border-bottom-color: rgba(139, 92, 246, 0.3) !important;
  color: #d8b4fe !important;
}
body.wt-dark .wt-callout-topper .wt-callout-badge {
  background: rgba(139, 92, 246, 0.25) !important;
  color: #ede9fe !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}
body.wt-dark .wt-callout-topper .wt-callout-body { color: #e9d5ff !important; }

body.wt-dark .wt-callout-marking {
  border-color: rgba(2, 132, 199, 0.4) !important;
  border-left: 4px solid #38bdf8 !important;
}
body.wt-dark .wt-callout-marking .wt-callout-header {
  background: rgba(2, 132, 199, 0.15) !important;
  border-bottom-color: rgba(2, 132, 199, 0.3) !important;
  color: #7dd3fc !important;
}
body.wt-dark .wt-callout-marking .wt-callout-badge {
  background: rgba(2, 132, 199, 0.25) !important;
  color: #bae6fd !important;
  border-color: rgba(2, 132, 199, 0.5) !important;
}
body.wt-dark .wt-callout-marking .wt-callout-body { color: #e0f2fe !important; }

body.wt-dark .wt-callout-formula {
  border-color: rgba(16, 185, 129, 0.4) !important;
  border-left: 4px solid #34d399 !important;
}
body.wt-dark .wt-callout-formula .wt-callout-header {
  background: rgba(16, 185, 129, 0.15) !important;
  border-bottom-color: rgba(16, 185, 129, 0.3) !important;
  color: #6ee7b7 !important;
}
body.wt-dark .wt-callout-formula .wt-callout-badge {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #a7f3d0 !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}
body.wt-dark .wt-callout-formula .wt-callout-body { color: #d1fae5 !important; }

/* ── 3. 2-Tier Message Actions (Toolbar & Starters) ────────────────────── */
.wt-msg-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.wt-msg-toolbar-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 10px;
  min-height: 28px;
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.wt-msg-toolbar-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.wt-msg-toolbar-btn:active { transform: scale(0.97); }

/* Next-Step Study Starters */
.wt-study-starters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}
.wt-starter-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.77rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.wt-starter-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}
.wt-starter-chip:active { transform: scale(0.97); }

/* Option Buttons Container */
.wt-option-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.wt-option-btn {
  background: #ffffff;
  border: 1.5px solid #0052ff;
  color: #0052ff;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wt-option-btn:hover {
  background: #0052ff;
  color: #ffffff;
}

/* Night Mode Actions */
body.wt-dark .wt-msg-toolbar {
  border-top-color: #1e293b !important;
}
body.wt-dark .wt-msg-toolbar-btn {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #94a3b8 !important;
}
body.wt-dark .wt-msg-toolbar-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
body.wt-dark .wt-study-starters {
  background: #0e1524 !important;
  border-color: #1e293b !important;
}
body.wt-dark .wt-starter-chip {
  background: #162036 !important;
  border-color: #2563eb !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-starter-chip:hover {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}
body.wt-dark .wt-option-btn {
  background: #162036 !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-option-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* ── 4. Complete Dark Mode White-Button Fixes ──────────────────────────── */
body.wt-dark .btn-outline {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .btn-outline:hover {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-quick-new-btn {
  background: linear-gradient(135deg, #161f33, #1e293b) !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) !important;
}
body.wt-dark .wt-quick-new-btn:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}
body.wt-dark .wt-reaction-btn {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #94a3b8 !important;
}
body.wt-dark .wt-reaction-btn:hover {
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-reaction-btn.reacted {
  background: rgba(225, 29, 72, 0.2) !important;
  border-color: rgba(225, 29, 72, 0.5) !important;
  color: #fb7185 !important;
}
body.wt-dark .wt-speaking {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
body.wt-dark .wt-follow-up-chip {
  background: #162036 !important;
  border-color: #2563eb !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-follow-up-chip:hover {
  background: #2563eb !important;
  color: #ffffff !important;
}
body.wt-dark .wt-ch-btn-outline {
  background: #161f33 !important;
  border-color: #6366f1 !important;
  color: #a5b4fc !important;
}
body.wt-dark .wt-ch-btn-outline:hover {
  background: #4f46e5 !important;
  color: #ffffff !important;
}
body.wt-dark .wt-challenge-body {
  background: #0d1322 !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}
body.wt-dark .wt-class-switcher-card {
  background: #111827 !important;
  border-color: #1e293b !important;
}
body.wt-dark .wt-table-wrap {
  background: #0b0f19 !important;
}
body.wt-dark .wt-timer-popover {
  background: #111827 !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
body.wt-dark .wt-quote {
  background: #111827 !important;
  border-color: #3b82f6 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-welcome-mode-badge {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border-color: #334155 !important;
}
body.wt-dark .wt-chap-pill {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-switcher-chip {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-quick-chip {
  background: #161f33 !important;
  border-color: #273549 !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-attach-thumb {
  background: #161f33 !important;
  border-color: #273549 !important;
}

/* ── 5. Typography Polish & Header Responsiveness ──────────────────────── */
.wt-message h2.wt-heading {
  font-size: 1.14rem;
  font-weight: 750;
  margin: 0.9rem 0 0.35rem;
  padding-bottom: 3px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.wt-message h3.wt-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.8rem 0 0.3rem;
  color: #0f172a;
}
.wt-message h4.wt-heading {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0.7rem 0 0.25rem;
  color: #1e293b;
}
body.wt-dark .wt-message h2.wt-heading {
  border-bottom-color: #1e293b !important;
  color: #f8fafc !important;
}
body.wt-dark .wt-message h3.wt-heading {
  color: #f1f5f9 !important;
}
body.wt-dark .wt-message h4.wt-heading {
  color: #e2e8f0 !important;
}
.wt-message .katex-display {
  margin: 8px 0 !important;
  padding: 8px 12px !important;
  font-size: 1.04em !important;
  overflow-x: auto !important;
  max-width: 100% !important;
}

@media (max-width: 1024px) {
  .wt-chat-header-right { gap: 4px; }
  .wt-header-action-btn { padding: 4px 8px; font-size: 0.76rem; }
  #btn-open-formulas, #btn-sound-toggle { display: none !important; }
}
@media (max-width: 768px) {
  .wt-tg-header-pill span {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #btn-open-pyq, #btn-open-dashboard { display: none !important; }
}

/* =====================================================================
   AI STUDY GURU — WORLD-CLASS PREMIUM EDTECH UI SYSTEM
   Designed for maximum focus, clarity, elegance and student delight.
   Inspired by ChatGPT Plus, Claude 3.5, Duolingo Max, and Linear.
   ===================================================================== */

/* ── 1. Global Typography & Core Design Tokens ──────────────────────── */
:root {
  --wt-brand: #2563eb;
  --wt-brand-hover: #1d4ed8;
  --wt-brand-light: #eff6ff;
  --wt-brand-grad: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #4f46e5 100%);
  --wt-brand-glow: 0 4px 16px rgba(37, 99, 235, 0.28);
  
  --wt-ink-900: #0f172a;
  --wt-ink-700: #334155;
  --wt-ink-500: #64748b;
  --wt-ink-400: #94a3b8;
  --wt-ink-300: #cbd5e1;
  --wt-ink-100: #f1f5f9;
  
  --wt-bg-canvas: #f8fafc;
  --wt-bg-surface: #ffffff;
  --wt-bg-subtle: #f8fafc;
  
  --wt-border-light: #e2e8f0;
  --wt-border-hairline: #f1f5f9;
  
  --wt-shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --wt-shadow-card: 0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --wt-shadow-float: 0 12px 36px rgba(15, 23, 42, 0.09), 0 2px 8px rgba(15, 23, 42, 0.04);
  --wt-shadow-composer: 0 10px 30px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  
  --wt-radius-pill: 9999px;
  --wt-radius-card: 16px;
  --wt-radius-bubble: 20px;
  --wt-radius-btn: 10px;
}

body.tutor {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif !important;
  color: var(--wt-ink-900);
  background: var(--wt-bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 2. Top Header Navigation (Unified & Sleek) ─────────────────────── */
body.tutor .wt-chat-header {
  height: 54px !important;
  padding: 0 16px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--wt-border-light) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 50 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

body.tutor .wt-chat-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.tutor .wt-hamburger-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  border: 1px solid var(--wt-border-light) !important;
  background: #ffffff !important;
  color: var(--wt-ink-700) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-hamburger-btn:hover {
  background: var(--wt-ink-100) !important;
  border-color: var(--wt-ink-300) !important;
  color: var(--wt-ink-900) !important;
}

body.tutor .wt-model-badge {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 10px !important;
  background: var(--wt-ink-100) !important;
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
  border-radius: 20px !important;
  font-size: 0.83rem !important;
  font-weight: 700 !important;
  color: var(--wt-ink-900) !important;
}
body.tutor .wt-model-icon {
  font-size: 0.95rem !important;
}
body.tutor .wt-online-dot {
  width: 6px !important;
  height: 6px !important;
  background: #10b981 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6) !important;
}

/* Student Profile & Grade Switcher Pill */
body.tutor .wt-student-profile-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 11px !important;
  background: #ffffff !important;
  border: 1.5px solid var(--wt-border-light) !important;
  border-radius: var(--wt-radius-pill) !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  color: var(--wt-ink-700) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-student-profile-pill:hover {
  background: var(--wt-brand-light) !important;
  border-color: #bfdbfe !important;
  color: var(--wt-brand) !important;
  transform: translateY(-1px) !important;
}
body.tutor .wt-prof-edit-icon {
  font-size: 0.72rem !important;
  opacity: 0.6 !important;
}

/* Header Right Actions */
body.tutor .wt-chat-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.tutor .wt-header-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 10px !important;
  height: 32px !important;
  background: #ffffff !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: var(--wt-radius-pill) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--wt-ink-700) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-header-action-btn:hover {
  background: var(--wt-ink-100) !important;
  border-color: var(--wt-ink-300) !important;
  color: var(--wt-ink-900) !important;
  transform: translateY(-1px) !important;
}

/* Pomodoro Focus Timer Pill */
body.tutor .wt-timer-trigger {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums !important;
}
body.tutor .wt-timer-trigger:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

/* Telegram Header Pill */
body.tutor .wt-tg-header-pill {
  background: rgba(34, 158, 217, 0.08) !important;
  border-color: rgba(34, 158, 217, 0.28) !important;
  color: #0284c7 !important;
  text-decoration: none !important;
  font-weight: 650 !important;
}
body.tutor .wt-tg-header-pill:hover {
  background: rgba(34, 158, 217, 0.15) !important;
  border-color: rgba(34, 158, 217, 0.4) !important;
}

/* Dark Mode & Sound Icon Buttons */
body.tutor .wt-dark-toggle,
body.tutor .wt-sound-btn {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

/* New Topic Button */
body.tutor .wt-quick-new-btn {
  background: var(--wt-brand-grad) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 5px 13px !important;
  border-radius: var(--wt-radius-pill) !important;
  box-shadow: var(--wt-brand-glow) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}
body.tutor .wt-quick-new-btn:hover {
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
}
body.tutor .wt-quick-new-btn:active {
  transform: scale(0.97) !important;
}

/* ── 3. Tip Banner & Daily Study Quest (Slim & Non-Intrusive) ────────── */
body.tutor .wt-tip-banner {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 4px 16px 0 !important;
  padding: 4px 12px !important;
  background: #fffbeb !important;
  border: 1px solid #fef3c7 !important;
  border-radius: 8px !important;
  font-size: 0.77rem !important;
  color: #92400e !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-tip-text { margin: 0 !important; line-height: 1.35 !important; }
body.tutor .wt-tip-close {
  background: none !important;
  border: none !important;
  color: #b45309 !important;
  cursor: pointer !important;
  font-size: 0.85rem !important;
  padding: 2px !important;
}

body.tutor .wt-quest-strip {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 3px 16px !important;
  background: #fafbfc !important;
  border-bottom: 1px solid var(--wt-border-hairline) !important;
  font-size: 0.76rem !important;
  color: var(--wt-ink-500) !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
body.tutor .wt-quest-strip::-webkit-scrollbar { display: none !important; }
body.tutor .wt-quest-streak {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 750 !important;
  color: #b45309 !important;
  white-space: nowrap !important;
}
body.tutor .wt-quest-divider {
  width: 1px !important;
  height: 12px !important;
  background: var(--wt-border-light) !important;
}
body.tutor .wt-quest-tasks {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  white-space: nowrap !important;
}
body.tutor .wt-quest-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.74rem !important;
  color: var(--wt-ink-500) !important;
}
body.tutor .wt-quest-badge.completed {
  color: #059669 !important;
  font-weight: 650 !important;
}
body.tutor .wt-quest-coins {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 750 !important;
  color: #a16207 !important;
  white-space: nowrap !important;
}

/* ── 4. Study Controls (Teacher Modes, Subjects, Chapters) ──────────── */
body.tutor .wt-study-controls {
  background: #ffffff !important;
  border-bottom: 1px solid var(--wt-border-light) !important;
  transition: max-height 0.25s ease, opacity 0.25s ease !important;
}
body.tutor .wt-study-controls.wt-collapsed,
body.tutor .wt-quest-strip.wt-collapsed,
body.tutor .wt-tip-banner.wt-collapsed {
  display: none !important;
}

/* Teacher Mode Segmented Control Bar */
body.tutor .wt-teacher-modes-bar {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 16px !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--wt-border-hairline) !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}
body.tutor .wt-teacher-modes-bar::-webkit-scrollbar { display: none !important; }

body.tutor .wt-mode-pill {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 11px !important;
  border-radius: var(--wt-radius-pill) !important;
  border: 1px solid var(--wt-border-light) !important;
  background: var(--wt-bg-canvas) !important;
  color: var(--wt-ink-700) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}
body.tutor .wt-mode-pill:hover {
  background: #f1f5f9 !important;
  border-color: var(--wt-ink-300) !important;
  color: var(--wt-ink-900) !important;
}
body.tutor .wt-mode-pill.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.14) !important;
}
body.tutor .wt-mode-icon { font-size: 0.9rem !important; }

/* Subject Quick-Pick Bar */
body.tutor .wt-subjects-bar {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 16px !important;
  background: #ffffff !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
body.tutor .wt-subjects-bar::-webkit-scrollbar { display: none !important; }
body.tutor .wt-subj-caption {
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  color: var(--wt-ink-400) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-right: 3px !important;
  flex-shrink: 0 !important;
}
body.tutor .wt-subj-chip {
  flex-shrink: 0 !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: var(--wt-radius-pill) !important;
  padding: 2.5px 10px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  color: var(--wt-ink-500) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
body.tutor .wt-subj-chip:hover {
  background: #f1f5f9 !important;
  color: var(--wt-ink-900) !important;
}
body.tutor .wt-subj-chip.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25) !important;
}

/* Chapter & Topic Bar */
body.tutor .wt-chapter-bar {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 16px 6px !important;
  background: #ffffff !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
body.tutor .wt-chapter-bar::-webkit-scrollbar { display: none !important; }
body.tutor .wt-chap-caption {
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  color: var(--wt-ink-400) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-right: 3px !important;
  flex-shrink: 0 !important;
}
body.tutor .wt-chap-chip {
  flex-shrink: 0 !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: 7px !important;
  padding: 2.5px 9px !important;
  font-size: 0.73rem !important;
  font-weight: 500 !important;
  background: var(--wt-bg-canvas) !important;
  color: var(--wt-ink-700) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
body.tutor .wt-chap-chip:hover {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

/* ── 5. Left Sidebar (Premium Obsidian Minimalist) ───────────────────── */
body.tutor .wt-chatgpt-sidebar {
  background: #0f172a !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15) !important;
}

body.tutor .wt-sb-brand {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

body.tutor .wt-new-chat-btn {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-weight: 650 !important;
  font-size: 0.85rem !important;
  padding: 9px 12px !important;
  transition: all 0.18s ease !important;
}
body.tutor .wt-new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px) !important;
}
body.tutor .wt-kbd {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 1px 5px !important;
  font-size: 0.68rem !important;
}

body.tutor .wt-sb-heading {
  font-size: 0.66rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.09em !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  margin: 12px 0 8px !important;
}

/* Action Cards in Sidebar */
body.tutor .wt-chatgpt-sidebar .wt-action-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
}
body.tutor .wt-chatgpt-sidebar .wt-action-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
  color: #e2e8f0 !important;
  font-size: 0.79rem !important;
  font-weight: 600 !important;
  padding: 8px 10px !important;
  transition: all 0.18s ease !important;
}
body.tutor .wt-chatgpt-sidebar .wt-action-card:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Quick Commands Buttons (Clean Dark Minimalist) */
body.tutor .wt-chatgpt-sidebar .wt-shortcuts {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
  padding: 8px 4px !important;
}
body.tutor .wt-chatgpt-sidebar .wt-shortcuts button {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 8px !important;
  color: #cbd5e1 !important;
  font-size: 0.74rem !important;
  font-weight: 550 !important;
  padding: 6px 8px !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: none !important;
}
body.tutor .wt-chatgpt-sidebar .wt-shortcuts button:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* Telegram Sidebar Card */
body.tutor .wt-sb-telegram-box {
  background: rgba(34, 158, 217, 0.08) !important;
  border: 1px solid rgba(34, 158, 217, 0.22) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  margin: 10px 0 !important;
}

/* ── 6. Conversation Stream & Message Layout ────────────────────────── */
body.tutor .wt-chatgpt-messages {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 20px 16px 130px !important;
  scroll-behavior: smooth !important;
}
body.tutor .wt-chatgpt-messages > * {
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* User Message (Right-Aligned Bubble - Absolute Fix) */
body.tutor .wt-message.user {
  display: flex !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
  width: 100% !important;
  margin-bottom: 22px !important;
}
body.tutor .wt-message.user .wt-msg-content {
  background: var(--wt-brand-grad) !important;
  color: #ffffff !important;
  padding: 11px 17px !important;
  border-radius: 18px 18px 4px 18px !important;
  max-width: 75% !important;
  width: fit-content !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22) !important;
  font-size: 0.95rem !important;
  line-height: 1.52 !important;
  word-break: break-word !important;
}
body.tutor .wt-message.user .wt-msg-content p {
  margin: 0 !important;
  color: #ffffff !important;
}

/* Assistant Message (Clean Left Row) */
body.tutor .wt-message:not(.user) {
  display: flex !important;
  gap: 14px !important;
  width: 100% !important;
  margin-bottom: 28px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
body.tutor .wt-msg-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 11px !important;
  background: var(--wt-brand-grad) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}
body.tutor .wt-msg-content {
  flex: 1 !important;
  min-width: 0 !important;
  color: #1e293b !important;
  font-size: 0.965rem !important;
  line-height: 1.68 !important;
}
body.tutor .wt-msg-author {
  font-size: 0.8rem !important;
  font-weight: 750 !important;
  color: var(--wt-ink-900) !important;
  margin-bottom: 7px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
body.tutor .wt-msg-author::after {
  content: "AI TEACHER" !important;
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  color: var(--wt-brand) !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  padding: 1.5px 7px !important;
  border-radius: 999px !important;
}

/* Headings inside messages */
body.tutor .wt-msg-content h2,
body.tutor .wt-msg-content h3 {
  font-size: 1.1rem !important;
  font-weight: 750 !important;
  color: var(--wt-ink-900) !important;
  margin: 14px 0 6px !important;
}
body.tutor .wt-msg-content p {
  margin: 7px 0 !important;
}
body.tutor .wt-msg-content ul,
body.tutor .wt-msg-content ol {
  padding-left: 20px !important;
  margin: 7px 0 !important;
}
body.tutor .wt-msg-content li {
  margin: 3px 0 !important;
}

/* Code blocks & Inline Code */
body.tutor .wt-msg-content pre {
  background: #0f172a !important;
  color: #f8fafc !important;
  padding: 13px 16px !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
  line-height: 1.6 !important;
  margin: 10px 0 !important;
}
body.tutor .wt-msg-content code:not(pre code) {
  background: #f1f5f9 !important;
  color: #1e40af !important;
  padding: 2px 6px !important;
  border-radius: 5px !important;
  font-size: 0.88em !important;
  font-weight: 600 !important;
}

/* MCQ Interactive Options */
body.tutor .wt-mcq-choice-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 12px 0 !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: 12px !important;
}
body.tutor .wt-mcq-label {
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  color: var(--wt-ink-400) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
body.tutor .wt-mcq-choice-btn {
  background: #ffffff !important;
  border: 1.5px solid var(--wt-border-light) !important;
  border-radius: 9px !important;
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--wt-ink-700) !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-mcq-choice-btn:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
}

/* Interactive Practice Challenge Card */
body.tutor .wt-challenge-box {
  background: #f8fafc !important;
  border: 1.5px solid #bfdbfe !important;
  border-radius: 14px !important;
  padding: 13px 15px !important;
  margin: 14px 0 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06) !important;
}
body.tutor .wt-challenge-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}
body.tutor .wt-ch-title {
  font-size: 0.84rem !important;
  font-weight: 750 !important;
  color: #1e40af !important;
}
body.tutor .wt-ch-badge {
  font-size: 0.65rem !important;
  font-weight: 750 !important;
  text-transform: uppercase !important;
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
}
body.tutor .wt-challenge-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
  flex-wrap: wrap !important;
}
body.tutor .wt-ch-btn {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-ch-btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}
body.tutor .wt-ch-btn-primary:hover { background: #1d4ed8 !important; transform: translateY(-1px) !important; }
body.tutor .wt-ch-btn-outline {
  background: #ffffff !important;
  color: var(--wt-ink-700) !important;
  border: 1px solid var(--wt-border-light) !important;
}
body.tutor .wt-ch-btn-outline:hover { background: #f1f5f9 !important; border-color: var(--wt-ink-300) !important; }
body.tutor .wt-ch-btn-ghost {
  background: transparent !important;
  color: var(--wt-ink-500) !important;
  border: 1px dashed var(--wt-border-light) !important;
}
body.tutor .wt-ch-btn-ghost:hover { background: #ffffff !important; color: var(--wt-ink-900) !important; }

/* Message Action Toolbar (Clean Floating Control) */
body.tutor .wt-msg-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--wt-border-hairline) !important;
  flex-wrap: wrap !important;
}
body.tutor .wt-msg-toolbar-btn {
  background: #ffffff !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: 8px !important;
  padding: 4px 9px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--wt-ink-500) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-msg-toolbar-btn:hover {
  background: var(--wt-bg-canvas) !important;
  border-color: var(--wt-ink-300) !important;
  color: var(--wt-ink-900) !important;
  transform: translateY(-1px) !important;
}

body.tutor .wt-reactions-wrap {
  display: flex !important;
  gap: 3px !important;
  margin-left: auto !important;
}
body.tutor .wt-reaction-btn {
  background: transparent !important;
  border: none !important;
  padding: 3px 6px !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-reaction-btn:hover {
  background: #f1f5f9 !important;
}

/* Next-Step Study Starters (Chips Strip) */
body.tutor .wt-study-starters {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 10px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 2px 0 4px !important;
}
body.tutor .wt-study-starters::-webkit-scrollbar { display: none !important; }

body.tutor .wt-starter-chip {
  flex-shrink: 0 !important;
  background: #ffffff !important;
  border: 1px solid var(--wt-border-light) !important;
  color: var(--wt-ink-700) !important;
  border-radius: var(--wt-radius-pill) !important;
  padding: 4px 11px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-starter-chip:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}

/* ── 7. Study Accelerator Strip (Quick Starters above input) ────────── */
body.tutor .wt-accelerator-strip {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding: 5px 4px 8px !important;
  margin-bottom: 3px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent) !important;
  -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent) !important;
}
body.tutor .wt-accelerator-strip::-webkit-scrollbar { display: none !important; }

body.tutor .wt-accel-chip {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #ffffff !important;
  border: 1px solid var(--wt-border-light) !important;
  color: var(--wt-ink-700) !important;
  font-size: 0.77rem !important;
  font-weight: 600 !important;
  border-radius: var(--wt-radius-pill) !important;
  padding: 4px 11px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
body.tutor .wt-accel-chip:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}

/* ── 8. Bottom Floating Composer (Capsule Style) ────────────────────── */
body.tutor .wt-composer-wrapper {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 10px 16px 16px !important;
  background: linear-gradient(to top, #ffffff 75%, rgba(255, 255, 255, 0.9) 90%, rgba(255, 255, 255, 0) 100%) !important;
  pointer-events: none !important;
  z-index: 20 !important;
}
body.tutor .wt-composer-wrapper > * {
  pointer-events: auto !important;
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.tutor .wt-compose-capsule {
  display: flex !important;
  align-items: flex-end !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1.5px solid var(--wt-border-light) !important;
  border-radius: 26px !important;
  padding: 6px 8px 6px 14px !important;
  box-shadow: var(--wt-shadow-composer) !important;
  transition: all 0.2s ease !important;
}
body.tutor .wt-compose-capsule:focus-within {
  border-color: var(--wt-brand) !important;
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.16), 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}
body.tutor #message {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 6px 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.48 !important;
  color: var(--wt-ink-900) !important;
  resize: none !important;
  max-height: 180px !important;
  font-family: inherit !important;
}
body.tutor #message::placeholder {
  color: var(--wt-ink-400) !important;
}

body.tutor .wt-tool-btn,
body.tutor .wt-upload-btn,
body.tutor .wt-voice-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: none !important;
  color: var(--wt-ink-500) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-tool-btn:hover,
body.tutor .wt-upload-btn:hover,
body.tutor .wt-voice-btn:hover {
  background: var(--wt-ink-100) !important;
  color: var(--wt-ink-900) !important;
}

body.tutor .wt-send-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: var(--wt-brand-grad) !important;
  border: none !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.18s ease !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}
body.tutor .wt-send-btn:hover:not(:disabled) {
  transform: scale(1.05) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}
body.tutor .wt-send-btn:active:not(:disabled) {
  transform: scale(0.95) !important;
}
body.tutor .wt-composer-disclaimer {
  font-size: 0.72rem !important;
  color: var(--wt-ink-400) !important;
  text-align: center !important;
  margin: 6px 0 0 !important;
}

/* ── 9. Dark Mode Theme (Obsidian Class & Polish) ────────────────────── */
body.wt-dark {
  background: #090d16 !important;
  color: #e2e8f0 !important;
}
body.wt-dark .wt-chatgpt-workspace,
body.wt-dark .wt-chat-area {
  background: #090d16 !important;
}
body.wt-dark .wt-chat-header {
  background: rgba(15, 23, 42, 0.95) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
body.wt-dark .wt-hamburger-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-model-badge {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}
body.wt-dark .wt-student-profile-pill {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-header-action-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-study-controls,
body.wt-dark .wt-teacher-modes-bar,
body.wt-dark .wt-subjects-bar,
body.wt-dark .wt-chapter-bar {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.wt-dark .wt-mode-pill {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-mode-pill.active {
  background: rgba(37, 99, 235, 0.25) !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-subj-chip {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
body.wt-dark .wt-chap-chip {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-quest-strip {
  background: #0b111e !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
body.wt-dark .wt-message:not(.user) .wt-msg-content {
  color: #e2e8f0 !important;
}
body.wt-dark .wt-msg-author {
  color: #ffffff !important;
}
body.wt-dark .wt-composer-wrapper {
  background: linear-gradient(to top, #090d16 75%, rgba(9, 13, 22, 0.9) 90%, rgba(9, 13, 22, 0) 100%) !important;
}
body.wt-dark .wt-compose-capsule {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
body.wt-dark #message {
  color: #f1f5f9 !important;
}
body.wt-dark .wt-accel-chip {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-starter-chip {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-msg-toolbar-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

/* ── 10. Responsive Breakpoints (Mobile & Tablet) ────────────────────── */
@media (max-width: 1100px) {
  body.tutor #btn-open-pyq,
  body.tutor #btn-open-formulas {
    display: none !important;
  }
}
@media (max-width: 860px) {
  body.tutor #btn-open-dashboard,
  body.tutor #btn-focus-mode {
    display: none !important;
  }
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 85% !important;
  }
}
@media (max-width: 600px) {
  body.tutor .wt-chat-header {
    padding: 0 10px !important;
  }
  body.tutor .wt-student-profile-pill .wt-prof-board,
  body.tutor .wt-student-profile-pill .wt-prof-divider {
    display: none !important;
  }
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 90% !important;
    padding: 10px 14px !important;
  }
  body.tutor .wt-compose-capsule {
    padding: 4px 6px 4px 12px !important;
  }
}


/* ── Study Hub Dropdown (Clean, Professional Toolkit) ───────────────── */
.wt-study-hub-wrapper {
  position: relative;
  display: inline-block;
}
.wt-hub-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 12px !important;
  height: 32px !important;
  background: #ffffff !important;
  border: 1.5px solid var(--wt-border-light) !important;
  border-radius: var(--wt-radius-pill) !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  color: var(--wt-ink-700) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  box-shadow: var(--wt-shadow-subtle) !important;
}
.wt-hub-btn:hover,
.wt-hub-btn.active {
  background: var(--wt-brand-light) !important;
  border-color: #93c5fd !important;
  color: var(--wt-brand) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15) !important;
}
.wt-hub-chevron {
  font-size: 0.72rem !important;
  transition: transform 0.2s ease !important;
}
.wt-hub-btn.active .wt-hub-chevron {
  transform: rotate(180deg) !important;
}

.wt-study-hub-dropdown {
  position: absolute !important;
  top: 40px !important;
  right: 0 !important;
  width: 320px !important;
  background: #ffffff !important;
  border: 1px solid var(--wt-border-light) !important;
  border-radius: 18px !important;
  box-shadow: var(--wt-shadow-float) !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  animation: wtPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.wt-study-hub-dropdown[hidden] {
  display: none !important;
}

.wt-hub-header {
  padding: 12px 16px 8px !important;
  border-bottom: 1px solid var(--wt-border-hairline) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.wt-hub-title {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: var(--wt-ink-400) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}
.wt-hub-subtitle {
  font-size: 0.68rem !important;
  color: var(--wt-ink-400) !important;
}

.wt-hub-grid {
  display: flex !important;
  flex-direction: column !important;
  padding: 6px !important;
  gap: 2px !important;
}
.wt-hub-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  text-align: left !important;
  width: 100% !important;
  transition: all 0.15s ease !important;
}
.wt-hub-item:hover {
  background: var(--wt-ink-100) !important;
}
.wt-hub-item-icon {
  font-size: 1.25rem !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.wt-hub-item-info {
  display: flex !important;
  flex-direction: column !important;
}
.wt-hub-item-info strong {
  font-size: 0.84rem !important;
  font-weight: 650 !important;
  color: var(--wt-ink-900) !important;
  line-height: 1.2 !important;
}
.wt-hub-item-info small {
  font-size: 0.71rem !important;
  color: var(--wt-ink-500) !important;
  line-height: 1.3 !important;
}

.wt-hub-footer {
  padding: 8px 12px !important;
  background: #fafbfc !important;
  border-top: 1px solid var(--wt-border-hairline) !important;
}
.wt-hub-tg-pill {
  display: block !important;
  text-align: center !important;
  background: rgba(34, 158, 217, 0.1) !important;
  border: 1px solid rgba(34, 158, 217, 0.25) !important;
  color: #0284c7 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}
.wt-hub-tg-pill:hover {
  background: #229ED9 !important;
  color: #ffffff !important;
}

/* ── Categorized Sidebar Tool Groups ────────────────────────────────── */
.wt-tool-category {
  margin-bottom: 12px !important;
}
.wt-tool-cat-title {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  padding: 4px 6px !important;
  display: block !important;
}
.wt-tool-cat-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
  margin-top: 4px !important;
}

/* Dark mode for Study Hub */
body.wt-dark .wt-hub-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}
body.wt-dark .wt-hub-btn:hover,
body.wt-dark .wt-hub-btn.active {
  background: rgba(37, 99, 235, 0.25) !important;
  border-color: #3b82f6 !important;
  color: #93c5fd !important;
}
body.wt-dark .wt-study-hub-dropdown {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45) !important;
}
body.wt-dark .wt-hub-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
body.wt-dark .wt-hub-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.wt-dark .wt-hub-item-info strong {
  color: #f1f5f9 !important;
}
body.wt-dark .wt-hub-item-info small {
  color: #94a3b8 !important;
}
body.wt-dark .wt-hub-footer {
  background: #0b111e !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}


/* =========================================================================
   AI STUDY GURU — COMPLETE PREMIUM REDESIGN v31
   This block goes at the VERY END of website-tutor.css.
   Every rule uses body.tutor + !important to defeat premium.css overrides.
   ========================================================================= */

/* ── A. KILL THE 5 CLUTTER BARS (DOM stays for JS, visually gone) ──────── */
body.tutor #tip-banner,
body.tutor .wt-tip-banner,
body.tutor #quest-strip,
body.tutor .wt-quest-strip,
body.tutor #study-controls,
body.tutor .wt-study-controls,
body.tutor #focus-bar-hint,
body.tutor .wt-focus-bar-hint,
body.tutor .wt-teacher-modes-bar,
body.tutor #teacher-modes-bar,
body.tutor #subjects-bar,
body.tutor .wt-subjects-bar,
body.tutor #chapter-bar,
body.tutor .wt-chapter-bar {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  visibility: hidden !important;
}

/* ── B. NUKE THE PREMIUM.CSS BACKGROUNDS (dot pattern, pink gradients) ── */
body.tutor {
  background: #ffffff !important;
}

body.tutor .wt-main,
body.tutor #main {
  background: #ffffff !important;
}

body.tutor .wt-chatgpt-main,
body.tutor .wt-chat-area {
  background: #ffffff !important;
}

body.tutor .wt-messages,
body.tutor .wt-chatgpt-messages,
body.tutor #messages {
  background: none !important;
  background-image: none !important;
  background-color: transparent !important;
  background-size: unset !important;
  border-radius: 0 !important;
}

/* ── C. PREMIUM HEADER BAR (56px frosted glass) ────────────────────────── */
body.tutor .wt-chat-header {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
}

body.tutor .wt-chat-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

body.tutor .wt-chat-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body.tutor .wt-hamburger-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: #6b7280 !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}
body.tutor .wt-hamburger-btn:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

body.tutor .wt-model-badge {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.01em !important;
}
body.tutor .wt-model-icon { font-size: 1.2rem !important; }
body.tutor .wt-online-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important;
  animation: pulseOnline 2s infinite !important;
}
@keyframes pulseOnline {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

body.tutor .wt-student-profile-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 12px !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-student-profile-pill:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

/* Timer Pill */
body.tutor .wt-timer-trigger,
body.tutor .wt-header-action-btn.wt-timer-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 12px !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #1d4ed8 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-timer-trigger:hover {
  background: #dbeafe !important;
}

/* Study Tools Dropdown Trigger */
body.tutor .wt-hub-btn,
body.tutor .wt-header-action-btn.wt-hub-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 12px !important;
  background: #faf5ff !important;
  border: 1px solid #e9d5ff !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 650 !important;
  color: #7c3aed !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-hub-btn:hover {
  background: #f3e8ff !important;
  border-color: #c4b5fd !important;
}

/* Round icon buttons (focus, sound, dark mode) */
body.tutor .wt-header-action-btn:not(.wt-timer-trigger):not(.wt-hub-btn) {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 0.85rem !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-header-action-btn:not(.wt-timer-trigger):not(.wt-hub-btn):hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

/* ── D. USER MESSAGE BUBBLE — COMPACT RIGHT-ALIGNED ───────────────────── */
body.tutor .wt-message.user,
body.tutor .wt-messages .wt-message.user,
body.tutor .wt-chatgpt-messages .wt-message.user,
body.tutor #messages .wt-message.user {
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
  margin: 10px 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  position: relative !important;
}

body.tutor .wt-message.user::before,
body.tutor .wt-messages .wt-message.user::before {
  display: none !important;
  content: none !important;
}

body.tutor .wt-message.user .wt-msg-content,
body.tutor .wt-messages .wt-message.user .wt-msg-content,
body.tutor .wt-chatgpt-messages .wt-message.user .wt-msg-content,
body.tutor #messages .wt-message.user .wt-msg-content {
  display: inline-block !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
  color: #ffffff !important;
  padding: 12px 18px !important;
  border-radius: 20px 20px 6px 20px !important;
  max-width: 70% !important;
  width: fit-content !important;
  min-width: 40px !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.22) !important;
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
  word-break: break-word !important;
  border: none !important;
}

body.tutor .wt-message.user .wt-msg-content p {
  color: #ffffff !important;
  margin: 0 !important;
}

body.tutor .wt-message.user .wt-msg-content a {
  color: #bfdbfe !important;
  text-decoration: underline !important;
}

body.tutor .wt-message.user .wt-msg-avatar,
body.tutor .wt-message.user .wt-msg-author,
body.tutor .wt-message.user .wt-author {
  display: none !important;
}

/* ── E. ASSISTANT MESSAGE — CLEAN LEFT-ALIGNED CARD ────────────────────── */
body.tutor .wt-message:not(.user),
body.tutor .wt-messages .wt-message:not(.user),
body.tutor .wt-chatgpt-messages .wt-message:not(.user),
body.tutor #messages .wt-message:not(.user) {
  display: flex !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 8px 0 20px !important;
  padding: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}

body.tutor .wt-message:not(.user)::before,
body.tutor .wt-messages .wt-message:not(.user)::before {
  display: none !important;
  content: none !important;
}

body.tutor .wt-msg-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
  margin-top: 2px !important;
}

body.tutor .wt-message:not(.user) .wt-msg-content,
body.tutor .wt-messages .wt-message:not(.user) .wt-msg-content,
body.tutor #messages .wt-message:not(.user) .wt-msg-content {
  flex: 1 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  padding: 18px 22px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  color: #1f2937 !important;
  font-size: 0.94rem !important;
  line-height: 1.7 !important;
  max-width: calc(100% - 50px) !important;
  overflow-wrap: break-word !important;
}

body.tutor .wt-msg-author,
body.tutor .wt-message:not(.user) .wt-msg-author {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
}

/* Kill the premium.css ✦ pseudo author badge */
body.tutor .wt-message .wt-author::before,
body.tutor .wt-message .wt-msg-author::before,
body.tutor .wt-message.user .wt-author::before {
  display: none !important;
  content: none !important;
}

/* ── F. MESSAGES CONTAINER (centered, max-width) ──────────────────────── */
body.tutor .wt-chatgpt-messages,
body.tutor #messages {
  max-width: 820px !important;
  margin: 0 auto !important;
  padding: 20px 20px 160px !important;
  width: 100% !important;
}

/* ── G. TOOLBAR BUTTONS (Copy, Read aloud, Save, PDF) ─────────────────── */
body.tutor .wt-msg-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid #f3f4f6 !important;
  flex-wrap: wrap !important;
}

body.tutor .wt-msg-toolbar-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 550 !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-msg-toolbar-btn:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

/* Reaction buttons */
body.tutor .wt-reactions-wrap {
  display: inline-flex !important;
  gap: 4px !important;
  margin-left: 4px !important;
}
body.tutor .wt-reaction-btn {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  border: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.82rem !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-reaction-btn:hover {
  background: #fef3c7 !important;
  border-color: #fbbf24 !important;
}

/* ── H. FOLLOW-UP STARTER CHIPS ───────────────────────────────────────── */
body.tutor .wt-study-starters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
}

body.tutor .wt-starter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 550 !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #4b5563 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
body.tutor .wt-starter-chip:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
}

/* ── I. SIDEBAR — SINGLE COLUMN, FULL TEXT, NO TRUNCATION ─────────────── */
body.tutor .wt-sidebar.wt-chatgpt-sidebar,
body.tutor .wt-chatgpt-sidebar {
  width: 280px !important;
  min-width: 280px !important;
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Force sidebar buttons to single-column */
body.tutor .wt-action-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  grid-template-columns: unset !important;
}

body.tutor .wt-chatgpt-sidebar .wt-action-card,
body.tutor .wt-action-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: none !important;
  color: #cbd5e1 !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  width: 100% !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  transition: background 0.12s ease !important;
}
body.tutor .wt-chatgpt-sidebar .wt-action-card:hover,
body.tutor .wt-action-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  transform: none !important;
}

body.tutor .wt-card-label {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  flex: 1 !important;
}

body.tutor .wt-card-emoji {
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

/* Tool category grids → single column */
body.tutor .wt-tool-cat-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  grid-template-columns: unset !important;
}

body.tutor .wt-tool-cat-grid button {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 12px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  text-align: left !important;
  width: 100% !important;
  cursor: pointer !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  transition: all 0.1s ease !important;
}
body.tutor .wt-tool-cat-grid button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

body.tutor .wt-tool-cat-title {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  color: #64748b !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 8px 6px 4px !important;
  display: block !important;
}

/* Quick Commands shortcuts also single-column */
body.tutor .wt-chatgpt-sidebar .wt-shortcuts,
body.tutor .wt-shortcuts {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  grid-template-columns: unset !important;
}

body.tutor .wt-shortcuts button {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  text-align: left !important;
  width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: all 0.1s ease !important;
}
body.tutor .wt-shortcuts button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
  transform: none !important;
  border: none !important;
  box-shadow: none !important;
}
body.tutor .wt-shortcuts button:active {
  transform: none !important;
  box-shadow: none !important;
}

/* New Chat Button */
body.tutor .wt-new-chat-btn {
  margin: 14px 14px 8px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: calc(100% - 28px) !important;
  cursor: pointer !important;
}
body.tutor .wt-new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Sidebar scroll area */
body.tutor .wt-sb-scroll {
  padding: 8px 10px 20px !important;
  flex: 1 !important;
  overflow-y: auto !important;
}

body.tutor .wt-sb-heading {
  font-size: 0.66rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin: 14px 6px 6px !important;
}

/* Sidebar profile bottom */
body.tutor .wt-sb-profile {
  padding: 12px 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(0, 0, 0, 0.15) !important;
}

/* ── J. FLOATING BOTTOM COMPOSER ──────────────────────────────────────── */
body.tutor .wt-composer-wrapper {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 50 !important;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 0) 100%) !important;
  padding: 8px 16px 16px !important;
}

body.tutor .wt-compose-capsule {
  max-width: 820px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 24px !important;
  padding: 6px 8px 6px 16px !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}
body.tutor .wt-compose-capsule:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.12), 0 0 0 3px rgba(37, 99, 235, 0.08) !important;
}

body.tutor #message {
  flex: 1 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  resize: none !important;
  font-size: 0.94rem !important;
  line-height: 1.5 !important;
  color: #1f2937 !important;
  max-height: 180px !important;
  padding: 6px 0 !important;
  font-family: inherit !important;
}

body.tutor #send {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}
body.tutor #send:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45) !important;
  transform: scale(1.05) !important;
}

/* Upload / voice / symbol buttons in composer */
body.tutor .wt-tool-btn,
body.tutor .wt-upload-btn,
body.tutor .wt-voice-btn {
  color: #9ca3af !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: color 0.12s ease !important;
}
body.tutor .wt-tool-btn:hover,
body.tutor .wt-upload-btn:hover,
body.tutor .wt-voice-btn:hover {
  color: #2563eb !important;
}

/* Accelerator bar */
body.tutor #study-accelerator-bar,
body.tutor .wt-accelerator-bar {
  max-width: 820px !important;
  margin: 0 auto 6px !important;
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
body.tutor #study-accelerator-bar::-webkit-scrollbar,
body.tutor .wt-accelerator-bar::-webkit-scrollbar {
  display: none !important;
}

body.tutor .wt-accel-chip {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
}
body.tutor .wt-accel-chip:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

/* Math symbol palette */
body.tutor .wt-math-palette {
  max-width: 820px !important;
  margin: 0 auto 4px !important;
}

/* ── K. WELCOME SCREEN (EMPTY STATE) ──────────────────────────────────── */
body.tutor .wt-chatgpt-welcome {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 48px 20px 24px !important;
  max-width: 780px !important;
  margin: 0 auto !important;
}

body.tutor .wt-welcome-teacher-avatar {
  width: 64px !important;
  height: 64px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.8rem !important;
  color: #ffffff !important;
  margin-bottom: 18px !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25) !important;
}

body.tutor .wt-chatgpt-welcome h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem) !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
}

body.tutor .wt-welcome-mode-badge {
  display: inline-block !important;
  padding: 4px 12px !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  border: 1px solid #bfdbfe !important;
}

body.tutor .wt-chatgpt-welcome p {
  color: #6b7280 !important;
  font-size: 0.94rem !important;
  max-width: 520px !important;
  line-height: 1.6 !important;
  margin: 0 0 28px !important;
}

body.tutor .wt-chatgpt-prompts {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 700px !important;
}

body.tutor .wt-prompt-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  padding: 16px 18px !important;
  background: #ffffff !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}
body.tutor .wt-prompt-card:hover {
  border-color: #3b82f6 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1) !important;
}

body.tutor .wt-prompt-top {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}
body.tutor .wt-prompt-icon { font-size: 1.15rem !important; }
body.tutor .wt-prompt-title {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
}
body.tutor .wt-prompt-desc {
  font-size: 0.8rem !important;
  color: #6b7280 !important;
  line-height: 1.45 !important;
}

/* ── L. PRACTICE CHALLENGE BOX ────────────────────────────────────────── */
body.tutor .wt-challenge-box {
  margin-top: 14px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #f9fafb !important;
}
body.tutor .wt-challenge-header {
  padding: 10px 16px !important;
  background: linear-gradient(135deg, #eff6ff, #faf5ff) !important;
  border-bottom: 1px solid #e5e7eb !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
body.tutor .wt-challenge-body {
  padding: 14px 16px !important;
}
body.tutor .wt-challenge-actions {
  padding: 10px 16px 14px !important;
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
body.tutor .wt-ch-btn {
  padding: 7px 14px !important;
  border-radius: 999px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-ch-btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}
body.tutor .wt-ch-btn-primary:hover {
  background: #1d4ed8 !important;
}
body.tutor .wt-ch-btn-outline {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1.5px solid #bfdbfe !important;
}
body.tutor .wt-ch-btn-ghost {
  background: transparent !important;
  color: #6b7280 !important;
  border: 1px solid #e5e7eb !important;
}

/* MCQ Choice Buttons */
body.tutor .wt-mcq-choice-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 12px !important;
  align-items: center !important;
}
body.tutor .wt-mcq-label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #6b7280 !important;
  margin-right: 4px !important;
}
body.tutor .wt-mcq-choice-btn {
  padding: 6px 14px !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  background: #f3f4f6 !important;
  border: 1.5px solid #d1d5db !important;
  color: #374151 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-mcq-choice-btn:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
}

/* ── M. THINKING INDICATOR ────────────────────────────────────────────── */
body.tutor .wt-thinking,
body.tutor .wt-chatgpt-thinking {
  display: flex !important;
  gap: 12px !important;
  padding: 12px 20px !important;
  max-width: 820px !important;
  margin: 0 auto !important;
}

body.tutor .wt-teacher-avatar-sm {
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
}

body.tutor .wt-thinking-bubble {
  background: #f3f4f6 !important;
  padding: 12px 18px !important;
  border-radius: 16px !important;
  border: 1px solid #e5e7eb !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 0.88rem !important;
  color: #6b7280 !important;
}

/* ── N. DARK MODE ─────────────────────────────────────────────────────── */
body.tutor.wt-dark {
  background: #0b0f19 !important;
}

body.tutor.wt-dark .wt-main,
body.tutor.wt-dark #main,
body.tutor.wt-dark .wt-chatgpt-main,
body.tutor.wt-dark .wt-chat-area {
  background: #0b0f19 !important;
}

body.tutor.wt-dark .wt-chat-header {
  background: rgba(11, 15, 25, 0.88) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-hamburger-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.tutor.wt-dark .wt-model-badge { color: #f8fafc !important; }
body.tutor.wt-dark .wt-student-profile-pill {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}
body.tutor.wt-dark .wt-timer-trigger {
  background: rgba(37, 99, 235, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
  color: #93c5fd !important;
}
body.tutor.wt-dark .wt-hub-btn {
  background: rgba(124, 58, 237, 0.12) !important;
  border-color: rgba(167, 139, 250, 0.25) !important;
  color: #c4b5fd !important;
}
body.tutor.wt-dark .wt-header-action-btn:not(.wt-timer-trigger):not(.wt-hub-btn) {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

body.tutor.wt-dark .wt-message.user .wt-msg-content {
  background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.tutor.wt-dark .wt-message:not(.user) .wt-msg-content {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
body.tutor.wt-dark .wt-msg-author {
  color: #60a5fa !important;
}
body.tutor.wt-dark .wt-msg-toolbar {
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-msg-toolbar-btn {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-starter-chip {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-composer-wrapper {
  background: linear-gradient(to top, rgba(11, 15, 25, 1) 70%, rgba(11, 15, 25, 0) 100%) !important;
}
body.tutor.wt-dark .wt-compose-capsule {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3) !important;
}
body.tutor.wt-dark #message { color: #f8fafc !important; }
body.tutor.wt-dark .wt-accel-chip {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-chatgpt-welcome h2 { color: #f8fafc !important; }
body.tutor.wt-dark .wt-chatgpt-welcome p { color: #94a3b8 !important; }
body.tutor.wt-dark .wt-welcome-mode-badge {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.25) !important;
}
body.tutor.wt-dark .wt-prompt-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-prompt-card:hover {
  border-color: #3b82f6 !important;
}
body.tutor.wt-dark .wt-prompt-title { color: #f1f5f9 !important; }
body.tutor.wt-dark .wt-prompt-desc { color: #94a3b8 !important; }
body.tutor.wt-dark .wt-thinking-bubble {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-challenge-box {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.tutor.wt-dark .wt-challenge-header {
  background: #1e293b !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-reaction-btn {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.tutor.wt-dark .wt-mcq-choice-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

/* ── O. MOBILE RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  body.tutor .wt-chatgpt-prompts {
    grid-template-columns: 1fr !important;
  }
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 85% !important;
  }
  body.tutor .wt-chat-header {
    padding: 0 10px !important;
  }
  body.tutor .wt-hub-label {
    display: none !important;
  }
  body.tutor .wt-hub-chevron {
    display: none !important;
  }
}

@media (max-width: 480px) {
  body.tutor .wt-student-profile-pill .wt-prof-board,
  body.tutor .wt-student-profile-pill .wt-prof-divider {
    display: none !important;
  }
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 90% !important;
    padding: 10px 14px !important;
  }
  body.tutor .wt-compose-capsule {
    padding: 4px 6px 4px 12px !important;
  }
  body.tutor .wt-msg-avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.85rem !important;
  }
}

/* ── P. STUDY HUB DROPDOWN ────────────────────────────────────────────── */
body.tutor .wt-study-hub-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 300px !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  z-index: 100 !important;
  overflow: hidden !important;
}
body.tutor .wt-hub-header {
  padding: 12px 16px 8px !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
body.tutor .wt-hub-title {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  color: #9ca3af !important;
  text-transform: uppercase !important;
}
body.tutor .wt-hub-subtitle {
  font-size: 0.72rem !important;
  color: #9ca3af !important;
}
body.tutor .wt-hub-grid {
  padding: 8px !important;
}
body.tutor .wt-hub-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  width: 100% !important;
  text-align: left !important;
  transition: background 0.12s ease !important;
}
body.tutor .wt-hub-item:hover {
  background: #f3f4f6 !important;
}
body.tutor .wt-hub-item-icon {
  font-size: 1.2rem !important;
  width: 32px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}
body.tutor .wt-hub-item-info {
  display: flex !important;
  flex-direction: column !important;
}
body.tutor .wt-hub-item-info strong {
  font-size: 0.84rem !important;
  font-weight: 650 !important;
  color: #111827 !important;
}
body.tutor .wt-hub-item-info small {
  font-size: 0.72rem !important;
  color: #9ca3af !important;
}

body.tutor.wt-dark .wt-study-hub-dropdown {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4) !important;
}
body.tutor.wt-dark .wt-hub-header {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-hub-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.tutor.wt-dark .wt-hub-item-info strong { color: #f1f5f9 !important; }
body.tutor.wt-dark .wt-hub-item-info small { color: #94a3b8 !important; }

/* ── Q. TOAST NOTIFICATION ────────────────────────────────────────────── */
body.tutor #wt-toast {
  position: fixed !important;
  bottom: 80px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  background: #1f2937 !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  z-index: 1000 !important;
  opacity: 0 !important;
  transition: all 0.25s ease !important;
  pointer-events: none !important;
}
body.tutor #wt-toast.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* ── R. ATTACHMENT PREVIEW ────────────────────────────────────────────── */
body.tutor #attachment-preview {
  max-width: 820px !important;
  margin: 0 auto 8px !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ── S. SMOOTH ANIMATIONS ─────────────────────────────────────────────── */
@keyframes wtMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
body.tutor .wt-message {
  animation: wtMsgIn 0.25s ease !important;
}

/* ── T. TYPOGRAPHY IN MESSAGES ────────────────────────────────────────── */
body.tutor .wt-message .wt-msg-content h2,
body.tutor .wt-message h2.wt-heading {
  font-size: 1.08rem !important;
  font-weight: 750 !important;
  margin: 14px 0 6px !important;
  padding-bottom: 4px !important;
  border-bottom: 1px solid #f3f4f6 !important;
  color: #111827 !important;
  letter-spacing: -0.01em !important;
}
body.tutor .wt-message .wt-msg-content h3,
body.tutor .wt-message h3.wt-heading {
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin: 10px 0 4px !important;
  color: #111827 !important;
}
body.tutor .wt-message .wt-msg-content h4,
body.tutor .wt-message h4.wt-heading {
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  margin: 8px 0 3px !important;
  color: #374151 !important;
}
body.tutor.wt-dark .wt-message h2.wt-heading {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
}
body.tutor.wt-dark .wt-message h3.wt-heading { color: #f1f5f9 !important; }
body.tutor.wt-dark .wt-message h4.wt-heading { color: #e2e8f0 !important; }

/* Code blocks in messages */
body.tutor .wt-message code {
  background: #f3f4f6 !important;
  color: #e11d48 !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  font-size: 0.88em !important;
  border: 1px solid #e5e7eb !important;
}
body.tutor .wt-message pre {
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  overflow-x: auto !important;
  font-size: 0.86rem !important;
}
body.tutor.wt-dark .wt-message code {
  background: #0f172a !important;
  color: #60a5fa !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
body.tutor.wt-dark .wt-message pre {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
}

/* KaTeX display blocks */
body.tutor .wt-message .katex-display {
  margin: 8px 0 !important;
  padding: 8px 12px !important;
  font-size: 1.02em !important;
  overflow-x: auto !important;
  max-width: 100% !important;
}

/* =========================================================================
   AI STUDY GURU — v32 HOTFIX PATCH
   Appended AFTER the v31 block. Fixes:
   1. User bubble full-width (flex-grow override)
   2. Attachment preview showing by default (hidden attr override)
   3. Starter chip clutter (limit to 5)
   4. Accelerator bar clutter (collapse by default)
   5. Premium polish pass
   ========================================================================= */

/* ── FIX 1: USER BUBBLE — FORCE COMPACT WIDTH ─────────────────────────── */
/* The parent .wt-message.user is display:flex. Child .wt-msg-content must
   NOT grow to fill. flex:0 0 auto + width:fit-content ensures compact bubble */
body.tutor .wt-message.user .wt-msg-content,
body.tutor .wt-messages .wt-message.user .wt-msg-content,
body.tutor .wt-chatgpt-messages .wt-message.user .wt-msg-content,
body.tutor #messages .wt-message.user .wt-msg-content {
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 1 !important;
  display: block !important;
  width: fit-content !important;
  max-width: 70% !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  padding: 10px 16px !important;
  border-radius: 20px 20px 6px 20px !important;
  min-width: 0 !important;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.18) !important;
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
  word-break: break-word !important;
  border: none !important;
  overflow-wrap: break-word !important;
}
/* Also ensure the parent article itself is transparent and non-styled */
body.tutor .wt-message.user,
body.tutor .wt-messages .wt-message.user,
body.tutor .wt-chatgpt-messages .wt-message.user,
body.tutor #messages .wt-message.user {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  width: 100% !important;
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 6px 0 !important;
}
body.tutor .wt-message.user::before,
body.tutor .wt-messages .wt-message.user::before,
body.tutor #messages .wt-message.user::before {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}
/* Text inside user bubble */
body.tutor .wt-message.user .wt-msg-content p,
body.tutor .wt-message.user .wt-msg-content span {
  color: #ffffff !important;
  margin: 0 !important;
}

/* ── FIX 2: ATTACHMENT PREVIEW — RESPECT hidden ATTRIBUTE ──────────────── */
/* The old rule had display:flex!important which DEFEATS the [hidden] attr.
   Default: hidden. Only show when JS removes hidden attr. */
body.tutor #attachment-preview {
  display: none !important;
}
body.tutor #attachment-preview:not([hidden]) {
  display: flex !important;
  max-width: 820px !important;
  margin: 0 auto 8px !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  align-items: center !important;
  gap: 10px !important;
}
body.tutor.wt-dark #attachment-preview:not([hidden]) {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── FIX 3: STARTER CHIPS — LIMIT TO 5, HIDE REST ─────────────────────── */
/* Show only first 5 chips: Step-by-Step Hint, Quick Quiz, Explain Simpler,
   Key Points, Practice Problem. Hide: More Examples, Flashcard, In Hindi */
body.tutor .wt-study-starters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 8px !important;
  padding-top: 6px !important;
}
body.tutor .wt-study-starters .wt-starter-chip:nth-child(n+6) {
  display: none !important;
}
body.tutor .wt-starter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 0.73rem !important;
  font-weight: 550 !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
body.tutor .wt-starter-chip:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
}

/* ── FIX 4: ACCELERATOR BAR — LESS PROMINENT ───────────────────────────── */
body.tutor #study-accelerator-bar,
body.tutor .wt-accelerator-bar {
  max-width: 820px !important;
  margin: 0 auto 4px !important;
  display: flex !important;
  gap: 5px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  opacity: 0.7 !important;
  transition: opacity 0.2s ease !important;
}
body.tutor #study-accelerator-bar:hover,
body.tutor .wt-accelerator-bar:hover {
  opacity: 1 !important;
}
body.tutor .wt-accel-chip {
  flex-shrink: 0 !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 550 !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
}
body.tutor .wt-accel-chip:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  opacity: 1 !important;
}

/* ── FIX 5: TOOLBAR BUTTONS — CLEANER SPACING ──────────────────────────── */
body.tutor .wt-msg-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 10px !important;
  padding-top: 8px !important;
  border-top: 1px solid #f3f4f6 !important;
  flex-wrap: wrap !important;
}
body.tutor .wt-msg-toolbar-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 550 !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
body.tutor .wt-msg-toolbar-btn:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

/* Reaction buttons - smaller */
body.tutor .wt-reaction-btn {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  border: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
  font-size: 0.75rem !important;
  padding: 0 !important;
}

/* ── FIX 6: ASSISTANT MESSAGE — TIGHTER CARD ───────────────────────────── */
body.tutor .wt-message:not(.user) .wt-msg-content,
body.tutor .wt-messages .wt-message:not(.user) .wt-msg-content,
body.tutor #messages .wt-message:not(.user) .wt-msg-content {
  flex: 1 !important;
  background: #ffffff !important;
  border: 1px solid #eaeef3 !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  color: #1f2937 !important;
  font-size: 0.93rem !important;
  line-height: 1.68 !important;
  max-width: calc(100% - 48px) !important;
}

/* ── FIX 7: COMPOSER — CLEANER, SLIMMER ────────────────────────────────── */
body.tutor .wt-composer-wrapper {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 50 !important;
  background: linear-gradient(to top, #ffffff 60%, rgba(255,255,255,0) 100%) !important;
  padding: 6px 16px 12px !important;
}
body.tutor .wt-compose-capsule {
  max-width: 820px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 26px !important;
  padding: 5px 6px 5px 16px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03) !important;
  transition: all 0.2s ease !important;
}
body.tutor .wt-compose-capsule:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 4px 16px rgba(37,99,235,0.10), 0 0 0 3px rgba(37,99,235,0.06) !important;
}

/* ── FIX 8: FOOTER DISCLAIMER — SUBTLE ─────────────────────────────────── */
body.tutor .wt-footer-disclaimer,
body.tutor .wt-chatgpt-footer {
  text-align: center !important;
  font-size: 0.68rem !important;
  color: #c0c5cc !important;
  padding: 2px 0 4px !important;
  max-width: 820px !important;
  margin: 0 auto !important;
}

/* ── FIX 9: HEADER — TIGHTER, CLEANER ──────────────────────────────────── */
body.tutor .wt-chat-header {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 16px !important;
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  z-index: 40 !important;
  position: sticky !important;
  top: 0 !important;
}

/* Header buttons — uniform small circles */
body.tutor .wt-header-action-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.82rem !important;
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.12s ease !important;
}
body.tutor .wt-header-action-btn:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #2563eb !important;
}

/* Timer pill — compact */
body.tutor .wt-timer-trigger {
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  background: rgba(37,99,235,0.06) !important;
  border: 1px solid rgba(37,99,235,0.15) !important;
  color: #2563eb !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Study Tools button — compact */
body.tutor .wt-hub-btn {
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(124,58,237,0.06) !important;
  border: 1px solid rgba(124,58,237,0.15) !important;
  color: #7c3aed !important;
}

/* New Topic button — header */
body.tutor .wt-new-topic-btn {
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.2) !important;
  cursor: pointer !important;
}
body.tutor .wt-new-topic-btn:hover {
  box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important;
}

/* Model badge — subtle */
body.tutor .wt-model-badge {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.01em !important;
}

/* Student pill — compact */
body.tutor .wt-student-profile-pill {
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* ── FIX 10: DARK MODE PATCHES ─────────────────────────────────────────── */
body.tutor.wt-dark .wt-message.user .wt-msg-content {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
body.tutor.wt-dark .wt-message:not(.user) .wt-msg-content {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.06) !important;
  color: #f1f5f9 !important;
}
body.tutor.wt-dark .wt-msg-toolbar {
  border-top-color: rgba(255,255,255,0.06) !important;
}
body.tutor.wt-dark .wt-msg-toolbar-btn,
body.tutor.wt-dark .wt-starter-chip {
  background: #0f172a !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-accel-chip {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #94a3b8 !important;
}
body.tutor.wt-dark .wt-composer-wrapper {
  background: linear-gradient(to top, #0b0f19 60%, rgba(11,15,25,0) 100%) !important;
}
body.tutor.wt-dark .wt-compose-capsule {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.10) !important;
}
body.tutor.wt-dark .wt-chat-header {
  background: rgba(11,15,25,0.92) !important;
  border-bottom-color: rgba(255,255,255,0.05) !important;
}
body.tutor.wt-dark .wt-header-action-btn:not(.wt-timer-trigger):not(.wt-hub-btn) {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #cbd5e1 !important;
}
body.tutor.wt-dark .wt-reaction-btn {
  background: #0f172a !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.tutor.wt-dark .wt-footer-disclaimer,
body.tutor.wt-dark .wt-chatgpt-footer {
  color: #4b5563 !important;
}

/* ── FIX 11: MOBILE RESPONSIVE PATCHES ─────────────────────────────────── */
@media (max-width: 768px) {
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 82% !important;
  }
  body.tutor .wt-study-starters .wt-starter-chip:nth-child(n+5) {
    display: none !important;
  }
}
@media (max-width: 480px) {
  body.tutor .wt-message.user .wt-msg-content {
    max-width: 88% !important;
    padding: 8px 13px !important;
    font-size: 0.9rem !important;
  }
  body.tutor .wt-study-starters .wt-starter-chip:nth-child(n+4) {
    display: none !important;
  }
  body.tutor .wt-chat-header {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }
}
