/* src/css/home-page.css – Trang chủ (landing, desktop + mobile). Phủ lên trên, không đụng tới khu vực lá số.
   Cấu trúc (index.html, #homePage): hero + ô lập lá số → dải trời Bắc Đẩu (canvas) → 4 tính năng → Luận giải AI
   → Lợi ích → kêu gọi → chân trang. Màu theo ngũ hành (--hp-c-tho … --hp-c-hoa).
   Màu theo theme (mb-theme-btn): biến --hp-* khai báo trong theme.css.
   Dải trời Bắc Đẩu vẽ bằng canvas sao sáng → ở theme Sáng đặt trong một khung trời đêm bo góc. */

/* ═════════ Khung trang ═════════ */
.home-page { display: none; }
body[data-layout="desktop"].mb-page-home .home-page,
body[data-layout="mobile"].m-page-home .home-page {
  display: block;
  position: fixed; top: 44px; left: 0; right: 0; bottom: 0; z-index: 940;   /* desktop: dưới menubar (950) */
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  /* Một nền chung cho cả trang; nền gắn với khung nên đứng yên khi cuộn. Các khu vực đều trong suốt. */
  background: var(--hp-nen);
  color: var(--hp-chu);
  font: 16px/1.5 Arial, 'Helvetica Neue', sans-serif;
  transition: opacity .45s ease;
}
.home-page.home-leaving { opacity: 0; }
.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
.home-page button { font-family: inherit; }
.home-page .hp-ic { flex: 0 0 auto; }

/* Lớp nền: sao nhỏ lấp lánh + sao rơi (home-page.js đặt vị trí, cỡ theo khung trang) */
.hp-nen { position: fixed; left: 0; top: 0; display: var(--hp-nen-sao); pointer-events: none; z-index: 0; }
.home-page > section, .home-page > footer { position: relative; z-index: 1; }

/* Đường kẻ mờ giữa các khu vực: nét liền mảnh, sáng ở giữa, tan dần hai đầu */
.home-band::before, .hp-khoi::before, .hp-chan::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px)); height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--hp-ke-sang), transparent);
}

/* Màu nhấn theo hành (dùng cho chữ, viền, biểu tượng) */
.hp-tho  { --hp-ac: var(--hp-c-tho); }
.hp-kim  { --hp-ac: var(--hp-c-kim); }
.hp-moc  { --hp-ac: var(--hp-c-moc); }
.hp-thuy { --hp-ac: var(--hp-c-thuy); }
.hp-hoa  { --hp-ac: var(--hp-c-hoa); }

/* Khối hiện dần khi cuộn tới (home-page.js thêm .hp-js vào #homePage và .ro vào khối) */
.hp-js .hp-hien { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.hp-js .hp-hien.ro { opacity: 1; transform: none; }

/* ═════════ Chữ dùng chung ═════════ */
.hp-h2 {
  margin: 0; text-wrap: balance;
  font: 700 clamp(30px, 4vw, 48px)/1.15 'Playfair Display', Georgia, serif; color: var(--hp-tieu);
}
.hp-h2 em { font-style: italic; color: var(--hp-nhan); }
.hp-h2-ng { font-style: italic; }
.hp-h3 {
  margin: 0; text-wrap: balance;
  font: 700 clamp(26px, 3vw, 36px)/1.2 'Playfair Display', Georgia, serif; color: var(--hp-tieu);
}
.hp-p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--hp-p); text-wrap: pretty; }
.hp-rong { max-width: 1240px; margin: 0 auto; }
.hp-khoi { padding: 112px 32px; }
.hp-dau { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 820px; margin: 0 auto; }

/* Nút vàng (Lập lá số miễn phí) và liên kết gạch chân */
.hp-nut-vang {
  align-self: flex-start; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #f8dc9a, #d9a64c); color: #2a1a05;
  font-size: 15px; font-weight: 700;
  transition: box-shadow .2s, transform .2s;
}
.hp-nut-vang:hover { box-shadow: 0 0 22px rgba(240, 200, 120, .35); transform: translateY(-1px); }
.hp-nut-to { min-height: 54px; padding: 0 28px; font-size: 17px; }
.hp-lk {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  border: 0; border-bottom: 1.5px solid var(--hp-ac); background: none; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--hp-ac);
}
.hp-lk:hover { opacity: .85; }

