.opts { display: grid; gap: 8px; margin-bottom: 10px; }
.grp { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.grp[hidden] { display: none; }
.grp .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.status { margin: 6px 2px 10px; font-weight: 700; font-size: 17px; min-height: 1.6em; }
.actions { margin: 14px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.log { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.log summary { cursor: pointer; padding: 8px 2px; min-height: 44px; display: flex; align-items: center; }
.log ol { margin: 4px 0 0; padding-left: 1.6em; max-height: 220px; overflow: auto; line-height: 1.7; }

.board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: 100%; aspect-ratio: 1; container-type: size; border: 3px solid #4a2f19; border-radius: 8px; overflow: hidden; }
.sq { min-width: 0; min-height: 0; overflow: hidden; position: relative; padding: 0; border: 0; margin: 0; cursor: pointer; font: inherit; background: #E8D9B0; color: #111; display: grid; place-items: center; }
.sq.dark { background: #5E8B5A; }
.sq .pc { font-size: 8.4cqw; line-height: 1; pointer-events: none; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", "DejaVu Sans", sans-serif; }
.sq .pc.w { color: #FFF8E7; -webkit-text-stroke: 1px #1B0E02; text-shadow: 0 1px 1px rgba(0,0,0,.5); paint-order: stroke fill; }
.sq .pc.b { color: #111; text-shadow: 0 0 2px rgba(255,255,255,.7); }
.sq .co { position: absolute; font-size: 2.1cqw; font-weight: 700; opacity: .8; pointer-events: none; }
.sq .co.f { right: 3%; bottom: 1%; }
.sq .co.r { left: 4%; top: 2%; }
.sq.dark .co { color: #E8D9B0; }
.sq:not(.dark) .co { color: #3F6B3C; }
.sq.last { box-shadow: inset 0 0 0 3px rgba(242,201,76,.75); }
.sq.sel { box-shadow: inset 0 0 0 4px #F2C94C; z-index: 2; }
.sq.chk { background: radial-gradient(circle, #E5694F 0 45%, transparent 75%), #E8D9B0; }
.sq.dark.chk { background: radial-gradient(circle, #E5694F 0 45%, transparent 75%), #5E8B5A; }
.sq.mv::after { content: ""; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: rgba(2, 11, 6, .55); }
.sq.cap::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 4px solid rgba(2, 11, 6, .6); }
.sq:focus-visible { outline: 3px solid #F2C94C; outline-offset: -3px; z-index: 3; }
.sq.locked { cursor: default; }
