/* =========================================================
   Polku — giao diện mới (thiết kế: design_handoff_polku_redesign)
   Token màu/chữ lấy từ colors_and_type.css (Suomen Mestari) + README bản thiết kế.
   ========================================================= */

/* ---------- TOKEN ---------- */
:root {
	--bg: #f0f4f8;
	--bg-alt: #f5f7fa;
	--card: #ffffff;
	--hover: #f8fafc;
	--border: #e2e8f0;
	--border-l: #f1f5f9;
	--text: #1e293b;
	--fi: #0f172a;      /* từ tiếng Phần: đậm, màu đen */
	--t2: #475569;
	--t3: #94a3b8;
	--vi: #2563eb;      /* nghĩa tiếng Việt */

	--blue: #3b82f6; --blue-d: #2563eb; --blue-l: #dbeafe; --blue-p: #eff6ff;
	--flag: #003580;
	--green: #10b981; --green-d: #047857; --green-l: #d1fae5;
	--orange: #f59e0b; --orange-d: #b45309; --orange-l: #fef3c7;
	--red: #ef4444; --red-d: #b91c1c; --red-l: #fee2e2;
	--purple: #8b5cf6; --purple-d: #6d28d9; --purple-l: #ede9fe;
	--pink: #ec4899; --pink-d: #be185d; --pink-l: #fce7f3;
	--teal: #14b8a6; --teal-d: #0f766e; --teal-l: #ccfbf1;
	--indigo: #6366f1; --indigo-d: #4338ca; --indigo-l: #e0e7ff;
	--yellow-b: #fde68a;

	--font: 'Jakarta', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--r: 14px; --r-lg: 16px; --rs: 10px; --rs-lg: 12px; --r-btn: 12px; --r-chip: 8px; --r-badge: 4px;
	--sh: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
	--sh2: 0 4px 16px rgba(0, 0, 0, .08);
	--sh3: 0 8px 32px rgba(0, 0, 0, .12);
	--sh-blue: 0 2px 8px rgba(59, 130, 246, .25);
	--nav-h: 60px;
	--sat: env(safe-area-inset-top, 0px);
	--sab: env(safe-area-inset-bottom, 0px);
	--glass: rgba(255, 255, 255, .9);
	color-scheme: light;
}
/* chế độ tối: theo máy (Tự động) hoặc chọn trong Cài đặt */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0b1220; --bg-alt: #0d1524; --card: #141d2d; --hover: #1a2537; --border: #253146; --border-l: #1c2738;
		--text: #e2e8f0; --fi: #f8fafc; --t2: #a3b1c6; --t3: #6b7a90; --vi: #7fb0ff;
		--blue-l: #1d3557; --blue-p: #15233a; --blue-d: #7fb0ff; --flag: #0a2d66;
		--green-l: #0d3a2e; --green-d: #5be0b0; --orange-l: #3a2a0c; --orange-d: #fbbf4a; --red-l: #3d1a1f; --red-d: #ff8b8b;
		--purple-l: #2a2250; --purple-d: #b9a4ff; --pink-l: #3b1830; --pink-d: #ff8cc6; --teal-l: #0f3633; --teal-d: #5fe3d2;
		--indigo-l: #24285a; --indigo-d: #a5b0ff; --yellow-b: #6b5216;
		--sh: 0 1px 2px rgba(0, 0, 0, .4); --sh2: 0 6px 18px rgba(0, 0, 0, .45); --sh3: 0 10px 34px rgba(0, 0, 0, .55);
		--glass: rgba(20, 29, 45, .88);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0b1220; --bg-alt: #0d1524; --card: #141d2d; --hover: #1a2537; --border: #253146; --border-l: #1c2738;
	--text: #e2e8f0; --fi: #f8fafc; --t2: #a3b1c6; --t3: #6b7a90; --vi: #7fb0ff;
	--blue-l: #1d3557; --blue-p: #15233a; --blue-d: #7fb0ff; --flag: #0a2d66;
	--green-l: #0d3a2e; --green-d: #5be0b0; --orange-l: #3a2a0c; --orange-d: #fbbf4a; --red-l: #3d1a1f; --red-d: #ff8b8b;
	--purple-l: #2a2250; --purple-d: #b9a4ff; --pink-l: #3b1830; --pink-d: #ff8cc6; --teal-l: #0f3633; --teal-d: #5fe3d2;
	--indigo-l: #24285a; --indigo-d: #a5b0ff; --yellow-b: #6b5216;
	--sh: 0 1px 2px rgba(0, 0, 0, .4); --sh2: 0 6px 18px rgba(0, 0, 0, .45); --sh3: 0 10px 34px rgba(0, 0, 0, .55);
	--glass: rgba(20, 29, 45, .88);
	color-scheme: dark;
}

/* ---------- NỀN ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	overflow-x: hidden;
	min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.emo { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; line-height: 1; }

/* khung app: điện thoại dùng hết màn hình; máy tính giữ khung giữa */
.view {
	max-width: 480px;
	margin: 0 auto;
	min-height: 100dvh;
	padding: calc(var(--sat) + 14px) 16px calc(96px + var(--sab));
	animation: up .25s ease both;
}
.view.no-tab { padding-bottom: calc(24px + var(--sab)); }
.view.alt { background: var(--bg-alt); }
.view.flush { padding-left: 0; padding-right: 0; }
@media (min-width: 768px) {
	body { background: var(--border-l); }
	.view { background: var(--bg); box-shadow: 0 0 0 1px var(--border); }
	.view.alt { background: var(--bg-alt); }
}

/* ---------- THANH ĐIỀU HƯỚNG ---------- */
.tabbar {
	position: fixed; left: 50%; bottom: 0; z-index: 40;
	width: 100%; max-width: 480px; transform: translateX(-50%);
	display: grid; grid-template-columns: repeat(4, 1fr);
	height: calc(var(--nav-h) + max(var(--sab), 8px));
	padding-bottom: max(var(--sab), 8px);
	background: var(--glass);
	-webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
	border-top: 1px solid var(--border);
}
.tabbar a {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-height: 44px; color: var(--t3); font-size: 11px; font-weight: 600;
	transition: color .15s, transform .12s;
}
.tabbar a:active { transform: scale(.94); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--blue); font-weight: 700; }
.tabbar a.on svg { stroke-width: 2.2; }

/* ---------- CHỮ ---------- */
.lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); }
.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 2px 10px; }
.lbl-row a, .lbl-row button { font-size: 13px; font-weight: 700; color: var(--blue); }
.fi { font-weight: 800; color: var(--fi); }
.vi { font-size: 13px; font-weight: 600; color: var(--vi); }
.muted { color: var(--t2); }
.dim { color: var(--t3); }
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ph h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--fi); }
.ph p { font-size: 13px; color: var(--t2); margin-top: 3px; }
.ph .kick { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); margin-bottom: 4px; }

/* ---------- THANH TRÊN TRANG CON ---------- */
.hb { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 14px; }
.hb-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--t2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb > :last-child:not(.hb-t) { min-width: 44px; display: flex; justify-content: flex-end; }
.rbtn {
	width: 44px; height: 44px; flex: none; border-radius: 12px;
	display: grid; place-items: center;
	background: var(--card); color: var(--text); box-shadow: var(--sh);
	transition: transform .12s;
}
.rbtn:active { transform: scale(.94); }
.rbtn.flat { background: none; box-shadow: none; color: var(--t3); }

