/* ============================================================================
   THIÊN CƠ VẠN SỰ — HỆ THỐNG GIAO DIỆN & HIỆU ỨNG "NGỰ LÃM"
   Chế độ Tối (Mực đêm · Vàng kim chạm khắc) & Chế độ Sáng (Sứ ngà · Son đỏ)
   ============================================================================ */

:root {
  --muc: #0d0b09;
  --tram: #17130f;
  --nga: #f6f0e4;
  --nga-2: #ece3d2;
  --giay: #fbf6ec;
  --kim: #c99a4b;
  --kim-sang: #f1d995;
  --kim-tram: #8a6326;
  --kim-chu: #c99a4b;
  --nen-kim: #c99a4b;
  --kim-rgb: 201, 154, 75;
  --kim-sang-rgb: 241, 217, 149;
  --son: #9e2b1f;
  --son-sang: #c23a2a;
  --ngoc: #3f8a6a;
  --ngoc-sang: #9fdcc0;
  --tot: #9fdcc0;
  --tot-rgb: 159, 220, 192;
  --xau: #e58a7c;
  --xau-rgb: 229, 138, 124;
  --chu: #f6ecd8;
  --chu-2: #cdc3af;
  --chu-3: #aa9e88;
  --chu-rgb: 246, 236, 216;
  --nen-rgb: 13, 11, 9;
  --ink: #1b150f;
  --ink-2: #5f5444;
  --chu-tren-kim: #1d1305;
  --kim-grad: linear-gradient(115deg, #8a6326 0%, #c99a4b 22%, #f6e3a6 46%, #d7ad5d 64%, #9a6f2c 100%);
  --vien: rgba(201, 154, 75, 0.28);
  --vien-mo: rgba(239, 230, 214, 0.09);
  --vien-nga: #dccfb8;
  --nui-1: #2a2218;
  --nui-2: #1b1611;
  --quang: #2a2117;
  --dem: #17130f;
  --menu-con: #14110d;
  --menu-bong: 0 30px 60px -20px #000;
  --surface-card: rgba(23, 19, 15, 0.72);
  --binh-phong: #12100c;
  --font-display: "Tinos", "Liberation Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-han: "Noto Serif TC", "Songti TC", "SimSun", serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wide: 1240px;
  color-scheme: dark;
}

/* ===== CHẾ ĐỘ SÁNG: SON ĐỎ TRÊN SỨ TRẮNG ===== */
html[data-theme="light"] {
  --muc: #f1efeb;
  --tram: #e9e4dd;
  --surface-card: #fbfaf8;
  --nen-rgb: 251, 250, 248;
  --chu: #14171c;
  --chu-2: #2a2e34;
  --chu-3: #464b52;
  --chu-rgb: 20, 23, 28;
  --kim-rgb: 176, 128, 52;
  --kim-sang-rgb: 108, 76, 22;
  --kim-chu: #6c4c16;
  --kim-sang: #6c4c16;
  --nen-kim: #9a2a1e;
  --kim-grad: linear-gradient(115deg, #7a1d14 0%, #9a2a1e 45%, #b3261e 70%, #7a1d14 100%);
  --chu-tren-kim: #ffffff;
  --son: #9a2a1e;
  --son-sang: #b3261e;
  --ngoc: #23704d;
  --ngoc-sang: #23704d;
  --tot: #1c5e40;
  --tot-rgb: 28, 94, 64;
  --xau: #b3261e;
  --xau-rgb: 179, 38, 30;
  --vien: rgba(134, 96, 31, 0.32);
  --vien-mo: rgba(20, 23, 28, 0.1);
  --nui-1: #d9d3c8;
  --nui-2: #e6e1d9;
  --quang: rgba(176, 128, 52, 0.2);
  --dem: #6b1712;
  --menu-con: #fbfaf8;
  --menu-bong: 0 24px 48px -24px rgba(80, 40, 10, 0.35);
  --binh-phong: #f4f2ee;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  background: var(--muc);
  color: var(--chu);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}
a { color: inherit; text-decoration: none; transition: color 0.25s, border-color 0.25s, background 0.25s; }
button, input, select, textarea { font-family: inherit; }

.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ===== 0. MÀN MỞ ĐẦU BÌNH PHONG & CUỘN XUẤT HIỆN ===== */
.binh-phong {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: none;
}
.binh-phong > .trai, .binh-phong > .phai {
  position: relative;
  background: var(--binh-phong);
  border-inline: 1px solid rgba(var(--kim-rgb), 0.35);
  transition: transform 1.25s var(--ease) 0.55s;
}
.binh-phong > .trai::before, .binh-phong > .phai::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(var(--kim-rgb), 0.22);
}
.binh-phong > .trai span, .binh-phong > .phai span {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 70px;
  translate: 0 -50%;
  border: 1px solid var(--kim);
  border-radius: 4px;
}
.binh-phong .trai span { right: 18px; }
.binh-phong .phai span { left: 18px; }
.binh-phong.is-mo .trai { transform: translateX(-101%); }
.binh-phong.is-mo .phai { transform: translateX(101%); }
.binh-phong .nhan { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: opacity 0.45s ease 0.35s; }
.binh-phong .nhan b { font-family: var(--font-han); font-weight: 600; font-size: 64px; line-height: 1; letter-spacing: 0.1em; background: var(--kim-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="light"] .binh-phong .nhan b { background: linear-gradient(135deg, #7a1d14, #9a2a1e 55%, #b3261e); -webkit-background-clip: text; background-clip: text; }
.binh-phong .nhan span { margin-top: 14px; font-size: 12px; letter-spacing: 0.5em; text-transform: uppercase; color: var(--chu-2); }
.binh-phong.is-mo .nhan { opacity: 0; }

/* Hiệu ứng cuộn xuất hiện (.tvv-hien -> .is-da) */
.tvv-hien {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.tvv-hien.is-da { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .tvv-hien { opacity: 1; transform: none; transition: none; }
  .binh-phong { display: none; }
}

/* ===== 1. ĐẦU TRANG & MEGA MENU 660PX CÓ HUY HIỆU TRÒN 40PX ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  border-bottom: 1px solid var(--vien-mo);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--nen-rgb), 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}
.brand-link { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-an {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-an::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--nen-kim);
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 2px var(--nen-kim), inset 0 0 0 3px rgba(251, 233, 201, 0.55);
}
.logo-an span {
  position: relative;
  z-index: 1;
  font-family: var(--font-han);
  font-size: 20px;
  line-height: 1;
  color: var(--chu-tren-kim);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.52rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--chu);
  white-space: nowrap;
}
.brand-sub {
  margin-top: 3px;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--chu-3);
  line-height: 1;
}

.main-nav { display: flex; align-items: center; gap: 0; margin-left: auto; margin-right: 12px; }
.nav-group { position: relative; }
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  font-size: 0.90625rem;
  font-weight: 400;
  background: none;
  border: none;
  color: var(--chu-2);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.nav-trigger::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 8px;
  height: 1px;
  background: var(--kim);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}
.nav-group:hover .nav-trigger,
.nav-trigger:hover { color: var(--chu); }
.nav-group:hover .nav-trigger::after,
.nav-trigger:hover::after { transform: scaleX(1); }
.nav-chevron { width: 9px; height: 9px; opacity: 0.6; transition: transform 0.25s var(--ease); }
.nav-group:hover .nav-chevron { transform: rotate(180deg); }

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 660px;
  max-width: 92vw;
  padding: 16px 14px 14px;
  background: var(--menu-con);
  color: var(--chu);
  border: 1px solid var(--vien);
  border-top: 2px solid var(--kim);
  border-radius: 12px;
  box-shadow: var(--menu-bong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 120;
}
.nav-group:nth-child(n+4) .mega-dropdown { left: auto; right: 0; }
.nav-group:hover .mega-dropdown,
.nav-group:focus-within .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-head {
  margin: 0 6px 8px;
  padding: 0 6px 12px;
  border-bottom: 1px solid var(--vien-mo);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--chu-2);
}
.mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
}
.mega-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--chu);
  transition: background 0.2s;
}
.mega-link:hover { background: rgba(var(--kim-rgb), 0.1); }
.mega-han {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(var(--kim-rgb), 0.4);
  border-radius: 50%;
  background: rgba(var(--kim-rgb), 0.07);
  font: 600 18px/1 var(--font-han);
  color: var(--kim-chu);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.mega-link:hover .mega-han {
  background: var(--nen-kim);
  border-color: var(--nen-kim);
  color: var(--chu-tren-kim);
}
.mega-link-title { display: block; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--chu); }
.mega-link-desc { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--chu-2); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-wrap { position: relative; }
.btn-che-mo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(var(--kim-rgb), 0.35);
  border-radius: 50%;
  background: transparent;
  color: var(--kim-sang);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.btn-che-mo:hover { border-color: var(--kim); background: rgba(var(--kim-rgb), 0.1); }
.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  display: none;
  min-width: 168px;
  padding: 6px;
  background: var(--menu-con);
  border: 1px solid rgba(var(--kim-rgb), 0.35);
  box-shadow: var(--menu-bong);
}
.theme-menu.is-open { display: grid; }
.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--chu-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.theme-opt:hover { color: var(--chu); background: rgba(var(--kim-rgb), 0.08); }
.theme-opt[aria-pressed="true"] { color: var(--kim-sang); background: rgba(var(--kim-rgb), 0.14); }

.sq-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--vien-mo);
  background: transparent;
  color: var(--chu);
  cursor: pointer;
}
.sq-btn:hover { border-color: var(--kim); }
.btn-header-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--vien);
  color: var(--kim-sang);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-header-profile:hover { border-color: var(--kim); background: rgba(var(--kim-rgb), 0.08); }
.mobile-toggle { display: none; }

/* ===== 2. KHỐI NỀN TỐI & NỀN NGÀ XEN KẼ ===== */
.sec-dark { background: var(--muc); color: var(--chu); position: relative; }
.sec-ivory { background: var(--nga); color: var(--ink); position: relative; }
.sec-pad { padding: clamp(4.2rem, 6.8vw, 6.5rem) 0; }

.eyebrow, .sec-eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--kim-chu);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.sec-ivory .eyebrow, .sec-ivory .sec-eyebrow { color: var(--kim-tram); }
.sec-title {
  font-size: clamp(2.5rem, 4.6vw, 4.25rem);
  font-weight: 300;
  line-height: 1.06;
  margin: 0 0 1.15rem;
}
.sec-title em {
  font-style: italic;
  background: var(--kim-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-ivory .sec-title em { background: none; color: var(--son); }
.sec-sub { font-size: 1.0625rem; line-height: 1.72; max-width: 54ch; color: var(--chu-2); margin: 0 0 2rem; }
.sec-ivory .sec-sub { color: var(--ink-2); }

/* Nút bấm chuẩn */
.btn-gold {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 28px;
  border: 0;
  background: var(--kim-grad);
  background-size: 200% 100%;
  color: var(--chu-tren-kim);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-position 0.5s var(--ease);
}
.btn-gold:hover { background-position: 100% 0; }
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 28px;
  background: var(--ink);
  color: #f6ecd8;
  border: 1px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-dark:hover { background: var(--son); border-color: var(--son); color: #fff; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  background: transparent;
  color: inherit;
  border: 1px solid var(--vien);
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--kim); color: var(--kim-sang); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kim-sang);
  white-space: nowrap;
}
.text-link span { transition: transform 0.3s var(--ease); }
.text-link:hover span { transform: translateX(4px); }
.sec-ivory .text-link { color: var(--son); }

/* ===== 3. HERO: BẦU TRỜI CHÒM SAO, SỔ HỒ SƠ, KIM BÀN VÀNG KHỐI XOAY 180S, NÚI ===== */
.sec-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 9rem;
  background: radial-gradient(60% 70% at 72% 38%, var(--quang) 0%, var(--tram) 48%, var(--muc) 100%);
  color: var(--chu);
}
.star-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-gach {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--chu-2);
  margin: 0 0 1.25rem;
}
.hero-gach::before { content: ""; width: 36px; height: 1px; background: var(--kim); }
.hero-title {
  font-size: clamp(3.25rem, 5.6vw, 5.6rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 1.35rem;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  background: var(--kim-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sổ hồ sơ */
.tvv-so {
  position: relative;
  max-width: 620px;
  padding: 26px 28px 24px;
  background: linear-gradient(180deg, rgba(var(--nen-rgb), 0.9), rgba(var(--nen-rgb), 0.72));
  border: 1px solid var(--vien);
}
.tvv-so::before,
.tvv-so::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--kim);
  pointer-events: none;
}
.tvv-so::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tvv-so::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.tvv-so-tab {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--vien-mo);
}
.tvv-so-tab button {
  padding: 0 0 12px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-size: 0.90625rem;
  color: var(--chu-3);
  cursor: pointer;
}
.tvv-so-tab button[aria-selected="true"] { color: var(--kim-sang); border-color: var(--kim); }
.tvv-so form[hidden] { display: none; }
.tvv-so-hang { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
.tvv-o label { display: block; font-size: 0.75rem; color: var(--chu-3); letter-spacing: 0.04em; }
.tvv-o input, .tvv-o select {
  width: 100%;
  margin-top: 6px;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(var(--kim-rgb), 0.42);
  border-radius: 0;
  background: transparent;
  color: var(--chu);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  outline: none;
}
.tvv-o input:focus { border-color: var(--kim); }
.tvv-o input::placeholder { color: rgba(var(--chu-rgb), 0.4); font-weight: 400; font-size: 0.85em; }
.tvv-so-cuoi { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }
.tvv-so-cuoi p { margin: 0; font-size: 0.78125rem; color: var(--chu-3); max-width: 30ch; }

/* KIM BÀN VÀNG KHỐI XOAY LIÊN TỤC 180S */
.kim-ban {
  position: relative;
  width: min(580px, 100%);
  max-width: 580px;
  aspect-ratio: 1;
  margin-inline: auto;
  container-type: inline-size;
  color: var(--chu);
  user-select: none;
}
.kb-hao {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--kim-sang-rgb), 0.22), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.kb-vanh {
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #6f4f1d, #c99a4b, #f6e3a6, #b3843a, #6f4f1d, #d7ad5d, #f9edc3, #a77a2f, #6f4f1d);
  box-shadow: 0 0 0 1px rgba(255, 240, 200, 0.25) inset, 0 40px 80px -30px rgba(0, 0, 0, 0.85), 0 0 60px -20px rgba(var(--kim-sang-rgb), 0.45);
  -webkit-mask: radial-gradient(circle closest-side, transparent 59.5%, #000 60%, #000 99.4%, transparent 100%);
  mask: radial-gradient(circle closest-side, transparent 59.5%, #000 60%, #000 99.4%, transparent 100%);
  pointer-events: none;
}
.kb-xoay { position: absolute; inset: 0; animation: kbXoay 180s linear infinite; }
.kim-ban:hover .kb-xoay,
.kim-ban:hover .kb-vi,
.kim-ban:hover .kb-han,
.kim-ban:hover .kb-ten { animation-play-state: paused; }
.kb-vi, .kb-han, .kb-ten {
  position: absolute;
  translate: -50% -50%;
  animation: kbXoayNguoc 180s linear infinite;
}
@keyframes kbXoay { to { transform: rotate(360deg); } }
@keyframes kbXoayNguoc { to { rotate: -360deg; } }

.kb-nut {
  position: relative;
  display: grid;
  place-items: center;
  width: 10.8cqw;
  height: 10.8cqw;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #3b2a10;
  cursor: pointer;
  transition: transform 0.35s var(--ease), color 0.3s;
}
.kb-nut svg { width: 64%; height: 64%; filter: drop-shadow(0 1px 0 rgba(255, 244, 210, 0.55)); }
.kb-nut:hover { transform: scale(1.14); color: #1a1106; }
.kb-nut.is-chon { color: #fff4da; }
.kb-nut.is-chon::before {
  content: "";
  position: absolute;
  inset: 6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--son-sang), var(--son) 70%);
  box-shadow: 0 0 0 1.5px #f6e3a6, 0 8px 20px -6px rgba(0, 0, 0, 0.8);
}
.kb-han {
  font-family: var(--font-han);
  font-weight: 600;
  font-size: 2.5cqw;
  color: #5a3f14;
  text-shadow: 0 1px 0 rgba(255, 244, 210, 0.5);
  pointer-events: none;
}
.kb-ten {
  font-size: max(10.5px, 2.1cqw);
  color: var(--chu-2);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}
.kb-tam {
  position: absolute;
  inset: 30%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #2b2218, #120f0b 72%);
  box-shadow: 0 0 0 1px rgba(var(--kim-rgb), 0.5), 0 0 0 9px rgba(var(--kim-rgb), 0.05), inset 0 0 40px rgba(0, 0, 0, 0.7);
  text-align: center;
  z-index: 3;
}
.kb-tam > div { transition: opacity 0.2s; }
.kb-tam.is-doi > div { opacity: 0; }
.kb-tam svg { width: 17cqw; height: 17cqw; margin: 0 auto; display: block; color: #c99a4b; filter: drop-shadow(0 0 18px rgba(241, 217, 149, 0.35)); }
.kb-tuoi {
  margin: 1.2cqw 0 0;
  font-family: var(--font-display);
  font-size: 4.8cqw;
  line-height: 1;
  background: linear-gradient(115deg, #c99a4b, #f6e3a6 50%, #c99a4b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kb-nam { margin: 1cqw 0 0; font-size: max(10.5px, 1.9cqw); color: #cdc3af; }
.kb-link { display: inline-block; margin-top: 1.4cqw; font-size: max(10px, 1.7cqw); color: #f1d995; border-bottom: 1px solid rgba(241, 217, 149, 0.45); }

.hero-nui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; line-height: 0; pointer-events: none; }
.hero-nui svg { display: block; width: 100%; height: auto; }

/* ===== 4. HỒ SƠ MỆNH & THẺ MỆNH 3D NGHIÊNG ===== */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.dac-quyen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; margin: 2.25rem 0 2.5rem; }
.dac-quyen div { border-top: 1px solid var(--vien-nga); padding-top: 0.9rem; }
.dac-quyen h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.3rem; }
.dac-quyen p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

.the-san { perspective: 1400px; display: grid; place-items: center; padding: 30px 0; }
.the-menh {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(520px, 100%);
  aspect-ratio: 1.586;
  padding: 7% 8%;
  overflow: hidden;
  border-radius: 18px;
  color: #f6ecd8;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(241, 217, 149, 0.18), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 6px),
    linear-gradient(135deg, #1f1a14, #0c0a08 60%, #1a150f);
  box-shadow: 0 1px 0 rgba(255, 240, 200, 0.25) inset, 0 50px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(201, 154, 75, 0.45);
  transform: rotateX(8deg) rotateY(-14deg);
  transition: transform 0.5s var(--ease);
}
.the-menh::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 245, 215, 0.16) 47%, transparent 58%);
  background-size: 250% 100%;
  background-position: var(--sx, 120%) 0;
}
.the-dau { display: flex; justify-content: space-between; align-items: flex-start; }
.the-logo strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  background: linear-gradient(115deg, #8a6326, #f6e3a6 48%, #c99a4b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.the-logo small { font-size: 10px; letter-spacing: 0.26em; color: #aa9e88; }
.the-chip { width: 44px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #d7ad5d, #f6e3a6 45%, #8a6326); }
.the-con { position: absolute; right: 7%; top: 47%; transform: translateY(-50%); width: 112px; height: 112px; color: rgba(201, 154, 75, 0.14); pointer-events: none; }
.the-ten { font-family: var(--font-display); font-size: clamp(1.6rem, 2.5vw, 2.2rem); margin: auto 0 18px; }
.the-so { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 14px; border-top: 1px solid rgba(201, 154, 75, 0.26); }
.the-so span { font-size: 11px; color: #aa9e88; }
.the-so b { display: block; font-size: 0.92rem; font-weight: 500; color: #f1d995; margin-top: 2px; }
.caption-note { text-align: center; font-size: 0.875rem; color: var(--ink-2); margin-top: 8px; }

/* ===== 5. LỊCH HÔM NAY (SỐ 10.5REM KIM LOẠI · HOÀNG ĐẠO 3.375REM · THƯỚC 12 CỘT) ===== */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.hn-khung {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  border: 1px solid var(--vien);
  background: var(--surface-card);
  overflow: hidden;
}
.hn-trai {
  padding: 48px;
  border-right: 1px solid var(--vien);
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 100% at 0% 0%, rgba(var(--kim-rgb), 0.14), transparent 62%);
}
html[data-theme="light"] .hn-trai { background: linear-gradient(160deg, rgba(var(--xau-rgb), 0.06), transparent 60%); }
.hn-trai > * { position: relative; z-index: 1; }
.hn-trai[data-han]::after {
  content: attr(data-han);
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 0;
  writing-mode: vertical-rl;
  font: 600 92px/1 var(--font-han);
  color: var(--kim);
  opacity: 0.1;
  pointer-events: none;
}
html[data-theme="light"] .hn-trai[data-han]::after { color: var(--son); opacity: 0.07; }
.hn-thu { font-size: 0.875rem; color: var(--chu-2); margin: 0; }
.hn-ngay { display: flex; align-items: flex-end; gap: 22px; margin-top: 10px; }
.hn-so {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(5.5rem, 11vw, 10.5rem);
  line-height: 0.8;
  font-variant-numeric: lining-nums;
  background: var(--kim-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hn-thang { padding-bottom: 12px; font-family: var(--font-display); font-size: 1.625rem; line-height: 1.2; }
.hn-thang small { display: block; font-size: 0.875rem; color: var(--chu-2); }

.hn-am { display: flex; align-items: center; gap: 20px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--vien-mo); }
.an-son {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  background: var(--nen-kim);
  color: var(--chu-tren-kim);
  box-shadow: inset 0 0 0 3px var(--nen-kim), inset 0 0 0 4px rgba(251, 233, 201, 0.55);
  transform: rotate(-4deg);
  animation: dongDau 0.55s ease-out both;
}
@keyframes dongDau {
  from { opacity: 0; transform: rotate(-4deg) scale(1.32); }
  to { opacity: 1; transform: rotate(-4deg) scale(1); }
}
.an-son b { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.an-son small { font-size: 0.6875rem; }
.hn-am1 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.hn-am2 { color: var(--chu-2); font-size: 0.875rem; margin: 2px 0 0; }

.hn-the { display: grid; grid-template-columns: repeat(2, 1fr); margin: 32px 0 0; border-top: 1px solid var(--vien-mo); }
.hn-the > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--vien-mo); }
.hn-the dt { font-size: 0.8125rem; color: var(--chu-2); }
.hn-the dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.25rem; color: var(--chu); }

.hn-phai { padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.hn-ket { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; color: var(--chu-2); margin: 0; }
.hn-ket strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.375rem);
  line-height: 1;
  background: var(--kim-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hn-nho { margin: 40px 0 0; font-size: 0.8125rem; color: var(--chu-2); letter-spacing: 0.04em; }

/* Thước 12 canh giờ liền mạch 1 hàng 12 cột */
.thuoc-gio {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--vien-mo);
}
.thuoc-gio li {
  position: relative;
  padding: 18px 2px 14px;
  text-align: center;
  border-right: 1px solid var(--vien-mo);
}
.thuoc-gio li:last-child { border-right: 0; }
.thuoc-gio b { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 400; color: var(--chu-3); }
.thuoc-gio small { font-size: 0.65625rem; color: var(--chu-2); font-variant-numeric: tabular-nums; }
.thuoc-gio .is-tot { background: linear-gradient(180deg, rgba(var(--tot-rgb), 0.2), rgba(var(--tot-rgb), 0.03)); }
.thuoc-gio .is-tot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--tot); }
.thuoc-gio .is-tot b { color: var(--ngoc-sang); }
.thuoc-gio .is-bay-gio { outline: 1px solid var(--kim); outline-offset: -1px; }
.chu-thich { display: flex; gap: 22px; margin: 14px 0 0; font-size: 0.75rem; color: var(--chu-2); }
.chu-thich span { display: inline-flex; align-items: center; gap: 8px; }
.chu-thich i { width: 10px; height: 10px; display: inline-block; }

.hn-xung {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--vien-mo);
  color: var(--chu-2);
  font-size: 0.875rem;
}
.hn-xung b { color: var(--chu); font-weight: 600; }
.hn-x {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--chu-rgb), 0.5);
  color: var(--chu-2);
  font-size: 1.25rem;
}
html[data-theme="light"] .hn-x { border: 1px solid rgba(var(--xau-rgb), 0.6); color: var(--xau); }

