/**
 * XEM TUỔI KẾT HÔN (/xem-tuoi-ket-hon/) — giao diện "Lịch cưới" (09/10/2026). Nạp SAU hoptuoi.css (dùng chung khung trang,
 * khung nhập, ô ngày, nút, thẻ bảng tra .ht-*) và dùng lại ô tròn con giáp .sc-chi-b của Xem tuổi sinh con (khai lại ở đây vì
 * sinhcon.css không nạp trên trang này). Phần riêng: chọn nữ / nam, tóm tắt năm đẹp, lịch 10 năm dạng dòng thời gian, thẻ tuổi hợp lấy,
 * lưới 12 con giáp, bảng tra Kim Lâu / Tam Tai / năm âm.
 * Màu chỉ lấy từ biến của cute.css (--theme-*, --boi-pink/mint/butter/sky/apricot/peach, --boi-sticker-ink). Trung tính, không emoji.
 */
body.page-template-page-xem-tuoi-ket-hon .page-header, body.page-template-page-xem-tuoi-ket-hon .nevo-breadcrumb { display: none !important; }

/* ---------- Khung nhập ---------- */
.kh-tool-head { background: linear-gradient(115deg, color-mix(in srgb, var(--boi-peach) 70%, var(--theme-bg-elevated)), color-mix(in srgb, var(--boi-butter) 70%, var(--theme-bg-elevated)) 50%, color-mix(in srgb, var(--boi-mint) 70%, var(--theme-bg-elevated))); padding-top: 30px; }
.kh-person.is-me { --ht-c: var(--boi-pink); }
.kh-person.is-other { --ht-c: var(--boi-sky); border-style: dashed; }
.kh-form.is-nam .kh-person.is-me { --ht-c: var(--boi-sky); }
.kh-form.is-nam .kh-person.is-other { --ht-c: var(--boi-pink); }
.kh-av { width: 72px; height: 72px; }
.kh-mono, .kh .ht-who-giap { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1.3rem/1 var(--boi-font-head); color: var(--boi-sticker-ink); }
.kh .ht-who-giap { font-size: 1.4rem; animation: none; }
.ht-who-av.is-known .kh-mono { opacity: 0; }
.kh-amp { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--theme-bg-elevated);
    border: 2px solid var(--theme-border); box-shadow: var(--boi-card-shadow); font: 900 1.3rem/1 var(--boi-font-head); color: var(--theme-gold-text); }
/* Nữ / Nam: hai nút dạng viên thuốc */
.kh-gt { display: flex; justify-content: center; gap: 8px; margin: 0 0 12px; clear: both; }
.kh-gt-opt { position: relative; cursor: pointer; }
.kh-gt-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kh-gt-opt span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--theme-border); background: var(--theme-bg-elevated);
    font: 800 .92rem/1 var(--boi-font-body); color: var(--theme-text-secondary); transition: border-color .15s, background .15s, color .15s; }
.kh-gt-opt input:checked + span { border-color: var(--theme-gold-text); background: color-mix(in srgb, var(--ht-c) 60%, var(--theme-bg-elevated)); color: var(--theme-text-strong); }
.kh-gt-opt input:focus-visible + span { outline: 3px solid var(--theme-gold-text); outline-offset: 2px; }
.sc-perks li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--theme-gold-text); flex: none; }

/* Ô tròn tên con giáp: nền màu hành của mệnh, chữ nâu */
.sc-chi-b { display: grid; place-items: center; border-radius: 50%; background: var(--el); color: var(--boi-sticker-ink); font: 900 1.05rem/1 var(--boi-font-head); flex: none; }

