/* W杯2026 専用スタイル — soccer-king.jp / football-lab.jp 風リデザイン */
:root {
  --c-text: #1a1a1a;
  --c-text-sub: #666;
  --c-border: #e5e5e5;
  --c-border-strong: #cccccc;
  --c-bg: #ffffff;
  --c-bg-subtle: #f7f7f7;
  --c-accent: #c1304a;        /* sports media red */
  --c-navy: #1a2754;
  --c-japan: #BC002D;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "メイリオ", sans-serif;

  /* 後方互換: 旧--wc-*変数の別名（既存ページが使ってる） */
  --wc-primary: var(--c-text);
  --wc-accent: var(--c-accent);
  --wc-japan: var(--c-japan);
  --wc-border: var(--c-border);
  --wc-text: var(--c-text);
  --wc-text-sub: var(--c-text-sub);
  --wc-card: var(--c-bg);
  --wc-bg: var(--c-bg);
  --wc-gold: #d4af37;
  --wc-today: #fffaed;
  --wc-today-border: #d4af37;
}

* { box-sizing: border-box; }

body.wc-page {
  background: var(--c-bg);
  color: var(--c-text);
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wc-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* === Header === */
.wc-header {
  background: #0d0d0d;
  border-bottom: 4px solid var(--c-accent);
  padding: 20px 16px 18px;
  margin-bottom: 0;
}
.wc-header h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.wc-header .wc-tagline {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}
.wc-back-link {
  display: inline-block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  text-decoration: none;
}
.wc-back-link:hover { color: #ffffff; text-decoration: none; }

/* === Countdown === */
.wc-countdown {
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-japan);
  padding: 14px 18px;
  margin: 16px 0 22px;
}
.wc-countdown .label {
  font-size: 11px;
  color: var(--c-text-sub);
  letter-spacing: 0.04em;
}
.wc-countdown .next-match {
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 8px;
  color: var(--c-text);
}
.wc-countdown .timer {
  font-size: 30px;
  font-weight: 800;
  color: var(--c-japan);
  font-feature-settings: "tnum";
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.wc-countdown .when {
  font-size: 11px;
  color: var(--c-text-sub);
  margin-top: 6px;
}

/* === Nav === */
.wc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 24px;
}
.wc-nav a {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-sub);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  background: #ffffff;
  border: 1.5px solid var(--c-border);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wc-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.wc-nav a:hover {
  color: var(--c-text);
  border-color: var(--c-text);
  text-decoration: none;
}
.wc-nav a.active {
  color: #ffffff;
  background: #0d0d0d;
  border-color: #0d0d0d;
  font-weight: 700;
}

/* === Section === */
.wc-section { margin: 28px 0 18px; }
.wc-section h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--c-accent);
  color: var(--c-text);
  text-transform: none;
}

