/* スコア予報：天気予報の「予報図」をなぞった見た目。青＝ホームの勝ち、橙＝アウェイの勝ち。 */
:root {
  --sky: #0b5cad;
  --sun: #f26b1d;
  --paper: #f6f8fb;
  --card: #ffffff;
  --ink: #14202e;
  --muted: #5b6b7c;
  --mist: #d9e2ec;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sky: #5aa2ec; --sun: #ff9150; --paper: #0f1823; --card: #16222f; --ink: #e6edf5; --muted: #9fb0c2; --mist: #2a3a4c; }
}
:root[data-theme="dark"] { --sky: #5aa2ec; --sun: #ff9150; --paper: #0f1823; --card: #16222f; --ink: #e6edf5; --muted: #9fb0c2; --mist: #2a3a4c; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.75; }
a { color: var(--sky); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; }

/* ヘッダー */
.site-head { background: var(--card); border-bottom: 1px solid var(--mist); }
.head-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 10px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; }
.brand-mark { width: 24px; height: 24px; color: var(--sky); align-self: center; }
.brand-sub { color: var(--muted); font-size: .8rem; }
.site-nav { display: flex; gap: 14px; width: 100%; font-size: .92rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--sky); }

/* 見出しと本文 */
main ul:not([class]) { padding-left: 1.2em; }
h1 { font-size: 1.5rem; line-height: 1.4; margin: 8px 0 6px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--mist); }
.lead { margin: 6px 0 18px; }
.sec { margin: 0 0 28px; }
.note, .crumb, .fullnames, .conf { color: var(--muted); font-size: .85rem; }
.crumb { margin: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 試合の題（チームの色は図の色と同じ） */
.match { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.9rem; margin: 4px 0 2px; }
.t-home { color: var(--sky); }
.t-away { color: var(--sun); }
.vs { color: var(--muted); font-size: 1rem; font-weight: 400; }
.fullnames { margin: 0; }

/* 予報図：左がホームの勝ち、右がアウェイの勝ち、真ん中が点差 */
.fc { font-variant-numeric: tabular-nums; margin: 4px 0 12px; }
.fc-head, .fc-row { display: grid; grid-template-columns: 1fr 4.8em 1fr; align-items: center; column-gap: 8px; }
.fc-head { font-size: .82rem; margin-bottom: 2px; }
.fc-head .h { text-align: right; color: var(--sky); font-weight: 700; }
.fc-head .m { text-align: center; color: var(--muted); }
.fc-head .a { color: var(--sun); font-weight: 700; }
.fc-row { min-height: 32px; border-top: 1px solid var(--mist); }
.fc-band { text-align: center; font-size: .85rem; color: var(--muted); }
.fc-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fc-home { justify-content: flex-end; }
.fc-bar { display: block; height: 14px; width: calc(var(--w) * .68%); min-width: 2px; border-radius: 2px; }
.fc-home .fc-bar { background: var(--sky); border-radius: 2px 0 0 2px; }
.fc-away .fc-bar { background: var(--sun); border-radius: 0 2px 2px 0; }
.fc-pct { font-size: .85rem; min-width: 2.4em; }
.fc-home .fc-pct { text-align: right; }
.mk { display: inline-block; width: 1.3em; text-align: center; color: var(--ink); font-size: 1.05rem; font-weight: 700; line-height: 1; flex: none; }

.marks { list-style: none; padding: 0; margin: 0 0 8px; }
.marks li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.marks .num { margin-left: auto; font-weight: 700; }
.probs summary { cursor: pointer; color: var(--sky); font-size: .9rem; }

/* この試合を1万回くり返したら：100個の点（1つが100試合）。青＝ホームの勝ち、橙＝アウェイの勝ち */
.sim-body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.sim-grid { display: grid; grid-template-columns: repeat(10, 14px); gap: 4px; flex: none; }
.sim-grid i { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); }
.sim-grid i.h { background: var(--sky); }
.sim-text { flex: 1 1 15em; min-width: 0; }
.sim-key { margin: 0 0 6px; color: var(--muted); font-size: .82rem; }
.sim-key b { display: inline-block; width: .75em; height: .75em; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -.05em; }
.sim-key b:first-child { margin-left: 0; }
.sim-key .kh { background: var(--sky); }
.sim-key .ka { background: var(--sun); }
.sim-wins { margin: 0 0 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sim-more { margin: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sim-w { display: inline-block; white-space: nowrap; }   /* 句の途中で折り返さない */

/* 表 */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--card); }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--mist); text-align: left; vertical-align: top; }
.tbl thead th { font-size: .8rem; color: var(--muted); font-weight: 400; }
.tbl.form tbody th { font-weight: 400; color: var(--muted); white-space: nowrap; }
.tbl.day td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .tbl.day thead { display: none; }
  .tbl.day tr { display: grid; grid-template-columns: 3.5em 1fr; border-bottom: 1px solid var(--mist); padding: 6px 0; }
  .tbl.day td { border: 0; padding: 2px 6px; }
  .tbl.day td:nth-child(n+3) { grid-column: 2; font-size: .85rem; }
}

