/* Trang đặt tên con babynames/ phần chi tiết (Sóng 4, 05/12/2026): thay khối <style> nhúng, style="" tĩnh + lớp Bootstrap
   (container/row/col, card, btn, alert, badge, d-*, m-* / p-*, text-*, form-control, input-group, list-group, table) ở
   protected/views/babynames/{view, score, compare, parentname, _parent_match, _score_widget, _element_methods, _comments,
   _name_nextup, _name_list_with_last_name, _share_frame, _share_image_button, name_js}.php. Chỉ token DS (css/mb-ds.css :root).
   Nạp ở đầu view, score, compare, parentname; partial tự nạp một lần mỗi lượt ($GLOBALS['mbBnPagesCss']).
   Trang danh sách (hub/index/search/top…) dùng lớp bnl-* ở file khác. */

/* ---------------------------------------------------------------- chung */
.bn-hidden {
	display: none !important; /* thay .d-none: JS bật/tắt bằng addClass/removeClass('bn-hidden') */
}

/* Lớp dùng chung các trang tên chi tiết + công cụ (thay hero-header-card / meaning-card / article-card / section-title /
   name-item-hover / custom-hr / text-brand của _style.php và khối <style> của view.php; _style giờ chỉ nạp file này). */
.bn-tool h1 {
	font-size: var(--text-3xl);
	letter-spacing: -0.5px;
}

.bn-tool h2 {
	font-size: var(--text-xl);
	letter-spacing: -0.3px;
}

.bn-tool h3 {
	font-size: var(--text-lg);
}

/* Trang tên: h1 24 trên máy hẹp (khối style cũ của view.php); trang công cụ giữ 32 như _style cũ */
@media (max-width: 575.98px) {
	.bn-view h1 {
		font-size: var(--text-2xl);
	}
}

.bn-hero,
.bn-box,
.bn-article {
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.bn-box {
	position: relative;
}

.bn-article {
	padding: var(--space-xl);
	color: var(--app-ink);
	line-height: 1.7;
}

.bn-sec {
	display: flex;
	align-items: center;
	margin-bottom: var(--space-lg);
	color: var(--app-ink);
	font-weight: var(--fw-bold);
}

.bn-sec i {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--space-2xl);
	height: var(--space-2xl);
	margin-right: var(--space-md);
	border-radius: 50%;
	background-color: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
}

@media (max-width: 575.98px) {
	.bn-view .bn-sec i {
		width: calc(var(--space-2xl) - var(--space-xs));
		height: calc(var(--space-2xl) - var(--space-xs));
		margin-right: var(--space-sm);
	}
}

.bn-tile {
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	background-color: var(--app-surface);
	transition: all 0.2s ease-in-out;
}

@media (hover: hover) and (pointer: fine) {
	.bn-tile:hover {
		transform: translateY(-2px);
		box-shadow: var(--shadow-card);
		border-color: var(--app-grp-baby);
		background-color: var(--app-grp-baby-soft);
	}
}

.bn-tile:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

.bn-hr {
	margin: var(--space-2xl) 0;
	border: 0;
	border-top: 1px dashed var(--app-line);
}

.bn-brand,
a.bn-brand {
	color: var(--app-grp-baby);
}

.bn-strong {
	font-weight: var(--fw-bold);
}

.bn-center {
	text-align: center;
}

/* ---------------------------------------------------------------- trang tên view.php (bn-view-*) */
/* Khung: .bn-tool .bn-tool--wide .bn-tool--compact (cột col-xl-10 như cũ). Thẻ trên trang tên bo 12 như khối style cũ. */
.bn-view .bn-box {
	border-radius: var(--radius-md);
}

.bn-view .bn-tile {
	border-radius: 0;
}

@media (hover: hover) and (pointer: fine) {
	.bn-view .bn-tile:hover {
		background-color: var(--app-surface);
		color: var(--app-grp-baby);
	}
}

.bn-view-hero {
	position: relative;
	overflow: hidden;
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	text-align: center;
}

.bn-view-hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: var(--space-xs);
	background: var(--app-grp-baby);
}

.bn-view-kicker {
	margin-bottom: var(--space-xs);
	color: var(--app-ink-sub);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	letter-spacing: 1px;
	text-transform: uppercase;
}

.bn-view-h1 {
	margin-bottom: var(--space-lg);
	color: var(--app-grp-baby);
	font-weight: var(--fw-bold);
	text-transform: capitalize;
	text-wrap: balance; /* tiêu đề căn giữa */
}

.bn-view-pad {
	padding: var(--space-lg);
}

@media (min-width: 576px) {
	.bn-view-hero {
		margin-bottom: var(--space-xl);
		padding: var(--space-xl);
	}

	.bn-view-pad {
		padding: var(--space-xl);
	}
}

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

/* Hàng nút Lưu / Chia sẻ (name_js đọc .btn-save-name, .na-lbl, .na-cnt) */
.bn-view-acts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-sm);
	max-width: 320px;
	margin: 0 auto var(--space-xs);
}

.bn-view-act {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	min-width: 0;
	height: var(--control-md);
	padding: 0 var(--space-md);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	color: var(--app-ink);
	font-size: var(--text-base);
	font-weight: var(--fw-semi);
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--motion-fast), border-color var(--motion-fast);
}

@media (hover: hover) and (pointer: fine) {
	.bn-view-act:hover {
		border-color: var(--app-line-strong);
	}
}

.bn-view-act:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

.bn-view-act i {
	font-size: var(--text-base);
}

.bn-view-act .na-cnt {
	font-weight: var(--fw-medium);
	color: var(--app-ink-sub);
}

.bn-view-act.btn-save-name i {
	color: var(--app-blue-ink);
}

.bn-view-act.btn-save-name.on {
	background: var(--app-blue-soft);
	border-color: var(--app-line-strong);
}

/* Nút phụ xám chữ mực, cùng kiểu "Tạo ảnh" (owner duyệt 30/11: Chia sẻ không dùng đỏ) */
.bn-view-act--share {
	border-color: transparent;
	background: var(--app-gray-soft);
	color: var(--app-ink);
}

/* màn rất hẹp (máy gập đóng 280–360): nút gọn hơn */
@media (max-width: 359.98px) {
	.bn-view-act {
		gap: var(--space-xs);
		padding: 0 var(--space-sm);
		font-size: var(--text-sm);
	}
}

.bn-view-cta {
	margin-bottom: var(--space-sm);
}

/* Khối tóm tắt + bảng tổng quan */
.bn-view-lead {
	margin: 0 0 var(--space-lg);
	color: var(--app-ink);
	font-size: var(--text-base);
	line-height: 1.7;
}

.bn-view-ovw-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.bn-view-ovw {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	color: var(--app-ink);
	font-size: var(--text-sm);
}

.bn-view-ovw td {
	padding: var(--space-xs);
	border-top: 1px solid var(--app-line);
	vertical-align: top;
}

/* Cột nhãn lấy đúng bề rộng nó cần (từng bị ép 42% làm nhãn dài xuống 2 dòng), phần còn lại cho giá trị */
.bn-view-ovw td:first-child {
	width: 1%;
	padding-right: var(--space-md);
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.bn-view-ovw td + td {
	font-weight: var(--fw-bold);
}

.bn-view-ovw-sub {
	display: block;
	font-size: var(--text-xs);
	font-weight: var(--fw-regular);
	white-space: normal; /* 280px: "Tên bé trai · Tên bé gái" xuống dòng thay vì cuộn ngang trong bảng */
}

.bn-view-dim {
	color: var(--app-ink-sub);
}

.bn-view-same {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	min-height: var(--control-md);
	padding: var(--space-xs) var(--space-md);
	border: 1px solid var(--app-grp-baby-soft);
	border-radius: var(--radius-full);
	background: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-xs);
	font-weight: var(--fw-bold);
	white-space: nowrap;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.bn-view-same:hover {
		color: var(--app-grp-baby);
		text-decoration: none;
	}
}

.bn-view-same:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

.bn-view-same i {
	font-size: var(--text-2xs);
}

/* Ý nghĩa đầy đủ (MeaningText::html in <p> và h3.name-meaning-sub) */
.bn-view-sec {
	margin-bottom: var(--space-sm);
}

.bn-view-meaning {
	color: var(--app-ink);
	font-size: var(--text-base);
	line-height: 1.7;
}

.bn-view-meaning p {
	margin: 0 0 var(--space-md);
}

.bn-view-meaning p:last-child {
	margin-bottom: 0;
}

.bn-view-meaning br {
	display: block;
	content: "";
	margin-top: var(--space-md);
}

.bn-view-meaning .name-meaning-sub {
	margin: var(--space-lg) 0 var(--space-sm);
	color: var(--app-ink);
	font-size: var(--text-base);
	font-weight: var(--fw-bold);
}

.bn-view-meaning .name-meaning-sub:first-child {
	margin-top: 0;
}

/* Chỉ căn đều từ md trở lên; máy hẹp căn đều tạo "dòng sông" trắng */
@media (min-width: 768px) {
	.bn-view-meaning {
		text-align: justify;
	}
}

/* Ngũ hành */
.bn-view-h2s {
	margin-bottom: var(--space-sm);
	color: var(--app-ink);
	font-size: var(--text-base);
	font-weight: var(--fw-bold);
}

.bn-view-h2s i {
	margin-right: var(--space-xs);
}

/* Lối vào Top tên năm sau */
.bn-view-gap-top {
	margin-top: var(--space-xl);
}

.bn-view-top {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin: var(--space-xl) 0;
	padding: var(--space-lg);
	border-radius: var(--radius-card);
	/* Nền xanh nhạt chữ mực (trắng trên xanh #3498DB chỉ 3,15:1); !important thắng .link-nostyle */
	background: var(--app-blue-soft);
	color: var(--app-ink) !important;
	text-decoration: none;
	transition: box-shadow var(--motion-fast);
}

@media (hover: hover) and (pointer: fine) {
	.bn-view-top:hover {
		box-shadow: var(--shadow-card);
	}
}

.bn-view-top:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

.bn-view-top-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--control-md);
	height: var(--control-md);
	border-radius: 50%;
	background: var(--app-surface);
	color: var(--app-grp-vip);
	font-size: var(--text-xl);
}

.bn-view-top-txt {
	flex: 1 1 auto;
	min-width: 0;
}

.bn-view-top-title {
	display: block;
	font-size: var(--text-base);
	font-weight: var(--fw-bold);
	line-height: 1.3;
}

.bn-view-top-sub {
	display: block;
	margin-top: var(--space-xs);
	color: var(--app-ink-sub);
	font-size: var(--text-xs);
}

.bn-view-top .mb-btn {
	flex-shrink: 0;
}

/* màn rất hẹp (máy gập đóng 280–360): nút «Xem» lề trong 12 */
@media (max-width: 359.98px) {
	.bn-view-top .mb-btn {
		padding: 0 var(--space-md);
	}
}

/* Danh sách tên gợi ý + nút "Xem tất cả" (viền màu nhóm bé, như nút btn-custom-outline cũ của trang tên) */
.bn-view-list,
.bn-view-sec2 {
	margin-bottom: var(--space-xl);
}

.bn-view-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-height: var(--control-md);
	padding: 0 var(--space-xl);
	border: 1px solid var(--app-grp-baby);
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	text-decoration: none;
	transition: background var(--motion-fast);
}

@media (hover: hover) and (pointer: fine) {
	.bn-view-more:hover {
		background: var(--app-grp-baby-soft);
		color: var(--app-grp-baby);
		text-decoration: none;
	}
}

.bn-view-more:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

.bn-view-more i {
	font-size: var(--text-2xs);
}

/* Thai giáo: hàng ô tháng */
.bn-view-months {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.bn-view-month {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
	text-decoration: none;
}

.bn-view .bn-view-month {
	border-radius: var(--radius-sm);
}

@media (hover: hover) and (pointer: fine) {
	.bn-view-month:hover {
		text-decoration: none;
	}
}

/* Khoá học cho khách */
.bn-view-cate {
	margin: var(--space-xl) 0 var(--space-lg);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--app-grp-baby);
}

