/* Cụm khoá học khoahoc/ + coursev2/ (Sóng 4, plan docs/124-data/plan-tailwind-daisyui-2026-12-02.md mục 8.2, 05/12/2026):
   trang Thư viện khoá học /khoa-hoc (khoahoc/index + _category_section, _course_list), trang khoá học /course/{id}/{slug}
   (coursev2/view), trang bài học /coursev2/learn?id= (coursev2/learn + _lesson_step, _vip_required) và các thẻ in ở trang khác
   (khoahoc/_item2: EASY; _item4: hỏi đáp, giáo dục sớm; _course_by_period: thai giáo theo tuần; coursev2/_lesson_item*: nuôi con
   hôm nay, giáo dục sớm, tìm kiếm). Thay khối <style> nhúng, style="" tĩnh và lưới / utility / nút / bảng / modal Bootstrap.
   Chỉ token DS (css/mb-ds.css :root), lớp mới tiền tố cr-*; giữ lớp JS / CSS khác còn đọc (kh-*, lesson-item, lesson-desc,
   lesson-column, collapse-lesson-*, done_*, un_done_*, btn-rating, hide-vip*, show-vip-required, lesson-thumbnail*,
   mb-blobs / kh-blobs / mb-blob-tile của icon đốm màu). Nạp không qua CDN qua partial khoahoc/_courseStyles, một lần mỗi lượt
   ($GLOBALS['mbCoursePagesCss']). Đổi: .music-album-thumbnail / .book-avatar (ảnh bài) → .cr-thumb; bảng giới thiệu bài →
   dl.cr-facts; modal #vip-invite Bootstrap → MbUi::modal (data-mb-open); d-none do JS bật tắt → thuộc tính hidden. */

/* ================================================================ khung trang (thay .container + .row + .col-*) */
.cr-page {
	box-sizing: border-box;
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--space-lg);
	padding-left: var(--space-lg);
	font-family: var(--font-app);
	color: var(--app-ink);
}

/* JS bật tắt bằng thuộc tính hidden: thắng display của lớp (lưới, flex) */
.cr-page [hidden],
.cr-page[hidden],
.cr-li [hidden] {
	display: none !important;
}

@media (min-width: 576px) {
	.cr-page {
		max-width: calc(var(--page-w-read) * 0.75);
	}
}

@media (min-width: 768px) {
	.cr-page--grid {
		max-width: var(--page-w-read);
	}

	.cr-page--read,
	.cr-page--learn {
		max-width: calc(var(--page-w-read) * 10 / 12);
	}
}

@media (min-width: 992px) {
	.cr-page--grid {
		max-width: var(--page-w-tool);
	}

	.cr-page--read,
	.cr-page--learn {
		max-width: calc(var(--page-w-tool) * 8 / 12);
	}
}

@media (min-width: 1200px) {
	.cr-page--grid {
		max-width: var(--page-w-grid);
	}

	.cr-page--read {
		max-width: calc(var(--page-w-grid) * 8 / 12);
	}

	.cr-page--learn {
		max-width: calc(var(--page-w-grid) / 2);
	}
}