/* ═════════ 1. Hero ═════════ */
.hp-hero { overflow: hidden; }
.hp-hero-in {
  position: relative; max-width: 1304px; margin: 0 auto; padding: 96px 32px;   /* 1304 = 1240 nội dung + 2×32 lề: thẳng mép với các khối khác và menubar */
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between;
}
.hp-hero-chu { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hp-h1 {
  margin: 0;
  font: italic 700 clamp(32px, 4.2vw, 48px)/1.15 'Playfair Display', Georgia, serif;
  letter-spacing: .01em; color: var(--hp-tieu-2); text-shadow: var(--hp-bong-h1);
}
.hp-hero-p { margin: 0; max-width: 560px; font-size: 16px; line-height: 1.7; color: var(--hp-p-2); }
.hp-hero-p b { color: var(--hp-tieu-2); }

/* Hôm nay: dương lịch, âm lịch, can chi (home-page.js điền) */
.hp-homnay:empty { display: none; }
.hp-homnay-ngay { font: italic 22px/1.3 'Playfair Display', Georgia, serif; color: var(--hp-ngay); }
.hp-homnay-cc { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 14px; }
.hp-homnay-cc span { display: flex; flex-direction: column; align-items: center; min-width: 84px; }
.hp-homnay-cc i {                                   /* NĂM / THÁNG / NGÀY / GIỜ */
  font: normal 14px Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase;
  color: var(--hp-mo);
}
.hp-homnay-cc b { margin-top: 6px; font: 700 20px 'Playfair Display', Georgia, serif; color: var(--hp-so); }
.hp-homnay-cc em {                                  /* can chi chữ Hán */
  margin-top: 4px; font: normal 28px "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  letter-spacing: .08em; color: var(--hp-vang-chu);
}

/* Vào nhanh: 4 ô (Lập lá số, Chọn giờ đẹp, Học an sao, Ôn tập), màu theo hành của từng tính năng */
.hp-nhanh { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hp-nhanh-o {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0;
  padding: 14px 8px; border-radius: 14px; cursor: pointer; text-align: center;
  background: var(--hp-the); border: 1px solid var(--hp-vien); color: inherit;
  transition: background .2s, border-color .2s, transform .2s;
}
.hp-nhanh-o:hover { background: var(--hp-the-2); border-color: var(--hp-ac); transform: translateY(-1px); }
.hp-nhanh-o .hp-hanh { width: 40px; height: 40px; font-size: 19px; }
.hp-nhanh-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-nhanh-chu b { font-size: 15px; font-weight: 700; color: var(--hp-tieu); }
.hp-nhanh-chu span { font-size: 12px; color: var(--hp-p); }

/* Lá số mẫu + lá số gần đây */
.hp-mau {
  margin-top: 10px; display: flex; flex-direction: column; gap: 16px; padding: 24px;
  border-radius: 20px; background: var(--hp-the); border: 1px solid var(--hp-vien);
}
.hp-mau-tieu {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(14px, 1.5vw, 20px); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--hp-vang-chu);
}
.hp-mau-tieu::before, .hp-mau-tieu::after { content: ""; flex: 1; height: 1px; background: var(--hp-vien); }
.hp-mau-ds { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-mau-nut {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 8px;
  border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 700;
  transition: transform .2s, box-shadow .2s;
}
.hp-mau-nut:hover { transform: translateY(-1px); box-shadow: var(--hp-bong-the); }
.hp-mau-nut > span {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .7);
}
.hp-mau-nut.hp-tho  { background: #f6ead0; color: #9a6b10; }
.hp-mau-nut.hp-hoa  { background: #f8e5dd; color: #b23a2a; }
.hp-mau-nut.hp-thuy { background: #e3ecf5; color: #1f3a5f; }

/* Ô lập lá số */
.hp-form {
  flex: 0 1 460px; min-width: 0; width: 100%;
  display: flex; flex-direction: column; gap: 16px; padding: 32px;
  border-radius: 24px; background: #fbf8f0; border: 1px solid #e7d3a4; color: #211a12;
  box-shadow: var(--hp-bong-form);
}
.hp-form-dau { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.hp-form-nhan {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px;
  border-radius: 999px; background: #f6ead0; color: #9a6b10;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.hp-form-h { margin: 0; font: 500 34px/1.2 'Playfair Display', Georgia, serif; color: #211a12; }
.hp-o { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hp-o-nhan { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #4a3f2e; }
.hp-o-con { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 11px; color: #5e5240; }
.hp-form input, .hp-form select {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid #d8c9a6; border-radius: 10px; background: #fffdf8;
  font: 16px Arial, 'Helvetica Neue', sans-serif; color: #211a12;
}
.hp-form input:focus-visible, .hp-form select:focus-visible { outline: 2px solid #b07d1a; outline-offset: 1px; }
.hp-sel { position: relative; display: block; }
.hp-sel select { padding-right: 34px; appearance: none; -webkit-appearance: none; }
.hp-sel .hp-ic { position: absolute; right: 12px; top: 14px; pointer-events: none; color: #6b5d45; }
.hp-hang2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.hp-hang3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hp-ngay-dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-chon { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #efe5cf; }
.hp-chon button {
  flex: 1; height: 36px; border: 0; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 700; background: transparent; color: #5e5240;
}
.hp-chon button[aria-pressed="true"] { background: #211a12; color: #f6dfa6; }
.hp-chon-nho { gap: 4px; padding: 3px; border-radius: 10px; }
.hp-chon-nho button { flex: none; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12px; }
.hp-loi { margin: 0; font-size: 14px; color: #b23a2a; }
.hp-loi[hidden] { display: none; }
.hp-nut-lap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; margin-top: 4px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #2b2016, #16100a); color: #f6dfa6;
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6);
  transition: transform .2s, box-shadow .2s;
}
.hp-nut-lap:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .7); }

/* Lời chào / đăng nhập (chỉ mobile, đầu hero) */
.home-user { display: none; }
.home-hello {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: italic 13px 'Playfair Display', Georgia, serif; color: var(--hp-ngay);
}
.home-hello b { font-style: normal; color: var(--hp-tieu-2); }
.home-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  font: bold 14px Arial, sans-serif; color: #2a1a05; background: linear-gradient(180deg, #f8dc9a, #d9a64c);
}
.home-login {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font: 600 12px Arial, sans-serif; color: var(--hp-so); background: var(--hp-the);
  border: 1px solid var(--hp-vien-dam);
}

/* ═════════ 2. Dải trời Bắc Đẩu ═════════ */
/* Trái: câu chuyện; phải: bầu trời quay theo lịch chạy (ngày âm tăng dần, mỗi tháng Đẩu bính chỉ sang chi kế tiếp) */
.home-band-in {
  max-width: 1304px; margin: 0 auto; padding: 96px 32px;     /* nội dung 1240px như các khối khác */
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
}
.home-band-chu { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.home-troi { position: relative; flex: 1.25 1 480px; min-width: 0; height: 600px; border-radius: var(--hp-troi-bo); background: var(--hp-troi-nen); }
.home-sky { position: absolute; inset: 0; display: block; border-radius: var(--hp-troi-bo); }
.home-lich {                                      /* hai ô Ngày / Tháng chạy liên tục */
  position: absolute; left: var(--hp-troi-le); bottom: var(--hp-troi-le); pointer-events: none;
  display: flex; align-items: flex-end; gap: 10px;
}
.home-lich-o {
  display: flex; flex-direction: column; align-items: center; min-width: 72px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid rgba(240, 205, 135, .28); background: rgba(10, 14, 40, .55);
}
.home-lich-thang { min-width: 112px; }
.home-lich-o i { font-style: normal; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(200, 210, 240, .6); }
.home-lich-o b { font: 700 22px/1.25 'Playfair Display', Georgia, serif; color: #f1ddb0; font-variant-numeric: tabular-nums; }
.home-lich-ghi { padding-bottom: 6px; white-space: nowrap; font: italic 13px 'Playfair Display', Georgia, serif; color: rgba(220, 210, 180, .7); }
.home-tip {                                       /* chú thích khi rê chuột lên sao */
  position: absolute; z-index: 2; max-width: 260px; pointer-events: none;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(10, 14, 40, .82); border: 1px solid rgba(240, 205, 135, .35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 18px rgba(120, 160, 255, .15);
}
.home-tip[hidden] { display: none; }
.home-tip-name { font: 600 14px 'Playfair Display', Georgia, serif; color: #f6e7c1; }
.home-tip-name span { font: 13px "Noto Serif CJK SC", "Songti SC", "SimSun", serif; color: rgba(240, 205, 135, .8); margin-left: 4px; }
.home-tip-quan { font: italic 12px 'Playfair Display', Georgia, serif; color: #c9d6ff; margin-top: 2px; }
.home-tip-y { font-size: 12px; line-height: 1.4; color: rgba(225, 230, 255, .78); margin-top: 3px; }
.home-chi {                                       /* "Đẩu bính chỉ …" góc dưới phải */
  position: absolute; right: var(--hp-troi-le); bottom: calc(8px + var(--hp-troi-le)); pointer-events: none;
  font: italic 14px 'Playfair Display', Georgia, serif;
  color: rgba(220, 210, 180, .7); letter-spacing: .05em;
}
.home-chi b { color: #f3cf85; font-style: normal; }

/* ═════════ 3. Bốn tính năng ═════════ */
.hp-tn-ds { display: flex; flex-direction: column; gap: 112px; }
.hp-tinhnang .hp-dau { margin-bottom: -40px; }
.hp-tn { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hp-tn-chu { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hp-tn-ten { display: flex; align-items: center; gap: 12px; }
.hp-hanh {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--hp-ac); color: var(--hp-ac);
  font: 24px "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
}
.hp-tn-nhan { font: 700 clamp(32px, 4vw, 50px)/1.2 'Playfair Display', Georgia, serif; color: var(--hp-ac); }
.hp-ds {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.5; color: var(--hp-ds-chu);
}
.hp-ds li { display: flex; gap: 10px; align-items: flex-start; }
.hp-ds .hp-ic { margin-top: 2px; color: var(--hp-ac); }

/* Khung minh họa (nền giấy) */
.hp-tranh { flex: 1 1 420px; min-width: 0; position: relative; padding: 28px; border-radius: 20px; border: 1px solid var(--hp-tranh-vien); }
.hp-tranh-tho  { background: #f6ecd4; }
.hp-tranh-kim  { background: #eceef1; }
.hp-tranh-moc  { background: #e6efe2; }
.hp-tranh-thuy { background: #e3eaf3; }
.hp-tranh-chu { margin: 12px 0 0; font-size: 12px; color: #6a7380; }

/* Minh họa: lá số 12 cung */
.hp-ls {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(74px, auto); gap: 1px;
  background: #d9c9a3; border: 1px solid #c9b483; border-radius: 6px; overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(90, 60, 10, .35);
}
.hp-ls-o { background: #fffdf7; padding: 8px 8px 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hp-ls-menh { background: #fff7e3; box-shadow: inset 0 0 0 2px #b07d1a; }
.hp-ls-dau { display: flex; justify-content: space-between; font-size: 10px; color: #6b5d45; }
.hp-ls-dau b { letter-spacing: .06em; }
.hp-ls-sao { display: block; font-weight: 700; font-size: 11px; letter-spacing: .02em; }
.hp-ls-sao i { font-style: normal; font-weight: 400; color: #6b5d45; }
.s-tho { color: #b07d1a; } .s-kim { color: #5f6470; } .s-moc { color: #2f6b3a; } .s-thuy { color: #1f3a5f; } .s-hoa { color: #b23a2a; }
.o-ti { grid-area: 1 / 1; }   .o-ngo { grid-area: 1 / 2; }  .o-mui { grid-area: 1 / 3; }  .o-than { grid-area: 1 / 4; }
.o-thin { grid-area: 2 / 1; } .o-dau { grid-area: 2 / 4; }
.o-mao { grid-area: 3 / 1; }  .o-tuat { grid-area: 3 / 4; }
.o-dan { grid-area: 4 / 1; }  .o-suu { grid-area: 4 / 2; }  .o-ty { grid-area: 4 / 3; }   .o-hoi { grid-area: 4 / 4; }
.hp-ls-giua {
  grid-area: 2 / 2 / 4 / 4; background: #fbf5e6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px; text-align: center; font-size: 11px; color: #6b5d45;
}
.hp-ls-ten { font: italic 700 18px 'Playfair Display', Georgia, serif; color: #2a2118; }

/* Minh họa: kết quả tìm lá số đẹp */
.hp-loc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hp-loc span { padding: 6px 12px; border-radius: 999px; background: #fffdf8; border: 1px solid #c9ced6; font-size: 13px; color: #55606e; }
.hp-loc span.on { background: #55606e; border-color: #55606e; color: #fff; }
.hp-kq { display: flex; flex-direction: column; gap: 12px; }
.hp-kq-the {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: #fffdf8; border: 1px solid #d6d9de; border-radius: 14px;
  box-shadow: 0 10px 30px -18px rgba(40, 50, 70, .35);
}
.hp-kq-diem {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid #55606e; color: #55606e;
}
.hp-kq-diem b { font: 700 20px 'Playfair Display', Georgia, serif; }
.hp-kq-diem span { font-size: 9px; letter-spacing: .08em; }
.hp-kq-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hp-kq-chu b { font-size: 15px; color: #211a12; }
.hp-kq-chu span { font-size: 13px; color: #5e5240; }
.hp-kq-thanh { height: 6px; border-radius: 3px; background: #e6e8ec; overflow: hidden; }
.hp-kq-thanh i { display: block; height: 100%; background: #55606e; }
.hp-kq-thanh .w92 { width: 92%; } .hp-kq-thanh .w87 { width: 87%; } .hp-kq-thanh .w81 { width: 81%; }
.hp-kq-sao { font-size: 20px; color: #b08a2e; }

/* Minh họa: các chặng học */
.hp-chang { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px; }
.hp-chang > div { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #5d6d60; }
.hp-chang span {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fffdf8; border: 1.5px dashed #a9bba9; color: #7b8a7e;
  font: 700 14px 'Playfair Display', Georgia, serif;
}
.hp-chang .xong, .hp-chang .dang { color: #1d3a24; }
.hp-chang .xong span { background: #2f6b3a; border: 2px solid #2f6b3a; color: #fff; }
.hp-chang .dang { font-weight: 700; }
.hp-chang .dang span { border: 2px solid #2f6b3a; color: #2f6b3a; }
.hp-chang em {
  margin-left: auto; padding: 3px 10px; border-radius: 999px;
  background: #e4efe3; color: #2f6b3a; font-size: 12px; font-weight: 700; font-style: normal;
}

/* Minh họa: thẻ ôn tập */
.hp-the { position: relative; height: 330px; }
.hp-the > div { position: absolute; border-radius: 18px; }
.hp-the-sau2 { left: 12%; right: 4%; top: 34px; bottom: 0; transform: rotate(5deg); background: #e7edf5; border: 1px solid #c4d0de; }
.hp-the-sau1 { left: 6%; right: 9%; top: 18px; bottom: 14px; transform: rotate(-3deg); background: #f2f5fa; border: 1px solid #c4d0de; }
.hp-the-truoc {
  left: 4%; right: 12%; top: 0; bottom: 26px; padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fffdf8; border: 1.5px solid #1f3a5f; box-shadow: 0 24px 50px -24px rgba(31, 58, 95, .45);
}
.hp-the-dau { display: flex; justify-content: space-between; font-size: 12px; color: #4d6584; letter-spacing: .08em; }
.hp-the-hoi { font: 700 24px/1.35 'Playfair Display', Georgia, serif; color: #211a12; text-align: center; }
.hp-the-nut { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hp-the-nut span { padding: 9px 16px; border-radius: 999px; border: 1px solid #a9b9cf; color: #1f3a5f; font-size: 14px; }
.hp-the-nut span.on { background: #1f3a5f; border-color: #1f3a5f; color: #fff; }

/* ═════════ 4. Luận giải AI ═════════ */
.hp-ai-in { display: flex; flex-direction: column; gap: 56px; }
.hp-ai-luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.hp-ai-the {
  display: flex; flex-direction: column; gap: 12px; padding: 28px;
  border-radius: 20px; background: var(--hp-the); border: 1px solid var(--hp-vien);
}
.hp-ai-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--hp-c-hoa) 14%, transparent); color: var(--hp-c-hoa);
}
.hp-h3-the { margin: 0; font: 700 clamp(24px, 2.6vw, 36px)/1.2 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }
.hp-ai-banh { grid-row: span 2; align-items: center; justify-content: center; gap: 16px; }
.hp-ai-svg { width: 100%; max-width: 420px; height: auto; }
.hp-ai-banh .hp-p { max-width: 300px; text-align: center; line-height: 1.6; }

/* ═════════ 5. Lợi ích ═════════ */
.hp-li-in { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.hp-li-trai { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hp-thut { padding-left: 2.2em; }
.hp-li-ds { flex: 1.4 1 520px; min-width: 0; display: flex; flex-direction: column; border-top: 1px solid var(--hp-ke); }
.hp-li { display: flex; gap: 22px; align-items: flex-start; padding: 26px 0; }
.hp-li:not(:last-child) { border-bottom: 1px solid var(--hp-ke); }   /* dòng cuối không kẻ: đã có đường ngăn khu vực kế tiếp */
.hp-li > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hp-li-ic {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
  background: color-mix(in srgb, var(--hp-ac) 14%, transparent); color: var(--hp-ac);
}
.hp-h3-li { margin: 0; font: 700 20px/1.2 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }

/* ═════════ 6. Kêu gọi ═════════ */
.hp-cta-khoi { overflow: hidden; }                 /* vòng trang trí tràn ra ngoài khung thì cắt ở mép khu vực */
.hp-cta {
  position: relative; max-width: 1240px; margin: 0 auto;
  padding: 64px clamp(28px, 6vw, 80px);
}
.hp-cta-vong {
  position: absolute; width: 460px; height: 460px; right: -80px; top: 50%; margin-top: -230px; opacity: .9;   /* giữa theo chiều dọc */
  animation: hp-xoay 240s linear infinite;
}
@keyframes hp-xoay { to { transform: rotate(360deg); } }
.hp-cta-in { position: relative; max-width: 680px; display: flex; flex-direction: column; gap: 20px; }
.hp-nhan-vien {                                   /* nhãn chữ in hoa có viền: "Thất tinh Bắc Đẩu", "Bắt đầu ngay" */
  align-self: flex-start; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--hp-vien-dam); color: var(--hp-vang-chu);
  font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.hp-h2.hp-h2-sang { color: var(--hp-tieu-2); }
.hp-h2-sang em { color: var(--hp-nhan-2); }
.hp-cta .hp-p { color: var(--hp-p-2); }
.hp-cta-the { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-cta-the span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--hp-vien); background: var(--hp-the); font-size: 14px;
}
.hp-cta-the .hp-ic { color: var(--hp-vang-chu); }

/* ═════════ 7. Chân trang ═════════ */
.hp-chan { padding: 64px 32px 32px; }
.hp-chan-in { display: flex; flex-direction: column; gap: 40px; }
.hp-chan-tren { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.hp-chan-gt { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.hp-chan-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--hp-tieu); }
.hp-chan-logo b { font: italic 700 26px 'Playfair Display', Georgia, serif; }
.hp-chan-mail {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--hp-vien); background: var(--hp-the);
  color: var(--hp-ds-chu); text-decoration: none; font-size: 14px;
}
.hp-chan-mail .hp-ic { color: var(--hp-nhan); }
.hp-chan-cot { display: flex; flex-wrap: wrap; gap: 48px; }
.hp-chan-cot > div { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.hp-chan-cot span { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--hp-chan-mo); }
.hp-chan-cot a, .hp-chan-cot button {
  min-height: 36px; display: inline-flex; align-items: center; padding: 0;
  border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--hp-ds-chu); text-decoration: none; font-size: 15px;
}
.hp-chan-cot a:hover, .hp-chan-cot button:hover { color: var(--hp-chan-hover); }
.hp-chan-duoi {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-top: 24px; font-size: 13px; color: var(--hp-chan-mo);
  border-top: 1px solid; border-image: linear-gradient(90deg, transparent, var(--hp-ke-sang), transparent) 1;
}

/* ═════════ Nút lên đầu trang (home-page.js) ═════════ */
.hp-len-dau {
  position: fixed; right: 24px; bottom: 24px; z-index: 5;
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--hp-vien-dam); border-radius: 50%; cursor: pointer;
  background: var(--ui-side-the); color: var(--hp-vang-chu); box-shadow: var(--hp-bong-the);   /* nền đặc (--hp-the… trong suốt): không lộ chữ phía sau */
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background .2s;
}
.hp-len-dau.hien { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, background .2s; }
.hp-len-dau:hover { background: var(--ui-side); }
.hp-len-dau:focus-visible { outline: 2px solid var(--hp-vang-chu); outline-offset: 3px; }

/* ═════════ Mobile ═════════ */
/* Màn hẹp: chữ nhỏ lại theo một thang riêng (tiêu đề 26–28px, chữ thường 15px), khoảng cách gọn hơn. */
body[data-layout="mobile"].m-page-home { overflow: hidden; }         /* không cuộn trang lá số bên dưới */
body[data-layout="mobile"].m-page-home .home-page {
  top: 0; bottom: 0; z-index: 8900;                                       /* dưới thanh trên cùng (9000); không còn thanh đáy */
  padding-bottom: env(safe-area-inset-bottom);
  font-size: 15px;
}
body[data-layout="mobile"] .home-user {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
}

/* Chữ */
body[data-layout="mobile"] .hp-h1 { font-size: 26px; line-height: 1.2; }
body[data-layout="mobile"] .hp-h2 { font-size: 24px; line-height: 1.2; }
body[data-layout="mobile"] .hp-h3 { font-size: 21px; line-height: 1.3; }
body[data-layout="mobile"] .hp-h3-the { font-size: 21px; }
body[data-layout="mobile"] .hp-h3-li { font-size: 18px; }
body[data-layout="mobile"] .hp-tn-nhan { font-size: 28px; }
body[data-layout="mobile"] .hp-hanh { width: 40px; height: 40px; font-size: 19px; }
body[data-layout="mobile"] .hp-p,
body[data-layout="mobile"] .hp-hero-p { font-size: 15px; line-height: 1.65; }
body[data-layout="mobile"] .hp-ds { font-size: 15px; gap: 8px; }
body[data-layout="mobile"] .hp-homnay-ngay { font-size: 16px; }
body[data-layout="mobile"] .hp-homnay-cc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 4px; margin-top: 10px; }   /* luôn đủ 4 cột trên một hàng */
body[data-layout="mobile"] .hp-homnay-cc span { min-width: 0; }
body[data-layout="mobile"] .hp-homnay-cc b { white-space: nowrap; }
body[data-layout="mobile"] .hp-homnay-cc i { font-size: 11px; letter-spacing: .14em; }
body[data-layout="mobile"] .hp-homnay-cc b { font-size: 15px; }
body[data-layout="mobile"] .hp-homnay-cc em { font-size: 20px; }
body[data-layout="mobile"] .hp-mau-tieu { font-size: 12px; letter-spacing: .12em; }
body[data-layout="mobile"] .hp-thut { padding-left: 1.2em; }
body[data-layout="mobile"] .hp-lk { font-size: 14px; }
body[data-layout="mobile"] .hp-nut-vang { min-height: 46px; padding: 0 20px; font-size: 14px; }
body[data-layout="mobile"] .hp-nut-to { min-height: 50px; font-size: 15px; }

/* 1. Hero + ô lập lá số */
/* Thứ tự trên mobile: chữ giới thiệu → ô lập lá số → lá số mẫu (ô nhập lên sớm, không phải cuộn qua phần mẫu) */
/* Không xuống dòng kiểu flex-wrap: cột flex có wrap làm khung rộng theo chữ dài nhất (Safari) → chữ tràn khỏi màn hình */
body[data-layout="mobile"] .hp-hero-in { width: 100%; padding: 20px 16px 44px; gap: 16px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
body[data-layout="mobile"] .hp-hero-chu { display: contents; }
body[data-layout="mobile"] .hp-hero-in > *, body[data-layout="mobile"] .hp-hero-chu > * { min-width: 0; max-width: 100%; }
body[data-layout="mobile"] .hp-h1, body[data-layout="mobile"] .hp-hero-p { overflow-wrap: break-word; }
body[data-layout="mobile"] .hp-form { order: 1; margin-top: 8px; }
body[data-layout="mobile"] .hp-mau { order: 2; margin-top: 12px; }
body[data-layout="mobile"] .hp-nhanh { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
body[data-layout="mobile"] .hp-nhanh-o { flex-direction: row; gap: 10px; min-height: 56px; padding: 8px 10px; text-align: left; }
body[data-layout="mobile"] .hp-nhanh-o .hp-hanh { width: 34px; height: 34px; font-size: 16px; }
body[data-layout="mobile"] .hp-nhanh-chu b { font-size: 14px; }
body[data-layout="mobile"] .hp-nhanh-chu span { font-size: 11px; }
body[data-layout="mobile"] .hp-mau { padding: 16px; gap: 12px; border-radius: 16px; }
body[data-layout="mobile"] .hp-mau-nut { width: 100%; min-height: 44px; font-size: 13px; }
body[data-layout="mobile"] .hp-mau-nut > span { width: 30px; height: 30px; }
body[data-layout="mobile"] .hp-form { padding: 20px 16px; gap: 14px; border-radius: 20px; }
body[data-layout="mobile"] .hp-form-h { font-size: 24px; }
body[data-layout="mobile"] .hp-nut-lap { min-height: 50px; font-size: 16px; }

/* 2. Dải trời */
body[data-layout="mobile"] .home-band-in { padding: 56px 16px; gap: 20px; }
body[data-layout="mobile"] .home-band-chu { gap: 14px; }
body[data-layout="mobile"] .home-troi { flex: 1 1 100%; height: 440px; }
body[data-layout="mobile"] .home-lich { left: 50%; top: var(--hp-troi-le); bottom: auto; transform: translateX(-50%); }
body[data-layout="mobile"] .home-lich-o { min-width: 64px; padding: 6px 10px; }
body[data-layout="mobile"] .home-lich-thang { min-width: 100px; }
body[data-layout="mobile"] .home-lich-o b { font-size: 18px; }
body[data-layout="mobile"] .home-chi { right: 0; left: 0; bottom: calc(6px + var(--hp-troi-le)); text-align: center; font-size: 12px; }
body[data-layout="mobile"] .home-tip { max-width: 220px; }

/* 3–6. Các khối */
body[data-layout="mobile"] .hp-khoi { padding: 56px 16px; }
body[data-layout="mobile"] .hp-dau { gap: 12px; }
body[data-layout="mobile"] .hp-tn-ds { gap: 56px; }
body[data-layout="mobile"] .hp-tinhnang .hp-dau { margin-bottom: -16px; }
body[data-layout="mobile"] .hp-tn { gap: 24px; }
body[data-layout="mobile"] .hp-tn-chu { gap: 14px; }
body[data-layout="mobile"] .hp-tn-ten { gap: 10px; }
body[data-layout="mobile"] .hp-tn-dao .hp-tranh { order: 2; }           /* chữ trước, hình sau */
body[data-layout="mobile"] .hp-tranh { padding: 14px; border-radius: 16px; }
body[data-layout="mobile"] .hp-ls { grid-auto-rows: minmax(54px, auto); }
body[data-layout="mobile"] .hp-ls-o { padding: 4px 4px 3px; gap: 2px; }
body[data-layout="mobile"] .hp-ls-dau { font-size: 8px; }
body[data-layout="mobile"] .hp-ls-sao { font-size: 8.5px; }
body[data-layout="mobile"] .hp-ls-giua { font-size: 9px; }
body[data-layout="mobile"] .hp-ls-ten { font-size: 15px; }
body[data-layout="mobile"] .hp-kq-the { gap: 10px; padding: 10px 12px; }
body[data-layout="mobile"] .hp-kq-diem { width: 46px; height: 46px; }
body[data-layout="mobile"] .hp-kq-diem b { font-size: 16px; }
body[data-layout="mobile"] .hp-kq-chu b { font-size: 14px; }
body[data-layout="mobile"] .hp-kq-chu span, body[data-layout="mobile"] .hp-loc span { font-size: 12px; }
body[data-layout="mobile"] .hp-chang > div { font-size: 14px; }
body[data-layout="mobile"] .hp-chang span { width: 30px; height: 30px; font-size: 13px; }
body[data-layout="mobile"] .hp-the { height: 250px; }
body[data-layout="mobile"] .hp-the-truoc { padding: 16px; }
body[data-layout="mobile"] .hp-the-hoi { font-size: 18px; }
body[data-layout="mobile"] .hp-the-nut span { padding: 7px 12px; font-size: 13px; }
body[data-layout="mobile"] .hp-ai-in { gap: 32px; }
body[data-layout="mobile"] .hp-ai-luoi { gap: 14px; }
body[data-layout="mobile"] .hp-ai-the { padding: 20px; gap: 10px; border-radius: 16px; }
body[data-layout="mobile"] .hp-ai-ic { width: 40px; height: 40px; border-radius: 12px; }
body[data-layout="mobile"] .hp-ai-banh { grid-row: auto; }
body[data-layout="mobile"] .hp-ai-svg { max-width: 260px; }
body[data-layout="mobile"] .hp-li-in { gap: 32px; }
body[data-layout="mobile"] .hp-li-trai { gap: 14px; }
body[data-layout="mobile"] .hp-li { gap: 14px; padding: 18px 0; }
body[data-layout="mobile"] .hp-li-ic { width: 44px; height: 44px; border-radius: 12px; }
body[data-layout="mobile"] .hp-cta { padding: 32px 4px; }
body[data-layout="mobile"] .hp-cta-in { gap: 16px; }
body[data-layout="mobile"] .hp-cta-vong { width: 300px; height: 300px; right: -140px; top: 0; margin-top: 0; opacity: .55; }
body[data-layout="mobile"] .hp-cta-the span { padding: 6px 12px; font-size: 13px; }

/* 7. Chân trang */
body[data-layout="mobile"] .hp-chan { padding: 44px 16px 24px; }
body[data-layout="mobile"] .hp-chan-in { gap: 28px; }
body[data-layout="mobile"] .hp-chan-tren { gap: 28px; }
body[data-layout="mobile"] .hp-chan-logo b { font-size: 22px; }
body[data-layout="mobile"] .hp-chan-cot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
body[data-layout="mobile"] .hp-chan-cot > div { min-width: 0; gap: 0; }
body[data-layout="mobile"] .hp-chan-cot span { margin-bottom: 4px; font-size: 11px; letter-spacing: .16em; }
body[data-layout="mobile"] .hp-chan-cot a, body[data-layout="mobile"] .hp-chan-cot button { min-height: 34px; font-size: 14px; }
/* Kết nối: hết bề ngang, các liên kết nằm trên một hàng */
body[data-layout="mobile"] .hp-chan-cot > div:last-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
body[data-layout="mobile"] .hp-chan-cot > div:last-child span { flex: 1 1 100%; }
body[data-layout="mobile"] .hp-chan-duoi { font-size: 12px; }
body[data-layout="mobile"] .hp-len-dau { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 44px; height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .hp-cta-vong { animation: none; }
  .home-page, .hp-js .hp-hien { transition: none; }
  .hp-js .hp-hien { opacity: 1; transform: none; }
}

/* ═════════ 1b. Công nghệ AI (#hpCongNghe): đầu vào → hệ thống đa tác tử (học tăng cường) → luận đoán ═════════
   Desktop: 3 cột nối bằng dòng chảy (SVG, nét đứt chạy); điện thoại: xếp dọc, mũi tên đi xuống.
   Màu theo theme (--hp-*), màu nhấn theo hành (.hp-tho … .hp-hoa → --hp-ac). Chạy hiệu ứng khi khối hiện ra (.hp-hien.ro). */
   .hp-cn-in { display: flex; flex-direction: column; gap: 56px; }
   .hp-cn-nhan {
     display: inline-flex; align-items: center; gap: 10px; font: 600 12px Arial, sans-serif; letter-spacing: .14em;
     text-transform: uppercase; color: var(--hp-vang-chu);
   }
   .hp-cn-nhan::before, .hp-cn-nhan::after { content: ""; width: 28px; height: 1px; background: var(--hp-vien-dam); }
   
   .hp-cn-so {
     display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1.3fr) 64px minmax(0, .85fr);
     align-items: stretch; max-width: 1180px; margin: 0 auto; width: 100%;
   }
   .hp-cn-so svg { display: block; }
   .hp-cn-xuong { display: none; }
   
   /* Cột 1: đầu vào */
   .hp-cn-vao { display: grid; grid-template-rows: repeat(4, 1fr); gap: 14px; }
   .hp-cn-o {
     display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 84px;
     border-radius: 16px; background: var(--hp-the); border: 1px solid var(--hp-vien);
     box-shadow: inset 3px 0 0 var(--hp-ac);
   }
   .hp-cn-ic {
     display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px;
     background: color-mix(in srgb, var(--hp-ac) 15%, transparent); color: var(--hp-ac);
   }
   .hp-cn-ic svg, .hp-cn-ra-ic svg, .hp-cn-tam svg, .hp-cn-vong svg {
     width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
   }
   .hp-cn-chu { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
   .hp-cn-chu b { font: 700 17px 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }
   .hp-cn-chu span { font-size: 13.5px; line-height: 1.45; color: var(--hp-p); }
   
   /* Dòng chảy nối các cột: nét đứt chạy theo hướng luồng */
   .hp-cn-noi { width: 100%; height: 100%; overflow: visible; }
   .hp-cn-noi path, .hp-cn-day path {
     fill: none; stroke: var(--hp-nhan); stroke-width: 1.6; vector-effect: non-scaling-stroke;
     stroke-dasharray: 5 7; opacity: .75;
   }
   .hp-cn-so.ro .hp-cn-noi path, .hp-cn-so.ro .hp-cn-day path { animation: hp-cn-chay 1.1s linear infinite; }
   @keyframes hp-cn-chay { to { stroke-dashoffset: -24; } }
   
   /* Cột 2: hệ thống đa tác tử */
   .hp-cn-may {
     position: relative; display: flex; flex-direction: column; gap: 18px; padding: 24px 22px 20px;
     border-radius: 24px; background: var(--hp-the); border: 1px solid var(--hp-vien-dam);
     box-shadow: var(--hp-bong-the), 0 0 0 6px color-mix(in srgb, var(--hp-nhan) 8%, transparent);
   }
   .hp-cn-may::before {                                       /* quầng sáng nhẹ phía sau khối */
     content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none;
     background: radial-gradient(ellipse 70% 60% at 50% 45%, color-mix(in srgb, var(--hp-nhan) 22%, transparent), transparent 70%);
     filter: blur(18px);
   }
   .hp-cn-may-dau { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
   .hp-cn-may-dau b { font: 700 22px 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }
   .hp-cn-may-dau span { font-size: 13.5px; color: var(--hp-p); }
   
   .hp-cn-luoi { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(64px, auto)); gap: 0; }
   .hp-cn-day { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
   .hp-cn-tt {
     position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
     border-radius: 14px; background: var(--hp-the-2); border: 1px solid var(--hp-vien);
     font: 700 14.5px Arial, sans-serif; color: var(--hp-tieu);
   }
   .hp-cn-tt i { font: italic 600 11px 'Playfair Display', Georgia, serif; color: var(--hp-nhan); letter-spacing: .06em; }
   .hp-cn-tt span { font-weight: 400; font-size: 12.5px; line-height: 1.4; color: var(--hp-p); }
   .hp-cn-t1 { grid-area: 1 / 1; }  .hp-cn-t2 { grid-area: 1 / 3; }      /* 4 tác tử ở 4 góc, Điều phối ở giữa */
   .hp-cn-t3 { grid-area: 3 / 1; }  .hp-cn-t4 { grid-area: 3 / 3; }
   .hp-cn-tam {
     grid-area: 2 / 2; place-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
     width: 92px; height: 92px; border-radius: 50%;
     background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--hp-nhan) 30%, transparent), color-mix(in srgb, var(--hp-nhan) 8%, transparent));
     border: 1px solid var(--hp-vien-dam); color: var(--hp-nhan);
   }
   .hp-cn-tam b { font: 700 13px Arial, sans-serif; color: var(--hp-tieu); }
   .hp-cn-so.ro .hp-cn-tam { animation: hp-cn-dap 2.6s ease-in-out infinite; }
   @keyframes hp-cn-dap {
     0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hp-nhan) 35%, transparent); }
     50%      { box-shadow: 0 0 0 12px color-mix(in srgb, var(--hp-nhan) 0%, transparent); }
   }
   
   /* Vòng học tăng cường */
   .hp-cn-hoc {
     display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
     border: 1px dashed var(--hp-vien-dam); background: color-mix(in srgb, var(--hp-c-moc) 8%, transparent);
     font-size: 13px; line-height: 1.45; color: var(--hp-p);
   }
   .hp-cn-hoc b { display: block; margin-bottom: 2px; font: 700 15px 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }
   .hp-cn-vong { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: var(--hp-c-moc);
     background: color-mix(in srgb, var(--hp-c-moc) 16%, transparent); }
   .hp-cn-so.ro .hp-cn-vong svg { animation: hp-cn-quay 4s linear infinite; }
   @keyframes hp-cn-quay { to { transform: rotate(360deg); } }
   
   /* Cột 3: luận đoán */
   .hp-cn-ra {
     align-self: center; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 20px;
     border-radius: 20px; background: var(--hp-the); border: 1px solid color-mix(in srgb, var(--hp-ac) 45%, transparent);
     box-shadow: 0 0 0 5px color-mix(in srgb, var(--hp-ac) 8%, transparent);
   }
   .hp-cn-ra-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
     background: color-mix(in srgb, var(--hp-ac) 15%, transparent); color: var(--hp-ac); }
   .hp-cn-ra > b { font: 700 24px 'Playfair Display', Georgia, serif; color: var(--hp-tieu); }
   .hp-cn-ra ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
   .hp-cn-ra li { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--hp-ds-chu); }
   .hp-cn-ra li::before { content: "✓"; color: var(--hp-ac); font-weight: 700; }
   
   /* Điện thoại: xếp dọc; đầu vào 2×2; mũi tên đi xuống thay dòng chảy ngang */
   body[data-layout="mobile"] .hp-cn-in { gap: 32px; }
   body[data-layout="mobile"] .hp-cn-so { display: flex; flex-direction: column; align-items: stretch; }
   body[data-layout="mobile"] .hp-cn-noi { display: none; }
   body[data-layout="mobile"] .hp-cn-vao { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 10px; }
   body[data-layout="mobile"] .hp-cn-o { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 14px; box-shadow: inset 0 3px 0 var(--hp-ac); }
   body[data-layout="mobile"] .hp-cn-ic { width: 38px; height: 38px; }
   body[data-layout="mobile"] .hp-cn-chu b { font-size: 16px; }
   body[data-layout="mobile"] .hp-cn-chu span { font-size: 12.5px; }
   body[data-layout="mobile"] .hp-cn-xuong {
     display: block; position: relative; align-self: center; width: 2px; height: 44px; margin: 4px 0;
     background: repeating-linear-gradient(180deg, var(--hp-nhan) 0 5px, transparent 5px 11px); opacity: .8;
   }
   body[data-layout="mobile"] .hp-cn-xuong::after {
     content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg);
     border-right: 2px solid var(--hp-nhan); border-bottom: 2px solid var(--hp-nhan);
   }
   body[data-layout="mobile"] .hp-cn-so.ro .hp-cn-xuong { animation: hp-cn-xuong 1s linear infinite; }
   @keyframes hp-cn-xuong { to { background-position: 0 22px; } }
   body[data-layout="mobile"] .hp-cn-may { padding: 20px 14px 16px; gap: 14px; border-radius: 20px; }
   body[data-layout="mobile"] .hp-cn-may-dau b { font-size: 20px; }
   body[data-layout="mobile"] .hp-cn-luoi { grid-template-rows: repeat(3, minmax(58px, auto)); }
   body[data-layout="mobile"] .hp-cn-tt { padding: 8px 10px; font-size: 13.5px; }
   body[data-layout="mobile"] .hp-cn-tt span { font-size: 11.5px; }
   body[data-layout="mobile"] .hp-cn-tam { width: 76px; height: 76px; }
   body[data-layout="mobile"] .hp-cn-ra { align-self: stretch; padding: 18px; }
   
   @media (prefers-reduced-motion: reduce) {
     .hp-cn-so.ro :is(.hp-cn-noi path, .hp-cn-day path, .hp-cn-tam, .hp-cn-vong svg, .hp-cn-xuong) { animation: none !important; }
   }