/* ===== 6. BỘ SƯU TẬP CÔNG CỤ & 12 CON GIÁP LẬT ĐỒNG XU 3D ===== */
.noi-bat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 4.5rem; }
.nb-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--vien-nga);
  background: var(--giay);
  color: var(--ink);
  min-height: 295px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.25s;
}
.nb-card:hover { transform: translateY(-4px); border-color: var(--son); }
.nb-card.is-dam { background: linear-gradient(155deg, #1b150f, #0d0b09); color: #f6ecd8; border-color: rgba(201, 154, 75, 0.4); }
.nb-hinh { position: absolute; right: -16px; bottom: -16px; width: 185px; height: 185px; opacity: 0.14; pointer-events: none; }
.nb-card h3 { font-size: 2rem; line-height: 1.1; margin: 6px 0 12px; }
.nb-card p { margin: 0 0 18px; font-size: 0.94rem; opacity: 0.84; position: relative; z-index: 1; }
.nb-sap { font-weight: 600; font-size: 0.9rem; color: var(--son); position: relative; z-index: 1; }
.nb-card.is-dam .nb-sap { color: #f1d995; }

.muc-luc { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 22px; padding-top: 2.25rem; border-top: 1px solid var(--vien-nga); }
.ml-col h3 { font-size: 1.25rem; font-weight: 700; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--vien-nga); }
.ml-col ul { list-style: none; margin: 0; padding: 0; }
.ml-col li { margin-bottom: 7px; }
.ml-col a { font-size: 0.9rem; color: var(--ink-2); }
.ml-col a:hover { color: var(--son); text-decoration: underline; text-underline-offset: 4px; }

/* 12 Con Giáp: Lưới hairline 1px + Huy hiệu vàng 112px lật 3D 180deg */
.giap-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--vien-mo);
  border: 1px solid var(--vien-mo);
  color: var(--chu);
}
.giap-grid li { display: flex; }
.gp-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 12px 26px;
  background: var(--muc);
  color: inherit;
  text-align: center;
  transition: background 0.4s var(--ease);
}
.gp-card:hover { background: var(--tram); }
.gp-card.is-nay { background: linear-gradient(180deg, rgba(158, 43, 31, 0.32), rgba(158, 43, 31, 0.05)); }
.gp-han { position: absolute; top: 10px; left: 14px; font-family: var(--font-han); font-weight: 600; font-size: 0.875rem; color: rgba(var(--kim-rgb), 0.55); }
.gp-nay { position: absolute; top: 12px; right: 12px; padding: 3px 8px; background: var(--son); color: #fbe9c9; font-size: 0.75rem; }
.gp-huy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 112px;
  height: 112px;
  aspect-ratio: 1;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #6f4f1d, #c99a4b, #f6e3a6, #b3843a, #6f4f1d, #e0bb6d, #8a6326);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.85);
  transition: transform 0.6s var(--ease);
}
.gp-huy > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #2a2118, #110e0b 70%);
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.7);
}
.gp-huy svg {
  display: block;
  width: 62%;
  height: 62%;
  aspect-ratio: 1;
  color: #c99a4b;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px rgba(241, 217, 149, 0.2));
  transition: transform 0.6s var(--ease);
}
.gp-card:hover .gp-huy { transform: rotateY(180deg); }
.gp-card:hover .gp-huy svg { transform: scaleX(-1); }
.gp-card b { margin-top: 20px; font-family: var(--font-display); font-size: 1.625rem; font-weight: 400; }
.gp-card small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--chu-2); }
.gp-nam { margin-top: 12px; font-size: 0.8125rem; color: var(--chu-2); }

