/* Forest is the environment; the board remains a clear working surface. */
:root{--bg:#061b13;--surface:#102d22;--hover:#244737;--text:#f0f5eb;--muted:#b4c9ba;--subtle:#91aa99;--line:#91b49c40;--accent:#d4e3a4;--accent-text:#152819;--square-light:#c6d5b4;--square-dark:#456b55;--success:#bad7ac;--danger:#eca596}
body{background:#061b13;isolation:isolate}
.forest-scene{position:fixed;inset:0;z-index:-2;background:#061b13 url('./art/forest-canopy.png') center/cover no-repeat;pointer-events:none}
.forest-scene:after{content:'';position:absolute;inset:0;background:rgba(1,13,8,.48)}
.workspace{position:relative;width:min(1120px,calc(100% - 64px));margin:32px auto;min-height:calc(100svh - 64px);background:rgba(3,20,14,.78);padding:0 32px 8px}
.header,main{width:min(928px,100%)}
main{margin-bottom:32px}
.game-layout{grid-template-columns:minmax(320px,560px) 320px;gap:48px}
.header{height:88px}
.wordmark{font-size:24px;line-height:32px;font-weight:400;letter-spacing:-.5px;color:#f3f6ed}
.header-actions>.primary{background:transparent;border:1px solid #c6dba770;color:#e5edcb;min-height:40px}
.header-actions>.primary:not(:disabled):hover{background:#c4df9e18}
.primary{background:#d5e2b0;color:#172d1c}
.primary:not(:disabled):hover{background:#e5efc5}
.secondary{background:#234532}
.panel-tabs{border-color:#b1cfab45}
.panel-tabs button[aria-selected=true]:after{background:#dae8a9}
.player-identity strong,.turn-status h2{color:#f0f5eb}
.player-identity>span:not(.side-indicator):not(.sr-only){color:#b4c9ba}
.black-side{background:#173a29;outline-color:#a3bf9d}.white-side{background:#e3e9cf}
.square.opponent-from:after{background:#e5ce6b38;box-shadow:inset 0 0 0 2px #bca249}
.square.opponent-to:after{background:#e5ce6b4d;box-shadow:inset 0 0 0 2px #d2bd64}
.coordinate{color:#3b5742}.dark .coordinate{color:#dce8cf}
.move-row:nth-child(odd){background:#c5deb608}
.move-row .latest{color:#e3eab8}
.review-move[aria-pressed=true]{background:#b8d59b19}
.review-move:not(:disabled):hover{background:#b8d59b12}
.notation-meta{color:#b3c9b9}
.analysis-note,.empty-moves,.move-header{color:#9bb5a3}
.coach-priorities p,.review-detail p,.help-content p{color:#d0dfcc}
.review-detail .detail-candidate{color:#c4e1ac}
#reviewGameSelect{background:#0c261b;border-color:#89a88b66}
.choice-row button,.theme-choices button{border-color:#7f9d7d66}
.choice-row button.chosen,.theme-choices button.chosen{background:#bbd69a14;border-color:#c6dc9ba8}
.theme-swatch{background:#c6d5b4;box-shadow:inset -12px 0 #456b55}
.theme-swatch.obsidian{background:#bbcec9;box-shadow:inset -12px 0 #466a65}
.toggle-row input{accent-color:#c6dca1}
dialog{background:#102d22}
dialog::backdrop{background:#010c08bd}
.outcome-dialog[data-outcome=win] h2{color:#e0edc1}
.toast{background:#d7e8be;color:#173321}
body[data-theme=obsidian]{--square-light:#bbcec9;--square-dark:#466a65}
@media(min-width:1440px){main,.header{width:1000px;max-width:100%}.header{height:96px}.game-layout{grid-template-columns:600px 336px;gap:64px}.workspace{padding-inline:32px}}
@media(max-width:1120px){.workspace{width:calc(100% - 48px);padding-inline:24px;margin-block:24px;min-height:calc(100svh - 48px)}.header,main{width:min(872px,100%)}.game-layout{grid-template-columns:minmax(320px,1fr) 280px;gap:32px}.header{height:80px}}
@media(max-width:860px){.workspace{width:calc(100% - 32px);padding-inline:16px;margin-block:16px;min-height:calc(100svh - 32px)}.game-layout{grid-template-columns:minmax(300px,1fr) 264px;gap:24px}.panel-tabs{gap:24px}}
@media(max-width:760px){.forest-scene{background-position:35% top}.forest-scene:after{background:rgba(1,13,8,.38)}.workspace{width:100%;margin:0;padding:0 16px 8px;min-height:100svh;background:rgba(3,20,14,.82)}.header,main{width:min(100%,568px)}.header{height:80px}.wordmark{font-size:22px;letter-spacing:-.5px}.game-layout{display:flex;gap:24px}.header-actions>.primary{min-height:40px}.game-panel{padding-bottom:8px}}
@media(max-width:360px){.workspace{padding-inline:12px}.header,main{width:100%}.wordmark{font-size:20px}.panel-tabs{gap:32px}}
/* A thin clear lens: the center stays sharp; only the rim refracts. */
:root{--square-light:transparent;--square-dark:transparent;--glass-rgb:244,255,247;--rim-brightness:.44}
.workspace{background:rgba(3,20,14,.16)}
.board-surround{position:relative;background:rgba(225,249,235,.018);padding:6px;border:1px solid rgba(226,250,235,.16);border-radius:16px;backdrop-filter:none;-webkit-backdrop-filter:none;outline:none;isolation:isolate;box-shadow:0 6px 18px rgba(0,7,3,.17),0 1px 2px rgba(0,7,3,.12)}
.board{position:relative;z-index:2;border-radius:8px;overflow:hidden}
.glass-refraction{position:absolute;inset:0;z-index:0;pointer-events:none;padding:10px;border-radius:15px;background-repeat:no-repeat;filter:brightness(var(--rim-brightness));opacity:0;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
.glass-refraction[data-ready=true]{opacity:1}
.board-surround:before{content:'';position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:15px;background:linear-gradient(132deg,rgba(253,255,250,.06),transparent 26%,transparent 76%,rgba(244,255,251,.025));box-shadow:inset 0 1px rgba(251,255,247,.55),inset 1px 0 rgba(251,255,247,.22),inset 0 -1px rgba(208,236,225,.18);opacity:1}
.board-surround:after{content:'';position:absolute;inset:-1px;z-index:5;pointer-events:none;border:1px solid transparent;border-radius:16px;background:linear-gradient(135deg,rgba(255,255,247,.68),rgba(237,255,245,.04) 20%,transparent 48%,rgba(221,248,238,.12) 78%,rgba(255,255,247,.36)) border-box;-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;box-shadow:none}
.move-overlay{inset:6px;width:calc(100% - 12px);height:calc(100% - 12px)}
.square,.square.dark,.square:not(:disabled):hover,.square.dark:not(:disabled):hover{background:transparent}
.square:before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(132deg,rgba(var(--glass-rgb),.20),rgba(var(--glass-rgb),.065) 18%,rgba(var(--glass-rgb),.012) 48%,transparent 76%,rgba(var(--glass-rgb),.025));box-shadow:inset 0 0 0 .5px rgba(var(--glass-rgb),.10)}
.square.dark:before{background:linear-gradient(312deg,rgba(var(--glass-rgb),.095),rgba(var(--glass-rgb),.022) 20%,transparent 48%,rgba(var(--glass-rgb),.008) 78%,rgba(var(--glass-rgb),.03));box-shadow:inset 0 0 0 .5px rgba(var(--glass-rgb),.075)}
.square:after{border-width:2px}
.coordinate,.dark .coordinate{color:#deeddf;text-shadow:0 1px 2px #0009}
.wood-piece{filter:drop-shadow(0 2px 1px #00000055)}
.white-piece .piece-eye{fill:#61482f;stroke:none}.black-piece .piece-eye{fill:#d8b383;stroke:none}.wood-grain .piece-eye{display:none}
.theme-swatch{background:linear-gradient(130deg,#e8fae255,transparent);box-shadow:inset -12px 0 #d6f3db15;outline:1px solid #a3c9a74d}
.theme-swatch.obsidian{background:linear-gradient(130deg,#d9f0ff55,transparent);box-shadow:inset -12px 0 #d2edff15}
body[data-theme=obsidian]{--square-light:transparent;--square-dark:transparent;--glass-rgb:215,237,249}
/* Glass is limited to the board and controls that float above content. */
.header-actions>.primary,.header-actions>.icon-button{border:1px solid rgba(238,255,231,.18);border-radius:10px;background:rgba(22,49,33,.20);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);box-shadow:inset 0 1px rgba(250,255,241,.14),0 2px 6px #00000010;color:#edf4df}
.header-actions>.primary:not(:disabled):hover,.header-actions>.icon-button:not(:disabled):hover{background:rgba(101,134,101,.16)}
.panel-tabs{position:sticky;top:8px;z-index:8;border:1px solid rgba(230,250,232,.13);border-radius:12px;background:rgba(8,27,18,.42);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);box-shadow:inset 0 1px rgba(247,255,238,.10);padding:0 12px;gap:24px}
.panel-tabs button{padding-bottom:0;font-size:13px}.panel-tabs button[aria-selected=true]:after{bottom:7px;height:1px;opacity:.8}
.game-panel{min-height:0}
dialog{background:rgba(7,28,19,.72);border:1px solid rgba(237,255,232,.22);border-radius:16px;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);box-shadow:inset 0 1px rgba(247,255,240,.23),0 8px 32px #00000020}
dialog::backdrop{background:rgba(0,10,6,.34)}
dialog h2,dialog .field-label,dialog .toggle-row{color:#f4f8ec}
dialog .modal-description,dialog .modal-note,dialog .help-content p{color:#c9dac9}
@media(max-width:760px){:root{--rim-brightness:.50}.workspace{background:rgba(3,20,14,.20)}.board-surround{border-radius:14px;padding:5px;backdrop-filter:none;-webkit-backdrop-filter:none}.board{border-radius:7px}.glass-refraction,.board-surround:before{border-radius:13px}.board-surround:after{border-radius:14px}.move-overlay{inset:5px;width:calc(100% - 10px);height:calc(100% - 10px)}.panel-tabs{top:8px;gap:24px}.panel-tabs button{font-size:13px}.square:before{box-shadow:inset 0 0 0 .5px rgba(var(--glass-rgb),.13)}}
@supports not ((mask-composite:exclude) or (-webkit-mask-composite:xor)){.glass-refraction,.board-surround:after{display:none}.board-surround{outline:1px solid rgba(230,250,231,.28)}}
/* Keep interaction cues readable over both the sunlit canopy and dark roots. */
.player-row,.move-context,.board-toolbar,.game-panel{text-shadow:0 1px 3px rgba(0,8,4,.6)}
.move-context,.notation-meta{color:#c9dccb}
.legal-dot{background:rgba(226,244,216,.55);box-shadow:0 0 0 1px rgba(8,28,15,.34)}
.legal-dot.capture{background:transparent;border-color:rgba(223,244,211,.68);box-shadow:none}
.square.selected:after{border-color:#e9dfad;background:#d9ca5c20;box-shadow:none}
.square:focus-visible{outline-color:#eadfb1}
/* Practice turns one review point into the focus of the next bot game. */
.analysis-controls .secondary{flex:1}
.priority-heading{font-size:12px;line-height:24px;font-weight:600;color:#dce9d4;margin-top:8px}
.coach-priorities{margin-bottom:16px}
.practice-next{width:100%;font-size:12px;min-height:44px;margin-bottom:8px;padding-inline:12px}
.practice-focus{display:flex;align-items:flex-start;gap:16px;border-top:1px solid rgba(218,239,212,.20);padding-top:16px;margin-top:16px;color:#e0edda}
.practice-focus>div{flex:1}.practice-focus>div>span{font-size:11px;color:#adc6b1}
.practice-focus p{font-size:13px;line-height:24px;margin:4px 0 0}
.practice-focus>button{width:32px;height:32px;flex:none;font-size:20px;color:#afc7b2;margin-top:-4px}
.new-focus-preview{font-size:13px;line-height:24px;margin:8px 0 24px;color:#deecd7}
@media(max-width:760px){.wordmark{white-space:nowrap;font-size:22px}.practice-focus{margin-top:16px}.practice-focus p{font-size:12px}}

/* Training progress follows the same alignment as the board. */
.wordmark{margin:0}
.strength-strip{margin:0 0 24px;width:100%;max-width:560px;padding:0}
.strength-label{display:flex;align-items:center;gap:8px;font-size:11px;line-height:24px;color:#ccddce}
.strength-label strong{margin-left:auto;color:#edf5e7;font-size:12px;font-weight:500}
.strength-label a{display:grid;place-items:center;width:24px;height:24px;color:#c4d8c7;text-decoration:none}
.strength-meter{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;height:4px;margin:8px 0}
.strength-meter span{background:rgba(213,235,214,.25);border-radius:2px}
.strength-meter .reached{background:#d5e7b8}
.strength-scale{display:flex;justify-content:space-between;font-size:10px;line-height:16px;color:#c4d8c7}
.site-footer{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:40px;padding:16px 0;font-size:11px;line-height:24px;color:#bacebc}
.site-footer a{color:inherit;text-decoration:none}.site-footer a:hover{text-decoration:underline}.site-footer button{font:inherit;color:inherit;padding:0}
.ad-placement{margin:48px auto 0;max-width:728px;padding:16px 0;clear:both}.ad-label{display:block;font-size:10px;line-height:24px;color:#bfd0c1;text-align:center}#adMount{width:100%;min-width:0;min-height:100px}.ad-placement ins[data-ad-status="unfilled"]{display:none!important}
.document-content{max-width:640px;margin:32px auto 64px;font-size:14px;line-height:1.9;color:#dfebdf}.document-content h1{font-size:28px;line-height:1.4;font-weight:500;margin:0 0 24px}.document-content h2{font-size:17px;margin:32px 0 8px;font-weight:500;color:#f1f6e9}.document-content p{margin:8px 0 16px}.document-content a{color:#dfedc0;text-underline-offset:4px}.document-content ol{padding-left:24px}.document-content li{margin:8px 0}.back-to-game{font-size:13px;color:#e6efdc;text-decoration:none;padding:8px 0}.document-page .header .wordmark{color:#edf4df;text-decoration:none}
@media(min-width:1440px){.strength-strip{max-width:600px}}
@media(max-width:760px){.strength-strip{max-width:none;margin-bottom:16px}.strength-label a{width:32px;height:32px}.strength-meter{margin-top:4px}.site-footer{margin-top:24px;gap:8px 16px}.document-content{margin:24px 0 48px}.document-content h1{font-size:24px}}
/* Movement carries the eye; no arrows compete with the pieces. */
.moving-piece{position:absolute;z-index:7;pointer-events:none;display:grid;place-items:center}
.moving-piece .piece{width:100%;height:100%}.piece-arriving{visibility:hidden}
.square.candidate-square:after{border:2px solid #b9e8c3;background:#91d0a328}
.strength-meter{grid-template-columns:repeat(9,1fr)}
.strength-meter span:nth-child(3n){margin-right:4px}.strength-meter span:last-child{margin-right:0}
.level-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.level-grid button{min-height:44px;border:1px solid #cce4bb40;border-radius:4px;color:#bdcdbd;font-variant-numeric:tabular-nums}
.level-grid button.chosen{border-color:#e0e9bd;background:#b9d49e16;color:#f1f6df}
.level-note{font-size:11px;color:#bacebc;margin:8px 0 0;line-height:24px}
.learning-actions{display:flex;flex-wrap:wrap;gap:8px 16px}.learning-actions:has(button:not([hidden])){margin-top:8px}
.learning-actions .text-button{font-size:12px;color:#dce9c4;min-height:40px;padding:0 0;text-decoration:underline;text-underline-offset:4px}
.friend-panel{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:16px;font-size:12px;color:#cadcc9}
.friend-panel .text-button{font-size:12px;padding:8px 0;text-decoration:underline;text-underline-offset:4px}
.invite-link{width:100%;min-width:0;background:#0b241a;color:#eff7e7;border:1px solid #b9d4b640;padding:8px;border-radius:4px;font-size:11px}
.lesson-text,.lesson-tip{font-size:14px;line-height:1.8;color:#e2ecdc;margin:16px 0}.lesson-tip{font-size:13px;color:#bfd1be}
.lesson-diagram{width:224px;max-width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(7,1fr);margin:24px auto 8px;background:#9dbb9530;border:1px solid #afc4a340}
.lesson-cell{display:grid;place-items:center;position:relative;aspect-ratio:1;background:#d4e2b610}.lesson-cell.dark{background:#081e1630}.lesson-cell i{width:7px;height:7px;background:#deedb9;border-radius:50%}.lesson-cell small{color:#f0bc99;font-size:18px}.lesson-cell .piece{width:95%;height:95%}
.lesson-caption{font-size:11px;color:#c2d3b9;text-align:center;margin:8px 0 24px}
.rule-links{display:flex;flex-wrap:wrap;gap:8px}.rule-links button{font-size:12px;padding:8px 0;margin-right:16px;text-decoration:underline;text-underline-offset:4px}
#joinError{font-size:13px;color:#edc7ac;line-height:24px}
@media(max-width:760px){.friend-panel{margin-top:8px}.level-grid button{min-height:48px}.level-note{font-size:10px}.learning-actions{gap:8px 16px}}
