/* CO-CHU-0311 */
/* Module 7: Giáo viên AI 豆豆老师 (Cô Quỳnh Như) - Bài học bên trái, Khung học với Thầy cố định bên phải */
.zh { font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif; }

/* ---------- Đầu trang ---------- */
.ai-hero { background: radial-gradient(900px 300px at 85% -30%, rgba(45, 91, 215, .55), transparent), linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; padding: 16px 0 14px; }
.ai-hero-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.ai-hero h1 { color: #fff; font-size: clamp(18px, 2.32vw, 24px); margin: 6px 0 4px; }
.ai-hero .sub { color: #C7D5F5; max-width: 760px; margin: 0; font-size: 14.5px; line-height: 1.55; }
.ai-engine { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; padding: 7px 12px; font-size: 12.5px; color: #DCE6FF; max-width: 360px; line-height: 1.45; }

/* ---------- Thanh chọn bài + đồng hồ ---------- */
.classroom-bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h, 46px); z-index: 30; }
.cbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; flex-wrap: wrap; }
.cbar-left, .cbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sel-course, .sel-lesson, .chat-toolbar select, .voice-tools select, .sel-mic-lang { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; font-family: inherit; font-size: 13px; background: #fff; color: var(--navy); max-width: 100%; }
.sel-lesson { max-width: 340px; }
.sess-timer { display: flex; align-items: center; gap: 7px; background: #F1F5F9; border: 1.5px solid #CBD5E1; border-radius: 999px; padding: 4px 12px; font-size: 13px; color: #334155; }
.sess-timer b { font-variant-numeric: tabular-nums; font-size: 15.5px; color: var(--navy); min-width: 48px; }
.sess-timer.run { background: #ECFDF5; border-color: #6EE7B7; }
.sess-timer.low { background: #FFF7ED; border-color: #FDBA74; }
.sess-timer.low b { color: #0C58C2; }
.sess-timer.out { background: #F2F7FE; border-color: #A5C9FC; }
.sess-timer.out b { color: var(--red); }

/* ---------- Bố cục phòng học: Trái (bài học/vở/từ điển) · Phải cố định (khung học cùng thầy) ---------- */
.room-wrap { background: linear-gradient(180deg, #EEF3FF, #F8FAFC 320px); padding: 12px 0 34px; }
.room-wrap .wrap.room { max-width: 1340px; display: grid; grid-template-columns: minmax(340px, 43%) minmax(460px, 57%); gap: 16px; align-items: start; }
@media (max-width: 1020px) {
  .room-wrap .wrap.room { grid-template-columns: 1fr; }
  .chat-main { order: 1; position: static !important; height: auto !important; max-height: none !important; }
  .side-panel { order: 2; position: static !important; max-height: none !important; }
}

/* ---------- Khung học cùng Cô Quỳnh Như: CỐ ĐỊNH BÊN PHẢI ---------- */
.chat-main {
  background: #fff;
  border: 1.5px solid #CBD5E1;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(11, 27, 63, .1);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--nav-h, 46px) + 50px);
  height: calc(100vh - var(--nav-h, 46px) - 62px);
  max-height: calc(100vh - var(--nav-h, 46px) - 62px);
  min-height: 460px;
  overflow: hidden;
  z-index: 20;
}
.chat-main.unpinned {
  position: static;
  height: auto;
  max-height: none;
  min-height: 540px;
}
.teacher-strip { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: linear-gradient(135deg, #0B1B3F, #1E3A8A); color: #fff; flex-wrap: wrap; flex-shrink: 0; }
.teacher-meta { flex: 1; min-width: 190px; }
.t-name { font-size: 17px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-name span { color: #C7D5F5; font-size: 13px; }
.t-model-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(242, 185, 75, .2); border: 1px solid rgba(242, 185, 75, .55); color: #FDE68A !important; font-size: 11px !important; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-left: 2px; }
.t-state { font-size: 12.5px; color: #FDE68A; margin: 2px 0 4px; font-weight: 600; }
.t-caption { background: rgba(255, 255, 255, .09); border-radius: 10px; padding: 5px 10px; }
.cap-zh { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.35; }
.cap-py { font-size: 12.5px; color: #93C5FD; }
.teacher-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 225px; }
@media (max-width: 760px) { .teacher-actions { flex: 1 1 100%; } }
.btn-live { font-size: 14.5px; padding: 8px 16px; }
.voice-tools { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.voice-tools select { padding: 3px 7px; font-size: 12px; flex: 1 1 auto; }
.voice-tools .chk { font-size: 12.5px; color: #DCE6FF; display: flex; gap: 4px; align-items: center; }
.btn-stop, .btn-pin { border: 1px solid rgba(255, 255, 255, .24); border-radius: 8px; background: rgba(255, 255, 255, .14); color: #fff; padding: 3px 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-pin.on { background: rgba(242, 185, 75, .25); border-color: rgba(242, 185, 75, .65); color: #FDE68A; }
.chat-toolbar { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 12.5px; flex-shrink: 0; }
.chat-toolbar select { padding: 4px 8px; font-size: 12.5px; }

.chat-messages { flex: 1 1 0%; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; max-height: none; scroll-behavior: smooth; }
.chat-main.unpinned .chat-messages { max-height: 62vh; min-height: 300px; }
@media (max-width: 1020px) { .chat-messages { max-height: 60vh; min-height: 260px; } .chat-main { min-height: 0; } }
.msg-bubble { max-width: 86%; border-radius: 16px; padding: 10px 14px; line-height: 1.6; font-size: 15px; animation: popIn .25s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-bubble.teacher { background: #F8FAFC; border: 1px solid #E2E8F0; align-self: flex-start; border-top-left-radius: 4px; }
.msg-bubble.teacher.praise { background: #FFFBEB; border-color: #FCD34D; }
.msg-bubble.student { background: var(--blue); color: #fff; align-self: flex-end; border-top-right-radius: 4px; }
.msg-bubble.sys { align-self: center; background: #FEF3C7; color: #92400E; font-size: 13.5px; max-width: 94%; }
.msg-bubble.sys.err { background: #F2F7FE; color: #1B4F99; }
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: #64748B; margin-bottom: 4px; }
.msg-head .acts { display: flex; gap: 4px; }
.msg-head .acts button { border: 1px solid #CBD5E1; background: #fff; border-radius: 7px; font-size: 12px; padding: 1px 7px; cursor: pointer; color: var(--navy); }
.msg-zh { font-family: "Noto Serif SC", serif; font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.45; }
.msg-py { color: var(--red); font-weight: 600; font-size: 14px; }
.msg-vi { color: #334155; font-size: 14.5px; margin-top: 4px; }
.msg-text.hidden-sub { filter: blur(6px); cursor: pointer; user-select: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #94A3B8; animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.quick-prompts { display: flex; gap: 6px; padding: 6px 12px; overflow-x: auto; border-top: 1px solid var(--line); flex-shrink: 0; }
.quick-prompts button { flex: none; border: 1.5px solid #BFDBFE; background: #EFF6FF; color: var(--blue); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.quick-prompts button:hover { background: #DBEAFE; }

.mic-banner { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: #ECFDF5; border-top: 1px solid #A7F3D0; flex-wrap: wrap; font-size: 13px; color: #062B5F; flex-shrink: 0; }
.mic-banner .heard { flex: 1; min-width: 120px; font-family: "Noto Serif SC", serif; color: var(--navy); font-size: 15px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #448BEF; animation: blinkDot 1s infinite; }
@keyframes blinkDot { 50% { opacity: .25; } }
.mic-meter { display: flex; gap: 3px; align-items: center; height: 22px; }
.mic-meter i { width: 4px; height: 6px; border-radius: 3px; background: #1056B9; transition: height .08s; }

.chat-input-bar { display: flex; gap: 7px; align-items: flex-end; padding: 8px 12px 10px; border-top: 1px solid var(--line); background: #FBFCFE; flex-shrink: 0; }
.chat-input-bar textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 11px; font-family: inherit; font-size: 14.5px; min-height: 40px; max-height: 110px; }
.sel-mic-lang { padding: 7px 6px; font-size: 12.5px; }
.btn-mic { display: flex; align-items: center; gap: 5px; border: 0; border-radius: 11px; padding: 8px 12px; background: #1056B9; color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13.5px; min-height: 40px; }
.btn-mic.on { background: #448BEF; animation: micPulse 1.3s infinite; }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(68, 139, 239, .55); } 100% { box-shadow: 0 0 0 14px rgba(68, 139, 239, 0); } }
.btn-send { min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
@media (max-width: 560px) { .sel-mic-lang { display: none; } .btn-mic #btnMicLabel { display: none; } .teacher-actions { width: 100%; align-items: stretch; } .voice-tools { justify-content: flex-start; } }

/* ---------- Panel bài học / vở / từ điển (Cột trái) ---------- */
.side-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 28px rgba(11, 27, 63, .06); display: flex; flex-direction: column; overflow: hidden; }
.side-tabs { display: flex; border-bottom: 1px solid var(--line); }
.side-tabs button { flex: 1; border: 0; background: #F8FAFC; padding: 10px 6px; font-family: inherit; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; border-bottom: 3px solid transparent; }
.side-tabs button.on { background: #fff; color: var(--navy); border-bottom-color: var(--gold); }
.side-pane { padding: 14px; flex: 1; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.pane-row { display: flex; gap: 6px; margin-bottom: 10px; }
.pane-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); font-family: inherit; font-size: 14px; }
.step-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.step-tabs button { border: 1px solid #CBD5E1; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: #334155; }
.step-tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.board-body { font-size: 14px; }
.board-body h3 { font-size: 16px; margin: 0 0 8px; }
.board-body .card { padding: 12px; margin-bottom: 10px; border-radius: 12px; }
.w-card { border: 1px solid #E2E8F0; border-radius: 12px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.w-card .hz { font-family: "Noto Serif SC", serif; font-size: 21px; font-weight: 900; color: var(--navy); }
.w-card .py { color: var(--red); font-weight: 600; font-size: 13px; }
.w-card .vi { font-weight: 600; color: #1E293B; font-size: 13.5px; }
.w-card .ex { font-size: 12.5px; color: #475569; margin-top: 3px; }
.mini-acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mini-acts button, .mini-acts a { border: 1px solid #CBD5E1; background: #fff; border-radius: 7px; font-size: 12.5px; padding: 2px 8px; cursor: pointer; color: var(--navy); text-decoration: none; font-family: inherit; }
.mini-acts button.pri { background: var(--blue); color: #fff; border-color: var(--blue); }
.d-line { border: 1px solid #E2E8F0; border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; }
.d-line .zh { font-size: 17px; font-weight: 700; }
.note-item { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 8px 10px; margin-bottom: 7px; font-size: 13.5px; }
.dict-item { border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 10px; margin-bottom: 7px; }

/* ---------- Avatar Cô Quỳnh Như (SVG, đổi biểu cảm theo trạng thái) ---------- */
.avatar-box { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #FFF7E6, #FDE68A 70%, #F59E0B); position: relative; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); transition: box-shadow .2s; --vol: 0; }
.avatar-box.big { width: min(300px, 62vw); height: min(300px, 62vw); }
.avatar-box svg { width: 100%; height: 100%; display: block; border-radius: 50%; overflow: visible; }
.avatar-box .ring { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent; pointer-events: none; }
.av-head { transform-box: fill-box; transform-origin: 50% 90%; animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.5px) scale(1.006); } }
.av-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.av-pupil { transition: transform .3s ease; }
.av-mouth-open { transform-box: fill-box; transform-origin: center top; transform: scaleY(.05); transition: transform .06s linear; }
.av-smile-big, .av-eye-happy, .av-bubble, .av-stars, .av-sound { opacity: 0; transition: opacity .25s; }
.av-brow { transform-box: fill-box; transform-origin: center; transition: transform .3s; }

/* nói: đầu gật nhẹ, sóng âm, miệng mở theo âm lượng (JS đặt scaleY) */
.st-speaking .av-head { animation: talkBob .5s ease-in-out infinite; }
@keyframes talkBob { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-1.4deg) translateY(-1px); } 70% { transform: rotate(1.2deg) translateY(0); } }
.st-speaking .av-sound { opacity: 1; }
.st-speaking .av-smile { opacity: 0; }
.st-speaking .av-sound path { animation: soundWave 1s ease-out infinite; }
.st-speaking .av-sound path:nth-child(2) { animation-delay: .3s; }
@keyframes soundWave { 0% { opacity: 0; transform: translateX(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateX(6px); } }
.st-speaking { box-shadow: 0 0 0 calc(4px + var(--vol) * 14px) rgba(253, 224, 71, .45); }

/* nghe: nghiêng đầu, lông mày nhướn, viền xanh theo âm lượng mic */
.st-listening .av-head { animation: none; transform: rotate(-5deg); transition: transform .4s; }
.st-listening .av-brow { transform: translateY(-3px); }
.st-listening { box-shadow: 0 0 0 calc(4px + var(--vol) * 16px) rgba(59, 139, 247, .55); }
.st-listening .ring { border-color: rgba(59, 139, 247, .7); animation: ringPulse 1.6s ease-out infinite; }
@keyframes ringPulse { 0% { transform: scale(.96); opacity: 1; } 100% { transform: scale(1.14); opacity: 0; } }

/* suy nghĩ: mắt nhìn lên, bong bóng ba chấm */
.st-thinking .av-pupil { transform: translate(3px, -3px); }
.st-thinking .av-bubble { opacity: 1; }
.st-thinking .av-bubble circle.d { animation: dot 1.2s infinite; }
.st-thinking .av-bubble circle.d:nth-of-type(2) { animation-delay: .2s; }
.st-thinking .av-bubble circle.d:nth-of-type(3) { animation-delay: .4s; }
.st-thinking .av-head { animation: think 2.4s ease-in-out infinite; }
@keyframes think { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
.st-thinking .ring { border-color: rgba(147, 197, 253, .8); border-style: dashed; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* khen: cười to, mắt cười, sao lấp lánh */
.st-praise .av-smile-big, .st-praise .av-eye-happy, .st-praise .av-stars { opacity: 1; }
.st-praise .av-eye, .st-praise .av-smile, .st-praise .av-mouth-open { opacity: 0; }
.st-praise .av-head { animation: hop .6s ease-in-out 3; }
@keyframes hop { 50% { transform: translateY(-5px) scale(1.02); } }
.st-praise .av-stars path { transform-box: fill-box; transform-origin: center; animation: twinkle .9s ease-in-out infinite; }
.st-praise .av-stars path:nth-child(2) { animation-delay: .3s; } .st-praise .av-stars path:nth-child(3) { animation-delay: .6s; }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .5; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }
.st-praise { box-shadow: 0 0 0 10px rgba(251, 191, 36, .5); }

/* ---------- Chế độ Thoại Live ---------- */
.live-overlay { position: fixed; inset: 0; z-index: 150; background: radial-gradient(900px 500px at 50% 10%, #1E3A8A, #0B1B3F 70%); color: #fff; display: flex; }
.live-box { display: flex; flex-direction: column; width: 100%; max-width: 980px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-brand { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.live-brand span:last-child { color: #93C5FD; font-size: 14px; }
.live-badge { background: #448BEF; border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 800; animation: blinkDot 1.6s infinite; }
.live-top-right { display: flex; gap: 8px; align-items: center; }
.live-timer { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 12px; font-weight: 800; }
.live-select { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; padding: 6px 8px; font-family: inherit; }
.live-select option { color: #0B1B3F; }
.live-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; min-height: 0; }
.live-state { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 7px 18px; font-weight: 700; font-size: 15px; }
.live-sub { max-width: 760px; min-height: 120px; }
.live-zh { font-size: clamp(20px, 3.44vw, 29px); font-weight: 700; line-height: 1.4; }
.live-py { color: #93C5FD; font-size: 16px; margin-top: 4px; }
.live-vi { color: #E2E8F0; font-size: 15px; margin-top: 6px; }
.live-heard { color: #6EE7B7; font-size: 16px; margin-top: 10px; min-height: 22px; font-family: "Noto Serif SC", serif; }
.live-sub.nosub .live-py, .live-sub.nosub .live-vi { display: none; }
.live-dock { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; padding-top: 10px; }
.live-btn { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; border-radius: 999px; padding: 11px 16px; font-family: inherit; font-size: 14px; cursor: pointer; }
.live-btn.end { background: #2672DC; border-color: #2672DC; }
.live-mic { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; border-radius: 22px; padding: 12px 22px; cursor: pointer; font-family: inherit; color: #fff; min-width: 210px; transition: background .2s; }
.live-mic .lm-ic { font-size: 25.5px; line-height: 1; }
.live-mic .lm-lbl { font-size: 13px; font-weight: 700; }
.live-mic.off { background: #475569; }
.live-mic.on { background: #1056B9; box-shadow: 0 0 0 calc(var(--vol, 0) * 18px) rgba(59, 139, 247, .35); }
.live-mic.paused { background: #2563EB; }

/* ---------- Điện thoại: dành chỗ cho khung chat ---------- */
@media (max-width: 640px) {
  .ai-hero { padding: 12px 0 10px; }
  .ai-hero h1 { font-size: 20px; margin: 6px 0 4px; }
  .ai-hero .sub { display: none; }
  .ai-engine { font-size: 12px; max-width: none; padding: 6px 10px; }
  .classroom-bar { position: static; }
  .cbar-left, .cbar-right { width: 100%; }
  .sel-course { flex: 1 1 40%; }
  .sel-lesson { flex: 1 1 100%; max-width: none; order: 3; }
  .sess-timer { flex: 1; font-size: 12.5px; }
  .room-wrap { padding: 8px 0 24px; }
  .room-wrap .wrap { padding-left: 8px; padding-right: 8px; }
  .chat-main { border-radius: 14px; }
  .teacher-strip { padding: 10px; gap: 10px; }
  .avatar-box { width: 76px; height: 76px; }
  .avatar-box.big { width: min(240px, 64vw); height: min(240px, 64vw); }
  .cap-zh { font-size: 16px; }
  .btn-live { width: 100%; }
  .chat-toolbar #micHint { display: none; }
  .chat-messages { padding: 10px; }
  .msg-bubble { max-width: 94%; }
  .live-mic { min-width: 170px; }
}

/* ---------- Gói học ---------- */
.plans .amount { font-size: 25.5px; font-weight: 800; color: var(--navy); margin: 6px 0; }
.plans ul { padding-left: 18px; font-size: 14px; color: #334155; }

/* 26/10/2026: lớp học tập trung, mở rộng khung hội thoại, thầy giảng bài, ô gõ trong Live */
/* A29: chế độ tập trung vẫn giữ thanh menu chính để khách quay lại các trang khác */
body.ai-focus .ai-hero, body.ai-focus .cbar-right { display: none !important; }
.mini-clock { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); color: #FDE68A !important; border-radius: 999px; padding: 1px 8px; font-size: 12.5px !important; font-weight: 700; }
.mini-up { border: 0; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 800; padding: 2px 9px; cursor: pointer; font-family: inherit; }
.btn-lecture { background: #fff; color: var(--navy); border: 1.5px solid rgba(255, 255, 255, .6); }
.btn-lecture.on { background: #DBEAFE; color: #1E40AF; }
#btnHand { background: rgba(242, 185, 75, .3); border-color: rgba(242, 185, 75, .8); color: #FDE68A; }
body.ai-wide .room-wrap .wrap.room { grid-template-columns: 1fr; max-width: 1100px; }
body.ai-wide .side-panel { display: none; }
.msg-bubble.lecture { border-left: 4px solid var(--gold); }
.msg-bubble.lecture .lec-vi { font-size: 15px; color: #1E293B; line-height: 1.6; margin-bottom: 4px; }
.msg-bubble.lecture .lec-step { font-size: 12px; font-weight: 800; color: #B45309; text-transform: uppercase; letter-spacing: .4px; }
.und-check { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px 42px; }
.und-check button { border: 1.5px solid #BFDBFE; background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.und-check button:hover { background: var(--sky); }
.live-type { display: flex; gap: 8px; width: 100%; max-width: 720px; margin: 10px auto 0; }
.live-type input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; font-family: inherit; font-size: 15.5px; }
.live-type input::placeholder { color: rgba(226, 232, 240, .7); }
.live-check { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.live-btn.on { background: #DBEAFE; color: #1E40AF; }

/* 26/10/2026 (A23): không tràn ngang trên điện thoại */
.room-wrap .wrap.room > *, .chat-main, .side-panel { min-width: 0; }
.cbar-left select { min-width: 0; max-width: 100%; }
.quick-prompts { max-width: 100%; }
@media (max-width: 1020px) { .room-wrap .wrap.room { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .quick-prompts button { min-height: 36px; padding: 6px 12px; font-size: 13.5px; } #btnFocus, #btnStartPlacement { min-height: 40px; } }
/* Nút xoay vòng ngôn ngữ mic: VI+中 -> VI -> 中 (thay ô chọn cũ, hiện cả trên điện thoại) */
.mic-lang-cycle { border: 1.5px solid var(--line); border-radius: 18px; padding: 6px 10px; min-width: 52px; font-family: inherit; font-size: 13.5px; font-weight: 800; background: #fff; color: var(--navy); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.mic-lang-cycle.live { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; padding: 6px 10px; }

/* Anh Đậu Đậu (bài Kids, 01/11/2026): nam trẻ, tóc ngắn dựng, áo xanh ngọc; nút chọn gọi em / bé */
.avatar-box .av-kid { display: none; }
.avatar-box.kid .av-kid { display: inline; }
.und-check button[data-more] { border-color: #F59E0B; color: #92400E; background: #FFFBEB; }
.addr-check button { border-color: #2D73D4; color: #0957C3; background: #F0F5FD; }

/* 28/10/2026: khung hội thoại cao hơn, bớt khoảng trống phía trên, nút Giơ tay luôn hiện, Phóng to cố định kín màn hình */
@media (min-width: 1021px) {
  .cbar-inner { padding: 4px 0; gap: 8px; }
  .cbar-left { flex-wrap: nowrap; min-width: 0; flex: 1 1 auto; }
  .cbar-left .btn-sm { padding: 5px 10px; font-size: 13.5px; white-space: nowrap; }
  .sel-course, .sel-lesson { padding: 4px 8px; }
  .sel-lesson { flex: 1 1 260px; }
  .room-wrap { padding-top: 6px; }
  .chat-main { top: calc(var(--nav-h, 46px) + 44px); height: calc(100vh - var(--nav-h, 46px) - 52px); max-height: calc(100vh - var(--nav-h, 46px) - 52px); }
  .side-panel { top: calc(var(--nav-h, 46px) + 44px); }
}
.teacher-strip { padding: 6px 12px; gap: 10px; }
.teacher-strip .avatar-box { width: 58px; height: 58px; }
.t-name { font-size: 15.5px; }
.t-state { margin: 1px 0 3px; }
.t-caption { padding: 3px 9px; max-height: 3.4em; overflow: hidden; }
.cap-zh { font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cap-py { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.teacher-actions { gap: 4px; flex-basis: 250px; }
.btn-live { font-size: 14px; padding: 6px 12px; line-height: 1.25; }
.chat-toolbar { padding: 4px 12px; }
.chat-messages { min-height: 220px; }
#btnHand.btn-hand { background: var(--gold); border-color: var(--gold); color: var(--navy); font-size: 13.5px; padding: 5px 12px; border-radius: 999px; }
#btnHand.btn-hand.on { animation: handPulse 1.6s ease-in-out infinite; }
@keyframes handPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 185, 75, .7); } 50% { box-shadow: 0 0 0 6px rgba(242, 185, 75, 0); } }
#btnWide { font-size: 13.5px; padding: 5px 10px; }
/* Phóng to: khung hội thoại cố định kín màn hình dưới thanh menu, cuộn trang không trôi */
body.ai-wide .chat-main {
  position: fixed !important;
  top: calc(var(--nav-h, 46px) + 6px) !important;
  left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100vw - 16px));
  height: calc(100vh - var(--nav-h, 46px) - 12px) !important;
  max-height: none !important; min-height: 0 !important;
  z-index: 60; order: 0;
}
body.ai-wide .chat-messages { max-height: none !important; min-height: 0 !important; }
body.ai-wide { overflow: hidden; }

/* ===== RÀ SOÁT MÀU 04/11/2026: tối đa 3 màu (trung tính, xanh dương #0B6CF3, đỏ nhấn). Báo cáo: bao-cao/ra-soat-mau-2026-11-04.md ===== */
html body .card[style*="FDE68A"], html body .note-item, html body .msg-bubble.teacher.praise, html body .und-check button[data-more] { background: #E7F0FE !important; border-color: #9CC4FD !important; color: #0B1B3F !important; }
html body .t-state, html body .mini-clock, html body .btn-pin.on, html body #btnHand, html body .t-model-badge, html body .pill[style*="FDE68A"] { color: #E7F0FE !important; }
html body .btn-pin.on, html body #btnHand, html body .t-model-badge { background: rgba(43, 130, 251, .28) !important; border-color: rgba(156, 196, 253, .8) !important; }
html body .avatar-box { background: radial-gradient(circle at 50% 35%, #FFFFFF, #D5E3FA 70%, #2B82FB) !important; }
html body .st-praise { box-shadow: 0 0 0 10px rgba(43, 130, 251, .4) !important; }
html body .btn-mic, html body .live-mic.on, html body .mic-meter i { background: #0B6CF3 !important; }
html body .btn-mic.on { background: #105DC8 !important; }
