#rules-open{width:32px;height:32px;padding:0;border-radius:50%;font-weight:700;flex-shrink:0}
#rulebook{box-sizing:border-box;width:min(820px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #425a7a;border-radius:16px;background:#121f35;color:#dfe3e9;padding:22px 26px}#rulebook::backdrop{background:#07111ecc}
.rules-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.rules-heading h1{margin:0;font-size:24px}.rules-heading button{font-size:23px;padding:0 10px}
.rules-nav{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.rules-nav button{font:inherit;font-size:13px;border:1px solid #36495d;border-radius:8px;padding:8px 12px;color:#adbbc9;background:#1a2b3d;cursor:pointer}.rules-nav button[aria-selected=true]{background:#e0c894;color:#172331;border-color:#e0c894}.rules-nav button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.rule-page[hidden]{display:none}.rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rules-grid.terrain{grid-template-columns:repeat(4,1fr)}
#rulebook h3{margin:6px 0;font-size:16px;color:#eadbb5}#rulebook p{font-size:13px;line-height:1.45;color:#bccada;margin:7px 0 0}.rule-card{padding:14px;background:#1b2b40;border:1px solid #30445c;border-radius:12px;text-align:center}.rule-picture{height:74px;display:flex;align-items:center;justify-content:center;gap:8px}.rule-picture>svg,.rule-picture>.rule-icon{width:72px;height:72px}.rule-picture:has(.rule-versus)>svg{width:64px}.rule-versus{font-size:24px;color:#e4c78b}.rule-stats{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:10px 0}.rule-stat{display:inline-flex;align-items:center;gap:3px;font-size:14px}.rule-icon{width:25px;height:25px;object-fit:contain;vertical-align:middle}.rule-stat b{font-variant-numeric:tabular-nums}
.rule-flow{display:flex;align-items:center;justify-content:center;gap:12px;padding:16px 8px;margin-bottom:12px;background:#18283b;border-radius:12px}.rule-flow>div{flex:0 1 130px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center}.rule-flow svg,.rule-flow>div>.rule-icon{width:80px;height:80px}.rule-flow b{font-size:14px;color:#eadbb5}.rule-flow small{font-size:12px;color:#aabace}.rule-arrow{font-size:24px;color:#d5bf8c}.rule-banner{text-align:center;padding:5px 0 17px;font-size:17px}.rule-banner b{color:#ecd294}.rule-river{margin-top:12px;border:1px solid #497078;border-radius:12px;background:#1c3443;padding-bottom:12px;text-align:center}.rule-river .rule-flow{background:transparent;margin:0;padding-bottom:4px}.rule-penalty{font-size:22px;color:#f2b18b}#rulebook .rule-note{margin:14px 0;font-size:12px;color:#a9b9ca;text-align:center}
.rule-details{border-top:1px solid #304156;margin-top:18px;padding-top:12px}.rule-details summary{font-size:12px;color:#a9b9ca;cursor:pointer}.rule-details[open]{padding-bottom:8px}.rule-details .rules-grid{margin-top:12px}.rule-details article{padding:12px;background:#192a40;border-radius:8px}.rule-details svg{float:right;width:60px;height:60px}.rule-details p{margin:12px 0!important}.rule-details b{color:#eadbb5}
@media(max-width:620px){#rulebook{padding:16px}.rules-grid.terrain{grid-template-columns:1fr 1fr}.rule-flow{gap:6px}.rule-flow svg,.rule-flow>div>.rule-icon{width:58px;height:58px}.rule-flow b{font-size:12px}.rules-nav button{padding:7px 9px}.rule-stats{gap:4px}.rule-stat{font-size:12px}.rule-stat .rule-icon{width:21px;height:21px}}
