/* トップ（/）だけが読む: ① 何ができるか（tb-what）② 今週のレース（tb-week・wk-）③ 実績（tb-rec・rec-）. 色・余白は ui.css。次のレースのボタンと note の行は next-race.css */
.mn { max-width: 1120px; margin: 0 auto; padding: var(--s4) var(--s4) var(--s6); display: grid; gap: var(--s4); }
.tb h1 { font-size: 22px; line-height: 1.35; margin: 0 0 var(--s1); }
.tb h2, .tb h3 { border: 0; padding: 0; margin: 0; color: var(--text); }
.tb p, .tb ul, .tb ol { margin: 0; padding: 0; }
.tb a { text-decoration: none; }
.tb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: var(--s4); min-width: 0; }
.tb-hd { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: -6px 0 var(--s2); }
.tb-hd h2 { font-size: 20px; line-height: 1.35; }
.tb-hd > a { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.rec-ml { margin-left: var(--s2); padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; vertical-align: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }

/* ① 何ができるか */
.tb-lead { margin: 0 0 var(--s3); color: var(--muted); font-size: 14px; line-height: 1.6; }
.tb-do { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.tb-do a { display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 88px; padding: var(--s3) 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.tb-do svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 2px; }
.tb-do b { font-size: 14px; line-height: 1.35; }
.tb-do span { font-size: 12px; line-height: 1.45; color: var(--muted); }
.tb-do .tb-pc { display: none; }

/* ② 今週のレース */
.wk-dh { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s1); padding-top: var(--s3); border-top: 1px solid var(--line); }
.wk-dh h3 { font-size: 16px; line-height: 1.35; }
.wk-n { font-size: 13px; color: var(--muted); }
.wk-dh > a { margin-left: auto; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.wk-tracks { list-style: none; }
.wk-tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
.wk-tr:last-child { border-bottom: 0; }
.wk-v { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; color: var(--text); }
.wk-ch { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; } /* 折り返す: 入りきらない札は次の行へ。無料の札は縮めず、省くのはメインレースの名前だけ */
.wk-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 14px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.wk-chip:has(.ui-free) { flex: none; }
.wk-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wk-chip time { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-g { font-size: 11px; border: 1px solid var(--muted); color: var(--muted); border-radius: 4px; padding: 0 4px; line-height: 1.5; }
.wk-done { margin: var(--s3) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
.wk-dl { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; }

/* ③ 実績 */
.rec-basis { margin: 0 0 var(--s2); font-size: 12px; color: var(--muted); line-height: 1.6; }
.rec-st { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.rec-st li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: var(--s2) 10px; }
.rec-l { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.rec-v { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec-v b { font-size: 28px; color: var(--text); line-height: 1.2; margin-right: 2px; }
.rec-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.rec-rh { margin: var(--s4) 0 0; font-size: 14px; font-weight: 700; }
.rec-rows { list-style: none; margin: 6px 0 0; border-top: 1px solid var(--line); }
.rec-rows li { border-bottom: 1px solid var(--line); }
.rec-rows a { display: block; padding: 10px 0; color: var(--text); }
.rec-r1 { display: flex; align-items: baseline; gap: var(--s2); font-weight: 700; font-size: 15px; line-height: 1.4; }
.rec-r1 time { font-weight: 400; font-size: 12px; color: var(--muted); }
.rec-go { margin-left: auto; color: var(--accent); font-weight: 400; font-size: 18px; }
.rec-r2 { display: block; margin: 2px 0; font-size: 13px; letter-spacing: .02em; }
.rec-r3 { display: flex; flex-wrap: wrap; gap: 0 var(--s3); font-size: 13px; }
.rec-hit { color: var(--hit); font-weight: 700; }
.rec-miss { color: var(--muted); }
.rec-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s3); }
.rec-acts > a:not(.ui-btn) { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 900px) {
  .mn { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s5); padding: var(--s5) var(--s5) var(--s7); align-items: start; }
  .tb-what { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: center; padding: var(--s2) 0; }
  .tb h1 { font-size: 28px; }
  .tb-lead { margin: 0; font-size: 16px; }
  .tb-do a { padding: var(--s4); min-height: 120px; }
  .tb-do b { font-size: 16px; }
  .tb-do span { font-size: 13px; }
  .tb-do .tb-sp { display: none; }
  .tb-do .tb-pc { display: block; }
  .tb-card { padding: var(--s5); }
}
@media (min-width: 1280px) {
  .lay-top .gh-in, .lay-top .gf-in { max-width: 1120px; }
}
