/* ==========================================================
   バトオペ3 特設ページ（/bo3/）。style.css の上に重ねる差分だけ
   ========================================================== */
.bo3-page {
  --bo3-pink: #d22f7b;
  --bo3-ink: #111;
  --bo3-assault: #ff4040;
  --bo3-general: #5689ff;
  --bo3-support: #ffe600;
  --bo3-s: #7B1FA2;
  --bo3-a: #e63946;
  --bo3-b: #457b9d;
  --bo3-c: #2a9d8f;
}

/* 背景は通常のランクページと同じく画面幅いっぱいに敷き、中身だけ 1200px 幅に収める。
   main 自体を 1200px に絞ると、広い画面で左右に body の白が出る。 */
@media (min-width: 1201px) {
  .bo3-page main.bo3-rank-page {
    padding-left: calc((100% - 1170px) / 2);
    padding-right: calc((100% - 1170px) / 2);
  }
}

.bo3-nowrap {
  display: inline-block;
  white-space: nowrap;
}

/* ---------- ヒーロー ---------- */
.bo3-hero {
  max-width: 1040px;
  margin: 6px auto 0;
  padding: 18px 20px 14px;
  background: rgba(12, 16, 28, .86);
  border: 3px solid #000;
  border-radius: 10px;
  box-shadow: 0 5px 0 #000;
  color: #fff;
  text-align: center;
}

.bo3-hero__kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--bo3-pink);
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .1em;
}

.bo3-hero__title {
  margin: 0;
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c", sans-serif;
  font-size: clamp(26px, 5.4vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .02em;
}

.bo3-hero__num {
  display: inline-block;
  margin: 0 .04em;
  color: #ffd23f;
  font-size: 1.18em;
  transform: translateY(.03em);
}

.bo3-hero__sub {
  margin: 8px 0 14px;
  font-size: clamp(13px, 2.6vw, 16px);
  font-weight: 700;
  opacity: .92;
}

.bo3-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bo3-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  color: var(--bo3-ink);
  font-size: 13px;
  font-weight: 700;
}

.bo3-facts li span {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bo3-ink);
  color: #fff;
  font-size: 11px;
}

.bo3-hero__asof {
  margin: 12px 0 0;
  font-size: 11px;
  opacity: .7;
}

/* ---------- ランク表まわり ---------- */
.bo3-page .cost-heading-row {
  margin-top: 26px;
}

