.ng-game{max-width:460px;width:100%}.ng-toolbar{display:flex;align-items:center;gap:20px;margin-bottom:12px}.ng-toolbar span{display:block;font-size:12px;color:#536551}.ng-toolbar strong{font-size:24px}.ng-toolbar button{margin-left:auto}.ng-toolbar button,.ng-settings select,.ng-controls button{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ng-settings{display:flex;gap:10px;margin-bottom:12px}.ng-settings label{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;font-size:12px}.ng-settings select{width:100%;min-width:0}.ng-controls{display:flex;gap:6px;margin-bottom:12px}.ng-controls button{flex:1;min-width:0;padding-inline:6px;font-size:13px}.ng-controls button[aria-pressed="true"]{background:#315d45;color:white;border-color:#315d45}.ng-controls button:disabled{opacity:.45;cursor:default}.ng-frame{--ng-size:5;--ng-side:72px;--ng-head:64px;display:grid;grid-template-columns:var(--ng-side) minmax(0,1fr);grid-template-rows:var(--ng-head) auto;width:100%}.ng-corner{display:flex;align-items:end;justify-content:end;padding:6px;font-size:11px;color:#61725a}.ng-columns{display:grid;grid-template-columns:repeat(var(--ng-size),minmax(0,1fr));padding-inline:2px}.ng-rows{display:grid;grid-template-rows:repeat(var(--ng-size),minmax(0,1fr));padding-block:2px}.ng-clue{display:flex;align-items:center;font-size:12px;font-variant-numeric:tabular-nums;color:#274733;background:#eef2e7}.ng-column{flex-direction:column;justify-content:end;gap:2px;padding-bottom:5px;line-height:12px}.ng-row{justify-content:end;gap:4px;padding-right:6px;padding-left:2px}.ng-clue.ng-complete{color:#6f8664;background:#e3edd8}.ng-clue.ng-conflict{color:#a23838;background:#fae8e4}.ng-grid{display:grid;grid-template-columns:repeat(var(--ng-size),minmax(0,1fr));grid-template-rows:repeat(var(--ng-size),minmax(0,1fr));aspect-ratio:1;width:100%;border:2px solid #54724c;box-sizing:border-box;touch-action:none;user-select:none}.ng-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;margin:0;padding:0;border:.5px solid #b9c8af;border-radius:0;background:#fffef6;color:#64805a;font:inherit;font-size:clamp(14px,4vw,24px);line-height:1;cursor:pointer;touch-action:none}.ng-cell.ng-filled{background:#315d45;color:#fff;border-color:#315d45}.ng-cell.ng-group-right{border-right:2px solid #64805a}.ng-cell.ng-group-bottom{border-bottom:2px solid #64805a}.ng-cell.ng-hint{outline:3px solid #d0a02e;outline-offset:-3px}.ng-cell.ng-mistake{outline-color:#c24c47}.ng-cell:focus-visible{outline:3px solid #2b85b0;outline-offset:-3px;z-index:1}.ng-cell:disabled{opacity:1;cursor:default}.ng-reveal{font-size:22px;font-weight:700;color:#315d45;margin:14px 0 0}#ngWinNext{background:#315d45;color:white}
@media(max-width:500px){.ng-frame{--ng-side:54px}.ng-clue{font-size:10px}.ng-row{gap:3px;padding-right:5px}.ng-column{line-height:12px}.ng-controls{gap:4px}.ng-controls button{font-size:12px;padding-inline:4px}.ng-settings select{font-size:13px;padding-inline:7px}}

.ng-clue{font-size:14px}.ng-column{line-height:14px}.ng-frame[data-size="5"] .ng-clue{font-size:18px}.ng-frame[data-size="5"] .ng-column{line-height:18px}
@media(max-width:500px){.ng-clue{font-size:12px}.ng-row{gap:2px;padding-right:4px;padding-left:1px}.ng-frame[data-size="5"] .ng-clue{font-size:16px}}
/* Optional Nonogram lesson, separate from the real board. */
.ng-lesson{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px;border:1px solid #a2b39c;border-radius:16px;background:#fbfcf7;color:#294534;line-height:1.65}
.ng-lesson::backdrop{background:#12251c66}.ng-lesson header{display:flex;align-items:center;gap:12px;justify-content:space-between}.ng-lesson h2{font-size:22px;margin:0}.ng-lesson h3{font-size:19px;margin:10px 0}.ng-lesson h3:focus{outline:none}.ng-lesson p{font-size:14px;margin:10px 0}.ng-lesson button,.ng-learn-link{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:7px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ng-lesson header button{font-size:22px;padding:4px 12px}.ng-lesson .ng-lesson-step,.ng-lesson .ng-lesson-note{font-size:12px;color:#65765d}.ng-lesson-clue{font-weight:700;font-size:20px!important}.ng-lesson-tool{font-size:13px;display:block;min-height:24px}.ng-lesson-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:280px;gap:2px;background:#537149;border:2px solid #537149;margin:8px 0}.ng-lesson-row .ng-cell{min-width:0;min-height:44px;padding:0;border:0;border-radius:0;font-size:26px;aspect-ratio:1;background:#fffdf8;color:#31543c}.ng-lesson-row .ng-filled{background:#315d45}.ng-lesson-row button:disabled{opacity:1;cursor:default}.ng-lesson-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.ng-lesson-actions #ngLessonNext{margin-left:auto;background:#315d45;color:#fff}.ng-lesson #ngLessonStatus{min-height:24px;color:#315d45}.ng-learn-link{font-size:13px}

/* Nonogram keeps the completed picture and result in view. */
.ng-completion{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;max-width:500px;box-sizing:border-box;margin:14px 0;padding:14px;border:1px solid #98b58b;border-radius:10px;background:#edf5e6;color:#294b36}
.ng-completion h2{font-size:20px;line-height:1.3;margin:0 0 6px}
.ng-completion h2::before{content:'✓ ';color:#387441}
.ng-completion p{flex-basis:100%;font-size:13px;line-height:1.5;margin:0}
.ng-completion .block-final-actions{display:flex;gap:8px;margin:0}
.ng-completion button{min-height:44px;padding:9px 13px;border:1px solid #315d45;border-radius:8px;background:#315d45;color:white;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 0 0 2px #d9bd6d}

/* Nonogram: direct puzzle actions, tools, then the board and quiet progress. */
.ng-game .ng-puzzle-actions{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:center}
.ng-game .ng-puzzle-actions :is(button,select),.ng-board-status button{box-sizing:border-box;min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px;cursor:pointer}
.ng-game .ng-puzzle-actions select{min-width:0;width:100%}
.ng-game .ng-puzzle-actions #ngDaily[aria-pressed=true]{background:#315d45;color:#fff;border-color:#315d45}
.ng-board-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;color:#52634f}
.ng-board-status p{font-size:13px;line-height:1.5;margin:0}
.ng-board-status strong{font-weight:600}

.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 112px auto;justify-content:start}
.ng-share-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.ng-share-header label{font-size:12px}
.ng-share-header button{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px;cursor:pointer}
@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 84px auto;gap:6px}.ng-game .ng-puzzle-actions :is(button,select){font-size:12px;padding-inline:6px}}

@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 78px auto}}
@media(max-width:360px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 68px auto;gap:5px}.ng-game .ng-puzzle-actions :is(button,select){font-size:11px;padding-inline:4px}}

