/* —— 八字排盘 bazi.cq2.cn —— */
.bz-wrap { max-width: 920px; margin: 0 auto; }
.bz-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.bz-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; color: #666; }
.bz-form input, .bz-form select { padding: 9px 11px; border: 1px solid var(--c-line, #ddd); border-radius: 8px; font-size: 15px; background: #fff; }
.bz-form .bz-opts { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; width: 100%; padding-top: 4px; }
.bz-form .bz-opts label { flex-direction: row; align-items: center; gap: 6px; font-size: .86rem; color: #555; cursor: pointer; }
.bz-form .bz-opts input[type=checkbox] { width: 16px; height: 16px; }

/* 五行色 */
.wx-金 { color: #c9a227; } .wx-木 { color: #3a9d5d; } .wx-水 { color: #2b7fc4; } .wx-火 { color: #c0392b; } .wx-土 { color: #a9762f; }
.bg-金 { background: #c9a227; } .bg-木 { background: #3a9d5d; } .bg-水 { background: #2b7fc4; } .bg-火 { background: #c0392b; } .bg-土 { background: #a9762f; }

/* 注册提醒 */
.bz-reg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; padding: 10px 14px; background: #fff8e6; border: 1px solid #f0e2b8; border-radius: 10px; color: #8a6d1b; font-size: .9rem; }
.bz-reg a { color: #b8860b; font-weight: 600; }
.bz-save { margin-left: auto; }

/* —— 传统竖式排盘表 —— */
.bz-chart-wrap { overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; }
.bz-chart { width: 100%; min-width: 420px; border-collapse: collapse; text-align: center; }
.bz-chart th.rowlab { background: #faf7f0; color: #8a744a; font-weight: 600; font-size: .8rem; width: 46px; white-space: nowrap; }
.bz-chart thead th { background: #f6efe0; color: #7a5c2a; padding: 8px 4px; font-size: .9rem; font-weight: 700; border: 1px solid #ece0c8; }
.bz-chart td, .bz-chart tbody th { border: 1px solid #f0eae0; padding: 6px 4px; font-size: .86rem; vertical-align: middle; }
.bz-chart tbody th { background: #faf7f0; color: #8a744a; font-weight: 600; font-size: .78rem; }
.bz-chart .r-shen td { color: #9a6a3a; font-size: .8rem; }
.bz-chart .r-shen td.zhu { color: #c0392b; font-weight: 700; }
.bz-chart .gan, .bz-chart .zhi { font-size: 1.7rem; font-weight: 800; line-height: 1.15; font-family: var(--font-serif, serif); position: relative; display: inline-block; }
.bz-chart .r-gan td { background: #fffdf8; }
.bz-chart .r-zhi td { background: #fcf9f2; }
.bz-chart .r-hide .hg { display: inline-flex; flex-direction: column; align-items: center; margin: 0 3px; line-height: 1.2; }
.bz-chart .r-hide .hg small { font-size: .62rem; color: #b08a55; }
.bz-chart .r-dishi td, .bz-chart .r-nayin td, .bz-chart .r-kong td { font-size: .8rem; color: #6a5a44; }
.bz-chart .r-kong .kong { color: #b6232a; font-weight: 700; }
.bz-chart .r-shensha td { font-size: .72rem; color: #7a5c2a; }
.bz-chart .r-shensha .ss { display: inline-block; background: #f6efe0; border-radius: 6px; padding: 1px 5px; margin: 1px; }
/* 地支刑冲合害角标 */
.rel-badges { position: absolute; top: -6px; right: -12px; display: flex; flex-direction: column; gap: 1px; }
.rel-b { font-size: .56rem; line-height: 1.3; padding: 0 3px; border-radius: 4px; color: #fff; font-family: system-ui; font-weight: 700; }
.rel-冲 { background: #c0392b; } .rel-刑 { background: #b8860b; } .rel-害 { background: #7b4fa0; } .rel-合 { background: #3a9d5d; }

/* 刑冲合害汇总 */
.bz-rels { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bz-rels .r { font-size: .82rem; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.bz-rels .r.t-冲 { color: #c0392b; border-color: #e6b3ad; background: #fdf3f2; }
.bz-rels .r.t-刑 { color: #8a6410; border-color: #ecdcae; background: #fdf8ea; }
.bz-rels .r.t-害 { color: #6a3f95; border-color: #d5c3e8; background: #f7f2fb; }
.bz-rels .r.t-合 { color: #2f7d45; border-color: #b6ddc3; background: #f1f9f4; }

/* 命宫胎元空亡等 */
.bz-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.bz-fact { padding: 4px 12px; border-radius: 999px; background: #faf7f0; border: 1px solid #efe7d6; font-size: .84rem; color: #555; }
.bz-fact b { color: #8a5a2a; font-family: var(--font-serif, serif); }

/* 五行力量柱形图（竖直） */
.bz-wx-cols { display: flex; align-items: flex-end; justify-content: center; gap: 18px; height: 160px; margin: 12px 0 4px; padding: 0 4px; }
.bz-wx-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; flex: 1; max-width: 64px; }
.bz-wx-col .val { font-size: .8rem; font-weight: 700; margin-bottom: 3px; }
.bz-wx-col .bar { width: 60%; min-width: 22px; border-radius: 6px 6px 0 0; transition: height .4s; min-height: 3px; }
.bz-wx-col .name { margin-top: 6px; font-size: .95rem; font-weight: 700; font-family: var(--font-serif, serif); }
.bz-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.bz-tag { padding: 3px 12px; border-radius: 999px; background: #faf7f0; border: 1px solid #efe7d6; font-size: .86rem; }

/* 大运 / 流年 */
.bz-yun-note { font-size: .84rem; color: #7a6a4a; margin: 0 0 8px; }
.bz-yun-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.bz-yun { flex: none; width: 84px; border: 1px solid #eee3cf; border-radius: 10px; padding: 8px 4px; text-align: center; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.bz-yun.cur { border-color: #c9a227; background: #fffbe9; }
.bz-yun.sel { border-color: #b8860b; box-shadow: 0 0 0 2px rgba(184,134,11,.28); }
.bz-yun:hover { border-color: #d4b24a; }
.bz-yun .age { font-size: .72rem; color: #999; }
.bz-yun .gz { font-size: 1.15rem; font-weight: 800; font-family: var(--font-serif, serif); line-height: 1.3; }
.bz-yun .ss { font-size: .7rem; color: #a06a34; }
.bz-yun .yr { font-size: .68rem; color: #bbb; }
.bz-ln-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bz-ln { flex: none; width: 66px; border: 1px solid #eee; border-radius: 8px; padding: 5px 2px; text-align: center; font-size: .74rem; background: #fff; }
.bz-ln.cur { border-color: #c0392b; background: #fdf3f2; font-weight: 700; }
.bz-ln .lgz { font-size: .95rem; font-weight: 700; font-family: var(--font-serif, serif); }
.bz-ln .lss { color: #a06a34; font-size: .66rem; }

/* 起名卡（沿用） */
.bz-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.bz-name { border: 1px solid #eee; border-radius: 10px; padding: 12px; text-align: center; background: #fff; }
.bz-name b { font-size: 1.2rem; color: #8b1a1a; }
.bz-name .py { font-size: .78rem; color: #999; margin-top: 2px; }
.bz-name .sc { font-size: .78rem; color: #c9a227; margin-top: 4px; }

.bz-disc { margin-top: 16px; padding: 10px 14px; background: #fff8e6; border: 1px solid #f0e2b8; border-radius: 8px; color: #8a6d1b; font-size: .85rem; line-height: 1.7; }

@media (max-width: 560px) {
  .bz-chart .gan, .bz-chart .zhi { font-size: 1.4rem; }
  .bz-chart th.rowlab { width: 36px; font-size: .68rem; }
  .bz-chart td, .bz-chart tbody th { padding: 5px 2px; font-size: .78rem; }
  .bz-wx-cols { height: 130px; gap: 10px; }
}