/* Panel trắng (thay .bg-white.rounded.p-3 / .alert-white); ≤575 tràn mép nhờ .panel-mobile-fullwidth */
.cr-panel,
.cr-learn__body {
	margin-top: var(--page-shell-pad-top);
	margin-bottom: var(--space-2xl);
	padding: var(--panel-pad);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.cr-learn__body {
	margin-top: 0;
}

/* Tiêu đề trong trang (khối style cũ đặt h1–h3 cả trang; giờ chỉ trong khung, độ ưu tiên thấp như bộ chọn thẻ cũ) */
:where(.cr-page) h1,
:where(.cr-page) h2,
:where(.cr-page) h3 {
	margin-top: 0;
	margin-bottom: var(--space-lg);
	color: var(--app-ink);
}

:where(.cr-page) h1 {
	font-size: var(--text-3xl);
	line-height: var(--text-3xl-lh);
}

:where(.cr-page) h2 {
	font-size: var(--text-2xl);
	line-height: var(--text-2xl-lh);
}

:where(.cr-page) h3 {
	font-size: var(--text-xl);
	line-height: var(--text-xl-lh);
}

@media (max-width: 991.98px) {
	:where(.cr-page) h1 {
		font-size: var(--text-2xl);
		line-height: var(--text-2xl-lh);
	}

	:where(.cr-page) h2 {
		font-size: var(--text-xl);
		line-height: var(--text-xl-lh);
	}

	:where(.cr-page) h3 {
		font-size: var(--text-md);
		line-height: var(--text-md-lh);
	}
}

/* Nút soạn thảo medium-insert lẫn trong HTML mô tả khoá / bài từ DB */
.cr-page .medium-insert-buttons {
	display: none;
}

/* ================================================================ tiện ích nhỏ của cụm (thay text-center / mb-3 / mt-3 / pb-3 / hr) */
.cr-center {
	text-align: center;
}

.cr-mb {
	margin-bottom: var(--space-lg);
}

.cr-mt {
	margin-top: var(--space-lg);
}

.cr-mt-sm {
	margin-top: var(--space-sm);
}

.cr-pb {
	padding-bottom: var(--space-lg);
}

.cr-hr {
	height: 0;
	margin: var(--space-lg) 0;
	border: 0;
	border-top: 1px solid var(--app-line);
}

.cr-hr--flush {
	margin: 0;
}

.cr-h-red {
	color: var(--app-red-ink);
}

:where(.cr-page) h2.cr-h-red {
	color: var(--app-red-ink);
}

/* Nút rộng hết khối (thay .btn-block); chữ dài được xuống dòng thay vì tràn ở màn 280 */
.cr-btn-block {
	display: flex;
	width: 100%;
	height: auto;
	min-height: var(--control-md);
	padding-top: var(--space-sm);
	padding-bottom: var(--space-sm);
	white-space: normal;
	text-align: center;
}

/* Nút mb-btn trong trang: chữ dài xuống dòng, không tràn ngang ở màn 280 */
.cr-page .mb-btn {
	max-width: 100%;
	height: auto;
	min-height: var(--control-md);
	white-space: normal;
	text-align: center;
}

.cr-page .mb-btn--sm {
	min-height: var(--control-sm);
}

.cr-btn-block.mb-btn--lg {
	min-height: var(--control-lg);
}

/* ================================================================ Thư viện khoá học /khoa-hoc (khoahoc/index) */
.cr-lib__title {
	font-weight: var(--fw-bold);
}

@media (max-width: 991.98px) {
	:where(.cr-page) .cr-lib__title {
		font-size: var(--text-xl);
		line-height: var(--text-xl-lh);
	}

	/* Tên mục (chữ hoa, từ DB): cỡ nhỏ hơn để không thêm chữ lẻ ở 375 / 280 */
	:where(.cr-lib) h2 {
		font-size: var(--text-lg);
		line-height: var(--text-lg-lh);
	}

	:where(.cr-lib) h3 {
		font-size: var(--text-xs);
		line-height: var(--text-xs-lh);
	}
}

/* Màn 280: tiêu đề 24 xuống dòng thành 2 cụm "Thư viện khóa học & / kiến thức", không để "thức" lẻ */
@media (max-width: 359.98px) {
	:where(.cr-page) .cr-lib__title {
		font-size: var(--text-2xl);
		line-height: var(--text-2xl-lh);
	}
}

/* Nút Tìm kiếm dùng .mb-btn; giữ lớp kh-search-btn cho JS (cuộn thanh chế độ), tắt phần gradient/bóng/sáng của main.css */
.kh-modebar .kh-search-btn.mb-btn {
	gap: var(--space-xs);
	box-shadow: none;
	filter: none;
}

/* Ô chủ đề đầu trang (thay .row.mx-n1 > .col-20.px-1.text-center.mb-3): 5 ô một hàng mọi cỡ màn */
.cr-tiles {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--space-lg) var(--space-sm);
	margin-bottom: var(--space-lg);
}

.cr-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-sm);
	min-width: 0;
	padding: var(--space-xs);
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	text-align: center;
	color: inherit;
}

.cr-tile.is-selected {
	background: var(--app-gray-soft);
	border-color: var(--app-line);
}

.cr-tile .icon-shape {
	max-width: 100%;
}

.kh-tile-icon {
	font-size: var(--icon-xl);
}

/* Icon chip danh mục theo màu lưu trong DB (thay text-<màu> Bootstrap) */
.cr-chip-ic--danger,
.cr-chip-ic--maroon,
.cr-chip-ic--pink {
	color: var(--app-red-ink);
}

