:root {
  --bg: #eef5fb;
  --surface: #ffffff;
  --text: #14213d;
  --muted: #55627a;
  --line: #d3e1ee;
  --accent: #0068b7;
  --accent-soft: #e1effa;
  --warn-soft: #fff4c2;
  --warn: #8a6200;
  --code-bg: #e9f1f8;
  --header-bg: #0b2e59;
  --header-text: #ffffff;
  --header-muted: #b9d3ef;
  --hit: #e60012;
  --hit-soft: #fde4e6;
  /* 艇番カラー（1白 2黒 3赤 4青 5黄 6緑） */
  --b1: #ffffff; --b1-text: #14213d;
  --b2: #1a1a1a; --b2-text: #ffffff;
  --b3: #e60012; --b3-text: #ffffff;
  --b4: #0068b7; --b4-text: #ffffff;
  --b5: #ffd400; --b5-text: #14213d;
  --b6: #00a040; --b6-text: #ffffff;
  --stripe: linear-gradient(90deg, var(--b1) 0 16.66%, var(--b2) 0 33.33%, var(--b3) 0 50%, var(--b4) 0 66.66%, var(--b5) 0 83.33%, var(--b6) 0);
  --radius: 10px;
  --measure: 720px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1626;
    --surface: #132238;
    --text: #e6edf5;
    --muted: #9fb1c8;
    --line: #26384f;
    --accent: #5aaef0;
    --accent-soft: #17304d;
    --warn-soft: #3a3214;
    --warn: #ffd84d;
    --code-bg: #1a2b42;
    --header-bg: #071a33;
    --header-muted: #9fc0e3;
    --hit: #ff5a66;
    --hit-soft: #3d1a20;
    --b2: #000000;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 16px;
  letter-spacing: 0.02em;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; border-radius: 6px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--header-bg); position: relative; }
.site-header::after { content: ""; display: block; height: 6px; background: var(--stripe); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.site-title { font-weight: 700; font-size: 1.1rem; color: var(--header-text); text-decoration: none; }
.site-header nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88rem; }
.site-header nav a { color: var(--header-muted); text-decoration: none; }
.site-header nav a:hover { color: var(--header-text); }

main { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }

