/* Generated by scripts/build-styles.js. Edit the source stylesheets. */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap');
.review-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.review-options a{flex:1 1 170px;border:1px solid #64705c;border-radius:7px;padding:13px 10px;text-align:center;font-size:12px;text-decoration:none;color:#e0e6d8;transition:background .2s}
.review-options a:hover{background:#354332;border-color:#c4b48b}
.review-note{font-size:11px;line-height:1.65;color:#b1bda8;margin:12px 0 0}
:root{--ink:#242824;--paper:#f7f7f2;--gold:#b69c67;--muted:#747a72;--line:#e0e3da;--dark:#202923}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input{font:inherit}
a{color:inherit}
.site-header{height:92px;max-width:1280px;margin:auto;padding:0 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:24px;letter-spacing:-1px;font-weight:700}
.brand-mark{font:37px Georgia,serif;color:var(--dark)}
.utility{font-size:12px;color:var(--muted)}
main{max-width:1184px;margin:0 auto;padding:0 24px}
.intro{position:relative;padding:47px 0 40px}
.eyebrow{font:500 10px 'DM Mono',monospace;letter-spacing:2px;color:#7e7259;margin:0 0 20px}
.intro h1{font:400 clamp(48px,5.4vw,72px)/.98 'Libre Caslon Display',Georgia,serif;letter-spacing:-1.9px;margin:0}
.intro h1 em{font-style:normal;color:#899381}
.lede{position:absolute;right:10px;bottom:40px;font-size:15px;line-height:1.8;color:var(--muted);margin:0}
.workspace{display:grid;grid-template-columns:1fr 1.13fr;border:1px solid var(--line);border-radius:15px;overflow:hidden;background:white;box-shadow:0 12px 40px #26332108;min-height:485px}
.form-panel{padding:28px 36px 26px}
.panel-number{font:11px 'DM Mono',monospace;letter-spacing:1px;color:var(--muted);margin-bottom:29px}
.form-panel h2{font-size:25px;letter-spacing:-.7px;margin:0 0 8px;font-weight:600}
.panel-description{font-size:13px;color:var(--muted);margin:0 0 27px;line-height:1.6}
form{display:grid;gap:16px}
label{display:block;font-weight:500;font-size:12px;margin-bottom:9px}
form>label{margin-bottom:-8px}
.url-field{position:relative}
.url-field>span{position:absolute;left:14px;top:14px;color:#838e7e}
.url-field input{padding-left:38px}
input{width:100%;height:48px;border:1px solid #dce0d7;background:#fafbf8;border-radius:7px;padding:0 13px;outline:none;color:var(--ink);font-size:13px;transition:border-color .15s,box-shadow .15s}
input::placeholder{color:#9b9f94;font-size:12px}
input:focus{border-color:#8b997f;box-shadow:0 0 0 3px #dbe3d37a}
input[type=number]{font:18px 'DM Mono',monospace}
.number-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:5px}
button,.download{height:49px;display:flex;align-items:center;justify-content:center;gap:15px;border:0;border-radius:7px;background:var(--dark);color:white;font-size:13px;font-weight:500;text-decoration:none;cursor:pointer;transition:background .2s,transform .2s}
button:hover{background:#344539}
button:active,.download:active{transform:translateY(1px)}
button:disabled{opacity:.65;cursor:wait}
button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
.privacy{font-size:10px;color:#7d8478;text-align:center;margin:15px 0 0;line-height:1.6}
.preview-panel{padding:28px 34px;background:var(--dark);color:#f2f3ea;position:relative;min-width:0}
.preview-panel .panel-number{color:#abb6a7}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:346px;text-align:center}
.board-graphic{width:172px;height:172px;border:7px solid #344335;border-radius:5px;background-color:#3d4c3c;background-image:conic-gradient(#66715a 25%,transparent 0 50%,#66715a 0 75%,transparent 0);background-size:40px 40px;display:grid;place-items:center;transform:rotate(-5deg);box-shadow:0 15px 25px #0002;margin:3px 0 26px}
.board-graphic span{font:100px/1 Georgia,'Times New Roman',serif;color:#e7dfc6;text-shadow:0 5px 3px #18241870;transform:rotate(5deg)}
.empty-state h3{font:400 25px 'Libre Caslon Display',Georgia,serif;margin:0 0 9px;letter-spacing:.1px}
.empty-state p{color:#a7b29f;font-size:12px;line-height:1.8;margin:0}
.loading-state{min-height:346px;display:grid;place-content:center;justify-items:center;gap:20px;font-size:13px;color:#abb6a7}
.pulse{height:35px;width:35px;border:2px solid #4e5d49;border-top-color:#d3c39b;border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.result-topline{display:flex;justify-content:space-between;gap:10px;font:10px 'DM Mono',monospace;color:#a8b6a0}
.result-topline>span:first-child{color:#d6c293}
.result-state h3{font:400 30px/1.12 'Libre Caslon Display',Georgia,serif;margin:20px 0;overflow-wrap:anywhere}
.players{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;border-block:1px solid #40503e;padding:17px 0;align-items:center}
.players>div{display:flex;align-items:center;gap:9px;min-width:0}
.players>div:last-child{flex-direction:row-reverse;text-align:right}
.players p{margin:0;display:grid;gap:5px;min-width:0}
.players small{font:9px 'DM Mono',monospace;letter-spacing:1px;color:#93a18a}
.players strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.piece{font:28px Georgia,serif}
.white-piece{color:#f0ead9}
.black-piece{color:#96a68a}
.players>span{font:11px 'DM Mono',monospace;color:#d6c293}
pre{height:115px;padding:14px;border:1px solid #3a4938;border-radius:6px;background:#19221d;color:#bfcbb7;font:10px/1.7 'DM Mono',monospace;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:18px 0}
.download{background:#d4c49c;color:#232b23}
.download:hover{background:#e5d9ba}
.error-state{margin:95px 0;display:flex;gap:14px;padding:22px;border:1px solid #796149;border-radius:8px;background:#ffffff05}
.error-state>span{font-size:24px;color:#e7be8c}
.error-state strong{font-size:15px}
.error-state p{font-size:13px;line-height:1.65;color:#c1c4b9;margin-bottom:0}
footer{max-width:1184px;padding:27px 24px 35px;margin:auto;display:flex;justify-content:space-between;gap:20px;color:#838a7d;font-size:10px}
@media(max-width:800px){.site-header{padding:0 24px;height:78px}.intro{padding-top:35px}.lede{position:static;margin-top:20px}.workspace{grid-template-columns:1fr 1fr}.form-panel,.preview-panel{padding:24px}.players{grid-template-columns:1fr}.players>div:last-child{flex-direction:row;text-align:left}.players>span{display:none}.board-graphic{width:145px;height:145px;background-size:33px 33px}}
@media(max-width:600px){main{padding:0 16px}.site-header{padding:0 20px}.utility{font-size:10px;max-width:105px;text-align:right;line-height:1.5}.intro h1{font-size:58px}.intro{padding:32px 4px}.lede{font-size:13px}.workspace{grid-template-columns:1fr}.form-panel,.preview-panel{padding:25px}.empty-state{min-height:330px}.board-graphic{width:166px;height:166px;background-size:38px 38px}footer{flex-direction:column;text-align:center;gap:12px;padding-bottom:25px}.panel-description{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Accessibility and workflow enhancements layered over the original visual system. */
@media(max-width:600px){#result-state:focus{outline:none}#mobile-engine-controls{padding-left:12px;padding-right:12px}}
@media(max-width:600px){main{padding-left:0;padding-right:0}.intro{margin-left:16px;margin-right:16px}.workspace{border-left:0;border-right:0;border-radius:0}.preview-panel{padding-left:0!important;padding-right:0!important}.preview-panel>.panel-number{margin-left:12px;margin-right:12px}.result-state:focus{outline:none}.result-state>.result-topline,.result-state>h3,.result-state>.event-details,.result-state>.players{margin-left:12px;margin-right:12px}.mobile-board-dock>.board-toolbar,.mobile-engine-controls,.mobile-move-controls,.mobile-board-summary{padding-left:12px;padding-right:12px}.analysis-card{border-left:0;border-right:0;border-radius:0;padding-left:12px;padding-right:12px}.notation-panel{padding:0 12px}.result-state>.game-navigation,.result-state>.result-actions,.result-state>.review-options,.result-state>.action-note,.result-state>.last-updated,.result-state>.review-note{margin-left:12px;margin-right:12px}}
@media(max-width:600px){#mobile-board-evaluation{margin-bottom:-10px}}
.mobile-engine-controls{display:none}
.mobile-board-evaluation{display:none}
.engine-suggestions{display:contents}
.mobile-board-summary{display:none}
.position-navigation .move-step-controls{grid-template-columns:minmax(0,1fr) minmax(76px,.85fr) minmax(0,1fr)}
.playback-toggle[aria-pressed="true"]{border-color:#c8ad7a;background:#45503d;color:#f3e6c9}
.mobile-board-dock{display:grid;gap:18px;min-width:0}
.mobile-position-label,.mobile-move-controls{display:none}
.evaluation-explanation{margin:7px 0 0;color:#c0c9bb;font:12px/1.5 'DM Sans',Arial,sans-serif}
.evaluation-explanation:empty{display:none}
.material-panel{margin:0 0 20px;padding:14px 0;border-top:1px solid #52604f;border-bottom:1px solid #52604f}
.material-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.material-heading h5{margin:0;color:#eef1e8;font:600 13px 'DM Sans',Arial,sans-serif}
.material-heading #material-balance{color:#d8c99f;font:500 12px/1.5 'DM Sans',Arial,sans-serif}
.capture-row{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:8px;min-height:30px;color:#b8c2b2;font:11px/1.5 'DM Sans',Arial,sans-serif}
.capture-row+.capture-row{margin-top:6px}
.captured-pieces{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-height:26px}
.captured-pieces img{display:block;width:23px;height:23px;object-fit:contain;border-radius:3px;background:#a5b095}
.chessboard{position:relative}
#best-move-arrow{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;opacity:.88;filter:drop-shadow(0 1px 2px #17201799)}
#best-move-arrow line{stroke:#c8ad7a;stroke-width:14;stroke-linecap:round}
#best-move-arrow polygon{fill:#c8ad7a;stroke:#233027;stroke-width:2;stroke-linejoin:round}
.best-arrow-control{display:flex;align-items:center;gap:8px;margin:14px 0 0;color:#c0c9bb;font:12px/1.5 'DM Sans',Arial,sans-serif;cursor:pointer;min-height:32px}
.best-arrow-control input{width:17px;height:17px;margin:0;accent-color:#c8ad7a;cursor:pointer}
.best-arrow-control input:focus-visible{outline:2px solid #c8ad7a;outline-offset:3px}
.board-square.last-move-square{box-shadow:inset 0 0 0 999px #c8ad7a70}
.board-square.last-move-square img{position:relative}
.move-list-panel{margin:0 0 20px;border:1px solid #52604f;border-radius:7px;overflow:hidden}
.move-list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px}
.move-list-heading h5{margin:0;color:#eef1e8;font:600 14px 'DM Sans',Arial,sans-serif}
.move-list-heading>span{color:#b8c2b2;font-size:11px}
.move-list-columns,.move-list-row{display:grid;grid-template-columns:36px minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center}
.move-list-columns{padding:0 12px 8px;color:#b8c2b2;font-size:11px}
.move-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#687561 #202a22;padding:4px 12px 8px;color:#b8c2b2;font-size:12px}
.move-list-row+.move-list-row{margin-top:4px}
.move-number{color:#b8c2b2;font:12px 'DM Mono',monospace}
.move-list .notation-move{display:block;width:100%;height:auto;min-height:44px;margin:0;padding:10px;border:1px solid transparent;border-radius:5px;background:transparent;color:#eef1e8;text-align:left;font:500 13px/1.4 'DM Mono',monospace;cursor:pointer;touch-action:manipulation}
.move-list .notation-move:hover{background:#354332}
.move-list .notation-move[aria-current="step"]{background:#c8ad7a;color:#202a22;border-color:#c8ad7a;font-weight:700}
.move-list .notation-move:focus-visible{outline:2px solid #e4d5ad;outline-offset:-2px}
.board-toolbar{display:flex;justify-content:flex-end;width:min(100%,520px);margin:0 auto -8px}
.board-toolbar .compact-action{width:auto;min-height:36px;height:auto;padding:8px 12px}
.board-toolbar .compact-action[aria-pressed="true"]{background:#354332;border-color:#c8ad7a}
.players .piece{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:50%;background:#b9c1aa}
.players .piece img{display:block;width:27px;height:27px;object-fit:contain}
.players .white-piece{background:#637359}
.utility{font-size:13px;color:#5b6258}
.eyebrow{font-size:12px;color:#665b42}
.intro h1 em{color:#687561}
.lede,.panel-description{color:#5b6258}
.form-panel>.panel-number{font-size:12px;color:#5b6258}
.privacy,footer{font-size:12px;color:#5b6258}
.preview-panel .panel-number{font-size:12px;color:#c0c9bb}
.url-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:-7px}
.text-action{width:auto;height:auto;padding:4px 0;background:transparent;color:#43503f;border-radius:0;font:500 12px 'DM Sans',Arial,sans-serif;text-decoration:underline;text-underline-offset:3px}
.text-action:hover{background:transparent;color:#1f2c23}
.recent-wrap{display:flex;align-items:center;gap:7px;margin:0;color:#5b6258;font-size:12px}
.recent-wrap select{max-width:180px;height:34px;border:1px solid #cfd5ca;border-radius:6px;background:#fafbf8;color:#242824;padding:0 8px}
.field-help,.source-status{font-size:12px;line-height:1.5;color:#5b6258;margin:0}
.source-status{min-height:18px;color:#42513e}
.result-state:focus,.error-state:focus{outline:3px solid #d6c293;outline-offset:5px}
.event-details{margin:-11px 0 18px;color:#c0c9bb;font-size:12px;line-height:1.55}
.game-score{font:500 13px 'DM Mono',monospace;color:#f1dfae}
.board-and-pgn{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:18px 0}
.chessboard{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:min(100%,520px);margin:0 auto;aspect-ratio:1;border:2px solid #354431;border-radius:5px;overflow:hidden;background:#769656;box-shadow:0 9px 24px #10171155}
.board-square{position:relative;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;line-height:0}
.board-square img{display:block;width:84%;height:84%;object-fit:contain;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 1px 1px #0004)}
.light-square{background:#eeeed2}
.dark-square{background:#769656}
.board-square[data-file]::after,.board-square[data-rank]::before{position:absolute;z-index:1;font:700 8px/1 Arial,sans-serif}
.board-square[data-file]::after{content:attr(data-file);right:3px;bottom:2px}
.board-square[data-rank]::before{content:attr(data-rank);left:3px;top:3px}
.light-square::after,.light-square::before{color:#769656}
.dark-square::after,.dark-square::before{color:#eeeed2}
.board-unavailable{place-items:center;padding:20px;color:#d4ddcd;font-size:12px}
.notation-panel{min-width:0}
.notation-heading{display:flex;justify-content:space-between;gap:10px;color:#c0c9bb;font:10px 'DM Mono',monospace;letter-spacing:.7px;margin-bottom:8px}
.notation-panel pre{height:180px;margin:0;color:#d3ddcb;font-size:11px;white-space:pre-wrap;overflow-wrap:normal}
.game-navigation{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 14px}
.compact-action,.secondary-action{height:40px;padding:0 9px;border:1px solid #60705c;background:transparent;color:#eef1e8;font-size:11px}
.compact-action:hover,.secondary-action:hover{background:#354332}
.compact-action:disabled{opacity:.35;cursor:not-allowed}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.result-actions .download{height:44px}
.refresh-control{height:44px;display:flex;align-items:center;justify-content:center;gap:8px;margin:0;border:1px solid #60705c;border-radius:7px;color:#eef1e8;font-size:11px}
.refresh-control input{width:16px;height:16px;accent-color:#d4c49c}
.refresh-control:has(input:disabled){opacity:.45}
.action-note,.last-updated{min-height:18px;margin:10px 0 0;color:#d8c99f;font-size:12px;line-height:1.5}
.last-updated{min-height:0;margin-top:3px;color:#c0c9bb}
.review-note{font-size:12px;color:#c0c9bb}
.analysis-card{margin:0;padding:16px;border:1px solid #52604f;border-radius:7px;background:#202a22}
.analysis-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
.analysis-heading h4{margin:2px 0 0;color:#f2f2e9;font-size:18px}
.analysis-kicker{color:#b8c2b2;font:9px 'DM Mono',monospace;letter-spacing:1.2px}
.analysis-heading .compact-action{width:auto;min-width:112px}
.position-navigation{display:grid;grid-template-columns:38px 38px 1fr 38px 38px;gap:6px;align-items:center;margin:14px 0}
.move-action{height:34px;border:1px solid #52604f;border-radius:5px;background:#2c382e;color:#eef1e8;cursor:pointer}
.move-action:hover{background:#3a493c}
.move-action:disabled{opacity:.35;cursor:not-allowed}
.position-navigation span{text-align:center;color:#d8ded3;font:11px 'DM Mono',monospace}
.evaluation{display:grid;grid-template-columns:1fr 54px;gap:12px;align-items:center}
.evaluation-track{height:10px;overflow:hidden;border-radius:999px;background:#111713}
.evaluation-track span{display:block;width:50%;height:100%;background:#eef1e8;transition:width .25s ease}
.evaluation>strong{text-align:right;color:#f0ddb0;font:600 14px 'DM Mono',monospace}
.analysis-output{display:grid;grid-template-columns:1fr 2fr;gap:8px 18px;margin-top:13px}
.analysis-output p{margin:0}
.analysis-output p>span{display:block;color:#9eaa99;font-size:10px;text-transform:uppercase;letter-spacing:.7px}
.analysis-output p>strong{display:block;margin-top:2px;color:#eef1e8;font-size:12px;line-height:1.55}
.analysis-output .engine-status{grid-column:1/-1;color:#b8c2b2;font-size:11px}
.analysis-card.is-thinking .evaluation-track span{animation:analysis-pulse 1.1s ease-in-out infinite alternate}
@keyframes analysis-pulse{from{opacity:.45}to{opacity:1}}
footer a{color:inherit;text-underline-offset:3px}
@media(max-width:1000px){.workspace{grid-template-columns:1fr}.form-panel,.preview-panel{padding:30px}.chessboard{width:min(100%,520px)}}
@media(max-width:800px){.players>.game-score{display:block!important;text-align:center;padding:4px 0}.board-and-pgn{grid-template-columns:1fr}.chessboard{width:min(100%,420px);margin:auto}.notation-panel pre{height:180px}.game-navigation{grid-template-columns:1fr 1fr}.result-actions{grid-template-columns:1fr}.utility{font-size:12px}}
@media(max-width:600px){.utility{font-size:12px}.field-help,.source-status,.privacy,footer{font-size:12px}.url-tools{align-items:flex-start;flex-direction:column}.recent-wrap{width:100%;justify-content:space-between}.recent-wrap select{max-width:220px}.intro h1 em{color:#687561}.game-navigation{grid-template-columns:1fr 1fr}.compact-action{font-size:10px}.result-state h3{font-size:29px}.event-details{font-size:12px}.analysis-heading{align-items:flex-start}.analysis-heading .compact-action{min-width:104px}.analysis-output{grid-template-columns:1fr}.analysis-output .engine-status{grid-column:auto}.position-navigation{grid-template-columns:34px 34px 1fr 34px 34px}.position-navigation span{font-size:10px}}
.header-actions{display:flex;align-items:center;gap:20px;margin-left:auto}
.auth-control{position:relative}
.google-sign-in,.user-menu{min-height:40px;border:1px solid #cfd4c9;border-radius:999px;background:#fff;color:#242824;font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.google-sign-in{display:inline-flex;align-items:center;gap:9px;padding:0 15px;cursor:pointer;box-shadow:0 1px 2px rgba(26,31,26,.06);transition:border-color .2s,box-shadow .2s,transform .2s}
.google-sign-in:hover{border-color:#8c9688;box-shadow:0 3px 10px rgba(26,31,26,.1);transform:translateY(-1px)}
.google-sign-in:focus-visible,.sign-out:focus-visible{outline:3px solid rgba(94,115,74,.25);outline-offset:2px}
.google-sign-in:disabled{cursor:wait;opacity:.65;transform:none}
.google-mark{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:conic-gradient(from -45deg,#4285f4 0 25%,#34a853 0 43%,#fbbc05 0 68%,#ea4335 0);color:#fff;font-weight:800;font-size:12px}
.user-menu{display:flex;align-items:center;gap:9px;padding:4px 6px 4px 5px}
.user-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;background:#e7eadf}
.user-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sign-out{border:0;border-radius:999px;background:#edf0e8;color:#353b34;padding:8px 10px;font:600 12px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
.sign-out:hover{background:#dfe4d8}
.auth-status{position:absolute;right:0;top:calc(100% + 8px);z-index:4;width:max-content;max-width:280px;margin:0;padding:7px 10px;border-radius:7px;background:#202820;color:#f5f4ec;font-size:12px;line-height:1.35;box-shadow:0 5px 16px rgba(20,28,21,.18)}
.auth-status:empty{display:none}
@media(max-width:760px){.site-header{align-items:flex-start}.header-actions{align-items:flex-end;flex-direction:column;gap:10px}.utility{font-size:12px}.user-name{max-width:95px}}
@media(max-width:520px){.site-header{gap:14px}.header-actions{align-items:flex-end}.utility{display:none}.google-sign-in{min-height:38px;padding:0 12px;font-size:12px}.google-sign-in span:last-child{max-width:104px}.auth-status{max-width:230px}}
.result-actions .google-sign-in{justify-content:center;min-height:44px}
.result-state .auth-status{position:static;width:auto;max-width:none;margin-top:10px;box-shadow:none}
[hidden]{display:none!important}
.header-link{color:#40513c;font-size:13px;font-weight:600;text-decoration:none}
.header-link:hover{text-decoration:underline;text-underline-offset:5px}
.players-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:40px;padding:8px 12px 8px 16px;border:1px solid #203027;border-radius:999px;background:#203027;color:#fff;line-height:1;text-decoration:none;white-space:nowrap;transition:background .2s,transform .2s}
.players-button:hover{background:#395641;color:#fff;text-decoration:none;transform:translateY(-1px)}
.players-button:focus-visible{outline:3px solid #769878;outline-offset:3px}
.feature-badge{display:inline-block;padding:5px 7px;border-radius:999px;background:#d9ff43;color:#203027;font:700 10px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.05em;text-transform:uppercase}
.feature-badge{background:#c8ad7a}
.analysis-card .position-navigation{display:flex;flex-direction:column;align-items:stretch;gap:14px;margin:18px 0}
.position-navigation #position-label{display:block;min-height:20px;font-size:12px;line-height:1.6}
.move-step-controls,.move-jump-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.position-navigation .move-action{width:100%;min-height:52px;height:auto;margin:0;padding:12px 8px;font:600 14px/1.4 'DM Sans',Arial,sans-serif;touch-action:manipulation}
.position-navigation .move-action:focus-visible{outline:3px solid #c8ad7a;outline-offset:3px}
.move-jump-controls{padding-top:16px;border-top:1px solid #52604f}
.move-jump-controls .move-action{min-height:44px;font-size:12px;background:transparent;color:#c0c9bb}
.number-grid>div{min-width:0}
.number-grid>.board-field{grid-column:1/-1}
.number-grid select{min-width:0;max-width:100%;text-overflow:ellipsis;overflow:hidden}
#board-players-status{margin:8px 0 0;font-size:11px}
#board-players-status:empty{display:none}
.number-grid select{width:100%;height:48px;padding:0 13px;border:1px solid #dce0d7;border-radius:7px;background:#fafbf8;color:#242824;font:500 14px 'DM Sans',Arial,sans-serif;cursor:pointer}
.number-grid select:disabled{color:#737d6e;cursor:not-allowed}
.number-grid select:focus-visible{outline:3px solid #a78b59;outline-offset:2px}
.saved-games-wrap{margin:0 0 26px;padding:18px;border:1px solid #d5dbcf;border-radius:12px;background:#f6f6f1}
.saved-games-wrap>label{margin:0 0 9px}
.saved-game-controls{display:flex;align-items:center;gap:8px;min-width:0}
.saved-game-controls select{width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #cdd5c9;border-radius:8px;background:#fff;color:#263126;font:13px 'DM Sans',Arial,sans-serif;overflow:hidden;text-overflow:ellipsis}
.saved-game-controls .saved-library-refresh{flex:none;width:auto;height:auto;min-height:44px;margin:0;padding:9px 12px;border:1px solid #cdd5c9;border-radius:8px;background:#fff;color:#40513c;font:600 12px 'DM Sans',Arial,sans-serif;cursor:pointer}
.saved-game-controls .saved-library-refresh:hover{background:#e8ede4}
.saved-game-controls .saved-library-refresh:disabled{opacity:.6;cursor:wait}
.saved-games-wrap .field-help{margin:10px 0 0;font-size:11px}
.saved-game-controls select:focus-visible,.saved-library-refresh:focus-visible{outline:3px solid #a78b59;outline-offset:2px}
@media(max-width:760px){.site-header{height:auto;min-height:88px;padding-top:10px;padding-bottom:10px;align-items:center}}
@media(max-width:600px){.preview-panel{padding:24px 16px}.analysis-card{padding:14px;min-width:0}.analysis-heading{flex-wrap:wrap}.analysis-heading .compact-action{min-height:44px;height:auto;padding:10px 14px;font-size:13px}.best-arrow-control{min-height:44px;font-size:13px;gap:10px}.best-arrow-control input{width:20px;height:20px;flex-shrink:0}.board-toolbar .compact-action{min-height:44px;padding:10px 14px;font-size:12px}.move-step-controls,.move-jump-controls{gap:12px}.position-navigation .move-action{font-size:14px}.move-list-heading{padding:10px;flex-wrap:wrap;gap:4px 10px}.move-list-columns,.move-list-row{grid-template-columns:28px minmax(0,1fr) minmax(0,1fr);gap:6px}.move-list-columns{padding:0 10px 8px}.move-list{padding:4px 10px 8px;max-height:200px}.move-list .notation-move{padding:10px 6px}.material-heading{gap:5px 12px}.capture-row{grid-template-columns:92px minmax(0,1fr);font-size:12px}.evaluation-explanation{font-size:13px}.analysis-output p>strong,.analysis-output .engine-status{overflow-wrap:anywhere}.analysis-output p>strong{font-size:13px}.analysis-output p>span,.analysis-output .engine-status{font-size:12px}.position-navigation #position-label{font-size:13px}}
@media(max-width:420px){.analysis-heading{flex-direction:column;align-items:stretch;gap:12px}.analysis-heading .compact-action{width:100%}.analysis-heading h4{font-size:18px}}
@media(max-width:600px){.workspace{grid-template-columns:minmax(0,1fr)}.form-panel,.preview-panel{min-width:0;padding:24px 16px}.recent-wrap{min-width:0}.recent-wrap select{min-width:0;max-width:100%;flex:1}.players>div,.players p{min-width:0}.players strong{overflow-wrap:anywhere}.result-topline{flex-wrap:wrap;gap:8px}.analysis-card .material-heading #material-balance{max-width:100%;overflow-wrap:anywhere}}
@media(max-width:600px){.workspace{overflow:clip}.mobile-board-dock{position:sticky;top:0;z-index:5;align-self:start;gap:8px;padding:8px 0 10px;background:#202a22;border-bottom:1px solid #52604f;box-shadow:0 8px 12px #14201733}.mobile-board-dock .chessboard{width:min(100%,30svh,300px)}.mobile-board-dock .board-toolbar{width:100%;margin:0;align-items:center;justify-content:space-between;gap:10px}.mobile-position-label{display:block;color:#d8ded3;font:11px/1.5 'DM Mono',monospace;min-width:0}.mobile-move-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.mobile-move-controls .move-action{width:100%;min-height:48px;height:auto;margin:0;padding:10px 8px;font:600 14px/1.4 'DM Sans',Arial,sans-serif;touch-action:manipulation}.mobile-move-controls .move-action:focus-visible{outline:2px solid #c8ad7a;outline-offset:2px}.position-navigation>.move-step-controls,.position-navigation>#position-label{display:none}.analysis-card .position-navigation{margin:14px 0}.move-jump-controls{padding-top:0;border-top:0}.analysis-card{scroll-margin-top:calc(30svh + 142px)}.move-list{scroll-margin-top:calc(30svh + 142px)}}
@media(max-width:600px){.mobile-move-controls{grid-template-columns:minmax(0,1fr) minmax(76px,.9fr) minmax(0,1fr);gap:8px}.mobile-move-controls .move-action{padding:10px 4px;font-size:13px}}
@media(max-width:600px){.workspace{overflow:visible}.mobile-board-dock{position:static;top:auto;z-index:auto;padding:0;border:0;box-shadow:none;background:transparent;gap:12px}.mobile-board-dock .chessboard{width:100vw;max-width:none;height:100vw;margin-left:calc(50% - 50vw);margin-right:0;border-left:0;border-right:0;border-radius:0}.analysis-card,.move-list{scroll-margin-top:16px}}
@media(max-width:600px){#game-form{min-width:0;grid-template-columns:minmax(0,1fr)}#game-form>*{min-width:0}.number-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.url-field input{min-width:0}}
@media(max-width:600px){.board-square[data-file]::after,.board-square[data-rank]::before{font-size:10px}.mobile-move-controls{padding-top:2px;padding-bottom:4px}.mobile-move-controls .move-action{min-height:50px}}
@media(max-width:600px){.mobile-board-summary{display:grid;gap:12px;min-width:0;padding-top:2px}.mobile-board-summary .evaluation-summary{min-width:0}.mobile-board-summary .material-panel{margin:0;padding:12px 0}.mobile-board-summary .material-heading{gap:5px 12px}.mobile-board-summary #material-balance{overflow-wrap:anywhere}.mobile-board-summary .evaluation-explanation{margin-top:7px}}
@media(max-width:600px){.mobile-board-summary .evaluation-summary{width:100vw;margin-left:calc(50% - 50vw)}.mobile-board-summary .evaluation{grid-template-columns:minmax(0,1fr);gap:7px}.mobile-board-summary .evaluation-track{width:100%;border-radius:0;height:12px}.mobile-board-summary .evaluation>strong{padding:0 16px}.mobile-board-summary .evaluation-explanation{margin:0 16px;min-height:0}.mobile-board-summary .engine-suggestions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:12px}.mobile-board-summary .engine-suggestions p{margin:0;min-width:0}.mobile-board-summary .engine-suggestions p>span{display:block;color:#9eaa99;font:10px/1.5 'DM Sans',Arial,sans-serif;text-transform:uppercase;letter-spacing:.7px}.mobile-board-summary .engine-suggestions strong{display:block;margin-top:3px;color:#eef1e8;font:500 13px/1.55 'DM Sans',Arial,sans-serif;overflow-wrap:anywhere}}
@media(max-width:600px){.mobile-board-evaluation{display:block;min-width:0}.mobile-board-evaluation .evaluation-summary{display:flex;flex-direction:column;gap:6px;width:100vw;margin-left:calc(50% - 50vw)}.mobile-board-evaluation .evaluation{display:contents}.mobile-board-evaluation .evaluation-track{order:3;width:100%;height:12px;border-radius:0}.mobile-board-evaluation .evaluation>strong{order:1;padding:0 16px;text-align:right}.mobile-board-evaluation .evaluation-explanation{order:2;margin:0 16px}.mobile-board-dock{row-gap:8px}.mobile-board-summary{padding-top:8px}}
@media(max-width:600px){.mobile-engine-controls{display:grid;grid-template-columns:minmax(104px,.9fr) minmax(0,1.2fr);align-items:center;gap:12px;min-width:0;padding:4px 0 8px}.mobile-engine-controls #analysis-toggle{width:100%;height:auto;min-height:44px;margin:0;padding:10px 8px;font:500 13px/1.4 'DM Sans',Arial,sans-serif}.mobile-engine-controls .best-arrow-control{min-width:0;min-height:44px;margin:0;gap:8px;font-size:12px;line-height:1.5}.mobile-engine-controls input{flex:none}}
@media(max-width:600px){.mobile-board-evaluation .evaluation-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 12px;padding-top:12px;background:#152019;border-top:1px solid #52604f}.mobile-board-evaluation .evaluation>strong{grid-column:2;grid-row:1;align-self:center;padding:0 16px 0 0;color:#f0ddb0;white-space:nowrap}.mobile-board-evaluation .evaluation-explanation{grid-column:1;grid-row:1;margin:0 0 0 16px;color:#e1e7da;font-size:12px;line-height:1.5}.mobile-board-evaluation .evaluation-summary:has(.evaluation-explanation:empty)::before{content:'Engine evaluation';grid-column:1;grid-row:1;margin-left:16px;color:#c0c9bb;font:12px/1.5 'DM Sans',Arial,sans-serif}.mobile-board-evaluation .evaluation-track{grid-column:1/-1;grid-row:2;display:block;flex:none;height:16px;min-height:16px;background:#050a07;border-top:1px solid #93a089;border-bottom:1px solid #93a089;box-shadow:0 1px 3px #0003}.mobile-board-evaluation #evaluation-fill{height:100%;background:#f3f4e7;border-right:1px solid #93a089}.mobile-engine-controls{padding-bottom:4px}.mobile-board-dock{row-gap:10px}}
.board-options { display: flex; align-items: center; gap: 8px; }
.board-options #board-theme,.board-options #flip-board{box-sizing:border-box;height:44px;min-height:44px;margin-top:0;margin-bottom:0;display:inline-flex;align-items:center;justify-content:center}
.board-options #flip-board{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:8px;font-size:23px;line-height:1}
#chessboard[data-theme="brown"] .light-square { background: #f0d9b5; }
#chessboard[data-theme="brown"] .dark-square { background: #b58863; }
#chessboard[data-theme="brown"] .light-square::before,
#chessboard[data-theme="brown"] .light-square::after { color: #765337; }
#chessboard[data-theme="brown"] .dark-square::before,
#chessboard[data-theme="brown"] .dark-square::after { color: #fff3de; }
@media (max-width: 600px) {
  .result-state .players { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: start; gap: 10px; }
  .result-state .players > div { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
  .result-state .players > div:last-child { flex-direction: column; text-align: center; }
  .result-state .players p { margin: 0; min-width: 0; width: 100%; gap: 4px; }
  .result-state .players strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; text-wrap: balance; }
  .result-state .players small { display: block; margin: 0; }
  .result-state .players > .game-score { align-self: center; font-size: clamp(24px,7vw,32px); font-weight: 650; line-height: 1.2; padding: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .mobile-board-dock .board-toolbar { flex-wrap: wrap; gap: 6px; }
  .mobile-board-dock .mobile-position-label { flex-basis: 100%; }
  .mobile-board-dock .board-options { width: 100%; justify-content: space-between; gap: 12px; }
  .board-options .compact-action { flex: 1; min-width: 0; min-height: 44px; }
  .board-options .compact-action:focus-visible { outline: 2px solid #e4d5ad; outline-offset: 2px; }
  #chessboard[data-theme="brown"] .dark-square::before,
  #chessboard[data-theme="brown"] .dark-square::after { color: #302116; }
}
.game-review { margin: 12px 0 18px; padding: 14px 12px; border-block: 1px solid #52604f; }
.review-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-settings label { display: grid; gap: 6px; font-size: 12px; color: #c2ccba; }
.review-settings select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #bfc8b9; border-radius: 8px; background: #f8f8f2; color: #233329; font: inherit; font-size: 14px; }
.game-review p { font-size: 12px; line-height: 1.6; color: #c2ccba; margin: 8px 0; overflow-wrap: anywhere; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.review-actions button { min-height: 44px; }
.game-review progress { display: block; width: 100%; height: 8px; margin-top: 12px; accent-color: #65735b; }
.game-review [hidden] { display: none; }
.review-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border: 1px solid transparent; border-radius: 7px; vertical-align: middle; font: 750 14px/1 system-ui,sans-serif; letter-spacing: -.5px; }
.review-best { background: #d4e2ca; color: #233329; }
.review-great-move { background: #c6dce5; color: #20333d; }
.review-brilliant { background: #ade0da; color: #173b37; }
.review-brilliant-option { display: grid; grid-template-columns: 22px 1fr; align-items: center; column-gap: 8px; min-height: 44px; margin-top: 10px; font-size: 13px; color: #eef1e8; cursor: pointer; }
.review-brilliant-option input { width: 20px; height: 20px; margin: 0; accent-color: #ade0da; }
.review-brilliant-option small { grid-column: 2; font-size: 11px; line-height: 1.5; color: #c2ccba; }
.review-summary tr[hidden] { display: none; }
.review-forced-mate { background: #d8c9e3; color: #35263e; }
.review-excellent { background: #e4d5ad; color: #302718; }
.review-good { background: #c2ccba; color: #233329; }
.review-inaccuracy { background: #e0c38c; color: #302718; }
.review-mistake { background: #f0c3a2; color: #4c261c; }
.review-blunder { background: #f0aa9e; color: #4f1e1a; }
.notation-move[aria-current="step"] .review-badge { color: #f4edda; background: #202a22; border-color: #202a22; }
.notation-move[aria-current="step"] .review-badge { box-shadow: 0 0 0 1px #f4edda66; }
.review-summary { padding: 0 12px 14px; border-bottom: 1px solid #52604f; margin-bottom: 8px; }
.review-summary[hidden] { display: none; }
.review-summary table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.review-summary caption { text-align: left; color: #eef1e8; font-size: 13px; font-weight: 600; padding: 8px 0 12px; }
.review-summary th,.review-summary td { padding: 7px 2px; border-bottom: 1px solid #52604f66; color: #eef1e8; }
.review-summary thead th { width: 26%; font-size: 13px; text-align: center; }
.review-summary thead th:nth-child(2) { width: 48%; font-size: 11px; color: #c2ccba; }
.review-summary thead small { display: block; font-size: 10px; font-weight: 400; color: #c2ccba; margin-top: 4px; line-height: 1.5; }
.review-summary tbody th { text-align: center; vertical-align: middle; font-size: 12px; font-weight: 500; }
.review-summary td { text-align: center; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.review-summary .review-badge { display: grid; margin: 0 auto 4px; }
.review-badge { box-sizing: border-box; text-align: center; letter-spacing: 0; }
.review-summary p { margin: 8px 0; color: #c2ccba; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.review-summary .review-summary-state { color: #e0cda4; }
#review-move-detail { color: #eef1e8; }
#review-move-detail:empty { display: none; }
@media (max-width: 600px) { .game-review { padding: 12px 10px; } .review-settings { gap: 10px; } }
.site-header {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 88px;
  height: auto;
  margin: 0;
  padding: 12px clamp(22px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #d9ddd3;
  background: #f6f6f1;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: #202620;
  font: 750 27px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.055em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .brand span { font: 32px/1 Georgia, serif; margin: 0; }
.site-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-left: auto;
}
.site-header .site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.site-header .nav-account-slot{display:flex;align-items:center;margin-left:auto}
.site-header .nav-google-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-height:40px;height:auto;margin:0;padding:7px 14px;border:1px solid #203027;border-radius:999px;background:#203027;color:#fff;font:600 13px/1 system-ui,sans-serif;white-space:nowrap;box-shadow:none;cursor:pointer;letter-spacing:normal;transition:background .2s,transform .2s}
.site-header .nav-google-button:hover{background:#395641;transform:translateY(-1px)}
.site-header .nav-google-button:disabled{opacity:.65;cursor:wait}
.site-header .nav-google-button .nav-google-mark{display:grid;place-items:center;width:23px;height:23px;background:#fff;color:#4285f4;border-radius:50%;font:bold 17px/1 Arial,sans-serif;letter-spacing:0}
.site-header .nav-user-menu{display:flex;align-items:center;gap:7px;min-height:40px;padding:4px 7px;border:1px solid #cfd5ca;border-radius:999px;background:#fff;color:#203027;font:500 12px/1 system-ui,sans-serif}
.site-header .nav-user-menu #user-avatar{width:26px;height:26px;object-fit:cover;border-radius:50%}
.site-header .nav-user-menu #user-name{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-header .nav-user-menu #sign-out{width:auto;min-height:30px;height:auto;margin:0;padding:6px 8px;border:0;border-radius:999px;background:#edf0e8;color:#203027;font:600 11px/1 system-ui,sans-serif;letter-spacing:normal;box-shadow:none;text-decoration:none;cursor:pointer}
.site-header .nav-user-menu #sign-out:hover{background:#dfe4d8;transform:none}
.site-header .nav-account-slot [hidden]{display:none!important}
.site-header .nav-google-button:focus-visible,.site-header .nav-user-menu button:focus-visible{outline:3px solid #a78b59;outline-offset:3px}
.site-header .nav-auth-status{position:absolute;top:calc(100% + 6px);right:22px;z-index:20;width:max-content;max-width:min(360px,calc(100vw - 44px));min-height:0;margin:0;padding:9px 12px;border-radius:9px;background:#203027;color:#f6f6f1;font:13px/1.5 system-ui,sans-serif;text-align:left;box-shadow:0 5px 16px #20302724}
.site-header .nav-auth-status:empty{display:none}
.site-header .site-nav a.nav-pill,
.site-header .site-nav a.nav-pill[aria-current="page"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #203027;
  border-radius: 999px;
  background: #203027;
  color: #fff;
  font: 600 13px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.site-header .site-nav a.nav-pill:hover,
.site-header .site-nav a.nav-pill[aria-current="page"]:hover {
  background: #395641;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.site-header .site-nav a.nav-pill[aria-current="page"] { box-shadow: inset 0 0 0 2px #c8ad7a; }
.site-header .site-nav a.nav-pill:focus-visible,
.site-header .brand:focus-visible { outline: 3px solid #769878; outline-offset: 3px; }
.site-header .nav-feature-badge {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 999px;
  background: #c8ad7a;
  color: #203027;
  font: 700 10px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-header .utility { margin: 0; color: #61705f; font-size: 13px; line-height: 1.35; text-align: right; }
@media(max-width:600px){.mobile-bottom-nav{transition:transform .2s ease;transform:translateY(0)}.mobile-bottom-nav.is-scroll-hidden{transform:translateY(calc(100% + 4px));pointer-events:none}.mobile-bottom-nav:focus-within{pointer-events:auto}}
@media(max-width:600px) and (prefers-reduced-motion:reduce){.mobile-bottom-nav{transition:none}}
.mobile-bottom-nav{display:none}
.mobile-account-dialog{width:min(400px,calc(100% - 32px));padding:20px;border:1px solid #cfd5ca;border-radius:16px;background:#f6f6f1;color:#203027;box-shadow:0 12px 50px #14201744}
.mobile-account-dialog::backdrop{background:#14201788}
.mobile-account-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.mobile-account-heading h2{margin:0;font:600 20px/1.4 system-ui,sans-serif}
.mobile-account-dialog button{height:auto;min-height:48px;margin:0;padding:10px 14px;border:1px solid #203027;border-radius:8px;background:#203027;color:#fff;font:600 14px/1.4 system-ui,sans-serif;cursor:pointer}
.mobile-account-heading button{width:44px;min-height:44px;padding:8px;background:transparent;color:#203027;border-color:#cfd5ca}
.mobile-account-name{margin:18px 0;overflow-wrap:anywhere;font:14px/1.6 system-ui,sans-serif}
.mobile-account-sign-in,.mobile-account-sign-out{width:100%}
.mobile-account-dialog [hidden]{display:none!important}
.mobile-account-dialog button:focus-visible{outline:3px solid #a78b59;outline-offset:3px}
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; gap: 12px; }
  .site-header .brand { font-size: 24px; }
  .site-header .header-actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .site-header .site-nav a.nav-pill,
  .site-header .site-nav a.nav-pill[aria-current="page"] { font-size: 12px; }
}
@media(max-width:600px){body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}.site-header{min-height:64px;padding:14px 20px;flex-wrap:nowrap}.site-header .header-actions{display:none}.mobile-bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:30;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px));border-top:1px solid #cfd5ca;background:#f6f6f1;box-shadow:0 -3px 16px #2030270d}.mobile-bottom-nav a,.mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;min-width:0;min-height:56px;height:auto;margin:0;padding:6px;border:0;border-radius:10px;background:transparent;color:#5b685b;text-decoration:none;font:500 11px/1.3 system-ui,sans-serif;cursor:pointer;letter-spacing:normal;box-shadow:none}.mobile-bottom-nav svg{display:block;width:23px;height:23px;flex:none}.mobile-bottom-nav [aria-current="page"],.mobile-bottom-nav [aria-expanded="true"]{background:#e7ebdf;color:#203027;font-weight:700}.mobile-bottom-nav a:focus-visible,.mobile-bottom-nav button:focus-visible{outline:2px solid #a78b59;outline-offset:-2px}.mobile-account-dialog{margin:auto auto calc(86px + env(safe-area-inset-bottom,0px))}}
@media(max-width:600px){html{scroll-padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))}button,a,input,select{scroll-margin-bottom:calc(90px + env(safe-area-inset-bottom,0px))}.mobile-bottom-nav{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}.mobile-bottom-nav a,.mobile-bottom-nav button{font-size:12px;touch-action:manipulation}.mobile-bottom-nav svg{width:24px;height:24px}.mobile-account-dialog{max-height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}body:has(.mobile-account-dialog[open]){overflow:hidden}}
/* Mobile navigation: opaque Chessfile green, readable white labels and gold selection. */
@media(max-width:600px){
  .mobile-bottom-nav{background:#203027;border-top-color:#62745f;box-shadow:0 -4px 18px #10201733}
  .mobile-bottom-nav a,.mobile-bottom-nav button{color:#fff}
  .mobile-bottom-nav [aria-current="page"],.mobile-bottom-nav [aria-expanded="true"]{background:#2c3e30;color:#c8ad7a;box-shadow:inset 0 0 0 1px #c8ad7a80}
  .mobile-bottom-nav a:focus-visible,.mobile-bottom-nav button:focus-visible{outline-color:#e4d5ad}
}
.account-settings-dialog{--settings-bg:#f7f6f2;--settings-panel:#fffefa;--settings-text:#20252a;--settings-muted:#62686a;--settings-line:#d5dbcf;width:min(440px,calc(100% - 32px));max-height:85dvh;overflow:auto;padding:24px;border:1px solid var(--settings-line);border-radius:16px;background:var(--settings-bg);color:var(--settings-text);font:14px/1.5 'DM Sans',Arial,sans-serif;box-shadow:0 16px 60px #10181544}
html[data-theme="dark"] .account-settings-dialog{--settings-bg:#18211d;--settings-panel:#202b25;--settings-text:#f0f2ed;--settings-muted:#b3bdb5;--settings-line:#425341}
.account-settings-dialog::backdrop{background:#101815aa}
.account-settings-dialog .settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-settings-dialog h2{margin:16px 0 22px;color:var(--settings-text);font:600 24px/1.3 'DM Sans',Arial,sans-serif;letter-spacing:-.5px}
.account-settings-dialog h3{margin:0 0 14px;color:var(--settings-text);font:600 15px/1.4 'DM Sans',Arial,sans-serif}
.account-settings-dialog button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;height:auto;width:auto;margin:0;padding:8px 12px;border:1px solid var(--settings-line);border-radius:7px;background:var(--settings-panel);color:var(--settings-text);font:500 13px/1.4 'DM Sans',Arial,sans-serif;box-shadow:none;transform:none;cursor:pointer}
.account-settings-dialog .settings-heading button{border:0;background:transparent;padding:8px 0}
.account-settings-dialog [data-settings-close]{width:44px;padding:8px}
.account-settings-dialog button:focus-visible{outline:2px solid #769e88;outline-offset:3px}
.account-settings-dialog .settings-theme-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--settings-line)}
.account-settings-dialog .theme-toggle{width:44px;height:44px;padding:13px;border:0;background:transparent}
.account-settings-dialog .theme-choice{box-sizing:border-box;width:auto;max-width:100%;min-height:44px;padding:8px 30px 8px 10px;border:1px solid var(--settings-line);border-radius:6px;background:var(--settings-panel);color:var(--settings-text);font:500 13px/1.5 'DM Sans',Arial,sans-serif;cursor:pointer}
.account-settings-dialog .theme-choice:focus-visible{outline:2px solid #769e88;outline-offset:3px}
.account-settings-dialog .board-palette-options{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0;border:0;min-width:0}
.account-settings-dialog .board-palette-options legend{margin:0 0 10px;padding:0;color:var(--settings-text);font-size:13px}
.account-settings-dialog .board-palette-options button{gap:8px;flex:1;padding:10px 8px;min-width:90px}
.account-settings-dialog .board-palette-options button[aria-pressed="true"]{outline:2px solid #769e88;outline-offset:1px;font-weight:700}
.account-settings-dialog .palette-icon{display:block;flex:none;width:22px;height:22px;border:1px solid #7e8c7c;border-radius:3px;background:conic-gradient(#8b9c7f 25%,#e8e9d9 0 50%,#8b9c7f 0 75%,#e8e9d9 0)}
.account-settings-dialog .palette-green{background:conic-gradient(#769656 25%,#eeeed2 0 50%,#769656 0 75%,#eeeed2 0)}
.account-settings-dialog .palette-brown{background:conic-gradient(#b58863 25%,#f0d9b5 0 50%,#b58863 0 75%,#f0d9b5 0)}
html[data-theme="dark"] .account-settings-dialog .palette-current{background:conic-gradient(#607e6c 25%,#c4cbb5 0 50%,#607e6c 0 75%,#c4cbb5 0)}
.account-settings-dialog .settings-device-note{margin:20px 0 0;color:var(--settings-muted);font-size:12px;line-height:1.6}
.mobile-account-dialog .account-settings-button{display:flex;justify-content:space-between;width:100%;margin:12px 0;border:1px solid #63745c;background:transparent;color:inherit;text-align:left}
.mobile-account-dialog .account-settings-button::after{content:'›';font-size:20px}
.mobile-account-dialog .account-review-link{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;min-height:48px;margin:12px 0;padding:10px 14px;border:1px solid #63745c;border-radius:8px;background:transparent;color:inherit;text-decoration:none;font:600 14px/1.4 system-ui,sans-serif}
.mobile-account-dialog .account-review-link>svg{width:20px;height:20px;flex:none}
.mobile-account-dialog .account-review-link>span:last-child{margin-left:auto;font-size:20px}
.mobile-account-dialog .account-review-link[hidden]{display:none!important}
.mobile-account-dialog .account-review-link:focus-visible{outline:2px solid #769e88;outline-offset:3px}
.google-signin-icon{display:block;flex:none;width:22px;height:22px;padding:2px;box-sizing:border-box;border-radius:50%;background:#fff}
.mobile-account-dialog .mobile-account-sign-in{display:flex;align-items:center;justify-content:center;gap:10px}
.site-header .nav-account-slot{gap:6px}
.site-header .desktop-account-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:auto;min-height:44px;height:44px;margin:0;padding:8px;border:0;border-radius:6px;background:transparent;color:inherit;box-shadow:none;font:500 13px/1.4 'DM Sans',Arial,sans-serif;cursor:pointer}
.site-header .desktop-account-button:focus-visible{outline:2px solid #769e88;outline-offset:2px}
.site-header .nav-user-menu #sign-out{display:none}
@media(max-width:600px){.site-header .desktop-account-button{display:none}.account-settings-dialog{padding:20px;max-height:calc(100dvh - 40px)}body:has(.account-settings-dialog[open]){overflow:hidden}}
#chess-signin-loader{box-sizing:border-box;width:min(360px,calc(100vw - 40px));max-height:calc(100dvh - 40px);margin:auto;padding:36px 28px 24px;border:1px solid #d5dbcf;border-radius:24px;background:#f6f6f1;color:#202620;text-align:center;box-shadow:0 24px 80px #20302724;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#chess-signin-loader::backdrop{background:#f6f6f1e8;backdrop-filter:blur(5px)}
#chess-signin-loader .signin-board{box-sizing:border-box;position:relative;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);width:144px;height:144px;margin:0 auto 26px;border:8px solid #203027;border-radius:12px;box-shadow:0 8px 22px #20302718;overflow:hidden}
#chess-signin-loader .signin-board>i{background:#e8e4d7}
#chess-signin-loader .signin-board>i:nth-child(8n+2),#chess-signin-loader .signin-board>i:nth-child(8n+4),#chess-signin-loader .signin-board>i:nth-child(8n+5),#chess-signin-loader .signin-board>i:nth-child(8n+7){background:#87947d}
#chess-signin-loader .signin-knight{position:absolute;left:0;top:64px;display:grid;place-items:center;width:32px;height:32px;color:#203027;font:38px/1 Georgia,serif;filter:drop-shadow(0 1px 0 #f6f6f1);animation:signin-knight-move 3.2s ease-in-out infinite}
#chess-signin-loader .signin-kicker{margin:0 0 10px;color:#6b6250;font:500 10px/1.5 monospace;letter-spacing:.18em}
#chess-signin-loader h2{margin:0;color:#202620;font:400 32px/1.15 Georgia,serif;letter-spacing:-.04em}
#chess-signin-loader .signin-stage{min-height:42px;margin:14px 0 0;color:#5b6559;font-size:13px;line-height:1.6}
#chess-signin-loader .signin-dots{display:flex;justify-content:center;gap:6px;margin:18px 0 24px}
#chess-signin-loader .signin-dots i{width:5px;height:5px;border-radius:50%;background:#a78b59;animation:signin-dot-pulse 1.2s ease-in-out infinite}
#chess-signin-loader .signin-dots i:nth-child(2){animation-delay:.15s}
#chess-signin-loader .signin-dots i:nth-child(3){animation-delay:.3s}
#chess-signin-loader .signin-close{display:inline-block;width:auto;height:auto;min-height:32px;margin:0;padding:6px 10px;border:0;border-radius:6px;background:transparent;color:#64705e;font:500 12px/1.5 system-ui,sans-serif;text-decoration:underline;text-underline-offset:3px;box-shadow:none;cursor:pointer}
#chess-signin-loader .signin-close:hover{background:#e8ede4;color:#203027;transform:none}
#chess-signin-loader .signin-close:focus-visible{outline:2px solid #a78b59;outline-offset:3px}
@keyframes signin-knight-move{0%,15%,100%{transform:translate(0,0)}35%,55%{transform:translate(64px,-32px)}75%,85%{transform:translate(0,0)}}
@keyframes signin-dot-pulse{0%,80%,100%{opacity:.3}40%{opacity:1}}
@media(prefers-reduced-motion:reduce){#chess-signin-loader .signin-knight,#chess-signin-loader .signin-dots i{animation:none}}
html[data-theme="light"] { color-scheme:light; }
html[data-theme="dark"] { color-scheme:dark; --ink:#e7ece2; --paper:#111b15; --muted:#b0bdab; --line:#425341; --dark:#202923; color:#e7ece2; background:#111b15; }
.site-header .theme-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; min-height:44px; margin:0; padding:13px; border:0; border-radius:50%; background:transparent; color:#203027; box-shadow:none; cursor:pointer; line-height:1; transform:none; }
.site-header .theme-toggle:hover { background:transparent; transform:none; }
.site-header .theme-toggle:focus-visible { outline:2px solid #9b804d; outline-offset:3px; }
.theme-toggle svg { display:block; flex:none; width:16px; height:16px; }
html[data-theme="dark"] body { background:#111b15; color:#e7ece2; }
html[data-theme="dark"] .site-header,html[data-theme="dark"] footer { background:#111b15; color:#b0bdab; border-color:#425341; }
html[data-theme="dark"] .site-header .brand,html[data-theme="dark"] .brand-mark { color:#e7ece2; }
html[data-theme="dark"] .theme-toggle { color:#e0cda4; border-color:#63745c; }
html[data-theme="dark"] .theme-toggle:hover { background:transparent; }
html[data-theme="dark"] :is(.form-panel,.directory,.stat-card:not(.rating-card),.profile-details,.profile-hero,.activity-panel,.profile-contributions,.photo-editor,.card,.login-card,.mobile-account-dialog,#chess-signin-loader) { background:#1d2a21; color:#e7ece2; border-color:#425341; box-shadow:none; }
html[data-theme="dark"] :is(.workspace,.controls,.table-head,.player-row,.profile-details dl div,.activity-list li,.archive-event,.link-review-row,#link-review-form,.section-toolbar,.stats-table td,.stats-table th) { border-color:#425341; }
html[data-theme="dark"] :is(h1,h2,h3,h4,.player-name,.rating,.profile-details dd,.activity-list strong,.form-panel label,.search-field,.directory label) { color:#e7ece2; }
html[data-theme="dark"] :is(.muted,.lede,.description,.panel-description,.intro>p:last-child,.source-note,.total-count,.metric,.rating small,.missing,.profile-subtitle,.profile-details dt,.activity-list small,.activity-note,.data-unavailable,.saved-games-description,.profile-fide-id,.profile-photo-note,.archive-event p,.link-review-row p,.link-review-panel>summary span,.form-hint,.utility,.login-access-note,.profile-bio,.request-note,.profile-contributions>p:not(.section-index),.stat-card small,.stat-card>span,.stats-totals span,.stats-chart-range,.stats-note,.stats-profiles span,.stats-table-wrap caption,.stats-daily summary,.tournament-sync-controls p) { color:#b6c2af; }
html[data-theme="dark"] :is(.eyebrow,.section-index,.section-number) { color:#d4bd8d; }
html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,#profile-tournament-select,#link-profile,.review-settings select) { background:#142019; color:#e7ece2; border-color:#63745c; }
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color:#a4b09f; opacity:1; }
html[data-theme="dark"] :is(.table-head,.controls,.player-row:nth-child(even),.maintenance-control,.review-guidance,.tournament-sync-controls,.sync-note) { background:#18251d; color:#d4dfcd; }
html[data-theme="dark"] .player-row:nth-child(odd) { background:#1d2a21; }
html[data-theme="dark"] :is(.back-link,.official-link,.activity-pgn,.activity-list a,.profile-contributions a,.archive-event a,.link-review-row a,#link-profile-preview,.player-links,.player-links a) { color:#dfc898; }
html[data-theme="dark"] :is(.secondary-button,.show-more,.saved-games-retry,.profile-hero .official-link) { background:#25392b; color:#e7ece2; border-color:#63745c; }
html[data-theme="dark"] :is(.secondary-button,.show-more,.saved-games-retry):hover { background:#334a37; }
html[data-theme="dark"] .profile-tags span { background:#293e2e; border-color:#66795c; color:#e1e8d9; }
html[data-theme="dark"] .site-header .nav-user-menu { background:#1d2a21; color:#e7ece2; border-color:#63745c; }
html[data-theme="dark"] .site-header .nav-user-menu #sign-out { background:#2b3e2f; color:#e7ece2; }
html[data-theme="dark"] .mobile-account-heading button { color:#e7ece2; border-color:#63745c; }
html[data-theme="dark"] #chess-signin-loader::backdrop { background:#111b15e8; }
html[data-theme="dark"] :is(.error,#link-form-status,.field-error) { color:#ffb9a8; }
html[data-theme="dark"] :is(.status,.success) { color:#cadaba; }
html[data-theme="dark"] .stats-totals>div { background:#18251d; border-color:#425341; }
html[data-theme="dark"] :is(.stats-totals strong,.stats-profiles a) { color:#e7ece2; }
html[data-theme="dark"] :is(.dashboard-tabs,.admin-badge) { background:#18251d; border-color:#425341; color:#b6c2af; }
html[data-theme="dark"] .dashboard-tabs button { color:#d4dfcd; }
html[data-theme="dark"] .dashboard-tabs button[aria-selected="true"] { background:#344b38; color:#f2e1b8; }
html[data-theme="dark"] .dashboard-tabs button:hover:not([aria-selected="true"]) { background:#2a3d2e; color:#e7ece2; }
html[data-theme="dark"] :is(.maintenance-switch,.maintenance-control p) { color:#b6c2af; }
html[data-theme="dark"] #saved-games-wrap { background:#18251d; border-color:#425341; }
html[data-theme="dark"] :is(.field-help,.source-status,.privacy,.form-note,.form-help,.saved-games-help,.form-panel small,.form-panel .panel-number,#saved-games-wrap p,#saved-games-wrap label) { color:#b6c2af; }
html[data-theme="dark"] .intro h1 em { color:#b5c2a7; }
html[data-theme="dark"] :is(#paste-button,#refresh-saved-games) { color:#dfc898; background:#25392b; border-color:#63745c; }
html[data-theme="dark"] :is(.external-results a,.external-results-links a,.profile-update-link) { color:#dfc898; }
html[data-theme="dark"] :is(.external-results p,.profile-inline-ratings small,.profile-inline-ratings span) { color:#b6c2af; }
html[data-theme="dark"] :is(.photo-editor p,.profile-photo-column p) { color:#b6c2af; }
html[data-theme="dark"] #copy-fide-id { color:#dfc898; }
html[data-theme="dark"] :is(.game-item a,.profile-review h3 a,.totals) { color:#dfc898; }
html[data-theme="dark"] :is(.game-item small,.login-log small,.login-log span,.profile-review .review-meta) { color:#b6c2af; }
html[data-theme="dark"] .delete-button { background:#382a26; color:#ffc1b4; border-color:#80584e; }
html[data-theme="dark"] .review-comparison>div { background:#18251d; color:#e7ece2; border-color:#425341; }
/* Board squares, piece images, evaluation tracks and move-quality colours are independent. */
/* Tablet / split-view adaptations; phone and wide desktop layouts are untouched. */
@media(min-width:601px) and (max-width:1100px){
  .directory .table-head,.directory .player-row{grid-template-columns:minmax(220px,1fr) 85px repeat(3,minmax(44px,60px));column-gap:12px}
  .directory .player-row{padding:12px 20px;min-height:64px}
  .directory .table-head{padding-left:20px;padding-right:20px}
  .directory .player-row>.player-cell:first-child{display:block;min-width:0}
  .directory .player-name{display:block;width:auto;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45}
  .directory .player-links{margin-top:4px;flex-wrap:wrap;white-space:normal;gap:6px}
  .directory .rating small{display:block;margin:3px 0 0}
  .directory input,.directory select,.board-toolbar button,.analysis-card button{min-height:44px}
  #profile-content,.profile-identity,.form-panel,.preview-panel{min-width:0}
  #player-name{overflow-wrap:anywhere}
  .profile-inline-ratings{max-width:100%;min-width:0}
  .site-header .nav-pill{min-height:44px}
}
@media(min-width:601px) and (max-width:900px){
  .directory .controls{grid-template-columns:repeat(2,minmax(0,1fr));padding-left:20px;padding-right:20px}
  .directory .search-field{grid-column:1/-1}
}
@media(min-width:601px) and (max-width:760px){
  .directory .table-head{display:none}
  .directory .player-row{grid-template-columns:minmax(0,1fr) 85px}
  .directory .player-row>.player-cell:first-child{grid-column:auto}
  .directory .player-row>.player-cell:nth-child(n+3){display:none}
}
@media(min-width:601px) and (max-width:700px){
  .site-header{flex-wrap:wrap;gap:12px}
  .site-header .header-actions{order:3;flex:1 0 100%;justify-content:center;flex-wrap:wrap}
}
@media(min-width:601px) and (max-width:1000px){
  .workspace{grid-template-columns:minmax(0,1fr)}
  .chessboard{max-width:560px;width:100%;aspect-ratio:1}
}
/* Games workspace only: preserve the existing phone and tablet experience. */
.desktop-selection-value{display:none}
@media(min-width:761px){
  .result-state .players{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px}
  .result-state .players>div{display:flex;align-items:center;gap:10px;min-width:0}
  .result-state .players>div:last-child{flex-direction:row-reverse;text-align:right}
  .result-state .players p{min-width:0;margin:0}
  .result-state .players strong{display:block;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
  .result-state .players>.game-score{display:block;font-size:clamp(30px,2.6vw,40px);font-weight:650;line-height:1.2;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
}
@media(min-width:1101px){
  main{max-width:1540px;margin:0 auto;padding:36px 32px 56px}
  .intro{display:grid;grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr);column-gap:56px;row-gap:12px;align-items:center;margin:0 0 32px;padding:8px 0 0}
  .intro .eyebrow{grid-column:1/-1;margin:0}
  .intro h1{grid-column:1;margin:0;font-size:clamp(44px,4vw,60px);line-height:1.06;letter-spacing:-2px}
  .intro .lede{grid-column:2;max-width:620px;margin:0;font-size:14px;line-height:1.8}
  .workspace{display:grid;grid-template-columns:320px minmax(0,1fr);align-items:stretch;overflow:visible}
  .form-panel{min-width:0;padding:28px 24px}
  .form-panel>.panel-number{margin-bottom:24px}
  .form-panel h2{font-size:26px;margin:0 0 10px}
  .form-panel .panel-description{margin:0 0 24px;line-height:1.6}
  #game-form{min-width:0;gap:12px}
  #game-form>*{min-width:0}
  .number-grid{grid-template-columns:minmax(0,1fr);gap:14px;margin-top:12px}
  .number-grid .board-field{grid-column:auto}
  .form-panel input,.form-panel select{width:100%;min-width:0;min-height:46px;font-size:13px}
  .url-tools{flex-direction:column;align-items:stretch;gap:10px}
  .recent-wrap{display:flex;align-items:center;gap:8px;min-width:0}
  .recent-wrap select{max-width:none;flex:1;min-width:0}
  .saved-game-controls{flex-wrap:wrap;gap:8px}
  .saved-game-controls select{flex:1 1 100%;width:100%}
  .saved-games-wrap{padding:12px}
  .desktop-selection-value{display:block;flex:1 0 100%;margin:6px 0 0;font-size:12px;line-height:1.6;color:var(--muted,#5b6258);overflow-wrap:anywhere}
  .desktop-selection-value[hidden]{display:none}
  .url-tools #paste-button{text-align:left;align-self:flex-start;min-height:36px}
  .analysis-heading{flex-wrap:wrap;gap:12px}
  .analysis-card .compact-action,.board-toolbar button{min-height:44px}
  .board-toolbar .board-options{flex-wrap:wrap;gap:10px}
  .analysis-card .best-arrow-control{min-height:44px;display:flex;align-items:center;gap:10px}
  .analysis-card .move-step-controls{gap:12px}
  .analysis-card .move-jump-controls{gap:14px;margin-top:14px;padding-top:14px}
  .privacy{margin-top:18px;text-align:left;line-height:1.65}
  .preview-panel{min-width:0;padding:28px}
  .preview-panel>.panel-number{margin-bottom:22px}
  .result-state:focus{outline:1px solid #bca779;outline-offset:4px}
  .empty-state{min-height:440px;padding:32px 16px}
  .result-state>h3{font-size:clamp(24px,2.2vw,34px);line-height:1.25;overflow-wrap:anywhere}
  .players{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px}
  .players>div{min-width:0}
  .players strong{overflow-wrap:anywhere}
  .players>.game-score{font-size:24px;white-space:nowrap}
  .board-toolbar{min-height:44px}
  .board-and-pgn{gap:20px;grid-template-columns:minmax(0,1.1fr) minmax(280px,1fr);align-items:start}
  .board-and-pgn>.notation-panel{grid-column:1/-1}
  .board-and-pgn .chessboard{width:100%;max-width:560px}
  .analysis-card{min-width:0;display:flex;flex-direction:column;gap:12px;padding:20px}
  .analysis-card>.analysis-heading{order:0}
  .analysis-card>.best-arrow-control{order:1;margin:0}
  .analysis-card>.evaluation-summary{order:2;padding:12px;background:#152019;border:1px solid #52604f;border-radius:7px}
  .analysis-card .evaluation-track{height:12px}
  .analysis-card .evaluation>strong{font-size:18px}
  .analysis-card>.analysis-output{order:3;margin:0;padding-bottom:14px;border-bottom:1px solid #52604f;grid-template-columns:minmax(90px,1fr) minmax(0,2fr)}
  .analysis-card .analysis-output strong{overflow-wrap:anywhere;font-size:13px}
  .analysis-card>.position-navigation{order:4;margin:0;gap:10px}
  .analysis-card .position-navigation #position-label{text-align:left}
  .analysis-card .move-jump-controls{margin-top:2px;padding-top:10px}
  .analysis-card>.move-list-panel{order:5;margin:0;min-width:0;border:0;border-radius:0;background:transparent}
  .analysis-card>.move-list-panel{display:flex;flex-direction:column}
  .analysis-card .review-summary{order:0}
  .analysis-card .move-list-heading{order:1}
  .analysis-card .move-list-columns{order:2}
  .analysis-card .move-list{order:3}
  .analysis-card .game-review{order:4}
  .desktop-review-settings{border:1px solid #52604f;border-radius:7px;padding:0 12px}
  .desktop-review-settings>summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;color:#e7ece2;font-size:13px;font-weight:600;line-height:1.5;padding:10px 0}
  .desktop-review-settings>summary:focus-visible{outline:2px solid #c8ad7a;outline-offset:3px}
  .desktop-review-settings[open]{padding-bottom:14px}
  .desktop-review-settings .review-settings{padding-top:8px}
  .analysis-card .game-review{margin:4px 0 4px;padding:12px 0 0;border-bottom:0}
  .analysis-card .review-settings{gap:14px}
  .analysis-card .review-actions{display:flex;align-items:center;gap:10px;margin-top:12px}
  .analysis-card .review-actions button{width:auto;min-height:44px;margin:0;padding:10px 16px}
  .analysis-card .review-actions #review-game{flex:1}
  .analysis-card .best-arrow-control input{width:18px;height:18px;margin:0;flex:none}
  .analysis-card .review-settings>*{min-width:0}
  .analysis-card .analysis-heading>div{min-width:0}
  .analysis-card .analysis-output>*{min-width:0}
  .analysis-card .move-list-heading{padding:12px 0;gap:8px;flex-wrap:wrap}
  .analysis-card .move-list-columns{padding-left:8px;padding-right:8px}
  .analysis-card .move-list{padding-left:8px;padding-right:8px}
  .analysis-card>.material-panel{order:-1;margin:0 0 4px;padding:0 0 12px;border-top:0;border-bottom:1px solid #52604f}
  .analysis-card>.material-panel .capture-row{grid-template-columns:90px minmax(0,1fr);font-size:11px;min-height:26px}
  .analysis-card>.material-panel .captured-pieces img{width:20px;height:20px}
  .analysis-card>.material-panel .material-heading{gap:6px;margin-bottom:6px}
  .analysis-card>.material-panel .material-heading h5,.analysis-card>.material-panel #material-balance{font-size:12px}
  .move-list{max-height:360px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding-block:8px}
  .mobile-board-dock>.position-navigation{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0;padding:0}
  .mobile-board-dock .position-navigation #position-label{font-size:12px;line-height:1.5;text-align:center}
  .mobile-board-dock .move-step-controls{gap:10px}
  .mobile-board-dock .position-navigation .move-action{min-height:40px;height:40px;padding:8px 10px;font-size:13px}
  .mobile-board-dock .move-jump-controls{gap:12px;margin:0;padding-top:8px}
  .mobile-board-dock .move-jump-controls .move-action{min-height:34px;height:34px;padding:6px 10px;font-size:11px}
  .mobile-board-dock>.material-panel{margin:0;padding:12px;border:1px solid #52604f;border-radius:7px}
  .mobile-board-dock .capture-row{grid-template-columns:90px minmax(0,1fr);font-size:11px;min-height:26px}
  .mobile-board-dock .captured-pieces img{width:20px;height:20px}
  .mobile-board-dock .material-heading{margin-bottom:6px}
  .mobile-board-dock .material-heading h5,.mobile-board-dock #material-balance{font-size:12px}
  .analysis-card{padding:16px;gap:10px}
  .analysis-card .analysis-heading h4{font-size:17px}
  .analysis-card .analysis-heading #analysis-toggle{min-height:36px;padding:8px 12px;font-size:12px}
  .analysis-card .best-arrow-control{min-height:32px;font-size:12px}
  .analysis-card>.evaluation-summary{padding:10px}
  .analysis-card .move-list{max-height:280px}
}
@media(min-width:1500px){
  .board-and-pgn{grid-template-columns:minmax(0,1.12fr) minmax(320px,1fr);align-items:start}
  .board-and-pgn>.mobile-board-dock{grid-column:1;grid-row:1;position:static;align-self:start}
  .board-and-pgn>.analysis-card{grid-column:2;grid-row:1;margin:0}
  .board-and-pgn>.move-list-panel{grid-column:2;grid-row:2;margin:0}
  .board-and-pgn>.material-panel{grid-column:1;grid-row:2;margin:0}
  .board-and-pgn>.notation-panel{grid-column:1/-1}
}
/* Light surfaces only. Board squares, pieces, evaluation tracks and quality badges stay independent. */
html[data-theme="light"] #preview-panel{background:#f4f3eb;color:#243329}
html[data-theme="light"] #preview-panel :is(h3,h4,h5,#white-name,#black-name,#best-move,#best-line,#position-label,#mobile-position-label){color:#243329}
html[data-theme="light"] #preview-panel :is(p,label,small,.panel-number,.result-topline,.notation-heading,.move-list-heading span,.move-list-columns,.move-number,.engine-status,.capture-row,.analysis-kicker){color:#596652}
html[data-theme="light"] #preview-panel :is(.analysis-card,.move-list-panel,.desktop-review-settings,.review-summary,.review-guidance,.evaluation-summary,.mobile-board-dock,.mobile-board-summary){background:#fafaf5;border-color:#bdc7b5;color:#243329;box-shadow:none}
html[data-theme="light"] #preview-panel :is(.players,.material-panel,.move-jump-controls,.game-review,.analysis-output,.move-list-heading,.review-summary th,.review-summary td){border-color:#c6cebe}
html[data-theme="light"] #preview-panel :is(button,.compact-action){background:#e6ebdf;color:#263b2b;border-color:#abb99e}
html[data-theme="light"] #preview-panel button:hover:not(:disabled){background:#d8e2cf}
html[data-theme="light"] #preview-panel :is(#analysis-toggle[aria-pressed="true"],.playback-toggle[aria-pressed="true"]){background:#344d39;color:#fff}
html[data-theme="light"] #preview-panel :is(.desktop-review-settings>summary,.move-list-heading h5,.review-summary th,.review-summary td,#review-move-detail){color:#243329}
html[data-theme="light"] #preview-panel :is(#game-result,#evaluation-score,#material-balance,.review-summary-state){color:#765d2e}
html[data-theme="light"] #preview-panel :is(.notation-panel pre,.notation-move){background:#f4f5ed;color:#263b2b;border-color:#bdc7b5}
html[data-theme="light"] #preview-panel .notation-move[aria-current="step"]{background:#dbc797;color:#243329;border-color:#a68a51}
html[data-theme="light"] #preview-panel :is(.result-actions a,.review-options a){background:#e6ebdf;color:#263b2b;border-color:#abb99e}
html[data-theme="light"] #preview-panel .mobile-board-evaluation .evaluation-explanation{color:#40533e}
html[data-theme="light"] #preview-panel .mobile-board-evaluation .evaluation-summary:has(.evaluation-explanation:empty)::before{color:#596652}
html[data-theme="light"] #preview-panel :is(.analysis-output p>span,.engine-suggestions p>span,.move-list-row>span,#live-status){color:#596652}
html[data-theme="light"] #preview-panel .evaluation-track{border:1px solid #8b9980}
html[data-theme="light"] #preview-panel .review-summary caption{color:#243329}
/* Match the saved-tournament Refresh action without changing review layout. */
html[data-theme="light"] #preview-panel #review-game{background:#fff;color:#40513c;border-color:#cdd5c9}
html[data-theme="light"] #preview-panel #review-game:hover:not(:disabled){background:#e8ede4}
html body :is(#refresh-saved-games,#review-game){box-sizing:border-box;flex:none;width:auto;height:auto;min-height:44px;margin:0;padding:9px 12px;border:1px solid #cdd5c9;border-radius:8px;background:#fff;color:#40513c;font:600 12px 'DM Sans',Arial,sans-serif;letter-spacing:normal;text-transform:none;box-shadow:none;cursor:pointer}
html body :is(#refresh-saved-games,#review-game):hover:not(:disabled){background:#e8ede4}
html body :is(#refresh-saved-games,#review-game):focus-visible{outline:3px solid #a78b59;outline-offset:2px}
html body :is(#refresh-saved-games,#review-game):disabled{opacity:.6;cursor:wait}
html[data-theme="dark"] body :is(#refresh-saved-games,#review-game){color:#dfc898;background:#25392b;border-color:#63745c}
html[data-theme="dark"] body :is(#refresh-saved-games,#review-game):hover:not(:disabled){background:#334a37;color:#dfc898}
html[data-theme="dark"] body #preview-button{background:#25392b;color:#dfc898;border:1px solid #63745c;border-radius:8px;box-shadow:none}
html[data-theme="dark"] body #preview-button span{color:inherit}
html[data-theme="dark"] body #preview-button:hover:not(:disabled){background:#334a37;color:#dfc898}
html[data-theme="dark"] body #preview-button:focus-visible{outline:3px solid #a78b59;outline-offset:2px}
html[data-theme="dark"] body #preview-button:disabled{opacity:.6;cursor:wait}
/* Compact heading rhythm after removing decorative numbered labels. */
.form-panel{padding-top:24px}
.preview-panel{padding-top:24px}
#source-status:empty{display:none}
.directory-top{padding-top:24px;padding-bottom:18px}
.profile-details,.profile-contributions{padding-top:24px;padding-bottom:24px}
.profile-details h2{margin-top:0;margin-bottom:16px}
.activity-panel h2{margin-top:0;margin-bottom:14px}
.profile-contributions h2{margin-top:0}
@media(max-width:600px){
  .form-panel{padding-top:20px}
  .directory-top{padding-top:18px;padding-bottom:14px}
  .profile-details,.profile-contributions{padding-top:20px;padding-bottom:20px}
}
/* Keep the landing finder familiar; loaded games get the available workspace. */
.game-finder{min-width:0}
.game-finder>summary{display:none}
.has-loaded-game .intro{display:none}
.has-loaded-game .workspace{grid-template-columns:minmax(0,1fr)}
.has-loaded-game .game-finder>summary{display:list-item;cursor:pointer;min-height:44px;padding:12px 20px;box-sizing:border-box;font:600 14px 'DM Sans',sans-serif;color:var(--ink);background:var(--paper);border-bottom:1px solid var(--line)}
.has-loaded-game .game-finder>summary:focus-visible{outline:2px solid #a78b59;outline-offset:-3px}
.has-loaded-game .game-finder:not([open])>.form-panel{display:none}
.has-loaded-game .game-finder[open]>.form-panel{max-width:760px;margin-inline:auto}
@media(min-width:601px) and (max-width:1100px){
  .intro{display:flex;flex-direction:column;align-items:flex-start;gap:16px;height:auto;min-height:0}
  .intro h1,.intro .lede,.intro .eyebrow{position:static;width:auto;max-width:100%;margin:0;transform:none}
  .intro h1{font-size:clamp(42px,6vw,60px);line-height:1.1}
  .intro .lede{font-size:15px;line-height:1.7}
}
@media(min-width:1101px){
  .has-loaded-game main{padding-top:20px}
  .has-loaded-game .board-and-pgn{grid-template-columns:minmax(0,1fr) minmax(340px,400px)}
}
@media(max-width:600px){
  .has-loaded-game main{padding-top:12px}
}
body.reference-workspace .brand{font-size:27px;letter-spacing:-1px;color:var(--cf-text)}
body.reference-workspace .brand-mark{font-size:44px;line-height:1;color:var(--cf-accent)}
html[data-theme="dark"] body.reference-workspace .brand-mark{color:#a8d3bb}
body.reference-workspace main{max-width:1280px;box-sizing:border-box;margin:0 auto;padding:32px 0}
body.reference-workspace.has-loaded-game main{padding:0}
body.reference-workspace .workspace{border:1px solid var(--cf-line);border-top:0;border-radius:0 0 10px 10px;box-shadow:none;background:var(--cf-surface);overflow:visible;min-height:0}
body.reference-workspace.has-loaded-game .preview-panel{padding:0;background:var(--cf-surface);color:var(--cf-text);border:0}
body.reference-workspace #result-state:focus{outline:0}
body.reference-workspace.has-loaded-game .game-finder>summary{display:none}
body.reference-workspace.has-loaded-game .game-finder[open]>.form-panel{border-bottom:1px solid var(--cf-line)}
body.reference-workspace #result-state>h3{display:none}
body.reference-workspace .tournament-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0;padding:10px 24px;border-bottom:1px solid var(--cf-line);min-width:0}
body.reference-workspace .tournament-toolbar button{height:44px;min-height:44px;width:auto;margin:0;padding:8px 12px;border:0;border-radius:6px;background:transparent;color:var(--cf-text);font:500 13px 'DM Sans',sans-serif;box-shadow:none;cursor:pointer}
body.reference-workspace .tournament-toolbar .toolbar-event{font-weight:700;max-width:360px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;padding-left:0}
body.reference-workspace .tournament-toolbar .number-grid{display:flex;align-items:center;gap:8px;margin:0;min-width:0}
body.reference-workspace .tournament-toolbar .number-grid>div{min-width:0}
body.reference-workspace .tournament-toolbar .number-grid label,body.reference-workspace .tournament-toolbar #board-players-status,body.reference-workspace .desktop-selection-value{display:none}
body.reference-workspace .tournament-toolbar select{width:110px;min-height:44px;padding:8px;border:0;border-left:1px solid var(--cf-line);border-radius:0;background:var(--cf-surface);color:var(--cf-text);font:13px 'DM Sans',sans-serif}
body.reference-workspace .tournament-toolbar #board{width:150px}
body.reference-workspace .tournament-toolbar #share-game{margin-left:auto;white-space:nowrap}
body.reference-workspace .tournament-toolbar .game-score{font:700 20px 'DM Sans',sans-serif;color:var(--cf-text);white-space:nowrap}
body.reference-workspace #result-state .board-and-pgn{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,1fr);gap:20px;align-items:start;margin:0;padding:20px}
body.reference-workspace #result-state .mobile-board-dock{display:flex;flex-direction:column;position:static;gap:0;min-width:0;padding:0;background:var(--cf-surface);border:1px solid var(--cf-line);border-radius:7px;box-shadow:none}
body.reference-workspace #chessboard{order:2;width:calc(100% - 40px);height:auto;max-width:none;aspect-ratio:1;align-self:center;margin:0 20px 20px;border:0;border-radius:2px;box-shadow:none}
body.reference-workspace #chessboard:not([data-theme="brown"]) .light-square{background:#e8e9d9}
body.reference-workspace #chessboard:not([data-theme="brown"]) .dark-square{background:#8b9c7f}
body.reference-workspace #chessboard[data-theme="green"] .light-square{background:#eeeed2}
body.reference-workspace #chessboard[data-theme="green"] .dark-square{background:#769656}
html[data-theme="dark"] body.reference-workspace #chessboard:not([data-theme="brown"]) .light-square{background:#c4cbb5}
html[data-theme="dark"] body.reference-workspace #chessboard:not([data-theme="brown"]) .dark-square{background:#607e6c}
html[data-theme="dark"] body.reference-workspace #chessboard[data-theme="green"] .light-square{background:#eeeed2}
html[data-theme="dark"] body.reference-workspace #chessboard[data-theme="green"] .dark-square{background:#769656}
body.reference-workspace .player-strip{display:flex;align-items:center;gap:10px;padding:10px 16px;min-height:50px;box-sizing:border-box;color:var(--cf-text);min-width:0}
body.reference-workspace .player-strip p{margin:0;min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:6px}
body.reference-workspace .player-strip strong{font:700 14px/1.4 'DM Sans',sans-serif;overflow-wrap:anywhere;color:var(--cf-text)}
body.reference-workspace .player-strip small{color:var(--cf-muted);font:10px 'DM Sans',sans-serif}
body.reference-workspace .player-strip>.piece{display:block;flex:0 0 22px;width:22px;height:22px;border:1px solid #626d64;border-radius:50%;background:#f6f5e9}
body.reference-workspace .player-strip.black-player>.piece{background:#151c18}
body.reference-workspace .player-strip>.piece img{display:none}
body.reference-workspace .white-player{order:3;border-top:1px solid var(--cf-line)}
body.reference-workspace .black-player{order:1}
body.reference-workspace .is-flipped .white-player{order:1;border-top:0}
body.reference-workspace .is-flipped .black-player{order:3;border-top:1px solid var(--cf-line)}
body.reference-workspace .player-strip .captured-pieces{margin-left:auto;display:flex;gap:1px;flex-wrap:wrap;justify-content:flex-end;max-width:38%;font-size:11px;color:var(--cf-muted)}
body.reference-workspace .captured-pieces img{width:18px;height:22px;object-fit:contain;background:transparent;filter:drop-shadow(0 0 .7px #c5d4c4)}
html[data-theme="dark"] body.reference-workspace .captured-pieces img[src^="/pieces/b"]{background:#d2d8c8;border-radius:2px;box-shadow:0 0 0 1px #d2d8c8;filter:none}
body.reference-workspace .position-navigation{order:4;display:grid!important;grid-template-columns:repeat(6,44px) minmax(0,1fr)!important;gap:6px!important;margin:0!important;padding:10px 12px!important;border-top:1px solid var(--cf-line)}
body.reference-workspace .position-navigation .move-action{display:block;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:6px;font-size:17px;border:1px solid var(--cf-line);border-radius:5px;background:var(--cf-panel);color:var(--cf-text)}
body.reference-workspace .position-navigation [data-playback-toggle]{background:var(--cf-accent);color:#fff;font-size:12px}
body.reference-workspace .position-navigation #flip-board{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;margin:0;padding:6px;background:var(--cf-panel);color:var(--cf-text);border:1px solid var(--cf-line);border-radius:5px;font-size:23px;line-height:1}
body.reference-workspace #board-theme[hidden]{display:none}
body.reference-workspace .board-palette-options{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:8px 0 12px;border:0;min-width:0}
body.reference-workspace .board-palette-options legend{padding:0;font-size:12px;color:var(--cf-muted)}
body.reference-workspace .board-palette-options button{display:flex;align-items:center;gap:7px;min-height:44px;padding:8px 10px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-panel);color:var(--cf-text);font:500 12px 'DM Sans',sans-serif;cursor:pointer}
body.reference-workspace .board-palette-options button[aria-pressed="true"]{outline:2px solid #769e88;outline-offset:1px;font-weight:700}
body.reference-workspace .board-palette-options button[aria-pressed="true"]::after{content:'✓';font-weight:700}
body.reference-workspace .palette-icon{display:inline-block;flex:none;width:22px;height:22px;border:1px solid #7e8c7c;border-radius:3px;background:conic-gradient(#8b9c7f 25%,#e8e9d9 0 50%,#8b9c7f 0 75%,#e8e9d9 0);background-size:100% 100%}
html[data-theme="dark"] body.reference-workspace .palette-current{background:conic-gradient(#607e6c 25%,#c4cbb5 0 50%,#607e6c 0 75%,#c4cbb5 0)}
body.reference-workspace .palette-green{background:conic-gradient(#769656 25%,#eeeed2 0 50%,#769656 0 75%,#eeeed2 0)}
body.reference-workspace .palette-brown{background:conic-gradient(#b58863 25%,#f0d9b5 0 50%,#b58863 0 75%,#f0d9b5 0)}
body.reference-workspace .position-navigation #position-label{display:block;padding:0 4px;min-height:0;text-align:right;color:var(--cf-text);font:12px/1.5 'DM Sans',sans-serif;overflow-wrap:anywhere}
body.reference-workspace #result-state .analysis-card{display:flex;flex-direction:column;gap:0;min-width:0;padding:0;margin:0;overflow:visible;border:1px solid var(--cf-line);border-radius:7px;background:var(--cf-surface);color:var(--cf-text)}
body.reference-workspace .workspace-tabs{display:flex;border-bottom:1px solid var(--cf-line);padding:0 16px;gap:0}
body.reference-workspace .workspace-tabs button{flex:1;height:48px;min-height:44px;margin:0;padding:10px 4px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:var(--cf-muted);font:500 14px 'DM Sans',sans-serif;cursor:pointer}
body.reference-workspace .workspace-tabs button[aria-selected="true"]{color:var(--cf-text);font-weight:700;border-bottom-color:var(--cf-accent)}
html[data-theme="dark"] body.reference-workspace .workspace-tabs button[aria-selected="true"]{border-bottom-color:#9bd0b2}
body.reference-workspace .tool-pane{padding:16px;min-width:0}
body.reference-workspace .tool-pane[hidden]{display:none}
body.reference-workspace .analysis-heading{gap:8px;margin:0 0 8px;align-items:center;flex-direction:row}
body.reference-workspace #result-state .analysis-heading{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px}
body.reference-workspace #result-state .analysis-heading #analysis-toggle{width:auto;min-width:0;flex:none}
body.reference-workspace .analysis-heading h4{font:500 13px 'DM Sans',sans-serif;color:var(--cf-text)}
body.reference-workspace .analysis-kicker{display:none}
body.reference-workspace #result-state #analysis-toggle{min-height:44px;padding:8px 12px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-accent);color:#fff;font-size:12px}
body.reference-workspace .engine-options{font-size:12px;color:var(--cf-muted);margin-bottom:10px}
body.reference-workspace summary{cursor:pointer;min-height:44px;align-content:center}
body.reference-workspace .best-arrow-control{color:var(--cf-text);font-size:13px}
body.reference-workspace #result-state .evaluation-summary{background:var(--cf-panel);border:0;border-radius:7px;padding:14px;margin:0 0 8px}
body.reference-workspace .evaluation{display:flex;flex-direction:row-reverse;gap:14px;align-items:center}
body.reference-workspace #evaluation-score{color:var(--cf-text);font:750 32px/1.2 'DM Sans',sans-serif;text-align:left}
body.reference-workspace .evaluation-track{flex:1;height:7px;border:1px solid #6a786d;background:#111b15}
body.reference-workspace .evaluation-track span{background:#edf0e1}
body.reference-workspace .evaluation-explanation{color:var(--cf-text);font-size:13px}
body.reference-workspace .analysis-output{display:block;margin:8px 0 16px}
body.reference-workspace .engine-suggestions{display:grid;grid-template-columns:1fr;gap:8px}
body.reference-workspace .analysis-output p>span{font-size:11px;color:var(--cf-muted);text-transform:none;letter-spacing:0}
body.reference-workspace .analysis-output p>strong{font:500 13px/1.5 'DM Sans',sans-serif;color:var(--cf-text)}
body.reference-workspace #engine-status{color:var(--cf-muted);font-size:11px;margin-top:8px}
body.reference-workspace .reference-moves{min-width:0}
body.reference-workspace .move-list-heading{padding:8px 0;margin:0}
body.reference-workspace .move-list-heading h5{color:var(--cf-text);font-size:13px}
body.reference-workspace .move-list-heading>span,body.reference-workspace .move-list-columns,body.reference-workspace .move-number{color:var(--cf-muted);font-size:11px}
body.reference-workspace .move-list-columns{padding:8px 4px;border-bottom:1px solid var(--cf-line)}
body.reference-workspace #move-list{max-height:320px;padding:4px 0;scrollbar-color:#899a8d transparent}
body.reference-workspace .move-list-row{gap:6px;border-bottom:1px solid var(--cf-line);margin:0}
body.reference-workspace #move-list .notation-move{min-height:36px;padding:8px 6px;border:0;border-radius:3px;color:var(--cf-text);font:500 12px/1.5 'DM Sans',sans-serif}
body.reference-workspace #move-list .notation-move[aria-current="step"]{background:var(--cf-selected);color:var(--cf-text);font-weight:700;box-shadow:inset 3px 0 var(--cf-accent)}
body.reference-workspace .source-notation-warning{position:sticky;top:0;z-index:1;margin:0 0 6px;padding:8px 10px;border-left:3px solid #b04b30;background:var(--cf-panel);color:var(--cf-text);font:500 11px/1.5 'DM Sans',Arial,sans-serif;overflow-wrap:anywhere}
body.reference-workspace #move-list .source-illegal-move:disabled{opacity:1;background:#f6e5df;color:#8b2e1c;cursor:not-allowed}
body.reference-workspace #move-list .source-unverified-move:disabled{opacity:1;background:transparent;color:var(--cf-muted);cursor:not-allowed}
body.reference-workspace .source-move-label{display:block;font:600 10px/1.4 'DM Sans',Arial,sans-serif}
body.reference-workspace .source-illegal-move .source-move-label::before{content:'!';display:inline-grid;place-items:center;width:12px;height:12px;margin-right:4px;border:1px solid currentColor;border-radius:50%;font:700 10px/1 Arial,sans-serif}
html[data-theme="dark"] body.reference-workspace #move-list .source-illegal-move:disabled{background:#482b24;color:#ffd4c7}
body.reference-workspace .tool-footer{padding:0 16px 12px}
body.reference-workspace .tool-footer .review-actions{margin:0 0 16px;display:flex;gap:8px}
html body.reference-workspace #result-state #review-game{flex:1;width:100%;height:48px;min-height:48px;border:1px solid var(--cf-accent);border-radius:6px;background:var(--cf-accent);color:#fff;font:600 15px 'DM Sans',sans-serif;padding:10px}
html body.reference-workspace #result-state #review-game:hover:not(:disabled){background:#346754;color:#fff}
body.reference-workspace .export-menus{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--cf-line);gap:12px;padding-top:8px}
body.reference-workspace .action-menu{min-width:0;font-size:13px}
body.reference-workspace .action-menu>summary{list-style:none;padding:8px 0;color:var(--cf-text)}
body.reference-workspace .action-menu>summary::-webkit-details-marker{display:none}
body.reference-workspace .action-menu[open]{grid-column:1/-1}
body.reference-workspace .action-menu :is(button,a){display:block;min-height:44px;box-sizing:border-box;margin:6px 0;padding:10px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-panel);color:var(--cf-text);font:13px 'DM Sans',sans-serif;text-align:center}
body.reference-workspace .action-menu [hidden]{display:none}
body.reference-workspace .notation-panel{min-width:0;padding:0;margin:10px 0;background:var(--cf-panel);border:1px solid var(--cf-line);color:var(--cf-text)}
body.reference-workspace #pgn-preview{min-height:0;max-height:160px;color:var(--cf-text);background:var(--cf-panel);font-size:12px}
body.reference-workspace .workspace-more{border-top:1px solid var(--cf-line);font-size:12px;color:var(--cf-muted)}
body.reference-workspace .workspace-more .board-options{margin:8px 0;justify-content:flex-start}
body.reference-workspace .workspace-more button{min-height:44px;color:var(--cf-text);background:var(--cf-panel);border-color:var(--cf-line)}
body.reference-workspace .workspace-more :is(p,.result-topline,.refresh-control){color:var(--cf-muted);font-size:12px}
body.reference-workspace .game-review{border:0;margin:0 0 12px;padding:0}
body.reference-workspace .game-review p,body.reference-workspace .review-brilliant-option,body.reference-workspace .review-settings label{color:var(--cf-muted)}
body.reference-workspace .review-settings-disclosure{border:1px solid var(--cf-line);border-radius:6px;padding:0 10px}
body.reference-workspace .review-settings-disclosure[open]{padding-bottom:10px}
body.reference-workspace .review-summary{padding:0 0 16px}
body.reference-workspace .review-summary :is(caption,th,td){color:var(--cf-text);border-color:var(--cf-line)}
body.reference-workspace :is(button,summary,select,a):focus-visible{outline:2px solid #769e88;outline-offset:2px}
@media(min-width:1101px){body.reference-workspace.has-loaded-game .board-and-pgn{grid-template-columns:minmax(0,1.35fr) minmax(360px,1fr)}body.reference-workspace .tool-pane{min-height:370px}}
@media(min-width:601px) and (max-width:1100px){body.reference-workspace #result-state .board-and-pgn{grid-template-columns:minmax(0,1fr);max-width:760px;margin:auto}body.reference-workspace .toolbar-event{max-width:300px}body.reference-workspace #move-list .notation-move{min-height:44px}}
@media(max-width:600px){
  body.reference-workspace .workspace{border-left:0;border-right:0}
  body.reference-workspace .brand{font-size:24px}body.reference-workspace .brand-mark{font-size:36px}
  body.reference-workspace #result-state .board-and-pgn{display:flex;flex-direction:column;padding:0;gap:0}
  body.reference-workspace #result-state .mobile-board-dock{width:100%;border:0;border-radius:0}
  body.reference-workspace #chessboard{width:100%;height:auto;max-width:none;margin:0;aspect-ratio:1;border-radius:0}
  body.reference-workspace .player-strip{min-height:44px;padding:8px 12px;gap:8px}
  body.reference-workspace .player-strip strong{font-size:13px}
  body.reference-workspace .player-strip small{font-size:9px}
  body.reference-workspace .player-strip .captured-pieces{max-width:32%}
  body.reference-workspace .captured-pieces img{width:14px;height:18px}
  body.reference-workspace .tournament-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 70px 80px 44px;gap:4px;padding:6px 10px}
  body.reference-workspace .tournament-toolbar .toolbar-event{max-width:100%;width:100%;font-size:12px;grid-column:1;grid-row:1}
  body.reference-workspace .tournament-toolbar .number-grid{display:contents}
  body.reference-workspace .tournament-toolbar .number-grid>div:first-child{grid-column:2;grid-row:1}
  body.reference-workspace .tournament-toolbar .board-field{grid-column:3;grid-row:1}
  body.reference-workspace .tournament-toolbar #round{width:70px}
  body.reference-workspace .tournament-toolbar #board{width:80px}
  body.reference-workspace .tournament-toolbar button[aria-label="Change game"]{display:none}
  body.reference-workspace .tournament-toolbar .game-score{grid-column:1/4;grid-row:2}
  body.reference-workspace .tournament-toolbar #share-game{grid-column:4;grid-row:2}
  body.reference-workspace .tournament-toolbar button{padding:6px 8px;font-size:12px}
  body.reference-workspace .tournament-toolbar .game-score{font-size:18px}
  body.reference-workspace .tournament-toolbar #share-game{font-size:0;width:44px}
  body.reference-workspace .tournament-toolbar #share-game::before{content:'↗';font-size:22px}
  body.reference-workspace .position-navigation{grid-template-columns:repeat(5,44px) minmax(44px,1fr)!important;padding:8px 10px!important;gap:4px!important}
  body.reference-workspace .position-navigation #flip-board{justify-self:end}
  body.reference-workspace .position-navigation #position-label{grid-column:1/-1;grid-row:2;text-align:center;padding-top:3px}
  body.reference-workspace #result-state .analysis-card{width:100%;box-sizing:border-box;border-radius:0;border-left:0;border-right:0}
  body.reference-workspace .workspace-tabs{padding:0 12px}
  body.reference-workspace .tool-pane{padding:12px}
  body.reference-workspace #move-list{max-height:none;overflow:visible}
  body.reference-workspace #move-list .notation-move{min-height:44px}
  body.reference-workspace .tool-footer{padding:0 12px 12px}
  body.reference-workspace .evaluation-explanation{font-size:12px}
  body.reference-workspace .mobile-menu{background:#1e3c30}
}
@media(prefers-reduced-motion:reduce){body.reference-workspace *{scroll-behavior:auto!important;transition:none!important}}
/* A single public selection strip; account-only actions remain separately gated. */
body.reference-workspace .workspace{grid-template-columns:minmax(0,1fr)}
body.reference-workspace .public-tournament-toolbar{grid-column:1/-1;display:grid;grid-template-columns:minmax(200px,1fr) 100px minmax(140px,.8fr) auto;align-items:center;gap:12px;padding:12px 24px}
body.reference-workspace .public-tournament-toolbar .number-grid{display:contents}
body.reference-workspace .public-tournament-toolbar #saved-games-wrap{display:block;min-width:0;margin:0;padding:0;background:transparent;border:0;border-radius:0}
body.reference-workspace .public-tournament-toolbar #saved-games-wrap[hidden]{display:none}
body.reference-workspace .public-tournament-toolbar .number-grid>div{min-width:0}
body.reference-workspace .public-tournament-toolbar label,body.reference-workspace .public-tournament-toolbar .number-grid label{display:block;margin:0 0 4px;color:var(--cf-muted);font:500 11px 'DM Sans',sans-serif}
body.reference-workspace .public-tournament-toolbar :is(#saved-game-select,#round,#board){width:100%;min-width:0;height:44px;padding:8px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-surface);color:var(--cf-text);font:13px 'DM Sans',sans-serif}
body.reference-workspace .public-tournament-toolbar #saved-library-status{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.reference-workspace .public-tournament-toolbar #saved-games-wrap:has(select:disabled) #saved-library-status{position:static;width:auto;height:auto;clip-path:none;white-space:normal;font-size:11px;margin:4px 0 0}
body.reference-workspace .tournament-toolbar-actions{display:flex;align-items:center;gap:6px;padding-top:16px}
body.reference-workspace .public-tournament-toolbar .tournament-toolbar-actions>button{border:1px solid var(--cf-line);background:var(--cf-panel);color:var(--cf-text);min-height:44px;white-space:nowrap}
body.reference-workspace .public-tournament-toolbar #refresh-saved-games{width:44px;padding:8px;font-size:21px;color:var(--cf-text);background:var(--cf-panel)}
body.reference-workspace .public-tournament-toolbar .game-score{font-size:18px}
body.reference-workspace .public-tournament-toolbar [hidden]{display:none!important}
body.reference-workspace .current-event-name{margin:14px 24px 0;font:600 14px/1.5 'DM Sans',sans-serif;color:var(--cf-text)}
body.reference-workspace .live-update-status{grid-column:1/-1;margin:0;padding:8px 24px;border-bottom:1px solid var(--cf-line);background:var(--cf-panel);color:var(--cf-text);font:500 12px/1.5 'DM Sans',sans-serif}
body.reference-workspace .live-update-status[hidden],body.reference-workspace .refresh-control[hidden]{display:none}
@media(min-width:601px){body.reference-workspace .public-tournament-toolbar .number-grid>.board-field{grid-column:auto;grid-row:auto}}
@media(max-width:1100px){body.reference-workspace .public-tournament-toolbar{grid-template-columns:minmax(0,1fr) 90px minmax(130px,.65fr)}body.reference-workspace .tournament-toolbar-actions{grid-column:1/-1;padding:0;justify-content:flex-start}body.reference-workspace .tournament-toolbar-actions #share-game{margin-left:auto}}
@media(max-width:600px){
  body.reference-workspace .public-tournament-toolbar{grid-template-columns:minmax(0,1fr) 90px 100px;gap:8px;padding:10px 12px}
  body.reference-workspace .public-tournament-toolbar :is(#round,#board){padding-inline:3px}
  body.reference-workspace .public-tournament-toolbar .number-grid>div:first-child{grid-column:2;grid-row:1}
  body.reference-workspace .public-tournament-toolbar .board-field{grid-column:3;grid-row:1}
  body.reference-workspace .public-tournament-toolbar .tournament-toolbar-actions{grid-row:2;grid-column:1/-1}
  body.reference-workspace .public-tournament-toolbar button[aria-label="Change game"]{display:block}
  body.reference-workspace .public-tournament-toolbar .game-score{margin-left:auto}
  body.reference-workspace .public-tournament-toolbar .game-score[hidden]+#share-game{margin-left:auto}
  body.reference-workspace .current-event-name{margin:10px 12px;font-size:13px}
}
@media(min-width:601px){
}
@media(min-width:601px) and (max-width:900px){
}
@media(min-width:601px) and (max-width:760px){
}
@media(max-width:600px){
}
@media(max-width:600px){
  body.reference-workspace .position-navigation{display:flex!important;flex-direction:column;gap:6px!important;padding:6px 10px!important}
  body.reference-workspace .mobile-primary-playback{display:grid;grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr);gap:10px;width:100%}
  body.reference-workspace .position-navigation .mobile-primary-playback .move-action{width:100%;min-width:0;min-height:44px;height:44px;padding:6px;font:600 18px/1 'DM Sans',sans-serif}
  body.reference-workspace .mobile-boundary-playback{display:grid;grid-template-columns:44px 44px minmax(0,1fr) 44px;align-items:center;gap:8px;width:100%;border-top:1px solid var(--cf-line);padding-top:6px}
  body.reference-workspace .position-navigation .mobile-boundary-playback :is(.move-action,#flip-board){display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;min-height:44px;height:44px;padding:6px;font:500 18px/1 'DM Sans',sans-serif}
  body.reference-workspace .position-navigation .mobile-boundary-playback #position-label{grid-column:3;grid-row:1;text-align:center;padding:0;min-width:0;font-size:11px;line-height:1.4}
}
/* A fixed-height track beside the squares, with a readable score underneath. */
body.reference-workspace .board-evaluation-frame{order:2;display:grid;grid-template-columns:14px minmax(0,1fr);gap:6px;width:calc(100% - 40px);margin:0 20px 20px;padding:0;min-width:0}
body.reference-workspace .board-evaluation-frame #chessboard{grid-column:2;grid-row:1;align-self:start;width:100%;height:auto;aspect-ratio:1;margin:0;padding:0;min-width:0}
body.reference-workspace .board-evaluation-frame .vertical-evaluation{grid-column:1;grid-row:1;align-self:stretch;position:relative;display:block;width:14px;height:auto;min-height:0;margin:0;padding:0;flex:none;overflow:hidden;border:1px solid #7e8c7c;border-radius:3px;background:#151b17;box-shadow:none}
body.reference-workspace .vertical-evaluation #evaluation-fill{position:absolute;bottom:0;left:0;display:block;width:100%!important;height:50%;margin:0;padding:0;border:0;background:#f3f4e8;transition:height .25s ease}
body.reference-workspace .is-flipped .vertical-evaluation{transform:rotate(180deg)}
body.reference-workspace .evaluation-summary .evaluation{justify-content:flex-start;flex-direction:row}
body.reference-workspace .board-evaluation-label{grid-column:1/-1;grid-row:2;justify-self:start;display:block;min-width:48px;height:24px;padding:3px 6px;box-sizing:border-box;border:1px solid var(--cf-line);border-radius:4px;background:var(--cf-panel);color:var(--cf-text);font:700 12px/16px 'DM Sans',Arial,sans-serif;font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}
@media(min-width:1101px){
  /* Offset by half the evaluation gutter to centre on the squares, not the card. */
  body.reference-workspace .position-navigation{grid-template-columns:repeat(6,44px)!important;justify-content:center;padding:10px 12px 10px 32px!important}
  body.reference-workspace .position-navigation #position-label{grid-column:1/-1;grid-row:2;text-align:center;padding:0}
}
/* Automatic selection feedback never replaces or moves the current board. */
body.reference-workspace .game-load-feedback{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:8px 24px;border-bottom:1px solid var(--cf-line);background:var(--cf-panel);color:var(--cf-text)}
body.reference-workspace .game-load-feedback[hidden]{display:none}
body.reference-workspace #game-load-status{margin:0;flex:1;font:500 12px/1.5 'DM Sans',sans-serif}
body.reference-workspace .game-load-feedback[data-state="loading"]::before{content:'';width:12px;height:12px;flex:none;border:2px solid var(--cf-line);border-top-color:var(--cf-text);border-radius:50%;animation:game-load-spin .8s linear infinite}
body.reference-workspace #retry-game{width:auto;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-surface);color:var(--cf-text);font:600 12px 'DM Sans',sans-serif}
body.reference-workspace #retry-game[hidden]{display:none}
body.reference-workspace:not(.has-loaded-game) .preview-panel{padding:0;background:var(--cf-surface);color:var(--cf-text)}
body.reference-workspace #empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:230px;padding:36px 24px;box-sizing:border-box;text-align:center}
body.reference-workspace #empty-state[hidden]{display:none}
body.reference-workspace #empty-state h1{margin:0;font:600 clamp(24px,4vw,32px)/1.25 'DM Sans',sans-serif;letter-spacing:-.5px;color:var(--cf-text)}
body.reference-workspace #empty-state p{margin:0;max-width:470px;font:400 14px/1.6 'DM Sans',sans-serif;color:var(--cf-muted)}
body.reference-workspace #empty-state .empty-benefits{font-size:12px}
@keyframes game-load-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){body.reference-workspace .game-load-feedback::before{animation:none}}
@media(max-width:600px){
  body.reference-workspace .game-load-feedback{padding:8px 12px}
  body.reference-workspace #empty-state{min-height:210px;padding:28px 20px}
  body.reference-workspace .board-evaluation-frame{width:100%;margin:0;padding:0;grid-template-columns:10px minmax(0,1fr);gap:0}
  body.reference-workspace .board-evaluation-frame #chessboard{width:100%;height:auto;margin:0;padding:0;border:0;border-radius:0}
  body.reference-workspace .board-evaluation-frame .vertical-evaluation{width:10px;margin:0;padding:0;border-radius:0}
}
.site-header .site-search-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0 0 0 auto;padding:10px;border:0;border-radius:50%;background:transparent;color:#263b2b;box-shadow:none;cursor:pointer}
.site-header .site-search-toggle:hover{background:#e7ecdf}
.site-header .site-search-toggle:focus-visible{outline:2px solid #a78b59;outline-offset:2px}
.site-header .header-right-tools{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-left:auto;min-width:0}
.site-header .header-right-tools .header-actions{width:auto;margin:0;flex:0 1 auto;order:0;justify-content:flex-end;gap:10px}
.site-header .header-right-tools .nav-account-slot{margin-left:0}
.site-header .header-right-tools :is(.site-search-toggle,.theme-toggle){margin:0;flex:0 0 44px}
@media(min-width:601px) and (max-width:800px){.site-header{flex-wrap:nowrap;gap:12px}.site-header .header-right-tools{gap:8px}.site-header .header-right-tools .header-actions{gap:8px}.site-header .nav-user-menu #user-name{max-width:72px}}
.site-search-dialog{box-sizing:border-box;width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 48px);padding:24px;border:1px solid #b9c4b0;border-radius:16px;background:#fafaf5;color:#243329;box-shadow:0 20px 70px #0004;overflow:auto}
.site-search-dialog::backdrop{background:#101b14a6}
.site-search-dialog{overscroll-behavior:contain}
body:has(.site-search-dialog[open]){overflow:hidden}
.search-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.search-dialog-heading h2{margin:0;font:650 22px/1.3 system-ui,sans-serif}
.search-dialog-heading button{flex:none;width:44px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:8px;background:transparent;color:inherit;font:26px/1 system-ui,sans-serif;cursor:pointer}
.site-search-dialog label{display:block;margin:0 0 8px;font:13px/1.5 system-ui,sans-serif}
.site-search-dialog input{box-sizing:border-box;display:block;width:100%;min-height:48px;padding:12px;border:1px solid #9aaa91;border-radius:8px;background:#fff;color:#243329;font:16px/1.4 system-ui,sans-serif}
.site-search-status{font:12px/1.6 system-ui,sans-serif;color:#586650;margin:12px 0}
.site-search-results a{display:block;padding:13px 4px;border-top:1px solid #d3dbc9;color:#243329;text-decoration:none;overflow-wrap:anywhere}
.site-search-results a:hover{background:#e9eee2}
.site-search-results strong{display:block;font:600 14px/1.5 system-ui,sans-serif}
.site-search-results small{display:block;margin-top:3px;color:#586650;font:12px/1.5 system-ui,sans-serif}
.site-search-dialog :is(a,button,input):focus-visible{outline:2px solid #a78b59;outline-offset:2px}
html[data-theme="dark"] .site-search-dialog{background:#1d2a21;color:#e7ece2;border-color:#63745c}
html[data-theme="dark"] .site-search-toggle{color:#dfc898}
html[data-theme="dark"] .site-search-toggle:hover,html[data-theme="dark"] .site-search-results a:hover{background:#2c3e30}
html[data-theme="dark"] .site-search-results a{color:#e7ece2;border-color:#425341}
html[data-theme="dark"] :is(.site-search-status,.site-search-results small){color:#b6c2af}
html[data-theme="dark"] .site-search-dialog input{background:#142019;color:#e7ece2;border-color:#63745c}
@media(max-width:600px){.site-header{gap:8px}.site-search-dialog{padding:18px;margin:24px auto;max-height:calc(100dvh - 48px)}}
/* Shared visual system for Games and Players. Page files own layout only. */
body.chessfile-site{--cf-bg:#f7f6f2;--cf-surface:#fffefa;--cf-panel:#f3f2ed;--cf-text:#20252a;--cf-muted:#62686a;--cf-line:#dedfd7;--cf-accent:#234c40;--cf-selected:#c8ded2;--cf-radius:8px;--cf-focus:#769e88;background:var(--cf-bg);color:var(--cf-text);font-family:'DM Sans',Arial,sans-serif}
html[data-theme="dark"] body.chessfile-site{--cf-bg:#101815;--cf-surface:#18211d;--cf-panel:#202b25;--cf-text:#f0f2ed;--cf-muted:#b3bdb5;--cf-line:#35443b;--cf-accent:#28614e;--cf-selected:#426d59;background:var(--cf-bg);color:var(--cf-text)}
html[data-theme] body.chessfile-site .site-header{background:var(--cf-surface);color:var(--cf-text);border-color:var(--cf-line)}
html[data-theme] body.chessfile-site :is(.directory,.form-panel,#preview-panel){background:var(--cf-surface);color:var(--cf-text);border-color:var(--cf-line);box-shadow:none}
html[data-theme] body.chessfile-site .directory{border-radius:var(--cf-radius)}
html[data-theme] body.chessfile-site :is(.external-results,.table-head){background:var(--cf-panel);color:var(--cf-text);border-color:var(--cf-line)}
html[data-theme] body.chessfile-site .external-results{border-radius:var(--cf-radius);box-shadow:none}
html[data-theme] body.chessfile-site :is(.external-results h2,.empty-state h3,.directory h1,.player-name,.rating){color:var(--cf-text)}
html[data-theme] body.chessfile-site :is(.total-count,.source-note,.directory-rating-note,.external-results p,.empty-state p,.intro .lede,.player-links,.metric,.rating small,.controls label){color:var(--cf-muted)}
html[data-theme] body.chessfile-site .external-results-links a{color:var(--cf-accent)}
html[data-theme="dark"] body.chessfile-site .external-results-links a{color:#a8d3bb}
html[data-theme] body.chessfile-site .player-row{border-color:var(--cf-line);background:var(--cf-surface)}
html[data-theme] body.chessfile-site .player-row:nth-child(even){background:var(--cf-panel)}
html[data-theme] body.chessfile-site :is(#saved-game-select,#round,#board,#player-search,#source-filter,#sort-order){min-height:44px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-surface);color:var(--cf-text);font:400 14px 'DM Sans',Arial,sans-serif;box-shadow:none}
html[data-theme] body.chessfile-site :is(#saved-game-select,#round,#board,#player-search,#source-filter,#sort-order):focus-visible{outline:2px solid var(--cf-focus);outline-offset:2px}
html[data-theme] body.chessfile-site .show-more{min-height:44px;padding:10px 16px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-panel);color:var(--cf-text);font:600 13px 'DM Sans',Arial,sans-serif;box-shadow:none}
html[data-theme] body.chessfile-site .show-more:hover{background:var(--cf-selected)}
html[data-theme] body.chessfile-site footer{background:var(--cf-bg);color:var(--cf-muted);border-color:var(--cf-line);font:11px/1.6 'DM Mono',monospace}
@media(max-width:600px){html[data-theme] body.chessfile-site :is(#saved-game-select,#round,#board,#player-search,#source-filter,#sort-order){font-size:16px}}
body.reference-workspace :is(.mobile-engine-summary,.mobile-analysis-actions,.mobile-tournament-details,.mobile-focus-moves){display:none}
@media(max-width:600px){
  body.reference-workspace :is(.mobile-primary-playback .move-action,.mobile-analysis-actions #flip-board){-webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center}
  body.reference-workspace :is(.mobile-primary-playback,.mobile-analysis-actions) button svg{display:block;flex:none;width:20px;height:20px;pointer-events:none}
  body.reference-workspace #move-list{max-height:264px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
  body.reference-workspace #move-list:focus-visible{outline:2px solid var(--cf-accent);outline-offset:-2px}
  body.reference-workspace .mobile-tournament-details{display:block;padding:10px 12px;border-bottom:1px solid var(--cf-line);background:var(--cf-surface);color:var(--cf-text);min-width:0}
  body.reference-workspace .mobile-tournament-details[hidden]{display:none}
  body.reference-workspace .mobile-tournament-details strong{display:block;font:600 13px/1.5 'DM Sans',Arial,sans-serif;overflow-wrap:anywhere}
  body.reference-workspace .mobile-tournament-details p{margin:4px 0;color:var(--cf-muted);font:400 12px/1.5 'DM Sans',Arial,sans-serif;overflow-wrap:anywhere}
  body.reference-workspace .mobile-tournament-details summary{min-height:32px;padding:5px 0;color:var(--cf-text);font:500 12px/22px 'DM Sans',Arial,sans-serif;cursor:pointer}
  body.reference-workspace .mobile-tournament-details a{display:inline-flex;align-items:center;min-height:44px;color:var(--cf-text);font-size:12px;text-underline-offset:3px}
  body.reference-workspace .current-event-name{display:none}
  body.reference-workspace:has(.game-load-feedback:not([hidden])) .current-event-name{display:block}
  body.reference-workspace .mobile-analysis-actions{order:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px;border-bottom:1px solid var(--cf-line);background:var(--cf-surface);flex:none}
  body.reference-workspace .mobile-analysis-actions button{width:auto;min-height:40px;height:40px;margin:0;padding:8px 12px;border:1px solid var(--cf-line);border-radius:6px;background:var(--cf-panel);color:var(--cf-text);font:600 12px/1.4 'DM Sans',Arial,sans-serif;box-shadow:none}
  body.reference-workspace .mobile-analysis-actions #analysis-toggle{background:var(--cf-accent);color:#fff}
  body.reference-workspace .mobile-engine-summary{order:3;display:block;flex:none;min-height:66px;box-sizing:border-box;margin:0;padding:4px 10px;border-top:1px solid var(--cf-line);background:var(--cf-panel);color:var(--cf-text)}
  body.reference-workspace .mobile-engine-summary p{display:block;margin:0;min-height:18px;font:500 12px/18px 'DM Sans',Arial,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cf-text)}
  body.reference-workspace .mobile-engine-summary .mobile-engine-evaluation{font-weight:700}
  body.reference-workspace .mobile-engine-summary details{margin:0;padding:0;border:0}
  body.reference-workspace .mobile-engine-line summary{min-height:20px;padding:1px 0;color:var(--cf-muted);font:500 11px/18px 'DM Sans',Arial,sans-serif;cursor:pointer}
  body.reference-workspace .mobile-engine-line p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--cf-muted)}
  body.reference-workspace .mobile-focus-dialog{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--cf-surface);color:var(--cf-text);overflow:hidden}
  body.reference-workspace .mobile-focus-dialog[open]{display:flex}
  body.reference-workspace .mobile-focus-dialog .mobile-board-dock{display:flex;flex-direction:column;position:static;gap:0;box-sizing:border-box;width:100%;height:100%;min-height:0;padding:max(4px,env(safe-area-inset-top)) 0 max(4px,env(safe-area-inset-bottom));margin:0;border:0;border-radius:0;background:var(--cf-surface);color:var(--cf-text);overflow-y:auto;overscroll-behavior:contain}
  body.reference-workspace .mobile-focus-dialog .board-evaluation-frame{flex:none;align-self:center;width:calc(var(--focus-board-size,300px) + 10px);max-width:100%;margin:0;padding:0}
  body.reference-workspace .mobile-focus-dialog .player-strip{flex:none;height:48px;min-height:48px;max-height:48px;padding:6px 10px}
  body.reference-workspace .mobile-focus-dialog .player-strip strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  body.reference-workspace .mobile-focus-dialog .captured-pieces{max-height:34px}
  body.reference-workspace .mobile-focus-dialog .captured-pieces img{width:12px;height:16px}
  body.reference-workspace .mobile-focus-dialog .position-navigation{flex:none}
  body.reference-workspace .mobile-focus-dialog .mobile-focus-moves{order:5;display:block;flex:none;min-width:0;border-top:1px solid var(--cf-line);padding:0 12px;background:var(--cf-panel);color:var(--cf-text)}
  body.reference-workspace .mobile-focus-moves>summary{min-height:44px;padding:12px 0;box-sizing:border-box;font:600 12px/20px 'DM Sans',Arial,sans-serif;cursor:pointer}
  body.reference-workspace .mobile-focus-moves .move-list-heading{display:none}
  body.reference-workspace .mobile-focus-moves .move-list-columns{padding:3px 4px;font-size:11px}
  body.reference-workspace .mobile-focus-moves #move-list{max-height:min(132px,16dvh)}
  body.reference-workspace #result-state .mobile-board-dock{border-left:0;border-right:0}
  body.reference-workspace .position-navigation{gap:2px!important;padding:4px 8px!important}
  body.reference-workspace .mobile-primary-playback{grid-template-columns:44px minmax(0,1fr) 48px minmax(0,1fr) 44px;gap:8px}
  body.reference-workspace .position-navigation #position-label{grid-column:auto;grid-row:auto;min-height:16px;padding:0;text-align:center;font:11px/16px 'DM Sans',Arial,sans-serif}
  body.reference-workspace .mobile-primary-playback :is(#first-move,#last-move){background:transparent;color:var(--cf-muted)}
  body.reference-workspace .mobile-view-actions{display:flex;align-items:center;gap:8px}
  body.reference-workspace .mobile-analysis-actions #flip-board{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:6px;font-size:22px;line-height:1}
  body:has(.mobile-focus-dialog[open]){overflow:hidden}
}
body.reference-workspace .player-strip.has-clock-data{display:grid;grid-template-columns:22px minmax(0,1fr) auto;grid-template-rows:24px 16px;gap:2px 8px;min-height:56px;padding:6px 12px}
body.reference-workspace .has-clock-data>.piece{grid-column:1;grid-row:1}
body.reference-workspace .has-clock-data>p{grid-column:2;grid-row:1;display:flex;flex-wrap:nowrap;align-items:center;min-width:0;overflow:hidden}
body.reference-workspace .has-clock-data>p strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body.reference-workspace .has-clock-data>p small{flex:none}
body.reference-workspace .has-clock-data>.captured-pieces{grid-column:2/4;grid-row:2;justify-self:end;justify-content:flex-end;max-width:100%;height:16px;min-height:16px;margin:0;font-size:10px;line-height:16px;gap:1px;flex-wrap:nowrap}
body.reference-workspace .has-clock-data>.captured-pieces img{flex:none;width:12px;height:16px}
body.reference-workspace .player-clock{grid-column:3;grid-row:1;display:block;box-sizing:border-box;min-width:84px;height:24px;padding:2px 6px;border:1px solid var(--cf-line);border-radius:4px;background:var(--cf-panel);color:var(--cf-text);font:700 14px/18px 'DM Sans',Arial,sans-serif;font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}
body.reference-workspace .player-clock[hidden]{display:none}
body.reference-workspace .player-clock.is-running{background:var(--cf-accent);border-color:var(--cf-accent);color:#fff}
body.reference-workspace .player-clock.is-stale{border-style:dashed}
body.reference-workspace .player-clock.is-low-time{background:#f5e5df;color:#803522;border-color:#b36e58}
html[data-theme="dark"] body.reference-workspace .player-clock.is-low-time{background:#3c2923;color:#ffd0bd;border-color:#bb8169}
@media(max-width:600px){
  body.reference-workspace .player-clock{min-width:74px;font-size:13px}
  body.reference-workspace .player-strip.has-clock-data{padding:6px 10px}
  body.reference-workspace .mobile-focus-dialog .player-strip.has-clock-data{height:48px;min-height:48px;max-height:48px;padding:2px 10px}
}
/* Approved Modern Knight: fixed gold mark, theme-aware existing wordmark. */
body .site-header > a.brand{display:inline-flex;align-items:center;gap:10px;white-space:nowrap}
body .site-header .brand > img.brand-knight{display:block;flex:0 0 auto;width:33px;height:44px;object-fit:contain;margin:0;border:0;border-radius:0;background:transparent}
@media(max-width:600px){body .site-header .brand > img.brand-knight{width:27px;height:36px}}
.analytics-consent{box-sizing:border-box;max-width:720px;margin:20px auto;padding:16px;border:1px solid var(--cf-line,#9aa79d);border-radius:8px;background:var(--cf-panel,#f5f5ef);color:var(--cf-text,#202b25);font:400 13px/1.6 'DM Sans',Arial,sans-serif;text-align:left}
.analytics-consent[hidden]{display:none}
.analytics-consent p{margin:0 0 10px}
.analytics-consent .analytics-choice{font-size:12px}
.analytics-consent-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.analytics-consent-actions button{width:auto;min-height:44px;margin:0;padding:8px 14px;border:1px solid var(--cf-line,#9aa79d);border-radius:5px;background:var(--cf-surface,#fff);color:var(--cf-text,#202b25);font:600 13px/1.4 'DM Sans',Arial,sans-serif;cursor:pointer;box-shadow:none}
.analytics-consent-actions button:first-child{background:var(--cf-accent,#244b3c);color:#fff}
.analytics-consent-actions a{color:inherit;text-decoration:underline;text-underline-offset:3px}
footer .analytics-preferences{display:inline-block;width:auto;min-height:44px;margin:0 0 0 14px;padding:6px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-transform:none;letter-spacing:normal;text-decoration:underline;text-underline-offset:3px;box-shadow:none;cursor:pointer}
.analytics-consent :is(button,a):focus-visible,footer .analytics-preferences:focus-visible{outline:2px solid currentColor;outline-offset:3px}
@media(max-width:600px){.analytics-consent{margin:16px 10px}.analytics-consent-actions{gap:8px}footer .analytics-preferences{display:block;margin:0 auto}}
.tournament-standings{grid-column:1/-1;margin:0;border-bottom:1px solid var(--cf-line,#dedfd7);background:var(--cf-surface,#fffefa);color:var(--cf-text,#20252a);font:14px/1.5 'DM Sans',sans-serif}
.tournament-standings[hidden]{display:none!important}
.tournament-standings>summary{min-height:44px;box-sizing:border-box;padding:12px 24px;cursor:pointer;font-weight:600}
.tournament-standings>summary:focus-visible{outline:2px solid #b19660;outline-offset:-3px}
.tournament-standings>div{padding:0 24px 16px}
.tournament-standings p{margin:4px 0 10px;font-size:12px;line-height:1.6}
.tournament-standings a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.tournament-standings .standings-source{font-size:13px}
.tournament-standings .standings-mobile-hint{display:none}
.standings-frame iframe{display:block;box-sizing:border-box;width:100%;height:440px;max-height:70svh;min-height:300px;border:1px solid var(--cf-line,#dedfd7);border-radius:6px;background:#fff}
.national-standings-editor{margin:16px 0}
.national-standings-editor>summary{min-height:44px;padding:12px 0;cursor:pointer;font-weight:600}
.national-standings-editor select{box-sizing:border-box;width:100%;max-width:100%;min-height:44px;padding:10px;border:1px solid #899888;border-radius:8px;background:inherit;color:inherit;font:inherit}
@media(max-width:600px){.tournament-standings>summary{padding:10px 12px}.tournament-standings>div{padding:0 12px 12px}.tournament-standings .standings-mobile-hint{display:block}.standings-frame iframe{height:400px}}
/* Landing content only: no header, navigation or loaded-board style changes. */
body.reference-workspace.has-loaded-game .landing-only{display:none!important}
body.reference-workspace:not(.has-loaded-game) main{padding:0}
body.reference-workspace:not(.has-loaded-game) #empty-state{display:none}
body.reference-workspace .landing-hero{display:grid;grid-template-columns:1.05fr 1fr;align-items:stretch;overflow:hidden;border:1px solid var(--cf-line);border-top:0;background:var(--cf-surface);color:var(--cf-text)}
body.reference-workspace .landing-hero-copy{align-self:center;padding:52px 48px}
body.reference-workspace .landing-hero h1{position:static;width:auto;margin:0 0 22px;transform:none;font:700 clamp(38px,4.3vw,62px)/1.06 'DM Sans',Arial,sans-serif;letter-spacing:-2px;color:var(--cf-text)}
body.reference-workspace .landing-hero p{margin:0;max-width:440px;font:400 clamp(16px,1.6vw,21px)/1.6 'DM Sans',Arial,sans-serif;color:var(--cf-muted)}
body.reference-workspace .landing-hero>img{display:block;width:100%;height:100%;min-height:320px;max-height:400px;object-fit:cover;object-position:center 58%}
body.reference-workspace .landing-instruction{margin:0;padding:28px 32px 8px;color:var(--cf-text);font:500 15px/1.6 'DM Sans',Arial,sans-serif}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:14px 24px;padding:14px 32px 26px;align-items:start}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar .number-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;width:100%}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar .number-grid>div{grid-column:auto;grid-row:auto}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar :is(#saved-games-wrap,.saved-game-controls){width:100%;min-width:0;max-width:none;flex:initial}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar :is(#saved-game-select,#round,#board){box-sizing:border-box;width:100%;max-width:none;min-height:46px;border:1px solid var(--cf-line);border-radius:5px;background:var(--cf-surface);color:var(--cf-text);padding:10px 12px;font:400 14px/1.5 'DM Sans',Arial,sans-serif}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar label{display:block!important;margin:0 0 6px;color:var(--cf-muted);font:600 11px/1.4 'DM Sans',Arial,sans-serif;text-transform:uppercase;letter-spacing:1px}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar .toolbar-actions{grid-column:1/-1}
body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar .tournament-toolbar-actions{grid-column:1/-1;grid-row:auto;justify-content:flex-start;padding-top:0}
body.reference-workspace:not(.has-loaded-game) #saved-library-status{display:none}
body.reference-workspace .landing-benefits{margin:0;padding:30px 32px 26px;border:1px solid var(--cf-line);border-top:0;border-radius:0 0 10px 10px;background:#e9eee6;color:var(--cf-text);text-align:center}
html[data-theme="dark"] body.reference-workspace .landing-benefits{background:#202f27}
body.reference-workspace .landing-benefits h2{margin:0 0 24px;font:600 clamp(20px,2.3vw,28px)/1.3 'DM Sans',Arial,sans-serif;letter-spacing:-.5px;color:var(--cf-text)}
body.reference-workspace .landing-benefits ul{display:flex;justify-content:center;gap:40px;margin:0 0 26px;padding:0;list-style:none}
body.reference-workspace .landing-benefits li{display:flex;align-items:center;gap:12px;font:400 14px/1.5 'DM Sans',Arial,sans-serif}
body.reference-workspace .landing-benefits li>svg{width:26px;height:30px;flex:none;fill:none;stroke:#8b672e;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] body.reference-workspace .landing-benefits li>svg{stroke:#d4b477}
body.reference-workspace .landing-google-sign-in{display:inline-flex;align-items:center;justify-content:center;gap:12px;width:min(100%,340px);min-height:46px;margin:0 0 10px;padding:10px 20px;border:1px solid #d1d7cd;border-radius:7px;background:#fff;color:#20252a;box-shadow:none;font:600 14px/1.5 'DM Sans',Arial,sans-serif;cursor:pointer}
body.reference-workspace .landing-google-sign-in[hidden]{display:none}
body.reference-workspace .landing-google-sign-in svg{width:22px;height:22px;flex:none}
body.reference-workspace .landing-benefits p{margin:0;font:400 12px/1.6 'DM Sans',Arial,sans-serif;color:var(--cf-muted)}
body.reference-workspace .landing-benefits #landing-member-status{margin:0 0 10px;font-size:14px;color:var(--cf-text)}
@media(max-width:900px){body.reference-workspace .landing-hero-copy{padding:36px 28px}body.reference-workspace .landing-benefits ul{gap:20px}}
@media(max-width:600px){
  body.reference-workspace .landing-hero{grid-template-columns:minmax(0,1fr);border-left:0;border-right:0}
  body.reference-workspace .landing-hero-copy{padding:30px 20px 24px}
  body.reference-workspace .landing-hero h1{font-size:36px;letter-spacing:-1.2px;margin-bottom:14px}
  body.reference-workspace .landing-hero p{font-size:15px;line-height:1.6}
  body.reference-workspace .landing-hero>img{height:185px;min-height:0;max-height:none;object-position:center 60%}
  body.reference-workspace .landing-instruction{padding:20px 16px 6px;font-size:13px}
  body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px 16px 20px}
  body.reference-workspace:not(.has-loaded-game) .public-tournament-toolbar .number-grid{gap:12px}
  body.reference-workspace .landing-benefits{padding:24px 20px;border-left:0;border-right:0;border-radius:0;text-align:left}
  body.reference-workspace .landing-benefits h2{font-size:20px;margin-bottom:20px}
  body.reference-workspace .landing-benefits ul{flex-direction:column;gap:16px;margin-bottom:22px}
  body.reference-workspace .landing-benefits li{font-size:14px}
  body.reference-workspace .landing-google-sign-in{width:100%}
  body.reference-workspace .landing-benefits>p{text-align:center}
}
/* Featured events are curated independently of live board activity. */
body.reference-workspace .ongoing-tournaments{padding:24px 32px 8px;color:var(--cf-text);grid-column:1/-1}
body.reference-workspace .ongoing-tournaments h2{margin:0 0 14px;font-size:20px;line-height:1.4}
.ongoing-tournament-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ongoing-tournament-card{min-width:0;padding:20px;border:1px solid var(--cf-line);border-radius:8px;background:var(--cf-surface)}
.ongoing-tournament-card .tournament-status{display:inline-block;padding:4px 9px;border-radius:20px;background:var(--cf-panel);color:var(--cf-text);font-size:12px;font-weight:600}
body.reference-workspace .ongoing-tournament-card h3{margin:12px 0 4px;font-size:20px;line-height:1.4}
.ongoing-tournament-card p{margin:0 0 16px;color:var(--cf-muted);font-size:14px}
.ongoing-tournament-card a{display:inline-flex;align-items:center;gap:12px;min-height:44px;padding:8px 14px;box-sizing:border-box;border:1px solid var(--cf-line);border-radius:6px;color:var(--cf-text);font-size:14px;font-weight:600;text-decoration:none}
.ongoing-tournament-card a:hover{background:var(--cf-panel)}
.ongoing-tournament-card a:focus-visible{outline:2px solid #a78b59;outline-offset:3px}
.picker-tournament-status{display:inline-block;margin-left:8px;font-size:12px;color:var(--cf-muted);font-weight:400}
@media(max-width:600px){body.reference-workspace .ongoing-tournaments{padding:20px 16px 0}.ongoing-tournament-grid{grid-template-columns:minmax(0,1fr);gap:12px}.ongoing-tournament-card{padding:16px}}
/* The hero introduces the browsing flow; it disappears when a game is open. */
body.reference-workspace .landing-hero{grid-template-columns:1fr;justify-items:center;background:#163c30;color:#f7f5ed;border-color:#345747;min-height:410px;position:relative;isolation:isolate}
body.reference-workspace .landing-hero-copy{padding:40px 40px 30px;min-width:0;position:relative;z-index:1}
body.reference-workspace .landing-hero .hero-eyebrow{margin:0 0 18px;font:600 10px/1.5 'DM Sans',Arial,sans-serif;letter-spacing:2px;color:#d9c79e}
body.reference-workspace .landing-hero h1{margin:0 0 18px;color:#f7f5ed;font-size:clamp(40px,4.4vw,60px);line-height:1.04;letter-spacing:-2px}
body.reference-workspace .landing-hero h1 em{font-family:Georgia,serif;font-weight:400;color:#e6c783}
body.reference-workspace .landing-hero .hero-description{max-width:385px;margin:0 0 22px;color:#d0ded3;font-size:15px;line-height:1.65}
body.reference-workspace .landing-hero .hero-browse{display:inline-flex;align-items:center;gap:26px;min-height:44px;padding:10px 18px;box-sizing:border-box;border:1px solid #e6c783;border-radius:5px;background:#e6c783;color:#17392e;text-decoration:none;font:700 13px/1.5 'DM Sans',Arial,sans-serif}
body.reference-workspace .landing-hero .hero-browse:hover{background:#f2d89f;border-color:#f2d89f}
body.reference-workspace .landing-hero .hero-browse:focus-visible{outline:2px solid #fff;outline-offset:4px}
.hero-steps{display:flex;gap:18px;margin:28px 0 0;padding:20px 0 0;border-top:1px solid #ffffff24;list-style:none}
.hero-steps li{display:flex;align-items:center;gap:7px;color:#e3e9df;font:500 11px/1.5 'DM Sans',Arial,sans-serif}
.hero-steps li>span{display:inline-flex;align-items:center;justify-content:center;flex:none;width:22px;height:22px;border:1px solid #d1b77d66;border-radius:50%;color:#e6c783;font-size:11px}
.hero-art{width:100%;min-width:0;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:34px 24px 32px;background:radial-gradient(ellipse at center,#44725766,transparent 70%)}
.hero-art-caption{margin:14px 0 0;font:italic 18px/1.4 Georgia,serif;color:#d9c79e;text-align:center}
.hero-knight-canvas{display:block;margin:0 auto;width:min(100%,360px);aspect-ratio:1;touch-action:pan-y;cursor:crosshair}
#tournament-browser{scroll-margin-top:20px}
@media(min-width:601px) and (max-width:900px){body.reference-workspace .landing-hero{grid-template-columns:1fr}.hero-art{padding:28px 24px}.hero-art-caption{font-size:16px}}
@media(max-width:600px){body.reference-workspace .landing-hero{grid-template-columns:minmax(0,1fr);min-height:0}.hero-art{padding:24px 20px}.hero-art-caption{font-size:15px}.hero-knight-canvas{max-width:250px;margin:0 auto}}
.tournament-picker-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--cf-line,#cdd5c9);border-radius:5px;background:var(--cf-surface,#fff);color:var(--cf-text,#203027);font:inherit;text-align:left;cursor:pointer}
body.reference-workspace .tournament-toolbar .tournament-picker-trigger{height:auto;width:100%;min-width:0;min-height:44px;padding:10px 12px;display:flex;border:1px solid var(--cf-line);background:var(--cf-surface);color:var(--cf-text);border-radius:5px;text-align:left;font:400 14px/1.5 'DM Sans',Arial,sans-serif}
.picker-result,.picker-heading button,.player-follow,.favourites-list button{height:auto}
#saved-game-select[hidden]{display:none!important}
.tournament-picker-dialog{width:min(540px,calc(100% - 24px));max-height:85dvh;box-sizing:border-box;padding:20px;border:1px solid var(--cf-line,#cdd5c9);border-radius:12px;background:var(--cf-surface,#fff);color:var(--cf-text,#203027)}
.tournament-picker-dialog::backdrop{background:#0008}
.picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.picker-heading h2{font-size:20px;margin:0 0 16px}
.picker-heading button{min-width:44px;min-height:44px;border:0;background:transparent;color:inherit;font-size:24px;cursor:pointer}
.tournament-picker-dialog label{display:block;font-size:13px;margin-bottom:6px}
.tournament-picker-dialog input{box-sizing:border-box;width:100%;min-height:44px;padding:10px;border:1px solid var(--cf-line,#cdd5c9);border-radius:6px;background:var(--cf-panel,#f4f5ef);color:inherit;font:inherit}
.picker-count,.game-coverage-note{font-size:12px;line-height:1.6;color:var(--cf-muted,#566252)}
.picker-results{max-height:52dvh;overflow:auto;overscroll-behavior:contain}
.picker-results h3{font-size:12px;margin:16px 0 6px;color:var(--cf-muted,#566252)}
.picker-result{display:block;width:100%;min-height:44px;padding:10px;text-align:left;background:transparent;color:inherit;border:0;border-bottom:1px solid var(--cf-line,#d5dbcf);font:inherit;cursor:pointer}
.picker-result[aria-pressed=true]{background:var(--cf-panel,#eef1e9);font-weight:700}
.continue-game{display:inline-flex;margin:8px 32px;padding:10px 14px;border:1px solid var(--cf-line,#cdd5c9);border-radius:6px;color:var(--cf-text,#203027);font-size:13px;text-decoration:none;min-height:44px;box-sizing:border-box;align-items:center}
.continue-game[hidden]{display:none}
.game-coverage-note{margin:8px 20px 12px}
.account-favourites{border-top:1px solid currentColor;margin:12px 0;padding-top:10px}
.account-favourites summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.favourites-status{font-size:12px;line-height:1.6}
.favourites-list{list-style:none;padding:0;margin:0;max-height:240px;overflow:auto}
.favourites-list li{display:flex;align-items:center;gap:12px;border-top:1px solid #8b9b8840;padding:8px 0}
.favourites-list a{color:inherit;flex:1;min-width:0;overflow-wrap:anywhere}
.favourites-list button,.player-follow{min-height:44px;padding:8px 12px;border:1px solid currentColor;border-radius:6px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.player-follow{display:block;margin-top:16px;font-size:13px}
.player-follow[hidden],.account-favourites[hidden]{display:none}
html[data-theme=dark] .tournament-picker-dialog{background:#202d25;color:#eef1e7}
html[data-theme=dark] .tournament-picker-dialog input{background:#18231d;color:#eef1e7}
html[data-theme=dark] .picker-result[aria-pressed=true]{background:#344b3d}
.review-help{font-size:12px;line-height:1.6;margin:12px 0}
.review-help summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.review-help p{margin:8px 0}
.review-help dl{display:grid;grid-template-columns:auto 1fr;gap:8px 12px;margin:12px 0}
.review-help dt{font-weight:700}
.review-help dd{margin:0}
.review-help-dialog{max-width:400px;width:calc(100% - 28px);box-sizing:border-box;background:var(--cf-surface,#fff);color:var(--cf-text,#203027);border:1px solid var(--cf-line,#cdd5c9);border-radius:10px;padding:20px}
.review-help-dialog button{min-height:44px;padding:8px 14px;color:inherit;background:transparent;border:1px solid currentColor;border-radius:6px}
.review-badge{cursor:help}
@media(max-width:600px){.game-coverage-note{margin:6px 16px 10px}.continue-game{margin:6px 16px}.tournament-picker-dialog{padding:16px}.picker-result{font-size:14px}.tournament-picker-trigger{font-size:13px}.account-favourites{width:100%;box-sizing:border-box}}
@media(max-width:600px){.tournament-picker-dialog input{font-size:16px}}
.picker-result:focus-visible,.tournament-picker-trigger:focus-visible,.player-follow:focus-visible,.favourites-list button:focus-visible{outline:2px solid #a78b59;outline-offset:2px}
.review-quality-help{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:auto;min-height:36px;width:100%;padding:4px;border:0;background:transparent;color:inherit;font:inherit;cursor:help}
.review-quality-help:focus-visible{outline:2px solid #a78b59;outline-offset:2px}
@media(max-width:600px){#admin-photo-size-guide{display:none}}
/* Desktop pointer devices only: tablet and phone presentation is unchanged. */
@media (min-width:1101px) and (hover:hover) and (pointer:fine){
  html body:has(.profile-main) .site-header{margin-top:8px;min-height:64px;padding-block:8px}
  body:has(.profile-main) .site-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:20px;box-sizing:border-box;max-width:1280px;min-height:68px;height:auto;margin:12px auto 0;padding:10px 24px;border:1px solid var(--cf-line,#35443b);border-radius:8px 8px 0 0}
  body:has(.profile-main) .site-header>.brand{grid-column:1;grid-row:1;font-size:27px;justify-self:start;letter-spacing:-1px}
  body:has(.profile-main) .site-header>.site-nav{grid-column:2;grid-row:1;display:flex;gap:8px;justify-self:start}
  body:has(.profile-main) .site-header>.header-right-tools{grid-column:3;grid-row:1;display:flex;align-items:center;justify-self:end;gap:8px;min-width:0}
  body:has(.profile-main) .site-header .site-nav a.nav-pill,body:has(.profile-main) .site-header .site-nav a.nav-pill[aria-current="page"]{border:0;border-radius:6px;background:transparent;box-shadow:none;color:inherit;padding:8px 14px;font-size:14px;text-decoration:none}
  body:has(.profile-main) .site-header .site-nav a:hover{text-decoration:underline;text-underline-offset:5px}
  body:has(.profile-main) .site-header #user-name{max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body:has(.profile-main) .site-header .header-actions{display:flex;align-items:center;gap:8px;margin:0}
  html[data-theme="light"] body:has(.profile-main) .site-header{border-color:#dedfd7}
  body.reference-workspace .public-tournament-toolbar{grid-template-columns:minmax(180px,.8fr) 96px minmax(280px,1.35fr) auto;gap:10px;padding:8px 20px}
  body.reference-workspace .public-tournament-toolbar .tournament-toolbar-actions{gap:6px}
  body.reference-workspace .game-coverage-note{margin:0;padding:6px 20px;font-size:11px;line-height:1.4}
  body.reference-workspace #result-state>h3{margin:0;padding:8px 20px;font-size:14px;line-height:1.4}
  body.reference-workspace #result-state .board-and-pgn{grid-template-columns:minmax(0,calc(var(--desktop-board-size,440px) + 44px)) minmax(340px,1fr);gap:16px;padding:12px 20px;align-items:start}
  body.reference-workspace .board-evaluation-frame{width:calc(100% - 24px);margin:0 12px 8px;grid-template-columns:14px minmax(0,1fr)}
  body.reference-workspace .player-strip{min-height:34px;padding:6px 12px;gap:6px}
  body.reference-workspace .player-strip strong{font-size:13px;line-height:1.3}
  body.reference-workspace .player-strip.has-clock-data{min-height:44px;grid-template-rows:20px 14px;gap:0 6px;padding:4px 10px}
  body.reference-workspace .player-clock{min-width:74px;height:20px;font-size:12px;line-height:16px;padding:1px 5px}
  body.reference-workspace .player-strip .captured-pieces{max-width:45%;gap:1px}
  body.reference-workspace .player-strip .captured-pieces img{width:15px;height:18px}
  body.reference-workspace .position-navigation{padding:6px 10px!important;gap:6px!important;min-height:46px}
  body.reference-workspace .position-navigation .move-action,body.reference-workspace .position-navigation #flip-board{height:36px;min-height:36px;width:38px;min-width:38px}
  body.reference-workspace #result-state .position-navigation{grid-template-columns:repeat(6,38px)!important;justify-content:center!important;gap:4px!important;padding:5px 8px!important}
  body.reference-workspace .position-navigation #position-label{grid-column:1/-1;margin:0;font-size:11px;line-height:14px;text-align:center}
  body.reference-workspace .position-navigation .playback-toggle{font-size:0!important}
  body.reference-workspace .position-navigation .playback-toggle::before{content:'▶';font-size:16px}
  body.reference-workspace .position-navigation .playback-toggle[aria-pressed="true"]::before{content:'Ⅱ'}
  body.reference-workspace .tool-pane{min-height:0;padding:12px}
  body.reference-workspace .analysis-heading{margin:0 0 8px}
  body.reference-workspace .engine-options{margin:6px 0}
  body.reference-workspace .evaluation-summary{margin:8px 0;padding:8px 10px}
  body.reference-workspace .evaluation-summary .evaluation{min-height:36px}
  body.reference-workspace .analysis-output{margin:8px 0}
  body.reference-workspace .analysis-output p{margin:4px 0}
  body.reference-workspace #result-state .evaluation-summary{padding:8px 10px}
  body.reference-workspace .engine-suggestions{gap:4px}
  body.reference-workspace .engine-options>summary{min-height:30px}
  body.reference-workspace #tool-analysis:has(#analysis-toggle[aria-pressed="false"]) .engine-suggestions>p:last-child{display:none}
  body.reference-workspace .workspace-more .game-coverage-note{padding:8px 0}
  body.reference-workspace .workspace-more .tournament-standings{margin:8px 0;border-inline:0}
  body.reference-workspace #engine-status{margin:4px 0;font-size:11px}
  body.reference-workspace #move-list{max-height:clamp(150px,calc(var(--desktop-board-size,440px) - 155px),360px);overflow:auto;scrollbar-gutter:stable}
  body.reference-workspace .move-list-columns,body.reference-workspace #move-list .move-list-row{display:grid;grid-template-columns:32px minmax(0,1fr) minmax(0,1fr);column-gap:6px;padding-inline:4px;align-items:center}
  body.reference-workspace .move-list-columns{padding-right:4px}
  body.reference-workspace #move-list .notation-move{width:100%;text-align:left;min-height:32px;padding:5px 6px}
  .profile-main{padding-top:24px}
  .profile-main .back-link{margin-bottom:16px}
  .profile-main .profile-hero{grid-template-columns:96px minmax(0,1fr) auto;gap:22px;padding:24px;margin-bottom:24px;align-items:start;border-radius:12px}
  .profile-main .profile-photo-column,.profile-main .profile-avatar{width:96px}
  .profile-main .profile-avatar{height:96px;border-radius:16px}
  .profile-main .profile-hero h1{font-size:clamp(30px,2.7vw,40px);letter-spacing:-1px;line-height:1.15}
  .profile-main .profile-hero .eyebrow{font-size:10px;margin-bottom:7px}
  .profile-main .profile-subtitle{font-size:13px;margin-top:7px}
  .profile-main .profile-tags{margin-top:10px}
  .profile-main .profile-inline-ratings{margin-top:14px;padding-top:12px}
  .profile-main .profile-inline-ratings .desktop-redundant-note{display:none}
  .profile-main .profile-update-link{font-size:12px}
  .profile-main .player-follow{margin-top:12px}
  .profile-main #admin-photo-size-guide,.profile-main #photo-editor>p:last-child{display:none}
  .desktop-rating-heading{visibility:visible!important}
}
.desktop-rating-heading{visibility:hidden}
/* Approved desktop arrangement. Existing nodes, events and tabs are reused. */
@media(min-width:1101px) and (hover:hover) and (pointer:fine), (min-width:1101px) and (pointer:coarse), (min-width:1024px) and (max-width:1100px) and (orientation:landscape){
  /* Keep the loaded workspace aligned with the shared header and landing page. */
  body.reference-workspace.desktop-three-column main{max-width:1280px;width:100%;min-width:0}
  body.reference-workspace.desktop-three-column #result-state .board-and-pgn{display:grid;grid-template-columns:clamp(200px,16vw,240px) minmax(0,calc(var(--desktop-board-size,450px) + 44px)) minmax(300px,1fr);gap:16px;align-items:start;padding:16px;margin:0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar{grid-column:1;grid-row:1;min-width:0;max-height:calc(100dvh - 115px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--cf-line);border-radius:7px;background:var(--cf-surface);padding:14px;box-sizing:border-box}
  body.reference-workspace.desktop-three-column #result-state .mobile-board-dock{grid-column:2;grid-row:1;min-width:0;margin:0}
  body.reference-workspace.desktop-three-column #result-state .analysis-card{grid-column:3;grid-row:1;min-width:0;margin:0;max-height:calc(100dvh - 115px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  body.reference-workspace.desktop-three-column .workspace-tabs{position:sticky;top:0;z-index:2;background:var(--cf-surface)}
  body.reference-workspace.desktop-three-column .analysis-card>.tool-pane,body.reference-workspace.desktop-three-column .analysis-card>.tool-footer,body.reference-workspace.desktop-three-column .analysis-card>.workspace-tabs{flex-shrink:0}
  body.reference-workspace.desktop-three-column .reference-moves{min-height:0}
  body.reference-workspace.desktop-three-column #move-list{overflow:auto;overscroll-behavior:contain}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .current-event-name{margin:0 0 14px;padding:0;font-size:15px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .public-tournament-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:0;margin:0;border:0;background:transparent}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .number-grid{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .number-grid>div{width:100%}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar :is(#saved-games-wrap,.tournament-picker-trigger,#round,#board){width:100%;min-width:0;max-width:100%;box-sizing:border-box}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .tournament-picker-trigger{white-space:normal;text-overflow:clip;min-height:44px;height:auto;line-height:1.4;text-align:left}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .tournament-toolbar-actions{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .tournament-toolbar-actions>button{min-height:36px;padding:6px 8px;font-size:11px}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar #refresh-saved-games{width:36px;height:36px;min-height:36px;padding:4px;font-size:18px}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar #game-result{order:4;flex-basis:100%;padding:8px 0;font-size:28px;text-align:center;border-top:1px solid var(--cf-line);margin:6px 0 0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar #game-result[hidden]{display:none}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar #share-game{margin-left:0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .workspace-more{margin:12px 0 0;padding:0;border-top:1px solid var(--cf-line)}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .workspace-more>summary{min-height:40px;font-size:13px}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .workspace-more :is(p,select,a,button){max-width:100%;overflow-wrap:anywhere}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .game-finder{margin:10px 0 0;border:0;padding:0;width:100%}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .game-finder>summary{display:none}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .form-panel{width:100%;max-width:100%;padding:0;border:0;margin:0;background:transparent}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .form-panel h2{font-size:16px}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .url-field{min-width:0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .url-tools{flex-wrap:wrap}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .recent-wrap{max-width:100%;min-width:0}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .board-palette-options{flex-direction:column}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .game-navigation{flex-wrap:wrap}
  body.reference-workspace.desktop-three-column .tool-footer{padding:10px 12px}
  body.reference-workspace.desktop-three-column .tool-footer #review-game{min-height:38px;padding:8px 12px}
}
/* iPad portrait/smaller tablet workspace. Phone styles are not overridden. */
@media(min-width:700px) and (max-width:1023px), (min-width:1024px) and (max-width:1100px) and (orientation:portrait){
  body.reference-workspace.ipad-game-layout #result-state .board-and-pgn{display:grid;grid-template-columns:minmax(0,calc(var(--ipad-board-size,400px) + 44px)) minmax(270px,1fr);gap:12px;max-width:none;margin:0;padding:12px;align-items:start}
  body.reference-workspace.ipad-game-layout #result-state .mobile-board-dock{grid-column:1;grid-row:1;position:static;min-width:0;margin:0}
  body.reference-workspace.ipad-game-layout #result-state .analysis-card{grid-column:2;grid-row:1;min-width:0;margin:0;padding:0;max-height:calc(100dvh - 240px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  body.reference-workspace.ipad-game-layout .analysis-card>.tool-pane,body.reference-workspace.ipad-game-layout .analysis-card>.tool-footer,body.reference-workspace.ipad-game-layout .analysis-card>.workspace-tabs{flex-shrink:0}
  body.reference-workspace.ipad-game-layout .workspace-tabs{position:sticky;top:0;z-index:2;background:var(--cf-surface)}
  body.reference-workspace.ipad-game-layout .workspace-tabs button{padding-inline:5px;min-height:44px;font-size:12px}
  body.reference-workspace.ipad-game-layout .tool-pane{padding:10px;min-height:0}
  body.reference-workspace.ipad-game-layout .analysis-heading{flex-wrap:wrap;gap:8px}
  body.reference-workspace.ipad-game-layout .analysis-heading h4{font-size:13px}
  body.reference-workspace.ipad-game-layout #result-state .evaluation-summary{padding:10px;margin:6px 0}
  body.reference-workspace.ipad-game-layout .analysis-output{margin:8px 0}
  body.reference-workspace.ipad-game-layout .engine-suggestions{gap:5px}
  body.reference-workspace.ipad-game-layout .analysis-output p{margin:4px 0}
  body.reference-workspace.ipad-game-layout .board-evaluation-frame{width:calc(100% - 24px);margin:0 12px 8px;grid-template-columns:14px minmax(0,1fr)}
  body.reference-workspace.ipad-game-layout .player-strip{padding:5px 10px}
  body.reference-workspace.ipad-game-layout .player-strip strong{font-size:12px}
  body.reference-workspace.ipad-game-layout .player-clock{min-width:72px;font-size:12px}
  body.reference-workspace.ipad-game-layout #result-state .position-navigation{grid-template-columns:repeat(6,44px)!important;justify-content:center!important;padding:6px!important;gap:4px!important}
  body.reference-workspace.ipad-game-layout .position-navigation #position-label{grid-column:1/-1;margin:0;text-align:center;font-size:11px}
  body.reference-workspace.ipad-game-layout .position-navigation .playback-toggle{font-size:0!important}
  body.reference-workspace.ipad-game-layout .position-navigation .playback-toggle::before{content:'▶';font-size:17px}
  body.reference-workspace.ipad-game-layout .position-navigation .playback-toggle[aria-pressed="true"]::before{content:'Ⅱ'}
  body.reference-workspace.ipad-game-layout .move-list-columns,body.reference-workspace.ipad-game-layout #move-list .move-list-row{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,1fr);gap:4px;padding-inline:2px}
  body.reference-workspace.ipad-game-layout #move-list{max-height:clamp(180px,calc(100dvh - 640px),420px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  body.reference-workspace.ipad-game-layout #move-list .notation-move{width:100%;min-height:44px;text-align:left;padding:6px 4px}
  body.reference-workspace.ipad-game-layout .public-tournament-toolbar{padding:10px 12px;gap:8px}
  body.reference-workspace.ipad-game-layout .current-event-name{margin:0;padding:8px 12px;font-size:14px}
  body.reference-workspace.ipad-game-layout .tool-footer{padding:10px}
}
/* Touch iPads can use the full desktop structure when it fits. Keep touch targets. */
@media(min-width:1101px) and (pointer:coarse), (min-width:1024px) and (max-width:1100px) and (orientation:landscape){
  body.reference-workspace.desktop-three-column #result-state .board-and-pgn{max-width:none}
  body.reference-workspace.desktop-three-column .desktop-game-sidebar .tournament-toolbar-actions>button,body.reference-workspace.desktop-three-column .desktop-game-sidebar #refresh-saved-games{min-height:44px}
  body.reference-workspace.desktop-three-column .position-navigation .move-action,body.reference-workspace.desktop-three-column .position-navigation #flip-board{min-height:44px;height:44px;width:44px}
  body.reference-workspace.desktop-three-column #result-state .position-navigation{grid-template-columns:repeat(6,44px)!important;justify-content:center!important;gap:4px!important;padding:6px!important}
  body.reference-workspace.desktop-three-column #position-label{grid-column:1/-1;text-align:center}
  body.reference-workspace.desktop-three-column .position-navigation .playback-toggle{font-size:0!important}
  body.reference-workspace.desktop-three-column .position-navigation .playback-toggle::before{content:'▶';font-size:17px}
  body.reference-workspace.desktop-three-column .position-navigation .playback-toggle[aria-pressed="true"]::before{content:'Ⅱ'}
  body.reference-workspace.desktop-three-column .move-list-columns,body.reference-workspace.desktop-three-column #move-list .move-list-row{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr);gap:4px;padding-inline:2px}
  body.reference-workspace.desktop-three-column #move-list .notation-move{min-height:44px;width:100%;text-align:left}
  body.reference-workspace.desktop-three-column #move-list{max-height:300px;overflow:auto;scrollbar-gutter:stable}
  body.reference-workspace.desktop-three-column .tool-pane{min-height:0;padding:10px}
}
/* Shared Games/Players header. Loaded last so page layout styles cannot change it. */
body.chessfile-site .site-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:24px;row-gap:8px;box-sizing:border-box;max-width:1280px;height:auto;min-height:76px;margin:24px auto 0;padding:12px 28px;border:1px solid #dedfd7;border-radius:10px 10px 0 0;background:#fffefa;color:#20252a;font-family:'DM Sans',Arial,sans-serif;font-weight:400;font-synthesis:weight style small-caps}
body.chessfile-site .site-header>.brand{grid-column:1;grid-row:1;justify-self:start;min-width:0;font:750 27px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-1px;color:inherit;gap:10px;text-decoration:none}
body.chessfile-site .site-header .brand span{font-size:44px;line-height:1;color:#234c40}
body.chessfile-site .site-header>.site-nav{grid-column:2;grid-row:1;justify-self:start;display:flex;flex-wrap:nowrap;min-width:0;gap:8px}
body.chessfile-site .site-header>.header-right-tools{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;margin:0;min-width:0}
body.chessfile-site .site-header .site-nav a.nav-pill,body.chessfile-site .site-header .site-nav a.nav-pill[aria-current="page"]{padding:8px 14px;border:0;border-radius:6px;background:transparent;color:inherit;box-shadow:none;font:600 14px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-decoration:none}
body.chessfile-site .site-header .site-nav a:hover{text-decoration:underline;text-underline-offset:5px}
body.chessfile-site .site-header .site-nav a:focus-visible{outline:2px solid #769e88;outline-offset:2px}
body.chessfile-site .site-header .nav-user-menu{max-width:240px;min-width:0;white-space:nowrap}
body.chessfile-site .site-header #user-name{max-width:100px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.chessfile-site .site-header :is(.site-search-toggle,.theme-toggle){color:inherit}
html[data-theme="dark"] body.chessfile-site .site-header{border-color:#35443b;background:#18211d;color:#f0f2ed}
html[data-theme="dark"] body.chessfile-site .site-header .brand{color:#f0f2ed}
html[data-theme="dark"] body.chessfile-site .site-header .brand span{color:#a8d3bb}
@media(min-width:601px){body.chessfile-site .site-header .header-right-tools .header-actions{display:flex;width:auto;flex:0 1 auto;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:8px;margin:0;order:0}body.chessfile-site .site-header .nav-account-slot{min-width:0;margin:0}}
@media(max-width:1100px){body.chessfile-site .site-header{margin-top:0;border-radius:0}}
@media(min-width:601px) and (max-width:900px){body.chessfile-site .site-header{padding:12px 20px;column-gap:14px}body.chessfile-site .site-header .brand{font-size:24px}body.chessfile-site .site-header .site-nav a.nav-pill,body.chessfile-site .site-header .site-nav a.nav-pill[aria-current="page"]{padding:8px 10px;font-size:13px}body.chessfile-site .site-header #user-name{max-width:72px}}
@media(min-width:601px) and (max-width:760px){body.chessfile-site .site-header{grid-template-columns:minmax(0,1fr) auto;row-gap:6px}body.chessfile-site .site-header>.header-right-tools{grid-column:2;grid-row:1}body.chessfile-site .site-header>.site-nav{grid-column:1/-1;grid-row:2;gap:12px}}
@media(max-width:600px){body.chessfile-site .site-header{grid-template-columns:minmax(0,1fr) auto;gap:8px;min-height:64px;margin:0;padding:8px 12px;border-radius:0;border-left:0;border-right:0}body.chessfile-site .site-header>.brand{font-size:24px}body.chessfile-site .site-header .brand span{font-size:36px}body.chessfile-site .site-header>.site-nav{display:none}body.chessfile-site .site-header>.header-right-tools{grid-column:2;grid-row:1;gap:4px}body.chessfile-site .site-header .header-actions{display:none}}
/* Match the Games desktop header on both pages, independent of content layout. */
@media (min-width:1101px) and (hover:hover) and (pointer:fine){
  body.chessfile-site .site-header{max-width:1280px;min-height:64px;margin:8px auto 0;padding:8px 28px;gap:28px;border-radius:8px 8px 0 0}
}