.cr-chip-ic--purple {
	color: var(--app-purple-ink);
}

.cr-chip-ic--primary,
.cr-chip-ic--blue,
.cr-chip-ic--info,
.cr-chip-ic--cyan {
	color: var(--app-blue-ink);
}

.cr-chip-ic--success {
	color: var(--app-green-ink);
}

.cr-chip-ic--warning {
	color: var(--app-orange-strong);
}

/* Tên danh mục (thay .text-danger.text-uppercase) */
.kh-cate-title .cr-cate-h {
	color: var(--app-red-ink);
	text-transform: uppercase;
}

.cr-shelf-wrap {
	margin-bottom: var(--space-sm);
}

.cr-loadmore {
	margin: var(--space-lg) 0;
	text-align: center;
}

.cr-suggest {
	margin-bottom: var(--space-lg);
	text-align: center;
}

.cr-suggest__q {
	margin: 0;
	color: var(--app-red-ink);
}

.cr-suggest__link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	min-height: var(--control-sm);
	font-weight: var(--fw-bold);
	color: var(--app-blue-ink);
}

/* ================================================================ thẻ khoá học in ở trang khác */
/* khoahoc/_course_by_period (thai giáo theo tuần): tên nhóm + lưới 2 cột (thay .row.mx-n1 > .col-6.px-1) */
.cr-period__title {
	margin: 0 0 var(--space-md);
	font-size: var(--text-lg);
	line-height: var(--text-lg-lh);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.cr-grid2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-md) var(--space-sm);
}

.cr-period__more {
	margin-bottom: var(--space-lg);
}

/* khoahoc/_item2 (EASY): ảnh 16:9 + tên */
.cr-i2 {
	display: block;
	margin-bottom: var(--space-lg);
	color: inherit;
}

.cr-i2__thumb {
	margin-bottom: var(--space-sm);
	overflow: hidden;
	border: 1px solid var(--app-line);
	border-radius: var(--radius-sm);
}

.cr-i2__title {
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	font-weight: var(--fw-bold);
}

/* khoahoc/_item4 (hỏi đáp, giáo dục sớm): ảnh trái + tên phải (thay .media.d-flex) */
.cr-i4 {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	min-height: var(--control-sm);
	margin-bottom: var(--space-lg);
	color: inherit;
}

.cr-i4__thumb {
	flex: 0 0 auto;
	width: var(--thumb-scroll-w);
	max-width: 45%;
}

.cr-i4__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 1px solid var(--app-line);
	border-radius: var(--radius-sm);
}

.cr-i4__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	font-weight: var(--fw-bold);
}

/* ================================================================ ảnh bài học (thay .music-album-thumbnail / .book-avatar + style="") */
.cr-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--app-line);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
}

/* Đã học xong: phủ tối + dấu tích (thay .bg-primary opacity 70% + translateY) */
.cr-thumb__done {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--app-overlay);
	color: var(--app-on-color);
	font-size: var(--icon-xl);
}

/* coursev2/_lesson_item (lưới bài trang khoá, bài khác, tìm kiếm) và _lesson_item7 (thẻ dọc giáo dục sớm) */
.cr-li {
	display: block;
	color: inherit;
}

.cr-li__body {
	margin-top: var(--space-sm);
	margin-bottom: var(--space-lg);
}

.cr-li__title {
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
}

.cr-li__title--lg {
	margin-bottom: var(--space-xs);
	font-weight: var(--fw-bold);
}

.cr-li__age {
	font-size: var(--text-2xs);
	line-height: var(--text-2xs-lh);
	color: var(--app-orange-strong);
}

.cr-li--stack .cr-li__age {
	margin-bottom: var(--space-xs);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
}

.cr-li__sub {
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
}

.cr-badge-now {
	display: inline-block;
	margin-right: var(--space-xs);
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-full);
	background: var(--app-green-ink);
	color: var(--app-on-color);
	font-size: var(--text-2xs);
	font-weight: var(--fw-semi);
	line-height: 1;
	vertical-align: middle;
}

/* coursev2/_lesson_item5 + _lesson_item6 (hàng ảnh trái 1/3 + chữ phải, thay .row.mx-n1 > .col-4 / .col-8) */
.cr-row {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
	color: inherit;
}

.cr-row__thumb {
	flex: 0 0 auto;
	width: calc((100% - var(--space-sm)) / 3);
}