/* ===== 7. LÁ SỐ TỬ VI 4×4 & THƯ PHÒNG ===== */
.tuvi-board { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(126px, auto)); border: 1px solid var(--kim-tram); background: var(--giay); color: var(--ink); }
.tuvi-center { grid-column: 2 / 4; grid-row: 2 / 4; border: 1px solid rgba(138, 99, 38, 0.3); padding: 18px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle, rgba(201, 154, 75, 0.1), transparent 72%); }
.tuvi-center .ten { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; margin: 0 0 6px; }
.tuvi-center p { margin: 2px 0; font-size: 0.85rem; color: var(--ink-2); }
.tuvi-center .cuc { display: inline-block; margin-top: 8px; padding: 3px 12px; border: 1px solid var(--son); color: var(--son); font-weight: 600; font-size: 0.82rem; }
.tuvi-cell { border: 1px solid rgba(138, 99, 38, 0.25); padding: 8px 9px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: background 0.18s; }
.tuvi-cell:hover { background: rgba(201, 154, 75, 0.13); }
.tuvi-cell.is-menh { background: rgba(158, 43, 31, 0.07); }
.tuvi-cell.is-selected { box-shadow: inset 0 0 0 2px var(--son); background: rgba(158, 43, 31, 0.12); }
.tuvi-cell.is-tamhop { box-shadow: inset 0 0 0 2px var(--kim); background: rgba(201, 154, 75, 0.15); }
.tuvi-cell.is-xung { box-shadow: inset 0 0 0 2px var(--ngoc); background: rgba(63, 138, 106, 0.11); }
.tuvi-head { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px dashed rgba(138, 99, 38, 0.25); padding-bottom: 4px; margin-bottom: 5px; }
.tuvi-head i { font-style: normal; color: var(--kim-tram); }
.tuvi-tag-menh { background: var(--son); color: #fff; font-size: 9px; padding: 1px 4px; margin-left: 4px; }
.tuvi-main-star { font-family: var(--font-display); font-weight: 700; font-size: 0.96rem; line-height: 1.25; }
.tuvi-main-star.tone-do { color: var(--son); }
.tuvi-main-star.tone-xanh { color: #2b6b4f; }
.tuvi-main-star.tone-thuy { color: #204b7a; }
.tuvi-main-star.tone-kim { color: #7a571c; }
.tuvi-sub-stars { font-size: 11px; line-height: 1.35; color: var(--ink-2); }
.tuvi-sub-stars .sat { color: #8c2d23; }
.tuvi-foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-2); margin-top: 6px; padding-top: 3px; border-top: 1px dotted rgba(138, 99, 38, 0.25); }

.chi-vang { display: flex; align-items: center; gap: 18px; margin: 0 0 4rem; }
.chi-vang::before, .chi-vang::after { content: ""; flex: 1; height: 1px; background: var(--vien-nga); }
.chi-vang span { font-family: var(--font-han); font-size: 1.4rem; color: var(--son); }

.articles-layout { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 36px; align-items: start; }
.article-featured { display: block; border: 1px solid var(--vien-nga); background: var(--giay); overflow: hidden; }
.article-cover-svg { width: 100%; aspect-ratio: 16 / 9; display: block; }
.article-featured-body { padding: 24px; }
.article-meta { display: flex; gap: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--son); margin-bottom: 8px; }
.article-meta time { color: var(--ink-2); }
.article-featured h3 { font-size: 1.75rem; margin-bottom: 8px; }
.article-featured h3 span { display: block; font-size: 1rem; font-style: italic; color: var(--ink-2); margin-top: 4px; }
.article-list { display: flex; flex-direction: column; gap: 18px; }
.article-row { display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--vien-nga); align-items: center; }
.article-row:last-child { border-bottom: none; padding-bottom: 0; }
.article-thumb { width: 116px; height: 78px; display: grid; place-items: center; background: #14100c; color: #f1d995; font-family: var(--font-han); font-size: 2rem; border: 1px solid rgba(201, 154, 75, 0.35); }
.article-row h3 { font-size: 1.22rem; margin: 2px 0 4px; }
.article-row p { margin: 0; font-size: 0.86rem; color: var(--ink-2); }

/* ===== 8. BẢN TIN RIÊNG (CHẾ ĐỘ SÁNG THÀNH DẢI SƠN SON CHỮ NGÀ VÀNG THẾP) ===== */
.rieng-box {
  position: relative;
  z-index: 2;
  border: 1px solid var(--vien);
  padding: clamp(2rem, 5vw, 4.5rem);
  background: var(--surface-card);
}
html[data-theme="light"] .rieng-box {
  --chu: #fbecd0;
  --chu-2: #ecc59f;
  --chu-3: #d9b08c;
  --chu-rgb: 251, 236, 208;
  --kim-sang: #f2c25a;
  --kim-chu: #f2c25a;
  --kim-grad: linear-gradient(115deg, #b9781d 0%, #f2c25a 30%, #fff6d1 50%, #f2c25a 70%, #b9781d 100%);
  --chu-tren-kim: #1d1305;
  color: #fbecd0;
  border-color: rgba(242, 194, 90, 0.5);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(242, 194, 90, 0.2), transparent 60%),
    radial-gradient(120% 120% at 0% 100%, #4a0c08, transparent 70%),
    #6b1712;
}
.chon-tuoi { border: 0; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chon-tuoi legend { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--chu-3); margin-bottom: 10px; }
.chon-tuoi label { cursor: pointer; }
.chon-tuoi input { position: absolute; opacity: 0; pointer-events: none; }
.chon-tuoi span { display: inline-block; padding: 6px 14px; border: 1px solid var(--vien); font-size: 0.88rem; color: var(--chu-2); transition: all 0.18s; }
.chon-tuoi input:checked + span { background: var(--nen-kim); border-color: var(--nen-kim); color: var(--chu-tren-kim); font-weight: 600; }
.ban-tin-hang { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }

/* ===== 9. FOOTER NGỰ LÃM (CHỈ KIM + HÌNH THOI GIỮA + LA BÀN BÁT QUÁI HAI BÊN) ===== */
.tvv-chan {
  position: relative;
  overflow-x: clip;
  background: var(--muc);
  color: var(--chu);
  padding-top: 64px;
}
html[data-theme="light"] .tvv-chan { background: var(--tram); }
.tvv-chan::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--kim-rgb)) 20%, rgb(var(--kim-rgb)) 80%, transparent);
  opacity: 0.8;
  pointer-events: none;
}
.chan-thoi {
  position: absolute;
  top: -7px;
  left: 50%;
  z-index: 3;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--muc);
  border: 1px solid rgb(var(--kim-rgb));
}
html[data-theme="light"] .chan-thoi { background: var(--tram); }
.chan-thoi::after { content: ""; position: absolute; inset: 3px; background: rgb(var(--kim-rgb)); }

