/* =========================================================
   Bát Tự Tứ Trụ Ngũ Hành - Frontend Style
   Giao diện tham chiếu Nguhanh.net: nền kem, lưới xanh, chữ xanh đậm.
   ========================================================= */

.nhb-wrapper {
	max-width: 900px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #2b2b2b;
}

/* ---------- Form ---------- */
.nhb-form-box {
	background: #fff;
	border: 1px solid #e4e0d8;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nhb-form-title {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 700;
	color: #26564a;
	text-align: center;
}

.nhb-row {
	margin-bottom: 16px;
}

.nhb-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
	color: #444;
}

.nhb-row input[type="text"],
.nhb-row select {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d6d0c4;
	border-radius: 6px;
	font-size: 14px;
	background: #fbfaf7;
	box-sizing: border-box;
}

.nhb-radio-group {
	display: flex;
	gap: 20px;
}

.nhb-radio {
	display: flex !important;
	align-items: center;
	gap: 6px;
	font-weight: 400 !important;
	cursor: pointer;
}

.nhb-date-group {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.nhb-row-time .nhb-date-group {
	grid-template-columns: repeat(2, 1fr);
}

.nhb-btn-submit {
	width: 100%;
	padding: 12px;
	background: linear-gradient(135deg,#4bbf94,#2f9370);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.nhb-btn-submit:hover {
	opacity: 0.9;
}

.nhb-error {
	margin-top: 12px;
	padding: 10px 12px;
	background: #fdeaea;
	border: 1px solid #f0b8b8;
	border-radius: 6px;
	color: #a12626;
	font-size: 13px;
}

/* ---------- Loading ---------- */
.nhb-loading {
	text-align: center;
	padding: 30px 0;
}

.nhb-spinner {
	width: 34px;
	height: 34px;
	margin: 0 auto 10px;
	border: 4px solid #eadfce;
	border-top-color: #b5581f;
	border-radius: 50%;
	animation: nhb-spin 0.8s linear infinite;
}

@keyframes nhb-spin {
	to { transform: rotate(360deg); }
}

.nhb-loading-text {
	color: #7a2e0e;
	font-size: 14px;
}

/* ---------- Result Chart ---------- */
.nhb-chart {
	--nhb-ink: #071a43;
	--nhb-grid: #65aaf2;
	--nhb-paper: #fff8e9;
	margin: 24px auto 0;
	max-width: 864px;
	background: var(--nhb-paper);
	border: 2px solid #315b99;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	color: var(--nhb-ink);
	overflow: hidden;
}

.nhb-chart-header {
	border-bottom: 3px solid var(--nhb-grid);
	padding: 14px 18px 12px;
	margin-bottom: 0;
	min-height: 92px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: 22px;
}

.nhb-chart, .nhb-chart button, .nhb-template-2, .nhb-template-2 button { font-family: "Noto Serif", serif; }
.nhb-chart-name, .nhb-brand-subtitle, .nhb-daivan-label, .nhb-lieunien-label,
.nhb-row-label, .nhb-daivan-table th, .nhb-lieunien-table th { font-weight: 700; }
.nhb-row-label { text-transform: uppercase; }
.nhb-daivan-info { font-weight: 400; }
.nhb-chart-actions { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-top: 2px solid var(--nhb-grid); }
.nhb-btn-jpg { background: #0b3475; color: #fff; border: 0; border-radius: 3px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.nhb-btn-jpg:hover { background: #164e9d; }
.nhb-save-status { display: none !important; }
.nhb-saved-chart { display: block; width: 100%; height: auto; margin: 0; background: #fff8e9; border: 2px solid #315b99; }
.nhb-image-viewport { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 3vh 3vw; box-sizing: border-box; background: rgba(0,0,0,.86); }
.nhb-image-viewport img { display: block; max-width: 94vw; max-height: 94vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 0 24px rgba(0,0,0,.45); }
.nhb-image-viewport-close { position: absolute; top: 12px; right: 18px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: #071a43; font-size: 30px; line-height: 1; cursor: pointer; }

.nhb-branding { display: flex; align-items: center; gap: 18px; }
.nhb-brand-mark {
	width: 70px; height: 70px; display: grid; place-items: center;
	background: #0c2759; color: #fff8e9; font-size: 34px; font-weight: 800;
	clip-path: polygon(50% 0%, 61% 20%, 84% 16%, 80% 39%, 100% 50%, 80% 61%, 84% 84%, 61% 80%, 50% 100%, 39% 80%, 16% 84%, 20% 61%, 0% 50%, 20% 39%, 16% 16%, 39% 20%);
}
.nhb-brand-logo { width: 70px; height: 70px; object-fit: contain; }
.nhb-brand-url a { color: inherit; text-decoration: none; }

.nhb-chart-name {
	margin: 0 0 10px;
	font-size: 24px;
	line-height: 1.25;
	color: var(--nhb-ink);
	text-align: left;
	font-weight: 800;
}
.nhb-brand-subtitle { font-size: 20px; font-weight: 800; margin-top: 22px; }
.nhb-brand-url { color: #07518f; font-size: 19px; font-weight: 800; margin-top: 4px; }

.nhb-chart-meta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px 28px;
	font-size: 14px;
	font-weight: 600;
}

.nhb-meta-label {
	color: var(--nhb-ink);
	margin-right: 4px;
	font-weight: 800;
}

/* Table: 4 pillars */
.nhb-pillars-table-wrap {
	overflow-x: auto;
	margin: 0 !important;
	padding: 0 !important;
}

.nhb-pillars-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	min-width: 480px;
}

.nhb-pillars-table th,
.nhb-pillars-table td {
	border: 2px solid var(--nhb-grid);
	text-align: center;
	padding: 10px 6px;
	vertical-align: middle;
	font-size: 14px;
	color: var(--nhb-ink);
}

.nhb-pillars-table thead th {
	background: var(--nhb-paper);
	color: var(--nhb-ink);
	font-weight: 700;
	font-size: 14px;
}

.nhb-row-label {
	background: var(--nhb-paper) !important;
	font-weight: 600;
	color: var(--nhb-ink);
	text-align: center !important;
	padding-left: 10px !important;
	width: 78px;
	font-weight: 800;
}

.nhb-ganzhi-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 21px;
	font-weight: 700;
}
.nhb-ganzhi-cell .nhb-can,
.nhb-ganzhi-cell .nhb-chi {
	text-transform: uppercase;
	font-weight: 800;
}

.nhb-tangcan-item,
.nhb-phutinh-item,
.nhb-thansat-item {
	display: inline-block;
	margin: 2px 3px;
	font-size: 12.5px;
	padding: 2px 6px;
	border-radius: 4px;
	background: #f4f1ea;
}

.nhb-thansat-item {
	background: #fdf0e2;
	color: #a3610d;
	font-weight: 600;
}

.nhb-thansat-empty {
	color: #bbb;
}

/* Ngũ hành color coding */
.nhb-el-kim { color: #6b6b6b; }
.nhb-el-moc { color: #2e8b3d; }
.nhb-el-thuy { color: #111b83; }
.nhb-el-hoa { color: #f00000; }
.nhb-el-tho { color: #a06a1e; }

span.nhb-el-kim.nhb-tangcan-item,
span.nhb-el-moc.nhb-tangcan-item,
span.nhb-el-thuy.nhb-tangcan-item,
span.nhb-el-hoa.nhb-tangcan-item,
span.nhb-el-tho.nhb-tangcan-item {
	background: #f4f1ea;
	font-weight: 700;
}

/* Legend */
.nhb-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	margin: 0;
	padding: 14px 8px;
	border-top: 2px solid var(--nhb-grid);
	font-size: 13px;
}

.nhb-legend-item {
	font-weight: 600;
}

/* Dai Van & Lieu Nien */
.nhb-section-title {
	margin: 0;
	padding: 22px 24px 20px 26px;
	font-size: 30px;
	line-height: 1;
	font-weight: 400;
	color: #8c3518;
	border-left: 8px solid #b5581f;
	border-bottom: 3px solid var(--nhb-grid);
	background: var(--nhb-paper);
}

.nhb-daivan-meta {
	font-weight: 400;
	font-size: 12.5px;
	color: #888;
}

.nhb-daivan-table-wrap,
.nhb-lieunien-table-wrap {
	overflow-x: auto;
	margin: 0 !important;
	padding: 0 !important;
}

.nhb-daivan-table,
.nhb-lieunien-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 560px;
}

.nhb-daivan-section {
	border-top: 3px solid var(--nhb-grid);
	padding: 0 !important;
	margin: 0 !important;
}

.nhb-daivan-table,
.nhb-lieunien-table { margin: 0 !important; }
.nhb-lieunien-table + .nhb-lieunien-table { margin-top: -2px !important; }

.nhb-daivan-table { table-layout: fixed; }
.nhb-daivan-label {
	width: 9.5%;
	text-align: center;
	vertical-align: middle;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--nhb-ink);
}
.nhb-daivan-info {
	text-align: left;
	padding: 10px 14px !important;
	font-size: 17px !important;
	line-height: 1.35;
	font-weight: 600;
}
.nhb-daivan-info strong { font-size: 20px; }
.nhb-daivan-direction { color: #777; }
.nhb-daivan-ganzhi-row td,
.nhb-daivan-age-row td { height: 62px; }
.nhb-daivan-age-row td { font-weight: 700; }

.nhb-daivan-table th,
.nhb-daivan-table td,
.nhb-lieunien-table th,
.nhb-lieunien-table td {
	border: 2px solid var(--nhb-grid);
	text-align: center;
	padding: 17px 6px;
	font-size: 18px;
	line-height: 1.35;
	color: var(--nhb-ink);
}

.nhb-daivan-table thead th,
.nhb-lieunien-table thead th {
	background: #fbf5e8;
	color: var(--nhb-ink);
	font-weight: 800;
}

.nhb-lieunien-table .nhb-row-label,
.nhb-daivan-table .nhb-row-label {
	width: 9.5%;
	text-align: center !important;
	font-weight: 800;
	color: var(--nhb-ink);
}
.nhb-lieunien-table { table-layout: fixed; }
.nhb-lieunien-label {
	width: 9.5%;
	text-align: center;
	vertical-align: middle;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--nhb-ink);
}
.nhb-lieunien-table td { height: 52px; padding-top: 8px; padding-bottom: 8px; }
.nhb-lieunien-table .nhb-current-year { background: #ffe0b0; }
.nhb-daivan-table .nhb-current-period { background: #ffe0b0; }
.nhb-lieunien-year { font-weight: 800; }
.nhb-lieunien-year span { color: #82b8b1; }

.nhb-daivan-col {
	background: none;
	border: none;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
}

.nhb-daivan-col:hover {
	background: #f7f1e6;
}

.nhb-daivan-col.nhb-active {
	background: #efd9b8;
}

/* Responsive: desktop / tablet / mobile */
@media (max-width: 900px) {
	.nhb-chart { margin-left: 12px; margin-right: 12px; }
	.nhb-chart-header { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 640px) {
	.nhb-chart { margin-left: 0; margin-right: 0; border-left-width: 1px; border-right-width: 1px; }
	.nhb-chart-header { padding: 16px 12px 14px; min-height: 0; }
	.nhb-chart-header { grid-template-columns: 1fr; gap: 12px; }
	.nhb-chart-name { font-size: 19px; }
	.nhb-brand-subtitle { margin-top: 8px; font-size: 16px; }
	.nhb-brand-url { font-size: 15px; }
	.nhb-brand-mark { width: 52px; height: 52px; font-size: 24px; }
	.nhb-chart-actions { padding: 10px 4px; flex-direction: column; }
	.nhb-chart-meta-grid {
		grid-template-columns: 1fr;
		gap: 5px;
		font-size: 12px;
	}
	/* Mobile không dùng thanh cuộn ngang: mọi bảng tự co vừa khung. */
	.nhb-pillars-table-wrap,
	.nhb-daivan-table-wrap,
	.nhb-lieunien-table-wrap { overflow-x: hidden; width: 100%; }
	.nhb-pillars-table,
	.nhb-daivan-table,
	.nhb-lieunien-table { min-width: 0; width: 100%; table-layout: fixed; }
	.nhb-daivan-table th, .nhb-daivan-table td,
	.nhb-lieunien-table th, .nhb-lieunien-table td { padding: 7px 2px; font-size: 10px; word-break: break-word; }
	.nhb-daivan-table .nhb-row-label, .nhb-lieunien-table .nhb-row-label { width: 12%; font-size: 10px; }
	.nhb-daivan-col { padding: 2px 0; font-size: 10px; }
	.nhb-daivan-table .nhb-el-kim, .nhb-daivan-table .nhb-el-moc,
	.nhb-daivan-table .nhb-el-thuy, .nhb-daivan-table .nhb-el-hoa,
	.nhb-daivan-table .nhb-el-tho { display: inline-block; max-width: 100%; }
	.nhb-pillars-table th,
	.nhb-pillars-table td {
		font-size: 12px;
		padding: 6px 3px;
	}
	.nhb-ganzhi-cell {
		font-size: 17px;
	}
	.nhb-section-title { padding: 16px 12px 14px 16px; font-size: 22px; }
	.nhb-lieunien-table .nhb-row-label,
	.nhb-daivan-table .nhb-row-label { width: 12%; }
	.nhb-daivan-label { width: 12%; font-size: 12px; }
	.nhb-lieunien-label { width: 12%; font-size: 11px; }
	.nhb-daivan-info { padding: 9px 5px !important; font-size: 9px !important; }
	.nhb-daivan-info strong { font-size: 11px; }
	.nhb-daivan-ganzhi-row td, .nhb-daivan-age-row td { height: 52px; }
}

@media (max-width: 420px) {
	.nhb-form-box { padding: 16px; }
	.nhb-date-group, .nhb-row-time .nhb-date-group { grid-template-columns: 1fr; }
	.nhb-pillars-table th, .nhb-pillars-table td { padding: 8px 4px; }
}

/* =========================================================
   Template 2 — Chân Thư (preview approved)
   ========================================================= */
.nhb-template-2 {
	--t2-red:#2f9370; --t2-red2:#2f9370a; --t2-gold:#d9ad57; --t2-line:#e2efe7;
	--t2-paper:#ffffff; --t2-ink:#3b3128; --t2-muted:#7b6651;
	max-width:900px; margin:24px auto 0; background:var(--t2-paper); color:var(--t2-ink);
	border:1px solid #3fae86; border-radius:3px; overflow:hidden; box-shadow:0 6px 22px rgba(83,53,15,.08);
	font-family:"Noto Serif", Georgia, "Times New Roman", serif;
}
.nhb-template-2 *{box-sizing:border-box}.nhb-template-2 h3{font-family:inherit}
.nhb-t2-header{min-height:98px;display:flex;justify-content:space-between;align-items:center;padding:18px 20px;color:#fff9e8;background:linear-gradient(135deg,#4bbf94,#2f9370)}
.nhb-t2-brand h2{margin:0;font-size:24px;line-height:1.12;letter-spacing:.6px;color:#fff;font-weight:800}.nhb-t2-kicker{margin-top:8px;color:#e8c653;font-size:11px;letter-spacing:.8px;font-weight:800}
.nhb-t2-person{text-align:right;line-height:1.55;color:#efcb5d;font-size:12px}.nhb-t2-person strong{display:block;margin-bottom:2px;color:#fff;font-size:17px}.nhb-t2-person small{display:block;color:#f1d8aa;font-size:11px}
.nhb-t2-pillars{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--t2-line)}.nhb-t2-pillar{padding:14px 10px 12px;text-align:center;border-right:1px solid var(--t2-line);min-height:324px}.nhb-t2-pillar:last-child{border-right:0}.nhb-t2-pillar h3{margin:0;color:#7d5410;font-size:15px;letter-spacing:2px}.nhb-t2-role{margin-top:6px;color:#9b1e1e;font-size:11px;font-weight:700}
.nhb-t2-stem,.nhb-t2-branch{font-family:"Noto Serif",serif;font-size:38px;line-height:1.25;font-weight:900}.nhb-t2-stem{margin-top:7px}.nhb-t2-branch{margin-top:2px;padding-top:2px;border-top:1px solid #e2efe7}.nhb-t2-nayin{margin:0 0 5px;color:#5e5448;font-size:11px;line-height:1.25;font-style:italic;font-weight:700}
.nhb-t2-hidden-box{min-height:84px;margin-top:8px;padding:7px 5px 8px;border:1px solid #3fae86;border-radius:6px;background:rgb(238 249 243 / 97%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.nhb-t2-hidden-box span{display:flex;gap:6px;align-items:baseline;font-size:12px;font-weight:800}.nhb-t2-hidden-box small{color:#675b4f;font:10px Arial,sans-serif;font-weight:600}.nhb-t2-growth-box span{font-family:"Noto Serif",serif;font-size:13px;color:#201b17}.nhb-t2-growth-box span.is-vuong{color:#e42424}.nhb-t2-growth-box span b{font-family:Arial,sans-serif;font-size:13px}
.nhb-t2-detail-lines{margin-top:6px;min-height:62px}.nhb-t2-detail-lines div{display:flex;justify-content:space-between;gap:8px;padding:4px 2px;border-bottom:1px dotted #e2efe7;font:10px Arial,sans-serif}.nhb-t2-detail-lines b{font-family:inherit;font-size:11px}.nhb-t2-detail-lines .nhb-t2-tuan-khong{justify-content:center;border-bottom:0;padding-top:7px;color:#6d7480;font-weight:700}.nhb-t2-detail-lines .nhb-t2-tuan-khong span{font-size:10px}
.nhb-t2-shensha,.nhb-t2-dai,.nhb-t2-luu{border-bottom:1px solid var(--t2-line)}.nhb-t2-shensha>h3,.nhb-t2-dai>h3,.nhb-t2-luu>h3{margin:0;padding:11px 14px 10px;color:#26564a;font-size:11px;letter-spacing:2px;font-weight:900}.nhb-t2-luu>h3 small{font:10px Arial,sans-serif;color:#6d6256;letter-spacing:0;font-weight:400}
.nhb-t2-shen-grid{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #e2efe7}.nhb-t2-shen-grid>div{min-height:92px;padding:12px 10px;border-right:1px solid #e2efe7;text-align:center;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:7px}.nhb-t2-shen-grid>div:last-child{border-right:0}.nhb-t2-shen-grid span{font:700 11px Arial,sans-serif;border-bottom:1px dotted currentColor}.nhb-t2-shen-grid .good{color:#148042}.nhb-t2-shen-grid .warn{color:#cf2626}.nhb-t2-shen-grid .accent{color:#1258c4}.nhb-t2-shen-grid em{color:#aaa}
.nhb-t2-split{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--t2-line)}.nhb-t2-split>div{padding:13px 14px}.nhb-t2-split>div+div{border-left:1px solid var(--t2-line)}.nhb-t2-split h3,.nhb-t2-five h3,.nhb-t2-feng h3{margin:0 0 10px;color:#805510;font-size:11px;letter-spacing:2px;font-weight:900}.nhb-t2-origin-copy p{margin:9px 0;font-size:12px}.nhb-t2-origin-copy p strong{margin-left:8px;font-size:18px}.nhb-t2-origin-copy em{font-size:10px;color:#896313}
.nhb-t2-bars{display:grid;gap:7px}.nhb-t2-bars>div{display:grid;grid-template-columns:60px 1fr 42px;align-items:center;gap:7px;font:10px Arial,sans-serif}.nhb-t2-bars b{font-weight:800}.nhb-t2-bars span{height:9px;border-radius:10px;background:#f0e4ca;overflow:hidden}.nhb-t2-bars i{display:block;height:100%;border-radius:10px}.nhb-t2-bars em{text-align:right;font-style:normal;font-weight:700;color:#596878}
.nhb-t2-cards{display:grid;gap:5px;padding:0 14px 12px}.nhb-t2-dv-cards{grid-template-columns:repeat(8,1fr)}.nhb-t2-year-cards{grid-template-columns:repeat(10,1fr)}.nhb-t2-month-cards{grid-template-columns:repeat(12,1fr)}.nhb-t2-card{position:relative;min-width:0;min-height:107px;padding:8px 4px 6px;border:1px solid #e2efe7;border-radius:6px;background:#ffffff;text-align:center}.nhb-t2-card>b,.nhb-t2-card>em,.nhb-t2-card>small{display:block;font:700 9px Arial,sans-serif}.nhb-t2-card>em{margin-top:2px;color:#786653;font-style:normal;font-size:8px}.nhb-t2-card>strong{display:block;margin:7px 0 5px;font-size:16px;line-height:1.25;font-weight:900}.nhb-t2-card>small{padding-top:4px;border-top:1px dotted #d7c29b;color:#721d1d;font-size:8px}.nhb-t2-card.is-active{border-color:#3fae86;background:#ffffff;box-shadow:inset 0 0 0 1px rgba(157,32,32,.08)}.nhb-t2-card.is-active:before{content:"NAY";position:absolute;top:-7px;left:50%;transform:translateX(-50%);padding:1px 5px;border-radius:8px;background:#238b53;color:#fff;font:700 7px Arial,sans-serif}.nhb-t2-dv-cards .nhb-t2-card.is-active:before{content:"";display:none}.nhb-t2-months .nhb-t2-card{min-height:93px;padding-left:2px;padding-right:2px}.nhb-t2-months .nhb-t2-card>strong{font-size:14px}
.nhb-t2-note{margin:-5px 0 9px;color:#6b6258;font:9px Arial,sans-serif}.nhb-t2-bottom{grid-template-columns:1fr 1fr}.nhb-t2-feng h3 small{font:10px Arial,sans-serif;color:#6e6254;letter-spacing:0}.nhb-t2-feng-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.nhb-t2-feng-grid>div{min-height:50px;padding:8px;border:1px solid #e2efe7;border-radius:6px;background:rgb(238 249 243 / 97%)}.nhb-t2-feng-grid span{display:block;margin-bottom:5px;color:#845a0e;font:700 9px Arial,sans-serif}.nhb-t2-feng-grid strong{color:#26564a;font-size:15px}.nhb-t2-feng>p{margin:8px 0 0;color:#62584e;font:9px Arial,sans-serif}
.nhb-t2-footer{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;color:#79560f;border-top:0;font:9px Arial,sans-serif;font-weight:700}.nhb-template-2 .nhb-chart-actions{padding:10px 14px;border-top:1px solid var(--t2-line);background:#ffffff}.nhb-template-2 .nhb-btn-jpg{background:#2f9370;border-radius:4px;padding:8px 14px;font-size:11px}.nhb-template-2 .nhb-btn-jpg:hover{background:#2f9370}
.nhb-template-2.nhb-capture-copy{box-shadow:none}.nhb-template-2.nhb-capture-copy .nhb-chart-actions{display:none!important}
@media(max-width:760px){.nhb-template-2{margin:12px 0;overflow-x:auto}.nhb-template-2>.nhb-t2-header,.nhb-template-2>section,.nhb-template-2>.nhb-t2-footer,.nhb-template-2>.nhb-chart-actions{min-width:760px}}

/* v3.7.8 — Khối Thái Nguyên & Cung Mệnh + màu Ngũ Hành theo mẫu Chân Thư */
.nhb-template-2 .nhb-t2-origin{background:#fffaf2}
.nhb-template-2 .nhb-t2-origin-copy p{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;margin:10px 0;font-size:12px}
.nhb-template-2 .nhb-t2-origin-copy p strong{margin-left:0;font-family:"Noto Serif",serif;font-size:19px;line-height:1.2;font-weight:900}
.nhb-template-2 .nhb-t2-origin-copy p em{margin-left:2px;font-size:11px;color:#896313}

/* v3.7.8 final approved palette */
.nhb-template-2 .nhb-t2-shensha,
.nhb-template-2 .nhb-t2-origin{background:rgb(238 249 243 / 97%)}
.nhb-template-2 .nhb-t2-bars em{font-weight:800}