/* ---------- THẺ & NÚT ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.press { transition: transform .12s ease, box-shadow .15s; }
.press:active { transform: scale(.97); }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 50px; padding: 0 18px; border-radius: var(--r-btn);
	font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
	transition: transform .12s ease, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.pri { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.btn.pri.deep { box-shadow: 0 3px 0 #1d4ed8; }
.btn.soft { background: var(--blue-l); color: var(--blue-d); }
.btn.white { background: var(--card); color: var(--text); box-shadow: var(--sh); }
.btn.line { background: var(--card); color: var(--text); border: 1.5px solid var(--border); }
.btn.gray, .btn:disabled { background: var(--border); color: var(--t3); box-shadow: none; cursor: default; }
.btn.good { background: var(--green); color: #fff; box-shadow: 0 3px 0 #047857; }
.btn.bad { background: var(--red); color: #fff; box-shadow: 0 3px 0 #b91c1c; }
.btn.danger { background: var(--red-l); color: var(--red-d); }
.btn.link { min-height: 44px; color: var(--blue); background: none; box-shadow: none; }
.btn .ic { width: 20px; height: 20px; }
.chip {
	display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
	border-radius: var(--r-chip); background: var(--border-l); color: var(--t2);
	font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tag.blue { background: var(--blue-l); color: var(--blue-d); }
.tag.green { background: var(--green-l); color: var(--green-d); }
.tag.red { background: var(--red-l); color: var(--red-d); }
.tag.orange { background: var(--orange-l); color: var(--orange-d); }
.tag.purple { background: var(--purple-l); color: var(--purple-d); }
.tag.gray { background: var(--border-l); color: var(--t3); }

/* loa */
.say {
	width: 40px; height: 40px; flex: none; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--blue-p); color: var(--blue);
	transition: transform .12s;
}
.say:active { transform: scale(.92); }
.say .ic { width: 20px; height: 20px; }
.say.sm { width: 32px; height: 32px; }
.say.sm .ic { width: 17px; height: 17px; }
.say.solid { background: var(--blue); color: #fff; }
.say.playing, .playing > .say, .playing .say-me { animation: pulse 1.6s ease-out infinite; }

/* thanh tiến độ */
.pbar { display: block; height: 5px; border-radius: 99px; background: var(--border-l); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .5s ease; }

/* danh sách hàng */
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.list > * + * { border-top: 1px solid var(--border-l); }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; transition: background .15s; }
a.row:active, button.row:active { background: var(--hover); }
.row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row .t { font-size: 15px; font-weight: 700; color: var(--fi); }
.row .s { font-size: 12px; color: var(--t2); }
.row .chev { color: var(--t3); }
.sq { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: var(--blue-p); }

/* trống / lỗi */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; color: var(--t2); font-size: 15px; }
.empty-big { font-size: 48px; }
.splash { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--t3); }
.splash-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 34px; font-weight: 800; }
.splash-mark span { color: #bfdbfe; }

/* thông báo nhỏ */
.toast {
	position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 18px); z-index: 90;
	max-width: min(440px, calc(100% - 32px)); transform: translate(-50%, 12px); opacity: 0;
	display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
	background: #0f172a; color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh3);
	transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast button { color: #93c5fd; font-weight: 800; min-height: 32px; }

/* ---------- CHUYỂN ĐỘNG ---------- */
@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .45); } 100% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   HỌC — TUYẾN TÀU (2a)
   ========================================================= */
.ring {
	--p: 0; --s: 88px; --w: 10px; --rc: var(--blue);
	width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: grid; place-items: center;
	background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--blue-l) 0);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + .5px));
	mask: radial-gradient(farthest-side, transparent calc(100% - var(--w)), #000 calc(100% - var(--w) + .5px));
	transition: background .5s ease;
}
.streak-chip {
	display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 10px;
	background: var(--orange-l); color: var(--orange-d); font-size: 15px; font-weight: 800; flex: none;
}
.streak-chip.off { background: var(--border-l); color: var(--t3); }
.streak-chip .emo { font-size: 16px; }

.today-strip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; }
.today-strip .ts-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.today-strip b { font-size: 14px; font-weight: 800; color: var(--fi); }
.today-strip small { font-size: 12px; color: var(--t2); }

/* chú thích chương (cuộn ngang) */
.chch-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 6px; padding: 2px 16px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chch-row::-webkit-scrollbar { display: none; }
.chch {
	display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 8px; flex: none; scroll-snap-align: center;
	background: var(--l); color: var(--d); font-size: 13px; font-weight: 700; white-space: nowrap;
	box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, opacity .15s;
}
.chch i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chch.on { box-shadow: inset 0 0 0 2px var(--c); }
.chch.later { opacity: .55; }
:root[data-theme="dark"] .chch, :root[data-theme="dark"] .stc-h { color-scheme: light; }

/* lưới ga: hàng chẵn trái→phải, hàng lẻ phải→trái, chuyển hàng bằng nửa vòng cung */
.rail { margin: 6px -16px 8px; padding: 6px 28px 4px; }
.rrow { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 114px; }
.rrow:last-child { height: 104px; }
.rrow .seg { position: absolute; top: 27px; width: 25%; height: 6px; background: var(--l); }
.rrow .seg.on { background: var(--c); }
.rrow .arc { position: absolute; top: 27px; height: 120px; border: 6px solid var(--l); }
.rrow .arc.on { border-color: var(--c); }
.rrow .arc.r { left: 87.5%; right: -20px; border-left: 0; border-radius: 0 40px 40px 0; }
.rrow .arc.l { right: 87.5%; left: -20px; border-right: 0; border-radius: 40px 0 0 40px; }
.stn { position: relative; z-index: 1; grid-row: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stn-c {
	position: relative; width: 48px; height: 48px; margin-top: 6px; border-radius: 50%;
	display: grid; place-items: center; font-size: 22px;
	border: 4px solid var(--c); background: var(--l);
	transition: transform .12s ease, box-shadow .2s;
}
.stn:active .stn-c { transform: scale(.94); }
.stn.now .stn-c { width: 60px; height: 60px; margin-top: 0; background: var(--card); font-size: 26px; box-shadow: 0 0 0 5px var(--l); }
.stn.lock .stn-c { border-color: var(--border); background: var(--card); }
.stn.lock .emo { filter: grayscale(1); opacity: .5; }
.stn.sel .stn-c { box-shadow: 0 0 0 5px var(--l); }
.stn.lock.sel .stn-c { box-shadow: 0 0 0 5px var(--border-l); }
.stn-ok { position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--c); border: 2px solid var(--bg); }
.stn-l {
	margin-top: 6px; max-width: 78px; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.stn.now .stn-l { font-weight: 800; color: var(--fi); }
.stn.lock .stn-l { color: var(--t3); }

/* thẻ chi tiết ga */
.stc { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; animation: up .25s ease both; scroll-margin: 16px 0 90px; }
.stc-h { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--l); }
.stc-emo { width: 60px; height: 60px; flex: none; border-radius: 16px; background: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: var(--sh); }
.stc-k { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--d); }
.stc-h h2 { font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: #0f172a; margin-top: 2px; }
.stc-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.stc-b p { font-size: 14px; line-height: 1.6; color: var(--t2); }
.stc .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stc .chip.done { background: var(--green-l); color: var(--green-d); }

/* luyện thêm */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-c { display: flex; flex-direction: column; gap: 2px; padding: 14px; min-height: 96px; }
.more-c .emo { font-size: 24px; margin-bottom: 6px; }
.more-c b { font-size: 14px; font-weight: 800; color: var(--fi); line-height: 1.3; }
.more-c small { font-size: 12px; color: var(--t2); }

/* =========================================================
   BÀI HỌC (1a · 2a màn 2 · 1c màn 3 · 3c màn 2 · kết quả)
   ========================================================= */
.view.lesson { background: var(--card); padding-bottom: calc(130px + var(--sab)); }
.view.lesson.has-fb { padding-bottom: calc(230px + var(--sab)); }
.lsn-top { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 -8px 16px; }
.lprog { flex: 1; height: 12px; border-radius: 99px; background: var(--border); overflow: hidden; }
.lprog i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .5s ease; }
.lsn-emo { width: 32px; text-align: center; font-size: 18px; }
.lsn-body { animation: up .25s ease both; }
.lq { font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: var(--fi); margin: 10px 0 18px; }
.lq.big { font-size: 25px; margin-bottom: 6px; }
.lsub { font-size: 14px; color: var(--t2); margin-bottom: 20px; }
.lsn-body > .tag { margin-top: 4px; }

