:root{color:#15171a;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#e9edf0}html,body,#root{min-height:100%}body{margin:0}#root{width:100%}*{box-sizing:border-box}body{color:#15171a;background:#e9edf0;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input{font:inherit}.app{min-height:100vh;padding:24px}.endgame-backdrop,.promotion-backdrop,.side-choice-backdrop{z-index:20;background:#0d121694;place-items:center;padding:18px;display:grid;position:fixed;inset:0}.promotion-backdrop{z-index:30}.side-choice-backdrop{z-index:40}.endgame-modal{background:#fff;border:1px solid #d5dce1;border-top:8px solid #2f6f73;border-radius:8px;width:min(560px,100%);max-height:calc(100vh - 36px);padding:22px;overflow:auto;box-shadow:0 24px 70px #0000004d}.promotion-modal{background:#fff;border:1px solid #d5dce1;border-radius:8px;width:min(420px,100%);padding:20px;box-shadow:0 24px 70px #0000004d}.side-choice-modal{background:#fff;border:1px solid #d5dce1;border-radius:8px;width:min(420px,100%);padding:22px;box-shadow:0 24px 70px #0000004d}.side-choice-modal>span{color:#2f6f73;letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:900}.side-choice-modal h2{color:#10171d;margin:8px 0 18px;font-size:28px;line-height:1.15}.side-choice-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.side-choice-actions button{color:#fff;cursor:pointer;background:#26323c;border:0;border-radius:6px;min-height:54px;font-weight:900}.side-choice-actions button:last-child{background:#2f6f73}.side-choice-actions button:hover{filter:brightness(.92)}.promotion-modal>span{color:#2f6f73;letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:900}.promotion-modal h2{color:#10171d;margin-top:8px;font-size:24px;line-height:1.15}.promotion-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px;display:grid}.promotion-options button{color:#10171d;cursor:pointer;background:#f8fafb;border:1px solid #dfe5e9;border-radius:8px;place-items:center;min-height:92px;padding:10px 6px;display:grid}.promotion-options button:hover{background:#edf6f2;border-color:#2f6f73}.promotion-options strong{color:#fffdf4;text-shadow:0 2px 1px #000000a6,0 0 1px #202020;font-family:Segoe UI Symbol,"Noto Sans Symbols 2",serif;font-size:40px;line-height:1}.promotion-options small{color:#3e4a54;font-size:12px;font-weight:800}.promotion-cancel{color:#26323c;cursor:pointer;background:#fff;border:1px solid #dfe5e9;border-radius:8px;width:100%;margin-top:12px;padding:10px;font-weight:800}.promotion-cancel:hover{background:#f3f5f6}.endgame-modal.loss{border-top-color:#8a3d32}.endgame-modal.draw{border-top-color:#6b7280}.endgame-kicker{color:#65717d;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px;font-size:12px;font-weight:900}.endgame-modal h2{color:#10171d;margin-bottom:8px;font-size:30px;line-height:1.1}.endgame-modal h3{margin-top:18px}.endgame-result{color:#26323c;background:#edf1f3;border-radius:999px;align-items:center;min-height:32px;margin:2px 0 4px;padding:5px 10px;font-weight:900;display:inline-flex}.endgame-modal p{color:#2d353d;margin-top:8px;font-size:15px;line-height:1.45}.endgame-modal ul{gap:7px;margin:14px 0 0;padding-left:20px;display:grid}.endgame-modal li{color:#243038;font-size:14px;line-height:1.4}.postgame-report{background:#f8fafb;border:1px solid #dfe5e9;border-radius:8px;margin-top:18px;padding:14px}.postgame-report h3{margin-bottom:10px}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px;display:grid}.report-grid div{background:#fff;border:1px solid #e6ebef;border-radius:6px;padding:10px}.report-grid span{color:#65717d;letter-spacing:.06em;text-transform:uppercase;margin-bottom:4px;font-size:11px;font-weight:900;display:block}.report-grid strong{color:#13272a;text-transform:capitalize;font-size:14px;display:block}.endgame-actions{grid-template-columns:repeat(2,1fr);gap:10px;margin-top:18px;display:grid}.endgame-actions button{color:#fff;cursor:pointer;background:#26323c;border:0;border-radius:6px;min-height:44px;font-weight:900}.endgame-actions button:last-child{background:#2f6f73}.shell{grid-template-columns:minmax(620px,1fr) 360px;align-items:start;gap:20px;width:min(1220px,100%);margin:0 auto;display:grid}.play-area,.panel{background:#f8fafb;border:1px solid #d5dce1;border-radius:8px}.play-area{padding:22px}.topbar,.panel-heading,.table-strip,.state-stack{align-items:center;display:flex}.topbar{justify-content:space-between;gap:16px;margin-bottom:18px}h1,h2,h3,p{margin:0}h1{letter-spacing:0;font-size:32px;line-height:1.05}h2{font-size:18px}h3{color:#47515b;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px;font-size:12px;font-weight:800}.subtitle{color:#65717d;margin-top:6px}.state-stack{flex-wrap:wrap;justify-content:flex-end;gap:8px}.state-pill,.eval-pill,.engine-ok,.engine-idle{white-space:nowrap;border-radius:999px;align-items:center;min-height:32px;padding:6px 11px;font-size:13px;font-weight:800;display:inline-flex}.state-pill{color:#fff;background:#1e2932}.eval-pill,.engine-ok{color:#17432a;background:#dce9df}.engine-idle{color:#6b4b16;background:#e8e1d3}.board-wrap{place-items:center;padding:10px;display:grid}.board-layout{grid-template-columns:minmax(74px,92px) minmax(0,620px) minmax(74px,92px);align-items:stretch;gap:12px;width:min(100%,840px);display:grid}.captured-tray{background:#fff;border:1px solid #dfe5e9;border-radius:8px;flex-direction:column;justify-content:space-between;gap:12px;min-height:100%;padding:12px 10px;display:flex}.captured-tray span{color:#65717d;letter-spacing:.06em;text-transform:uppercase;font-size:11px;font-weight:900;line-height:1.2}.captured-pieces{flex-wrap:wrap;align-content:flex-end;gap:4px;min-height:42px;display:flex}.captured-pieces strong{place-items:center;width:26px;height:30px;font-family:Segoe UI Symbol,"Noto Sans Symbols 2",serif;font-size:25px;line-height:1;display:inline-grid}.captured-pieces em{color:#8a959e;font-size:12px;font-style:normal;font-weight:800}.white-captures .captured-pieces strong{color:#11161b;text-shadow:0 1px 1px #fff6}.black-captures .captured-pieces strong{color:#fffdf4;text-shadow:0 2px 1px #000000a6,0 0 1px #202020}.custom-board{aspect-ratio:1;border:10px solid #2d3338;border-radius:8px;grid-template-rows:repeat(8,minmax(0,1fr));grid-template-columns:repeat(8,minmax(0,1fr));width:min(68vh,620px);max-width:100%;display:grid;overflow:hidden;box-shadow:0 18px 44px #181e2433}.square{cursor:pointer;border:0;place-items:center;width:100%;height:100%;transition:box-shadow .12s,filter .12s;display:grid;position:relative}.square:disabled{cursor:wait}.square.light{background:#e6d8bd}.square.dark{background:#78906e}.square:hover:not(:disabled){filter:brightness(1.05)}.square.selected{box-shadow:inset 0 0 0 4px #2b6fd6}.square.last-move{box-shadow:inset 0 0 0 999px #f1c45357}.square.selected.last-move{box-shadow:inset 0 0 0 4px #2b6fd6,inset 0 0 0 999px #f1c45347}.square.target:after{content:"";aspect-ratio:1;background:#14212c47;border-radius:50%;width:28%;position:absolute}.white-piece,.black-piece{z-index:1;font-family:Segoe UI Symbol,"Noto Sans Symbols 2",serif;font-size:clamp(34px,6.1vw,60px);line-height:1;position:relative;transform:translateY(-1px)}.white-piece{color:#fffdf4;text-shadow:0 2px 1px #000000a6,0 0 1px #202020}.black-piece{color:#11161b;text-shadow:0 1px 1px #fff6}.coord{z-index:2;color:#191f248c;pointer-events:none;font-size:11px;font-weight:800;position:absolute}.file-coord{bottom:4px;right:6px}.rank-coord{top:3px;left:5px}.table-strip{grid-template-columns:180px 1fr;gap:12px;margin-top:18px;display:grid}.table-strip>div,.coach-stage,.info-block,.control-block{background:#fff;border:1px solid #dfe5e9;border-radius:8px;padding:14px}.coach-stage{border-left:5px solid #2f6f73;margin-top:18px;box-shadow:0 14px 30px #1f313814}.coach-stage-header{justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;display:flex}.coach-stage-header span{color:#2f6f73;letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:900}.coach-stage-header small{color:#65717d;font-size:12px;font-weight:800}.coach-stage h2{color:#13272a;margin-bottom:8px;font-size:22px;line-height:1.18}.coach-stage p{color:#2d353d;font-size:15px;line-height:1.45}.coach-explanation{margin-top:8px}.coach-points{gap:7px;margin:12px 0 0;padding:0;list-style:none;display:grid}.coach-points li{color:#243038;padding-left:18px;font-size:14px;line-height:1.4;position:relative}.coach-points li:before{content:"";background:#2f6f73;border-radius:50%;width:7px;height:7px;position:absolute;top:.55em;left:0}.training-card{background:#f4fbf8;border:1px solid #cfe0dc;border-radius:8px;gap:9px;margin-top:14px;padding:14px;display:grid}.training-card span{color:#2f6f73;letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:900}.training-card small{color:#65717d;font-size:13px;line-height:1.4}.training-card em{color:#2d353d;font-size:13px;font-style:normal;line-height:1.4}.training-card strong{color:#13272a;font-size:14px;line-height:1.4}.training-card button{color:#fff;cursor:pointer;background:#2f6f73;border:0;border-radius:6px;justify-self:start;min-height:36px;padding:8px 12px;font-weight:900}.table-strip span,.position-summary span{color:#65717d;letter-spacing:.06em;text-transform:uppercase;margin-bottom:5px;font-size:12px;font-weight:800;display:block}.table-strip strong,.position-summary strong{font-size:15px;line-height:1.35;display:block}.panel{max-height:calc(100vh - 48px);padding:14px;overflow:auto}.panel-heading{justify-content:space-between;gap:10px;margin-bottom:12px}.segmented{background:#edf1f3;border:1px solid #d7dee3;border-radius:8px;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;display:grid}.segmented button,.button-grid button{cursor:pointer;border:0;border-radius:6px;font-weight:800}.segmented button{color:#596570;text-transform:capitalize;background:0 0;padding:9px 4px}.segmented button.active{color:#fff;background:#1e2932}.toggle-row{color:#3b454e;align-items:center;gap:10px;margin:12px 0;font-size:14px;font-weight:700;display:flex}.toggle-row input{accent-color:#1e2932;width:18px;height:18px}.button-grid{grid-template-columns:repeat(2,1fr);gap:8px;display:grid}.button-grid button{color:#fff;background:#26323c;min-height:42px;padding:9px 10px}.button-grid button:hover:not(:disabled){background:#111920}button:disabled{opacity:.55}.info-block{margin-top:12px}.position-summary{gap:12px;display:grid}.position-summary>div+div{border-top:1px solid #eef1f3;padding-top:12px}.coach-block{border-left:4px solid #2f6f73}.info-block p{color:#2d353d;font-size:14px;line-height:1.45}.move-list{gap:6px;max-height:168px;margin:0;padding:0;list-style:none;display:grid;overflow:auto}.move-list li{border-bottom:1px solid #eef1f3;grid-template-columns:44px 1fr;align-items:center;gap:8px;padding-bottom:6px;display:grid}.move-list span,.memory-list span,.engine-list dt{color:#65717d;font-size:12px;font-weight:800}.memory-list{gap:7px;margin:0;padding:0;list-style:none;display:grid}.memory-list li{border-bottom:1px solid #eef1f3;justify-content:space-between;align-items:center;gap:12px;padding-bottom:6px;display:flex}.memory-list span{text-transform:capitalize}.memory-list strong{color:#26323c;background:#edf1f3;border-radius:999px;place-items:center;min-width:26px;min-height:26px;font-size:13px;display:inline-grid}.move-list strong{font-size:14px}.engine-list{gap:8px;margin:0;display:grid}.engine-list div{justify-content:space-between;gap:12px;display:flex}.engine-list dd{margin:0;font-size:13px;font-weight:800}.fen{color:#65717d;overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:11px}@media (width<=980px){.app{padding:12px}.shell{grid-template-columns:1fr}.panel{max-height:none}.custom-board{width:min(94vw,620px)}.board-layout{grid-template-columns:minmax(0,1fr);width:min(94vw,620px)}.captured-tray{min-height:auto}.captured-pieces{align-content:flex-start}}@media (width<=620px){.play-area{padding:12px}.topbar,.table-strip{grid-template-columns:1fr}.topbar{flex-direction:column;align-items:flex-start}.state-stack{justify-content:flex-start}.custom-board{border-width:6px}.white-piece,.black-piece{font-size:clamp(28px,10vw,46px)}}