.chan-hv { display: none; }
@media (min-width: 1440px) {
  .chan-hv {
    --hv: clamp(360px, calc(100vw - 1180px), 700px);
    display: block;
    position: absolute;
    z-index: 0;
    width: var(--hv);
    height: var(--hv);
    color: rgb(var(--kim-rgb));
    opacity: 0.2;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  }
  .chan-hv.is-trai { top: 40px; left: 0; transform: translateX(-50%); }
  .chan-hv.is-phai { bottom: 60px; right: 0; transform: translateX(50%); }
  .chan-hv svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; }
  .chan-hv .chi text { fill: currentColor; stroke: none; font: 600 20px/1 var(--font-han); text-anchor: middle; dominant-baseline: central; }
  .chan-hv .xoay { transform-origin: 300px 300px; animation: kbXoay 200s linear infinite; }
  .chan-hv .nguoc { transform-origin: 300px 300px; animation: kbXoay 140s linear infinite reverse; }
}

.chan-dai {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  border: 1px solid var(--vien);
  border-top: 2px solid rgb(var(--kim-rgb));
  border-radius: 12px;
  background: var(--surface-card);
  overflow: hidden;
}
.chan-moi { position: relative; padding: 38px 36px; overflow: hidden; }
.chan-chim { position: absolute; right: 12px; bottom: -48px; font-family: var(--font-han); font-size: 210px; line-height: 1; color: rgba(var(--kim-rgb), 0.07); pointer-events: none; }
.chan-mat { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kim-chu); margin: 0 0 10px; display: inline-flex; align-items: center; gap: 8px; }
.chan-tieu { font-size: clamp(1.8rem, 3vw, 2.55rem); margin: 0 0 12px; }
.chan-tieu em { font-style: italic; color: var(--kim-sang); }
.chan-dan { margin: 0 0 22px; font-size: 0.94rem; color: var(--chu-2); max-width: 44ch; }
.chan-hanh { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chan-tim { display: flex; flex: 1 1 220px; border: 1px solid var(--vien); background: rgba(var(--nen-rgb), 0.6); height: 50px; }
.chan-tim input { flex: 1; border: 0; background: transparent; color: var(--chu); padding: 0 14px; font-size: 0.9rem; outline: none; }
.chan-tim button { width: 46px; border: 0; background: transparent; color: var(--kim-sang); display: grid; place-items: center; cursor: pointer; }

.chan-nay { padding: 32px 32px; border-left: 1px solid var(--vien); }
.chan-nay-dau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chan-nay-dau a { font-size: 0.86rem; color: var(--kim-sang); }
.chan-ngay { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; }
.chan-so { grid-row: span 2; font-family: var(--font-display); font-size: 3.6rem; line-height: 0.9; color: var(--kim-sang); }
html[data-theme="light"] .chan-so { color: var(--son); }
.chan-ngay b { font-size: 1rem; color: var(--chu); }
.chan-ngay small { font-size: 0.84rem; color: var(--chu-2); }
.chan-chip { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.chan-chip li { padding: 2px 10px; border: 1px solid rgba(var(--chu-rgb), 0.12); border-radius: 999px; background: rgba(var(--chu-rgb), 0.04); font-size: 0.8125rem; color: var(--chu-2); }
.chan-chip li.is-hd { border-color: rgba(var(--kim-rgb), 0.45); color: var(--kim-chu); }
.chan-gio { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.chan-gio li { text-align: center; padding: 6px 2px; border: 1px solid var(--vien-mo); border-radius: 8px; }
.chan-gio b { display: block; font-family: var(--font-display); font-size: 1rem; }
.chan-gio small { font-size: 0.75rem; color: var(--chu-2); font-variant-numeric: tabular-nums; }

.chan-giua { position: relative; z-index: 2; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding: 56px 0 8px; }
.chan-luoi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 28px; }
.chan-nhom summary { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--vien-mo); list-style: none; cursor: pointer; }
.chan-nhom summary::-webkit-details-marker { display: none; }
.chan-huy { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(var(--kim-rgb), 0.4); background: rgba(var(--kim-rgb), 0.07); display: grid; place-items: center; font: 600 18px/1 var(--font-han); color: var(--kim-chu); transition: all 0.2s; }
.chan-nhom:hover .chan-huy { background: var(--nen-kim); border-color: var(--nen-kim); color: var(--chu-tren-kim); }
.chan-nhom-t b { display: block; font-size: 1rem; font-weight: 600; color: var(--chu); }
.chan-nhom-t small { display: block; font-size: 0.8125rem; color: var(--chu-2); }
.chan-nhom ul { list-style: none; padding: 0; margin: 0; }
.chan-nhom li a { display: inline-block; padding: 4px 0; font-size: 0.875rem; color: var(--chu-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; }
.chan-nhom li a:hover { color: var(--chu); text-decoration-color: rgb(var(--kim-rgb)); }

.chan-duoi { position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid var(--vien-mo); font-size: 0.8125rem; color: var(--chu-2); }
.chan-duoi p { margin: 0; }
.chan-phap { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.chan-phap a:hover { color: var(--chu); }

/* Nút về đầu trang */
.btn-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(var(--kim-rgb), 0.55);
  border-radius: 50%;
  background: var(--menu-con);
  color: var(--kim-chu);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s, color 0.2s;
}
.btn-top.is-hien { opacity: 1; visibility: visible; transform: none; }
.btn-top:hover { background: var(--nen-kim); color: var(--chu-tren-kim); }

/* ===== 10. TRANG CÔNG CỤ CON ===== */
.tool-hero { padding: 3rem 0 2.4rem; border-bottom: 1px solid var(--vien); background: radial-gradient(60% 90% at 75% 20%, var(--quang), var(--muc)); color: var(--chu); }
.breadcrumb { font-size: 0.84rem; color: var(--chu-3); margin-bottom: 10px; }
.tool-body { padding: 2.75rem 0 5rem; background: var(--muc); color: var(--chu); }
.tool-card { background: var(--surface-card); border: 1px solid var(--vien); padding: 26px; margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 20px; align-items: end; }
.field-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--chu-3); margin-bottom: 6px; }
.input-box { width: 100%; min-height: 44px; padding: 6px 0 8px; border: 0; border-bottom: 1px solid rgba(var(--kim-rgb), 0.45); border-radius: 0; background: transparent; color: var(--chu); font-size: 1rem; outline: none; }
.input-box:focus { border-bottom-color: var(--kim-sang); }
.input-box option { background: var(--menu-con); color: var(--chu); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; }
.stat-box { padding: 16px; border: 1px solid var(--vien); background: rgba(var(--kim-rgb), 0.05); }
.stat-box small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--chu-3); }
.stat-box strong { display: block; font-family: var(--font-display); font-size: 1.5rem; margin-top: 4px; color: var(--kim-sang); }
.badge-hd { display: inline-block; padding: 4px 12px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(var(--tot-rgb), 0.18); color: var(--tot); border: 1px solid rgba(var(--tot-rgb), 0.45); }
.badge-hd.is-hac { background: rgba(var(--xau-rgb), 0.16); color: var(--xau); border-color: rgba(var(--xau-rgb), 0.45); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; text-transform: uppercase; padding: 8px 4px; color: var(--chu-3); }
.cal-day { min-height: 92px; padding: 8px; border: 1px solid var(--vien-mo); background: var(--surface-card); display: flex; flex-direction: column; justify-content: space-between; }
.cal-day:hover { border-color: var(--kim); }
.cal-day.is-today { outline: 2px solid var(--son); }
.cal-day-top { display: flex; justify-content: space-between; align-items: baseline; }
.cal-solar { font-family: var(--font-display); font-size: 1.38rem; font-weight: 700; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; }
.cal-dot.hd { background: var(--ngoc); }
.cal-dot.hac { background: var(--chu-3); opacity: 0.4; }
.cal-lunar { font-size: 12px; color: var(--chu-2); }
.cal-lunar.is-special { color: var(--son-sang); font-weight: 600; }
.cal-cc { font-size: 11px; color: var(--chu-3); }
.num-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 290px; }
.num-cell { aspect-ratio: 1; border: 1px solid var(--vien); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; }
.num-cell.has-val { background: rgba(var(--kim-rgb), 0.14); color: var(--kim-sang); border-color: var(--kim); }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 6, 4, 0.78); z-index: 200; display: none; place-items: start center; padding: 10vh 16px; }
.modal-backdrop.is-open { display: grid; }
.search-modal { width: min(620px, 100%); background: var(--menu-con); color: var(--chu); border: 1px solid var(--kim); padding: 22px; box-shadow: var(--menu-bong); }
.search-results { max-height: 360px; overflow-y: auto; margin-top: 12px; }
.search-item { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--vien-mo); }
.search-item:hover { background: rgba(var(--kim-rgb), 0.12); }
.mobile-drawer { position: fixed; inset: 0; background: var(--muc); color: var(--chu); z-index: 190; padding: 20px 24px 48px; overflow-y: auto; display: none; }
.mobile-drawer.is-open { display: block; }

