/*--------------------------------------------------
  Child-Theme : Hello-Elementor Child   v8.0.0
  2025-06-24  –  最終完成版（タイトル中央揃え・接地調整）
--------------------------------------------------*/

/* ========= 0. 共通ガード ================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ========= 1. 基本変数（PC表示向け） ===================== */
:root {
  --gap  : 8px;   /* 列内カード間ギャップ */
  --bgap : 12px;  /* 左右ブロック間ギャップ */
}

/* ========= 2. ヘッダータイトル =========================== */
/* ヘッダー全体を中央揃えに */
#site-header {
  text-align: center;
}
.site-title {
  padding: 4px 12px;
}
.site-title a {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(18px, 5.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: #d22f7b;
  text-decoration: none;
}

/* ========= 3. コスト表ナビ =============================== */
@font-face {
  font-family: "Bebas Neue";
  src: local("Bebas Neue"),
       url(https://fonts.gstatic.com/s/bebasneue/v10/JTUSjIg1_i6t8kCHKm459Wlh.woff2)
         format("woff2");
  font-display: swap;
}
.cost-table {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 1px;
  width: 100%;
  /* 上の余白を0にしてタイトルと接地させる */
  margin: 0 auto 24px;
}
.cost-table .row {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}
.cost-table .label {
  flex: 0 0 50px;
  height: 38px;
  background: #111;
  color: #fff;
  font-size: 18px;
  line-height: 38px;
  text-align: center;
}
.cost-table a {
  flex: 1 0 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
  transition: .2s;
}
.cost-table .row:nth-child(1) a {
  background: #6ec6ff;
  color: #000;
}
.cost-table .row:nth-child(1) a:hover {
  background: #0095d5;
  color: #fff;
}
.cost-table .row:nth-child(2) a {
  background: #5c6bc0;
  color: #fff;
}
.cost-table .row:nth-child(2) a:hover {
  background: #283593;
}
.cost-table a:hover {
  transform: translateY(-2px);
  border-color: #fff;
}

/* ========= 4. コスト帯見出し ============================= */
.cost-heading {
  width: max-content;
  margin: 32px auto 24px;
  padding: 6px 24px;
  background: #c7effb;
  border: 3px solid #000;
  font-family: "Bebas Neue", sans-serif;
  font-size: 28px;
}

/* ========= 5. ランク表テーブル =========================== */
.unit-rank-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0 20px;
}
.unit-rank-table th,
.unit-rank-table td {
  padding: 0;
  border-style: solid;
  border-width: 8px;
}
.unit-rank-table th {
  width: 64px;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  border-right: none;
}
.unit-rank-table td {
  border-left: none;
}
/* ──── ランク枠色 ──── */
.unit-rank-table th.rank-S,
.unit-rank-table td.rank-S {
  border-color: #7B1FA2;
  color: #7B1FA2;
}
.unit-rank-table th.rank-A,
.unit-rank-table td.rank-A {
  border-color: #e63946;
  color: #e63946;
}
.unit-rank-table th.rank-B,
.unit-rank-table td.rank-B {
  border-color: #457b9d;
  color: #457b9d;
}
.unit-rank-table th.rank-C,
.unit-rank-table td.rank-C {
  border-color: #2a9d8f;
  color: #2a9d8f;
}
.unit-rank-table th.rank-D,
.unit-rank-table td.rank-D {
  border-color: #8d99ae;
  color: #8d99ae;
}

/* ========= 6. 3ブロック x 複数カードのグリッドレイアウト ========= */
.unit-cards {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr;
  gap: var(--bgap);
  padding: var(--bgap);
  align-items: start;
}

.unit-block {
  display: grid;
  gap: var(--gap);
  min-width: 0;
}
.block-left,
.block-right {
  grid-template-columns: repeat(2, 1fr);
}
.block-center {
  grid-template-columns: repeat(3, 1fr);
}

.unit-card {
  width: 100%;
  overflow: hidden;
  text-align: center;
}
.unit-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  border-radius: 4px;
}
.unit-name {
  display: none !important;
}

/* ========= 7. ちょっとした演出 =========================== */
.drag-ghost {
  opacity: .4;
}

/* ========= 8. rank-wrapper ============================= */
.rank-wrapper {
  width: 100%;
}

/* ========= 9. 空の列にドロップ先を明示 =================== */
.unit-block.is-empty {
  min-height: 90px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  align-self: stretch;
}

/* ==========================================================
   10. スマホ向けレイアウト最終調整 (768px以下)
   ========================================================== */
@media (max-width: 768px) {

  /* (1) 全体的な間隔を詰める */
  :root {
    --gap: 4px;
    --bgap: 4px;
  }
  
  /* (2) コスト表の左右の余白をなくし、タイトルに近付ける */
  .cost-table {
    padding-left: 4px;
    padding-right: 4px;
    margin-top: 4px;
    margin-bottom: 0;
  }

  /* (3) コスト見出しを小さく、上下の要素と接地させる */
  .cost-heading {
    margin-top: 16px;
    margin-bottom: 8px;
    padding: 4px 16px;
    font-size: 20px;
    border-width: 2px;
  }
  
  /* (4) ランク表の枠線を細くし、ランク間の隙間を詰める */
  .unit-rank-table {
    border-spacing: 0 8px;
  }
  .unit-rank-table th,
  .unit-rank-table td {
    border-width: 4px;
  }
  .unit-rank-table th {
    width: 32px;
    font-size: 1.5rem;
  }

  /* (5) カードエリアの余白を調整 */
  .unit-cards {
    padding: 8px 4px;
  }
}