:root { font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Yu Gothic", sans-serif; color: #25282a; background: #f5f4f2; font-size: 17px; line-height: 1.7; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #154e77; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid #b2542b; outline-offset: 3px; }
.sitehead { border-bottom: 1px solid #c5c8ca; background: #fff; padding: 12px max(12px, calc((100% - 760px)/2)); display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; font-size: 15px; }
.sitehead a { font-weight: 700; min-height: 36px; display: flex; align-items: center; }
main { max-width: 760px; margin: auto; padding: 22px 12px 48px; }
h1 { margin: 10px 0 16px; font-size: clamp(25px, 6vw, 36px); line-height: 1.3; overflow-wrap: anywhere; }
h2 { font-size: 22px; line-height: 1.4; margin: 0; }
h3 { font-size: 19px; line-height: 1.5; margin: 0 0 10px; color: #103d63; }
p { margin: 10px 0; }
ul { padding-left: 1.25em; margin: 10px 0; }
li + li { margin-top: 7px; }
.eyebrow { color: #1c5682; font-size: 14px; font-weight: 700; letter-spacing: .06em; }
.chapters, .originals, .bottom-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.chapters a, .originals a, .bottom-nav a { padding: 9px 12px; background: #fff; border: 1px solid #b6c2c9; border-radius: 4px; text-decoration: none; min-height: 44px; display: flex; align-items: center; font-size: 16px; }
.chapter { margin: 28px 0; border: 1px solid #c5c8ca; background: #fff; scroll-margin-top: 12px; }
.chapter > h2 { padding: 12px 15px; background: #1c5682; color: #fff; font-size: 21px; }
.chapter-body { padding: 16px; }
.notice { border-left: 4px solid #df2029; background: #fff7f3; padding: 12px 14px; margin-top: 18px; }
.notice strong { color: #be2630; }
.formula, .payout { background: #e6edf2; padding: 12px; color: #103d63; font-weight: 700; }
.cardgroup { margin: 14px 0; }
.cardlabel { font-weight: 700; color: #103d63; margin-bottom: 8px; }
.cards { display: flex; flex-wrap: nowrap; gap: 6px; max-width: 100%; align-items: center; padding: 3px; }
.card { width: min(48px, calc((100% - 6px * (var(--count) - 1)) / var(--count))); height: auto; aspect-ratio: 0.717 / 1; display: block; flex: 0 1 48px; min-width: 0; overflow: hidden; background: #fff; }
.card.highlight { outline: 2px solid #b2542b; outline-offset: 1px; }
.card-caption { font-size: 16px; color: #4a4f53; margin-top: 6px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { padding: 18px 0; border-bottom: 1px solid #d7dde0; }
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step > h3 { display: flex; align-items: center; gap: 10px; }
.step > h3::before { counter-increment: step; content: counter(step); width: 29px; height: 29px; border-radius: 50%; background: #b2542b; color: #fff; flex: 0 0 29px; text-align: center; line-height: 29px; font-size: 16px; }
.bet { border-left: 3px solid #b2542b; padding: 9px 12px; color: #7c3b20; background: #fff8f2; margin-top: 12px; }
.subsection { margin: 24px 0; padding-top: 18px; border-top: 1px solid #d7dde0; }
.subsection:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.player { padding: 12px 0; }
.player + .player { border-top: 1px dashed #c5c8ca; margin-top: 14px; }
.player > h3 { font-size: 18px; }
.game { scroll-margin-top: 12px; }
.game + .game { border-top: 4px solid #1c5682; margin-top: 48px; padding-top: 28px; }
.royalty { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 17px; }
.royalty th, .royalty td { padding: 10px 9px; border-bottom: 1px solid #d7dde0; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.royalty th:last-child, .royalty td:last-child { width: 66px; text-align: right; font-weight: 700; color: #1c5682; white-space: nowrap; }
.royalty tbody tr:nth-child(odd) { background: #f0f2f2; }
.tip + .tip { margin-top: 24px; padding-top: 20px; border-top: 1px solid #d7dde0; }
.muted { color: #596970; font-size: 15px; }
footer { max-width: 760px; margin: auto; padding: 20px 12px; border-top: 1px solid #c5c8ca; font-size: 14px; color: #596970; }
@media (min-width: 650px) { .chapter-body { padding: 24px; } .card { flex-basis: 54px; width: min(54px, calc((100% - 6px * (var(--count) - 1)) / var(--count))); } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Source-preserving extensions for all 27 game chapters. */
.state-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.state-cards figure { margin: 0; flex: 0 0 48px; text-align: center; }
.state-cards .card { width: 48px; }
.state-cards figcaption { font-size: 16px; }
.source-text { white-space: pre-line; overflow-wrap: anywhere; }
.source-label { font-weight: 700; color: #103d63; }
.source-step { margin: 18px 0; padding: 16px 0; border-top: 1px solid #d7dde0; }
.source-step > h3 { font-size: 19px; }
.cards.long-hand { flex-wrap: wrap; gap: 8px; }
.cards.long-hand .card { width: 48px; flex: 0 0 48px; }
.original-page { width: 100%; height: auto; display: block; }
.original-source { margin: 22px 0; padding: 12px; border: 1px solid #c5c8ca; }
.original-source summary { cursor: pointer; min-height: 44px; padding: 8px; }
.return-button { min-height: 44px; padding: 9px 12px; font: inherit; color: #154e77; background: white; border: 1px solid #b6c2c9; border-radius: 4px; }
button:focus-visible { outline: 3px solid #b2542b; outline-offset: 3px; }

/* Candidate: readable dictionary links in the existing blue chapter band. */
.chapter > h2 a, .chapter > h2 a:visited { color: #ffffff; text-decoration: underline; text-decoration-thickness: .08em; }
.chapter > h2 a:focus-visible { outline-color: #ffd28a; outline-offset: 3px; }
.betting-help { margin: 12px 0 20px; border-left: 3px solid #1c5682; padding: 1px 12px; background: #eef3f6; }
.rule-scope-note { border-left: 3px solid #b2542b; padding-left: 12px; }
