:root { --ink:#121417; --muted:#68717d; --line:#dfe3e8; --panel:#ffffff; --bg:#f4f6f8; --hot:#ff4f64; --gold:#c79a32; --green:#17845b; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); letter-spacing:0; }
a { color: inherit; }
.topbar { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 20px; background:#111318; color:white; border-bottom:3px solid var(--hot); }
.topbar h1 { margin:0; font-size:22px; line-height:1.1; }
.eyebrow { margin:0 0 3px; color:#b7c0cb; font-size:12px; text-transform:uppercase; }
nav { display:flex; gap:8px; }
nav a, .source-link { text-decoration:none; border:1px solid currentColor; border-radius:6px; padding:7px 10px; font-size:13px; }
main { width:min(1180px, calc(100vw - 24px)); margin:16px auto 40px; }
.summary { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px; background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.summary p { margin:4px 0 0; color:var(--muted); }
.date { font-weight:700; font-size:22px; }
.badge { white-space:nowrap; border-radius:999px; padding:8px 10px; background:#fff3d5; color:#59420b; font-size:13px; }
.venue { margin-top:14px; background:var(--panel); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.venue > header { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); background:#fafbfc; }
.venue h2 { margin:0; font-size:18px; }
.race-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:1px; background:var(--line); }
.race-card { min-height:172px; padding:13px; background:white; }
.race-head { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:start; }
.race-no { display:inline-grid; place-items:center; min-width:38px; height:28px; border-radius:6px; background:var(--ink); color:white; font-weight:700; }
.race-head strong { font-size:15px; line-height:1.35; }
.race-head time { color:var(--hot); font-weight:800; }
.race-meta { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; color:var(--muted); font-size:12px; }
.race-meta span { border:1px solid var(--line); border-radius:999px; padding:4px 7px; background:#fafafa; }
.horses, .result-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap:4px 8px; margin:10px 0; padding:0; list-style:none; font-size:13px; }
.horses li, .result-list li { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.horses span, .result-list span { display:inline-grid; place-items:center; width:22px; height:22px; margin-right:5px; border-radius:4px; background:#edf2f7; color:#2d3640; font-weight:700; }
.source-link { display:inline-block; color:var(--green); margin-top:4px; }
.prediction { margin-top:10px; padding:10px; border:1px solid #f0d6d9; border-radius:8px; background:#fff8f9; }
.prediction h3 { margin:0 0 8px; font-size:13px; color:#9b1f32; }
.prediction ol { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.prediction li { display:grid; grid-template-columns:28px 24px minmax(0, 1fr) auto; gap:6px; align-items:center; font-size:13px; }
.prediction b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.prediction em { color:#9b1f32; font-style:normal; font-weight:800; }
.prediction small { grid-column:3 / 5; color:var(--muted); line-height:1.3; }
.mark { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--hot); color:white; font-weight:800; }
.horse-no { display:grid; place-items:center; width:22px; height:22px; border-radius:4px; background:#111318; color:white; font-weight:800; }
.bet-results { display:grid; gap:8px; margin:12px 0 8px; padding:0; list-style:none; }
.bet-results li { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:4px 10px; padding:10px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.bet-results span { font-weight:700; }
.bet-results small { grid-column:1; color:var(--muted); }
.bet-results b { grid-row:1 / span 2; grid-column:2; align-self:center; font-size:16px; }
.bet-results .hit-amount { color:#b42336; font-size:18px; }
.bet-results li.hit { border-color:#f1a7b1; background:#fff3f5; }
.muted { color:var(--muted); font-size:13px; }
.empty { margin-top:14px; padding:28px; background:white; border:1px solid var(--line); border-radius:8px; text-align:center; color:var(--muted); }
.error { color:#a12735; }
footer { width:min(1180px, calc(100vw - 24px)); margin:0 auto 32px; color:var(--muted); font-size:12px; line-height:1.7; }
@media (max-width: 640px) { .topbar, .summary { align-items:flex-start; flex-direction:column; } nav { width:100%; } nav a { flex:1; text-align:center; } .race-list { grid-template-columns: 1fr; } }
