.chess-page .page-frame{width:min(1280px,100% - 36px);max-width:none;margin-top:clamp(18px,3vh,34px)}.chess-page{background:radial-gradient(circle at 14% 18%,#f29abd38,#0000 30%),radial-gradient(circle at 78% 14%,#9fd8ef38,#0000 28%),linear-gradient(#ffffff57,#fff8efb8),url(/images/hero-bg.webp) 50%/cover fixed,#fbf8f5}.chess-hero:after{content:"♘"}.chess-room{--chess-drawer-width:min(360px, calc(100vw - 92px));min-height:calc(100vh - 150px);box-shadow:none;backdrop-filter:none;isolation:isolate;background:0 0;border:0;grid-template-columns:minmax(0,1fr) minmax(300px,360px);align-items:center;gap:clamp(24px,4.2vw,58px);margin-top:clamp(8px,2vh,20px);padding:clamp(28px,5vw,58px) 0 clamp(22px,4vw,48px);transition:padding .42s cubic-bezier(.2,.82,.22,1),background-color .32s,box-shadow .32s;display:grid;position:relative;overflow:visible}@media (width>=901px){.chess-room:not(.is-game-started){padding-left:max(clamp(32px,2.5vw,36px),100px + -1*max(18px,50vw - 640px))}}.chess-room:before{z-index:-1;content:"";filter:blur(10px);pointer-events:none;background:radial-gradient(circle,#ffffffb8,#fff0);border-radius:50%;width:min(760px,72vw);height:min(480px,52vh);position:absolute;inset:8% auto auto -10%}.chess-start{min-height:0;box-shadow:none;backdrop-filter:none;background:0 0;border:0;align-content:center;justify-items:start;gap:clamp(14px,2.4vh,24px);padding:0;transition:opacity .36s,transform .46s cubic-bezier(.18,.88,.28,1);display:grid;position:relative}.chess-start h1{color:#fff6fb;max-width:760px;font-family:var(--cute-font);text-wrap:balance;text-shadow:0 2px #ffffffe0,0 5px #f29abd33,0 18px 46px #37425c38;-webkit-text-stroke:1.3px #4958763d;margin:0;font-size:clamp(4.6rem,8.2vw,7.9rem);font-weight:900;line-height:.86}.chess-start .eyebrow{color:#fffffff0;text-shadow:0 2px 18px #464d606b;text-transform:none}.chess-start__chips{flex-wrap:wrap;gap:10px;display:flex}.chess-start__chips span{color:#526079;background:#ffffff75;border:1px solid #ffffffb8;border-radius:999px;align-items:center;min-height:34px;padding:0 14px;font-size:.88rem;font-weight:900;display:inline-flex;box-shadow:inset 0 1px #ffffffb3,0 12px 28px #545f7e1a}.chess-start__terminal{text-align:left;background:#ffffff9e;border-radius:12px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;width:min(700px,100%);min-height:76px;padding:14px 18px;transition:transform .18s,background .18s,box-shadow .18s;display:grid;box-shadow:inset 0 1px #ffffffb8,0 18px 56px #545f7e24}.chess-start__terminal:hover,.chess-start__terminal:focus-within{background:#ffffffc2;transform:translateY(-3px);box-shadow:inset 0 1px #ffffffd1,0 24px 70px #545f7e2e}.chess-start__terminal>span{color:#795165;background:linear-gradient(135deg,#ffd7df,#ffe6bf);border:1px solid #ffffffc7;border-radius:16px;place-items:center;width:46px;height:46px;font-weight:900;display:grid;box-shadow:0 12px 32px #f29abd33}.chess-start__terminal code{overflow-wrap:anywhere;color:#31465e;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:clamp(1rem,1.5vw,1.18rem);font-weight:800}.chess-start__button{min-width:148px}.chess-room:not(.is-game-started) .chess-room__main,.chess-room:not(.is-game-started) .chess-panel__actions,.chess-room:not(.is-game-started) .chess-captured,.chess-room:not(.is-game-started) .chess-move-log{display:none}.chess-room.is-game-started{min-height:calc(100vh - 144px);box-shadow:none;backdrop-filter:none;background:0 0;border-color:#0000;padding:clamp(12px,2vw,24px) 0;display:block}.chess-room.is-game-started .chess-start{pointer-events:none;opacity:0;position:absolute;inset:clamp(18px,3vw,34px);transform:translateY(-20px)scale(.98)}.chess-room.is-game-started .chess-room__main{animation:.56s cubic-bezier(.18,.86,.24,1) both chessBoardEnter}.chess-room__main,.chess-panel,.chess-panel__card,.chess-captured,.chess-move-log{min-width:0}.chess-room__main{position:relative}.chess-timer-card{z-index:4;backdrop-filter:blur(16px)saturate(1.08);text-align:center;background:linear-gradient(135deg,#fff7fcb8,#e8f7ff9e),#ffffff94;border:1px solid #ffffffb8;border-radius:22px;gap:7px;width:112px;padding:15px 14px 17px;display:grid;position:absolute;top:clamp(20px,4vw,42px);left:max(0px,50% + min(100%,790px,100vh - 190px)/-2 - 138px);box-shadow:inset 0 1px #ffffffbd,0 18px 42px #4e5c7e1f}.chess-timer-card span{color:#6b5b74b8;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:.68rem;font-weight:900}.chess-timer-card strong{color:#3e4860;text-shadow:0 1px #ffffffb3;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:1.32rem;line-height:1}.chess-board-shell{background:radial-gradient(circle at 18% 12%,#ffd6e770,#0000 30%),radial-gradient(circle at 86% 88%,#c9f1e057,#0000 30%),#ffffff8f;border:1px solid #ffffffbd;border-radius:30px;width:min(100%,790px,100vh - 190px);min-width:min(100%,420px);margin:0 auto;padding:clamp(24px,3vw,34px);position:relative;box-shadow:inset 0 1px #ffffffbd,0 24px 70px #545f7e29}.chess-result-card{z-index:8;backdrop-filter:blur(16px)saturate(1.08);opacity:0;pointer-events:none;background:linear-gradient(135deg,#fff7fcdb,#e8f7ffc7),#ffffffb3;border:1px solid #ffffffb8;border-radius:22px;gap:9px;width:min(360px,100% - 40px);padding:18px;transition:opacity .22s,transform .28s cubic-bezier(.2,.86,.24,1.04);display:grid;position:absolute;bottom:clamp(18px,3vw,36px);right:clamp(20px,4vw,42px);transform:translateY(12px)scale(.98);box-shadow:inset 0 1px #ffffffc7,0 18px 44px #4754722e}.chess-result-card.is-visible{opacity:1;pointer-events:auto;transform:translateY(0)scale(1)}.chess-result-card[hidden]{display:none}.chess-result-card>span{color:#8d607a;background:#ffffff8f;border:1px solid #f29abd47;border-radius:999px;width:fit-content;padding:5px 10px;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:.72rem;font-weight:900}.chess-result-card strong{color:#374258;font-size:1.18rem;line-height:1.35}.chess-result-card p{color:#667286;margin:0;line-height:1.65}.chess-result-card__actions{flex-wrap:wrap;gap:9px;margin-top:3px;display:flex}.chess-result-card__actions button{color:#59677d;cursor:pointer;background:#ffffff94;border:1px solid #ffffffb8;border-radius:999px;justify-content:center;align-items:center;min-height:38px;padding:0 15px;font-weight:900;transition:transform .18s,background-color .18s,box-shadow .18s;display:inline-flex}.chess-result-card__actions .primary-button{color:#fff;text-shadow:0 1px #4b4c6a29;background:linear-gradient(135deg,#eb8fba,#89ceea);border:0;flex:none;min-width:116px;padding:0 18px;font-size:.92rem;box-shadow:0 12px 28px #7e97b433}.chess-result-card__actions button:hover{background:#ffffffd1;transform:translateY(-2px);box-shadow:0 10px 22px #5664841f}.chess-board{aspect-ratio:1;background:#ffffffa8;border:8px solid #ffffffc7;border-radius:24px;grid-template-columns:repeat(8,minmax(0,1fr));display:grid;overflow:hidden;box-shadow:inset 0 0 0 1px #69748b1f,0 24px 70px #404c682e}.chess-board__row{display:contents}.chess-square{color:#4a536a;cursor:pointer;min-width:0;min-height:0;font:inherit;border:0;place-items:center;line-height:1;transition:background-color .16s,box-shadow .16s,filter .16s;display:grid;position:relative;overflow:hidden}.chess-square.is-light{background:linear-gradient(135deg,#ffffffdb,#def6ffb8),#f2fbff}.chess-square.is-dark{background:linear-gradient(135deg,#ffd7ebc7,#c4e0f9a8),#d7e5f5}.chess-square:hover,.chess-square:focus-visible{filter:brightness(1.04)saturate(1.08)}.chess-square:focus-visible{outline:none}.chess-square:focus-visible:before{z-index:5;content:"";pointer-events:none;border:3px solid #315a7d;border-radius:5px;position:absolute;inset:3px;box-shadow:0 0 0 2px #ffffffeb}.chess-square.is-selected{box-shadow:inset 0 0 0 4px #f29abd85}.chess-square.is-selected .chess-piece{z-index:3;text-shadow:0 10px 18px #2f395238,0 22px 34px #f29abd38;animation:.34s cubic-bezier(.18,.86,.24,1) both chessPieceLift;transform:translateY(-9px)scale(1.1)}.chess-square.is-last-move{box-shadow:inset 0 0 0 4px #9ad8ef5c}.chess-square.is-move-target:after,.chess-square.is-capture-target:after{content:"";pointer-events:none;border-radius:50%;position:absolute}.chess-square.is-move-target:after{background:#5e799647;width:22%;height:22%;top:39%;left:39%}.chess-square.is-capture-target:after{border:4px solid #ec73976b;width:74%;height:74%;top:13%;left:13%}.chess-square.is-target-ripple:after{animation:chessTargetRipple .48s cubic-bezier(.18, .86, .24, 1) var(--target-delay,0s) both}.chess-square.is-landing-hidden .chess-piece{opacity:0}.chess-piece{z-index:1;text-align:center;text-shadow:0 2px #ffffff85;border-radius:999px;justify-content:center;align-items:center;width:100%;height:100%;font-family:Times New Roman,STKaiti,KaiTi,Noto Serif,serif;font-size:clamp(2.15rem,5.1vw,4.55rem);line-height:1;transition:transform .16s,text-shadow .16s;display:flex;position:absolute;inset:0;transform:translateZ(0)}.chess-square:hover .chess-piece{transform:translateY(-3px)scale(1.04)}.chess-square.is-selected:hover .chess-piece{transform:translateY(-9px)scale(1.1)}.chess-piece-fx{top:var(--fx-top);left:var(--fx-left);z-index:120;width:var(--fx-size);height:var(--fx-size);pointer-events:none;will-change:transform, opacity;position:fixed}.chess-piece-fx--move{animation:.68s cubic-bezier(.2,.86,.2,1) both chessPieceMove}.chess-piece-fx--capture{z-index:119;animation:.82s cubic-bezier(.2,.8,.28,1) both chessPieceCapture}.chess-piece--w{color:#fffdfb;-webkit-text-stroke:.8px #46526fb8;text-shadow:0 1px #3f4860e6,1.2px 0 #3f48608c,-1.2px 0 #3f48608c,0 -1.2px #3f486075,0 10px 18px #2f39523d}.chess-piece--b{color:#3f4860;text-shadow:0 1px #ffffff94,0 8px 20px #434e682e}.chess-board__labels{color:#5e688085;pointer-events:none;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:.76rem;font-weight:900;display:grid;position:absolute}.chess-board__labels--files{grid-template-columns:repeat(8,1fr);justify-items:center;bottom:8px;left:clamp(32px,4vw,42px);right:clamp(32px,4vw,42px)}.chess-board__labels--ranks{grid-template-rows:repeat(8,1fr);align-items:center;top:clamp(32px,4vw,42px);bottom:clamp(32px,4vw,42px);right:9px}.chess-panel{backdrop-filter:blur(18px)saturate(1.08);background:linear-gradient(135deg,#ffffffb3,#ebf8ff80),#ffffff8f;border:1px solid #ffffffad;border-radius:26px;align-content:start;align-self:center;gap:14px;min-height:0;padding:18px;transition:opacity .3s,transform .46s cubic-bezier(.2,.86,.26,1.05);display:grid;box-shadow:inset 0 1px #ffffffbd,0 22px 62px #545f7e24}.chess-panel__drawer{gap:14px;display:grid}.chess-panel__hover-zone,.chess-panel__bookmark{display:none}.chess-room.is-game-started .chess-panel{top:50%;right:calc(var(--chess-drawer-width) * -1 + 34px);z-index:40;width:var(--chess-drawer-width);min-height:0;max-height:min(760px,100vh - 96px);box-shadow:none;backdrop-filter:none;background:0 0;border:0;border-radius:0;padding:0 0 0 34px;transition:right .46s cubic-bezier(.18,.96,.28,1.08),filter .26s;position:fixed;transform:translateY(-50%)}.chess-room.is-game-started .chess-panel:hover,.chess-room.is-game-started.is-drawer-hovered .chess-panel,.chess-room.is-game-started.is-drawer-pinned .chess-panel{right:0}.chess-room.is-game-started .chess-panel__drawer{backdrop-filter:blur(18px);background:linear-gradient(135deg,#ffffffbd,#ebf8ff8f),#ffffff9e;border:1px solid #ffffffad;border-right:0;border-radius:26px 0 0 26px;max-height:min(760px,100vh - 96px);padding:18px;overflow:auto;box-shadow:inset 0 1px #ffffffbd,-18px 22px 54px #3b46652e}.chess-room.is-game-started .chess-panel__hover-zone{z-index:1;width:46px;height:134px;display:block;position:absolute;top:50%;left:0;transform:translateY(-50%)}.chess-room.is-game-started .chess-panel__bookmark{z-index:2;color:#5d6274;cursor:pointer;background:#fff6faf0;border:1px solid #ffffffc2;border-right:0;border-radius:12px 0 0 12px;place-items:center;width:34px;min-height:104px;transition:transform .3s cubic-bezier(.2,.86,.26,1.05),box-shadow .22s;display:grid;position:absolute;top:45%;left:0;transform:translateY(-50%);box-shadow:-7px 12px 24px #53638224,inset 1px 0 #ffffffd6,inset 0 -10px #f29abd1a}.chess-room.is-game-started .chess-panel__bookmark:before{content:"";background:#f29abd6b;border-radius:999px;width:14px;height:2px;margin-bottom:6px}.chess-room.is-game-started .chess-panel__bookmark span{writing-mode:vertical-rl;letter-spacing:0;font-size:.7rem;font-weight:900}.chess-room.is-game-started .chess-panel__bookmark small{color:#40506a8f;margin-top:6px;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:.56rem;font-weight:900}.chess-room.is-game-started .chess-panel:hover .chess-panel__bookmark,.chess-room.is-game-started.is-drawer-hovered .chess-panel__bookmark,.chess-room.is-game-started.is-drawer-pinned .chess-panel__bookmark{transform:translate(-3px,-50%);box-shadow:-10px 16px 30px #5363822e,inset 1px 0 #ffffffd6}.chess-panel__card,.chess-captured,.chess-move-log{background:#ffffff7a;border:1px solid #ffffffa8;border-radius:20px;box-shadow:inset 0 1px #ffffffa8}.chess-panel__card{padding:20px}.chess-panel__kicker,.chess-captured span{color:#89657e;font-size:.78rem;font-weight:900}.chess-panel__card strong{color:#394259;margin-top:9px;font-size:1.22rem;line-height:1.45;display:block}.chess-panel__card p{color:#69758a;margin:10px 0 0;line-height:1.65}.chess-panel__actions{grid-template-columns:1fr 1fr;gap:10px;display:grid}.chess-panel__actions .primary-button{grid-column:1/-1}.chess-panel__actions button:not(.primary-button){color:#56647b;cursor:pointer;background:#ffffff8a;border:1px solid #ffffffb8;border-radius:999px;min-height:42px;font-weight:900;transition:transform .18s,background-color .18s}.chess-panel__actions button:hover{background:#ffffffd1;transform:translateY(-2px)}.chess-toggle{color:#617087;background:#fff6;border:1px solid #ffffff9e;border-radius:999px;align-items:center;gap:12px;min-height:46px;padding:0 18px;font-weight:900;display:flex}.chess-toggle input{width:18px;height:18px;accent-color:var(--pink)}.chess-panel.is-setup-locked .chess-toggle,.chess-panel.is-setup-locked .chess-difficulty{opacity:.58}.chess-panel.is-setup-locked .chess-toggle,.chess-panel.is-setup-locked .chess-difficulty span{cursor:not-allowed}.chess-panel.is-setup-locked .chess-difficulty label:hover span{background-color:#ffffff8a;transform:none}.chess-difficulty{background:#ffffff6b;border:1px solid #ffffffa8;border-radius:22px;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:13px;display:grid;box-shadow:inset 0 1px #ffffff9e}.chess-difficulty legend{color:#8b6680;grid-column:1/-1;margin-bottom:6px;font-size:.78rem;font-weight:900}.chess-difficulty label{display:grid}.chess-difficulty input{opacity:0;pointer-events:none;block-size:1px;inline-size:1px;position:absolute}.chess-difficulty span{color:#5d687f;cursor:pointer;background:#ffffff8a;border:1px solid #ffffffb8;border-radius:999px;place-items:center;min-height:38px;font-size:.88rem;font-weight:900;transition:transform .18s,background-color .18s,box-shadow .18s,color .18s;display:grid}.chess-difficulty input:checked+span{color:#fff;background:linear-gradient(135deg,#ec85b7c2,#8ed1ebb8),#ffffffc2;box-shadow:0 10px 24px #7e97b438}.chess-difficulty label:hover span,.chess-difficulty input:focus-visible+span{background-color:#ffffffd1;transform:translateY(-2px)}.chess-captured{gap:12px;padding:18px;display:grid}.chess-captured strong{color:#465069;min-height:30px;margin-top:5px;font-size:1.12rem;line-height:1.45;display:block}.chess-move-log{gap:8px;max-height:220px;padding:16px;display:grid;overflow:auto}.chess-move,.chess-move-log__empty{color:#647087;font-family:Cascadia Code,SFMono-Regular,Consolas,monospace;font-size:.84rem;font-weight:800}.chess-move{grid-template-columns:34px 1fr 1fr;align-items:center;gap:8px;display:grid}.chess-move strong{color:#3e4860}.chess-room.is-thinking .chess-panel__card{animation:.62s both chessPanelPulse}@media (width<=900px){.chess-room{grid-template-columns:1fr;min-height:auto}.chess-start{text-align:center;justify-items:center;min-height:clamp(360px,54vh,520px)}.chess-start h1{font-size:clamp(3.8rem,14vw,6rem)}.chess-start__terminal{width:min(680px,100%)}.chess-timer-card{text-align:left;grid-template-columns:auto 1fr auto;justify-self:center;align-items:center;width:min(220px,100%);margin:0 auto 14px;position:relative;top:auto;left:auto}.chess-room.is-game-started .chess-panel{--chess-drawer-width:min(340px, calc(100vw - 72px));top:auto;right:calc(var(--chess-drawer-width) * -1 + 34px);max-height:min(680px,100vh - 160px);padding-left:34px;bottom:28px;transform:translate(0)}.chess-room.is-game-started .chess-panel:hover,.chess-room.is-game-started.is-drawer-hovered .chess-panel,.chess-room.is-game-started.is-drawer-pinned .chess-panel{right:0}.chess-room.is-game-started .chess-panel__drawer{max-height:min(680px,100vh - 160px)}.chess-room.is-game-started .chess-panel__bookmark{width:34px;min-height:98px;top:50%}.chess-room.is-game-started .chess-panel__hover-zone{width:44px;height:126px}.chess-board-shell{padding:22px}}@media (width<=520px){.chess-room{padding:14px}.chess-start{min-height:380px}.chess-start__terminal{grid-template-columns:auto minmax(0,1fr)}.chess-start__button{grid-column:1/-1;width:100%}.chess-room.is-game-started{padding:10px}.chess-board-shell{border-radius:22px;padding:16px}.chess-board{border-width:5px;border-radius:18px}.chess-piece{font-size:clamp(1.45rem,9vw,2.55rem)}.chess-board__labels{display:none}.chess-panel__actions{grid-template-columns:1fr}.chess-room.is-game-started .chess-panel{--chess-drawer-width:min(318px, calc(100vw - 58px));bottom:18px;right:calc(var(--chess-drawer-width) * -1 + 32px);padding-left:32px}.chess-room.is-game-started .chess-panel__drawer{border-radius:22px 0 0 22px;gap:12px;padding:14px}.chess-room.is-game-started .chess-panel__bookmark{border-radius:12px 0 0 12px;width:32px;min-height:92px}.chess-room.is-game-started .chess-panel__hover-zone{width:42px;height:116px}.chess-difficulty{grid-template-columns:1fr}}@media (width<=900px){.chess-page{background-color:#fbf8f5;background-image:linear-gradient(#ffffffad,#fff8f1db),url(/images/hero-bg-mobile.avif),none;background-position:0 0,50%,0 0;background-repeat:repeat,repeat,repeat;background-size:auto,cover,auto;background-attachment:scroll;background-origin:padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box}}
