/* 大会ページ /competitions/{id}/（scripts/prerender-competitions.js が生成）専用。
   色は style.css の変数を使い、ライト／ダーク両方に追従する。 */

.cp-main { max-width: 860px; margin: 0 auto; padding: 12px 16px 40px; overflow-wrap: anywhere; }
.cp-main h1 { font-size: 22px; line-height: 1.35; margin: 8px 0 6px; color: var(--text); }
.cp-main h2 {
  font-size: 16px; margin: 28px 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--accent); color: var(--text);
}
.cp-crumbs { font-size: 12px; color: var(--text-muted); }
.cp-crumbs a { color: var(--accent); text-decoration: none; }
.cp-lead { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }

.cp-facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 8px;
  margin: 0 0 12px;
}
.cp-facts > div {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.cp-facts dt { font-size: 11px; color: var(--text-muted); }
.cp-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--text); }

.cp-actions { margin: 0 0 8px; }
.cp-btn {
  display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--accent); color: #fff; text-decoration: none;
}
.cp-btn:hover { opacity: 0.88; }

/* 日程・結果 */
.cp-day h3 { font-size: 13px; margin: 16px 0 6px; color: var(--text-muted); }
.cp-matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-match {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.cp-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cp-time small { display: block; font-size: 10px; }
.cp-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.cp-team { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); min-width: 0; }
.cp-team span { overflow-wrap: anywhere; }
.cp-home { justify-content: flex-end; text-align: right; }
.cp-win { font-weight: 700; }
.cp-lose { color: var(--text-muted); }
.cp-score {
  display: flex; flex-direction: column; align-items: center;
  font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cp-score small { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.cp-vs { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.cp-live { color: #dc2626; }
.cp-meta { grid-column: 2; font-size: 11px; color: var(--text-muted); text-align: center; overflow-wrap: anywhere; }
.cp-flag { width: 24px; height: 18px; border-radius: 2px; flex-shrink: 0; object-fit: cover; }
.cp-logo { width: 20px; height: 20px; flex-shrink: 0; object-fit: contain; }

/* 順位表 */
.cp-table-wrap { overflow-x: auto; margin-bottom: 12px; }
.cp-standings {
  width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text);
  background: var(--bg-card); font-variant-numeric: tabular-nums;
}
.cp-standings caption { text-align: left; font-weight: 700; padding: 4px 0; }
.cp-standings th, .cp-standings td { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.cp-standings th { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.cp-standings .cp-st-team { text-align: left; }
.cp-st-team > span { display: inline-flex; align-items: center; gap: 6px; }
.cp-pts { font-weight: 700; }

/* 関連ニュース・ほかのシーズン */
.cp-news, .cp-siblings { list-style: none; margin: 0; padding: 0; }
.cp-news li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cp-news a, .cp-siblings a { color: var(--accent); text-decoration: none; }
.cp-news a:hover, .cp-siblings a:hover { text-decoration: underline; }
.cp-news-date { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cp-siblings { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }

/* competitions.html に埋め込む全大会リンク */
.comp-all-pages h3 { font-size: 13px; margin: 14px 0 6px; color: var(--text); }
.comp-all-pages ul { margin: 0; padding-left: 18px; columns: 2 240px; font-size: 13px; }
.comp-all-pages li { margin: 3px 0; break-inside: avoid; }
.comp-all-pages a { color: var(--accent); text-decoration: none; }

@media (max-width: 480px) {
  .cp-match { grid-template-columns: 1fr; }
  .cp-meta { grid-column: 1; }
  .cp-team { font-size: 13px; }
}