.bn-view-cate h2 {
	margin: 0;
	color: var(--app-grp-baby);
	font-weight: var(--fw-bold);
}

.bn-view-subcate {
	margin-bottom: var(--space-lg);
	font-weight: var(--fw-bold);
	text-align: center;
	text-transform: uppercase;
}

/* Màn lùn nằm ngang: thẻ tiêu đề gọn (như _compact_screen cũ cho .hero-name-card) */
@media (max-height: 480px) and (orientation: landscape) {
	.bn-view-hero {
		margin-bottom: var(--space-md);
		padding: var(--space-md) var(--space-lg);
	}

	.bn-view-hero h1 {
		margin-bottom: var(--space-sm);
		font-size: var(--text-2xl);
	}
}

/* ---------------------------------------------------------------- _name_list_with_last_name (ô tên kèm họ) */
.bn-nl-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-lg);
}

@media (min-width: 768px) {
	.bn-nl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.bn-nl-link {
	display: block;
	height: 100%;
}

.bn-nl-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: var(--space-lg);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card);
	text-align: center;
}

.bn-view .bn-nl-tile {
	border-radius: var(--radius-md);
}

.bn-nl-name {
	color: var(--app-ink);
	font-size: var(--text-base);
	font-weight: var(--fw-bold);
	letter-spacing: 0.3px;
	text-transform: capitalize;
	transition: color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
	.bn-nl-tile:hover,
	.bn-view .bn-nl-tile:hover {
		background-color: var(--app-grp-baby-soft);
	}

	.bn-nl-tile:hover .bn-nl-name {
		color: var(--app-grp-baby);
	}
}

/* ---------------------------------------------------------------- _name_nextup (4 thẻ đầu hiện ngay, script giữ 4 thẻ) */
#name-nextup .nc-grid > :nth-child(n+5) {
	display: none;
}

/* ---------------------------------------------------------------- _comments (bn-cmt-*) */
.bn-cmt-box {
	padding: var(--space-xl);
}

.bn-cmt-list {
	margin-bottom: var(--space-xl);
}

.bn-cmt-item {
	display: flex;
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-lg);
	border-bottom: 1px solid var(--app-line);
}

.bn-cmt-ava {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	margin-right: var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: 50%;
	object-fit: cover;
}

.bn-cmt-body {
	min-width: 0;
	line-height: 1.5;
}

.bn-cmt-name {
	color: var(--app-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
}

.bn-cmt-date {
	margin-bottom: var(--space-xs);
	color: var(--app-ink-sub);
	font-size: var(--text-2xs);
}

.bn-cmt-text {
	color: var(--app-ink);
	font-size: var(--text-base);
}

.bn-cmt-empty {
	margin-bottom: var(--space-xl);
	color: var(--app-ink-sub);
	font-size: var(--text-base);
}

.bn-cmt-label {
	display: block;
	margin-bottom: var(--space-sm);
	color: var(--app-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
}

.bn-cmt-input {
	margin-bottom: var(--space-lg);
}

/* ---------------------------------------------------------------- nút "Tạo ảnh" (_share_image_button) */
.bn-share-open {
	padding: 0 var(--space-lg);
	font-size: var(--text-sm);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- khung xem ảnh chia sẻ (_share_frame, bn-share-*)
   Ảnh canvas vẽ trong JS của partial (màu ảnh là nội dung ảnh, không phải màu giao diện). .ms-toast giữ tên cũ: menu.php đọc. */
.bn-share-layer,
.bn-share-toast {
	font-family: var(--font-app);
}

.bn-share-layer {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: var(--space-xl) var(--space-lg) var(--space-lg);
	background: var(--app-overlay);
}

.bn-share-layer.open {
	display: flex;
}

.bn-share-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	max-height: 100%;
	padding: var(--space-md);
	border-radius: var(--radius-sheet);
	background: var(--app-surface);
	box-shadow: var(--shadow-pop);
}

/* Nút đóng ở góc trên bên phải như modal thường; nút 36 hiển thị, vùng bấm 44 bằng ::after */
.bn-share-x {
	position: absolute;
	top: calc(var(--space-md) * -1);
	right: calc(var(--space-md) * -1);
	z-index: 2;
	width: var(--control-sm);
	height: var(--control-sm);
	border: 0;
	border-radius: 50%;
	background: var(--app-surface);
	color: var(--app-ink);
	font-size: var(--text-base);
	box-shadow: var(--shadow-pop);
	cursor: pointer;
}

.bn-share-x::after {
	content: "";
	position: absolute;
	inset: calc(var(--space-xs) * -1);
}

.bn-share-img {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	overflow: hidden;
	border-radius: var(--radius-md);
	background: var(--app-gray-soft);
}

.bn-share-img img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: min(64vh, 580px);
	border-radius: var(--radius-md);
}

.bn-share-loading {
	padding: var(--space-3xl) 0;
	color: var(--app-ink-sub);
}

.bn-share-actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-sm);
	margin-top: var(--space-md);
}

/* Nút phụ xám, nút Chia sẻ đỏ (DS: nút chính đỏ, phụ xám); cao 44 */
.bn-share-act {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	min-width: 0;
	min-height: var(--control-md);
	padding: 0 var(--space-sm);
	border: 0;
	border-radius: var(--radius-full);
	background: var(--app-gray-soft);
	color: var(--app-ink);
	font-family: inherit;
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	white-space: nowrap;
	cursor: pointer;
}

.bn-share-act--main {
	background: var(--app-red);
	color: var(--app-on-color);
	font-size: var(--text-base);
}

.bn-share-toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--bottomnav-h) + var(--space-2xl) - var(--space-xs)); /* trên thanh menu đáy (84) */
	z-index: 10001;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-md);
	background: var(--app-toast);
	color: var(--app-on-color);
	font-size: var(--text-sm);
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity 0.2s;
}

.bn-share-toast.show {
	opacity: 1;
}

/* Ba nút luôn chung một hàng: màn hẹp thì thu chữ và khoảng đệm, không cho rớt dòng */
@media (max-width: 575.98px) {
	.bn-share-actions {
		gap: var(--space-xs);
	}

	.bn-share-act {
		padding: 0 var(--space-xs);
		font-size: var(--text-xs);
	}

	.bn-share-act--main {
		font-size: var(--text-sm);
	}

	.bn-share-x {
		top: calc(var(--space-sm) * -1);
		right: calc(var(--space-sm) * -1);
	}
}

/* Màn lùn theo chiều cao (điện thoại gập, xoay ngang): ảnh co lại để hàng nút vẫn nằm dưới, một dòng */
@media (max-height: 559.98px) {
	.bn-share-layer {
		padding-top: var(--space-md);
		padding-bottom: var(--space-sm);
	}

	.bn-share-panel {
		max-width: 420px;
		padding: var(--space-sm);
	}

	.bn-share-img img {
		max-height: calc(100vh - 92px);
	}

	.bn-share-actions {
		margin-top: var(--space-sm);
	}
}


/* ================================================================ công cụ tên: khung chung score / compare / parentname */
/* Khung thay .container + .row.justify-content-center + .col-xl-9 col-lg-10 col-md-10 col-sm-12: cột nội dung rộng như cũ
   (100% đến 767; 600 / 800 / 855 ở 768 / 992 / 1200), lề hai bên 16, mt-0 mt-sm-4 mb-5. */
.bn-tool {
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto var(--space-3xl);
	padding: 0 var(--space-lg);
}

@media (min-width: 576px) {
	.bn-tool {
		margin-top: var(--space-xl);
	}

	/* parentname: mt-sm-3 */
	.bn-tool--pn {
		margin-top: var(--space-lg);
	}
}

@media (min-width: 768px) {
	.bn-tool {
		max-width: calc(var(--page-w-read) * 5 / 6);
	}
}

@media (min-width: 992px) {
	.bn-tool {
		max-width: calc(var(--page-w-tool) * 5 / 6);
	}
}

@media (min-width: 1200px) {
	.bn-tool {
		max-width: calc(var(--page-w-grid) * 3 / 4);
	}

	/* compare: col-xl-10 */
	.bn-tool--wide {
		max-width: calc(var(--page-w-grid) * 5 / 6);
	}
}

/* Màn lùn nằm ngang (máy gập ngang, điện thoại xoay ngang): như _compact_screen cho .container.mt-sm-4 cũ. */
@media (max-height: 480px) and (orientation: landscape) {
	.bn-tool--compact {
		margin-top: var(--space-sm);
	}

	.bn-tool--compact .bn-tool-crumb {
		display: none;
	}
}

/* main.css ép label / li a viết hoa mỗi chữ: trả chữ gốc (D1 docs/111); tên người vẫn viết hoa qua .bn-cap */
.bn-tool label,
.bn-tool li a,
.bn-tool .mb-input::placeholder {
	text-transform: none;
}

.bn-cap {
	text-transform: capitalize;
}

.bn-tool-crumb {
	margin-bottom: var(--space-lg);
	color: var(--app-ink-sub);
	font-size: var(--text-sm);
}

.bn-tool-crumb--tight {
	margin-bottom: var(--space-sm);
}

/* Thẻ: p-4 mb-3 (bn-hero / bn-box / bn-article của _style.php giữ nền, viền, bo) */
.bn-tool-box {
	padding: var(--space-xl);
	margin-bottom: var(--space-lg);
}

.bn-tool-box--sm {
	padding: var(--space-lg);
}

.bn-tool-h1 {
	margin-bottom: var(--space-lg);
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
	text-align: center;
	line-height: 1.3;
	text-wrap: balance; /* tiêu đề căn giữa */
}

.bn-tool-lead {
	margin-bottom: var(--space-xl);
	color: var(--app-ink);
	text-align: center;
	line-height: 1.6;
}

.bn-tool-h2 {
	font-weight: var(--fw-bold);
}

.bn-sec.bn-tool-h2--xs {
	margin-bottom: var(--space-xs);
}

.bn-sec.bn-tool-h2--sm {
	margin-bottom: var(--space-sm);
}

/* Lưới form thay .row.mx-n2 > .col-* .px-2 .mb-3: 12 cột, khe ngang 16, khe dọc 16 */
.bn-tool-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--space-lg);
}

.bn-tool-grid--sm {
	row-gap: var(--space-sm);
}

.bn-tool-grid + .bn-tool-grid {
	margin-top: var(--space-lg);
}

.bn-tool-grid--end {
	align-items: end;
}

.bn-c4 { grid-column: span 4; }
.bn-c6 { grid-column: span 6; }
.bn-c8 { grid-column: span 8; }
.bn-c12 { grid-column: span 12; }

@media (min-width: 768px) {
	.bn-md3 { grid-column: span 3; }
	.bn-md4 { grid-column: span 4; }
	.bn-md6 { grid-column: span 6; }
	.bn-md9 { grid-column: span 9; }
	.bn-md-mid6 { grid-column: 4 / span 6; }
}

.bn-tool-label {
	display: block;
	margin-bottom: var(--space-xs);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
	white-space: nowrap;
}

.bn-tool-label--loose {
	margin-bottom: var(--space-sm);
}

/* Ô chọn hẹp (4 ô một hàng ở 768–991, 2 ô ở 280): đệm gọn để "Chưa nhập" không bị cắt */
.bn-tool-form .mb-select {
	padding-left: var(--space-md);
	padding-right: var(--space-2xl);
}

.bn-tool-form .mb-select-wrap__chevron {
	right: var(--space-md);
}

.bn-tool-block {
	display: flex;
	width: 100%;
}

.bn-tool-shadow {
	box-shadow: var(--shadow-card);
}

.bn-tool-muted {
	color: var(--app-ink-sub);
}

/* Nút ⓘ trong câu / tiêu đề: icon giữ chỗ, vùng bấm 44x44 (lề âm để không đẩy dòng), như .btn.btn-link.bn-info cũ */
.bn-tool-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--control-md);
	min-height: var(--control-md);
	margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) calc(var(--space-md) * -1) var(--space-xs);
	padding: 0;
	border: 0;
	background: none;
	color: var(--app-ink-sub);
	font-size: var(--text-md);
	font-weight: var(--fw-regular);
	line-height: 1;
	vertical-align: middle;
	cursor: pointer;
}

