/* ========= 共通（トップ以外も使う最低限） ========= */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}

header {
  background-color: #333;
  color: #fff;
  padding: 5px;
  font-size: 18px;
}

/* テーブル（共通） */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 1rem; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: center; }
th { background:#007bff; color:#fff; }

/* 画像のはみ出し防止（トップ以外にも無害） */
img { max-width:100%; height:auto; }

/* ========== ここから “トップだけ” (.home) に限定 ========== */
.home .container { max-width:1080px; margin:0 auto; padding:16px; box-sizing:border-box; }

/* 旧ルールの干渉を遮断（nav の inline-block など） */
.home nav ul { list-style:none; padding:0; margin:0; }
.home nav ul li { margin:0; display:block; }

/* ヒーロー */
.home .hero { display:grid; gap:16px; align-items:center; grid-template-columns:1fr; margin-bottom:12px; }
@media (min-width:640px){ .home .hero { grid-template-columns:160px 1fr; } }

.home .hero-logo { width:100%; height:auto; max-width:420px; margin:0 auto; display:block; }
.home .title { font-size:clamp(20px,4.5vw,28px); margin:0; }
.home .meta  { font-size:clamp(14px,3.6vw,16px); line-height:1.6; margin:.4rem 0 0; }

/* Information */
/* .home .info h3 { margin:16px 0 8px; font-size:18px; } */
.home .info h3 { margin:18px 0 10px; font-size:18px; }
.home .scroll-text {
  overflow:hidden; white-space:nowrap;
  background:#fff5f5; border:1px solid #f2caca; border-radius:8px;
  padding:8px 0; color:#d33; font-size:clamp(14px,3.6vw,15px);
}
.home .scroll-text > span { display:inline-block; padding-left:100%; animation:marquee 12s linear infinite; }
@keyframes marquee { 0%{transform:translateX(0);} 100%{transform:translateX(-100%);} }
@media (prefers-reduced-motion:reduce){ .home .scroll-text > span{ animation:none; padding-left:0; } }

/* コンテンツ見出し */
/* .home .contents h2 { margin:22px 0 10px; font-size:20px; } */
/*.home .contents h2 { display: inline-block; background: linear-gradient(transparent 90%, #a7d6ff 90%); } */
.home .contents h2 {
  position: relative;
  display: inline-block;
}
.home .contents h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1em;
  width: 300%; /* ← アンダーラインの長さを調整 */
  height: 0.1em;
  transform:translateX(-50%);
  background-color: #a7d6ff;
}
.home .contents h3 { margin:18px 0 10px; font-size:18px; }

