@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',Arial,sans-serif;color:#e9f0fa;background:#07111d;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.42}[hidden]{display:none!important}.shell{display:flex;min-height:100vh;background:radial-gradient(ellipse at 55% -25%,#172f46 0,#0a1421 52%,#08111c 100%)}.sidebar{width:245px;flex:none;display:flex;flex-direction:column;border-right:1px solid #263444;background:#091522d9;padding:30px 19px;min-height:100vh}.brand{display:flex;gap:12px;align-items:center;margin:0 0 54px 8px}.brand-icon{width:43px;height:43px;display:grid;place-items:center;font-size:32px;color:#07131e;background:linear-gradient(145deg,#f5d997,#d3ab60);border-radius:12px;box-shadow:0 4px 20px #b08c4c33}.brand strong{display:block;font:800 17px Manrope;letter-spacing:-.7px}.brand strong span{color:#e5c386}.brand small{display:block;font-size:9px;letter-spacing:2.4px;color:#8396aa;margin-top:3px}.nav-label{font-weight:800;font-size:10px;letter-spacing:1.9px;color:#607589;padding:0 13px;margin-bottom:16px}.nav-label.second{margin-top:40px}.nav{border:none;background:none;color:#8c9eaf;width:100%;padding:14px 13px;display:flex;align-items:center;gap:13px;text-align:left;font-size:13px;font-weight:700;border-radius:10px;margin-bottom:6px}.nav>span{font-size:22px;width:24px;text-align:center}.nav small{font-size:9px;margin-left:auto;background:#1c3040;color:#80c3bf;border-radius:4px;padding:4px 6px;letter-spacing:1px}.nav:hover,.nav.active{background:#243343;color:#f4dfb5}.nav.active{box-shadow:inset 3px 0 #ecc584}.stat-side{display:flex;justify-content:space-between;color:#93a6b8;font-size:12px;margin:0 12px;padding:12px 0;border-bottom:1px solid #1c2b38}.stat-side strong{color:#f0d299}.side-bottom{display:flex;align-items:center;gap:8px;font-size:10px;line-height:1.5;color:#90a1b1;margin-top:auto;padding-top:20px}.status-dot{height:8px;width:8px;flex:none;border-radius:50%;background:#c07a72}.connected .status-dot{background:#4bd6a4}.content{flex:1;min-width:0;padding:35px clamp(20px,3vw,58px) 40px;max-width:1720px;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;gap:18px}.eyebrow{color:#91a8bc;font-size:10px;letter-spacing:2px;font-weight:800}.topbar h1{font:800 clamp(24px,2.45vw,37px) Manrope;margin:9px 0 0;letter-spacing:-1.3px}.topbar h1 em{color:#e6c489;font-style:normal}.top-right{display:flex;align-items:center;gap:15px}.live-pill{border:1px solid #284355;background:#132838;color:#bce6d5;padding:10px 14px;border-radius:20px;font-size:12px;font-weight:700;white-space:nowrap}.live-pill i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#4ade9e;margin-right:5px}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#e6c68a;background:#24374a;font-size:26px}.workspace{display:grid;grid-template-columns:minmax(380px,1.14fr) minmax(320px,.84fr);align-items:start;gap:23px}.game-panel,.card{border:1px solid #243748;background:linear-gradient(155deg,#172737,#101e2c);border-radius:16px;box-shadow:0 18px 55px #0003}.game-panel{padding:18px clamp(14px,2vw,26px) 21px}.game-top{display:flex;align-items:center;justify-content:space-between;padding:0 0 15px;gap:10px}.game-id{display:flex;align-items:center;gap:10px;font-size:12px;color:#bacad6;font-weight:700}.badge-purple{font-size:9px;letter-spacing:1.2px;border-radius:5px;background:#293b4e;padding:7px 8px;color:#e2c991;white-space:nowrap}.game-tools{display:flex;gap:8px}.icon-btn{background:#1f3343;border:1px solid #345064;color:#dbe7ec;border-radius:7px;width:33px;height:33px;font-size:22px}.opponent-bar{display:flex;align-items:center;padding:9px 3px 17px;gap:12px}.opponent-bar.own{padding:17px 3px 11px}.player-avatar{display:grid;place-items:center;height:42px;width:42px;border-radius:10px;font-size:33px}.player-avatar.black{background:#25394a;color:#d2e0eb}.player-avatar.white{background:#cdbc99;color:#26323c}.player-details{display:flex;flex-direction:column;gap:4px}.player-details strong{font-size:14px}.player-details small{color:#8ca1b3;font-size:11px}.turn-chip{margin-left:auto;font-size:10px;font-weight:800;color:#69879a;white-space:nowrap}.turn-chip.active{color:#6ee0b4}.board-wrap{position:relative;aspect-ratio:1/.93;width:100%;max-height:min(65vh,680px);background:#081521;border-radius:7px;padding:7px;border:1px solid #8e7654;box-shadow:0 0 0 4px #283c47,0 16px 35px #0006}.board-frame{width:100%;height:100%;overflow:hidden;touch-action:manipulation;cursor:pointer}.board-frame canvas{display:block}.board-corner{position:absolute;font-size:11px;color:#e5d0a9;z-index:2;pointer-events:none}.top-left{top:11px;left:11px}.bottom-left{bottom:11px;left:11px}.bottom-right{bottom:11px;right:11px}.below-board{border-top:1px solid #283c4b;padding-top:15px}.game-message{font-size:12px;color:#afc2d1;min-height:25px}.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.flat-btn{flex:1;border:1px solid #30475a;border-radius:8px;background:#203345;color:#d9e5e9;padding:11px 8px;font-size:12px;font-weight:800;white-space:nowrap}.flat-btn:hover{background:#2d4860}.flat-btn.danger{color:#e6b2af}.right-column{display:flex;flex-direction:column;gap:21px}.card{padding:24px}.card-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.card-heading>span{font-size:22px;color:#90a5b6}.card h2{font:800 18px Manrope;margin:7px 0 0;letter-spacing:-.5px}.card label{display:block;color:#b5c6d3;font-size:12px;font-weight:800;margin-bottom:11px}.difficulty{display:flex;gap:6px}.difficulty button,.color-switch button{border:1px solid #355066;background:#1b2e3e;color:#9fb4c4;font-size:11px;font-weight:800;border-radius:7px;padding:12px 7px;flex:1}.difficulty button.chosen,.color-switch button.chosen{border-color:#dfbe83;color:#f7dcaa;background:#374339}.subtext{font-size:11px;line-height:1.6;color:#859cac;margin:11px 0 21px}.setting-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #2b3b49;margin-top:23px;padding-top:18px;gap:10px;font-size:12px;color:#a9bdcb;font-weight:700}.color-switch{display:flex;gap:5px;width:50%}.color-switch button{padding:9px}.primary{width:100%;margin-top:22px;padding:15px 17px;border:0;border-radius:8px;font-size:13px;font-weight:800;color:#1c2833;background:linear-gradient(90deg,#f1d499,#d6b374);display:flex;justify-content:center;gap:10px;align-items:center}.primary span{margin-left:auto}.primary:hover{filter:brightness(1.08)}.moves-card{padding:0;overflow:hidden}.tabs{display:flex;border-bottom:1px solid #2b3b49;padding:0 14px}.tab{flex:1;padding:17px 3px;border:0;border-bottom:2px solid transparent;background:none;color:#8398aa;font-size:12px;font-weight:800;white-space:nowrap}.tab.active{color:#edcb91;border-bottom-color:#edcb91}.tab-body{padding:16px 20px 18px}.moves-head,.move-row{display:grid;grid-template-columns:.65fr 1fr 1fr;align-items:center;gap:4px}.moves-head{font-size:10px;letter-spacing:1.5px;color:#738b9c;padding:5px 12px 13px}.moves-list{max-height:245px;min-height:125px;overflow:auto}.move-row{font-size:13px;color:#d0dfeb;padding:12px;border-radius:5px}.move-row:nth-child(odd){background:#1c2e3e}.move-row span:first-child{color:#819bb0}.move-row span.latest{color:#f1cb89;font-weight:800}.empty-list{padding:32px 12px;text-align:center;color:#748b9c;line-height:1.6;font-size:12px}.move-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #2b3b49;padding-top:15px;margin-top:10px;color:#8fa3b4;font-size:11px}.move-footer button{background:none;border:0;color:#e5c188;font-weight:800;font-size:11px}.mini-help{border:1px solid #314759;border-radius:13px;padding:19px;display:flex;align-items:flex-start;gap:13px;background:#142a39}.help-icon{font-size:29px;color:#d9c28e}.mini-help strong{font-size:13px}.mini-help p{font-size:11px;line-height:1.6;color:#91a8b8;margin:5px 0 0}.coach-intro{display:flex;align-items:center;gap:10px;font-size:14px}.coach-intro small{color:#87a2b4;margin-left:auto;font-size:10px}.sparkle{font-size:26px;color:#e1bf82}.coach-answer{font-size:13px;line-height:1.7;background:#203446;border-left:3px solid #dcbb81;padding:17px;margin:15px 0;border-radius:5px}.secondary{width:100%;border:1px solid #587182;border-radius:7px;background:#223a4c;color:#d9eaf0;padding:12px;font-size:12px;font-weight:800}.coach-note{font-size:10px;line-height:1.7;color:#7b93a5;margin-top:13px}.field{width:100%;color:#fff;background:#102330;border:1px solid #3a5263;border-radius:7px;padding:12px;font-size:13px;outline:0}.field:focus{border-color:#e0bf82}.join-row{display:flex;gap:8px}.join-row button,.room-row button{border:0;border-radius:7px;background:#e5c68c;color:#1e2c37;font-weight:800;padding:0 15px}.room-info{margin-top:18px;padding:15px;background:#183343;border:1px solid #486276;border-radius:8px;font-size:13px}.room-info strong{color:#edc98c}.room-info p{color:#cadbe6;font-size:12px}.room-info small{display:block;color:#91a7b8;font-size:11px;line-height:1.5}.room-info button{border:0;background:transparent;color:#eec28d;padding:12px 0 0}.lobby-summary{display:flex;justify-content:space-between;font-size:12px;margin-bottom:10px}.lobby-summary span{color:#95a8b9}.room-list{max-height:220px;overflow:auto}.room-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #2c4253;padding:13px 0}.room-row div{display:flex;flex-direction:column;gap:5px}.room-row strong{font-size:12px}.room-row small{font-size:10px;color:#8da7b8}.room-row button{padding:9px 14px}.toast{position:fixed;right:24px;bottom:24px;z-index:100;background:#e6c890;border:1px solid #ffedbb;color:#1d2a34;border-radius:10px;padding:14px 18px;box-shadow:0 10px 32px #0008;max-width:min(90vw,460px);font-size:13px;font-weight:800}.modal-backdrop{position:fixed;inset:0;z-index:99;background:#000a;display:grid;place-items:center;padding:20px}.modal{max-width:460px;width:100%;background:#152a3a;padding:24px;border-radius:16px;border:1px solid #516779}.modal h2{font:800 22px Manrope}.modal p{color:#a7bdc9;font-size:13px}.promotion-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:24px 0}.promotion-choices button{background:#2a4151;color:#fff;border:1px solid #66818e;border-radius:9px;padding:8px 3px;font-size:11px}.promotion-choices span{display:block;font-size:37px;margin-bottom:5px}@media(max-width:1220px){.sidebar{width:210px}.content{padding:28px 19px}.workspace{grid-template-columns:minmax(300px,1fr) minmax(280px,.8fr);gap:14px}.card{padding:18px}.tabs{padding:0 6px}.board-wrap{aspect-ratio:1/1}}@media(max-width:960px){.sidebar{width:76px;padding:19px 10px}.brand{margin:0 auto 45px}.brand>div:last-child,.nav-label,.nav small,.nav{font-size:0}.nav{justify-content:center;padding:11px}.nav>span{font-size:25px}.stat-side,.side-bottom{display:none}.content{padding:22px}.workspace{grid-template-columns:minmax(0,1fr) minmax(285px,.8fr)}}@media(max-width:720px){.shell{display:block}.sidebar{width:100%;min-height:0;height:auto;display:flex;flex-direction:row;align-items:center;gap:5px;padding:8px 10px;position:sticky;top:0;z-index:8;background:#0e2030;overflow:auto}.brand{margin:0 auto 0 0}.brand-icon{height:34px;width:34px;font-size:26px}.sidebar .nav{width:44px;flex:none;margin:0;padding:7px}.sidebar .nav>span{font-size:24px}.content{padding:18px 13px 30px}.topbar{margin-bottom:19px}.topbar h1{font-size:23px;line-height:1.35}.topbar .eyebrow{font-size:9px}.avatar{display:none}.live-pill{font-size:10px;padding:8px}.workspace{display:flex;flex-direction:column;gap:15px}.game-panel,.right-column{width:100%}.game-panel{padding:12px 13px}.board-wrap{aspect-ratio:1/.95;max-height:none}.right-column{gap:14px}.card{padding:18px}.game-tools{gap:5px}.game-id{font-size:11px}.flat-btn{padding:11px 6px;font-size:11px}.opponent-bar{padding:8px 3px 12px}.opponent-bar.own{padding:14px 3px}.mini-help{margin-bottom:20px}}@media(min-width:1600px){.workspace{grid-template-columns:minmax(540px,1.2fr) minmax(400px,.75fr)}.board-wrap{max-height:710px}}

