:root{--accent-color:#2b52ee;--accent-hover:#1f42d6;--accent-subtle:#2b52ee14;--accent-border:#2b52ee40;--bg-primary:#f6f8fb;--bg-secondary:#edf1f7;--bg-card:#fff;--text-primary:#0f172a;--text-secondary:#5a6679;--border-color:#d5dce6;--border-subtle:#e4e9f0;--success:#15803d;--success-bg:#f0fdf4;--danger:#b91c1c;--danger-bg:#fef2f2;--warning:#b45309;--warning-bg:#fffbeb;--shadow-sm:0 1px 2px 0 #0f172a0d;--shadow-md:0 4px 6px -1px #0f172a12, 0 2px 4px -2px #0f172a0d;--radius-xs:3px;--radius-sm:4px;--radius-md:6px;--radius-lg:8px}[data-theme=dark]{--bg-primary:#090b0e;--bg-secondary:#11151e;--bg-card:#151a24;--text-primary:#f1f5f9;--text-secondary:#8b98a9;--border-color:#222938;--border-subtle:#1a202d;--accent-color:#3f65ff;--accent-hover:#5a7dff;--accent-subtle:#3f65ff1f;--accent-border:#3f65ff4d;--success:#22c55e;--success-bg:#22c55e1f;--danger:#ef4444;--danger-bg:#ef44441f;--warning:#f59e0b;--warning-bg:#f59e0b1f;--shadow-sm:0 1px 2px 0 #0006;--shadow-md:0 4px 6px -1px #00000073}*{box-sizing:border-box}html{height:100%}body{background-color:var(--bg-primary);min-height:100%;color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overscroll-behavior-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;transition:background-color .15s,color .15s;overflow:clip auto}#root{min-height:100dvh;overflow-x:clip}.tabular-nums{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}button,input,select,textarea{color:var(--text-primary);font-family:inherit}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border-color);border-radius:var(--radius-sm)}::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}.cg-wrap{border-radius:var(--radius-md);box-shadow:var(--shadow-md);touch-action:none;margin:0 auto;display:block;position:relative;overflow:hidden;aspect-ratio:1!important;width:min(92vw,480px)!important;max-width:100%!important;height:auto!important}cg-board{user-select:none;cursor:pointer;background-size:cover;width:100%;height:100%;line-height:0;position:absolute;top:0;left:0}piece{z-index:2;will-change:transform;background-size:cover;width:12.5%;height:12.5%;position:absolute;top:0;left:0}piece.dragging{cursor:grabbing;z-index:9}piece.pawn.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wP.svg)}piece.knight.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wN.svg)}piece.bishop.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wB.svg)}piece.rook.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wR.svg)}piece.queen.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wQ.svg)}piece.king.white{background-image:url(https://lichess1.org/assets/piece/cburnett/wK.svg)}piece.pawn.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bP.svg)}piece.knight.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bN.svg)}piece.bishop.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bB.svg)}piece.rook.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bR.svg)}piece.queen.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bQ.svg)}piece.king.black{background-image:url(https://lichess1.org/assets/piece/cburnett/bK.svg)}.blindfold-invisible piece{opacity:0!important}.blindfold-checkers piece.white{box-sizing:border-box!important;background-color:#f8fafc!important;background-image:none!important;border:5px solid #94a3b8!important;border-radius:50%!important;box-shadow:0 4px 6px #0000004d!important}.blindfold-checkers piece.black{box-sizing:border-box!important;background-color:#1e293b!important;background-image:none!important;border:5px solid #475569!important;border-radius:50%!important;box-shadow:0 4px 6px #0006!important}square.selected{background-color:#06b6d459!important}square.move-dest{background:radial-gradient(#06b6d4d9 21%,#0000 23%)!important}square.oc.move-dest{background:radial-gradient(#0000 0% 78%,#06b6d4cc 79%)!important}square.last-move{background-color:#2b52ee4d!important}cg-board,.theme-blue cg-board{background-image:conic-gradient(#3c66a4 90deg,#c4d5ea 90deg 180deg,#3c66a4 180deg 270deg,#c4d5ea 270deg)!important;background-repeat:repeat!important;background-size:25% 25%!important}.theme-wood cg-board{background-image:conic-gradient(#b88b4a 90deg,#e2c499 90deg 180deg,#b88b4a 180deg 270deg,#e2c499 270deg)!important;background-repeat:repeat!important;background-size:25% 25%!important}.theme-green cg-board{background-image:conic-gradient(#69923e 90deg,#eeeed2 90deg 180deg,#69923e 180deg 270deg,#eeeed2 270deg)!important;background-repeat:repeat!important;background-size:25% 25%!important}.theme-dark cg-board{background-image:conic-gradient(#252d3d 90deg,#536279 90deg 180deg,#252d3d 180deg 270deg,#536279 270deg)!important;background-repeat:repeat!important;background-size:25% 25%!important}.app-shell{box-sizing:border-box;max-width:1240px;min-height:100dvh;margin:0 auto;padding:14px 20px}.app-header{background:var(--bg-card);border:1px solid var(--border-color);box-shadow:var(--shadow-sm);border-radius:12px;flex-direction:column;margin-bottom:16px;display:flex}.header-top{border-bottom:1px solid var(--border-subtle);justify-content:space-between;align-items:center;gap:10px;padding:12px 20px;display:flex}.header-brand{cursor:pointer;user-select:none;flex-shrink:0;align-items:center;gap:12px;display:flex}.header-logo{object-fit:contain;width:42px;height:42px}.header-title{letter-spacing:-.7px;color:var(--text-primary);font-size:25px;font-weight:900}.header-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.header-name{text-overflow:ellipsis;white-space:nowrap;max-width:120px;font-size:12.5px;font-weight:700;overflow:hidden}.board-workspace{flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:20px;padding-bottom:24px;display:flex}.board-stage{flex-direction:column;flex-shrink:0;align-items:center;gap:10px;width:min(92vw,480px);max-width:100%;display:flex}.board-bar{box-sizing:border-box;width:min(92vw,480px);max-width:100%}.core-card{background:var(--bg-card);border:1px solid var(--border-color);box-shadow:var(--shadow-sm);box-sizing:border-box;border-radius:10px;flex-direction:column;gap:16px;width:100%;padding:20px;display:flex;overflow:hidden}.core-inner-box{background:var(--bg-secondary);border:1px solid var(--border-subtle);box-sizing:border-box;border-radius:8px;flex-direction:column;align-items:center;gap:12px;width:100%;padding:16px;display:flex}.core-slot{box-sizing:border-box;width:100%;max-width:480px}.side-panel{background:var(--bg-card);border:1px solid var(--border-color);box-sizing:border-box;border-radius:10px;flex-direction:column;width:min(92vw,290px);height:480px;display:flex;overflow:hidden}.side-panel--wide{gap:14px;width:min(92vw,330px);height:540px;padding:16px;overflow-y:auto}.side-panel--tall{background:0 0;border:none;border-radius:0;gap:10px;width:min(92vw,370px);height:560px}.side-panel--review{width:min(92vw,280px);height:525px}.grid-2{grid-template-columns:1fr 1fr;gap:14px;display:grid}.segmented-bar-wrap{background:var(--bg-card);border:1px solid var(--border-color);box-sizing:border-box;border-radius:8px;align-items:center;width:100%;padding:4px;display:flex;position:relative;overflow:hidden}.segmented-bar{box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;gap:4px;width:100%;display:flex;overflow-x:auto}.segmented-bar::-webkit-scrollbar{display:none}.segmented-tab{cursor:pointer;white-space:nowrap;border:none;border-radius:6px;flex:1 0 auto;justify-content:center;align-items:center;gap:6px;padding:7px 12px;font-size:12px;transition:all .12s;display:flex}.scroll-arrow-btn{cursor:pointer;z-index:10;width:30px;color:var(--text-secondary);border:none;justify-content:center;align-items:center;font-size:12px;display:flex;position:absolute;top:0;bottom:0}.scroll-arrow-btn--left{background:linear-gradient(to right, var(--bg-card) 65%, transparent);left:0}.scroll-arrow-btn--right{background:linear-gradient(to left, var(--bg-card) 65%, transparent);right:0}@media (width<=860px){.board-workspace{gap:14px}.side-panel,.side-panel--wide,.side-panel--review{width:min(92vw,480px);max-width:100%;height:auto;min-height:220px;max-height:360px}.side-panel--tall{width:min(92vw,480px);max-width:100%;height:auto;max-height:none}}@media (width<=640px){.app-shell{padding:8px 10px}.app-header{margin-bottom:12px}.header-top{gap:8px;padding:10px 12px}.header-logo{width:32px;height:32px}.header-title{font-size:20px}.header-actions{gap:5px}.header-name{max-width:78px;font-size:12px}.core-card{gap:12px;padding:12px}.core-inner-box{gap:10px;padding:10px}.grid-2{grid-template-columns:1fr;gap:10px}}@media (width<=480px){.theme-label{display:none}.header-top{flex-wrap:wrap}}.cg-wrap{box-sizing:content-box;display:block;position:relative}cg-container{width:100%;height:100%;display:block;position:absolute;top:0}cg-board{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-size:cover;width:100%;height:100%;line-height:0;position:absolute;top:0;left:0}.cg-wrap.manipulable cg-board{cursor:pointer}cg-board square{pointer-events:none;width:12.5%;height:12.5%;position:absolute;top:0;left:0}cg-board square.move-dest{pointer-events:auto}cg-board square.last-move{will-change:transform}.cg-wrap piece{z-index:2;will-change:transform;pointer-events:none;background-size:cover;width:12.5%;height:12.5%;position:absolute;top:0;left:0}cg-board piece.dragging{cursor:move;z-index:11!important}piece.anim{z-index:8}piece.fading{z-index:1;opacity:.5}.cg-wrap piece.ghost{opacity:.3}.cg-wrap piece svg{pointer-events:none;z-index:2;opacity:.6;width:100%;height:100%;position:relative;top:0;left:0;overflow:hidden}.cg-wrap cg-auto-pieces,.cg-wrap .cg-shapes,.cg-wrap .cg-custom-svgs,.cg-wrap .cg-shapes-below,.cg-wrap .cg-custom-below{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;overflow:visible}.cg-wrap cg-auto-pieces{z-index:2}.cg-wrap cg-auto-pieces piece{opacity:.3}.cg-wrap .cg-shapes{opacity:.6;z-index:2;overflow:hidden}.cg-wrap .cg-shapes-below{z-index:1;overflow:hidden}.cg-wrap .cg-custom-below{z-index:1}.cg-wrap .cg-custom-svgs{z-index:9}.cg-wrap .cg-custom-svgs svg,.cg-wrap .cg-custom-below svg{overflow:visible}.cg-wrap coords{pointer-events:none;opacity:.8;font-family:sans-serif;font-size:9px;display:flex;position:absolute}.cg-wrap coords.ranks{flex-flow:column-reverse;width:12px;height:100%;top:-20px;left:4px}.cg-wrap coords.ranks.black{flex-flow:column}.cg-wrap coords.ranks.left{align-items:flex-end;left:-15px}.cg-wrap coords.files{text-transform:uppercase;text-align:center;flex-flow:row;width:100%;height:16px;bottom:-4px;left:24px}.cg-wrap coords.files.black{flex-flow:row-reverse}.cg-wrap coords coord{flex:auto}.cg-wrap coords.ranks coord{transform:translateY(39%)}.cg-wrap coords.squares{text-transform:uppercase;text-align:right;flex-flow:column-reverse;width:12.5%;height:100%;bottom:0;left:0}.cg-wrap coords.squares.black{flex-flow:column}.cg-wrap coords.squares.left{text-align:left}.cg-wrap coords.squares coord{padding:6% 4%}.cg-wrap coords.squares.rank2{transform:translate(100%)}.cg-wrap coords.squares.rank3{transform:translate(200%)}.cg-wrap coords.squares.rank4{transform:translate(300%)}.cg-wrap coords.squares.rank5{transform:translate(400%)}.cg-wrap coords.squares.rank6{transform:translate(500%)}.cg-wrap coords.squares.rank7{transform:translate(600%)}.cg-wrap coords.squares.rank8{transform:translate(700%)}cg-board{background-color:#f0d9b5;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgIHZpZXdCb3g9IjAgMCA4IDgiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyI+CjxnIGlkPSJhIj4KICA8ZyBpZD0iYiI+CiAgICA8ZyBpZD0iYyI+CiAgICAgIDxnIGlkPSJkIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZSIgb3BhY2l0eT0iMCIvPgogICAgICAgIDx1c2UgeD0iMSIgeT0iMSIgaHJlZj0iI2UiIHg6aHJlZj0iI2UiLz4KICAgICAgICA8cmVjdCB5PSIxIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZiIgb3BhY2l0eT0iMC4yIi8+CiAgICAgICAgPHVzZSB4PSIxIiB5PSItMSIgaHJlZj0iI2YiIHg6aHJlZj0iI2YiLz4KICAgICAgPC9nPgogICAgICA8dXNlIHg9IjIiIGhyZWY9IiNkIiB4OmhyZWY9IiNkIi8+CiAgICA8L2c+CiAgICA8dXNlIHg9IjQiIGhyZWY9IiNjIiB4OmhyZWY9IiNjIi8+CiAgPC9nPgogIDx1c2UgeT0iMiIgaHJlZj0iI2IiIHg6aHJlZj0iI2IiLz4KPC9nPgo8dXNlIHk9IjQiIGhyZWY9IiNhIiB4OmhyZWY9IiNhIi8+Cjwvc3ZnPg==)}cg-board square.move-dest{background:radial-gradient(#14551e80 22%,#208530 0,#0000004d 0,#0000 0)}cg-board square.premove-dest{background:radial-gradient(#141e5580 22%,#203085 0,#0000004d 0,#0000 0)}cg-board square.oc.move-dest{background:radial-gradient(#0000 0% 80%,#1455004d 80%)}cg-board square.oc.premove-dest{background:radial-gradient(#0000 0% 80%,#141e5533 80%)}cg-board square.move-dest:hover,cg-board square.move-dest.hover{background:#14551e4d}cg-board square.premove-dest:hover,cg-board square.premove-dest.hover{background:#141e5533}cg-board square.last-move{background-color:#9bc70069}cg-board square.selected{background-color:#14551e80}cg-board square.check{background:radial-gradient(red 0%,#e70000 25%,#a9000000 89%,#9e000000 100%)}cg-board square.current-premove{background-color:#141e5580}.orientation-white .ranks :nth-child(odd),.orientation-white .files :nth-child(2n),.orientation-black .ranks :nth-child(2n),.orientation-black .files :nth-child(odd),coords.squares:nth-of-type(odd) :nth-child(2n),coords.squares:nth-of-type(2n) :nth-child(odd){color:#484848cc}.orientation-white .ranks :nth-child(2n),.orientation-white .files :nth-child(odd),.orientation-black .ranks :nth-child(odd),.orientation-black .files :nth-child(2n),coords.squares:nth-of-type(odd) :nth-child(odd),coords.squares:nth-of-type(2n) :nth-child(2n){color:#fffc}
