/* KEIBA HEX 全ページ共通の見た目（トークン・ヘッダー・フッター・札とボタン）. site.css の後に読む。予算 8KB（tests/test_app_site_top_simplify.py）.
   色は 2 つだけ強調する: 押せる物＝水色（--accent）、当たり・無料＝緑（--hit）。金色・影・グラデーション・光る演出は使わない。
   style 属性は使わない（本番の CSP は style-src 'self'）。 */
:root {
  --bg: #0B1A33; --surface: #12213F; --surface-2: #172A4D; --line: #23395D; --text: #EEF2F8; --muted: #9FB3CC;
  --accent: #8FD3FF; --accent-ink: #06101F; --hit: #4FD88A; --hit-ink: #04140B;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
body { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif; }

/* ヘッダー（全ページ同じ。スマホは 2 段 = ロゴ 44px + ナビ 44px） */
.gh { background: var(--surface); border-bottom: 1px solid var(--line); }
.gh-in { max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); display: flex; flex-wrap: wrap; align-items: center; }
.logo { display: inline-flex; align-items: center; gap: var(--s2); height: 44px; color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 17px; letter-spacing: .06em; }
.logo:hover { color: var(--text); }
.logo svg { width: 20px; height: 20px; color: var(--accent); }
.tag { display: none; margin-left: var(--s3); color: var(--muted); font-size: 13px; }
.gn { width: 100%; display: flex; }
.gn a { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 4px;
  font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.gn a:hover { color: var(--text); }
.gn a[aria-current] { color: var(--text); border-bottom-color: var(--accent); font-weight: 700; }
.gn .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; margin-left: 3px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; }

/* フッター（全ページ同じ。6 つの組。スマホは 2 列・PC は 6 列） */
.gf { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; }
.gf-in { max-width: 1120px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); }
.gf-lead { margin: 0 0 var(--s4); color: var(--text); }
.gf-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.gf-t { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.gf ul { list-style: none; margin: 0; padding: 0; }
.gf li a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
.gf-legal { margin: var(--s5) 0 var(--s1); }
.gf-upd { margin: 0; }

/* 札・ボタン（どのページでも同じ物を使う） */
.ui-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent);
  color: var(--accent); font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; }
.ui-pill[hidden] { display: none; }
.ui-free { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 999px; border: 1px solid var(--hit); color: var(--hit);
  font-size: 11px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--s4); border-radius: 10px;
  border: 1px solid var(--accent); color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 700; }
.ui-btn:hover { background: var(--surface-2); color: var(--accent); }
.ui-btn-hit { min-height: 48px; background: var(--hit); border-color: var(--hit); color: var(--hit-ink); }
.ui-btn-hit:hover { background: var(--hit); color: var(--hit-ink); }

/* レースのページの note の帯（無料の 1R は緑の枠・緑のボタン） */
.nb { margin: 0 0 var(--s4); padding: var(--s3) 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.nb.free { border-color: var(--hit); display: flex; flex-direction: column; align-items: flex-start; }
.nb p { margin: 0 0 var(--s2); font-size: 14px; }
.nb-sub { display: block; margin-top: var(--s2); font-size: 13px; color: var(--muted); }
.nb-sub a { text-decoration: none; }
/* 無料の 1R の箱は、ボタンを文の上に見せる（スマホの最初の画面 375x812 でボタンが下の端をまたがない）。DOM の順は文 → ボタンのまま */
.nb.free .ui-btn { order: -1; margin: 0 0 var(--s2); }
.nb.free p { margin: 0; }

/* パンくずのリンク: 見た目と並びは変えず、押せる範囲だけ 44px に広げる（上下は負の余白で打ち消す） */
.breadcrumb a { display: inline-block; padding: 14px 2px; margin: -14px -2px; }

/* レースの帯の足し物: 日の一覧へ・同じ R の別の場 */
.rb-day { margin: 0 0 var(--s1); }
.rb-day a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; text-decoration: none; }
.rb-v { list-style: none; display: flex; gap: 6px; margin: 0 0 var(--s2); padding: 0; }
.rb-v li { flex: 1 1 0; min-width: 0; }
.rb-v a, .rb-v span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; text-decoration: none; }
.rb-v span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

@media (min-width: 900px) {
  .gh-in { flex-wrap: nowrap; height: 56px; }
  .logo { height: 56px; font-size: 19px; }
  .tag { display: block; }
  .gn { width: auto; margin: 0 0 0 auto; gap: var(--s1); }
  .gn a { flex: 0 0 auto; font-size: 15px; padding: 0 14px; min-height: 56px; }
  .gf-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
