/* ==========================================================================
   SƠN MÀI — lớp giao diện chung cho các trang Lịch ngày / tuần / năm / Tử vi
   (trang chủ dùng home.css riêng, cùng bảng màu).

   Nạp sau CSS trang + ndla-system.css. Cách làm:
   1. Đổi giá trị biến màu (--vermilion, --gold, --jade…) mà mọi file CSS
      trang đang dùng → cả site đổi màu theo, không phải sửa từng rule.
   2. Khung trang: bỏ hộp giấy + nền nâu, thêm dải đầu trang sơn son.
   3. Đồng bộ các bảng màu riêng lẻ (màu theo thứ, ô năm, điểm tử vi).
   ========================================================================== */

/* 1. BIẾN MÀU ------------------------------------------------------------- */
:root {
  --paper:          #F6F1E7;
  --paper-deep:     #EFE7D8;
  --paper-light:    #FFFDF8;
  --paper-card:     #FFFFFF;
  --ink:            #1F1714;
  --ink-soft:       #3F332D;
  --ink-mute:       #5E5048;
  --ink-60:         #5E5048;
  --vermilion:      #B42318;
  --vermilion-deep: #8E1B12;
  --vermilion-soft: #D9776E;
  --gold:           #C99A2E;
  --gold-light:     #F0C873;
  --gold-deep:      #8A6514;
  --gold-text:      #8A6514;
  --jade:           #1E6B50;
  --jade-light:     #6FB394;
  --hac:            #3B2A22;
  --border:         #E7DCC8;

  --sm-lacquer:   #7A1B14;
  --sm-lacquer-2: #4A0E0B;
  --sm-cream:     #F6E7C1;
  --sm-cream-2:   #E9D3A8;
  --sm-line:      #E7DCC8;
  --sm-line-soft: #F0E8DA;
  --sm-jade-tint: #E3F1EA;
  --sm-red-tint:  #FDF1EF;
  --sm-shadow:    0 1px 2px rgba(31, 23, 20, 0.05), 0 8px 24px -16px rgba(31, 23, 20, 0.18);
}

