@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{color-scheme:dark;--bg:#171b19;--panel:#222824;--panel-raised:#2c342e;--line:#374038;--text:#f3f5ed;--muted:#a5afa6;--accent:#d6ef85;--accent-ink:#26341a;--board-light:#e3e8d2;--board-dark:#72947a;--error:#f0a28f;--radius:16px;font-family:'DM Sans',system-ui,sans-serif;font-size:16px;color:var(--text);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button{color:inherit}a{color:inherit}h1,h2,h3,p{margin:0}h1,h2,h3,.brand{font-family:Manrope,system-ui,sans-serif}h1{font-size:clamp(1.55rem,3vw,2.1rem);font-weight:750;letter-spacing:-1.2px;line-height:1.2}h2{font-size:1.7rem;letter-spacing:-.9px;line-height:1.2}p{line-height:1.55}.site-header{height:92px;max-width:1360px;margin:auto;padding:0 54px;display:flex;align-items:center;gap:20px;border-bottom:1px solid #303630}.brand{display:flex;align-items:center;font-size:1.75rem;font-weight:800;letter-spacing:-1.5px;text-decoration:none}.brand-mark{width:37px;height:39px;background:var(--accent);border-radius:10px;display:grid;place-items:center;transform:rotate(-5deg);margin-right:10px}.brand-mark img{width:34px;transform:rotate(5deg)}.brand-period{color:var(--accent)}.header-label{font-size:.75rem;letter-spacing:2px;color:var(--muted);margin-left:22px}.icon-button{display:grid;place-items:center;min-width:40px;min-height:40px;border:1px solid var(--line);background:transparent;border-radius:50%;font-size:1rem}.site-header>.icon-button{margin-left:auto;font-weight:700;color:var(--muted)}.workspace{max-width:1160px;margin:0 auto;padding:32px 36px 20px;display:grid;grid-template-columns:minmax(0,600px) minmax(310px,380px);column-gap:44px}.page-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.eyebrow{color:var(--accent);font-size:.7rem;letter-spacing:2px;font-weight:700;margin-bottom:9px;display:block}.small-tag{font-size:.8rem;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:8px 13px}.board-section{min-width:0}.player-bar{height:51px;display:flex;align-items:center;gap:11px;margin-bottom:12px}.avatar{flex:none;width:42px;height:42px;border-radius:10px;display:grid;place-items:center}.opponent-avatar{background:#394238;color:var(--accent);font-family:Manrope;font-weight:800;font-size:1.3rem}.player-bar strong{font-size:.95rem;font-weight:650;display:block}.player-bar>div>span{display:block;font-size:.8rem;color:var(--muted);margin-top:3px}.player-colour{margin-left:auto;font-size:.7rem;letter-spacing:1.5px;color:var(--muted)}.board-wrap{position:relative;border-radius:5px;overflow:hidden;box-shadow:0 12px 32px #0002;aspect-ratio:1}.board{display:grid;grid-template-columns:repeat(8,1fr);width:100%;height:100%;user-select:none;-webkit-user-select:none;touch-action:manipulation}.square{position:relative;aspect-ratio:1;border:0;border-radius:0;background:var(--board-light);padding:0;display:grid;place-items:center;touch-action:manipulation}.square.dark{background:var(--board-dark)}.square img{width:88%;height:88%;pointer-events:none;filter:drop-shadow(0 2px 1px #0002);z-index:2}.square:hover{box-shadow:inset 0 0 0 3px #34493c33}.square.last{background:#c2d189}.square.dark.last{background:#a1ba68}.square.hint{box-shadow:inset 0 0 0 4px #e4f687}.square.selected{background:#d6e88c;box-shadow:inset 0 0 0 4px #50642b}.square.wrong{background:#d89178}.square.check{background:#cb8171}.square:focus-visible{outline:3px solid #26341a;outline-offset:-4px;z-index:5}.coordinate{position:absolute;font-size:clamp(.6rem,1vw,.75rem);font-weight:700;color:#496451;z-index:3;pointer-events:none}.dark .coordinate{color:#f2f4e9}.rank{top:4px;left:4px}.file{bottom:2px;right:5px}.legal-dot{position:absolute;width:24%;height:24%;border-radius:50%;background:#263c3b40;pointer-events:none;z-index:4}.legal-dot.capture{width:90%;height:90%;background:none;border:5px solid #263c3b55}.board-arrow{position:absolute;inset:0;pointer-events:none;color:#e5f77d;opacity:.9;width:100%;height:100%}#hint-arrow{stroke:currentColor;stroke-width:15;stroke-linecap:round;display:none}.bottom-bar{margin:12px 0 0}.your-avatar{background:#333c33}.your-avatar img{width:38px}.flip-button{margin-left:auto;border:0;font-size:1.5rem;color:var(--muted)}.board-note{text-align:center;color:#8c978e;font-size:.8rem;margin:14px 0;min-height:20px}.tiny-book{color:var(--accent);margin-right:7px}.training-panel{margin-top:0;background:var(--panel);border:1px solid #343d35;border-radius:var(--radius);align-self:start;overflow:hidden}.training-panel #panel-content{padding:28px}.panel-heading{padding-bottom:25px}.panel-heading .eyebrow{font-size:.65rem;letter-spacing:1.3px;margin-bottom:13px}.panel-heading p{font-size:.9rem;color:var(--muted);margin-top:9px}.field-label,legend{font-size:.875rem;font-weight:600;margin-bottom:10px;display:block}select{appearance:none;background:var(--panel-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b8c4b7' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 15px center;color:var(--text);border:1px solid #424c40;border-radius:9px;width:100%;padding:15px 38px 15px 14px;font-weight:650;font-size:1rem;cursor:pointer}.opening-description{padding:15px 0 21px}.opening-tag{display:inline-block;font-size:.65rem;letter-spacing:1.3px;font-weight:700;color:var(--accent);margin-bottom:7px}.opening-description p{font-size:.875rem;color:#bbc4b9;line-height:1.5}.variation-name{display:block;font-size:.75rem;color:#8e9c91;margin-top:9px}fieldset{border:0;margin:0 0 21px;padding:0;min-width:0}legend{padding:0}.segmented{display:flex;background:#1a201c;border:1px solid #343e34;padding:4px;border-radius:10px;gap:4px}.segmented button{flex:1;min-height:44px;border:1px solid transparent;background:transparent;border-radius:7px;color:#aab6a9;font-size:.875rem;font-weight:550;padding:6px 5px;white-space:nowrap;display:flex;gap:7px;justify-content:center;align-items:center}.segmented button[aria-pressed=true]{background:#3a4835;color:var(--accent);border-color:#627349}.segmented button:hover{background:#2d382c}.colour-dot{display:inline-block;width:12px;height:12px;border:1px solid #b6bdb2;border-radius:50%}.colour-dot.white{background:#f0f1e6}.colour-dot.black{background:#151915}.field-help{font-size:.75rem;color:#9daa9d;margin-top:9px;line-height:1.5}.depths button{font-size:1.1rem;gap:5px}.depths button span{font-size:.75rem;font-weight:400}.primary-button{border:0;background:var(--accent);color:var(--accent-ink);border-radius:10px;min-height:54px;width:100%;font-size:1rem;font-weight:750;display:flex;align-items:center;justify-content:center;gap:10px;padding:13px 20px;box-shadow:0 4px 0 #8fba4a;transition:background .15s,transform .15s}.primary-button:hover{background:#e0f6a3}.primary-button:active{transform:translateY(2px);box-shadow:0 2px 0 #8fba4a}.primary-button>span{margin-left:auto;font-size:1.35rem}.lesson-steps{display:flex;align-items:center;gap:9px;justify-content:center;margin-top:25px;color:#a1ada0;font-size:.7rem;white-space:nowrap}.lesson-steps b{font-weight:500;color:var(--accent);margin-right:3px;font-size:.65rem}.step-connector{height:1px;width:15px;background:#4b5947}.workspace-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;color:#879488;font-size:.75rem;padding-top:17px;margin-top:12px;border-top:1px solid #303830}.workspace-footer button{background:none;border:none;color:#a8b3a6;font-size:.75rem;padding:12px 0}dialog{max-width:480px;width:calc(100% - 28px);border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--text);padding:32px;max-height:85dvh;overflow:auto}dialog::backdrop{background:#050a08bb;backdrop-filter:blur(5px)}.dialog-close{float:right;margin:-16px -16px 8px 8px}.dialog-note{font-size:.875rem;color:var(--muted);background:#1a211b;border-radius:10px;padding:15px;margin:20px 0}dialog h2{font-size:1.6rem}dialog ol{padding-left:22px;font-size:.95rem;line-height:1.65}dialog li{padding:8px 0}dialog strong{color:var(--accent)}details{font-size:.8rem;color:var(--muted);line-height:1.6}summary{cursor:pointer;padding:10px 0}details p{margin:10px 0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(min-width:1500px){.workspace{padding-top:48px}}@media(max-width:1000px){.workspace{gap:24px;padding-left:24px;padding-right:24px;grid-template-columns:minmax(0,1fr) 330px}.training-panel #panel-content{padding:23px}.site-header{padding:0 30px}.page-heading{margin-bottom:0}.panel-heading .eyebrow{font-size:.6rem;letter-spacing:1px}.lesson-steps{gap:5px}}
@media(max-width:740px){.site-header{height:72px;padding:0 20px}.brand{font-size:1.5rem}.brand-mark{width:32px;height:34px}.brand-mark img{width:30px}.header-label{display:none}.workspace{display:flex;flex-direction:column;gap:0;padding:23px 16px 20px;max-width:550px}.page-heading{order:0;margin-bottom:22px;gap:10px}.eyebrow{font-size:.65rem;letter-spacing:1.5px}h1{font-size:1.6rem;letter-spacing:-.8px}.small-tag{font-size:.7rem;padding:7px 9px;white-space:nowrap}.training-panel{order:1;width:100%;margin-bottom:22px}.board-section{order:2}.workspace-footer{order:3;width:100%;margin-top:6px}.training-panel #panel-content{padding:22px}.panel-heading{display:none}.opening-description{padding-bottom:18px}.opening-description p{font-size:.875rem}.opening-description .variation-name{margin-top:6px}fieldset{margin-bottom:19px}.lesson-steps{font-size:.75rem}.workspace-footer>span{max-width:52%;line-height:1.5}.board-note{margin:12px 0}.player-bar{margin-bottom:9px}.bottom-bar{margin-top:10px}.coordinate{font-size:.7rem}.workspace.is-playing .board-section{order:1}.workspace.is-playing .training-panel{order:2;margin-top:14px;margin-bottom:12px}.workspace.is-playing .page-heading{margin-bottom:13px}.workspace.is-playing .board-note{display:none}.workspace.is-playing .player-bar{height:39px}.workspace.is-playing .player-bar>div>span{font-size:.75rem}.workspace.is-playing .avatar{width:35px;height:35px}.workspace.is-playing .your-avatar img{width:31px}.workspace.is-playing .training-panel #panel-content{padding:20px}.workspace.is-playing .bottom-bar{margin-top:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}@media(min-width:741px) and (max-height:850px){.site-header{height:72px}.workspace{padding-top:23px;max-width:1040px;grid-template-columns:minmax(0,510px) minmax(320px,360px);gap:26px}.training-panel #panel-content{padding:23px}.panel-heading{padding-bottom:20px}.opening-description{padding-bottom:17px}fieldset{margin-bottom:18px}}
.mobile-cue{display:none}.lesson-progress{display:flex;align-items:center;justify-content:space-between;font-size:.7rem;letter-spacing:1px;color:var(--accent);gap:10px}.lesson-progress strong{font-size:1.05rem;color:var(--text);letter-spacing:0;white-space:nowrap}.lesson-progress strong span{font-size:.8rem;color:var(--muted);font-weight:400}progress{display:block;width:100%;height:5px;border:0;appearance:none;background:#3d493b;border-radius:8px;overflow:hidden;margin-top:13px;accent-color:var(--accent)}progress::-webkit-progress-bar{background:#3d493b}progress::-webkit-progress-value{background:var(--accent);border-radius:8px;transition:width .25s}progress::-moz-progress-bar{background:var(--accent)}.status-card{padding:25px 0 0}.status-card h2{font-size:1.6rem;line-height:1.25}.status-card>p{font-size:.95rem;color:#b7c2b5;margin-top:13px;line-height:1.6}.status-card .primary-button{margin-top:24px;margin-bottom:16px}.secondary-button{border:1px solid #475541;background:#303c2e;color:#e4eadd;border-radius:9px;min-height:47px;padding:10px 15px;font-size:.875rem;font-weight:550;width:100%;margin-top:10px}.secondary-button:hover{background:#3c4b35}.text-button{background:none;border:0;color:#a8b5a5;min-height:44px;padding:10px 8px;font-size:.875rem;display:block;margin:7px auto 0}.text-button:hover{color:var(--accent)}.status-card>.field-help{font-size:.75rem;color:#92a08f;margin-top:12px}.turn-indicator{color:#a7b6a2;font-size:.7rem;font-weight:600;letter-spacing:1.2px;display:block;margin-bottom:15px}.turn-indicator.yours{color:var(--accent)}.next-move{display:flex;align-items:center;gap:13px;margin-top:15px;margin-bottom:17px}.next-move>img{width:63px;height:63px;background:#394634;border-radius:12px;padding:3px}.next-move>div>span{color:var(--muted);font-size:.8rem}.next-move h2{font-size:2.6rem;letter-spacing:-1px;line-height:1.2}.move-instruction{font-size:1rem;font-weight:600}.status-card>.move-explanation{font-size:.95rem;color:#c3ccbe;line-height:1.65;margin-top:10px}.status-card>.tap-instruction{color:#8e9e8b;font-size:.75rem;margin-top:13px}.status-card>.inline-notice{font-size:.85rem;color:#f1c694;border-left:2px solid #c69d67;padding:8px 12px;background:#44382366;border-radius:0 5px 5px 0;margin-top:16px}.playing-card{min-height:211px;padding-bottom:22px}.move-history{border-top:1px solid #3a4636;padding-top:22px}.history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.history-heading h3{font-family:'DM Sans',sans-serif;font-size:.875rem;font-weight:600;white-space:nowrap}.history-heading>span{font-size:.7rem;color:#93a08e;text-align:right}.move-table-labels,.move-row{display:grid;grid-template-columns:35px 1fr 1fr;align-items:center}.move-table-labels{padding:0 9px 9px;color:#8d9d8a;font-size:.75rem}.move-list{max-height:187px;min-height:84px;overflow:auto;scrollbar-width:thin;scrollbar-color:#506047 transparent;border-radius:6px}.move-row{min-height:36px;font-size:.95rem;padding:2px 9px}.move-row:nth-child(odd){background:#1c241d}.move-row>span:first-child{font-size:.75rem;color:#8c9c86}.move-row .latest{color:var(--accent);font-weight:650}.empty-moves{font-size:.8rem;text-align:center;padding:27px 5px;color:#8f9d89}.session-actions{display:flex;align-items:center;gap:14px;margin-top:17px}.session-actions>.secondary-button{flex:1;width:auto;margin:0}.session-actions>.text-button{margin:0;min-width:45px}.result-symbol{display:grid;place-items:center;width:59px;height:59px;background:#3d512e;color:var(--accent);border-radius:50%;font-size:1.9rem;margin-bottom:21px}.status-card>.result-detail{font-size:.8rem;color:#9cac94;border-top:1px solid #3a4636;padding-top:16px;margin-top:20px}.failure>.eyebrow{color:var(--error);margin-bottom:15px}.failure h2{font-size:1.55rem}.failure>p strong{color:#f0beaa}.correction{padding:17px;background:#303e2d;border:1px solid #526542;border-radius:12px;margin-top:20px;display:flex;flex-direction:column;gap:5px}.correction>span:first-child{font-size:.75rem;color:#b0c1a3}.correction>strong{font-family:Manrope;font-size:2.2rem;color:var(--accent)}.correction>span:last-child{font-size:.9rem;color:#d6e1cc}.promotion-options{display:flex;gap:6px;margin-top:20px}.promotion-options button{width:25%;background:#4b6042;border:1px solid #72875c;border-radius:9px;min-height:64px}.promotion-options img{width:100%;max-width:60px}
@media(max-width:740px){.is-playing .mobile-cue{display:flex;flex-direction:column;gap:5px;background:#2b3628;border:1px solid #46553b;border-radius:9px;padding:12px 14px;margin-bottom:13px}.mobile-cue>span{font-size:.65rem;letter-spacing:1.3px;color:var(--accent)}.mobile-cue>strong{font-size:.95rem;font-weight:600}.mobile-cue small{font-size:.8rem;margin-left:8px;color:#bdccb4;font-weight:400}.playing-card{min-height:0;padding-top:20px}.status-card h2{font-size:1.5rem}.next-move{margin:13px 0}.next-move h2{font-size:2.3rem}.move-list{max-height:148px}.move-history{padding-top:17px}.status-card .result-symbol{margin-bottom:16px}.status-card>.primary-button{margin-top:21px}.lesson-progress{font-size:.65rem}.history-heading>span{font-size:.75rem}}
/* Let all eight files fit even on narrow screens or enlarged text. */
.board{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr))}.square{min-width:0;min-height:0;width:100%}
.opening-label{display:flex;justify-content:space-between;align-items:center;gap:10px}.opening-label>span{font-size:.75rem;font-weight:400;color:var(--muted)}.idea-hint{margin:0 0 22px;padding:16px;background:#283324;border:1px solid #48593b;border-radius:10px}.hint-button{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:0;border:0;background:transparent;font-weight:600;min-height:35px;font-size:.875rem;color:var(--accent)}.hint-button>span{font-size:.75rem;font-weight:400;color:#b4c4a6}.hint-button:disabled{color:var(--muted);opacity:1}.hint-caption{font-size:.75rem;color:var(--muted);display:block;margin-top:3px}.hint-label{font-size:.7rem;letter-spacing:1.1px;color:var(--accent);display:block;margin-bottom:7px}.idea-hint p{font-size:.95rem;color:#d7e3cd;line-height:1.6}.completion-dialog{width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:30px;border:1px solid #556347;box-shadow:0 30px 90px #0008}.completion-dialog::backdrop{background:#0b110fd1;backdrop-filter:blur(6px)}.completion-dialog .status-card{padding:0}.completion-dialog .dialog-close{margin:-12px -12px 8px 8px}.completion-dialog .primary-button{margin-bottom:13px}.completion-dialog h2{font-size:1.8rem}.modal-open{overflow:hidden}
@media(max-width:740px){.is-playing .mobile-cue>.idea-hint{margin:8px 0 0;padding:9px 0 0;border:none;border-top:1px solid #526344;background:none;border-radius:0}.mobile-cue .hint-button{min-height:40px}.mobile-cue .hint-caption{display:none}.mobile-cue .idea-hint p{font-size:.875rem}.mobile-cue .hint-label{font-size:.65rem}.completion-dialog{padding:25px;max-width:420px}.completion-dialog h2{font-size:1.6rem}.completion-dialog .status-card>p{font-size:.9rem}.completion-dialog .result-symbol{width:50px;height:50px;margin-bottom:17px}.completion-dialog .status-card>.field-help{font-size:.8rem}}
.custom-depth{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#1a201c;border:1px solid #424f3c;border-radius:10px;padding:9px 12px;margin-bottom:9px}.custom-depth label{font-size:.875rem;color:#cad5c3}.custom-depth input{width:84px;min-height:42px;border:1px solid #66784f;border-radius:7px;background:#34432c;color:var(--accent);font:700 1.25rem 'DM Sans',sans-serif;text-align:center;padding:5px 7px}.custom-depth input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.custom-depth input:invalid{border-color:var(--error)}.custom-depth+.depths button{min-height:37px;font-size:.875rem}
/* The opening profile shares the trainer's colours and works as a second mobile surface. */
[hidden]{display:none!important}.app-nav{display:flex;gap:5px;margin-left:auto;padding:4px;background:#101611;border:1px solid var(--line);border-radius:12px}.app-nav button{background:none;border:0;min-height:42px;padding:8px 20px;border-radius:8px;font-size:.875rem;font-weight:650;color:var(--muted)}.app-nav button[aria-current=page]{background:#35452b;color:var(--accent)}.site-header>.icon-button{margin-left:0;flex:none}.profile-view{max-width:1160px;margin:auto;padding:36px}.profile-heading{margin-bottom:25px}.profile-heading p{color:var(--muted);margin-top:12px;max-width:630px}.profile-view .eyebrow{font-size:.75rem}.profile-view h2{font-size:1.45rem;letter-spacing:-.5px}.profile-view h3{font-size:1.13rem;line-height:1.45;letter-spacing:-.2px}.import-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:25px}.import-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(140px,.55fr) minmax(180px,.6fr);gap:18px;align-items:end}.import-form label,.profile-filters label{display:block;font-size:.875rem;font-weight:600;margin-bottom:9px}.import-form input{width:100%;min-height:54px;padding:13px 15px;font:inherit;color:var(--text);background:#161e18;border:1px solid #5b6a54;border-radius:9px}.import-form input::placeholder{color:#82917f}.import-form select{min-height:54px}.import-form .primary-button{margin-bottom:4px}.import-form input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.profile-note{color:var(--muted);font-size:.875rem;line-height:1.55}.import-card>.profile-note{margin-top:17px}.import-message{padding:13px 15px;border:1px solid #4c633e;background:#273621;border-radius:8px;margin-top:18px;font-size:.95rem}.import-error{border-color:#8b5c49;background:#3b2b25;color:#f3c1ad}#import-loading progress{height:7px}#cancel-import{margin-right:0}.profile-empty{padding:55px 20px;text-align:center;max-width:570px;margin:auto}.profile-empty p{color:var(--muted);margin-top:14px}.profile-empty h3{font-size:1.2rem}.empty-book{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#2c3d24;color:var(--accent);font-size:2rem;margin:0 auto 22px}.profile-empty .profile-note{font-size:.875rem}.profile-method{padding-top:18px;margin-top:20px;border-top:1px solid var(--line);font-size:.875rem}.profile-method summary{font-size:.95rem;color:#c5d0bf}.results-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:34px}.results-header h2{overflow-wrap:anywhere}.results-header p{font-size:.875rem;color:var(--muted);margin-top:7px}.results-header .text-button{margin:0;flex:none}.import-summary{margin:12px 0 22px}.profile-filters{display:flex;align-items:end;gap:15px;flex-wrap:wrap}.profile-filters>div{min-width:175px}.profile-filters select{font-size:.875rem;min-height:47px;padding-top:12px;padding-bottom:12px}.profile-filters>p{margin-left:auto;margin-bottom:13px}.profile-stats{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:12px;margin-top:22px}.profile-stats>div{padding:22px 24px;background:#222b21;border:1px solid #3c4b36;border-radius:12px}.profile-stats span{display:block;font-size:.875rem;color:#b9c5b1}.profile-stats strong{font:750 2.3rem Manrope,system-ui,sans-serif;color:var(--accent);display:block;margin-top:8px}.profile-stats small{display:block;margin-top:6px;font-size:.875rem;color:var(--muted)}.profile-section{margin-top:36px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.section-description{color:var(--muted);font-size:.95rem;margin-bottom:20px}.evidence-tag{padding:7px 11px;border:1px solid var(--line);border-radius:20px;color:#b9c9ae;font-size:.8rem}.suggestion-grid,.pattern-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.suggestion-card{padding:23px;border-radius:14px;background:linear-gradient(145deg,#2f3d27,#232c21);border:1px solid #4a5b3d;display:flex;flex-direction:column;min-width:0}.suggestion-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.suggestion-number{font-family:Manrope;font-size:1.55rem;color:var(--accent);font-weight:700}.suggestion-top>span:last-child{font-size:.8rem;color:#bac8ae;text-align:right}.suggestion-card p{margin-top:13px;font-size:.95rem;color:#c3ceba;flex:1}.suggestion-card .secondary-button{font-size:.875rem;line-height:1.5}.evidence-button{margin:14px auto 0 0;padding-left:0;color:var(--accent);text-align:left}.profile-message{padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:12px;color:#bfcbb8;line-height:1.6}.opening-list{border:1px solid var(--line);border-radius:14px;overflow:hidden}.opening-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(170px,1fr) 65px;gap:20px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);background:var(--panel);padding:21px 24px;align-items:center}.opening-row:last-child{border-bottom:0}.opening-row:hover{background:#2b3529}.opening-row-name{display:flex;align-items:center;gap:12px;min-width:0}.opening-row-name>.colour-dot{flex:none;width:14px;height:14px}.opening-row-name strong{display:block;font-size:1rem;font-weight:650;line-height:1.4;overflow-wrap:anywhere}.opening-row-name div>span{display:block;color:var(--muted);font-size:.8rem;margin-top:5px}.record-bar{height:9px;display:flex;background:#3f493b;border-radius:10px;overflow:hidden;min-width:0}.record-win{background:var(--accent)}.record-draw{background:#9aa58d}.record-loss{background:#ce9378}.opening-row-record>span{display:block;color:var(--muted);font-size:.8rem;margin-top:8px}.opening-row-score{text-align:right}.opening-row-score strong{font-family:Manrope;font-size:1.2rem}.opening-row-score>span{display:block;font-size:.8rem;color:var(--muted);margin-top:4px}.pattern-card{display:flex;flex-direction:column;align-items:start;text-align:left;padding:23px;border:1px solid var(--line);border-radius:14px;background:#212a22;gap:12px;min-width:0}.pattern-card:hover{background:#2c382b}.pattern-card strong{font-family:Manrope;font-size:1.05rem;line-height:1.5}.pattern-card>span{font-size:.875rem;line-height:1.6;color:var(--muted)}.pattern-card>.eyebrow{font-size:.75rem;color:var(--accent);margin:0}.pattern-moves{font-variant-numeric:tabular-nums;flex:1;overflow-wrap:anywhere}.pattern-card b{color:var(--text)}.pattern-card>.pattern-link{color:var(--accent);margin-top:4px}.evidence-dialog{max-width:680px;width:calc(100% - 28px);padding:30px}.evidence-dialog h2{font-size:1.5rem;line-height:1.4;overflow-wrap:anywhere}.evidence-dialog h3{font-size:1.1rem;line-height:1.5}.evidence-dialog .eyebrow{font-size:.75rem}.evidence-intro{margin:12px 0 17px;color:#bdc9b6}.evidence-dialog .profile-note{margin:12px 0}.evidence-games{margin-top:22px;border-top:1px solid var(--line)}.evidence-game{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.evidence-game>div{min-width:0}.evidence-game strong{display:block;font-size:.95rem;overflow-wrap:anywhere}.evidence-game span{display:block;font-size:.875rem;color:var(--muted);line-height:1.5;margin-top:5px}.evidence-game>b{font-size:.875rem;padding:5px 8px;border:1px solid var(--line);border-radius:7px;flex:none}.outcome-win{color:var(--accent)}.outcome-loss{color:var(--error)}.outcome-draw{color:#b8c2af}.position-overview{display:grid;grid-template-columns:240px 1fr;gap:22px;margin:22px 0;align-items:center}.position-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:1;width:100%;border-radius:4px;overflow:hidden}.position-square{position:relative;aspect-ratio:1;display:grid;place-items:center;background:var(--board-light);min-width:0}.position-square.dark{background:var(--board-dark)}.position-square img{width:92%;height:92%}.position-square .coordinate{font-size:.6rem}.position-notation{font-size:.95rem;line-height:1.7;margin-top:10px;overflow-wrap:anywhere}.choice-list{margin:18px 0}.choice-row{padding:15px;border:1px solid var(--line);border-radius:9px;background:#1c251c;margin-top:10px}.choice-row>div{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.choice-row strong{font-family:Manrope;font-size:1.2rem}.choice-row span,.choice-row p{font-size:.875rem;color:#b0bfa7;line-height:1.6}.choice-row p{margin-top:8px}.profile-view [tabindex="-1"]:focus{outline:none}
@media(max-width:900px){.suggestion-grid,.pattern-grid{grid-template-columns:1fr}.suggestion-card{padding:22px}.suggestion-top{margin-bottom:12px}.suggestion-card .secondary-button{max-width:330px}.profile-view{padding:28px 24px}.import-form{grid-template-columns:minmax(0,1fr) minmax(0,.6fr)}.import-form .primary-button{grid-column:1/-1}.profile-stats>div{padding:20px}.profile-filters>p{margin-left:0;flex-basis:100%;margin-bottom:0}.position-overview{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:740px){.site-header{height:auto;min-height:72px;padding:16px 20px;flex-wrap:wrap;gap:14px}.site-header>.icon-button{margin-left:auto}.app-nav{order:3;margin-left:0;width:100%}.app-nav button{flex:1}.profile-view{padding:24px 16px;max-width:550px}.profile-heading h1{font-size:1.6rem}.profile-heading p{font-size:1rem}.import-card{padding:20px}.import-form{gap:15px}.import-form .username-field{grid-column:1/-1}.import-form>div:nth-child(2){grid-column:1/-1}.import-form label{font-size:.875rem}.profile-empty{padding:37px 5px}.profile-stats{grid-template-columns:1fr 1fr;gap:10px}.profile-stats>div{padding:18px}.profile-stats>div:last-child{grid-column:1/-1}.profile-stats strong{font-size:2rem}.profile-filters{gap:12px}.profile-filters>div{flex:1;min-width:0}.profile-filters select{padding-left:10px}.profile-section{margin-top:30px}.opening-row{grid-template-columns:minmax(0,1fr) 62px;gap:13px;padding:18px}.opening-row-record{grid-row:2;grid-column:1/-1}.opening-row-score{grid-column:2;grid-row:1}.opening-row-record>span{font-size:.875rem}.opening-row-name div>span{font-size:.875rem}.section-title{gap:9px}.section-title h2{font-size:1.35rem}.evidence-dialog{padding:24px}.position-overview{display:flex;flex-direction:column;align-items:stretch;gap:12px}.position-board{max-width:290px;margin:auto}.results-header{align-items:start}.results-header h2{font-size:1.3rem}.evidence-game span{font-size:.8rem}}
.analysis-panel{background:#202a21;border:1px solid #526445;border-radius:16px;padding:26px;margin-bottom:30px}.analysis-controls{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:16px}.analysis-controls label{display:block;font-size:.875rem;font-weight:600;margin-bottom:9px}.analysis-controls select{font-size:.95rem;min-height:50px}.analysis-scope{margin:14px 0}.analysis-actions{display:flex;gap:18px;align-items:center;margin:19px 0}.analysis-actions>button{width:auto;min-width:200px;margin:0}.analysis-actions>span{flex:1}#analysis-status{font-size:.95rem;line-height:1.55;color:#c1d0b7;margin:16px 0 8px}#analysis-status.analysis-error{color:var(--error)}#analysis-progress{height:7px;margin:12px 0}.analysis-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:20px 0;margin-top:10px;border-bottom:1px solid var(--line)}.analysis-totals>div{display:flex;flex-direction:column;gap:6px}.analysis-totals strong{font-family:Manrope;font-size:1.8rem;color:var(--accent)}.analysis-totals span{font-size:.875rem;color:var(--muted);line-height:1.4}.analysis-results-title{margin-top:24px}.mistake-list{display:grid;gap:12px;margin-top:16px}.mistake-card{display:flex;gap:22px;align-items:start;padding:23px;background:#2b3527;border:1px solid #4f5d43;border-radius:12px;text-align:left;width:100%}.mistake-card:hover{background:#35412e}.mistake-frequency{min-width:88px;display:flex;flex-direction:column;gap:6px}.mistake-frequency>strong{font:750 2rem Manrope,system-ui;color:var(--accent)}.mistake-frequency small{font-size:1rem;color:#a5b39a}.mistake-frequency>span{font-size:.8rem;color:var(--muted)}.mistake-card-copy{display:flex;flex-direction:column;gap:9px;min-width:0}.mistake-card-copy>.eyebrow{margin:0;font-size:.75rem;letter-spacing:1px;line-height:1.6}.mistake-card-copy>strong{font-family:Manrope;font-size:1.1rem;line-height:1.4}.mistake-card-copy>span:not(.eyebrow){font-size:.95rem;line-height:1.6;color:#bfccb5}.mistake-card-copy>.pattern-link{color:var(--accent)!important}.analysis-method{font-size:.875rem;border-top:1px solid var(--line);padding-top:12px;margin-top:24px}.analysis-method summary,.more-mistakes summary{min-height:44px;color:#c9d6c0}.analysis-method p{margin-top:12px}.analysis-panel>p.profile-note{margin-top:12px}.mistake-explanation{font-size:1rem;color:#c8d4bf;margin:15px 0;line-height:1.65}.comparison-scores{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.comparison-scores>div{padding:15px;border:1px solid var(--line);border-radius:10px;background:#19221a;display:flex;flex-direction:column;gap:9px}.comparison-scores span{font-size:.875rem;color:var(--muted)}.comparison-scores strong{font-family:Manrope;font-size:1.5rem}.analysis-replay{margin-top:20px}.analysis-replay .position-board{max-width:380px;margin:auto}.position-square.analysis-highlight{background:#c4d37e;box-shadow:inset 0 0 0 2px #697b34}.position-square.dark.analysis-highlight{background:#9aae66}.replay-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.replay-controls>button{width:auto;margin:0;min-height:44px}.replay-controls>span{font-size:.875rem;line-height:1.4;text-align:center;color:#bfceb3}.replay-moves{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}.replay-moves button{padding:8px 11px;min-height:42px;background:#1b251c;border:1px solid #49563f;border-radius:7px;font-size:.875rem}.replay-moves button[aria-pressed=true]{background:#425232;color:var(--accent);border-color:var(--accent)}.mistake-dialog h3{margin-top:24px}.mistake-dialog .segmented{margin-top:18px}
@media(max-width:740px){.analysis-panel{padding:20px;margin-top:25px}.analysis-controls{grid-template-columns:minmax(0,1fr)}.analysis-actions{flex-direction:column;align-items:stretch;gap:14px}.analysis-actions>button{width:100%;min-width:0}.analysis-totals{gap:8px}.analysis-totals strong{font-size:1.5rem}.analysis-totals span{font-size:.8rem}.mistake-card{flex-direction:column;gap:15px;padding:18px}.mistake-frequency{flex-direction:row;align-items:baseline;gap:12px}.mistake-frequency>strong{font-size:1.7rem}.mistake-card-copy>strong{font-size:1rem}.replay-controls{gap:7px}.replay-controls>button{padding:10px;font-size:.8rem}.comparison-scores>div{padding:12px}.comparison-scores strong{font-size:1.25rem}.analysis-panel .section-title h2{font-size:1.35rem;line-height:1.35}}

/* Searchable families and variations stay within the mobile training panel. */
.catalogue-summary{font-size:.875rem;font-weight:700;color:var(--accent);line-height:1.6;margin-bottom:20px}
.catalogue-summary span{display:block;color:var(--muted);font-weight:400}
#opening-search{width:100%;min-height:48px;border:1px solid #5b6a54;border-radius:9px;background:#19211b;color:var(--text);font:inherit;padding:12px 14px;box-sizing:border-box}
#opening-search::placeholder{color:#a1ae9a;font-size:.875rem}
#opening-search:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#catalogue-results{font-size:.875rem;margin:8px 0 18px;line-height:1.5}
#family-select,#opening-select{max-width:100%;min-width:0;font-size:1rem}
.variation-label{margin-top:18px}
.opening-description .variation-name{line-height:1.55;overflow-wrap:anywhere;font-size:.875rem}
.opening-description .catalogue-note{font-size:.875rem;color:var(--muted);line-height:1.55;margin-top:12px}
.primary-button:disabled{opacity:.5;cursor:default;box-shadow:none}
.alternative-lines{margin-top:18px;padding-top:14px;border-top:1px solid var(--line);font-size:.875rem}
.alternative-lines summary{color:var(--accent);min-height:44px;line-height:1.6}
.alternative-lines p{font-size:.875rem;line-height:1.6}
.alternative-lines .text-button{font-size:.875rem;line-height:1.6;text-align:left;white-space:normal;overflow-wrap:anywhere}
.player-bar>div{min-width:0}.player-bar>div>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.player-bar .avatar,.player-bar .player-colour,.player-bar .flip-button{flex-shrink:0}
.history-heading>span{min-width:0;overflow-wrap:anywhere;line-height:1.5}
.training-panel,.page-heading>div{min-width:0}#opening-heading{overflow-wrap:anywhere}
#lesson-variation{font-size:.875rem;line-height:1.55;color:var(--muted);margin-top:9px;overflow-wrap:anywhere}.workspace:not(.is-playing) #lesson-variation{display:none}

.evidence-practice{margin:22px 0;padding:20px;border:1px solid #536746;border-radius:12px;background:#2b3825}
.evidence-practice label{display:block;font-size:.875rem;font-weight:650;margin-bottom:10px}
.evidence-practice select{font-size:1rem;min-width:0;max-width:100%;margin-bottom:17px}
.practice-variation-name{font-size:1rem;line-height:1.6;margin-bottom:17px;overflow-wrap:anywhere}
.evidence-practice .primary-button{margin-bottom:18px}.evidence-practice .profile-note{font-size:.875rem;line-height:1.6;margin-bottom:0}
@media(max-width:740px){.evidence-practice{padding:17px}}
