/* KEIBA HEX 公開サイト。配色はカード PNG と同じ（navy / ice）。外部読み込みなし。 */
:root {
  --navy: #0B1A33; --panel: #12213f; --grid: #2c5f8f; --ice: #8FD3FF;
  --text: #eef2f8; --muted: #9fb3cc; --line: #23395d; --hit: #4fd88a; --miss: #ff8a8a;
  --high: #ff8a8a; --slow: #4fd88a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--text);
  font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", sans-serif;
  line-height: 1.7; font-size: 16px;
}
a { color: var(--ice); }
a:hover { color: #c7e8ff; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ice); outline-offset: 2px; border-radius: 4px;
}
img { max-width: 100%; height: auto; }
/* hidden は display を持つ class（.flat li など）より必ず勝たせる（タブ・場の切り替えが隠す） */
[hidden] { display: none !important; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ice); color: #06101f;
  padding: 10px 14px; border-radius: 0 0 8px 0; z-index: 10; }
.skip:focus { left: 0; }
.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-size: 20px; font-weight: bold; color: var(--text); text-decoration: none; letter-spacing: .04em; }
.tagline { color: var(--muted); font-size: 13px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; font-size: 14px; }
.site-nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--grid); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--ice); }
/* 速報帯（注記は site_templates.py） */
.ticker { background: #081527; border-bottom: 1px solid var(--line); font-size: 13px; }
.ticker[hidden] { display: none; }
.ticker .wrap { display: flex; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.ticker-head { flex: 0 0 auto; max-width: 42%; line-height: 1.35; }
.ticker-title { display: block; color: var(--ice); font-weight: bold; }
.ticker-totals { display: block; color: var(--muted); font-size: 12px; }
.ticker-viewport { flex: 1 1 auto; overflow: hidden; min-width: 0; }
.ticker-track { display: flex; width: max-content; gap: 28px; white-space: nowrap;
  animation: ticker-slide 50s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-item { color: var(--text); text-decoration: none; }
.ticker-item:hover { text-decoration: underline; }
.ticker-item .sep { color: var(--grid); padding: 0 4px; }
.ticker-more { flex: 0 0 auto; color: var(--ice); font-size: 12px; text-decoration: none;
  border: 1px solid var(--grid); border-radius: 999px; padding: 3px 10px; }
.ticker-more:hover { border-color: var(--ice); }
@keyframes ticker-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker.no-motion .ticker-viewport { overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; }
.ticker.no-motion .ticker-viewport::-webkit-scrollbar { display: none; }
.ticker.no-motion .ticker-track { animation: none; padding-right: 16px; }
@media (prefers-reduced-motion: reduce) {
  /* JS が class を付けられなかったときの保険（CSS だけでも送れるようにする） */
  .ticker .ticker-viewport { overflow-x: auto; }
}
@media (max-width: 640px) {
  .ticker { font-size: 12px; }
  .ticker .wrap { flex-wrap: wrap; gap: 0 8px; padding-top: 4px; padding-bottom: 4px; }
  .ticker-head { flex: 1 1 100%; max-width: none; line-height: 1.25; }
  .ticker-title { font-size: 12px; }
  .ticker-totals { font-size: 11px; line-height: 1.2; }
  .ticker-viewport { flex: 1 1 100%; }
  .ticker-more { display: none; }
}
/* 印の成績ページ（/marks-record/） */
.record-note { color: var(--muted); font-size: 13px; }
.record-table td { font-variant-numeric: tabular-nums; }
/* その日のレースごと（.pl-list の 1 レース 2〜3 行。印は .marks で折り返す） */
.day-race { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.day-race:last-child { border: 0; }
.marks.day-marks { gap: 6px 12px; }
.day-marks .mark, .day-marks .badge { min-width: 0; padding: 0 6px; }
.note-table th { white-space: normal; }  /* note の表は行の見出しに説明が入る（折り返す） */
main { padding: 20px 0 40px; }
h1, h2, h3 { font-feature-settings: "palt"; }
h1 { font-size: 26px; line-height: 1.35; margin: 0 0 10px; }
h2 { font-size: 20px; margin: 30px 0 10px; border-left: 4px solid var(--ice); padding-left: 10px; }
h3 { font-size: 16px; margin: 22px 0 8px; color: var(--ice); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
.lead { color: var(--muted); }
.breadcrumb { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li::after { content: " \203A"; color: var(--grid); }
.breadcrumb li:last-child::after { content: ""; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; }
.panel > :last-child { margin-bottom: 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: normal; }
/* 名前の列は折り返さない（注記は site_templates.py） */
td.name, th.name { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hit { color: var(--hit); font-weight: bold; }
.miss { color: var(--miss); font-weight: bold; }
.dash, .muted { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; }
/* 予想印（注記は site_templates.py） */
.mark { display: inline-block; min-width: 3.6em; text-align: center; border-radius: 999px;
  border: 1px solid var(--line); padding: 0 8px; font-size: 13px; }
.mark.mark-honmei, .mark.mark-axis { color: var(--ice); border-color: rgba(143, 211, 255, .55); background: rgba(143, 211, 255, .12); }
.mark.mark-taikou, .mark.mark-tanana, .mark.mark-partner { color: var(--text); border-color: var(--grid); }
.mark.mark-osae, .mark.mark-backup { color: var(--muted); }
/* 展開の穴だから △ に入った馬の札（印の横の小さな文字。色だけに頼らず文言で分かる） */
.mark-hole { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px;
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; }
/* 記事本文（全部見せる版だけ。site.SITE_ARTICLE_HEADING） */
.panel.article h3 { margin: 18px 0 8px; font-size: 17px; }
.panel.article h4 { margin: 14px 0 6px; font-size: 15px; }
.panel.article > :first-child { margin-top: 0; }
.panel.article p { line-height: 1.8; }
.hash, abbr.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 12px; }
.hash abbr, abbr { text-decoration: none; border-bottom: 1px dotted var(--grid); }

/* 更新情報の帯（トップのヘッダー直下。最終更新の時刻と新着 3 件。site Task 5 §2-3） */
.updates { border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 8px 14px; margin: 0 0 16px; font-size: 13px; }
.updates p { margin: 0; }
.updates .stamp { color: var(--muted); font-variant-numeric: tabular-nums; }
.updates .news-label { color: var(--ice); margin-top: 4px; }
.updates .news { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: 2px 16px; }
.updates .news li { position: relative; padding-left: 12px; }
.updates .news li::before { content: "\2022"; position: absolute; left: 0; color: var(--grid); }

/* note の案内箱（紺地に薄い枠。site Task 5 §4。トップ末尾とレースページの 2 か所） */
.note-box { background: var(--panel); border: 1px solid var(--grid); border-radius: 10px;
  padding: 14px 16px; margin: 0 0 20px; }
.note-box h2 { margin: 0 0 8px; border-left: 0; padding-left: 0; font-size: 18px; color: var(--ice); }
.note-box p { margin: 0 0 8px; }
.note-box .actions { margin: 12px 0 0; }
.note-box > :last-child { margin-bottom: 0; }

/* 発走前 / 答え合わせ済みのバッジ（レースページの先頭） */
.status { margin: 0 0 8px; }
.badge.status-upcoming { color: var(--ice); border-color: rgba(143, 211, 255, .55); }
.badge.status-done { color: var(--hit); border-color: rgba(79, 216, 138, .55); background: rgba(79, 216, 138, .12); }
.badge.status-finished { color: var(--muted); border-color: var(--line); background: transparent; }
.badge.hit { color: var(--hit); border-color: rgba(79, 216, 138, .55); background: rgba(79, 216, 138, .12); }
.badge.miss { color: var(--miss); border-color: rgba(255, 138, 138, .55); background: rgba(255, 138, 138, .12); }
/* 無料 / note の 2 つのバッジ（重賞・特別のカードの下段） */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 14px 12px; }
.badge.free-badge { color: var(--slow); border-color: rgba(79, 216, 138, .45); background: rgba(79, 216, 138, .10); }
.badge.note-badge { text-decoration: none; }
.badge.note-badge:hover { border-color: var(--ice); background: rgba(143, 211, 255, .20); }
.badge.paid-badge { color: var(--muted); border-color: var(--line); }
.linklist .note-badge { margin-left: 6px; font-size: 12px; }
a.badge { text-decoration: none; }
/* 場ごとの note の 1 日まとめへの案内（トップ・開催日の一覧。全レース note §1-3） */
.note-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.note-links .btn { padding: 6px 14px; font-size: 14px; }
.note-box .free-sample { color: var(--slow); }
/* 展開 IF の変化（+ は得・− は損。色だけに頼らず符号も出す） */
/* 注記は site_templates.py */
.change.up { color: var(--slow); }
.change.down { color: var(--high); }
.change.even { color: var(--muted); }
.if-table span.change { display: block; font-size: 12px; }
.if-gainers { list-style: none; margin: 0 0 10px; padding: 0; }
.if-gainers li { padding: 3px 0; font-size: 14px; }
/* note への 1〜2 行の案内（レースページのタブの上。全レース note §3。案内箱はページの末尾） */
.note-strip { background: var(--panel); border: 1px solid var(--grid); border-radius: 10px;
  padding: 7px 12px; margin: 0 0 12px; font-size: 14px; line-height: 1.6; }
.note-strip a { font-weight: bold; }
.note-strip .free-sample { color: var(--slow); }

/* タブ（全レース note §3。注記は site_templates.py） */
.tab-list { display: flex; gap: 2px; margin: 0 0 14px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 5;
  background: var(--navy); }
.tab-list::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; background: transparent; color: var(--muted); font: inherit; font-size: 15px;
  border: 0; border-bottom: 3px solid transparent; padding: 9px 14px 7px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--ice); border-bottom-color: var(--ice); font-weight: bold; }
.tabs-on .tab-panel > :first-child { margin-top: 0; }
/* id へ飛んだとき、張り付いたタブの列に見出しが隠れない */
.tabs-on [id] { scroll-margin-top: 56px; }
.tabs-on .tab-panel:focus-visible { outline: 2px solid var(--grid); outline-offset: 4px; }
/* 切り替えたときだけ薄く出す（開いた直後の 1 枚目は動かさない）。動きを減らす設定では付けない */
@media (prefers-reduced-motion: no-preference) {
  .tabs-moved .tab-panel { animation: tab-in .15s ease-out; }
}
@keyframes tab-in { from { opacity: .3; } to { opacity: 1; } }
/* 展開 IF の「ペースを選ぶ」と日別の一覧の「場を選ぶ」（押したボタンは aria-pressed="true"） */
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.picker-label { color: var(--muted); font-size: 13px; }
.pick-btn { background: transparent; color: var(--ice); font: inherit; font-size: 14px; cursor: pointer;
  border: 1px solid var(--grid); border-radius: 999px; padding: 5px 14px; }
.pick-btn:hover { border-color: var(--ice); }
.pick-btn.pace-high { color: var(--high); border-color: rgba(255, 138, 138, .55); }
.pick-btn.pace-slow { color: var(--slow); border-color: rgba(79, 216, 138, .55); }
.pick-btn[aria-pressed="true"] { background: var(--ice); border-color: var(--ice); color: #06101f; font-weight: bold; }
.pick-btn.pace-high[aria-pressed="true"] { background: var(--high); border-color: var(--high); }
.pick-btn.pace-slow[aria-pressed="true"] { background: var(--slow); border-color: var(--slow); }
.picker-status { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.picker-status:empty { margin: 0; }
.if-table th.is-picked, .if-table td.is-picked { background: rgba(143, 211, 255, .12); }
/* 375px 幅で表を横に送っても馬番の列は左に残す（どの馬の行かが分かるように） */
.if-table tr > :first-child, .entries-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); }
/* 自分の印（my-marks）: 馬番のマスのボタン・印の行・/my/ の一覧 */
.mk { font: inherit; color: var(--ice); background: transparent; border: 1px solid var(--grid); border-radius: 8px;
  min-width: 52px; min-height: 44px; cursor: pointer; }
.mk[data-m] { background: var(--ice); border-color: var(--ice); color: #06101f; font-weight: bold; }
.mk:disabled { opacity: .5; cursor: default; }
.my-line { margin: 0 0 6px; font-weight: bold; }
.my-races { list-style: none; margin: 0 0 12px; padding: 0; }
.my-races li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.my-races p { margin: 0; }
/* ヒーロー（トップ。h1 と 1〜2 行だけ） */
.hero { margin: 0 0 8px; }
.hero .lead { margin-bottom: 4px; }

/* トップの「開催日」（開催日ごとの箱） */
.meet-day { background: var(--panel); border: 1px solid var(--grid); border-radius: 10px;
  padding: 12px 14px; margin: 0 0 12px; }
.meet-day h3 { margin: 0 0 4px; color: var(--text); font-size: 17px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px 10px; }
.meet-day .actions { margin: 0 0 4px; }
.meet-day .note { margin: 0 0 10px; }
.meet-day > :last-child { margin-bottom: 0; }
/* 無料見本のレースの 1 行 */
.free-line { font-size: 14px; margin: 0 0 12px; }
.free-line strong { color: var(--slow); font-weight: normal; }
.free-line a { font-weight: bold; }

/* トップの「データを見る」（375px では 2 列） */
.hub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
  list-style: none; margin: 0 0 12px; padding: 0; }
.hub-cards a { display: block; height: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--text); }
.hub-cards a:hover { border-color: var(--ice); background: #16294c; }
.hub-title { display: block; font-weight: bold; color: var(--ice); }
.hub-stat { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.hub-desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.tiles { grid-template-columns: repeat(3, 1fr); }

/* 日別の一覧の «印» «展開» の組（行・カード・結果タブ）と日の頭のまとめ。札は折り返さず、組は札の切れ目で折り返す */
.res { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; font-size: 13px; color: var(--muted); }
.res-label { font-size: 12px; color: var(--muted); }
.res .badge { padding: 0 7px; font-size: 12px; }
.res-tenkai { flex-basis: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--grid); color: var(--ice); font-size: 15px; }
.btn:hover { border-color: var(--ice); }
.btn.primary { background: var(--ice); color: #06101f; border-color: var(--ice); font-weight: bold; }
.btn.primary:hover { background: #c7e8ff; color: #06101f; }
.btn.big { flex: 1 1 100%; text-align: center; font-size: 17px; padding: 14px 18px; border-radius: 14px; }

/* 数字カード（実績台帳の全期間） */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; list-style: none; margin: 0 0 12px; padding: 0; }
.cards li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.cards .big { font-size: 26px; font-weight: bold; display: block; font-variant-numeric: tabular-nums; line-height: 1.25; }
.cards .unit { font-size: 15px; font-weight: normal; margin-left: 1px; }
.cards .label { font-size: 13px; color: var(--muted); display: block; }
.stats li { text-align: left; }
/* 実績台帳の全期間は 3 枚横並び（注記は site_templates.py） */
.cards.stats { grid-template-columns: repeat(3, 1fr); }

/* 想定ペースのバッジ（色だけに頼らず文字も出す） */
.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--grid); background: rgba(143, 211, 255, .10); color: var(--ice); white-space: nowrap; }
.badge.pace-high { color: var(--high); border-color: rgba(255, 138, 138, .55); background: rgba(255, 138, 138, .12); }
.badge.pace-mid { color: var(--ice); border-color: rgba(143, 211, 255, .55); background: rgba(143, 211, 255, .12); }
.badge.pace-slow { color: var(--slow); border-color: rgba(79, 216, 138, .55); background: rgba(79, 216, 138, .12); }

/* 重賞・特別のカード（サムネイル付き） */
.race-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; list-style: none; margin: 0 0 16px; padding: 0; }
.race-cards li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; }
.race-cards .card-main { display: block; text-decoration: none; color: var(--text); padding: 12px 14px; flex: 1 1 auto; }
.race-cards .card-main:hover { background: #16294c; }
.race-cards .thumb { display: block; width: 100%; max-height: 180px; object-fit: cover; object-position: top center;
  border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; }
.race-cards .where { color: var(--muted); font-size: 13px; display: block; }
.race-cards .title { font-size: 17px; font-weight: bold; display: block; margin: 2px 0 6px; line-height: 1.4; }
.race-cards .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* 平場の行リスト（表にしない = スマホで横スクロールが出ない） */
.flat { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
/* 行は「リンク + 無料/有料バッジ」。バッジはリンクの外に置く（note はリンクなので入れ子にしない） */
.flat li { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
.flat li:last-child { border-bottom: 0; }
.flat li > .badge { margin: 0 14px 9px; }
.flat li > a.badge { text-decoration: none; }
.flat > li > a:not(.badge) { flex: 1 1 14em; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 14px; text-decoration: none; color: var(--text); }
.flat > li > a:not(.badge):hover { background: #16294c; }
.flat .where { color: var(--muted); font-size: 13px; min-width: 5.5em; }
.flat .title { flex: 1 1 8em; }
.flat .course { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
/* 発走時刻（行の先頭・カードの meta）。発走済みは薄くして、これから走る分を目立たせる */
.post { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ice); white-space: nowrap; }
.post.started { color: var(--muted); }
.flat .post { min-width: 6.5em; }

.figure { margin: 0 0 18px; text-align: center; }
.figure img { border: 1px solid var(--line); border-radius: 8px; display: block; margin: 0 auto;
  max-height: 720px; width: auto; }
.figure.small img { max-height: 360px; }
.figure.sample img { max-height: none; max-width: min(100%, 560px); }
.figure figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 8.5em 1fr 4.5em; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.bars .track { background: var(--navy); border: 1px solid var(--line); border-radius: 6px; height: 12px; overflow: hidden; }
/* 棒の長さは .fill.wN（注記は site_templates.py） */
.bars .fill { background: var(--ice); height: 100%; display: block; width: 0; }
.bars li.missing span:first-child, .bars li.missing .val { color: var(--muted); }
.bars li.missing .track { border-style: dashed; }
/* 想定ペースのバーは区分ごとの色（注記は site_templates.py） */
.bars.pace li.high .fill { background: var(--high); }
.bars.pace li.mid .fill { background: var(--ice); }
.bars.pace li.slow .fill { background: var(--slow); }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; }
.chips li { background: var(--navy); border: 1px solid var(--grid); border-radius: 999px; padding: 2px 12px; font-size: 13px; }
.horses { list-style: none; margin: 0 0 8px; padding: 0; }
.horses li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.horses li:last-child { border-bottom: 0; }
.horses .umaban { display: inline-block; min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.horses .why { color: var(--muted); font-size: 13px; }
.marks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; padding: 0; }
.filter { width: 100%; max-width: 420px; padding: 9px 12px; font-size: 16px; border-radius: 8px;
  border: 1px solid var(--grid); background: var(--navy); color: var(--text); }
.linklist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pointer { border: 1px dashed var(--grid); border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; }
.site-footer { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; padding: 18px 0 32px; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; padding: 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer .footer-lead { color: var(--text); margin-bottom: 10px; }
.entry-conds summary { color: var(--ice); cursor: pointer; margin: 0 0 8px; }
.rate-bar, .rate-bar .track { display: block; height: 4px; margin-top: 2px; }
.sort-btn { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
[aria-sort=descending] .sort-btn::after { content: "\25BC"; }
.entries-table .short { display: none; }
.pl-list { list-style: none; margin: 0 0 16px; padding: 0; }
.pl-list li { margin: 0 0 10px; }
.pl-list p { margin: 2px 0; }
.pl-head { font-size: 13px; }
.pl-horse { font-weight: bold; }
.whatif-table .change::before { font-size: 10px; margin-right: 2px; }
.whatif-table .change.up::before { content: "\2191"; }
.whatif-table .change.down::before { content: "\2193"; }
.rate-bar.up .fill { background: var(--slow); }
.rate-bar.down .fill { background: var(--high); }
.whatif-conds h3 { font-size: 15px; margin: 0 0 8px; }
.pick-btn[disabled] { opacity: .45; cursor: default; }
.race-nav { margin: 0 0 14px; }
.race-nav-end { margin: 20px 0 0; }
.race-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; padding: 0; }
.chip { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 6px;
  border: 1px solid var(--grid); border-radius: 999px; font-size: 14px; text-decoration: none; }
.chip.current { background: var(--ice); border-color: var(--ice); color: #06101f; font-weight: bold; }
.chip.off { border: 1px dashed var(--line); color: var(--muted); }
.race-step { justify-content: space-between; margin: 0; }
.race-step .next { margin-left: auto; }
@media (max-width: 600px) {
  body { font-size: 15px; }
  h1 { font-size: 21px; }
  h2 { font-size: 18px; }
  .tagline { display: none; }
  .site-nav { margin-left: 0; width: 100%; }
  .bars li { grid-template-columns: 7em 1fr 4em; }
  .btn { flex: 1 1 auto; text-align: center; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .cards .big { font-size: 22px; }
  /* 375px 幅では数字とラベルをさらに縮める */
  .cards.stats { gap: 6px; }
  .cards.stats li { padding: 10px 6px; }
  .cards.stats .big { font-size: 20px; }
  .cards.stats .unit { font-size: 12px; }
  .cards.stats .label { font-size: 12px; }
  /* 平場の行リスト: 「場 R レース名」→「距離 バッジ」の 2 段組み（ブリーフ §2 指摘 7） */
  .flat a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
    align-items: center; column-gap: 8px; row-gap: 2px; }
  .flat .where { grid-column: 1; grid-row: 1; }
  .flat .title { grid-column: 2; grid-row: 1; }
  .flat .course { grid-column: 1; grid-row: 2; }
  .flat a > .badge { grid-column: 2; grid-row: 2; justify-self: start; }
  .hub-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hub-cards a { padding: 9px 10px; }
  .hub-cards.tiles { grid-template-columns: 1fr; }
  .meet-day .btn:not(.big) { padding: 10px 6px; font-size: 14px; }
  /* 発走時刻は幅をそろえない（注記は site_templates.py） */
  .flat .post { min-width: 0; }
  .entries-table { font-size: 13px; }
  .entries-table th, .entries-table td { padding: 6px 4px; }
  .entries-table .waku, .entries-table .long { display: none; }
  .entries-table .short { display: inline; }
  .entries-table td.name { white-space: normal; min-width: 6em; text-wrap: balance; }
  .whatif-conds .pick-btn { padding: 4px 10px; font-size: 13px; }
  .whatif-conds .picker { gap: 5px 6px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.bars .fill.w0 { width: 0%; }
.bars .fill.w1 { width: 1%; }
.bars .fill.w2 { width: 2%; }
.bars .fill.w3 { width: 3%; }
.bars .fill.w4 { width: 4%; }
.bars .fill.w5 { width: 5%; }
.bars .fill.w6 { width: 6%; }
.bars .fill.w7 { width: 7%; }
.bars .fill.w8 { width: 8%; }
.bars .fill.w9 { width: 9%; }
.bars .fill.w10 { width: 10%; }
.bars .fill.w11 { width: 11%; }
.bars .fill.w12 { width: 12%; }
.bars .fill.w13 { width: 13%; }
.bars .fill.w14 { width: 14%; }
.bars .fill.w15 { width: 15%; }
.bars .fill.w16 { width: 16%; }
.bars .fill.w17 { width: 17%; }
.bars .fill.w18 { width: 18%; }
.bars .fill.w19 { width: 19%; }
.bars .fill.w20 { width: 20%; }
.bars .fill.w21 { width: 21%; }
.bars .fill.w22 { width: 22%; }
.bars .fill.w23 { width: 23%; }
.bars .fill.w24 { width: 24%; }
.bars .fill.w25 { width: 25%; }
.bars .fill.w26 { width: 26%; }
.bars .fill.w27 { width: 27%; }
.bars .fill.w28 { width: 28%; }
.bars .fill.w29 { width: 29%; }
.bars .fill.w30 { width: 30%; }
.bars .fill.w31 { width: 31%; }
.bars .fill.w32 { width: 32%; }
.bars .fill.w33 { width: 33%; }
.bars .fill.w34 { width: 34%; }
.bars .fill.w35 { width: 35%; }
.bars .fill.w36 { width: 36%; }
.bars .fill.w37 { width: 37%; }
.bars .fill.w38 { width: 38%; }
.bars .fill.w39 { width: 39%; }
.bars .fill.w40 { width: 40%; }
.bars .fill.w41 { width: 41%; }
.bars .fill.w42 { width: 42%; }
.bars .fill.w43 { width: 43%; }
.bars .fill.w44 { width: 44%; }
.bars .fill.w45 { width: 45%; }
.bars .fill.w46 { width: 46%; }
.bars .fill.w47 { width: 47%; }
.bars .fill.w48 { width: 48%; }
.bars .fill.w49 { width: 49%; }
.bars .fill.w50 { width: 50%; }
.bars .fill.w51 { width: 51%; }
.bars .fill.w52 { width: 52%; }
.bars .fill.w53 { width: 53%; }
.bars .fill.w54 { width: 54%; }
.bars .fill.w55 { width: 55%; }
.bars .fill.w56 { width: 56%; }
.bars .fill.w57 { width: 57%; }
.bars .fill.w58 { width: 58%; }
.bars .fill.w59 { width: 59%; }
.bars .fill.w60 { width: 60%; }
.bars .fill.w61 { width: 61%; }
.bars .fill.w62 { width: 62%; }
.bars .fill.w63 { width: 63%; }
.bars .fill.w64 { width: 64%; }
.bars .fill.w65 { width: 65%; }
.bars .fill.w66 { width: 66%; }
.bars .fill.w67 { width: 67%; }
.bars .fill.w68 { width: 68%; }
.bars .fill.w69 { width: 69%; }
.bars .fill.w70 { width: 70%; }
.bars .fill.w71 { width: 71%; }
.bars .fill.w72 { width: 72%; }
.bars .fill.w73 { width: 73%; }
.bars .fill.w74 { width: 74%; }
.bars .fill.w75 { width: 75%; }
.bars .fill.w76 { width: 76%; }
.bars .fill.w77 { width: 77%; }
.bars .fill.w78 { width: 78%; }
.bars .fill.w79 { width: 79%; }
.bars .fill.w80 { width: 80%; }
.bars .fill.w81 { width: 81%; }
.bars .fill.w82 { width: 82%; }
.bars .fill.w83 { width: 83%; }
.bars .fill.w84 { width: 84%; }
.bars .fill.w85 { width: 85%; }
.bars .fill.w86 { width: 86%; }
.bars .fill.w87 { width: 87%; }
.bars .fill.w88 { width: 88%; }
.bars .fill.w89 { width: 89%; }
.bars .fill.w90 { width: 90%; }
.bars .fill.w91 { width: 91%; }
.bars .fill.w92 { width: 92%; }
.bars .fill.w93 { width: 93%; }
.bars .fill.w94 { width: 94%; }
.bars .fill.w95 { width: 95%; }
.bars .fill.w96 { width: 96%; }
.bars .fill.w97 { width: 97%; }
.bars .fill.w98 { width: 98%; }
.bars .fill.w99 { width: 99%; }
.bars .fill.w100 { width: 100%; }
