/* quaythuxs — phẳng, tông đỏ, không bo góc, không đổ bóng. */

/* ---------- Font tự host: Be Vietnam Pro (SIL Open Font License) ---------- */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/be-vietnam-pro-400-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/be-vietnam-pro-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/be-vietnam-pro-500-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/be-vietnam-pro-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/be-vietnam-pro-600-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/be-vietnam-pro-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/be-vietnam-pro-700-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/be-vietnam-pro-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/be-vietnam-pro-800-vietnamese.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/be-vietnam-pro-800-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--red: #c8102e;
	--red-dark: #a00d25;
	--red-deep: #5e0a17;
	--red-tint: #fdecee;
	--red-tint-2: #fff6f4;
	--gold: #f2b705;
	--gold-tint: #fff5cf;
	--ink: #1b1516;
	--ink-2: #5d5154;
	--ink-3: #8c7f82;
	--line: #eadfda;
	--bg: #faf6f3;
	--card: #fff;
	--wrap: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { text-wrap: balance; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.hd { background: var(--red); color: #fff; }
.hd-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.logo { display: block; line-height: 0; }
.logo img { display: block; width: auto; height: 36px; }
.hd-date { font-size: 12px; opacity: 0.9; text-align: right; line-height: 1.4; }
.hd-date b { display: block; font-size: 14px; font-weight: 600; opacity: 1; }

.nav { background: var(--red-dark); }
.nav-in { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a {
	flex: none;
	padding: 10px 12px 7px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	border-bottom: 3px solid transparent;
	white-space: nowrap;
}
.nav a:hover { text-decoration: none; background: rgba(0, 0, 0, 0.14); }
.nav a.is-on { border-bottom-color: var(--gold); font-weight: 700; }

/* Màn hình hẹp: logo và nút Menu trên một hàng, dính ở mép trên khi cuộn; menu mở ra thành danh sách dọc phủ lên nội dung.
   Chỉ áp dụng khi có JavaScript (html.js); không có thì header đứng yên và menu vẫn là hàng cuộn ngang như trên. */
.nav-btn { display: none; }
@media (max-width: 899px) {
	.js { scroll-padding-top: 68px; } /* link nhảy trong trang không bị header che */
	.js .hd { position: sticky; top: 0; z-index: 30; }
	.js .admin-bar .hd { top: 46px; } /* thanh quản trị WordPress cao 46px và cố định ở bề rộng này */
	.hd-top { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
	.hd .logo img { height: 30px; }
	.hd-date { margin-left: auto; }
	.js .nav-btn {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		flex: none;
		height: 40px;
		padding: 0 12px;
		border: 1px solid rgba(255, 255, 255, 0.5);
		background: transparent;
		color: #fff;
		font: inherit;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
	}
	.js .nav-btn[aria-expanded="true"] { background: var(--red-dark); border-color: var(--red-dark); }
	.nav-ico { display: grid; gap: 4px; width: 18px; }
	.nav-ico i { display: block; height: 2px; background: currentColor; transition: transform 0.18s, opacity 0.18s; }
	.nav-btn[aria-expanded="true"] .nav-ico i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.nav-btn[aria-expanded="true"] .nav-ico i:nth-child(2) { opacity: 0; }
	.nav-btn[aria-expanded="true"] .nav-ico i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

	/* Menu nổi ngay dưới hàng logo, không đẩy nội dung xuống; dài hơn màn hình thì cuộn bên trong. */
	.js .nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		max-height: calc(100vh - 60px);
		max-height: calc(100dvh - 60px);
		overflow-y: auto;
		overscroll-behavior: contain;
		border-bottom: 3px solid var(--red-deep);
	}
	.js .hd.is-open .nav { display: block; }
	.js .nav-in { display: block; padding: 0; overflow: visible; }
	.js .nav a {
		display: block;
		padding: 13px 16px 13px 13px;
		font-size: 15px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
		border-left: 3px solid transparent;
		white-space: normal;
	}
	.js .nav a:last-child { border-bottom: 0; }
	.js .nav a.is-on { border-bottom-color: rgba(255, 255, 255, 0.12); border-left-color: var(--gold); background: rgba(0, 0, 0, 0.14); }
}
@media (max-width: 600px) {
	.js .admin-bar .hd { top: 0; } /* ở bề rộng này thanh quản trị WordPress cuộn theo trang */
}
@media (max-width: 519px) {
	.hd-date { display: none; } /* không đủ chỗ cạnh logo và nút Menu; ngày đã có trong phần đầu của mọi trang công cụ */
}
@media (prefers-reduced-motion: reduce) {
	.nav-ico i { transition: none; }
}

/* ---------- Hero trang chủ ---------- */
.hero { background: var(--red-tint-2); border-bottom: 1px solid var(--line); padding: 26px 0 24px; }
.eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--red);
	border: 1px solid var(--red);
	padding: 2px 7px;
	margin-bottom: 12px;
}
.hero h1 { font-size: clamp(25px, 4vw, 36px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-lead { color: var(--ink-2); max-width: 70ch; margin: 10px 0 20px; }

.regions { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--card); }
.region { padding: 14px 16px 16px; border-right: 1px solid var(--line); border-top: 3px solid var(--red); display: flex; flex-direction: column; gap: 4px; }
.region:last-child { border-right: 0; }
.region-code { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-3); }
.region-name { font-size: 20px; font-weight: 800; line-height: 1.25; }
.region-time { font-size: 14px; color: var(--ink-2); }
.region-time b { color: var(--red); font-size: 15px; }
.region-st { font-size: 14px; margin-bottom: 12px; }
.region .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Bố cục ----------
   Tránh đặt tên class trùng với class WordPress tự gắn vào <body> và bài viết (page, post, single, home, tag, category…). */
.pg { padding: 20px 0 44px; }
/* minmax(0, 1fr): cột không được nở theo bề rộng tối thiểu của bảng bên trong, nếu không mobile sẽ tràn ngang. */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1000px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
}
.main > * + *, .side > * + * { margin-top: 20px; }