/* === Match cards === */
.wc-match {
  background: #ffffff;
  border: 1px solid var(--c-border);
  padding: 12px 14px;
  margin-bottom: 6px;
}
.wc-match.japan-match {
  border-left: 3px solid var(--c-japan);
  background: #fff8f9;
}
.wc-match-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.wc-kickoff {
  font-size: 14px;
  font-weight: 700;
  font-feature-settings: "tnum";
  min-width: 64px;
  text-align: center;
  border-right: 1px solid var(--c-border);
  padding-right: 14px;
}
.wc-kickoff small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--c-text-sub);
}
.wc-teams {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wc-team-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  padding: 2px 0;
}
.wc-team-row.winner .wc-team-name { font-weight: 700; }
.wc-team-flag {
  font-size: 16px;
  line-height: 1;
}
.wc-team-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
}
.wc-team-name { flex-shrink: 0; font-size: 13.5px; }
.wc-team-tla {
  font-size: 11px;
  color: var(--c-text-sub);
  font-feature-settings: "tnum";
  font-weight: 400;
}
.wc-team-score {
  font-weight: 700;
  font-feature-settings: "tnum";
  min-width: 22px;
  text-align: right;
}
.wc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted var(--c-border);
}
.wc-tag {
  font-size: 10px;
  padding: 1px 8px;
  background: var(--c-bg-subtle);
  color: var(--c-text-sub);
  border: 1px solid var(--c-border);
  letter-spacing: 0.02em;
}
.wc-tag.group {
  background: #fff;
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.wc-tag.stage {
  background: #fff;
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.wc-tag.status-finished {
  background: #ddd;
  color: #555;
  border-color: #ccc;
}
.wc-tag.status-live {
  background: var(--c-accent);
  color: white;
  border-color: var(--c-accent);
  font-weight: 700;
}

/* === ハイライト動画リンク（YouTubeスタイル・1試合1ボタン） === */
.wc-match-top.has-highlight {
  grid-template-columns: auto 1fr auto;
}
.wc-match-highlight {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #ff0000;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  border-radius: 4px;
  white-space: nowrap;
  align-self: center;
  transition: background 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.wc-match-highlight:hover {
  background: #cc0000;
  text-decoration: none !important;
}

/* === Tables === */
.wc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--c-border);
  font-size: 13px;
}
/* グループ順位表 共通列幅（Group A〜Lで揃える） */
.wc-table th:nth-child(1), .wc-table td:nth-child(1) { width: 6%; }
.wc-table th:nth-child(2), .wc-table td:nth-child(2) { width: 32%; }
.wc-table th:nth-child(3), .wc-table td:nth-child(3) { width: 7%; }
.wc-table th:nth-child(4), .wc-table td:nth-child(4) { width: 7%; }
.wc-table th:nth-child(5), .wc-table td:nth-child(5) { width: 7%; }
.wc-table th:nth-child(6), .wc-table td:nth-child(6) { width: 7%; }
.wc-table th:nth-child(7), .wc-table td:nth-child(7) { width: 14%; }
.wc-table th:nth-child(8), .wc-table td:nth-child(8) { width: 8%; }
.wc-table th:nth-child(9), .wc-table td:nth-child(9) { width: 12%; }
.wc-table th {
  background: var(--c-bg-subtle);
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--c-text-sub);
  border-bottom: 1px solid var(--c-border-strong);
}
.wc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
  word-break: break-word;
}
.wc-table tr:last-child td { border-bottom: none; }
.wc-table td.num, .wc-table th.num {
  text-align: right;
  font-feature-settings: "tnum";
}
.wc-table tr.japan {
  background: #fff5f7;
  font-weight: 700;
}
.wc-table tr:hover {
  background: var(--c-bg-subtle);
}
.wc-table tr.japan:hover {
  background: #ffeef1;
}
.wc-table tr.qualify-line {
  border-bottom: 2px solid var(--c-accent);
}
.wc-table .country-link {
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px dotted var(--c-border-strong);
}
.wc-table .country-link:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  text-decoration: none;
}
.wc-table tr.japan .country-link { color: var(--c-japan); }

/* === KPI grid === */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--c-border);
}
.kpi {
  padding: 14px 16px;
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: #fff;
}
.kpi:last-child { border-right: none; }
.kpi-label { font-size: 11px; color: var(--c-text-sub); margin-bottom: 4px; letter-spacing: 0.04em; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--c-text); line-height: 1.2; font-feature-settings: "tnum"; }
.kpi-sub { font-size: 11px; color: var(--c-text-sub); margin-top: 2px; }

/* === Empty / disclaimer === */
.wc-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--c-text-sub);
  font-size: 13px;
  border: 1px dashed var(--c-border);
}

/* === Footer === */
.wc-footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  font-size: 11px;
  color: var(--c-text-sub);
  line-height: 1.7;
}
.wc-footer a { color: var(--c-text-sub); }

/* === Mobile === */
@media (max-width: 600px) {
  .wc-header h1 { font-size: 17px; }
  .wc-countdown .timer { font-size: 22px; }
  .wc-section h2 { font-size: 13px; }

  /* スマホ：ナビを2列均等割（カード風） */
  .wc-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 12px 0 18px;
  }
  .wc-nav a {
    padding: 12px 8px;
    font-size: 12.5px;
  }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi { font-size: 11px; }
  .kpi-value { font-size: 18px; }
}
