/* =========================================================
   LiBERTÀ - Tournaments 共通スタイル（API / ADC / World 共通）
========================================================= */

/* ページ全体コンテナ */
.tournament-page {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 16px;
  color: #eaeaea;
}

/* 見出し */
.section-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  margin: 0 0 12px;
  text-align: left;  /* 左寄せ固定 */
}

.lead {
  opacity: 0.85;
  margin-bottom: 18px;
}

/* ロゴ */
.tournament-logo {
  max-width: 260px;
  height: auto;
  margin: 0 auto;
  display: block;
}


/* ================================================
   Summary（上部の大会サマリー）
   ※背景色なしでテキストのみ
================================================ */
#summaryBox {
  margin-bottom: 26px;
}

.summary-title {
  margin: 0 0 6px;
  font-size: 22px;
}

.summary-results {
  margin-top: 10px;
}

.summary-item {
  margin-bottom: 10px;
}

.summary-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.summary-item p {
  margin: 2px 0;
}

.tag-mvp {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ff40a0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}


/* ================================================
   汎用ボックス（Players / Match Results / Gallery）
================================================ */
.tournament-box {
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03); /* ごく薄い背景（重たければ消してもOK） */
}


/* ================================================
   タブ（主に Day / Discipline / Category）
================================================ */
.tabs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

.tab-btn {
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
}

.tab-btn:hover {
  background: rgba(255,255,255,0.16);
}

.tab-btn[aria-selected="true"] {
  background: #ff8a00;
  border-color: #ff8a00;
  color: #000;
  font-weight: 700;
}


/* ================================================
   フィルター（時間表示・Court・Ref / カテゴリチェック等）
================================================ */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 13px;
}

.filter-chip input {
  accent-color: #ff8a00;
}


/* ================================================
   Match Table（背景色なしでスッキリ）
================================================ */
.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #fff;
}

.match-table thead th {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  font-size: 11px;
  font-weight: 600;
}

.match-table tbody td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  vertical-align: middle;
}

.match-table .col-date {
  white-space: nowrap;
}

.match-table .col-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.match-table .col-vs {
  min-width: 160px;
}

.muted {
  opacity: 0.7;
  font-size: 12px;
}


/* ================================================
   カテゴリタグ（Foam / Cloth × Men / Women / Mixed）
================================================ */
.tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Foam：既存に近い淡い色 */
.tag-men.foam {
  background: rgba(120,180,255,0.18);
  border: 1px solid rgba(120,180,255,0.45);
  color: #e5f1ff;
}

.tag-women.foam {
  background: rgba(255,155,214,0.18);
  border: 1px solid rgba(255,155,214,0.45);
  color: #ffe6f5;
}

.tag-mixed.foam {
  background: rgba(255,200,120,0.18);
  border: 1px solid rgba(255,200,120,0.45);
  color: #fff3da;
}

/* Cloth：一段濃いめの青 / ピンク / イエロー系 */
.tag-men.cloth {
  background: #1d4ed8;
  border: 1px solid #1e40af;
  color: #e5edff;
}

.tag-women.cloth {
  background: #be185d;
  border: 1px solid #9d174d;
  color: #ffe4f0;
}

.tag-mixed.cloth {
  background: #b45309;
  border: 1px solid #92400e;
  color: #fff4dc;
}


/* ================================================
   結果表示（スコア & ○×）
================================================ */
.score-box {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
}

.wl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.wl .ok {
  color: #92ffba;
}

.wl .ng {
  color: #ff9090;
}


/* ================================================
   Players（カテゴリごとの小見出し＋カード）
================================================ */
.players-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin: 18px 0 8px;
}