.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.crumb a { color: var(--ink-2); }
.crumb span { margin: 0 6px; }

.page-h1 { font-size: clamp(22px, 3.5vw, 30px); font-weight: 800; }
.page-lead { color: var(--ink-2); margin: 8px 0 0; max-width: 80ch; }
.pg-head { margin-bottom: 16px; }
.scroll-target, [id="theo-dai"], [id="lich"] { scroll-margin-top: 12px; }

.card { background: var(--card); border: 1px solid var(--line); padding: 18px; }
.card > h2, .sec-h {
	font-size: 18px;
	font-weight: 700;
	padding-left: 11px;
	border-left: 4px solid var(--red);
	margin-bottom: 14px;
}
.card h3 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.card h3:first-of-type { margin-top: 0; }
.side .card { padding: 15px; }
.side .card > h2 { font-size: 15px; margin-bottom: 11px; }

.badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 2px 6px;
	background: var(--gold-tint);
	color: #6b5200;
	vertical-align: middle;
	margin-left: 6px;
}

/* ---------- Nút ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border: 1px solid var(--red);
	background: var(--red);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.3;
	padding: 10px 16px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); text-decoration: none; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-ghost { background: transparent; color: var(--red); }
.btn-ghost:hover { background: var(--red-tint); color: var(--red-dark); }
.btn-sm { padding: 7px 12px; font-size: 12px; }

/* ---------- Công cụ quay thử ---------- */
.tool { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--red); }
.tool-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 14px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; width: 100%; border: 1px solid var(--line); }
.tab {
	flex: 1;
	border: 0;
	border-right: 1px solid var(--line);
	background: var(--card);
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	padding: 8px;
	color: var(--ink-2);
	cursor: pointer;
}
.tab:last-child { border-right: 0; }
.tab.is-on { background: var(--red); color: #fff; }
.fields { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 320px; }
.field { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.4; }
.field:first-child:not(:only-child) { flex: 1.3; }
.field select {
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ink);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 0;
	height: 38px;
	padding: 0 9px;
	width: 100%;
	min-width: 0;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 340px; }
