:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#e7ecf5;background:#0f1725;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.42}button:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #81b6ff;outline-offset:2px}#app{max-width:1170px;margin:0 auto;padding:24px 22px 50px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;gap:12px}.brand{display:flex;align-items:center;gap:12px}.logo{width:50px;height:50px;display:grid;place-items:center;border-radius:14px;background:#2a3b5a;font-size:32px;color:#f8fafc}.brand h1{font-size:24px;letter-spacing:-.04em;margin:0;font-weight:800}.brand h1 span{color:#94a3b8;font-weight:500}.brand p{margin:3px 0 0;font-size:12px;color:#9dadc2}.engine-pill{border:1px solid #334259;color:#a8bcda;padding:7px 11px;border-radius:30px;font-size:12px;white-space:nowrap}main{display:grid;grid-template-columns:minmax(0,1fr) 365px;gap:20px;align-items:start}.panel{background:#192438;border:1px solid #2f3e56;border-radius:18px;padding:18px;box-shadow:0 12px 35px #060e1c24}.board-top{display:flex;justify-content:space-between;align-items:center;margin:0 2px 12px;gap:12px}.board-top strong{font-size:16px}.board-top span{font-size:12px;color:#a7b7cc}.board-area{max-width:620px;margin:auto}.board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border-radius:8px;box-shadow:0 4px 12px #02081766}.sq{position:relative;display:flex;align-items:center;justify-content:center;border:0;border-radius:0;padding:0;min-width:0;aspect-ratio:1;line-height:1}.sq.light{background:#efddbb}.sq.dark{background:#ad8360}.sq.selected{box-shadow:inset 0 0 0 5px #ffdc6b}.sq.target:after{content:"";position:absolute;width:24%;height:24%;border-radius:100%;background:#17633e77}.sq.target-capture:after{content:"";position:absolute;inset:4%;border:5px solid #17633e99;border-radius:50%}.sq.in-check{background:#e4a49b}.piece{font-size:clamp(24px,5vw,64px);font-family:Segoe UI Symbol,DejaVu Sans,serif;line-height:1;color:#f9f7ee;-webkit-text-stroke:.7px #25303c;text-shadow:0 2px 3px #27313c99;-webkit-user-select:none;user-select:none}.piece.b{color:#1f2836;-webkit-text-stroke:.7px #e4e3db;text-shadow:0 2px 2px #f9f9f888}.file-coordinate,.rank-coordinate{position:absolute;pointer-events:none;color:#383839aa;font-weight:800;font-size:10px}.file-coordinate{bottom:3px;right:4px}.rank-coordinate{top:3px;left:4px}.board-controls{display:flex;gap:7px;justify-content:space-between;flex-wrap:wrap;margin-top:14px}.secondary{background:#273750;border:1px solid #40526f;color:#edf4ff;border-radius:9px;padding:10px 12px;font-size:13px;font-weight:650}.secondary:not(:disabled):hover{background:#334767}.primary{background:#80b8ff;border:1px solid #93c2ff;color:#0b1e38;border-radius:11px;padding:14px 15px;font-weight:800;font-size:15px}.primary:not(:disabled):hover{background:#add2ff}.wide{width:100%}.mode-row{margin-top:15px;padding:12px 3px 0;border-top:1px solid #304159;display:flex;gap:12px;justify-content:space-between;align-items:center}.toggle{display:flex;align-items:center;gap:10px;cursor:pointer}.toggle input{width:18px;height:18px;accent-color:#8bbaff}.toggle span{display:flex;flex-direction:column;gap:3px}.toggle strong{font-size:13px}.toggle small{color:#9babbe;font-size:11px}.side-picker{white-space:nowrap;font-size:12px;color:#9babbe}.side-picker select{margin-left:6px;background:#22324c;color:#fff;border:1px solid #40526f;border-radius:8px;padding:8px}.setup-tools{margin-top:15px;border-top:1px solid #304159;padding-top:12px}.hidden{display:none!important}.palette-intro{font-size:12px;color:#9db0c7;margin-bottom:10px}.palette{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.palette-option{font-size:27px;min-height:43px;padding:0;background:#2c3b52;border:1px solid #435470;border-radius:8px;color:#fff;line-height:1}.palette-option.chosen{outline:2px solid #92c1ff;background:#47628a}.setup-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}.setup-actions button:not(.secondary){background:#80b8ff;color:#0b1e38;border:0;border-radius:9px;padding:9px 12px;font-weight:750}.side-panel{display:grid;gap:18px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.section-title h2{margin:0;font-size:17px;letter-spacing:-.02em}.free{font-size:11px;color:#89e0ba;white-space:nowrap}.result{margin-top:18px;min-height:105px;font-size:13px;line-height:1.65;color:#ccdae9}.muted{color:#a6b6c9;margin:0}.suggested{background:#243955;border:1px solid #42658e;border-radius:12px;padding:12px;display:flex;gap:3px;flex-direction:column}.suggested small{font-size:10px;font-weight:800;letter-spacing:.08em;color:#97b7db}.suggested strong{font-size:30px;line-height:1.3;color:#fff}.suggested span{color:#97e4ba;font-weight:650;font-size:13px}.pv{border-top:1px solid #314159;margin-top:12px;padding-top:12px}.pv strong{color:#e0e9f5}.pv p{word-break:break-word}.pv small{color:#8ea2bb}.result-actions{display:flex;gap:8px;margin-top:16px}.result-actions>*{flex:1}.fen-panel label{display:block;color:#a9b9cf;font-size:12px;margin-bottom:9px}textarea{width:100%;background:#0f192b;color:#e6eaf0;border:1px solid #3c4b63;border-radius:9px;padding:11px;font-size:12px;resize:vertical;line-height:1.5}.fen-controls{display:flex;gap:9px;margin-top:9px}.tip,.footer-note{color:#90a2b8;font-size:12px;line-height:1.6}.tip{margin-bottom:0}.footer-note{text-align:center;padding:0 6px}.error{color:#ffb3b3}.dialog-backdrop{position:fixed;inset:0;background:#000b;display:grid;place-items:center;z-index:20}.dialog{background:#1e2b41;border:1px solid #4d617e;border-radius:16px;padding:20px;max-width:95vw;box-shadow:0 20px 50px #0007}.dialog h2{font-size:18px;margin-top:0}.promotion-choices{display:flex;gap:10px;margin:12px 0}.promotion-piece{height:70px;width:70px;background:#ecd9b6;border:0;border-radius:8px;font-size:50px;color:#2b3036}#toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);max-width:90vw;background:#e5f1ff;color:#172941;border-radius:9px;padding:12px 15px;font-weight:650;font-size:13px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;box-shadow:0 10px 25px #0006;z-index:50}#toast.show{opacity:1;transform:translate(-50%)}@media(max-width:850px){#app{max-width:620px;padding:12px 12px 35px}main{grid-template-columns:1fr;gap:14px}.panel{padding:12px;border-radius:14px}header{margin:4px 0 14px}.brand h1{font-size:20px}.logo{height:43px;width:43px}.engine-pill{font-size:10px;padding:6px 8px}.piece{font-size:clamp(30px,9vw,64px)}.board-controls{gap:7px}.board-controls .secondary{flex:1;padding:10px 7px;font-size:12px}.palette-option{font-size:24px}.footer-note{margin:0 0 10px}}@media(max-width:370px){.board-controls{display:grid;grid-template-columns:1fr 1fr}.brand p{display:none}.palette{gap:3px}.palette-option{min-height:37px}.piece{font-size:9vw}}
