:root{--ink:#14231e;--ink-soft:#506059;--forest:#17362c;--forest-deep:#0f2922;--sage:#6f8879;--paper:#f2eee5;--paper-deep:#e8e1d3;--cream:#fbf8f1;--line:#14231e21;--brass:#bd9350;--brass-ink:#80602c;--coral:#dc6c50;--coral-dark:#b84d37;--coral-ink:#963c2b;--success:#256344;--danger:#a6463d;--shadow:0 20px 60px #18262021;--shadow-soft:0 10px 30px #18262017}*{box-sizing:border-box}html{background:var(--paper);min-width:320px}body{background:radial-gradient(circle at 15% -10%, #bd935021, transparent 30rem), linear-gradient(135deg, #ffffff8c, transparent 52%), var(--paper);color:var(--ink);min-height:100vh;margin:0;font-family:Inter,PingFang SC,Microsoft YaHei,system-ui,sans-serif}button,input,select{color:inherit;font:inherit}button,select{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--forest-deep);outline-offset:3px;box-shadow:0 0 0 3px var(--cream)}a{color:inherit}.studio-shell{min-height:100vh}.topbar{background:var(--cream);border-bottom:1px solid var(--line);z-index:30;grid-template-columns:1fr auto 1fr;align-items:center;height:72px;padding:0 24px;display:grid;position:sticky;top:0}.brand{text-align:left;background:0 0;border:0;justify-self:start;align-items:center;gap:11px;padding:0;display:flex}.brand-mark{background:var(--forest);color:#fff9ed;border-radius:12px 4px;justify-content:center;align-items:center;width:42px;height:42px;font-family:Georgia,serif;font-size:25px;display:flex;box-shadow:0 7px 18px #17362c38}.language-switcher{border:1px solid var(--line);background:var(--cream);border-radius:999px;flex-shrink:0;gap:2px;padding:3px;display:inline-flex}.topbar-tools{justify-self:end;align-items:center;gap:12px;display:flex}.library-toolbar{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;display:flex}.language-switcher button{color:var(--ink-soft);background:0 0;border:0;border-radius:999px;padding:5px 9px;font-size:12px}.language-switcher button[aria-pressed=true]{background:var(--forest);color:var(--cream)}.topbar-status{flex-wrap:wrap;gap:7px}html[lang=en] .brand strong{letter-spacing:.03em}html[lang=en] .brand small{letter-spacing:0}html[lang=en] .player-editor-heading small{line-height:1.5}.privacy-page{max-width:800px;margin:0 auto;padding:24px 20px 64px}.privacy-header{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:18px;margin-bottom:28px;padding-bottom:24px;display:flex}.privacy-page h1{font-family:Georgia,Songti SC,serif;font-size:clamp(30px,5vw,44px)}.privacy-page h2{margin-top:30px;font-size:19px}.privacy-page p{color:var(--ink-soft);line-height:1.85}.admin-page{overflow-wrap:anywhere}.admin-page .privacy-header{flex-wrap:wrap}.admin-page button{white-space:normal;max-width:100%;min-height:44px;margin:4px 8px 4px 0}.admin-page button:focus-visible,.admin-page input:focus-visible{outline:3px solid var(--forest);outline-offset:3px}.admin-enrollment,.admin-confirm{border:1px solid var(--line);background:var(--cream);border-radius:12px;margin-top:20px;padding:20px}.admin-enrollment label{font-weight:700;display:block}.admin-enrollment input{box-sizing:border-box;border:1px solid var(--ink-soft);width:100%;min-height:44px;color:var(--ink);background:#fff;border-radius:6px;margin:12px 0;padding:10px;display:block}.admin-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;display:grid}.admin-facts dt{font-weight:700}.admin-facts dd{margin:0}.admin-actions{flex-wrap:wrap;gap:8px;margin-top:24px;display:flex}.brand>span:last-child{flex-direction:column;gap:1px;display:flex}.brand strong{letter-spacing:.18em;font-family:Songti SC,SimSun,Georgia,serif;font-size:19px}.brand small{color:var(--ink-soft);letter-spacing:.11em;font-size:10px}.main-nav{background:#14231e0e;border:1px solid #14231e0f;border-radius:999px;align-items:center;gap:2px;padding:4px;display:flex}.main-nav button{color:var(--ink-soft);background:0 0;border:0;border-radius:999px;padding:8px 18px;font-size:13px;font-weight:650}.main-nav button:hover,.main-nav button.is-active{background:var(--cream);color:var(--ink);box-shadow:0 2px 10px #14231e14}.main-nav button:disabled{cursor:wait;opacity:.45}.topbar-status{color:var(--ink-soft);justify-self:end;align-items:center;gap:7px;font-size:12px;display:flex}.sync-dot{background:var(--sage);border-radius:50%;width:7px;height:7px;box-shadow:0 0 0 4px #6f88791f}.sync-dot--saving,.sync-dot--loading{background:var(--brass);animation:1.2s ease-in-out infinite pulse}.sync-dot--session{background:#a69b86}.sync-dot--conflict,.sync-dot--corrupt{background:var(--danger);box-shadow:0 0 0 4px #a6463d1f}.sync-actions{gap:4px;display:inline-flex}.sync-actions button{border:1px solid var(--line);color:var(--ink);background:0 0;border-radius:999px;padding:3px 7px;font-size:9px}.studio-grid{grid-template-columns:minmax(248px,286px) minmax(500px,1fr) minmax(320px,365px);gap:18px;max-width:1680px;min-height:calc(100vh - 72px);margin:0 auto;padding:18px;display:grid}.setup-panel,.coach-panel{box-shadow:var(--shadow-soft);background:#fbf8f1c7;border:1px solid #14231e17;border-radius:18px;min-width:0}.setup-panel{align-self:start;padding:23px;position:sticky;top:90px}.panel-heading h2,.coach-header h2,.library-header h1,.replay-title-row h2,.trainer-sidebar h2{font-family:Songti SC,SimSun,Georgia,serif;font-weight:700}.panel-heading h2{margin:6px 0 7px;font-size:24px}.panel-heading p,.library-header p,.replay-title-row p,.trainer-sidebar p{color:var(--ink-soft);margin:0;font-size:12px;line-height:1.65}.eyebrow{color:var(--brass-ink);letter-spacing:.18em;text-transform:uppercase;font-size:9px;font-weight:800;display:block}.player-editor{border:1px solid var(--line);background:#ffffff75;border-radius:13px;margin-top:19px;padding:14px}.player-editor-heading{align-items:center;gap:10px;margin-bottom:12px;display:flex}.player-editor-heading>div{flex-direction:column;display:flex}.player-editor-heading strong{font-size:13px}.player-editor-heading small{color:var(--ink-soft);font-size:10px}.color-chip{border:1px solid #14231e29;border-radius:50%;width:21px;height:21px;display:block;box-shadow:inset 0 0 0 4px #14231e0f}.color-chip--w{background:#fffdf7}.color-chip--b{background:var(--forest-deep);border-color:var(--forest-deep)}.control-field,.search-field{flex-direction:column;gap:5px;margin-top:10px;display:flex}.control-field>span,.search-field>span{color:var(--ink-soft);letter-spacing:.03em;font-size:10px;font-weight:700}.control-field input,.control-field select,.search-field input{appearance:none;background:var(--cream);border:1px solid #14231e24;border-radius:8px;width:100%;min-height:38px;padding:8px 10px;font-size:12px}.control-field select{appearance:auto;padding-right:24px}input::placeholder,textarea::placeholder{color:var(--ink-soft);opacity:1}.control-field small{color:var(--ink-soft);font-size:9px;line-height:1.5}.versus-rule{color:var(--brass-ink);justify-content:center;align-items:center;gap:8px;margin:10px 0 -8px;font-family:Georgia,serif;font-size:9px;display:flex}.versus-rule:before,.versus-rule:after{background:var(--line);content:"";flex:1;height:1px}.learning-toggle{cursor:pointer;background:#17362c0e;border-radius:11px;grid-template-columns:auto 1fr;align-items:center;gap:10px;margin:16px 0 12px;padding:11px;display:grid}.learning-toggle input{opacity:0;width:1px;height:1px;position:absolute}.toggle-track{background:#b8b4a9;border-radius:999px;width:38px;height:22px;padding:3px;transition:background .16s}.toggle-track span{background:#fff;border-radius:50%;width:16px;height:16px;transition:transform .16s;display:block;box-shadow:0 2px 5px #14231e2e}.learning-toggle input:checked+.toggle-track{background:var(--success)}.learning-toggle input:checked+.toggle-track span{transform:translate(16px)}.learning-toggle:has(input:focus-visible){outline:3px solid var(--forest-deep);outline-offset:3px;box-shadow:0 0 0 3px var(--cream)}.learning-toggle>span:last-child{flex-direction:column;gap:2px;display:flex}.learning-toggle strong{font-size:11px}.learning-toggle small{color:var(--ink-soft);font-size:9px;line-height:1.4}.primary-button,.quiet-button,.text-button,.source-inline{border:0}.primary-button{background:var(--forest);color:#fffaf0;border-radius:9px;min-height:41px;padding:10px 15px;font-size:12px;font-weight:750;transition:background .15s,transform .15s;box-shadow:0 8px 18px #17362c2b}.primary-button:hover{background:var(--forest-deep);transform:translateY(-1px)}.primary-button:disabled{cursor:wait;opacity:.55;transform:none}.primary-button--small{white-space:nowrap;min-height:36px}.full-width{width:100%}.quiet-button{background:#14231e0f;border:1px solid #14231e12;border-radius:8px;padding:8px 12px;font-size:11px;font-weight:650}.quiet-button:hover{background:#14231e1a}.engine-note{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}.draft-note{color:var(--ink-soft);text-align:center;margin-top:7px;font-size:8px;line-height:1.45;display:block}.setup-error{color:var(--danger);background:#a6463d17;border:1px solid #a6463d29;border-radius:8px;margin-top:9px;padding:9px;font-size:9px;line-height:1.5}.ai-config-status{color:var(--ink-soft);text-align:center;font-size:.76rem;line-height:1.45}.engine-note span{color:var(--brass-ink);letter-spacing:.08em;font-size:9px;font-weight:800}.engine-note p{color:var(--ink-soft);margin:4px 0 0;font-size:9px;line-height:1.6}.board-stage{flex-direction:column;align-self:start;align-items:center;min-width:0;padding:0 8px;display:flex}.player-strip{justify-content:space-between;align-items:center;width:100%;max-width:min(72vh,720px);padding:7px 3px;display:flex}.player-identity{align-items:center;gap:10px;display:flex}.player-identity>div{flex-direction:column;display:flex}.player-identity strong{font-size:12px}.player-identity small{color:var(--ink-soft);font-size:9px}.avatar{border:1px solid #14231e24;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;font-family:Georgia,serif;font-size:19px;display:flex}.avatar--b{background:var(--forest-deep);border-color:var(--forest-deep);color:#fffaf0}.avatar--w{color:var(--forest-deep);background:#fffdf7}.turn-pill{color:var(--ink-soft);background:#14231e0f;border-radius:999px;padding:5px 9px;font-size:9px;font-weight:700}.turn-pill.is-turn{color:var(--success);background:#347b5a21}.board-frame{background:#d1b27a;border:8px solid #28463a;border-radius:7px;width:100%;max-width:min(72vh,720px);padding:4px;box-shadow:0 28px 55px #12231d33,inset 0 0 0 1px #ffffff3b}.chess-board{aspect-ratio:1;flex-direction:column;width:100%;display:flex;overflow:hidden;container-type:inline-size}.board-row{flex:1;min-height:0;display:flex}.board-square{touch-action:manipulation;border:0;flex:1;justify-content:center;align-items:center;min-width:0;min-height:0;padding:0;display:flex;position:relative}.board-square--light{background:#e9dec3}.board-square--dark{background:#69816f}.board-square:hover:not(:disabled){filter:brightness(1.05)}.board-square:disabled{cursor:default;opacity:1}.board-square.is-last:before,.board-square.is-selected:before{content:"";pointer-events:none;position:absolute;inset:0}.board-square.is-last:before{background:#e2b24a70}.board-square.is-selected:before{box-shadow:inset 0 0 0 3px var(--ink);background:#dc6c5085}.chess-piece{z-index:2;font-family:Arial Unicode MS,Segoe UI Symbol,Georgia,serif;font-size:min(10cqw,58px);line-height:1;position:relative;transform:translateY(-1px)}.chess-board--compact .chess-piece{font-size:min(10cqw,48px)}.chess-piece--w{color:#fffdf3;text-shadow:-1px -1px #1b2d26,1px -1px #1b2d26,-1px 1px #1b2d26,1px 1px #1b2d26,0 3px 3px #14231e40}.chess-piece--b{color:#172b24;text-shadow:0 2px 2px #ffffff2e}.target-dot{background:var(--ink);border:2px solid var(--cream);z-index:4;border-radius:50%;width:20%;height:20%;position:absolute}.board-square:has(.chess-piece) .target-dot{border:4px solid var(--ink);background:0 0;width:82%;height:82%}.coord{background:var(--cream);z-index:5;border-radius:2px;padding:1px 2px;font-size:clamp(7px,.66vw,10px);font-weight:800;position:absolute}.coord--file{bottom:2px;right:4px}.coord--rank{top:2px;left:3px}.board-square--light .coord,.board-square--dark .coord{color:var(--ink)}.board-toolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;width:100%;max-width:min(72vh,720px);padding:8px 3px 0;display:flex}.board-toolbar>div{flex:180px;grid-template-columns:auto auto;align-items:center;gap:0 7px;min-width:0;display:grid}.board-toolbar>button{white-space:nowrap;flex-shrink:0;min-height:44px}.undo-note{color:var(--ink-soft);max-width:min(72vh,720px);font-size:12px;line-height:1.5}.fen-tools{min-width:0;margin-top:12px}.clock-settings{overflow-wrap:anywhere;margin-top:12px;font-size:12px}.clock-settings label{justify-content:space-between;align-items:center;gap:8px;min-height:44px;margin:8px 0;display:flex}.clock-toggle{min-height:44px;margin-top:12px}.dead-verification button{min-height:44px}.clock-settings input[type=number],.clock-settings select{width:52%;min-width:0;min-height:44px;font-size:16px}.clock-settings input[type=checkbox]{width:20px;height:20px}.match-clocks{gap:8px;width:100%;max-width:min(72vh,720px);margin:10px 0;display:flex}.clock-side{border:1px solid var(--line);background:var(--cream);border-radius:8px;flex-wrap:wrap;flex:1;align-items:center;gap:4px 8px;min-width:0;padding:8px 10px;display:flex}.clock-side.is-running{border-color:var(--forest)}.clock-side strong{font-variant-numeric:tabular-nums;font-family:ui-monospace,monospace;font-size:24px}.clock-side small{font-size:11px}.fen-tools button{white-space:normal;min-height:44px}.fen-setup{overflow-wrap:anywhere;margin-top:12px;font-size:12px}.fen-setup label{gap:6px;margin-top:12px;display:grid}.fen-input{border:1px solid var(--line);background:var(--cream);width:100%;min-width:0;min-height:44px;color:var(--ink);border-radius:8px;padding:9px;font-family:ui-monospace,monospace;font-size:16px}.board-toolbar strong{font-size:11px}.board-toolbar small{color:var(--ink-soft);grid-column:2;font-size:9px}.status-light{background:var(--success);border-radius:50%;grid-row:span 2;width:8px;height:8px}.status-light--thinking{background:var(--brass);animation:1s ease-in-out infinite pulse}.status-light--review{background:var(--coral)}.status-light--preHint{background:var(--brass)}.status-light--error{background:var(--danger)}.status-light--ended{background:#6a6d6a}.sr-announcement{clip:rect(0, 0, 0, 0);width:1px;height:1px;margin:-1px;position:absolute;overflow:hidden}.coach-panel{align-self:start;min-height:calc(100vh - 108px);position:sticky;top:90px;overflow:hidden}.coach-header{background:var(--forest);color:#fffaf0;justify-content:space-between;align-items:flex-start;padding:22px 22px 18px;display:flex}.coach-header .eyebrow,.source-card .eyebrow{color:var(--brass)}.coach-header h2{margin:5px 0 0;font-size:22px}.coach-tabs{border-bottom:1px solid var(--line);background:#17362c0e;grid-template-columns:1fr 1fr;padding:0 18px;display:grid}.coach-tabs button{color:var(--ink-soft);background:0 0;border:0;border-bottom:2px solid #0000;padding:13px 8px 11px;font-size:11px;font-weight:700}.coach-tabs button.is-active{border-color:var(--coral);color:var(--ink)}.coach-tabs button:disabled{cursor:not-allowed;opacity:.42}.coach-content{padding:17px 19px 6px}.coach-disabled{color:var(--ink-soft);text-align:center;flex-direction:column;align-items:center;padding:46px 26px 36px;display:flex}.coach-disabled>span{color:var(--ink-soft);font-family:Georgia,serif;font-size:44px}.coach-disabled h3{color:var(--ink);margin:10px 0 4px;font-family:Songti SC,SimSun,Georgia,serif}.coach-disabled p{margin:0;font-size:10px;line-height:1.65}.coach-intro{color:var(--ink-soft);margin:0 0 11px;font-size:10px;line-height:1.6}.sample-note{border-left:3px solid var(--brass);background:#bd935017;justify-content:space-between;align-items:center;margin-bottom:12px;padding:8px 10px;display:flex}.sample-note strong{font-size:10px}.sample-note span{color:var(--ink-soft);text-align:right;font-size:8px}.hint-list{flex-direction:column;gap:8px;display:flex}.hint-card{border:1px solid var(--line);background:#ffffff7a;border-radius:11px;grid-template-columns:28px 48px 1fr;align-items:center;gap:4px 10px;padding:9px 10px;display:grid}.hint-rank{color:var(--ink-soft);grid-row:span 2;font-family:Georgia,serif;font-size:14px;font-style:italic}.hint-card>.text-button{grid-column:3}.hint-move{flex-direction:column;grid-row:span 2;display:flex}.hint-move strong{font-family:Georgia,serif;font-size:18px}.hint-move code{color:var(--ink-soft);font-size:8px}.hint-meta{align-items:center;gap:7px;display:flex}.hint-meta small,.no-source{color:var(--ink-soft);font-size:8px}.source-badge{letter-spacing:.08em;border-radius:999px;padding:3px 6px;font-size:7px;font-weight:800}.source-badge--book{color:var(--success);background:#347b5a1f}.source-badge--engine{color:var(--coral-dark);background:#dc6c501c}.text-button{color:var(--coral-ink);background:0 0;justify-self:start;padding:0;font-size:8px}.text-button:hover{text-decoration:underline}.review-content{flex-direction:column;gap:11px;display:flex}.review-content>p{color:var(--ink-soft);margin:0;font-size:10px;line-height:1.6}.review-candidates-heading{justify-content:space-between;align-items:end;margin-top:2px;display:flex}.review-candidates-heading strong{font-size:11px}.review-candidates-heading span{color:var(--ink-soft);text-align:right;font-size:8px}.review-hint-list .hint-card{background:#ffffff94}.hint-card--played{box-shadow:inset 3px 0 0 var(--success);border-color:#347b5a6b}.played-badge{background:var(--success);color:#fff;border-radius:999px;padding:3px 6px;font-size:7px;font-weight:800}.review-grade{background:linear-gradient(135deg,#347b5a24,#bd935014);border:1px solid #347b5a29;border-radius:13px;flex-direction:column;padding:14px;display:flex}.review-grade>span{color:var(--ink-soft);font-size:9px}.review-grade strong{color:var(--success);margin:3px 0;font-family:Songti SC,SimSun,Georgia,serif;font-size:28px}.review-grade--失误 strong,.review-grade--错过将杀 strong{color:var(--danger)}.review-grade--分析受限 strong{color:var(--ink-soft)}.review-grade small{font-family:ui-monospace,Consolas,monospace;font-size:9px}.review-metrics{grid-template-columns:1fr 1fr;gap:8px;display:grid}.review-metrics>div{background:#14231e0a;border-radius:9px;flex-direction:column;padding:9px 10px;display:flex}.review-metrics span{color:var(--ink-soft);font-size:8px}.review-metrics strong{font-family:Georgia,serif;font-size:15px}.source-inline{border:1px solid var(--line);text-align:left;background:#ffffff8f;border-radius:10px;flex-direction:column;padding:10px;display:flex}.source-inline span{color:var(--brass-ink);font-size:8px;font-weight:800}.source-inline strong{margin:2px 0;font-size:11px}.source-inline small{color:var(--ink-soft);font-size:8px}.continuation-card{border-bottom:1px solid var(--line);border-top:1px solid var(--line);background:#f8f1e4;margin-top:10px;padding:17px 19px;position:relative}.continuation-card h3{margin:5px 0 3px;font-family:Songti SC,SimSun,Georgia,serif;font-size:18px}.continuation-card>p,.continuation-card>a{color:var(--ink-soft);font-size:9px}.continuation-card>p{margin:0}.continuation-card>a{margin-top:8px;display:inline-block}.close-button{background:#14231e0f;border:0;border-radius:50%;width:24px;height:24px;position:absolute;top:12px;right:12px}.continuation-line{flex-wrap:wrap;gap:5px;margin:11px 0;display:flex}.continuation-line span{background:#14231e0f;border-radius:5px;padding:4px 6px;font-family:Georgia,serif;font-size:10px}.coach-action{padding:12px 19px}.thinking-row{color:var(--ink-soft);background:#bd935017;border-radius:9px;align-items:center;gap:10px;padding:10px;font-size:9px;display:flex}.thinking-dots{gap:3px;display:flex}.thinking-dots i{background:var(--brass);border-radius:50%;width:5px;height:5px;animation:1.1s ease-in-out infinite thinking}.thinking-dots i:nth-child(2){animation-delay:.12s}.thinking-dots i:nth-child(3){animation-delay:.24s}.error-box{color:var(--danger);background:#a6463d17;border:1px solid #a6463d29;border-radius:8px;margin-bottom:8px;padding:9px;font-size:9px;line-height:1.5}.training-archive-note{color:var(--ink-soft);margin:8px 0 12px;font-size:11px;line-height:1.6;display:block}.move-history{border-top:1px solid var(--line);margin-top:4px;padding:12px 19px 17px}.move-history-title{justify-content:space-between;align-items:center;margin-bottom:7px;display:flex}.move-history-title strong{font-size:10px}.move-history-title span{color:var(--ink-soft);font-size:8px}.move-history-scroll{scrollbar-width:thin;max-height:112px;overflow:auto}.history-row{grid-template-columns:26px 1fr 1fr;gap:7px;padding:3px 4px;font-family:Georgia,serif;font-size:10px;display:grid}.history-row:nth-child(odd){background:#14231e08}.history-row span,.history-row b:empty{color:var(--ink-soft)}.empty-history{color:var(--ink-soft);margin:0;font-size:9px;line-height:1.5}.modal-backdrop{z-index:100;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#0b1c179e;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.promotion-dialog{background:var(--cream);box-shadow:var(--shadow);overscroll-behavior:contain;border:1px solid #ffffff73;border-radius:16px;width:100%;max-width:390px;max-height:calc(100dvh - 40px);padding:24px;overflow-y:auto}.promotion-dialog h2{margin:7px 0 18px;font-family:Songti SC,SimSun,Georgia,serif}.promotion-dialog>button{min-height:44px;margin-top:8px}.promotion-options{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}.promotion-options button{background:var(--paper);border:1px solid var(--line);border-radius:9px;min-height:52px;font-weight:700}.promotion-options button:hover{background:var(--forest);color:#fff}.promotion-dialog>.text-button{margin-top:12px}.library-page{min-height:100vh;padding:30px clamp(18px,3vw,48px) 42px}.library-loading{color:var(--ink-soft);justify-content:center;align-items:center;min-height:100vh;font-family:Songti SC,SimSun,Georgia,serif;display:flex}.library-header{border-bottom:1px solid var(--line);grid-template-columns:auto 1fr auto;align-items:end;gap:24px;max-width:1480px;margin:0 auto 24px;padding-bottom:18px;display:grid}.library-header>div:nth-child(2){max-width:700px}.library-header h1{letter-spacing:-.03em;margin:5px 0 4px;font-size:clamp(28px,3vw,44px)}.segmented{background:#14231e0f;border-radius:999px;padding:4px;display:flex}.segmented button{color:var(--ink-soft);background:0 0;border:0;border-radius:999px;padding:8px 13px;font-size:11px;font-weight:700}.segmented button.is-active{background:var(--cream);color:var(--ink);box-shadow:0 3px 12px #14231e14}.library-layout{grid-template-columns:minmax(220px,270px) minmax(420px,700px) minmax(260px,340px);justify-content:center;gap:22px;max-width:1480px;margin:0 auto;display:grid}.archive-list,.score-panel,.trainer-sidebar,.trainer-coach{border:1px solid var(--line);box-shadow:var(--shadow-soft);background:#fbf8f1c2;border-radius:15px}.archive-list{align-self:start;padding:16px}.search-field{margin:0}.archive-count{color:var(--ink-soft);margin:10px 0;font-size:9px}.import-actions{justify-content:space-between;align-items:center;gap:8px;margin-top:10px;display:flex}.backup-actions{margin-top:-4px}.preview-actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.import-metadata{border:1px solid var(--line);background:color-mix(in srgb, var(--cream) 88%, transparent);border-radius:12px;padding:10px 12px}.import-metadata summary{cursor:pointer;font-weight:700}.import-metadata label{color:var(--ink-soft);gap:5px;margin-top:10px;font-size:.78rem;display:grid}.import-metadata input{border:1px solid var(--line);width:100%;min-width:0;color:var(--ink);background:var(--cream);border-radius:9px;padding:8px 9px}.import-metadata small{color:var(--ink-soft);margin-top:10px;line-height:1.5;display:block}.import-button{cursor:pointer;padding:7px 10px;font-size:10px;position:relative}.import-button input{opacity:0;cursor:pointer;width:100%;height:100%;display:block;position:absolute;inset:0}.import-button:focus-within{outline:3px solid var(--forest);outline-offset:3px}.import-report{border:1px solid var(--line);color:var(--ink-soft);background:#17362c0f;border-radius:8px;margin-top:9px;padding:8px;font-size:9px;line-height:1.5}.import-report strong,.import-report summary{color:var(--ink)}.import-report ul{margin:6px 0 0;padding-left:16px}.archive-scroll{flex-direction:column;gap:7px;max-height:calc(100vh - 220px);display:flex;overflow:auto}.archive-card{text-align:left;background:0 0;border:1px solid #0000;border-radius:10px;grid-template-columns:40px 1fr;gap:3px;padding:10px;display:grid}.archive-card:hover,.archive-card.is-active{background:#17362c0f;border-color:#17362c17}.archive-card strong{font-family:Songti SC,SimSun,Georgia,serif;font-size:13px}.archive-card>span:not(.archive-year),.archive-card small{color:var(--ink-soft);grid-column:2;font-size:8px}.archive-card .local-badge{color:var(--brass-ink);font-weight:700}.archive-year{color:var(--brass-ink);grid-row:span 3;padding-top:2px;font-family:Georgia,serif;font-size:10px}.replay-stage{min-width:0}.replay-title-row{justify-content:space-between;align-items:end;margin-bottom:12px;display:flex}.replay-title-row h2{margin:4px 0 2px;font-size:26px}.replay-title-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.replay-board-wrap{box-shadow:var(--shadow);background:#28463a;border-radius:7px;max-width:min(64vh,660px);margin:0 auto;padding:9px}.replay-controls{grid-template-columns:44px 44px 1fr 44px 44px;align-items:center;gap:6px;max-width:min(64vh,660px);margin:12px auto 0;display:grid}.replay-controls button{border:1px solid var(--line);background:#14231e0f;border-radius:7px;min-height:44px}.replay-controls button:disabled{cursor:not-allowed;opacity:.35}.replay-controls span{color:var(--ink-soft);text-align:center;font-size:10px}.replay-controls .replay-play{grid-column:1/4}.replay-controls .replay-flip{grid-column:4/6}.replay-controls .replay-note{grid-column:1/-1;line-height:1.5}.score-panel{align-self:start;overflow:hidden}.source-card{background:var(--forest);color:#fffaf0;padding:18px}.source-card h3{margin:6px 0;font-family:Songti SC,SimSun,Georgia,serif;font-size:17px}.source-card p,.source-card a{color:#fffaf0ad;font-size:9px;line-height:1.55}.local-source-note{color:#efd49d;margin-top:5px;font-size:9px;display:block}.source-card a{color:#efd49d;margin-top:5px;display:block}.source-trace{border-top:1px solid #fffaf029;border-bottom:1px solid #fffaf029;gap:4px;margin:12px 0;padding:9px 0;display:grid}.source-trace span,.source-trace code{color:#fffaf0b8;font-size:9px}.source-trace code{overflow-wrap:anywhere}.move-sheet{max-height:calc(100vh - 350px);padding:12px;overflow:auto}.move-sheet-row{grid-template-columns:27px 1fr 1fr;gap:5px;font-family:Georgia,serif;font-size:11px;display:grid}.move-sheet-row>span{color:var(--ink-soft);padding:6px 3px}.move-sheet-row button{text-align:left;background:0 0;border:0;border-radius:5px;padding:6px}.move-sheet-row button:hover,.move-sheet-row button.is-current{color:var(--coral-ink);background:#dc6c501f}.move-sheet-row button:disabled{cursor:default}.memorize-layout{grid-template-columns:minmax(220px,270px) minmax(440px,680px) minmax(240px,310px);justify-content:center;gap:22px;max-width:1400px;margin:0 auto;display:grid}.trainer-sidebar,.trainer-coach{align-self:start;padding:20px}.trainer-sidebar h2{margin:6px 0 4px;font-size:24px}.trainer-sidebar .control-field{margin:20px 0 10px}.trainer-sidebar .checkbox-row{align-items:flex-start;gap:9px;margin:14px 0;display:flex}.trainer-sidebar .checkbox-row input{margin-top:3px}.trainer-sidebar .checkbox-row span,.trainer-sidebar .checkbox-row small{display:block}.trainer-sidebar .checkbox-row small{color:var(--ink-soft);margin-top:3px;font-size:8px;line-height:1.5}.trainer-stats{border-bottom:1px solid var(--line);border-top:1px solid var(--line);grid-template-columns:repeat(4,1fr);margin:18px 0 14px;padding:14px 0;display:grid}.trainer-stats>div{flex-direction:column;align-items:center;display:flex}.trainer-stats strong{font-family:Georgia,serif;font-size:20px}.trainer-stats span{color:var(--ink-soft);font-size:8px}.progress-track{background:#14231e14;border-radius:999px;height:7px;margin-bottom:5px;overflow:hidden}.progress-track span{background:var(--coral);border-radius:inherit;height:100%;transition:width .2s;display:block}.trainer-sidebar>small{color:var(--ink-soft);font-size:8px}.trainer-board{box-shadow:var(--shadow);background:#28463a;border-radius:8px;padding:9px}.trainer-coach h3{margin:6px 0;font-family:Songti SC,SimSun,Georgia,serif;font-size:23px}.trainer-coach>p{color:var(--ink-soft);min-height:55px;font-size:10px;line-height:1.7}.answer-card{background:#bd93501c;border:1px solid #bd93502b;border-radius:10px;flex-direction:column;margin:12px 0;padding:12px;display:flex}.answer-card span,.answer-card small{color:var(--ink-soft);font-size:8px}.answer-card strong{font-family:Georgia,serif;font-size:24px}.branch-options{border-bottom:1px solid var(--line);border-top:1px solid var(--line);gap:7px;margin:12px 0;padding:12px 0;display:grid}.branch-options>strong,.branch-options>small{font-size:9px}.branch-options>small{color:var(--ink-soft)}.branch-options .answer-card{margin:0;padding:9px}.trainer-coach .primary-button{margin-top:10px}@keyframes pulse{0%,to{opacity:.45;transform:scale(.86)}50%{opacity:1;transform:scale(1)}}@keyframes thinking{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}@media (width<=1280px){.studio-grid{grid-template-columns:246px minmax(470px,1fr) 320px;gap:12px;padding:12px}.setup-panel{padding:17px}.board-frame,.player-strip,.board-toolbar{max-width:min(68vh,650px)}.library-layout,.memorize-layout{grid-template-columns:220px minmax(400px,1fr) 270px}}@media (width<=1040px){.studio-grid{grid-template-columns:minmax(470px,1fr) 330px}.setup-panel{grid-column:1/-1;grid-template-columns:1fr 1fr 1fr;gap:10px;display:grid;position:static}.setup-panel .panel-heading,.setup-panel .engine-note{grid-column:1/-1}.setup-panel .player-editor{margin:0}.setup-panel .versus-rule{display:none}.setup-panel .learning-toggle,.setup-panel>.primary-button{align-self:end;margin:0}.coach-panel{min-height:0;position:static}.board-stage{position:sticky;top:85px}.library-layout,.memorize-layout{grid-template-columns:minmax(200px,250px) minmax(420px,1fr)}.score-panel,.trainer-coach{grid-column:1/-1}.score-panel{grid-template-columns:250px 1fr;display:grid}.move-sheet{max-height:250px}}@media (width<=840px){.topbar{grid-template-columns:1fr auto;gap:8px;height:auto;min-height:72px;padding:10px 14px}.topbar .main-nav{grid-area:2/1/auto/-1;justify-self:center}.topbar-tools{grid-area:1/2}.library-toolbar{justify-content:flex-start}.brand small,.topbar-status{display:none}.topbar-tools:has(.sync-actions,.sync-dot--session){flex-wrap:wrap;grid-area:3/1/auto/-1;justify-content:space-between;width:100%}.topbar-status:has(.sync-actions,.sync-dot--session){flex:1;justify-content:flex-end;min-width:0;display:flex}.sync-actions{flex-wrap:wrap}.sync-actions button{min-height:44px;padding:6px 10px;font-size:12px}.brand-mark{width:36px;height:36px}.main-nav{justify-self:end}.main-nav button{padding:7px 10px;font-size:11px}.studio-grid{flex-direction:column;padding:10px;display:flex}.board-stage{order:1;padding:0;position:static}.setup-panel{order:2;padding:18px;display:block}.setup-panel .player-editor{margin-top:15px}.setup-panel .learning-toggle,.setup-panel>.primary-button{margin-top:13px}.coach-panel{order:3}.board-frame,.player-strip,.board-toolbar{max-width:100%}.board-frame{border-width:5px;padding:2px}.chess-piece{font-size:min(10cqw,54px)}.player-strip{padding:6px 2px}.library-page{padding:18px 12px 32px}.library-header{grid-template-columns:1fr;align-items:start;gap:12px}.library-header>.quiet-button{justify-self:start}.segmented{justify-self:stretch}.segmented button{flex:1}.library-layout,.memorize-layout{flex-direction:column;display:flex}.archive-list{order:2}.replay-stage{order:1}.score-panel{order:3;display:block}.archive-scroll{max-height:330px}.replay-board-wrap,.replay-controls{max-width:100%}.trainer-board{order:1;padding:5px}.trainer-sidebar{order:2}.trainer-coach{order:3}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.engine-variation .chess-board{width:100%}.variation-controls{flex-wrap:wrap;gap:6px;margin-top:12px;display:flex}.engine-variation .continuation-line{flex-wrap:wrap}.pgn-study{min-width:0;margin-top:16px}.pgn-study .chess-board{width:100%}.pgn-study-comment{white-space:pre-wrap;overflow-wrap:anywhere}.pgn-study [role=status]{overflow-wrap:anywhere}.local-library-recovery{overflow-wrap:anywhere;max-width:760px;margin-top:24px}.local-library-recovery .quiet-button{margin:4px}.local-library-recovery input[type=file]{max-width:100%}.library-loading--recovery{flex-direction:column;align-items:stretch;padding:24px}.local-library-recovery .primary-button{white-space:normal;max-width:100%}.library-loading--recovery button,.local-library-recovery .import-button,.library-load-state>button{white-space:normal;align-items:center;min-height:44px;font-size:14px;line-height:1.4;display:inline-flex}.library-load-state{overflow-wrap:anywhere}.library-load-state>button{min-width:44px;max-width:100%;margin:4px 8px 4px 0;padding:10px 14px}
