body[data-tool-page="echecs"] .chess-public-demo { margin-top: 32px; scroll-margin-top: 20px; }
.chess-demo-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.chess-demo-rules details { min-width: 0; border: 1px solid #d6c7b4; border-radius: 12px; background: #fff; }
.chess-demo-rules summary { min-height: 48px; padding: 14px; color: #283e4d; font-weight: 700; cursor: pointer; }
.chess-demo-rules p { margin: 0; padding: 0 14px 16px; color: #405565; font-size: .9rem; line-height: 1.7; }
.chess-demo-workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 28px; margin-top: 24px; }
.chess-demo-board-column { min-width: 0; }.chess-demo-board-column > p { color: #405565; font-size: .8rem; line-height: 1.6; }
.chess-public-demo .chess-board-frame { max-width: 38rem; padding: 8px; border-radius: 14px; background: #704b31; box-shadow: 0 10px 20px #38281826; }
.chess-public-demo .chess-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); aspect-ratio: 1; overflow: hidden; border: 1px solid #422d1f; }
.chess-public-demo .chess-row { display: contents; }
.chess-public-demo .chess-square { position: relative; display: grid; aspect-ratio: 1; min-width: 0; min-height: 0; place-items: center; padding: 0; border: 0; border-radius: 0; color: #172a22; background: #f1dfbc; cursor: pointer; }
.chess-public-demo .chess-square[data-tone="dark"] { background: #6c947c; }
.chess-public-demo .chess-square[data-rank="1"]::after { position: absolute; bottom: 2px; right: 3px; font-size: .65rem; font-weight: 800; color: #10251c; content: attr(data-file); }
.chess-public-demo .chess-square[data-file="a"]::before { position: absolute; top: 2px; left: 3px; font-size: .65rem; font-weight: 800; color: #10251c; content: attr(data-rank); }
.chess-public-demo .chess-square.is-selected { background: #eed184; box-shadow: inset 0 0 0 3px #906015; }
.chess-public-demo .chess-square:focus-visible { z-index: 2; outline: 3px solid #0865ab; outline-offset: -3px; }
.chess-public-demo .chess-piece { font: clamp(1.5rem, 5vw, 3.8rem) Georgia, "Times New Roman", serif; line-height: 1; pointer-events: none; }
.chess-public-demo .chess-piece--white { color: #fffdf6; text-shadow: -1px -1px 0 #263934, 1px -1px 0 #263934, -1px 1px 0 #263934, 1px 1px 0 #263934; }
.chess-public-demo .chess-piece--black { color: #182522; }
.chess-public-demo .chess-target-marker { position: absolute; width: 24%; height: 24%; border-radius: 50%; background: #163e32; box-shadow: 0 0 0 2px #ffffffa6; pointer-events: none; }
.chess-public-demo .is-capture-option .chess-target-marker { width: 84%; height: 84%; border: 3px solid #8d2923; background: transparent; }
.chess-demo-coach { min-width: 0; padding: 22px; border: 1px solid #d6c7b4; border-radius: 14px; background: #fff; }.chess-demo-coach h3 { margin: 6px 0 16px; font-size: 1.3rem; line-height: 1.4; }.chess-demo-coach p { color: #405565; line-height: 1.7; }
.chess-demo-feedback, .chess-demo-hint { margin: 16px 0; padding: 14px; border-radius: 10px; background: #fff4e5; color: #563811; }.chess-demo-feedback.is-correct { color: #183e2f; background: #eef7ef; }.chess-demo-feedback p { margin: 8px 0 0; color: inherit; }
.chess-demo-summary { padding: 24px; border: 1px solid #bfd1c1; border-radius: 14px; background: #f3f8f2; color: #254c36; line-height: 1.7; }
.chess-demo-text-version { margin-top: 24px; border-top: 1px solid #d6c7b4; padding-top: 14px; color: #405565; }.chess-demo-text-version summary { min-height: 44px; font-weight: 600; cursor: pointer; }.chess-demo-text-version li { padding: 10px 0; line-height: 1.7; }
.chess-demo-source { color: #405565; font-size: .78rem; line-height: 1.6; }.chess-demo-source a { color: #38543f; }
.chess-public-demo :is(summary, button, a):focus-visible { outline: 3px solid #0865ab; outline-offset: 3px; }.chess-public-demo [hidden] { display: none !important; }
@media (max-width: 800px) { .chess-demo-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; }.chess-demo-coach { grid-row: 1; }.chess-demo-rules { grid-template-columns: minmax(0, 1fr); }.chess-public-demo .chess-board-frame { margin: auto; }.chess-public-demo .chess-piece { font-size: clamp(1.5rem, 10vw, 4rem); } }