.bn-tool-info-ic {
	width: auto;
	height: auto;
	margin: 0;
	background: none;
}

/* Nút Chia sẻ Facebook (createFBShareButton) trong trang công cụ: nút phụ xám như _compact_screen cũ (D4) */
.bn-tool-fb.shareButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	min-height: var(--control-md);
	padding: 0 var(--space-lg);
	border: 1px solid transparent !important;
	border-radius: var(--radius-full);
	background: var(--app-gray-soft) !important;
	color: var(--app-ink) !important;
	box-shadow: none !important;
	text-transform: none;
}

/* ================================================================ _element_methods.php (ⓘ "Cách xem khác" hành của tên) */
.em-box {
	font-weight: var(--fw-regular);
	text-align: left;
}

/* Một cỡ chữ cho cả khối (14px, như bảng tóm tắt); chỉ dòng ghi chú cuối nhỏ hơn. */
.em-box .em-in {
	margin-top: var(--space-sm);
	padding: var(--space-md);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-sm);
	color: var(--app-ink);
	line-height: 1.55;
}

.em-box .em-note {
	font-size: var(--text-xs); /* 13px cũ: chữ phụ ≥ 13 (D2 docs/111) nên lên 14, nghiêng để khác chữ khối */
	font-style: italic;
}

.em-box .em-grid {
	display: grid;
	grid-template-columns: minmax(8.5em, auto) 1fr;
	column-gap: var(--space-md);
	row-gap: var(--space-xs);
}

.em-box .em-k {
	color: var(--app-ink-sub);
}

.em-box .em-han {
	font-size: var(--text-lg); /* chữ Hán to hơn chữ thường một bậc */
	color: var(--app-ink);
}

.em-box .em-v {
	white-space: nowrap;
}

.em-good {
	color: var(--app-green-ink);
}

.em-ok {
	color: var(--app-ink-sub);
}

.em-bad {
	color: var(--app-red-ink);
}

.bn-elem-muted {
	color: var(--app-ink-sub);
}

.bn-elem-same {
	margin-bottom: var(--space-xs);
}

.bn-elem-line {
	margin-top: var(--space-xs);
}

.bn-elem-more {
	margin-top: var(--space-sm);
}

.bn-elem-more-top {
	padding-top: var(--space-sm);
}

/* ================================================================ _score_widget.php (chấm điểm ngay trên trang tên) */
.bn-sw {
	margin-bottom: var(--space-sm);
}

.bn-sw-box {
	padding: var(--space-lg);
}

@media (min-width: 576px) {
	.bn-sw-box {
		padding: var(--space-xl);
	}
}

.bn-sw-head {
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	margin-bottom: var(--space-xl);
}

.bn-sw-mini {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: calc(var(--control-md) * 2 + var(--space-xs)); /* 92 */
	height: calc(var(--control-md) * 2 + var(--space-xs));
	border-radius: var(--radius-full);
	background: var(--app-grp-baby);
	color: var(--app-on-color);
	box-shadow: var(--shadow-card);
}

.bn-sw-num {
	font-size: var(--text-3xl);
	font-weight: var(--fw-bold);
	line-height: 1;
}

.bn-sw-of {
	font-size: var(--text-xs);
	opacity: 0.9;
}

.bn-sw-text {
	line-height: 1.6;
}

.bn-sw-verdict {
	margin-bottom: var(--space-xs);
	color: var(--app-ink);
}

.bn-sw-sub {
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

/* Giải thích hiện ngay dưới nút ⓘ, kéo lên sát khối đầu (mt-n2 cũ) */
.bn-sw-scale {
	margin: calc(var(--space-sm) * -1) 0 var(--space-lg);
	padding: var(--space-sm);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
	line-height: 1.55;
}

.bn-sw-axis {
	margin-bottom: var(--space-lg);
}

.bn-sw-axis-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-xs);
	font-size: var(--text-xs);
}

.bn-sw-axis-k {
	color: var(--app-ink);
}

.bn-sw-axis-ic {
	margin-right: var(--space-sm);
	color: var(--app-grp-baby);
}

.bn-sw-axis-v {
	color: var(--app-ink-sub);
}

/* Thanh điểm mỏng (6px như cũ), dùng ở _score_widget và compare */
.bn-sw-bar {
	height: calc(var(--space-xs) + var(--space-xs) / 2);
	border-radius: var(--radius-full);
	background: var(--app-gray-soft);
	overflow: hidden;
}

.bn-sw-bar > span {
	display: block;
	height: 100%;
	border-radius: var(--radius-full);
	background: var(--app-grp-baby);
}

.bn-sw-tip {
	margin-top: var(--space-lg);
	padding: var(--space-lg);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-xs);
	color: var(--app-ink);
	line-height: 1.6;
}

.bn-sw-tip-ic {
	margin-right: var(--space-sm);
	color: var(--app-orange);
}

.bn-sw-foot {
	margin-top: var(--space-xl);
	text-align: center;
}

/* Nút dài: trên máy hẹp vỡ 2 dòng, mũi tên giữ dính chữ cuối (.bn-sw-nowrap). */
.bn-sw-cta.mb-btn {
	height: auto;
	min-height: var(--control-md);
	white-space: normal;
	font-size: var(--text-xs);
	text-align: center;
}

.bn-sw-nowrap {
	white-space: nowrap;
}

.bn-sw-arrow {
	margin-left: var(--space-xs);
	font-size: var(--text-xs);
}

@media (max-width: 575.98px) {
	.bn-sw-mini {
		width: calc(var(--control-sm) * 2); /* 72 */
		height: calc(var(--control-sm) * 2);
	}

	.bn-sw-num {
		font-size: var(--text-2xl);
	}

	.bn-sw-head {
		gap: var(--space-md);
	}

	/* Chữ nút chảy một khối, rộng trọn hàng */
	.bn-sw-cta.mb-btn {
		display: block;
		width: 100%;
		padding: var(--space-md);
		line-height: var(--text-xs-lh);
	}
}

.bn-sw-more {
	margin-top: var(--space-lg);
}

.bn-sw-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--control-md);
	font-size: var(--text-xs);
	color: var(--app-grp-baby);
}

/* Chip dẫn sang trang hub (mệnh / chủ đề) */
.bn-sw-hubs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	margin-top: var(--space-lg);
}

.bn-tile.bn-sw-hub {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-full);
	font-size: var(--text-sm);
	color: var(--app-grp-baby);
	text-decoration: none;
}

.bn-sw-hub-ic {
	margin-right: var(--space-xs);
}

/* ================================================================ _parent_match.php (khối "Hợp với bố mẹ") */
.pm-ibtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--control-md);
	min-height: var(--control-md);
	margin: calc(var(--space-md) * -1) 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--app-ink-sub);
	font-size: var(--text-md);
	line-height: 1;
	cursor: pointer;
}

