/* Brolly Buses screen transition (r10, 21 Nov 2026): a double-decker drives in from the right pulling a rainy-dusk blind with a road;
   a round bus-stop sign shows the level number (or a house / an arrow); then the blind runs on out to the left. Above the map, HUD and
   cards (.jm, z 10), below toasts and the tutorial (z 40). Transform / opacity only, no filters; display none when idle. */
.bx{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:700;
  -webkit-user-select:none;user-select:none;touch-action:none;--t:.3s;--bh:min(30vh,210px);--bw:calc(var(--bh) * 1.774);--road:68%}
.bx[hidden]{display:none}
.bx.open{pointer-events:none;--t:.38s}
.bx.quick{--t:.26s}.bx.quick.open{--t:.34s}
.bx-run{position:absolute;top:0;bottom:0;left:0;width:calc(100vw + var(--bw));will-change:transform;transform:translate3d(100vw,0,0);
  transition:transform var(--t) cubic-bezier(.5,.05,.3,1)}
.bx.shut .bx-run{transform:translate3d(calc(-1 * var(--bw)),0,0)}
.bx.open .bx-run{transform:translate3d(calc(-100vw - var(--bw) - 40px),0,0);transition-timing-function:cubic-bezier(.6,0,.7,.4)}
/* the blind: dusk over the bay, rain, one soft lamp glow; its leading edge is the back of the bus */
.bx-p{position:absolute;top:0;bottom:0;left:calc(var(--bw) - 6px);width:calc(100vw + 46px);overflow:hidden;
  background:radial-gradient(60% 30% at 50% 40%,rgba(255,214,120,.22),rgba(255,214,120,0) 70%),linear-gradient(#22304d,#34476c 55%,#2b3a55)}
.bx-rain{position:absolute;inset:-20% 0 0;opacity:.28;background:repeating-linear-gradient(102deg,rgba(255,255,255,.55) 0 1.2px,transparent 1.2px 23.5px)}
/* the road the bus drives on: kerb, asphalt, dashed centre line; runs under the bus and the whole blind */
.bx-road{position:absolute;left:0;right:0;top:var(--road);height:clamp(54px,9vh,84px);
  background:linear-gradient(#f6cf6b 0 5px,#2a1d16 5px 8px,transparent 8px),linear-gradient(transparent calc(50% - 2px),rgba(255,243,220,.85) calc(50% - 2px) calc(50% + 2px),transparent calc(50% + 2px)) 0 0/46px 100% repeat-x,linear-gradient(#4b4f5c,#3c404c)}
.bx-road::after{content:"";position:absolute;left:0;right:0;bottom:0;height:8px;background:linear-gradient(#2a1d16 0 3px,#d9cdb4 3px)}
.bx-bus{position:absolute;left:0;top:calc(var(--road) + clamp(54px,9vh,84px) * .55 - var(--bh) * .935);width:var(--bw);height:var(--bh)}
.bx-bus svg{display:block;width:100%;height:100%}
/* the bus-stop sign with the level number */
.bx-mid{position:absolute;left:50%;top:40%;width:0;height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.bx-sign{position:relative;flex:none;width:112px;height:112px;border-radius:50%;display:grid;place-items:center;opacity:0;transform:translate3d(0,-26px,0) scale(.4);
  transition:transform .26s cubic-bezier(.3,1.5,.5,1) .12s,opacity .12s linear .12s;
  background:radial-gradient(circle,#fff3dc 0 58%,#2a1d16 58% 61%,#d85a3c 61% 88%,#2a1d16 88%);box-shadow:0 5px 0 rgba(26,16,10,.45),0 10px 18px rgba(0,0,0,.3)}
.bx-sign::after{content:"";position:absolute;left:50%;top:100%;width:10px;height:calc(28vh - 50px);margin-left:-5px;border:3px solid #2a1d16;border-top:0;border-radius:0 0 4px 4px;
  background:linear-gradient(90deg,#c3ced8,#8794a3);z-index:-1}
.bx-sign b{display:grid;place-items:center;color:#2a1d16;font-size:40px;line-height:1;margin-top:2px}
.bx-sign b.long{font-size:31px}
.bx-sign b.mk svg{display:block;width:46px;height:46px}
.bx.shut .bx-sign{opacity:1;transform:none}
.bx.open .bx-sign{opacity:0;transform:translate3d(0,-20px,0) scale(.6);transition:transform .2s cubic-bezier(.6,0,.9,.4),opacity .16s linear .04s}
.bx-plate{flex:none;margin-top:58px;max-width:min(86vw,420px);padding:8px 18px 10px;border-radius:14px;border:2.5px solid #2a1d16;background:linear-gradient(#fbdc86,#f0bb48);color:#2a1d16;
  font-size:20px;line-height:1.15;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:inset 0 -4px 0 #c98f22,0 4px 0 rgba(26,16,10,.5);
  opacity:0;transform:translate3d(0,14px,0);transition:transform .22s cubic-bezier(.3,1.4,.5,1) .2s,opacity .14s linear .2s}
.bx-plate[hidden]{display:none}
.bx.shut .bx-plate{opacity:1;transform:none}
.bx.open .bx-plate{opacity:0;transition:opacity .14s linear}
@media (max-height:440px){.bx{--road:70%}.bx-mid{top:36%}.bx-sign{width:86px;height:86px}.bx-sign b{font-size:31px}.bx-sign b.long{font-size:25px}.bx-sign::after{height:calc(34vh - 40px)}.bx-plate{font-size:17px;margin-top:34px;padding:6px 14px 7px}}
/* reduced motion: the blind fades in and out where it stands, nothing travels */
.bx.rm .bx-run{transform:translate3d(calc(-1 * var(--bw)),0,0);opacity:0;transition:opacity .15s linear}
.bx.rm.shut .bx-run{opacity:1}
.bx.rm .bx-bus{display:none}
.bx.rm .bx-sign,.bx.rm .bx-plate{transform:none;transition:opacity .12s linear}
