/*
 * B.LEAGUE 公式サイトのトーン（濃紺 #1F2731・#27313C、アクセントの赤 #B21920、薄灰 #F2F2F2）に合わせたスタイル。
 * 見やすさはデジタル庁デザインシステムの考え方を引き継ぐ：本文16px・補足14px以上・コントラスト4.5:1以上・
 * 操作部品の高さ48px・黒枠＋黄色のフォーカス表示。数字は細身の欧文書体（Barlow Condensed）でスポーツらしく。
 */
:root {
  /* プリミティブ */
  --blue-50: #e8f1fe;
  --blue-100: #d9e6ff;
  --blue-800: #0031d8;
  --blue-900: #0017c1;
  --blue-1000: #00118f;
  --purple-900: #5c10be;
  --gray-50: #f2f2f2;
  --gray-100: #e6e6e6;
  --gray-200: #cccccc;
  --gray-420: #949494;
  --gray-536: #767676;
  --gray-600: #666666;
  --gray-700: #4d4d4d;
  --gray-900: #1a1a1a;
  --green-50: #e6f5ec;
  --green-800: #197a4b;
  --yellow-50: #fbf5e0;
  --yellow-300: #ffd43d;
  --yellow-700: #b78f00;
  --yellow-1000: #6e5600;
  --red-800: #ec0000;
  --red-900: #ce0000;

  /* 役割 */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-sub: var(--gray-50);
  --ink: var(--gray-900);
  --ink-2: var(--gray-700);
  --muted: var(--gray-600);
  --line: var(--gray-200);
  --line-strong: var(--gray-536);
  --navy: #1f2731;
  --navy-2: #27313c;
  --slate: #5b6878;
  --red: #b21920;
  --red-dark: #8f1419;
  --red-soft: #fdeef0;
  --link: #27313c;
  --link-hover: var(--red);
  --link-visited: #27313c;
  --primary: var(--navy-2);
  --primary-hover: var(--navy);
  --primary-soft: #eef1f4;
  --tab-ink: var(--navy-2);
  --good: var(--green-800);
  --good-soft: var(--green-50);
  --warn-ink: var(--yellow-1000);
  --warn-line: var(--yellow-700);
  --warn-soft: var(--yellow-50);
  --up: var(--green-800);
  --down: var(--red-900);
  --chart-line: var(--navy-2);
  --num-font: "Barlow Condensed", "Noto Sans JP", sans-serif;
  --focus: var(--yellow-300);
  color-scheme: light;
}

/* DADS は明るい背景が基本。暗い表示を好む利用者向けに同じ考え方で段階を置き換える */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1c1c1c; --surface-sub: #262626;
    --ink: #f2f2f2; --ink-2: #d4d4d4; --muted: #b3b3b3; --line: #3d3d3d; --line-strong: #8c8c8c;
    --link: #e6e9ee; --link-hover: #ff8a8f; --link-visited: #e6e9ee;
    --primary: #e6e9ee; --primary-hover: #ffffff; --primary-soft: #2a3340; --tab-ink: #e6e9ee; --red: #e0454b; --red-soft: #3a1c1e;
    --good: #71c598; --good-soft: #13301f; --warn-ink: #ffd43d; --warn-line: #b78f00; --warn-soft: #332a08;
    --up: #71c598; --down: #ff8f8f; --chart-line: #e6e9ee;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px; line-height: 1.7; letter-spacing: .02em;
}
p { margin: 0 0 16px; }

/* リンク：下線あり、訪問済みは紫、ホバーで下線を太く */
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 4px solid var(--gray-900); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus); border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a:focus-visible, :root:not([data-theme="light"]) select:focus-visible,
  :root:not([data-theme="light"]) input:focus-visible { outline-color: var(--focus); box-shadow: 0 0 0 6px #000; }
}


