/* Trang con giáp đã nâng cấp (nhóm con-giap-routes). Mọi class có tiền tố .cgn- */
.cgn-intro p { font-size: 16px; line-height: 1.6; margin-bottom: 6px; }
.cgn-intro p:first-child { font-size: 17px; }

/* Ô kết quả chính */
.cgn-answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 16px; }
.cgn-answers.two { grid-template-columns: repeat(2, 1fr); }
.cgn-answers.four { grid-template-columns: repeat(4, 1fr); }
.cgn-answer { display: block; border: 1px solid #d6e9dd; border-radius: 12px; padding: 12px 10px; text-align: center; background: #f6fbf8; color: inherit; }
a.cgn-answer:hover { text-decoration: none; border-color: #1d7a46; }
.cgn-answer small { display: block; font-size: 12.5px; color: #666; }
.cgn-answer b { display: block; font-size: 20px; color: #1d5f3a; margin: 4px 0 2px; line-height: 1.3; }
.cgn-answer span { display: block; font-size: 13px; color: #555; line-height: 1.45; }
.cgn-num { width: 56px; height: 56px; line-height: 56px; margin: 6px auto; border-radius: 50%; background: #1d7a46; color: #fff; font-size: 20px; font-weight: 700; }
.cgn-num.sm { width: 44px; height: 44px; line-height: 44px; font-size: 16px; }
.cgn-answer.gold { border-color: #e6c35c; background: #fffaf0; }
.cgn-answer.silver { border-color: #c9ced6; background: #f8f9fb; }
.cgn-answer.bronze { border-color: #ddb48f; background: #fdf6f0; }
.cgn-rank { display: inline-block; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; background: #1d7a46; }
.gold .cgn-rank, .cgn-rank.gold { background: #d4a72c; }
.silver .cgn-rank, .cgn-rank.silver { background: #9aa3ae; }
.bronze .cgn-rank, .cgn-rank.bronze { background: #b9773f; }

/* Bảng nhãn - giá trị */
.cgn-info { border: 1px solid #eee; border-radius: 12px; overflow: hidden; margin: 0 0 20px; }
.cgn-info-row { display: flex; padding: 9px 14px; border-bottom: 1px solid #f0f0f0; }
.cgn-info-row:last-child { border-bottom: 0; }
.cgn-info-row:nth-child(odd) { background: #fafafa; }
.cgn-info-label { flex: 0 0 34%; color: #666; padding-right: 10px; }
.cgn-info-value { flex: 1; font-weight: 500; }

/* Lưới thẻ nhỏ (12 con giáp, 12 tháng...) */
.cgn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 20px; }
.cgn-grid.six { grid-template-columns: repeat(6, 1fr); }
.cgn-grid.three { grid-template-columns: repeat(3, 1fr); }
.cgn-tile { display: block; border: 1px solid #e8e8e8; border-radius: 12px; padding: 10px; background: #fff; color: inherit; text-align: center; }
a.cgn-tile:hover { text-decoration: none; border-color: #1d7a46; }
.cgn-tile img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-bottom: 4px; }
.cgn-tile b { display: block; color: #1d5f3a; font-size: 15px; }
.cgn-tile strong { display: block; font-size: 17px; color: #1d7a46; margin: 2px 0; }
.cgn-tile span { display: block; font-size: 12.5px; color: #555; line-height: 1.4; }
.cgn-tile.current { border-color: #1d7a46; background: #f4faf6; }
.cgn-bar { height: 6px; border-radius: 3px; background: #eee; margin: 6px 0; overflow: hidden; }
.cgn-bar i { display: block; height: 100%; border-radius: 3px; background: #1d7a46; }
.cgn-tile.mid .cgn-bar i, .cgn-card.mid .cgn-bar i { background: #d4a72c; }
.cgn-tile.low .cgn-bar i, .cgn-card.low .cgn-bar i { background: #e08a80; }

/* Thẻ chi tiết */
.cgn-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 8px 0 20px; }
.cgn-cards.one { grid-template-columns: 1fr; }
.cgn-card { border: 1px solid #e8e8e8; border-radius: 12px; padding: 12px 14px; background: #fff; margin-bottom: 10px; }
.cgn-cards .cgn-card { margin-bottom: 0; }
.cgn-card.top, .cgn-card.good { border-color: #b9dcc6; }
.cgn-card.low, .cgn-card.bad { border-color: #e9b4ad; }
.cgn-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.cgn-card-head h3 { margin: 0; font-size: 16px; color: #1d5f3a; line-height: 1.35; }
.cgn-card-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.cgn-card p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.55; color: #444; }
.cgn-card p:last-child { margin-bottom: 0; }
.cgn-card ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.cgn-tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef8f1; color: #1d7a46; white-space: nowrap; }
.cgn-tag.warn { background: #fdf3f2; color: #b03a2e; }
.cgn-tag.mid { background: #fbf5e3; color: #8a6d1d; }

/* Ngũ hành */
.el-moc { color: #2e7d32 !important; } .el-hoa { color: #c62828 !important; } .el-tho { color: #8d6e2f !important; }
.el-kim { color: #6b7280 !important; } .el-thuy { color: #1565c0 !important; }
.cgn-el { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; }

/* Khung ghi chú / cảnh báo */
.cgn-box { border-left: 4px solid #1d7a46; background: #f6fbf8; border-radius: 0 10px 10px 0; padding: 10px 14px; margin-bottom: 14px; }
.cgn-box p { margin: 0 0 6px; } .cgn-box p:last-child { margin: 0; }
.cgn-box.warn { border-left-color: #e08a80; background: #fdf3f2; }
.cgn-list { margin: 0 0 20px; padding-left: 20px; }
.cgn-list li { margin-bottom: 6px; line-height: 1.55; }

/* Bảng */
.cgn-table { margin-bottom: 20px; }
.cgn-table table { margin-bottom: 0; }
.cgn-table th { background: #f4faf6; color: #1d5f3a; white-space: nowrap; }
.cgn-table tr.current td { background: #f4faf6; font-weight: 600; }

/* FAQ */
.cgn-faq-item { border: 1px solid #e8e8e8; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.cgn-faq-item[open] { border-color: #b9dcc6; }
.cgn-faq-item summary { list-style: none; cursor: pointer; padding: 12px 44px 12px 14px; position: relative; }
.cgn-faq-item summary::-webkit-details-marker { display: none; }
.cgn-faq-item summary::after { content: '+'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; background: #eef8f1; color: #1d7a46; font-weight: 700; }
.cgn-faq-item[open] summary { background: #f4faf6; }
.cgn-faq-item[open] summary::after { content: '\2212'; }
.cgn-faq-item summary h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1d5f3a; line-height: 1.4; }
.cgn-faq-item p { margin: 0; padding: 10px 14px 14px; }

/* Link, chọn, chuyển */
.cgn-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cgn-links a { padding: 6px 12px; border: 1px solid #d6e9dd; border-radius: 16px; background: #f6fbf8; color: #1d7a46; font-size: 13.5px; }
.cgn-links a.current { background: #1d7a46; color: #fff; border-color: #1d7a46; }
.cgn-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #1d7a46; border-radius: 18px; overflow: hidden; margin: 0 0 12px; }
.cgn-seg a { padding: 5px 14px; color: #1d7a46; font-size: 13.5px; border-right: 1px solid #1d7a46; }
.cgn-seg a:last-child { border-right: 0; }
.cgn-seg a.active { background: #1d7a46; color: #fff; }
.cgn-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.cgn-pick select { width: auto; min-width: 140px; max-width: 100%; }
.cgn-pick a, .cgn-pick button { padding: 6px 16px; border-radius: 18px; background: #1d7a46; color: #fff; cursor: pointer; border: 0; }
.cgn-pick .alert { flex: 0 0 100%; margin: 0; }

@media (max-width: 767px) {
  .cgn-answers, .cgn-answers.four { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cgn-answers.three-sm { grid-template-columns: repeat(3, 1fr); }
  .cgn-answers:not(.three-sm) > :last-child:nth-child(odd) { grid-column: span 2; }
  .cgn-table th, .cgn-table td { white-space: normal !important; word-break: normal; }
  .cgn-table th, .cgn-table td { font-size: 13.5px; padding: 6px !important; }
  .cgn-answer { padding: 10px 6px; }
  .cgn-answer b { font-size: 17px; }
  .cgn-num { width: 46px; height: 46px; line-height: 46px; font-size: 17px; }
  .cgn-info-row { flex-direction: column; }
  .cgn-info-label { font-size: 13px; }
  .cgn-grid, .cgn-grid.six { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cgn-grid.three { grid-template-columns: repeat(2, 1fr); }
  .cgn-tile { padding: 8px 4px; }
  .cgn-tile span { font-size: 12px; }
  .cgn-cards { grid-template-columns: 1fr; }
  .cgn-card { padding: 10px 12px; }
  .cgn-card p { font-size: 14px; }
}
