/* Brolly Bonbons title screen + first-launch intro (R2-P4, 20 Nov 2026). Sits above the canvas and the HUD (z 15), below the
   sheets and toasts of the shell (.nm, z 20) so Settings opens over it. Motion is transform / opacity only: rain falls DOWN
   inside the window panes, the lamp flickers, the lighthouse winks, the brass cap glints, the logo sweet spins.
   Rules: opaque chunky buttons; hover eases lift and brightness, never swaps fill and text colour; hover, focus and pressed on
   every control; text >= 12 px; tap targets >= 44 px; portrait and landscape from 360 px wide. */
.nt{position:fixed;inset:0;z-index:15;overflow:hidden;pointer-events:auto;background:linear-gradient(#ffd9e2,#ffb3c6 36%,#f0829f 70%,#b84a6c);
  color:#fff3dc;font-family:"Baloo 2","Trebuchet MS","Segoe UI",system-ui,sans-serif;font-weight:700;-webkit-user-select:none;user-select:none;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:opacity .45s ease;
  --nt-top:env(safe-area-inset-top,0px);--nt-bot:env(safe-area-inset-bottom,0px);--nt-l:env(safe-area-inset-left,0px);--nt-r:env(safe-area-inset-right,0px);
  --nt-ink:#2a1d16;--nt-logo-w:min(74vw,40vh,430px);--nt-logo-top:calc(var(--nt-top) + max(58px,8vh))}
.nt.out{opacity:0}
.nt *{box-sizing:border-box}
.nt [hidden]{display:none!important}
.nt button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;margin:0}
.nt img{display:block;-webkit-user-drag:none;pointer-events:none}

/* ---------- key art: a box with the picture's own shape that always covers the screen, so hotspots stay glued to it ---------- */
.nt-art{position:absolute;left:50%;top:50%;width:max(100vw,calc(100vh * var(--ar)));aspect-ratio:var(--ar);transform:translate(-50%,-50%);display:none}
@media (orientation:portrait){.nt-art.p{display:block}}
@media (orientation:landscape){.nt-art.l{display:block}}
.nt-key{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .4s ease}
.nt-key.on{opacity:1}
.nt-key:not(.on)~*{visibility:hidden}
.nt-pane{position:absolute;overflow:hidden;opacity:0;transition:opacity .6s ease}
.nt-key.on~.nt-pane{opacity:1}
.nt-pane i{position:absolute;left:0;right:0;top:-240px;bottom:0;will-change:transform;animation:ntrain .78s linear infinite;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='240'%3E%3Cpath d='M14 8v15M52 96v18M88 30v12M124 150v17M36 178v13M104 204v15M146 60v16M70 142v11M6 118v12' fill='none' stroke='%23e6efff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") 0 0/160px 240px}
.nt-pane i+i{top:-150px;opacity:.55;background-size:100px 150px;background-position:37px 0;animation:ntrain2 1.05s linear infinite}
.nt-pane:nth-child(odd) i{background-position-x:63px}.nt-pane:nth-child(3n) i{animation-delay:-.31s}
@keyframes ntrain{to{transform:translate3d(0,240px,0)}}
@keyframes ntrain2{to{transform:translate3d(0,150px,0)}}
.nt-lamp,.nt-beam,.nt-glint{position:absolute;pointer-events:none;transform:translate(-50%,-50%)}
.nt-lamp{aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,rgba(255,214,130,.5),rgba(255,190,100,.2) 45%,rgba(255,180,90,0));animation:ntlamp 5.2s linear infinite}
@keyframes ntlamp{0%,100%{opacity:.75}8%{opacity:.95}11%{opacity:.6}13%{opacity:.92}38%{opacity:.8}52%{opacity:1}55%{opacity:.7}57%{opacity:.96}80%{opacity:.82}}
.nt-beam{width:9%;aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,rgba(255,240,190,.95),rgba(255,220,150,.35) 40%,rgba(255,220,150,0));animation:ntbeam 4.2s ease-in-out infinite}
@keyframes ntbeam{0%,100%{opacity:.15;transform:translate(-50%,-50%) scale(.6)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.25)}}
.nt-glint{width:7%;aspect-ratio:1;background:#fffbe6;clip-path:polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%);animation:ntglint 3.6s ease-in-out infinite}
@keyframes ntglint{0%,58%,100%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(0)}70%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(40deg)}84%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(80deg)}}
.nt-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(rgba(120,30,64,.5),rgba(120,30,64,.12) 26%,rgba(120,30,64,0) 40%,rgba(90,20,48,0) 60%,rgba(90,20,48,.5))}

