.bn-game{--bn-ink:#28493d;max-width:490px;margin:auto;padding:16px 8px;color:var(--bn-ink);font-family:inherit;font-variant-numeric:tabular-nums}
.bn-game button,.bn-game select{font:inherit;color:inherit}.bn-game button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.bn-game button:disabled{opacity:.45;cursor:default}.bn-game button:focus-visible,.bn-game select:focus-visible{outline:3px solid #ba8436;outline-offset:3px}
.bn-toolbar{display:flex;align-items:flex-end;gap:12px;margin-bottom:10px}.bn-toolbar label{flex:1;min-width:0;font-size:11px;font-weight:650;letter-spacing:.04em}.bn-toolbar select{display:block;width:100%;min-height:44px;margin-top:4px;padding:8px;border:1px solid #c5d1c1;border-radius:8px;background:#fffdf7;font-size:14px}.bn-toolbar>span{padding-bottom:13px;font-size:12px;white-space:nowrap}.bn-intro{font-size:12px;line-height:1.5;margin:0 0 12px;color:#5d7161}
.bn-board{max-width:420px;margin:0 auto;padding:3px;border:1px solid #78927b;border-radius:8px;background:#bdcdb8;box-shadow:0 3px 0 #afc1a7;user-select:none}.bn-row{display:grid;grid-template-columns:repeat(var(--bn-size),minmax(0,1fr));gap:2px;margin-top:2px}.bn-row:first-child{margin-top:0}.bn-game .bn-cell{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:34px;aspect-ratio:1;padding:0;border:0;border-radius:3px;background:#fffdf4}.bn-circle{display:block;width:61%;aspect-ratio:1;border:2px solid transparent;border-radius:50%;pointer-events:none}.bn-black .bn-circle{background:#27463b;border-color:#27463b}.bn-white .bn-circle{background:#fffef9;border:3px solid #27463b}.bn-cell.bn-fixed{background:#e5eddd}.bn-fixed-mark{display:none;position:absolute;right:2px;bottom:1px;font-size:7px;line-height:8px;color:#506747;pointer-events:none}.bn-fixed .bn-fixed-mark{display:block}.bn-cell.bn-active{background:#f6e4b5;box-shadow:inset 0 0 0 2px #af7b32}.bn-cell.bn-invalid{background:#fbe0d5;box-shadow:inset 0 0 0 2px #ab4f3c}.bn-cell.bn-active.bn-invalid{box-shadow:inset 0 0 0 3px #9f452e}.bn-cell:hover{outline:2px solid #b99a5d;outline-offset:-2px}.bn-cell:focus-visible{z-index:1;outline-offset:-3px}
.bn-selected{max-width:420px;min-height:20px;margin:10px auto 8px;text-align:center;font-size:12px;line-height:1.6}.bn-input,.bn-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-width:420px;margin:0 auto}.bn-tools{margin-top:7px}.bn-input button,.bn-tools button,.bn-complete button,.bn-confirm button{min-height:44px;padding:7px 5px;border:1px solid #c8d3be;border-radius:8px;background:#fffdf5;font-size:13px;font-weight:600}.bn-input button{background:#edf1e4}.bn-input button span{font-size:22px;vertical-align:-2px;margin-right:3px}.bn-input button:active{background:#dce8cf}.bn-tools button{font-size:12px}.bn-complete{display:flex;align-items:center;gap:12px;max-width:420px;margin:15px auto 0;padding:12px;border:1px solid #c2d0a8;border-radius:10px;background:#e5edcf}.bn-complete[hidden]{display:none}.bn-complete strong{font-size:16px}.bn-complete p{margin:4px 0 0;font-size:12px}.bn-complete button{margin-left:auto;flex-shrink:0;padding:8px 11px}.bn-status{max-width:420px;min-height:40px;margin:12px auto 6px;font-size:12px;line-height:1.6;text-align:center}.bn-footnote{font-size:10px;line-height:1.5;text-align:center;color:#61725a}.bn-help{max-width:420px;margin:13px auto 0;font-size:12px;line-height:1.7;color:#596e56}.bn-help summary{text-align:center;cursor:pointer}.bn-confirm{max-width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px;border:1px solid #c5d0b8;border-radius:14px;color:#28493d;box-shadow:0 20px 80px #1d32294d}.bn-confirm::backdrop{background:#21372e75}.bn-confirm h2{font-size:20px;margin:0 0 10px}.bn-confirm p{font-size:14px;line-height:1.6}.bn-confirm>div{display:flex;gap:8px;justify-content:flex-end}.bn-confirm button{padding:8px 10px}.bn-confirm [data-bn-confirm]{background:#486c4e;color:#fff}
@media(max-width:680px){.bn-game{padding:0 0 8px}.bn-toolbar{gap:8px;margin-bottom:8px}.bn-toolbar>span{font-size:11px}.bn-intro{font-size:11px;margin-bottom:8px}.bn-selected{font-size:11px;margin:8px auto 6px}.bn-input,.bn-tools{gap:5px}.bn-tools{margin-top:5px}.bn-complete{gap:8px}.bn-complete strong{font-size:14px}.bn-confirm{padding:18px}.game-stage:has(.bn-game) .stage-toolbar{margin-bottom:4px}.game-stage.focus-mode:has(.bn-game){padding:8px 10px max(12px,env(safe-area-inset-bottom))}}