/* ボタン群（グリッド） */
.home .grid-buttons {
  display:grid; gap:10px; grid-template-columns:repeat(2,1fr);
  margin:0 0 16px; padding:0; list-style:none;
}
@media (min-width:640px){ .home .grid-buttons{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:960px){ .home .grid-buttons{ grid-template-columns:repeat(6,1fr); } }

.home .btn {
  display:block; text-align:center; text-decoration:none;
/*  background:#1e73be; color:#fff; border-radius:10px;*/
  background:#2385DC; color:#fff; border-radius:10px;
  border-radius:10px;
  padding:12px 10px; font-weight:600; font-size:clamp(14px,3.4vw,16px);
  box-shadow:0 2px 6px rgba(0,0,0,.06);
}
.home .btn.another { background:#82bbed; color:#fff; border:2px solid #1e73be; }
.home .btn.outline { background:#fff; color:#1e73be; border:2px solid #1e73be; }
.home .btn.u9      { background:#df9320; color:#fff; border:2px; }

/* 前年度の結果：現年度の導線より控えめに表示 */
.home .past-results {
  margin:90px 0 4px;
  padding-top:28px;
  border-top:1px solid #ddd;
  font-size:clamp(13px,3vw,14px);
}
.home .past-results-label {
  display:inline-block;
  margin:0 0 7px;
  padding:3px 10px;
  border:1px solid #c8ced3;
  border-radius:999px;
  color:#7a858e;
  background:#f7f8f9;
  font-size:11px;
  font-weight:600;
  letter-spacing:.08em;
}
.home .past-results-heading {
  display:block;
  margin:0;
  color:#58636c;
  font-size:clamp(17px,3.8vw,19px);
  font-weight:600;
}
.home .past-results-link {
  display:block;
  margin:22px 0 0;
  line-height:1.7;
}
.home .past-results a {
  color:#66727d;
  text-decoration:none;
  border-bottom:1px dotted #9aa4ad;
}
.home .past-results a::before { content:"↗ "; }
.home .past-results a:hover,
.home .past-results a:focus-visible {
  color:#1e73be;
  border-bottom-color:#1e73be;
}

/* 2025年度の結果だけを表示する独立ページ */
.past-results-page .container { padding-top:28px; padding-bottom:28px; }
.past-results-page .past-results-title {
  margin:0 0 22px;
  font-size:clamp(17px,4vw,21px);
}
.past-results-page .past-results-title::before { content:"▼ "; }
.past-results-page .past-u9-row {
  width:min(180px, 100%);
  grid-template-columns:1fr;
}
.past-results-page .back-to-current {
  margin:30px 0 0;
  padding-top:16px;
  border-top:1px solid #ddd;
  font-size:14px;
}
.past-results-page .back-to-current a { color:#66727d; }

/* スポンサー欄 */
.home .sponsor { margin:24px 0; color:#666; font-size:14px; }

.home .instagram-banner {
  width: min(420px, calc(100% - 8px));
  margin: 0 auto;
}

.home .instagram-banner-title {
  margin: 0 0 6px;
  color: #666;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.home .instagram-banner a {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  box-sizing: border-box;
  background: #111;
  border: 2px solid #d9468a;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  overflow: hidden;
  text-decoration: none;
}

.home .instagram-banner a:hover {
  text-decoration: none;
  opacity: .92;
}

.home .instagram-banner img {
  width: 100%;
  height: 234px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

@media (max-width: 480px) {
  .home .instagram-banner a {
    grid-template-columns: repeat(3, 1fr);
  }

  .home .instagram-banner img {
    height: 209px;
  }
}

/* ========== ここから “トーナメント固定ページだけ” ========== */
/* body に tournament-fixed を付与したページで有効 */
.tournament-fixed img,
.tournament-fixed svg { max-width:none !important; height:auto; }

.tournament-fixed .page-wrap, .tournament-fixed body { min-width:1100px; }

.tournament-fixed .tournament {
  position:relative; width:1000px; margin:40px auto;
  overflow:visible; white-space:normal; font-family:sans-serif;
}
.tournament-fixed .winner-round,
.tournament-fixed .loser-round { min-width:1000px; position:relative; z-index:2; }
.tournament-fixed .match { position:relative; z-index:3; }
.tournament-fixed .svg-lines,
.tournament-fixed .loser-lines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:1; }

.tournament-fixed table { width:1000px; min-width:1000px; margin:20px auto; font-size:1rem; }
.tournament-fixed .table-container { display:block; }

@media (max-width:600px){
  .tournament-fixed table { min-width:1000px; }
}

/* スポンサー見出し（任意） */
.home .sponsor-title{ margin:8px 0 10px; font-size:16px; color:#555; }

/* 2枚横並び（SPは1列） */
.home .sponsor-banners{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
  align-items:center;
  justify-items:center;
}
@media (max-width:640px){
  .home .sponsor-banners{ grid-template-columns:1fr; }
}

/* 枠と高さを揃える（ロゴ比率が違っても均一に見える） */
.home .banner{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:90px;          /* ロゴ台の高さ。大きくしたい時は増やす */
  background:#fff;
  border-radius:10px;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
  padding:8px 12px;
}
.home .banner img{
  max-height:70px;          /* ロゴ実高さの上限。調整可 */
  width:auto;
  height:auto;
  object-fit:contain;
}