/* Responsive */
@media (max-width: 1180px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-grid; }
  .muc-luc { grid-template-columns: repeat(3, 1fr); }
  .giap-grid { grid-template-columns: repeat(4, 1fr); }
  .chan-dai, .chan-giua { grid-template-columns: 1fr; }
  .chan-nay { border-left: 0; border-top: 1px solid var(--vien); }
  .chan-luoi { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid, .split-grid, .hn-khung, .articles-layout { grid-template-columns: 1fr; }
  .hn-trai { border-right: 0; border-bottom: 1px solid var(--vien); padding: 28px 22px; }
  .hn-phai { padding: 28px 22px; }
  .noi-bat { grid-template-columns: 1fr; }
  .thuoc-gio { grid-template-columns: repeat(6, 1fr); }
  .thuoc-gio li:nth-child(6) { border-right: 0; }
  .thuoc-gio li:nth-child(-n+6) { border-bottom: 1px solid var(--vien-mo); }
  .tvv-so-hang, .ban-tin-hang { grid-template-columns: 1fr; }
  .btn-header-profile { display: none; }
}
@media (max-width: 560px) {
  .muc-luc { grid-template-columns: repeat(2, 1fr); }
  .giap-grid { grid-template-columns: repeat(3, 1fr); }
  .gp-huy { width: 80px; height: 80px; }
  .the-so { grid-template-columns: repeat(2, 1fr); }
  .chan-luoi { grid-template-columns: 1fr; }
  .chan-gio { grid-template-columns: repeat(3, 1fr); }
}
@media print {
  .site-header, .tvv-chan, .no-print, .tool-hero, .btn-top, .binh-phong { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* ===== 11. THẦN SỐ HỌC CHUYÊN SÂU, PHI TINH, BÓI BÀI, NỐT RUỒI, DÂNG HƯƠNG & XEM TIẾP ===== */
.tvc-subtitle {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 18px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--chu);
}
.tvc-subtitle::before,
.tvc-subtitle::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--kim-rgb)));
  opacity: 0.55;
}
.tvc-subtitle::after { background: linear-gradient(90deg, rgb(var(--kim-rgb)), transparent); }