.actions .btn { flex: 1; height: 38px; padding: 0 8px; white-space: nowrap; }
.actions .btn:first-child { flex: 2; }

.tool-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 11px 14px; font-size: 14px; }
.tool-cap span { color: var(--ink-3); font-size: 13px; }

.kq-wrap { padding: 0 14px 14px; }
.kq { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.kq th, .kq td { border: 1px solid var(--line); }
.kq thead th { background: var(--red); color: #fff; border-color: var(--red-dark); font-size: 14px; font-weight: 700; padding: 7px 4px; }
.kq .g { width: 48px; background: #fbf3ef; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.kq thead .g { background: var(--red-dark); color: #fff; }
.num { font-weight: 700; font-size: clamp(15px, 2.4vw, 18px); line-height: 1.35; letter-spacing: 0.04em; transition: background 0.4s; }
/* Chưa quay: ô không có số, chỉ có một vòng xoay chờ. Chiều cao ô giữ nguyên nên bảng không xô lệch khi số hiện ra. */
.num.is-idle::before, .tiles.is-idle i::before, .lucky-n b.is-idle::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f3d3d8;
	border-top-color: var(--red);
	border-radius: 50%;
	vertical-align: -1px;
	animation: qt-spin 0.9s linear infinite;
}
.num.tiles.is-idle::before { content: none; }
.lucky-n b.is-idle::before { border-color: rgba(94, 10, 23, 0.2); border-top-color: var(--red-deep); }
@keyframes qt-spin { to { transform: rotate(360deg); } }
.num.is-roll { color: var(--ink-3); }
.num.is-done { background: var(--gold-tint); }

.kq--multi td { padding: 5px 2px; vertical-align: middle; }
.kq--multi .cells { display: block; background: none; }
.kq--multi .num { display: block; padding: 2px 0; }
.kq--multi .p-db .num, .kq--multi .p-g8 .num { color: var(--red); }
.kq--multi .p-db .num { font-size: clamp(18px, 3.1vw, 24px); font-weight: 800; }
.kq--multi .p-db td { background: var(--red-tint-2); padding-top: 7px; padding-bottom: 7px; }

.kq--single td { padding: 0; }
.cells { display: grid; grid-template-columns: repeat(var(--c, 1), 1fr); gap: 1px; background: var(--line); }
.kq--single .num { display: block; background: var(--card); padding: 8px 4px; font-size: clamp(16px, 2.7vw, 20px); }
.kq--single .num.is-done { background: var(--gold-tint); }
.kq--single .num:last-child:nth-child(7) { grid-column: span 2; }
.kq--single .p-g8 .num, .kq--single .p-g7n .num { color: var(--red); }
.kq--single .num.tiles { display: flex; justify-content: center; gap: 4px; padding: 11px 4px; background: var(--red-tint-2); }
.tiles i {
	font-style: normal;
	display: grid;
	place-items: center;
	width: clamp(31px, 8vw, 42px);
	height: clamp(38px, 9.8vw, 50px);
	background: var(--red);
	color: #fff;
	font-size: clamp(20px, 5vw, 28px);
	font-weight: 800;
	letter-spacing: 0;
}
.tiles.is-roll i { background: var(--red-dark); color: rgba(255, 255, 255, 0.7); }
.tiles.is-idle i { background: var(--red-tint); }

.kq-wrap .note { margin: 10px 0 0; }

.tool-foot { border-top: 1px solid var(--line); }
.lucky { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 14px; background: var(--red-tint-2); }
.lucky-t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.lucky-n { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.lucky-n div { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.lucky-n b { display: grid; place-items: center; width: 35px; height: 35px; background: var(--gold); color: var(--red-deep); font-size: 18px; font-weight: 800; }

.loto { border-top: 1px solid var(--line); }
.loto summary, .faq summary { cursor: pointer; list-style: none; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.loto summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.loto summary::after, .faq summary::after { content: "+"; font-size: 19px; font-weight: 400; color: var(--red); line-height: 1; }
.loto[open] summary::after, .faq details[open] summary::after { content: "–"; }
.loto summary { padding: 11px 14px; font-size: 14px; }
.loto .mini-wrap { padding: 0 14px 14px; }

.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini th, .mini td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.mini thead th { background: #fbf3ef; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mini .c { text-align: center; width: 52px; font-weight: 700; }
.mini b.hot { color: var(--red); }
.mini tbody th { font-weight: 700; white-space: nowrap; }
.mini a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.mini a:hover { color: var(--red); }
.mini tr.is-today td, .mini tr.is-today th { background: var(--gold-tint); }

/* ---------- Thống kê ---------- */
.stat-grid { display: grid; gap: 16px 22px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.card .stat-grid + h3 { margin-top: 20px; }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 20px 1fr 32px; align-items: center; gap: 8px; font-size: 13px; line-height: 1.4; }
.bar b { font-weight: 700; }
.bar span { height: 9px; background: var(--red-tint); position: relative; }
.bar span i { position: absolute; inset: 0 auto 0 0; background: var(--red); }
.bar.is-top span i { background: var(--red-deep); }
.bar em { font-style: normal; text-align: right; color: var(--ink-2); }

/* ---------- Giờ hoàng đạo ---------- */
.hd-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hd-item { background: var(--card); padding: 9px 10px; line-height: 1.4; }
.hd-item b { display: block; font-size: 14px; }
.hd-item span { font-size: 13px; color: var(--ink-2); }
.hd-item.is-now { background: var(--gold-tint); }
.hd-item.is-now b::after { content: "•"; margin-left: 4px; color: var(--red); }
.note { font-size: 13px; color: var(--ink-3); margin-top: 9px; }
.note strong { color: var(--red); font-weight: 700; }
.note a { white-space: nowrap; }
.hd-day { margin: -4px 0 12px; font-size: 14px; color: var(--ink-2); }
.hd-day strong { color: var(--ink); }
.hd-item.is-past b, .hd-item.is-past span { color: var(--ink-3); }

/* ---------- Quay thử thần tài ---------- */
.tt-today { padding: 14px; background: var(--red-tint-2); border-bottom: 1px solid var(--line); text-align: center; }
.tt-out { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; padding: 16px 14px; }
.tt-today .tt-out { padding: 12px 0 2px; }
.tt-out .tiles { display: flex; gap: 4px; }
.tt-today .tiles i { background: var(--gold); color: var(--red-deep); }
.tt-out--mine { min-height: 88px; }
.tt-out--mine:empty::before { content: "? ?   ? ?   ? ?"; white-space: pre; font-size: 24px; font-weight: 800; color: var(--line); letter-spacing: 0.1em; }
.card > .regions { border-top: 0; }
.card > .regions .lbl { display: none; }

/* ---------- Danh sách đài ---------- */
.dir { display: grid; gap: 16px 18px; }
@media (min-width: 720px) { .dir { grid-template-columns: 1fr 1.4fr 1.8fr; } }
.dir h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--red); }
.dir ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dir li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dir li a, .dir li span { display: block; background: var(--card); padding: 6px 9px; font-size: 14px; color: var(--ink); }
.dir li a:hover { background: var(--red-tint); color: var(--red-dark); text-decoration: none; }
.dir li .is-today { border-left: 3px solid var(--red); padding-left: 6px; font-weight: 600; }
.dir.dir--one { grid-template-columns: 1fr; }

/* ---------- Khối bên ---------- */
.today-row { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.today-row:first-of-type { border-top: 0; padding-top: 0; }
.today-row:last-of-type { padding-bottom: 0; }
.today-row div { display: flex; justify-content: space-between; gap: 8px; }
.today-row strong { font-size: 14px; color: var(--red); }
.today-row small { color: var(--ink-3); font-size: 13px; }
.cd { color: var(--red); font-weight: 700; font-size: 13px; white-space: nowrap; }

.links { list-style: none; margin: 0; padding: 0; }
.links li { border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links a { display: block; padding: 7px 0; font-size: 14px; color: var(--ink); }
.links li:first-child a { padding-top: 0; }
.links li:last-child a { padding-bottom: 0; }
.links a:hover { color: var(--red); text-decoration: none; }

.info { width: 100%; border-collapse: collapse; font-size: 14px; }
.info th, .info td { border-top: 1px solid var(--line); padding: 7px 0; text-align: left; vertical-align: top; }
.info tr:first-child th, .info tr:first-child td { border-top: 0; padding-top: 0; }
.info tr:last-child th, .info tr:last-child td { padding-bottom: 0; }
.info th { width: 46%; font-weight: 500; color: var(--ink-2); padding-right: 10px; }
.info td { font-weight: 600; }

.box-gold { background: var(--red); color: #fff; border: 0; }
.box-gold > h2 { border-left-color: var(--gold); color: #fff; }
.box-gold p { font-size: 14px; opacity: 0.92; }
.box-gold .lucky-n { margin: 11px 0; }
.box-gold .btn { background: var(--gold); border-color: var(--gold); color: var(--red-deep); }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 11px 0; font-size: 15px; }
.faq p { padding: 0 0 12px; color: var(--ink-2); max-width: 80ch; }

.prose p { color: var(--ink-2); max-width: 80ch; }
.prose ul { margin: 0 0 10px; padding-left: 20px; color: var(--ink-2); }
.prose li + li { margin-top: 2px; }

.disclaimer { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--card); padding: 12px 14px; font-size: 13px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.ft { background: var(--red-deep); color: rgba(255, 255, 255, 0.82); font-size: 14px; padding: 30px 0 18px; }
.ft a { color: rgba(255, 255, 255, 0.82); }
.ft a:hover { color: #fff; }
.ft-grid { display: grid; gap: 20px 24px; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.ft-h { margin: 0 0 8px; color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ft ul.ft-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ft-social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; }
.ft-social a:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }
.ft .logo { margin-bottom: 10px; }
.ft-note { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translate(-50%, 20px);
	background: var(--ink);
	color: #fff;
	font-size: 14px;
	padding: 9px 15px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
	max-width: calc(100vw - 32px);
	z-index: 10;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Nút lên đầu trang: hiện khi đã cuộn xuống (main.js) ---------- */
.to-top {
	position: fixed;
	right: 14px;
	bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	z-index: 25;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #fff;
	background: var(--red);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.to-top[hidden] { display: none; }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--red-dark); }
.to-top svg { display: block; }
@media (max-width: 720px) {
	.toast { bottom: 68px; } /* không đè lên nút lên đầu trang */
}

/* ---------- Bổ sung cho WordPress ---------- */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 40; background: var(--ink); color: #fff; padding: 8px 14px; font-size: 14px; }
.skip-link:focus { top: 8px; }
img { max-width: 100%; height: auto; }

.ft-copy { margin: 10px 0 0; font-size: 13px; opacity: 0.75; }

/* Nội dung soạn trong trình soạn thảo: trang tĩnh, bài kiến thức */
.entry { max-width: 800px; }
.entry-col { max-width: 800px; }
.entry-col > .entry { max-width: none; }
.entry-h1 { font-size: clamp(22px, 3.5vw, 30px); font-weight: 800; margin-bottom: 14px; }
.entry-meta { font-size: 13px; color: var(--ink-3); margin: -6px 0 14px; }
.prose > * + * { margin-top: 12px; }
.prose h2 { font-size: 19px; font-weight: 700; margin-top: 24px; }
.prose h3 { font-size: 16px; font-weight: 700; margin-top: 18px; }
.card.prose > h2 { font-size: 18px; }
.card.prose > h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose ol { padding-left: 20px; color: var(--ink-2); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 14px; border-left: 4px solid var(--line); color: var(--ink-2); }
/* Chỉ bảng soạn trong trình soạn thảo, không đụng tới bảng của công cụ quay thử chèn bằng shortcode. */
.prose > table, .prose .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose > table :is(th, td), .prose .wp-block-table :is(th, td) { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.prose > table th, .prose .wp-block-table th { background: #fbf3ef; }
.prose .wp-block-table { margin-left: 0; margin-right: 0; margin-bottom: 0; overflow-x: auto; } /* bỏ lề 40px mặc định của figure; bảng rộng thì cuộn ngang trong khung */
.prose .tool a, .prose .tool summary { text-decoration: none; }

/* Danh sách bài viết */
.post-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.post-item { background: var(--card); padding: 16px 18px; }
.post-item h2 { font-size: 17px; font-weight: 700; }
.post-item h2 a { color: var(--ink); }
.post-item p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.pagination { margin-top: 20px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: block; padding: 6px 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }

/* 404 */
.notfound { text-align: center; padding: 40px 18px; }
.notfound-code { font-size: 64px; font-weight: 800; line-height: 1; color: var(--red); }
.notfound h1 { font-size: 22px; margin: 10px 0 8px; }
.notfound p { color: var(--ink-2); margin-bottom: 18px; }
.notfound .actions { justify-content: center; flex: none; }
.notfound .actions .btn { flex: none; padding: 0 16px; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.entry-h1 { margin-bottom: 12px; }
	.post-item { padding: 14px; }
	.wrap { padding: 0 14px; }
	.hd-top { padding: 10px 14px; } /* ghi đủ cả 4 cạnh: .wrap ngay trên đặt padding dọc về 0 */
	.nav-in { padding: 0 4px; }
	.logo img { height: 32px; }
	.js .nav a { padding-left: 11px; padding-right: 14px; }
	.hero { padding: 20px 0 18px; }
	.regions { grid-template-columns: 1fr; }
	.region { border-right: 0; border-bottom: 1px solid var(--line); border-top: 0; border-left: 3px solid var(--red); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 11px 14px; }
	.region:last-child { border-bottom: 0; }
	.region > * { grid-column: 1; }
	.region .btn { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; align-self: center; }
	.region-st { margin-bottom: 0; }
	.region-time .lbl { display: none; }
	.pg { padding-top: 16px; }
	.layout { gap: 16px; }
	.main > * + *, .side > * + * { margin-top: 16px; }
	.card { padding: 14px; }
	.tool-bar, .tool-cap, .lucky, .loto summary { padding-left: 12px; padding-right: 12px; }
	.kq-wrap, .loto .mini-wrap { padding: 0 8px 12px; }
	.kq .g { width: 36px; font-size: 12px; }
	.kq--multi .num { letter-spacing: 0.02em; }
	.kq--single .num:not(.tiles) { letter-spacing: 0.02em; padding-left: 2px; padding-right: 2px; }
	.kq--multi .p-db .num { font-size: 16px; }
	.hd-grid { grid-template-columns: repeat(3, 1fr); }
	.mini { font-size: 13px; }
	.mini th, .mini td { padding: 5px 6px; }
	.mini thead th { font-size: 12px; }
	.mini tbody th .badge { display: block; width: max-content; margin: 2px 0 0; }
	.field:first-child:not(:only-child) { flex: 1.45; }
	.field select { padding: 0 6px; }
	.actions { gap: 6px; }
	.actions .btn { font-size: 12px; padding: 0 6px; }
}

@media (max-width: 380px) {
	.actions .btn { font-size: 11px; padding: 0 4px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
	.num.is-idle::before, .tiles.is-idle i::before, .lucky-n b.is-idle::before { animation: none; }
}