/* Start menu, accessible 2D chessboard and sound controls */
.welcome-backdrop{position:fixed;inset:0;z-index:110;background:radial-gradient(circle at center,#19364aeF,#06101bf7 72%);display:flex;align-items:center;justify-content:center;padding:20px;overflow:auto}
.welcome-card{width:min(570px,100%);border:1px solid #4d6274;background:linear-gradient(145deg,#1d3649,#0f2031);padding:clamp(20px,4vw,38px);border-radius:22px;box-shadow:0 32px 100px #000a;text-align:center}
.welcome-logo{font-size:50px;color:#e9c990}.welcome-card h2{font:800 clamp(23px,4vw,34px) Manrope;margin:12px 0}.welcome-card p{font-size:13px;color:#afc3d2;line-height:1.6}
.welcome-options{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:24px 0}
.welcome-options button{border:1px solid #456078;background:#233a4d;color:#fff;border-radius:12px;padding:18px 13px;text-align:left}.welcome-options button:hover{border-color:#e8c78d;background:#344a51}
.welcome-options strong{display:block;font-size:13px;margin-bottom:8px}.welcome-options small{display:block;color:#a7bdce;font-size:11px;line-height:1.5}
.welcome-sound{display:flex;justify-content:center;align-items:center;gap:9px;color:#b8ccd9;font-size:12px}.welcome-sound input{accent-color:#efc88c}
.board-2d{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;height:100%;aspect-ratio:1;overflow:hidden;border-radius:4px}
.square2d{position:relative;padding:0;border:0;min-width:0;display:grid;place-items:center;font-family:'Segoe UI Symbol','DejaVu Sans',serif;font-size:clamp(22px,5vw,57px);line-height:1;touch-action:manipulation}
.square2d.light{background:#ecd8b7}.square2d.dark{background:#64849b}.square2d.whitepiece{color:#fffef2;-webkit-text-stroke:1px #2b3440;text-shadow:0 2px 2px #263d56}.square2d.blackpiece{color:#182533;text-shadow:0 1px 1px #fff7}
.square2d.last{box-shadow:inset 0 0 0 999px #eac05d55}.square2d.selected{box-shadow:inset 0 0 0 999px #e9b64288}.square2d.possible:after{content:'';width:25%;height:25%;border-radius:50%;background:#0e7e64a6;position:absolute;pointer-events:none}.square2d.possible:has(.rank2d):after{opacity:.8}
.rank2d,.file2d{position:absolute;font:700 10px Arial;pointer-events:none;opacity:.7}.rank2d{top:3px;left:4px}.file2d{bottom:3px;right:4px}
@media(max-width:520px){.welcome-options{grid-template-columns:1fr}.welcome-options button{padding:12px 15px}.board-wrap{aspect-ratio:1}.square2d{font-size:clamp(27px,8vw,44px)}}
/* v1.2 Mobile-first polish and appearance system */
:root{--square-light:#edd9ba;--square-dark:#ad8058;--surface:#142435;--border-ui:#2a3e50;--text-ui:#e9f0fa;--muted-ui:#99aabb;--accent-ui:#ecc584}
.mobile-dock{display:none}.square2d.light{background:var(--square-light)}.square2d.dark{background:var(--square-dark)}
.square2d:focus-visible{outline:3px solid #ffdb71;outline-offset:-3px;z-index:2}
.square2d.selected{box-shadow:inset 0 0 0 999px #ffd54a77,inset 0 0 0 3px #f5d46b}.square2d.possible:after{z-index:2;box-shadow:0 0 0 2px #fff7}
.square2d.whitepiece{-webkit-text-stroke:1.1px #4d4b48;text-shadow:0 2px 3px #2229}.square2d.blackpiece{color:#161f27;text-shadow:0 1px 2px #fff6}
[data-background="solid"] .shell{background:#0f1a26}[data-background="warm"] .shell{background:radial-gradient(ellipse at 70% 8%,#514033 0%,#221e23 55%,#151a21 100%)}
[data-theme="light"]{color-scheme:light;--surface:#fff;--border-ui:#d6dee7;--text-ui:#213043;--muted-ui:#586d7e;--accent-ui:#8d6333}
[data-theme="light"] .shell{background:radial-gradient(ellipse at top,#eef4fa 0,#f7f8fc 70%);color:#26394c}
[data-theme="light"][data-background="solid"] .shell{background:#f3f5f8}
[data-theme="light"][data-background="warm"] .shell{background:radial-gradient(ellipse at top,#fff0df,#f7f5f1 75%)}
[data-theme="light"] .sidebar{background:#fafbfc;border-color:#dce4ea}
[data-theme="light"] .game-panel,[data-theme="light"] .card{background:#fff;border-color:#dae3eb;box-shadow:0 12px 35px #344b6812}
[data-theme="light"] .topbar h1,[data-theme="light"] .player-details strong,[data-theme="light"] .card h2,[data-theme="light"] .mini-help strong{color:#253445}
[data-theme="light"] .game-id,[data-theme="light"] .game-message,[data-theme="light"] .setting-row,[data-theme="light"] .card label,[data-theme="light"] .move-row,[data-theme="light"] .nav,[data-theme="light"] .brand strong{color:#3c4d5e}
[data-theme="light"] .nav.active,[data-theme="light"] .nav:hover{background:#f0e5d4;color:#644922}
[data-theme="light"] .opponent-bar,[data-theme="light"] .below-board,[data-theme="light"] .moves-card .tabs{border-color:#e4e8ed}
[data-theme="light"] .icon-btn,[data-theme="light"] .flat-btn,[data-theme="light"] .difficulty button,[data-theme="light"] .color-switch button,[data-theme="light"] .secondary{background:#eff3f7;color:#304559;border-color:#d4e0e8}
[data-theme="light"] .difficulty button.chosen,[data-theme="light"] .color-switch button.chosen{background:#fff2d8;color:#684a27;border-color:#d8ac70}
[data-theme="light"] .mini-help,[data-theme="light"] .coach-answer,[data-theme="light"] .move-row:nth-child(odd){background:#f1f5f8;color:#27394a;border-color:#dfe6eb}
[data-theme="light"] .coach-note,[data-theme="light"] .subtext,[data-theme="light"] .player-details small,[data-theme="light"] .eyebrow{color:#687d8e}
[data-theme="light"] .board-wrap{background:#f6f3ee;box-shadow:0 0 0 3px #ddd3c5,0 9px 24px #53627325}
[data-theme="light"] .field{background:#fff;color:#203448;border-color:#c9d8e4}
[data-theme="light"] .tab.active{color:#895c2a;border-color:#a7763c}
[data-theme="light"] .live-pill{background:#e9f7f0;color:#28704f;border-color:#c7e2d6}
[data-theme="light"] .turn-chip.active{color:#178459}
.appearance-dialog{width:min(94vw,480px);max-height:90dvh;overflow:auto;background:#172838;color:#f3f6f8;border:1px solid #42586a;border-radius:20px;padding:24px;box-shadow:0 30px 90px #000b}
.appearance-title{display:flex;align-items:center;justify-content:space-between;gap:15px}.appearance-title h2{margin:6px 0 0;font:800 26px Manrope,Arial}.appearance-title button{width:36px;height:36px;border:1px solid #476174;background:#263d4e;color:white;border-radius:10px}
.appearance-dialog p{color:#9fb2c0;font-size:12px;line-height:1.6}.appearance-dialog h3{font-size:12px;color:#b7c7d4;margin:23px 0 11px;letter-spacing:.4px}
.theme-options,.background-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.theme-options button,.background-options button,.palette-options button{border:1px solid #3e5366;color:#dce7f0;background:#22384a;padding:12px 8px;border-radius:10px;font-size:12px;font-weight:700}
.theme-options button{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:20px}.theme-options button span{font-size:12px}
.palette-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.palette-options button{display:flex;flex-direction:column;align-items:center;gap:7px}
.palette-options i{width:100%;max-width:100px;height:38px;border:1px solid #fff5;border-radius:5px;background:linear-gradient(135deg,var(--sw1) 25%,var(--sw2) 25%,var(--sw2) 50%,var(--sw1) 50%,var(--sw1) 75%,var(--sw2) 75%);background-size:28px 28px}
.appearance-dialog button.chosen{outline:2px solid #f2ce8d;border-color:#f2ce8d;background:#374b4a}.appearance-dialog .primary{margin-top:25px}
@media(max-width:760px){
 html{scroll-padding-top:10px}body{padding-bottom:72px;overflow-x:hidden}
 .shell{display:block;min-height:100dvh}.sidebar{height:auto;min-height:0;width:100%;padding:10px 10px 7px;display:flex;flex-direction:row;align-items:center;gap:10px;overflow-x:auto;border:0;border-bottom:1px solid var(--border-ui);scrollbar-width:none}
 .sidebar::-webkit-scrollbar{display:none}.brand{margin:0;flex:none;gap:6px}.brand-icon{width:33px;height:33px;font-size:24px;border-radius:9px}.brand strong{font-size:11px;white-space:nowrap}.brand small{display:none}
 .sidebar .nav-label,.sidebar .stat-side,.sidebar .side-bottom{display:none}.sidebar .nav{width:auto;min-width:max-content;margin:0;padding:9px 10px;font-size:11px;gap:5px}.sidebar .nav>span{font-size:16px;width:auto}.sidebar .nav small{display:none}
 .content{padding:12px 0 96px;max-width:620px;margin:auto}.topbar{padding:0 14px;margin-bottom:10px}.topbar h1{font-size:17px;line-height:1.2;margin-top:2px;letter-spacing:-.4px}.topbar .eyebrow{font-size:8px}.top-right{gap:5px}.top-right .avatar{display:none}.live-pill{padding:6px 9px;font-size:10px}
 .workspace{display:block}.game-panel{margin:0;background:transparent;border:0;border-radius:0;box-shadow:none;padding:0 0 12px}
 .game-top{padding:5px 12px 9px}.game-id{gap:6px;font-size:10px}.badge-purple{font-size:8px;padding:5px}.game-tools{gap:4px}.icon-btn{width:32px;height:32px;font-size:18px;border-radius:8px}
 .opponent-bar{padding:5px 12px 8px;gap:8px}.opponent-bar.own{padding:9px 12px}.player-avatar{width:32px;height:32px;font-size:24px}.player-details strong{font-size:12px}.player-details small{font-size:10px}.turn-chip{font-size:9px}
 .board-wrap{width:calc(100% - 12px);margin:0 6px;padding:3px;height:auto;aspect-ratio:1/1;max-height:none;border-radius:5px;border-width:1px;box-shadow:0 0 0 2px #61758755,0 8px 22px #0004}
 .board-2d{aspect-ratio:1/1;border-radius:1px}.square2d{font-size:clamp(30px,10.5vw,66px)}.rank2d,.file2d{font-size:clamp(8px,2.3vw,12px);font-weight:800;opacity:.83}.board-corner{display:none}
 .below-board{border:0;padding:7px 12px}.game-message{font-size:11px;min-height:18px;padding:1px 0 7px}.action-row{gap:6px;margin:0}.flat-btn{font-size:11px;padding:12px 5px;border-radius:8px}
 .right-column{padding:10px 12px;gap:10px}.right-column .mini-help{display:none}.right-column .card{padding:16px}.right-column .moves-card{padding:0}
 body[data-mobile-panel="board"] .right-column{display:none}
 body[data-mobile-panel="settings"] .moves-card{display:none}
 body[data-mobile-panel="moves"] .controls-card,body[data-mobile-panel="coach"] .controls-card{display:none}
 body[data-mobile-panel="lobby"] .moves-card{display:block}
 .mobile-panel-anchor{height:0;scroll-margin-top:10px}.mobile-dock{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:28;justify-content:space-around;gap:2px;background:#102131f7;border-top:1px solid #40586b;box-shadow:0 -9px 30px #0005;padding:7px 8px calc(7px + env(safe-area-inset-bottom));backdrop-filter:blur(20px)}
 .mobile-dock button{border:0;background:transparent;color:#94a8b8;min-width:54px;min-height:48px;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:22px;font-weight:800;gap:2px;border-radius:9px}.mobile-dock span{font-size:10px;letter-spacing:.1px}.mobile-dock button.active{background:#304558;color:#f2cf90}
 [data-theme="light"] .mobile-dock{background:#ffffffee;border-color:#d8e1ea}[data-theme="light"] .mobile-dock button{color:#637484}[data-theme="light"] .mobile-dock button.active{background:#f8ebd4;color:#865d31}
 .appearance-dialog{padding:18px;width:min(94vw,460px);border-radius:16px}.palette-options i{height:32px}
 .modal-backdrop{padding:10px}
}
@media(max-width:370px){.sidebar .nav{padding:8px 6px;font-size:10px}.brand strong{font-size:10px}.game-id #modeTitle{display:none}.game-tools .icon-btn{width:32px}.square2d{font-size:10vw}}

/* v1.3 — distraction-free, full-width playing area */
.layout-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;min-height:33px;padding:0 10px;border:1px solid #4b6474;border-radius:8px;background:#21384b;color:#e8d3a4;font-size:12px;font-weight:800}
.layout-btn:hover,.layout-btn[aria-pressed="true"]{background:#3a4d55;border-color:#e2c58f}
#fullscreenToggle{font-size:21px}
body.layout-focus .sidebar{display:none}
body.layout-focus .content{max-width:none;width:100%;margin:0;padding:15px clamp(12px,2vw,38px) 30px}
body.layout-focus .topbar{margin-bottom:14px}
body.layout-focus .topbar h1{font-size:clamp(20px,2.1vw,28px)}
body.layout-focus .workspace{display:block;width:100%;max-width:none}
body.layout-focus .game-panel{width:100%;max-width:none;margin:0 auto;padding:12px 16px 18px}
body.layout-focus .game-top,body.layout-focus .opponent-bar,body.layout-focus .below-board{width:min(100%,920px);margin-left:auto;margin-right:auto}
body.layout-focus .board-wrap{width:min(100%,calc(100dvh - 255px),920px);aspect-ratio:1/1;max-height:none;margin:0 auto}
body.layout-focus .right-column{display:none}
body.layout-focus.focus-show-panels .right-column{display:flex;position:fixed;right:18px;top:75px;bottom:18px;width:min(370px,calc(100vw - 36px));overflow-y:auto;z-index:30;padding:0 3px 20px;border-radius:14px;box-shadow:0 20px 70px #000a;background:#102030}
body.layout-focus.focus-show-panels .right-column>.card:first-of-type{margin-top:0}
body.layout-focus.focus-show-panels .mini-help{display:none}
body.layout-focus .game-tools{flex-wrap:wrap;justify-content:flex-end}
body.layout-focus .board-frame canvas{width:100%;height:100%}
@media (max-width:1100px) and (min-width:761px){
 body.layout-focus .board-wrap{width:min(100%,calc(100dvh - 220px),820px)}
 body.layout-focus .game-panel{padding-inline:10px}
}
@media(max-width:760px){
 .layout-btn{font-size:17px;min-width:33px;padding:0 6px}
 .layout-btn span{display:none}
 #fullscreenToggle{font-size:18px}
 .game-tools{flex-wrap:nowrap;gap:3px}
 .game-tools .icon-btn{width:30px;min-width:30px;height:32px}
 body.layout-focus .sidebar{display:flex}
 body.layout-focus .content{max-width:620px;padding:12px 0 96px;margin:auto}
 body.layout-focus .topbar{margin-bottom:10px}
 body.layout-focus .workspace{display:block}
 body.layout-focus .game-panel{padding:0 0 12px;width:100%;border:0;background:transparent;box-shadow:none}
 body.layout-focus .board-wrap{width:calc(100% - 12px);margin:0 6px;aspect-ratio:1/1;max-height:none}
 body.layout-focus .game-top,body.layout-focus .opponent-bar,body.layout-focus .below-board{width:100%}
 body.layout-focus .right-column{display:none}
 body.layout-focus:not([data-mobile-panel="board"]) .right-column{display:flex}
 body.layout-focus.focus-show-panels .right-column{position:static;width:100%;padding:10px 12px;box-shadow:none;background:transparent}
 body.layout-focus .game-tools{flex-wrap:nowrap}
 body.layout-focus .game-id .badge-purple{display:none}
}
@media(max-width:410px){.game-tools .icon-btn{width:28px;min-width:28px}.layout-btn{min-width:28px}.game-id #modeTitle{font-size:9px}}

/* Search-readable guide beneath game (not an intrusive overlay) */
.chess-seo{background:#0a1725;color:#d7e5ee;padding:42px clamp(18px,4vw,64px);border-top:1px solid #304457}
.chess-seo-inner{max-width:1180px;margin:auto}.chess-seo h2{font-size:clamp(20px,2vw,30px);margin:0 0 14px;color:#f0d19b}.chess-seo h3{font-size:16px;margin:22px 0 10px;color:#ecd1a5}.chess-seo p{font-size:14px;line-height:1.75;color:#b6c7d5}.chess-seo-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}.chess-seo details{padding:13px 0;border-bottom:1px solid #26394b}.chess-seo summary{cursor:pointer;font-weight:700;font-size:14px}.chess-seo details p{margin-bottom:0}
[data-theme="light"] .chess-seo{background:#f4f7fa;color:#26394b}[data-theme="light"] .chess-seo h2,[data-theme="light"] .chess-seo h3{color:#76532a}[data-theme="light"] .chess-seo p{color:#41596b}
@media(max-width:760px){.chess-seo{padding:30px 18px 104px}.chess-seo-columns{grid-template-columns:1fr;gap:0}.chess-seo p{font-size:13px}}
