:root{font-family:"Yu Gothic","Microsoft YaHei",system-ui,sans-serif;color:#21383b;background:#f5f6f4;font-synthesis:none;--ink:#182f33;--muted:#718185;--line:#e2e7e5;--accent:#b96f45}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b96f45;outline-offset:3px}header{height:104px;padding:0 4%;display:flex;align-items:center;gap:30px;border-bottom:1px solid var(--line);background:#fff}.brand{display:flex;align-items:center;gap:15px;text-decoration:none;color:var(--ink);font-family:serif;font-size:28px;font-weight:600;letter-spacing:4px}.brand small{display:block;font:11px system-ui;letter-spacing:2px;margin-top:6px;color:var(--muted)}.mark{background:var(--ink);color:#fff;width:47px;height:51px;display:grid;place-content:center;font:27px serif;border-radius:2px}.edition{font-size:13px;color:var(--muted);margin-left:auto}.text-button{border:0;background:none;font-size:14px}main{max-width:1530px;margin:auto;display:grid;grid-template-columns:270px minmax(420px,1fr) 300px;padding:35px 35px 24px;gap:35px}.panel{background:#fff;border:1px solid var(--line);border-radius:8px;padding:23px 20px}.eyebrow{font-size:11px;font-weight:600;letter-spacing:1.8px;color:var(--muted)}h1{font:24px serif;margin:14px 0 9px}h2{font:26px serif;margin:10px 0 24px}p{font-size:14px;line-height:1.8;color:var(--muted);margin:0}.search{display:flex;gap:8px;align-items:center;margin:24px 0 16px;background:#f5f6f4;border:1px solid var(--line);padding:9px 11px;border-radius:5px}.search span{font-size:22px}.search input{width:100%;border:none;background:none;font-size:14px;outline:none;min-width:0}.tabs{display:flex;gap:3px;border-bottom:1px solid var(--line);margin-bottom:14px}.tabs button{padding:10px 9px;border:0;border-bottom:2px solid transparent;background:none;font-size:14px}.tabs button.active{border-color:var(--ink);font-weight:600}.tabs span{font-size:11px;margin-left:4px;color:var(--muted)}.opening-list{max-height:475px;overflow:auto;display:grid;gap:7px;scrollbar-width:thin}.opening-card{display:flex;align-items:center;gap:12px;border:1px solid transparent;background:#fff;text-align:left;border-radius:6px;padding:8px;width:100%}.opening-card:hover{background:#f5f6f4}.opening-card.active{background:#edf2ef;border-color:#c9d9d3}.opening-card svg{width:58px;height:58px;flex-shrink:0;border-radius:4px}.opening-card strong{font:19px serif}.opening-card small{display:block;font-size:12px;color:var(--muted);margin-top:5px}.opening-card .check{margin-left:auto;font-size:14px;color:#47665f}.data-note{font-size:12px;line-height:1.7;border-top:1px solid var(--line);margin-top:18px;padding-top:14px}.workspace{min-width:0}.board-heading{display:flex;align-items:center;justify-content:space-between;padding:0 3px 18px}.board-heading h2{font-size:32px;margin:10px 0 0}.board-heading small{font:14px sans-serif;color:var(--muted);margin-left:12px}.pill{font-size:12px;border:1px solid #cad8d3;border-radius:20px;padding:7px 13px;color:#47665f;background:#edf2ef}.board-wrap{background:#e9c895;border:10px solid #e6c18a;border-radius:5px;box-shadow:0 10px 24px #293a3111;overflow:hidden}#board{width:100%;display:block;background:linear-gradient(110deg,#ebcd9e,#e4bb7f)}#board .intersection{cursor:pointer}#board .intersection:hover .hover-stone{opacity:.25}#board .hover-stone{opacity:0}#board text{user-select:none}.board-toolbar{display:flex;justify-content:space-between;align-items:center;margin:18px 0 23px;font-size:13px}.board-toolbar button{background:none;border:0;padding:6px;color:#536467}.board-toolbar label{display:flex;align-items:center;gap:6px;font-size:13px}.board-toolbar input{accent-color:var(--ink)}.position-note{display:flex;gap:20px;padding:23px 4px;border-top:1px solid #dce2df}.note-number{font:14px monospace;color:var(--accent);padding-top:3px;white-space:nowrap}.position-note strong{font-size:16px;font-weight:500}.position-note p{margin-top:8px;font-size:14px;line-height:1.9}.play h2{font-size:24px;margin-top:13px;margin-bottom:20px}.mode-switch{display:flex;background:#f1f4f2;padding:4px;border-radius:5px}.mode-switch button{flex:1;border:0;background:none;padding:10px 4px;font-size:14px;border-radius:3px}.mode-switch button.active{background:#fff;box-shadow:0 1px 4px #18333112}.engine-status{font-size:12px;padding:15px 0;color:#567268;line-height:1.7}.engine-status.error{color:#aa443a}.settings{border-top:1px solid var(--line);padding-top:15px}.settings label{display:block;font-size:14px;margin-bottom:16px}.settings select{margin-top:8px;width:100%;border:1px solid #dce3de;background:#fff;border-radius:4px;padding:10px;font-size:14px;color:var(--ink)}.settings p{font-size:12px;margin-top:-6px;margin-bottom:18px}.primary,.secondary{width:100%;border-radius:4px;padding:12px;font-size:14px;margin-top:2px}.primary{background:var(--ink);color:#fff;border:1px solid var(--ink)}.primary:hover:enabled{background:#294d50}.secondary{background:#fff;border:1px solid var(--line);margin-top:10px}.game-status{font-size:13px;line-height:1.8;padding:15px 0;color:var(--muted);min-height:58px}.moves-heading{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding-top:13px}.moves-heading h3{font-weight:500;font-size:15px;margin:0}.moves-heading span{font-size:12px;color:var(--muted)}.moves{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0;margin:15px 0;list-style:none;max-height:126px;overflow:auto}.moves li{font:14px monospace;display:flex;align-items:center;gap:8px;background:#f5f6f4;padding:8px;border-radius:3px}.moves .num{font-size:11px;color:#8a9995}.stone-icon{width:12px;height:12px;border-radius:50%;background:#233135;border:1px solid #233135}.stone-icon.white{background:#fff;border-color:#bcc5c0}.evaluation{border-top:1px solid var(--line);padding-top:17px;font-size:13px}.evaluation>div:first-child{display:flex;justify-content:space-between}.eval-track{height:6px;background:#dce2df;border-radius:3px;overflow:hidden;margin-top:13px}.eval-track span{display:block;height:100%;width:50%;background:var(--ink);transition:width .3s}.evaluation p{font-size:12px;margin-top:9px;overflow-wrap:anywhere}footer{border-top:1px solid var(--line);max-width:1460px;margin:auto;display:flex;justify-content:space-between;gap:16px;padding:20px 35px;font-size:12px;color:var(--muted)}footer a{color:var(--muted);margin-left:16px;text-decoration:none}footer a:hover{text-decoration:underline}dialog{max-width:520px;border:1px solid var(--line);border-radius:8px;padding:30px;color:var(--ink)}dialog::backdrop{background:#10222488}dialog p{margin-bottom:16px}dialog button{float:right}dialog a{color:var(--ink)}@media(min-width:1450px){main{gap:50px}.opening-list{max-height:545px}}@media(max-width:1120px){main{grid-template-columns:210px minmax(360px,1fr);gap:24px;padding:25px}.play{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:0 30px}.play .settings{grid-row:1/7;grid-column:2}.opening-list{max-height:470px}}@media(max-width:700px){header{height:80px;padding:0 20px}.edition{display:none}.text-button{margin-left:auto}.brand{font-size:23px}.brand small{font-size:9px}main{display:flex;flex-direction:column;padding:20px 16px;gap:22px}.workspace{order:0}.library{order:1}.play{order:2;display:block}.board-heading h2{font-size:28px}.board-toolbar span{display:none}.opening-list{grid-template-columns:1fr 1fr;max-height:250px}.section-heading h1{font-size:23px}.section-heading p{font-size:14px}.panel{padding:20px}.position-note{padding-bottom:0}.board-wrap{border-width:6px}footer{padding:20px;flex-direction:column;font-size:12px}footer a{display:inline-block;margin:0 14px 8px 0}.board-toolbar{font-size:12px}.board-toolbar label{font-size:12px}}
:root .opening-card strong{white-space:nowrap}
.board-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0}.board-actions button{margin:0;width:100%;font-size:14px}.board-actions #game-status{grid-column:1/-1}.advanced-settings summary{padding:12px 0;cursor:pointer;font-size:14px;font-weight:600}.advanced-settings[open]{margin-top:8px}#toggle-library{display:none}.analysis-legend strong{line-height:1.5}#stop-analysis{color:#a14c39}.study-panel h3{font-size:19px!important}
@media(max-width:700px){main{display:flex!important;flex-direction:column}.library{display:none!important}body.show-library .library{display:block!important;order:1}.workspace{order:0;width:100%}.play{order:2;width:100%}#toggle-library{display:block}.board-actions{grid-template-columns:1fr 1fr}.board-actions button{min-height:48px}.board-heading h2{font-size:23px}.board-heading{padding:4px 0 10px}.analysis-legend{padding:8px 0}body[data-mode=battle] .research-panel,body[data-mode=battle] .position-note,body[data-mode=battle] .study-panel{display:none}header{padding:12px 16px}.workspace{padding:12px!important}.edition{display:none}.board-wrap{border-width:3px!important}.board-actions #game-status{margin:0;padding:8px;font-size:12px}}
@media(max-width:700px){.opening-card{gap:7px;padding:7px}.opening-card svg{width:45px;height:45px}.opening-card strong{font-size:17px}.opening-card small{font-size:11px;white-space:nowrap}.opening-card .check{display:none}.opening-card>span{min-width:0}}
:root .engine-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}.guide-check{display:flex!important;gap:8px;align-items:center;font-size:13px!important;line-height:1.6}.guide-check input{accent-color:var(--ink)}.study-panel{border-top:1px solid var(--line);padding:24px 0 4px;margin-top:8px}.study-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.study-heading h3{font:21px serif;margin:10px 0 14px}.study-heading .pill{white-space:nowrap}.candidates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:17px 0}.candidate{min-width:0;border:1px solid #d4dfd7;border-radius:6px;background:#fff;padding:14px;text-align:left;transition:background .15s}.candidate:hover:enabled{background:#edf2ef}.candidate>div:first-child{display:flex;align-items:center;gap:8px}.candidate strong{font:21px serif}.candidate>div:first-child>span:last-child{font:12px monospace;margin-left:auto;color:#60776d;white-space:nowrap}.candidate-rank{display:grid;place-content:center;font:11px system-ui;width:20px;height:20px;border-radius:50%;background:#e9efe9;color:#47685c}.candidate small{display:block;font-size:12px;margin-top:12px;color:var(--muted);line-height:1.7}.candidate p{font-size:13px;margin-top:10px;line-height:1.8}.candidate-pv{font:12px monospace;color:#906b4b;line-height:1.7;margin-top:12px;overflow-wrap:anywhere}.study-actions{display:flex;gap:12px}.study-actions button{width:auto;flex:1;margin:0}.study-disclaimer{font-size:12px;margin-top:14px;line-height:1.8}.mode-switch button{font-size:13px}.play .settings p{font-size:12px;line-height:1.8}.study-panel>#study-status{font-size:14px}.play .moves{max-height:164px}@media(max-width:1120px){.play .settings{grid-row:auto;grid-column:auto}.play{display:block}.workspace .candidates{grid-template-columns:1fr}.candidate p{display:none}}@media(max-width:700px){.study-heading{align-items:flex-start;flex-direction:column;gap:0}.study-heading .pill{margin-bottom:14px}.candidates{grid-template-columns:1fr!important}.candidate p{display:block!important}.candidate small{margin-top:7px}.candidate{padding:13px}.study-actions{flex-wrap:wrap}.study-heading h3{font-size:21px}}
/* Local loss review and learned move memory. */
.analysis-legend{display:flex;flex-direction:column;gap:8px;padding:16px 0;font-size:14px}.analysis-legend span,.fine-note{font-size:12px;color:#718185;line-height:1.6}.research-panel{border-top:1px solid var(--line);padding-top:12px}.research-panel summary{cursor:pointer;padding:12px 0;font-weight:600;font-size:14px}.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 0}.tool-grid button,.study-actions button,.replay-controls button{min-height:44px;border:1px solid #d3dcd6;border-radius:6px;background:#fff;color:var(--ink);cursor:pointer}.tool-grid label{font-size:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.research-panel textarea{width:100%;display:block;border:1px solid #d3dcd6;border-radius:6px;padding:10px;font:12px monospace;margin:8px 0}.research-panel select{max-width:100%}.research-panel input[type=color]{width:48px;height:30px;border:0;padding:0}.replay-controls{display:flex;gap:8px;margin:14px 0 8px}.replay-controls button{flex:1;font-size:20px}.replay-label{display:flex;align-items:center;gap:10px;font-size:12px}.replay-label input{min-width:0;flex:1}.moves li[role=button]{cursor:pointer}#eval-chart{width:100%;height:100px;margin-top:14px}#research-status{font-size:12px;line-height:1.7;color:#98603e}.settings input[type=range]{width:100%;accent-color:var(--ink)}.settings output{font-size:12px;color:#718185}.candidates{max-height:500px;overflow-y:auto}.candidate{min-height:115px}.candidate-pv{white-space:normal}button:disabled{cursor:default;opacity:.5}.board-wrap{background:#ecd8b6}#board{touch-action:manipulation}.primary,.secondary{min-height:46px}
.learning-panel{margin-top:24px;padding-top:20px;border-top:1px solid #ddd8ce}.learning-panel h3{margin:8px 0}.learning-panel p{font-size:12px;line-height:1.6;color:#687471}.learning-panel small{display:block;color:#7c837b;font-size:11px;line-height:1.6}.learning-actions{display:flex;gap:8px;margin:10px 0}.learning-actions button{flex:1;font-size:12px}.learning-panel .guide-check{display:flex;gap:8px;margin:12px 0;font-size:12px}.learning-panel .secondary{width:100%}dialog label{display:block;margin-top:12px}dialog textarea{display:block;box-sizing:border-box;width:100%;padding:12px;font:12px ui-monospace,monospace;border:1px solid #d3d4ca;border-radius:8px;margin-top:8px}#learning-status{color:#98603e}

/* JUKAN typography, opening previews and help. */
:root{font-family:"Segoe UI","Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Hiragino Sans GB",sans-serif;--muted:#64777b;--line:#dfe7e4;line-height:1.5;-webkit-font-smoothing:antialiased}h1,h2,.study-heading h3{font-family:inherit;font-weight:600;letter-spacing:-.025em}h1{font-size:23px}h2{font-size:25px}.board-heading h2{font-size:30px}.brand{font-weight:500}.brand small{letter-spacing:1.2px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.6px}.panel{border-radius:14px;box-shadow:0 3px 16px #18333104}.header-actions{display:flex;align-items:center;gap:10px}.help-button{border:1px solid #cad9d4;background:#f0f5f2;padding:10px 16px;border-radius:9px;font-size:13px;font-weight:600}.help-button:hover{background:#e3ede7}.text-button{padding:10px 12px;border-radius:8px}.text-button:hover{background:#f0f4f2}.opening-list{gap:8px}.opening-card{padding:10px 8px;gap:13px;border-radius:10px;transition:background .15s,border-color .15s}.opening-card svg{width:68px;height:68px;border-radius:8px}.opening-card strong{font-family:inherit;font-size:18px;font-weight:600;letter-spacing:.03em}.opening-card small{font-size:12px;margin-top:6px}.opening-card.active{background:#eaf2ed;border-color:#b9d0c4}.tabs button{font-weight:500}.search{border-radius:9px}.primary,.secondary{border-radius:9px;font-weight:500}.mode-switch{border-radius:9px}.mode-switch button{border-radius:6px}.settings select,.research-panel select,.learning-panel select{border:1px solid #d9e3de;border-radius:7px;padding:10px;background:#fff;color:var(--ink)}.learning-panel select{width:100%;margin-top:8px}.learning-panel>label{display:block;font-size:13px}.learning-actions button{border:1px solid var(--line);background:#fff;border-radius:7px;min-height:40px;padding:8px}.candidate{border-radius:10px}.candidate strong{font-family:inherit;font-size:19px;font-weight:600}.candidate-rank{flex-shrink:0}.board-wrap{border-radius:10px}.study-panel h3{font-weight:600}.position-note strong{font-weight:600}.fine-note,.analysis-legend span{color:#64777b}.settings p,.data-note{line-height:1.8}dialog{width:calc(100% - 32px);max-height:85vh;overflow:auto;border-radius:16px;box-shadow:0 24px 80px #10222430}dialog h2{margin-top:6px}.help-dialog{max-width:780px;padding:28px}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.dialog-heading h2{margin-bottom:8px}.dialog-heading button{float:none;white-space:nowrap}.help-intro{font-size:15px;margin-bottom:24px}.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px 30px}.help-grid section{border-top:1px solid var(--line);padding-top:16px}.help-step{font-size:12px;font-weight:700;color:var(--accent);letter-spacing:1px}.help-grid h3{font-size:16px;margin:6px 0 9px;font-weight:600}.help-grid p{font-size:13px;line-height:1.9;margin:0;color:#52696b}.help-note{background:#edf3ef;border-radius:10px;padding:16px 18px;margin-top:24px;font-size:13px}.help-note p{font-size:12px;line-height:1.9;margin:7px 0 0;color:#52696b}
@media(max-width:700px){header{gap:10px;height:auto;min-height:84px;flex-wrap:wrap}.brand{font-size:22px;gap:9px;letter-spacing:2px}.brand small{font-size:8px;letter-spacing:.5px}.mark{width:36px;height:42px;font-size:24px}.header-actions{margin-left:auto;gap:2px}.help-button{font-size:12px;padding:9px 10px}.header-actions .text-button{font-size:12px;padding:9px 7px;margin:0}.opening-card svg{width:58px;height:58px}.opening-card strong{font-size:17px}.opening-card{gap:9px}.opening-list{grid-template-columns:1fr;max-height:380px}.opening-card .check{display:block}.help-dialog{padding:21px}.help-grid{grid-template-columns:1fr;gap:18px}.help-intro{font-size:14px}.dialog-heading h2{font-size:24px}.board-heading h2{font-size:25px}}

/* Quiet masthead, navigable sections and consistent action hierarchy. */
html{scroll-behavior:smooth}#workspace,#opening-library,#game-library{scroll-margin-top:24px;outline:none}.site-header{display:block;height:auto;padding:0;background:#fcfcf8;border:0}.masthead{max-width:1530px;margin:auto;padding:25px 35px;display:flex;align-items:center;justify-content:space-between;gap:28px;min-height:113px}.brand{gap:17px;flex-shrink:0}.brand-seal{position:relative;width:53px;height:59px;background:#173438;color:#e7dac0;border-radius:3px;display:grid;place-items:center;box-shadow:inset 0 0 0 5px #173438,inset 0 0 0 6px #a48c5b80}.brand-seal>span{font-family:"Yu Mincho","Songti SC",serif;font-size:30px;letter-spacing:0;font-weight:400;transform:translateY(-1px)}.brand-seal i{position:absolute;width:5px;height:5px;background:#bc9d63;border-radius:50%;right:9px;bottom:10px}.brand-wordmark{font-family:Georgia,"Times New Roman",serif;font-size:31px;line-height:1.1;letter-spacing:5px;font-weight:400}.brand-wordmark small{font-family:"Microsoft YaHei UI",sans-serif;font-size:11px;letter-spacing:2px;margin-top:11px;font-weight:400;color:#667c79}.brand-divider{color:#b2a27e;margin:0 6px}.brand-philosophy{padding-left:26px;border-left:1px solid #d7ddd5;color:#476361;flex:1;max-width:340px}.brand-philosophy>span{font-family:"Yu Mincho","Songti SC","SimSun",serif;font-size:18px;letter-spacing:2px}.brand-philosophy small{display:block;color:#81908a;font-size:11px;letter-spacing:1.3px;margin-top:7px}.header-actions{gap:14px;flex-shrink:0}.help-button{display:flex;gap:9px;align-items:center;border:1px solid #25474a;background:#234649;color:#fff;border-radius:6px;min-height:43px;padding:10px 17px;font-size:13px;font-weight:500}.help-button>span{display:grid;place-items:center;border:1px solid #9daf9e;border-radius:50%;width:16px;height:16px;font-size:11px;color:#ded8b8}.help-button:hover{background:#17383b;border-color:#17383b}.header-actions .text-button{font-size:12px;color:#5a706c}.header-actions .text-button>span{margin-left:6px;color:#a58e60}.navigation-bar{border-top:1px solid #e5e8e0;border-bottom:1px solid #d8ded6;background:#f4f6f0;display:flex;align-items:center;justify-content:space-between;padding:0 max(35px,calc((100vw - 1460px)/2));gap:20px;min-height:49px}.section-nav{display:flex;gap:28px;align-self:stretch}.section-nav a{color:#698078;text-decoration:none;font-size:13px;padding:14px 0 12px;border-bottom:2px solid transparent;white-space:nowrap;transition:color .18s,border-color .18s}.section-nav a:hover{color:#173438}.section-nav a.active{color:#173438;border-color:#ad925a;font-weight:600}.section-nav a>span{font-size:10px;color:#8b9a88;margin-left:5px;vertical-align:top}.navigation-caption{font:9px "Segoe UI",sans-serif;letter-spacing:1.8px;color:#8d998b;white-space:nowrap;display:flex;align-items:center;gap:12px}.navigation-caption i{height:3px;width:3px;border-radius:50%;background:#b9a570}.primary{background:#214448!important;border:1px solid #214448!important;color:#fff!important;box-shadow:0 2px 5px #1734380d}.primary:hover:enabled{background:#16373b!important;border-color:#16373b!important}.secondary,.tool-grid button,.study-actions button:not(.primary),.replay-controls button{border-color:#d7e0da;background:#fff;border-radius:8px;color:#355550;transition:background .16s,border-color .16s,box-shadow .16s,transform .08s}.secondary:hover:enabled,.tool-grid button:hover:enabled,.study-actions button:not(.primary):hover:enabled,.replay-controls button:hover:enabled{background:#edf4ed;border-color:#aabeb1;box-shadow:0 2px 6px #233f350a}button:active:enabled{transform:translateY(1px)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #ac925e;outline-offset:4px}.board-actions #stop-analysis{border-color:#e6dbd1;background:#fbf8f3;color:#916449}.board-actions #stop-analysis:hover:enabled{background:#f4e9df;border-color:#cfae94}button:disabled{opacity:.42;box-shadow:none!important}.board-actions{gap:10px}.board-actions button{min-height:47px}.board-toolbar button{border-radius:6px;min-height:36px}.board-toolbar button:hover:enabled{background:#e8efea}.mode-switch button.active{color:#173438;font-weight:600;box-shadow:0 1px 5px #17343812}.research-panel summary,.advanced-settings summary{border-radius:6px}.research-panel summary:hover,.advanced-settings summary:hover{color:#28584c}.learning-actions button:hover:enabled{background:#edf4ed;border-color:#aabeb1}.replay-controls button{font-family:"Segoe UI",sans-serif;font-size:23px;font-weight:400}.game-status{padding-left:12px;border-left:2px solid #c5ad7d;min-height:0;margin:8px 0 4px}.analysis-legend{background:#edf2eb;border:1px solid #dfe6dc;border-radius:8px;padding:13px 15px;margin:8px 0 20px}.analysis-legend strong{font-size:14px;font-weight:600}.board-actions #empty{font-size:13px}.study-actions{gap:10px}.research-panel .study-actions{flex-wrap:wrap}.research-panel .study-actions button{min-width:120px;padding:10px}.help-dialog{border-top:3px solid #b29a65}dialog::backdrop{background:#102b2c80;backdrop-filter:blur(3px)}
@media(max-width:1120px){.brand-philosophy{display:none}.masthead{padding:22px 25px}.navigation-bar{padding:0 25px}}
@media(max-width:700px){.masthead{padding:16px;min-height:90px;gap:12px;flex-wrap:nowrap}.brand{gap:10px}.brand-seal{width:39px;height:47px}.brand-seal>span{font-size:25px}.brand-seal i{width:3px;height:3px;right:8px;bottom:8px}.brand-wordmark{font-size:23px;letter-spacing:3px}.brand-wordmark small{font-size:9px;letter-spacing:1px;margin-top:7px}.brand-divider{margin:0 3px}.header-actions{gap:2px;align-items:flex-end;flex-direction:column}.help-button{min-height:32px;padding:6px 9px;font-size:11px;border-radius:5px;gap:5px}.help-button>span{width:13px;height:13px;font-size:9px}.header-actions .text-button{font-size:10px;padding:3px 0;min-height:24px}.header-actions .text-button>span{margin-left:3px}.navigation-bar{padding:0 16px;min-height:45px;gap:0}.section-nav{width:100%;justify-content:space-between;gap:15px}.section-nav a{font-size:12px;padding:13px 0 10px}.navigation-caption{display:none}.section-nav a>span{font-size:9px}.board-actions button{min-height:48px}.board-actions #game-status{padding-left:10px;margin-top:4px}.analysis-legend{padding:11px 12px}.opening-list{max-height:430px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}

.back-to-top{position:fixed;right:18px;bottom:18px;z-index:20;width:44px;min-height:49px;background:#fcfcf8;border:1px solid #cbd6cd;box-shadow:0 3px 14px #17343815;border-radius:8px;text-decoration:none;color:#355550;text-align:center;font:20px "Segoe UI",sans-serif;padding:5px}.back-to-top span{display:block;font-size:9px;letter-spacing:1px}.back-to-top:hover{background:#e8f0e8}.back-to-top[hidden]{display:none}#site-top:focus{outline:none}

/* Keep replay next to the board; maximize the portrait playing surface. */
.board-replay{display:flex;align-items:center;gap:16px;margin:10px 0 0}.board-replay .replay-controls{margin:0;flex:0 0 190px;gap:6px}.board-replay .replay-controls button{min-height:34px;font-size:19px}.board-replay .replay-label{flex:1;min-width:0;white-space:nowrap}.replay-label input{accent-color:#315e56}.board-toolbar{margin:8px 0 12px}.board-actions{padding-top:8px}.board-actions button{min-height:40px;padding:9px 11px;font-size:13px}.board-actions #empty{min-height:36px;font-size:12px}
@media(max-width:700px){:root main{padding:14px 0 20px;gap:20px}:root .workspace{padding:0!important;width:100%;min-width:0}:root .board-wrap{width:100%;border-width:2px!important;border-radius:0;box-shadow:none}:root #board{width:100%;max-width:none}:root .board-heading{padding:0 12px 12px}:root .board-replay{display:grid;grid-template-columns:1fr;gap:7px;margin:0;padding:10px 12px 5px}:root .board-replay .replay-controls{margin:0;gap:6px}:root .board-replay .replay-controls button{min-height:32px;height:32px;font-size:19px;padding:0}:root .board-replay .replay-label{font-size:11px;gap:8px}:root .board-toolbar{margin:0 12px 8px;font-size:12px}:root .board-toolbar button{min-height:32px;padding:4px 8px;font-size:12px}:root .board-toolbar button span{display:inline}:root .board-toolbar label{font-size:11px}:root .board-actions{padding:0 12px 8px;gap:6px}:root .board-actions button{min-height:36px;height:auto;padding:8px 10px;font-size:12px;border-radius:7px}:root .board-actions #empty{min-height:32px;padding:6px 9px}:root .board-actions #game-status{font-size:11px;padding-top:5px;padding-bottom:5px}:root .workspace>.analysis-legend,:root .workspace>.research-panel,:root .workspace>.position-note,:root .workspace>.study-panel{margin-left:12px;margin-right:12px}:root .play,:root .library{width:calc(100% - 24px);margin:0 12px}:root .tool-grid button,:root .study-actions button{min-height:36px;font-size:12px;padding:7px 9px}.back-to-top{right:10px;bottom:12px;width:36px;min-height:41px;font-size:17px}}

.global-language{display:flex;align-items:center;gap:8px;font-size:12px;color:#607579}.global-language select{max-width:130px;min-height:36px;border:1px solid #d1dfdb;border-radius:8px;background:#fff;padding:6px;color:#20393d;font:inherit}.global-language span{white-space:nowrap}.study-button:disabled{opacity:.5;cursor:default}
@media(max-width:700px){.header-actions{flex-wrap:wrap;justify-content:flex-end;gap:6px}.global-language{gap:4px}.global-language span{display:none}.global-language select{max-width:100px}.masthead{gap:12px}.study-entry,.study-button,.study-filter{overflow-wrap:anywhere}}
/* Narrow phones: allow translated navigation labels to wrap within the viewport. */
@media(max-width:380px){.section-nav{gap:12px}.section-nav a{flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}}
