/* =========================================================
  Meishiki page
  命式ページ専用CSS
========================================================= */

/* =========================================================
  11. Result common
========================================================= */

.meishiki-result-section,
.natal-block {
  max-width: 1080px;
  margin: 5px auto;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(120, 80, 60, 0.16);
  box-shadow: 0 10px 28px rgba(80, 30, 20, 0.06);
  border-top: 5px solid rgba(62, 116, 172, 0.95);
}

.meishiki-result-title {
  margin: 0 0 10px;
  color: var(--mikoto-red-dark);
  font-size: 1.25rem;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.meishiki-result-title .birth-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(80, 50, 45, 0.78);
}

.mode-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(180, 42, 35, 0.055);
  border: 1px solid rgba(120, 80, 60, 0.10);
  color: rgba(80, 50, 45, 0.72);
  font-size: 0.78rem;
  line-height: 1.65;
}


/* =========================================================
  12. Natal table
========================================================= */

.meishiki-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(120, 80, 60, 0.16);
  background: #fffdfb;
}

.meishiki-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdfb;
  font-size: 0.9rem;
}

.meishiki-table th,
.meishiki-table td {
  border-right: 1px solid #eadfd8;
  border-bottom: 1px solid #eadfd8;
  padding: 9px 8px;
  text-align: center;
  vertical-align: middle;
}

.meishiki-table th:last-child,
.meishiki-table td:last-child {
  border-right: none;
}

.meishiki-table tbody tr:last-child th,
.meishiki-table tbody tr:last-child td {
  border-bottom: none;
}

.meishiki-table thead th {
  background: rgba(180, 42, 35, 0.12);
  color: rgb(110, 30, 25);
  font-weight: 800;
  white-space: nowrap;
}

.meishiki-table thead th:first-child {
  width: 82px;
}

.meishiki-table tbody th {
  width: 82px;
  background: rgba(180, 42, 35, 0.055);
  color: #6f4b42;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.big-kanji {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--mikoto-red-dark);
}

.twelve-stage-cell {
  font-weight: 700;
  color: #5a4134;
}


/* =========================================================
  13. Zokan compact fixed layout
========================================================= */

.zokan-cell {
  min-width: 132px;
  text-align: center;
}

.zokan-line {
  display: grid;
  grid-template-columns: 2.4em 1.8em 3.2em 4.2em;
  gap: 0.18em;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: #51463e;
}

.zokan-line.is-active {
  font-weight: 800;
  color: var(--mikoto-red-dark);
}

.zokan-position,
.zokan-stem,
.zokan-ten-god {
  white-space: nowrap;
}

.zokan-position {
  color: rgba(80, 50, 45, 0.62);
  text-align: right;
}

.zokan-stem {
  font-weight: 800;
  text-align: center;
}

.zokan-ten-god {
  text-align: center;
}

.zokan-badge-group {
  display: inline-grid;
  grid-template-columns: 1.35em 1.35em 1.35em;
  gap: 2px;
  align-items: center;
  justify-content: start;
  min-width: 4.2em;
}

.zokan-active-badge,
.zokan-root-badge,
.zokan-revealed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 0.28em;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.zokan-active-badge {
  background: rgba(180, 42, 35, 0.15);
  color: rgb(120, 30, 25);
}

.zokan-root-badge {
  background: rgba(108, 128, 74, 0.16);
  color: rgb(74, 95, 45);
}

.zokan-revealed-badge {
  background: rgba(120, 90, 145, 0.15);
  color: rgb(90, 65, 120);
}


/* =========================================================
  14. Natal five elements
========================================================= */

.meishiki-element-stem-table {
  min-width: 760px;
}

.meishiki-element-stem-table .element-cell {
  background: rgba(180, 42, 35, 0.12);
  font-size: 1.05rem;
}

.meishiki-element-stem-table .element-total {
  font-weight: 700;
}

.meishiki-element-stem-table .stem-cell {
  background: rgba(180, 42, 35, 0.06);
}


/* =========================================================
  15. Relation matrix
========================================================= */

.meishiki-relation-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(120, 80, 60, 0.22);
  border-radius: 14px;
}

.meishiki-relation-matrix th,
.meishiki-relation-matrix td {
  border-right: 1px solid rgba(120, 80, 60, 0.18);
  border-bottom: 1px solid rgba(120, 80, 60, 0.18);
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.meishiki-relation-matrix th:last-child,
.meishiki-relation-matrix td:last-child {
  border-right: none;
}

.meishiki-relation-matrix tr:last-child th,
.meishiki-relation-matrix tr:last-child td {
  border-bottom: none;
}

.meishiki-relation-matrix thead th {
  background: rgba(180, 42, 35, 0.14);
  color: rgb(110, 30, 25);
  font-weight: 700;
}

.meishiki-relation-matrix tbody th {
  background: rgba(180, 42, 35, 0.08);
  color: rgb(110, 30, 25);
  white-space: nowrap;
}

.meishiki-relation-matrix td {
  background: rgba(255, 255, 255, 0.72);
}

.meishiki-relation-matrix td.is-self {
  background: rgba(180, 42, 35, 0.16);
  color: rgba(120, 30, 25, 0.45);
  font-weight: 700;
}

.relation-badge {
  display: inline-block;
  margin: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(180, 42, 35, 0.12);
  color: rgb(120, 30, 25);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}



