:root{color:#111;background:#e5e5e5;font-family:ui-serif,Georgia,Times New Roman,serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:0;min-height:100vh;overflow-x:hidden}button,select{font:inherit}.app{width:min(960px,100%);margin:0 auto;padding:16px}.hero{display:grid;gap:6px;margin-bottom:12px;text-align:center}.hero h1{margin:0;font-size:clamp(1.8rem,7vw,3.6rem);letter-spacing:-.05em}.hero p{min-height:1.5em;margin:0;font-size:clamp(.95rem,3vw,1.3rem);font-weight:700}.toolbar,.settings{display:grid;gap:8px;margin-bottom:10px}.toolbar{grid-template-columns:repeat(auto-fit,minmax(86px,1fr))}.settings{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.toolbar button,.settings select{width:100%;min-width:0;min-height:46px;border:2px solid #111;background:#f7f7f7;color:#111;border-radius:10px;font-weight:800}.toolbar button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 4px;font-size:clamp(.68rem,2.2vw,1rem)}.toolbar button:active,.toolbar button:focus-visible{outline:4px solid #555}.toolbar button:disabled{opacity:.45}.settings label{display:grid;gap:4px;min-width:0;font-size:.82rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.play-area{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,200px);gap:14px;align-items:start}.play-area.history-hidden{grid-template-columns:minmax(0,1fr)}.board-wrap{display:flex;justify-content:center}.board{display:grid;width:min(100%,calc(100vh - 260px));min-width:0;aspect-ratio:1 / 1;border:5px solid #111;border-radius:14px;overflow:hidden;box-shadow:0 18px 40px #00000029}.play-area.history-hidden .board{width:100%}.board.size-8{grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr)}.board.size-10{grid-template-columns:repeat(10,1fr);grid-template-rows:repeat(10,1fr)}.square{position:relative;display:grid;place-items:center;cursor:default}.square.light{background:#ddd}.square.dark{background:#555}.square.dark.clickable{cursor:pointer}.square.dark.clickable:hover{background:#666}.square.selected{background:#333}.square.target-move:after{content:"";position:absolute;top:30%;right:30%;bottom:30%;left:30%;border-radius:50%;background:#ffffff73;pointer-events:none}.square.last-from{background:#444}.square.last-to{background:#3a3a3a}.piece-wrap{position:relative;width:76%;height:76%;border-radius:50%}.piece-red{background:radial-gradient(circle at 35% 35%,#f0f0f0,#d0d0d0);border:2.5px solid #aaa;box-shadow:1px 2px 5px #0006}.piece-black{background:radial-gradient(circle at 35% 35%,#333,#111);border:2.5px solid #000;box-shadow:1px 2px 5px #00000080}.king-marker{position:absolute;top:22%;right:22%;bottom:22%;left:22%;border-radius:50%;border:2px solid rgba(0,0,0,.3);background:#ffffff40;display:grid;place-items:center;font-size:.7em;font-weight:900;color:#00000080;pointer-events:none}.piece-red .king-marker{color:#00000080}.history{max-height:min(76vh,600px);overflow:auto;border:3px solid #111;border-radius:14px;background:#f7f7f7;padding:10px 12px}.history h2{margin:0 0 8px;font-size:1rem;font-weight:900}.history ol{columns:1;margin:0;padding-left:1.4em;font-family:ui-monospace,Consolas,monospace;font-weight:800;font-size:.82rem}.history li{display:list-item;padding-bottom:2px}.notes{margin-top:14px;color:#333;font-size:.9rem}.about-page{border:3px solid #111;border-radius:14px;background:#f7f7f7;padding:16px;font-size:1.05rem;line-height:1.5}.about-page h2{margin-top:0}.about-page button{min-height:46px;border:2px solid #111;border-radius:10px;background:#111;color:#fff;font-weight:900;padding:0 16px}.review-nav{display:grid;grid-template-columns:1fr 1fr minmax(0,2fr) 1fr 1fr;gap:3px;margin-bottom:8px}.review-nav button{min-height:30px;border:2px solid #111;border-radius:6px;background:#f7f7f7;font-weight:900;cursor:pointer;font-size:.85rem;padding:0}.review-nav button:disabled{opacity:.4;cursor:default}.review-label{display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700}.history li{cursor:pointer;border-radius:3px;padding-left:2px}.history li:hover{background:#e8e8e8}.history li.active{background:#ddd;font-weight:900}@media(max-width:680px){.app{padding:10px}.play-area{grid-template-columns:1fr}.history{max-height:130px}.board{width:min(100%,calc(100vw - 20px))}}