.hero p { font-size: 1.05rem; color: var(--muted); margin: 0 0 24px; }
.list-heading { font-size: 1.5rem; margin: 0 0 20px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card a {
  display: block; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); transition: border-color .15s;
}
.card a { border-left: 5px solid var(--accent); }
.card:nth-child(6n+2) a { border-left-color: var(--b2); }
.card:nth-child(6n+3) a { border-left-color: var(--b3); }
.card:nth-child(6n+4) a { border-left-color: var(--b4); }
.card:nth-child(6n+5) a { border-left-color: var(--b5); }
.card:nth-child(6n+6) a { border-left-color: var(--b6); }
.card:nth-child(6n+1) a { border-left-color: var(--line); }
.card a:hover { border-color: var(--accent); }
.card-meta { display: flex; gap: 10px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.card-title { display: block; font-weight: 700; font-size: 1.08rem; line-height: 1.55; margin-top: 6px; }
.card-desc { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 4px; line-height: 1.7; }

.chip { display: inline-block; font-size: 0.75rem; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.chip-draft { background: var(--warn-soft); color: var(--warn); }

.pager { display: flex; justify-content: space-between; margin-top: 28px; }

.pr-notice {
  font-size: 0.82rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; margin: 0 0 18px;
}
.draft-banner { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 6px; font-weight: 700; }
.prose p.todo { background: var(--warn-soft); color: var(--warn); border-left: 4px solid var(--warn); padding: 8px 12px; border-radius: 4px; font-weight: 600; }

.post-header h1 { font-size: 1.7rem; line-height: 1.45; margin: 8px 0 24px; letter-spacing: 0.01em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.82rem; color: var(--muted); margin: 0; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 32px; font-size: 0.92rem; }
.toc-title { font-weight: 700; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc .toc-l3 { list-style: none; margin-left: 0.6em; font-size: 0.88rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.prose h2 { font-size: 1.35rem; line-height: 1.5; margin: 2.4em 0 0.8em; padding-bottom: 10px; border-bottom: 0; background: var(--stripe) left bottom / 100% 4px no-repeat; }
.prose h3 { font-size: 1.12rem; margin: 2em 0 0.6em; padding-left: 10px; border-left: 4px solid var(--accent); }
.prose h4 { font-size: 1rem; margin: 1.6em 0 0.4em; }
.prose p { margin: 0 0 1.3em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.prose li { margin: 0.25em 0; }
.prose blockquote { margin: 0 0 1.3em; padding: 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose td[style*="right"], .prose th[style*="right"], .prose td:first-child { white-space: nowrap; }
.prose th { background: var(--header-bg); color: var(--header-text); white-space: nowrap; }

.box { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 1.4em; background: var(--surface); border: 1px solid var(--line); }
.box > :last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin: 0 0 6px !important; }
.box-note { background: var(--accent-soft); border-color: transparent; }
.box-warn { background: var(--warn-soft); border-color: transparent; }
.box-point { border: 2px solid var(--accent); }

.related { margin-top: 48px; }
.related h2 { font-size: 1.1rem; }

.site-footer { border-top: 0; background: var(--stripe) left top / 100% 4px no-repeat; padding: 24px 0 32px; font-size: 0.82rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

/* 記事カードの成績（トップ・カテゴリ一覧） */
.card-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 0.85rem; }
.res-badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 800; line-height: 1.7; }
.res-badge.hit { background: var(--hit); color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.res-badge.tori { background: #8a97a8; color: #fff; }
.res-badge.none { background: var(--line); color: var(--muted); font-weight: 700; }
.res-badge.wait { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.res-profit { font-weight: 800; }
.res-profit.plus { color: var(--hit); }
.res-profit.minus { color: var(--muted); font-weight: 700; }
.res-pending { color: var(--muted); font-size: 0.8rem; }
.res-dots { display: inline-flex; gap: 4px; }
.res-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.res-dot.hit { background: var(--hit); box-shadow: 0 0 0 1.5px var(--gold); }
.res-dot.tori { background: #8a97a8; }
.res-dot.miss { background: transparent; border: 1.5px solid var(--muted); opacity: 0.6; }
.res-dot.void { background: transparent; border: 1.5px dashed var(--muted); opacity: 0.6; }
.res-dot.wait { background: var(--accent-soft); border: 1.5px solid var(--accent); opacity: 0.7; }
.card.day-plus a { background: linear-gradient(135deg, var(--surface) 55%, var(--gold-soft) 100%); }
.card.day-plus a::before { content: "プラス収支"; float: right; margin: -2px -4px 0 8px; padding: 0 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #e60012, #ff8a00); }

/* 艇番バッジ（買い目・結果） */
.boat { display: inline-block; min-width: 1.6em; padding: 0 0.3em; margin: 0 1px; border-radius: 4px; font-weight: 700; text-align: center; line-height: 1.6; border: 1px solid transparent; }
.b1 { background: var(--b1); color: var(--b1-text); border-color: #9aa8b8; }
.b2 { background: var(--b2); color: var(--b2-text); }
.b3 { background: var(--b3); color: var(--b3-text); }
.b4 { background: var(--b4); color: var(--b4-text); }
.b5 { background: var(--b5); color: var(--b5-text); }
.b6 { background: var(--b6); color: var(--b6-text); }
@media (prefers-color-scheme: dark) { .b2 { border-color: #6b7c92; } }
.combo { white-space: nowrap; }
.combo .sep { color: var(--muted); margin: 0 1px; }
/* 的中：表の行・バッジ・結果バナー */
:root { --gold: #ffcf3a; --gold-soft: #fff3c4; }
@media (prefers-color-scheme: dark) { :root { --gold-soft: #4a3a10; } }
.hit-mark {
  display: inline-block; margin-left: 8px; padding: 0 10px; border-radius: 999px;
  background: var(--hit); color: #fff; font-weight: 800; font-size: 0.85em; line-height: 1.7;
  box-shadow: 0 0 0 2px var(--gold); animation: hit-pulse 1.6s ease-in-out infinite;
}
.prose tr:has(.hit-mark) td { background: var(--gold-soft); font-weight: 700; }
.prose tr:has(.hit-mark) td:first-child { box-shadow: inset 5px 0 0 var(--hit); }
.prose tr:has(.hit-mark) .boat { transform: scale(1.12); }
.hit-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 0 0 1.6em; padding: 14px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #e60012 0%, #ff5a1f 55%, #ffb000 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(230, 0, 18, 0.28); position: relative; overflow: hidden;
}
.hit-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--stripe); }
.hit-banner-label { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.08em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.hit-banner-combo .boat { font-size: 1.15rem; min-width: 1.8em; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.hit-banner-combo .sep { color: #fff; }
.hit-banner-pay { font-size: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hit-banner-pay strong { font-size: 1.35rem; font-weight: 900; }
.hit-banner-profit { font-size: 0.9rem; background: rgba(0, 0, 0, 0.18); padding: 1px 10px; border-radius: 999px; }
.hit-banner-profit.plus { background: #fff; color: var(--hit); font-weight: 800; }
/* トリガミ：当たったけど収支マイナス。ちょっと残念な感じ */
.hit-mark.torigami { background: #8a97a8; box-shadow: none; animation: none; font-weight: 700; }
.prose tr:has(.hit-mark.torigami) td { background: var(--accent-soft); font-weight: 600; }
.prose tr:has(.hit-mark.torigami) td:first-child { box-shadow: inset 5px 0 0 #8a97a8; }
.prose tr:has(.hit-mark.torigami) .boat { transform: none; }
.hit-banner.torigami {
  background: linear-gradient(135deg, #7d8ca0 0%, #9aa6b6 60%, #b7c0cc 100%);
  box-shadow: 0 2px 8px rgba(40, 60, 90, 0.18);
}
.hit-banner.torigami::after { opacity: 0.45; }
.hit-banner.torigami .hit-banner-label { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.04em; text-shadow: none; }
.hit-banner.torigami .hit-banner-label small { font-size: 0.85rem; font-weight: 700; margin-left: 4px; opacity: 0.9; }
.hit-banner.torigami .hit-banner-pay strong { font-size: 1.1rem; }
.hit-banner.torigami .hit-banner-combo .boat { font-size: 1rem; }
@keyframes hit-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hit-mark { animation: none; } }
.prose strong { color: inherit; }

@media (max-width: 520px) {
  .prose th, .prose td { padding: 7px 8px; }
  .prose table { font-size: 0.85rem; }
  body { font-size: 15.5px; }
  .post-header h1 { font-size: 1.4rem; }
  .prose h2 { font-size: 1.2rem; }
}
