/* Static search pages (scripts/seo/build-pages.mjs). Same palette as the game, no web fonts. */
:root { color-scheme: light; --ink: #251c1c; --red: #a92529; --red-bg: #d93636; --line: #e8dedb; --soft: #faf3ef; --muted: #6b5f5c; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
a { color: var(--red); text-underline-offset: 0.17em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.site-top { border-bottom: 1px solid var(--line); }
.top, main, .site-nav, .site-foot { max-width: 52rem; margin: auto; padding: 0 1rem; }
.top { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { display: block; width: 139px; height: auto; }
.play { font-weight: 700; }
.site-nav { display: flex; gap: 0.2rem 1rem; overflow-x: auto; padding-bottom: 0.55rem; white-space: nowrap; scrollbar-width: none; font-size: 0.93rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 0.15rem 0; }
.site-nav a[aria-current="page"] { color: var(--red); font-weight: 700; box-shadow: inset 0 -2px 0 var(--red); }
main { padding-bottom: 2.5rem; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.2; margin: 1.8rem 0 0.5rem; }
h2 { margin: 2rem 0 0.4rem; line-height: 1.3; font-size: 1.3rem; }
.lead { font-size: 1.06rem; }
p, ul, ol { margin: 0.4rem 0 1rem; }
ul, ol { padding-inline-start: 1.45rem; }
table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 1rem; }
caption { text-align: left; font-weight: 700; padding: 0.2rem 0; }
th, td { text-align: left; padding: 0.42rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead { background: var(--soft); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; padding: 0.55rem 0; }
.cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border: 1px solid var(--red-bg); border-radius: 10px; background: var(--red-bg); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.ghost { background: #fff; color: var(--red); border-color: var(--line); }
.site-foot { border-top: 1px solid var(--line); padding-block: 1rem 2rem; color: var(--muted); font-size: 0.88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.note { color: var(--muted); font-size: 0.9rem; }

/* score pad */
.scorepad { margin: 1rem 0 1.5rem; }
.pad-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.pad-tools select { min-height: 40px; font: inherit; }
.pad-scroll { overflow-x: auto; }
.pad { min-width: 100%; width: auto; }
.pad th, .pad td { padding: 0.25rem 0.35rem; white-space: nowrap; }
.pad input { width: 4.2rem; min-height: 38px; padding: 0 0.4rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-variant-numeric: tabular-nums; }
.pad thead input { width: 6.5rem; font-weight: 700; }
.pad .pad-bonus th, .pad .pad-bonus td { background: var(--soft); font-size: 0.9rem; }
.pad .pad-total th, .pad .pad-total td { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--ink); }
.pad-winner { min-height: 1.6em; font-weight: 700; color: var(--red); }

/* probability calculator */
.calc { margin: 1rem 0 1.5rem; }
.dice-input { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.die { display: grid; justify-items: center; gap: 0.2rem; }
.die button { width: 56px; height: 56px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.die.kept button { border-color: var(--red-bg); background: #fff4f2; }
.die label { font-size: 0.85rem; }
.rolls { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.8rem 0; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; }
.odds td, .odds th { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .odds th:nth-child(2), .odds td:nth-child(2) { display: none; }
  .odds th, .odds td { padding-inline: 0.3rem; font-size: 0.92rem; }
}

/* rules & FAQ (2026-11-26) */
.toc { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 1rem 0 0.5rem; padding: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 0.8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.9rem; background: #fff; }
.toc a:hover { border-color: var(--red); color: var(--red); }
section[id], h2[id] { scroll-margin-top: 1rem; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 0.15rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.steps li b::before { content: counter(step) ". "; color: var(--red); }
.steps li span { font-size: 0.93rem; }
.roll { display: inline-flex; gap: 4px; vertical-align: middle; }
.d { width: 30px; height: 30px; flex: none; }
.d rect { fill: #fff; stroke: #cfc4c0; stroke-width: 4; }
.d circle { fill: #2a2222; }
.d.hit rect { fill: #fff1ef; stroke: var(--red-bg); stroke-width: 6; }
.keep-demo { display: grid; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.keep-demo p { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; }
.keep-demo small { color: var(--muted); }
.tag { min-width: 5.6rem; font-weight: 700; font-size: 0.88rem; }
.group { margin: 1.2rem 0 0.4rem; font-size: 1rem; color: var(--muted); }
.cats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 0.6rem; }
.cat { padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; }
.cat h3 { margin: 0 0 0.15rem; font-size: 1.02rem; }
.cat .rule { margin: 0 0 0.45rem; font-size: 0.9rem; color: var(--muted); }
.cat .ex { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; margin: 0.2rem 0; }
.cat .ex b { font-variant-numeric: tabular-nums; min-width: 2.6rem; }
.cat .ex small { color: var(--muted); font-size: 0.82rem; }
.cat .ex.miss .d rect { fill: #f7f4f3; }
.cat .ex.miss b { color: var(--muted); }
.bonus-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; margin: 0.6rem 0; }
.bonus-bar span { display: grid; justify-items: center; gap: 0.2rem; padding: 0.5rem 0.2rem; border-radius: 10px; background: var(--soft); }
.bonus-bar i { font-style: normal; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.faq-group h2 { font-size: 1.1rem; margin-top: 1.6rem; }
details.qa { border: 1px solid var(--line); border-radius: 12px; margin: 0.45rem 0; background: #fff; }
details.qa summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 48px; padding: 0.6rem 0.9rem; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid #9b8e8a; border-bottom: 2px solid #9b8e8a; transform: rotate(45deg); transition: transform 0.15s; }
details.qa[open] summary::after { transform: rotate(-135deg); }
details.qa[open] { background: var(--soft); }
details.qa > div { padding: 0 0.9rem 0.4rem; }
details.qa > div p { margin: 0 0 0.6rem; }
@media (max-width: 560px) {
  .d { width: 26px; height: 26px; }
  .bonus-bar { grid-template-columns: repeat(3, 1fr); }
  .tag { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { details.qa summary::after { transition: none; } }