.pm-info {
	margin-bottom: var(--space-sm);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.folk-note.pm-folk {
	margin-bottom: var(--space-lg);
}

.pm-child {
	margin-bottom: var(--space-xs);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.pm-row {
	padding: var(--space-md) 0;
	border-bottom: 1px solid var(--app-line);
}

.pm-row:last-of-type {
	border-bottom: 0;
}

.pm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
}

.pm-who {
	min-width: 0;
}

.pm-name {
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.pm-sub {
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.pm-level {
	padding: var(--space-xs) var(--space-md);
	border-radius: var(--radius-full);
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	white-space: nowrap;
}

.pm-level.rat {
	background: var(--app-green-soft);
	color: var(--app-green-ink);
}

.pm-level.hop {
	background: var(--app-blue-soft);
	color: var(--app-blue-ink);
}

.pm-level.binh,
.pm-level.it {
	background: var(--app-gray-soft);
	color: var(--app-ink);
}

.pm-crit {
	display: grid;
	grid-template-columns: auto 1fr auto;
	column-gap: var(--space-md);
	row-gap: var(--space-xs);
	margin-top: var(--space-sm);
	font-size: var(--text-sm);
	color: var(--app-ink);
}

.pm-crit .k {
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.pm-crit .p {
	text-align: right;
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.pm-aside {
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.pm-note {
	margin-top: var(--space-sm);
	padding: var(--space-md);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-sm);
	color: var(--app-ink);
	line-height: 1.55;
}

.tool-link.pm-tool {
	margin-top: var(--space-lg);
}

.bn-tool-fb--sm.shareButton {
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
}

/* ================================================================ score.php (/cham-diem-ten, /cham-diem-ten/{slug}) */
.bn-score-result {
	text-align: center;
}

.bn-score-circle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: calc(var(--control-lg) * 2 + var(--space-2xl) + var(--space-xs)); /* 132 */
	height: calc(var(--control-lg) * 2 + var(--space-2xl) + var(--space-xs));
	margin: 0 auto var(--space-lg);
	border-radius: var(--radius-full);
	background: var(--app-grp-baby);
	color: var(--app-on-color);
	box-shadow: var(--shadow-card);
}

.bn-score-num {
	font-size: var(--text-3xl);
	font-weight: var(--fw-bold);
	line-height: 1;
}

.bn-score-of {
	font-size: var(--text-sm);
	opacity: 0.9;
}

.bn-score-name {
	margin-bottom: var(--space-sm);
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
}

.bn-score-verdict {
	margin-bottom: var(--space-lg);
	color: var(--app-ink);
}

.bn-score-el {
	margin-bottom: var(--space-lg);
	font-size: var(--text-sm);
	color: var(--app-ink-sub);
	text-wrap: balance; /* đoạn căn giữa */
}

/* Trang tĩnh: form chấm lại thu vào một dòng bấm mở dưới thẻ điểm */
.bn-score-redo {
	margin-bottom: var(--space-lg);
	padding: 0;
}

.bn-score-redo summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	min-height: var(--control-lg);
	padding: var(--space-md) var(--space-xl);
	font-weight: var(--fw-semi);
	color: var(--app-grp-baby);
	cursor: pointer;
	list-style: none;
}

.bn-score-redo summary::-webkit-details-marker,
.bn-score-how summary::-webkit-details-marker {
	display: none;
}

.bn-score-redo-lead {
	margin-right: var(--space-sm);
}

.bn-score-redo-ic,
.bn-score-how-ic {
	color: var(--app-ink-sub);
	transition: transform var(--motion-ui) var(--motion-ease);
}

.bn-score-redo[open] .bn-score-redo-ic,
.bn-score-how[open] .bn-score-how-ic {
	transform: rotate(180deg);
}

.bn-score-redo-body {
	padding: var(--space-xs) var(--space-xl) var(--space-xl);
}

.bn-score-scale {
	margin-bottom: var(--space-lg);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.bn-score-axis {
	margin-bottom: var(--space-lg);
}

.bn-score-axis-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-xs);
	font-size: var(--text-sm);
}

.bn-score-axis-k {
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.bn-score-bar {
	height: var(--space-sm);
	border-radius: var(--radius-full);
	background: var(--app-gray-soft);
	overflow: hidden;
}

.bn-score-bar > span {
	display: block;
	height: 100%;
	border-radius: var(--radius-full);
	background: var(--app-grp-baby);
}

.bn-score-elrow {
	margin-top: var(--space-lg);
	font-size: var(--text-sm);
}

.bn-score-hint {
	margin: var(--space-lg) 0 0;
	font-size: var(--text-xs);
	font-style: italic;
	color: var(--app-ink-sub);
}

.bn-score-note-c {
	margin-bottom: var(--space-xl);
	font-size: var(--text-sm);
	font-style: italic;
	color: var(--app-ink-sub);
	text-align: center;
}

.bn-score-note {
	display: flex;
	align-items: flex-start;
	margin-bottom: var(--space-md);
	color: var(--app-ink);
	line-height: 1.55;
}

.bn-score-note > i {
	flex-shrink: 0;
	margin-top: var(--space-xs);
	margin-right: var(--space-md);
}

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

.bn-score-warn {
	color: var(--app-orange);
}

.bn-score-center {
	margin-bottom: var(--space-xl);
	text-align: center;
}

/* c2 (Đợt 4): chữ dẫn xuống dòng ở 280 thay vì tràn ngang */
.bn-score-meaning.mb-btn {
	height: auto;
	min-height: var(--control-md);
	max-width: 100%;
	white-space: normal;
	text-align: center;
}

/* Tên điểm cao hơn */
.bn-tile.bn-score-sug {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--space-sm);
	padding: var(--space-lg);
}

.bn-score-sug-name {
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.bn-score-pts {
	display: inline-block;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-full);
	background: var(--app-green-soft);
	color: var(--app-green-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	line-height: 1;
	white-space: nowrap;
}

/* Phần giải thích dài gói trong details (đóng sẵn) */
.bn-score-how {
	margin-bottom: var(--space-lg);
}

.bn-score-how summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	cursor: pointer;
	list-style: none;
}

.bn-score-how-h {
	margin: 0;
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
}

.bn-score-how-body {
	margin-top: var(--space-lg);
}

.bn-score-p {
	margin-bottom: var(--space-lg);
}

/* Thụt lề 20 như cũ (16 hay 24 đều sinh chữ lẻ cuối dòng ở 280 / 375) */
.bn-score-how-list {
	margin-bottom: var(--space-lg);
	padding-left: calc(var(--space-lg) + var(--space-xs));
	line-height: 1.8;
}

.bn-score-link {
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
}

.bn-score-foot {
	margin-bottom: 0;
	font-size: var(--text-sm);
	font-style: italic;
	color: var(--app-ink-sub);
}

/* ================================================================ compare.php (/so-sanh-ten) */
.bn-cmp-row2 {
	margin-bottom: var(--space-lg);
}

.bn-cmp-saved {
	margin-top: var(--space-sm);
}

.bn-cmp-saved-k {
	margin-bottom: var(--space-sm);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.bn-cmp-saved-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.bn-cmp-saved-name {
	padding: var(--space-sm) var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	font-size: var(--text-sm);
	color: var(--app-grp-baby);
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.bn-cmp-saved-name:hover {
		border-color: var(--app-grp-baby);
		background: var(--app-grp-baby-soft);
	}
}

.bn-cmp-verdict {
	color: var(--app-ink);
	text-align: center;
}

.bn-cmp-trophy {
	margin-right: var(--space-sm);
	color: var(--app-orange);
}

.bn-cmp-eq {
	margin-right: var(--space-sm);
	color: var(--app-grp-baby);
}

.bn-cmp-best {
	color: var(--app-grp-baby);
}

/* Cột so sánh: row mb-4 + col mb-3 cũ = 40 dưới */
.bn-cmp-cols {
	margin-bottom: calc(var(--space-lg) + var(--space-xl));
}

.bn-cmp-col {
	box-sizing: border-box;
	height: 100%;
	padding: var(--space-xl) var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	background: var(--app-surface);
}

.bn-cmp-col--best {
	border-color: var(--app-grp-baby);
	box-shadow: var(--shadow-card);
}

.bn-cmp-head {
	margin-bottom: var(--space-lg);
	text-align: center;
}

.bn-cmp-name {
	margin-bottom: var(--space-sm);
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.bn-cmp-score {
	font-size: var(--text-3xl);
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
	line-height: 1;
}

.bn-cmp-of {
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.bn-cmp-axis {
	margin-bottom: var(--space-sm);
}

.bn-cmp-axis-head {
	display: flex;
	justify-content: space-between;
	margin-bottom: var(--space-xs);
	font-size: var(--text-2xs);
}

.bn-cmp-axis-k {
	color: var(--app-ink);
}

.bn-cmp-tip {
	margin-top: var(--space-lg);
	padding: var(--space-sm);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-2xs);
	color: var(--app-ink);
	line-height: 1.5;
}

.bn-cmp-more {
	margin-top: var(--space-lg);
	text-align: center;
}

.bn-cmp-share {
	margin-bottom: var(--space-xl);
	text-align: center;
}

.bn-cmp-hr {
	margin: var(--space-2xl) 0;
	border: 0;
	border-top: 1px dashed var(--app-line);
}

.bn-cmp-vote {
	margin-bottom: var(--space-xl);
}

.bn-cmp-vote-box {
	margin-bottom: 0;
	text-align: center;
}

.bn-cmp-vote-p {
	margin-bottom: var(--space-lg);
	color: var(--app-ink);
}

.bn-cmp-vote-go.mb-btn {
	padding: 0 var(--space-3xl);
}

/* ================================================================ parentname.php (/dat-ten-con-theo-ten-bo-me) */
.pn-how {
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	border-radius: var(--radius-sm);
	background: var(--app-gray-soft);
	font-size: var(--text-sm);
	color: var(--app-ink);
	line-height: 1.6;
}

.pn-form .bn-tool-grid {
	margin-bottom: var(--space-sm);
}

.pn-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}

.pn-add-years {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	margin-bottom: var(--space-sm);
	font-size: var(--text-sm);
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.pn-add-ic {
	margin-right: var(--space-xs);
}

.pn-submit.mb-btn {
	padding: 0 var(--space-3xl);
}

@media (min-width: 768px) {
	.pn-add-years {
		margin-bottom: 0;
	}
}

@media (max-width: 767px) {
	.pn-submit.mb-btn {
		width: 100%;
	}
}

.bn-tool-info.pn-ibtn {
	margin-left: var(--space-sm);
}

.pn-sub {
	margin-bottom: var(--space-sm);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

.pn-sub--i {
	font-style: italic;
}

.pn-group-title {
	margin: var(--space-lg) 0 var(--space-sm);
	font-size: var(--text-md);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.pn-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-bottom: var(--space-sm);
	padding: var(--space-sm) var(--space-md);
}

.pn-row .pn-name {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-xs);
	min-width: 0;
	text-decoration: none;
}

.pn-row .pn-full {
	max-width: 100%;
	overflow: hidden;
	font-weight: var(--fw-bold);
	color: var(--app-ink);
	text-transform: capitalize;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pn-row .pn-side {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: var(--space-sm);
}

.pn-kind {
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-full);
	background: var(--app-grp-baby-soft);
	font-size: var(--text-2xs);
	line-height: 1;
	color: var(--app-grp-baby);
	white-space: nowrap;
}

.pn-pts {
	display: inline-block;
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius-full);
	background: var(--app-green-soft);
	color: var(--app-green-ink);
	font-size: var(--text-2xs);
	font-weight: var(--fw-bold);
	line-height: 1;
	white-space: nowrap;
}

.pn-score-link {
	padding: var(--space-xs);
	color: var(--app-ink-sub);
}

.pn-empty {
	margin-bottom: 0;
	color: var(--app-ink-sub);
}

.pn-try {
	margin-bottom: var(--space-xl);
	font-size: var(--text-sm);
	color: var(--app-ink-sub);
	text-align: center;
}

/* Màn lùn theo chiều cao (máy gập ngang) */
@media (max-height: 420px) {
	.bn-hero.pn-hero {
		margin-bottom: var(--space-md);
		padding: var(--space-md) var(--space-lg);
	}

	.bn-tool-h1.pn-h1 {
		margin-bottom: var(--space-sm);
		font-size: var(--text-2xl);
	}
}

/* ================================================================ trang danh sách / tìm tên (bnl-*): hub, index, search, top, topscore, gender, lastname, new, saved, vote, voteview, aisuggest */
/* ==================================================================================================================
   Đặt tên con, trang danh sách / tìm tên (Sóng 4 babynames/, plan docs/124-data/plan-tailwind-daisyui-2026-12-02.md
   mục 8.2 C, 05/12/2026): hub (mệnh / năm / chủ đề / tuổi), /dat-ten-cho-con, tìm kiếm, top hot, tên điểm cao, giới tính,
   theo họ, tên mới, đã lưu, bình chọn (tạo + xem), gợi ý AI; partial _search_form, _name_tools, _name_cards, _nick_rank,
   _saved_names, _item, _name_list_column. Thay khối <style> trong view (kể _style, _filter_style, _compact_screen) và
   lưới / utility / tab / collapse Bootstrap. Chỉ token DS (css/mb-ds.css :root), lớp mới tiền tố bnl-*.
   Lớp cũ giữ tên vì JS / trang khác đọc: nc-* (_name_nextup), nh-* + .has (_saved_names), pick-name / picked (vote),
   nb-ho-grid (index), nick-rank .is-open, nf-* / name-filter / nb-h1 / hub-* / th-* / nt-* (chỉ cụm này dùng).
   Nạp: importCSS('babynames-pages', filemtime, false) một lần mỗi lượt (cờ $GLOBALS['mbBnPagesCss']).
   ================================================================================================================== */

/* ------------------------------------------------------------------ khung trang (thay .container + .row + .col-*) */

.bnl-page [hidden] {
	display: none !important;
}

/* .container mt-0 mt-sm-4 mb-5: rộng theo mốc 576 / 768 / 992 / 1200 như cũ, lề hai bên 16 */
.bnl-page {
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto var(--space-3xl);
	padding-right: var(--space-lg);
	padding-left: var(--space-lg);
}

@media (min-width: 576px) {
	.bnl-page {
		max-width: calc(var(--page-w-read) * 0.75);
		margin-top: var(--space-xl);
	}
}

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

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

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

/* Cột nội dung giữa (thay .row.justify-content-center > .col-md-10 / -lg-10 / -xl-10): rộng 10/12 từ 768, đủ bề ngang dưới 768 */
.bnl-main {
	position: relative;
	width: 100%;
	margin-right: auto;
	margin-left: auto;
}

@media (min-width: 768px) {
	.bnl-main {
		width: calc((100% + var(--space-2xl)) * 5 / 6 - var(--space-2xl));
	}
}

/* col-xl-9 (tên điểm cao, bình chọn, gợi ý AI) */
@media (min-width: 1200px) {
	.bnl-main--xl9 {
		width: calc((100% + var(--space-2xl)) * 3 / 4 - var(--space-2xl));
	}
}

/* col-lg-9 col-xl-8 (trang bình chọn công khai) */
@media (min-width: 992px) {
	.bnl-main--lg9 {
		width: calc((100% + var(--space-2xl)) * 3 / 4 - var(--space-2xl));
	}
}

@media (min-width: 1200px) {
	.bnl-main--lg9 {
		width: calc((100% + var(--space-2xl)) * 2 / 3 - var(--space-2xl));
	}
}

/* ------------------------------------------------------------------ màn lùn / màn hẹp (thay partial _compact_screen)
   Trang gắn .bnl-cs (trước đây nạp _compact_screen). Lớp .container.mt-sm-4.mb-5 cũ giữ trong selector cho trang
   tên / chấm điểm / so sánh chưa đổi khung (cụm view.php, score.php, compare.php). */

/* D1: main.css ép label / nút / li a viết hoa mỗi chữ: trả về chữ gốc. Tên người (.text-capitalize) vẫn viết hoa. */
:is(.bnl-cs, .container.mt-sm-4.mb-5) label,
:is(.bnl-cs, .container.mt-sm-4.mb-5) .btn,
:is(.bnl-cs, .container.mt-sm-4.mb-5) .mb-btn,
:is(.bnl-cs, .container.mt-sm-4.mb-5) li a {
	text-transform: none;
}

:is(.bnl-cs, .container.mt-sm-4.mb-5) .form-control::placeholder,
:is(.bnl-cs, .container.mt-sm-4.mb-5) .mb-input::placeholder {
	text-transform: none;
}

/* D2: vùng chạm ≥ 44px cho ô nhập, ô chọn, nút của trang chưa đổi (lớp Bootstrap còn trong cụm trang tên) */
.container.mt-sm-4.mb-5 input.form-control,
.container.mt-sm-4.mb-5 select.form-control {
	height: var(--control-md);
}

:is(.bnl-cs, .container.mt-sm-4.mb-5) .btn:not(.btn-link):not(.btn-block) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	min-height: var(--control-md);
}

:is(.bnl-cs, .container.mt-sm-4.mb-5) .btn-block:not(.btn-link) {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	min-height: var(--control-md);
}

:is(.bnl-cs, .container.mt-sm-4.mb-5) .na-btn,
:is(.bnl-cs, .container.mt-sm-4.mb-5) .gender-switch a,
:is(.bnl-cs, .container.mt-sm-4.mb-5) .name-same-pill,
:is(.bnl-cs, .container.mt-sm-4.mb-5) a.name-item-hover.d-inline-block {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
}

/* Ô tròn Bootstrap cũ (trang tên chưa đổi): cả dòng nhãn bấm được, cao 44px */
.container.mt-sm-4.mb-5 .form-check {
	display: flex;
	align-items: center;
	min-height: var(--control-md);
}

.container.mt-sm-4.mb-5 .form-check-input {
	position: static;
	width: var(--space-lg);
	height: var(--space-lg);
	margin: 0 var(--space-sm) 0 0;
}

.container.mt-sm-4.mb-5 .form-check-label {
	display: flex;
	align-items: center;
	min-height: var(--control-md);
}

/* Nút ⓘ trong câu / tiêu đề: icon giữ nguyên chỗ, vùng bấm 44x44 (lề âm để không đẩy dòng) */
.bnl-info,
.btn.btn-link.bn-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--control-md);
	min-height: var(--control-md);
	margin-top: calc(-1 * var(--space-md));
	margin-bottom: calc(-1 * var(--space-md));
	margin-right: calc(-1 * var(--space-md));
	vertical-align: middle;
}

