/* =========================================================
  Cycle display
  大運・流年・流月・流日 共通
========================================================= */


/* =========================
  Cycle: block
========================= */

.cycle-block {
  max-width: 1080px;
  margin: 24px 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);
}

.cycle-block > h2 {
  margin: 0 0 12px;
  color: var(--mikoto-red-dark);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}


/* =========================
  Cycle: summary
========================= */

.cycle-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 10px 0 12px;
  font-size: 0.9rem;
}

.cycle-summary span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(180, 42, 35, 0.08);
  border: 1px solid rgba(120, 80, 60, 0.12);
  color: #5a4134;
  font-weight: 600;
}

.cycle-block > .muted {
  margin: 8px 0 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(80, 50, 45, 0.65);
}


/* =========================
  Cycle: table
========================= */

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

.cycle-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdfb;
  font-size: 0.78rem;
}

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

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

.cycle-table tbody tr:last-child td {
  border-bottom: none;
}

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

.cycle-table tbody tr:hover {
  background: rgba(180, 42, 35, 0.035);
}


/* =========================
  Cycle: key cells
========================= */

.cycle-year-cell,
.cycle-age-cell,
.cycle-period-cell {
  background: rgba(180, 42, 35, 0.045);
  color: #5a4134;
  font-weight: 700;
}

.cycle-period-cell {
  min-width: 170px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.cycle-age-cell,
.cycle-year-cell {
  white-space: nowrap;
}

.cycle-pillar {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--mikoto-red-dark);
  white-space: nowrap;
}


/* =========================
  Cycle: mini lines / badges
========================= */

.mini-line {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #51463e;
}

.small-badge {
  display: inline-block;
  margin: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(180, 42, 35, 0.1);
  color: rgb(120, 30, 25);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}


/* =========================
  Cycle: root / supplement
========================= */

.root-cell {
  min-width: 120px;
}

.root-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(180, 42, 35, 0.12);
  color: rgb(120, 30, 25);
  font-size: 0.76rem;
  font-weight: 800;
}

.supplement-cell {
  min-width: 180px;
  max-width: 280px;
}

.mini-details {
  margin-top: 6px;
  text-align: center;
}

.mini-details > summary {
  cursor: pointer;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(120, 80, 60, 0.08);
  color: #5a4134;
  font-size: 0.76rem;
  font-weight: 700;
}

.mini-details[open] > summary {
  margin-bottom: 6px;
}

.mini-details .mini-line {
  padding: 3px 0;
  text-align: left;
}


/* =========================
  Cycle: responsive
========================= */

@media (max-width: 720px) {
  .cycle-block {
    padding: 16px;
    border-radius: 16px;
  }

  .cycle-block > h2 {
    font-size: 1.2rem;
  }

  .cycle-summary {
    font-size: 0.82rem;
  }

  .cycle-table {
    min-width: 920px;
    font-size: 0.82rem;
  }

  .cycle-table th,
  .cycle-table td {
    padding: 8px;
  }

  .cycle-pillar {
    font-size: 1.2rem;
  }
}

.supplement-cell {
  min-width: 180px;
  max-width: 280px;
}

.mini-details .mini-line {
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}


/* =========================
  Cycle: range table
========================= */

.range-label-cell {
  background: rgba(180, 42, 35, 0.045);
  color: #5a4134;
  font-weight: 800;
  white-space: nowrap;
}

.range-table .cycle-period-cell {
  min-width: 170px;
}

/* .range-table {
  min-width: 960px;
} */