/* Match the board width; give spare row space to New Puzzle. */
.ng-game .ng-puzzle-actions{width:100%;box-sizing:border-box;grid-template-columns:auto minmax(0,1fr) 112px auto}
.ng-game .ng-puzzle-actions #ngNew{width:100%;white-space:nowrap}
@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto minmax(0,1fr) 78px auto}}
@media(max-width:360px){.ng-game .ng-puzzle-actions{grid-template-columns:auto minmax(0,1fr) 68px auto}}

.ng-game .ng-puzzle-actions #ngDaily{grid-column:1}
.ng-game .ng-puzzle-actions #ngNew{grid-column:2}
.ng-game .ng-puzzle-actions #ngSize{grid-column:3}
.ng-game .ng-puzzle-actions #ngShare{grid-column:4}

.ng-completion #ngWinDetail{font-size:16px;line-height:26px;font-weight:400}

/* Nonogram: a control panel above a separate white picture panel. */
#ngPage .ng-game{max-width:508px}
#ngPage .ng-action-panel,#ngPage .ng-board-panel{box-sizing:border-box;background:#fff;padding:24px;border-radius:12px;box-shadow:0 2px 12px #19372a06}
#ngPage .ng-board-panel{margin-top:20px}
#ngPage .ng-action-panel .ng-controls{margin-bottom:0}
#ngPage .ng-action-panel #ngShareFallback{margin:14px 0 0}
#ngPage .ng-board-panel>.block-help{margin-bottom:0}
@media(min-width:901px){
 #ngPage .ng-game{font-family:'Mind Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;color:#263e2e}
 #ngPage .ng-puzzle-actions :is(button,select),#ngPage .ng-controls button{font-family:inherit;font-size:16px;font-weight:600;min-height:46px}
 #ngPage .ng-puzzle-actions :is(button,select){padding:9px 10px}
 #ngPage .ng-clue{font-size:14px;line-height:14px;font-weight:600}
 #ngPage .ng-corner{font-size:13px;color:#52634f}
 #ngPage .ng-board-status p,#ngPage #ngStatus{font-size:16px;line-height:26px;color:#344d3b}
 #ngPage #ngProgress,#ngPage #ngStorage,#ngPage #ngDailyInfo{font-size:14px;line-height:24px;color:#52634f}
 #ngPage #ngShareFallback,#ngPage #ngShareLink,#ngPage #ngShareClose{font-family:inherit;font-size:16px}
 #ngPage .block-help>summary{font-size:18px;font-weight:650;color:#263e2e}
 #ngPage .block-help p{font-size:16px;line-height:28px;color:#3e5144}
 #ngPage #ngLearnHelp{font-size:16px;min-height:44px}}
@media(max-width:900px){
 #ngPage .ng-game{max-width:492px}
 #ngPage .ng-action-panel,#ngPage .ng-board-panel{padding:16px}}
@media(max-width:600px){
 #ngPage .ng-game{max-width:460px}
 #ngPage .ng-action-panel,#ngPage .ng-board-panel{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:16px 12px}
 #ngPage .ng-board-panel{margin-top:16px}}

/* Larger clues share their scale with the space reserved around the picture. */
#ngPage .ng-game{max-width:640px}
#ngPage .ng-frame{--ng-clue-step:26px;font-size:20px}
#ngPage .ng-frame .ng-clue{font-size:20px;line-height:24px;font-weight:600}
#ngPage .ng-frame[data-size="5"]{--ng-clue-step:30px;font-size:24px}
#ngPage .ng-frame[data-size="5"] .ng-clue{font-size:24px;line-height:28px}
#ngPage .ng-frame .ng-column{gap:2px;padding-bottom:6px}
#ngPage .ng-frame .ng-row{gap:.25em;padding-right:6px}
#ngPage .ng-clue span{flex:none}
@media(max-width:900px){#ngPage .ng-game{max-width:600px}}
@media(max-width:600px){
 #ngPage .ng-game{max-width:460px}
 #ngPage .ng-frame{--ng-clue-step:22px;font-size:16px}
 #ngPage .ng-frame .ng-clue{font-size:16px;line-height:20px}
 #ngPage .ng-frame[data-size="5"]{--ng-clue-step:28px;font-size:22px}
 #ngPage .ng-frame[data-size="5"] .ng-clue{font-size:22px;line-height:26px}
}
