/* ===== Xem hướng giường ngủ ===== */

.xhg-wrap { font-family: var(--tvq-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif); }

/* ----- Form mục đích ----- */
.xhg-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.xhg-goal-card {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border: 1.5px solid #d8d3c4;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.xhg-goal-card:hover { border-color: #b8860b; }
.xhg-goal-card.is-active,
.xhg-goal-card:has(input:checked) {
    border-color: #7b1414;
    background: #fdf6f6;
}
.xhg-goal-card input { position: absolute; opacity: 0; pointer-events: none; }
.xhg-goal-title { font-weight: 600; color: #2b2b2b; font-size: 14px; }
.xhg-goal-cung  { font-size: 12px; color: #7b1414; margin-top: 3px; font-style: italic; }

/* ----- Header kết quả ----- */
.xhg-header {
    background: linear-gradient(135deg, #fdf6f6 0%, #faf3e7 100%);
    border: 1.5px solid #e8d8a8;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.xhg-id {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    font-size: 15px;
    color: #2b2b2b;
}
.xhg-id strong { color: #7b1414; }
.xhg-group-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.xhg-group-east { background: #2e7d4a; }
.xhg-group-west { background: #b8860b; }

/* ----- Hướng chính ----- */
.xhg-primary {
    background: #fff;
    border: 2px solid #7b1414;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(123, 20, 20, 0.08);
}
.xhg-primary-badge {
    display: inline-block;
    background: #7b1414;
    color: #fff;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}
.xhg-primary-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px 24px;
    align-items: center;
}
.xhg-primary-dir {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 20px;
    border-right: 1px dashed #d8d3c4;
}
.xhg-primary-arrow { font-size: 36px; line-height: 1; }
.xhg-primary-dirlabel {
    font-size: 22px;
    font-weight: 700;
    color: #7b1414;
    line-height: 1.2;
}
.xhg-primary-degree {
    font-size: 12px;
    color: #6b6b6b;
    margin-top: 2px;
}
.xhg-primary-cung-label {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d4a;
    margin-bottom: 4px;
}
.xhg-primary-cung-meaning {
    font-size: 15.5px;
    color: #2b2b2b;
    line-height: 1.5;
}
.xhg-primary-goal {
    font-size: 12px;
    color: #b8860b;
    margin-top: 4px;
    font-style: italic;
}
.xhg-summary {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #f0e8d8;
    font-size: 15.5px;
    color: #2b2b2b;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .xhg-primary-body { grid-template-columns: 1fr; }
    .xhg-primary-dir {
        border-right: none;
        border-bottom: 1px dashed #d8d3c4;
        padding-right: 0;
        padding-bottom: 12px;
    }
}

/* ----- Section chung ----- */
.xhg-section {
    margin-bottom: 22px;
}
.xhg-section h3 {
    margin: 0 0 6px;
    color: #7b1414;
    font-size: 18px;
}
.xhg-section > p {
    margin: 0 0 12px;
    color: #4b4b4b;
    font-size: 15.5px;
    line-height: 1.55;
}

/* ----- Lưới hướng tốt/xấu ----- */
.xhg-dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.xhg-dir-card {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
}
.xhg-dir-good .xhg-dir-card {
    border-color: #c8e2c8;
    background: #f4faf4;
}
.xhg-dir-bad .xhg-dir-card {
    border-color: #e8c8c8;
    background: #fdf4f4;
}
.xhg-dir-card.xhg-bad-critical { border-color: #c33; background: #fdebeb; }
.xhg-dir-card.xhg-bad-high     { border-color: #d66; background: #fdf1f1; }
.xhg-dir-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    gap: 8px;
    flex-wrap: wrap;
}
.xhg-dir-name {
    font-size: 15px;
    font-weight: 700;
    color: #2b2b2b;
}
.xhg-dir-cung {
    font-size: 12px;
    font-weight: 600;
    color: #7b1414;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #e0d8c0;
    border-radius: 10px;
}
.xhg-dir-bad .xhg-dir-cung { color: #c33; border-color: #e8c8c8; }
.xhg-dir-degree {
    font-size: 11px;
    color: #6b6b6b;
    margin-bottom: 4px;
    font-family: var(--tvq-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, 'Roboto Mono', monospace);
}
.xhg-dir-meaning {
    font-size: 14.5px;
    color: #3b3b3b;
    line-height: 1.45;
}

/* ----- Kiêng kỵ ----- */
.xhg-taboo-list {
    list-style: none;
    counter-reset: taboo;
    margin: 0;
    padding: 0;
}
.xhg-taboo-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #b8860b;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.xhg-taboo-item.xhg-taboo-critical { border-left-color: #c33; background: #fdf6f6; }
.xhg-taboo-item.xhg-taboo-high     { border-left-color: #d66; }
.xhg-taboo-item.xhg-taboo-medium   { border-left-color: #b8860b; }
.xhg-taboo-item.xhg-taboo-low      { border-left-color: #6b8e23; }
.xhg-taboo-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.xhg-taboo-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #7b1414;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}
.xhg-taboo-title {
    color: #2b2b2b;
    font-size: 15px;
    flex: 1;
    min-width: 200px;
}
.xhg-taboo-sev {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}
.xhg-taboo-sev-critical { background: #c33; }
.xhg-taboo-sev-high     { background: #d66; }
.xhg-taboo-sev-medium   { background: #b8860b; }
.xhg-taboo-sev-low      { background: #6b8e23; }
.xhg-taboo-detail {
    margin: 0;
    padding-left: 34px;
    color: #4b4b4b;
    font-size: 15px;
    line-height: 1.6;
}

/* ----- Phòng vợ chồng ----- */
.xhg-couples {
    background: #faf6f0;
    border: 1px dashed #e0c890;
    border-radius: 6px;
    padding: 14px 18px;
}
.xhg-couples h3 { margin-top: 0; }
.xhg-couples-list {
    margin: 0;
    padding-left: 22px;
}
.xhg-couples-list li {
    margin-bottom: 8px;
    color: #2b2b2b;
    font-size: 15.5px;
    line-height: 1.6;
}
.xhg-couples-list li:last-child { margin-bottom: 0; }