.bnl-info {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--app-blue-ink);
	font-size: inherit;
	cursor: pointer;
}

/* D4: một nút chính (đỏ) mỗi khối; Chia sẻ / Tạo ảnh / Facebook là nút phụ xám.
   !important vì .btn-facebook (createFBShareButton) và nút ảnh có nền màu inline / lớp lõi với !important. */
:is(.bnl-cs, .container.mt-sm-4.mb-5) .btn-facebook,
:is(.bnl-cs, .container.mt-sm-4.mb-5) [data-ms-poster].btn,
:is(.bnl-cs, .container.mt-sm-4.mb-5) [data-ms-name].btn {
	background: var(--app-gray-soft) !important;
	color: var(--app-ink) !important;
	border: 1px solid transparent !important;
	box-shadow: none !important;
}

/* Cột nội dung chỉ 540px ở dải 576–767 thừa ~200px hai bên: giãn đủ bề ngang */
@media (min-width: 576px) and (max-width: 767.98px) {
	.bnl-cs.bnl-page,
	.container.mt-sm-4.mb-5 {
		max-width: 100%;
	}
}

/* Màn lùn theo chiều cao (máy gập ngang, điện thoại xoay ngang): bớt lề, ẩn breadcrumb, thẻ đầu trang gọn */
@media (max-height: 559.98px) and (orientation: landscape) {
	.bnl-cs.bnl-page,
	.container.mt-sm-4.mb-5 {
		margin-top: var(--space-sm) !important;
	}

	.bnl-cs .bnl-crumb,
	.nb-crumb,
	.hub-crumb,
	.container .row > div > .mb-3.text-muted:first-child {
		display: none;
	}

	.bnl-cs .bnl-hero,
	.bnl-cs .hub-head {
		padding: var(--space-md) var(--space-lg) !important;
		margin-bottom: var(--space-md) !important;
	}

	.bnl-cs .bnl-hero__title {
		font-size: var(--text-2xl);
		margin-bottom: var(--space-sm) !important;
	}

	.bnl-cs .bnl-hero__lead,
	.bnl-cs .hub-head p {
		margin-bottom: var(--space-sm) !important;
	}
}

/* ------------------------------------------------------------------ chữ tiêu đề (thay partial _style: h1 32, h2 20, h3 18)
   .bnl-st: trang trước đây nạp _style. Trang chấm điểm / so sánh / theo tên bố mẹ chưa đổi khung giữ selector cũ. */

:where(.bnl-st, .container.mb-5) h1 {
	font-size: var(--text-3xl);
	letter-spacing: -0.5px;
}

:where(.bnl-st, .container.mb-5) h2 {
	font-size: var(--text-xl);
	letter-spacing: -0.3px;
}

:where(.bnl-st, .container.mb-5) h3 {
	font-size: var(--text-lg);
}

/* ------------------------------------------------------------------ mảnh dùng chung các trang */

/* Breadcrumb trên thẻ đầu trang (thay .mb-3.text-muted) */
.bnl-crumb {
	margin-bottom: var(--space-lg);
	font-size: var(--text-sm);
	color: var(--app-ink-sub);
}

.bnl-crumb--tight {
	margin-bottom: var(--space-md);
}

/* Thẻ đầu trang (thay .hero-header-card.p-4.mb-3.text-center) */
.bnl-hero {
	margin-bottom: var(--space-lg);
	padding: var(--space-xl);
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	text-align: center;
}

.bnl-hero--start {
	text-align: left;
}

.bnl-center {
	text-align: center;
}

.bnl-hero__title {
	margin: 0;
	font-size: var(--text-3xl);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	letter-spacing: -0.5px;
	color: var(--app-grp-baby);
}

/* tiêu đề có đoạn dưới: lề 16, dòng 1.3 (thay .mb-3.lh13) */
.bnl-hero__title--gap {
	margin-bottom: var(--space-lg);
	line-height: 1.3;
}

/* tiêu đề căn giữa nhiều dòng (trang bình chọn) */
.bnl-hero__title--balance {
	text-wrap: balance;
}

.bnl-hero__title-sub {
	color: var(--app-ink);
}

.bnl-hero__title .fa-bookmark {
	margin-right: var(--space-sm);
}

.bnl-hero__lead {
	margin: 0 0 var(--space-lg);
	font-size: var(--text-md);
	line-height: 1.6;
	color: var(--app-ink);
}

.bnl-hero__lead--end {
	margin-bottom: 0;
}

.bnl-hero__lead--wide {
	margin-bottom: var(--space-xl);
	text-align: center;
}

.bnl-hero__meta {
	margin: 0;
	font-size: var(--text-sm);
	color: var(--app-ink-sub);
}

.bnl-hero__meta strong {
	color: var(--app-grp-baby);
}

/* Mục cách mục dưới 24 (thay .mb-4) */
.bnl-sec {
	margin-bottom: var(--space-xl);
}

/* Tiêu đề mục có icon tròn (thay h2.section-title.font-weight-bold) */
.bnl-title {
	display: flex;
	align-items: center;
	margin: 0 0 var(--space-lg);
	font-size: var(--text-xl);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	letter-spacing: -0.3px;
	color: var(--app-ink);
}

.bnl-title > i {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--space-2xl);
	height: var(--space-2xl);
	margin-right: var(--space-md);
	border-radius: 50%;
	background-color: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
}

/* Thẻ trắng nội dung (thay .meaning-card.p-4, .bg-white.p-4.shadow-sm.border) */
.bnl-panel {
	position: relative;
	padding: var(--space-xl);
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.bnl-panel--center {
	text-align: center;
}

.bnl-panel--gap {
	margin-bottom: var(--space-lg);
}

/* Đường kẻ đứt chia mục (thay hr.custom-hr): lề 32; --md lề 24 (trang chủ đặt tên, giới tính, theo họ) */
.bnl-hr {
	height: 0;
	margin: var(--space-2xl) 0;
	border: 0;
	border-top: 1px dashed var(--app-line);
}

.bnl-hr--md {
	margin: var(--space-xl) 0;
}

/* Hàng nút căn giữa (thay .text-center.mb-4) */
.bnl-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm);
	margin-bottom: var(--space-xl);
	text-align: center;
}

.bnl-actions--top {
	margin-top: var(--space-lg);
	margin-bottom: 0;
}

.bnl-actions--stack {
	flex-direction: column;
	align-items: center;
	gap: var(--space-xs);
}

/* Khối chia sẻ cuối danh sách (thay .hub-share.text-center.mb-4, .mt-2) */
.bnl-share {
	margin-bottom: var(--space-xl);
	text-align: center;
}

.bnl-share--top {
	margin-top: var(--space-sm);
}

.bnl-share-note {
	margin: 0 0 var(--space-sm);
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
	color: var(--app-ink-sub);
}

/* Hàng tên có thứ hạng / bình chọn đã tạo (thay a.link-nostyle > .name-item-hover.p-3.mb-2.d-flex) */
.bnl-row {
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	margin-bottom: var(--space-sm);
	padding: var(--space-lg);
	background-color: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	color: var(--app-ink);
	text-decoration: none;
	transition: transform var(--motion-ui) var(--motion-ease), border-color var(--motion-ui) var(--motion-ease),
		background-color var(--motion-ui) var(--motion-ease), box-shadow var(--motion-ui) var(--motion-ease);
}

.bnl-row:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.bnl-row:hover {
		transform: translateY(-2px);
		border-color: var(--app-grp-baby);
		background-color: var(--app-grp-baby-soft);
		box-shadow: var(--shadow-card);
		color: var(--app-ink);
		text-decoration: none;
	}
}

.bnl-row--between {
	justify-content: space-between;
}

.bnl-row__lead {
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	min-width: 0;
}

.bnl-row__body {
	min-width: 0;
}

.bnl-row__name {
	display: block;
	font-size: var(--text-base);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
	text-transform: capitalize;
}

.bnl-row__sub {
	display: block;
	overflow: hidden;
	font-size: var(--text-xs);
	line-height: 1.4;
	color: var(--app-ink-sub);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.bnl-row__text {
	font-size: var(--text-sm);
	color: var(--app-ink);
}

.bnl-row__chev {
	flex: none;
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

/* Số thứ hạng tròn (thay .rank-badge.mr-3) */
.bnl-rank {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
}

.bnl-rank--top3 {
	background: var(--app-grp-vip);
	color: var(--app-on-color);
}

/* Điểm tên (thay .badge.badge-pill.badge-success.px-3.py-2) */
.bnl-score {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-full);
	background-color: var(--app-green-soft);
	color: var(--app-green-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	line-height: 1;
	white-space: nowrap;
}

/* Công tắc Tất cả / Bé trai / Bé gái của bảng điểm (thay .gender-switch.mb-3 + style inline) */
.bnl-gswitch {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
}

.bnl-gswitch a {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: var(--space-sm) var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	color: var(--app-ink);
	font-size: var(--text-sm);
	text-decoration: none;
}

.bnl-gswitch a.active {
	background: var(--app-grp-baby);
	border-color: var(--app-grp-baby);
	color: var(--app-on-color);
}

/* Lưới ô liên kết 2 cột / 4 cột từ 768 (thay .row.mx-n2 > .col-6.col-md-3.px-2.mb-3) */
.bnl-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-lg);
}

@media (min-width: 768px) {
	.bnl-tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.bnl-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: var(--space-lg);
	background-color: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	color: var(--app-ink);
	font-size: var(--text-sm);
	text-align: center;
	text-decoration: none;
	transition: transform var(--motion-ui) var(--motion-ease), border-color var(--motion-ui) var(--motion-ease),
		background-color var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.bnl-tile:hover {
		transform: translateY(-2px);
		border-color: var(--app-grp-baby);
		background-color: var(--app-grp-baby-soft);
		box-shadow: var(--shadow-card);
		color: var(--app-ink);
		text-decoration: none;
	}
}

/* Nhãn ô nhập (thay label.font-weight-bold.text-dark.mb-2.font-14) */
.bnl-label {
	display: block;
	margin-bottom: var(--space-sm);
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.bnl-label--gap {
	margin-bottom: var(--space-lg);
}

/* Bài viết ngắn cuối trang gợi ý AI (thay .article-card.mb-3) */
.bnl-article {
	margin-bottom: var(--space-lg);
	padding: var(--space-xl);
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	color: var(--app-ink);
	line-height: 1.7;
}

.bnl-article__title {
	margin: 0 0 var(--space-lg);
	font-size: var(--text-xl);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	letter-spacing: -0.3px;
}

.bnl-article__p {
	margin: 0 0 var(--space-sm);
}

.bnl-article__note {
	margin: 0;
	font-size: var(--text-sm);
	font-style: italic;
	color: var(--app-ink-sub);
}

/* ------------------------------------------------------------------ lớp cũ của partial _style (trang chấm điểm, so sánh,
   theo tên bố mẹ, tên chi tiết: view / score / compare / parentname chưa đổi). Giữ tên cũ cho tới khi các trang đó đổi.
   Ba thẻ cũ hero-header-card / meaning-card / article-card (và hero-name-card ở màn lùn) không giữ ở đây vì tên đuôi -card
   bị cổng DS chặn: cụm trang tên chi tiết thay bằng lớp bn-* của mình. */

.section-title {
	display: flex;
	align-items: center;
	margin-bottom: var(--space-lg);
	color: var(--app-ink);
}

.section-title i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--space-2xl);
	height: var(--space-2xl);
	margin-right: var(--space-md);
	border-radius: 50%;
	background-color: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
}

