body{min-width:320px;min-height:100vh;-webkit-font-smoothing:antialiased}*{box-sizing:border-box;margin:0;padding:0}:root{--sq: clamp(52px, 8vh, 80px);--label-size: calc(var(--sq) * .38);--board-h: calc(8 * var(--sq) + var(--label-size))}body{background:#1a1a2e;color:#eee;font-family:Segoe UI,sans-serif;min-width:fit-content}.app{display:flex;flex-direction:column;min-height:100vh;height:100vh;padding:1.2rem 1.5rem 1.5rem;gap:1rem}h1{font-size:1.4rem;color:#e0c97f;letter-spacing:.05em;text-align:center}h1 .version{font-size:.95rem;color:#888;font-weight:400;letter-spacing:0}.main-layout{display:flex;flex:1;gap:1.2rem;align-items:flex-start;justify-content:center}.sidebar{width:220px;flex-shrink:0}.center-area{display:flex;flex-direction:column;align-items:center;gap:.75rem}.status{font-size:1rem;padding:.35rem 1.2rem;border-radius:6px;background:#2a2a4a;border:1px solid #444;min-width:200px;text-align:center;transition:background .3s}.status-ai{background:#2a3a2a;border-color:#4a7a4a}.status-end{background:#3a2a2a;border-color:#8a4a4a;color:#f0a0a0;font-weight:700}.board-wrap{display:grid;grid-template-areas:". board" "ranks board" ". files";grid-template-columns:var(--label-size) auto;grid-template-rows:0px auto var(--label-size)}.rank-labels{grid-area:ranks;display:flex;flex-direction:column}.file-labels{grid-area:files;display:flex;flex-direction:row}.label{width:var(--label-size);height:var(--sq);display:flex;align-items:center;justify-content:center;font-size:.7rem;color:#999;-webkit-user-select:none;user-select:none}.file-labels .label{width:var(--sq);height:var(--label-size)}.board{grid-area:board;display:grid;grid-template-columns:repeat(8,var(--sq));grid-template-rows:repeat(8,var(--sq));border:2px solid #555;box-shadow:0 8px 32px #0009}.square{width:var(--sq);height:var(--sq);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;transition:background .15s}.square.light{background:#f0d9b5}.square.dark{background:#b58863}.square.light:hover{background:#e8d0a0}.square.dark:hover{background:#a07850}.square.selected.light{background:#f6f669}.square.selected.dark{background:#baca2b}.square.last-move.light{background:#cdd16f}.square.last-move.dark{background:#aaa23a}.piece{font-size:calc(var(--sq) * .65);line-height:1;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;z-index:1;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}.white-piece{color:#fff;text-shadow:0 0 2px #000,0 0 2px #000}.black-piece{color:#111;text-shadow:0 0 2px #888}.move-dot{position:absolute;width:calc(var(--sq) * .34);height:calc(var(--sq) * .34);border-radius:50%;background:#00000040;z-index:2;pointer-events:none}.capture-ring{position:absolute;width:calc(var(--sq) * .9);height:calc(var(--sq) * .9);border-radius:50%;border:4px solid rgba(0,0,0,.25);z-index:2;pointer-events:none}.sidebar-left{display:flex;flex-direction:column;gap:.75rem}.controls-panel{display:flex;flex-direction:column;gap:.6rem;background:#1e1e38;border:1px solid #333;border-radius:8px;padding:.8rem .9rem}.mode-tabs{display:flex;flex-direction:column;gap:.3rem;padding-bottom:.5rem;border-bottom:1px solid #2a2a4a}.mode-tab{display:flex;align-items:center;gap:.4rem;padding:.3rem .6rem;border-radius:4px;cursor:pointer;font-size:.85rem;color:#aaa;border:1px solid transparent;transition:all .15s;-webkit-user-select:none;user-select:none}.mode-tab.active{color:#e0c97f;border-color:#e0c97f;background:#e0c97f14}.mode-tab input[type=radio]{accent-color:#e0c97f}.config-section{transition:opacity .2s}.config-section.dimmed{opacity:.35;pointer-events:none}.level-select{display:flex;flex-direction:column;gap:.4rem;font-size:.85rem;color:#aaa}.level-buttons{display:flex;gap:.35rem}.custom-warning{font-size:.75rem;color:#c8a020;background:#c8a02014;border:1px solid rgba(200,160,32,.3);border-left:3px solid #c8a020;border-radius:4px;padding:.35rem .5rem;line-height:1.4;margin-bottom:.3rem}.custom-grid{display:flex;flex-direction:column;gap:.45rem}.custom-field{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.custom-field label{font-size:.78rem;color:#888;white-space:nowrap}.custom-field input[type=number]{width:58px;padding:.2rem .35rem;background:#2a2a4a;border:1px solid #444;border-radius:4px;color:#eee;font-size:.85rem;text-align:center}.custom-field input[type=number]:disabled{opacity:.4}.custom-field input[type=number]:focus{outline:none;border-color:#e0c97f}.custom-check{align-items:center}.custom-check input[type=checkbox]{width:18px;height:18px;accent-color:#e0c97f;cursor:pointer}.custom-field-row{display:flex;align-items:center;gap:.3rem}.unit{font-size:.8rem;color:#888}.level-btn{width:30px;height:30px;border-radius:50%;border:2px solid #444;background:#2a2a4a;color:#ccc;font-size:.85rem;font-weight:700;cursor:pointer;transition:all .15s;padding:0}.level-btn:hover:not(:disabled){border-color:#e0c97f;color:#e0c97f}.level-btn.active{background:#e0c97f;border-color:#e0c97f;color:#1a1a2e}.level-btn:disabled{opacity:.4;cursor:default}.reset-btn{padding:.55rem 0;width:100%;font-size:.95rem;background:#e0c97f;color:#1a1a2e;border:none;border-radius:6px;cursor:pointer;font-weight:700;letter-spacing:.05em;transition:background .2s}.reset-btn:hover:not(:disabled){background:#f0d98f}.reset-btn:disabled{opacity:.5;cursor:default}.sidebar-right{display:flex;flex-direction:column}.history-panel{background:#1e1e38;border:1px solid #333;border-radius:8px;display:flex;flex-direction:column;max-height:var(--board-h);overflow:hidden}.history-title{font-size:.82rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#888;padding:.55rem .8rem;border-bottom:1px solid #2a2a4a;flex-shrink:0}.history-list{overflow-y:auto;flex:1;scrollbar-width:thin;scrollbar-color:#333 transparent}.history-list::-webkit-scrollbar{width:4px}.history-list::-webkit-scrollbar-track{background:transparent}.history-list::-webkit-scrollbar-thumb{background:#333;border-radius:2px}.history-table{width:100%;border-collapse:collapse;font-size:.82rem;font-family:Courier New,monospace}.history-num{color:#555;padding:.22rem .3rem .22rem .6rem;text-align:right;width:28px;-webkit-user-select:none;user-select:none;vertical-align:middle;font-size:.75rem}.history-cell{padding:.22rem .5rem;cursor:pointer;color:#bbb;vertical-align:middle;border-radius:3px;transition:background .1s,color .1s;white-space:nowrap}.history-cell:hover{background:#ffffff0f;color:#eee}.history-cell.active{background:#e0c97f2e;color:#e0c97f;font-weight:700}.history-start{color:#666;font-style:italic;font-family:Segoe UI,sans-serif;font-size:.8rem}.history-empty{cursor:default}
