.puzzle-shell{width:min(100%,1100px);margin:auto;padding:1.5rem 1rem 2.5rem}.puzzle-heading{margin-bottom:1.25rem}.puzzle-heading h1{font-size:clamp(1.8rem,5vw,2.7rem);margin:0 0 .4rem}.puzzle-heading p{color:var(--bw-text-muted);margin:0;line-height:1.6}.toolbar,.tools,.online-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:.7rem 0}.puzzle-shell button,.puzzle-shell select,.puzzle-shell input,dialog button{font:inherit;min-height:44px;border:1px solid var(--bw-border-strong);border-radius:.6rem;padding:.65rem .85rem;color:var(--bw-text);background:var(--bw-panel);cursor:pointer}.puzzle-shell button:disabled{opacity:.45;cursor:default}.puzzle-shell button[aria-pressed=true]{background:var(--bw-accent);color:#07131d;border-color:var(--bw-accent)}.puzzle-shell label{display:flex;align-items:center;gap:.5rem;font-size:.8rem}.puzzle-shell #newGame{background:var(--bw-accent);color:#07131d;font-weight:700}.puzzle-shell [hidden]{display:none!important}.stats{display:flex;gap:1rem;flex-wrap:wrap;align-items:center;margin:1rem 0;color:var(--bw-text-muted);font-size:.85rem}.stats #timer{margin-left:auto;font-variant-numeric:tabular-nums}#challengeLabel{color:var(--bw-accent)}#message{min-height:2.8em;font-size:.9rem;line-height:1.5;color:var(--bw-accent);margin:.8rem 0}.board-wrap{border-radius:1rem;border:1px solid var(--bw-border-strong);background:var(--bw-panel);padding:1rem;max-width:100%}.board-scroll{overflow:auto;max-width:100%;padding:3px;overscroll-behavior:contain}.mine-board{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:3px;width:min(100%,400px);margin:auto}.mine-board.wide{width:max-content;grid-template-columns:repeat(var(--cols),36px)}.puzzle-shell .mine-cell{padding:0;min-height:0;aspect-ratio:1;border-radius:5px;background:#294155;border:1px solid #57718a;font-size:1.1rem;font-weight:700;touch-action:manipulation}.puzzle-shell .mine-cell.opened{background:#122532;border-color:#223643;color:#c6d7e0}.puzzle-shell .mine-cell[data-number="1"].opened{color:#74cfff}.puzzle-shell .mine-cell[data-number="2"].opened{color:#80dfa2}.puzzle-shell .mine-cell[data-number="3"].opened{color:#ff969b}.puzzle-shell .mine-cell[data-number="4"].opened{color:#c7aeff}.puzzle-shell .mine-cell.mine{color:#ffbb70}.puzzle-shell .mine-cell.exploded{background:#9c303e;color:#fff}body[data-puzzle=sudoku]{--bw-accent:#9dbbff}body[data-puzzle=four]{--bw-accent:#ffc16b}.sudoku-wrap{max-width:550px;margin:auto;padding:.65rem}.sudoku-board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));border:2px solid #a4b9d0;background:#5b7188}.puzzle-shell .sudoku-cell{aspect-ratio:1;padding:0;border-radius:0;min-height:0;border:0;border-right:1px solid #536778;border-bottom:1px solid #536778;background:#102737;color:#8bd6ff;font-size:clamp(18px,4.5vw,30px);position:relative;touch-action:manipulation}.puzzle-shell .sudoku-cell:nth-child(3n){border-right:2px solid #a4b9d0}.puzzle-shell .sudoku-cell:nth-child(9n){border-right:0}.puzzle-shell .sudoku-cell:nth-child(n+19):nth-child(-n+27),.puzzle-shell .sudoku-cell:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid #a4b9d0}.puzzle-shell .sudoku-cell.given{color:#f3f7fb;font-weight:700}.puzzle-shell .sudoku-cell.peer{background:#1c3548}.puzzle-shell .sudoku-cell.matching{background:#314c67}.puzzle-shell .sudoku-cell.selected{background:#426795;color:#fff;outline:2px solid #b9d7ff;outline-offset:-2px;z-index:1}.puzzle-shell .sudoku-cell.error{color:#ff9b9b;background:#542c3a}.notes{display:grid;grid-template-columns:repeat(3,1fr);position:absolute;inset:1px;font-size:clamp(8px,1.8vw,12px);color:#abc6dc}.notes span{display:flex;align-items:center;justify-content:center;line-height:1}#keypad{display:grid;grid-template-columns:repeat(9,1fr);gap:4px;margin-top:.8rem}#keypad button{padding:.4rem 0;font-size:1.25rem;color:#b9d7ff}#assists{font-size:.8rem;color:var(--bw-text-muted)}#outcome{border:1px solid var(--bw-accent);border-radius:.7rem;padding:1rem;margin:.8rem 0;background:var(--bw-panel)}#result{font-weight:700}#shareText{display:block;max-width:100%;width:100%;min-height:7rem;background:var(--bw-panel);color:var(--bw-text);border:1px solid var(--bw-border-strong);padding:.8rem;font:inherit;font-size:.8rem;margin:1rem 0}.four-wrap{max-width:600px;margin:auto}.four-columns{display:grid;grid-template-columns:repeat(7,1fr);gap:.4rem;margin-bottom:.5rem}.four-columns button{padding:.5rem 0!important;color:var(--bw-accent)}.four-columns span{font-size:.7rem;margin-left:.2rem}.four-board{display:grid;grid-template-columns:repeat(7,1fr);gap:clamp(5px,1.5vw,12px);padding:clamp(8px,2vw,18px);background:#234b85;border-radius:1rem;border:1px solid #5d85b6}.puzzle-shell .disc{aspect-ratio:1;min-height:0;padding:0;border-radius:50%;border:2px solid #15345d;background:#081929;box-shadow:inset 0 3px 7px #0007;opacity:1;font-size:clamp(14px,4vw,24px);color:#fff4}.puzzle-shell .disc.side-1{background:#ffbd55;color:#7d470c;box-shadow:inset 0 0 0 4px #ffda80}.puzzle-shell .disc.side-2{background:#68caff;color:#185774;box-shadow:inset 0 0 0 4px #a0e4ff}.puzzle-shell .disc.winning{outline:3px solid white;outline-offset:2px}#players{font-size:.95rem;text-align:center;line-height:1.7}#wins{text-align:center;color:var(--bw-text-muted);font-size:.8rem}#onlinePanel{padding:1rem;border:1px solid var(--bw-border);border-radius:.8rem;background:var(--bw-panel);margin:.8rem 0}#onlinePanel input{max-width:10rem}#roomCode{font-weight:700;letter-spacing:.15em}#roomInfo{line-height:2}[data-turn="2"] .four-columns button{color:#68caff}.game-rules{line-height:1.8;color:var(--bw-text-muted);font-size:.85rem;margin-top:1.5rem}.game-rules summary{cursor:pointer;font-weight:700;color:var(--bw-text)}#saved{font-size:.75rem;color:var(--bw-text-muted);line-height:1.6}dialog{background:var(--bw-panel);color:var(--bw-text);border:1px solid var(--bw-border-strong);border-radius:.8rem;padding:1.3rem;max-width:min(28rem,calc(100vw - 2rem))}dialog::backdrop{background:#000a}dialog form{display:flex;justify-content:flex-end;gap:.6rem}dialog p{line-height:1.5}@media(max-width:600px){.puzzle-shell{padding:1rem .5rem 2rem}.board-wrap{padding:.45rem}.toolbar{gap:.4rem}.toolbar button,.toolbar select{font-size:.8rem}.sudoku-wrap{padding:.25rem}.mine-board{gap:2px}.puzzle-shell .mine-cell{font-size:.95rem}.stats{gap:.6rem}.four-columns{gap:.25rem}}
