html,body{margin:0;padding:0;height:100%;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;background-color:#121212;color:#e0e0e0}#main-container{display:flex;flex-direction:column;height:100vh;overflow:hidden;overflow-anchor:none}#barView{display:flex;justify-content:space-between;align-items:center;padding:10px 20px}.banner-left{display:flex;align-items:center;gap:20px}.back-btn{background-color:transparent;color:#007acc;border:1px solid #007acc;padding:6px 12px;font-size:.9rem;border-radius:4px;cursor:pointer;transition:all .2s ease}.back-btn:hover{background-color:#007acc1a;color:#00a2ff;border-color:#00a2ff}.banner-btn{background-color:#333;color:#fff;border:none;padding:8px 16px;cursor:pointer;border-radius:4px}.banner-btn:hover{background-color:#007acc}#content-frame{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;display:flex;justify-content:center;align-items:flex-start;padding:20px;width:100%;box-sizing:border-box}.pgn-container{background-color:#1e1e1e;border:1px solid #333;border-radius:8px;width:100%;max-width:800px;padding:20px;box-sizing:border-box;box-shadow:0 4px 12px #00000080}#footerView{flex:0 0 auto;background-color:#1a1a1a;padding:12px 20px;text-align:center;font-size:.9rem;color:#888;border-top:1px solid #333}#footerView a{color:#007acc;text-decoration:none;margin:0 10px}#footerView a:hover{text-decoration:underline}.search-container{background-color:#1e1e1e;border:1px solid #333;border-radius:8px;width:100%;max-width:900px;padding:30px;box-sizing:border-box;box-shadow:0 4px 12px #00000080}.search-container h3{margin-top:0;margin-bottom:20px;font-size:1.5rem;color:#fff;border-bottom:1px solid #333;padding-bottom:10px}.search-header{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #333;margin-bottom:20px;padding-bottom:10px}.search-container .search-header h3{margin:0;padding:0;border:none}.search-header-btn{background-color:#333;color:#fff;border:1px solid #555;border-radius:4px;padding:8px 14px;font-size:.9rem;cursor:pointer}.search-header-btn:hover{background-color:#444}.sp-board-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;max-width:480px;margin:0 auto}.sp-board-tools{display:flex;gap:6px;width:100%}.sp-tool-btn,.sp-clear-btn{flex:1;min-width:0;font-size:.85rem;background-color:#333;color:#fff;border:1px solid #444;border-radius:4px;padding:8px 0;cursor:pointer}.sp-tool-btn.active{background-color:#007acc;border-color:#00a2ff}.sp-clear-btn{background-color:#555}.sp-board-holder{position:relative;width:100%;aspect-ratio:1 / 1;touch-action:none}.sp-board{position:relative;width:100%;height:100%}.sp-click-layer{display:none;position:absolute;top:0;right:0;bottom:0;left:0;z-index:210;cursor:crosshair}.sp-general{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%}.sp-general input,.sp-general select{width:100%;box-sizing:border-box}.sp-nav{display:flex;gap:5px;width:100%}.sp-nav-btn{flex:1;min-width:0;padding:8px 2px}.sp-nav-btn:disabled{opacity:.4;cursor:default}.sp-nav-info{min-height:1.2em;text-align:center;color:#ccc;font-size:.9rem;margin-top:-6px}.sp-board-row{display:flex;gap:8px;width:100%;align-items:flex-start}.sp-board-row .sp-board-holder{flex:1;min-width:0}.sp-palette,.sp-setup-layer{display:none}.sp-setup-mode .sp-palette{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(6,auto);grid-auto-flow:column;gap:4px;width:22%;flex-shrink:0}.sp-palette-piece{aspect-ratio:1 / 1;background-color:#3a3a3a;border-radius:4px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.sp-palette-piece svg,.sp-drag-ghost svg{width:100%;height:100%;display:block;pointer-events:none}.sp-setup-mode .sp-setup-layer{display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;cursor:grab;touch-action:none}.sp-setup-mode .sp-nav,.sp-setup-mode .sp-nav-info{display:none}.sp-setup-cancel{grid-column:1 / 3;grid-row:7;min-width:0;padding:6px 2px;font-size:.8rem}.sp-drag-ghost{position:fixed;z-index:1000;pointer-events:none}.sp-warning{display:none;width:100%;box-sizing:border-box;background-color:#4a3b10;color:#ffd666;border:1px solid #8a6d1a;border-radius:4px;padding:8px 10px;font-size:.9rem}.sp-result{display:flex;flex-direction:column;gap:15px;margin-top:25px}.sp-opening-name{color:#fff;font-size:1rem;padding:6px 0}.sp-moves-row{display:flex;gap:10px;align-items:flex-start}.sp-moves{flex:1;background-color:#fff;color:#000;border-radius:4px;padding:10px;line-height:1.7;min-height:40px;font-size:.95rem}.sp-move-num{color:#888;margin-right:3px}.sp-move-green{color:#1e8e3e;font-weight:700}.sp-fields-row{display:flex;align-items:center;gap:10px}.sp-fields-row #sp-arrow{flex:1;min-width:0}.sp-fields-row #sp-move-before{width:90px}.sp-fields-before{color:#ccc;white-space:nowrap}.sp-castling-sides{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:15px}.sp-castling-side{background-color:#252525;border:1px solid #333;border-radius:4px;padding:10px}.sp-castling-title{color:#fff;font-weight:600;margin-bottom:8px}.sp-castling-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.sp-castling-within{align-items:center;gap:8px;color:#ccc}.sp-sections{display:flex;flex-direction:column;gap:10px;margin-top:20px}.sp-section{background-color:#252525;border:1px solid #333;border-radius:4px;padding:10px 12px}.sp-section>summary{color:#fff;font-weight:600;cursor:pointer;-webkit-user-select:none;user-select:none}.sp-section[open]>summary{margin-bottom:10px}.sp-section>select{width:100%}.sp-pawn-structure-row{display:flex;gap:10px}.sp-pawn-structure-row #sp-pawn-structure,.sp-pawn-structure-row #sp-pawn-structure-side{flex:1;min-width:0}.sp-move-none{color:#888}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;margin-bottom:25px}.form-group{display:flex;flex-direction:column}.form-group label{font-size:.9rem;color:#aaa;margin-bottom:8px;font-weight:500}.form-group input,.form-group select{background-color:#2a2a2a;color:#fff;border:1px solid #444;padding:10px;font-size:.95rem;border-radius:4px;outline:none;transition:border-color .2s,box-shadow .2s}.form-group input:focus,.form-group select:focus{border-color:#007acc;box-shadow:0 0 5px #007acc80}.input-clear-wrap{position:relative;display:flex;flex-direction:column}.input-clear-wrap input{padding-right:28px}.input-clear-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:none;border:none;padding:0 4px;color:#777;font-size:1.1rem;line-height:1;cursor:pointer}.input-clear-btn:hover{color:#bbb}.form-group input::placeholder{color:#666}.search-submit-btn{background-color:#007acc;color:#fff;border:none;padding:12px 24px;font-size:1rem;font-weight:700;border-radius:4px;cursor:pointer;transition:background-color .2s;width:100%}.search-submit-btn:hover{background-color:#005999}.analysis-layout{display:flex;gap:30px;background:#1e1e1e;padding:20px;border-radius:8px;max-width:900px;width:100%}.board-section{width:100%;max-width:400px;margin:0 auto}#board,#puzzle-board,#stockfish-board{width:100%!important;height:auto!important;aspect-ratio:1 / 1}.board-controls{display:flex;justify-content:space-between;margin-top:15px}.board-controls button{background:#333;color:#fff;border:1px solid #444;padding:8px 12px;cursor:pointer;border-radius:4px;flex:1;margin:0 2px}.board-controls button:hover{background:#007acc}.info-section{flex:1;display:flex;flex-direction:column}.move-list{background:#111;padding:15px;border-radius:4px;height:300px;overflow-y:auto;font-family:monospace;line-height:2;color:#ccc}.move-item{padding:2px 5px;cursor:pointer;border-radius:3px}.move-item:hover{background:#444}.active-move{background:#007acc!important;color:#fff}.analysis-container{display:flex;flex-direction:column;gap:20px;width:100%;max-width:900px}.analysis-top-layout{display:flex;gap:30px;background:#1e1e1e;padding:20px;border-radius:8px}.raw-analysis-section{background:#1e1e1e;padding:20px;border-radius:8px;border:1px solid #333}.raw-analysis-section h4{margin-top:0;margin-bottom:10px;color:#007acc;border-bottom:1px solid #333;padding-bottom:5px}.raw-text-frame{background:#0f0f0f;padding:15px;height:250px;overflow-y:auto;border-radius:4px;border:1px solid #222}.raw-text-frame pre{margin:0;color:#aaa;font-family:Courier New,Courier,monospace;font-size:.9rem;white-space:pre-wrap;line-height:1.4}.raw-text-frame::-webkit-scrollbar{width:8px}.raw-text-frame::-webkit-scrollbar-thumb{background:#444;border-radius:4px}.raw-text-frame::-webkit-scrollbar-thumb:hover{background:#555}.game-navigation-bar{display:flex;justify-content:center;align-items:center;gap:20px;background:#252525;padding:12px;border-radius:8px;border:1px solid #333}.game-navigation-bar button{background-color:#007acc;color:#fff;border:none;padding:8px 20px;border-radius:4px;cursor:pointer;font-weight:700;transition:background .2s}.game-navigation-bar button:hover:not(:disabled){background-color:#005999}.game-navigation-bar button:disabled{background-color:#444;color:#888;cursor:not-allowed}.game-counter{color:#aaa;font-size:.9rem;font-family:sans-serif}.game-navigation-bar{display:flex;justify-content:center;gap:15px;margin:20px 0;padding:10px;background-color:#2a2a2a;border-radius:6px}.analysis-nav-btn{padding:8px 16px;background-color:#007acc;color:#fff;border:none;border-radius:4px;font-weight:700;cursor:pointer;transition:background-color .2s ease}.analysis-nav-btn:hover{background-color:#005999}.chessboard .markers .marker-square{fill:#ffff0080;stroke:none}.chessboard .markers .marker-dot{fill:#007accb3}.manual-marker{fill:#ff06;pointer-events:none}.puzzle-status-container{text-align:center;line-height:1.5;margin-bottom:10px}.puzzle-status-line{color:#4caf50;font-weight:700;margin-bottom:2px}#puzzle-eval-val{color:inherit}#puzzle-position-info{color:#fff;font-weight:700;font-size:1.1rem;margin-top:8px;min-height:1.4em}.engine-arrow-layer{overflow:visible!important}#arrowhead polygon{fill:#007acccc}#stockfish-board,#board{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}@media (max-width: 768px){#content-frame{padding:10px}.analysis-top-layout,.analysis-layout,.puzzle-container,.search-container{flex-direction:column;gap:15px;padding:10px!important;width:100%!important;max-width:100%!important}.board-section,.puzzle-board-section{width:100%;max-width:100%;margin:0 auto;box-sizing:border-box}#board,#puzzle-board,#stockfish-board{width:100%!important;height:auto!important;aspect-ratio:1 / 1}.info-section{width:100%}.move-list{height:200px}.form-grid{grid-template-columns:1fr}#barView{padding:10px;flex-direction:column;gap:10px}.banner-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:5px}.banner-btn{padding:6px 10px;font-size:.8rem}.game-navigation-bar,.puzzle-list-controls{flex-wrap:wrap;gap:5px}.analysis-nav-btn{flex:1 1 auto;font-size:.8rem;padding:8px 10px}}.a4-landscape{width:297mm;height:210mm;background:#fff;color:#000;display:flex;position:relative;box-shadow:0 0 20px #00000080;transform-origin:top center;flex-shrink:0}.a5-section{flex:1;display:flex;flex-direction:column;padding:15px;position:relative}.page-divider{width:0;border-left:1px solid #ccc;height:100%}.header{width:100%;margin-bottom:10px}.header-top-row{display:flex;justify-content:space-between;align-items:flex-end;font-size:12pt;font-weight:700;padding-bottom:2px}.header-line{height:0;border-top:1.5px solid black;width:100%}.title-text{text-transform:none}.date-text{font-weight:400;font-size:10pt}.diagram-section{margin-top:20px;width:100%;border-top:1px solid #444;border-bottom:1px solid #444;padding:15px 0;box-sizing:border-box}.diag-btn{padding:8px 16px;font-weight:700;font-size:.8rem;border-radius:4px;border:none;cursor:pointer;flex:1;display:flex;justify-content:center;align-items:center;background-color:#5dade2!important;color:#fff!important;transition:background-color .2s ease}.diag-btn:hover{background-color:#3498db!important}.diagram-section>div[style*="display: flex"]{gap:15px!important}#btn-import-cancel,#btn-export-cancel,#btn-diag-cancel,#btn-ann-cancel{background-color:#e74c3c!important}.result-item.last-viewed,.result-item.last-viewed strong,.result-item.last-viewed small{color:#2196f3}.sp-search-btn,.sp-search-results{margin-top:20px}.search-header-btns{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.sp-eco-message{margin-top:4px;font-size:.85rem;color:#aaa}.sp-eco-message.sp-eco-error{color:#f44336}.puzzle-container,.puzzle-container *{box-sizing:border-box}.puzzle-filters>div{min-width:0}.puzzle-filters select,.puzzle-filters input[type=text],.puzzle-filters button{width:100%;min-width:0;max-width:100%}@media (max-width: 400px){.puzzle-filters{padding:12px!important;gap:10px!important}}@media (max-width: 600px),(max-height: 500px) and (orientation: landscape){.sp-board-wrap{display:grid;grid-template-columns:minmax(0,1fr) 84px;grid-template-areas:"warning warning" "board   tools" "nav     nav" "navinfo navinfo" "general general" "prepare prepare";gap:8px;align-items:start}.sp-board-wrap>#sp-warning{grid-area:warning}.sp-board-wrap>.sp-board-row{grid-area:board}.sp-board-wrap>.sp-board-tools{grid-area:tools}.sp-board-wrap>.sp-nav{grid-area:nav}.sp-board-wrap>.sp-nav-info{grid-area:navinfo;margin-top:0}.sp-board-wrap>.sp-general{grid-area:general}.sp-board-wrap>#sp-prepare{grid-area:prepare}.sp-board-tools{flex-direction:column;gap:6px}.sp-tool-btn,.sp-clear-btn{flex:0 0 auto;padding:10px 4px;font-size:.8rem;line-height:1.2;white-space:normal}}@media (max-height: 500px) and (orientation: landscape){.sp-board-wrap{max-width:calc(75vh + 92px)}}.board-with-eval{display:flex;align-items:stretch;gap:6px;width:100%}.board-with-eval #stockfish-board{flex:1 1 auto;min-width:0}.eval-bar{flex:0 0 14px;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:#333;border:1px solid #555;border-radius:3px;overflow:hidden}.eval-bar.flipped{justify-content:flex-start}.eval-bar-white{width:100%;background:#f0f0f0;transition:height .4s ease}.eval-bar:after{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:#dc3c3cb3}.diag-btn{min-width:0}@media (max-width: 768px){.diag-btn{padding:8px 2px}.diagram-section>div[style*="display: flex"]{gap:5px!important}}.cm-chessboard .board.input-enabled .square{cursor:pointer}.cm-chessboard .coordinates,.cm-chessboard .markers-layer,.cm-chessboard .pieces-layer,.cm-chessboard .markers-top-layer{pointer-events:none}.cm-chessboard-content .list-inline{padding-left:0;list-style:none}.cm-chessboard-content .list-inline-item{display:inline-block}.cm-chessboard-content .list-inline-item:not(:last-child){margin-right:1rem}.cm-chessboard-accessibility.visually-hidden{width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cm-chessboard-accessibility button:disabled,.cm-chessboard-accessibility button:disabled:hover{opacity:.5;cursor:not-allowed;pointer-events:none}.cm-chessboard.default .board .square.white{fill:#ecdab9}.cm-chessboard.default .board .square.black{fill:#c5a076}.cm-chessboard.default.border-type-thin .board .border{stroke:#c5a076;stroke-width:.7%;fill:#c5a076}.cm-chessboard.default.border-type-none .board .border{stroke:#c5a076;stroke-width:0;fill:#c5a076}.cm-chessboard.default.border-type-frame .board .border{fill:#ecdab9;stroke:none}.cm-chessboard.default.border-type-frame .board .border-inner{fill:#c5a076;stroke:#c5a076;stroke-width:.7%}.cm-chessboard.default .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.default .coordinates .coordinate{fill:#b5936d;font-size:7px;cursor:default}.cm-chessboard.default .coordinates .coordinate.black{fill:#eeddbf}.cm-chessboard.default .coordinates .coordinate.white{fill:#b5936d}.cm-chessboard.default-contrast .board .square.white{fill:#ecdab9}.cm-chessboard.default-contrast .board .square.black{fill:#c5a076}.cm-chessboard.default-contrast.border-type-thin .board .border{stroke:#c5a076;stroke-width:.7%;fill:#c5a076}.cm-chessboard.default-contrast.border-type-none .board .border{stroke:#c5a076;stroke-width:0;fill:#c5a076}.cm-chessboard.default-contrast.border-type-frame .board .border{fill:#ecdab9;stroke:none}.cm-chessboard.default-contrast.border-type-frame .board .border-inner{fill:#c5a076;stroke:#c5a076;stroke-width:.7%}.cm-chessboard.default-contrast .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.default-contrast .coordinates .coordinate{fill:#b5936d;font-size:7px;cursor:default}.cm-chessboard.default-contrast .coordinates .coordinate.black,.cm-chessboard.default-contrast .coordinates .coordinate.white{fill:#333}.cm-chessboard.green .board .square.white{fill:#e0ddcc}.cm-chessboard.green .board .square.black{fill:#4c946a}.cm-chessboard.green.border-type-thin .board .border{stroke:#4c946a;stroke-width:.7%;fill:#4c946a}.cm-chessboard.green.border-type-none .board .border{stroke:#4c946a;stroke-width:0;fill:#4c946a}.cm-chessboard.green.border-type-frame .board .border{fill:#e0ddcc;stroke:none}.cm-chessboard.green.border-type-frame .board .border-inner{fill:#4c946a;stroke:#4c946a;stroke-width:.7%}.cm-chessboard.green .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.green .coordinates .coordinate{fill:#468862;font-size:7px;cursor:default}.cm-chessboard.green .coordinates .coordinate.black{fill:#e2e0d0}.cm-chessboard.green .coordinates .coordinate.white{fill:#468862}.cm-chessboard.blue .board .square.white{fill:#d8ecfb}.cm-chessboard.blue .board .square.black{fill:#86afcf}.cm-chessboard.blue.border-type-thin .board .border{stroke:#86afcf;stroke-width:.7%;fill:#86afcf}.cm-chessboard.blue.border-type-none .board .border{stroke:#86afcf;stroke-width:0;fill:#86afcf}.cm-chessboard.blue.border-type-frame .board .border{fill:#d8ecfb;stroke:none}.cm-chessboard.blue.border-type-frame .board .border-inner{fill:#86afcf;stroke:#86afcf;stroke-width:.7%}.cm-chessboard.blue .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.blue .coordinates .coordinate{fill:#7ba1be;font-size:7px;cursor:default}.cm-chessboard.blue .coordinates .coordinate.black{fill:#dbeefb}.cm-chessboard.blue .coordinates .coordinate.white{fill:#7ba1be}.cm-chessboard.chess-club .board .square.white{fill:#e6d3b1}.cm-chessboard.chess-club .board .square.black{fill:#af6b3f}.cm-chessboard.chess-club.border-type-thin .board .border{stroke:#692e2b;stroke-width:.7%;fill:#af6b3f}.cm-chessboard.chess-club.border-type-none .board .border{stroke:#692e2b;stroke-width:0;fill:#af6b3f}.cm-chessboard.chess-club.border-type-frame .board .border{fill:#692e2b;stroke:none}.cm-chessboard.chess-club.border-type-frame .board .border-inner{fill:#af6b3f;stroke:#692e2b;stroke-width:.7%}.cm-chessboard.chess-club .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.chess-club .coordinates .coordinate{fill:#e6d3b1;font-size:7px;cursor:default}.cm-chessboard.chess-club .coordinates .coordinate.black{fill:#e6d3b1}.cm-chessboard.chess-club .coordinates .coordinate.white{fill:#af6b3f}.cm-chessboard.chessboard-js .board .square.white{fill:#f0d9b5}.cm-chessboard.chessboard-js .board .square.black{fill:#b58863}.cm-chessboard.chessboard-js.border-type-thin .board .border{stroke:#404040;stroke-width:.7%;fill:#b58863}.cm-chessboard.chessboard-js.border-type-none .board .border{stroke:#404040;stroke-width:0;fill:#b58863}.cm-chessboard.chessboard-js.border-type-frame .board .border{fill:#f0d9b5;stroke:none}.cm-chessboard.chessboard-js.border-type-frame .board .border-inner{fill:#b58863;stroke:#404040;stroke-width:.7%}.cm-chessboard.chessboard-js .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.chessboard-js .coordinates .coordinate{fill:#404040;font-size:7px;cursor:default}.cm-chessboard.chessboard-js .coordinates .coordinate.black{fill:#f0d9b5}.cm-chessboard.chessboard-js .coordinates .coordinate.white{fill:#b58863}.cm-chessboard.black-and-white .board .square.white{fill:#fff}.cm-chessboard.black-and-white .board .square.black{fill:#9c9c9c}.cm-chessboard.black-and-white.border-type-thin .board .border{stroke:#9c9c9c;stroke-width:.7%;fill:#9c9c9c}.cm-chessboard.black-and-white.border-type-none .board .border{stroke:#9c9c9c;stroke-width:0;fill:#9c9c9c}.cm-chessboard.black-and-white.border-type-frame .board .border{fill:#fff;stroke:none}.cm-chessboard.black-and-white.border-type-frame .board .border-inner{fill:#9c9c9c;stroke:#9c9c9c;stroke-width:.7%}.cm-chessboard.black-and-white .coordinates{pointer-events:none;-webkit-user-select:none;user-select:none}.cm-chessboard.black-and-white .coordinates .coordinate{fill:#909090;font-size:7px;cursor:default}.cm-chessboard.black-and-white .coordinates .coordinate.black{fill:#fff}.cm-chessboard.black-and-white .coordinates .coordinate.white{fill:#909090}.cm-chessboard .keyboard-focus-indicator .keyboard-focus{fill:none;stroke:#06c;stroke-width:3px;pointer-events:none}.cm-chessboard .keyboard-focus-indicator .keyboard-from-square{fill:#0066cc4d;stroke:#06c;stroke-width:2px;pointer-events:none}.cm-chessboard:focus{outline:2px solid #0066cc;outline-offset:2px}