/* trắc nghiệm */
.qrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.spk { width: 54px; height: 54px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 4px 0 #1d4ed8; transition: transform .12s; }
.spk:active { transform: translateY(2px); box-shadow: 0 2px 0 #1d4ed8; }
.spk .ic { width: 26px; height: 26px; }
.spk.playing { animation: pulse 1.6s ease-out infinite; }
.qword { padding: 10px 20px; border: 2px solid var(--border); border-bottom-width: 3px; border-radius: 13px; font-size: 27px; letter-spacing: -.01em; line-height: 1.3; }
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
	display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 14px; text-align: left;
	border: 2px solid var(--border); border-bottom-width: 4px; border-radius: 14px; background: var(--card);
	font-size: 16px; font-weight: 600; color: var(--text); transition: transform .1s, border-color .15s, background .15s;
}
.opt:active { transform: scale(.98); }
.opt-n { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--border-l); color: var(--t2); font-size: 13px; font-weight: 700; }
.opt.sel { border-color: var(--blue); background: var(--blue-p); }
.opt.sel .opt-n { background: var(--blue); color: #fff; }
.opt.right { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.opt.right .opt-n { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-l); color: var(--red-d); animation: shake .35s; }
.opt.dim { opacity: .5; }

/* nghe rồi chọn */
.lkick { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); margin: 10px 0 14px; }
.lrow { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.say.spk-big { width: 64px; height: 64px; box-shadow: 0 0 0 8px var(--blue-l); }
.say.spk-big .ic { width: 28px; height: 28px; }
.lword { font-size: 27px; line-height: 1.25; letter-spacing: .02em; }
.lhint { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--t2); }
.slow { display: inline-flex; align-items: center; gap: 3px; min-height: 32px; font-weight: 700; color: var(--t2); }
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pic {
	display: grid; place-items: center; min-height: 124px; padding: 14px 10px; border-radius: 16px;
	background: var(--card); box-shadow: var(--sh2); border: 2px solid transparent;
	font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--text); text-align: center; transition: transform .1s, border-color .15s;
}
.pic:active { transform: scale(.97); }
.pic.sel { border-color: var(--blue); background: var(--blue-p); }
.pic.right { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.pic.wrong { border-color: var(--red); background: var(--red-l); color: var(--red-d); animation: shake .35s; }
.pic.dim { opacity: .5; }
.view.lesson:has(.pics) { background: var(--bg); }
.view.lesson:has(.pics) .lsn-foot { background: var(--bg); }

/* ghép câu */
.npc { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.npc-av { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--orange-l); font-size: 28px; }
.npc-b { padding: 12px 16px; border: 2px solid var(--border); border-radius: 14px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--vi); }
.ans-lines {
	min-height: 128px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 16px 8px; padding: 8px 0 0; margin-bottom: 26px;
	background: repeating-linear-gradient(to bottom, transparent 0 58px, var(--border) 58px 60px);
}
.ans-ph { align-self: center; padding: 12px 0; font-size: 14px; color: var(--t3); }
.bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tok {
	min-height: 44px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border);
	background: var(--card); font-size: 16px; font-weight: 700; color: var(--fi); transition: transform .1s;
}
.tok:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.tok.ghost { display: inline-flex; align-items: center; background: var(--border); color: transparent; box-shadow: none; }

/* nối cặp */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt {
	min-height: 72px; padding: 8px 10px; border-radius: 16px; background: var(--bg); border: 2px solid transparent;
	font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--text); text-align: center; transition: transform .1s, background .15s, opacity .3s;
}
.mt.fi { font-size: 17px; font-weight: 800; color: var(--fi); }
.mt:active { transform: scale(.97); }
.mt.sel { background: var(--blue-l); border-color: var(--blue); color: var(--blue-d); }
.mt.err { background: var(--red-l); border-color: var(--red); color: var(--red-d); animation: shake .35s; }
.mt.ok { background: var(--green-l); color: var(--green-d); opacity: .45; }