/* Nút phụ xám (DS: nút chính đỏ, phụ xám) */
.btn-custom-outline {
	border: 1px solid transparent;
	background: var(--app-gray-soft);
	color: var(--app-ink);
	font-weight: var(--fw-semi);
	transition: background-color var(--motion-ui) var(--motion-ease);
}

.btn-custom-outline:active,
.btn-custom-outline.is-pressed {
	background: var(--app-gray-pressed);
	color: var(--app-ink);
}

@media (hover: hover) and (pointer: fine) {
	.btn-custom-outline:hover {
		background: var(--app-gray-pressed);
		color: var(--app-ink);
	}
}

hr.custom-hr {
	margin: var(--space-2xl) 0;
	border-top: 1px dashed var(--app-line);
}

.text-brand {
	color: var(--app-grp-baby) !important;
}

.border-brand {
	border-color: var(--app-grp-baby) !important;
}

.bg-brand-light {
	background-color: var(--app-grp-baby-soft);
}

.name-item-hover {
	background-color: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	transition: all var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.name-item-hover:hover {
		transform: translateY(-2px);
		border-color: var(--app-grp-baby);
		background-color: var(--app-grp-baby-soft);
		box-shadow: var(--shadow-card) !important;
	}
}

/* ------------------------------------------------------------------ hub (mệnh / năm / chủ đề / tuổi): hub.php */

.hub-head {
	margin-bottom: var(--space-xl);
	padding: var(--space-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.hub-h1 {
	margin: 0 0 var(--space-md);
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-2xl-lh);
	color: var(--app-ink);
}

/* Máy gập đóng (280): tiêu đề 20px để ít dòng, đỡ chữ lẻ */
@media (max-width: 359.98px) {
	.hub-h1 {
		font-size: var(--text-xl);
		line-height: var(--text-xl-lh);
	}
}

@media (min-width: 992px) {
	.hub-h1 {
		font-size: var(--text-3xl);
		line-height: var(--text-3xl-lh);
	}
}

.hub-lead {
	margin: 0 0 var(--space-md);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
}

.hub-lead-more {
	margin: 0 0 var(--space-md);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	color: var(--app-ink-sub);
}

.hub-count {
	margin: 0 0 var(--space-md);
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
	color: var(--app-ink-sub);
}

.hub-count strong {
	color: var(--app-ink);
}

.gender-switch .mb-seg__btn {
	font-size: var(--text-md);
	text-decoration: none;
}

@media (min-width: 768px) {
	.gender-switch {
		max-width: 480px;
	}
}

.hub-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.hub-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: 0 var(--space-lg);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	color: var(--app-ink);
	font-size: var(--text-md);
	font-weight: var(--fw-medium);
	line-height: var(--text-md-lh);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.hub-link:hover {
		color: var(--app-ink);
		text-decoration: none;
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby);
	}
}

.hub-faq {
	margin: var(--space-xl) 0;
}

.hub-faq .mb-accordion__summary {
	font-size: var(--text-base);
	line-height: var(--text-base-lh);
}

.hub-faq .mb-accordion__a + .mb-link {
	display: inline-block;
	margin-top: var(--space-sm);
}

.hub-faq .mb-link + .mb-link {
	margin-top: var(--space-sm);
}

.hub-score-note {
	margin: 0 0 var(--space-md);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
}

.hub-all-head {
	margin-top: var(--space-xl);
}

/* ------------------------------------------------------------------ trang chủ đặt tên: index.php */

.nb-panel {
	padding: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.nb-panel--hero {
	margin-bottom: var(--space-xl);
}

.nb-hero-h1 {
	margin: 0 0 var(--space-sm);
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-2xl-lh);
	color: var(--app-ink);
	text-align: center;
	text-transform: capitalize;
	text-wrap: balance; /* tiêu đề căn giữa */
}

@media (min-width: 992px) {
	.nb-hero-h1 {
		font-size: var(--text-3xl);
		line-height: var(--text-3xl-lh);
	}
}

.nb-subtitle {
	margin: 0 0 var(--space-lg);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
	text-align: center;
}

.nb-subtitle__num {
	color: var(--app-grp-baby);
	font-weight: var(--fw-bold);
}

.nb-sec {
	margin-bottom: var(--space-lg);
}

.nb-more {
	display: flex;
	justify-content: center;
}

.nb-more .mb-btn .fas {
	color: var(--app-blue);
}

/* Ô họ (mock Bản 3): một lưới 30 họ + công tắc Bé trai / Bé gái; lưới giới kia vẫn có trong HTML (hidden) để giữ đủ link */
.nb-ho-switch {
	margin-bottom: var(--space-md);
}

.nb-ho-switch .mb-seg__btn {
	font-size: var(--text-md);
}

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

.nb-ho-grid[hidden] {
	display: none;
}

@media (min-width: 768px) {
	.nb-ho-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

.nb-ho-cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--control-md);
	padding: 0 var(--space-sm);
	background: var(--app-surface);
	border-radius: var(--radius-full);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	color: var(--app-ink);
	font-size: var(--text-md);
	font-weight: var(--fw-medium);
	line-height: var(--text-md-lh);
	white-space: nowrap;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.nb-ho-cell:hover {
		color: var(--app-ink);
		text-decoration: none;
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby);
	}
}

.nb-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Nhóm lối vào theo mệnh / năm / ý nghĩa */
.nb-group + .nb-group {
	margin-top: var(--space-lg);
}

.nb-group-title {
	margin: 0 0 var(--space-md);
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
	line-height: var(--text-lg-lh);
	color: var(--app-ink);
}

.nb-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.nb-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: 0 var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-full);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	color: var(--app-ink);
	font-size: var(--text-md);
	font-weight: var(--fw-medium);
	line-height: var(--text-md-lh);
	white-space: nowrap;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.nb-link:hover {
		color: var(--app-ink);
		text-decoration: none;
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby);
	}
}

/* Bài viết cuối trang (SEO) */
.nb-article {
	margin-bottom: var(--space-xl);
	padding: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	color: var(--app-ink);
}

.nb-article h2 {
	margin: 0 0 var(--space-md);
	font-size: var(--text-xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-xl-lh);
	color: var(--app-ink);
}

.nb-article h2 + p,
.nb-article .nb-lead {
	margin: 0 0 var(--space-lg);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
}

.nb-article .mb-accordion + h2,
.nb-article .nb-avoid + h2 {
	margin-top: var(--space-xl);
}

.nb-article .mb-accordion {
	box-shadow: inset 0 0 0 1px var(--app-line);
}

.nb-avoid {
	padding: var(--space-lg);
	background: var(--app-gray-soft);
	border-radius: var(--radius-md);
}

.nb-avoid p {
	display: flex;
	gap: var(--space-sm);
	margin: 0;
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
}

.nb-avoid p + p {
	margin-top: var(--space-sm);
}

.nb-avoid .fas {
	flex: none;
	margin-top: var(--space-xs);
	color: var(--app-red-ink);
}

.nb-footer-intro {
	margin-top: var(--space-lg);
	padding: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	font-size: var(--text-md);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
}

.nb-footer-intro p {
	margin: 0;
}

.nb-footer-intro strong {
	color: var(--app-grp-baby);
}

/* Tiêu đề mục là link: nới vùng bấm lên 44 (lõi section.css chưa có ::after; đề xuất đưa vào lõi) */
.nb-sec .mb-section-head__title-link::after,
.th-section .mb-section-head__title-link::after {
	content: "";
	position: absolute;
	inset: -10px -8px;
}

/* ------------------------------------------------------------------ trang giới tính + theo họ (thay partial _filter_style) */

/* Tiêu đề trang danh sách tên: căn trái, chữ mực (mock Bản 3) */
.nb-h1 {
	margin: 0 0 var(--space-md);
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-2xl-lh);
	color: var(--app-ink);
	letter-spacing: 0;
}

/* Máy gập đóng (280): tiêu đề 20px để ít dòng, đỡ chữ lẻ */
@media (max-width: 359.98px) {
	.nb-h1 {
		font-size: var(--text-xl);
		line-height: var(--text-xl-lh);
	}
}

@media (min-width: 992px) {
	.nb-h1 {
		font-size: var(--text-3xl);
		line-height: var(--text-3xl-lh);
	}
}

/* Bộ lọc gọn (B2, docs/111) */
.name-filter {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
}

.nf-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.nf-row > .mb-seg {
	flex: 1 1 200px;
}

.nf-row > .mb-seg .mb-seg__btn {
	font-size: var(--text-md);
	text-decoration: none;
}

.nf-select {
	position: relative;
	flex: 1 1 140px;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	margin: 0;
	min-height: var(--control-md);
	padding: 0 0 0 var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-full);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	font-size: var(--text-sm);
	font-weight: var(--fw-medium);
	line-height: var(--text-sm-lh);
	color: var(--app-ink-sub);
	white-space: nowrap;
}

.nf-select select {
	flex: 1;
	min-width: 0;
	height: var(--control-md);
	padding: 0 var(--control-sm) 0 0;
	border: 0;
	background: transparent;
	font-family: var(--font-app);
	font-size: var(--text-base);
	font-weight: var(--fw-semi);
	color: var(--app-ink);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.nf-select select:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
	border-radius: var(--radius-full);
}

/* chevron 20px + lề 12 nằm trong phần đệm phải 36 của ô chọn */
.nf-chev {
	position: absolute;
	right: var(--space-md);
	top: 50%;
	transform: translateY(-50%);
	font-size: var(--text-xl);
	line-height: var(--text-xl);
	color: var(--app-ink-sub);
	pointer-events: none;
}

@media (min-width: 768px) {
	.name-filter {
		flex-direction: row;
		align-items: center;
	}

	.name-filter .nf-row {
		flex: 1;
	}

	/* Hai ô chọn đứng cạnh nhau (màn lùn 882x344 đỡ một hàng) */
	.name-filter .nf-select {
		flex: 1 1 0;
	}
}

/* ------------------------------------------------------------------ ô tìm tên: partial _search_form */

/* Tab Theo họ / Theo tên / Đã lưu: dùng .mb-tabs của DS, gạch chân màu nhóm bé như bản cũ */
.bnl-sfnav.mb-tabs {
	justify-content: flex-start;
	gap: 0;
	margin-bottom: var(--space-xl);
	border-bottom: 2px solid var(--app-grp-baby-soft);
	-webkit-mask-image: none;
	mask-image: none;
}

.bnl-sfnav .mb-tabs__tab {
	gap: var(--space-xs);
	margin-bottom: -2px;
	padding: 0 var(--space-md);
	border-bottom-width: 2px;
	color: var(--app-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-medium);
	text-transform: none;
	transition: color var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.bnl-sfnav .mb-tabs__tab:hover {
		color: var(--app-grp-baby);
	}
}

.bnl-sfnav .mb-tabs__tab.is-selected {
	color: var(--app-grp-baby);
	font-weight: var(--fw-medium);
	border-bottom-color: var(--app-grp-baby);
}

/* Dưới 576px, 3 tab với đệm 12 rộng hơn thẻ chứa nên tab "Đã lưu" bị cắt: dàn đều, đệm 4 */
@media (max-width: 575.98px) {
	.bnl-sfnav.mb-tabs {
		justify-content: space-between;
	}

	.bnl-sfnav .mb-tabs__tab {
		padding: 0 var(--space-xs);
	}
}

@media (min-width: 768px) {
	.bnl-sfnav .mb-tabs__tab {
		padding: 0 var(--space-lg);
		font-size: var(--text-base);
	}
}

.bnl-sf {
	margin-bottom: var(--space-lg);
}

