.bazi-chart-card {
  margin-top: 10px;
  padding: 8px 7px;
}

.bazi-chart-grid {
  display: grid;
  grid-template-columns: 50px repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(32, 32, 32, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.bazi-chart-grid > * {
  min-width: 0;
  border-left: 1px solid rgba(30, 30, 30, 0.06);
}

.bazi-chart-grid > *:nth-child(5n + 1) {
  border-left: 0;
}

.bazi-row-label,
.bazi-col-head,
.bazi-god,
.bazi-main-cell,
.bazi-hidden {
  display: grid;
  place-items: center;
}

.bazi-row-label {
  color: #111;
  font-size: 13px;
  font-weight: 850;
}

.bazi-head-label,
.bazi-col-head {
  min-height: 26px;
  color: #707172;
  font-size: 13px;
  font-weight: 650;
}

.bazi-head-label {
  color: #111;
  font-weight: 900;
}

.bazi-col-head.is-day {
  color: #9b3125;
}

.bazi-god {
  min-height: 26px;
  color: #111;
  font-size: 13px;
  font-weight: 650;
}

.bazi-god.is-day {
  color: #078246;
  font-weight: 900;
}

.bazi-main-cell {
  min-height: 42px;
}

.bazi-hidden {
  align-content: center;
  gap: 2px;
  min-height: 42px;
  padding: 4px 0;
  border-top: 1px solid rgba(30, 30, 30, 0.06);
}

.bazi-tall-label {
  border-top: 1px solid rgba(30, 30, 30, 0.06);
}

.bazi-hidden-gods span,
.bazi-mini-stem {
  display: inline-flex;
  gap: 2px;
  align-items: baseline;
  justify-content: center;
  min-height: 11px;
  line-height: 1.05;
  color: #151515;
  font-size: 10px;
  font-weight: 650;
}

.bazi-hidden-gods span {
  display: block;
}

.bazi-glyph-wrap {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  justify-content: center;
}

.bazi-glyph-wrap .bazi-glyph {
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.bazi-glyph-wrap em {
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.bazi-mini-stem .bazi-glyph {
  font-size: 10px;
  font-weight: 700;
}

.bazi-mini-stem em {
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
}

.bazi-wood {
  color: #078246;
}

.bazi-fire {
  color: #dd2e2e;
}

.bazi-earth {
  color: #8a5d1f;
}

.bazi-metal {
  color: #d08b00;
}

.bazi-water {
  color: #1767b1;
}

.bazi-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 24px;
  align-items: center;
  min-height: 50px;
  margin-top: 10px;
  overflow: hidden;
}

.bazi-summary-strip div {
  display: grid;
  gap: 7px;
  min-height: 38px;
  align-content: center;
  justify-items: center;
  border-left: 1px solid rgba(30, 30, 30, 0.06);
}

.bazi-summary-strip div:first-child {
  border-left: 0;
}

.bazi-summary-strip span {
  color: #68696a;
  font-size: 12px;
  font-weight: 550;
}

.bazi-summary-strip strong {
  display: block;
  color: #99691e;
  font-size: 13px;
  font-weight: 750;
  white-space: normal;
}

.bazi-summary-strip strong b {
  font-weight: 800;
}

.bazi-summary-strip button {
  display: grid;
  place-items: center;
  height: 100%;
  color: #222;
}

.bazi-summary-strip svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 390px) {
  .bazi-chart-card { padding-inline: 5px; }
  .bazi-chart-grid { grid-template-columns: 48px repeat(4, minmax(0, 1fr)); }
  .bazi-row-label,
  .bazi-col-head,
  .bazi-god { font-size: 13px; }
  .bazi-glyph-wrap .bazi-glyph { font-size: 29px; }
  .bazi-main-cell { min-height: 70px; }
  .bazi-hidden { min-height: 78px; gap: 5px; }
  .bazi-summary-strip { grid-template-columns: repeat(5, minmax(48px, 1fr)) 20px; overflow-x: auto; }
}
