:root{color-scheme:light;--ink:#26352e;--muted:#58685e;--line:#d8dbce;--green:#26563e;--paper:#fffef9;--wood:#e8c78d}*{box-sizing:border-box}body{margin:0;background:#f5f4ec;color:var(--ink);font:16px/1.5 Inter,"Microsoft YaHei",system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #006ba8;outline-offset:2px}button:disabled{cursor:default;opacity:.48}[hidden]{display:none!important}.mast{background:#edf0e5;border-bottom:1px solid var(--line)}.mast-inner,main{max-width:960px;margin:auto;padding:0 20px}.mast-inner,.heading,.bar,.log-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.mast-inner{height:56px}.brand{font:700 1.21rem/1.3 "STKaiti","KaiTi",serif;letter-spacing:.1em}nav{display:flex;gap:4px}nav a,.roles button,.tools button,#retry{display:inline-block;border-radius:7px;padding:7px 12px;color:var(--ink);text-decoration:none;font-weight:550}nav a[aria-current]{background:var(--green);color:white}.heading{justify-content:flex-start;margin:17px 0 12px;gap:14px}.heading h1{font:650 clamp(1.55rem,3vw,2rem)/1.25 "Nanum Myeongjo","Songti SC","SimSun",serif;margin:0}.heading span,.bar span,.board-note,.log-head span,#empty-log{color:var(--muted);font-size:.86rem}.layout{display:grid;align-items:start;grid-template-columns:minmax(0,536px) minmax(275px,1fr);gap:18px;margin-bottom:20px}.table,.panel{background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:14px}.bar{margin:0 0 8px}.bar strong{font-size:1.02rem}.board-note{margin:9px 0 0}.frame{padding:4px;border-radius:7px;background:#bf975f;box-shadow:inset 0 0 0 1px #997042}.frame:has(.wuziqi){background:#c89f65}#board{width:100%;isolation:isolate;position:relative;display:grid;user-select:none;background:linear-gradient(105deg,#efd5a4,var(--wood));overflow:hidden;border-radius:3px}.xiangqi{aspect-ratio:9/10;grid-template:repeat(10,minmax(0,1fr))/repeat(9,minmax(0,1fr))}.wuziqi{aspect-ratio:1;grid-template:repeat(15,minmax(0,1fr))/repeat(15,minmax(0,1fr))}.grid-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}.grid-art .lines{fill:none;stroke:#76562e;stroke-width:.025}.grid-art circle{fill:#6e512e}.grid-art text{fill:#775733;font-family:"STKaiti","KaiTi",serif;text-anchor:middle;dominant-baseline:central}.grid-art .coord{fill:#735a3c;font-family:Inter,sans-serif;font-size:.18px}.point{min-height:0;min-width:0;position:relative;border:none;background:none;padding:0;display:grid;place-items:center;color:#262722;line-height:1}.point:focus-visible{outline-offset:-2px;z-index:1}.token{display:grid;place-items:center;pointer-events:none;aspect-ratio:1;border-radius:50%}.xiangqi{container-type:inline-size}.xiangqi .token{width:84%;background:radial-gradient(circle at 38% 25%,#fff9df,#f8e3b2 80%);border:2px solid currentColor;box-shadow:inset 0 0 0 1.5px #ffeec4,inset 0 0 0 2px currentColor,0 2px 2px #71542b70;font:700 clamp(16px,6.5cqw,34px)/1 "STKaiti","KaiTi","Songti SC","SimSun",serif}.red{color:#a02e22}.stone-b{width:82%;background:radial-gradient(circle at 33% 27%,#565953,#252924 55%,#171b19);box-shadow:0 1px 2px #5c452b}.stone-w{width:82%;background:radial-gradient(circle at 30% 25%,#fff,#f4f2e7 57%,#c9c7b8);box-shadow:0 1px 2px #5c452b}.point.last::before,.point.legal::after,.point.winner::after,.point.to::after,.point.from::before,.point.selected::before{content:"";position:absolute;pointer-events:none}.point.last::before{border-radius:50%;width:16%;aspect-ratio:1;background:#b5351b;border:1px solid #fff2d9;bottom:6%;right:10%;z-index:1}.wuziqi .point.last::before{bottom:auto;right:auto}.point.legal::after{border-radius:50%;background:#285e42b8;width:20%;aspect-ratio:1}.point.legal:has(.token)::after{background:transparent;border:2px dashed #285e42;width:92%}.point.selected::before,.point.from::before{inset:3%;border:2px dashed #126958;border-radius:12%}.point.to::after,.point.winner::after{inset:3%;border:3px solid #136d5b;border-radius:14%}.wuziqi .point.to::after{inset:10%;border-radius:50%}.point.winner::after{border-radius:50%;border-width:2px}aside{display:grid;gap:12px}.panel h2{margin:0 0 10px;font-size:1rem}.roles,.tools{display:flex;flex-wrap:wrap;gap:6px}.roles button,.tools button,#retry{background:#fcfcf7;border:1px solid #c6cdc0;font-size:.9rem}.roles button[aria-pressed=true],.tools button[aria-pressed=true]{background:var(--green);color:white;border-color:var(--green)}.tools{margin-top:12px}.tools button{font-weight:400}.panel #status{margin:12px 0 0;color:#384c40;font-size:.91rem}.panel #status[data-error=true]{color:#9e3820}#retry{margin-top:8px}.log-head h2{margin:0}.log-head span{font-size:.76rem}#log{margin:8px 0 0;padding:0;list-style:none;max-height:235px;overflow:auto}#log li{display:grid;grid-template-columns:3ch 2.2em 1fr;align-items:baseline;gap:9px;font-size:.93rem;padding:4px 0;border-top:1px solid #eeeee5;font-variant-numeric:tabular-nums}.count{color:var(--muted);font-size:.8rem}#empty-log{margin:8px 0 0}@media(max-width:760px){.layout{grid-template-columns:minmax(0,1fr);gap:10px}.mast-inner,main{max-width:562px;padding:0 10px}.heading{margin:10px 0 8px}.mast-inner{height:46px}.table,.panel{padding:10px}.board-note{font-size:.8rem}.roles button,.tools button{padding:8px 13px}.frame{padding:3px}.log-head span{font-size:.8rem}}
