/* Brolly Barges level transition (R5, 21 Nov 2026): HARBOUR LOCK GATES. Two oak gates (planks, brass straps and rivets, water line at the
   foot) slide shut from the sides, a lifebuoy with the level number drops in on the seam, a little tug crosses with a bow wave, then the
   gates 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[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;top:0;bottom:0;width:calc(50% + 1px);will-change:transform;transition:transform var(--nx-t) cubic-bezier(.55,.05,.3,1);
  background:
    linear-gradient(#e8c27a 0 0) 0 14% /100% 14px no-repeat,
    linear-gradient(#e8c27a 0 0) 0 74% /100% 14px no-repeat,
    linear-gradient(0deg,#2f8fb0 0,#4db3cc 12%,rgba(0,0,0,0) 12.5%),
    repeating-linear-gradient(90deg,#a8672f 0 38px,#7b4a22 38px 41px,#b97836 41px 79px,#7b4a22 79px 82px)}
.nx-a{left:0;transform:translate3d(-104%,0,0);box-shadow:inset -10px 0 14px -6px rgba(40,18,6,.5),inset 0 -2px 0 #1f6f8c}
.nx-b{right:0;transform:translate3d(104%,0,0);box-shadow:inset 10px 0 14px -6px rgba(40,18,6,.5)}
.nx.open .nx-p{transition-timing-function:cubic-bezier(.6,0,.75,.3)}
.nx.shut .nx-p{transform:translate3d(0,0,0)}
/* brass rivets along the two straps, and a brass post on each gate's meeting edge */
.nx-p i{position:absolute;inset:0;background:
    radial-gradient(circle,#ffe9a6 0 2px,#b97c1c 3px,rgba(0,0,0,0) 4px) 0 calc(14% + 7px)/30px 14px repeat-x,
    radial-gradient(circle,#ffe9a6 0 2px,#b97c1c 3px,rgba(0,0,0,0) 4px) 0 calc(74% + 7px)/30px 14px repeat-x}
.nx-a i::after,.nx-b i::after{content:"";position:absolute;top:0;bottom:0;width:14px;background:linear-gradient(90deg,#b97c1c,#ffe9a6 45%,#b97c1c)}
.nx-a i::after{right:0}.nx-b i::after{left:0}
/* a bright water line on the foot of both gates */
.nx-p::after{content:"";position:absolute;left:0;right:0;bottom:12%;height:5px;background:rgba(255,255,255,.7)}
/* the tug: crosses once while the gates are shut (and keeps going as they part) */
.nx-tug{position:absolute;left:0;bottom:12%;width:120px;height:64px;margin-bottom:-6px;opacity:0;transform:translate3d(-150px,0,0);will-change:transform}
.nx-tug svg{display:block;width:100%;height:100%}
.nx-wave{position:absolute;right:-6px;bottom:-4px;width:150px;height:14px;border-radius:50%;background:radial-gradient(ellipse at 70% 50%,#fff 0,rgba(255,255,255,.85) 40%,rgba(255,255,255,0) 72%)}
.nx.shut .nx-tug,.nx.open .nx-tug{opacity:1;transform:translate3d(calc(100vw + 40px),0,0);transition:transform .62s cubic-bezier(.35,.1,.6,.95) .06s,opacity .05s linear .06s}
.nx.quick.shut .nx-tug,.nx.quick.open .nx-tug{transition-duration:.5s}
.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}
/* the lifebuoy with the level number (or the Home / Restart icon) */
.nx-nut{flex:none;width:108px;height:108px;display:grid;place-items:center;border-radius:50%;opacity:0;transform:translate3d(0,-40px,0) scale(.3) rotate(-120deg);
  transition:transform .28s cubic-bezier(.3,1.5,.5,1) .1s,opacity .12s linear .1s;
  background:repeating-conic-gradient(from 22deg,#e0524a 0 45deg,#fff3dc 45deg 90deg);border:4px solid #3a2634;box-shadow:0 5px 0 rgba(40,18,6,.45)}
.nx-nut b{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:#3a2634;color:#fff3dc;font-size:32px;line-height:1;
  border:3px solid #fff3dc;box-shadow:inset 0 3px 0 rgba(0,0,0,.35)}
.nx-nut b.long{font-size:25px}
.nx-nut b.mk svg{display:block;width:36px;height:36px}
.nx.shut .nx-nut{opacity:1;transform:none}
.nx.open .nx-nut{opacity:0;transform:translate3d(0,-30px,0) scale(.5) rotate(90deg);transition:transform .2s cubic-bezier(.6,0,.9,.4),opacity .16s linear .04s}
/* the district name hangs from the lifebuoy on an oak plank */
.nx-plate{flex:none;max-width:min(86vw,420px);padding:8px 18px 9px;border-radius:10px;background:linear-gradient(#c58a46,#a8672f);color:#fff3dc;border:3px solid #5a3417;
  font-size:20px;line-height:1.15;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 4px 0 #5a3417,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(-14px)}
@media (max-height:440px){.nx-nut{width:84px;height:84px}.nx-nut b{width:48px;height:48px;font-size:25px}.nx-nut b.long{font-size:20px}.nx-nut b.mk svg{width:28px;height:28px}.nx-plate{font-size:17px;padding:6px 14px 7px}.nx-mid{gap:8px}.nx-tug{width:92px;height:49px}}
/* reduced motion: the gates fade in and out, nothing travels */
.nx.rm .nx-p{transform:none;opacity:0;transition:opacity .15s linear}
.nx.rm.shut .nx-p{opacity:1}
.nx.rm .nx-tug{display:none}
.nx.rm .nx-nut,.nx.rm .nx-plate{transform:none;transition:opacity .12s linear}
.nx.rm.open .nx-nut{transform:none}