/* từ mới */
.intro { padding: 22px 18px 20px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); box-shadow: var(--sh2); border-radius: 20px; }
.intro-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.intro-w { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.say.big { width: 52px; height: 52px; }
.say.big .ic { width: 24px; height: 24px; }
.intro-syl { font-size: 14px; color: var(--t2); }
.intro-syl b { text-transform: uppercase; color: var(--fi); }
.intro-syl span { color: var(--t3); }
.intro-v { font-size: 22px; font-weight: 700; color: var(--vi); line-height: 1.35; }
.intro-ex { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.intro-ex > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.intro-ex .fi { font-size: 15px; font-weight: 700; }

/* chân màn bài học + bảng đúng/sai */
.lsn-foot {
	position: fixed; left: 50%; bottom: 0; z-index: 30; transform: translateX(-50%);
	width: 100%; max-width: 480px; padding: 12px 16px calc(16px + var(--sab)); background: var(--card);
}
.lsn-foot.col { display: flex; flex-direction: column; gap: 4px; }
.fb {
	position: fixed; left: 50%; bottom: 0; z-index: 35; transform: translateX(-50%);
	width: 100%; max-width: 480px; padding: 18px 16px calc(16px + var(--sab)); border-radius: 20px 20px 0 0;
	display: flex; flex-direction: column; gap: 6px; animation: fbup .25s ease both;
}
@keyframes fbup { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.fb.ok { background: var(--green-l); }
.fb.no { background: var(--red-l); }
.fb-t { font-size: 19px; font-weight: 800; }
.fb.ok .fb-t { color: var(--green-d); }
.fb.no .fb-t { color: var(--red-d); }
.fb-a { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
.fb-a b { color: var(--fi); }
.fb-n { font-size: 13px; font-weight: 600; color: var(--red-d); }
.fb .btn { margin-top: 8px; }

/* kết quả */
.res { text-align: center; padding-top: 28px; animation: up .3s ease both; }
.res-emo { font-size: 72px; }
.res h1 { margin-top: 10px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--fi); }
.res > p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--t2); }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 20px; }
.rs { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 14px; }
.rs small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rs b { font-size: 25px; font-weight: 800; }
.rs.xp { background: var(--orange-l); color: var(--orange-d); }
.rs.ok { background: var(--green-l); color: var(--green-d); }
.rs.tm { background: var(--blue-l); color: var(--blue-d); }
.res-l { text-align: left; margin: 4px 2px 10px; }
.wchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 8px; background: var(--border-l); }
.wchip b { font-size: 14px; font-weight: 800; color: var(--fi); }
.wchip span { font-size: 12px; font-weight: 600; color: var(--vi); }
.wchip.bad { background: var(--red-l); }
.wchip.bad span { color: var(--red-d); }
.wchip.more { color: var(--t2); font-size: 13px; font-weight: 700; }
.stamp-won { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 auto 18px; width: 170px; padding: 14px 10px 12px; background: #fff; border: 2px dashed var(--c); border-radius: 6px; transform: rotate(-2deg); box-shadow: var(--sh2); }
.stamp-won .emo { font-size: 44px; padding: 10px 0; width: 100%; background: var(--l); border-radius: 4px; }
.stamp-won b { margin-top: 6px; font-size: 15px; font-weight: 800; color: #0f172a; }
.stamp-won small { font-size: 11px; color: #64748b; }

/* =========================================================
   HÔM NAY (1b màn 1)
   ========================================================= */
.today-h h1 { font-size: 22px; }
.today-h .vi { margin-top: 2px; }
.avatar { position: relative; width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--flag); color: #fff; font-size: 19px; font-weight: 800; }
.avatar .badge { position: absolute; right: -6px; bottom: -6px; display: inline-flex; align-items: center; height: 20px; padding: 0 5px; border-radius: 7px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; border: 2px solid var(--bg); }
.avatar .badge .emo { font-size: 10px; }
.goal { display: flex; align-items: center; gap: 16px; padding: 16px; }
.goal-ring, .goal-big { position: relative; display: grid; place-items: center; flex: none; }
.goal-ring > *, .goal-big > * { grid-area: 1 / 1; }
.goal-n { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.goal-n b { font-size: 22px; font-weight: 800; color: var(--fi); }
.goal-n small { font-size: 11px; color: var(--t2); }
.goal-big { margin: 24px auto 0; width: max-content; }
.goal-big .goal-n b { font-size: 30px; }
.goal-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.goal-r b { font-size: 19px; font-weight: 800; color: var(--fi); }
.goal-r small { font-size: 13px; color: var(--t2); margin-bottom: 8px; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.tri-c { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 14px; }
.tri-c .emo { font-size: 17px; margin-bottom: 4px; }
.tri-c b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.tri-c small { font-size: 12px; font-weight: 700; }
.tri-c.blue { background: var(--blue-l); color: var(--blue-d); }
.tri-c.green { background: var(--green-l); color: var(--green-d); }
.tri-c.red { background: var(--red-l); color: var(--red-d); }
.streak { padding: 14px 14px 12px; }
.streak-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.streak-t b { font-size: 15px; font-weight: 800; color: var(--fi); }
.streak-t small { font-size: 12px; color: var(--t3); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); }
.wk { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk small { font-size: 11px; font-weight: 700; color: var(--t3); }
.wk i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; color: #fff; background: var(--border-l); }
.wk.done i { background: var(--orange); }
.wk.today i { background: var(--card); box-shadow: inset 0 0 0 2.5px var(--orange); }
.wk.today.done i { background: var(--orange-l); }
.wk.today small { color: var(--orange-d); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.tcard { flex: none; width: 150px; overflow: hidden; scroll-snap-align: start; }
.tphoto { display: block; width: 100%; height: 64px; background-repeat: no-repeat; background-color: var(--l, var(--blue-l)); }
.tphoto.tint { display: grid; place-items: center; font-size: 30px; }
.tc-b { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 11px; }
.tc-b b { font-size: 14px; font-weight: 800; color: var(--fi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-b small { font-size: 12px; color: var(--t2); }
.tc-b .pbar { margin-top: 4px; }

/* =========================================================
   ÔN TẬP — thẻ lật (1b màn 2)
   ========================================================= */
.view.review { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: calc(16px + var(--sab)); }
.rv-top { display: flex; align-items: center; gap: 8px; margin: 0 -8px 12px; min-height: 44px; }
.rv-prog { flex: 1; height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.rv-prog i { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .5s ease; }
.rv-n { font-size: 13px; font-weight: 700; color: var(--t2); white-space: nowrap; }
.mode-sw { width: auto; padding: 0 8px; font-size: 13px; font-weight: 700; color: var(--blue); }
.rv-tag { margin-bottom: 10px; }
.fcard {
	position: relative; flex: 1; min-height: 360px; border-radius: 20px; box-shadow: var(--sh2);
	touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .2s ease, opacity .2s ease;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 20px; text-align: center; cursor: pointer;
	animation: up .25s ease both;
}
.fc-emo { font-size: 48px; margin-bottom: 10px; }
.fc-w { font-size: 38px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.fc-k { font-size: 14px; color: var(--t3); }
.fc-h { margin-top: 28px; font-size: 13px; line-height: 1.6; color: var(--t3); }
.fc-v { margin-top: 18px; font-size: 24px; font-weight: 700; color: var(--vi); line-height: 1.35; animation: up .25s ease both; }
.fc-ex { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; font-size: 14px; animation: up .25s ease both; }
.fc-ex .fi { font-weight: 700; }
.fc-say { position: absolute; top: 14px; right: 14px; }
.rv-foot { padding-top: 14px; }
.btn.xl { min-height: 56px; font-size: 16px; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gb { min-height: 60px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform .1s; }
.gb:active { transform: scale(.96); }
.gb b { font-size: 15px; font-weight: 800; }
.gb small { font-size: 11px; font-weight: 600; opacity: .85; }
.gb.red { background: var(--red-l); color: var(--red-d); }
.gb.orange { background: var(--orange-l); color: var(--orange-d); }
.gb.green { background: var(--green-l); color: var(--green-d); }
.gb.blue { background: var(--blue-l); color: var(--blue-d); }

/* thẻ vuốt (3c) */
.view.review.swipe { background: var(--card); }
.sw-h { display: flex; align-items: center; gap: 8px; margin: 0 -8px 16px; min-height: 44px; }
.sw-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sw-t b { font-size: 20px; font-weight: 800; color: var(--fi); line-height: 1.2; }
.sw-t small { font-size: 13px; color: var(--t2); }
.cnt { height: 32px; padding: 0 10px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.cnt.bad { background: var(--red-l); color: var(--red-d); }
.cnt.good { background: var(--green-l); color: var(--green-d); }
.sw-stack { position: relative; flex: 1; min-height: 430px; margin-bottom: 14px; }
.sw-under { position: absolute; inset: 14px 14px -10px; border-radius: 28px; background: var(--l); }
.swc {
	position: absolute; inset: 0 0 6px; border-radius: 28px; background: var(--c); color: #fff;
	display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 18px 22px; cursor: grab; touch-action: pan-y;
	transition: transform .25s ease; user-select: none; -webkit-user-select: none;
}
.sw-art { position: absolute; inset: 14px 14px auto; height: 52%; border-radius: 20px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; font-size: 96px; }
.sw-w { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.sw-v { margin-top: 6px; font-size: 22px; font-weight: 700; color: #fff; opacity: .95; animation: up .25s ease both; }
.sw-hint { margin-top: 8px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.sw-lab { position: absolute; top: 26px; padding: 6px 12px; border-radius: 10px; border: 3px solid #fff; font-size: 20px; font-weight: 800; opacity: 0; z-index: 2; }
.sw-lab.yes { left: 22px; transform: rotate(-12deg); background: var(--green); }
.sw-lab.no { right: 22px; transform: rotate(12deg); background: var(--red); }
.sw-btns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.swb { min-height: 60px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform .1s; }
.swb:active { transform: scale(.96); }
.swb b { font-size: 16px; font-weight: 800; }
.swb small { font-size: 11px; font-weight: 600; }
.swb.no { background: var(--red-l); color: var(--red-d); }
.swb.yes { background: var(--green); color: #fff; }
.say.round { width: 52px; height: 52px; background: var(--border-l); color: var(--t2); }

/* =========================================================
   TỪ VỰNG (3a)
   ========================================================= */
.ok-n { color: var(--green-d); font-weight: 700; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--t3); margin-bottom: 14px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--t3); }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.wotd { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--flag); color: #fff; margin-bottom: 14px; }
.wotd-emo { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .14); }
.wotd > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.wotd small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.wotd b { font-size: 21px; font-weight: 800; line-height: 1.25; }
.wotd span span { font-size: 13px; opacity: .85; }
.segm { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--border); margin-bottom: 14px; }
.segm button, .segm a { min-height: 38px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--t2); display: grid; place-items: center; transition: background .15s; }
.segm .on { background: var(--card); color: var(--fi); font-weight: 700; box-shadow: var(--sh); }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tt { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; }
.tt-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tt-emo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; background: var(--l); }
.tt small { font-size: 12px; color: var(--t3); font-weight: 600; }
.tt b { font-size: 15px; font-weight: 700; color: var(--fi); line-height: 1.3; min-height: 2.6em; display: flex; align-items: flex-end; }
.note { font-size: 13px; color: var(--t3); margin: 12px 2px 0; line-height: 1.5; }

.wrow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; }
.wrow.bad { background: var(--red-l); }
.wrow-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 4px 0; }
.wrow-m b { font-size: 16px; overflow-wrap: anywhere; }
.wrow .tag { flex: none; }

/* trang chủ đề */
.view.flush .pad { padding: 0 16px; }
.view.topic-view { padding-top: 0; }
.thero { position: relative; height: calc(210px + var(--sat)); overflow: hidden; margin-bottom: 14px; color: #fff; background: var(--c); }
.thero .tphoto { position: absolute; inset: 0; height: 100%; }
.thero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .1) 30%, rgba(15, 23, 42, .78)); }
.thero.tint::after { background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, .35)); }
.thero-emo { position: absolute; right: 18px; top: calc(var(--sat) + 30px); font-size: 92px; opacity: .9; }
.thero .rbtn { position: absolute; z-index: 2; left: 16px; top: calc(var(--sat) + 12px); }
.rbtn.glass { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.thero-t { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px; }
.thero-t small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.thero-t h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.thero-t p { font-size: 13px; opacity: .92; margin-top: 2px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.mode { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px; font-size: 13px; font-weight: 700; color: var(--fi); }
.mode .emo { font-size: 22px; }
.tfoot { position: sticky; bottom: calc(var(--nav-h) + max(var(--sab), 8px) + 8px); display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 18px; z-index: 5; }
.tfoot .btn.line { background: var(--card); }

/* trang từ */
.wcard { overflow: hidden; }
.w-ph { display: block; height: 130px; }
.w-ph.tint { display: grid; place-items: center; background: var(--l); font-size: 60px; }
.wc-b { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.wc-top { display: flex; align-items: center; gap: 12px; }
.wc-top h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.wc-syl { font-size: 14px; color: var(--t2); }
.wc-syl b { text-transform: uppercase; color: var(--fi); }
.wc-syl span { color: var(--t3); font-size: 13px; }
.wc-v { font-size: 19px; font-weight: 700; color: var(--vi); line-height: 1.35; }
.wc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.srs-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border-l); font-size: 12px; color: var(--t2); }
.rbtn.fav { color: var(--t3); }
.rbtn.fav.on { color: var(--orange); }
.rbtn.fav.on .ic { fill: currentColor; }
.exrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.exm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exm b { font-size: 15px; font-weight: 700; }
.wnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* nối cặp chủ đề: thanh tiến độ chia lượt */
.segbar { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.segbar i { position: relative; height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.segbar i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--blue); border-radius: inherit; transition: width .4s ease; }

/* gõ từ */
.typebox { display: flex; flex-direction: column; gap: 10px; }
.typebox input { height: 58px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--card); font-size: 20px; font-weight: 700; color: var(--fi); outline: 0; }
.typebox input:focus { border-color: var(--blue); }
.typebox.right input { border-color: var(--green); background: var(--green-l); }
.typebox.wrong input { border-color: var(--red); background: var(--red-l); }
.uml { display: flex; gap: 8px; }
.uml button { width: 52px; height: 44px; border-radius: 10px; border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); font-size: 18px; font-weight: 800; color: var(--fi); background: var(--card); }

/* =========================================================
   NGỮ PHÁP (3b)
   ========================================================= */
.gnext { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; margin-bottom: 14px; }
.gnext .ring { position: relative; }
.gn-pct { position: absolute; left: 16px; width: 52px; text-align: center; font-size: 12px; font-weight: 800; color: var(--fi); }
.gn-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gn-m small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); }
.gn-m b { font-size: 16px; font-weight: 800; color: var(--fi); line-height: 1.3; }
.gn-m span { font-size: 12px; color: var(--t2); }
.gnext .chev { color: var(--t3); }
.gaccs { display: flex; flex-direction: column; gap: 10px; }
.gacc { overflow: hidden; }
.gacc-h { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; text-align: left; }
.gacc-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: var(--gl); }
.gacc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gacc-t b { font-size: 16px; font-weight: 800; color: var(--fi); }
.gacc-t small { font-size: 12px; color: var(--t2); }
.gacc-ar { font-size: 11px; color: var(--t3); transition: transform .2s; }
.gacc.open .gacc-ar { transform: rotate(90deg); }
.gacc-b { border-top: 1px solid var(--border-l); padding: 4px 0 6px; animation: up .2s ease both; }
.gl { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 16px 8px 30px; font-size: 15px; font-weight: 500; color: var(--text); }
.gl i { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--border-l); box-shadow: inset 0 0 0 1.5px var(--border); }
.gl.read i { background: var(--green); box-shadow: none; }
.gl.cur { background: var(--blue-p); font-weight: 700; color: var(--fi); }
.gl.cur i { background: var(--card); box-shadow: inset 0 0 0 6px var(--blue); }
.gl:active { background: var(--hover); }
.gex { margin-top: 14px; }

