:root{color-scheme:light}*{box-sizing:border-box}html,body,#activity-root{width:100%;height:100%;height:100dvh;overflow:hidden}body{margin:0;background:#163c49}button{font:inherit}::selection{background:#f2c141;color:#163c49}[hidden],.nb-hidden{display:none!important}
.nb-game{width:100%;height:100%;min-height:0;display:grid;grid-template-rows:auto 1fr auto;gap:10px;color:#fff9df;text-shadow:0 2px 3px #103643,1px 0 #103643,-1px 0 #103643,0 -1px #103643}.nb-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.nb-prompt{margin:0;font-size:clamp(19px,2.3vw,29px);line-height:1.12}.nb-prompt span{display:block;font-size:.64em;margin-top:6px}.nb-score{display:flex;align-items:center;gap:7px;font-size:25px;white-space:nowrap;padding:3px 7px}.nb-score img{width:30px;height:30px;object-fit:contain}.nb-stage{display:grid;grid-template-columns:minmax(145px,.75fr) minmax(0,3fr);gap:20px;min-height:0;align-items:center}.nb-guide{display:grid;justify-items:center;align-content:center;min-height:0;gap:7px}.nb-target{font-size:clamp(90px,10vw,158px);line-height:.95;font-weight:600;color:#ffe7a0;-webkit-text-stroke:2px #173b4b;paint-order:stroke fill;text-shadow:0 3px 4px #0b2f42}.nb-guide p{margin:0;font-size:19px;text-align:center;max-width:220px;line-height:1.15}.nb-character{width:clamp(110px,16vw,225px);height:clamp(110px,16vw,225px);object-fit:contain}.nb-game img,.nb-settings img{max-width:100%;max-height:100%;filter:none}.nb-game .nb-character{max-height:225px}.nb-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:clamp(9px,1.5vw,24px);align-items:center;justify-items:center;height:100%;max-height:560px;min-height:0}
.nb-game .nb-bubble{position:relative;border:2px solid #e3ffffb3;border-radius:50%;height:min(100%,148px);width:auto;min-width:0;max-width:100%;aspect-ratio:1;background:radial-gradient(circle at 28% 18%,#ffffff30,transparent 27%),radial-gradient(circle at 55% 90%,#a8efff18,transparent 58%);color:#103d51;box-shadow:inset 0 0 9px #c6ffff38,0 2px 6px #09384622;font-size:clamp(23px,2.5vw,36px);font-weight:600;cursor:pointer;display:grid;place-items:center;padding:3px;white-space:nowrap;touch-action:manipulation;text-shadow:0 1px 1px #efffff;-webkit-text-stroke:1.2px #eaffff;paint-order:stroke fill}.nb-bubble::before{content:'';position:absolute;left:16%;top:12%;width:35%;height:17%;border-top:3px solid #ffffffb3;border-radius:50%;transform:rotate(-24deg);pointer-events:none}.nb-game .nb-bubble[data-long=true]{font-size:clamp(17px,1.9vw,28px)}.nb-bubble:hover:not([data-found=true]):not(:disabled){border-color:#fff;box-shadow:inset 0 0 13px #e9ffff55,0 2px 6px #09384622}.nb-bubble:active:not([data-found=true]):not(:disabled){transform:scale(.97)}.nb-bubble:focus-visible,.nb-button:focus-visible,.nb-choice:focus-within strong{outline:3px solid #fff4a3;outline-offset:5px}.nb-game .nb-bubble[data-found=true],.nb-game .nb-bubble[data-demogold=true]{background:radial-gradient(circle,#ffe2a122,transparent 72%);border-color:#f3c34a;box-shadow:inset 0 0 15px #ffe28566,0 0 9px #ffd44d30;cursor:default;color:#143a45;-webkit-text-stroke:1.2px #fff0b3}.nb-bubble[data-found=true]::after{content:'✓';position:absolute;right:3%;top:1%;display:grid;place-items:center;background:#173b4b;color:#fff0b3;border:1px solid #efc65d;border-radius:50%;width:26px;height:26px;font-size:18px;text-shadow:none;-webkit-text-stroke:0}.nb-bubble[data-demo=true]{outline:4px solid #f6d46b;outline-offset:4px}
.nb-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding-left:36px}.nb-feedback{margin:0;font-size:19px;line-height:1.2}.nb-next,.nb-demo-skip{flex:none}.nb-button{border:2px solid #e5b959;background:#174643;color:#fff8e8;border-radius:28px;min-height:50px;padding:9px 26px;cursor:pointer;box-shadow:0 3px 8px #12392c35}.nb-game .nb-button,.nb-settings .nb-button{color:#fff8e8;font-size:22px;text-shadow:none}.nb-button:hover{background:#22594f}.nb-button:disabled{opacity:.55;cursor:default}
.nb-settings{margin:auto;display:grid;grid-template-columns:250px minmax(0,1fr);align-content:center;align-items:center;gap:18px 24px;width:min(820px,100%);padding:12px;color:#fff9df;text-shadow:0 2px 4px #103643,1px 0 #103643,-1px 0 #103643,0 -1px #103643;background:none;border:0;border-radius:0;box-shadow:none}.nb-settings h2{grid-column:2;font-size:clamp(28px,3.4vw,40px);margin:0;text-align:center;line-height:1.08}.nb-settings .nb-character{grid-column:1;grid-row:1/5;width:250px;height:290px;max-height:290px;justify-self:center}.nb-settings fieldset{grid-column:2;border:0;margin:0;padding:0;min-width:0}.nb-settings legend{font-size:22px;margin-bottom:12px;text-align:center;width:100%;padding:0}.nb-choices{display:flex;justify-content:center;align-items:start;gap:16px}.nb-choice{flex:1;position:relative;cursor:pointer;text-align:center;display:grid;justify-items:center;align-content:start;gap:8px;padding:0;border:0;background:none;font-size:19px;line-height:1.1}.nb-choice input{position:absolute;opacity:0;width:1px;height:1px}.nb-choice strong{display:grid;place-items:center;width:116px;height:116px;border-radius:50%;background:#b77e3b none center/contain no-repeat;color:#3b2718;font-size:53px;line-height:1;text-shadow:0 1px 1px #ffe5a4;box-shadow:0 5px 10px #133d3133}.nb-choice:has(input:checked) strong{outline:3px solid #ffe692;outline-offset:3px;color:#3b2718;text-shadow:0 1px 1px #ffe5a4}.nb-settings fieldset:last-of-type .nb-choices{gap:24px}.nb-settings fieldset:last-of-type .nb-choice{flex:0}.nb-settings fieldset:last-of-type .nb-choice strong{width:64px;height:64px;font-size:31px}.nb-settings>.nb-button{grid-column:2;justify-self:center;min-width:180px}.nb-hand{position:fixed;pointer-events:none;z-index:9;width:64px;height:78px;object-fit:contain;transform:translate(-20%,-5%)}.nb-result-help{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.nb-dots{display:flex;gap:3px;max-width:180px;flex-wrap:wrap}.nb-dot{width:10px;height:10px;border-radius:50%;background:#fff0b3;box-shadow:0 1px 2px #103643}.nb-fx-layer{position:fixed;inset:0;z-index:8;pointer-events:none;overflow:hidden}.nb-flying-star{position:absolute;width:38px;height:38px;object-fit:contain}.nb-spark{position:absolute;width:7px;height:7px;border-radius:50%;background:#e8b431}
@media(max-width:900px) and (orientation:portrait){.nb-game{gap:7px}.nb-top{gap:8px}.nb-prompt{font-size:20px}.nb-score{font-size:23px}.nb-stage{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:8px}.nb-guide{grid-template-columns:68px auto 75px;gap:8px;justify-content:center;align-items:center}.nb-target{font-size:72px}.nb-guide p{font-size:17px;max-width:130px}.nb-character{width:76px;height:76px}.nb-game .nb-character{max-height:76px}.nb-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:8px;max-height:none}.nb-game .nb-bubble{font-size:25px}.nb-game .nb-bubble[data-long=true]{font-size:17px;letter-spacing:-.03em}.nb-feedback{font-size:17px}.nb-footer{min-height:43px;gap:7px}.nb-button{min-height:44px;padding:7px 16px}.nb-game .nb-button,.nb-settings .nb-button{font-size:18px}.nb-settings{grid-template-columns:140px minmax(0,1fr);padding:8px;gap:19px 8px;max-width:560px}.nb-settings .nb-character{grid-column:1;grid-row:1;width:140px;height:160px;max-height:160px}.nb-settings h2{grid-column:2;font-size:29px;text-align:left;max-width:240px}.nb-settings fieldset,.nb-settings>.nb-button{grid-column:1/-1}.nb-choice{font-size:18px}.nb-choice strong{width:94px;height:94px;font-size:47px}.nb-choices{gap:13px}.nb-settings legend{font-size:22px;margin-bottom:11px}.nb-hand{width:50px;height:60px}}

@media(min-width:701px) and (orientation:portrait){.nb-game .nb-bubble{font-size:32px}.nb-game .nb-bubble[data-long=true]{font-size:25px}.nb-target{font-size:100px}.nb-guide{grid-template-columns:100px auto 110px}.nb-game .nb-character{width:110px;height:110px;max-height:110px}}
@media(max-height:700px) and (orientation:portrait){.nb-settings{grid-template-columns:112px minmax(0,1fr);gap:12px 8px}.nb-settings .nb-character{width:112px;height:112px;max-height:112px}.nb-settings h2{font-size:27px}.nb-settings legend{font-size:20px;margin-bottom:8px}.nb-choice strong{width:86px;height:86px;font-size:43px}.nb-settings fieldset:last-of-type .nb-choice strong{width:58px;height:58px;font-size:29px}}
@media(max-height:650px) and (orientation:landscape){.nb-game{gap:4px}.nb-stage{grid-template-columns:125px minmax(0,1fr);gap:12px}.nb-prompt{font-size:20px}.nb-target{font-size:73px}.nb-character{width:97px;height:97px}.nb-game .nb-character{max-height:97px}.nb-grid{gap:7px}.nb-game .nb-bubble{max-width:100px;font-size:25px}.nb-game .nb-bubble[data-long=true]{font-size:18px}.nb-footer{min-height:38px}.nb-feedback{font-size:16px}.nb-button{min-height:38px;padding:5px 17px}.nb-game .nb-button,.nb-settings .nb-button{font-size:17px}.nb-settings{grid-template-columns:160px minmax(0,1fr);gap:10px;max-width:700px;padding:4px}.nb-settings h2{font-size:26px}.nb-settings .nb-character{width:160px;height:180px;max-height:180px}.nb-choice{font-size:16px;gap:4px}.nb-choice strong{width:74px;height:74px;font-size:37px}.nb-settings legend{font-size:18px;margin-bottom:5px}.nb-settings fieldset:last-of-type .nb-choice strong{width:52px;height:52px;font-size:27px}}
@media(prefers-reduced-motion:reduce){.nb-bubble:active:not([data-found=true]):not(:disabled){transform:none}}



.nb-game .nb-bubble[data-found=true],.nb-game .nb-bubble[data-demogold=true]{border-color:transparent;background:none;box-shadow:none}.nb-bubble[data-found=true]::before,.nb-bubble[data-demogold=true]::before{display:none}.nb-bubble[data-demogold=true][data-demo=true]{outline:none}.nb-bubble[data-demogold=true]::after{content:'✓';position:absolute;right:3%;top:1%;display:grid;place-items:center;background:#173b4b;color:#fff0b3;border:1px solid #efc65d;border-radius:50%;width:26px;height:26px;font-size:18px;text-shadow:none;-webkit-text-stroke:0}.nb-pop-membrane,.nb-pop-arc,.nb-pop-drop{position:absolute;pointer-events:none}.nb-pop-membrane{border:2px solid #eaffffc4;border-radius:50%;background:radial-gradient(circle at 28% 18%,#ffffff26,transparent 35%);box-shadow:inset 0 0 9px #c6ffff38}.nb-pop-arc{border-top:2px solid #ecffffd9;border-radius:50%;opacity:0}.nb-pop-drop{border:1px solid #ddffffa6;border-radius:50%;background:#efffff30;box-shadow:inset 1px 1px 0 #fff9;opacity:0}

.nb-pop-group{position:absolute;inset:0;pointer-events:none}



/* The settings are part of the illustrated clearing, with semantic controls over real soap artwork. */
.nb-settings{--choice-size:150px;--range-size:76px;display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-rows:auto auto auto auto;align-items:center;align-content:center;gap:12px 20px;width:min(750px,100%);max-width:750px;margin:auto;padding:0 12px;background:none;border:0;box-shadow:none;color:#fff5c9;text-shadow:0 2px 4px #103c43,1px 0 #18414b,-1px 0 #18414b}
.nb-settings .nb-character{grid-column:1;grid-row:1;width:240px;height:200px;max-height:200px;justify-self:center;object-fit:contain}
.nb-settings h2{grid-column:2;grid-row:1;margin:0;text-align:left;font-size:clamp(34px,4.5vw,56px);line-height:1.04;max-width:none;color:#fff2b8}
.nb-settings fieldset{border:0;padding:0;margin:0;min-width:0;grid-column:1/-1}
.nb-settings .nb-mode-options{grid-row:2}.nb-settings .nb-limit-options{grid-row:3;display:flex;align-items:center;justify-content:center;gap:18px}
.nb-settings .nb-limit-options legend{float:left;width:auto;margin:0;font-size:25px;line-height:1.1;padding:0}
.nb-settings .nb-choices{display:flex;align-items:start;justify-content:center;gap:30px}
.nb-settings .nb-choice{flex:0;display:grid;justify-items:center;gap:5px;font-size:23px;line-height:1.1;cursor:pointer;background:none;border:0;padding:0;color:#fff4c6}
.nb-settings .nb-choice strong{position:relative;display:grid;place-items:center;width:var(--choice-size);height:var(--choice-size);border:0;border-radius:50%;background:transparent url('assets/choice-bubble.webp') center/contain no-repeat;box-shadow:none;color:#092f45;font-size:74px;line-height:1;text-shadow:0 2px 1px #fff7db;-webkit-text-stroke:1.3px #e8ffff;paint-order:stroke fill;outline:none}
.nb-settings .nb-choice:has(input:checked) strong{color:#092f45;outline:3px solid #ffe090;outline-offset:-6px;filter:drop-shadow(0 3px 5px #123e4966);text-shadow:0 2px 1px #fff7db}
.nb-settings .nb-choice:has(input:checked) strong::after{content:'';position:absolute;right:4%;bottom:6%;width:20px;height:20px;border:3px solid #fff0b3;border-radius:50%;background:#c58d24;box-shadow:0 2px 3px #183a4566}
.nb-settings .nb-choice:focus-within strong{outline:3px solid #fff9dd;outline-offset:3px}
.nb-settings .nb-choice:hover strong{filter:brightness(1.08)}
.nb-settings fieldset:last-of-type .nb-choices{gap:16px}.nb-settings fieldset:last-of-type .nb-choice strong{width:var(--range-size);height:var(--range-size);font-size:40px}
.nb-settings fieldset:last-of-type .nb-choice:has(input:checked) strong::after{width:12px;height:12px;border-width:2px;right:0;bottom:0}
.nb-settings>.nb-settings-play{grid-column:1/-1;grid-row:4;justify-self:center;display:flex;align-items:center;justify-content:center;gap:12px;width:330px;height:110px;min-width:0;min-height:0;padding:12px 38px 16px;border:0;border-radius:0;background:transparent url('assets/play-plaque.webp') center/contain no-repeat;box-shadow:none;color:#fff1b8;font-size:32px;font-weight:600;text-shadow:0 2px 3px #75400c;cursor:pointer}
.nb-settings-play svg{width:28px;height:28px;fill:currentColor;filter:drop-shadow(0 2px 1px #75400c)}.nb-settings>.nb-settings-play:hover{background-color:transparent;filter:brightness(1.08)}
.nb-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(orientation:portrait){.nb-settings{--choice-size:clamp(94px,24vw,150px);--range-size:76px;grid-template-columns:38% 1fr;gap:14px 10px;max-width:620px;padding:0 2px}.nb-settings .nb-character{width:100%;height:200px;max-height:200px}.nb-settings h2{font-size:clamp(28px,6.1vw,42px)}.nb-settings .nb-choices{gap:14px}.nb-settings .nb-choice{font-size:clamp(17px,3.9vw,24px)}.nb-settings .nb-choice strong{font-size:clamp(49px,12vw,72px)}.nb-settings .nb-limit-options legend{font-size:clamp(20px,4vw,25px)}.nb-settings>.nb-settings-play{width:min(340px,90%);height:113px;font-size:32px}}
@media(max-width:450px) and (orientation:portrait){.nb-settings{--choice-size:clamp(88px,24vw,108px);--range-size:62px;gap:10px 8px}.nb-settings .nb-character{height:150px;max-height:150px}.nb-settings .nb-choices{gap:10px}.nb-settings .nb-choice{font-size:17px}.nb-settings .nb-limit-options{gap:10px}.nb-settings .nb-limit-options legend{font-size:20px}.nb-settings fieldset:last-of-type .nb-choice strong{font-size:32px}.nb-settings>.nb-settings-play{width:280px;height:93px;font-size:29px}}
@media(max-height:700px) and (orientation:portrait){.nb-settings{gap:6px 8px;--range-size:55px}.nb-settings .nb-character{height:115px;max-height:115px}.nb-settings h2{font-size:28px}.nb-settings>.nb-settings-play{width:245px;height:82px;font-size:26px}.nb-settings .nb-choice{font-size:16px}.nb-settings fieldset:last-of-type .nb-choice strong{font-size:30px}}
@media(max-height:650px) and (orientation:landscape){.nb-settings{--choice-size:92px;--range-size:52px;grid-template-columns:190px 1fr;gap:4px 12px;max-width:650px}.nb-settings .nb-character{grid-row:1/5;width:190px;height:240px;max-height:240px}.nb-settings h2{grid-column:2;grid-row:1;font-size:28px;text-align:center}.nb-settings .nb-mode-options{grid-column:2;grid-row:2}.nb-settings .nb-limit-options{grid-column:2;grid-row:3;gap:12px}.nb-settings .nb-choices{gap:12px}.nb-settings .nb-choice{font-size:16px}.nb-settings .nb-choice strong{font-size:48px}.nb-settings fieldset:last-of-type .nb-choice strong{font-size:29px}.nb-settings .nb-limit-options legend{font-size:18px}.nb-settings>.nb-settings-play{grid-column:2;grid-row:4;width:230px;height:77px;font-size:24px}}
.nb-settings .nb-choice:has(input:checked) strong::after{background:#c58d24 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4L19 6' fill='none' stroke='%23fff6d5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/82% no-repeat}
.nb-settings .nb-choice span,.nb-settings .nb-limit-options legend{text-shadow:0 2px 3px #17464c}
@media(max-width:450px) and (min-height:701px) and (orientation:portrait){.nb-settings{--choice-size:clamp(98px,27vw,112px);grid-template-columns:46% minmax(0,1fr);margin:20px auto 0;align-self:start;gap:18px 8px}.nb-settings .nb-character{width:180px;max-width:none;height:185px;max-height:185px}.nb-settings h2{font-size:29px}.nb-settings .nb-choices{gap:10px}}
/* Iridescent soap skin: the raster supplies the pearl edge; the centre stays clear. */
.nb-game .nb-bubble:not([data-found=true]):not([data-demogold=true]),.nb-pop-membrane{border-color:transparent;background:url('assets/choice-bubble.webp') center/100% 100% no-repeat,radial-gradient(ellipse at 20% 18%,#ffc6f536,transparent 40%),radial-gradient(ellipse at 82% 70%,#8defff24,transparent 44%);box-shadow:inset 0 0 10px #b8f4ff18;filter:saturate(1.7)}
.nb-game .nb-bubble:not([data-found=true]):not([data-demogold=true])::before{opacity:.25}
.nb-settings .nb-choice strong{background-image:url('assets/choice-bubble.webp'),radial-gradient(ellipse at 20% 18%,#ffc6f536,transparent 42%),radial-gradient(ellipse at 82% 70%,#8defff24,transparent 44%);filter:saturate(1.7)}
.nb-settings .nb-choice:has(input:checked) strong{filter:saturate(1.7) drop-shadow(0 3px 5px #123e4966)}.nb-settings .nb-choice:hover strong{filter:saturate(1.7) brightness(1.08)}
/* Subtraction-only entry: one range choice, no operation selector. */
.nb-settings{grid-template-rows:auto auto auto}.nb-settings .nb-limit-options{grid-row:2}.nb-settings>.nb-settings-play{grid-row:3}
@media(max-height:650px) and (orientation:landscape){.nb-settings .nb-character{grid-row:1/4}.nb-settings .nb-limit-options{grid-row:2}.nb-settings>.nb-settings-play{grid-row:3}}

