:root{--bg: #f4efe6;--panel: #fffaf2;--text: #2b2118;--muted: #7a6a58;--board: #e8c98f;--line: #5b3a1a;--red: #b3261e;--black: #1f1f1f;--piece: #fbeed2;--accent: #2f6fdb}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Noto Sans TC,Microsoft JhengHei,system-ui,sans-serif}header{padding:12px 16px 0}h1{margin:0;font-size:22px}h1 small{font-size:14px;color:var(--muted);font-weight:400;margin-left:8px}main{display:flex;gap:16px;padding:12px 16px 24px;align-items:flex-start;flex-wrap:wrap}.board-wrap{flex:1 1 420px;max-width:560px}#board{width:100%;height:auto;display:block;background:var(--board);border-radius:8px}.status{padding:8px 12px;margin-bottom:8px;background:var(--panel);border-radius:6px;font-weight:700}.status[data-result=red]{color:var(--red)}.status[data-result=draw]{color:var(--muted)}.grid line{stroke:var(--line);stroke-width:1.5}.grid .frame{fill:none;stroke:var(--line);stroke-width:3}.grid .river{font-size:26px;fill:var(--line);text-anchor:middle;dominant-baseline:central;letter-spacing:6px}.piece circle{fill:var(--piece);stroke-width:2.5}.piece .inner{fill:none;stroke-width:1}.piece text{font-size:26px;font-weight:700;text-anchor:middle;dominant-baseline:central}.piece.red circle{stroke:var(--red)}.piece.red text{fill:var(--red)}.piece.black circle{stroke:var(--black)}.piece.black text{fill:var(--black)}.last-from{fill:var(--accent);opacity:.5}.last-to{fill:none;stroke:var(--accent);stroke-width:3}.check{fill:none;stroke:#e53935;stroke-width:4;stroke-dasharray:6 4}.panel{flex:0 1 320px;min-width:260px;background:var(--panel);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:10px}.controls{display:flex;gap:8px}.controls button{flex:1;padding:8px 0;font-size:15px;border:1px solid var(--line);background:#fff;border-radius:6px;cursor:pointer}.controls button:first-child{background:var(--red);color:#fff;border-color:var(--red)}.controls button:disabled{opacity:.4;cursor:default}fieldset{border:1px solid #dccfbd;border-radius:6px;margin:0;padding:6px 10px 8px}legend{font-weight:700;font-size:14px}label{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin:4px 0;gap:8px}label.inline{justify-content:flex-start}label input[type=number]{width:80px;padding:2px 4px}.info{font-size:13px;line-height:1.6}.red-text{color:var(--red)}.tally{font-size:14px;font-weight:700}.moves{margin:0;padding-left:32px;max-height:220px;overflow-y:auto;font-size:14px;line-height:1.7;border-top:1px solid #dccfbd;padding-top:6px}.target{fill:#2e9d5b;opacity:.65;cursor:pointer}.aim-line{stroke:#e53935;stroke-width:4;stroke-dasharray:12 8;stroke-linecap:round;opacity:.85;animation:aim-flow .6s linear infinite}.aim-ring{fill:none;stroke:#e53935;stroke-width:2.5;opacity:.9;animation:aim-pulse 1s ease-in-out infinite;transform-box:fill-box;transform-origin:center}.aim-tick{stroke:#e53935;stroke-width:3;stroke-linecap:round}@keyframes aim-flow{to{stroke-dashoffset:-20}}@keyframes aim-pulse{0%,to{transform:scale(1);opacity:.9}50%{transform:scale(1.12);opacity:.5}}.escape-halo{fill:none;stroke:#f2c14e;stroke-width:5;pointer-events:none;transform-box:fill-box;transform-origin:center;animation:escape-halo 1.2s ease-out infinite}@keyframes escape-halo{0%{transform:scale(1);opacity:.95}to{transform:scale(2.1);opacity:0}}.escape-arrow{pointer-events:none;animation:escape-nudge .8s ease-in-out infinite}.escape-arrow line,.escape-arrow path{stroke:#2e9d5b;stroke-width:4;fill:none;stroke-linecap:round;stroke-linejoin:round}@keyframes escape-nudge{0%,to{transform:translate(0)}50%{transform:translate(var(--ux),var(--uy))}}.escape-spot{fill:#2e9d5b;opacity:.85;cursor:pointer;transform-box:fill-box;transform-origin:center;animation:escape-spot .8s ease-in-out infinite}@keyframes escape-spot{0%,to{transform:scale(1)}50%{transform:scale(1.2)}}@media (prefers-reduced-motion: reduce){.aim-line,.aim-ring,.escape-halo,.escape-arrow,.escape-spot{animation:none}}.marked{fill:none;stroke:#2e9d5b;stroke-width:3}nav.modes{display:flex;gap:12px;margin-top:6px;font-size:14px}nav.modes a{color:var(--muted);text-decoration:none;padding-bottom:2px}nav.modes a.active{color:var(--text);font-weight:700;border-bottom:2px solid var(--red)}.fx{pointer-events:none}.ripple{fill:none;stroke:#2e9d5b;stroke-width:3}.spark.red{fill:var(--red)}.spark.black{fill:var(--black)}.shockwave{fill:none;stroke:#f2b632;stroke-width:6}.piece{transition:none}.river-band{fill:var(--board)}.river-edge{stroke:var(--line);stroke-width:1.5}.grid .river.diagonal{font-size:23px;letter-spacing:5px}:root{--river-water: #9cc3c9;--river-bank: #d9cfa4;--river-ink: #3d6b73}.river-band{fill:var(--river-water)}.river-edge{stroke:var(--line);stroke-width:2}.grid .edge{fill:none;stroke:var(--line);stroke-width:1.5}.grid .river.diagonal{font-size:22px;letter-spacing:5px;fill:var(--river-ink);font-weight:700}.piece.skin-jade .body{fill:#d7eedd}.piece.skin-jade .inner{stroke:#5e9c74}.piece.skin-gold .body{fill:#f8e7b0;stroke:#c4962a!important;stroke-width:3.5}.piece.skin-gold .inner{stroke:#c4962a;stroke-width:1.5}.piece.skin-ink .body{fill:#2b2724}.piece.skin-ink .inner{stroke:#8a7f72}.piece.skin-ink.red text{fill:#ff7a6b}.piece.skin-ink.black text{fill:#f1e6d2}.fx-ripple{fill:none;stroke:#2e9d5b;stroke-width:3}.fx-gold-ring{fill:none;stroke:#e0a91c;stroke-width:3}.fx-gold-ring.thin{stroke-width:1.5}.fx-gold{fill:#f2c230}.fx-ink,.fx-ink-drop{fill:#1d1a17}.fx-petal{fill:#f4a9c0}.fx-petal-ring{fill:none;stroke:#f4a9c0;stroke-width:2}.fx-spark.red{fill:var(--red)}.fx-spark.black{fill:var(--black)}.fx-fire{fill:#ff8a1f}.fx-fire-glow{fill:#ffcf6b}.fx-splash{fill:#4aa3d8}.fx-splash-ring{fill:none;stroke:#4aa3d8;stroke-width:2.5}.fx-bolt{fill:none;stroke:#ffe46b;stroke-width:4;stroke-linejoin:round;filter:drop-shadow(0 0 4px #fff3a0)}.fx-flash{fill:#fff6c2}.fx-bolt-spark{fill:#ffe46b}.fx-shockwave{fill:none;stroke:#f2b632;stroke-width:6}.fx-ghost.red{fill:var(--red)}.fx-ghost.black{fill:var(--black)}@media (max-width: 760px){.board-wrap,.panel{flex:1 1 100%;max-width:none;min-width:0}}
