.puzzle-book{box-sizing:border-box;width:min(760px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:90dvh;margin:auto;padding:24px;background:#f8f1df;color:#344e42;border:1px solid #a3aa8d;border-radius:14px;box-shadow:0 18px 80px #263e3444;font:16px/1.55 Georgia,serif;overflow:auto;overscroll-behavior:contain}.puzzle-book:modal{overscroll-behavior:contain}.puzzle-book::backdrop{background:#273b344d;overflow:hidden;overscroll-behavior:contain}.puzzle-close-form{margin:0}.puzzle-book *{box-sizing:border-box}.puzzle-book h1{font-size:1.8rem;font-weight:500;line-height:1.2;margin:0}.puzzle-book h2{font-size:1.35rem;font-weight:500}.puzzle-book button{font:inherit;min-height:44px;min-width:44px;border:1px solid #7c8b6e;border-radius:6px;padding:8px 12px;background:#fffaf0;color:#344e42;cursor:pointer;touch-action:manipulation}.puzzle-book button:disabled{cursor:default;opacity:.58}.puzzle-book :focus-visible{outline:3px solid #aa6b31;outline-offset:3px}.puzzle-book-top{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.puzzle-intro,.puzzle-meta,.puzzle-board-note{color:#53644f}.puzzle-card{padding:8px 0 22px;border-bottom:1px solid #c9cbb5}.puzzle-card h2{margin-bottom:4px}.puzzle-meta{margin:4px 0}.puzzle-progress{font:600 .85rem system-ui,sans-serif}.puzzle-actions,.puzzle-token-tray{display:flex;flex-wrap:wrap;gap:8px}.puzzle-tools,.puzzle-token-tray{margin:14px 0}.puzzle-clues{padding-left:22px}.puzzle-clues li{margin:6px 0}.puzzle-token-tray [aria-pressed=true]{background:#d5dfc5;border:2px solid #526e58}.puzzle-board-scroll{max-width:100%;overflow:auto;padding:5px 3px 9px;overscroll-behavior:contain}.puzzle-grid{width:max-content;max-width:none;margin:auto}.puzzle-row{display:grid;grid-template-columns:repeat(var(--puzzle-columns),44px)}.puzzle-gridcell{width:44px;height:44px}.puzzle-book .puzzle-cell{display:block;width:44px;height:44px;min-height:44px;min-width:44px;padding:0;border-radius:0;border:1px solid #b7bea4;background:#f8efda;font:600 1rem/1 system-ui,sans-serif;overflow:hidden}.puzzle-cell.is-path{background:#bfd0ad!important;color:#2f513d}.puzzle-cell.is-blocked{background:#7a8975!important;color:#e6dfcd}.puzzle-cell.has-token{background:#dce2c8!important;font-size:.9rem}.puzzle-cell.is-dark{background:#bac5a4!important}.puzzle-book [data-puzzle-board=chess] .is-piece{font:34px/1 Georgia,'Times New Roman',serif;color:#273f33}.puzzle-cell.is-selected{box-shadow:inset 0 0 0 3px #a36a35}.puzzle-cell.is-destination{box-shadow:inset 0 0 0 3px #748e64}.puzzle-status{min-height:1.55em;font:.9rem/1.5 system-ui,sans-serif}.puzzle-hint,.puzzle-solved{padding:12px 14px;border-radius:8px;background:#e5e8d4}.puzzle-solved{border:1px solid #9eae8b}.puzzle-book[data-puzzle-family=chess] .puzzle-board-note{font-size:.92rem}@media(max-width:520px){.puzzle-book{padding:14px 10px}.puzzle-book h1{font-size:1.55rem}.puzzle-book-top{gap:8px}.puzzle-close{margin-left:auto}.puzzle-board-scroll{padding-left:0;padding-right:0}.puzzle-clues{font-size:.95rem}.puzzle-actions button{padding:8px 10px}.puzzle-book .puzzle-cell:focus-visible{outline-offset:-3px}}

.puzzle-cell.is-bridge{border-bottom:4px solid #aa8764}.puzzle-board-scroll:focus-within{scrollbar-color:#9da98c #f8f1df}

.puzzle-book .puzzle-cell{position:relative}.puzzle-cell-coordinate{position:absolute;top:3px;left:3px;font:9px/1 system-ui,sans-serif;color:#4d624d}

.puzzle-promotion{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0;padding:12px;border:1px solid #a3aa8d;border-radius:8px}.puzzle-promotion legend{padding:0 6px}