.tsh-hero-card { position: relative; }
.tsh-hero-card::before, .tsh-hero-card::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--kim);
  pointer-events: none;
}
.tsh-hero-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tsh-hero-card::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.tsh-ho-so {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--vien-mo);
}
.tsh-name { font-size: clamp(2rem, 3.6vw, 2.85rem); text-transform: capitalize; margin: 0 0 6px; }
.tsh-sinh { margin: 0; font-size: 0.92rem; color: var(--chu-2); }
.tsh-hero-num-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(var(--kim-rgb), 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(var(--kim-rgb), 0.16), transparent 72%);
  text-align: center;
}
.tsh-hero-num {
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 1;
  background: var(--kim-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tsh-hero-num-wrap small { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--chu-3); margin-top: 4px; }
.tsh-hero-body h3 { font-size: 1.7rem; margin-bottom: 6px; }
.tsh-hero-body h3 em { color: var(--kim-sang); font-style: italic; }
.tsh-keywords { font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--kim-chu); margin: 0 0 12px; }

.tsh-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tsh-mini-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 10px; }
.tsh-mini-top { display: flex; align-items: center; gap: 14px; }
.tsh-mini-num {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(var(--kim-rgb), 0.45);
  background: rgba(var(--kim-rgb), 0.08);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--kim-sang);
}
.tsh-mini-top strong { display: block; font-size: 1.05rem; color: var(--chu); }
.tsh-mini-top small { display: block; font-size: 0.78rem; color: var(--chu-3); }
.tsh-mini-card p { margin: 0; font-size: 0.89rem; color: var(--chu-2); }

