@charset "UTF-8";

/* JHAトーナメント表 3.0 2026/11 */

.yagura3 {
  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 8px;
  background: #f0f0f2;
  color: #222;
  font-size: 12px;
  -webkit-text-size-adjust: none;
  break-inside: avoid;
}

.round-title {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.5;
}

.tournament-viewport {
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.round-container {
  --round-count: 6;
  --slot-count: 16;
  --slot-height: 82px;
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.round-column {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

.round-detail {
  flex: 0 0 auto;
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  border-bottom: 1px solid #ccc;
  text-align: center;
  line-height: 1.2;
}

.round-block {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Leave a channel on the right of each round for advancement lines. */
.round {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(var(--slot-count), var(--slot-height));
  grid-auto-flow: row;
  align-content: start;
  width: 82%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.round-column:last-child .round {
  width: 100%;
}

.matchup {
  grid-row: span var(--slot-span, 1);
  align-self: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  font-size: clamp(10px, 1.4vw, 14px);
}

.matchblank {
  grid-row: span 1;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.team {
  position: relative;
  box-sizing: border-box;
  height: 25px;
  margin: 3px 0;
  padding: 0 5px;
  overflow: hidden;
  background: #fff;
  line-height: 24px;
  white-space: nowrap;
  list-style: none;
  -webkit-text-size-adjust:none;
}

.score {
  position: absolute;
  right: 3px;
  color: #aaa;
}

.matchup .fnts { font-size: 11px;   font-size: clamp(9px, 1.3vw, 12px);}
.matchup .fntss { font-size: 10px; font-size: clamp(8px, 1.2vw, 10px);}
.matchup .fntsss { font-size: 9px; font-size: clamp(7px, 1.1vw, 9px);}
.matchup .fntssss { font-size: 8px; font-size: clamp(6px, 1.0vw, 8px);}

li.winner .score { color: #000; }
.winner { font-weight: bold; }
.champion, .gold { font-weight: bold; background-color: gold; }
.silver { background-color: silver; }
.bronze { background-color: #cc9966; }
li.champion .score, li.silver .score, li.bronze .score { color: #000; }
li.n-a { opacity: 0.5; }
li.team img.flags { width: 18px; }

.round-center {
  display: grid;
  width: 100%;
}
.round-center .matchup {
  grid-row: 1 / -1;
  align-self: center;
}

/* SVG lines are calculated from the actual winning-team positions. */
.slot-connectors {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.slot-connectors path {
  fill: none;
  stroke: #aaa;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.slot-connectors path.winner-path {
  stroke: #db3125;
  stroke-width: 2;
}

/* 旧yaguraの線 */
.round-line { display: none !important; }

@media (max-width: 767px) {
  .yagura3 {
    padding: 8px 4px;
  }

  .tournament-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .round-container {
    width: calc(100% * var(--round-count));
  }

  .round-column {
    flex: 0 0 calc(100% / var(--round-count));
    scroll-snap-align: start;
  }

  .round-detail {
    min-height: 34px;
  }

  .round {
    width: 82%;
  }

  .round-column:last-child .round {
    width: 100%;
  }

  .matchup {
    padding: 2px 0;
    font-size:14px;
  }
  .matchup .fnts { font-size: 14px;}
  .matchup .fntss { font-size: 14px;}
  .matchup .fntsss { font-size: 12px;}
  .matchup .fntssss { font-size: 12px;}

  .team {
    height: 20px;
    /*margin: 1px 0;*/
    line-height: 19px;
  }
}

.mobile-round-nav {
  display: none;
}

@media (max-width: 767px) {
  .mobile-round-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0 2px;
  }

  .mobile-round-nav button {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 8px 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 13px;
  }

  .mobile-round-nav button:disabled {
    opacity: .35;
  }

  .mobile-round-nav .mobile-round-label {
    flex: 1 1 auto;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
  }
}