.cr-row__body {
	flex: 1 1 auto;
	min-width: 0;
}

.cr-row__head {
	display: flex;
	align-items: baseline;
	gap: var(--space-sm);
	margin-bottom: var(--space-xs);
}

.cr-row__title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	font-weight: var(--fw-bold);
}

.cr-row__age {
	flex: 0 0 auto;
	white-space: nowrap;
	font-size: var(--text-2xs);
	line-height: var(--text-2xs-lh);
	color: var(--app-orange-strong);
	text-align: right;
}

.cr-row__sub {
	font-size: var(--text-2xs);
	line-height: var(--text-2xs-lh);
	color: var(--app-ink-sub);
}

/* Lưới 2 cột bài học (thay .row.mx-n2 > .col-6.px-2 và .row.mx-n1 > .col-6.px-1) */
.cr-lessons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--space-lg);
}

.cr-lessons--tight {
	column-gap: var(--space-sm);
}

/* ================================================================ trang khoá học (coursev2/view) */
.cr-course__title {
	font-weight: var(--fw-bold);
	text-align: center;
}

.cr-course__photo {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto var(--space-xl);
}

.cr-course__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-xs) var(--space-lg);
	margin-bottom: var(--space-lg);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
}

.cr-course__lead,
.cr-intro__lead {
	margin-bottom: var(--space-lg);
	font-size: var(--text-xl);
	line-height: var(--text-xl-lh);
}

.cr-course__lead {
	text-align: center;
}

@media (max-width: 991.98px) {
	.cr-course__lead,
	.cr-intro__lead {
		font-size: var(--text-lg);
		line-height: var(--text-lg-lh);
	}
}

.cr-course__go {
	margin-bottom: var(--space-xl);
}

/* Thanh đáy "Zalo Tư vấn | Vào học ngay" trên điện thoại (thay .fixed-bottom.d-block.d-md-none + style=""): nằm ngay trên
   thanh tab; layouts/menu.php đẩy / hạ theo .sticky-bottom-offset (thanh tab thu, ẩn, thẻ mini player của app). */
.cr-buybar {
	position: fixed;
	right: 0;
	bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
	left: 0;
	z-index: var(--z-bnav);
	display: flex;
	padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
	.cr-buybar {
		display: none;
	}
}

/* Chừa đáy trang cho thanh cố định, để nút cuối trang không nằm dưới thanh */
@media (max-width: 767.98px) {
	.cr-course {
		padding-bottom: calc(var(--control-md) + var(--space-lg));
	}
}

.cr-buybar__zalo,
.cr-buybar__go {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-width: 0;
	min-height: var(--control-md);
	padding: var(--space-sm);
	border: 0;
	font-family: var(--font-app);
	font-size: var(--text-base);
	font-weight: var(--fw-semi);
	line-height: var(--text-base-lh);
	white-space: nowrap;
	cursor: pointer;
}

.cr-buybar__zalo {
	flex: 5 1 0;
	background: var(--app-blue);
	color: var(--app-ink);
	text-decoration: none;
}

.cr-buybar__zalo:focus {
	color: var(--app-ink);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.cr-buybar__zalo:hover {
		color: var(--app-ink);
		text-decoration: none;
	}
}

.cr-buybar__go {
	flex: 7 1 0;
	background: var(--app-red);
	color: var(--app-on-color);
}

.cr-buybar__go:active,
.cr-buybar__zalo:active {
	background-image: linear-gradient(var(--state-pressed-bg), var(--state-pressed-bg));
}

.cr-block-link {
	display: block;
	cursor: pointer;
}

/* Giới thiệu khoá: thu gọn 150px, "Đọc tiếp" mở hết */
.cr-desc--clamp {
	max-height: calc(var(--thumb-scroll-w) - var(--space-sm) - 2px);
	overflow: hidden;
}

.cr-lessons-h {
	margin-bottom: var(--space-sm);
}

/* Thanh mục bài học dính dưới thanh trên (top do css/ds/nav.css .sticky-header-offset) */
.cr-chapbar {
	position: sticky;
	z-index: var(--z-sticky);
	margin-bottom: var(--space-lg);
	padding: var(--space-md) 0;
	background: var(--app-surface);
	text-align: center;
}

.cr-chapbar__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-xs);
}