/* 2. KHUNG TRANG ---------------------------------------------------------- */
html body.ngaydep-lich { background: #F6F1E7; background-image: none; }
body.ngaydep-lich .site-footer { margin-top: 0; }

.ndla-page:not(.hm) {
  max-width: none;
  margin: 0;
  padding: 0 0 72px;
  background: none;
  box-shadow: none;
  overflow-x: clip;
}
/* Nội dung giữa trang: tối đa 1200px, chừa lề 24px */
.ndla-page:not(.hm) > :not(.pg-head):not(script):not(style) {
  width: min(1200px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Dải đầu trang sơn son — cùng ngôn ngữ với hero trang chủ */
.ndla-page .pg-head {
  position: relative;
  margin: 0 0 36px;
  padding: 26px 0 34px;
  color: var(--sm-cream);
  background:
    radial-gradient(ellipse 50% 120% at 90% 0%, rgba(240, 200, 115, 0.10), transparent 60%),
    linear-gradient(160deg, var(--sm-lacquer) 0%, #5E130F 60%, var(--sm-lacquer-2) 100%);
  text-align: left;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.ndla-page .pg-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light) 20%, var(--gold-light) 80%, transparent);
  opacity: 0.7;
}
.pg-head-in { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

.pg-head .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 0;
  margin: 0 0 18px;
  border: 0;
  font-size: 14px;
  color: var(--sm-cream-2);
}
.pg-head .breadcrumb a { color: var(--sm-cream-2); text-decoration: none; }
.pg-head .breadcrumb a:hover { color: #fff; text-decoration: underline; }
.pg-head .breadcrumb .sep { color: rgba(240, 200, 115, 0.6); }
.pg-head .breadcrumb .cur { color: var(--gold-light); font-weight: 600; }

/* Thanh tab chung (ndla_subnav) */
.pg-head .subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.pg-head .subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(246, 231, 193, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sm-cream);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pg-head .subnav a:hover { background: rgba(246, 231, 193, 0.12); border-color: rgba(246, 231, 193, 0.5); color: #fff; }
.pg-head .subnav a.active { background: var(--gold-light); border-color: var(--gold-light); color: var(--sm-lacquer-2); font-weight: 700; }
.pg-head :focus-visible { outline-color: var(--gold-light); }

.pg-head .page-title,
.pg-head .tv-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #FFF6E0;
  margin: 0 0 10px;
  max-width: 28ch;
  text-align: left;
  text-wrap: balance;
}
.pg-head .page-subtitle,
.pg-head .tv-hero-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--sm-cream-2);
  max-width: 70ch;
  margin: 0;
  text-align: left;
}
.pg-head .page-subtitle strong { color: var(--sm-cream); }
/* Bỏ kiểu tô nghiêng-đỏ một cụm từ trong tiêu đề */
.page-title em, .section-title em, .tv-hero-title em, .pg-head h1 em,
.ndla-page .pg-head .page-title em, .ndla-page .section-title em {
  font-size: inherit;
  letter-spacing: inherit;
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}
.pg-head .tv-hero-label {
  display: inline-block;
  margin: 0 0 10px;
  padding: 0;
  background: none;
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 500;
  border-radius: 0;
}

/* Tiêu đề mục: bỏ số thứ tự 01–09 (các mục không phải các bước tuần tự) */
.section-title .num { display: none; }
.ndla-page .section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ndla-page .section-sub { color: var(--ink-mute); font-size: 15px; }

/* 3. ĐỒNG BỘ THẺ & CHI TIẾT ---------------------------------------------- */

/* Thẻ, khối: nền trắng, viền ấm mảnh, bo 8px */
.ndla-page:not(.hm) :is(.info-card, .calendar-block, .summary, .yh-side, .overview-card,
  .month-block, .day-card, .mini-cal-card, .tv-rank-row, .tv-card, .tvct-card,
  .settings-bar, .legend-bar, .holidays-table-wrap, .weeks-table-wrap, .months-table-wrap) {
  background-color: var(--paper-card);
  border-color: var(--sm-line);
}

/* ---- Lịch ngày: bỏ 7 bộ màu theo thứ, dùng tờ lịch trắng + số đỏ son ---- */
.ndla-page .cb-main[data-weekday] {
  background: var(--paper-light);
  border-color: var(--sm-line);
}
.ndla-page .cb-main[data-weekday] .cb-big-day { color: var(--vermilion); text-shadow: none; }
.ndla-page .cb-main[data-weekday] .cb-weekday { color: var(--ink); }
.ndla-page .cb-main[data-weekday="0"] .cb-weekday { color: var(--vermilion); }

/* Tranh phong cảnh theo thứ: CN đào xuân, T2 đồi chè, T3 biển, T4 rừng trúc,
   T5 đầm sen, T6 núi đá hoàng hôn, T7 đồng lúa chín. Mờ dần xuống phần nội dung. */
.ndla-page .cb-main[data-weekday] { isolation: isolate; }
.ndla-page .cb-main[data-weekday]::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0;
  height: 620px; max-height: 100%;
  background: center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
  pointer-events: none;
}
/* Lớp trên cùng: lớp giấy mờ giữ chữ dễ đọc. Ảnh thật thu-N.jpg nằm trên tranh vẽ thu-N.svg:
   có file .jpg thì hiện ảnh thật, chưa có thì tự lộ tranh vẽ bên dưới. */