/* bài lý thuyết */
.view.rule-view { background: var(--card); padding-top: 0; }
.rtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; margin: 0 -16px 10px; padding: calc(var(--sat) + 6px) 8px 6px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-l); }
.rprog { flex: 1; height: 4px; border-radius: 99px; background: var(--border); overflow: hidden; }
.rprog i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .15s; }
.aa { width: auto; padding: 0 10px; font-size: 14px; font-weight: 800; color: var(--t2); }
.rart { animation: up .25s ease both; }
.rart .kick { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.rt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--fi); margin-top: 6px; }
.rmeta { font-size: 13px; color: var(--t2); margin: 6px 0 16px; }
.rexp { padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--blue-p); font-size: 15px; line-height: 1.85; color: var(--text); }
.gh { font-size: 17px; font-weight: 800; color: var(--fi); margin: 22px 0 10px; }
.grules { display: flex; flex-direction: column; gap: 8px; }
.grule { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); }
.grule .gn { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; margin-top: 1px; }
.grule b { font-size: 14px; font-weight: 700; color: var(--fi); }
.grule p { font-size: 14px; line-height: 1.65; color: var(--t2); margin-top: 2px; }
.gtbl-w { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.gtbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.gtbl th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t2); background: var(--bg-alt); white-space: nowrap; }
.gtbl td { padding: 10px 12px; border-top: 1px solid var(--border-l); color: var(--text); vertical-align: top; }
.gtbl td.fi { font-weight: 700; }
.callout { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
.callout.tip { background: var(--orange-l); border: 1px solid var(--yellow-b); color: var(--text); }
.callout.warn { background: var(--red-l); color: var(--text); }
.callout.warn b { color: var(--red-d); }
.vh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.vh-c { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; text-align: center; }
.vh-c small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.vh-c b { font-size: 24px; font-weight: 800; letter-spacing: .12em; }
.vh-c span { font-size: 11px; font-weight: 600; }
.vh-c.b { background: var(--blue-l); color: var(--blue-d); }
.vh-c.n { background: var(--border-l); color: var(--t2); }
.vh-c.f { background: var(--pink-l); color: var(--pink-d); }
i.vb, i.vf, i.vn { font-style: normal; }
i.vb { color: var(--blue); }
i.vf { color: var(--pink); }
i.vn { color: var(--t3); }
.qq { margin-top: 22px; padding: 14px; border: 1px solid var(--border); }
.qq-k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green-d); margin-bottom: 8px; }
.qq-q + .qq-q { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-l); }
.qq-q > b { display: block; font-size: 16px; }
.qq-h { display: block; font-size: 12px; color: var(--t3); margin: 2px 0 8px; }
.qq-opts { display: flex; flex-direction: column; gap: 8px; }
.qq-o { min-height: 46px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--border); background: var(--card); text-align: left; font-size: 14px; font-weight: 600; color: var(--text); }
.qq-o.right { border-color: var(--green); background: var(--green-l); color: var(--green-d); }
.qq-o.wrong { border-color: var(--red); background: var(--red-l); color: var(--red-d); }
.qq-o.dim { opacity: .5; }
.qq-ex { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--t2); }
.rend { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 26px 0 8px; }
.view.gbig .rexp, .view.gbig .grule p, .view.gbig .callout, .view.gbig .gtbl { font-size: 17px; }
.view.gbig .exm b { font-size: 17px; }

