/* ========================================
   Match detail page（試合詳細）
   ※ detail.css の後に読み込む
======================================== */

/* ---- Match KV（Figma: Section 4262:5011） ---- */
.p-mkv {
  background: var(--color-white);
  padding: 40px 0;
}
.p-mkv__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 157px;
  box-sizing: border-box;
}

/* 上段：国旗＋チーム名 / 日付・会場・ステージ */
.p-mkv__head {
  display: grid;
  grid-template-columns: 30% 40% 30%;
  align-items: center;
}
.p-mkv__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 50px 0;
}
.p-mkv__flag {
  display: block;
  width: 106px;
  max-width: 100%;
  aspect-ratio: 85 / 57;
  height: auto;
  object-fit: cover;
}
.p-mkv__team-name {
  margin: 0;
  color: #021231;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 20px;
  text-align: center;
}
.p-mkv__info {
  display: flex;
  flex-direction: column;
}
.p-mkv__date {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 91px;
  margin: 0;
  color: var(--color-navy);
  font-family: var(--font-en-title);
  font-weight: 700;
  font-size: 50px;
  line-height: 1;
  text-align: center;
}
.p-mkv__venue {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 28px;
  background: #F1E7FD;
  color: #021231;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 20px;
  text-align: center;
}
.p-mkv__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 20px;
  text-align: center;
}

/* 下段：得点者＋スコア */
.p-mkv__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.p-mkv__scorers {
  width: 340px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #021231;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.7;
  text-align: center;
}
.p-mkv__score {
  width: 233px;
  margin: 0;
  color: var(--color-navy);
  font-family: var(--font-en-title);
  font-weight: 700;
  font-size: 120px;
  line-height: 120px;
  text-align: center;
  white-space: nowrap;
}

/* ---- 背景画像付きセクション ---- */
.p-section--bg {
  margin: 0 auto;
  padding: 72px 0;
}
.p-section--bg::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
    url("../images/bg_img.png") center top / 100% auto repeat-y;
}
body.page-detail.is-olympic .p-section--bg::before {
  background:
    linear-gradient(180deg, rgba(240, 237, 232, 0.4), rgba(240, 237, 232, 0.4)),
    url("../images/bg_ol_img.png") center top / 100% auto repeat-y;
}

/* ---- Lineup tables ---- */
.c-lineups {
  grid-row: 3;
  grid-column: 1;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  margin-top: 40px;
}
.c-lineup {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  color: var(--color-navy);
}
.c-lineup__group th {
  padding: 8px 16px;
  color: var(--color-navy);
  font-family: var(--font-en-sub);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-align: left;
}
/* 日本 */
.c-lineup--jpn .c-lineup__group th {
  background: rgba(225, 0, 110, 0.2);
}
/* 対戦国 */
.c-lineup--opp .c-lineup__group th {
  background: #ccc;
}
.c-lineup td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 30, 85, 0.1);
  line-height: 1.5;
  vertical-align: middle;
}
.c-lineup tr:last-child td {
  border-bottom: none;
}
.c-lineup__pos {
  width: 4.5em;
  font-family: var(--font-en-sub);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}
.c-lineup__no {
  width: 3em;
  font-family: var(--font-en-sub);
  font-weight: 700;
  text-align: right;
}
.c-lineup__sub {
  margin-left: 6px;
  font-size: 12px;
  color: rgba(0, 30, 85, 0.6);
}
.c-lineup__captain {
  margin-right: 4px;
  font-size: 12px;
}
.c-lineup__manager td {
  font-weight: 700;
}

/* ---- Match pager ---- */
.c-match-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 20px 48px;
}
.c-match-pager__prev,
.c-match-pager__next {
  flex: 0 1 300px;
}
.c-match-pager__back {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
}
.c-match-pager .c-more {
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.c-match-pager .c-more--prev::after {
  content: none;
}
.c-match-pager .c-more--prev::before {
  content: "chevron_left";
  font-family: "Material Icons";
  font-size: 22px;
  line-height: 1;
  margin-right: 4px;
  transition: transform 0.2s ease-out;
}
.c-match-pager .c-more--prev:hover::before,
.c-match-pager .c-more--prev:focus::before {
  transform: translateX(-3px);
}
/* 前後の試合：白地＋ピンク */
.c-match-pager__prev .c-more,
.c-match-pager__next .c-more {
  border: 3px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: 5px 5px 0 0 var(--color-primary);
}
.c-match-pager__prev .c-more:hover,
.c-match-pager__prev .c-more:focus,
.c-match-pager__next .c-more:hover,
.c-match-pager__next .c-more:focus {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 5px 5px 0 0 var(--color-white);
}
.c-match-pager__back .c-more {
  max-width: 360px;
  box-shadow: 5px 5px 0 0 var(--color-navy);
}
.c-match-pager__back .c-more:hover,
.c-match-pager__back .c-more:focus {
  background: var(--color-navy);
  color: var(--color-white);
  box-shadow: 5px 5px 0 0 var(--color-primary);
}

@media (max-width: 640px) {
  .p-mkv {
    padding: 24px 0;
  }
  .p-mkv__inner {
    padding: 0 16px;
  }
  .p-mkv__head {
    grid-template-columns: 1fr 1fr;
  }
  .p-mkv__team {
    padding: 0;
  }
  .p-mkv__flag {
    width: 72px;
  }
  .p-mkv__team-name {
    font-size: 14px;
    line-height: 1.4;
  }
  .p-mkv__info {
    grid-row: 1;
    grid-column: 1 / -1;
    margin-bottom: 20px;
  }
  .p-mkv__date {
    height: auto;
    padding: 0 0 12px;
    font-size: 32px;
  }
  .p-mkv__venue,
  .p-mkv__stage {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
  }
  .p-mkv__result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    row-gap: 8px;
  }
  .p-mkv__score {
    grid-row: 1;
    grid-column: 1 / -1;
    width: auto;
    font-size: 56px;
    line-height: 1.2;
  }
  .p-mkv__scorers {
    width: auto;
    font-size: 13px;
  }
  .p-section--bg {
    padding: 40px 5%;
  }
  .c-lineups {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .c-lineup {
    font-size: 13px;
  }
  .c-lineup td {
    padding: 8px 12px;
  }
  .c-match-pager {
    padding: 24px 16px 40px;
  }
  .c-match-pager__prev,
  .c-match-pager__next {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
  }
  .c-match-pager__prev .c-more,
  .c-match-pager__next .c-more {
    padding: 0;
  }
}
