*{box-sizing:border-box} :root{--bg:#101815;--panel:#18211d;--panel2:#202b25;--muted:#9aa89c;--text:#f1f2e9;--green:#c7f36b;--green-dark:#263b23;--line:#2a3730;--board-light:#d9dec3;--board-dark:#71856d} body{margin:0;background:var(--bg);color:var(--text);font-family:"IBM Plex Sans Arabic",sans-serif;min-height:100vh;background-image:radial-gradient(ellipse at 17% 4%,#27382b 0,transparent 34%),radial-gradient(ellipse at 88% 50%,#1a2922 0,transparent 32%)}button,input{font:inherit}button{cursor:pointer}.app-shell{max-width:1290px;margin:auto;padding:0 42px}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff12}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);font-size:17px;font-weight:700}.brand-mark{font-size:27px;color:var(--green);line-height:1}.brand-light{font-weight:400;color:#b0baaf}.top-note{color:#a8b6aa;font-size:12px;display:flex;align-items:center;gap:8px}.status-dot,.move-count-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 12px #c7f36b7a}.help-button{background:none;border:1px solid #3b493f;color:#d3dbd0;border-radius:8px;padding:9px 13px;font-size:12px}.help-button span{color:var(--green);margin-right:5px}.intro{padding:34px 0 25px;max-width:680px}.eyebrow{font-size:12px;font-weight:600;color:var(--green);display:flex;align-items:center;gap:8px}.intro h1{font-size:39px;line-height:1.28;margin:9px 0 8px;letter-spacing:-1.5px}.intro h1 em{font-style:normal;color:var(--green)}.intro p{margin:0;color:#a4b0a5;font-size:14px;max-width:560px;line-height:1.8}.workspace{display:grid;grid-template-columns:minmax(380px,1.25fr) minmax(310px,.82fr);gap:18px;align-items:stretch}.board-panel,.coach-panel{background:linear-gradient(145deg,#1b2520,#17201c);border:1px solid #ffffff0c;border-radius:15px;box-shadow:0 20px 60px #0002}.board-panel{padding:20px 24px 16px}.board-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-kicker{font-size:10px;color:#8d9b90;letter-spacing:.2px}.board-heading h2,.coach-top h2{font-size:16px;margin:2px 0 0;font-weight:600}.icon-button{width:33px;height:33px;border-radius:8px;border:1px solid #344138;color:#d4ddd2;background:#202b25;font-size:21px;line-height:1}.board-wrap{width:min(100%,550px);margin:auto;position:relative;padding:0 20px 18px 0}.chessboard{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,1fr);border:5px solid #27352c;border-radius:4px;overflow:hidden;box-shadow:0 15px 34px #0005;direction:ltr;touch-action:manipulation}.square{position:relative;display:grid;place-items:center;user-select:none;cursor:pointer;aspect-ratio:1}.square.light{background:var(--board-light)}.square.dark{background:var(--board-dark)}.square.selected{box-shadow:inset 0 0 0 4px #d6f765}.square.last-move:before{content:"";position:absolute;inset:0;background:#f4ef58;opacity:.24;pointer-events:none}.square.legal:after{content:"";position:absolute;width:24%;height:24%;border-radius:50%;background:#253a247d}.square.legal.capture:after{width:84%;height:84%;background:transparent;border:5px solid #263d2480}.piece{position:relative;z-index:1;font-family:"DejaVu Sans","Arial Unicode MS",serif;font-size:clamp(29px,5.5vw,55px);line-height:1;filter:drop-shadow(0 2px 1px #0004);transition:transform .12s}.square:hover .piece{transform:scale(1.07)}.piece.white-piece{color:#fffdf0;text-shadow:0 1px 2px #1c211d,1px 2px 3px #0007}.piece.black-piece{color:#232a24;text-shadow:0 1px 0 #ffffff52}.rank-labels{position:absolute;right:4px;top:3px;bottom:21px;width:14px;display:flex;flex-direction:column;justify-content:space-around;align-items:center;color:#b2beb2;font:10px Manrope,sans-serif}.file-labels{position:absolute;bottom:0;left:20px;right:20px;height:15px;display:flex;justify-content:space-around;color:#b2beb2;font:10px Manrope,sans-serif}.board-footer{display:flex;align-items:center;justify-content:space-between;padding:9px 4px 10px}.player-chip{display:flex;align-items:center;gap:8px}.avatar{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;font-size:22px}.white-avatar{background:#e1e6d2;color:#596558}.dark-avatar{background:#34433a;color:#c8d0bc}.player-chip strong,.player-chip small{display:block}.player-chip strong{font-size:12px}.player-chip small{font-size:10px;color:#829086;margin-top:1px}.move-count{font:10px Manrope,sans-serif;color:#a2aea4;display:flex;align-items:center;gap:7px}.move-count-dot{width:5px;height:5px;box-shadow:none}.board-actions{display:flex;gap:7px;border-top:1px solid #ffffff0c;padding-top:12px}.secondary-button{border:1px solid #344138;border-radius:7px;background:#202a24;color:#c1ccc1;padding:7px 10px;font-size:11px;transition:.15s}.secondary-button:hover,.icon-button:hover{border-color:#758b70;color:white}.secondary-button span{color:var(--green);font-size:14px;margin-left:4px}.fen-box{border-top:1px solid #ffffff0c;margin-top:12px;padding-top:12px}.fen-box label{display:block;font-size:11px;margin-bottom:6px}.fen-row{display:flex;gap:6px}.fen-row input{min-width:0;flex:1;background:#111a15;border:1px solid #344138;border-radius:6px;color:#e4e9dd;padding:8px;font:10px Manrope,sans-serif}.fen-row button{border:0;border-radius:6px;background:var(--green);color:#172018;font-size:11px;font-weight:700;padding:0 12px}.fen-box small{display:block;color:#86948a;font-size:10px;margin-top:6px}.coach-panel{padding:21px 20px;display:flex;flex-direction:column;min-height:520px}.coach-top{display:flex;align-items:center;gap:10px}.coach-icon{width:36px;height:36px;display:grid;place-items:center;border:1px solid #526b47;background:#253723;color:var(--green);border-radius:10px;font-size:19px}.coach-intro{font-size:12px;color:#99a79b;line-height:1.7;margin:11px 0 14px}.analyze-button{height:43px;border:0;border-radius:8px;background:var(--green);color:#182019;display:flex;align-items:center;justify-content:center;gap:9px;font-weight:700;font-size:13px;box-shadow:0 5px 18px #c7f36b17;transition:.15s}.analyze-button:hover{background:#d6ff8a;transform:translateY(-1px)}.analyze-button:disabled{opacity:.65;cursor:wait}.sparkle{font-size:15px}.button-arrow{position:absolute;margin-right:220px;font-size:16px}.analysis-state{display:flex;align-items:center;gap:7px;font-size:10px;color:#849186;margin:12px 1px}.state-line{width:5px;height:5px;border-radius:50%;background:#859184}.analysis-state.loading .state-line{background:var(--green);box-shadow:0 0 9px var(--green);animation:pulse .7s infinite alternate}.analysis-state.error{color:#edb18e}.analysis-state.error .state-line{background:#ee9877}@keyframes pulse{to{opacity:.25}}.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px 20px 18px}.empty-art{position:relative;width:82px;height:74px;display:grid;place-items:center;border:1px solid #344238;background:radial-gradient(circle,#2b3b2a,#202c25 66%);border-radius:20px;margin:0 0 12px}.empty-art span{font-size:43px;color:#c9d5c1;text-shadow:0 5px 8px #0008;transform:translateY(-2px)}.empty-art i{position:absolute;top:6px;left:14px;font-size:13px;color:var(--green);font-style:normal}.empty-state strong{font-size:13px}.empty-state p{font-size:11px;color:#89978c;line-height:1.7;max-width:225px;margin:5px 0}.engine-note{border-top:1px solid #ffffff0c;padding-top:11px;color:#78877d;font-size:9px;display:flex;gap:6px;align-items:flex-start;line-height:1.5}.engine-note span{color:var(--green)}.hidden{display:none!important}.results{display:block}.best-move-card{border:1px solid #485c3d;background:linear-gradient(135deg,#263824,#202e24);border-radius:10px;padding:12px 13px}.result-heading{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#a8b7a2}.eval-pill{font:700 10px Manrope,sans-serif;color:#d8f89c;background:#374b2d;border-radius:5px;padding:3px 7px}.best-move-main{display:flex;align-items:center;gap:8px;margin-top:7px}.move-icon{font-size:22px;color:var(--green)}.best-move-main strong{font:800 22px Manrope,sans-serif;color:#f0f3df}.best-label{margin-right:auto;font-size:9px;color:#c8de9a;background:#374a31;padding:4px 7px;border-radius:20px}.best-move-card p{font-size:11px;color:#b2c0ae;margin:4px 0 0;line-height:1.6}.other-lines-heading{display:flex;justify-content:space-between;align-items:center;margin:15px 1px 7px}.other-lines-heading strong{font-size:11px}.other-lines-heading span{font-size:9px;color:#87948a}.candidate-list{display:grid;gap:5px}.candidate{display:grid;grid-template-columns:22px 55px 1fr auto;align-items:center;gap:6px;background:#202a24;border:1px solid #ffffff0b;border-radius:7px;padding:7px 9px}.candidate-index{color:#89998c;font:10px Manrope,sans-serif}.candidate-san{font:700 12px Manrope,sans-serif}.candidate-line{color:#8e9b91;font:9px Manrope,sans-serif;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.candidate-eval{font:10px Manrope,sans-serif;color:#b6c89e}.lesson-card{display:flex;gap:9px;border-top:1px solid #ffffff0b;margin-top:11px;padding:11px 2px 0}.lesson-icon{color:var(--green);font-size:16px}.lesson-card strong{font-size:10px;color:#dce6d8}.lesson-card p{margin:3px 0 0;font-size:10px;color:#8e9d91;line-height:1.6}.learn-strip{margin:17px 0 25px;border:1px solid #ffffff0d;border-radius:10px;background:#1b251f;display:flex;align-items:center;gap:12px;padding:14px 16px}.learn-badge{width:28px;height:28px;display:grid;place-items:center;background:#293d27;color:var(--green);border-radius:8px}.learn-strip strong{font-size:12px}.learn-strip p{font-size:10px;color:#8d9a90;margin:3px 0 0}.learn-arrow{margin-right:auto;color:#71816e;font-size:16px}footer{height:50px;border-top:1px solid #ffffff10;color:#77857a;display:flex;align-items:center;gap:21px;font-size:10px}footer span:first-child{color:#b3beb3}footer .footer-piece{margin-right:auto;color:var(--green);font-size:18px}dialog{width:min(440px,calc(100% - 30px));border:1px solid #465344;border-radius:14px;background:#1a241e;color:var(--text);padding:23px;box-shadow:0 20px 80px #0009}dialog::backdrop{background:#050a07c9;backdrop-filter:blur(3px)}dialog h2{font-size:22px;margin:8px 0}dialog ol{padding-right:21px;color:#c0cbc0;font-size:13px;line-height:1.9}dialog p{font-size:11px;color:#92a094;line-height:1.7}.dialog-close{float:left;border:0;background:none;color:#a9b5aa;font-size:24px}.dialog-done{border:0;border-radius:7px;background:var(--green);font-weight:700;padding:10px 14px;color:#172018}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);background:#35432f;color:#f0f5e5;border:1px solid #60734f;padding:10px 16px;border-radius:8px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:9}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:820px){.app-shell{padding:0 20px}.workspace{grid-template-columns:minmax(0,1fr);max-width:600px;margin:auto}.intro{margin:auto;max-width:600px}.coach-panel{min-height:400px}.board-panel{padding:17px}.board-wrap{max-width:540px}.intro h1{font-size:34px}}@media(max-width:520px){.app-shell{padding:0 13px}.topbar{height:63px}.top-note{display:none}.brand{font-size:15px}.help-button{padding:7px 9px;font-size:10px}.intro{padding:25px 0 18px}.intro h1{font-size:31px}.intro p{font-size:12px}.board-panel{padding:14px 11px 12px}.board-wrap{padding-right:16px;padding-bottom:15px}.rank-labels{right:0;bottom:18px;width:12px;font-size:8px}.file-labels{left:16px;right:16px;font-size:8px}.piece{font-size:clamp(27px,9vw,44px)}.board-actions{gap:5px}.secondary-button{padding:7px 6px;font-size:10px}.coach-panel{padding:17px 14px}.learn-strip{padding:12px 10px;gap:9px}.learn-strip strong{font-size:10px}.learn-strip p{font-size:9px}.learn-arrow{display:none}footer{gap:10px;font-size:9px}}
/* Board arrows and Elo calibrated hint density */
.chessboard{position:relative}
.move-arrow-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none;overflow:visible}
.move-arrow{stroke:#d8ff71;stroke-width:2.6;stroke-linecap:round;filter:drop-shadow(0 1px 3px #172016);opacity:.95}
.square.hint-from{box-shadow:inset 0 0 0 4px #d8ff71!important}
.square.hint-to{box-shadow:inset 0 0 0 5px #d8ff71!important}
.chessboard.hint-intermediate .move-arrow{stroke-width:2.1;opacity:.8}
.chessboard.hint-advanced .move-arrow{stroke-width:1.5;opacity:.55}
.rating-control{background:#202a24;border:1px solid #ffffff0b;border-radius:8px;padding:9px 11px;margin:0 0 12px}
.rating-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#c2cec1}
.rating-label output{font:700 11px Manrope,sans-serif;color:var(--green)}
.rating-control input{width:100%;height:4px;accent-color:var(--green);margin:10px 0 2px;cursor:pointer}
.rating-scale{display:flex;justify-content:space-between;color:#77877a;font-size:9px}
.rating-control small{display:block;color:#95a58f;font-size:9px;margin-top:6px}
/* Keep the move recommendation on the board; retain the coach's learning cue. */
.other-lines-heading,.candidate-list{display:none}
.color-control{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #ffffff0b;border-radius:8px;padding:7px 10px;margin:-4px 0 12px;background:#1c2620;color:#b9c6ba;font-size:10px}
.color-control select{background:#2a382c;border:1px solid #435440;border-radius:6px;color:#e8efd9;padding:5px 9px;font:inherit;min-width:92px}
.move-arrow-overlay{overflow:visible}
.move-arrow-shadow{stroke:#152118;stroke-width:6;stroke-linecap:round;opacity:.78}
.move-arrow{stroke:#e3ff7a;stroke-width:3.5;stroke-linecap:round;filter:drop-shadow(0 0 5px #d8ff71b3);opacity:1;stroke-dasharray:60;stroke-dashoffset:60;animation:arrow-draw .35s ease-out forwards}
.arrow-destination{fill:#d8ff71;fill-opacity:.23;stroke:#f2ffd0;stroke-width:1.6;filter:drop-shadow(0 0 6px #d8ff71)}
.arrow-start{fill:#f3ffe1;stroke:#748d45;stroke-width:1.4}
.arrow-caption{font:700 4px Manrope,sans-serif;fill:#162018;paint-order:stroke;stroke:#eaffbc;stroke-width:1.3;stroke-linejoin:round}
@keyframes arrow-draw{to{stroke-dashoffset:0}}
.chessboard.hint-beginner .move-arrow{stroke-width:4.2}
.chessboard.hint-advanced .move-arrow{stroke-width:2.8;opacity:.84}
.move-arrow-shadow{stroke-width:2.3;opacity:.7}
.move-arrow{stroke-width:1.35;filter:drop-shadow(0 0 1.6px #d8ff7170);opacity:.95}
.chessboard.hint-beginner .move-arrow{stroke-width:1.55}
.chessboard.hint-intermediate .move-arrow{stroke-width:1.3}
.chessboard.hint-advanced .move-arrow{stroke-width:1.05;opacity:.86}
.arrow-destination{stroke-width:.75;fill-opacity:.18;filter:drop-shadow(0 0 2px #d8ff71)}
.arrow-start{stroke-width:.65}
.arrow-caption{font:700 2.6px Manrope,sans-serif;stroke-width:.65}
.training-options{display:grid;gap:8px;margin:-4px 0 12px;padding:9px 10px;background:#1c2620;border:1px solid #ffffff0b;border-radius:8px}
.auto-play-toggle{display:flex;align-items:center;gap:9px;cursor:pointer}
.auto-play-toggle input{accent-color:var(--green);width:15px;height:15px;margin:0}
.auto-play-toggle strong,.auto-play-toggle small{display:block}
.auto-play-toggle strong{color:#d7e1d5;font-size:10px}
.auto-play-toggle small{color:#869589;font-size:9px;margin-top:2px}
.mode-select-label{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #ffffff0e;padding-top:8px;font-size:10px;color:#aab8aa}
.mode-select-label select{max-width:165px;background:#2a382c;border:1px solid #435440;border-radius:6px;color:#e8efd9;padding:5px 8px;font:inherit}
.self-play-toggle{border-top:1px solid #ffffff0e;padding-top:8px}
.chessboard.self-play-hint .move-arrow{stroke:#c58cff;filter:drop-shadow(0 0 2px #b777ff88)}
.chessboard.self-play-hint .arrow-destination{fill:#c58cff;stroke:#efdcff;filter:drop-shadow(0 0 2px #b777ff)}
.chessboard.self-play-hint .arrow-start{fill:#f5edff;stroke:#9257c8}
.chessboard.self-play-hint .arrow-caption{fill:#29163a;stroke:#ead8ff}
.chess-import{border-top:1px solid #ffffff10;margin-top:12px;padding-top:11px}
.import-heading{display:flex;align-items:center;gap:8px;margin-bottom:8px}.import-heading>span{width:25px;height:25px;border-radius:7px;background:#293b30;color:var(--green);display:grid;place-items:center}.import-heading strong,.import-heading small{display:block}.import-heading strong{font-size:11px}.import-heading small{font-size:9px;color:#839186;margin-top:1px}
.import-row{display:flex;gap:6px}.import-row input,.chess-import select{background:#111a15;border:1px solid #344138;border-radius:6px;color:#e4e9dd;padding:8px;font:10px "IBM Plex Sans Arabic",sans-serif;min-width:0;flex:1}.import-row button,.review-controls button{border:0;border-radius:6px;background:#c7f36b;color:#172018;font-size:10px;font-weight:700;padding:0 10px}.chess-import select{margin-top:7px;width:100%}.import-message{display:block;color:#839186;font-size:9px;margin-top:6px;line-height:1.5}.review-controls{display:flex;align-items:center;justify-content:space-between;margin-top:7px}.review-controls button{padding:6px 9px}.review-controls span{font:10px Manrope,sans-serif;color:#aebbaa}