/* グリッド：名前の長さに左右されないよう minmax(0,1fr) */
.players-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 700px) {
  .players-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.player-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.20);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.player-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.player-name {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

/* Captain / MVP バッジ（名前の右側に付く） */
.badge-captain {
  display: inline-block;
  margin-left: 6px;
  background: #ff8a00;
  color: #000;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 700;
}

.badge-mvp {
  display: inline-block;
  margin-left: 6px;
  background: #ff40a0;
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 700;
}

/* ----------------------------------
   Players Photo Credit（控えめ版）
---------------------------------- */
.photo-credit {
  margin: 16px 0 24px;
  padding: 8px 12px;
  background: none; /* 背景なしで存在感を減らす */
  border-left: 2px solid #666; /* 極細の控えめなライン */
  border-radius: 0;
  color: #aaa;
  font-size: 11px;    /* 小さく */
  line-height: 1.4;   /* 詰め気味 */
  opacity: 0.75;      /* 少し薄めに */
}

.photo-credit p {
  margin: 4px 0;
}

.photo-credit .credit-title {
  font-weight: 600;
  font-size: 11.5px;
  margin-bottom: 6px;
  color: #bbb;
}

.photo-credit a {
  color: #ccc;         /* 強調しすぎない色 */
  text-decoration: none;
  opacity: 0.85;
}

.photo-credit a:hover {
  opacity: 1;
  text-decoration: underline;
}

.medal-emoji {
  font-size: 14px;
  vertical-align: middle;
  margin-left: 2px;
}

/* ================================================
   Gallery
================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
}

/* =========================================================
   Tournaments List Page (tournaments.html 用)
   - カードレイアウト＆グラデボーダー
   - UPCOMING / RESULT チップ
========================================================= */

/* ----- Tokens ----- */
:root {
  --tour-grad-main     : linear-gradient(to right, #ff8a00, #e52e71);
  --tour-grad-upcoming : linear-gradient(to right, #42e695, #3bb2b8);
  --tour-fg            : #e5e5e5;
  --tour-fg2           : #bbb;
  --tour-card-bg       : rgba(17,17,17,.8);
  --tour-shadow        : rgba(0,0,0,.4);
  --tour-shadow-h      : rgba(0,0,0,.6);
}

/* ----- Page Container ----- */
.tournaments-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  color: var(--tour-fg);
}

/* ----- Section Headings ----- */
.tournaments-section {
  margin-top: 12px;
}

.tournaments-section__title {
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: #fff;
  position: relative;
  padding-bottom: 6px;
}
.tournaments-section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--tour-grad-main);
  opacity: .9;
}

/* 年見出し（2025 / 2024 など） */
.tournaments-year {
  margin: 14px 0 8px;
  font-size: 1rem;
  color: #fff;
  opacity: .9;
}

/* ----- Grid ----- */
.tournaments-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .tournaments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .tournaments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- Card ----- */
.tournament-card {
  position: relative;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  background-color: var(--tour-card-bg);
  box-shadow: 0 4px 12px var(--tour-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tournament-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--tour-shadow-h);
}

/* 1px gradient border via pseudo-element */
.tournament-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 16px;
  background: var(--tour-grad-main);
  -webkit-mask: linear-gradient(#000 0 0) content-box,
                 linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----- Card Head（タイトル＋ロゴ） ----- */
.tournament-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.tournament-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
  position: relative;
  padding-bottom: 6px;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

/* タイトル下のグラデライン */
.tournament-card__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--tour-grad-main);
}

/* トーナメントロゴ */
.tournament-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}

/* ----- Facts（開催地・日程など） ----- */
.tournament-facts {
  display: grid;
  gap: 6px;
  margin: 0;
}

.tournament-facts__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
}

.tournament-facts__term {
  color: #ff8500;
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .2px;
}

.tournament-facts__desc {
  margin: 0;
  font-size: .95rem;
  color: #f1f1f1;
}

/* ----- Actions（UPCOMING / RESULT + リンク） ----- */
.tournament-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ステータスチップ */
.tournament-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.tournament-chip--upcoming {
  color: #42e695;
  border-color: rgba(66,230,149,.4);
}
.tournament-chip--result {
  color: #ff9a33;
  border-color: rgba(255,154,51,.4);
}

/* 「大会詳細」リンク */
.tournament-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .5px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all .2s ease;

  background: linear-gradient(to right, #ff8a00, #e52e71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tournament-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #ff8a00, #e52e71);
  opacity: .6;
  transition: opacity .2s ease;
}

.tournament-link::after {
  content: "»";
  font-weight: 900;
  transform: translateX(0);
  transition: transform .2s ease;
  background: linear-gradient(to right, #ff8a00, #e52e71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tournament-link:hover::after {
  transform: translateX(4px);
}
.tournament-link:hover::before {
  opacity: 1;
}

/* maincontents.css の見出し装飾を打ち消し */
.tournaments-page h1,
.tournaments-page h2,
.tournaments-page h3,
.tournaments-page h4,
.tournaments-page h5 {
  margin: 0;
  border: 0;
  color: inherit;
  text-shadow: none;
}
.tournaments-page h2 {
  border-bottom: 0;
}
.tournaments-page h2::before {
  content: none;
}
.tournaments-page h3 {
  border-left: 0;
  border-image: none;
  padding-left: 0;
  margin: 0;
}

/* 一覧内の a は背景色なしで表示 */
.tournaments-page a {
  background: transparent;
  -webkit-text-fill-color: inherit;
}

/* 年チップ（2025など） */
.tournament-yearchip {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(to right, #ff8a00, #e52e71);
  vertical-align: middle;
}