.game-panel{flex-direction:column;flex:1;gap:.75rem;min-width:220px;max-width:320px;display:flex}.panel-section{-webkit-backdrop-filter:blur(12px);background:#faf8f0d9;border:1px solid #ffffff4d;border-radius:8px;padding:.65rem .75rem;box-shadow:0 4px 16px #0000000f,0 1px 3px #0000000a}.panel-section-title{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin:0 0 .4rem;font-size:.8rem;font-weight:600}.panel-status{-webkit-backdrop-filter:blur(12px);text-align:center;background:#faf8f0d9;border:1px solid #ffffff4d;border-radius:8px;flex-direction:column;align-items:center;gap:.15rem;padding:.5rem .75rem;display:flex;box-shadow:0 4px 16px #0000000f,0 1px 3px #0000000a}.panel-mode{color:var(--accent);text-transform:uppercase;letter-spacing:.05em;font-size:.7rem;font-weight:600}.panel-status-text{color:var(--text);font-size:.9rem;font-weight:500;line-height:1.3}.panel-status-thinking{color:var(--text-muted);font-style:italic}.panel-engine-error{color:#c0392b;cursor:help;font-size:.7rem}@keyframes thinking-dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}to{content:""}}.panel-moves{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.panel-moves-inner{flex:1;min-height:0;overflow:hidden}.panel-moves-inner .move-history{-webkit-backdrop-filter:none;box-shadow:none;background:0 0;border:none;border-radius:0;height:100%;padding:0}.panel-moves-inner .move-history-title{display:none}.panel-moves-inner .move-history-list{max-height:220px}.panel-analysis-placeholder{color:var(--text-muted);margin:0;padding:.5rem 0;font-size:.8rem;font-style:italic}.panel-actions-grid{grid-template-columns:1fr 1fr;gap:.4rem;display:grid}.panel-action-btn{text-align:center;width:100%;padding:.45rem .4rem;font-size:.78rem}@media (width>=641px) and (width<=900px){.game-panel{gap:.6rem;min-width:180px;max-width:220px}.panel-actions-grid{grid-template-columns:1fr}.panel-moves-inner .move-history-list{max-height:160px}}@media (width<=640px){.game-panel{width:100%;min-width:0;max-width:100%}.panel-actions-grid{grid-template-columns:1fr 1fr}.panel-action-btn{min-height:44px;font-size:.85rem}.panel-moves-inner .move-history-list{max-height:180px}}.app{flex-direction:column;min-height:100vh;display:flex}.app-header{border-bottom:1px solid var(--border);background:var(--bg);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);justify-content:center;align-items:center;gap:1rem;padding:.75rem 1rem;display:flex;position:relative}.app-header h1{color:var(--text);letter-spacing:-.01em;margin:0;font-size:1.5rem;font-weight:600}@media (width>=901px){.app-header h1{font-size:1.65rem}}.settings-toggle-btn{border:1px solid var(--border);color:var(--text);cursor:pointer;background:0 0;border-radius:8px;padding:.35rem .7rem;font-size:.8rem;transition:background .15s,border-color .15s;position:absolute;right:1rem}.piece-set-badge{background:var(--accent);color:#fff;text-transform:uppercase;letter-spacing:.08em;border-radius:4px;padding:2px 8px;font-size:.65rem;font-weight:600;line-height:1.6;position:absolute;left:1rem}.app-main{flex:1;justify-content:center;padding:1.5rem 1rem;display:flex}.board{border:2px solid var(--border);border-radius:4px;grid-template-rows:repeat(8,1fr);grid-template-columns:repeat(8,1fr);width:min(60vh,60vw,480px);height:min(60vh,60vw,480px);transition:box-shadow .2s;display:grid;overflow:hidden;box-shadow:0 4px 20px #0000001f}.board:hover{box-shadow:0 6px 24px #00000026}.theme-classic .square-light{background-color:#f0d9b5}.theme-classic .square-dark{background-color:#b58863}.theme-marine .square-light{background-color:#e8edf3}.theme-marine .square-dark{background-color:#4a7a9c}.theme-ember .square-light{background-color:#f7e4c4}.theme-ember .square-dark{background-color:#b85a30}.theme-forest .square-light{background-color:#dce3b7}.theme-forest .square-dark{background-color:#3a6b3a}.theme-midnight .square-light{background-color:#c8ccd0}.theme-midnight .square-dark{background-color:#2c3a50}.square{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;font-size:2.2rem;line-height:1;display:flex;position:relative}.square:focus-visible{outline:2px solid var(--accent);outline-offset:-3px;z-index:2}.square:focus:not(:focus-visible){outline:none}.square-selected{background-color:#f6d55c!important}.square-dark.square-selected{background-color:#d4a843!important}.square-last-move{background:#ffff0040!important}.square-check{box-shadow:inset 0 0 8px 2px #f006;background:#ff00004d!important}.label-rank,.label-file{color:#0006;pointer-events:none;font-size:.6rem;font-weight:500;position:absolute}.label-rank{top:2px;left:3px}.label-file{bottom:2px;right:3px}.square-dark .label-rank,.square-dark .label-file{color:#ffffff80}@keyframes piece-appear{0%{opacity:.1;transform:scale(.6)translateY(-8px)}to{opacity:1;transform:scale(1)translateY(0)}}.piece{pointer-events:none;z-index:1;line-height:1;transition:transform .15s;animation:.2s ease-out piece-appear}.piece:hover{transform:scale(1.08)}@media (prefers-reduced-motion:reduce){.piece{transition:none;animation:none}.piece:hover{transform:none}}.piece-set-unicode.piece-white,.piece-set-unicode.piece-black{color:var(--text);text-shadow:0 1px 2px #00000026}.piece-set-symbols.piece-white{color:#c8a84e;text-shadow:0 1px 2px #00000026}.piece-set-symbols.piece-black{color:#8b6914;text-shadow:0 1px 2px #00000026;font-weight:700}.piece-set-outlined.piece-white{-webkit-text-stroke:1px #0000004d;color:#0000;text-shadow:none}.piece-set-outlined.piece-black{-webkit-text-stroke:1px #00000080;color:#0000;text-shadow:none}.piece-set-merida.piece-white{color:#2a2a2a;text-shadow:0 1px 3px #0003,0 0 0 1px #0000000d;font-size:1.15em;font-weight:700}.piece-set-merida.piece-black{color:#d4d4d4;text-shadow:0 1px 3px #0000004d,0 0 3px #0000001a;font-size:1.15em;font-weight:700}.legal-move-dot{z-index:0;pointer-events:none;background-color:#0078008c;border-radius:50%;width:14px;height:14px;transition:transform .1s,background-color .1s;position:absolute}.square:hover .legal-move-dot{background-color:#00c80099;transform:scale(1.3)}@keyframes illegal-flash{0%{background-color:#c832324d}to{background-color:#0000}}.square-illegal{animation:.3s ease-out illegal-flash}@keyframes capture-flash{0%{background-color:#c8960040}to{background-color:#0000}}.square-capture{animation:.35s ease-out capture-flash}.player-panel{-webkit-backdrop-filter:blur(12px);background:#faf8f0d9;border:1px solid #ffffff4d;border-radius:8px;width:100%;max-width:min(60vh,60vw,480px);margin-bottom:.35rem;padding:.6rem .75rem;box-shadow:0 4px 16px #0000000f,0 1px 3px #0000000a}.player-row{border-radius:6px;padding:.4rem .5rem;transition:background .15s}.player-active{background:#5a7d5a14}.player-row-header{align-items:center;gap:.35rem;display:flex}.player-color-dot{flex-shrink:0;font-size:.85rem;line-height:1}.player-name{color:var(--text);font-size:.95rem;font-weight:600}.player-turn-arrow{color:var(--accent);margin-left:auto;font-size:.85rem;animation:1.2s ease-in-out infinite arrow-pulse}@keyframes arrow-pulse{0%,to{opacity:1}50%{opacity:.4}}.player-lost-row{align-items:center;gap:.35rem;margin-top:.15rem;padding-left:1.2rem;display:flex}.player-lost-label{color:var(--text-muted);white-space:nowrap;flex-shrink:0;font-size:.68rem;font-weight:600}.player-lost-pieces{flex-wrap:wrap;gap:.1rem;min-width:0;display:flex}.player-lost-piece{font-size:.95rem;line-height:1.1}.player-lost-piece-white{color:#555;text-shadow:0 1px 1px #0000001a}.player-lost-piece-black{color:#222}.player-lost-empty{color:var(--text-muted);font-size:.75rem}.player-to-move{color:var(--accent);margin-top:.1rem;padding-left:1.2rem;font-size:.75rem;font-weight:500}.player-divider{background:var(--border);opacity:.5;height:1px;margin:.25rem 0}.player-clock-placeholder{color:var(--text-muted);text-align:center;letter-spacing:.02em;padding:.2rem 0;font-size:.78rem;font-style:italic}.app-main{align-items:flex-start;padding:clamp(1rem,2vw,1.75rem)}.game-layout{grid-template-columns:minmax(190px,240px) minmax(360px,540px) minmax(240px,300px);justify-content:center;align-items:start;gap:clamp(1rem,2.5vw,1.75rem);width:100%;max-width:1180px;display:grid}.game-column,.board-section{min-width:0}.game-column{flex-direction:column;gap:.85rem;display:flex}.board-section{justify-content:center;align-items:center;display:flex}.board{width:min(64vh,46vw,540px);height:min(64vh,46vw,540px)}.panel-title,.move-history-title{color:var(--text);letter-spacing:.05em;text-transform:uppercase;margin:0 0 .5rem;font-size:.82rem;font-weight:700}.thinking-dots:after{content:"";animation:1.5s steps(4,end) infinite thinking-dots}.game-panel{flex-direction:column;gap:.85rem;display:flex}.game-panel-section{-webkit-backdrop-filter:blur(12px);background:#faf8f0e0;border:1px solid #ffffff5c;border-radius:8px;width:100%;padding:.85rem;box-shadow:0 4px 16px #0000000f,0 1px 3px #0000000a}.game-panel-section p{color:var(--text-muted);margin:0;font-size:.85rem;line-height:1.4}.game-panel-status .status-mode{color:var(--accent);text-transform:uppercase;letter-spacing:.05em;font-size:.75rem;font-weight:600}.game-panel-status .status-text{color:var(--text);margin-top:.2rem;font-size:.98rem;font-weight:600;line-height:1.35}.game-panel-status .status-error{color:#c0392b;cursor:help;margin-top:.15rem;font-size:.75rem}.game-panel-moves .move-history-list{max-height:280px;font-family:SF Mono,Fira Code,Consolas,monospace;font-size:.88rem;line-height:1.5;overflow-y:auto}.game-panel-moves .move-history-empty{color:var(--text-muted);margin:0;font-family:inherit;font-style:italic}.game-panel-moves .move-row{border-radius:3px;gap:.5rem;padding:2px 0;transition:background .1s;display:flex}.game-panel-moves .move-row:hover{background:#5a7d5a14}.game-panel-moves .move-row-active{background:#5a7d5a1f}.game-panel-moves .move-number{color:var(--text-muted);text-align:right;min-width:2.2em;font-size:.95em}.game-panel-moves .move-white,.game-panel-moves .move-black{cursor:pointer;border-radius:2px;min-width:3.5em;padding:0 2px;transition:background .1s}.game-panel-moves .move-white:hover,.game-panel-moves .move-black:hover{background:#5a7d5a26}.game-panel-moves .move-current{background:#f6d55c4d;font-weight:600}.game-panel-moves .review-controls{border-top:1px solid var(--border);align-items:center;gap:.4rem;margin-top:.5rem;padding-top:.5rem;display:flex}.game-panel-moves .review-indicator{background:#5a7d5a1a;border-radius:6px;justify-content:space-between;align-items:center;margin-bottom:.4rem;padding:.3rem .5rem;font-size:.8rem;display:flex}.game-panel-moves .review-label{color:var(--accent);font-weight:500}.game-panel-moves .btn-review-nav{min-width:2.2rem}.game-panel-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;display:grid}.game-panel-actions .btn:first-child{grid-column:1/-1}.feedback-badge{border-radius:3px;justify-content:center;align-items:center;min-width:1.4em;height:1.2em;margin-left:.15rem;padding:0 .2em;font-size:.6rem;font-weight:700;line-height:1;display:inline-flex}.feedback-badge-book{color:#1e40af;background:#dbeafe}.feedback-badge-perfect{color:#065f46;background:#d1fae5}.feedback-badge-excellent{color:#134e4a;background:#ccfbf1}.feedback-badge-good{color:#92400e;background:#fef3c7}.feedback-badge-inaccuracy{color:#9a3412;background:#fed7aa}.feedback-badge-mistake{color:#991b1b;background:#fecaca}.feedback-badge-blunder{color:#7f1d1d;background:#fca5a5}.analysis-feedback-list{flex-direction:column;gap:.2rem;max-height:160px;font-size:.78rem;display:flex;overflow-y:auto}.analysis-feedback-item{align-items:center;gap:.35rem;padding:.15rem 0;display:flex}.feedback-move-num{color:var(--text-muted);text-align:right;min-width:2em;font-weight:600}.feedback-tag{text-transform:uppercase;border-radius:3px;padding:.05rem .35rem;font-size:.7rem;font-weight:600}.feedback-cl{color:var(--text-muted);margin-left:auto;font-family:monospace;font-size:.7rem}.feedback-message{color:var(--text);flex:1;min-width:0;font-size:.72rem}.analysis-opening{border-bottom:1px solid var(--border);align-items:center;gap:.35rem;margin-bottom:.2rem;padding:.3rem 0;display:flex}.analysis-opening-badge{text-transform:uppercase;letter-spacing:.04em;color:#5b21b6;background:#ede9fe;border-radius:3px;padding:.1rem .35rem;font-size:.6rem;font-weight:700}.analysis-opening-name{color:var(--text);font-size:.78rem;font-weight:600}.tag-book .feedback-tag{color:#fff;background:#2e86c1}.tag-perfect .feedback-tag{color:#fff;background:#27ae60}.tag-excellent .feedback-tag{color:#fff;background:#2ecc71}.tag-good .feedback-tag{color:#fff;background:#f39c12}.tag-inaccuracy .feedback-tag{color:#fff;background:#e67e22}.tag-mistake .feedback-tag{color:#fff;background:#e74c3c}.tag-blunder .feedback-tag{color:#fff;background:#c0392b}.btn{background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:.5rem 1rem;font-size:.85rem;font-weight:500;transition:background .15s,opacity .15s}.btn:hover{opacity:.9}.btn:active{opacity:.8}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-sm{padding:.35rem .75rem;font-size:.8rem}.btn-secondary{background:var(--bg-alt);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){background:var(--border)}.btn-danger-outline{color:#c0392b;background:0 0;border:1px solid #c0392b}.btn-danger-outline:hover:not(:disabled){color:#fff;background:#c0392b}.btn-cancel{background:var(--bg-alt);color:var(--text);border:1px solid var(--border)}.btn-danger{color:#fff;background:#c0392b;border:none}.btn-review{background:var(--accent-light);color:#fff;border:none;font-size:.75rem}.fen-import-area{flex-wrap:wrap;align-items:center;gap:.4rem;display:flex}.fen-input{border:1px solid var(--border);background:var(--bg);min-width:150px;color:var(--text);border-radius:6px;flex:1;padding:.4rem .6rem;font-family:SF Mono,Fira Code,Consolas,monospace;font-size:.8rem}.fen-input:focus{border-color:var(--accent);outline:none}.fen-error{color:#c0392b;width:100%;margin:0;font-size:.75rem}.confirm-overlay{-webkit-backdrop-filter:blur(4px);z-index:150;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.confirm-dialog{background:var(--bg);border:1px solid var(--border);text-align:center;border-radius:10px;width:90%;max-width:360px;padding:1.5rem;box-shadow:0 4px 24px #0003}.confirm-title{color:var(--text);margin:0 0 .5rem;font-size:1.1rem}.confirm-message{color:var(--text-muted);margin:0 0 1.25rem;font-size:.9rem;line-height:1.4}.confirm-actions{justify-content:center;gap:.75rem;display:flex}.promotion-overlay{-webkit-backdrop-filter:blur(4px);z-index:100;background:#0000004d;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.promotion-dialog{background:var(--bg);border:1px solid var(--border);text-align:center;border-radius:10px;padding:1.5rem;box-shadow:0 4px 24px #0003}.promotion-title{color:var(--text);margin:0 0 1rem;font-size:1rem}.promotion-choices{justify-content:center;gap:.75rem;display:flex}.promotion-btn{border:2px solid var(--border);background:var(--bg-alt);cursor:pointer;border-radius:10px;justify-content:center;align-items:center;width:56px;height:56px;font-size:2rem;transition:border-color .15s,background .15s;display:flex}.promotion-btn:hover{border-color:var(--accent);background:var(--bg)}.settings-toggle{cursor:pointer;align-items:center;gap:.5rem;display:flex}.settings-toggle input[type=checkbox]{cursor:pointer;width:1rem;height:1rem}.settings-toggle-label{color:var(--text-muted);font-size:.85rem}.board-wrapper{flex-direction:column;align-items:center;gap:4px;display:flex}.board-side-label{width:min(60vh,60vw,480px);color:var(--text);align-items:center;gap:6px;padding:3px 6px;font-size:.8rem;font-weight:600;display:flex}.board-side-top,.board-side-bottom{justify-content:flex-start}.side-color-dot{border:1.5px solid var(--border);border-radius:50%;flex-shrink:0;width:14px;height:14px;display:inline-block}.side-dot-w{background:#f5f5f5;box-shadow:inset 0 1px 3px #00000026}.side-dot-b{background:#1a1a1a;box-shadow:inset 0 1px 2px #ffffff26}.side-color-name{letter-spacing:.03em}.side-turn-dot{color:var(--accent);margin-left:auto;font-size:.55rem;line-height:1;animation:1.5s ease-in-out infinite turn-pulse}@keyframes turn-pulse{0%,to{opacity:1}50%{opacity:.4}}.board-computer-thinking{will-change:transform}.game-end-overlay{z-index:100;-webkit-backdrop-filter:blur(4px);background:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.game-end-modal{text-align:center;background:#fff;border-radius:12px;width:90%;max-width:360px;padding:2rem;box-shadow:0 20px 60px #0000004d}.game-end-result{margin-bottom:.5rem;font-size:1.5rem;font-weight:700}.game-end-message{color:#666;margin-bottom:1.5rem;font-size:.95rem}.game-end-actions{justify-content:center;gap:.75rem;display:flex}.material-advantage{margin-left:.3rem;font-size:.85rem;font-weight:700}.material-advantage.positive{color:#16a34a}.material-advantage.negative{color:#dc2626}@media (width>=641px) and (width<=900px){.board-side-label{width:min(50vh,45vw,400px)}}@media (width<=640px){.board-side-label{width:min(92vw,400px);font-size:.75rem}.side-color-dot{width:12px;height:12px}}@media (width>=641px) and (width<=980px){.game-layout{grid-template-columns:minmax(0,1fr) minmax(220px,280px);grid-template-areas:"board board""left right";max-width:760px}.game-column-left{grid-area:left}.board-section{grid-area:board}.game-column-right{grid-area:right}.board{width:min(70vh,78vw,520px);height:min(70vh,78vw,520px)}}@media (width<=640px){.app-main{padding:.85rem}.app-header{justify-content:flex-start;padding-right:7rem}.app-header h1{font-size:1.15rem}.piece-set-badge{display:none}.game-layout,.board-section,.game-column{width:100%}.game-layout{grid-template-columns:minmax(0,1fr);gap:.85rem}.board-section{align-items:flex-start}.game-column-left{order:1}.board-section{order:2}.game-column-right{order:3}.board-wrapper{max-width:100%}.board{aspect-ratio:1;width:100%;max-width:360px;height:auto}.board-side-label{max-width:100%}.settings-toggle-btn{text-overflow:ellipsis;white-space:nowrap;max-width:6rem;right:.5rem;overflow:hidden}}.settings-overlay{z-index:200;background:#00000059;position:fixed;inset:0}.settings-panel{background:var(--bg);border-left:1px solid var(--border);z-index:201;flex-direction:column;width:320px;max-width:90vw;height:100vh;animation:.2s ease-out slideIn;display:flex;position:fixed;top:0;right:0;box-shadow:-4px 0 20px #0000001a}@keyframes slideIn{0%{transform:translate(100%)}to{transform:translate(0)}}.settings-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.settings-title{color:var(--text);margin:0;font-size:1.1rem;font-weight:600}.settings-close-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:.25rem;font-size:1.2rem;line-height:1;transition:color .15s,background .15s}.settings-close-btn:hover{color:var(--text);background:var(--bg-alt)}.settings-body{flex-direction:column;flex:1;gap:1.25rem;padding:1.25rem;display:flex;overflow-y:auto}.settings-field{flex-direction:column;gap:.4rem;display:flex}.settings-label{color:var(--text);font-size:.85rem;font-weight:600}.settings-select{border:1px solid var(--border);background:var(--bg-alt);color:var(--text);cursor:pointer;border-radius:6px;padding:.5rem .75rem;font-size:.9rem;transition:border-color .15s}.settings-select:focus{border-color:var(--accent);outline:none}.settings-select:hover{border-color:var(--accent-light)}.settings-disclaimer{color:var(--text-muted);margin:0;font-size:.72rem;font-style:italic;line-height:1.4}.settings-toggle-btn{border:1px solid var(--border);color:var(--text);cursor:pointer;background:0 0;border-radius:6px;align-items:center;gap:.4rem;padding:.4rem .75rem;font-size:.85rem;transition:background .15s,border-color .15s;display:flex}.settings-toggle-btn:hover{background:var(--bg-alt);border-color:var(--accent-light)}:root{--bg:#faf8f0eb;--bg-alt:#f0ede1e0;--text:#2c3e2d;--text-muted:#7a8b7a;--border:#c4bb9e;--accent:#5a7d5a;--accent-light:#7a9d7a}*,:before,:after{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px}body{color:var(--text);background-image:url(/assets/carpet-texture-C_OWAVkt.png);background-position:50%;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Helvetica Neue,sans-serif}#root{min-height:100vh}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.skip-link{background:var(--accent);color:#fff;z-index:1000;padding:8px 12px;font-size:.9rem;font-weight:500;text-decoration:none;transition:top .2s;position:absolute;top:-40px;left:0}.skip-link:focus{top:0}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
