/* トップ（/）の «本日を先に»（運営者 2026-10-20）。クラスは kn-。色は site.css の変数（明るい配色）。ktop.css の後に読む。外部読み込み・インライン style なし（CSP）。
   JS が無いときは 小見出し・次のレース・走行中は hidden のまま, 開催の details は開いたまま（= 2 日ぶんをサーバーの順に並べた姿）。 */
.kt-days { margin: 0; }
.kt-day [hidden], .kt-days [hidden], .kt-days > [hidden] { display: none !important; }
.kt-day[hidden] { display: none !important; }
.kt-days .kt-day { margin: 0 0 28px; }
.kn-none { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--muted); font-size: 14px; line-height: 1.7; }
.kn-label { margin: 0 0 2px !important; color: var(--amber); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; }
.kt-day h2 .dpill { margin-left: 8px; }

/* 次のレース: 64px の大きなボタン + その次 2 つ */
.kn-next { margin: 8px 0 12px; }
.kn-nb { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h s" "t s"; align-items: center; column-gap: 12px; min-height: 64px; padding: 8px 16px; border: 1px solid var(--amber-fill); border-radius: 14px; background: var(--amber-fill); color: var(--on-amber); text-decoration: none; }
.kn-nb:hover { filter: brightness(.97); }
.kn-nh { grid-area: h; font-size: 12px; font-weight: 800; line-height: 1.4; }
.kn-nt { grid-area: t; font-size: 22px; line-height: 1.25; }
.kn-ns { grid-area: s; font-size: 15px; font-weight: 800; text-align: right; white-space: nowrap; }
.kn-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 0 !important; }
.kn-ml { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.kn-mr { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 10px; color: var(--amber); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kn-mr:hover, .kn-lr:hover, .kn-cn:hover { background: rgba(255, 178, 56, .2); }

/* 発走したレース: 走行中・結果待ち */
.kn-live { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.kn-lr { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); color: var(--text); font-size: 13.5px; text-decoration: none; }
.kn-lr b { font-weight: 800; }
.kn-lr i { padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-style: normal; font-weight: 800; line-height: 1.7; }
.kn-lr i.is-run { background: var(--red); color: #fff; }
.kn-lr i.is-wait { border: 1px solid var(--grid); color: var(--muted); }

/* 最新の結果 */
.kn-res { margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); }
.kn-res h3 { margin: 0 0 2px; font-size: 1rem; }
.kn-res ul { margin: 0; padding: 0; list-style: none; }
.kn-rr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; position: relative; min-height: 44px; padding: 8px 22px 8px 0; border-top: 1px solid var(--soft); color: var(--text); text-decoration: none; }
.kn-res li:first-child .kn-rr { border-top: 0; }
.kn-rr b { flex: none; font-weight: 800; }
.kn-rr span { flex: 1 1 11em; min-width: 0; color: var(--muted); font-size: 13.5px; }
.kn-rr::after { content: "\203A"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); line-height: 1; color: var(--amber); font-weight: 800; }
.kn-rr:hover b { color: var(--amber); }
.kn-ra { margin: 0 !important; padding: 8px 0 10px; border-top: 1px solid var(--soft); font-size: 13.5px; }
.kn-ra a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.kn-ra a::after { content: "\203A"; margin-left: 6px; }

/* 開催と時間帯 */
.kn-all > summary { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid var(--grid); border-radius: 12px; background: var(--bg2); color: var(--amber); font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.kn-all > summary::-webkit-details-marker { display: none; }
.kn-all > summary::after { content: "\FF0B"; margin-left: auto; }
.kn-all[open] > summary::after { content: "\FF0D"; }
.kn-all[open] > summary { margin-bottom: 12px; }
.kn-all > summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.kn-chip { padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; line-height: 1.7; }
.kn-chip.is-done { border: 1px solid var(--line); background: var(--sunk); color: var(--muted); }
.kt-slot.is-past { padding-bottom: 8px; background: var(--sunk); box-shadow: none; }
.kt-slot.is-past .kt-cups { display: none; }
.kt-slot.is-past h3 { margin-bottom: 0; color: var(--muted); }
.kn-cn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 10px; color: var(--amber); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kn-cn.is-done { border-color: var(--line); color: var(--muted); }

/* 日の状態ごと */
.kt-day.is-second .kt-packline { display: none; }
.kt-day.is-over .kt-packline, .kt-day.is-over .kt-links, .kt-day.is-over .kn-all { display: none; }
.kt-day.is-over h2 { color: var(--muted); }
.kt-day.is-over .kn-res { margin-bottom: 0; }

/* 広い画面: ktop の 2 列は時間帯の組（.kn-slots）に移す。日の中の部品は横いっぱい */
@media (min-width: 1280px) {
  .kt-days > .kt-day > * { grid-column: 1 / -1; }
  .kn-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; align-items: start; }
  .kn-next, .kn-live, .kn-res { max-width: 720px; }
}

@media (prefers-reduced-motion: reduce) {
  .kt-days *, .kt-days *::before, .kt-days *::after { animation: none !important; transition: none !important; }
}