/* Hai ô Họ của bố / Họ của mẹ: chồng dọc trên điện thoại, cạnh nhau từ 768 (thay .row.mx-n2 > .col-12.col-md-6) */
.bnl-sf__pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-lg);
	margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
	.bnl-sf__pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.bnl-sf__field {
	margin-bottom: var(--space-xl);
}

.bnl-sf .bnl-cap {
	text-transform: capitalize;
}

/* Ô tên + nút Tìm dính liền (thay .input-group + .input-group-append) */
.bnl-sf__inline {
	display: flex;
	align-items: stretch;
}

.bnl-sf__inline .mb-input {
	flex: 1 1 auto;
	min-width: 0;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.bnl-sf__inline .mb-btn {
	flex: none;
	height: auto;
	min-height: var(--control-md);
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.bnl-sf__form {
	margin-bottom: var(--space-xl);
}

/* Dòng "hoặc lọc theo chữ cái" giữa đường kẻ (thay .position-relative.my-4 > hr + khối style inline) */
.bnl-sf__or {
	display: flex;
	align-items: center;
	gap: var(--space-lg);
	margin: var(--space-xl) 0;
	font-size: var(--text-xs);
	font-style: italic;
	color: var(--app-ink);
	white-space: nowrap;
}

.bnl-sf__or::before,
.bnl-sf__or::after {
	content: "";
	flex: 1 1 auto;
	border-top: 1px solid var(--app-line);
}

/* Chọn bé trai / bé gái: dùng .mb-radio của DS, cả hàng (chấm + chữ) là một <label> cao 44px. Hai lựa chọn sát nhau,
   mỗi bên đệm ngang 12px để không còn khe chết (log UX 05/12/2026: rage_click vào khe của bản Bootstrap cũ). */
.bn-gender {
	margin-bottom: var(--space-xl);
}

.bn-gender .mb-radio-group__list {
	justify-content: center;
	gap: 0;
}

.bn-gender .mb-radio {
	margin: 0;
	padding: 0 var(--space-md);
}

.bn-gender .mb-radio__input:checked ~ .mb-radio__label {
	font-weight: var(--fw-semi);
}

/* ------------------------------------------------------------------ lối vào công cụ: partial _name_tools */

.nt-wrap {
	margin-bottom: var(--space-xl);
}

.nt-year {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	min-height: 64px;
	margin-bottom: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	border-radius: var(--radius-card);
	background: var(--app-grp-baby-soft);
	color: var(--app-ink);
	text-decoration: none;
}

.nt-year > .nt-year__ic {
	flex: none;
	font-size: var(--text-2xl);
	color: var(--app-grp-baby);
}

.nt-year__txt {
	flex: 1 1 auto;
	min-width: 0;
}

.nt-year__t {
	display: block;
	font-size: var(--text-md);
	font-weight: var(--fw-bold);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
}

.nt-year__d {
	display: block;
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	color: var(--app-ink-sub);
}

.nt-year > .nt-year__go {
	flex: none;
	color: var(--app-ink-sub);
}

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

@media (min-width: 768px) {
	.nt-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.nt-tool {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	height: 100%;
	min-height: 64px;
	padding: var(--space-md);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	color: var(--app-ink);
	text-decoration: none;
	transition: box-shadow var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.nt-tool:hover {
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby), var(--shadow-card);
	}
}

.nt-tool .nt-ic {
	flex: 0 0 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	border-radius: var(--radius-md);
	background: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-lg);
}

.nt-tool .nt-txt {
	min-width: 0;
}

.nt-tool .nt-t {
	display: block;
	font-size: var(--text-sm);
	font-weight: var(--fw-bold);
	line-height: var(--text-sm-lh);
	color: var(--app-ink);
	white-space: nowrap;
}

.nt-tool .nt-d {
	display: block;
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	color: var(--app-ink-sub);
}

/* Điện thoại: thẻ hẹp, đặt icon lên trên để chữ đủ chỗ, không rớt dòng */
@media (max-width: 575.98px) {
	.nt-tool {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-sm);
	}

	.nt-tool .nt-ic {
		flex-basis: auto;
		width: var(--space-2xl);
		height: var(--space-2xl);
		border-radius: var(--radius-sm);
		font-size: var(--text-md);
	}
}

/* ------------------------------------------------------------------ thẻ tên đẹp có hạng: partial _name_cards (hub năm sinh) */

/* Đợt 4 lô 6 (mock Bản 3, owner chốt 30/11/2026): thẻ trắng bóng thẻ bo 16 (≤575 tràn mép), một màu nhóm bé cho hạng top 3
   và nhãn hành; logo góc phải hàng trên */
.th-section + .th-section {
	margin-top: var(--space-xl);
}

.th-section .mb-section-head {
	align-items: center;
}

.th-poster.mb-btn {
	padding: 0 var(--space-lg);
}

.th-poster .fas {
	color: var(--app-blue);
}

.th-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: var(--space-md);
}

.th-item {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	color: var(--app-ink);
	cursor: pointer;
}

.th-item-top {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.th-rank {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--radius-full);
	background: var(--app-gray-soft);
	color: var(--app-ink);
	font-size: var(--text-xs);
	font-weight: var(--fw-bold);
	line-height: var(--text-xs-lh);
}

.th-rank.top3 {
	background: var(--app-grp-baby);
	color: var(--app-on-color);
}

.th-label {
	display: inline-flex;
	align-items: center;
	height: var(--space-xl);
	padding: 0 var(--space-sm);
	border-radius: var(--radius-full);
	background: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-size: var(--text-2xs);
	font-weight: var(--fw-semi);
	line-height: var(--text-2xs-lh);
	white-space: nowrap;
}

.th-brand {
	flex: none;
	display: flex;
	margin-left: auto;
}

.th-brand img {
	width: auto;
	height: var(--space-lg);
}

.th-name {
	margin: var(--space-sm) 0 0;
	font-size: var(--text-2xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-2xl-lh);
	color: var(--app-ink);
	text-transform: capitalize;
}

/* Cả thẻ bấm được để mở trang tên; nút Chia sẻ nằm trên lớp link */
.th-open {
	color: inherit;
	text-decoration: none;
}

.th-open::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

@media (hover: hover) and (pointer: fine) {
	.th-open:hover {
		color: inherit;
		text-decoration: none;
	}

	.th-item:hover {
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby), var(--shadow-card);
	}
}

.th-open:focus-visible {
	outline: none;
	text-decoration: underline;
	text-decoration-color: var(--app-focus);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.th-open:focus-visible::after {
	box-shadow: inset 0 0 0 2px var(--app-focus);
}

.th-score {
	margin-top: var(--space-xs);
	font-size: var(--text-md);
	font-weight: var(--fw-bold);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
}

.th-score small {
	font-size: var(--text-xs);
	font-weight: var(--fw-medium);
	color: var(--app-ink-sub);
}

.th-meaning {
	flex: 1;
	display: -webkit-box;
	margin: var(--space-sm) 0 var(--space-md);
	overflow: hidden;
	font-size: var(--text-sm);
	line-height: var(--text-sm-lh);
	color: var(--app-ink-sub);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.th-item-foot {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	padding-top: var(--space-sm);
	border-top: 1px solid var(--app-line);
}

.th-more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	min-height: var(--control-md);
	margin-right: auto;
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	line-height: var(--text-sm-lh);
	color: var(--app-ink);
	white-space: nowrap;
}

.th-more .fas {
	font-size: var(--text-2xs);
	color: var(--app-blue);
}

.th-item-foot .mb-btn {
	position: relative;
	z-index: 2;
	padding: 0 var(--space-lg);
}

.th-item-foot .mb-btn .fas,
.th-section-more .mb-btn .fas {
	color: var(--app-blue);
}

.th-section-more {
	display: flex;
	justify-content: center;
	margin-top: var(--space-md);
}

/* Máy gập đóng (280): nút "Xem thêm tên bé … 2027" dài hơn màn, cho xuống dòng (chữ giữ nguyên) */
@media (max-width: 359.98px) {
	.th-section-more .mb-btn {
		height: auto;
		min-height: var(--control-md);
		padding: var(--space-sm) var(--space-lg);
		white-space: normal;
		text-align: center;
	}
}

/* ------------------------------------------------------------------ top tên ở nhà theo năm: partial _nick_rank */

.nick-rank {
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.nick-rank__head {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	margin: 0 0 var(--space-sm);
	font-size: var(--text-xl);
	font-weight: var(--fw-bold);
	line-height: var(--text-xl-lh);
	color: var(--app-ink);
}

.nick-rank__head span {
	flex: 1;
	min-width: 0;
}

/* Nút ⓘ: icon 18px, vùng bấm 44 */
.nick-rank__info {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--control-md);
	height: var(--control-md);
	margin: calc(-1 * var(--space-sm)) calc(-1 * var(--space-md)) calc(-1 * var(--space-sm)) 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--app-ink-sub);
	font-size: var(--text-lg);
	text-decoration: none;
	cursor: pointer;
}

.nick-rank__note {
	margin: 0 0 var(--space-sm);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	color: var(--app-ink-sub);
}

.nick-rank__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 var(--space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.nick-rank__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Máy gập đóng (280): một cột */
@media (max-width: 359.98px) {
	.nick-rank__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Cả hàng bấm được (link phủ hàng bằng ::after), cao 44 */
.nick-rank__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	min-width: 0;
	min-height: var(--control-md);
	border-bottom: 1px solid var(--app-line);
}

.nick-rank__item.is-more {
	display: none;
}

.nick-rank.is-open .nick-rank__item.is-more {
	display: flex;
}

.nick-rank__no {
	flex: none;
	width: var(--space-xl);
	color: var(--app-ink-sub);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	text-align: right;
}

.nick-rank__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: var(--text-md);
	font-weight: var(--fw-semi);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
	white-space: nowrap;
	text-overflow: ellipsis;
}

a.nick-rank__name {
	text-decoration: none;
}

a.nick-rank__name::after {
	content: "";
	position: absolute;
	inset: 0;
}

.nick-rank__count {
	flex: none;
	color: var(--app-ink-sub);
	font-size: var(--text-xs);
	line-height: var(--text-xs-lh);
	white-space: nowrap;
}

.nick-rank__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-md);
	margin-top: var(--space-md);
}

.nick-rank__other {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	min-height: var(--control-md);
	margin-left: auto;
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	line-height: var(--text-sm-lh);
	color: var(--app-ink);
	text-decoration: none;
}

.nick-rank__other i {
	color: var(--app-blue);
	font-size: var(--text-2xs);
}

/* ------------------------------------------------------------------ "Danh sách của mẹ": partial _saved_names
   Dưới 1200: dải gọn trên danh sách (chỉ khi đã lưu ≥ 1 tên). Từ 1200: cột phải dính 300px (.nh-col trên cột chính). */

.nh-saved {
	display: none;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-md);
	margin-bottom: var(--space-lg);
	padding: var(--space-md) var(--space-lg);
	background: var(--app-grp-baby-soft);
	border-radius: var(--radius-card);
}

.nh-saved.has {
	display: flex;
}

.nh-saved-title {
	margin: 0;
	font-size: var(--text-md);
	font-weight: var(--fw-bold);
	line-height: var(--text-md-lh);
	color: var(--app-ink);
	white-space: nowrap;
}

.nh-saved-title i {
	margin-right: var(--space-xs);
	color: var(--app-grp-baby);
}