.tsh-year-badge {
  flex: none;
  width: 78px; height: 78px;
  border-radius: 50%;
  border: 1.5px solid var(--kim);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--kim-sang);
}

.tsh-charts-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tsh-chart-box h4 { font-size: 1.15rem; margin-bottom: 12px; text-align: center; }
.tsh-chart-box .num-grid-3 { margin: 0 auto; }
.num-cell.is-comp { border-color: var(--ngoc); color: var(--ngoc-sang); background: rgba(var(--tot-rgb), 0.14); }

.tsh-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tsh-table th, .tsh-table td { padding: 12px 14px; border-bottom: 1px solid var(--vien-mo); text-align: left; }
.tsh-table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--chu-3); }
.tsh-table tr.is-cur-stage { background: rgba(var(--kim-rgb), 0.1); }

/* FAQ accordion */
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--vien-mo); padding: 14px 18px; }
.faq-item summary { font-family: var(--font-display); font-size: 1.18rem; cursor: pointer; font-weight: 500; }
.faq-item p { margin: 10px 0 0; font-size: 0.94rem; color: var(--chu-2); }

/* Khối Xem tiếp (.ccl-wrap) */
.ccl-wrap { padding: 2.5rem 0 4rem; background: var(--muc); color: var(--chu); border-top: 1px solid var(--vien-mo); }
.ccl-dau { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.ccl-t { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.ccl-tat { font-size: 0.875rem; color: var(--kim-sang); border-bottom: 1px solid var(--vien); padding-bottom: 2px; }
.ccl-hang { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ccl-hang li { display: flex; }
.ccl-the {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 132px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--vien-mo);
  border-top: 2px solid rgba(var(--kim-rgb), 0.6);
  border-radius: 10px;
  background: var(--surface-card);
  transition: border-color 0.2s, transform 0.2s;
}
.ccl-the > * { position: relative; z-index: 1; }
.ccl-the::after {
  content: attr(data-han);
  position: absolute;
  right: 12px;
  bottom: -6px;
  z-index: 0;
  font: 600 64px/1 var(--font-han);
  color: rgb(var(--kim-rgb));
  opacity: 0.1;
  pointer-events: none;
}
.ccl-nhom { font-size: 0.75rem; color: var(--kim-chu); }
.ccl-the b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; color: var(--chu); }
.ccl-the small { font-size: 0.8125rem; color: var(--chu-2); line-height: 1.45; }
.ccl-the:hover { border-color: var(--kim); transform: translateY(-2px); }
.ccl-the:hover b { color: var(--kim-sang); }

/* Huyền Không Phi Tinh 3x3 */
.phitinh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin: 0 auto; }
.phitinh-cell {
  border: 1px solid var(--vien);
  background: var(--surface-card);
  padding: 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.phitinh-cell.is-facing { border-color: var(--ngoc); box-shadow: inset 0 0 0 1px var(--ngoc); }
.phitinh-cell.is-sitting { border-color: var(--son); }
.pt-top { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--chu-2); }
.pt-top b { font-family: var(--font-display); font-size: 1.2rem; color: var(--kim-sang); }
.pt-center { text-align: center; font-family: var(--font-display); font-size: 2.8rem; line-height: 1; color: var(--chu); margin: 8px 0; }
.pt-foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; border-top: 1px dotted var(--vien-mo); padding-top: 8px; }

/* Tarot, Nốt ruồi & Dâng hương */
.tarot-emblem {
  width: 74px; height: 108px;
  margin: 14px auto;
  border: 1.5px solid var(--kim);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--kim-sang);
  background: radial-gradient(circle, rgba(var(--kim-rgb), 0.16), transparent 70%);
}
.tarot-emblem.is-rev { transform: rotate(180deg); border-color: var(--son); color: var(--son-sang); }

