/* Tử Vi Số Mệnh – trang chủ */
.tvsm { background: var(--tvsm-giay); color: var(--tvsm-chu); padding-bottom: 8px; }
.tvsm *, .tvsm *::before, .tvsm *::after { box-sizing: border-box; }
.tvsm a { color: inherit; text-decoration: none; }
.tvsm a:hover { color: var(--tvsm-do); }
.tvsm h1, .tvsm h2, .tvsm h3 { font-family: var(--tvsm-tieu-de); color: inherit; margin: 0; letter-spacing: 0; }
.tvsm-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Đầu trang ---------- */
.tvsm-hero {
	background:
		radial-gradient(circle at 85% 30%, rgba(184, 137, 47, .18) 0 18%, transparent 18.2% 24%, rgba(184, 137, 47, .10) 24.2% 25%, transparent 25.2% 34%, rgba(184, 137, 47, .08) 34.2% 35%, transparent 35.2%),
		linear-gradient(135deg, #1f1a14 0%, #2c1d14 55%, #4a1d14 100%);
	color: #f6efe2;
	padding: 48px 0 52px;
}
.tvsm-hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.tvsm-kicker { color: #e2c27d; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.tvsm-hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.1; color: #fff; }
.tvsm-hero-mo { font-size: 17px; line-height: 1.6; color: #e4dccd; margin: 14px 0 22px; max-width: 34em; }
.tvsm-tim { display: flex; max-width: 520px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.tvsm-tim input { flex: 1; min-width: 0; border: 0; padding: 14px 16px; font-size: 16px; color: #2b2620; background: #fff; outline: none; }
.tvsm-tim button { border: 0; background: var(--tvsm-do); color: #fff; font-weight: 600; padding: 0 22px; font-size: 16px; cursor: pointer; }
.tvsm-tim button:hover { background: var(--tvsm-do-dam); }
.tvsm-goi-y { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tvsm-goi-y a { font-size: 14px; padding: 6px 12px; border: 1px solid rgba(226, 194, 125, .45); border-radius: 999px; color: #f0e3c4; }
.tvsm-goi-y a:hover { background: rgba(226, 194, 125, .15); color: #fff; }

/* Ô tra cứu */
.tvsm-tra { background: #fffaf0; color: #2b2620; border-radius: 14px; padding: 22px; box-shadow: 0 10px 34px rgba(0, 0, 0, .3); border-top: 4px solid var(--tvsm-vang); }
.tvsm-tra h2 { font-size: 21px; margin-bottom: 14px; color: #2b2620; }
.tvsm-tra-form { display: grid; grid-template-columns: 1fr auto; gap: 12px 14px; align-items: end; }
.tvsm-o label, .tvsm-o legend { display: block; font-size: 13px; color: #6b6256; margin-bottom: 4px; padding: 0; }
.tvsm-o input[type="number"] { width: 100%; font-size: 18px; padding: 9px 12px; border: 1px solid #d9ccb5; border-radius: 8px; background: #fff; color: #2b2620; }
.tvsm-gt { border: 0; margin: 0; padding: 0; min-width: 0; }
.tvsm-gt label { display: inline-flex; align-items: center; gap: 5px; margin: 6px 12px 0 0; font-size: 15px; color: #2b2620; cursor: pointer; }
.tvsm-tra-form button { grid-column: 1 / -1; border: 0; border-radius: 8px; padding: 11px; font-size: 16px; font-weight: 600; background: var(--tvsm-do); color: #fff; cursor: pointer; }
.tvsm-tra-form button:hover { background: var(--tvsm-do-dam); }
.tvsm-tra-kq { margin-top: 16px; min-height: 40px; }
.tvsm-tra-ds { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tvsm-tra-ds div { background: #f6ecd8; border-radius: 8px; padding: 9px 11px; }
.tvsm-tra-ds dt { font-size: 12px; color: #7b6d58; margin: 0; }
.tvsm-tra-ds dd { margin: 2px 0 0; font-weight: 700; font-size: 16px; color: #2b2620; }
.tvsm-tra-ds small { font-weight: 400; color: #6b6256; font-size: 13px; }
.tvsm-tra-h { margin: 14px 0 6px; font-size: 14px; color: #6b6256; }
.tvsm-huong { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tvsm-huong li { border: 1px solid #e3d5bb; border-radius: 8px; padding: 6px 4px; text-align: center; font-size: 14px; line-height: 1.3; }
.tvsm-huong b { display: block; color: var(--tvsm-do); }
.tvsm-huong span { font-size: 12px; color: #7b6d58; }
.tvsm-tra-them { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--tvsm-do) !important; }
.tvsm-tra-loi { color: #a32a1d; margin: 0; }
.tvsm-tra-chu { margin: 12px 0 0; font-size: 12.5px; color: #7b6d58; }

/* ---------- Khối chung ---------- */
.tvsm-khoi { padding-top: 40px; }
.tvsm-dau { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--tvsm-vien); margin-bottom: 18px; padding-bottom: 8px; position: relative; }
.tvsm-dau::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--tvsm-do); }
.tvsm-dau h2 { font-size: 24px; }
.tvsm-xem { font-size: 14px; color: var(--tvsm-do) !important; white-space: nowrap; }

/* Chủ đề */
.tvsm-chu-de { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tvsm-cd { background: #fff; border: 1px solid var(--tvsm-vien); border-radius: 12px; padding: 18px; transition: border-color .15s, box-shadow .15s; }
html.s-dark .tvsm-cd { background: #24201a; }
.tvsm-cd:hover { border-color: var(--tvsm-vang); box-shadow: 0 6px 18px rgba(80, 50, 10, .08); }
.tvsm-cd-ten { display: flex; align-items: center; gap: 10px; font-family: var(--tvsm-tieu-de); font-size: 20px; font-weight: 700; }
.tvsm-cd-ten svg { width: 34px; height: 34px; flex: none; padding: 6px; border-radius: 50%; background: var(--tvsm-vang-nhat); fill: none; stroke: var(--tvsm-do); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tvsm-cd-ten small { margin-left: auto; font-family: inherit; font-size: 12.5px; font-weight: 400; color: var(--tvsm-chu-phu); white-space: nowrap; }
.tvsm-cd p { margin: 8px 0 10px; font-size: 14.5px; color: var(--tvsm-chu-phu); line-height: 1.5; }
.tvsm-cd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tvsm-cd li a { display: inline-block; font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--tvsm-vang-nhat); }

/* Thẻ bài */
.tvsm-bai { display: grid; gap: 12px; }
.tvsm-bai-anh { display: block; overflow: hidden; border-radius: 10px; background: var(--tvsm-vang-nhat); aspect-ratio: 16 / 10; }
.tvsm-bai-anh img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tvsm-bai:hover .tvsm-bai-anh img { transform: scale(1.03); }
.tvsm-anh-trong {
	display: block; width: 100%; height: 100%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-22 -22 44 44'%3E%3Ccircle r='20' fill='none' stroke='%23b8892f' stroke-width='1.5' opacity='.55'/%3E%3Cpath d='M0-20a10 10 0 0 1 0 20 10 10 0 0 0 0 20 20 20 0 0 1 0-40z' fill='%239b2d20' opacity='.35'/%3E%3C/svg%3E") center / 34% auto no-repeat,
		linear-gradient(135deg, #f3e7cc, #e9d7b2);
}
.tvsm-nhan { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tvsm-do) !important; margin-bottom: 4px; }
.tvsm-bai-ten { font-size: 17px; line-height: 1.35; font-weight: 700; }
.tvsm-bai time { display: block; font-size: 12.5px; color: var(--tvsm-chu-phu); margin-top: 6px; }
.tvsm-bai-tom { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--tvsm-chu-phu); }
.tvsm-bai-lon .tvsm-bai-ten { font-size: 26px; line-height: 1.25; }
.tvsm-bai-nho, .tvsm-bai-dong { grid-template-columns: 112px minmax(0, 1fr); align-items: start; }
.tvsm-bai-nho .tvsm-bai-anh, .tvsm-bai-dong .tvsm-bai-anh { aspect-ratio: 4 / 3; border-radius: 8px; }
.tvsm-bai-nho .tvsm-bai-ten, .tvsm-bai-dong .tvsm-bai-ten { font-size: 15.5px; }

.tvsm-moi { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; }
.tvsm-moi-ds { display: grid; gap: 16px; align-content: start; }

.tvsm-luoi-cd { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.tvsm-cot { display: grid; gap: 16px; align-content: start; padding-top: 0; margin-bottom: 24px; }
.tvsm-cot .tvsm-dau { margin-bottom: 2px; }
.tvsm-bai-vua { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.tvsm-bai-vua .tvsm-bai-ten { font-size: 18px; }

/* Video */
.tvsm-video-ds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tvsm-video-o { display: grid; gap: 10px; align-content: start; }
.tvsm-yt { position: relative; display: block; width: 100%; margin: 0; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.tvsm-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.tvsm-yt-nut { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 14px; background: var(--tvsm-do); }
.tvsm-yt-nut::after { content: ""; position: absolute; left: 31px; top: 16px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.tvsm-yt:hover .tvsm-yt-nut { background: var(--tvsm-do-dam); }
.tvsm-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.tvsm .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Liên hệ */
.tvsm-lien-he { margin-top: 44px; padding: 44px 0; background: linear-gradient(135deg, #2c1d14, #4a1d14); color: #f6efe2; scroll-margin-top: 80px; }
.tvsm-lh-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: center; }
.tvsm-lh-chu h2 { font-size: 30px; color: #fff; }
.tvsm-lh-chu p { color: #e4dccd; font-size: 16px; line-height: 1.6; margin: 12px 0 0; }
.tvsm-lh-nut { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.tvsm-nut { display: inline-block; border: 0; border-radius: 8px; padding: 12px 20px; font-size: 16px; font-weight: 600; background: var(--tvsm-vang); color: #1f1a14 !important; cursor: pointer; }
.tvsm-nut:hover { background: #cf9f45; }
.tvsm-nut-zalo { background: #0068ff; color: #fff !important; }
.tvsm-nut-zalo:hover { background: #0053cc; }
.tvsm-nut-goi { background: transparent; border: 1px solid rgba(255, 255, 255, .45); color: #fff !important; }
.tvsm-nut-goi:hover { background: rgba(255, 255, 255, .1); }
.tvsm-form { background: #fffaf0; color: #2b2620; border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.tvsm-form label { display: grid; gap: 4px; font-size: 13.5px; color: #6b6256; }
.tvsm-form input, .tvsm-form select, .tvsm-form textarea { width: 100%; font: inherit; font-size: 16px; color: #2b2620; padding: 9px 11px; border: 1px solid #d9ccb5; border-radius: 8px; background: #fff; }
.tvsm-form textarea { resize: vertical; }
.tvsm-form .tvsm-nut { background: var(--tvsm-do); color: #fff !important; justify-self: start; }
.tvsm-form .tvsm-nut:hover { background: var(--tvsm-do-dam); }
.tvsm-form-hang { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tvsm-bay { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tvsm-tb { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.tvsm-tb-ok { background: #e3f3e2; color: #1f5a22; }
.tvsm-tb-loi { background: #fbe4e0; color: #8a2216; }

.tvsm :focus-visible { outline: 2px solid var(--tvsm-vang); outline-offset: 2px; }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 960px) {
	.tvsm-hero-in, .tvsm-moi, .tvsm-lh-in { grid-template-columns: 1fr; }
	.tvsm-chu-de { grid-template-columns: 1fr 1fr; }
	.tvsm-luoi-cd { grid-template-columns: 1fr; }
	.tvsm-video-ds { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.tvsm-hero { padding: 32px 0 36px; }
	.tvsm-hero-mo { font-size: 16px; }
	.tvsm-chu-de { grid-template-columns: 1fr; }
	.tvsm-huong { grid-template-columns: 1fr 1fr; }
	.tvsm-bai-vua { grid-template-columns: 1fr; }
	.tvsm-bai-lon .tvsm-bai-ten { font-size: 22px; }
	.tvsm-form-hang { grid-template-columns: 1fr; }
	.tvsm-video-ds { grid-template-columns: 1fr; }
	.tvsm-bai-nho, .tvsm-bai-dong { grid-template-columns: 96px minmax(0, 1fr); }
	.tvsm-tim button { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.tvsm-bai-anh img { transition: none; }
}
