:root { color-scheme: dark; --page: #302e2b; --panel: #262522; --header: #211f1c; --text: #f1f0ed; --muted: #999793; --green: #81b64c; --light: #eeeed2; --dark: #779556; --review-cols: 38% 24% 10% 24%; font-family: Arial,Helvetica,sans-serif; font-size: 14px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); }
button, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { opacity: .35; cursor: default; }
a { color: inherit; }
button, select, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #b3d78c; outline-offset: 3px; }
i[data-icon] { width: 22px; height: 22px; display: inline-flex; flex-shrink: 0; }
i[data-icon] svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
svg { display: block; }
[hidden] { display: none !important; }
:root { --stats-space:30px; }
.site-statistics { display:flex;align-items:center;gap:12px;flex:0 0 30px;height:30px;padding:5px 12px;color:#99958c;font-size:10px;line-height:1.8; }
.site-statistics p { margin:0;white-space:nowrap; }
.site-statistics strong { color:#c2bdb2;font-weight:600;font-variant-numeric:tabular-nums; }
.sound-button svg { width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }

@media (max-width:430px) { .site-statistics { font-size:10px;gap:10px; } }
@media (max-width:350px) { .site-statistics { font-size:9px; } }
@media (min-width:1280px) and (min-height:700px) {
  :root { --stats-space:0px; }
  .site-statistics { position:fixed;top:12px;left:12px;width:160px;height:auto;display:block;padding:0;font-size:10px; }
  .ad-rail { top:max(90px,calc((100dvh - 617px)/2))!important;transform:none!important; }
  .ad-banner { min-height:0!important;height:min(600px,calc(100dvh - 130px)); }
}
.game-layout { --board-size: min(calc(100dvh - 184px - var(--stats-space,0px)),calc(100vw - 620px),850px); --panel-width: 500px; display: grid; grid-template-columns: calc(var(--board-size) + 40px) var(--panel-width); gap: 32px; width: max-content; margin: 14px auto; align-items: start; }
.board-column { min-width: 0; }
.player-row { display: flex; align-items: center; gap: 10px; height: 40px; margin-left: 40px; position: relative; }
.top-player { margin-bottom: 10px; }
.bottom-player { margin-top: 10px; }
.avatar { height: 40px; width: 40px; border-radius: 3px; overflow: hidden; flex-shrink: 0; background: #b7b6af; }
.avatar img { width: 100%; height: 100%; object-fit: contain; }
.black-avatar { background: linear-gradient(135deg,#6b6a66 0 50%,#b7b7ac 50%); }
.white-avatar { background: linear-gradient(135deg,#6a9692 0 50%,#c4a077 50%); }
.player-info { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; font-size: 13px; }
.player-info strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating { font-size: 12px; color: #ddd9d3; }
.player-result { font-weight: 700; color: #b5b2ab; margin-left: 5px; }
.player-clock { display: flex; align-items: center; justify-content: space-between; width: auto; min-width: 132px; height: 40px; padding: 0 11px; gap: 16px; margin-left: auto; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.5px; border-radius: 4px; font-variant-numeric: tabular-nums lining-nums; flex-shrink: 0; }
.player-clock i { width: 20px; height: 20px; }
.player-clock span { min-width: 4.1ch; text-align: right; }
.black-clock { background: #272522; color: #96938d; }
.white-clock { background: #a09e98; color: #302e2b; }
.player-clock.is-active { background: #f7f6f2; color: #272522; }
.player-clock.no-clock { display: none; }
body { min-height:100dvh;display:flex;flex-direction:column; }
.entry-screen { flex:1;min-height:calc(100dvh - 55px - var(--stats-space,0px))!important; }
.consent-pending .entry-screen { min-height:calc(100dvh - 225px - var(--stats-space,0px))!important; }
.site-footer { display:flex;justify-content:center;align-items:center;gap:20px;flex-wrap:wrap;margin-top:auto;padding:17px 20px 19px;color:#858179;font-size:11px;line-height:1.5; }
.site-footer nav { display:flex;align-items:center;gap:18px; }
.site-footer a,.site-footer button { color:#929087;text-decoration:none;background:none;border:0;padding:0;font-size:11px; }
.site-footer a:hover,.site-footer button:hover { color:#d3d0c8; }
.privacy-notice { width:min(740px,calc(100% - 36px));margin:10px auto 0;padding:17px 20px;background:#36342f;border:1px solid #ffffff0d;border-radius:7px;color:#c3bfb5; }
.privacy-notice strong { font-size:13px;color:#dedbd3; }
.privacy-notice p { margin:6px 0 13px;font-size:12px;line-height:1.6;color:#b7b2a7; }
.privacy-notice-actions { display:flex;gap:9px;flex-wrap:wrap; }
.privacy-action { min-height:36px;background:#48453f;border:1px solid #ffffff17;border-radius:4px;color:#e4e0d7;padding:8px 13px;font-size:12px;font-weight:600; }
.privacy-action:hover { background:#56524b; }
.privacy-dialog { width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #ffffff13;border-radius:8px;padding:25px;background:#2c2a25;color:#e1ddd3;box-shadow:0 24px 100px #0008; }
.privacy-dialog::backdrop { background:#151411d9;backdrop-filter:blur(4px); }
.privacy-dialog-header { display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:14px; }
.privacy-dialog-header h2 { font-size:22px;letter-spacing:-.3px;margin:0; }
#privacy-close { display:grid;place-items:center;background:none;font-size:27px;font-weight:400;color:#aaa498;width:30px;height:30px;padding:0; }
.privacy-dialog>p { color:#b6b0a3;font-size:12px;line-height:1.7;margin:0 0 15px; }
.privacy-option { display:flex;align-items:center;justify-content:space-between;gap:22px;padding:18px 0;border-top:1px solid #ffffff0d; }
.privacy-option strong { font-size:13px; }
.privacy-option p { margin:7px 0 0;color:#a9a397;font-size:11px;line-height:1.6; }
.always-on { flex-shrink:0;color:#b2b4a4;font-size:10px; }
.privacy-option input { width:20px;height:20px;flex-shrink:0;accent-color:#a6a294; }
.privacy-dialog .privacy-detail { font-size:10px;line-height:1.7;color:#979183; }
.privacy-detail a { color:#bfb9aa; }
.privacy-dialog-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:19px; }
.privacy-provider { background:none;color:#c9c4b6;font-size:12px;padding:5px 0;text-decoration:underline;text-underline-offset:3px; }
.privacy-document { width:min(720px,calc(100% - 40px));margin:45px auto 28px;line-height:1.8;font-size:14px;color:#bcb7aa; }
.privacy-document h1 { font-size:31px;color:#eeeae1;letter-spacing:-.7px;margin:20px 0 5px;line-height:1.3; }
.privacy-document h2 { font-size:18px;color:#ddd7ca;margin:27px 0 8px;line-height:1.5; }
.privacy-document p { margin:8px 0 14px; }
.privacy-document a { color:#d0c9b8;text-underline-offset:3px; }
.privacy-back,.policy-date { font-size:11px; }
.privacy-document .policy-date { color:#888275;margin-bottom:25px; }
.privacy-document code { font-size:12px;overflow-wrap:anywhere; }
.privacy-document-settings { color:#d3cdbf;border:1px solid #ffffff18;background:#3a3731;border-radius:4px;padding:10px 14px;font-size:12px;margin-top:8px; }
@media(max-width:430px) { .site-footer { gap:12px;padding:16px 12px;font-size:10px; }.site-footer nav { gap:13px; }.site-footer a,.site-footer button { font-size:10px; }.privacy-notice { padding:15px; }.privacy-action { padding:8px 10px;font-size:11px; }.privacy-dialog { padding:21px; }.privacy-document { margin-top:28px;font-size:13px; } }
.ad-rail { display:none; }
.ad-rail-heading { display:flex;justify-content:space-between;gap:5px;margin-bottom:9px;color:#89857b;font-size:8px;letter-spacing:1px; }
#ad-preview-label { letter-spacing:.5px;color:#b0a68e; }
.ad-banner { width:160px;min-height:600px;position:relative;background:#292723;border:1px solid #ffffff0b;display:flex;align-items:center;justify-content:center; }
.ad-banner>span { color:#777268;font-size:11px; }
.banner-preview { border:1px dashed #ffffff15;background:linear-gradient(160deg,#2c2a25,#25241f); }
.ad-disclosure { margin:12px 0 0!important;color:#a4a092!important;font-size:11px!important;text-align:center; }
.ad-dialog { width:min(500px,calc(100% - 32px));padding:28px;background:#262522;color:#efede6;border:1px solid #ffffff12;border-radius:9px;box-shadow:0 20px 100px #0008; }
.ad-dialog::backdrop { background:#171612df;backdrop-filter:blur(4px); }
.ad-dialog-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px;font-size:8px;color:#9e998b;letter-spacing:.8px; }
.ad-tag { padding:5px 7px;border:1px solid #ffffff13;border-radius:3px; }
#ad-preview-note { font-size:7px;color:#b3a68b;letter-spacing:.5px; }
.ad-dialog h2 { margin:0 0 11px;font-size:25px;letter-spacing:-.5px; }
.ad-dialog p { color:#b9b3a5;line-height:1.6;font-size:13px;margin:0 0 22px; }
.ad-watch { width:100%;min-height:45px;font-size:15px; }
.ad-cancel { display:block;margin:17px auto 0;background:none;padding:5px 10px;color:#a8a294;font-size:12px; }
.ad-cancel:hover { color:white; }
.ad-preview-stage { min-height:215px;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;border:1px solid #ffffff0c;border-radius:6px;background:#201f1b;margin-bottom:20px;overflow:hidden; }
.ad-preview-stage>strong { font-size:17px;font-weight:700; }
.ad-preview-art { width:60px;height:60px;display:grid;place-items:center;border-radius:15px;background:#81b64c18;color:#9cc671;margin-bottom:3px; }
.ad-preview-art span { font-size:42px;line-height:1; }
#ad-countdown { font-size:11px;color:#a7a18e;font-variant-numeric:tabular-nums; }
.ad-preview-progress { height:3px;background:#ffffff09;position:absolute;bottom:0;left:0;right:0; }
#ad-preview-fill { height:100%;width:0;background:#81b64c;transition:width .1s linear; }
@media(min-width:1280px) and (min-height:700px) {
  body.with-ads { padding-left:184px; }
  .ad-rail { display:block;position:fixed;width:160px;left:12px;top:50%;transform:translateY(-50%); }
  .with-ads .game-layout { --board-size:min(calc(100dvh - 184px - var(--stats-space,0px)),calc(100vw - 804px),850px); }
}
.loading-piece { display:block; width:25px; height:25px; flex:0 0 25px; object-fit:contain; transform-origin:center; animation:loading-piece-spin 1.2s linear infinite; }
.entry-submit:disabled { opacity:1; cursor:progress; }
#summary-progress { display:inline-flex; align-items:center; justify-content:center; gap:7px; font-size:12px; font-weight:600; color:#c4c0b6; }
#summary-progress .loading-piece { width:22px; height:22px; flex-basis:22px; }
@keyframes loading-piece-spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .loading-piece { animation:none; } }
.icon-button { background: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; border-radius: 4px; color: #92918c; flex-shrink: 0; }
.icon-button:hover { color: white; background: #ffffff08; }
.board-settings { position: absolute; right: -29px; top: 0; width: 23px; height: 23px; }
.board-settings i { width: 17px; height: 17px; }
.board-area { display: flex; gap: 10px; }
.eval-bar { width: 30px; flex-shrink: 0; background: #403d39; border-radius: 2px; position: relative; overflow: hidden; }
.eval-white { position: absolute; bottom: 0; background: #fff; height: 50%; width: 100%; transition: height .3s; }
.eval-bar>span { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; color: #272522; font-size: 9px; font-weight: 400; z-index: 1; }
.board-shell { position: relative; width: var(--board-size); height: var(--board-size); min-width: 0; }
.chessboard { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8,1fr); border-radius: 2px; user-select: none; }
.square { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--light); }
.square.dark { background: var(--dark); }
.square.last-move { background: #b5b37c; }
.square.dark.last-move { background: #9d9b62; }
.square>img { width: 100%; height: 100%; position: relative; z-index: 1; pointer-events: none; }
.coordinate { position: absolute; line-height: 1; font-size: clamp(11px,calc(var(--board-size)*.025),22px); font-weight: 700; color: var(--dark); z-index: 2; }
.dark .coordinate { color: var(--light); }
.rank-coordinate { left: 6px; top: 8px; }
.file-coordinate { right: 5px; bottom: 4px; }
.board-arrow { position: absolute; inset: 0; height: 100%; width: 100%; pointer-events: none; z-index: 3; }
.board-move-badge { position: absolute; right: -9%; top: -9%; width: 36%; height: 36%; display: grid; place-items: center; color: white; background: var(--category-color); border-radius: 50%; font-size: clamp(15px,calc(var(--board-size)*.028),25px); font-weight: 750; z-index: 4; line-height: 1; letter-spacing: -1px; box-shadow: 0 1px 2px #0002; }
.board-move-badge svg { width: 85%; height: 85%; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.review-panel { height: calc(var(--board-size) + 100px); background: var(--panel); border-radius: 5px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-header { height: 48px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; background: var(--header); }
.panel-header h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
.panel-header .icon-button i { width: 21px; height: 21px; }
.summary-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.summary-scroll { padding: 24px 24px 9px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: #888680 transparent; }
.eval-graph { height: 78px; border-radius: 3px; overflow: hidden; background: #403e3a; cursor: crosshair; }
.eval-graph>svg { width: 100%; height: 100%; display: block; }
.summary-graph { height: 80px; margin-bottom: 15px; }
.players-matrix { display: grid; grid-template-columns: var(--review-cols); grid-template-rows: 92px 43px; align-items: center; row-gap: 1px; padding-bottom: 15px; border-bottom: 1px solid #ffffff17; margin-bottom: 16px; }
.matrix-label { font-weight: 700; font-size: 13px; }
.players-label { grid-column: 1; grid-row: 1; }
.summary-player { grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; align-self: start; }
.white-summary-player { grid-column: 2; }
.black-summary-player { grid-column: 4; }
.summary-player>strong { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap; font-size: 13px; }
.summary-avatar { width: 64px; height: 64px; border-radius: 5px; overflow: hidden; border: 3px solid transparent; }
.white-summary-player .summary-avatar { border-color: #81b64c; }
.summary-avatar img { width: 100%; height: 100%; object-fit: contain; }
.accuracy-label { grid-column: 1; grid-row: 2; cursor: help; }
.accuracy-score { grid-row: 2; justify-self: center; background: #35332f; border-radius: 4px; font-size: 18px; font-weight: 800; padding: 8px 10px; min-width: 64px; text-align: center; color: white; font-variant-numeric: tabular-nums; }
.white-accuracy { grid-column: 2; }
.black-accuracy { grid-column: 4; }
.accuracy-score.accuracy-leader { background: #fff; color: #373530; }
.review-category { display: grid; grid-template-columns: var(--review-cols); align-items: center; height: 39px; --category-color: #a7a29b; }
.category-label { grid-column: 1; font-size: 13px; font-weight: 700; }
.category-count { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--category-color); background: none; border-radius: 4px; text-align: center; padding: 6px 0; min-height: 34px; }
.category-count[data-side="w"] { grid-column: 2; }
.category-count[data-side="b"] { grid-column: 4; }
.category-count:disabled { opacity: .65; }
.category-count.has-moves:hover { background: #ffffff09; }
.review-badge { grid-column: 3; width: 22px; height: 22px; display: grid; place-items: center; justify-self: center; line-height: 1; border-radius: 50%; background: var(--category-color); font-size: 16px; font-weight: 800; color: white; letter-spacing: -1px; }
.review-badge svg { height: 20px; width: 20px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.review-badge .category-glyph,.quality-symbol .category-glyph,.board-move-badge .category-glyph,.move-badge .category-glyph { width:85%;height:85%;display:block;overflow:visible; }
.summary-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9px; color: #89867f; line-height: 1.5; margin-top: 15px; }
.summary-footer>span:first-child { cursor: help; }
.progress-track { height: 2px; background: #ffffff08; overflow: hidden; border-radius: 2px; margin-top: 5px; }
.progress-track>div { width: 0; height: 100%; background: #7fa94d; transition: width .2s; }
.start-review-wrap { padding: 13px 24px 15px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #92c55944; border-radius: 5px; background: linear-gradient(#86ba49,#679d3f); box-shadow: 0 4px 0 #486c2d; color: white; font-weight: 750; font-size: 14px; min-height: 39px; padding: 9px 15px; text-shadow: 0 1px 0 #0002; }
.primary-button:hover { background: linear-gradient(#95c956,#76ab48); }
.primary-button:active { transform: translateY(2px); box-shadow: 0 2px 0 #486c2d; }
.start-review { height: 60px; width: 100%; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(#3d3b38,#302e2b); border: 1px solid #ffffff08; border-radius: 4px; box-shadow: 0 3px 0 #1a1917; color: #d8d6d1; min-height: 39px; padding: 9px 15px; font-size: 13px; font-weight: 700; }
.secondary-button:hover { background: linear-gradient(#4b4944,#3a3833); }
.secondary-button i { width: 19px; height: 19px; }
.analysis-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 24px 24px 0; }
.moves-heading { display: flex; justify-content: space-between; align-items: center; color: #89867f; font-size: 10px; padding: 1px 9px 6px; }
.move-list { flex: 1; min-height: 80px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #92908b transparent; }
.move-row { display: grid; grid-template-columns: 40px 1fr 1fr; align-items: center; min-height: 30px; }
.move-row:nth-child(even) { background: #ffffff03; }
.move-number { font-size: 12px; color: #8c8982; padding-left: 14px; }
.move-cell { background: none; display: flex; align-items: center; min-width: 0; gap: 4px; min-height: 29px; padding: 3px 5px; color: #c8c6c1; font-size: 13px; font-weight: 700; border-radius: 2px; text-align: left; }
.move-cell:hover { background: #ffffff0a; }
.move-cell.selected { background: #ffffff04; }
.move-cell.selected .san-text { background: #57544e; color: white; outline: 3px solid #57544e; border-radius: 1px; }
.move-san { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.quality-symbol { width: 17px; height: 17px; border-radius: 50%; background: var(--category-color); display: none; align-items: center; justify-content: center; color: white; font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: -1px; flex-shrink: 0; }
.quality-symbol svg { width: 16px; height: 16px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.piece-figurine { font-family: 'Segoe UI Symbol','DejaVu Sans',serif; font-size: 18px; line-height: 14px; }
.move-eval { display: none; }
.review-chart-wrap { padding-top: 9px; }
.review-progress { display: flex; justify-content: space-between; margin-top: 6px; gap: 10px; font-size: 8px; color: #8d8981; line-height: 1.4; }
.playback { display: flex; gap: 8px; margin: 14px -15px 9px; }
.playback-button { height: 48px; display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; border-radius: 11px; background: linear-gradient(#3c3a36,#302e2b); box-shadow: 0 2px 0 #1c1b18,inset 0 1px 0 #ffffff0b; color: #c3c0ba; }
.playback-button:hover { background: #46433e; }
.playback-button i { width: 27px; height: 27px; }
.panel-footer { display: flex; align-items: center; justify-content: center; gap: 20px; min-height: 41px; padding: 7px 17px 10px; flex-shrink: 0; }
.footer-button { display: flex; align-items: center; justify-content: center; gap: 6px; background: none; padding: 3px 0; color: #b4b0a9; font-size: 11px; font-weight: 700; white-space: nowrap; }
.footer-button i { width: 17px; height: 17px; color: #92908b; }
.footer-button:hover { color: white; }
.pgn-pane { padding: 25px 24px; display: flex; flex-direction: column; min-height: 0; flex: 1; gap: 16px; }
.pgn-pane h2 { font-size: 19px; margin: 0; }
.pgn-pane textarea { flex: 1; resize: none; min-height: 150px; }
.pgn-pane .form-error { margin: 0; }
.pgn-pane .primary-button { width: 100%; }
dialog { background: #292723; color: #f0eee9; border: 1px solid #ffffff10; box-shadow: 0 24px 90px #0008; border-radius: 9px; padding: 25px; width: min(520px,calc(100% - 30px)); }
dialog::backdrop { background: #151412c9; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 23px; margin: 0; font-weight: 750; letter-spacing: -.3px; }
dialog p { font-size: 13px; color: #b5b0a5; line-height: 1.6; margin: 0 0 18px; }
textarea { display: block; width: 100%; resize: vertical; min-height: 230px; padding: 13px; background: #201f1c; border: 1px solid #ffffff14; border-radius: 5px; color: #e3e1d8; font: 12px/1.8 Consolas,monospace; }
textarea::placeholder { color: #77736b; }
.import-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10px; color: #999589; margin: 13px 0 22px; }
.import-meta>span { display: flex; align-items: center; gap: 5px; }
.import-meta i { height: 12px; width: 12px; stroke-width: 1.8; }
.text-button { padding: 0; background: none; color: #a0c975; font-size: 10px; }
.text-button:hover { color: #c4e59d; }
.import-submit { width: 100%; font-size: 16px; min-height: 46px; }
.form-error { color: #f0a484; font-size: 12px; margin: 10px 0 17px; line-height: 1.5; }
.form-error:empty { display: none; }
kbd { font: 11px Arial; background: #ffffff08; border: 1px solid #ffffff12; border-radius: 3px; padding: 3px 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%,10px); opacity: 0; pointer-events: none; background: #4b513f; box-shadow: 0 5px 24px #0005; padding: 12px 20px; border-radius: 5px; z-index: 30; color: #f0f4e9; font-size: 13px; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1249px) and (min-width: 1050px) {
  .game-layout { --panel-width: 420px; --board-size: min(calc(100dvh - 184px - var(--stats-space,0px)),calc(100vw - 540px),850px); }
  .summary-scroll { padding-left: 20px; padding-right: 20px; }
  .analysis-pane { padding-left: 20px; padding-right: 20px; }
  .summary-avatar { width: 58px; height: 58px; }
  .panel-footer { gap: 16px; }
}
@media (max-width: 1049px) and (min-width: 851px) {
  .game-layout { --panel-width: 360px; --board-size: min(calc(100dvh - 184px - var(--stats-space,0px)),calc(100vw - 464px),850px); grid-template-columns: calc(var(--board-size) + 32px) var(--panel-width); gap: 22px; }
  .eval-bar { width: 24px; }
  .board-area { gap: 8px; }
  .player-row { margin-left: 32px; }
  .player-clock { width: auto; min-width: 108px; font-size: 22px; gap: 12px; }
  .player-info { font-size: 11px; }
  .player-info strong { max-width: 140px; }
  .rating { font-size: 10px; }
  .summary-scroll { padding: 18px 17px 8px; }
  .category-label { font-size: 12px; }
  .category-count { font-size: 16px; }
  .summary-avatar { width: 54px; height: 54px; }
  .summary-player>strong { font-size: 11px; }
  .players-matrix { grid-template-rows: 83px 39px; }
  .review-category { height: 34px; }
  .analysis-pane { padding: 18px 17px 0; }
  .move-row { grid-template-columns: 33px 1fr 1fr; }
  .move-number { padding-left: 10px; }
  .move-cell { font-size: 12px; }
  .panel-footer { gap: 15px; }
  .start-review-wrap { padding-left: 17px; padding-right: 17px; }
  .start-review { height: 53px; font-size: 22px; }
  .playback { margin-left: -8px; margin-right: -8px; }
}
@media (max-width: 850px) {
  .game-layout { --board-size: min(calc(100vw - 56px),650px); --panel-width: calc(var(--board-size) + 32px); grid-template-columns: var(--panel-width); width: max-content; gap: 20px; margin: 12px auto 20px; }
  .board-area { gap: 8px; }
  .eval-bar { width: 24px; }
  .player-row { margin-left: 32px; }
  .board-settings { position: static; width: 24px; height: 24px; margin-left: -4px; }
  .top-player .player-clock { margin-left: auto; }
  .player-clock { width: auto; min-width: 112px; font-size: 23px; gap: 12px; }
  .player-info { font-size: 12px; }
  .player-info strong { max-width: 200px; }
  .player-row .avatar { width: 36px; height: 36px; }
  .top-player, .bottom-player { height: 36px; }
  .review-panel { height: auto; min-height: 650px; max-height: 880px; }
  .summary-pane { min-height: 0; }
  .summary-scroll { overflow: visible; padding: 20px 22px 10px; flex: none; }
  .category-label { font-size: 13px; }
  .review-category { height: 36px; }
  .summary-player>strong { font-size: 12px; }
  .start-review { height: 53px; font-size: 23px; }
  .start-review-wrap { padding: 12px 22px 14px; }
  .analysis-pane { min-height: 650px; padding: 22px 22px 0; }
  .move-list { flex: none; max-height: 330px; min-height: 150px; }
  .panel-footer { gap: 30px; min-height: 43px; }
  .review-chart-wrap { margin-top: auto; }
  .panel-header h2 { font-size: 18px; }
}
@media (max-width: 430px) {
  .player-info { gap: 3px; font-size: 11px; }
  .player-info strong { max-width: 115px; }
  .rating { font-size: 10px; }
  .player-clock { width: auto; min-width: 100px; height: 36px; font-size: 22px; padding-left: 9px; padding-right: 9px; gap: 10px; }
  .player-clock i { width: 17px; height: 17px; }
  .summary-scroll { padding-left: 16px; padding-right: 16px; }
  .summary-avatar { width: 52px; height: 52px; }
  .players-matrix { grid-template-rows: 80px 41px; }
  .summary-player>strong { font-size: 10px; }
  .matrix-label { font-size: 12px; }
  .accuracy-score { font-size: 16px; min-width: 53px; padding: 7px 8px; }
  .category-label { font-size: 12px; }
  .category-count { font-size: 16px; }
  .review-badge { width: 21px; height: 21px; }
  .analysis-pane { padding: 18px 16px 0; }
  .move-cell { font-size: 12px; }
  .move-row { grid-template-columns: 30px 1fr 1fr; }
  .move-number { padding-left: 9px; }
  .playback { gap: 6px; margin-left: -6px; margin-right: -6px; }
  .playback-button { height: 44px; }
  .summary-footer { font-size: 8px; }
  .panel-footer { gap: 22px; }
  .import-meta { font-size: 9px; gap: 8px; }
  .text-button { font-size: 9px; }
}
.board-column { display: flex; flex-direction: column; }
.top-player { order: 1; }
.board-area { order: 2; }
.bottom-player { order: 3; }
.board-column>.sr-only { order: 4; }
.board-column.flipped .top-player { order: 3; margin-top: 10px; margin-bottom: 0; }
.board-column.flipped .bottom-player { order: 1; margin-top: 0; margin-bottom: 10px; }
@media (max-width: 850px) {
  .analysis-pane { height: 700px; min-height: 650px; }
  .move-list { flex: 1; max-height: none; min-height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.header-spacer{width:32px;flex-shrink:0}.move-insight{display:flex;align-items:center;gap:9px;min-height:47px;margin-bottom:15px;padding:10px 12px;border-bottom:1px solid #ffffff12;font-size:14px}.move-badge{display:none;place-items:center;flex-shrink:0;width:22px;height:22px;border-radius:50%;background:var(--category-color);color:white;font-weight:800;letter-spacing:-1px}.move-badge svg{width:20px;height:20px;fill:none;stroke:white;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.move-score{margin-left:auto;font-weight:700;color:#cfcac0;font-variant-numeric:tabular-nums}.summary-footer{justify-content:flex-end}.accuracy-label{cursor:default}.panel-footer{justify-content:center}
.entry-screen{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:28px 20px}.entry-card{width:100%;max-width:550px;background:#262522;padding:32px;border-radius:8px;box-shadow:0 10px 45px #0002}.entry-card h1{margin:0 0 11px;font-size:29px;font-weight:800;letter-spacing:-.7px}.entry-card>p:not(.form-error){margin:0 0 22px;font-size:13px;color:#b0aca2;line-height:1.6}.entry-card textarea{height:190px;min-height:140px;max-height:50dvh;resize:vertical;font:13px/1.7 Arial,Helvetica,sans-serif;background:#302e2b}.entry-submit{width:100%;height:49px;font-size:17px;margin-top:20px}.entry-card .form-error{margin:13px 0 0}.start-review-wrap{display:flex;flex-direction:column;gap:12px}.next-review{display:flex;align-items:center;justify-content:center;width:100%;height:47px;border-radius:5px;background:linear-gradient(#409ed5,#287eb5);border:1px solid #62b2df55;box-shadow:0 3px 0 #19577f;color:white;font-size:18px;font-weight:750;text-shadow:0 1px 0 #0002}.next-review:hover{background:linear-gradient(#51afe5,#338cc3)}.next-review:active{transform:translateY(2px);box-shadow:0 1px 0 #19577f}@media(max-width:430px){.entry-screen{padding:18px}.entry-card{padding:24px 20px}.entry-card h1{font-size:26px}.entry-card>p:not(.form-error){font-size:12px}.entry-card textarea{height:180px}}
/* Keep the review in the viewport; only its lists scroll. */
html.review-open { height:100%;overflow:hidden;overscroll-behavior:none; }
body.review-open { height:100dvh;min-height:0;overflow:hidden; }
body.review-open .game-layout { flex:1;min-height:0;margin:0 auto;padding:14px 0; }
body.review-open .site-footer { flex-shrink:0;margin-top:0; }
.summary-scroll,.move-list { overscroll-behavior:contain; }
.move-list { min-height:0; }
.move-insight,.review-chart-wrap,.playback,.start-review-wrap { flex-shrink:0; }
@media (max-height:650px) and (min-width:851px) {
  .analysis-pane { padding-top:12px; }
  .move-insight { min-height:36px;margin-bottom:8px;padding:6px 9px; }
  .review-chart-wrap .eval-graph { height:48px; }
  .playback { margin-top:8px; }
  .playback-button { height:40px; }
}
@media (max-width:850px) {
  body.review-open .game-layout {
    --board-size:min(calc(100vw - 56px),calc(45dvh - 70px - var(--stats-space,0px)),400px);
    --panel-width:min(calc(100vw - 24px),682px);
    width:var(--panel-width);grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);gap:10px;padding:8px 0;
  }
  .review-open .board-column { width:calc(var(--board-size) + 32px);justify-self:center; }
  .review-open .review-panel { height:100%;min-height:0;max-height:none; }
  .review-open .summary-scroll { flex:1;min-height:0;overflow-y:auto;padding:14px 16px 8px; }
  .review-open .analysis-pane { height:auto;min-height:0;padding:10px 12px 0; }
  .review-open .move-list { flex:1;min-height:0;max-height:none; }
  .review-open .panel-header { height:40px;min-height:40px; }
  .review-open .panel-header h2 { font-size:16px; }
  .review-open .move-insight { min-height:34px;margin-bottom:8px;padding:6px 8px;font-size:13px; }
  .review-open .review-chart-wrap { margin-top:0; }
  .review-open .eval-graph { height:48px; }
  .review-open .playback { margin:8px 0 9px; }
  .review-open .playback-button { height:40px; }
  .review-open .start-review-wrap { padding:10px 14px 14px;gap:8px; }
  .review-open .start-review,.review-open .next-review { height:40px;font-size:18px; }
  .review-open .player-info { flex:1;flex-wrap:nowrap;overflow:hidden; }
  .review-open .player-info strong { overflow:hidden;text-overflow:ellipsis; }
  .review-open .rating,.review-open .player-result { display:none; }
  .review-open .player-clock { min-width:90px;height:36px;padding:0 8px;font-size:21px;gap:6px; }
  .review-open .player-row { gap:7px; }
}
@media (max-width:850px) and (max-height:650px) {
  body.review-open .game-layout { --board-size:min(calc(100vw - 56px),calc(40dvh - 70px - var(--stats-space,0px)),400px); }
  .review-open .player-row { height:30px; }
  .review-open .avatar { width:30px;height:30px; }
  .review-open .player-clock { height:30px;font-size:19px; }
  .review-open .panel-header { height:36px;min-height:36px; }
  .review-open .analysis-pane { padding-top:8px; }
  .review-open .move-insight { min-height:30px;margin-bottom:6px;padding-top:4px;padding-bottom:4px; }
  .review-open .review-chart-wrap .eval-graph { height:32px; }
  .review-open .playback { margin-top:6px;margin-bottom:7px; }
  .review-open .playback-button { height:36px; }
}
@media (min-width:700px) and (max-width:850px) and (max-height:650px) {
  body.review-open .game-layout {
    --board-size:min(calc(100dvh - 176px - var(--stats-space,0px)),calc(100vw - 444px));
    width:calc(100vw - 32px);grid-template-columns:calc(var(--board-size) + 32px) 360px;
    grid-template-rows:minmax(0,1fr);gap:20px;
  }
  .review-open .review-panel { height:calc(var(--board-size) + 80px); }
}
.move-review { flex:0 1 auto;min-height:32px;max-height:190px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#888680 transparent;border-bottom:1px solid #ffffff12;padding:2px 3px 12px;margin:0 -3px 10px; }
.move-review:has(.move-explanation:not([hidden])) { min-height:80px; }
.move-review:has(#best-move-row:not([hidden])) { min-height:110px; }
.move-review .move-insight { min-height:30px;padding:0;margin:0;border:0; }
.move-explanation { color:#dedbd3;font-size:13px;line-height:1.45;margin:5px 0 9px; }
.best-move-row { display:flex;align-items:center;gap:7px;padding:2px 0;color:#a5cc7d;font-size:13px;line-height:1.5; }
.best-alternative-star { display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#81b64c;color:white;flex-shrink:0; }
.best-alternative-star svg { width:16px;height:16px;fill:currentColor; }
#best-move-score { color:#c7c5bc;font-size:11px;margin-left:auto;font-variant-numeric:tabular-nums; }
.feedback-lines { display:grid;gap:4px;margin-top:7px; }
.feedback-line { display:flex;align-items:baseline;gap:8px;line-height:1.5; }
.line-label { flex:0 0 64px;color:#939087;font-size:10px; }
.engine-pv { display:flex;flex-wrap:wrap;column-gap:5px; }
.pv-move { background:none;padding:0;color:#cbc8bf;font-size:12px;line-height:1.5;font-weight:600; }
.pv-move:hover { color:#b5dd8e; }
.square.review-best-square { box-shadow:inset 0 0 0 4px #81b64cba; }
.square.review-threat-square { box-shadow:inset 0 0 0 4px #ff7669cf; }
.moves-heading { flex-shrink:0;gap:10px; }
#exit-variation { color:#b9d89b;background:none;font-size:11px;padding:1px 0;margin-left:auto; }
#exit-variation:hover { color:#e2f0d3; }
.variation-line { flex:1;min-height:45px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px;padding:7px 2px;scrollbar-width:thin; }
.variation-move { padding:7px 10px;border-radius:4px;background:#ffffff06;color:#d5d1c7;font-size:13px;font-weight:600; }
.variation-move:hover { background:#ffffff12; }
.variation-move.selected { background:#81b64c2b;color:#b5dd8e;box-shadow:inset 0 0 0 1px #81b64c55; }
.analysis-pane .move-list { min-height:45px; }
@media (max-width:850px) {
  .move-review { padding-bottom:8px;margin-bottom:7px; }
  .move-explanation { font-size:12px;margin:4px 0 7px; }
  .move-review .move-insight { min-height:28px; }
  .review-open .site-footer { padding-top:9px;padding-bottom:9px; }
}
@media (max-width:699px) and (max-height:650px) {
  .review-open .analysis-pane .review-chart-wrap { display:none; }
}

.review-guide { width:min(740px,calc(100% - 40px)); }
.review-guide h1 { font-size:38px;line-height:1.15;margin:24px 0 18px;max-width:650px; }
.review-guide section { scroll-margin-top:24px; }
.review-guide ol,.review-guide ul { padding-left:23px;margin:12px 0 18px; }
.review-guide li { padding-left:3px;margin:7px 0; }
.review-guide .guide-start { display:inline-flex;align-items:center;gap:30px;background:#81b64c;color:#fff;text-decoration:none;font-weight:700;line-height:1.5;border-radius:5px;padding:11px 18px;margin:8px 0 24px; }
.review-guide .guide-start:hover { background:#90c45a; }
.guide-contents { display:flex;flex-wrap:wrap;gap:10px 23px;border-top:1px solid #ffffff12;border-bottom:1px solid #ffffff12;padding:15px 0;margin:0 0 28px;font-size:13px; }
.review-guide pre { white-space:pre-wrap;overflow-wrap:anywhere;padding:17px;background:#262522;border:1px solid #ffffff0c;border-radius:5px;line-height:1.6; }
.review-guide pre code { font-size:13px;color:#e5e1d7; }
.review-guide .guide-independence { border-top:1px solid #ffffff12;padding-top:20px;margin-top:35px;color:#99948a;font-size:12px; }
@media(max-width:430px) { .review-guide h1 { font-size:29px; }.guide-contents { font-size:12px;gap:10px 18px; } }