/* ---------- Tóm tắt ---------- */
.kh-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px 28px; }
.kh-hero:not(:has(.kh-match)) { grid-template-columns: auto minmax(0, 1fr); }
.kh-hero.has-top { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
.kh-sum-top { padding-right: 24px; border-right: 1px dashed var(--theme-border-strong); }
.kh-who { display: flex; align-items: center; gap: 12px; }
.kh-who-p { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; max-width: 170px; }
.kh-who-g { width: 62px; height: 62px; margin-bottom: 4px; font-size: 1.15rem; }
.kh-who-p strong { font: 900 1rem/1.2 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-who-p > span:not(.sc-chi-b) { font-size: .82rem; color: var(--theme-text-soft); }
.kh-who-p small { font-size: .74rem; line-height: 1.35; color: var(--theme-text-soft); }
.kh-amp-s { font: 900 1.4rem/1 var(--boi-font-head); color: var(--theme-gold-text); }
.kh-sum { min-width: 0; padding: 4px 0; }
.kh-sum p { margin: 0; }
.kh-sum-k { font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-gold-text); }
.kh-sum-y { margin-top: 2px !important; font: 900 1.4rem/1.2 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-sum-y strong { font-size: 2.6rem; line-height: 1; }
.kh-sum-y span { margin-left: 6px; color: var(--theme-text-secondary); }
.kh-sum-span { margin-top: 4px !important; font-size: .95rem; line-height: 1.55; color: var(--theme-text-secondary); }
.kh-sum-n { display: inline-block; margin-top: 10px !important; padding: 5px 12px; border-radius: 999px; font-size: .86rem; font-weight: 800; color: var(--boi-sticker-ink); background: var(--boi-mint); }
.kh-match { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 190px; padding: 14px 18px; border-radius: var(--boi-r-lg, 24px);
    background: color-mix(in srgb, var(--boi-butter) 55%, var(--theme-bg-elevated)); text-align: center; }
.kh-match p { margin: 0; }
.kh-match-k { font-size: .8rem; font-weight: 800; color: var(--theme-text-secondary); }
.kh-match-n { color: var(--theme-gold-text); }
.kh-match-n strong { font: 900 2.4rem/1 var(--boi-font-head); }
.kh-match-n span { font-weight: 800; color: var(--theme-text-soft); }
.kh-match-v { font: 900 1rem/1.25 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-match-a { margin-top: 6px; font-size: .84rem; font-weight: 800; color: var(--theme-gold-text); }

/* ---------- Lịch cưới 10 năm: dòng thời gian ---------- */
.kh-cal, .kh-match-list { margin-top: 16px; padding: 22px 24px 20px; border-radius: var(--boi-r-xl, 32px); background: var(--theme-bg-elevated); border: 1px solid var(--theme-border); }
.kh-sec-h { margin: 0 0 10px; font: 900 1.25rem/1.3 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-sec-h small { display: block; margin-top: 2px; font: 600 .86rem/1.4 var(--boi-font-body); color: var(--theme-text-soft); }
.kh-legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; font-weight: 700; color: var(--theme-text-secondary); }
.kh-legend li { display: inline-flex; align-items: center; gap: 6px; }
.kh-legend li::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--kh-t); }
.is-good { --kh-t: var(--boi-mint); }
.is-mid { --kh-t: var(--boi-butter); }
.is-hard { --kh-t: var(--boi-pink); }
.is-off { --kh-t: var(--theme-border); }
.kh-ylist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kh-y { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-radius: var(--boi-r-lg, 22px); overflow: hidden; border: 1px solid var(--theme-border);
    background: var(--theme-bg-elevated); }
.kh-y.is-now { box-shadow: 0 0 0 2px var(--theme-gold-text); }
.kh-y-when { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; text-align: center; background: var(--kh-t); color: var(--boi-sticker-ink); }
.kh-y-when strong { font: 900 1.45rem/1 var(--boi-font-head); }
.kh-y-when span { font-size: .8rem; font-weight: 800; }
.kh-y-when em { margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: .7rem; font-weight: 900; background: var(--theme-bg-elevated); color: var(--theme-gold-text); }
.kh-y-main { min-width: 0; padding: 12px 16px 14px; }
.kh-y-main p { margin: 0; }
.kh-y-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.kh-y-pill { padding: 3px 10px; border-radius: 999px; font: 900 .84rem/1.3 var(--boi-font-head); color: var(--boi-sticker-ink); background: var(--kh-t); }
.kh-y.is-off .kh-y-pill { color: var(--theme-text-secondary); }
.kh-y-span { font-size: .8rem; font-weight: 700; color: var(--theme-text-soft); }
.kh-y-ages { margin-top: 6px !important; font-size: .84rem; font-weight: 700; color: var(--theme-text-secondary); }
.kh-y-text, .kh-y-legal { margin-top: 6px !important; font-size: .9rem; line-height: 1.55; color: var(--theme-text-body); }
.kh-y-legal { color: var(--theme-text-secondary); font-weight: 700; }
.kh-y-flags { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.kh-y-flags li { font-size: .9rem; line-height: 1.5; color: var(--theme-text-body); }
.kh-y-flags b { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 8px; font-size: .78rem; font-weight: 900; color: var(--boi-sticker-ink); background: var(--boi-butter); }
.kh-y-flags li.is-tranh b { background: var(--boi-pink); }
.kh-y-flags li.is-info b { background: var(--theme-surface-2, rgba(0,0,0,.05)); color: var(--theme-text-secondary); border: 1px solid var(--theme-border); }
.kh-y.is-off .kh-y-when { color: var(--theme-text-secondary); }
.kh-cal-note { margin: 14px 0 0; font-size: .88rem; line-height: 1.6; color: var(--theme-text-soft); }

/* ---------- Bạn hợp lấy người tuổi nào ---------- */
.kh-pcards { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* Các tuổi còn lại: dòng gọn, thanh điểm (dạng danh sách các trang top, có thêm con giáp, mệnh, hơn kém) */
.kh-prows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.kh-prow { display: grid; grid-template-columns: auto minmax(0, 1fr) 90px auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--boi-r-md, 18px);
    border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); }
.kh-prow-g { width: 36px; height: 36px; font-size: .82rem; }
.kh-prow-t { min-width: 0; display: flex; flex-direction: column; }
.kh-prow-t strong { font: 900 .95rem/1.25 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-prow-t small { font-size: .74rem; line-height: 1.35; color: var(--theme-text-soft); }
.kh-prow-bar { height: 7px; border-radius: 999px; background: var(--theme-border); overflow: hidden; }
.kh-prow-bar i { display: block; height: 100%; border-radius: inherit; background: var(--kh-t); }
.kh-prow-sc { font-size: .78rem; color: var(--theme-text-soft); white-space: nowrap; text-align: right; }
.kh-prow-sc b { font: 900 1.1rem/1 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-prow-sc small { display: block; font-size: .7rem; }
.kh-prow-a { font-size: .8rem; font-weight: 800; color: var(--theme-gold-text); white-space: nowrap; }
.kh-pcard { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--boi-r-lg, 22px); border: 1px solid var(--theme-border); background: var(--theme-bg-elevated); }
.kh-pcard.is-top { border: 2px solid var(--theme-gold-text); box-shadow: var(--boi-card-shadow); }
.kh-pcard-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.kh-pcard-g { width: 44px; height: 44px; font-size: .95rem; }
.kh-pcard-h strong { display: block; font: 900 1rem/1.25 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-pcard-h div span { display: block; font-size: .76rem; line-height: 1.35; color: var(--theme-text-soft); }
.kh-pcard-sc { font: 900 1.5rem/1 var(--boi-font-head); color: var(--theme-gold-text); }
.kh-pcard-sc small { font-size: .74rem; color: var(--theme-text-soft); }
.kh-pcard-c { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.kh-pcard-c li { position: relative; padding-left: 14px; font-size: .8rem; line-height: 1.45; color: var(--theme-text-secondary); }
.kh-pcard-c li::before { content: ""; position: absolute; left: 0; top: .42em; width: 8px; height: 8px; border-radius: 50%; background: var(--kh-t); }
.kh-pcard-c b { color: var(--theme-text-strong); }
.kh-pcard-a { margin-top: auto; font-size: .84rem; font-weight: 800; color: var(--theme-gold-text); }
.kh-sub-h { margin: 20px 0 10px; font: 900 1.05rem/1.3 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-giap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kh-giap li { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 12px 6px; text-align: center; border-radius: var(--boi-r-md, 18px);
    background: color-mix(in srgb, var(--kh-g) 35%, var(--theme-bg-elevated)); border: 1px solid var(--theme-border); }
.kh-giap .is-hop { --kh-g: var(--boi-mint); }
.kh-giap .is-binh { --kh-g: var(--boi-butter); }
.kh-giap .is-ky { --kh-g: var(--boi-pink); }
.kh-giap strong { font: 900 1.15rem/1.2 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-giap span { font-size: .76rem; color: var(--theme-text-soft); }
.kh-giap em { margin: 4px 0 2px; font-style: normal; font-size: .8rem; font-weight: 900; color: var(--theme-text-strong); }
.kh-giap small { font-size: .72rem; line-height: 1.35; color: var(--theme-text-secondary); }

/* ---------- Bảng tra trong bài ---------- */
.kh-mien { margin: 12px 0 0; padding: 12px 16px; border-radius: var(--boi-r-md, 18px); background: color-mix(in srgb, var(--boi-mint) 40%, var(--theme-bg-elevated)); line-height: 1.6; }
.kh-giap-table td small, .kh-giap-table th small { color: var(--theme-text-soft); font-weight: 600; }
.kh-giap-table td.is-good { background: color-mix(in srgb, var(--boi-mint) 45%, transparent); }
.kh-giap-table td.is-hard { background: color-mix(in srgb, var(--boi-pink) 40%, transparent); }
.kh-span-list { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.kh-span-list li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; text-align: center; border-radius: var(--boi-r-md, 18px);
    background: var(--theme-bg-elevated); border: 1px solid var(--theme-border); }
.kh-span-list strong { font: 900 1.15rem/1.2 var(--boi-font-head); color: var(--theme-text-strong); }
.kh-span-list span { font-size: .8rem; font-weight: 700; color: var(--theme-text-secondary); }
.kh-span-list em { margin-top: 4px; font-style: normal; font-size: .76rem; line-height: 1.4; color: var(--theme-text-soft); }

/* ---------- Nền tối: pastel pha nhẹ vào nền nâu ---------- */
:root:not([data-theme="light"]) .kh-tool-head { background: linear-gradient(115deg, var(--boi-peach), var(--boi-butter) 50%, var(--boi-mint)); }
:root:not([data-theme="light"]) .kh-match { background: color-mix(in srgb, var(--boi-butter) 14%, var(--theme-bg-elevated)); }
:root:not([data-theme="light"]) .kh-giap li { background: color-mix(in srgb, var(--kh-g) 12%, var(--theme-bg-elevated)); }
:root:not([data-theme="light"]) .kh-mien { background: color-mix(in srgb, var(--boi-mint) 14%, var(--theme-bg-elevated)); }
:root:not([data-theme="light"]) .kh-giap-table td.is-good { background: color-mix(in srgb, var(--boi-mint) 14%, transparent); }
:root:not([data-theme="light"]) .kh-giap-table td.is-hard { background: color-mix(in srgb, var(--boi-pink) 14%, transparent); }
:root:not([data-theme="light"]) .kh-gt-opt input:checked + span { background: color-mix(in srgb, var(--ht-c) 18%, var(--theme-bg-elevated)); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
    .kh-pcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kh-giap { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .kh-hero, .kh-hero:not(:has(.kh-match)), .kh-hero.has-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .kh-sum-top { padding-right: 0; border-right: 0; padding-bottom: 14px; border-bottom: 1px dashed var(--theme-border-strong); }
    .kh-prows { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .kh-ylist, .kh-pcards { grid-template-columns: 1fr; } .kh-span-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Điện thoại ---------- */
@media (max-width: 768px) {
    .kh-cal, .kh-match-list { padding: 16px 12px; border-radius: var(--boi-r-lg, 24px); }
    .kh-y { grid-template-columns: 74px minmax(0, 1fr); }
    .kh-y-when strong { font-size: 1.2rem; }
    .kh-y-main { padding: 10px 12px 12px; }
    .kh-sum-y strong { font-size: 2.1rem; }
}
@media (max-width: 560px) {
    /* Dòng tuổi: con giáp | tên + thanh điểm | điểm + Chi tiết */
    .kh-prow { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "g t s" "g b a"; row-gap: 6px; }
    .kh-prow-g { grid-area: g; } .kh-prow-t { grid-area: t; } .kh-prow-bar { grid-area: b; } .kh-prow-sc { grid-area: s; } .kh-prow-a { grid-area: a; justify-self: end; }
    .kh-prow-sc small { display: none; }
    .kh-pcards { grid-template-columns: 1fr; } .kh-giap { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kh-span-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ảnh con giáp trong lưới 12 con giáp + bảng tra */
.kh-giap-img { width: 56px; height: 56px; margin-bottom: 4px; }
.kh-giap-table th .boi-giap { width: 30px; height: 30px; vertical-align: middle; margin-right: 6px; }
