/* style.css — giao diện web học liệu VLS. Màu lấy đúng bảng màu bộ PPT chuẩn CLT / web pilot.
   Không dùng phông hay thư viện ngoài (chạy offline). */
:root {
  --primary: #A6CE3A; --primary-d: #7C9E22; --deep: #203163; --deep-l: #3A4F82; --deep-2: #2B3F78;
  --accent: #ED5A56; --orange: #E8833A; --green: #2F7D5B; --green-l: #E4F2EA; --teal: #1F9AA6;
  --purple: #6E5BA8; --ink: #231F20; --muted: #6B7268; --line: #DDE2EC; --bg: #F4F6FA; --white: #fff;
  --soft-b: #E6EAF2; --radius: 14px; --shadow: 0 2px 10px rgba(32, 49, 99, .08);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --head: Cambria, Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--head); color: var(--deep); margin: 0; }
.muted { color: var(--muted); }
.en { display: block; font-family: var(--font); font-size: .78em; font-weight: 400; color: var(--muted); }
body.no-en .en { display: none; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.big { width: 44px; height: 44px; stroke-width: 1.5; }
.ic.dim { opacity: .45; }

/* ---------- thanh đầu trang ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 10px 28px; background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50% 50% 50% 8px; background: var(--primary); color: var(--deep); font-weight: 800; font-size: 14px; }
.brand-text b { display: block; color: var(--deep); font-size: 16px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.crumbs { flex: 1; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--deep-l); }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 8px; }
.controls { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.seg button.on { background: var(--deep); color: var(--white); }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--primary-d); width: 16px; height: 16px; }

main { flex: 1; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 28px 40px; }
.sec { font-size: 26px; margin: 34px 0 16px; }
.sec .en { font-size: 14px; margin-top: 2px; }
.hint { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.chip-on { background: var(--primary); color: var(--deep); }
.chip-off { background: var(--soft-b); color: var(--muted); }
.chip-wip { background: #FFF1D6; color: #8A5A00; }

/* ---------- trang chính ---------- */
.hero { background: linear-gradient(120deg, var(--deep) 0%, var(--deep-2) 60%, #33508F 100%); color: var(--white); }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 44px 28px 40px; }
.kicker { margin: 0 0 6px; color: var(--primary); font-weight: 700; letter-spacing: .12em; font-size: 14px; }
.hero h1 { color: var(--white); font-size: 42px; }
.hero h1 .en { color: #C8D7E6; font-size: 18px; margin-top: 4px; }
.series { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill { padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.pill.on { background: var(--primary); color: var(--deep); }
.pill.off { background: rgba(255, 255, 255, .1); color: #C8D7E6; border: 1px solid rgba(255, 255, 255, .2); }

.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.bk { display: flex; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
a.bk:hover { transform: translateY(-3px); border-color: var(--primary); }
.bk.disabled { opacity: .72; }
.bk-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.bk-body h3 { font-size: 24px; }
.bk-body p { margin: 0; font-size: 15px; }
.bk-tag { font-size: 14px !important; }
.bk-body .chip { align-self: flex-start; margin-top: auto; }

.cover { position: relative; flex: none; width: 140px; min-height: 196px; background: var(--deep); color: var(--white); display: flex; flex-direction: column; padding: 14px 12px; overflow: hidden; }
.cover::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: var(--primary); opacity: .95; }
.cover-j2::after { background: var(--orange); }
.cover-c1 { background: #1F5E5B; } .cover-c1::after { background: #F2B53A; } .cover-c1 .cv-t { font-size: 22px; }
.cv-k { font-size: 9px; letter-spacing: .14em; color: var(--primary); font-weight: 700; }
.cv-t { font-family: var(--head); font-size: 26px; font-weight: 700; margin-top: 18px; line-height: 1; }
.cv-n { font-family: var(--head); font-size: 64px; font-weight: 700; line-height: 1; z-index: 1; }
.cv-b { position: absolute; left: 12px; bottom: 12px; font-size: 11px; font-weight: 800; letter-spacing: .1em; z-index: 1; }
.cover.mini { width: 74px; min-height: 100px; padding: 8px; border-radius: 8px; }
.cover.mini .cv-t { font-size: 14px; margin-top: 6px; }
.cover.mini .cv-n { font-size: 38px; }
.cover.mini::after { width: 70px; height: 70px; right: -22px; bottom: -22px; }

.res { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.rc { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
a.rc:hover { transform: translateY(-3px); }
.rc.disabled { opacity: .7; }
.res-top { position: relative; height: 92px; display: grid; place-items: center; color: var(--white); }
.res-top .gv { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .92); color: var(--deep); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.c-teal { background: var(--teal); } .c-lime { background: var(--primary-d); } .c-coral { background: var(--accent); }
.c-orange { background: var(--orange); } .c-navy { background: var(--deep-l); } .c-green { background: var(--green); } .c-purple { background: var(--purple); }
.res-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.res-body b { color: var(--deep); font-size: 16px; }
.res-body p { margin: 0; font-size: 13px; }
.res-body .chip { align-self: flex-start; margin-top: auto; }

/* ---------- trang một cuốn ---------- */
.bp-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.bp-head h1 { font-size: 34px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.units { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.un { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-left: 6px solid var(--green); }
.un.review { grid-column: 1 / -1; border-left-color: var(--orange); }
.un.locked { border-left-color: var(--line); }
.un-main { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
a.un-main:hover { background: #F7FAEE; }
.un-lbl { font-weight: 700; color: var(--green); font-size: 15px; width: 40px; text-align: center; line-height: 1.1; }
.un-lbl .en { font-size: 11px; }
.un-n { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--orange); color: var(--white); font-family: var(--head); font-size: 28px; font-weight: 700; box-shadow: 0 0 0 4px #FDE7D6; }
.un-n.rv { background: var(--deep); box-shadow: 0 0 0 4px var(--soft-b); }
.un-n.rv .ic { width: 26px; height: 26px; }
.un.locked .un-n { background: #B9BFCB; box-shadow: 0 0 0 4px var(--bg); }
.un.locked .un-lbl { color: var(--muted); }
.un-txt { flex: 1; min-width: 0; }
.un-txt b { display: block; color: var(--deep); font-size: 18px; font-family: var(--head); }
.un-txt small { display: block; margin-top: 3px; font-size: 13px; }
.un-txt small .en { font-size: 12px; }
.un-side { display: flex; align-items: center; gap: 6px; color: var(--deep-l); }
.un-gv { display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-top: 1px dashed var(--line); background: #FAFBFD; font-size: 13px; }
.un-gv a { display: inline-flex; align-items: center; gap: 5px; color: var(--deep-l); font-weight: 600; }
.un-gv a:hover { color: var(--deep); text-decoration: underline; }
.un-gv .ic { width: 17px; height: 17px; }
.un-gv .muted { margin-left: auto; }

.extras { position: sticky; top: 84px; background: var(--deep); color: var(--white); border-radius: var(--radius); padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.extras h3 { color: var(--primary); font-family: var(--font); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.extras h3 .en { color: #9FB0CC; text-transform: none; letter-spacing: 0; }
.extras h3.gvh { margin-top: 14px; }
.ex { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-weight: 600; }
.ex .en { color: #9FB0CC; }
a.ex:hover { background: rgba(166, 206, 58, .2); }
.ex.off { opacity: .6; }
.ex small { display: block; font-size: 11px; font-weight: 400; color: #C8D7E6; }

/* ---------- trang một bài ---------- */
.up-head { display: flex; align-items: center; gap: 14px; background: var(--orange); color: var(--white); border-radius: var(--radius); padding: 14px 22px 14px 14px; margin-bottom: 22px; box-shadow: var(--shadow); }
.backbtn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: var(--white); }
.backbtn .ic { width: 26px; height: 26px; stroke-width: 2.4; }
.backbtn:hover { background: var(--deep); }
.up-k { font-size: 15px; font-weight: 600; opacity: .95; }
.up-n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); font-family: var(--head); font-size: 28px; font-weight: 700; box-shadow: 0 0 0 4px rgba(255, 255, 255, .55); }
.up-head h1 { color: var(--white); font-size: 32px; }
.up-head h1 .en { color: #FFE9D8; font-size: 15px; }

.cando { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; border-top: 5px solid var(--primary); }
.cando h3 { font-size: 20px; margin-bottom: 8px; }
.cando h3 .en { font-size: 13px; }
.cando ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.cando li { position: relative; padding-left: 26px; font-size: 15px; }
.cando li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary-d); font-weight: 800; }

.skills { display: flex; flex-direction: column; gap: 12px; }
.sk { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sk-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 0; background: var(--white); text-align: left; }
.sk.open .sk-head { background: #E3F0F0; }
.sk-ic { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--soft-b); color: var(--deep); }
.sk.pilot .sk-ic { background: var(--primary); }
.sk-title { flex: 1; font-family: var(--head); font-size: 22px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .02em; }
.sk-title .en { text-transform: none; letter-spacing: 0; font-size: 13px; }
.sk-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sk-meta b { color: var(--primary-d); }
.sk-bar { width: 90px; height: 6px; border-radius: 6px; background: var(--soft-b); overflow: hidden; }
.sk-bar i { display: block; height: 100%; background: var(--primary-d); }
.sk-chev { color: var(--muted); transition: transform .2s; }
.sk.open .sk-chev { transform: rotate(90deg); }
.items { display: none; list-style: none; margin: 0; padding: 6px 18px 16px; }
.sk.open .items { display: block; }
.it { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.it:last-child { border-bottom: 0; }
.it.off { opacity: .62; }
.it-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--green); color: var(--white); font-weight: 700; font-size: 15px; }
.it.off .it-n { background: #9AA3B2; }
.it-txt { flex: 1; font-size: 17px; font-weight: 600; color: var(--ink); }
.it-txt .en { font-weight: 400; font-size: 13px; }
.stage { flex: none; width: 128px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; text-align: center; line-height: 1.2; }
.stage .en { font-size: 10px; color: inherit; opacity: .8; }
.st-warm { background: #FDEAE9; color: #B23A36; } .st-present { background: var(--soft-b); color: var(--deep); }
.st-listen { background: #E2F3F5; color: #136B74; } .st-check { background: #F0EBFA; color: var(--purple); }
.st-control { background: var(--green-l); color: var(--green); } .st-roleplay { background: #FFF1D6; color: #8A5A00; }
.st-free { background: #FCE4D2; color: #A2501A; } .st-review { background: #EDF5D8; color: #56701A; } .st-self { background: #FFF6CC; color: #7A6300; }
.it-sc { flex: none; width: 92px; text-align: right; font-size: 15px; color: var(--muted); }

.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 14px; }

/* =================== BÀI TẬP (bước 4) =================== */
.it.live { padding: 0; }
.it-a { display: flex; align-items: center; gap: 14px; padding: 12px 6px; width: 100%; border-radius: 10px; }
.it-a:hover { background: #F2F8E6; }
.score { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: 15px; }
.score.good { background: var(--green-l); color: var(--green); } .score.mid { background: #FFF1D6; color: #8A5A00; } .score.low { background: #FDEAE9; color: #B23A36; }

.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 44px; padding: 6px 18px; border-radius: 10px; border: 2px solid var(--deep-l); background: var(--white); color: var(--deep); font-weight: 700; font-size: 16px; line-height: 1.15; }
.btn .en { font-size: 11px; font-weight: 500; }
.btn:hover { background: var(--soft-b); }
.btn.primary { background: var(--deep); border-color: var(--deep); color: var(--white); }
.btn.primary .en { color: #C8D7E6; }
.btn.primary:hover { background: var(--deep-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.big { min-height: 52px; min-width: 130px; font-size: 18px; }
.btn .ic { width: 18px; height: 18px; }
.dlg-bar .btn { flex-direction: row; gap: 8px; }
.dlg-bar .btn .en { display: none; }

body.on-ex .foot { display: none; }
body.on-ex main { padding-bottom: 96px; }
.ex-page { max-width: 1100px; }
.ex-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ex-skill { display: flex; align-items: center; gap: 8px; color: var(--green); font-family: var(--head); font-weight: 700; font-size: 20px; }
.ex-skill .en { font-size: 12px; }
.stepper { flex: 1; display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.sp { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 74px; text-align: center; color: var(--muted); }
.sp-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft-b); font-weight: 700; font-size: 14px; color: var(--deep); }
.sp-lbl { font-size: 11px; line-height: 1.15; }
.sp.done .sp-dot { background: var(--primary); }
.sp.cur .sp-dot { background: var(--deep); color: var(--white); box-shadow: 0 0 0 4px var(--soft-b); }
.sp.cur .sp-lbl { color: var(--deep); font-weight: 700; }
a.sp:hover .sp-dot { box-shadow: 0 0 0 3px var(--primary); }
.sp.off { opacity: .5; }

.ex-head { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; border-left: 6px solid var(--green); }
.it-n.big { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; }
.ex-head .stage { display: inline-block; width: auto; margin-bottom: 6px; }
.ex-head .stage .en { display: inline; margin-left: 6px; }
.ex-head h1 { font-size: 28px; }
.ex-head h1 .en { font-size: 14px; }
.task { margin: 10px 0 0; font-size: 17px; color: var(--ink); background: #F7FAEE; border-radius: 10px; padding: 10px 14px; }
.task .en { font-size: 13px; }
.ex-body { margin-top: 18px; }
.ex-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--green); box-shadow: 0 -2px 12px rgba(0, 0, 0, .12); }
.ex-foot-in { max-width: 1100px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 14px; }
.meter { flex: 1; display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 999px; padding: 8px 18px; min-width: 0; }
.meter-lbl { font-weight: 700; color: var(--deep); }
.meter-bar { flex: 1; max-width: 320px; height: 10px; border-radius: 10px; background: var(--soft-b); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; background: var(--primary-d); transition: width .3s; }
.meter b { font-size: 20px; color: var(--deep); min-width: 32px; }
.meter small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-foot .btn { border-color: var(--white); }
.ex-foot .btn.primary { background: var(--primary); color: var(--deep); border-color: var(--primary); }
.ex-foot .btn.primary .en { color: var(--deep-l); }

.spk { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); color: var(--deep); }
.spk .ic { width: 22px; height: 22px; }
.spk:hover { border-color: var(--primary-d); color: var(--green); }
.spk.playing { background: var(--primary); border-color: var(--primary-d); animation: pulse 1s infinite; }
.spk.me { font-size: 20px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(166, 206, 58, .35); } }
.fb { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; font-weight: 700; }
.fb .en { display: inline; margin-left: 6px; }
.fb p { margin: 4px 0 0; font-weight: 400; }
.fb.ok { background: var(--green-l); color: var(--green); } .fb.no { background: #FDEAE9; color: #B23A36; }
.tipbox { background: #FFF8E1; border-radius: 10px; padding: 12px 16px; font-size: 15px; margin: 16px 0 0; }

/* nghe – chọn ảnh */
.lp-row, .tf-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 12px; }
.lp-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--deep); color: var(--white); font-weight: 700; }
.lp-ch { display: flex; gap: 12px; flex: 1; }
.lp-fb { flex-basis: 100%; }
.pic { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 3px solid var(--line); border-radius: 14px; background: var(--white); padding: 6px; width: 112px; }
.pic img { width: 94px; height: 94px; object-fit: cover; border-radius: 10px; }
.pic b { color: var(--deep); font-size: 18px; }
.pic:hover { border-color: var(--primary-d); }
.pic.right, .opt.right { border-color: var(--green); background: var(--green-l); }
.pic.wrong, .opt.wrong { border-color: var(--accent); background: #FDEAE9; }
.done .pic:not(.right):not(.wrong), .done .opt:not(.right):not(.wrong) { opacity: .5; }

/* hội thoại */
.dlg-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.dlg { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 8px; margin-bottom: 14px; }
.dlg h3 { font-size: 19px; margin-bottom: 6px; }
.dlg h3 .en { font-size: 12px; }
.ln { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.ln:hover { background: #F6F8FB; }
.ln.now { background: #EAF5D3; }
.av { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--soft-b); }
.ln-b { flex: 1; min-width: 0; }
.who { color: var(--green); font-size: 14px; }
.say { margin: 2px 0 0; font-size: 21px; color: var(--ink); }
.say .en { font-size: 13px; }
.cue { text-align: center; color: var(--muted); font-style: italic; margin: 6px 0; font-size: 14px; }
.cue .en { display: inline; margin-left: 4px; }
.hide-text .dlg .say { filter: blur(7px); user-select: none; }
.qs { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-top: 16px; }
.qs h3 { font-size: 19px; margin-bottom: 8px; }
.q p { margin: 10px 0 8px; font-size: 17px; }
.q p .en { display: inline; margin-left: 6px; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt { border: 2px solid var(--line); background: var(--white); border-radius: 10px; padding: 9px 16px; font-size: 17px; font-weight: 600; color: var(--ink); display: inline-flex; flex-direction: column; align-items: center; }
.opt .en { font-size: 11px; }
.opt:hover { border-color: var(--primary-d); }

/* đúng / sai */
.tf-q { flex: 1; margin: 0; font-size: 18px; min-width: 240px; }
.tf-btn { display: flex; gap: 8px; }
.tf-btn .opt { min-width: 84px; }

/* điền từ */
.bank { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: var(--deep); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; position: sticky; top: 72px; z-index: 2; }
.chipw { border: 0; border-radius: 999px; padding: 8px 20px; font-size: 19px; font-weight: 700; background: var(--primary); color: var(--deep); }
.chipw.used { opacity: .25; cursor: default; }
.gap { display: inline-block; min-width: 86px; height: 36px; margin: 0 3px; vertical-align: middle; border: 0; border-bottom: 3px solid var(--deep-l); background: #F1F4FA; border-radius: 6px 6px 0 0; font-size: 20px; font-weight: 700; color: var(--deep); padding: 0 8px; }
.gap.sel { background: #FFF1C4; border-bottom-color: var(--orange); }
.gap.right { background: var(--green-l); border-bottom-color: var(--green); color: var(--green); }
.gap.wrong { background: #FDEAE9; border-bottom-color: var(--accent); color: #B23A36; }

/* sắp xếp */
.ord-it { display: flex; align-items: center; gap: 14px; background: var(--white); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; cursor: pointer; }
.ord-it:hover { border-color: var(--primary-d); }
.ord-it .say { flex: 1; margin: 0; font-size: 19px; }
.ord-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--line); font-weight: 800; color: var(--deep); }
.ord-it.used { background: #F7FAEE; border-color: var(--primary-d); }
.ord-it.used .ord-num { background: var(--primary); border: 0; }
.ord-it.right { border-color: var(--green); } .ord-it.wrong { border-color: var(--accent); background: #FDEAE9; }
.ord-it.now { background: #EAF5D3; }

/* đóng vai */
.rp-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.rp-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.rp-card h3 { font-size: 19px; }
.rp-card p { margin: 4px 0 10px; }
.rp-roles { display: flex; gap: 12px; flex-wrap: wrap; }
.rp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.rp-head p { flex: 1; margin: 0; font-size: 18px; }
.ln.mine { background: #FFF8E1; }
.blur { filter: blur(7px); transition: filter .3s; }
.blur.peek { filter: blur(3px); }
.rp-ctrl { align-items: center; background: var(--white); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); }
.turn { margin: 0 8px 0 0; font-weight: 700; color: var(--orange); font-size: 17px; flex: 1; }
.turn .en { color: var(--muted); }
.btn.rec-on { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* nói tự do */
.ft-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.ft-form label span { display: block; font-weight: 700; color: var(--deep); margin-bottom: 4px; }
.ft-form input, .ft-form select { width: 100%; font: inherit; font-size: 18px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; }
.ft-form input:focus, .ft-form select:focus { outline: none; border-color: var(--primary-d); }
.ft-script, .ft-check { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-top: 14px; }
.ft-script h3, .ft-check h3 { font-size: 19px; margin-bottom: 6px; }
.ft-script ol { margin: 0; padding-left: 26px; font-size: 21px; line-height: 1.7; }
.ck { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 17px; cursor: pointer; }
.ck input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 3px; }
.ck .en { display: inline; margin-left: 6px; }

@media (max-width: 760px) {
  .stepper { justify-content: flex-start; }
  .sp { width: 56px; } .sp-lbl { display: none; }
  .ex-foot-in { padding: 10px 14px; gap: 8px; }
  .btn.big { min-width: 0; padding: 6px 12px; font-size: 16px; }
  .meter small { display: none; }
  .pic { width: 92px; } .pic img { width: 76px; height: 76px; }
  .say { font-size: 18px; }
}

/* ---- kiểu bài mới (Bài 1 đủ 7 kỹ năng) ---- */
.btn.sm { min-height: 38px; padding: 4px 14px; font-size: 15px; flex-direction: row; gap: 6px; }
.btn.sm .en { display: none; }
.lp.nolabel .lp-row:not(.done) .pic b { visibility: hidden; }
.lp-ch { flex-wrap: wrap; }

.selftest { margin-left: auto; font-size: 15px; }
.selftest .en { display: none; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.fc-grid.compact { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.fc-grid.wide { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.fc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); text-align: center; }
.fc:hover { border-color: var(--primary-d); }
.fc.seen { border-color: #CFE3A3; }
.fc.now, .fc.playing { background: #EAF5D3; border-color: var(--primary-d); }
.fc img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.fc-big { font-family: var(--head); font-size: 46px; font-weight: 700; color: var(--deep); line-height: 1.1; }
.fc-big.long { font-size: 16px; padding-top: 16px; white-space: nowrap; letter-spacing: -.3px; }
.fc-w { font-size: 24px; font-weight: 700; color: var(--deep); }
.fc-grid.wide .fc-w { font-size: 21px; }
.fc-ipa { font-size: 14px; color: var(--green); font-family: "Segoe UI", "Arial Unicode MS", sans-serif; }
.fc .en { font-size: 13px; }
.fc-spk { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.fc-spk .ic { width: 18px; height: 18px; }
.fc-test .fc:not(.peek) .fc-w, .fc-test .fc:not(.peek) .fc-ipa, .fc-test .fc:not(.peek) .en { visibility: hidden; }

.timer { font-size: 18px; color: var(--deep); margin: 0 0 10px; }
.timer .en { display: inline; margin-left: 4px; }
.mt { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt-col { display: flex; flex-direction: column; gap: 10px; }
.mt-it { border: 2px solid var(--line); background: var(--white); border-radius: 12px; padding: 12px 16px; font-size: 19px; font-weight: 600; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.mt-it:hover { border-color: var(--primary-d); }
.mt-it.sel { border-color: var(--orange); background: #FFF1D6; }
.mt-it.ok { border-color: var(--green); background: var(--green-l); color: var(--green); cursor: default; }
.mt-it.bad { border-color: var(--accent); background: #FDEAE9; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.dc-row, .sc-row, .rv-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 12px; }
.dc-lbl { font-weight: 700; color: var(--deep); min-width: 80px; }
.dc-in { flex: 1; min-width: 180px; font: inherit; font-size: 22px; letter-spacing: .06em; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; }
.dc-in:focus { outline: none; border-color: var(--primary-d); }
.dc-in.right { border-color: var(--green); background: var(--green-l); } .dc-in.wrong { border-color: var(--accent); background: #FDEAE9; }

.pt-rule { background: var(--deep); color: var(--white); border-radius: var(--radius); padding: 18px 24px; }
.pt-rule p { margin: 4px 0; font-size: 26px; font-weight: 600; }
.pt-rule .slot { display: inline-block; background: rgba(255, 255, 255, .14); border: 2px dashed var(--primary); border-radius: 8px; padding: 0 10px; color: var(--primary); }
.pt-rule .hl { color: #FFD27A; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.pt-tab { width: 100%; margin: 14px 0; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pt-tab th, .pt-tab td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 17px; }
.pt-tab th { width: 34%; color: var(--deep); background: var(--soft-b); }
.pt-ex { margin-top: 14px; }
.av.sq { border-radius: 10px; width: 64px; height: 64px; }

.qz-card { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 12px; }
.qz-img { flex: none; width: 150px; height: 150px; object-fit: cover; border-radius: 12px; }
.qz-main { flex: 1; min-width: 0; }
.qz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.qz-q { margin: 0; font-size: 18px; font-weight: 600; flex: 1; }
.opts.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt.pick { border-color: var(--orange); background: #FFF1D6; }
.qz-card .btn.sm { margin-top: 10px; }

.sc-main { flex: 1; min-width: 0; }
.sc-out { min-height: 46px; padding: 8px 12px; border-radius: 10px; background: #F7FAEE; font-size: 22px; font-weight: 600; color: var(--deep); margin-bottom: 10px; }
.sc-out.right { background: var(--green-l); color: var(--green); } .sc-out.wrong { background: #FDEAE9; color: #B23A36; }
.sc-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-bank .chipw { font-size: 18px; padding: 6px 16px; }
.sc-ctl { display: flex; gap: 8px; margin-top: 10px; }

.ab { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px; }
.ab h3 { font-size: 19px; margin-bottom: 10px; }
.ab-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ab-l { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 12px; background: var(--soft-b); font-size: 32px; font-weight: 700; color: var(--deep); }
.ab-l.sp { background: var(--primary); }
.ab-l.no { background: #FDEAE9; color: #B23A36; text-decoration: line-through; }

.rv-q { flex: 1; margin: 0; font-size: 19px; font-weight: 600; min-width: 220px; }
.rv-a { flex-basis: 100%; margin: 4px 0 0 46px; font-size: 19px; color: var(--green); font-weight: 700; }
.rv-self { flex-basis: 100%; display: flex; gap: 10px; margin-left: 46px; }

.wl { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px; }
.wl h3 { font-size: 19px; margin-bottom: 8px; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.wl-it { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wl-it b { font-size: 18px; color: var(--deep); min-width: 110px; }
.wl-it .muted { flex: 1; font-size: 14px; }
.wl-it .spk { width: 36px; height: 36px; }
.spk-ph { width: 36px; }

.sr { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 18px 14px; }
.sr-head, .sr-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 96px; align-items: center; gap: 8px; }
.sr-head { padding: 8px 0; border-bottom: 2px solid var(--line); }
.sr-head b { text-align: center; font-size: 14px; color: var(--deep); }
.sr-head .en { font-size: 11px; }
.sr-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sr-row p { margin: 0; font-size: 17px; }
.sr-rev { display: block; font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.sr-b { justify-self: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--deep-l); background: var(--white); }
.sr-b:hover { border-color: var(--primary-d); }
.sr-b.on { background: var(--primary-d); border-color: var(--primary-d); box-shadow: inset 0 0 0 5px var(--white); }

@media print { .topbar, .ex-top, .ex-head, .ex-foot, .dlg-bar, .spk, .foot { display: none !important; } body { background: #fff; } }
@media (max-width: 760px) {
  .qz-card { flex-direction: column; } .qz-img { width: 120px; height: 120px; }
  .opts.cols3 { grid-template-columns: 1fr 1fr; }
  .mt { grid-template-columns: 1fr 1fr; gap: 8px; } .mt-it { font-size: 16px; padding: 10px; }
  .sr-head, .sr-row { grid-template-columns: minmax(0, 1fr) 60px 60px 60px; }
  .pt-rule p { font-size: 20px; }
}

.dlg .scene { float: right; width: 200px; max-height: 160px; object-fit: contain; margin: 0 0 8px 14px; border-radius: 10px; }
@media (max-width: 760px) { .dlg .scene { float: none; display: block; margin: 0 auto 8px; } }
.qz-img.wide { width: 280px; height: auto; max-height: 150px; object-fit: contain; background: #fff; }
/* bài đọc */
.rd-main { flex: 1; min-width: 0; }
.rd-text.hidden-text p { filter: blur(6px); user-select: none; }
.tf-img { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }

.rd { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 16px; }
.rd-img { flex: none; width: 170px; height: 170px; object-fit: contain; border-radius: 12px; background: #F6F8FB; }
.rd-text p { margin: 0 0 8px; font-size: 21px; line-height: 1.55; }
.rd-text .rd-gloss { font-size: 15px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
@media (max-width: 760px) { .rd { flex-direction: column; } .rd-img { width: 120px; height: 120px; } }

/* ---------- màn hình hẹp: chỉ cần không vỡ ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .extras { position: static; }
  .units { grid-template-columns: 1fr; }
  .cando ul { grid-template-columns: 1fr; }
  .crumbs { display: none; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .wrap { padding: 20px 14px 32px; }
  .stage, .sk-bar { display: none; }
  .hero h1 { font-size: 30px; }
  .books { grid-template-columns: 1fr; }
}

.ft-img { display: block; max-width: 340px; width: 100%; border-radius: 14px; margin: 0 auto 16px; }
.up-n .ic { width: 28px; height: 28px; }

/* Ôn tập J2: bảng ô hình + ảnh rộng trong bài đọc */
.pg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pg-tabs .chipw.on { background: var(--deep); color: #fff; }
.pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 620px; margin: 0 auto 12px; }
.pg-cell { aspect-ratio: 1; border: 2px solid #D5DEE8; border-radius: 14px; background: #F6F8FB; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 8px; font: inherit; }
.pg-cell span { font-size: 34px; font-weight: 700; color: #9AA9BA; }
.pg-cell:hover { border-color: var(--deep); }
.pg-cell.open { background: #fff; border-color: var(--deep); }
.pg-cell img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rd.wide { flex-direction: column; }
.rd.wide .rd-img { width: 100%; max-width: 760px; height: auto; margin: 0 auto; }
.qz-q { white-space: pre-line; }

/* Nghe cả bài: tạm dừng / dừng hẳn */
.seq-stop[hidden] { display: none !important; }
.btn.seq-stop { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.btn.seq-btn.on { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Nghe riêng từng hội thoại + thanh nổi khi đang nghe */
.dlg h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dlg-one { display: inline-flex; gap: 6px; margin-left: auto; }
.dlg-one .btn.sm { font-size: 14px; padding: 5px 12px; }
.dlg-one .btn .en { display: none; }
.seq-dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 6px;
  background: var(--deep); color: #fff; border-radius: 999px; padding: 6px 16px 6px 8px; box-shadow: 0 6px 20px rgba(32,49,99,.35); max-width: calc(100% - 24px); }
.seq-dock[hidden] { display: none; }
.seq-dock button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 17px; cursor: pointer; flex: none; }
.seq-dock button.main { background: var(--orange); width: 46px; height: 46px; font-size: 20px; }
.seq-dock button.stop { background: rgba(237,90,86,.9); }
.seq-dock .seq-info { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }
.seq-dock.paused .seq-info { color: var(--primary); }
.seq-dock .seq-seek { width: 160px; accent-color: var(--orange); cursor: pointer; flex: none; }
.seq-dock .seq-time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .9; }
.seq-dock.single .mic { display: none; }
@media (max-width: 560px) { .seq-dock .seq-seek { width: 90px; } .seq-dock .seq-info { display: none; } }

/* Ghi âm so sánh giọng */
.rec { display: inline-flex; align-items: center; gap: 4px; flex: none; position: relative; }
.rec button { border: 2px solid var(--line); background: var(--white); color: var(--deep); border-radius: 999px; height: 36px; min-width: 36px; padding: 0 8px; font-size: 15px; cursor: pointer; font-weight: 700; }
.rec .me, .rec .cmp { display: none; }
.rec.has .me, .rec.has .cmp { display: inline-block; }
.rec .me { color: var(--green); border-color: #BFDCCB; }
.rec .cmp { color: var(--orange); border-color: #F3CFAE; }
.rec .playing { background: #EAF5D3; }
.rec.on .mic { background: var(--accent); border-color: var(--accent); color: #fff; animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .55; } }
.rec-msg { position: absolute; right: 0; top: 40px; z-index: 5; width: 230px; background: #FFF3F3; color: var(--accent); border: 1px solid #F3C2C0; border-radius: 8px; padding: 6px 8px; font-size: 13px; font-weight: 600; }
.fc-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fc-cell .fc { width: 100%; }
.fc-cell .rec button { height: 30px; min-width: 30px; font-size: 13px; }
.wl-it .rec button { height: 32px; min-width: 32px; }
.seq-dock button.mic.on { background: var(--accent); animation: recblink 1s infinite; }
@media print { .rec { display: none !important; } }
@media (max-width: 560px) { .ln { flex-wrap: wrap; } .ln .rec { margin-left: auto; } }
.rec button svg, .seq-dock button svg { display: block; margin: 0 auto; }

/* Tô điểm ngữ pháp mới (nút "Ngữ pháp mới", mặc định tắt) */
mark.gp { background: none; color: inherit; font-weight: inherit; transition: color .2s; }
.gp-on mark.gp { color: #D9661F; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(217,102,31,.35); text-underline-offset: 3px; }
.btn.gp-btn { gap: 8px; }
.gp-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #D9661F; flex: none; }
.btn.gp-btn.on { background: #FFF1E6; border-color: #D9661F; color: #B4521A; }
.btn.gp-btn.on .gp-dot { background: #D9661F; }

/* Nút "← Bài trước" + khung bối cảnh nhân vật (nghe – chọn ảnh) */
.btn.big.ghost { background: var(--white); color: var(--deep); border: 2px solid var(--line); }
.btn.big.ghost .en { display: none; }
.cast { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px; }
.cast h3 { margin: 0 0 10px; font-size: 17px; color: var(--deep); }
.cast h3 .en { display: block; font-size: 13px; font-weight: 400; }
.cast-in { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cast figure { margin: 0; text-align: center; }
.cast img { width: 96px; height: 96px; object-fit: contain; border-radius: 12px; background: #F6F8FB; }
.cast-main img { width: 120px; height: 120px; }
.cast figcaption { font-size: 14px; font-weight: 700; color: var(--deep); margin-top: 4px; }
.cast-arrow { font-size: 28px; color: var(--muted); }
.cast-ppl { display: flex; gap: 12px; flex-wrap: wrap; }
.pic-imgs { display: flex; gap: 4px; }
.pic.multi { width: auto; }
.pic.multi img { width: 78px; }
.pic small { font-size: 12px; color: var(--muted); font-weight: 600; }
.lp.nolabel .lp-row:not(.done) .pic small { visibility: hidden; }
@media (max-width: 560px) { .cast-arrow { display: none; } .cast img { width: 70px; height: 70px; } .cast-main img { width: 84px; height: 84px; } }
@media (max-width: 640px) { .btn.big.ghost .lbl { display: none; } .btn.big.ghost { padding-left: 16px; padding-right: 16px; } }

/* Trò chơi trên lớp */
.g-wrap { margin-bottom: 20px; }
.g-sizes, .g-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.g-sizes .chipw, .g-tabs .chipw { font-size: 15px; padding: 6px 14px; background: var(--white); border: 2px solid var(--line); color: var(--deep); }
.g-sizes .chipw.on, .g-tabs .chipw.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.g-card { display: block; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; color: var(--ink); text-decoration: none; border: 2px solid transparent; }
.g-card:hover { border-color: var(--primary-d); }
.g-card[hidden] { display: none; }
.g-card b { font-size: 18px; color: var(--deep); font-family: var(--head); }
.g-card .en { display: block; font-size: 13px; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; align-items: center; }
.g-meta .gm { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 8px; }
.g-meta.big .gm { font-size: 14px; padding: 4px 10px; }
.g-use { margin: 0; font-size: 14px; line-height: 1.45; }
.g-src { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.g-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px; }
.g-box h3 { margin: 0 0 8px; font-size: 17px; color: var(--deep); }
.g-box p, .g-box li { line-height: 1.55; }
.g-box.goal { border-left: 5px solid var(--primary); }
.g-box.unit { border-left: 5px solid var(--orange); background: #FFF8F1; }
.g-box.easy { border-left: 5px solid var(--green); } .g-box.hard { border-left: 5px solid var(--accent); }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .g-two { grid-template-columns: 1fr; } }
.g-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.g-cards li { border: 2px dashed #E9B98C; border-radius: 10px; padding: 10px 12px; background: #fff; font-weight: 600; }
.g-steps li { margin-bottom: 6px; }
@media print { .game-page .g-box:not(.unit), .game-page .g-meta, .game-page .g-src, .game-page .up-head .backbtn, .game-page [data-act="print"] { display: none !important; }
  .g-cards { grid-template-columns: 1fr 1fr; } .g-cards li { font-size: 20px; padding: 26px 16px; page-break-inside: avoid; } }
.g-meta .stage { display: inline-block !important; width: auto; }
.g-meta .stage .en { display: none; }

/* Công cụ chơi trên web */
.g-play { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: #fff; background: var(--orange); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.g-box.play { border: 3px solid var(--orange); }
.g-box.play h3 .en { display: inline; margin-left: 8px; font-size: 13px; font-weight: 400; }
.gt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.gt-row .chipw, .gt-score .chipw { font-size: 15px; padding: 6px 14px; background: var(--white); border: 2px solid var(--line); color: var(--deep); }
.gt-row .chipw.on, .gt-score .chipw.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.gt-dice { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.gt-die { font-size: 96px; line-height: 1; width: 110px; text-align: center; color: var(--deep); }
.gt-col { flex: 1; min-width: 220px; }
.gt-task { font-size: 22px; font-weight: 800; color: var(--deep); margin: 8px 0; }
.gt-ex { font-size: 18px; color: var(--green); margin: 4px 0; }
.gt-turn { margin: 8px 0 0; font-weight: 600; color: var(--muted); }
.gt-faces { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.gt-faces li { border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 15px; }
.gt-faces li.on { border-color: var(--orange); background: #FFF1E6; }
.gt-score { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.gt-score small { color: var(--muted); }
.gt-q { font-size: 18px; font-weight: 700; color: var(--deep); }
.gt-tab { width: 100%; border-collapse: collapse; font-size: 17px; }
.gt-tab th, .gt-tab td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
.gt-tab th { color: var(--deep); width: 34%; }
.gt-tab tr.gt-hit td, .gt-tab tr.gt-hit th { background: var(--green-l); }
.gt-in { width: 100%; font: inherit; padding: 6px 10px; border: 2px dashed #E9B98C; border-radius: 8px; }
.gt-note { color: var(--muted); font-size: 14px; }
.gt-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.gt-team { border-radius: 14px; padding: 10px; text-align: center; color: #fff; }
.gt-team.t0 { background: var(--deep); } .gt-team.t1 { background: var(--accent); } .gt-team.t2 { background: var(--green); } .gt-team.t3 { background: var(--orange); }
.gt-team b { display: block; } .gt-pts { display: block; font-size: 44px; font-weight: 800; line-height: 1.1; }
.gt-team .btn.sm { margin: 2px; }
.gt-big { font-size: 28px; font-weight: 800; color: var(--deep); }
.gt-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.gt-bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s linear; }
.gt-qbox { background: var(--bg); border-radius: 12px; padding: 10px 14px; margin-top: 10px; }
.gt-ans { font-size: 18px; font-weight: 700; color: var(--green); }
.gt-clock { font-size: 72px; font-weight: 800; text-align: center; color: var(--deep); font-variant-numeric: tabular-nums; }
.gt-chk { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.gt-card { min-height: 150px; border: 3px dashed #E9B98C; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; background: #FFFCF8; }
.gt-front { font-size: 30px; font-weight: 800; color: var(--deep); }
.gt-back { font-size: 20px; font-weight: 700; color: var(--green); }

/* Thanh dưới: ← Bài trước · Bài tiếp → · Xong; mũi tên cùng dòng với chữ */
.ex-foot .btn.nav { flex-direction: row; gap: 8px; white-space: nowrap; }
.ex-foot .btn.nav .arr { font-size: 1.1em; }
@media (max-width: 640px) { .ex-foot .btn.nav .lbl { display: none; } }

/* Khởi động: người nói ở mỗi hàng + bài "Ai chào ai" */
.lp-who { margin: 0; text-align: center; flex: none; }
.lp-who img { width: 70px; height: 70px; object-fit: contain; border-radius: 12px; background: #F6F8FB; display: block; }
.lp-who figcaption { font-size: 12px; font-weight: 700; color: var(--deep); }
.gp-round { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 14px; }
.gp-round h3 { margin: 0 0 8px; font-size: 17px; color: var(--deep); }
.gp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.gp-row:first-of-type { border-top: 0; }
.gp-p { margin: 0; text-align: center; }
.gp-p img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: #F6F8FB; display: block; }
.gp-p figcaption { font-size: 12px; font-weight: 700; color: var(--deep); }
.gp-arr { color: var(--muted); font-weight: 600; font-size: 14px; }
.gp-opts { flex: 1; min-width: 240px; }
.gp-row .lp-fb { flex-basis: 100%; }

/* Che mờ từng câu thoại (nút 👁) */
.ln.masked .say { filter: blur(7px); user-select: none; }
.ln .eye { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ln .eye:hover { border-color: var(--deep); color: var(--deep); }
.ln.masked .eye { background: var(--deep); border-color: var(--deep); color: #fff; }

/* Liên kết ngữ pháp → bài luyện */
.gp-on mark.gp[data-ex] { cursor: pointer; }
.gp-on mark.gp[data-ex]:hover { background: #FFE4CF; border-radius: 4px; }
.gp-practice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #FFF8F1; border: 2px dashed #E9B98C; border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; }
.gp-practice b { color: #B4521A; }
.gp-practice .en { flex-basis: 100%; margin-top: -6px; }
.gp-practice .chipw { text-decoration: none; font-size: 15px; padding: 6px 14px; background: var(--white); border: 2px solid #E9B98C; color: #B4521A; }

/* ===== Công cụ dạy học (tools.js) ===== */
.tl-bar { position: fixed; left: 10px; top: 50%; transform: translateY(-50%); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #1F2430; border-radius: 14px; padding: 6px; box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.tl-bar button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #E9ECF2; cursor: pointer; display: grid; place-items: center; position: relative; }
.tl-bar button:hover { background: rgba(255,255,255,.12); }
.tl-bar button.on { background: #2F6FED; color: #fff; }
.tl-body { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tl-bar.folded .tl-body { display: none; }
.tl-bar hr { width: 28px; border: 0; border-top: 1px solid rgba(255,255,255,.2); margin: 4px 0; }
.tl-txt { font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.tl-color i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; display: block; }
.tl-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(255,255,255,.08); border-radius: 10px; }
.tl-colors[hidden] { display: none; }
.tl-colors button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; }
.tl-tip { position: absolute; left: 48px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #1F2430; color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.tl-layer { position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none; }
body.tl-drawing .tl-layer { pointer-events: auto; cursor: crosshair; }
/* bảng trắng */
.wb { position: fixed; inset: 0; z-index: 80; background: #fff; display: flex; flex-direction: column; }
.wb[hidden] { display: none; }
.wb-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 12px; background: #1F2430; color: #E9ECF2; }
.wb-grp { display: flex; gap: 4px; align-items: center; padding-right: 10px; border-right: 1px solid rgba(255,255,255,.18); }
.wb-grp > span { font-size: 13px; margin-right: 4px; }
.wb-top button { min-width: 36px; height: 36px; border: 0; border-radius: 8px; background: rgba(255,255,255,.1); color: #E9ECF2; cursor: pointer; display: grid; place-items: center; font-weight: 700; padding: 0 8px; }
.wb-top button.on { background: #2F6FED; color: #fff; }
.wb-top .sw { min-width: 26px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.wb-top .sw.on { border-color: #fff; box-shadow: 0 0 0 2px #2F6FED; }
.wb-close { margin-left: auto; background: #E53935 !important; }
.wb-area { position: relative; flex: 1; }
.wb-area canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wb-ink { cursor: crosshair; touch-action: none; }
.wb-text { position: absolute; z-index: 2; font: 600 24px "Segoe UI", Arial, sans-serif; border: 2px dashed #2F6FED; padding: 2px 6px; min-width: 180px; background: rgba(255,255,255,.9); }
body.wb-open { overflow: hidden; }
/* hướng dẫn bài tập dính */
.tl-sticky { position: fixed; left: 0; right: 0; z-index: 9; display: flex; justify-content: center; pointer-events: none; }
.tl-sticky[hidden] { display: none; }
.tl-st-in { pointer-events: auto; max-width: 1100px; width: calc(100% - 24px); margin-top: 6px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: #FFFFFFF2; border: 2px solid var(--primary); border-radius: 12px; padding: 8px 14px; box-shadow: 0 4px 14px rgba(32,49,99,.15); font: inherit; color: var(--ink); }
.tl-st-in .it-n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; }
.tl-st-in b { color: var(--deep); white-space: nowrap; }
.tl-st-task { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.tl-sticky.open .tl-st-task { white-space: normal; color: var(--ink); }
.tl-st-more { color: var(--muted); }
@media (max-width: 640px) { .tl-bar { left: 4px; } .tl-st-in b { display: none; } }
@media print { .tl-bar, .tl-sticky, .tl-layer { display: none !important; } }

/* Thanh công cụ v2 (Nam 2026-10-23): ẩn sẵn, góc trên phải, trượt xuống khi cần; màu xanh VLS */
.tl-bar { left: auto; right: 12px; transform: none; background: var(--green); border-radius: 14px; padding: 5px; box-shadow: 0 6px 18px rgba(32,49,99,.25); }
.tl-bar button { color: #fff; }
.tl-bar button:hover { background: rgba(255,255,255,.16); }
.tl-bar button.on { background: #fff; color: var(--green); }
.tl-bar .tl-fold .i-close, .tl-bar.folded .tl-fold .i-open { display: grid; }
.tl-bar .tl-fold .i-open, .tl-bar.folded .tl-fold .i-close { display: none; }
.tl-bar .tl-body { max-height: 640px; overflow: hidden; transition: max-height .28s ease, opacity .2s; opacity: 1; }
.tl-bar.folded .tl-body { display: flex; max-height: 0; opacity: 0; pointer-events: none; }
.tl-bar.folded { padding: 4px; border-radius: 12px; }
.tl-bar.folded.drawing .tl-fold { box-shadow: 0 0 0 3px var(--primary); }
.tl-bar hr { border-top-color: rgba(255,255,255,.35); }
.tl-colors { background: rgba(255,255,255,.14); }
.tl-tip { left: auto; right: 48px; background: var(--deep); }
.tl-st-in { max-width: min(1100px, calc(100% - 140px)); }
@media (max-width: 640px) { .tl-bar { right: 6px; } }

/* Giọng máy (TTS giọng Bắc) — loa có nhãn nhỏ "máy" để phân biệt audio sách */
.spk.tts { position: relative; }
.spk.tts::after { content: 'máy'; position: absolute; right: -6px; bottom: -6px; font: 700 9px/1 var(--font, sans-serif); padding: 2px 3px; border-radius: 6px; background: var(--primary); color: var(--deep); border: 1.5px solid #fff; letter-spacing: .02em; }
.fb-say { display: inline-flex; align-items: center; gap: 8px; margin: 6px 10px 0 0; font-weight: 600; }
.fb-say .spk { width: 34px; height: 34px; }

/* hai người chào nhau phải nhìn nhau (sổ lỗi N07): lật ngang ảnh sai hướng */
.gp-p.flip img { transform: scaleX(-1); }

/* Hoạt động VLS (tài liệu bổ trợ) — 2026-10-23 */
.av.ltr { display: grid; place-items: center; background: var(--deep-l); color: #fff; font-weight: 800; font-size: 18px; }
.dlg-cue { margin: 18px 0 6px; font-weight: 700; color: var(--deep); border-top: 1px dashed #d6dbe6; padding-top: 12px; }
.dlg-cue:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
.gp-pt { display: inline-flex; align-items: center; gap: 6px; margin: 6px 10px 0 0; }
.gp-pat { font-size: 13px; color: var(--deep-l); text-decoration: underline; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.g-gp { background: #fff4e5; color: #9a4b00; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.g-vls { background: var(--primary); color: var(--deep); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.bg-now { font: 800 64px/1.1 var(--head); color: var(--deep); text-align: center; padding: 18px; border: 3px dashed var(--primary); border-radius: 18px; margin: 12px 0; }
.bg-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bg-list span { padding: 4px 10px; border-radius: 8px; background: #eef1f6; font-weight: 700; }
.bg-list span.on { background: var(--green); color: #fff; text-decoration: line-through; }
.bg-print { display: none; }
.bg-card { border-collapse: collapse; margin: 8px auto; } .bg-card td { border: 2px solid #203163; width: 26mm; height: 18mm; text-align: center; font: 700 16pt sans-serif; }
.bg-sheet { break-inside: avoid; padding: 6mm 0; text-align: center; }
@media print { body.print-bingo > *:not(#app) { display: none !important; } body.print-bingo #app * { visibility: hidden; }
  body.print-bingo .bg-print, body.print-bingo .bg-print * { visibility: visible; } body.print-bingo .bg-print { display: block; position: absolute; left: 0; top: 0; width: 100%; } }

/* Nghe – đánh dấu thanh */
.tm-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; color: var(--deep); }
.tm-legend span { font-weight: 700; font-size: 20px; } .tm-legend small { font-weight: 400; font-size: 12px; color: #6b7590; }
.tm-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #eef0f5; }
.tm-row .lp-fb { grid-column: 1 / -1; }
.tm-say { margin: 0; font-size: 24px; line-height: 2; }
.tm-w { font: inherit; border: 0; border-bottom: 2px dashed #c7cfe0; background: none; padding: 0 2px; cursor: pointer; color: var(--deep); border-radius: 4px; }
.tm-w:hover { background: #f1f5e6; } .tm-w[data-t]:not([data-t="0"]) { border-bottom-color: var(--primary); }
.tm-w.right { color: var(--green); border-bottom-color: var(--green); } .tm-w.wrong { color: #c0392b; border-bottom-color: #c0392b; background: #fdecea; }
@media (max-width: 640px) { .tm-row { grid-template-columns: auto 1fr; } .tm-say { grid-column: 1 / -1; font-size: 20px; } }
/* công tắc giọng */
.seg.voice button { font-size: 13px; }
@media (max-width: 900px) { .seg.voice { display: none; } }

.ln.para .say { font-size: 20px; line-height: 2.1; }

.seg.voice[hidden] { display: none !important; }

/* Phân loại vào nhóm */
.so-pool { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; background: var(--deep); border-radius: 14px; min-height: 56px; }
.so-pool .chipw.sel { outline: 3px solid var(--primary); transform: translateY(-2px); }
.so-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.so-col { border: 2px dashed #c7cfe0; border-radius: 14px; padding: 10px; min-height: 120px; cursor: pointer; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; background: #fff; }
.so-col:hover { border-color: var(--primary); background: #f7fbef; }
.so-col h4 { width: 100%; margin: 0 0 6px; color: var(--deep); font-size: 16px; }
.so-col .chipw.right { background: var(--green); color: #fff; } .so-col .chipw.wrong { background: #fdecea; color: #c0392b; }

/* 2026-10-24 (Nam): thanh ghim lùi dưới dải hướng dẫn · điểm ẩn mặc định · điền từ: thẻ riêng + chấm từng câu */
.bank { top: calc(72px + var(--st-h, 0px)); transition: top .2s; }
.extras { top: calc(84px + var(--st-h, 0px)); transition: top .2s; }
body:not(.show-score) .ex-foot .meter, body:not(.show-score) .it-sc { display: none !important; }
body:not(.show-score) .ex-foot-in { justify-content: flex-end; }
.fg-lines .ln.has-gaps { flex-wrap: wrap; }
.ln-bank { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ln-bank .chipw { background: #EEF2F9; color: var(--deep); font-size: 15px; padding: 6px 12px; }
.ln-bank .chipw:hover { background: var(--primary); }
.ln.done .ln-bank { display: none; }
.ln-fb { margin-top: 6px; font-size: 15px; }
.ln-fb .ln-ok { color: var(--green); font-weight: 800; font-size: 18px; }
.ln-fb .ln-no { color: #B23A36; font-weight: 700; }
.ln-fb b { color: var(--green); }
.ln.no { background: #FFF7F6; border-radius: 10px; }

/* 2026-10-25 · thu gọn câu đã đúng */
.cl-prog { position: relative; margin: 0 0 12px; padding: 8px 14px; background: #F3F6FB; border-radius: 10px; font-size: 15px; color: var(--deep); overflow: hidden; }
.cl-prog .ok { color: var(--green); font-weight: 700; }
.cl-prog i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--primary); transition: width .3s; }
.cl-collapsed { max-height: 46px !important; overflow: hidden !important; opacity: .45; position: relative; cursor: pointer; transition: max-height .35s, opacity .35s; }
.cl-collapsed::after { content: '✓ đã đúng · bấm để xem lại'; position: absolute; right: 10px; top: 10px; font-size: 13px; font-weight: 700; color: var(--green); background: #fff; padding: 2px 8px; border-radius: 999px; }
.cl-collapsed:hover { opacity: .75; }
/* bài đọc một bên */
.rd-fab { display: none; }
@media (min-width: 1000px) {
  .rd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .rd-wrap .rd-left:empty { display: none; } .rd-wrap:has(.rd-left:empty) { display: block; }
  .rd-left { position: sticky; top: calc(84px + var(--st-h, 0px)); max-height: calc(100vh - 190px - var(--st-h, 0px)); overflow: auto; border-radius: var(--radius); }
  .rd-left .rd { margin: 0; flex-direction: column; } .rd-left .rd-img { width: 140px; height: 140px; }
}
@media (max-width: 999px) {
  .rd-fab { display: inline-flex; position: fixed; right: 14px; bottom: 92px; z-index: 8; gap: 6px; align-items: center; background: var(--deep); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; box-shadow: var(--shadow); }
  .rd-wrap .rd-left { display: none; }
  .rd-wrap.show-text .rd-left { display: block; position: fixed; left: 10px; right: 10px; top: 80px; bottom: 150px; z-index: 8; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); border-radius: var(--radius); }
}
.rd-h { margin: 0 0 8px; color: var(--deep); }

@media (max-width: 999px) { .rd-wrap.show-text .rd-left { top: auto; bottom: 150px; max-height: 60vh; } }

/* Sổ từ vựng (glossary) */
.gl { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.gl-top { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--green); flex-wrap: wrap; }
.gl-top input, .gl-top select { border: 0; border-radius: 10px; padding: 9px 12px; font-size: 16px; background: #fff; color: var(--deep); }
.gl-q { flex: 1; min-width: 160px; }
.gl-wide { margin-left: auto; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; border-radius: 10px; width: 40px; height: 40px; cursor: pointer; }
.gl-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 460px; }
.gl.wide .gl-body { grid-template-columns: 0 minmax(0, 1fr); } .gl.wide .gl-side { display: none; }
.gl-side { background: #DDF3EA; display: flex; flex-direction: column; padding: 10px; gap: 10px; }
.gl-list { flex: 1; overflow: auto; max-height: 470px; display: flex; flex-direction: column; gap: 6px; }
.gl-it { display: flex; align-items: center; gap: 8px; text-align: left; border: 2px solid transparent; background: #fff; border-radius: 10px; padding: 9px 10px; font-size: 17px; cursor: pointer; color: var(--deep); }
.gl-it.on { border-color: var(--green); } .gl-it small { color: var(--muted); } .gl-eye { width: 18px; text-align: center; color: var(--green); }
.gl-card { padding: 20px 26px; position: relative; }
.gl-head { display: flex; gap: 26px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.gl-pic img, .gl-big { width: 240px; height: 180px; object-fit: cover; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.12); display: grid; place-items: center; }
.gl-big { font: 800 80px/1 var(--head); color: var(--deep); background: #F3F6FB; }
.gl-main { flex: 1; text-align: center; }
.gl-w { display: flex; align-items: center; justify-content: center; gap: 14px; }
.gl-word { font: 800 46px/1.1 var(--head); color: var(--orange, #E8890C); cursor: pointer; }
.gl-pos { font-size: 22px; color: var(--muted); }
.gl-ipa { font-size: 22px; color: var(--muted); margin-top: 6px; }
.gl-en { font-size: 26px; font-weight: 700; color: var(--deep); margin-top: 12px; cursor: pointer; }
.gl .hide { color: transparent !important; background: repeating-linear-gradient(45deg, #EEF1F6, #EEF1F6 8px, #F7F9FC 8px, #F7F9FC 16px); border-radius: 8px; min-width: 120px; display: inline-block; }
.gl-sec h4 { margin: 16px 0 8px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.gl-tr { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 13px; } .gl-tr.on { background: var(--primary); }
.gl-ex { list-style: none; margin: 0; padding: 12px 16px; background: #FFF9EC; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
.gl-ex li { display: flex; gap: 10px; align-items: center; font-size: 19px; } .gl-ex .spk { width: 34px; height: 34px; flex: none; }
.gl-exen { display: block; font-size: 14px; color: var(--muted); } .gl-exen.hide { display: none; }
.gl-nav { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); }
.gl-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 26px; cursor: pointer; } .gl-nav button:disabled { opacity: .3; }
.gl-bar { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 12px 16px; background: #DDF3EA; }
.gl-chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--deep); cursor: pointer; } .gl-chk input { width: 20px; height: 20px; accent-color: var(--green); }
@media (max-width: 760px) { .gl-body { grid-template-columns: 1fr; } .gl-side { max-height: 200px; } .gl-head { flex-direction: column; } .gl-word { font-size: 38px; } }

/* Ghi chú giáo viên (notes.js) */
.nt-pane { position: fixed; right: 72px; top: 76px; z-index: 75; width: min(380px, calc(100vw - 90px)); max-height: calc(100vh - 96px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(32,49,99,.28); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.nt-pane[hidden], .nt-book-wrap[hidden] { display: none; }
.nt-head { display: flex; align-items: center; justify-content: space-between; color: var(--deep); font-size: 17px; }
.nt-x { border: 0; background: #EEF1F6; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.nt-where { background: #DDF3EA; border-radius: 10px; padding: 8px 10px; font-size: 14px; color: var(--deep); } .nt-where span { color: var(--muted); }
.nt-in { width: 100%; box-sizing: border-box; border: 2px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; resize: vertical; }
.nt-in:focus { outline: 0; border-color: var(--green); }
.nt-row { display: flex; align-items: center; justify-content: space-between; } .nt-hint { font-size: 12px; color: var(--muted); }
.nt-save { border: 0; background: var(--green); color: #fff; font-weight: 700; border-radius: 10px; padding: 9px 16px; cursor: pointer; font-size: 15px; }
.nt-old h4, .nt-all h4 { margin: 8px 0 6px; font-size: 14px; color: var(--muted); }
.nt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nt-list li { background: #FFF9EC; border-radius: 10px; padding: 8px 10px; }
.nt-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.nt-meta .nt-ex { color: var(--green); font-weight: 600; }
.nt-meta button { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.nt-meta button:hover { color: #E53935; }
.nt-text { white-space: pre-wrap; font-size: 15px; color: var(--deep); margin-top: 3px; }
.nt-empty { color: var(--muted); font-size: 14px; margin: 4px 0; }
.nt-book { border: 2px solid var(--green); background: #fff; color: var(--green); font-weight: 700; border-radius: 10px; padding: 8px; cursor: pointer; }
.nt-book-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(20,28,50,.45); display: grid; place-items: center; padding: 16px; }
.nt-sheet { background: #fff; border-radius: 16px; width: min(820px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px; box-sizing: border-box; }
.nt-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.nt-tools select, .nt-tools input { border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.nt-tools input { flex: 1; min-width: 160px; }
.nt-tools button { border: 0; background: #EEF1F6; border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--deep); }
.nt-warn { font-size: 13px; color: #9A6A00; background: #FFF4D6; border-radius: 8px; padding: 6px 10px; margin: 0 0 6px; }
@media (max-width: 640px) { .nt-pane { right: 8px; left: 8px; width: auto; top: auto; bottom: 8px; max-height: 70vh; } }
@media print {
  body.nt-printing > *:not(.nt-book-wrap) { display: none !important; }
  body.nt-printing .nt-book-wrap { position: static; background: none; display: block; padding: 0; }
  body.nt-printing .nt-sheet { max-height: none; overflow: visible; box-shadow: none; width: 100%; }
  body.nt-printing .nt-tools, body.nt-printing .nt-warn, body.nt-printing .nt-x, body.nt-printing .nt-meta button { display: none !important; }
}
.nt-list li { position: relative; padding-right: 30px; }
.nt-meta button { position: absolute; right: 6px; top: 6px; margin: 0; }
/* freeTalk: tô từ xưng hô (xh) */
.ft-script .xh { font-weight: 800; padding: 0 2px; border-radius: 4px; }
.ft-script .xh-you { color: #1E63D6; background: #E8F0FE; }
.ft-script .xh-me { color: #C25E00; background: #FFF1DE; }
.xh-key { font-size: 14px; color: var(--muted); margin: 10px 0 0; } .xh-key .xh { font-weight: 800; padding: 0 4px; border-radius: 4px; }
.xh-key .xh-you { color: #1E63D6; background: #E8F0FE; } .xh-key .xh-me { color: #C25E00; background: #FFF1DE; }
.xh-key .en { display: block; }

/* Nhìn hình – nói câu (scramble có hình + từ khoá, speakFirst) */
.sc-pic { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.sc-img { position: relative; display: inline-block; }
.sc-img img { width: 180px; height: 130px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.sc-mark { position: absolute; left: -8px; bottom: -8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.sc-mark.y { background: #2F9E5B; } .sc-mark.n { background: #E53935; }
.sc-cue { font-size: 22px; font-weight: 700; color: var(--deep); background: #FFF4D6; border-radius: 10px; padding: 8px 14px; }
.sc-say .sc-row:not(.open) .sc-out, .sc-say .sc-row:not(.open) .sc-bank, .sc-say .sc-row:not(.open) .sc-ctl { display: none; }
.sc-say .sc-row.open .sc-go { display: none; }
@media (max-width: 600px) { .sc-img img { width: 140px; height: 100px; } .sc-cue { font-size: 18px; } }

/* trắc nghiệm chọn hình (q.imgs) */
.opt.opt-img { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; }
.opt.opt-img img { width: 100%; max-width: 220px; height: 140px; object-fit: contain; background: #fff; border-radius: 8px; }
.opt.opt-img span { font-weight: 700; }

/* Trò chơi theo PHẦN của bài + handout in được (handout.js) */
.g-part { margin: 18px 0 8px; } .g-part[hidden] { display: none; }
.g-ph { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; padding: 8px 12px; border-left: 5px solid var(--green); background: #EEF7F2; border-radius: 8px; color: var(--deep); font-size: 18px; }
.g-ph .en { font-size: 13px; color: var(--muted); font-weight: 500; } .g-ph small { flex-basis: 100%; font-size: 13px; color: var(--muted); font-weight: 500; }
.g-part[data-part="warm"] .g-ph { border-color: #E8833A; background: #FFF3E8; } .g-part[data-part="vocab"] .g-ph { border-color: #2F9E5B; }
.g-part[data-part="qa"] .g-ph { border-color: #1E63D6; background: #EEF3FD; } .g-part[data-part="grammar"] .g-ph { border-color: #7B4FC9; background: #F4EFFC; } .g-part[data-part="end"] .g-ph { border-color: #6B7280; background: #F3F4F6; }
.g-card.rich .g-use b { color: var(--deep); }
.g-szs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; } .g-sz { font-size: 12px; padding: 2px 7px; border-radius: 6px; background: #F3F4F6; color: #9CA3AF; } .g-sz.ok { background: #E7F6EE; color: #1E7B4A; font-weight: 700; }
.gm.ho { background: #FFF4D6; color: #9A6A00; }
.ho-box .ho-prev { margin-top: 12px; max-height: 720px; overflow: auto; background: #E5E7EB; padding: 12px; border-radius: 10px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ho-page { width: 100%; max-width: 760px; aspect-ratio: 210 / 297; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); padding: 22px 24px; box-sizing: border-box; overflow: hidden; color: #111; font-family: var(--body, Arial, sans-serif); }
.ho-h { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid #1F5E5B; padding-bottom: 6px; margin-bottom: 12px; } .ho-h b { font-size: 17px; } .ho-h span { font-size: 12px; color: #555; } .ho-h i { margin-left: auto; font-size: 11px; color: #888; }
.ho-grid { display: grid; gap: 0; } .ho-grid.c2 { grid-template-columns: 1fr 1fr; } .ho-grid.c3 { grid-template-columns: 1fr 1fr 1fr; } .ho-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.ho-card, .ho-fold { border: 1px dashed #999; padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; box-sizing: border-box; }
.ho-card img { max-width: 100%; max-height: 110px; object-fit: contain; } .ho-card b { font-size: 16px; } .ho-card small { font-size: 12px; color: #444; }
.ho-fold { padding: 0; min-height: 200px; justify-content: stretch; } .ho-f1, .ho-f2 { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px; box-sizing: border-box; text-align: center; }
.ho-f1 { border-bottom: 1px dotted #444; } .ho-f1 img { max-height: 80px; max-width: 90%; object-fit: contain; } .ho-f1 span { font-weight: 700; font-size: 15px; }
.ho-f2 span { transform: rotate(180deg); font-size: 13px; line-height: 1.35; }
.ho-task { font-size: 14px; margin: 0 0 10px; } .ho-note { font-size: 12px; color: #555; margin-top: 8px; }
.ho-tb { width: 100%; border-collapse: collapse; font-size: 14px; } .ho-tb th, .ho-tb td { border: 1px solid #555; padding: 7px 8px; text-align: left; vertical-align: top; } .ho-tb th { background: #EEF7F2; }
.ho-tb.find td { height: 46px; } .ho-blank { display: inline-block; min-width: 90px; border-bottom: 1px solid #333; height: 14px; }
.ho-bingo { display: grid; gap: 0; border: 2px solid #1F5E5B; margin: 0 auto 14px; width: 82%; position: relative; } .ho-bingo.c3 { grid-template-columns: repeat(3, 1fr); } .ho-bingo.c4 { grid-template-columns: repeat(4, 1fr); }
.ho-bingo div { border: 1px solid #888; aspect-ratio: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; text-align: center; } .ho-bingo img { max-height: 62%; max-width: 90%; object-fit: contain; } .ho-bingo b { font-size: 13px; }
.ho-bn { position: absolute; left: -26px; top: 0; font-weight: 800; color: #1F5E5B; }
.ho-page.signs { display: flex; flex-direction: column; padding: 0; } .ho-sign { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px dashed #999; text-align: center; padding: 10px; }
.ho-sign b { font-size: 64px; color: #1F5E5B; line-height: 1.1; } .ho-sign span { font-size: 20px; color: #444; margin-top: 8px; }
.ho-sheet { padding-left: 22px; font-size: 15px; } .ho-sheet li { margin-bottom: 10px; } .ho-line { display: block; border-bottom: 1px solid #888; height: 26px; }
@media print {
  @page { size: A4; margin: 8mm; }
  body.print-ho * { visibility: hidden; }
  body.print-ho .ho-prev, body.print-ho .ho-prev * { visibility: visible; }
  body.print-ho .ho-prev { position: absolute; left: 0; top: 0; width: 100%; max-height: none; overflow: visible; background: none; padding: 0; display: block; }
  body.print-ho .ho-page { max-width: none; width: 100%; height: 279mm; aspect-ratio: auto; box-shadow: none; page-break-after: always; break-after: page; padding: 6mm; }
  body.print-ho .tl-bar, body.print-ho .topbar, body.print-ho .tl-sticky { display: none !important; }
}

/* Phiếu hướng dẫn trò chơi (guidePage) */
.gd-acts { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.gd-sheet { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.gd-top { display: flex; justify-content: space-between; border-bottom: 2px solid var(--green); padding-bottom: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); } .gd-top b { color: var(--green); }
.gd-info { width: 100%; border-collapse: collapse; font-size: 16px; margin-bottom: 8px; } .gd-info th { text-align: left; width: 180px; vertical-align: top; padding: 5px 10px 5px 0; color: var(--deep); font-style: italic; font-weight: 600; } .gd-info td { padding: 5px 0; }
.gd-h { margin: 20px 0 10px; color: var(--deep); font-size: 20px; } .gd-h small { color: var(--muted); font-weight: 500; font-size: 14px; }
.gd-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.gd-step { display: grid; grid-template-columns: 78px 1fr; gap: 12px; align-items: start; font-size: 17px; line-height: 1.5; }
.gd-n { font-weight: 800; color: var(--green); padding-top: 2px; }
.gd-who { display: inline-block; font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #E8F0FE; color: #1E63D6; } .gd-who.w-HV { background: #FFF1DE; color: #C25E00; } .gd-who.w-GVHV { background: #E7F6EE; color: #1E7B4A; }
.gd-say, .gd-reply { margin: 6px 0 0 0; padding: 6px 10px; border-radius: 8px; font-size: 16px; } .gd-say { background: #EEF3FD; } .gd-reply { background: #FFF6EA; }
.gd-img { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; } .gd-img img { max-height: 120px; max-width: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; object-fit: contain; }
.gd-body q { font-weight: 600; color: var(--deep); }
.gd-end { margin: 14px 0 0; font-size: 16px; } .gd-diff { margin-top: 14px; padding: 10px 14px; background: #F4F6FA; border-radius: 10px; } .gd-diff h4 { margin: 0 0 6px; color: var(--deep); } .gd-diff ul { margin: 0; padding-left: 20px; }
.gd-tips summary { cursor: pointer; font-weight: 700; color: var(--deep); } .gd-tips h4 { margin: 12px 0 4px; }
@media (max-width: 600px) { .gd-step { grid-template-columns: 1fr; gap: 2px; } .gd-info th { width: 120px; } .gd-sheet { padding: 16px; } }
@media print {
  body.print-gd * { visibility: hidden; }
  body.print-gd .gd-sheet, body.print-gd .gd-sheet * { visibility: visible; }
  body.print-gd .gd-sheet { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; }
  body.print-gd .gd-step { break-inside: avoid; }
}
.g-used { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; } .g-used a { color: var(--deep); }
/* Công cụ chơi trên màn hình (screen-tools.js) */
.st { background: #fff; border-radius: 12px; padding: 14px; } .st:fullscreen { overflow: auto; padding: 30px; }
.st-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; } .st-fs { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.st-ctl { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.st-wh { position: relative; width: min(460px, 100%); margin: 0 auto; } .st-wh canvas { width: 100%; height: auto; display: block; }
.st-ptr { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 34px; color: #D9485F; }
.st-spin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--deep); color: #fff; font-weight: 800; cursor: pointer; }
.st-res { text-align: center; margin-top: 12px; font-size: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; } .st-res img { max-height: 140px; } .st-res span { font-size: 16px; color: var(--muted); }
.st-rv { position: relative; width: min(640px, 100%); margin: 0 auto; aspect-ratio: 4 / 3; } .st-rv-img { position: absolute; inset: 0; background: center / contain no-repeat #fff; border-radius: 10px; }
.st-rv-grid { position: absolute; inset: 0; display: grid; gap: 4px; grid-template-columns: repeat(3, 1fr); } .st-tile { border: 0; color: #fff; font-size: 40px; font-weight: 800; border-radius: 8px; cursor: pointer; transition: opacity .4s; } .st-tile.open { opacity: 0; pointer-events: none; }
.st-modal { position: absolute; inset: 0; background: rgba(20,28,50,.55); display: grid; place-items: center; z-index: 5; border-radius: 12px; } .st { position: relative; }
.st-mbox { background: #fff; border-radius: 14px; padding: 20px 24px; max-width: 560px; width: 92%; text-align: center; } .st-mbox img { max-height: 160px; max-width: 100%; } .st-mbox img.big { max-height: 320px; }
.st-q { font-size: 22px; font-weight: 700; color: var(--deep); } .st-mbtn { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; } .st-clock { font-size: 34px; font-weight: 800; color: #D9485F; }
.st-teams { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 10px; } .st-team { border: 3px solid; border-radius: 10px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; }
.st-team input { width: 90px; border: 0; font-weight: 700; } .st-team b { font-size: 26px; min-width: 40px; text-align: center; } .st-team button { border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.st-bd { display: grid; gap: 6px; } .st-cat { background: var(--deep); color: #fff; text-align: center; padding: 8px 4px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.st-cell { border: 0; background: #1E63D6; color: #FFD34D; font-size: 28px; font-weight: 800; border-radius: 8px; padding: 18px 0; cursor: pointer; } .st-cell.done { background: #E5E7EB; cursor: default; }
.st-big { font-size: 72px; font-weight: 800; text-align: center; color: var(--deep); }

/* Đường đi trò chơi của bài (tái thiết kế 2026-10-28) */
.g-path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 10px 0 14px; counter-reset: st; }
.g-step { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 12px; text-decoration: none; color: var(--deep); border-top: 5px solid var(--green); }
.g-step[hidden] { display: none; }
.g-step:not(:last-child)::after { content: '➜'; position: absolute; right: -14px; top: 40%; color: var(--muted); font-size: 18px; z-index: 1; }
.g-step .g-st { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.g-step img { width: 100%; height: 90px; object-fit: contain; background: #F7F9FC; border-radius: 8px; } .g-ico { font-size: 46px; text-align: center; background: #F7F9FC; border-radius: 8px; padding: 10px 0; }
.g-step b { font-size: 16px; line-height: 1.3; } .g-step small { font-size: 13px; color: #4B5563; line-height: 1.4; flex: 1; }
.g-step .g-meta { display: flex; flex-wrap: wrap; gap: 4px; } .gm.scr { background: #E8F0FE; color: #1E63D6; }
.g-step:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(32,49,99,.18); }
.g-step:nth-child(1) { border-color: #E8833A; } .g-step:nth-child(2) { border-color: #2F9E5B; } .g-step:nth-child(3) { border-color: #1E63D6; } .g-step:nth-child(4) { border-color: #7B4FC9; } .g-step:nth-child(5) { border-color: #D9485F; }
.g-more { margin: 8px 0 14px; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); } .g-more summary { cursor: pointer; font-weight: 700; color: var(--deep); }
.gd-sum { font-size: 18px; background: #FFF9EC; border-radius: 10px; padding: 10px 14px; margin: 4px 0 10px; color: var(--deep); }
.gd-wrap { margin: 14px 0; } .gd-wrap > summary { cursor: pointer; font-weight: 700; color: var(--deep); background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); } .gd-wrap[open] > summary { margin-bottom: 10px; }
.st-float { position: fixed; right: 72px; bottom: 16px; z-index: 80; width: min(420px, calc(100vw - 90px)); max-height: calc(100vh - 100px); overflow: auto; box-shadow: 0 10px 30px rgba(32,49,99,.3); border-radius: 14px; background: #fff; }
.st-float[hidden] { display: none; } .st-float .st-x { position: absolute; right: 8px; top: 8px; border: 0; background: #EEF1F6; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; z-index: 2; }
@media (max-width: 900px) { .g-path { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-step::after { display: none; } }
@media (max-width: 520px) { .g-path { grid-template-columns: 1fr; } }
/* Công cụ đợt 2: Taboo · Đặt cược · Triệu phú · 3 gợi ý */
.st-tb-bar { display: flex; justify-content: center; gap: 24px; font-size: 20px; align-items: center; }
.st-tb-card, .st-bt-card, .st-cl-card { text-align: center; background: #F7F9FC; border-radius: 12px; padding: 18px; margin: 10px auto; max-width: 640px; min-height: 140px; }
.st-tb-card b { display: block; font-size: 40px; color: var(--deep); } .st-tb-card img { max-height: 120px; }
.st-ban { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; } .st-ban span { background: #FDE8EA; color: #B42335; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 18px; }
.st-bt-fix { margin-top: 10px; font-size: 18px; font-weight: 700; color: var(--deep); }
.st-bt-teams { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin: 0 auto; } .st-bt-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; } .st-bt-row .chipw.on { background: var(--deep); color: #fff; }
.st-ml { display: grid; grid-template-columns: 1fr 190px; gap: 14px; } .st-ml-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.st-ml-o { text-align: left; border: 2px solid #1F3A8A; background: #0E1E4F; color: #fff; border-radius: 24px; padding: 12px 16px; font-size: 17px; cursor: pointer; } .st-ml-o b { color: #FFC83D; margin-right: 6px; }
.st-ml-o.pick { background: #C98A00; } .st-ml-o.right { background: #1E7B4A; } .st-ml-o.wrong { background: #B42335; }
.st-ml-ladder { list-style: none; margin: 0; padding: 8px; background: #0E1E4F; border-radius: 12px; color: #C7D2FE; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.st-ml-ladder li { padding: 3px 8px; border-radius: 6px; } .st-ml-ladder li.safe { color: #fff; font-weight: 800; } .st-ml-ladder li.won { color: #86EFAC; } .st-ml-ladder li.cur { background: #FFC83D; color: #0E1E4F; font-weight: 800; }
.st-cl-list { text-align: left; font-size: 19px; display: flex; flex-direction: column; gap: 8px; } .st-cl-ans { margin-top: 12px; } .st-cl-ans b { font-size: 34px; color: #1E7B4A; display: block; } .st-cl-ans img { max-height: 120px; }
@media (max-width: 700px) { .st-ml { grid-template-columns: 1fr; } .st-ml-opts { grid-template-columns: 1fr; } }
.gm.oral { background: #EEF7F2; color: #1E7B4A; }

/* bảng trắng: ô gõ nhiều màu (contenteditable) */
.wb-text { white-space: pre; outline: none; line-height: 1.25; cursor: text; }
.wb-text:empty::before { content: attr(data-ph); color: #9AA6B8; font-size: 15px; font-weight: 400; }

/* cờ ca-rô hỏi – đáp */
.st-tt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; margin: 12px auto; }
.st-tt-c { aspect-ratio: 1; border: 2px solid #C9D3E6; border-radius: 12px; background: #F4F7FC; font-size: 44px; font-weight: 800; color: var(--deep); cursor: pointer; display: grid; place-items: center; }
.st-tt-c span { font-size: 30px; color: #7A8AA8; } .st-tt-c:hover:not(:disabled) { background: #E6EEFB; border-color: #2F6FED; }
.st-tt-c.mX { background: #FDECEC; border-color: #E5A0A0; } .st-tt-c.mO { background: #E8F4EE; border-color: #8FC9A8; } .st-tt-c.win { box-shadow: 0 0 0 4px #F2C94C; }
.st-tt-c:disabled { cursor: default; } .st-tt-team { padding: 2px 10px; border-radius: 99px; } .st-tt-team.on { background: #FFF4CC; font-weight: 700; }
.st:fullscreen .st-tt-grid { max-width: 70vh; }

/* trang Nội dung chờ duyệt (#/duyet) */
.dv-sum { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.dv-pill { background: #EEF2F8; border-radius: 99px; padding: 4px 12px; font-size: 14px; } .dv-pill.ok { background: #E3F4EA; } .dv-pill.fix { background: #FFF1D6; }
.dv-bar { flex: 1 1 160px; height: 8px; background: #E6EBF3; border-radius: 99px; overflow: hidden; } .dv-bar i { display: block; height: 100%; background: #2F9E5B; }
.dv-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.dv-filter span { color: #6B7A94; margin-left: 6px; } .dv-filter button { border: 1px solid #C9D3E6; background: #fff; border-radius: 99px; padding: 3px 12px; cursor: pointer; } .dv-filter button.on { background: var(--deep, #1F3A6E); color: #fff; border-color: transparent; }
.dv-h { margin-top: 22px; }
.dv-item { border: 1px solid #DCE3EE; border-left: 5px solid #C9D3E6; border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: #fff; }
.dv-item.ok { border-left-color: #2F9E5B; background: #F7FCF9; } .dv-item.fix { border-left-color: #E8A33A; background: #FFFBF2; }
.dv-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .dv-top a { font-weight: 700; color: var(--deep, #1F3A6E); text-decoration: none; }
.dv-btns button { border: 1px solid #C9D3E6; background: #fff; border-radius: 8px; padding: 4px 10px; margin-left: 4px; cursor: pointer; font-size: 14px; }
.dv-btns [data-s="ok"].on { background: #2F9E5B; color: #fff; border-color: #2F9E5B; } .dv-btns [data-s="fix"].on { background: #E8A33A; color: #fff; border-color: #E8A33A; }
.dv-body summary, .dv-g summary { cursor: pointer; color: #6B7A94; font-size: 14px; margin-top: 4px; }
.dv-body h4 { margin: 10px 0 4px; font-size: 14px; color: #6B7A94; }
.dv-l { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.55; } .dv-l ul { padding-left: 18px; }
.dv-cols { columns: 2 280px; } .dv-a { color: #2F7D5B; } .dv-op { color: #6B7A94; } .dv-op b { color: #2F7D5B; }
.dv-ok { color: #2F9E5B; font-weight: 700; font-size: 12px; } .dv-no { color: #D9485F; font-weight: 700; font-size: 12px; }
.dv-note { width: 100%; margin-top: 8px; border: 1px solid #E8A33A; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 15px; resize: vertical; }
.dv-exh { margin: 4px 0 0; font-size: 13px; }
@media print { .dv-filter, .dv-btns, .dv-sum button { display: none !important; } .dv-item { break-inside: avoid; } }

/* loa không có audio (sách chưa có file) → ẩn, tránh nút bấm không ra tiếng (Connect 2 Bài 1, 2026-10-28) */
.spk[data-src=""] { display: none !important; }

/* hình minh hoạ đầu bài hội thoại / điền từ (ex.img) */
.ex-img { display: block; max-width: min(100%, 460px); max-height: 260px; margin: 0 auto 12px; border-radius: 10px; object-fit: contain; }

/* audio cả đoạn cho bài "Nghe và điền" (fillGaps ex.audio) */
.ex-audio { display: block; width: min(100%, 520px); margin: 0 auto 12px; }

/* CHIA VAI (2026-10-29): công cụ đứng lớp chỉ hiện ở chế độ Giáo viên */
body:not(.teacher) .tl-bar [data-act="notes"], body:not(.teacher) .tl-bar [data-act="timer"], body:not(.teacher) .st-float, body:not(.teacher) .gv-only { display: none !important; }
.gv-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #FFF1D6; color: #8A5A00; font-size: 12px; font-weight: 600; vertical-align: middle; }

/* ===== TÁI THIẾT KẾ 2026-10-29: tab trang bài · biểu tượng thay emoji · chế độ GV · vùng bấm 44px ===== */
.utabs { display: flex; gap: 6px; margin: 4px 0 18px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.utab { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border: 2px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0;
  color: var(--deep-l); font-weight: 700; text-decoration: none; white-space: nowrap; margin-bottom: -2px; }
.utab .en { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.utab:hover { background: var(--soft-b); }
.utab[aria-selected="true"] { background: var(--white); color: var(--deep); border-color: var(--line); border-bottom: 2px solid var(--white); }
.utab.gv { color: #8A5A00; } .utab.gv[aria-selected="true"] { box-shadow: inset 0 3px 0 var(--orange); }
.utab:focus-visible, .tc-card:focus-visible, .pg-todo a:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.g-ico .ic { width: 40px; height: 40px; color: var(--deep-l); } .ic-star { width: 18px; height: 18px; color: #E8A33A; fill: #F7C948; margin-right: 4px; vertical-align: -3px; }
.gm .ic, .gd-sum .ic, .g-more summary .ic, .gd-wrap summary .ic, .gd-tips summary .ic { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.gd-acts .btn { flex-direction: row; gap: 6px; }
/* tab Tiến độ */
.pg-sum { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-big { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 22px; min-width: 150px; }
.pg-big b { display: block; font-size: 34px; color: var(--deep); } .pg-big span { color: var(--muted); font-size: 14px; }
.pg-list, .pg-todo { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.pg-row { display: grid; grid-template-columns: 24px 1fr minmax(80px, 34%) 60px; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.pg-row b { text-align: right; color: var(--deep); } .pg-bar { height: 10px; background: var(--soft-b); border-radius: 99px; overflow: hidden; } .pg-bar i { display: block; height: 100%; background: var(--green); }
.pg-h { margin: 18px 0 8px; color: var(--deep); } .pg-h .en { font-size: 13px; color: var(--muted); margin-left: 8px; font-weight: 500; }
.pg-todo a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--deep); text-decoration: none; }
.pg-todo a span { flex: 1; } .pg-todo a:hover { border-color: var(--deep-l); } .pg-note { font-size: 13px; }
/* tab Giảng dạy */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tc-card { display: flex; gap: 12px; align-items: flex-start; min-height: 72px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: 12px; color: var(--deep); text-decoration: none; }
.tc-card:hover { box-shadow: var(--shadow); } .tc-card b { display: block; } .tc-card .en { display: block; font-size: 12px; color: var(--muted); } .tc-card small { display: block; color: var(--muted); margin-top: 2px; }
/* chế độ giáo viên: luôn biết mình đang ở đâu */
body.teacher .topbar { box-shadow: inset 0 -4px 0 var(--orange); }
body.teacher .controls::before { content: 'Chế độ giáo viên'; align-self: center; padding: 4px 12px; border-radius: 99px; background: #FFF1D6; color: #8A5A00; font-size: 13px; font-weight: 700; white-space: nowrap; }
/* vùng bấm tối thiểu 44px */
.seg button, .g-sizes .chipw, .g-tabs .chipw, .dv-filter button, .dv-btns button, .toggle { min-height: 44px; }
@media (max-width: 640px) { body.teacher .controls::before { content: 'GV'; } .utab { padding: 8px 12px; } .utab .en { display: none; } .pg-row { grid-template-columns: 24px 1fr 52px; } .pg-row .pg-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== SỔ TAY NGỮ PHÁP GV (2026-10-29) ===== */
.gvg-bg { position: fixed; inset: 0; background: rgba(20, 28, 50, .35); z-index: 90; }
.gvg-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--white); z-index: 91; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(20,28,50,.18); animation: gvgIn .22s ease-out; }
@keyframes gvgIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gvg-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FFF6E6; }
.gvg-bar span { flex: 1; font-weight: 700; color: #8A5A00; }
.gvg-x { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 20px; color: var(--deep); } .gvg-x:hover { background: var(--soft-b); }
.gvg-body { overflow-y: auto; padding: 16px 20px 28px; line-height: 1.55; } .gvg-body.solo { max-width: 760px; }
.gvg-head h2 { margin: 2px 0; color: var(--deep); font-size: 22px; } .gvg-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.gvg-body section { margin-top: 16px; } .gvg-body h3 { font-size: 15px; color: var(--deep-l); margin: 0 0 6px; text-transform: none; }
.gvg-body code { background: #EEF2F8; padding: 2px 8px; border-radius: 6px; font-size: 15px; }
.gvg-err { border-left: 4px solid var(--line); padding: 6px 12px; margin: 6px 0; background: #FAFBFD; border-radius: 0 8px 8px 0; }
.gvg-err .bad { color: #B3261E; margin: 0; } .gvg-err .good { color: var(--green); margin: 2px 0 0; font-weight: 600; } .gvg-err .why { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.gvg-tbl { width: 100%; border-collapse: collapse; font-size: 15px; } .gvg-tbl th, .gvg-tbl td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; } .gvg-tbl th { width: 42%; color: var(--deep); font-weight: 600; }
.gvg-cmp { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; } .gvg-cmp div { display: flex; gap: 8px; flex-wrap: wrap; } .gvg-cmp div span { background: var(--soft-b); border-radius: 6px; padding: 2px 8px; font-weight: 600; color: var(--deep); } .gvg-cmp p { margin: 6px 0 0; font-size: 15px; }
.gvg-note { border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: var(--white); } .gvg-note p { margin: 4px 0 8px; font-size: 15px; }
.gvg-cat { display: inline-block; font-size: 12px; font-weight: 700; color: #8A5A00; background: #FFF1D6; border-radius: 99px; padding: 1px 8px; margin-right: 6px; }
.gvg-by { margin-top: 18px; font-size: 13px; color: var(--muted); } .gvg-empty { background: #FAFBFD; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; }
.gvg-btn { flex-direction: row; gap: 6px; margin-top: 8px; border-color: var(--orange); color: #8A5A00; }
.tc-g { display: flex; gap: 8px; align-items: center; } .tc-g a { flex: 1; } .tc-g .btn { flex-direction: row; gap: 6px; white-space: nowrap; }
.gvg-book summary { cursor: pointer; font-weight: 700; color: var(--deep); font-size: 18px; } .gvg-book summary small { color: var(--muted); font-weight: 500; margin-left: 8px; }
.gvg-unit h4 { margin: 12px 0 4px; color: var(--deep-l); } .gvg-unit ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gvg-pt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); color: var(--deep); font-size: 15px; }
.gvg-pt .dot { width: 9px; height: 9px; border-radius: 50%; background: #C9D3E6; } .gvg-pt.has .dot { background: var(--green); } .gvg-pt:hover { border-color: var(--deep-l); }
.gvg-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .gvg-filter button { min-height: 40px; border: 1px solid var(--line); background: var(--white); border-radius: 99px; padding: 4px 14px; } .gvg-filter button.on { background: var(--deep); color: #fff; border-color: transparent; }
.gvg-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; } .gvg-rel { font-size: 13px; margin: -4px 0 6px 4px; color: var(--muted); }
.link { border: 0; background: none; color: var(--teal); text-decoration: underline; padding: 0; font: inherit; cursor: pointer; }
body.gvg-open { overflow: hidden; }
@media print { .gvg-wrap { display: none !important; } }

/* ===== TRANG LÝ THUYẾT (lesson) — mục Phát âm (2026-10-29) ===== */
.ls-b { margin: 0 0 22px; } .ls-b h3 { color: var(--deep); margin: 0 0 8px; font-size: 19px; }
.ls-b p { margin: 6px 0; line-height: 1.6; font-size: 17px; }
.ls-au { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 10px; }
.ls-tw { overflow-x: auto; } .ls-t { border-collapse: collapse; min-width: 100%; font-size: 17px; }
.ls-t th, .ls-t td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.ls-t tr:first-child th { background: var(--soft-b); color: var(--deep); }
.ls-t td b { color: var(--deep); }

/* hình minh hoạ từng dòng (fillGaps / dictation — sách Phát âm, 2026-10-29) */
.ln.para.has-img { display: flex; gap: 14px; align-items: center; }
.ln-img { width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto; background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 4px; }
.dc-row .ln-img { width: 72px; height: 72px; }

/* ===== LUYỆN SÂU NGUYÊN ÂM (gộp từ web phát âm riêng, 2026-10-29) — mọi quy tắc nằm trong khung .pvx ===== */
.pvx .f1 {background: #FFF1D6; color: #8A5A00;}
.pvx .f2 {background: #FDE3E2; color: #A23431;}
.pvx .mis {list-style: none; padding: 0; margin: 0; display: grid; gap: 8px;}
.pvx .mis li {display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--white); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow);}
.pvx .mis-p {font-size: 20px; color: var(--deep); min-width: 70px;}
.pvx .mis li .btn {margin-left: auto;}
.pvx .num {flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--deep); color: var(--white); font-size: 14px; font-weight: 700;}
.pvx .bar-act {display: flex; gap: 10px; margin-top: 16px;}
.pvx .spk.none {background: #C3C8D2; cursor: not-allowed;}
.pvx .gv-say {font-weight: 700; padding-right: 6px;}
.pvx .noaudio {background: #FFF6E5; border: 1px dashed #E8B65A; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 0 0 14px;}
.pvx .fb.near {background: #FFF1D6; color: #8A5A00;}
.pvx .fb .heard {font-size: 1.15em;}
.pvx .hints {margin: 8px 0; padding-left: 20px;}
.pvx .vc-list {display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;}
.pvx .vcard {background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px;}
.pvx .vc-head {display: flex; align-items: center; gap: 10px; flex-wrap: wrap;}
.pvx .vc-ch {font-family: var(--head); font-size: 46px; font-weight: 700; color: var(--deep); line-height: 1;}
.pvx .vc-ipa {color: var(--muted); font-size: 18px;}
.pvx .vc-play {margin-left: auto; display: flex; align-items: center; gap: 6px;}
.pvx .vc-mouth {margin: 0; border-radius: 10px; overflow: hidden; background: var(--bg);}
.pvx .vc-mouth img {display: block; width: 100%; max-height: 300px; object-fit: cover;}
.pvx .vc-mouth figcaption {display: none;}
.pvx .vc-mouth.none {display: grid; place-items: center; height: 80px; border: 1px dashed var(--line);}
.pvx .vc-mouth.none img {display: none;}
.pvx .vc-mouth.none figcaption {display: block; color: var(--muted); font-size: 13px;}
.pvx .vc-feat {display: grid; grid-template-columns: 74px 1fr; gap: 6px 10px; margin: 0; font-size: 15px;}
.pvx .vc-feat dt {font-weight: 700; color: var(--deep);}
.pvx .vc-feat dd {margin: 0;}
.pvx .vc-words {display: flex; flex-wrap: wrap; gap: 8px;}
.pvx .vw {display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 3px 12px 3px 3px; font-size: 18px;}
.pvx .vw .gv-say {display: none;}
.pvx .pk {display: grid; gap: 12px;}
.pvx .pk-row {background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px;}
.pvx .pk-top {display: flex; align-items: center; gap: 12px; margin-bottom: 10px;}
.pvx .pk-q {margin: 0; font-size: 17px; font-weight: 600;}
.pvx .pk-row.done .opt {cursor: default;}
.pvx .pk.cols3 .opts, .pvx .cols9 .opts {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 360px;}
.pvx .chipw.snd {padding-left: 6px;}
.pvx .chipw.snd .ic {background: var(--deep); color: var(--white); border-radius: 50%; padding: 4px; width: 26px; height: 26px;}
.pvx .nos {font-size: 14px;}
.pvx .res-fb {margin-top: 6px;}
.pvx .vchart {display: grid; gap: 8px;}
.pvx .vh {display: grid; place-items: center; text-align: center; font-size: 15px; background: var(--soft-b); border-radius: 10px; padding: 8px 6px; color: var(--deep);}
.pvx .vh.rnd {background: #ECE7F7;}
.pvx .vh.row {font-size: 15px;}
.pvx .vh .en {font-size: 11px;}
.pvx .vh.corner {background: transparent; color: var(--muted); font-weight: 400;}
.pvx .vcell {min-height: 70px; background: var(--white); border: 2px dashed var(--line); border-radius: 12px; padding: 6px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; cursor: pointer;}
.pvx .vcell.rnd {background: #FAF8FE;}
.pvx .vcell:hover {border-color: var(--orange);}
.pvx .vch {font-size: 24px; font-family: var(--head);}
.pvx .dc, .pvx .sh {display: grid; gap: 10px;}
.pvx .dc-row, .pvx .sh-row {display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 14px;}
.pvx .dc-row .fbx {flex-basis: 100%;}
.pvx .sh-w {font-size: 22px; flex: 1; color: var(--deep);}
.pvx .checklist {background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; margin-top: 16px; display: grid; gap: 8px;}
.pvx .checklist h3 {font-size: 18px;}
.pvx .checklist label {display: flex; gap: 10px; align-items: flex-start; cursor: pointer;}
.pvx .checklist input {width: 20px; height: 20px; accent-color: var(--primary-d); margin-top: 2px; flex: none;}
.pvx .nt {background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 16px;}
.pvx .nt-q {margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--deep);}
.pvx .nt textarea {width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; resize: vertical;}
.pvx .rf {background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px;}
.pvx .rf h3 {font-size: 18px; margin-bottom: 10px;}
.pvx .rf .mis li {box-shadow: none; background: var(--bg);}
.pvx .rf-opts {display: flex; flex-wrap: wrap; gap: 8px;}
.pvx .rf-opts .chipw {font-size: 16px;}
@media (max-width: 720px) { .pvx .vc-list {grid-template-columns: 1fr;} .pvx .vchart {gap: 4px;} .pvx .vh {font-size: 12px; padding: 6px 2px;} .pvx .vh .en {display: none;} .pvx .vcell {min-height: 58px; padding: 3px;} .pvx .vch {font-size: 18px; padding: 4px 8px;} .pvx .vch .ic {display: none;} }

.ls-figs { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.ls-figs figure { margin: 0; width: 150px; text-align: center; }
.ls-figs img { width: 150px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.ls-figs figcaption { font-size: 15px; margin-top: 4px; }

/* lưới mê cung "tìm đường" (Phát âm Bài 8): 5 hoặc 7 cột giống sách; màn hẹp thì cuộn ngang để giữ hình mê cung */
.opts.cols5, .opts.cols7 { display: grid; gap: 6px; overflow-x: auto; }
.opts.cols5 { grid-template-columns: repeat(5, minmax(96px, 1fr)); }
.opts.cols7 { grid-template-columns: repeat(7, minmax(92px, 1fr)); }
.opts.cols5 .opt, .opts.cols7 .opt { font-size: 15px; padding: 8px 6px; min-height: 44px; }

/* trò tìm đường (Phát âm, Phụ lục 1) */
.tp-svg { width: 100%; max-width: 760px; display: block; margin: 8px auto; }
.tp-l { fill: none; stroke: #9AA6BD; stroke-width: 2; } .tp-l.on { stroke: var(--orange); stroke-width: 4; }
.tp-n { fill: var(--white); stroke: #6B7894; stroke-width: 2; } .tp-n.here { fill: var(--orange); stroke: var(--orange); }
.tp-t { font-size: 12px; text-anchor: middle; fill: var(--deep); font-weight: 700; }
.tp-leaf { font-size: 12px; text-anchor: middle; fill: var(--deep); } .tp-leaf.hit { font-weight: 800; fill: var(--orange); font-size: 14px; }
.tp-go { justify-content: center; align-items: center; } .tp-at { font-weight: 700; color: var(--deep); padding: 0 12px; }
.tp-dir { font-size: 19px; line-height: 1.6; } .tp-dirbox { background: #FFF6E6; border-radius: 10px; padding: 8px 14px; margin: 8px 0; }
.tp-give { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .tp-count { font-weight: 700; color: var(--deep); }

/* "Đố bạn" theo cặp (Phát âm) */
.pd-score { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 10px; }
.pd-score span.on { color: var(--orange); font-weight: 700; }
.pd-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.pd-word { font-size: 46px; font-weight: 800; color: var(--deep); margin: 6px 0; }

/* ---------- Tiến trình bài dạy theo CLT (2026-10-30) ---------- */
.st-feedback { background: #E8EEF9; color: #2F4A86; }
.fl-intro { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; border-left: 5px solid var(--primary); font-size: 15px; margin: 0 0 18px; }
.fl-intro .en { display: block; font-size: 12px; margin-top: 2px; }
.fl-part { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.fl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; padding: 14px 20px; font-size: 19px; background: var(--soft-b); color: var(--deep); }
.fl-h .en { font-size: 12px; font-weight: 400; }
.fl-h small { font-size: 13px; font-weight: 600; color: var(--muted); }
.fl-items { display: block; }
.fl-gv { border: 1px dashed #B9C3D6; border-radius: 10px; margin: 6px 0; background: #FAFBFD; }
.fl-gv .it-n { background: #7C89A3; }
.fl-gv .it-txt { font-weight: 500; font-size: 15px; }
.fl-game .it-n { background: var(--purple); }

/* nút thu gọn lại câu đúng đã mở (Nam 2026-10-30) */
.cl-open { position: relative; }
.cl-fold { position: absolute; right: 8px; top: 8px; z-index: 2; border: 1px solid var(--line); background: #fff; color: var(--green); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.cl-fold .en { display: none; }

/* câu hỏi — trả lời tách 2 dòng (Nam 2026-10-30) */
.qa-q { display: block; font-weight: 700; color: var(--deep); }
.qa-a { display: block; position: relative; padding-left: 1.3em; margin-top: 2px; color: #136B74; font-weight: 500; }
.qa-a::before { content: "↳"; position: absolute; left: 0; top: 0; color: #7FA9AE; }
button .qa-q, button .qa-a { text-align: left; }
button.qa, .opt.qa { text-align: left; }

/* tiếng Anh của nội dung: ẩn mặc định, bấm EN (Nam 2026-10-30) */
.en.cen { display: none !important; }
.cen-open > .en.cen { display: block !important; }
.cen-btn { display: inline-block; vertical-align: middle; margin-left: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; line-height: 1; padding: 3px 6px; border-radius: 6px; cursor: pointer; }
.cen-btn:hover { color: var(--deep); border-color: var(--deep); }
.cen-btn.on { background: var(--deep); color: #fff; border-color: var(--deep); }

/* công cụ GV khi chiếu lớp: đồng hồ · đèn chiếu · tấm che · A+ A– (Nam 2026-10-30) */
.tl-bar .tl-txt { font-weight: 800; font-size: 14px; }
.tt-timer { position: fixed; top: 90px; right: 24px; z-index: 80; width: 220px; background: var(--deep); color: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(20,30,60,.35); padding: 10px 12px 12px; }
.tt-timer .tt-h, .tt-cover .tt-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; cursor: move; user-select: none; }
.tt-timer .tt-h button, .tt-cover .tt-h button { border: 0; background: transparent; color: inherit; font-size: 15px; cursor: pointer; }
.tt-time { font-size: 52px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; margin: 4px 0; }
.tt-timer.warn .tt-time { color: #FFD166; }
.tt-timer.end { background: #C62828; animation: tt-blink 1s 4; }
@keyframes tt-blink { 50% { opacity: .55; } }
.tt-pre, .tt-ctl { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.tt-pre button, .tt-ctl button { border: 0; border-radius: 8px; background: rgba(255,255,255,.15); color: #fff; padding: 5px 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tt-ctl .go { background: var(--orange); min-width: 44px; font-size: 16px; }
.tt-spot { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
.tt-cover { position: absolute; left: 12%; width: 60%; height: 160px; min-width: 160px; min-height: 60px; z-index: 70; background: #E6EAF2 repeating-linear-gradient(45deg, transparent 0 12px, rgba(32,49,99,.05) 12px 24px); border: 2px solid var(--deep); border-radius: 12px; resize: both; overflow: hidden; box-shadow: 0 6px 18px rgba(20,30,60,.25); }
.tt-cover .tt-h { background: var(--deep); color: #fff; padding: 6px 10px; }

/* ---------- Câu neo dựng từng lớp (buildUp, 2026-10-30) ---------- */
.bu { display: grid; grid-template-columns: minmax(220px, 34%) 1fr; gap: 20px; align-items: start; }
.bu-scene { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-align: center; }
.bu-scene img { max-width: 100%; max-height: 260px; object-fit: contain; }
.bu-ctx { font-size: 15px; text-align: left; margin: 10px 0 0; }
.bu-stage { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; border-top: 5px solid var(--primary); }
.bu-top { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.bu-cnt { font-weight: 800; color: var(--deep); font-size: 14px; background: var(--soft-b); border-radius: 999px; padding: 2px 10px; }
.bu-lbl { font-weight: 700; color: var(--muted); }
.bu-dots { display: flex; gap: 6px; margin: 10px 0 4px; } .bu-dots i { width: 28px; height: 6px; border-radius: 3px; background: var(--line); } .bu-dots i.done { background: var(--green-l); } .bu-dots i.cur { background: var(--primary); }
.bu-sent { font-size: 30px; line-height: 1.9; margin: 12px 0; font-weight: 600; }
.bu-k { display: inline-block; padding: 0 10px; border-radius: 10px; border-bottom: 4px solid currentColor; background: #F6F8FB; line-height: 1.5; }
.bu-k.new { animation: bu-pop .9s ease-out 2; box-shadow: 0 0 0 3px #FFD16699; }
@keyframes bu-pop { 0% { transform: scale(.7); opacity: .2; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.bu-p { margin-left: -6px; color: var(--muted); }
.r-ng { color: #1E63D6; } .r-cd { color: #5D6B82; } .r-tg { color: #6E5BA8; } .r-hoi { color: #D9661F; } .r-vt { color: #203163; } .r-muc { color: #2F7D5B; } .r-noi { color: #136B74; } .r-le { color: #C2185B; }
.bu-sent .en { display: block; font-size: 15px; font-weight: 400; color: var(--muted); }
.bu-note { background: #FFF8E6; border-left: 4px solid #F2B84B; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.bu-ctl { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; } .bu-ctl .btn[disabled] { opacity: .4; }
.bu-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 13px; }
.bu-lg { border-bottom: 3px solid currentColor; padding: 1px 8px; background: #F6F8FB; border-radius: 6px; font-weight: 700; } .bu-lg .en { display: inline; margin-left: 4px; font-weight: 400; }
.bu-memo { grid-column: 1 / -1; background: #FFFDF5; border: 2px solid #F2B84B; border-radius: var(--radius); padding: 16px 22px; }
.bu-memo h3 { margin: 4px 0 10px; } .bu-memo li { margin-bottom: 8px; font-size: 16px; }
.bu-ex { display: block; color: #136B74; font-style: italic; margin-top: 2px; }
.bu-ccq { border-top: 1px dashed var(--line); padding: 10px 0; } .bu-q { font-weight: 700; margin: 0 0 6px; } .bu-a { color: var(--green); font-weight: 700; margin: 6px 0 0; }
@media (max-width: 760px) { .bu { grid-template-columns: 1fr; } .bu-sent { font-size: 24px; } }

/* ---------- Phản hồi sau hoạt động nói (2026-10-30) ---------- */
.fl-fb .it-n { background: #2F4A86; }
.fbk h1 .stage { display: inline-block; width: auto; vertical-align: middle; font-size: 14px; }
.fbk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.fbk-col { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.fbk-col.good { border-top: 5px solid var(--green); } .fbk-col.fix { border-top: 5px solid #E8833A; }
.fbk-col ol { padding-left: 22px; } .fbk-col li { margin-bottom: 10px; }
.fbk-col input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 16px; font-family: inherit; }
.fbk-col input.fbk-right { margin-top: 4px; border-color: #BFE3C8; background: #F4FBF5; }
.fbk.showing .fbk-col input { border: 0; background: transparent; font-size: 26px; font-weight: 600; padding: 2px 0; }
.fbk-r { display: block; margin-top: 4px; border: 1px dashed #E8833A; background: #FFF6EE; color: #A2501A; border-radius: 8px; padding: 6px 10px; font-size: 16px; cursor: pointer; text-align: left; width: 100%; }
.fbk.showing .fbk-r { font-size: 22px; } .fbk-r.open { border-style: solid; border-color: var(--green); background: #F4FBF5; color: var(--green); font-weight: 700; }
.fbk-bar { display: flex; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) { .fbk-cols { grid-template-columns: 1fr; } }

/* ---------- Tiến trình 3 tầng: thanh Phần · Mở bài / Tổng kết bài học · một Phần một lần (2026-10-30) ---------- */
.fl-bar { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; }
.fl-bar button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px 9px; font-size: 14px; font-weight: 700; color: var(--deep); cursor: pointer; position: relative; }
.fl-bar button.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.fl-pg { position: absolute; left: 14px; right: 14px; bottom: 3px; height: 3px; border-radius: 2px; background: transparent; overflow: hidden; }
.fl-pg i { display: block; height: 100%; background: var(--primary); }
.fcv { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 22px; border-top: 5px solid var(--primary); display: block; }
.fc-k { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: none; }
.fc-t { font-size: 28px; margin: 2px 0 8px; } .fc-t .en { font-size: 14px; }
.fc-task { background: #FFF8E6; border-left: 4px solid #F2B84B; padding: 8px 12px; border-radius: 0; font-size: 16px; }
.fc-grid { display: grid; grid-template-columns: minmax(200px, 38%) 1fr; gap: 20px; align-items: center; margin-top: 12px; }
.fc-img { text-align: center; } .fc-img img { max-width: 100%; max-height: 280px; object-fit: contain; } .fc-img p { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.fc-dlg { display: flex; flex-direction: column; gap: 12px; }
.fc-ln { position: relative; max-width: 92%; background: #F3F6FA; border-radius: 16px; padding: 8px 46px 10px 14px; align-self: flex-start; }
.fc-ln.r { align-self: flex-end; background: #E9F6EF; }
.fc-who { font-size: 12px; font-weight: 700; color: var(--muted); }
.fc-ln .say { margin: 2px 0 0; font-size: 22px; line-height: 1.5; font-weight: 600; }
.fc-ln .say .en { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.fc-hl { border-bottom: 3px solid currentColor; padding: 0 2px; }
.fc-au { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--deep); cursor: pointer; display: grid; place-items: center; }
.fc-au svg { width: 18px; height: 18px; }
.fc-bar { display: flex; gap: 8px; }
.fc-k2 { margin: 20px 0 8px; font-weight: 700; color: var(--deep); } .fc-k2 .en { font-size: 12px; font-weight: 400; }
.fc-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.fc-goal { text-align: left; border: 1px solid var(--line); background: #FAFBFD; border-radius: 12px; padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--ink); }
.fc-goal:hover { border-color: var(--deep); } .fc-goal b { display: block; color: var(--deep); font-size: 13px; } .fc-goal .en { font-size: 11px; }
.fc-cta { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fc-frames { margin-top: 16px; background: #F4FBF5; border: 1px solid #BFE3C8; border-radius: 12px; padding: 12px 18px; }
.fc-frames h3 { margin: 0 0 6px; } .fc-frames li { font-size: 18px; margin-bottom: 6px; }
.fl-one .fl-goal { margin: 0; padding: 8px 20px; background: #FAFBFD; font-weight: 600; color: var(--deep); }
.fl-grp { padding: 4px 18px 6px; } .fl-gh { margin: 10px 0 2px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; } .fl-gh .en { display: inline; margin-left: 6px; text-transform: none; font-weight: 400; letter-spacing: 0; }
.fl-one .items { padding: 0 0 4px; }
.fl-one .it.done .it-n { background: var(--green-l); color: var(--green); }
.fl-extra { margin: 2px 0 6px; } .fl-extra summary { cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 700; padding: 6px 0; } .fl-extra summary .en { display: inline; margin-left: 6px; font-weight: 400; }
.fl-nav { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .fc-grid { grid-template-columns: 1fr; } .fc-ln .say { font-size: 19px; } .fc-t { font-size: 23px; } }

/* ---------- Câu thật của tôi (meTalk, luyện có nghĩa, 2026-10-30) ---------- */
.mt { display: flex; flex-direction: column; gap: 14px; }
.mt-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; border-left: 5px solid var(--primary); }
.mt-head { display: flex; align-items: center; gap: 12px; } .mt-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.mt-q { margin: 0; font-size: 20px; font-weight: 700; color: var(--deep); } .mt-q .en { font-size: 13px; font-weight: 400; }
.mt-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.mt-lbl { flex: none; min-width: 120px; font-size: 13px; font-weight: 700; color: var(--muted); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-c.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.mt-say { font-size: 24px; font-weight: 600; margin: 12px 0 4px; color: var(--ink); }
.mt-fb { margin: 0; font-size: 15px; } .mt-fb.ok { color: var(--green); font-weight: 700; } .mt-fb.no { color: #C62828; font-weight: 600; }
.mt-ask { margin: 8px 0 0; background: #EEF4FF; border-radius: 10px; padding: 8px 12px; font-size: 16px; } .mt-ask .en { display: block; font-size: 12px; }

/* ---------- Đầu trang bài tập gọn (Nam 2026-10-30): 1 hàng mảnh + thanh bước dạng chấm + khối tiêu đề nhỏ ---------- */
.ex-top { flex-wrap: nowrap; gap: 12px; margin-bottom: 10px; background: var(--white); border-radius: 999px; box-shadow: var(--shadow); padding: 6px 16px 6px 6px; }
.ex-top .backbtn { width: 40px; height: 40px; flex: none; }
.ex-skill { flex: 0 1 auto; min-width: 0; font-size: 15px; gap: 6px; }
.ex-skill > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-skill .en { display: none; }
.stepper { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-end; gap: 4px; padding: 4px 2px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.sp { width: auto; flex: none; }
.sp-lbl { display: none; }
.sp-dot { width: 24px; height: 24px; font-size: 12px; }
.sp.cur .sp-dot { box-shadow: 0 0 0 3px var(--soft-b); }
.sp-now { flex: none; font-size: 13px; font-weight: 700; color: var(--deep); background: var(--soft-b); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.ex-head { padding: 12px 18px; gap: 12px; align-items: center; }
.ex-head .it-n.big { width: 38px; height: 38px; font-size: 18px; }
.ex-head .stage { margin-bottom: 2px; font-size: 11px; padding: 2px 8px; }
.ex-head h1 { font-size: 23px; line-height: 1.25; margin: 0; }
.ex-head h1 .en { font-size: 13px; }
.task { margin: 6px 0 0; font-size: 16px; padding: 7px 12px; }
.task .en { font-size: 12px; }
@media (max-width: 760px) {
  .ex-top { border-radius: 14px; padding: 6px 10px 6px 6px; }
  .ex-skill > span { max-width: 38vw; }
  .stepper { display: none; }
  .sp-now { margin-left: auto; }
  .sp-st { display: none; }
  .ex-top { padding-right: 64px; }
  .ex-head { padding: 10px 14px; border-left-width: 5px; }
  .ex-head .it-n.big { display: none; }
  .ex-head h1 { font-size: 20px; }
  .ex-body { margin-top: 10px; }
}
@media (max-width: 560px) { .mt-row { display: block; } .mt-lbl { display: block; min-width: 0; margin-bottom: 4px; } .mt-say { font-size: 20px; } }

/* ---------- thanh trên cùng gọn trên điện thoại: logo + ⚙ (Nam 2026-10-30) ---------- */
.tb-menu { display: none; }
@media (max-width: 640px) {
  .topbar { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; position: sticky; }
  .brand-mark { width: 36px; height: 36px; font-size: 12px; }
  .brand-text b { font-size: 15px; } .brand-text small { display: none; }
  .tb-menu { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-width: 44px; min-height: 44px; justify-content: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--deep); cursor: pointer; padding: 0 10px; }
  body.teacher .tb-menu::before { content: 'GV'; font-size: 12px; font-weight: 800; background: #FFF1D6; color: #8A5A00; border-radius: 99px; padding: 2px 7px; }
  .controls { display: none; position: absolute; top: 100%; right: 8px; left: 8px; flex-direction: column; align-items: stretch; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 28px rgba(20,30,60,.18); padding: 12px; z-index: 30; }
  .topbar.open .controls { display: flex; }
  .topbar.open { z-index: 120; }
  body.teacher .controls::before { content: 'Chế độ giáo viên'; align-self: flex-start; }
  .controls .seg { justify-content: stretch; } .controls .seg button { flex: 1; }
}

/* ---------- câu hội thoại trên điện thoại: ảnh nhỏ, câu dùng hết bề ngang, nút che / nghe / ghi âm xuống dưới câu (Nam 2026-10-30) ---------- */
@media (max-width: 640px) {
  .ln { flex-wrap: wrap; gap: 6px 10px; padding: 8px 4px; align-items: flex-start; }
  .ln > .av { width: 36px; height: 36px; border-width: 2px; margin-top: 2px; }
  .ln > .ln-b { flex: 1 1 calc(100% - 50px); }
  .ln > .eye, .ln > .spk, .ln > .rec { margin-top: 0; }
  .ln > .rec { margin-left: 0 !important; }
  .ln > .ln-b + * { margin-left: 46px; }
  .ln > .spk, .ln > .eye { width: 38px; height: 38px; }
  .ln > .spk .ic { width: 19px; height: 19px; }
  .ln > .rec button { height: 34px; min-width: 34px; }
  .ln .say { font-size: 18px; }
}

/* ---------- màn hình máy tính lớn: khung rộng theo màn hình + chữ to hơn (Nam 2026-10-30: "khung đang khá nhỏ") ---------- */
@media (min-width: 1300px) {
  .wrap { max-width: min(1680px, 94vw); }
  .ex-page { max-width: min(1480px, 92vw); }
  .cols { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (min-width: 1440px) { .topbar, #app { zoom: 1.08; } }
@media (min-width: 1700px) { .topbar, #app { zoom: 1.16; } }
@media (min-width: 1100px) {
  .fc-grid { grid-template-columns: minmax(280px, 40%) 1fr; align-items: start; }
  .fc-img img { max-height: 400px; width: 100%; }
}
@media (min-width: 1300px) { .bu-sent { font-size: 36px; } .bu-scene img { max-height: 340px; } .mt-say { font-size: 28px; } }

/* ---------- Tái bố cục màn hình máy tính (Nam duyệt 2026-10-30, bản vẽ "Tái bố cục Học liệu VLS") ---------- */
/* 1. cột "Thêm" = dải biểu tượng 60px, bấm ⇤ mở ra đè lên nội dung */
.ex-tog { display: none; }
@media (min-width: 981px) {
  .cols { grid-template-columns: minmax(0, 1fr) 60px !important; gap: 18px; }
  .extras.rail { position: sticky; padding: 10px 8px; align-items: center; width: 60px; box-sizing: border-box; z-index: 40; }
  .extras.rail h3, .extras.rail .ex > span { display: none; }
  .extras.rail .ex { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .extras.rail .ex-tog { display: grid; place-items: center; width: 44px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
  .extras.rail .ex-tog .ic { transform: rotate(90deg); width: 18px; height: 18px; }
  .extras.rail.open { width: 280px; margin-left: -220px; align-items: stretch; padding: 14px 14px 16px; box-shadow: -10px 0 30px rgba(20,30,60,.25); }
  .extras.rail.open h3 { display: block; } .extras.rail.open .ex { width: auto; height: auto; padding: 10px 12px; justify-content: flex-start; } .extras.rail.open .ex > span { display: block; }
  .extras.rail.open .ex-tog { align-self: flex-end; } .extras.rail.open .ex-tog .ic { transform: rotate(-90deg); }
}
/* 2. tab Tiến trình: bỏ dải cam (tên bài đã ở đường dẫn trên cùng) · thanh Phần + mục phụ cùng một hàng */
@media (min-width: 981px) { .unit-page.on-flow > .up-head { display: none; } .unit-page.on-flow { padding-top: 16px; } }
.fl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fl-row .fl-bar { margin-bottom: 0; flex: 1 1 auto; min-width: 0; }
.fl-side { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.fl-side a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.fl-side a:hover { background: #fff; color: var(--deep); } .fl-side .ic { width: 16px; height: 16px; }
/* 3. Mở bài vừa một màn hình */
.fc-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.fc-head .fc-task { flex: 1 1 360px; margin: 0; }
.fc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fc-foot .fc-k2 { margin: 0 6px 0 0; } .fc-foot .fc-k2 .en { display: none; }
.fc-foot .fc-goals { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.fc-foot .fc-goal { padding: 6px 10px; } .fc-foot .fc-goal .en { display: none; }
.fc-foot .fc-cta { margin: 0 0 0 auto; }
@media (min-width: 1100px) { .fc-img img { max-height: min(400px, calc(100vh - 430px)); } .fc-grid { margin-top: 14px; } }
/* 4. hội thoại + câu hỏi: 2 cột, câu hỏi bám theo khi cuộn */
@media (min-width: 1100px) {
  .dq { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 22px; align-items: start; }
  .dq-r { position: sticky; top: calc(84px + var(--st-h, 0px)); max-height: calc(100vh - 190px); overflow: auto; }
  .dq-r .qs { margin-top: 0; }
}
@media (min-width: 1100px) {
  .fl-row { flex-wrap: nowrap; }
  .fl-row .fl-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .fl-side { flex: none; flex-wrap: nowrap; }
  .fl-side a { padding: 8px 8px; }
  .fc-img img { max-height: min(380px, calc(100vh - 480px)); }
}
@media (min-width: 981px) { .extras.rail { top: calc(128px + var(--st-h, 0px)); } }

/* Mở bài: thẻ mục tiêu chỉ hiện nhãn ngắn (rê chuột xem đủ) · mục phụ chỉ biểu tượng, màn rất rộng mới hiện chữ */
.fc-foot .fc-goal .fc-gl { display: none; } .fc-foot .fc-goal b { display: inline; font-size: 14px; }
@media (min-width: 1100px) { .fl-side a span { display: none; } .fl-side a { width: 40px; height: 40px; justify-content: center; padding: 0; } .fl-side .ic { width: 20px; height: 20px; } }
@media (min-width: 1800px) { .fl-side a span { display: inline; } .fl-side a { width: auto; padding: 8px 10px; } }

/* vai màu thêm cho J2 B2 (khối câu neo, tô câu thoại Mở bài) */
.r-dd { color: #0C5E8A; } .r-vtri { color: #8A6D00; } .r-pt { color: #A2501A; }
.r-bd { color: #B23A36; } .r-nn { color: #5B3FA0; } .r-kq { color: #0F6E56; }

/* ---------- Nghe theo 4 bước: Trước · lượt 1 · lượt 2 · Sau (2026-10-30) ---------- */
.ph-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ph-s { flex: 1 1 160px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--deep); cursor: pointer; }
.ph-s b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft-b); margin-right: 6px; font-size: 12px; }
.ph-s .en { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.ph-s.on { background: var(--deep); color: #fff; border-color: var(--deep); } .ph-s.on b { background: var(--primary); color: var(--deep); } .ph-s.on .en { color: #C8D3EA; }
.ph-s.done b { background: var(--primary); }
.ph-guide { margin: 0 0 12px; background: #FFF8E6; border-left: 4px solid #F2B84B; padding: 8px 12px; font-size: 16px; }
.ph-pre, .ph-post { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 20px; margin-bottom: 14px; }
.ph-open { padding-left: 22px; } .ph-open li { margin-bottom: 10px; font-size: 18px; } .ph-open li p { margin: 0 0 4px; }
.ph-ans { color: #136B74; font-size: 16px; }
.ph-wl { margin: 8px 0 6px; font-weight: 700; color: var(--deep); } .ph-wl .en { font-size: 12px; font-weight: 400; margin-left: 6px; }
.ph-words { display: flex; flex-wrap: wrap; gap: 8px; } .ph-w { background: #F3F6FA; border-radius: 10px; padding: 6px 12px; font-size: 17px; font-weight: 600; } .ph-w .en { display: block; font-size: 12px; font-weight: 400; }
.ph-nav { display: flex; justify-content: space-between; margin-top: 14px; }
/* ẩn / hiện theo bước */
.ph-on.ph-0 .dlg-bar, .ph-on.ph-0 .dq, .ph-on.ph-0 > .dlg, .ph-on.ph-0 > .tipbox { display: none !important; }
.ph-on:not(.ph-0) .ph-pre { display: none; }
.ph-on:not(.ph-3) .ph-post, .ph-on:not(.ph-3) .dq-l > .tipbox, .ph-on:not(.ph-3) > .tipbox { display: none; }
.ph-on.ph-1 [data-act="text"], .ph-on.ph-1 .ln .eye { display: none; }
.ph-on.ph-1 .q[data-ph="detail"] { display: none; }
.ph-on.ph-2 .q[data-ph="gist"]:not(.done) { display: none; }

/* ---------- Mở bài theo bước: câu hỏi dẫn dắt (2026-10-30) ---------- */
.fc-q { margin-top: 12px; background: #FFF8E6; border: 1px solid #F2D79B; border-radius: 14px; padding: 12px 16px; }
.fc-qdots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fc-qdots button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--deep); cursor: pointer; }
.fc-qdots button.on { background: var(--deep); color: #fff; border-color: var(--deep); } .fc-qdots button.done { background: var(--primary); border-color: var(--primary); }
.fc-qdots .fc-all { width: auto; border-radius: 999px; padding: 0 12px; margin-left: auto; font-size: 13px; } .fc-qdots .fc-all .en { display: none; }
.fc-qt { margin: 10px 0 6px; font-size: 24px; font-weight: 700; color: var(--deep); line-height: 1.4; } .fc-qt .en { display: block; font-size: 14px; font-weight: 400; }
.fc-ans { margin: 6px 0 0; color: #136B74; font-size: 17px; }
.fc-qnav { display: flex; justify-content: space-between; margin-top: 10px; }
.fc-wait { border: 2px dashed var(--line); border-radius: 16px; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 17px; } .fc-wait .en { display: block; font-size: 13px; }
.fc-ln.masked .say { filter: blur(7px); user-select: none; }
.fc-dlg.plain .fc-hl { color: inherit; border-bottom-color: transparent; }
.fc-dlg .fc-q { margin-top: 0; } .fc-qt { font-size: 22px; }

/* ---------- Tranh đầu Phần (part.img, 2026-10-30) ---------- */
.fl-hero { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 16px; align-items: center; margin: 8px 0 14px; }
.fl-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.fl-hero .fl-goal { margin: 0; font-size: 20px; }
@media (max-width: 760px) { .fl-hero { grid-template-columns: 1fr; } }
/* tranh chưa vẽ (onerror → hidden): ô tranh co lại, không hiện ảnh vỡ */
.fl-hero:has(img[hidden]) { grid-template-columns: 1fr; }
.fc-img img[hidden] { display: none; }

/* ---------- DOCK CÔNG CỤ GV (phương án C1 + tìm lệnh, 2026-11-04) — thay cột công cụ nổi .tl-bar ---------- */
.tl-bar { display: none !important; }
.tl-dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 75; background: var(--deep); border-radius: 18px; padding: 8px; box-shadow: 0 10px 28px rgba(32,49,99,.3); }
body:not(.teacher) .tl-dock { display: none; }
.tl-dock.in-foot { position: relative; left: auto; bottom: auto; transform: none; background: transparent; box-shadow: none; padding: 0; margin: 0 auto; z-index: 2; }
.tl-row { display: flex; align-items: center; gap: 6px; }
.tl-g { height: 46px; border: 0; border-radius: 12px; padding: 0 16px; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.tl-g:hover { background: rgba(255,255,255,.24); }
.tl-g.on { background: #A6CE39; color: var(--deep); }
.tl-dock.drawing .tl-g[data-g="ve"] { box-shadow: inset 0 0 0 2px #A6CE39; }
.tl-find { display: flex; align-items: center; gap: 6px; height: 46px; border-radius: 12px; padding: 0 10px; background: rgba(255,255,255,.14); color: #fff; margin-left: 4px; }
.tl-find input { width: 120px; border: 0; background: transparent; color: #fff; font: inherit; outline: none; }
.tl-find input::placeholder { color: rgba(255,255,255,.75); }
.tl-find:focus-within { background: #fff; color: var(--deep); } .tl-find:focus-within input { color: var(--ink); width: 180px; } .tl-find:focus-within input::placeholder { color: var(--muted); }
.tl-find kbd { font: 600 11px/1 inherit; border: 1px solid currentColor; border-radius: 6px; padding: 3px 5px; opacity: .7; }
.tl-find-ic { font-size: 20px; line-height: 1; }
.tl-pop { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(820px, 96vw); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 12px 32px rgba(32,49,99,.22); }
.tl-pop[hidden] { display: none; }
.tl-pop-h { width: 100%; margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.tl-b { height: 48px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #F4F6FA; color: var(--deep); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; position: relative; }
.tl-b:hover { border-color: var(--deep); }
.tl-b.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.tl-b .tl-txt { font-weight: 800; }
.tl-pop .tl-colors { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; background: none; }
.tl-pop .tl-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.tl-pop .tl-colors button.on { box-shadow: 0 0 0 3px var(--deep); }
.tl-dock .tl-tip { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translateX(-50%); }
@media (max-width: 760px) {
  .tl-g { height: 40px; padding: 0 10px; font-size: 14px; }
  .tl-find kbd { display: none; } .tl-find input { width: 70px; }
  .tl-dock.in-foot { order: -1; flex-basis: 100%; } .tl-dock.in-foot .tl-row { justify-content: center; flex-wrap: wrap; }
  .ex-foot-in { flex-wrap: wrap; }
}
@media print { .tl-dock { display: none !important; } }
.tl-g, .tl-b, .tl-find kbd { white-space: nowrap; flex: none; }
body.teacher .ex-foot-in:has(.tl-dock) { max-width: 1440px; }
@media (max-width: 760px) {
  .tl-find { display: none; }
  .tl-dock.in-foot .tl-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
  .tl-g { height: 36px; padding: 0 12px; border-radius: 10px; }
  .tl-pop { position: fixed; left: 8px; right: 8px; transform: none; bottom: calc(var(--foot-h, 120px) + 8px); width: auto; max-width: none; }
}

/* ---------- Nút 👁 che / hiện từng hàng (line-eye.js) ---------- */
.lx-eye { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; vertical-align: middle; padding: 0; }
.lx-eye:hover { border-color: var(--deep); color: var(--deep); }
.lx-eye.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.lx-eye.lx-abs { position: absolute; right: 44px; top: 8px; width: 32px; height: 32px; }
.fc-ln.lx-row { padding-right: 84px; }
.rd-text > p.lx-row { display: flex; gap: 10px; align-items: flex-start; }
.rd-text > p.lx-row > .lx-t { flex: 1; }
.rd-text > p.masked > .lx-t, .bu-sent.masked, .ln.masked .say { filter: blur(7px); user-select: none; }
.bu-sent + .lx-eye { margin: -4px 0 8px; }
.pg-text { z-index: 61; }


/* ---------- Thanh trên cùng: cột Thêm + công cụ GV dạng biểu tượng (Nam 2026-11-04) ---------- */
.tb-slot { display: flex; align-items: center; gap: 4px; }
.tb-slot:empty { display: none; }
#tbExtras { padding-right: 12px; border-right: 1px solid var(--line); }
body:not(.teacher) #tbExtras { border-right: 0; padding-right: 0; }
.cols:not(:has(> .extras)) { grid-template-columns: minmax(0, 1fr) !important; }
.topbar .extras { position: static; display: flex; flex-direction: row; align-items: center; gap: 4px; width: auto; margin: 0; padding: 0; background: none; color: var(--deep); border-radius: 0; box-shadow: none; }
.topbar .extras h3, .topbar .extras .ex-tog, .topbar .extras .ex > span { display: none; }
.topbar .extras .ex, .topbar .tl-g { width: 36px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--deep); cursor: pointer; }
.topbar .extras .ex:hover, .topbar .tl-g:hover { border-color: var(--deep); background: #fff; }
.topbar .extras .ex.off { opacity: .45; cursor: default; }
.topbar .extras .ex .ic, .topbar .tl-g svg { width: 20px; height: 20px; }
.topbar .tl-dock { position: relative; left: auto; bottom: auto; transform: none; z-index: auto; background: none; box-shadow: none; padding: 0; border-radius: 0; }
.topbar .tl-row { gap: 4px; }
.topbar .tl-gl, .topbar .tl-find kbd { display: none; }
.topbar .tl-g.on { background: #A6CE39; border-color: #A6CE39; color: var(--deep); }
.topbar .tl-dock.drawing .tl-g[data-g="ve"] { box-shadow: 0 0 0 2px #A6CE39; }
.topbar .tl-find { height: 36px; margin-left: 2px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--deep); }
.topbar .tl-find input { width: 0; color: var(--ink); transition: width .15s; }
.topbar .tl-find:focus-within input { width: 160px; }
.topbar .tl-pop { top: calc(100% + 12px); bottom: auto; left: auto; right: 0; transform: none; }
.topbar .tl-tip { top: calc(100% + 6px); bottom: auto; }
@media (max-width: 640px) {
  .tb-slot { flex-wrap: wrap; } #tbExtras { border-right: 0; padding-right: 0; }
  .topbar .tl-row { flex-wrap: wrap; } .topbar .tl-find { display: none; }
  .topbar .tl-pop { position: absolute; top: calc(100% + 8px); left: 0; right: auto; max-width: calc(100vw - 32px); }
}


/* ---------- Trang Hướng dẫn (guide.js, 2026-11-04) ---------- */
.tb-help { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--deep); font-weight: 800; font-size: 18px; text-decoration: none; }
.tb-help:hover { border-color: var(--deep); background: #fff; }
.gd { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }
.gd h1 { color: var(--deep); margin: 0 0 6px; }
.gd h1 .en { display: block; font-size: 16px; font-weight: 500; color: var(--muted); }
.gd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 22px; }
.gd-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none; }
.gd-card:hover { border-color: var(--deep); box-shadow: 0 6px 18px rgba(32,49,99,.12); }
.gd-card .ic { flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--primary); color: var(--deep); }
.gd-card b { display: block; color: var(--deep); font-size: 18px; } .gd-card b .en { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.gd-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.gd-card .gd-time { color: var(--deep-l); font-weight: 600; }
.gd-back { display: inline-block; margin-bottom: 12px; color: var(--deep-l); text-decoration: none; } .gd-back .en { margin-left: 6px; }
.gd-intro { font-size: 18px; margin: 0 0 22px; } .gd-intro .en { display: block; font-size: 15px; color: var(--muted); }
.gd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.gd-steps li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 22px; align-items: start; }
.gd-txt { display: flex; gap: 14px; align-items: flex-start; }
.gd-k { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--deep); color: #fff; font-weight: 800; font-size: 18px; }
.gd-txt p { margin: 6px 0 0; font-size: 19px; line-height: 1.5; } .gd-txt p .en { display: block; margin-top: 6px; font-size: 15px; color: var(--muted); }
.gd-n { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0 2px; border-radius: 50%; background: #E8833A; color: #fff; font-size: 13px; vertical-align: 2px; }
.gd-img { width: 100%; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 18px rgba(32,49,99,.10); }
.gd-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.gd-keys section { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px 18px; }
.gd-keys h3 { margin: 0 0 8px; color: var(--deep); } .gd-keys h3 .en { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.gd-keys table { width: 100%; border-collapse: collapse; } .gd-keys td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.gd-keys td:first-child { white-space: nowrap; width: 1%; padding-right: 14px; } .gd-keys td .en { display: block; font-size: 13px; color: var(--muted); }
.gd-keys kbd { display: inline-block; min-width: 26px; padding: 3px 7px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 7px; background: var(--bg); font: 700 14px/1.2 inherit; text-align: center; }
.gd-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
@media (max-width: 760px) { .gd-steps li { grid-template-columns: 1fr; } .gd { padding: 18px 14px 40px; } }
@media print { .topbar, .gd-nav, .gd-back, .gd button { display: none !important; } .gd-keys section { break-inside: avoid; } }

.gd-faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.gd-faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 18px; }
.gd-faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--deep); font-size: 18px; }
.gd-faq summary .en { margin-left: 8px; font-weight: 500; font-size: 14px; color: var(--muted); }
.gd-faq details p { margin: 0 0 16px; font-size: 17px; line-height: 1.55; }
.gd-faq details p .en { display: block; margin-top: 6px; font-size: 15px; color: var(--muted); }

.tl-pop .tl-sizes { display: inline-flex; gap: 4px; padding: 0 6px; }
.tl-pop .tl-sizes button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--deep); font-weight: 800; cursor: pointer; }
.tl-pop .tl-sizes button.on { background: var(--deep); border-color: var(--deep); color: #fff; }

/* ---------- Bài nối: 2 cột luôn cạnh nhau (lớp riêng, không đụng .mt của bài nói tự do) ---------- */
.mt.mt-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mt.mt-match .mt-col { display: flex; flex-direction: column; gap: 8px; }
.mt.mt-match .mt-it { min-height: 48px; text-align: left; }
@media (max-width: 560px) { .mt.mt-match { gap: 8px; } .mt.mt-match .mt-it { font-size: 15px; padding: 8px 10px; } }

/* ---------- Nút "Bài tiếp" nói rõ đi đâu ---------- */
.ex-foot .nav .lbl small { display: block; max-width: 220px; font-size: 12px; font-weight: 500; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-foot .nav.nx-part { background: #A6CE39; color: var(--deep); border-color: #A6CE39; }

/* ---------- Người chào do GV chọn (chỉ vai GV) ---------- */
.gm-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; padding: 10px 14px; border: 1px dashed #E8833A; border-radius: 12px; background: #FFF7EE; font-size: 15px; }
.gm-pick select, .gm-pick input { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
.gm-pick input[type=number] { width: 70px; } .gm-pick .en { margin: 0 6px; font-size: 12px; color: var(--muted); }
.gm-cus { display: inline-flex; gap: 6px; align-items: center; } .gm-cus[hidden] { display: none; }
body:not(.teacher) .gm-pick { display: none; }

/* ---------- Luyện nhanh bằng ảnh ---------- */
.qd-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 12px; }
.qd-n { font-weight: 800; color: var(--deep); background: var(--bg); border-radius: 99px; padding: 4px 12px; }
.qd-me { display: inline-flex; gap: 8px; align-items: center; } .qd-me img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.qd-me .en { display: block; font-size: 12px; color: var(--muted); }
.qd-tools { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; } .qd-tools select { font: inherit; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); }
.qd-stage { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: center; }
.qd-stage figure { margin: 0; text-align: center; } .qd-img { max-width: 100%; max-height: 52vh; border-radius: 16px; object-fit: contain; box-shadow: 0 8px 24px rgba(32,49,99,.15); }
.qd-cap { margin-top: 8px; font-weight: 700; color: var(--deep); font-size: 18px; }
.qd-frame { font-size: 40px; font-weight: 800; color: var(--deep); margin: 0 0 10px; } .qd-gap { color: #E8833A; }
.qd-t { display: block; font-size: 22px; font-weight: 800; color: #E8833A; min-height: 30px; }
.qd-ans { margin: 10px 0 16px; padding: 14px 16px; border-radius: 12px; background: #EEF7E6; } .qd-ans b { display: block; font-size: 30px; color: #2F7D5B; }
.qd-why { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; }
.qd-ctl { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .qd-stage { grid-template-columns: 1fr; } .qd-frame { font-size: 30px; } }

.qd-opts { margin: 0 0 10px; } .qd-opts .opt { font-size: 20px; }
.qd-stage.no-img { grid-template-columns: 1fr; } .qd-stage.no-img .qd-frame { font-size: 34px; }

/* ---------- Đang vẽ / gõ chữ: rê chuột lên thanh công cụ hoặc chân trang = TẠM DỪNG viết (Nam 2026-11-04) ----------
   Hai thanh nằm TRÊN lớp vẽ (.tl-layer z 60) nên chuột trở lại bình thường để chọn công cụ, đổi màu, sang bài; rời ra trang thì bút viết tiếp. */
body.tl-drawing .topbar { z-index: 65; cursor: default; }
body.tl-drawing .ex-foot { z-index: 65; cursor: default; }

/* ---------- Tiến trình: số theo Phần, Luyện thêm thu gọn (Nam 2026-11-04) ---------- */
.it-n.ic { background: none; font-size: 18px; }
.it-n.more { background: #FFF1D6; color: #8A5A00; }
.fl-more { margin: 14px 0 6px; border: 1px dashed #E8B04A; border-radius: 12px; padding: 4px 12px; background: #FFFBF2; }
.fl-more summary { cursor: pointer; padding: 8px 0; font-weight: 700; color: #8A5A00; } .fl-more summary .en { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

/* ---------- CHẾ ĐỘ CHIẾU (GV): gọn như slide — ảnh to, khung câu to, ít chữ (Nam 2026-11-04) ---------- */
body.teacher.present .stepper, body.teacher.present .ex-head .stage, body.teacher.present .ex-head .task,
body.teacher.present .en, body.teacher.present .tipbox, body.teacher.present .meter, body.teacher.present .gvg-btn,
body.teacher.present .qd-why, body.teacher.present .crumbs, body.teacher.present .brand-text { display: none !important; }
body.teacher.present .topbar { padding-top: 4px; padding-bottom: 4px; }
body.teacher.present .ex-top { padding: 6px 12px; margin-bottom: 6px; }
body.teacher.present .ex-head { padding: 6px 14px; margin-bottom: 8px; align-items: center; }
body.teacher.present .ex-head h1 { font-size: 22px; margin: 0; }
body.teacher.present .ex-head .it-n.big { width: 34px; height: 34px; font-size: 16px; }
body.teacher.present .ex-foot { padding-top: 2px; padding-bottom: 2px; }
body.teacher.present .ex-foot .nav .lbl small { display: none; }
body.teacher.present .qd-img { max-height: 64vh; }
body.teacher.present .qd-frame { font-size: 56px; }
body.teacher.present .qd-ans b { font-size: 40px; }
body.teacher.present .gm-pick { padding: 4px 10px; margin-bottom: 8px; font-size: 14px; }
body.teacher.present #exBody { font-size: 1.12em; }

/* ảnh Luyện nhanh luôn to (ảnh gốc nhỏ không tự phóng): thường ~46% chiều cao màn hình, Chế độ chiếu ~60% */
.qd-img { height: max(240px, calc(100vh - 500px)); width: auto; max-width: 100%; max-height: none; object-fit: contain; background: #fff; }   /* vừa khung: trừ thanh trên + đầu bài + chân trang */
body.teacher.present .qd-img { height: max(260px, calc(100vh - 400px)); }
.qd-stage:not(.no-img) .qd-side { align-self: center; }

/* ---------- Hồ sơ của tôi + ô tự viết (me-profile.js, Nam 2026-11-04) ---------- */
.me-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; padding: 8px 14px; border-radius: 12px; background: #EEF4FF; border: 1px solid #C9D2E6; font-size: 15px; }
.me-sum .en { display: block; font-size: 12px; color: var(--muted); } .me-ic { font-size: 20px; }
.me-form { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-top: 6px; }
.me-form[hidden] { display: none; } .me-form input, .me-form select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; width: 150px; } .me-form input[type=number] { width: 70px; }
.mt-ownw { display: inline-flex; } .mt-own { border-style: dashed !important; color: var(--deep-l); }
.mt-in { font: inherit; padding: 6px 12px; border: 2px dashed #E8833A; border-radius: 999px; min-width: 150px; } .mt-in.on { border-style: solid; background: #FFF4E8; }
.mt-hint { font-size: 14px; color: #8A5A00; } .mt-hint small { color: var(--muted); }
.ft-own { margin-top: 6px; } .ft-hint { display: block; color: #8A5A00; font-size: 14px; }
.mt-fix, .ft-fix { font-weight: 700; }