.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.r { text-align: right; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
.big, .big-num .num, .stats b, td.rank, .fresh dd { font-family: var(--num-font); letter-spacing: .01em; }
.num small, .big-num small, .stats small { margin-left: 2px; font-size: 14px; font-weight: 400; color: var(--ink-2); }
small { font-size: 14px; }

/* ヘッダー：濃紺の帯＋上端の赤いライン。メニューは白文字のタブで、いまのページに赤い下線 */
.top { background: var(--navy); color: #fff; border-top: 4px solid var(--red); }
.top > .wrap { display: flex; align-items: center; min-height: 60px; }
.brand { font-weight: 700; color: #fff; text-decoration: none; font-size: 18px; display: flex; align-items: center; gap: 10px; letter-spacing: .04em; }
.brand:visited, .brand:hover { color: #fff; }
.logo { display: block; border-radius: 6px; }
.gnav { background: var(--navy-2); border-top: 1px solid rgba(255, 255, 255, .12); }
.gnav .wrap { display: flex; gap: 0; }
.gnav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px;
  color: #fff; text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: .06em;
}
.gnav a:visited { color: #fff; }
.gnav a:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.gnav a[aria-current="page"] { background: rgba(255, 255, 255, .08); }
.gnav a[aria-current="page"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 4px; background: var(--red); border-radius: 2px 2px 0 0; }
.gnav a:focus-visible, .brand:focus-visible { outline-color: var(--focus); box-shadow: 0 0 0 6px #000; }

main.wrap { padding: 32px 24px 64px; }

/* 見出し：DADS の見出しスケール（Std-32B / 24B / 20B） */
h1 { font-size: 32px; line-height: 1.5; margin: 8px 0 8px; letter-spacing: .01em; }
h2 { font-size: 24px; line-height: 1.5; margin: 48px 0 16px; padding-left: 14px; border-left: 6px solid var(--red); }
h3 { font-size: 18px; line-height: 1.6; margin: 0 0 8px; }
.meta { color: var(--ink-2); margin: 0 0 24px; }
.fine { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 16px 0; }
.warn-text { color: var(--warn-ink); }
.range { display: block; font-size: 18px; color: var(--ink-2); font-weight: 400; }
.vs { color: var(--muted); font-weight: 400; font-size: .75em; }

/* パンくずリスト */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 8px; padding: 0; font-size: 14px; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg); margin: 0 12px 0 8px; }
.crumbs [aria-current] { color: var(--ink-2); }

/* データの鮮度（説明リスト） */
.fresh { margin: 0 0 16px; }
.fresh > p { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; padding: 8px 14px; background: var(--surface-sub); border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.fresh b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fresh .note { color: var(--ink-2); }
.lead { font-size: 16px; color: var(--ink-2); margin: 0 0 12px; }

/* 通知バナー */
.banner { border: 1px solid var(--warn-line); border-left-width: 8px; background: var(--warn-soft); border-radius: 8px; padding: 12px 16px; margin-top: 12px; }
.banner p { margin: 0; font-size: 16px; }
.banner .banner-title { font-weight: 700; color: var(--warn-ink); }
.banner[hidden] { display: none; }

/* カテゴリーの切り替え：大きめのタブ。選択中は濃紺の塗り＋赤い下線 */
.cat-tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.cat-tabs a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 150px; height: 52px; padding: 0 24px;
  border: 2px solid var(--tab-ink); border-radius: 8px; background: var(--surface); color: var(--tab-ink);
  font-family: var(--num-font); font-size: 22px; font-weight: 700; letter-spacing: .04em; text-decoration: none;
}
.cat-tabs a:visited { color: var(--tab-ink); }
.cat-tabs a:hover { background: var(--primary-soft); color: var(--tab-ink); }
.cat-tabs a[aria-current="page"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.cat-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -2px; height: 4px; background: var(--red); border-radius: 2px 2px 0 0; }

/* 週の操作：前週／今週ボタン＋「ほかの週・節を選ぶ」（開閉） */
.week-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; margin: 0 0 24px; }
.pick { flex: 1 1 320px; }
.pick > summary {
  margin-top: 0;
  display: inline-flex; align-items: center; height: 48px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; list-style: none;
}
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 0 0 12px; }
.pick[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.pick-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 16px; }
.pick-form label, .filter-row label { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; color: var(--ink); gap: 8px; }
button {
  font: inherit; font-weight: 700; font-size: 16px; height: 48px; padding: 0 20px; border-radius: 8px; cursor: pointer;
  background: var(--navy-2); color: #fff; border: 1px solid var(--navy-2);
}
button:hover { background: var(--navy); text-decoration: underline; }
select {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 16px; height: 48px; min-width: 180px;
}
select:hover { border-color: var(--ink); }
.pick-form select { min-width: 300px; }
.seg { display: inline-flex; gap: 8px; }
.seg a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 48px; padding: 0 20px;
  border: 1px solid var(--primary); border-radius: 8px; color: var(--primary); background: var(--surface);
  text-decoration: none; font-weight: 700; font-size: 16px;
}
.seg a:visited { color: var(--primary); }
.seg a:hover { background: var(--primary-soft); text-decoration: underline; }
.seg a[aria-current="page"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.seg a[aria-current="page"]:hover { background: var(--primary-hover); }

.week-head { background: var(--navy); color: #fff; border-radius: 8px; padding: 20px 24px 20px; margin-bottom: 16px; border-left: 8px solid var(--red); }
.week-head h1 { color: #fff; margin: 4px 0 8px; }
.week-head .range { color: #d6dbe2; font-family: var(--num-font); font-size: 22px; font-weight: 600; letter-spacing: .03em; }
.week-head .setu { display: inline-block; margin-left: 12px; font-family: "Noto Sans JP", sans-serif; font-size: 16px; font-weight: 700; color: #fff; }
.week-head .meta { color: #e6e9ee; margin: 0; }
.week-head .pager a { color: #fff; font-weight: 700; }
.week-head .pager a:hover { color: #ffb3b6; }
.week-head .chip { background: #fff; }
.pager { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 8px; }

/* ラベル（タグ）：色だけに頼らず文字で状態を示す */
.chip {
  display: inline-block; font-size: 14px; line-height: 1.5; padding: 1px 8px; border-radius: 4px; margin: 0 4px;
  border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface); white-space: nowrap; vertical-align: 2px; font-weight: 400;
}
.chip.good { border-color: var(--good); color: var(--good); background: var(--good-soft); font-weight: 700; }
.chip.warn { border-color: var(--warn-line); color: var(--warn-ink); background: var(--warn-soft); font-weight: 700; }

/* テーブル */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.scroll.more-right { box-shadow: inset -18px 0 14px -14px rgba(0, 0, 0, .35); }
.scroll.more-left.more-right { box-shadow: inset -18px 0 14px -14px rgba(0, 0, 0, .35), inset 18px 0 14px -14px rgba(0, 0, 0, .35); }
.scroll.more-left:not(.more-right) { box-shadow: inset 18px 0 14px -14px rgba(0, 0, 0, .35); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: 14px; color: #fff; font-weight: 700; white-space: nowrap; background: var(--navy-2); border-bottom: 0; }
thead th small { color: #d6dbe2 !important; }
thead th.r { text-align: right; }
th small { display: block; font-weight: 400; color: var(--ink-2); }
tbody tr:hover { background: var(--surface-sub); }
td.rank { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; width: 4em; text-align: center; }
.rk { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); }
.rk.top { background: var(--red); color: #fff; }
td.club { font-weight: 700; min-width: 10em; }
td.club a { color: var(--ink); text-decoration: none; }
td.club a:visited { color: var(--ink); }
td.club a:hover { color: var(--link-hover); text-decoration: underline; text-decoration-thickness: 2px; }
td.notes { font-size: 14px; color: var(--ink-2); min-width: 8em; }
td.venue { font-size: 14px; color: var(--ink-2); min-width: 9em; }
.nm-short { display: none; }
.big { font-size: 26px; font-weight: 700; line-height: 1.2; }
.why { display: block; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }
tr[hidden] { display: none; }
.games-table td:first-child { white-space: nowrap; }

.filter-row { margin: 0 0 16px; }
.others { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.9; }
.others b { color: var(--ink); margin-right: 10px; }
.empty { padding: 20px; background: var(--surface-sub); border-radius: 8px; }
td.date small { display: block; color: var(--ink-2); }
.diff-m, .memo-m { display: none; }
.share textarea { width: 100%; font: inherit; font-size: 15px; line-height: 1.7; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); margin: 12px 0 8px; resize: vertical; }
.share details summary { margin-top: 0; }
.score { display: flex; align-items: center; gap: 14px; margin: 0 0 8px; font-family: var(--num-font); }
.score b { font-size: 44px; line-height: 1; color: var(--ink-2); }
.score b.win { color: var(--red); }
.score .dash { font-size: 28px; color: var(--muted); }
.score .team { font-family: "Noto Sans JP", sans-serif; font-weight: 700; font-size: 16px; }
.match a { color: inherit; text-decoration: none; }
.match a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.raw code { font-size: 13px; word-break: break-all; color: var(--ink-2); }
.chart .val { fill: var(--ink); font-size: 14px; font-weight: 700; font-family: var(--num-font); }
/* クラブ一覧 */
.club-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.club-grid a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-left: 6px solid var(--navy-2); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.club-grid a:visited { color: var(--ink); }
.club-grid a:hover { border-left-color: var(--red); background: var(--surface-sub); }
.club-grid a:hover b { text-decoration: underline; }
.club-grid small { display: block; color: var(--ink-2); margin-top: 2px; }

/* 試合ページのパネル */
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 8px 24px 24px; margin: 24px 0; background: var(--surface); }
.panel h2 { margin: 16px 0 16px; font-size: 22px; }
.kv { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.kv > div > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.kv p { margin: 4px 0 0; }
.big-num { font-size: 52px; font-weight: 700; line-height: 1.3; }
.big-num .chip { vertical-align: 10px; }
.evidence { font-size: 14px; color: var(--ink-2); margin: 16px 0 0; word-break: break-all; }
.evidence small { display: block; color: var(--ink-2); }
.src { margin-left: 8px; white-space: nowrap; }
.fact { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.fact p { margin: 0; }
.fact-item + .fact-item { margin-top: 12px; }
.history { font-size: 14px; color: var(--ink-2); padding-left: 1.4em; }
details summary { cursor: pointer; font-size: 16px; color: var(--link); margin-top: 16px; text-decoration: underline; text-underline-offset: 3px; }

/* クラブページの数値 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px 0 16px; }
.stats div { background: var(--surface-sub); border-radius: 8px; padding: 16px 20px; border-top: 4px solid var(--navy-2); }
.stats span { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stats b { font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1.4; }
.stats div > small { display: block; color: var(--ink-2); }

/* グラフ */
.chart { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--surface); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; font-family: inherit; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart .hitarea { fill: transparent; }
.chart .gap { fill: var(--warn-soft); }
.chart .hit:hover .dot { r: 6.5; }
.chart figcaption { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.tip { position: absolute; pointer-events: none; background: var(--gray-900); color: #fff; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -125%); }

/* 説明ページ */
.prose { max-width: 800px; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 32px; }
.prose table { border: 1px solid var(--line); }
.prose th { background: var(--surface-sub); width: 11em; vertical-align: top; font-size: 16px; }
.prose li { margin: 8px 0; }

.foot { background: var(--navy); color: #d6dbe2; font-size: 14px; padding: 28px 0 44px; border-top: 4px solid var(--red); }
.foot p { margin: 4px 0; }

@media (max-width: 640px) {
  .gnav .wrap { padding: 0; }
  .cat-tabs { gap: 6px; }
  .cat-tabs a { flex: 1; min-width: 0; padding: 0 4px; font-size: 18px; height: 48px; }
  .gnav a { flex: 1; padding: 0 4px; font-size: 16px; letter-spacing: .02em; }
  .gnav a[aria-current="page"]::after { left: 12px; right: 12px; }
  .week-head { padding: 16px; border-left-width: 6px; }
  .big { font-size: 22px; }
  .rk { width: 30px; height: 30px; }
  .wrap, main.wrap { padding-left: 16px; padding-right: 16px; }
  main.wrap { padding-top: 16px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; margin-top: 40px; }
  th, td { padding: 12px 10px; }
  table { font-size: 15px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stats b { font-size: 28px; }
  .kv { grid-template-columns: 1fr; }
  .big-num { font-size: 42px; }
  .panel { padding: 4px 16px 16px; }
  .week-tools { gap: 8px; }
  .seg { flex: 1 1 100%; }
  .seg a { flex: 1; }
  .pick { flex: 1 1 100%; }
  .pick > summary { width: 100%; justify-content: space-between; }
  .pick-form label { flex: 1 1 100%; }
  .pick-form select { min-width: 0; width: 100%; }
  .pick-form button { width: 100%; }
  .filter-row select { width: 100%; }
  .fresh > p { padding: 6px 12px; gap: 0 12px; }
  .week-head h1 { font-size: 21px; }
  .week-head .range { font-size: 19px; }
  .score b { font-size: 36px; }
  .nm-full { display: none; }
  .nm-short { display: inline; }
  td.club { min-width: 4.5em; }
  .rank-table .col-diff, .rank-table .notes, .rank-table th:nth-child(6) { display: none; }
  .diff-m { display: block; font-size: 14px; }
  .diff-m .why { display: inline; margin-left: 4px; }
  .games-table .venue, .games-table .col-memo { display: none; }
  .memo-m { display: block; margin-top: 2px; }
  .memo-m .chip { margin: 0 4px 0 0; }
  .rk { width: 28px; height: 28px; font-size: 18px; }
  td.rank { width: 2.6em; padding-left: 6px; padding-right: 2px; }
  .clubs-table th:nth-child(2), .clubs-table td:nth-child(2) { display: none; }
  .venue-table td:first-child { min-width: 7.5em; }
  .venue-table .src-cell { min-width: 11em; }
  .coverage { font-size: 13px; }
  .to-trend { margin-left: 0; }
  .trend-table th, .trend-table td { padding: 8px 8px; }
  .wd-total { grid-template-columns: 1fr 1fr; }
  .wd-total div:last-child { grid-column: 1 / -1; }
  .wd-total b { font-size: 26px; }
  .th-sort[aria-pressed="true"]::after { content: "▼ 並べ替え中"; font-size: 10px; padding: 0 4px; }
  .lead { font-size: 15px; }
  .trend-table .tv .num { font-size: 17px; }
  .legend .sep { margin-left: 0; flex-basis: 100%; }
}



/* ===== 接戦・逆転データ固有 ===== */
.eyebrow { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--red); letter-spacing: .08em; }
.eyebrow + h1 { margin-top: 0; }
.sub { display: inline; margin-left: 4px; font-size: 13px; color: var(--muted); }
.ref-label { display: inline-block; font-size: 13px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; font-family: "Noto Sans JP", sans-serif; }

/* ランキング表 */
.rank-table td.val { font-family: var(--num-font); font-size: 24px; font-weight: 700; white-space: nowrap; }
.rank-table tbody th { font-weight: 700; min-width: 10em; }
.rank-table tbody th a { color: var(--ink); text-decoration: none; }
.rank-table tbody th a:hover { color: var(--link-hover); text-decoration: underline; }
.rank-table td.det { font-size: 14px; color: var(--ink-2); min-width: 9em; }
.rank-table td.mv { white-space: nowrap; font-weight: 700; font-size: 14px; }
.rank-table tr.ref td.val { color: var(--ink-2); font-size: 20px; }
.rank-table tr.ref th { font-weight: 400; }
.rank-table tr.sep td { background: var(--surface-sub); font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 8px 16px; }
.rank-table tr.sep:hover { background: var(--surface-sub); }
.rank-table tr.empty td.val { color: var(--muted); }
.cond { font-size: 14px; color: var(--ink-2); margin: 0 0 4px; }
[aria-busy="true"] { opacity: .5; }

/* 条件 */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin: 0 0 16px; padding: 16px; background: var(--surface-sub); border-radius: 8px; }
.filters[hidden], .filters [hidden] { display: none; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.filters select { min-width: 200px; }
input[type="date"] { font: inherit; font-size: 16px; height: 48px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* 同じテーマのほかの指標 */
.seg-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.seg-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--primary); border-radius: 22px; color: var(--primary); text-decoration: none; font-weight: 700; font-size: 15px; }
.seg-links a:visited { color: var(--primary); }
.seg-links a:hover { background: var(--primary-soft); text-decoration: underline; }
.seg-links a[aria-current="page"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }

/* 今週の注目データ */
.hl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hl { display: block; padding: 16px 20px; border-radius: 8px; background: var(--navy); color: #fff; text-decoration: none; border-left: 6px solid var(--red); }
.hl:visited { color: #fff; }
.hl:hover { background: var(--navy-2); color: #fff; }
.hl:hover p { text-decoration: underline; }
.hl span { display: block; font-size: 14px; font-weight: 700; color: #d6dbe2; }
.hl b { display: block; font-family: var(--num-font); font-size: 48px; line-height: 1.15; }
.hl b small { font-family: "Noto Sans JP", sans-serif; font-size: 16px; margin-left: 4px; color: #d6dbe2; }
.hl p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; }

/* 主なランキング */
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mini { border: 1px solid var(--line); border-top: 4px solid var(--navy-2); border-radius: 8px; padding: 16px 20px; background: var(--surface); }
.mini h3 { margin: 0 0 8px; }
.mini h3 a { color: var(--ink); text-decoration: none; }
.mini h3 a:hover { color: var(--link-hover); text-decoration: underline; }
.mini ol { list-style: none; margin: 0; padding: 0; }
.mini li { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini li:last-child { border-bottom: 0; }
.mini li .rk { grid-row: span 2; width: 32px; height: 32px; font-family: var(--num-font); font-weight: 700; font-size: 18px; background: var(--surface-sub); }
.mini li .rk.top { background: var(--red); }
.mini li a { font-weight: 700; color: var(--ink); text-decoration: none; }
.mini li a:hover { color: var(--link-hover); text-decoration: underline; }
.mini li b { font-family: var(--num-font); font-size: 22px; text-align: right; }
.mini li small { grid-column: 2 / 4; font-size: 13px; color: var(--ink-2); }
.mini-note { font-size: 13px; color: var(--warn-ink); background: var(--warn-soft); border-radius: 4px; padding: 4px 8px; margin: 0 0 4px; }
.mini .more { margin: 8px 0 0; font-size: 15px; font-weight: 700; }
.mini li .rk:not(.top) { color: var(--ink); }
.mini .rk { font-size: 13px; }
.mini li span.rk:not(.top) { font-size: 16px; }

/* テーマ一覧 */
.theme-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.theme-list section { background: var(--surface-sub); border-radius: 8px; padding: 16px 20px; }
.theme-list h3 { margin: 0 0 4px; font-size: 18px; color: var(--red); }
.theme-list ul { list-style: none; margin: 0; padding: 0; }
.theme-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.theme-list li:last-child { border-bottom: 0; }
.theme-list li a { font-weight: 700; }
.theme-list small { display: block; color: var(--ink-2); line-height: 1.6; }

/* 試合ページ */
.q-table { font-size: 16px; }
.q-table td { font-family: var(--num-font); font-size: 20px; }
.q-table td.qwin { font-weight: 700; color: var(--red); }
.q-table tbody th { white-space: nowrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.facts div { background: var(--surface-sub); border-radius: 8px; padding: 12px 16px; border-top: 4px solid var(--navy-2); }
.facts span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.facts b { display: block; font-size: 17px; line-height: 1.5; }
.facts small { display: block; font-size: 13px; color: var(--ink-2); }
.chart.flow .flowline { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; }
.chart.flow .zero { stroke: var(--line-strong); stroke-width: 1.5; }
.chart.flow .qline { stroke: var(--line-strong); stroke-dasharray: 3 4; }
.chart.flow .cl-area { fill: var(--red); opacity: .12; }
.chart.flow .cl-band { fill: var(--red); }
.chart.flow .lab { fill: var(--ink-2); font-size: 13px; font-weight: 700; }
.runs { padding-left: 1.2em; }
.runs li { margin: 6px 0; }
.wl { display: inline-block; min-width: 1.8em; margin-right: 6px; font-weight: 700; text-align: center; border-radius: 4px; font-size: 14px; }
.wl.w { background: var(--red); color: #fff; }
.wl.l { background: var(--surface-sub); color: var(--ink-2); border: 1px solid var(--line-strong); }

/* チームページ */
.team-metrics .theme-row th { background: var(--surface-sub); color: var(--red); font-size: 15px; }
.team-metrics tbody th a { font-weight: 700; }
.team-metrics td.val { font-family: var(--num-font); font-size: 22px; font-weight: 700; }
.team-metrics td.det { font-size: 14px; color: var(--ink-2); }
.team-metrics td.pos { white-space: nowrap; }
.team-metrics td.pos b { font-family: var(--num-font); font-size: 22px; }
.team-metrics td.pos small { color: var(--ink-2); }
.team-games { font-size: 15px; }
.team-games td, .team-games th { padding: 10px 12px; white-space: nowrap; }
.team-games tr.recent td { background: var(--primary-soft); }
.team-games td a { color: var(--ink); }
.qs span { display: inline-block; margin-right: 8px; font-family: var(--num-font); font-size: 16px; }
.qs .qw { color: var(--red); font-weight: 700; }
.qs .ql { color: var(--ink-2); }
.scorers { padding-left: 1.4em; }
.scorers li { margin: 4px 0; }
.scorers small { color: var(--ink-2); margin-left: 4px; }
.status-table td small { display: block; font-size: 13px; color: var(--ink-2); }
.def-table th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.def-table td { font-size: 15px; }
.prose .def-table th { width: 12em; }

@media (max-width: 640px) {
  .hl-grid, .mini-grid { grid-template-columns: 1fr; }
  .hl b { font-size: 40px; }
  .filters { padding: 12px; }
  .filters label, .filters select, input[type="date"] { width: 100%; }
  .rank-table tbody th { min-width: 7em; }
  .rank-table td.val { font-size: 20px; }
  .rank-table td.det { min-width: 7em; font-size: 13px; }
  .rank-table th, .rank-table td { padding: 10px 8px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:last-child { grid-column: 1 / -1; }
}
.mini li .rk.ref { width: auto; height: auto; padding: 2px 6px; border-radius: 4px; font-family: "Noto Sans JP", sans-serif; font-size: 12px; font-weight: 700; color: var(--ink-2); background: transparent; border: 1px solid var(--line-strong); }
.stats b small.sep { margin: 0 3px; font-size: 22px; color: var(--ink-2); }
.stats .pair { white-space: nowrap; }
.ref-label { white-space: nowrap; }
@media (max-width: 640px) {
  .seg-links { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: thin; }
  .seg-links a { flex: 0 0 auto; }
  .rank-table td.rank { width: auto; padding-left: 8px; padding-right: 4px; }
  .rank-table tbody th { min-width: 4.5em; }
}
@media (max-width: 640px) { .rank-table .sub { display: block; margin-left: 0; } }

/* レビュー反映 */
.metric-name { margin: 0 0 8px; font-size: 15px; color: var(--ink-2); }
.metric-name b { color: var(--ink); }
.mini h3 small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.mini li.norank { grid-template-columns: 1fr auto; }
.mini li.norank small { grid-column: 1 / 3; }
.h-range { margin-left: 12px; font-family: var(--num-font); font-size: 20px; font-weight: 600; color: var(--ink-2); }
.cond-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 8px; }
.cond-row .cond { margin: 0; flex: 1 1 280px; font-size: 15px; color: var(--ink); font-weight: 700; }
.filter-box { flex: 1 1 100%; }
.filter-box[hidden] { display: none; }
.filter-box > summary { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; margin: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; list-style: none; cursor: pointer; }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 0 0 12px; }
.filter-box[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.filter-box .filters { margin: 12px 0 0; }
.rank-table thead th.mv small { display: block; font-weight: 400; color: #d6dbe2; }
.ev { margin-top: 4px; }
.ev summary { margin: 0; font-size: 13px; }
.ev ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.ev li { padding: 2px 0; }
.ev .wl { font-size: 12px; min-width: 1.6em; margin-left: 4px; }
.qs i { font-style: normal; font-family: "Noto Sans JP", sans-serif; font-size: 12px; color: var(--ink-2); margin-right: 3px; }
.scorer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scorer-cols h3 { font-size: 16px; margin: 0 0 4px; }
.chart.flow .flow-m { display: none; }
.chart.flow .hit { fill: transparent; cursor: crosshair; }
.chart.flow .hit:hover { fill: rgba(0, 0, 0, .05); }
.chart.flow .tip { transform: translate(-50%, -100%); }
@media (max-width: 640px) {
  .chart.flow { padding: 8px; }
  .chart.flow .flow-d { display: none; }
  .chart.flow .flow-m { display: block; }
  .scorer-cols { grid-template-columns: 1fr; }
  .h-range { display: block; margin: 2px 0 0; font-size: 17px; }
  .cond-row .cond { font-size: 14px; }
  .filter-box > summary { width: 100%; justify-content: space-between; }
}
.team-metrics .det-m { display: none; }
@media (max-width: 640px) {
  .team-metrics td.det, .team-metrics thead th:nth-child(3) { display: none; }
  .team-metrics .det-m { display: block; font-family: "Noto Sans JP", sans-serif; font-size: 12px; font-weight: 400; color: var(--ink-2); white-space: normal; line-height: 1.5; }
  .team-metrics .det-m .sub { display: inline; font-size: 12px; margin: 0; }
  .team-metrics tbody th { min-width: 8.5em; font-size: 14px; }
  .team-metrics td, .team-metrics th { padding: 10px 8px; }
}

/* コーナーの切り替え（入場者数の推移／接戦・逆転データ）：ヘッダーの上の細い帯 */
.xnav { background: #12171d; }
.xnav .wrap { display: flex; gap: 4px; }
.xnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; color: #b9c1cc; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .04em; border-bottom: 3px solid transparent; }
.xnav a:visited { color: #b9c1cc; }
.xnav a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.xnav a[aria-current="true"] { color: #fff; border-bottom-color: var(--red); }
.xnav a:focus-visible { outline-color: var(--focus); box-shadow: 0 0 0 6px #000; }
.xnav + .top { border-top: 0; }
.sister { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 24px 0; padding: 14px 18px; background: var(--surface-sub); border-left: 6px solid var(--red); border-radius: 8px; }
.sister .xlink { font-weight: 700; font-size: 16px; }
.sister .xlink::after { content: " →"; }
.sister small { color: var(--ink-2); }
@media (max-width: 640px) {
  .xnav .wrap { padding: 0; gap: 0; }
  .xnav a { flex: 1; justify-content: center; padding: 0 6px; font-size: 13px; }
}
