@charset "UTF-8";

@import url("nh-yosen.css");

/* =========================================================
   決勝大会ページ専用
   ========================================================= */

.finals-main {
  max-width: var(--content-width);
  margin: 30px auto 0;
}

.finals-content {
  padding: 28px 30px 48px;
  background: #fff;
  border: 1px solid #c9d9e8;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(0, 70, 130, .08);
}

.finals-section {
  margin: 0 0 54px;
}

.finals-section:last-child {
  margin-bottom: 0;
}

/* 大会概要 */
.finals-overview-lead {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 2;
  font-weight: 500;
}

.finals-overview {
  margin: 0;
  border-top: 1px solid #d6e1e9;
}

.finals-overview__row {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  border-bottom: 1px solid #d6e1e9;
}

.finals-overview dt,
.finals-overview dd {
  margin: 0;
  padding: 12px 14px;
}

.finals-overview dt {
  background: #f2f6f8;
  color: #314b5d;
  font-weight: 700;
  white-space: pre;
}

.finals-overview dd {
  background: #fff;
}

/* 出場NH */
.finals-players {
  display: grid;
  gap: 28px;
}

.finals-player-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
}

.finals-player-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;

  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #e3e6eb;
  color: #222;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  font-weight: 500;
}

.finals-player-label span {
  display: block;
}

.finals-player-grid {
  display: grid;
  gap: 16px;
}

.finals-player-grid--seed {
  grid-template-columns: repeat(3, minmax(0, 145px));
}

.finals-player-grid--qualifier {
  grid-template-columns: repeat(5, minmax(0, 145px));
}

.finals-player-card {
  margin: 0;
  text-align: center;
}

.finals-player-card img {
  display: block;
  width: 100%;
  aspect-ratio: 145 / 198;
  object-fit: cover;
  border-radius: 12px;
  background: #e8e8e8;
}

.finals-player-card figcaption {
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
}

/* 大会方式 */
.finals-text {
  margin: 0;
  font-size: 15px;
  line-height: 2;
}

/* トーナメント表 */
.finals-bracket-placeholder {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 30px;
  border: 1px dashed #9fb4c3;
  border-radius: 14px;
  background: #f7fafc;
  color: #718493;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* スケジュール */
.finals-schedule {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #d6e1e9;
  border-radius: 12px;
  background: #fbfcfd;
  font-size: 15px;
  line-height: 2;
  text-align: center;
  font-weight: 700;
}

/* 併催イベント */
.finals-event {
  margin-top: 10px;
  padding: 22px 0;
  border-top: 1px solid #d7e0e7;
}

.finals-event:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.finals-event__title {
  margin: 0 0 10px;
  color: #0052a4;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 800;
}

.finals-event__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
}

.finals-event__text + .finals-event__text {
  margin-top: 8px;
}

.finals-event-photos {
  display: grid;
  grid-template-columns: repeat(5, 145px);
  gap: 16px;
  margin-top: 18px;
  justify-content: start;
}

.finals-event-photo {
  margin: 0;
  text-align: center;
}

.finals-event-photo img {
  display: block;
  width: 145px;
  aspect-ratio: 145 / 198;
  object-fit: cover;
  border-radius: 12px;
  background: #e8e8e8;
}

.finals-event-photo figcaption {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.finals-pair-photo {
  width: 260px;
  margin: 18px 0 0;
  text-align: center;
}

.finals-pair-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #e8e8e8;
}