.cr-chapbar__chips .mb-btn {
	max-width: 100%;
	height: auto;
	min-height: var(--control-sm);
	white-space: normal;
}

.cr-search {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.cr-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: var(--control-sm);
	font-size: var(--text-base);
}

.cr-search__btn {
	flex: 0 0 auto;
	width: var(--control-sm);
	padding: 0;
}

.cr-search__count {
	padding-top: var(--space-sm);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	color: var(--app-green-ink);
	text-align: center;
}

.cr-chap-h {
	text-align: center;
}

:where(.cr-page) h3.cr-chap-h {
	color: var(--app-red-ink);
}

/* ================================================================ trang bài học (coursev2/learn) */
/* Video / ảnh bài dính dưới thanh trên (thay .container.sticky-top + .embed-responsive-16by9) */
.cr-player {
	position: sticky;
	z-index: var(--z-sticky);
	margin-top: var(--page-shell-pad-top);
}

/* Màn lùn (882×344, ngang): bỏ dính để thanh mục / video không che bài học; đặt sau luật .cr-chapbar và .cr-player để thắng (cùng độ ưu tiên) */
@media (max-height: 559.98px) {
	.cr-chapbar,
	.cr-player {
		position: static;
	}
}

@media (min-width: 576px) {
	.cr-player__in {
		overflow: hidden;
		border-radius: var(--radius-card) var(--radius-card) 0 0;
	}
}

.cr-video {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--app-scrim);
}

.cr-video__ph,
.cr-video__frame {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cr-video__ph {
	object-fit: cover;
	object-position: top center;
}

.cr-thumb--hero {
	border: 0;
	border-radius: 0;
}

/* Bài khoá VIP chưa mở: ảnh + nút phát mở hộp mời VIP */
button.cr-locked {
	padding: 0;
	font-family: var(--font-app);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
	color: var(--app-on-color);
	cursor: pointer;
}

.cr-locked__cover {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	background: var(--app-overlay);
	color: var(--app-on-color);
}

.cr-locked__play {
	font-size: var(--icon-2xl);
}

/* Hộp mời VIP (MbUi::modal #vip-invite) */
.cr-vipbox .mb-modal {
	position: relative;
	max-width: calc(var(--space-3xl) * 10);
}

.cr-vipbox .mb-modal__title {
	padding: 0 calc(var(--control-md) + var(--space-sm));
	text-align: center;
	text-wrap: balance;
}

/* Màn hẹp (≤359): chừa chỗ nút × chỉ bên phải, căn trái để tiêu đề không bị ép 5 dòng */
@media (max-width: 359.98px) {
	.cr-vipbox .mb-modal__title {
		padding: 0 calc(var(--control-md) + var(--space-sm)) 0 0;
		text-align: left;
		text-wrap: wrap;
	}
}

.cr-vip-perks {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-sm);
	text-align: center;
}

.cr-vip-perk__big {
	font-size: var(--text-3xl);
	line-height: var(--text-3xl-lh);
	font-weight: var(--fw-bold);
	color: var(--app-red-ink);
}

.cr-vip-perk__big--blue {
	color: var(--app-blue-ink);
}

.cr-vip-perk__big--green {
	color: var(--app-green-ink);
}

.cr-vip-perk__txt {
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
}

.cr-vip-actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.cr-vip-free-h {
	margin: 0;
	font-size: var(--text-lg);
	line-height: var(--text-lg-lh);
	color: var(--app-red-ink);
	text-align: center;
}

/* Thanh "Đã hoàn thành / Đánh dấu hoàn thành" ngay dưới video và cuối bài */
.cr-donebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	min-height: var(--control-md);
	padding: 0 var(--space-xs) 0 var(--space-lg);
	background: var(--app-gray-soft);
}

.cr-donebar--boxed {
	margin-bottom: var(--space-lg);
	padding-top: var(--space-xs);
	padding-bottom: var(--space-xs);
	border-radius: var(--radius-md);
}

.cr-ok {
	color: var(--app-green-ink);
}

.cr-undo {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: var(--control-md);
	height: var(--control-md);
	padding: 0;
	border: 0;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--app-ink);
	font-size: var(--icon-sm);
	cursor: pointer;
}

.cr-undo:active {
	background: var(--state-pressed-bg);
}

@media (hover: hover) and (pointer: fine) {
	.cr-undo:hover {
		background: var(--state-hover-bg);
	}
}