/* 結果 */
.result p { margin: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--mist); border-left: 4px solid var(--muted); font-weight: 700; }
.result.hit p { border-left-color: var(--sun); }
.result.miss p { font-weight: 400; }
.points { padding-left: 1.2em; margin: 6px 0 0; }
.updates { list-style: none; padding: 0; margin: 0; }
.updates time { display: inline-block; min-width: 6.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.buy { font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--mist); padding-top: 10px; }

/* トップ：次の試合日の予報（1試合1行。小さな図は16通りの確率を、左＝ホームの大差勝ち → 右＝アウェイの大差勝ちに並べたもの） */
.top-title { font-size: 1.35rem; margin-bottom: 0; }
.top-lead { color: var(--muted); font-size: .9rem; }
.h-date { margin-left: 10px; font-size: .88rem; font-weight: 400; color: var(--muted); }
.nx-list { list-style: none; padding: 0; margin: 0; }
.nx { display: grid; grid-template-columns: 3.1em 1fr; column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--mist); }
.nx:first-child { border-top: 0; }
.nx:last-child { border-bottom: 1px solid var(--mist); }
.nx-time { font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.9; }
.nx-main { min-width: 0; }
.nx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0; }
.nx-match { font-size: 1.08rem; font-weight: 700; text-decoration: none; }
a.nx-match:hover { text-decoration: underline; text-decoration-color: var(--muted); }
.nx-match .vs { margin: 0 6px; font-size: .85rem; }
.nx-lg { color: var(--muted); font-size: .78rem; }
.nx-fc { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 12px; margin-top: 6px; }
.spark { display: grid; grid-template-columns: repeat(8, 7px) 1px repeat(8, 7px); column-gap: 2px; align-items: end; height: 28px; flex: none; }
.spark i { display: block; height: calc(var(--h) * 1%); min-height: 2px; background: var(--sky); opacity: .28; border-radius: 1px 1px 0 0; }
.spark i.a { background: var(--sun); }
.spark i.on { opacity: 1; }
.spark b { align-self: stretch; background: var(--mist); }
.nx-pick { display: inline-flex; align-items: baseline; gap: 2px; line-height: 1.4; }
.nx-pct { margin-left: 6px; font-variant-numeric: tabular-nums; }
.nx-conf { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.nx-wait { color: var(--muted); font-size: .92rem; }
.nx-note { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.more { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; font-size: .92rem; }
.rc { list-style: none; padding: 0; margin: 0; }
.rc li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; padding: 6px 0; border-top: 1px solid var(--mist); }

/* 成績の数字 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 8px; }
.stats div { padding: 6px 10px; background: var(--card); border: 1px solid var(--mist); }
.stats dt { color: var(--muted); font-size: .78rem; }
.stats dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.tbl.stat th, .tbl.stat td { white-space: nowrap; }
.tbl.stat tbody th { font-weight: 400; }
.tbl.recent td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl.info th { width: 7.5em; font-weight: 400; color: var(--muted); }
@media (max-width: 560px) {
  .tbl.recent thead { display: none; }
  .tbl.recent tr { display: grid; grid-template-columns: 3em 1fr auto; border-bottom: 1px solid var(--mist); padding: 6px 0; }
  .tbl.recent td { border: 0; padding: 2px 6px; }
  .tbl.recent td:nth-child(3) { grid-column: 3; grid-row: 1; }
  .tbl.recent td:nth-child(4), .tbl.recent td:nth-child(6) { grid-column: 2 / 4; font-size: .85rem; text-align: left; }
  .tbl.recent td:nth-child(5) { display: none; }   /* 購入はどの試合も同じ（600円）なので、狭い画面では省く */
  .tbl.recent td:nth-child(6)::before { content: "払戻 "; color: var(--muted); }
}

/* フッター */
.site-foot { margin-top: 48px; padding: 20px 0 40px; border-top: 1px solid var(--mist); background: var(--card); color: var(--muted); font-size: .8rem; line-height: 1.7; }
.site-foot p { margin: 0 0 8px; }
.site-foot a { color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.theme-btn { font: inherit; color: var(--muted); background: none; border: 1px solid var(--mist); border-radius: 4px; padding: 2px 10px; cursor: pointer; }
.to-top { position: fixed; right: 14px; bottom: 14px; background: var(--ink); color: var(--card); text-decoration: none; font-size: .8rem; padding: 6px 12px; border-radius: 16px; }
