/* ==========================================================================
   Xem phong thủy (page-templates/template-phong-thuy.php). Dùng chung khung .calc của tinh-chi-phi.css.
   ========================================================================== */
.pt-sub { max-width: 760px; margin: -1rem auto 2rem; text-align: center; color: var(--c-text-muted); }
.pt-sub b { color: var(--c-text); }

/* Gia chủ: năm sinh + giới tính */
.pt-person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; max-width: 520px; }
.pt-gender { margin: 0; grid-template-columns: 1fr 1fr; }
.pt-gender span { min-height: 52px; }

/* Hướng nhà: la bàn 3 × 3 */
.pt-compass { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.pt-dir { position: relative; cursor: pointer; }
.pt-dir input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-dir span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 78px; padding: 8px 4px; border: 1px solid var(--c-border); background: #fff; text-align: center; line-height: 1.3; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.pt-dir b { font-size: 0.95rem; font-weight: 400; }
.pt-dir small { font-size: 0.74rem; color: var(--c-text-muted); }
.pt-dir span.is-cat b, .pt-dir span.is-cat small { font-weight: 600; color: var(--c-text); }
.pt-dir span.is-cat { border-color: #b3a796; }
.pt-dir:hover span { border-color: var(--c-primary); }
.pt-dir input:checked + span { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.pt-dir input:checked + span small, .pt-dir input:checked + span b { color: #fff; }
.pt-dir input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.pt-compass__center { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 84px; height: 84px; place-self: center; border-radius: 50%; background: var(--c-bg-alt); text-align: center; line-height: 1.25; }
.section:not(.section--alt) .calc__steps .pt-compass__center { background: #fff; }
.pt-compass__center b { font-size: 1.1rem; }
.pt-compass__center small { font-size: 0.68rem; color: var(--c-text-muted); }
.pt-years .calc-check span::before { display: none; }
.pt-years .calc-check span { padding-left: 18px; }

/* Ô kết quả */
.pt-result__name { margin: 0; font-family: var(--f-heading); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); font-weight: 600; line-height: 1.2; }
.pt-result__name span { display: block; margin-top: 4px; font-size: 1rem; font-weight: 400; font-style: italic; color: rgba(255, 255, 255, 0.7); }
.pt-result__rows > div { grid-template-columns: 1fr; gap: 2px; }
.pt-result__rows dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.58); }
.pt-result__rows dd { white-space: normal; text-align: left; font-size: 1rem; font-variant-numeric: normal; word-spacing: normal; }
.pt-result__rows .is-bad dd { color: #f2b8a8; }
.pt-verdict { margin: 18px 0 22px; padding: 14px 16px; border-left: 2px solid #fff; background: rgba(255, 255, 255, 0.07); font-size: 0.9rem; line-height: 1.6; color: rgba(255, 255, 255, 0.85); }
.pt-verdict b { color: #fff; }
.pt-result .calc-res__btns .btn { text-decoration: none; }

/* 02 Bát trạch */
.pt-bt { display: grid; gap: 28px; align-items: start; }
.pt-wheel { max-width: 420px; width: 100%; margin: 0 auto; }
.pt-wheel svg { width: 100%; height: auto; }
.pt-w { stroke: #fff; stroke-width: 2; }
.pt-w--cat { fill: #2b2b2b; }
.pt-w--hung { fill: #e6ddd1; }
.pt-w--on { stroke: #b3874a; stroke-width: 5; }
.pt-w__dir, .pt-w__cung, .pt-w__sao, .pt-w__q, .pt-w__g, .pt-w__n { font-family: var(--f-body); text-anchor: middle; dominant-baseline: middle; }
.pt-w__dir { font-size: 13px; font-weight: 600; fill: var(--c-text); }
.pt-w__cung { font-size: 11.5px; fill: var(--c-text-muted); }
.pt-w__sao { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; fill: #8a7a66; }
.pt-w__dir.is-cat, .pt-w__cung.is-cat { fill: #fff; }
.pt-w__sao.is-cat { fill: #d8c7a5; }
.pt-w__mid { fill: #fff; stroke: var(--c-border); }
.pt-w__q { font-size: 20px; font-weight: 600; fill: var(--c-text); }
.pt-w__g { font-size: 10.5px; fill: var(--c-text-muted); }
.pt-w__n { font-size: 11px; fill: var(--c-text); }
.pt-wheel figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 0.82rem; color: var(--c-text-muted); }
.pt-key { display: inline-block; width: 14px; height: 14px; margin-left: 6px; vertical-align: middle; }
.pt-key--cat { background: #2b2b2b; }
.pt-key--hung { background: #e6ddd1; }
.pt-key--on { border: 3px solid #b3874a; background: #fff; }
.pt-bt__table { min-width: 0; padding: clamp(16px, 3vw, 28px); background: #fff; }
.pt-table td { font-size: 0.92rem; }
.pt-table td:first-child { width: 22%; }
.pt-table td:nth-child(2) { width: 24%; }
.pt-table tr.is-on td { background: #f7f1e8; }
.pt-tag { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 0.82rem; white-space: nowrap; }
.pt-tag--cat { background: var(--c-primary); color: #fff; }
.pt-tag--hung { border: 1px solid #c4b8aa; color: var(--c-text-muted); }

/* 03 Bố trí phòng */
.pt-rooms { display: grid; gap: 16px; }
.pt-room { position: relative; padding: 26px 24px 22px; background: var(--c-bg-alt); }
.pt-room__num { position: absolute; top: 12px; right: 18px; font-family: var(--f-heading); font-size: 2.6rem; line-height: 1; color: var(--c-num); }
.pt-room h3 { margin: 0 0 6px; padding-right: 50px; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; }
.pt-room__where { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; }
.pt-room p:last-child { margin: 0; font-size: 0.92rem; color: var(--c-text-muted); }

/* 04 Màu sắc */
.pt-colors { display: grid; gap: 16px; }
.pt-color { padding: 22px 24px; background: #fff; }
.pt-color__t { margin: 0 0 12px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-text-muted); }
.pt-color p:last-child { margin-bottom: 0; }
.pt-color--bad { opacity: 0.85; }
.pt-color--bad .pt-sw i { position: relative; }
.pt-color--bad .pt-sw i::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 2px; background: #a3302a; transform: rotate(-35deg); }
.pt-sws { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.pt-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.pt-sw i { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); }

/* 05 Tuổi khởi công */
.pt-han { display: grid; gap: 16px; }
.pt-han__i { padding: 24px; border-top: 3px solid var(--c-primary); background: var(--c-bg-alt); } /* không dùng xanh lá (chỉ có trong logo) */
.pt-han__i.is-bad { border-top-color: #a3302a; }
.pt-han__t { margin: 0; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-muted); }
.pt-han__s { margin: 4px 0 8px; font-family: var(--f-heading); font-size: 1.4rem; font-weight: 600; }
.pt-han__i.is-ok .pt-han__s { color: var(--c-text); }
.pt-han__i.is-bad .pt-han__s { color: #8b1c1c; }
.pt-han__i p:last-child { margin: 0; font-size: 0.92rem; color: var(--c-text-muted); }
.pt-kc-sum { max-width: 860px; margin: 24px auto 0; padding: 18px 22px; border: 1px solid var(--c-primary); text-align: center; line-height: 1.7; }

@media (min-width: 768px) {
	.pt-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pt-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pt-color--wide { grid-column: 1 / -1; }
	.pt-han { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.pt-bt { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 40px; }
	.pt-rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
	.pt-table td { font-size: 0.86rem; }
	.pt-table td:first-child, .pt-table td:nth-child(2) { width: auto; }
}