/* che nghĩa: chạm để xem */
.spoil { cursor: pointer; border-radius: 4px; color: transparent !important; background: var(--border); transition: color .2s, background .2s; -webkit-user-select: none; user-select: none; }
.spoil.shown { color: inherit !important; background: transparent; }
.bb-vi.spoil.shown { color: var(--vi) !important; }
.chip-btn { min-height: 32px; padding: 0 10px; border-radius: 8px; background: var(--blue-l); color: var(--blue-d); font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip-btn.on { background: var(--blue); color: #fff; }

/* =========================================================
   HỘI THOẠI NHẬP VAI (1c)
   ========================================================= */
.photo-scene { display: block; background-size: auto 300%; background-repeat: no-repeat; }
.view.dlg { padding-top: 0; padding-bottom: calc(24px + var(--sab)); }
.view.dlg.has-turn { padding-bottom: calc(290px + var(--sab)); }
.dlg-bg { position: fixed; inset: 0; left: 50%; width: 100%; max-width: 480px; transform: translateX(-50%); z-index: -1; }
.dlg-bg .photo-scene { position: absolute; inset: 0; filter: saturate(.9); }
.dlg-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(240, 244, 248, .45), rgba(240, 244, 248, .82)); }
:root[data-theme="dark"] .dlg-bg::after { background: linear-gradient(rgba(11, 18, 32, .6), rgba(11, 18, 32, .9)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dlg-bg::after { background: linear-gradient(rgba(11, 18, 32, .6), rgba(11, 18, 32, .9)); } }
.dlg-h { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; margin: 0 -16px 12px; padding: calc(var(--sat) + 8px) 12px 8px 6px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.dlg-av { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--orange-l); font-size: 18px; }
.dlg-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dlg-t b { font-size: 15px; font-weight: 800; color: var(--fi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-t small { font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }
.bb { max-width: 84%; display: flex; flex-direction: column; gap: 3px; animation: up .25s ease both; }
.bb.them { align-self: flex-start; }
.bb.me { align-self: flex-end; align-items: flex-end; }
.bb-who { font-size: 11px; font-weight: 700; color: var(--t2); margin-left: 4px; }
.bb-c { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 16px 16px 16px 4px; background: var(--card); box-shadow: var(--sh); }
.bb-c b { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--fi); }
.bb.me .bb-c { border-radius: 16px 16px 4px 16px; background: var(--blue); }
.bb.me .bb-c b { color: #fff; }
.bb.miss .bb-c { box-shadow: 0 0 0 2px var(--orange); }
.bb-say { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--blue-l); color: var(--blue); }
.bb-say .ic { width: 15px; height: 15px; }
.bb.me .bb-say { background: rgba(255, 255, 255, .22); color: #fff; }
.bb-say.playing { animation: pulse 1.6s ease-out infinite; }
.bb-vi { font-size: 13px; font-weight: 600; color: var(--vi); padding: 0 4px; }
.bb.me .bb-vi { text-align: right; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sh); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--t3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.turn {
	position: fixed; left: 50%; bottom: 0; z-index: 30; transform: translateX(-50%); width: 100%; max-width: 480px;
	display: flex; flex-direction: column; gap: 10px; padding: 16px 16px calc(14px + var(--sab));
	background: var(--card); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 24px rgba(15, 23, 42, .12); animation: fbup .25s ease both;
}
.tro { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--card); text-align: left; transition: transform .1s; }
.tro:active { transform: scale(.98); border-color: var(--blue); background: var(--blue-p); }
.tro b { font-size: 15px; font-weight: 800; color: var(--fi); }
.tro span { font-size: 13px; font-weight: 600; color: var(--vi); }
.tro.right { border-color: var(--green); background: var(--green-l); }
.tro.wrong { border-color: var(--red); background: var(--red-l); animation: shake .35s; }
.tro.dim { opacity: .5; }
.tr-or { display: flex; align-items: center; gap: 10px; }
.tr-or span { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--t3); }
.tr-or span::before, .tr-or span::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.mic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.de-t { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--fi); margin: 10px 0 6px; }
.de-s { font-size: 14px; color: var(--t2); margin-bottom: 14px; }
.de-btns { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 18px; }
.de-btns .btn { white-space: nowrap; padding: 0 12px; }
.dlg-all { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* danh sách hội thoại & mẫu câu */
.dlist { display: flex; flex-direction: column; gap: 10px; }
.dcard { display: flex; align-items: stretch; overflow: hidden; min-height: 92px; }
.dc-ph { width: 104px; flex: none; }
.dc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.dc-b b { font-size: 15px; font-weight: 800; color: var(--fi); line-height: 1.3; }
.fi-s { font-size: 12px; color: var(--t2); font-style: italic; }
.dc-m { font-size: 12px; color: var(--t3); margin-top: auto; }
.pats { display: flex; flex-direction: column; gap: 10px; }
.pat { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.pat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pat-top b { font-size: 16px; line-height: 1.4; }
.pat-vi { align-self: flex-start; }
.puhe { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--pink-l); color: var(--pink-d); font-size: 13px; font-weight: 600; }
.puhe b { color: var(--pink-d); font-weight: 800; }
.puhe .say { background: rgba(255, 255, 255, .6); color: var(--pink); }
.pat-note { font-size: 13px; color: var(--t2); }

/* =========================================================
   TIẾN ĐỘ (1b màn 4) + BỘ TEM (2b)
   ========================================================= */
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.ps small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); }
.ps b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--fi); line-height: 1.15; }
.ps span { font-size: 12px; color: var(--t3); }
.heat { margin-top: 10px; padding: 14px; }
.hgrid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, auto); gap: 4px; margin-top: 10px; }
.hgrid i, .hleg i { display: block; aspect-ratio: 1; border-radius: 3px; }
.h1 { background: var(--border-l); }
.h2 { background: var(--blue-l); }
.h3 { background: #93c5fd; }
.h4 { background: var(--blue); }
.hf { background: transparent; }
.hgrid i.hf { background: transparent; box-shadow: inset 0 0 0 1px var(--border-l); }
.hleg { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--t3); }
.hleg i { width: 12px; }
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; }
.hrow b { font-size: 15px; }
.hx { font-size: 13px; font-weight: 800; color: var(--red); }
.empty-s { padding: 16px; font-size: 14px; color: var(--t2); text-align: center; }
.stamps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.stamp { display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 10px; background: #fff; border: 2px dashed var(--border); border-radius: 4px; box-shadow: var(--sh); transform: rotate(-1.6deg); transition: transform .15s; }
.stamp:nth-child(even) { transform: rotate(1.8deg); }
.stamp:active { transform: scale(.97); }
.st-img { position: relative; display: grid; place-items: center; aspect-ratio: 1.25; border-radius: 2px; background: #f1f5f9; font-size: 44px; }
.stamp b { margin-top: 6px; font-size: 15px; font-weight: 800; color: #0f172a; }
.stamp small { font-size: 11px; color: #64748b; }
.stamp.done { border-color: var(--c); }
.stamp.done .st-img { background: var(--l); }
.stamp.part .st-img { background: var(--l); opacity: .9; }
.stamp.part .st-img .emo { opacity: .75; }
.stamp.lock .st-img .emo { filter: grayscale(1); opacity: .35; }
.stamp.lock b { color: #94a3b8; }
.st-ok { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 13px; font-weight: 800; color: var(--c); }
.st-p { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--d); }
.stamp-tip { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--orange-l); border: 1px solid var(--yellow-b); font-size: 14px; line-height: 1.55; color: var(--text); }

/* =========================================================
   MÀN CHÀO LẦN ĐẦU
   ========================================================= */
.view.onboard { background: var(--card); padding-bottom: calc(150px + var(--sab)); }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin: 6px 0 18px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border); transition: width .25s, background .25s; }
.ob-dots i.on { width: 24px; background: var(--blue); }
.ob-dots i.done { background: var(--blue-l); }
.ob-body { animation: up .3s ease both; }
.ob-hero { position: relative; height: 180px; margin: 0 -16px 22px; overflow: hidden; background: var(--flag); display: grid; place-items: center; }
.ob-flag { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 30%, #fff 30% 42%, transparent 42%), linear-gradient(transparent 0 40%, #fff 40% 58%, transparent 58%); opacity: .14; }
.ob-mark { position: relative; width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; background: #fff; color: var(--flag); font-size: 46px; font-weight: 800; box-shadow: var(--sh3); }
.ob-mark span { color: var(--blue); }
.ob-t { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--fi); line-height: 1.2; }
.ob-s { font-size: 15px; line-height: 1.6; color: var(--t2); margin: 8px 0 18px; }
.ob-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ob-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 600; color: var(--text); }
.ob-list .emo { font-size: 20px; }
.ob-opts { display: flex; flex-direction: column; gap: 10px; }
.ob-o { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--card); text-align: left; transition: transform .1s, border-color .15s; }
.ob-o:active { transform: scale(.98); }
.ob-o .emo { font-size: 28px; }
.ob-o > span:last-child { display: flex; flex-direction: column; }
.ob-o b { font-size: 16px; font-weight: 800; color: var(--fi); }
.ob-o small { font-size: 13px; color: var(--t2); }
.ob-o.on { border-color: var(--blue); background: var(--blue-p); }
.ob-num { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue-d); font-size: 18px; font-weight: 800; }
.ob-o.on .ob-num { background: var(--blue); color: #fff; }
.ob-name { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ob-name input, .field { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--card); font-size: 16px; color: var(--text); outline: 0; }
.ob-name input:focus, .field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
textarea.field { height: 96px; padding: 12px 14px; margin: 10px 0; font-size: 13px; resize: vertical; }

/* =========================================================
   TRANG PHỤ: phỏng vấn, luyện viết, bài tập, cài đặt
   ========================================================= */
.pvs { display: flex; flex-direction: column; gap: 10px; }
.pv summary { display: flex; align-items: flex-start; gap: 10px; padding: 14px; list-style: none; cursor: pointer; }
.pv summary::-webkit-details-marker { display: none; }
.pv-n { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--border-l); color: var(--t2); font-size: 12px; font-weight: 800; }
.pv-q { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pv-q b { font-size: 15px; line-height: 1.4; }
.pv-a { padding: 0 14px 14px 50px; display: flex; flex-direction: column; gap: 6px; }
.pv-try { font-size: 12px; color: var(--t3); }
.pv-s { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--green-l); }
.pv-s b { flex: 1; font-size: 14px; line-height: 1.5; }
.pv-a > .vi { align-self: flex-start; }
.wr-p { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.wr-p .fi { font-size: 16px; line-height: 1.55; }
.wr-p .vi { align-self: flex-start; }
.wr-k { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.draft { width: 100%; min-height: 200px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--card); font-size: 16px; line-height: 1.6; color: var(--fi); resize: vertical; outline: 0; }
.draft:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-l); }
.model { margin-top: 12px; padding: 0 14px; }
.model summary { min-height: 48px; display: flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--blue); cursor: pointer; }
.model p { padding-bottom: 12px; font-size: 15px; line-height: 1.6; }
.model .vi { font-size: 14px; }
.exscore { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--t2); }
.exscore.fin { color: var(--green-d); }
.exs { display: flex; flex-direction: column; gap: 12px; }
.exq { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.exq.is-ok { box-shadow: 0 0 0 2px var(--green); }
.exq.is-no { box-shadow: 0 0 0 2px var(--red); }
.exq-top { display: flex; gap: 10px; }
.exq-n { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--blue-l); color: var(--blue-d); font-size: 12px; font-weight: 800; }
.exq-q { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--fi); }
.blank { display: inline-block; min-width: 40px; border-bottom: 2px solid var(--blue); color: transparent; }
.opt.sm { min-height: 48px; font-size: 15px; }
.exq-in { display: flex; gap: 8px; }
.exq-in input, .exq textarea { flex: 1; min-width: 0; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card); font-size: 16px; color: var(--fi); outline: 0; }
.exq textarea { resize: vertical; }
.exq-in input:focus, .exq textarea:focus { border-color: var(--blue); }
.exq-fb { font-size: 14px; color: var(--t2); }
.exq-fb.ok { color: var(--green-d); font-weight: 700; margin-top: 10px; }
.exq-alt { font-size: 12px; color: var(--t3); }
.hintbtn { align-self: flex-start; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--orange-d); }
.cj-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cj-head b { font-size: 18px; }
.cj-row { display: flex; align-items: center; gap: 10px; }
.cj-p { width: 70px; flex: none; font-size: 14px; font-weight: 700; color: var(--t2); }
.cj-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--card); font-size: 16px; color: var(--fi); outline: 0; }
.cj-row.ok input { border-color: var(--green); background: var(--green-l); }
.cj-row.no input { border-color: var(--red); background: var(--red-l); }
.cj-a { font-size: 13px; font-weight: 700; color: var(--green-d); }
.set-c { padding: 6px 14px; margin-bottom: 12px; }
.set-c > .lbl { padding-top: 10px; }
.set-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; font-size: 15px; color: var(--text); }
.set-r + .set-r { border-top: 1px solid var(--border-l); }
.set-r.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
.segm.sm { margin: 0; }
.segm.sm button { font-size: 13px; }
.inst { padding: 8px 0 12px 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.inst .ic { display: inline; width: 16px; height: 16px; vertical-align: -3px; }
.danger-t { color: var(--red-d); font-weight: 700; }
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: 99px; background: var(--border); transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--sh); transition: transform .2s; }
.switch.on { background: var(--green); }
.switch.on i { transform: translateX(20px); }
.set-c .btn.wide + .btn.wide { margin-top: 0; }
.set-c .btn.soft.wide { margin-bottom: 4px; }

