.cc-app{box-sizing:border-box;min-height:100vh;padding:22px 24px;color:#e9d7aa;background:radial-gradient(ellipse at top,#343027,#121412 65%);font:15px/1.6 system-ui,sans-serif}.cc-app *{box-sizing:border-box}.cc-head{max-width:1120px;margin:0 auto 18px;display:flex;justify-content:space-between;align-items:center;padding-right:100px}.cc-head h1{font:700 34px Georgia,'STKaiti','KaiTi',serif;letter-spacing:6px;margin:4px 0;color:#f4d893}.cc-head p{margin:0;color:#c4b58f}.cc-kicker{font-size:10px;letter-spacing:3px;color:#a18e68}.cc-pills{display:flex;gap:8px;flex-wrap:wrap;max-width:250px}.cc-pill{border:1px solid #756243;padding:6px 12px;background:#24241e;border-radius:4px;font-size:12px}.cc-tabs{max-width:1120px;margin:0 auto 20px;display:flex;gap:10px;border-bottom:1px solid #655237;padding-bottom:12px}.cc-app button{cursor:pointer;font:inherit}.cc-tabs button,.cc-actions button{background:#272921;color:#dccba3;border:1px solid #82704c;padding:10px 22px;border-radius:4px}.cc-tabs button.active,.cc-actions .cc-primary{background:linear-gradient(#83673b,#4a3721);color:#ffedc1;border-color:#d0ad6b}.cc-main{display:grid;grid-template-columns:minmax(0,600px) minmax(250px,320px);justify-content:center;gap:28px;align-items:start;max-width:1120px;margin:auto}.cc-board{grid-column:1;grid-row:1;position:relative;width:100%;aspect-ratio:1152/1731;background:url('chess-assets/board.png') center/100% 100% no-repeat;filter:drop-shadow(0 14px 16px #0008)}.cc-side{grid-column:2;background:linear-gradient(135deg,#302d23,#191d19);border:1px solid #776344;padding:22px;border-radius:6px}.cc-eyebrow{font-size:11px;letter-spacing:3px;color:#b7975e}.cc-panel-title h2{font:700 25px 'STKaiti','KaiTi',serif;margin:5px 0 20px}.cc-progress{padding:12px 0}.cc-progress>div{display:flex;justify-content:space-between;font-size:13px}.cc-progress i{display:block;height:5px;background:#111811;margin-top:10px}.cc-progress b{display:block;height:100%;background:#c29e59}.cc-muted{font-size:12px;color:#b0a387}.cc-status{border-block:1px solid #62533b;padding:12px 0;margin:20px 0;color:#f2d79d}.cc-log p{font-size:12px;color:#ad9f84;border-bottom:1px solid #ffffff0c;padding:8px 0;margin:0}.cc-room label{font-size:12px}.cc-room input{width:100%;padding:12px;background:#141c18;border:1px solid #7d6843;color:#ffe4b1;margin:8px 0;font:inherit}.cc-actions{display:flex;gap:8px}.cc-actions button{padding:8px;font-size:12px;flex:1}.cc-cell{position:absolute;transform:translate(-50%,-50%);width:9.2%;aspect-ratio:1;border:0;padding:0;background:transparent;border-radius:50%;outline-offset:2px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.cc-cell.red,.cc-cell.black{background:center/100% 100% no-repeat;filter:drop-shadow(1px 4px 2px #000a)}.cc-cell.red{background-image:url('chess-assets/red.png');color:#ffdfba}.cc-cell.black{background-image:url('chess-assets/black.png');color:#f1d38b}.cc-piece-face{display:flex;align-items:center;justify-content:center;position:absolute;inset:10%;font:bold clamp(18px,3.6vw,36px)/1 'STKaiti','KaiTi','Noto Serif CJK SC',serif;text-shadow:0 2px 1px #000,0 -1px 0 #ffffff40}.cc-cell.selected{outline:3px solid #ffe5a0;box-shadow:0 0 20px #eab04a}.cc-cell:hover{box-shadow:0 0 14px #e6c47777}.cc-cell:focus-visible{outline:2px solid #ffe29e}.cc-cell.capture{animation:ccHit .5s}.cc-cell.move{animation:ccLand .5s}@keyframes ccHit{50%{filter:brightness(1.8) drop-shadow(0 0 10px #f75)}}@keyframes ccLand{50%{filter:brightness(1.5)}}@media(max-width:700px){.cc-app{padding:16px 10px}.cc-head{padding-right:76px;display:block}.cc-head h1{font-size:27px}.cc-head p{font-size:12px}.cc-pills{max-width:none;margin-top:12px}.cc-main{display:flex;flex-direction:column;gap:16px}.cc-board{order:0}.cc-side{order:1;width:100%;padding:16px}.cc-tabs{margin-bottom:12px}.cc-piece-face{font-size:clamp(17px,4.4vw,29px)}.cc-kicker{letter-spacing:1px}.cc-tabs button{padding:8px 20px}}@media(prefers-reduced-motion:reduce){.cc-app *{animation:none!important;transition:none!important}}
.cc-cell.move{animation:ccMove .48s ease-out}.cc-cell.capture{animation:ccCapture .56s ease-out}.cc-cell.check{animation:ccCheck .8s ease-in-out infinite}.cc-effect{position:fixed;z-index:13000;left:50%;top:42%;transform:translate(-50%,-50%) scale(.7);opacity:0;padding:18px 28px;border:1px solid #dcb86b;border-radius:12px;background:#172d2ddd;color:#ffe9a6;font:700 25px Georgia,serif;box-shadow:0 0 35px #e9b85b66;pointer-events:none;transition:.22s}.cc-effect.show{opacity:1;transform:translate(-50%,-50%) scale(1)}.cc-effect.check{border-color:#ec765d;color:#ffb19b}.cc-effect.mate{font-size:31px;background:linear-gradient(135deg,#632d2b,#a55c32);box-shadow:0 0 80px #f2bd5d99}.cc-effect.lose{border-color:#788c89;color:#c1ceca}@keyframes ccMove{50%{box-shadow:0 0 0 8px #f5d47766,inset 0 0 0 2px #704529}}@keyframes ccCapture{35%{transform:scale(1.2) rotate(-5deg);box-shadow:0 0 0 10px #e65e4866}}@keyframes ccCheck{50%{box-shadow:0 0 0 7px #dc594c88,inset 0 0 0 2px #704529}}
/* Preserve geometry in older embedded webviews without aspect-ratio support. */
.cc-board:before{content:'';display:block;padding-top:150.26%;pointer-events:none}.cc-cell{height:0;padding-bottom:9.2%}.cc-cell.red,.cc-cell.black{background-size:100% 100%;background-repeat:no-repeat}.cc-board{aspect-ratio:auto}.cc-cell{aspect-ratio:auto}.cc-cell.capture{animation:ccHit .5s}.cc-cell.move{animation:ccLand .5s}
.cc-piece-face{top:10%;right:10%;bottom:10%;left:10%}
/* Selected pieces rise above their intersection, retaining their hit target. */
.cc-cell.selected{z-index:4;transform:translate(-50%,-72%) scale(1.10);filter:drop-shadow(0 13px 5px #000b);animation:ccLift .18s ease-out;box-shadow:0 0 16px #efc47080}
@keyframes ccLift{from{transform:translate(-50%,-50%) scale(1);filter:drop-shadow(0 3px 2px #0009)}to{transform:translate(-50%,-72%) scale(1.10);filter:drop-shadow(0 13px 5px #000b)}}
.cc-cell.move,.cc-cell.capture{z-index:3;animation:ccSetDown .22s ease-out}
.cc-cell.capture{animation:ccSetDown .22s ease-out,ccHit .5s ease-out}
@keyframes ccSetDown{0%{transform:translate(-50%,-72%) scale(1.10)}65%{transform:translate(-50%,-47%) scale(1.03,.96)}100%{transform:translate(-50%,-50%) scale(1)}}
.cc-sound{border:1px solid #82704c;background:#24241e;color:#e9d7aa;border-radius:4px;padding:7px 12px;white-space:nowrap;margin:8px;font-size:12px!important}