.cr-donebtn {
	display: block;
	width: 100%;
	min-height: var(--control-md);
	padding: var(--space-sm) var(--space-lg);
	border: 0;
	background: var(--app-green-ink);
	color: var(--app-on-color);
	font-family: var(--font-app);
	font-size: var(--text-base);
	line-height: var(--text-base-lh);
	text-align: center;
	cursor: pointer;
}

.cr-donebtn:active {
	background-image: linear-gradient(var(--state-pressed-bg), var(--state-pressed-bg));
}

.cr-learn__title {
	text-align: center;
}

/* Bảng giới thiệu bài (thay table.table-sm, cột tên 25%) */
.cr-facts {
	margin: 0 0 var(--space-lg);
}

.cr-facts__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
	gap: var(--space-md);
	padding: var(--space-xs) 0;
	border-top: 1px solid var(--app-line);
}

.cr-facts dt {
	font-weight: var(--fw-bold);
}

.cr-facts dd {
	min-width: 0;
	margin: 0;
}

.cr-facts .material p {
	margin-bottom: 0;
}

.cr-facts .target ul {
	margin-bottom: 0;
	padding-left: var(--space-md);
}

.cr-tip {
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	border-radius: var(--radius-md);
	background: var(--app-gray-soft);
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
}

.cr-tip__title {
	margin-bottom: var(--space-sm);
	font-weight: var(--fw-bold);
}

.cr-tip__list {
	margin: 0;
	padding-left: var(--space-lg);
}

/* Bước thực hiện (coursev2/_lesson_step, thay .media + số tròn style="") */
.cr-step {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	margin-bottom: var(--space-sm);
}

.cr-step__num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: var(--control-sm);
	height: var(--control-sm);
	margin-top: var(--space-xs);
	border-radius: var(--radius-full);
	background: var(--app-blue-ink);
	color: var(--app-on-color);
	font-size: var(--text-xl);
	line-height: 1;
	font-weight: var(--fw-bold);
}

.cr-step__body {
	flex: 1 1 auto;
	min-width: 0;
}

/* Đánh giá độ khó (thay .row.mx-n1 > .col-4 > .btn.btn-block.text-*) */
.cr-rating {
	margin-bottom: var(--space-lg);
}

.cr-rating__title {
	margin-bottom: var(--space-sm);
	font-weight: var(--fw-bold);
	text-align: center;
}

.cr-rating__opts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-sm);
}

.cr-rate {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-height: var(--control-lg);
	padding: var(--space-sm) var(--space-xs);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	background: transparent;
	font-family: var(--font-app);
	font-size: var(--text-base);
	line-height: var(--text-base-lh);
	cursor: pointer;
}

.cr-rate:active {
	background: var(--state-pressed-bg);
}

@media (hover: hover) and (pointer: fine) {
	.cr-rate:hover {
		background: var(--state-hover-bg);
	}
}

.cr-rate--easy {
	color: var(--app-orange-strong);
}

.cr-rate--ok {
	color: var(--app-green-ink);
}

.cr-rate--hard {
	color: var(--app-red-ink);
}

/* Mức đã chọn: nền xám nhạt + viền xanh, chữ đậm màu thường */
.cr-rate.checked {
	border-color: var(--app-blue);
	background: var(--app-gray-soft);
	color: var(--app-ink);
}

.cr-rate__ic {
	font-size: var(--icon-xl);
}

.cr-rating__ok {
	margin-top: var(--space-md);
	color: var(--app-green-ink);
	text-align: center;
}

/* Khối giới thiệu khoá cuối bài (thay .alert.alert-light + .img-fluid.rounded.shadow-sm) */
.cr-intro {
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
}

.cr-intro > a {
	display: block;
	color: inherit;
}

:where(.cr-page) .cr-intro__title {
	margin-bottom: var(--space-sm);
	text-align: center;
}

.cr-intro__img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-bottom: var(--space-sm);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-card);
}

.cr-intro__lead {
	margin-bottom: var(--space-sm);
}

/* Khoá xem tiếp (coursev2/_vip_required, cũng ở chỉ số thai nhi): thay .alert.alert-light + .btn.btn-danger */
.cr-vipreq {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
	padding: var(--space-md) var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	background: var(--app-surface);
	color: var(--app-ink);
	text-align: center;
}

.cr-vipreq__sub {
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
}
