:root:has(.rules-page){scroll-behavior:smooth}.page-container.rules-page{--rules-page-inset:40px;flex-direction:column;gap:24px;min-width:0;max-width:1240px;padding:28px 40px 48px;display:flex}.rules-byline a{color:var(--accent-warm)}.rules-header{grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:20px;padding:40px 4px 0;display:grid}.rules-game-icon{--rules-hue:70;width:64px;height:64px;color:oklch(.88 .1 var(--rules-hue));background:oklch(.42 .09 var(--rules-hue) / .55);box-shadow:var(--glass-edge);border-radius:50%;place-items:center;font-family:Segoe UI Symbol,"Noto Sans Symbols 2",Songti SC,serif;font-size:32px;display:grid}.rules-page[data-board=river] .rules-game-icon{--rules-hue:150}.rules-header-copy{min-width:0}.rules-header h1{letter-spacing:-.04em;text-wrap:balance;margin:0;font-size:clamp(34px,4.1vw,52px);font-weight:700;line-height:1.08}.rules-header-copy>p{max-width:640px;color:var(--text-secondary);text-wrap:pretty;margin:12px 0 0;font-size:17px;line-height:1.55}.rules-header-play{border-radius:999px;min-height:46px;padding-inline:20px}.rules-byline{color:var(--text-secondary);flex-wrap:wrap;gap:6px 20px;margin-top:12px;font-size:12px;line-height:1.6;display:flex}.rules-page[data-photo-hero=true]{container-type:inline-size}.rules-header.rules-photo-hero{isolation:isolate;grid-template-columns:minmax(0,1fr) 216px;gap:24px;min-height:320px;padding:64px 0 8px 36px;position:relative}.rules-photo-hero:before{z-index:-2;pointer-events:none;content:"";background:radial-gradient(at 72% 55%,#a7691a29,#0000 47%);position:absolute;inset:-28px 0 -16px}.rules-hero-art{z-index:-1;pointer-events:none;width:auto;height:352px;position:absolute;bottom:-8px;right:190px;-webkit-mask-image:linear-gradient(90deg,#0000,#000 9% 90%,#0000),linear-gradient(#0000,#000 6% 88%,#0000);mask-image:linear-gradient(90deg,#0000,#000 9% 90%,#0000),linear-gradient(#0000,#000 6% 88%,#0000);-webkit-mask-composite:source-in;mask-composite:intersect}.rules-photo-hero .rules-header-copy{text-shadow:0 2px 20px #000000a6;max-width:710px}.rules-photo-hero h1{letter-spacing:-.045em;text-wrap:pretty;font-size:clamp(36px,5cqw,60px);line-height:1.09}.rules-hero-title-accent{color:#f7bf5c;display:block}.rules-photo-hero .rules-header-copy>p{max-width:660px;font-size:clamp(16px,1.6cqw,19px)}.rules-photo-hero .rules-byline{margin-top:18px}.rules-header-actions{flex-direction:column;align-items:stretch;gap:8px;display:flex}.rules-photo-hero .rules-header-play{color:#1b1204;white-space:normal;background:linear-gradient(120deg,#ffc957,#ffb638);border:1px solid #ffcb63;grid-column:auto;justify-self:stretch;gap:12px;min-height:56px;padding:12px 20px;font-size:16px;font-weight:700;transition:background-color .16s,box-shadow .16s;box-shadow:0 8px 28px #ffb53333}.rules-photo-hero .rules-header-play:hover{background:#ffd078;box-shadow:0 8px 32px #ffb53352}.rules-header-actions svg{flex-shrink:0}.rules-header-actions .ia-launcher-trigger{width:100%;min-height:44px;color:var(--text-secondary);white-space:normal;background:var(--glass);border:1px solid var(--border);border-radius:999px;justify-content:center;padding:8px 12px;font-size:13px}.rules-header-actions .ia-launcher-trigger:hover{color:var(--text-primary);background:var(--glass-hover)}@container (width<=1040px){.rules-header.rules-photo-hero{grid-template-columns:minmax(0,1fr);gap:20px;min-height:350px;padding:40px 0 8px}.rules-photo-hero .rules-header-copy{max-width:calc(100% - 190px)}.rules-hero-art{width:auto;height:360px;top:-4px;bottom:auto;right:0}.rules-header-actions{width:max-content;min-width:216px;max-width:100%}}@container (width<=680px){.rules-header.rules-photo-hero{min-height:0;padding-top:190px}.rules-photo-hero .rules-header-copy{max-width:none}.rules-photo-hero h1{font-size:clamp(32px,6cqw,40px)}.rules-hero-art{height:220px;top:-16px;right:8px}}@container (width<=440px){.rules-header-actions{width:100%;min-width:0}}.rules-page[data-hero-layout=landscape] .rules-hero-art{top:-28px;right:calc(-1 * var(--rules-page-inset));width:703px;max-width:calc(100% + var(--rules-page-inset));height:auto;bottom:auto;-webkit-mask-image:linear-gradient(#000 88%,#0000);mask-image:linear-gradient(#000 88%,#0000)}.rules-page[data-hero-layout=landscape] .rules-header-actions .ia-launcher-trigger{color:var(--text-primary);background:#0d121ce0}.rules-page[data-hero-layout=landscape] .rules-header-actions .ia-launcher-trigger:hover{background:#1d2430f5}@container (width<=1040px){.rules-page[data-hero-layout=landscape] .rules-header-copy{max-width:58%}.rules-page[data-hero-layout=landscape] .rules-hero-art{width:62%;min-width:440px}}@container (width<=680px){.rules-page[data-hero-layout=landscape] .rules-photo-hero{padding-top:clamp(174px,50cqw,290px)}.rules-page[data-hero-layout=landscape] .rules-header-copy{max-width:none}.rules-page[data-hero-layout=landscape] .rules-hero-art{object-fit:cover;object-position:center;width:calc(100% + 32px);min-width:0;max-width:none;height:clamp(180px,52cqw,300px);top:-16px;right:-16px}}@media (width>=768px){.rules-page .rules-header.rules-photo-hero{padding:0}}.rules-layout{grid-template-columns:minmax(0,1fr) 240px;align-items:start;gap:24px;display:grid}.rules-page .rulebook{background:var(--glass);border:1px solid var(--border);min-width:0;box-shadow:var(--glass-edge);border-radius:34px;margin:0;padding:10px 36px 28px;container-type:inline-size}.rules-page .rulebook p{max-width:72ch;color:var(--text-secondary);text-wrap:pretty;margin:0;font-size:17px;line-height:1.7}.rules-sidebar{overscroll-behavior-y:contain;scrollbar-width:none;flex-direction:column;gap:20px;max-height:calc(100dvh - 48px);padding:4px;display:flex;position:sticky;top:24px;overflow-y:auto}.rules-sidebar::-webkit-scrollbar{display:none}.rules-toc-mobile{border-bottom:1px solid var(--border);display:none}.rules-toc-heading{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;margin:0 0 12px;padding-inline:10px;font-size:12px;font-weight:700;line-height:1.5}.rules-toc ol{flex-direction:column;gap:2px;margin:0;padding:6px;list-style:none;display:flex}.rules-toc-desktop ol{background:var(--glass);border:1px solid var(--border);border-radius:22px}.rules-toc a{min-height:44px;color:var(--text-primary);border-radius:14px;align-items:baseline;gap:10px;padding:12px 10px;font-size:14px;line-height:1.45;transition:color .16s,background-color .16s;display:flex}.rules-toc a:hover,.rules-toc a:focus-visible{color:var(--accent-warm);background:var(--glass-hover)}.rules-toc summary,.rules-facts summary{min-height:52px;color:var(--text-primary);cursor:pointer;align-items:center;gap:12px;padding-block:12px;font-size:15px;font-weight:600;list-style:none;display:flex}.rules-toc summary::-webkit-details-marker{display:none}.rules-facts summary::-webkit-details-marker{display:none}.rules-toc summary:after,.rules-facts summary:after{content:"+";flex:none;margin-left:auto;font-size:20px;font-weight:400;line-height:1}.rules-facts[open] summary:after,.rules-toc details[open] summary:after{content:"−"}.rules-toc-count{font-variant-numeric:tabular-nums;color:var(--text-secondary);margin-left:auto;font-size:13px}.rules-facts{background:var(--glass);border:1px solid var(--border);border-radius:22px;padding-inline:16px}.rules-facts dl{gap:14px;margin:0;padding:4px 0 20px;display:grid}.rules-facts dt{color:var(--text-secondary);margin-bottom:4px;font-size:12px;line-height:1.5}.rules-facts dd{color:var(--text-primary);overflow-wrap:anywhere;margin:0;font-size:14px;font-weight:550;line-height:1.6}.rules-page :is(a,summary):focus-visible{outline:2px solid var(--accent-warm);outline-offset:3px}.rule-piece-choice:has(input:focus-visible){outline:2px solid var(--accent-warm);outline-offset:3px}.rule-section{border-top:1px solid var(--border);margin:0;padding:30px 0;scroll-margin-top:24px}.rules-toc+.rule-section{border-top:0;padding-top:24px}.rules-page .rule-section h2{letter-spacing:-.025em;text-wrap:pretty;align-items:baseline;gap:12px;margin:0 0 16px;font-size:30px;font-weight:700;line-height:1.2;display:flex}.rule-number{font-variant-numeric:tabular-nums;color:var(--accent-warm);flex:none;font-size:13px;font-weight:600}.rule-section h2 .rule-number{font-size:15px}.rule-points,.rule-pieces{gap:22px;margin:20px 0 0;padding:0;list-style:none;display:grid}.rule-pieces{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}.rule-item{align-items:flex-start;gap:16px;min-width:0;display:flex}.rule-item>div{min-width:0}.rule-item h3{color:var(--text-primary);margin:0 0 6px;font-size:18px;font-weight:700;line-height:1.5}.rule-symbols{flex:none;gap:6px;font-family:Segoe UI Symbol,"Noto Sans Symbols 2",Songti SC,serif;display:flex}.rule-symbols>span{width:40px;height:40px;color:var(--accent-warm);justify-content:center;align-items:center;font-size:24px;font-weight:500;display:inline-flex}.rule-symbols.xiangqi>span{background:var(--surface);border:1px solid var(--border);border-radius:50%;width:40px;height:40px}.rule-symbols.xiangqi .is-first{color:var(--danger)}.rule-symbols.xiangqi .is-second{color:var(--text-primary)}.rule-symbols.chess>span{font-size:36px}.rules-page .rulebook .rule-detail{margin-top:8px;font-size:15px;line-height:1.65}.rule-diagram{max-width:440px;margin:24px auto}.rule-diagram img{border-radius:18px;width:100%;height:auto;display:block}.rule-diagram figcaption{color:var(--text-secondary);margin-top:12px;font-size:14px;line-height:1.65}.rule-piece-explorer{border:1px solid var(--border);background:oklch(0% 0 0/.18);border-radius:28px;flex-wrap:wrap;align-items:flex-start;gap:16px;margin-top:20px;padding:12px;display:flex}.rule-example-figure{flex:270px;min-width:0;max-width:360px;margin:0 auto;position:sticky;top:24px}.rule-example-frame{background:oklch(62% .07 60/.26);border-radius:22px;padding:12px}.rule-example-board{grid-template-rows:repeat(var(--example-ranks), minmax(0, 1fr));grid-template-columns:repeat(var(--example-files), minmax(0, 1fr));aspect-ratio:var(--example-files) / var(--example-ranks);border-radius:10px;display:grid;position:relative;overflow:hidden;box-shadow:0 10px 24px oklch(0% 0 0/.3);container-type:inline-size}.rule-example-cell{-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;min-width:0;min-height:0;display:flex;position:relative}.rule-example-chess .rule-example-cell{color:oklch(86% .045 85);background:oklch(60% .075 60)}.rule-example-chess .rule-example-cell[data-light=true]{color:oklch(48% .065 60);background:oklch(86% .045 85)}.rule-example-cell[data-selected=true]{box-shadow:inset 0 0 0 2px oklch(72% .17 60)}.rule-example-cell[data-capture=true]:after{z-index:3;content:"";border:max(2px,.8cqw) solid oklch(58% .2 25);border-radius:50%;position:absolute;inset:5%}.rule-example-dot{background:oklch(25% .02 260/.5);border-radius:50%;width:28%;height:28%}.rule-example-rank,.rule-example-file{z-index:4;font-size:max(9px,2.2cqw);font-weight:700;line-height:1;position:absolute}.rule-example-rank{top:3px;left:3px}.rule-example-file{bottom:2px;right:3px}.rule-example-board .chess-piece{font-size:10cqw}.rule-example-river{color:oklch(38% .06 60);background:oklch(84% .06 75)}.rule-river-lines{fill:none;stroke:oklch(42% .07 60);stroke-width:.018px;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.rule-river-lines text{text-anchor:middle;fill:oklch(42% .07 60);stroke:none;font-family:Songti SC,serif;font-size:.36px}.rule-example-board .xiangqi-piece-artwork{object-fit:contain;width:88%;height:88%}.rule-example-figure figcaption{color:var(--text-secondary);text-align:center;flex-direction:column;gap:8px;padding:12px 4px 2px;font-size:13px;line-height:1.5;display:flex}.rule-example-name{color:var(--text-primary);font-weight:600}.rule-example-legend{flex-wrap:wrap;justify-content:center;gap:6px 14px;font-size:12px;display:flex}.rule-example-legend-item{align-items:center;gap:6px;display:flex}.rule-legend-move,.rule-legend-capture{border-radius:50%;flex:none;width:10px;height:10px;display:block}.rule-legend-move{background:var(--text-secondary)}.rule-legend-capture{border:2px solid var(--danger)}.rule-example-note{text-wrap:pretty}.rule-piece-choices{border:0;flex:260px;gap:4px;min-width:0;margin:0;padding:0;display:grid}.rule-piece-choice{cursor:pointer;background:0 0;border:1px solid #0000;border-radius:20px;align-items:flex-start;gap:12px;padding:14px 12px;transition:background-color .16s,border-color .16s;display:flex;position:relative}.rule-piece-choice:hover{background:var(--glass-hover)}.rule-piece-choice:has(input:checked){background:var(--glass-raised);border-color:color-mix(in oklch, var(--accent-warm) 50%, transparent)}.rule-piece-choice .rule-symbols>span{width:24px;height:32px;font-size:26px}.rule-piece-choice .rule-symbols.xiangqi>span{width:30px;height:30px;font-size:21px}.rule-piece-copy{min-width:0;color:var(--text-secondary);text-wrap:pretty;flex-direction:column;flex:1;gap:5px;font-size:14px;line-height:1.55;display:flex}.rule-piece-name{color:var(--text-primary);font-size:17px;font-weight:700;line-height:1.4}.rule-piece-detail{font-size:13px}.rules-references,.rules-related,.rules-play{border-top:1px solid var(--border);margin-top:0;padding-top:28px}.rules-references,.rules-related{padding-bottom:28px}.rules-page :is(.rules-references,.rules-related,.rules-play) h2{letter-spacing:-.02em;margin:0 0 12px;font-size:22px;font-weight:700;line-height:1.4}.rules-references ul,.rules-related ul{margin:0 0 12px;padding:0;list-style:none}.rules-references li{font-size:15px;line-height:1.7}.rules-references a,.rules-related a{min-height:44px;color:var(--accent-warm);text-underline-offset:4px;align-items:center;padding-block:8px;font-size:16px;text-decoration:underline;display:inline-flex}.rules-page .rules-references p{font-size:15px;line-height:1.6}.rules-play>div{flex-wrap:wrap;align-items:center;gap:12px 24px;display:flex}.rules-play>div>a{min-height:50px}@media (width<=1179px){.rules-layout{grid-template-columns:minmax(0,1fr)}.rules-sidebar{max-height:none;padding:0;position:static;overflow:visible}.rules-toc-desktop{display:none}.rules-toc-mobile{display:block}.rules-toc-mobile ol{padding:0 0 12px}.rules-toc-mobile a{padding-inline:4px;font-size:15px}.rules-facts dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}.rules-header{grid-template-columns:64px minmax(0,1fr)}.rules-header:not(.rules-photo-hero) .rules-header-actions{grid-column:2;justify-self:start;min-width:216px}}@media (width<=719px){.page-container.rules-page{padding:16px 16px calc(110px + env(safe-area-inset-bottom));gap:20px}.rules-header{grid-template-columns:52px minmax(0,1fr);align-items:start;gap:16px 12px;padding:8px 2px 0}.rules-game-icon{width:52px;height:52px;font-size:28px}.rules-header h1{font-size:34px}.rules-header-copy>p{font-size:16px}.rules-header:not(.rules-photo-hero) .rules-header-actions{grid-column:1/-1;justify-self:stretch}.rules-byline{gap:4px 12px}.rules-page .rulebook{border-radius:26px;padding:6px 18px 18px}.rules-page .rulebook p{font-size:16px}.rule-section{padding-block:24px}.rules-page .rule-section h2{font-size:24px}.rule-piece-explorer{border-radius:22px;padding:8px}.rule-example-frame{border-radius:18px;padding:8px}}@container (width<=650px){.rule-pieces{grid-template-columns:minmax(0,1fr)}.rule-piece-explorer{flex-direction:column}.rule-example-figure{flex-basis:auto;width:100%;position:static}.rule-piece-choices{flex-basis:auto;width:100%}}@container (width<=480px){.rule-pieces .rule-item{grid-template-columns:auto minmax(0,1fr);gap:8px 12px;display:grid}.rule-pieces .rule-item>div{display:contents}.rule-pieces h3{align-self:center;margin:0}.rule-pieces p{grid-column:1/-1}.rules-page .rulebook .rule-detail{margin-top:0}}@media (prefers-reduced-motion:reduce){:root:has(.rules-page){scroll-behavior:auto}.rules-toc a,.rule-piece-choice{transition:none}}.rule-anchor{scroll-margin-top:24px;display:block}.rule-faq details+details{border-top:1px solid var(--border)}.rule-faq summary{cursor:pointer;align-items:center;gap:14px;min-height:56px;padding-block:16px;list-style:none;display:flex}.rule-faq summary::-webkit-details-marker{display:none}.rule-faq h3{flex:1;margin:0;font-size:17px;font-weight:600;line-height:1.5}.rule-faq-toggle:after{color:var(--text-secondary);content:"+";font-size:24px;line-height:1}.rule-faq details[open] .rule-faq-toggle:after{content:"−"}.rules-toc a[aria-current=location]{background:var(--glass-hover);font-weight:600}.expanded-rules-setup{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:start;gap:24px;display:grid}.expanded-rules-setup,.expanded-rules-actions,.expanded-rules-checklist,.expanded-rules-outcomes,.expanded-rules-example{overflow-wrap:anywhere}.expanded-rules-setup .rule-diagram{width:100%;max-width:none;margin:0}.expanded-rules-preparation,.expanded-rules-setup .rule-diagram,.expanded-rules-example>div{min-width:0}.expanded-rules-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0 0;padding:0;display:grid}.expanded-rules-facts>div{background:var(--glass);border:1px solid var(--border);border-radius:14px;min-width:0;padding:12px}.expanded-rules-facts dt{color:var(--text-secondary);margin-bottom:6px;font-size:13px;line-height:1.5}.expanded-rules-facts dd{color:var(--text-primary);overflow-wrap:anywhere;margin:0;font-size:16px;font-weight:600;line-height:1.5}.expanded-rules-actions,.expanded-rules-outcomes,.expanded-rules-checklist,#play-controls .rule-points{gap:16px;margin:0;padding:0;list-style:none;display:grid}.expanded-rules-actions,.expanded-rules-outcomes,#play-controls .rule-points{grid-template-columns:repeat(2,minmax(0,1fr))}.expanded-rules-actions .rule-item,#play-controls .rule-item{background:var(--glass);border:1px solid var(--border);border-radius:20px;padding:20px;display:block}.expanded-rules-actions .rule-item>svg{color:var(--accent-warm);margin-bottom:12px}.expanded-rules-actions .rule-item h3{margin-bottom:10px}.expanded-rules-checklist{gap:0}.expanded-rules-checklist>li,.expanded-rules-outcomes>li,.expanded-rules-example{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:12px;min-width:0;display:grid}.expanded-rules-checklist>li{padding-block:14px}.expanded-rules-checklist>li+li{border-top:1px solid var(--border)}.expanded-rules-checklist>li:first-child{padding-top:0}.expanded-rules-checklist>li:last-child{padding-bottom:0}.expanded-rules-checklist svg,.expanded-rules-outcomes svg,.expanded-rules-example>svg{color:var(--accent-warm);margin-top:4px}.expanded-rules-outcomes>li{background:var(--glass);border:1px solid var(--border);border-inline-start:3px solid var(--accent-warm);border-radius:16px;padding:18px}.expanded-rules-outcomes>li:only-child{grid-column:1/-1}.expanded-rules-example{background:var(--glass-hover);border:1px solid var(--border);border-radius:20px;gap:16px;padding:22px}.expanded-rules-example .text-link{white-space:normal;overflow-wrap:anywhere;align-items:center;gap:10px;max-width:100%;min-height:44px;margin-top:12px;font-size:16px;line-height:1.5;display:inline-flex}.expanded-rules-example .text-link svg{flex:none}@container (width<=650px){.expanded-rules-setup,.expanded-rules-actions,.expanded-rules-outcomes,#play-controls .rule-points{grid-template-columns:minmax(0,1fr)}.expanded-rules-setup .rule-diagram{max-width:400px;margin-inline:auto}.expanded-rules-actions .rule-item,.expanded-rules-example,#play-controls .rule-item{padding:16px}}@container (width<=360px){.expanded-rules-facts{grid-template-columns:minmax(0,1fr)}.expanded-rules-example{grid-template-columns:minmax(0,1fr);gap:12px}}@media (width<=767px){.page-container.rules-page{--rules-page-inset:16px;padding-inline:16px}}.rules-page:is([data-game=chess],[data-game=xiangqi]){--caro-inset:color-mix(in oklch, var(--text-primary) 3%, transparent)}.rule-learning-setup{grid-template-columns:minmax(220px,.85fr) minmax(0,1fr);align-items:start;gap:18px;display:grid}.rule-learning-setup .caro-cards,.rule-learning-section .rule-learning-examples,.rule-learning-section .caro-steps{grid-template-columns:minmax(0,1fr)}.rule-learning-examples li[data-example-card=true]{grid-template-columns:minmax(220px,.85fr) minmax(0,1fr);align-items:center;gap:20px;display:grid}.rule-learning-examples .rule-detail{margin-top:12px;font-size:14px}.rule-move-example{gap:10px;width:100%;min-width:0;max-width:380px;margin:0 auto;display:grid}.rule-move-example figcaption{color:var(--text-secondary);text-align:center;gap:6px;font-size:13px;line-height:1.55;display:grid}.rule-move-example figcaption strong{color:var(--text-primary)}.rule-move-example figcaption a{min-height:44px;color:var(--accent-warm);text-underline-offset:3px;justify-self:center;align-items:center;padding:8px;text-decoration:underline;display:inline-flex}.rule-example-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;display:grid}.rule-example-controls button{min-height:44px;color:var(--text-primary);cursor:pointer;background:var(--glass);border:1px solid var(--border);border-radius:14px;padding:9px 10px;font-size:13px;font-weight:600;line-height:1.4}.rule-example-controls button[aria-pressed=true]{color:var(--accent-warm);background:color-mix(in oklch, var(--accent-warm) 12%, transparent);border-color:color-mix(in oklch, var(--accent-warm) 35%, transparent)}.rule-example-controls button:focus-visible{outline:2px solid var(--accent-warm);outline-offset:3px}.rule-example-forbidden{z-index:5;color:#9a201a;background:#fff0dc;border:1px solid #9a201a;border-radius:50%;place-items:center;width:70%;height:70%;font-size:5cqw;font-weight:700;line-height:1;display:grid;position:absolute}@container (width<=640px){.rule-learning-setup,.rule-learning-examples li[data-example-card=true],.rule-learning-section .caro-mistakes li{grid-template-columns:minmax(0,1fr)}.rule-learning-examples li[data-example-card=true]>div{grid-row:1}}