.ndla-page .cb-main[data-weekday] { --cb-wash: linear-gradient(180deg, rgba(251,247,239,.82) 0, rgba(251,247,239,.5) 32%, rgba(251,247,239,.18) 62%, rgba(251,247,239,.55) 85%, rgba(251,247,239,.7) 100%); }
.ndla-page .cb-main[data-weekday] .cb-status-pills .pill:not(.hoang):not(.hac) { background-color: rgba(255, 252, 245, .92); }
/* Ô sự kiện: lót nền giấy đặc dưới lớp màu nhạt để đọc được trên ảnh tối */
.ndla-page .cb-main[data-weekday] .cb-event { position: relative; isolation: isolate; }
.ndla-page .cb-main[data-weekday] .cb-event::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(255, 252, 245, .93); }
/* Thứ Ba: đẩy bóng người gánh hàng sang phải để không nằm sau số ngày */
.ndla-page .cb-main[data-weekday="2"]::before { background-position: center, 8% bottom, center bottom; }
.ndla-page .cb-main[data-weekday="0"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-0.webp), url(../img/thien-nhien/thu-0.svg); }
.ndla-page .cb-main[data-weekday="1"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-1.webp), url(../img/thien-nhien/thu-1.svg); }
.ndla-page .cb-main[data-weekday="2"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-2.webp), url(../img/thien-nhien/thu-2.svg); }
.ndla-page .cb-main[data-weekday="3"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-3.webp), url(../img/thien-nhien/thu-3.svg); }
.ndla-page .cb-main[data-weekday="4"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-4.webp), url(../img/thien-nhien/thu-4.svg); }
.ndla-page .cb-main[data-weekday="5"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-5.webp), url(../img/thien-nhien/thu-5.svg); }
.ndla-page .cb-main[data-weekday="6"]::before { background-image: var(--cb-wash), url(../img/thien-nhien/thu-6.webp), url(../img/thien-nhien/thu-6.svg); }