.finals-pair-photo figcaption {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.finals-note {
  margin: 18px 0 0;
  color: #666;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

/* 決勝大会の大会風景は後から写真を追加 */
.finals-gallery-placeholder {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 1px dashed #b9cfe0;
  border-radius: 12px;
  background: #fff;
  color: #7890a2;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .finals-main {
    max-width: none;
    margin-top: 22px;
  }

  .finals-content {
    padding: 22px 16px 34px;
    border-radius: 16px;
  }

  .finals-overview__row {
    grid-template-columns: 1fr;
  }

  .finals-overview dt {
    padding-bottom: 6px;
  }

  .finals-overview dd {
    padding-top: 7px;
  }

  .finals-player-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .finals-player-label {
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 7px 14px;
    border-radius: 999px;
    justify-self: start;
  }

  .finals-player-label span {
    display: inline;
  }

  .finals-player-grid--seed,
  .finals-player-grid--qualifier {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finals-player-card figcaption {
    font-size: 16px;
  }

  .finals-bracket-placeholder {
    min-height: 240px;
  }

  .finals-schedule {
    text-align: left;
  }

  .finals-event-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .finals-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .finals-player-grid--seed,
  .finals-player-grid--qualifier {
    gap: 12px;
  }

  .finals-player-card figcaption {
    font-size: 15px;
  }

  .finals-event__title {
    font-size: 18px;
  }
}








/* 決勝大会トーナメント表を縦にゆったり */
.finals-tournament td {
  height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.finals-tournament .nh-tournament__name {
  height: 68px;
  vertical-align: middle;
  font-size: 16px;
  font-weight: 700;
}







.finals-tournament-player {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.finals-tournament-player img {
  display: block;
  width: 52px;
  height: 66px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.finals-tournament-player span {
  font-size: 16px;
  font-weight: 700;
}


.finals-tournament th:nth-child(1),
.finals-tournament td:nth-child(1) {
  width: 22%;
}

.finals-tournament th:nth-child(2),
.finals-tournament td:nth-child(2) {
  width: 26%;
}

.finals-tournament th:nth-child(3),
.finals-tournament td:nth-child(3) {
  width: 26%;
}

.finals-tournament th:nth-child(4),
.finals-tournament td:nth-child(4) {
  width: 26%;
}




.finals-tournament .nh-kifu-box__links {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.finals-tournament .nh-kifu-box__links a,
.finals-tournament .nh-kifu-box__links span {
  width: 78px;
  box-sizing: border-box;
  justify-content: center;
}






.finals-final-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  height: 100%;
  padding-top: 80px;
  box-sizing: border-box;
}

.finals-third-place {
  width: 88%;
  margin: 18px auto 0;
  border: 1px solid #8eb6d3;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.finals-third-place__title {
  padding: 7px 8px;
  background: #d9eef3;
  border-bottom: 1px solid #8eb6d3;
  color: #003e6b;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.finals-third-place__body {
  padding: 12px 8px 14px;
  text-align: center;
  line-height: 1.5;
}

.finals-third-place__players {
  margin: 8px 0 5px;
  font-size: 14px;
  font-weight: 700;
}






@media (max-width: 900px) {
  .finals-tournament {
    min-width: 900px;
  }

  .finals-tournament th:nth-child(1),
  .finals-tournament td:nth-child(1) {
    width: 200px;
  }

  .finals-tournament th:nth-child(2),
  .finals-tournament td:nth-child(2),
  .finals-tournament th:nth-child(3),
  .finals-tournament td:nth-child(3),
  .finals-tournament th:nth-child(4),
  .finals-tournament td:nth-child(4) {
    width: 230px;
  }
}

@media (max-width: 900px) {
  .finals-tournament-player img {
    width: 48px;
    height: 61px;
  }

  .finals-tournament-player span {
    font-size: 15px;
  }
}





/* ---------- プロ棋士VS学生アマNH 団体戦 ---------- */

.finals-team-table-scroll {
  margin-top: 20px;
  margin-bottom: 30px;
  overflow-x: auto;
  border: 1px solid #8aa5bb;
  border-radius: 12px;
  background: #fff;
}

.finals-team-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.finals-team-table th,
.finals-team-table td {
  width: 20%;
  padding: 12px 8px;
  border: 1px solid #8aa5bb;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.5;
}

.finals-team-table thead tr:first-child th {
  background: #dff4f7;
  color: #183548;
  font-weight: 700;
  font-size: 15px;
}

.finals-team-table__time th {
  padding: 8px;
  background: #f2f8fb;
  color: #345;
  font-weight: 700;
}

.finals-team-table__pro td {
  padding-top: 15px;
  padding-bottom: 15px;
  background: #f7fafc;
  font-weight: 700;
}

.finals-team-table__school td {
  padding-top: 13px;
  padding-bottom: 13px;
  background: #f7fafc;
  font-weight: 700;
}

.finals-team-table__kifu td {
  padding-top: 9px;
  padding-bottom: 13px;
}

.finals-team-table .nh-kifu-box__links {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.finals-team-table .nh-kifu-box__links > * {
  width: 68px;
  box-sizing: border-box;
  justify-content: center;
}

@media (max-width: 900px) {
  .finals-team-table {
    min-width: 850px;
  }
}




/* 団体戦：左端の見出し列だけ細くする */
.finals-team-table th:first-child,
.finals-team-table td:first-child {
  width: 11%;
}

.finals-team-table th:not(:first-child),
.finals-team-table td:not(:first-child) {
  width: 17.8%;
}




@media (max-width: 900px) {
  .finals-event-photo img {
    margin-left: auto;
    margin-right: auto;
  }
}

.finals-event__title {
  margin-top: 20px;
}



.finals-exhibition-table {
  width: 50%;
}

/* エキシビション対局：左見出し列を細く */
.finals-exhibition-table .finals-team-table td:first-child {
  width: 24%;
}

.finals-exhibition-table .finals-team-table td:nth-child(2) {
  width: 76%;
}

@media (max-width: 900px) {
  .finals-exhibition-table {
    width: 100%;
  }

  .finals-exhibition-table .finals-team-table {
    min-width: 0;
    width: 100%;
  }
}






/* ===== 決勝大会ヘッダー ===== */

.nh-hero--final {
  position: relative;
  display: block;
  width: calc(100% - 40px);
  max-width: var(--content-width);
  margin: 18px auto 0;
  padding: 0;
  background: #01090e;
  overflow: hidden;
}

.nh-hero--final .nh-hero__title {
  width: 100%;
  max-width: none;
  flex: none;
  margin: 0;
}

.nh-hero--final .nh-hero__title img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

/* ペア碁マーク：右上 */
.nh-hero--final .nh-hero__logo {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: auto;
  z-index: 2;
}

.nh-hero--final .nh-hero__logo img {
  display: block;
  width: 150px;
  height: auto;
}

@media (max-width: 900px) {
  .nh-hero--final {
    width: calc(100% - 24px);
    max-width: none;
    margin-top: 12px;
  }

  .nh-hero--final .nh-hero__logo {
    top: 12px;
    right: 12px;
    bottom: auto;
  }

  .nh-hero--final .nh-hero__logo img {
    width: 100px;
  }
}





/* 決勝大会ページの棋譜ボタン */
.finals-main .nh-kifu-button {
  font-size: 14px;
  padding-left: 10px;
  padding-right: 10px;
}








