:root {
  --gap: 18px;
  --cell-bg: #f6eeea;
  --text: #222;
}

* {
  box-sizing: border-box;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
}

.page-title {
  text-align: center;
  font-size: 26px;
  margin: 8px 0 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.section-title {
  text-align: center;
  font-size: 22px;
  margin: 34px 0 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* ===== 九星フル一覧 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin: 0 2%;
  font-family: serif;
}

.panel {
  background: var(--cell-bg);
  border: 1px solid #f0e3dd;
  overflow: hidden;
}

.panel__head {
  color: #fff;
  font-weight: 900;
  text-align: center;
  padding: 14px 10px;
  font-size: 20px;
  letter-spacing: 0.08em;
}

.panel__sub {
  text-align: center;
  font-weight: 900;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 2px solid rgba(255, 255, 255, 0.9);
}

.panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panel__list li {
  padding: 10px 12px;
  text-align: center;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  font-weight: 700;
}

/* ヘッダー色 */
.p-kushi .panel__head {
  background: #d9141d;
}
.p-happaku .panel__head {
  background: #b01930;
}
.p-shichiseki .panel__head {
  background: #7b1c5c;
}
.p-roppaku .panel__head {
  background: #6a1a6b;
}
.p-goou .panel__head {
  background: #54207e;
}
.p-shiroku .panel__head {
  background: #5a1a75;
}
.p-sanpeki .panel__head {
  background: #6e7a46;
}
.p-jikoku .panel__head {
  background: #7b8b3f;
}
.p-ippaku .panel__head {
  background: #9fba00;
}

/* ===== 詳細（同形式） ===== */
.details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.detail {
  border: 1px solid #e5e5e5;
  overflow: hidden;
  margin: 0 auto 30px;
  width: 90%;
  font-family: serif;
}

.detail__head {
  background: var(--detail-head, #7a7a7a);
  color: #fff;
  text-align: center;
  font-weight: 900;
  padding: 14px 12px;
  font-size: 20px;
  letter-spacing: 0.06em;
}

.detail__head .ruby {
  font-weight: 600;
  font-size: 14px;
  margin-left: 6px;
  letter-spacing: 0;
}

.detail__sub {
  text-align: center;
  font-weight: 900;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.05);
}

.detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.detail__grid > div {
  padding: 14px 12px;
  text-align: center;
  background: #f1f1f1;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  font-weight: 700;
}

.detail__grid > div:nth-child(2n) {
  border-right: none;
}

.detail__grid .empty {
  background: #f1f1f1;
}

/* Responsive */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .detail__grid {
    grid-template-columns: 1fr;
  }
  .detail__grid > div {
    border-right: none;
  }
}