.nh-saved-list {
	flex: 1 1 200px;
	display: flex;
	gap: var(--space-sm);
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.nh-saved-list::-webkit-scrollbar {
	display: none;
}

.nh-saved-list a {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	padding: 0 var(--space-md);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	color: var(--app-ink);
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	line-height: var(--text-sm-lh);
	text-transform: capitalize;
	text-decoration: none;
}

.nh-saved-go.mb-btn {
	padding: 0 var(--space-lg);
	font-size: var(--text-sm);
}

.nh-saved-go .fas {
	color: var(--app-blue);
}

.nh-saved-more {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	font-size: var(--text-sm);
	font-weight: var(--fw-semi);
	line-height: var(--text-sm-lh);
	color: var(--app-ink);
	white-space: nowrap;
	text-decoration: underline;
	text-decoration-color: var(--app-line-strong);
	text-underline-offset: 3px;
}

.nh-tools,
.nh-saved-hint {
	display: none;
}

@media (min-width: 1200px) {
	.nh-col,
	.bnl-main.nh-col {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		column-gap: var(--space-xl);
		align-items: start;
		width: 100%;
		max-width: 100%;
	}

	.nh-col > * {
		grid-column: 1;
		min-width: 0;
	}

	/* dưới thanh trên dính 68px + 16 */
	.nh-col > .nh-aside {
		grid-column: 2;
		grid-row: 1 / span 99;
		position: sticky;
		top: calc(var(--topbar-h) + var(--space-xl) + var(--space-xs));
		display: flex;
		flex-direction: column;
		gap: var(--space-lg);
	}

	.nh-saved,
	.nh-saved.has {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		margin: 0;
	}

	.nh-saved-list {
		flex: none;
		flex-wrap: wrap;
		overflow: visible;
	}

	.nh-saved-hint {
		display: block;
		margin: 0;
		font-size: var(--text-sm);
		line-height: var(--text-sm-lh);
		color: var(--app-ink);
	}

	.nh-saved.has .nh-saved-hint {
		display: none;
	}

	.nh-saved:not(.has) .nh-saved-go,
	.nh-saved:not(.has) .nh-saved-more {
		display: none;
	}

	.nh-tools {
		display: flex;
		flex-direction: column;
		padding: var(--space-sm);
		background: var(--app-surface);
		border-radius: var(--radius-card);
		box-shadow: var(--shadow-card);
	}

	.nh-tools a {
		display: flex;
		align-items: center;
		gap: var(--space-md);
		min-height: var(--control-md);
		padding: 0 var(--space-md);
		border-radius: var(--radius-md);
		color: var(--app-ink);
		font-size: var(--text-md);
		font-weight: var(--fw-semi);
		line-height: var(--text-md-lh);
		text-decoration: none;
	}

	.nh-tools i {
		width: var(--text-xl);
		color: var(--app-grp-baby);
		text-align: center;
	}
}

@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
	.nh-tools a:hover {
		background: var(--app-gray-soft);
	}
}

/* ------------------------------------------------------------------ ô tên 44, 2 cột điện thoại: partial _name_list_column
   Bản 3: màn rộng tự chia cột theo bề ngang (cột nội dung hẹp đi khi có cột phải 300px). */

.nc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
}

@media (min-width: 576px) {
	.nc-grid {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
	}
}

/* Máy gập đóng (280): một cột để tên dài không phải xuống dòng trong ô hẹp */
@media (max-width: 359.98px) {
	.nc-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.nc-item {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--control-md);
	padding-left: var(--space-lg);
	background: var(--app-surface);
	border-radius: var(--radius-full);
	box-shadow: inset 0 0 0 1px var(--app-line-strong);
	transition: box-shadow var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.nc-item:hover {
		box-shadow: inset 0 0 0 1.5px var(--app-grp-baby);
	}
}

.nc-head {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: var(--space-xs) 0;
}

.nc-name {
	margin: 0;
	font-size: var(--text-md);
	font-weight: var(--fw-semi);
	line-height: var(--text-md-lh);
	text-transform: capitalize;
}

/* Cả ô bấm được để mở trang tên (::after phủ ô); nút Lưu nằm trên lớp link */
.nc-name a {
	color: var(--app-ink);
	text-decoration: none;
}

.nc-name a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

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

/* Họ (hub họ): tiêu đề trang đã ghi họ nên ô chỉ hiện tên; họ vẫn trong chữ link (trình đọc màn hình, máy tìm kiếm) */
.nc-ho {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Focus bàn phím: vòng trong 2px theo góc bo của ô (lớp ::after) + gạch chân dưới tên */
.nc-name a:focus-visible {
	outline: none;
	background: none;
	box-shadow: none;
	text-decoration: underline;
	text-decoration-color: var(--app-focus);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.nc-name a:focus-visible::after {
	box-shadow: inset 0 0 0 2px var(--app-focus);
	outline: 2px solid transparent;
	outline-offset: -2px;
}

.nc-meta {
	font-size: var(--text-2xs);
	font-weight: var(--fw-medium);
	line-height: var(--text-2xs-lh);
	color: var(--app-ink-sub);
}

/* icon dấu lưu 18 */
.nc-save {
	position: relative;
	z-index: 2;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--control-md);
	height: var(--control-md);
	border: 0;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--app-ink-sub);
	font-size: var(--text-lg);
	cursor: pointer;
}

.nc-save:focus-visible {
	background: var(--app-gray-soft);
}

@media (hover: hover) and (pointer: fine) {
	.nc-save:hover {
		background: var(--app-gray-soft);
	}
}

.nc-save.on {
	color: var(--app-grp-baby);
}

/* name_js đổi chữ trong .na-lbl; ô chỉ có icon nên giấu chữ, vẫn đọc được bằng trình đọc màn hình */
.nc-save .na-lbl {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ------------------------------------------------------------------ thẻ tên có nghĩa (tìm kiếm, đã lưu): partial _item */

.bnl-item {
	display: block;
	margin-bottom: var(--space-lg);
	padding: var(--space-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	color: var(--app-ink);
	text-decoration: none;
	transition: border-color var(--motion-ui) var(--motion-ease), box-shadow var(--motion-ui) var(--motion-ease),
		transform var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.bnl-item:hover {
		transform: translateY(-2px);
		border-color: var(--app-grp-baby);
		box-shadow: var(--shadow-card);
		color: var(--app-ink);
		text-decoration: none;
	}
}

.bnl-item:focus-visible {
	outline: 2px solid var(--app-focus);
	outline-offset: 2px;
}

/* Tên trên, nghĩa dưới; từ 768 tên cột trái 1/3 có vạch phải, nghĩa cột phải 2/3 */
.bnl-item__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-sm);
	align-items: center;
}

@media (min-width: 768px) {
	.bnl-item__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		gap: var(--space-lg);
	}

	.bnl-item__name {
		align-self: stretch;
		display: flex;
		align-items: center;
		border-right: 1px solid var(--app-line);
	}
}

.bnl-item__name {
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
	text-transform: capitalize;
}

.bnl-item__mean {
	display: -webkit-box;
	overflow: hidden;
	font-size: var(--text-sm);
	line-height: 1.5;
	color: var(--app-ink-sub);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.bnl-item__empty {
	font-style: italic;
}

/* ------------------------------------------------------------------ bình chọn: vote.php */

.bnl-vote-steps {
	max-width: 460px;
	margin: 0 auto var(--space-xl);
	padding-left: var(--space-xl);
	font-size: var(--text-md);
	line-height: 1.6;
	color: var(--app-ink);
}

.bnl-vote-steps li {
	margin-bottom: var(--space-md);
}

.bnl-vote-more {
	display: inline-flex;
	align-items: center;
	min-height: var(--control-md);
	margin-top: var(--space-lg);
	font-size: var(--text-sm);
}

.bnl-vote-title {
	margin-bottom: var(--space-xl);
}

/* Lưới tên để chọn: 2 cột, 4 cột từ 768 (thay .row.mx-n2 > .col-6.col-md-3) */
.bnl-pick-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-lg);
	margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
	.bnl-pick-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.pick-name {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: var(--space-md);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	background: var(--app-surface);
	font-size: var(--text-sm);
	text-align: center;
	text-transform: capitalize;
	cursor: pointer;
	transition: all var(--motion-ui) var(--motion-ease);
}

.pick-name.picked {
	border-color: var(--app-grp-baby);
	background: var(--app-grp-baby-soft);
	color: var(--app-grp-baby);
	font-weight: var(--fw-semi);
}

/* ------------------------------------------------------------------ trang bình chọn công khai: voteview.php */

.bnl-vote-list {
	margin-bottom: var(--space-xl);
}

.bnl-vote-row {
	position: relative;
	overflow: hidden;
	margin-bottom: var(--space-md);
	padding: var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	background: var(--app-surface);
}

/* thanh phần trăm phiếu (bề ngang đặt bằng --bnl-fill ở view) */
.bnl-vote-row__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--bnl-fill, 0%);
	background: var(--app-grp-baby-soft);
	transition: width var(--motion-ui) var(--motion-ease);
}

.bnl-vote-row__content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
}

.bnl-vote-row__body {
	min-width: 0;
}

.bnl-vote-row__link {
	color: var(--app-ink);
	text-decoration: none;
}

.bnl-vote-row__name {
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
	text-transform: capitalize;
}

.bnl-vote-row__count {
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

/* Nút Chọn / Đã chọn: JS đổi mb-btn--primary (đã chọn) ↔ mb-btn--outline */
.bnl-vote-toggle.mb-btn {
	flex: none;
	min-height: var(--control-md);
	height: auto;
	padding: var(--space-sm) var(--space-lg);
	font-size: var(--text-sm);
	white-space: nowrap;
}

.bnl-vote-toggle .far.fa-heart {
	color: var(--app-red);
}

.bnl-vote-share__title {
	margin-bottom: var(--space-sm);
	font-size: var(--text-md);
	font-weight: var(--fw-bold);
	color: var(--app-ink);
}

.bnl-copy-box {
	margin-bottom: var(--space-lg);
	padding: var(--space-md) var(--space-lg);
	border: 1px dashed var(--app-grp-baby);
	border-radius: var(--radius-md);
	background: var(--app-surface);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
	word-break: break-all;
}

.bnl-vote-share__copy {
	margin-bottom: var(--space-sm);
}

/* ------------------------------------------------------------------ gợi ý tên AI: aisuggest.php */

/* Họ / Giới tính / Năm sinh: họ đủ dòng + 2 ô chọn trên điện thoại, 3 cột từ 768 (thay .row.mx-n2 > .col-*) */
.bnl-ai-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 var(--space-lg);
}

.bnl-ai-fields > .bnl-ai-field--full {
	grid-column: 1 / -1;
}

@media (min-width: 768px) {
	.bnl-ai-fields {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.bnl-ai-fields > .bnl-ai-field--full {
		grid-column: auto;
	}
}

.bnl-ai-field {
	margin-bottom: var(--space-lg);
}

/* Máy gập đóng (280): hai ô chọn chung hàng chỉ còn ~48px chữ, cắt "Chưa rõ": mỗi ô một hàng */
@media (max-width: 359.98px) {
	.bnl-ai-fields {
		grid-template-columns: minmax(0, 1fr);
	}
}

.bnl-ai-field .bnl-cap {
	text-transform: capitalize;
}

.bnl-ai-wishes {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	margin-bottom: var(--space-xl);
}

.bnl-wish {
	padding: var(--space-sm) var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-full);
	background: var(--app-surface);
	color: var(--app-grp-baby);
	font-size: var(--text-sm);
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.bnl-wish:hover {
		background: var(--app-grp-baby-soft);
		border-color: var(--app-grp-baby);
	}
}

.bnl-ai-submit {
	text-align: center;
}

.bnl-ai-remaining {
	margin-top: var(--space-sm);
	font-size: var(--text-xs);
	color: var(--app-ink-sub);
}

/* Thẻ tên gợi ý (JS dựng trong #ai_result_list) */
.bnl-ai-name {
	display: block;
	margin-bottom: var(--space-md);
	padding: var(--space-lg);
	border: 1px solid var(--app-line);
	border-radius: var(--radius-md);
	background: var(--app-surface);
	color: var(--app-ink);
	text-decoration: none;
	transition: all var(--motion-ui) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
	.bnl-ai-name:hover {
		border-color: var(--app-grp-baby);
		box-shadow: var(--shadow-card);
		color: var(--app-ink);
		text-decoration: none;
	}
}

.bnl-ai-name__name {
	margin-bottom: var(--space-xs);
	font-size: var(--text-lg);
	font-weight: var(--fw-bold);
	color: var(--app-grp-baby);
	text-transform: capitalize;
}

.bnl-ai-name__mean {
	font-size: var(--text-sm);
	line-height: 1.55;
	color: var(--app-ink-sub);
}

/* Lối sang bài khai sinh dưới công cụ (thay tlClass mt-3) */
.bnl-toollink {
	margin-top: var(--space-lg);
}