/* 兵科の見出し行：枠線を透明にして本体の行と同じ幅で並べる */
.unit-rank-table .bo3-role-row th,
.unit-rank-table .bo3-role-row td {
  border-color: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.unit-rank-table .bo3-role-row td {
  align-items: end;
}

.bo3-role {
  display: block;
  padding: 3px 0;
  border: 2px solid #000;
  border-radius: 6px;
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c", sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .2em;
}

.bo3-role--assault { background: var(--bo3-assault); color: #fff; }
.bo3-role--general { background: var(--bo3-general); color: #fff; }
.bo3-role--support { background: var(--bo3-support); color: var(--bo3-ink); }

.bo3-page .unit-rank-table {
  border-spacing: 0 14px;
}

.bo3-page .unit-rank-table tr:not(.bo3-role-row) th,
.bo3-page .unit-rank-table tr:not(.bo3-role-row) td {
  background: rgba(255, 255, 255, .55);
}

/* 機体数が少ないうちは空き列で行が間延びしないように */
.bo3-page .unit-block.is-empty {
  min-height: 0;
  border-color: rgba(0, 0, 0, .12);
}

.bo3-page .unit-card-link {
  transition: transform .14s ease;
}

.bo3-page .unit-card-link:hover {
  transform: translateY(-2px);
}

/* ---------- パネル共通 ---------- */
.bo3-panel {
  max-width: 1040px;
  margin: 22px auto 0;
  padding: 18px 16px 20px;
  background: rgba(255, 255, 255, .94);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}

.bo3-panel__title {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 4px solid var(--bo3-pink);
  font-size: 20px;
  font-weight: 800;
}

.bo3-panel__subtitle {
  margin: 20px 0 8px;
  font-size: 16px;
  font-weight: 800;
}

/* ---------- 評価待ち ---------- */
.bo3-pending {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bo3-pending__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}

.bo3-pending__card {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ---------- 機体別の判定理由 ---------- */
.bo3-units {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bo3-unit {
  display: grid;
  grid-template-columns: 44px 84px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  scroll-margin-top: 12px;
}

.bo3-unit:target {
  outline: 3px solid var(--bo3-pink);
  outline-offset: 1px;
}

.bo3-unit__rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  font-family: "Bebas Neue", sans-serif;
  font-size: 30px;
  line-height: 1;
}

.bo3-rank--s { background: var(--bo3-s); }
.bo3-rank--a { background: var(--bo3-a); }
.bo3-rank--b { background: var(--bo3-b); }
.bo3-rank--c { background: var(--bo3-c); }

.bo3-unit__thumb {
  display: block;
  width: 84px;
  height: auto;
  border-radius: 4px;
}

.bo3-unit__body p {
  margin: 0;
}

.bo3-unit__name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.bo3-unit__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px !important;
}

.bo3-role-tag,
.bo3-sp {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.bo3-role-tag {
  background: #eee;
  color: var(--bo3-ink);
}

.bo3-role-tag--assault { background: var(--bo3-assault); color: #fff; }
.bo3-role-tag--general { background: var(--bo3-general); color: #fff; }
.bo3-role-tag--support { background: var(--bo3-support); color: var(--bo3-ink); }

.bo3-sp {
  background: #111;
  color: #ffd23f;
}

.bo3-sp--none {
  background: #f1f1f1;
  color: #777;
}

.bo3-unit__bo2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 6px !important;
}

.bo3-unit__label {
  margin-right: 2px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
}

.bo3-chip {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: #8d99ae;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
}

.bo3-chip--s { background: var(--bo3-s); }
.bo3-chip--a { background: var(--bo3-a); }
.bo3-chip--b { background: var(--bo3-b); }
.bo3-chip--c { background: var(--bo3-c); }
.bo3-chip--none { background: #bbb; }
.bo3-chip--note { background: #fff; color: #555; border: 1px solid #bbb; }

.bo3-unit__comment {
  margin-top: 7px !important;
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- 割り出し方・ソース ---------- */
.bo3-steps,
.bo3-rules,
.bo3-sources {
  margin: 0;
  padding-left: 1.4em;
  font-size: 14px;
  line-height: 1.75;
}

.bo3-steps li + li,
.bo3-rules li + li {
  margin-top: 4px;
}

.bo3-steps strong {
  color: var(--bo3-pink);
}

.bo3-sources a {
  color: #1a5fb4;
  word-break: break-all;
}

.bo3-page .ani-tier-promo {
  margin-top: 22px;
}

/* ---------- スマホ ---------- */
@media (max-width: 768px) {
  .bo3-hero {
    margin: 4px 4px 0;
    padding: 14px 10px 12px;
    border-width: 2px;
    box-shadow: 0 3px 0 #000;
  }

  .bo3-facts li {
    font-size: 12px;
  }

  .bo3-page .cost-heading-row {
    margin-top: 18px;
  }

  .bo3-role {
    padding: 2px 0;
    border-width: 1.5px;
    font-size: 11px;
    letter-spacing: .05em;
  }

  .bo3-page .unit-rank-table {
    border-spacing: 0 8px;
  }

  /* スマホは 強襲1列・汎用2列・支援1列 にしてカードを大きく（全カード同じ幅） */
  .bo3-page .unit-cards {
    grid-template-columns: 1fr 2fr 1fr;
  }

  .bo3-page .block-left,
  .bo3-page .block-right {
    grid-template-columns: 1fr;
  }

  .bo3-page .block-center {
    grid-template-columns: repeat(2, 1fr);
  }

  .bo3-panel {
    margin: 16px 4px 0;
    padding: 14px 10px 16px;
  }

  .bo3-panel__title {
    font-size: 18px;
  }

  .bo3-unit {
    grid-template-columns: 36px 64px 1fr;
    gap: 8px;
    padding: 8px;
  }

  .bo3-unit__rank {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .bo3-unit__thumb {
    width: 64px;
  }

  .bo3-unit__name {
    font-size: 15px;
  }

  .bo3-unit__comment {
    font-size: 13px;
  }

  .bo3-pending__item {
    grid-template-columns: 96px 1fr;
    gap: 10px;
  }
}
