.ff-chess-arena{max-width:980px;margin:30px auto;padding:24px;background:#fff;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.08);font-family:Arial,sans-serif;color:#263247}
.ffca-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.ffca-kicker{font-size:12px;letter-spacing:1.5px;font-weight:700;opacity:.7}.ffca-header h2{margin:5px 0;font-size:30px}.ffca-header p{margin:0;color:#718096}.ffca-engine-status{font-size:13px;background:#f4f6f8;padding:9px 12px;border-radius:20px;white-space:nowrap}
.ffca-modebar{display:flex;gap:8px;margin:22px 0;flex-wrap:wrap}.ffca-mode,.ffca-btn{border:1px solid #d5dbe3;background:#fff;color:#394150;border-radius:9px;padding:10px 14px;font-weight:600;cursor:pointer}.ffca-mode.is-active{background:#253247;color:#fff;border-color:#253247}
.ffca-layout{display:grid;grid-template-columns:minmax(320px,620px) 1fr;gap:22px;align-items:start}.ffca-board-wrap{width:100%;max-width:620px;margin:auto}.ffca-player-label{text-align:center;font-weight:700;margin:8px}.ffca-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;aspect-ratio:1/1;height:auto;min-height:0;border-radius:8px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,.12)}.ffca-square{border:0;display:flex;align-items:center;justify-content:center;padding:0;margin:0;min-width:0;min-height:0;width:100%;height:100%;cursor:pointer;position:relative;box-sizing:border-box}.ffca-square.light{background:#f0d9b5}.ffca-square.dark{background:#b58863}.ffca-square.selected{box-shadow:inset 0 0 0 4px rgba(255,215,0,.85)}.ffca-square.engine-highlight{box-shadow:inset 0 0 0 4px rgba(80,180,90,.65)}.ffca-piece{font-family:"Arial Unicode MS","Noto Sans Symbols 2",sans-serif;font-size:clamp(30px,6vw,58px);line-height:1;text-shadow:0 2px 2px rgba(0,0,0,.18)}.ffca-piece.w{color:#fff;text-shadow:0 2px 2px #333}.ffca-piece.b{color:#111}
.ffca-side{display:flex;flex-direction:column;gap:14px}.ffca-card{background:#f7f9fb;border:1px solid #e1e6ec;border-radius:12px;padding:14px}.ffca-turn{font-size:18px;font-weight:700;margin-bottom:14px}.ffca-eval-row{display:flex;justify-content:space-between;font-size:13px;color:#687385}.ffca-evalbar{height:8px;background:#222;border-radius:5px;overflow:hidden;margin:8px 0 12px}.ffca-evalbar span{display:block;width:50%;height:100%;background:#eee}.ffca-best{font-size:13px}.ffca-card-title{font-weight:700;margin-bottom:10px}.ffca-moves{max-height:190px;overflow:auto;background:#fff;border:1px solid #e1e6ec;border-radius:8px}.ffca-move-row{display:grid;grid-template-columns:34px 1fr 1fr;padding:8px 10px;border-bottom:1px solid #edf0f3;font-size:14px}.ffca-controls{display:flex;gap:8px;flex-wrap:wrap}.ffca-pgn{width:100%;min-height:100px;resize:vertical;box-sizing:border-box;border:1px solid #d9dee5;border-radius:8px;padding:9px;margin-bottom:8px}.ffca-note{margin-top:18px;padding:12px 14px;background:#f7f8fa;border-radius:9px;font-size:13px;color:#667085}
@media(max-width:800px){.ffca-layout{grid-template-columns:1fr}.ffca-board-wrap{max-width:100%}.ffca-header{flex-direction:column}.ffca-side{width:100%}}

.ff-chess-arena{--light:#f0d9b5;--dark:#b58863}.ff-chess-arena[data-theme=green]{--light:#eeeed2;--dark:#769656}.ff-chess-arena[data-theme=blue]{--light:#d9e9f5;--dark:#5f8fb3}.ff-chess-arena[data-theme=purple]{--light:#eee3f4;--dark:#8b6aa8}.ff-chess-arena[data-theme=dark]{--light:#d2b48c;--dark:#6b4226}.ffca-square.light{background:var(--light)}.ffca-square.dark{background:var(--dark)}.ffca-settings{display:flex;gap:12px;flex-wrap:wrap;align-items:end;background:#f7f9fb;border:1px solid #e1e6ec;border-radius:12px;padding:14px;margin:-8px 0 20px}.ffca-settings>label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;min-width:160px}.ffca-settings select,.ffca-settings input{border:1px solid #d5dbe3;border-radius:8px;background:#fff;padding:9px;font-weight:400}.ffca-settings-toggle{margin-left:auto}.ffca-custom-time{display:flex;gap:8px;align-items:end}.ffca-custom-time label{display:flex;flex-direction:column;gap:6px;font-size:12px}.ffca-clock{display:flex;justify-content:space-between;align-items:center;background:#202735;color:#fff;border-radius:9px;padding:8px 12px;margin:7px 0;font-size:13px}.ffca-clock strong{font-size:21px;font-variant-numeric:tabular-nums}.ffca-clock.active{outline:3px solid #8bbf5a}.ff-chess-arena[data-piece-style=bold] .ffca-piece{font-weight:900;font-size:1.08em;text-shadow:0 2px 2px rgba(0,0,0,.25)}.ff-chess-arena[data-piece-style=elegant] .ffca-piece{font-family:Georgia,"Times New Roman",serif;text-shadow:0 1px 1px rgba(0,0,0,.18)}.ff-chess-arena[data-piece-style=minimal] .ffca-piece{font-family:"Times New Roman",serif;text-shadow:none}@media(max-width:800px){.ffca-settings-toggle{margin-left:0}.ffca-settings{align-items:stretch}.ffca-custom-time{flex-wrap:wrap}}

.ffca-computer-settings{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.ffca-computer-settings label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;min-width:180px}.ffca-computer-settings select,.ffca-computer-settings input{border:1px solid #d5dbe3;border-radius:8px;background:#fff;padding:9px}.ffca-profile-history{display:grid;grid-template-columns:1fr 1.4fr;gap:14px;margin-top:18px}.ffca-profile-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.ffca-profile-grid div{background:#fff;border:1px solid #e1e6ec;border-radius:9px;padding:10px}.ffca-profile-grid span{display:block;font-size:11px;color:#718096}.ffca-profile-grid strong{display:block;margin-top:3px}.ffca-history-head{display:flex;justify-content:space-between;align-items:center}.ffca-history-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #e5e7eb}.ffca-history-row strong{margin-right:6px}.ffca-history-row span{font-size:13px}.ffca-history-row small{display:block;color:#718096;font-size:11px;margin-top:2px}.ffca-history-empty{color:#718096;font-size:13px;padding:8px 0}.ffca-custom-rating{display:flex!important}@media(max-width:800px){.ffca-profile-history{grid-template-columns:1fr}.ffca-profile-grid{grid-template-columns:repeat(2,1fr)}}