/* ---- Lịch năm: màu ô theo đánh giá giống trang chủ (xanh ngọc = tốt) ---- */
.ndla-page .yh-main {
  background:
    radial-gradient(ellipse 60% 90% at 90% 10%, rgba(240, 200, 115, 0.12), transparent 60%),
    linear-gradient(160deg, var(--sm-lacquer) 0%, var(--sm-lacquer-2) 100%);
  border-radius: 8px;
}
.mn-cell.r-vg { background: #E3F1EA; }
.mn-cell.r-g  { background: #F1F8F4; }
.mn-cell.r-b  { background: #FBF0E0; }
.mn-cell.r-vb { background: #ECE6DF; }
.mn-cell.r-vb .duong { color: var(--hac); }
.legend-bar .sw.r-vg { background: #E3F1EA; border-color: #B9D9C8; }
.legend-bar .sw.r-g  { background: #F1F8F4; border-color: #CFE5D9; }
.legend-bar .sw.r-n  { background: #FFFFFF; border-color: var(--sm-line); }
.legend-bar .sw.r-b  { background: #FBF0E0; border-color: #EBCFA6; }
.legend-bar .sw.r-vb { background: #ECE6DF; border-color: #D3C8BC; }
.month-head {
  background: linear-gradient(160deg, var(--sm-lacquer), var(--sm-lacquer-2));
}

/* ---- Lịch tuần: ngày tốt dùng nền ngọc nhạt ---- */
.dc-left.tot { background: linear-gradient(180deg, var(--sm-jade-tint), var(--paper-card)); }
.dc-left.xau { background: linear-gradient(180deg, #F3EEE8, var(--paper-card)); }

/* ---- Tử vi: một bảng màu điểm thống nhất ---- */
.ndla-page .sb-vg { background: #1E6B50; color: #fff; }
.ndla-page .sb-g  { background: var(--sm-jade-tint); color: #14513C; }
.ndla-page .sb-ok { background: #EFE9DE; color: #5E5048; }
.ndla-page .sb-w  { background: #FBEBD6; color: #8A4B0F; }
.ndla-page .sb-b  { background: var(--sm-red-tint); color: #8E1B12; }
.ndla-page .tv-big-score.sb-vg, .ndla-page .tvct-big-score.sb-vg { color: #1E6B50; background: none; }
.ndla-page .tv-big-score.sb-g,  .ndla-page .tvct-big-score.sb-g  { color: #14513C; background: none; }
.ndla-page .tv-big-score.sb-ok, .ndla-page .tvct-big-score.sb-ok { color: #5E5048; background: none; }
.ndla-page .tv-big-score.sb-w,  .ndla-page .tvct-big-score.sb-w  { color: #8A4B0F; background: none; }
.ndla-page .tv-big-score.sb-b,  .ndla-page .tvct-big-score.sb-b  { color: #8E1B12; background: none; }
/* 4 lĩnh vực: 4 màu cùng tông ấm, phân biệt được cả khi mù màu đỏ-lục nhờ độ sáng khác nhau */
.ndla-page .bar-cv { background: #2F5D8A; }
.ndla-page .bar-tl { background: #C99A2E; }
.ndla-page .bar-tc { background: #B4475A; }
.ndla-page .bar-sk { background: #1E6B50; }
.ndla-page .tv-rank-bar { background: linear-gradient(90deg, #C99A2E, #E2B85C); }

/* Tử vi hero: dải đầu trang + khối thông tin ngày bên dưới */
.ndla-page-tu-vi .pg-head.tv-hero { text-align: left; }
.ndla-page-tu-vi .tv-day-info { margin-top: -8px; margin-bottom: 28px; }

/* Nút, tab tử vi chi tiết theo màu chung */
.tvct-tab--active, .tvct-tab--active:hover,
.tvct-sign-btn--active, .tvct-sign-btn--active:hover,
.tvct-bn-active { background: var(--vermilion); border-color: var(--vermilion); color: #fff; }

/* 4. RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 640px) {
  .ndla-page:not(.hm) > :not(.pg-head):not(script):not(style),
  .pg-head-in { width: calc(100% - 32px); }
  .ndla-page .pg-head { padding: 18px 0 26px; margin-bottom: 24px; }
  .pg-head .breadcrumb { font-size: 13px; margin-bottom: 14px; }
  /* Tab cuộn ngang 1 hàng thay vì xuống 2–3 dòng */
  .pg-head .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -16px 18px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .pg-head .subnav::-webkit-scrollbar { display: none; }
  .pg-head .subnav a { flex-shrink: 0; min-height: 40px; }
  .pg-head .page-title, .pg-head .tv-hero-title { font-size: 26px; }
  .pg-head .page-subtitle, .pg-head .tv-hero-sub { font-size: 15px; }
}

/* 5. TỬ VI — tinh chỉnh sau khi rà ảnh --------------------------------- */
/* Khối thông tin ngày: canh giữa theo lưới, nền trắng */
.ndla-page-tu-vi .tv-day-info {
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: var(--paper-card);
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  box-shadow: var(--sm-shadow);
  text-align: left;
}
.tv-day-direction strong { color: var(--gold-text); }
.tv-section-title em, .tvct-section-title em { color: inherit; font-size: inherit; }

/* Thẻ tử vi chi tiết: nền trắng tách khỏi nền trang */
.ndla-page .tvct-section,
.ndla-page .tvct-sign-nav-wrap {
  background: var(--paper-card);
  border-color: var(--sm-line);
  border-radius: 8px;
  box-shadow: var(--sm-shadow);
}
.ndla-page .tvct-tab { background: var(--paper-card); border-color: var(--sm-line); color: var(--ink-soft); }
.ndla-page .tvct-tab:hover { border-color: var(--vermilion); color: var(--vermilion); }

/* Tên tuổi đã nằm trong H1 → tiêu đề lặp trong hero chỉ còn là nhãn nhỏ */
.ndla-page .tvct-hero-title {
  font-size: 20px;
  color: var(--ink);
}

/* Ô chọn 12 con giáp: to hơn, chạm được */
.ndla-page .tvct-sign-btn {
  min-width: 56px;
  min-height: 56px;
  padding: 8px 10px;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-soft);
}
.ndla-page .tvct-sign-btn .ndla-seal { font-size: 22px; }

/* 6. TỬ VI — bảng xếp hạng bấm được + thông tin bổ sung ------------------ */
a.tv-rank-row {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
a.tv-rank-row:hover { border-color: var(--vermilion); background: var(--sm-red-tint); color: var(--ink); }
a.tv-rank-row:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 2px; }

/* Thẻ đích: chừa chỗ cho header dính, nháy viền khi được chọn */
.tv-card { scroll-margin-top: 92px; }
.tv-card:focus { outline: none; }
.tv-card.is-flash { animation: tvFlash 1.6s ease-out; }
@keyframes tvFlash {
  0%, 30% { box-shadow: 0 0 0 3px var(--vermilion), var(--sm-shadow); }
  100%    { box-shadow: 0 0 0 0 transparent, var(--sm-shadow); }
}

.tv-rel-text {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.tv-facts, .tv-day-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 16px 0;
}
.tv-facts > div, .tv-day-facts > div { min-width: 0; }
.tv-facts dt, .tv-day-facts dt { font-size: 12px; font-weight: 600; color: var(--ink-mute); margin-bottom: 2px; }
.tv-facts dd, .tv-day-facts dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.tv-day-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--sm-line-soft); }
.tv-day-facts .tv-day-hours { grid-column: 1 / -1; }
.tv-day-hours dd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tv-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sm-jade-tint);
  color: #14513C;
  font-size: 13px; font-weight: 700;
}
.tv-chip em { font-style: normal; font-weight: 400; color: var(--ink-mute); font-size: 12px; }

.tv-avoid-hour { margin-top: 8px; font-size: 13px; color: var(--ink-mute); }
.tv-avoid-hour strong { color: #8E1B12; }
.tv-muted { font-size: 13px; color: var(--ink-mute); }

.tv-dodont {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.tv-dodont ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.tv-dodont li { position: relative; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.tv-do li::before   { content: "✓"; position: absolute; left: 0; color: var(--jade); font-weight: 700; }
.tv-dont li::before { content: "×"; position: absolute; left: 1px; color: #8E1B12; font-weight: 700; }
.tv-do, .tv-dont { padding: 12px; border-radius: 6px; }
.tv-do   { background: #F3FAF6; }
.tv-dont { background: #FDF5F3; }

/* Hỏi đáp */
.tv-faq details {
  background: var(--paper-card);
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 0 18px;
}
.tv-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  position: relative;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.tv-faq summary::-webkit-details-marker { display: none; }
.tv-faq summary::after {
  content: "";
  position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--vermilion);
  border-bottom: 2px solid var(--vermilion);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.tv-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.tv-faq details p { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); max-width: 75ch; }

@media (max-width: 640px) {
  .tv-day-facts { grid-template-columns: 1fr 1fr; }
  .tv-dodont { grid-template-columns: 1fr; }
}

/* 7. TỬ VI THEO TUỔI — lưu ý trong ngày, vận trình 7 ngày, hồ sơ tuổi ------ */
.tvct-notes-hours { margin-bottom: 6px; }
.tvct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tvct-facts { margin-top: 18px; }

/* Biểu đồ 7 ngày */
.tvct-week-sum { margin: 0 0 18px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }
.tvct-week-sum strong { color: var(--ink); }
.tvct-week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.tvct-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
}
.tvct-week-day.is-today { background: var(--paper); }
.tvct-week-day.is-best { border-color: var(--jade); background: #F3FAF6; }
.tvct-week-score { font: 700 16px/1 var(--font-display); color: var(--ink); }
.tvct-week-bar {
  position: relative;
  width: 100%;
  max-width: 34px;
  height: 120px;
  border-radius: 6px;
  background: var(--sm-line-soft);
  overflow: hidden;
}
.tvct-week-bar > span { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px 6px 0 0; }
.tvct-week-bar .sb-vg { background: #1E6B50; }
.tvct-week-bar .sb-g  { background: #6FB394; }
.tvct-week-bar .sb-ok { background: #C9BFB2; }
.tvct-week-bar .sb-w  { background: #C98A2E; }
.tvct-week-bar .sb-b  { background: #B4475A; }
.tvct-week-wd { font-size: 13px; font-weight: 700; color: var(--ink); }
.tvct-week-day.is-best .tvct-week-wd { color: var(--jade); }
.tvct-week-date { font-size: 12px; color: var(--ink-mute); }
.tvct-week-cc { font-size: 12px; color: var(--ink-mute); line-height: 1.3; }

/* Xếp hạng năm sinh → link tới chi tiết */
a.tvct-by-row { color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
a.tvct-by-row:hover { border-color: var(--vermilion); background: var(--sm-red-tint); color: var(--ink); }
a.tvct-by-row:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 2px; }
.tvct-birth-section:focus { outline: none; }
.tvct-birth-section.is-flash { animation: tvFlash 1.6s ease-out; border-radius: 8px; }

/* Hồ sơ tuổi */
.tvct-profile-intro { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.tvct-profile-intro .ndla-seal { font-size: 52px; flex-shrink: 0; }
.tvct-profile-intro p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--ink-soft); max-width: 70ch; }
.tvct-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0 0 22px;
  padding: 16px 0;
  border-top: 1px solid var(--sm-line-soft);
  border-bottom: 1px solid var(--sm-line-soft);
}
.tvct-profile-facts dt { font-size: 12px; font-weight: 600; color: var(--ink-mute); margin-bottom: 2px; }
.tvct-profile-facts dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.tvct-profile-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.tvct-profile-cols h3 { font: 700 16px/1.3 var(--font-display); color: var(--ink); margin: 0 0 8px; }
.tvct-profile-cols ul { list-style: none; margin: 0; padding: 0; }
.tvct-list-good li, .tvct-list-warn li { position: relative; padding-left: 20px; margin-bottom: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.tvct-list-good li::before { content: "✓"; position: absolute; left: 0; color: var(--jade); font-weight: 700; }
.tvct-list-warn li::before { content: "!"; position: absolute; left: 4px; color: #8A4B0F; font-weight: 800; }
.tvct-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tvct-tags li { padding: 5px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--sm-line); font-size: 14px; color: var(--ink); }
.tvct-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-mute); }
.tvct-section.tv-faq { background: none; border: 0; box-shadow: none; padding-left: 0; padding-right: 0; }

@media (max-width: 640px) {
  .tvct-week { gap: 3px; }
  .tvct-week-day { padding: 8px 1px; }
  .tvct-week-bar { height: 90px; }
  .tvct-week-cc { display: none; }
  .tvct-profile-facts { grid-template-columns: 1fr 1fr; }
  .tvct-profile-cols { grid-template-columns: 1fr; }
  .tvct-profile-intro .ndla-seal { font-size: 40px; }
}

/* 8. LỊCH NGÀY — "Các ngày sắp tới": thẻ cao vừa nội dung
   (#upcoming-list có min-height giữ chỗ chống nhảy layout → không kéo giãn hàng) */
#upcoming-list { align-content: start; }
.ndla-page .up-item { background: var(--paper-card); border-color: var(--sm-line); min-height: 60px; }
.ndla-page .up-item:hover { background: var(--sm-red-tint); color: var(--ink); border-color: var(--vermilion); }
.ndla-page .up-item:hover .d { background: var(--vermilion); color: #fff; }

/* 9. LỊCH NGÀY — đánh giá tổng quan, bảng việc, năm sinh, ghi chú --------- */
.day-score {
  background: var(--paper-card);
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  box-shadow: var(--sm-shadow);
  padding: 22px 24px;
}
.ds-head { display: flex; align-items: center; gap: 22px; }
.ds-score {
  flex-shrink: 0;
  display: flex; align-items: baseline; justify-content: center;
  min-width: 118px;
  padding: 14px 16px;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-display);
}
.ds-num { font-size: 52px; font-weight: 800; line-height: 1; }
.ds-max { font-size: 18px; font-weight: 700; opacity: .85; margin-left: 2px; }
.ds-score.ds-vg { background: #1E6B50; }
.ds-score.ds-g  { background: #3E8A6A; }
.ds-score.ds-n  { background: #6B5D52; }
.ds-score.ds-b  { background: #A0541A; }
.ds-score.ds-vb { background: #8E1B12; }
.ds-label { font: 800 26px/1.2 var(--font-display); margin-bottom: 4px; }
.ds-label.ds-vg, .ds-label.ds-g { color: #14513C; }
.ds-label.ds-n { color: var(--ink); }
.ds-label.ds-b { color: #8A4B0F; }
.ds-label.ds-vb { color: #8E1B12; }
.ds-verdict p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); max-width: 70ch; }
.ds-warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #FDF1EF;
  border: 1px solid #F1C9C2;
  font-size: 14.5px; line-height: 1.6; color: #6E1B14;
}
.ds-factors {
  list-style: none; margin: 18px 0 0; padding: 16px 0 0;
  border-top: 1px solid var(--sm-line-soft);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px;
}
.ds-factors li { display: flex; gap: 10px; align-items: flex-start; }
.ds-ico {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; margin-top: 1px;
}
.ds-factors .is-ok  .ds-ico { background: #E3F1EA; color: #14513C; }
.ds-factors .is-bad .ds-ico { background: #FBEBD6; color: #8A4B0F; }
.ds-factors strong { display: block; font-size: 15px; color: var(--ink); }
.ds-detail { display: block; font-size: 14px; line-height: 1.55; color: var(--ink-mute); margin-top: 2px; }

/* Bảng việc */
.act-table-title { font: 700 19px/1.3 var(--font-display); color: var(--ink); margin: 26px 0 12px; }
.act-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--paper-card);
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  overflow: hidden;
}
.act-row {
  display: grid;
  grid-template-columns: 220px 104px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--sm-line-soft);
}
.act-row:last-child { border-bottom: 0; }
.act-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.act-verdict {
  justify-self: start;
  padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.act-tot  .act-verdict { background: #1E6B50; color: #fff; }
.act-duoc .act-verdict { background: #EFE9DE; color: #5E5048; }
.act-xau  .act-verdict { background: #FDF1EF; color: #8E1B12; border: 1px solid #F1C9C2; }
.act-why { font-size: 14px; line-height: 1.5; color: var(--ink-mute); }

/* Năm sinh xung / hợp */
.age-years { display: grid; gap: 14px; margin-top: 16px; }
.ay-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.ay-bad .ay-title { color: #8E1B12; }
.ay-good .ay-title { color: #14513C; }
.ay-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ay-chip { padding: 4px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--sm-line); background: var(--paper-card); color: var(--ink); }
.ay-chip em { font-style: normal; font-weight: 400; color: var(--ink-mute); margin-left: 2px; }
.ay-bad .ay-chip { background: #FDF5F3; border-color: #F1C9C2; }
.ay-good .ay-chip { background: #F3FAF6; border-color: #CFE5D9; }

.dir-note, .banh-to-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--paper-card);
  border: 1px solid var(--sm-line);
  font-size: 15px; line-height: 1.65; color: var(--ink-soft);
}

@media (max-width: 768px) {
  .day-score { padding: 18px 16px; }
  .ds-head { gap: 14px; align-items: flex-start; }
  .ds-score { min-width: 92px; padding: 10px 12px; }
  .ds-num { font-size: 40px; }
  .ds-label { font-size: 22px; }
  .ds-verdict p { font-size: 15px; }
  .ds-factors { grid-template-columns: 1fr; }
  .act-row { grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; }
  .act-why { grid-column: 1 / -1; }
}

/* 10. HIỆU NĂNG — bỏ hiệu ứng xuất hiện (opacity 0 → 1) của các khối nội dung chính.
   Speed Index/LCP tính theo lúc nội dung thực sự hiện ra; fadeUp làm chậm 0.3–0.8s. */
.calendar-block, .info-card, .mini-cal-card, .today-card, .cal-card, .gd-card, .conv-card,
.cb-hero-summary { animation: none; }

/* Màu nền đặc dưới gradient — để Lighthouse đo đúng tương phản */
.ndla-page .pg-head { background-color: #5E130F; }
