/* Brolly Bonbons level transition (R2-P10, 20 Nov 2026): a striped umbrella-canopy shutter. Two opaque panels meet in the middle
   (scalloped canopy hem + brass rail), a brass nut with the level number screws in, then they part. Above the map and the win
   card (.nm, z 20), below toasts (z 40). Motion is transform / opacity only, no filters; hidden (display none) when idle. */
.nx{position:fixed;inset:0;z-index:30;overflow:hidden;pointer-events:auto;font-family:"Baloo 2","Trebuchet MS","Segoe UI",system-ui,sans-serif;font-weight:800;
  -webkit-user-select:none;user-select:none;touch-action:none;--nx-t:.3s;--nx-hem:22px}
.nx[hidden]{display:none}
.nx.open{pointer-events:none;--nx-t:.38s}
.nx.quick{--nx-t:.26s}.nx.quick.open{--nx-t:.34s}
.nx-p{position:absolute;left:0;right:0;height:calc(50% + 1px);will-change:transform;transition:transform var(--nx-t) cubic-bezier(.55,.05,.3,1);
  background:repeating-linear-gradient(90deg,#c9463a 0 44px,#f6e7c8 44px 88px)}
.nx.open .nx-p{transition-timing-function:cubic-bezier(.6,0,.75,.3)}
.nx-a{top:0;transform:translate3d(0,calc(-100% - var(--nx-hem) - 8px),0);box-shadow:inset 0 60px 60px -30px rgba(60,14,20,.45)}
.nx-b{bottom:0;transform:translate3d(0,calc(100% + 16px),0);box-shadow:inset 0 -60px 60px -30px rgba(60,14,20,.45)}
.nx.shut .nx-p{transform:translate3d(0,0,0)}
/* the upper canopy's hem: scallops in the same stripes hanging over a brass rail on the lower panel */
.nx-a i{position:absolute;left:0;right:0;top:100%;height:var(--nx-hem);margin-top:-1px;
  background:radial-gradient(circle at 22px 0,#c9463a 21px,rgba(0,0,0,0) 22px) 0 0/88px 100% repeat-x,radial-gradient(circle at 22px 0,#f6e7c8 21px,rgba(0,0,0,0) 22px) 44px 0/88px 100% repeat-x}
.nx-a::after{content:"";position:absolute;left:0;right:0;bottom:0;height:8px;background:linear-gradient(rgba(60,14,20,0),rgba(60,14,20,.28))}
.nx-b i{position:absolute;left:0;right:0;top:0;height:12px;background:linear-gradient(#ffe9a6,#f0bb48 45%,#b97c1c);box-shadow:0 3px 0 rgba(60,14,20,.25)}
/* the wrapped-candy badge with the level number */
.nx-mid{position:absolute;left:50%;top:50%;width:0;height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.nx-nut{flex:none;width:104px;height:104px;display:grid;place-items:center;opacity:0;transform:scale(.25) rotate(-200deg);
  transition:transform .26s cubic-bezier(.3,1.5,.5,1) .12s,opacity .12s linear .12s;
  position:relative;filter:drop-shadow(0 3px 0 rgba(74,45,54,.4))}
.nx-nut:before{content:"";position:absolute;left:0;right:0;top:20%;bottom:20%;background:linear-gradient(#ffd0dc,#f06faa);clip-path:polygon(0 0,33% 38%,67% 38%,100% 0,100% 100%,67% 62%,33% 62%,0 100%)}
.nx-nut b{position:relative;display:grid;place-items:center;width:68px;height:68px;border-radius:50%;background:#4a2d36;color:#fff3dc;font-size:34px;line-height:1;
  box-shadow:inset 0 4px 0 rgba(0,0,0,.3),0 0 0 6px #f06faa,0 0 0 9px #4a2d36}
.nx-nut b.long{font-size:27px}
.nx-nut b.mk svg{display:block;width:40px;height:40px}
.nx.shut .nx-nut{opacity:1;transform:scale(1) rotate(0)}
.nx.open .nx-nut{opacity:0;transform:scale(.4) rotate(160deg);transition:transform .2s cubic-bezier(.6,0,.9,.4),opacity .16s linear .04s}
.nx-plate{flex:none;max-width:min(86vw,420px);padding:8px 18px 9px;border-radius:14px;background:linear-gradient(#fbdc86,#f0bb48);color:#3a2015;
  font-size:20px;line-height:1.15;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 0 #b97c1c,0 8px 14px rgba(40,10,10,.35);
  opacity:0;transform:translate3d(0,14px,0);transition:transform .22s cubic-bezier(.3,1.4,.5,1) .2s,opacity .14s linear .2s}
.nx-plate[hidden]{display:none}
.nx.shut .nx-plate{opacity:1;transform:none}
.nx.open .nx-plate{opacity:0;transition:opacity .14s linear}
.nx.big .nx-mid{transform:translateY(-8px)}
@media (max-height:440px){.nx-nut{width:84px;height:84px}.nx-nut b{width:54px;height:54px;font-size:27px}.nx-nut b.long{font-size:22px}.nx-plate{font-size:17px;padding:6px 14px 7px}.nx-mid{gap:8px}}
/* reduced motion: one flat panel fades in and out, nothing travels or spins */
.nx.rm .nx-p{transform:none;opacity:0;transition:opacity .15s linear}
.nx.rm .nx-a i{display:none}
.nx.rm.shut .nx-p{opacity:1}
.nx.rm .nx-nut,.nx.rm .nx-plate{transform:none;transition:opacity .12s linear}
.nx.rm.open .nx-nut{transform:none}