/* ---------- logo (same place and size as the loader's, so the hand-over does not jump) ---------- */
.nt-logo{position:absolute;left:50%;top:var(--nt-logo-top);width:var(--nt-logo-w);aspect-ratio:var(--lar,1.418);transform:translateX(-50%);filter:drop-shadow(0 8px 10px rgba(0,0,0,.4));pointer-events:none}
.nt-logo .lg{width:100%;height:100%}
.nt-logo .nut{position:absolute;aspect-ratio:1;transform:translate(-50%,-50%)}
.nt-logo .nut img{width:100%;height:100%;animation:ntspin 4.4s cubic-bezier(.45,0,.2,1) infinite}
@keyframes ntspin{0%,55%{transform:rotate(0)}92%,100%{transform:rotate(360deg)}}
.nt-logo h1{display:none;margin:0;font-size:min(15vw,9vh,72px);line-height:.95;text-align:center;color:#ffd84d;text-shadow:0 .06em 0 #b9801f,0 .14em 0 var(--nt-ink),0 .2em .3em rgba(0,0,0,.5)}
.nt-logo.txt{aspect-ratio:auto}.nt-logo.txt h1{display:block}.nt-logo.txt .lg,.nt-logo.txt .nut{display:none}

/* ---------- controls ---------- */
.nt-top{position:absolute;left:calc(12px + var(--nt-l));right:calc(12px + var(--nt-r));top:calc(10px + var(--nt-top));display:flex;justify-content:space-between;gap:10px;pointer-events:none}
.nt-top>*{pointer-events:auto}
.nt-lw{position:relative}
.nt-rb{width:48px;height:48px;padding:0;display:grid;place-items:center;border:2.5px solid var(--nt-ink);border-radius:50%;background:linear-gradient(#fff8e6,#f3deb0);color:var(--nt-ink);
  font-size:16px;font-weight:800;letter-spacing:.02em;line-height:1;box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 rgba(185,128,31,.35),0 4px 0 var(--nt-ink),0 9px 12px rgba(0,0,0,.35);
  transition:transform .16s cubic-bezier(.3,.7,.3,1),filter .16s ease,box-shadow .16s ease}
.nt-rb svg{display:block}
@media (hover:hover){.nt-rb:hover{transform:translateY(-2px);filter:brightness(1.05);box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 rgba(185,128,31,.35),0 6px 0 var(--nt-ink),0 12px 14px rgba(0,0,0,.35)}}
.nt-rb:active,.nt-rb.is-down{transform:translateY(3px);box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 rgba(185,128,31,.35),0 1px 0 var(--nt-ink),0 3px 6px rgba(0,0,0,.35)}
.nt button:focus-visible{outline:3px solid #fff3dc;outline-offset:3px}
.nt-langs{position:absolute;left:0;top:58px;z-index:3;width:176px;padding:8px;display:grid;gap:6px;border:2.5px solid var(--nt-ink);border-radius:18px;background:linear-gradient(#fff8e6,#f6e4bb);
  box-shadow:inset 0 2px 0 #fff,0 5px 0 var(--nt-ink),0 14px 22px rgba(0,0,0,.45);transform-origin:24px 0;animation:ntpop .18s cubic-bezier(.3,1.4,.5,1) both}
.nt-langs button{min-height:44px;padding:6px 14px;border:2px solid #dcc08a;border-radius:12px;background:#fffaf0;color:var(--nt-ink);font-size:17px;text-align:left;display:flex;align-items:center;justify-content:space-between;
  transition:transform .14s ease,filter .14s ease,border-color .14s ease}
.nt-langs button[aria-checked=true]{background:linear-gradient(#ffe487,#f6c63e);border-color:var(--nt-ink)}
.nt-langs button[aria-checked=true]:after{content:"";width:9px;height:15px;margin-right:4px;border:solid var(--nt-ink);border-width:0 3.5px 3.5px 0;transform:rotate(42deg) translateY(-2px)}
@media (hover:hover){.nt-langs button:hover{transform:translateY(-1px);filter:brightness(1.04);border-color:#b9801f}}
.nt-langs button:active,.nt-langs button.is-down{transform:translateY(2px);filter:brightness(.96)}
@keyframes ntpop{from{opacity:0;transform:scale(.85)}}

.nt-cta{position:absolute;left:0;right:0;bottom:calc(max(26px,5.5vh) + var(--nt-bot));display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:none}
.nt-play{pointer-events:auto;position:relative;overflow:hidden;width:min(76vw,330px);min-height:78px;padding:6px 20px 9px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border:3px solid var(--nt-ink);border-radius:24px;background:linear-gradient(#ffe98f,#f9cb44 52%,#eeab2a);color:var(--nt-ink);
  box-shadow:inset 0 3px 0 rgba(255,255,255,.7),inset 0 -6px 0 rgba(176,106,12,.42),0 7px 0 var(--nt-ink),0 16px 24px rgba(0,0,0,.5);
  transition:transform .16s cubic-bezier(.3,.7,.3,1),filter .16s ease,box-shadow .16s ease;animation:ntbreath 1.9s ease-in-out infinite}
.nt-play b{font-size:34px;font-weight:800;line-height:1;letter-spacing:.04em;text-transform:uppercase;text-shadow:0 2px 0 rgba(255,255,255,.45)}
.nt-play small{font-size:16px;line-height:1.15;opacity:.82}
.nt-play:after{content:"";position:absolute;top:-20%;bottom:-20%;left:0;width:34%;background:linear-gradient(100deg,rgba(255,255,255,0),rgba(255,255,255,.55),rgba(255,255,255,0));transform:translateX(-140%) skewX(-18deg);animation:ntsweep 3.4s ease-in-out infinite;pointer-events:none}
@keyframes ntbreath{0%,100%{scale:1}50%{scale:1.035}}
@keyframes ntsweep{0%,62%{transform:translateX(-140%) skewX(-18deg)}100%{transform:translateX(420%) skewX(-18deg)}}
@media (hover:hover){.nt-play:hover{transform:translateY(-3px);filter:brightness(1.05);box-shadow:inset 0 3px 0 rgba(255,255,255,.7),inset 0 -6px 0 rgba(176,106,12,.42),0 10px 0 var(--nt-ink),0 20px 26px rgba(0,0,0,.5)}}
.nt-play:active,.nt-play.is-down{transform:translateY(5px);filter:brightness(.97);box-shadow:inset 0 3px 0 rgba(255,255,255,.6),inset 0 -4px 0 rgba(176,106,12,.42),0 2px 0 var(--nt-ink),0 5px 8px rgba(0,0,0,.45)}
.nt-hint{margin:0;font-size:15px;line-height:1.2;letter-spacing:.03em;color:#fff3dc;text-shadow:0 2px 0 rgba(30,14,8,.85),0 0 10px rgba(30,14,8,.8);animation:nthint 2.2s ease-in-out infinite}
@keyframes nthint{0%,100%{opacity:.6}50%{opacity:1}}
/* entrance, once the picture is in */
.nt-top,.nt-cta{opacity:0}
.nt.on .nt-top{animation:ntfade .4s ease .35s both}
.nt.on .nt-cta{animation:ntrise .5s cubic-bezier(.3,1.3,.5,1) .4s both}
@keyframes ntfade{from{opacity:0}to{opacity:1}}
@keyframes ntrise{from{opacity:0;transform:translateY(26px)}to{opacity:1;transform:none}}

/* ---------- first-launch intro: the logo drops in, four jelly sweets hop into a box, with a shine ---------- */
.nt.intro .nt-top,.nt.intro .nt-cta{animation:ntgone .25s ease both;pointer-events:none}
.nt.intro .nt-top>*,.nt.intro .nt-play{pointer-events:none}
@keyframes ntgone{to{opacity:0;visibility:hidden}}
.nt.intro .nt-logo{z-index:2;animation:ntlogo .75s cubic-bezier(.3,1.5,.5,1) both}
@keyframes ntlogo{0%{transform:translate(-50%,-140%) rotate(-7deg)}60%{transform:translate(-50%,5%) rotate(1.5deg)}100%{transform:translateX(-50%)}}
.nt-intro{position:absolute;inset:0;z-index:1}
.nt-veil{position:absolute;inset:0;background:radial-gradient(60% 42% at 50% 58%,rgba(104,56,36,.5),rgba(40,20,24,.66) 70%,rgba(26,12,16,.8));animation:ntfade .35s ease both}
.nt-stage{position:absolute;left:50%;top:calc(var(--nt-logo-top) + var(--nt-logo-w) / 1.418 + 2vh);width:4.4em;height:12.2em;margin-left:-2.2em;
  font-size:min(calc((100vh - var(--nt-logo-top) - var(--nt-logo-w) / 1.418 - 150px - var(--nt-bot)) / 12.2),8.5vw,44px);animation:ntstage .5s cubic-bezier(.3,1.2,.5,1) .1s both}
@keyframes ntstage{from{opacity:0;transform:translateY(3em)}}
.nt-stage img{position:absolute;left:0}
.nt-floor{position:absolute;left:-1.3em;right:-1.3em;bottom:-.25em;height:1.5em;border-radius:50%;background:radial-gradient(closest-side,rgba(10,4,2,.6),rgba(10,4,2,0))}
.nt-bolt{left:.06em!important;top:.55em;width:4.28em;height:11.65em}
.nt-nb,.nt-nf{width:4.6em;height:3.62em;left:-.1em!important;top:calc(7.9em - var(--k) * 1.72em);animation:ntnut .62s linear calc(.55s + var(--k) * .46s) both}
@keyframes ntnut{0%{opacity:0;transform:translateY(-11em) scaleX(1)}8%{opacity:1}14%{transform:translateY(-9em) scaleX(.87)}28%{transform:translateY(-7em) scaleX(1)}42%{transform:translateY(-5em) scaleX(.87)}56%{transform:translateY(-3em) scaleX(1)}68%{transform:translateY(-1.2em) scaleX(.9)}
  78%{opacity:1;transform:translateY(0) scale(1.05,.9)}90%{transform:translateY(-.12em) scale(.98,1.03)}100%{opacity:1;transform:none}}
.nt-cap{width:4.4em;height:4.18em;top:-.25em;transform-origin:50% 100%;animation:ntcap .5s cubic-bezier(.5,0,.9,.6) 2.55s both}
@keyframes ntcap{0%{opacity:0;transform:translateY(-8em)}15%{opacity:1}72%{transform:translateY(0) scale(1.08,.86)}86%{transform:translateY(-.2em) scale(.97,1.04)}100%{opacity:1;transform:none}}
.nt-rays{position:absolute;left:50%;top:1.8em;width:13em;height:13em;margin:-6.5em 0 0 -6.5em;border-radius:50%;opacity:0;
  background:repeating-conic-gradient(rgba(255,226,140,.6) 0 9deg,rgba(255,226,140,0) 9deg 30deg);-webkit-mask:radial-gradient(closest-side,#000 25%,transparent 96%);mask:radial-gradient(closest-side,#000 25%,transparent 96%);
  animation:ntrays 2.6s ease-out 2.95s both}
@keyframes ntrays{0%{opacity:0;transform:scale(.3) rotate(0)}18%{opacity:1;transform:scale(1) rotate(14deg)}100%{opacity:.55;transform:scale(1.06) rotate(80deg)}}
.nt-spark{position:absolute;width:1.5em;height:1.5em;background:#fffbe6;clip-path:polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%);opacity:0;animation:ntspark .8s ease-out both}
.nt-spark.s1{left:3.2em;top:.2em;animation-delay:2.98s}.nt-spark.s2{left:-.9em;top:1.6em;width:1.1em;height:1.1em;animation-delay:3.16s}.nt-spark.s3{left:4.3em;top:3em;width:.9em;height:.9em;animation-delay:3.3s}
@keyframes ntspark{0%{opacity:0;transform:scale(.2) rotate(0)}40%{opacity:1;transform:scale(1.25) rotate(50deg)}100%{opacity:0;transform:scale(.4) rotate(110deg)}}
.nt-line{position:absolute;left:20px;right:20px;bottom:calc(max(64px,10vh) + var(--nt-bot));margin:0;text-align:center;font-size:clamp(22px,6.4vw,30px);font-weight:800;line-height:1.15;color:#ffe487;
  text-shadow:0 2px 0 #7a4a1c,0 4px 0 rgba(30,14,8,.8),0 0 18px rgba(30,14,8,.6);animation:ntrise .5s cubic-bezier(.3,1.3,.5,1) 3.05s both}
.nt-line span{display:block}
.nt-skip{position:absolute;left:0;right:0;bottom:calc(max(18px,3vh) + var(--nt-bot));margin:0;text-align:center;font-size:14px;letter-spacing:.04em;color:#fff3dc;opacity:.75;animation:ntfade .4s ease .9s both}

/* ---------- landscape phones: logo and PLAY in the calm left part of the picture, the bench stays visible on the right ---------- */
@media (orientation:landscape) and (max-height:560px){
  .nt{--nt-logo-w:min(35vw,74vh,400px);--nt-logo-top:calc(var(--nt-top) + max(8px,3vh))}
  .nt-shade{background:linear-gradient(90deg,rgba(120,30,64,.5),rgba(120,30,64,.25) 34%,rgba(120,30,64,0) 52%),linear-gradient(rgba(90,20,48,0) 70%,rgba(90,20,48,.35))}
  .nt-logo{left:calc(25vw + var(--nt-l))}
  .nt-top{justify-content:flex-end}
  .nt-langs{left:auto;right:0;transform-origin:calc(100% - 24px) 0;grid-template-columns:1fr 1fr;width:300px}
  .nt-cta{left:var(--nt-l);right:auto;width:50vw;bottom:calc(max(10px,3vh) + var(--nt-bot));gap:6px}
  .nt-play{width:min(36vw,300px);min-height:62px;padding:3px 16px 7px;border-radius:20px}
  .nt-play b{font-size:27px}.nt-play small{font-size:14px}
  .nt-hint{font-size:13px}
  .nt-veil{background:radial-gradient(40% 70% at 70% 55%,rgba(104,56,36,.93),rgba(40,20,24,.96) 70%,rgba(26,12,16,.97))}
  .nt-stage{left:calc(70vw - var(--nt-r));top:calc(var(--nt-top) + 9vh);font-size:min(calc((78vh - var(--nt-top) - var(--nt-bot)) / 12.2),40px)}
  .nt-line{left:var(--nt-l);right:auto;width:50vw;padding:0 16px;bottom:calc(max(40px,13vh) + var(--nt-bot));font-size:clamp(19px,3.1vw,26px)}
  .nt-skip{left:var(--nt-l);right:auto;width:50vw;bottom:calc(max(10px,3vh) + var(--nt-bot))}
}
@media (max-height:640px) and (orientation:portrait){.nt{--nt-logo-w:min(64vw,34vh,430px);--nt-logo-top:calc(var(--nt-top) + 54px)}.nt-play{min-height:68px}.nt-play b{font-size:29px}}
@media (prefers-reduced-motion:reduce){
  .nt,.nt-key{transition:none}
  .nt *,.nt *:before,.nt *:after{animation-duration:.01s!important;animation-delay:0s!important;animation-iteration-count:1!important}
  .nt-pane i,.nt-glint,.nt-rays,.nt-spark{display:none}
}
/* Brolly Bonbons intro: four code-made jelly sweets hop into a candy box (no pictures needed) */
.nt-stage.nt-code{width:15em;height:9em;margin-left:-7.5em;top:calc(var(--nt-logo-top) + var(--nt-logo-w) / 1.418 + 4vh)}
.nt-box{position:absolute;left:0;right:0;bottom:0;height:3.2em;border:.2em solid #4a2d36;border-radius:.7em;background:repeating-linear-gradient(90deg,#fff5e4 0 1.2em,#ffc7d4 1.2em 2.4em);box-shadow:0 .3em 0 rgba(74,45,54,.35)}
.nt-box i{position:absolute;left:-.2em;right:-.2em;top:-.2em;height:.8em;border-radius:.5em .5em 0 0;background:#e9759a;border:.2em solid #4a2d36}
.nt-sw{position:absolute;width:3.2em;left:calc(var(--k) * 3.6em + .4em);bottom:2.2em;opacity:0;animation:ntsw .9s cubic-bezier(.3,1.35,.5,1) both;animation-delay:calc(.55s + var(--k) * .46s)}
@keyframes ntsw{0%{transform:translateY(-9em) scale(.8,1.2);opacity:0}55%{opacity:1}100%{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.nt-sw{animation:none;opacity:1}}

/* no key art yet: the code-made sweets + box sit under the title as a still picture */
.nt .nt-stage.nt-code.still{position:absolute;left:50%;top:44%;font-size:min(3.6vh,16px);pointer-events:none;z-index:1}
.nt .nt-stage.nt-code.still .nt-sw{opacity:1;animation:ntbob 2.4s ease-in-out infinite;animation-delay:calc(var(--k)*.25s)}
@keyframes ntbob{50%{transform:translateY(-.7em)}}
.nt .nt-stage.nt-code.still .nt-rays,.nt .nt-stage.nt-code.still .nt-spark{display:none}
