/* Shared gameplay help, based on Gomoku. Edit shared/rules-ui.css and run npm run build:rules. */
.gameRulesNav.gameRulesNav{display:flex;align-items:center;gap:24px;font:12px system-ui,"Microsoft YaHei",sans-serif;color:#c9d1ba;flex:none}
.gameRulesNav.gameRulesNav a,.topbar .gameRulesNav.gameRulesNav .gamesHomeLink{color:#c9d1ba;font:inherit;white-space:nowrap;margin-left:0;min-height:0;text-decoration:none}
.gameRulesNav.gameRulesNav button{font:600 12px system-ui,"Microsoft YaHei",sans-serif;color:#e8c782;background:transparent;border:0;border-radius:10px;padding:8px;min-width:0;min-height:0;line-height:normal;white-space:nowrap;cursor:pointer;box-shadow:none;transition:none}
.gameRulesNav.gameRulesNav button:hover:enabled{background:#356249;color:#e8c782}
dialog.gameRulesDialog{box-sizing:border-box;font:16px system-ui,"Microsoft YaHei",sans-serif;line-height:normal;letter-spacing:normal;background:#123a2c;color:#f4e9ca;border:1px solid #c7ae6677;border-radius:18px;padding:28px;width:min(590px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-shadow:0 28px 70px #0009}
dialog.gameRulesDialog::backdrop{background:#00130dc9}
.gameRulesDialog .gameRulesHeading{position:sticky;top:-28px;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#123a2c;margin:0;padding:0 0 12px}
.gameRulesDialog .gameRulesHeading h2{font:700 22px system-ui,"Microsoft YaHei",sans-serif;line-height:normal;color:#f4e9ca;letter-spacing:normal;margin:0}
.gameRulesDialog .gameRulesHeading button{flex:none;font:600 16px system-ui,"Microsoft YaHei",sans-serif;line-height:normal;color:#e8c782;background:transparent;border:0;border-radius:10px;padding:8px;min-width:0;min-height:0;box-shadow:none;transition:none;cursor:pointer}
.gameRulesDialog .gameRulesHeading button:hover:enabled{background:#356249;color:#e8c782}
.gameRulesNav.gameRulesNav button:focus-visible,.gameRulesNav.gameRulesNav a:focus-visible,.gameRulesDialog button:focus-visible{outline:3px solid #f3d18b;outline-offset:3px}
.gameRulesDialog h3{font:700 17px system-ui,"Microsoft YaHei",sans-serif;line-height:normal;color:#e3cc91;margin:23px 0 1em}
.gameRulesDialog p,.gameRulesDialog ul,.gameRulesDialog table{color:#b9cdb4;font:13px system-ui,"Microsoft YaHei",sans-serif;line-height:1.9;margin:0 0 1em}
.gameRulesDialog ul{padding-left:20px}.gameRulesDialog li{margin:7px 0}.gameRulesDialog b{color:#f4e9ca}
.gameRulesDialog table{width:100%;border-collapse:collapse;text-align:left}.gameRulesDialog th,.gameRulesDialog td{padding:9px 7px;border:1px solid #a8bd8738}.gameRulesDialog thead{background:#09291f70}.gameRulesDialog tbody th{font-weight:400}
.topbar .gameRulesNav.gameRulesNav{margin-left:auto}
@media(max-width:700px){.gameRulesNav.gameRulesNav{gap:12px;font-size:11px}.gameRulesNav.gameRulesNav button{font-size:11px;padding:5px}dialog.gameRulesDialog{padding:23px}.gameRulesDialog .gameRulesHeading{top:-23px}}
/* Mahjong also has a sound control in the header. Keep all actions in reach on narrow phones. */
@media(max-width:400px){.topbar{padding:0 12px;gap:6px}.topbar .brand{gap:8px}.topbar .brand span{letter-spacing:1px}.topbar .gameRulesNav.gameRulesNav{gap:8px}.topbar .soundSettingsButton{min-width:34px;padding:4px 5px}}