/* lối vào nhanh ở tab Học: ôn thẻ + lật thẻ */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.qk { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; }
.qk-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--purple-l); font-size: 22px; }
.qk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qk-m b { font-size: 15px; font-weight: 800; color: var(--fi); }
.qk-m small { font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
 * Polku 2.0 — lộ trình theo can-do, tuyến Đi làm, Góc nghề (R1)
 * Cùng token và kiểu thẻ của bản Claude Design: thẻ trắng bo 14–16, không gradient, nút ≥44px
 * ============================================================ */
/* tuyến tàu: nhãn phần, bước của bài, can-do */
.ch-lbl { display: flex; justify-content: space-between; gap: 10px; margin: -4px 4px 10px; font-size: 12px; font-weight: 700; color: var(--t2); }
.stc-step { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--d); }
.cando { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--blue-p); font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--fi); }
.cando .emo { font-size: 16px; }
.cando .ok-n { margin-left: auto; }
.gate-n { margin: -4px 2px 0; }
/* bài học: nghe tình huống, mẩu đọc, điền chỗ trống, cặp âm */
.scene { display: flex; flex-direction: column; gap: 10px; }
.scene .bb { max-width: 92%; }
.lsn-foot .foot2 { display: grid; grid-template-columns: auto 1fr; gap: 10px; width: 100%; }
.reading { padding: 16px; border: 1px solid var(--border); }
.rd-fi { white-space: pre-line; font-size: 16px; font-weight: 600; line-height: 1.7; font-variant-numeric: tabular-nums; }
.rd-vi { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 13px; line-height: 1.6; }
.fillq { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; margin-bottom: 14px; border: 1px solid var(--border); }
.fillq .fi { font-size: 20px; font-weight: 700; line-height: 1.5; }
.fillq .vi { font-size: 14px; font-weight: 600; }
.blank { display: inline-block; min-width: 56px; padding: 0 6px; border-bottom: 2.5px solid var(--blue); color: var(--blue-d); text-align: center; }
.blank.ok { border-color: var(--green); color: var(--green-d); }
.blank.no { border-color: var(--red); color: var(--red-d); text-decoration: line-through; }
.pics.two { grid-template-columns: 1fr 1fr; }
.pic.pair { flex-direction: column; gap: 4px; }
.pic.pair b { font-size: 24px; font-weight: 800; letter-spacing: .01em; }
.pic.pair small { font-size: 13px; font-weight: 600; color: var(--t2); }
.intro-w.sm { font-size: 24px; line-height: 1.3; }
.say.tts { opacity: .85; }
/* kết quả bài: tự đánh giá can-do + Thử ngoài đời */
.cando-box { padding: 14px; margin: 0 0 12px; text-align: left; }
.cando-box .lbl { margin-bottom: 10px; }
.segm.three { margin: 0; }
.mission { padding: 14px 16px; margin-bottom: 12px; text-align: left; border: 1.5px solid var(--orange-l); }
.ms-k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-d); margin-bottom: 6px; }
.mission p { font-size: 14px; line-height: 1.55; color: var(--t2); }
.ms-fi { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.ms-fi .fi { font-size: 17px; font-weight: 800; }
.ms-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border-l); }
.ms-row:first-of-type { border-top: 0; padding-top: 0; }
.ms-row .btn { align-self: flex-start; }
/* Hôm nay: bước tiếp theo, câu của ngày, tin mới */
.nextc { padding: 14px 16px 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.nx-h { display: flex; align-items: center; gap: 12px; }
.nx-emo, .nx-emo.emo { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--l, var(--blue-l)); }
.nx-h > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nx-h small { font-size: 12px; font-weight: 700; color: var(--t2); }
.nx-h b { font-size: 17px; font-weight: 800; color: var(--fi); line-height: 1.3; }
.nx-h span { font-size: 13px; font-weight: 600; color: var(--d, var(--blue-d)); }
.pod { padding: 14px 16px 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pod-fi { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pod-fi .fi { font-size: 20px; font-weight: 800; line-height: 1.35; }
.pod .vi { font-size: 14px; font-weight: 600; }
.today-view .mission, .today-view .row.card { margin-top: 12px; }
.callout.news { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.callout.news .btn { align-self: flex-start; }
/* Góc nghề */
.pk-list { display: flex; flex-direction: column; gap: 10px; }
.pkc { display: flex; align-items: center; gap: 12px; padding: 14px; border-left: 4px solid var(--c); }
.pk-emo { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--l); }
.pk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pk-m b { font-size: 16px; font-weight: 800; color: var(--fi); }
.pk-d { font-size: 13px; color: var(--t2); line-height: 1.45; }
.pk-m .pbar { margin-top: 4px; }
.pk-soon { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pks { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r); border: 1.5px dashed var(--border); color: var(--t2); }
.pks .emo { font-size: 22px; filter: grayscale(.4); }
.pks b { font-size: 14px; font-weight: 700; color: var(--text); }
.pks small { font-size: 12px; line-height: 1.4; }
.pk-hero { position: relative; display: flex; align-items: flex-end; gap: 14px; margin: calc(-1 * var(--sat) - 10px) -16px 16px; padding: calc(var(--sat) + 64px) 16px 18px; background: var(--l); }
.pk-hero .rbtn { position: absolute; top: calc(var(--sat) + 12px); left: 12px; }
.pk-big { width: 72px; height: 72px; flex: none; border-radius: 20px; display: grid; place-items: center; font-size: 40px; background: #fff; box-shadow: var(--sh2); }
.pk-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: #0f172a; line-height: 1.2; }
.pk-hero p { font-size: 13px; color: #334155; line-height: 1.5; margin-top: 2px; }
.pk-hero .fi-s { font-size: 12px; font-weight: 700; color: var(--d); }
.pk-stat { font-weight: 700; }
.segm.scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.segm.scroll::-webkit-scrollbar { display: none; }
.segm.scroll a { flex: 1 0 auto; padding: 0 12px; white-space: nowrap; }
.sq.ok { background: var(--green-l); color: var(--green-d); font-weight: 800; }
.sq.part { background: var(--orange-l); color: var(--orange-d); font-size: 12px; font-weight: 800; }
.facts { display: flex; flex-direction: column; gap: 10px; }
.fact { padding: 14px 16px; }
.fact-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 16px; font-weight: 800; color: var(--fi); }
.fact p { font-size: 14px; line-height: 1.65; color: var(--t2); }
/* Từ vựng: Từ của tôi */
.tt.mine-t .tt-s { font-size: 12px; color: var(--t2); margin-top: -4px; }
.mine-form { display: flex; flex-direction: column; gap: 10px; }
.wrow .rbtn.sm { width: 36px; height: 36px; flex: none; }
/* màn chào */
.ob-o > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ob-ck { width: 26px; height: 26px; flex: none; border-radius: 99px; display: grid; place-items: center; border: 2px solid var(--border); font-style: normal; font-size: 14px; font-weight: 800; color: #fff; }
.ob-o.on .ob-ck { background: var(--blue); border-color: var(--blue); }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-job { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 104px; padding: 12px; border-radius: 14px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--card); text-align: left; transition: transform .1s, border-color .15s; }
.ob-job:active { transform: scale(.98); }
.ob-job .emo { font-size: 28px; }
.ob-job b { font-size: 14px; font-weight: 800; color: var(--fi); line-height: 1.25; }
.ob-job small { font-size: 12px; color: var(--t2); line-height: 1.35; }
.ob-job.soon small { color: var(--orange-d); font-weight: 700; }
.ob-job.on { border-color: var(--blue); background: var(--blue-p); }
.ob-lbl { margin: 18px 2px 8px; }
.ob-seek { margin-top: 14px; width: 100%; }
.ob-route { list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: r; }
.ob-route li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card); border-left: 4px solid var(--c); box-shadow: var(--sh); counter-increment: r; }
.ob-route .emo { font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--l); flex: none; }
.ob-route li > span:last-child { display: flex; flex-direction: column; }
.ob-route b { font-size: 15px; font-weight: 800; color: var(--fi); }
.ob-route small { font-size: 12px; color: var(--t2); }
/* Cài đặt: hồ sơ học */
.chips.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.pick .chip { min-height: 38px; padding: 0 12px; cursor: pointer; border: 1.5px solid var(--border); background: var(--card); }
.chips.pick .chip.on { border-color: var(--blue); background: var(--blue-p); color: var(--blue-d); }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--t3) 50%), linear-gradient(135deg, var(--t3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
/* Tiến độ: cấp, can-do */
.lvc { padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.lvc-h { display: flex; align-items: center; gap: 12px; }
.lvc-h > div { flex: 1; display: flex; flex-direction: column; }
.lvc-h b { font-size: 16px; font-weight: 800; color: var(--fi); }
.lvc-h small { font-size: 13px; color: var(--t2); }
.lvc-b { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--flag); color: #fff; font-size: 15px; font-weight: 800; }
.lvc .emo { font-size: 26px; }
.lvc .note { margin: 0; }
.pstats.four { grid-template-columns: 1fr 1fr; }
.cdl { margin-top: 12px; }
.cdl summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; list-style: none; cursor: pointer; }
.cdl summary::-webkit-details-marker { display: none; }
.cdl summary b { font-size: 15px; font-weight: 800; color: var(--fi); }
.cdl summary span { font-size: 13px; font-weight: 700; color: var(--green-d); }
.cdl .row .t { font-weight: 600; font-size: 14px; line-height: 1.4; }
/* ảnh cảnh: hội thoại chưa có tranh → nền màu + emoji */
.photo-scene.tint { display: grid; place-items: center; background: var(--blue-l); }
.photo-scene.tint .emo { font-size: 40px; }
.dc-ph.tint .emo { font-size: 30px; }
/* câu nói nhanh (puhekieli) trong bong bóng hội thoại */
.bb-pu { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 6px 10px; border-radius: 10px; background: var(--pink-l); color: var(--pink-d); font-size: 12.5px; font-weight: 600; }
.bb-pu b { font-weight: 800; }
.bb.me .bb-pu { align-self: flex-end; }
.scene-who { margin: -4px 0 10px; font-size: 13px; color: var(--t2); }
.scene-who b { color: var(--fi); }
.pu-note { margin-top: 10px; }
/* bài kiểm tra cuối cấp: đoạn nghe, mẩu đọc kèm câu hỏi, phần thi, viết, nói */
.clip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.clip b { font-size: 15px; color: var(--fi); }
.clip-tx, .rd-mini { padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.clip-tx summary, .rd-mini summary { cursor: pointer; font-weight: 700; color: var(--t2); }
.clip-tx p { margin: 8px 0 0; line-height: 1.45; }
.clip-tx .vi { color: var(--vi); font-size: 13px; }
.rd-mini .rd-fi { margin-top: 8px; white-space: pre-line; line-height: 1.5; font-size: 15px; }
.part-h { margin-bottom: 14px; }
.part { padding: 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.part-k { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.part-emo { font-size: 44px; line-height: 1.2; }
.wbox textarea { min-height: 140px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--card); font: inherit; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--fi); outline: 0; resize: vertical; }
.wbox textarea:focus { border-color: var(--blue); }
.wbox.right textarea { border-color: var(--green); background: var(--green-l); }
.wbox.wrong textarea { border-color: var(--orange); background: var(--orange-l); }
.wchk { display: flex; flex-wrap: wrap; gap: 6px; }
.wchk span { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.wchk .ok { background: var(--green-l); color: var(--green-d); }
.wchk .no { background: var(--red-l); color: var(--red-d); }
.fb-v { font-size: 13px; color: var(--vi); }
.fb-mod { display: flex; flex-direction: column; gap: 4px; }
.fb-mod small { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--t2); }
.tparts { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.tp-row { display: grid; grid-template-columns: 24px 1fr 1.2fr 40px; align-items: center; gap: 8px; font-size: 14px; }
.tp-n { text-align: right; font-weight: 800; color: var(--t2); }
/* bảng dạng từ ở trang từ */
.wforms { padding: 12px 14px; margin-bottom: 18px; overflow-x: auto; }
.fm { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.fm th:first-child { width: 40%; }
.fm.v th:first-child { width: 22%; }
.fm th, .fm td { padding: 7px 6px; text-align: left; border-bottom: 1px solid var(--border-l); vertical-align: top; }
.fm thead th { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--t2); }
.fm tbody th { font-weight: 700; color: var(--text); white-space: nowrap; }
.fm tbody th small { display: block; font-size: 11.5px; font-weight: 600; color: var(--t3); white-space: normal; }
.fm td.fi { font-weight: 700; color: var(--fi); overflow-wrap: anywhere; }
.fm tr:last-child th, .fm tr:last-child td { border-bottom: 0; }
.fm-k { font-size: 13px; font-weight: 700; color: var(--t2); margin-bottom: 6px; }
.fm-k a { color: var(--blue); }
.fm-neg { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: 13px; }
.fm-neg .fi { font-weight: 700; color: var(--fi); line-height: 1.5; }
.fm-more { margin-top: 8px; }
.fm-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue); padding: 6px 0; }
/* bài xếp lớp */
.ob-pl { border-style: dashed; }
.ob-opts .btn.link { align-self: center; }
.pl-row { margin-bottom: 14px; }