.mole-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--kim-sang);
  background: var(--son);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mole-dot.is-active { background: var(--kim); color: #1d1305; transform: translate(-50%, -50%) scale(1.2); }

.altar-stage {
  position: relative;
  text-align: center;
  padding: 46px 24px 36px;
  background: radial-gradient(circle at 50% 25%, rgba(201, 154, 75, 0.18), #120e0a 72%);
  color: #f6ecd8;
  overflow: hidden;
}
.altar-tablet {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 28px;
  border: 1px solid rgba(201, 154, 75, 0.55);
  background: rgba(158, 43, 31, 0.35);
  margin-bottom: 34px;
}
.altar-tablet span { font-family: var(--font-han); font-size: 2.8rem; color: #f1d995; line-height: 1.1; }
.altar-tablet small { font-size: 10px; letter-spacing: 0.24em; color: #cdc3af; margin-top: 6px; }
.incense-wrap { display: flex; justify-content: center; gap: 16px; height: 76px; align-items: flex-end; }
.incense-stick { width: 3px; height: 64px; background: #8a6326; position: relative; }
.incense-stick .ember { position: absolute; top: -4px; left: -2px; width: 7px; height: 7px; border-radius: 50%; background: #ff5722; opacity: 0; box-shadow: 0 0 12px #ff5722; transition: opacity 0.4s; }
.incense-wrap.is-lit .ember { opacity: 1; }
.incense-stick .smoke {
  position: absolute;
  top: -50px; left: -6px;
  width: 14px; height: 48px;
  background: radial-gradient(ellipse, rgba(246, 236, 216, 0.35), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.incense-wrap.is-lit .smoke { animation: incenseRise 2.8s ease-in-out infinite; }
@keyframes incenseRise {
  0% { opacity: 0; transform: translateY(18px) scaleX(0.7); }
  45% { opacity: 0.7; transform: translateY(-8px) scaleX(1.2); }
  100% { opacity: 0; transform: translateY(-38px) scaleX(1.6); }
}
.incense-burner { width: 110px; height: 42px; margin: 0 auto; border-radius: 0 0 36px 36px; background: linear-gradient(135deg, #8a6326, #c99a4b 45%, #5c3f14); border-top: 3px solid #f1d995; }

@media (max-width: 860px) {
  .tsh-charts-3, .ccl-hang { grid-template-columns: 1fr; }
  .phitinh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .phitinh-cell { padding: 10px; min-height: 118px; }
}

/* ===== MOBILE HARDENING (≤ 860px / ≤ 560px) ===== */
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video, canvas { max-width: 100%; }
@media (max-width: 860px) {
  .container { padding: 0 18px; }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand-link { gap: 10px; min-width: 0; }
  .logo-an { width: 38px; height: 38px; }
  .brand-name { font-size: 1.22rem; }
  .brand-sub { display: none; }
  .header-actions { gap: 8px; }
  .btn-che-mo { width: 40px; height: 40px; }
  .sq-btn { width: 42px; height: 42px; }
  .btn-top { right: 14px; bottom: 14px; width: 40px; height: 40px; opacity: .92; }
  .tsh-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .tsh-table th, .tsh-table td { padding: 10px 12px; }
  .form-grid > div[style*="span 2"] { grid-column: 1 / -1 !important; }
  .form-grid > div[style*="display:flex"], .tool-card form div[style*="display:flex"] { flex-wrap: wrap; }
  .form-grid .btn-gold, .form-grid .btn-outline { white-space: nowrap; }
  .tool-card > div[style*="justify-content:space-between"] { flex-wrap: wrap; gap: 8px 16px; }
  .hn-ngay { gap: 14px; }
  .hn-so { font-size: clamp(5rem, 28vw, 8rem); }
  .thuoc-gio { grid-template-columns: repeat(4, 1fr); }
  .thuoc-gio li { border-right: 1px solid var(--vien-mo); border-bottom: 1px solid var(--vien-mo); }
  .thuoc-gio li:nth-child(4n) { border-right: 0; }
  .thuoc-gio li:nth-child(6) { border-right: 1px solid var(--vien-mo); }
  .thuoc-gio li:nth-child(-n+6) { border-bottom: 1px solid var(--vien-mo); }
  .tuvi-board { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(104px, auto)); width: 100%; }
  .tuvi-cell { min-width: 0; padding: 5px 4px; overflow: hidden; }
  .tuvi-cell > * { min-width: 0; }
  .tuvi-center { padding: 8px; }
  .tuvi-center .ten { font-size: 1.05rem; }
  .tuvi-center p { font-size: 0.72rem; }
  .tuvi-head { font-size: 8.5px; letter-spacing: 0; flex-wrap: wrap; gap: 0 2px; }
  .tuvi-head i { font-size: 8px; }
  .tuvi-tag-menh { font-size: 7.5px; padding: 0 3px; margin-left: 2px; }
  .tuvi-main-star { font-size: 0.72rem; line-height: 1.2; overflow-wrap: anywhere; }
  .tuvi-sub-stars { font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
  .tuvi-foot { font-size: 8px; flex-wrap: wrap; gap: 0 2px; }
  .dac-quyen { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-name { font-size: 1.1rem; letter-spacing: 0.02em; }
  .tool-card, .the-menh, .hn-trai, .hn-phai { padding-left: 16px; padding-right: 16px; }
  .sec-title { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .tsh-chart-box { padding: 12px; }
  .phitinh-cell { padding: 6px; min-height: 96px; font-size: 0.8rem; }
}
.split-grid > *, .hero-grid > *, .articles-layout > *, .noi-bat > * { min-width: 0; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid > * { min-width: 0; }
  .form-grid .input-box, .form-grid select { width: 100%; max-width: 100%; }
}

/* ===== TOPBAR TIỆN ÍCH (HÔM NAY · ÂM LỊCH · HOÀNG ĐẠO) ===== */
.topbar { background: var(--muc-2, var(--muc)); border-bottom: 1px solid var(--vien-mo); color: var(--chu-2); font-size: 0.8125rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.topbar-left strong { color: var(--chu); font-weight: 600; }
.topbar-sep { width: 1px; height: 12px; background: var(--vien); }
.topbar-badge { display: inline-flex; align-items: center; gap: 7px; }
.topbar-badge i { width: 7px; height: 7px; border-radius: 50%; background: #3f8a6a; box-shadow: 0 0 0 3px rgba(63, 138, 106, 0.18); }
.topbar-badge.is-xau i { background: #9a2a1e; box-shadow: 0 0 0 3px rgba(154, 42, 30, 0.18); }
.topbar-right { display: flex; gap: 22px; flex-shrink: 0; }
.topbar-right a { color: var(--chu-2); transition: color .2s; }
.topbar-right a:hover { color: var(--kim-sang); }
@media (max-width: 860px) {
  .topbar-right, .topbar-sep { display: none; }
  .topbar-left { gap: 4px 12px; font-size: 0.75rem; padding: 6px 0; }
}

/* ===== TOOL HERO 2 CỘT: TIÊU ĐỀ LỚN + CHIP + CTA + BƯỚC + HÌNH MINH HỌA ===== */
.tool-hero { padding: 3.2rem 0 3rem; position: relative; overflow: hidden; }
.tool-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 40px; align-items: center; }
.th-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--chu-3); }
.th-line { width: 28px; height: 1px; background: var(--kim); display: inline-block; }
.th-dot { color: var(--kim); }
.th-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 1.1rem; color: var(--chu); }
.th-title em { font-style: italic; color: var(--son-sang, #b0392b); }
html[data-theme="dark"] .th-title em { color: var(--kim-sang); }
.th-sub { max-width: 34rem; margin: 0 0 1.4rem; font-size: 1.0625rem; line-height: 1.7; color: var(--chu-2); }
.th-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1.6rem; }
.th-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--vien); border-radius: 999px; background: var(--surface-card); font-size: 0.8125rem; color: var(--chu); }
.th-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--son-sang, #b0392b); }
.th-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 1.6rem; }
.th-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; background: #9a2a1e; color: #fff; font-weight: 600; font-size: 0.9375rem; box-shadow: 0 12px 24px -12px rgba(154, 42, 30, 0.7); transition: transform .2s, box-shadow .2s; }
.th-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(154, 42, 30, 0.8); }
.th-pill { display: inline-flex; align-items: center; gap: 12px; padding: 8px 20px 8px 10px; border: 1px dashed var(--vien); border-radius: 999px; color: var(--chu); }
.th-pill:hover { border-color: var(--kim); }
.th-plus { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--kim-rgb), 0.2); color: var(--kim-chu, var(--kim)); font-size: 1.1rem; }
.th-pill b { display: block; font-size: 0.875rem; font-weight: 600; }
.th-pill small { display: block; font-size: 0.75rem; color: var(--chu-3); }
.th-steps { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--vien-mo); font-size: 0.8125rem; color: var(--chu-2); }
.th-steps li { display: inline-flex; align-items: center; gap: 9px; }
.th-steps b { width: 20px; height: 20px; border: 1px solid var(--vien); border-radius: 50%; display: grid; place-items: center; font-weight: 500; font-size: 0.6875rem; color: var(--son-sang, #b0392b); }
.th-art { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; display: grid; place-items: center; }
.th-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--vien); }
.th-ring-2 { inset: 7%; border-style: dotted; opacity: .7; animation: thSpin 90s linear infinite; }
@keyframes thSpin { to { transform: rotate(360deg); } }
.th-han { position: relative; font-family: var(--font-han); font-size: clamp(7rem, 16vw, 11rem); line-height: 1; color: rgba(var(--kim-rgb), 0.55); }
.th-grid3 { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 62%; }
.th-grid3 span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--vien-mo); border-radius: 10px; background: var(--surface-card); font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--kim-chu, var(--kim)); box-shadow: 0 8px 18px -14px rgba(0, 0, 0, .5); }
.th-grid3 span.is-d { color: var(--son-sang, #b0392b); }
@media (max-width: 860px) {
  .tool-hero { padding: 2rem 0 2.2rem; }
  .tool-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .th-art { width: min(70%, 260px); order: -1; display: none; }
  .th-title { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .th-cta { width: 100%; justify-content: center; }
  .th-pill { width: 100%; }
}

/* ===== THANH GỢI Ý LƯU HỒ SƠ ===== */
.pf-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; width: min(1100px, calc(100% - 28px)); display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface-card); border: 1px solid var(--vien); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55); color: var(--chu); font-size: 0.9rem; }
.pf-bar-han { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--vien); font-family: var(--font-han); color: var(--son-sang, #b0392b); flex-shrink: 0; }
.pf-bar-text { flex: 1; min-width: 0; line-height: 1.5; }
.pf-bar-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; margin-right: 10px; }
.pf-bar-text span { color: var(--chu-2); font-size: 0.8125rem; }
.pf-bar-save { min-height: 40px; padding: 0 20px; border: 0; background: #9a2a1e; color: #fff; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.pf-bar-x { width: 32px; height: 32px; border: 0; background: transparent; color: var(--chu-2); font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
@media (max-width: 860px) {
  .pf-bar { flex-wrap: wrap; bottom: 10px; padding: 12px; }
  .pf-bar-han { display: none; }
  .pf-bar-text { flex-basis: 100%; }
  .pf-bar-save { flex: 1; }
}
.btn-gold, .btn-outline { white-space: nowrap; }
@media (min-width: 861px) {
  .form-grid > div[style*="display:flex"] { grid-column: span 2; }
}
