/* Càn Khôn Branding inside Thiên Bàn (#dia-ban) */
.ck-bazi-moc { color: #0f6b28; }
.ck-bazi-hoa { color: #b91c1c; }
.ck-bazi-tho { color: #8a4b00; }
.ck-bazi-kim { color: #4e555e; }
.ck-bazi-thuy { color: #141923; }
/* Shared center presentation: screen, PNG clone and print iframe. */
.thien-ban.is-bazi-mode .thien-ban-top { display: none !important; }
/* Projection rays stay above the center cards without owning interactions. */
.thien-ban.is-bazi-mode .view-con-giap-la-so,
.thien-ban.is-bazi-mode .view-con-giap-la-so-hover { z-index: 1; pointer-events: none; }
.table-la-so.is-bazi-center-mode .cung [class*="khoi-tieu-han-"] { visibility: hidden; }
.ck-thien-ban-bazi-panel[hidden] { display: none; }
.ck-thien-ban-bazi-panel {
  width: 100%; box-sizing: border-box; padding: 4px; overflow-wrap: anywhere; color: #141923; text-align: center;
  font: 13px/1.3 'Roboto Condensed', sans-serif;
}
.ck-bazi-center-summary { text-align: center; font-size: 15px; line-height: 1.3; padding: 6px 3px; background: rgba(20, 25, 35, .035); border-radius: 4px; }
.ck-bazi-center-brand { color: #843b33; font-weight: 700; font-size: 13px; }
.ck-bazi-center-terms { display: none; border-top: 1px solid #b7a789; margin-top: 4px; padding-top: 3px; font-size: 13px; line-height: 1.3; }
.ck-bazi-center-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.ck-bazi-center-pillar { display: grid; grid-template-rows: 18px 18px 24px 24px 48px 18px 32px; min-width: 0; padding: 3px 1px; line-height: 1.2; background: rgba(20, 25, 35, .04); border: 1px solid rgba(20, 25, 35, .1); border-radius: 4px; }
.ck-bazi-center-main { font-weight: 700; font-size: 20px; }
.ck-bazi-center-hidden { display: grid; grid-auto-rows: 16px; align-content: center; font-size: 13px; background: rgba(20, 25, 35, .025); }
.ck-bazi-center-hidden > div { display: grid; grid-template-columns: 28% minmax(0, 1fr); gap: 2px; white-space: nowrap; }
.ck-bazi-center-napam { font-size: 13px; }
.ck-bazi-center-start { border-top: 1px solid #b7a789; margin: 4px 0; padding-top: 3px; font-size: 13px; }
.ck-bazi-center-decades { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); font-size: 12px; line-height: 1.2; gap: 1px; }
.ck-bazi-center-decades > div { display: grid; grid-template-rows: 15px 18px 18px 30px 15px; min-width: 0; padding: 3px 0; border-bottom: 2px solid transparent; background: rgba(20, 25, 35, .025); }
.ck-bazi-center-decades > div > div:first-child { font-size: 12px; white-space: nowrap; }
.ck-bazi-center-decades > div > :nth-child(2),
.ck-bazi-center-decades > div > :nth-child(3) { font-size: 15px; font-weight: 700; }
.ck-bazi-center-decades .is-active { background: #e8dfcb; border-bottom-color: #843b33; }
.ck-bazi-center-seal { text-align: right; margin-top: 4px; }
.logo-dia-ban { width: 80px; height: 80px; }
.ck-chart-qr { display: inline-block; width: 80px; height: 80px; max-width: none; object-fit: contain; vertical-align: top; }
.la-so-den-trang .ck-chart-qr { filter: grayscale(1) brightness(0); }
.la-so-den-trang .ck-thien-ban-bazi-panel,
.la-so-den-trang .ck-thien-ban-bazi-panel span,
.la-so-den-trang .ck-bazi-center-brand { color: #000; }
.la-so-den-trang .ck-bazi-center-decades .is-active { background: #eee; border-bottom-color: #000; }
.ck-thien-ban-brand {
  /* Print loads Bootstrap without the V3 shell: pin only these existing brand tokens. */
  --red: #843b33;
  --gold: #9b7a3c;
  --serif: 'Times New Roman', Times, serif;
}
.ck-thien-ban-brand p {
  color: var(--red, #843b33) !important;
  letter-spacing: normal;
  font-family: 'Roboto Condensed', sans-serif !important;
  font-weight: 600 !important;
}
.ck-thien-ban-domain {
  color: var(--red, #843b33) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
/* Standard center only; Bazi keeps its independent full-width presentation.
   No opaque background: both projection and transformation rays remain above. */
.thien-ban .thien-ban-top { width: calc(100% - 80px); padding: 4px 0; }
.thien-ban-top .ck-thien-ban-brand { font: 600 13px/1.25 'Roboto Condensed', sans-serif; }
.thien-ban-top .ck-thien-ban-brand :is(p, a) { font-size: 13px; line-height: 1.25; }
.thien-ban-top .title-la-so-thien-ban { font: 700 20px/1.2 'Roboto Condensed', sans-serif; letter-spacing: normal; margin-bottom: 8px !important; }
.ck-standard-center-table { table-layout: fixed; text-align: left; }
.ck-standard-center-table td { vertical-align: top; padding: 2px 0; font-size: 15px; line-height: 1.3; }
.ck-standard-center-table p { font-size: inherit; line-height: inherit; }
.ck-standard-center-table .td-title-thien-ban { display: table-cell; width: 84px; padding-right: 4px; margin-top: 0; }
.ck-standard-center-table .txt-thien-ban { font: 400 15px/1.3 'Roboto Condensed', sans-serif; letter-spacing: normal; overflow-wrap: anywhere; }
.ck-standard-center-table .td-title-thien-ban .txt-thien-ban { font-size: 13.5px; font-weight: 500; }
.ck-standard-center-table #name-la-so { font-size: 16px; font-weight: 700; }
.ck-standard-center-table :is(#cuc-la-so, #ban-menh-la-so) { font-weight: 600; }
.ck-standard-center-table .ck-standard-center-relation { display: block; font-size: 13px; font-weight: 400; line-height: 1.3; }
.ck-standard-center-lai-nhan td:last-child .txt-thien-ban { font-weight: 700; }
.ck-standard-center-table .view-list-year-la-so { gap: 6px; }
.ck-standard-center-table .width-item-la-so { width: calc(50% - 3px); min-width: 0; }
.ck-standard-center-table tbody + tbody > tr:first-child > td { border-top: 1px solid rgba(20,25,35,.15); padding-top: 7px; }
.ck-standard-center-table tbody > tr:last-child > td { padding-bottom: 7px; }
.thien-ban-top .logo-dia-ban { position: static; width: auto; height: 80px; margin-top: 3px; text-align: right; }
.la-so-den-trang .ck-thien-ban-brand p,
.la-so-den-trang .ck-thien-ban-domain {
  color: #000 !important;
}

/* WCAG 2.1 AA (>= 4.8:1 on #f1ece3 parchment) five-element star & palace header palette in color mode */
.table-la-so:not(.la-so-den-trang) :is(.text-chinh-chinh, .text-sao-xau-tot, .text-sao-chinh-tinh):is([style*="#ffa000" i], [style*="rgb(255, 160, 0)" i]) {
  color: #8a4b00 !important;
}
.table-la-so:not(.la-so-den-trang) :is(.text-chinh-chinh, .text-sao-xau-tot, .text-sao-chinh-tinh):is([style*="#999999" i], [style*="rgb(153, 153, 153)" i]) {
  color: #4e555e !important;
}
.table-la-so:not(.la-so-den-trang) :is(.text-chinh-chinh, .text-sao-xau-tot, .text-sao-chinh-tinh):is([style*="#ff0000" i], [style*="rgb(255, 0, 0)" i]) {
  color: #b91c1c !important;
}
.table-la-so:not(.la-so-den-trang) :is(.text-chinh-chinh, .text-sao-xau-tot, .text-sao-chinh-tinh):is([style*="#009130" i], [style*="rgb(0, 145, 48)" i]) {
  color: #0f6b28 !important;
}
.table-la-so:not(.la-so-den-trang) :is(.text-chinh-chinh, .text-sao-xau-tot, .text-sao-chinh-tinh):is([style*="#000000" i], [style*="rgb(0, 0, 0)" i]) {
  color: #141923 !important;
}


