/* Lobby pieces (Crusaders UI kit; front-door pass 2026-10-22): the heraldic title lockup and Press Enter plate, the plaza
   on the camera with its light, the plaza corners, the online chip and the tapestry Esc menu with its Gilt Selector.
   Load after theme.css, tokens.css and menus.css. Markup and wiring: lobby-menu.js; plaza hooks: source/lobby-plaza.mjs.
   .cu-press-screen, .cu-lobbyhud and .cu-pause are size containers, so every tier below follows the stage, not the
   viewport: compact <=640 wide, medium <=1040 wide or <=700 tall, small <=620 tall, short <=500 tall and >=500 wide (press) or <=600 tall (Esc menu). Keyframes are prefixed lm- and pz-.
   Rules here that reach into other packages' markup, on the three front-door screens only: the P3 top bar (.cu-topbar)
   slides away; the P4 world layers (.cu-backdrop) pan for the press camera, pause their drift and take the depth-of-field
   blur behind the Esc menu (driven by .cu-pause[data-dof], which lobby-menu.js steps in after the camera lands, via :has()).
   Without :has() the menu still works; only the background blur is lost. */

/* Fallbacks for the tokens.css opt-in classes, at zero specificity: tokens.css wins wherever it is loaded */
:where(.cu-stage,.cu-lobbyhud,.cu-press-screen,.cu-pause) :where(kbd){display:inline-block;padding:2px 5px;font:400 var(--cu-fs-label-min,12px)/12px var(--ui-body);letter-spacing:1px;text-transform:uppercase;color:#231a2e;background:#fff3cd;border:2px solid #231a2e;box-shadow:0 2px 0 #231a2e;text-shadow:none;white-space:nowrap}
:where(.cu-pause-sel){position:absolute;left:0;right:0;pointer-events:none;background:linear-gradient(90deg,#f4c67b40,#f4c67b18 55%,#f4c67b00);box-shadow:inset 6px 0 #f4c67b;transition:top .18s cubic-bezier(.2,.9,.3,1.3),height .18s cubic-bezier(.2,.9,.3,1.3)}
:where(.cu-stub){background:repeating-linear-gradient(135deg,#efe0b6 0 6px,#e6d3a2 6px 12px);border:2px dashed #8a7560;color:#5e4e40;text-shadow:none;box-shadow:none}
:where(.cu-flash){position:absolute;inset:0;z-index:5;background:#fff8e0;opacity:0;pointer-events:none}
:where(.cu-flash.go){animation:lm-flash .12s steps(2) both}
@keyframes lm-flash{0%{opacity:.9}100%{opacity:0}}

/* The top bar stays out of the front door, unreachable by Tab while it is away */
.cu-stage:is([data-screen="press"],[data-screen="lobby"],[data-screen="pause"]) .cu-topbar{transform:translateY(-100%);visibility:hidden;transition:transform .5s var(--cu-ease-out,cubic-bezier(.16,.84,.24,1)),visibility 0s .5s}

/* ---------- Plaza stand-in on the camera (the game draws the real 3D plaza) ---------- */
.cu-plaza{position:absolute;inset:0;z-index:-2;opacity:0;transition:opacity 1s ease;pointer-events:none;container:cu-plaza/size}
.cu-plaza>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;transform-origin:50% 100%;
 transform:translate(calc(var(--vx,0)*-1.2px),calc(var(--vy,0)*-1px)) translate(var(--pzx,0),var(--pzy,0)) scale(var(--pz,1));
 transition:transform var(--cu-t-cam,1.4s) var(--cu-ease-cam,cubic-bezier(.45,.05,.2,1))}
.cu-stage:is([data-screen="press"],[data-screen="lobby"],[data-screen="pause"]) .cu-plaza{opacity:1}
.cu-stage[data-screen="press"]{--pz:.74}
/* title framing: the maypole finial lands just inside the Enter plate (58% - 28px) at every stage shape, and the cast stands
   clear of the stub note. The plaza is drawn xMidYMax slice in a 1280x720 box, so the finial sits 470*scale*pz above the
   floor: max(36.72cqw,65.28cqh)*pz */
.cu-stage[data-screen="press"] .cu-plaza>svg{transform:translate(calc(var(--vx,0)*-1.2px),calc(max(36.72cqw*var(--pz),65.28cqh*var(--pz)) - 42cqh - 8px)) translate(0,0) scale(var(--pz,1))}
/* title framing: the world pans a little so no floating castle sits behind the lockup; it glides with the camera */
.cu-backdrop{transition:transform var(--cu-t-cam,1.4s) var(--cu-ease-cam,cubic-bezier(.45,.05,.2,1))}
.cu-stage[data-screen="press"] .cu-backdrop{transform:translate3d(-6%,12px,0)}
.cu-stage[data-screen="pause"]{--pzx:18%}
/* the world holds still behind the menu: anything that moves under a blur gets re-filtered every frame. The plaza's own
   idle loops stop outright (a paused animation still keeps its own compositor layer, and every layer over it splits up) */
.cu-stage[data-screen="pause"] .cu-backdrop *{animation-play-state:paused}
.cu-stage[data-screen="pause"] .cu-plaza *{animation:none}
/* Depth of field on the Esc menu. wireEscMenu steps data-dof 1..3 on .cu-pause once the camera has landed (60ms apart)
   and back down the moment the menu closes, so a blurred layer is never redrawn on every frame of a camera move, and
   the focus pull reads as three pixel steps. The mid layer keeps its parallax glide (menus.css). */
.cu-stage .cu-backdrop [data-layer="mid"]{transition:transform 1.6s cubic-bezier(.45,.05,.2,1),filter .8s ease}
.cu-stage:is([data-screen="press"],[data-screen="lobby"],[data-screen="pause"]) .cu-backdrop [data-layer="mid"]{transition:transform 1.6s cubic-bezier(.45,.05,.2,1)}
.cu-stage:has(.cu-pause[data-dof="1"]) .cu-plaza>svg{filter:blur(.5px) saturate(.93)}
.cu-stage:has(.cu-pause[data-dof="2"]) .cu-plaza>svg{filter:blur(1px) saturate(.87)}
.cu-stage:has(.cu-pause[data-dof="3"]) .cu-plaza>svg{filter:blur(1.5px) saturate(.8)}
.cu-stage:has(.cu-pause[data-dof="1"]) .cu-backdrop [data-layer="mid"]{filter:blur(.5px) saturate(.92) brightness(.95)}
.cu-stage:has(.cu-pause[data-dof="2"]) .cu-backdrop [data-layer="mid"]{filter:blur(1px) saturate(.83) brightness(.9)}
.cu-stage:has(.cu-pause[data-dof="3"]) .cu-backdrop [data-layer="mid"]{filter:var(--cu-dof,blur(2px) saturate(.75) brightness(.85))}
/* plaza light: corner scrims behind the HUD corners and a warm bounce off the floor (no stage markup needed) */
.cu-plaza::before,.cu-plaza::after{content:"";position:absolute;inset:0;opacity:0;transition:opacity 1.1s ease}
.cu-plaza::before{background:radial-gradient(90% 36% at 50% 100%,#ffa45c4d,#ffa45c00 70%);mix-blend-mode:screen}
.cu-plaza::after{background:radial-gradient(46% 34% at 0 0,#141a34c4,#141a3400 72%),radial-gradient(34% 22% at 100% 0,#141a34a6,#141a3400 72%),radial-gradient(40% 28% at 0 100%,#141a34a6,#141a3400 72%),linear-gradient(#120d2200 82%,#120d2266)}
.cu-stage[data-tint="plaza"] .cu-plaza::before,.cu-stage[data-tint="plaza"] .cu-plaza::after{opacity:1}
.cu-stage[data-screen="pause"] .cu-plaza::after{opacity:0}
.cu-plaza .pz-chibi,.cu-plaza .pz-bob,.cu-plaza .pz-jet,.cu-plaza .pz-flag{transform-box:fill-box;transform-origin:50% 100%}
/* portrait stages crop the plaza's sides: the cast gathers in toward the maypole (--dx is each chibi's offset from it in
   plaza units) so nobody is sliced by the frame */
@container cu-plaza (max-aspect-ratio:4/5){.cu-plaza .pz-spot{translate:calc(var(--dx,0) * -.4px) 0}}
.cu-plaza .pz-flag{transform-origin:0 50%}

/* ---------- Press tint: dark pool behind the logo, a clear band for the carnival, warm horizon, god rays ---------- */
.cu-tint[data-t="press"]{overflow:hidden;background:radial-gradient(58% 30% at 50% 26%,#141a34c8,#141a3400 72%),linear-gradient(#141a34d0 0,#1b244255 34%,#1b244200 52% 78%,#120d22b0)}
.cu-tint[data-t="press"]::after{content:"";position:absolute;inset:0;background:radial-gradient(90% 34% at 50% 100%,#ffa45c55,#ffa45c00 70%);mix-blend-mode:screen}
/* god rays: the conic gradient turns through --fa (a registered angle, tokens.css), repainting a stage-sized layer a few
   times a second instead of compositing a rotated layer six times the stage every frame */
.cu-tint[data-t="press"]::before{content:"";position:absolute;inset:0;mix-blend-mode:screen;
 background:repeating-conic-gradient(from var(--fa,0deg) at 50% 30%,#ffe2a312 0 6deg,#ffe2a300 6deg 18deg);
 -webkit-mask:radial-gradient(110% 140% at 50% 30%,#000 8%,#0008 40%,#0000 72%);mask:radial-gradient(110% 140% at 50% 30%,#000 8%,#0008 40%,#0000 72%)}
.cu-stage[data-tint="press"] .cu-tint[data-t="press"]{opacity:1}

/* ---------- Press Enter title ---------- */
.cu-press-screen{position:absolute;inset:var(--cu-safe-top,env(safe-area-inset-top,0px)) var(--cu-safe-right,env(safe-area-inset-right,0px)) var(--cu-safe-bottom,env(safe-area-inset-bottom,0px)) var(--cu-safe-left,env(safe-area-inset-left,0px));container:cu-press/size}
.cu-press-in{position:absolute;inset:0;overflow:auto;scrollbar-width:none;text-align:center;
 --d:126px;--p:6px;--k:1;--top:clamp(36px,10cqh,96px);--lh:280px;--db:80px;--cr:-16px;--rb:-18px;--rib:20px}
.cu-press-in::-webkit-scrollbar{display:none}
/* the lockup sits in the sky above the plate: at least --top down, and on tall stages a little above the middle of that sky */
.cu-lockup{position:relative;width:fit-content;max-width:calc(100% - 32px);margin:max(var(--top),calc((58cqh - 28px - var(--lh))*.45)) auto 0}
.cu-lockup-in{position:relative;display:flex;flex-direction:column;align-items:center}
.cu-lockup-eyebrow{margin:0 0 12px;display:flex;align-items:center;gap:8px;font:400 var(--cu-fs-label-min,12px)/12px var(--ui-body);letter-spacing:1px;text-transform:uppercase;color:var(--ui-gold-hi);text-shadow:1px 1px 0 var(--ui-ink),-1px 0 0 var(--ui-ink),0 -1px 0 var(--ui-ink)}
.cu-lockup-eyebrow::before,.cu-lockup-eyebrow::after{content:"";width:6px;height:6px;background:var(--ui-gold);box-shadow:1px 1px 0 var(--ui-ink);clip-path:polygon(2px 0,4px 0,4px 2px,6px 2px,6px 4px,4px 4px,4px 6px,2px 6px,2px 4px,0 4px,0 2px,2px 2px)}
/* N2-05: scoped to the press lockup; unscoped it flattened the title screen logo so its tagline ran into the wordmark */
.cu-lockup .cu-logo.cu-logo{margin:0;display:block;gap:0}
.cu-lockup-stack{position:relative;display:flex;flex-direction:column;align-items:center;isolation:isolate}
.cu-lockup-art{position:absolute;z-index:-1;top:0;left:0;right:0;margin:0 auto;width:calc(240px*var(--k));height:calc(240px*var(--k));overflow:visible;
 filter:drop-shadow(3px 0 0 #fff8e0) drop-shadow(-3px 0 0 #fff8e0) drop-shadow(0 3px 0 #fff8e0) drop-shadow(0 -3px 0 #fff8e0) drop-shadow(0 5px 0 #231a2e66)}
.cu-lockup-top{display:block;margin-top:var(--db);font:400 42px/42px var(--ui-display);color:var(--ui-parchment);white-space:nowrap;
 text-shadow:2px 0 0 #231a2e,-2px 0 0 #231a2e,0 2px 0 #231a2e,0 -2px 0 #231a2e,2px 2px 0 #231a2e,-2px 2px 0 #231a2e,2px -2px 0 #231a2e,-2px -2px 0 #231a2e,0 4px 0 #231a2e,2px 4px 0 #231a2e,-2px 4px 0 #231a2e}
.cu-lockup-word{display:grid;margin-top:var(--cr);font:400 var(--d)/var(--d) var(--ui-display);white-space:nowrap}
.cu-lockup-word>span{grid-area:1/1}
.cu-lockup-word .o{color:#231a2e;--n:calc(var(--p)*-1);--q:calc(var(--p)*2);--r:calc(var(--p)*3);
 text-shadow:var(--n) var(--n) 0 #231a2e,0 var(--n) 0 #231a2e,var(--p) var(--n) 0 #231a2e,var(--n) 0 0 #231a2e,var(--p) 0 0 #231a2e,var(--n) var(--p) 0 #231a2e,var(--p) var(--p) 0 #231a2e,
  var(--n) var(--q) 0 #231a2e,0 var(--q) 0 #231a2e,var(--p) var(--q) 0 #231a2e,var(--n) var(--r) 0 #231a2e,0 var(--r) 0 #231a2e,var(--p) var(--r) 0 #231a2e}
.cu-lockup-word .f,.cu-lockup-word .g{color:#0000;-webkit-background-clip:text;background-clip:text}
/* 4-band leaf, each band edge on the font's own pixel grid (cap height 12 font pixels, starting 4 below the line top) */
.cu-lockup-word .f{background-image:linear-gradient(#fff3cd 0 calc(var(--p)*7),#ffe2a3 0 calc(var(--p)*10),#f4c67b 0 calc(var(--p)*13),#b98a45 0)}
.cu-lockup-word .g{background-image:linear-gradient(100deg,#fff8e000 40%,#fff8e0 47% 53%,#fff8e000 60%);background-repeat:no-repeat;background-size:44% 100%;background-position:-80% 0}
.cu-ribbon{position:relative;z-index:1;display:flex;align-items:flex-start;margin-top:var(--rb)}
.cu-ribbon .band{position:relative;display:block;padding:5px 18px 4px;font:700 var(--rib)/24px var(--ui-body);color:#231a2e;white-space:nowrap;
 background:linear-gradient(#fff8e0 0 4px,#fff3cd 4px 60%,#f3e2b8 60%);border-block:3px solid #231a2e;box-shadow:inset 0 -3px 0 #e1c993}
.cu-ribbon .tail{flex:none;width:30px;height:40px;margin-top:6px}
.cu-ribbon .tail:first-child{margin-right:-12px;position:relative;z-index:-1}
.cu-ribbon .tail:last-child{margin-left:-12px;position:relative;z-index:-1;scale:-1 1}
.cu-dust{position:absolute;left:0;right:0;bottom:6px;height:0;pointer-events:none}
.cu-dust i{position:absolute;left:50%;top:0;width:6px;height:6px;background:#fff3cd;box-shadow:2px 2px 0 #231a2e;opacity:0}
.cu-dust i:nth-child(1){--x:-180px;--y:-6px}.cu-dust i:nth-child(2){--x:-120px;--y:-20px}.cu-dust i:nth-child(3){--x:-60px;--y:-4px}
.cu-dust i:nth-child(4){--x:54px;--y:-12px}.cu-dust i:nth-child(5){--x:118px;--y:-22px}.cu-dust i:nth-child(6){--x:176px;--y:-8px}

/* Press plate: the text never blinks, the plate breathes */
.cu-enter{all:unset;box-sizing:border-box;position:absolute;left:0;right:0;top:calc(58% - 28px);margin:0 auto;width:fit-content;max-width:calc(100% - 96px);
 display:flex;align-items:center;justify-content:center;min-height:56px;padding:0 28px;cursor:pointer;
 font:700 20px/24px var(--ui-body);color:var(--ui-parchment);text-shadow:2px 2px 0 #231a2e;white-space:nowrap;
 background:var(--cu-mat-weave,none),linear-gradient(#2a3b63,#1d2a4b 42%,#141c36);border:3px solid #231a2e;
 --edge:inset 0 0 0 2px var(--ui-gold-lo),inset 0 4px 0 #ffe2a31f,inset 0 -3px 0 #0a0e1c66;box-shadow:var(--edge),4px 4px 0 #231a2e99;
 transition:translate var(--cu-t-press,90ms),box-shadow var(--cu-t-hover,160ms),filter var(--cu-t-hover,160ms)}
.cu-enter .k{display:inline-flex;align-items:center;gap:8px}
/* a longer translation wraps inside the button (around the keycap) instead of running past its edge */
.cu-enter .k{flex-wrap:wrap;justify-content:center;row-gap:4px;padding-block:6px;white-space:normal;text-align:center}
.cu-enter .t{display:none}
.cu-enter kbd{position:relative;top:-1px;transition:translate var(--cu-t-press,90ms),box-shadow var(--cu-t-press,90ms)}
.cu-enter::before,.cu-enter::after{content:"";position:absolute;top:0;bottom:0;margin:auto 0;width:12px;height:20px;background:0 0/12px 20px no-repeat;image-rendering:pixelated}
.cu-enter::before{left:-26px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v1h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1z' fill='%23231a2e' transform='translate(0 1)'/%3E%3Cpath d='M0 0h1v1h1v1h1v1h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1z' fill='%23ffe2a3'/%3E%3Cpath d='M0 5h4v-1h1v1h-1v1h-1v1h-1v1h-1v1h-1z' fill='%23f4c67b'/%3E%3C/svg%3E")}
.cu-enter::after{right:-26px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v9h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h1v-1h1v-1h1v-1h1z' fill='%23231a2e' transform='translate(0 1)'/%3E%3Cpath d='M4 0h1v9h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h1v-1h1v-1h1v-1h1z' fill='%23ffe2a3'/%3E%3Cpath d='M0 5h5v4h-1v-1h-1v-1h-1v-1h-1v-1z' fill='%23f4c67b'/%3E%3C/svg%3E")}
.cu-enter:is(:hover,:focus-visible){--edge:inset 0 0 0 2px var(--ui-gold-hi),inset 0 4px 0 #ffe2a333,inset 0 -3px 0 #0a0e1c66;filter:brightness(1.06);outline:none}
.cu-enter:focus-visible{box-shadow:var(--edge),4px 4px 0 #231a2e99,0 0 0 3px #231a2e,0 0 0 6px var(--ui-gold-hi)}
.cu-enter:is(:active,.is-go){translate:0 2px;box-shadow:var(--edge),1px 1px 0 #231a2e;filter:brightness(.92)}
.cu-enter:is(:active,.is-go) kbd{translate:0 2px;box-shadow:none}
.cu-press-chip{position:absolute;top:20px;right:24px;max-width:calc(100% - 48px)}
.cu-press-foot{position:absolute;left:16px;right:16px;bottom:16px;display:flex;flex-direction:column;align-items:center;gap:8px}
.cu-press-note{margin:0;display:inline-flex;align-items:center;gap:8px;max-width:min(560px,100%);padding:6px 12px;font:400 12px/16px var(--ui-body);color:var(--ui-parchment-dim);text-align:left;text-wrap:balance;
 background:#120d22b3;border:2px solid #231a2e;box-shadow:inset 0 1px 0 #ffffff12}
.cu-press-note .ui-ico{--ico:16px}
/* the dive: the lockup rockets up out of frame, the plate pops and fades, the plaza zooms in (the camera owns that) */
.mf-screen.is-leaving .cu-lockup{transform:translate3d(0,calc(-38cqh - 60px),0) scale(1.15);opacity:0;transition:transform .55s var(--cu-ease-in,cubic-bezier(.5,0,.8,.4)),opacity .4s ease .15s}
.mf-screen.is-leaving .cu-enter{transform:none;scale:1.1;opacity:0;transition:scale .2s steps(2),opacity .2s steps(2)}

/* ---------- Online chip ---------- */
.cu-online{--c:var(--ui-gold);display:inline-flex;align-items:center;gap:8px;min-height:32px;max-width:100%;padding:4px 12px 4px 10px;box-sizing:border-box;
 font:400 14px/16px var(--ui-body);color:var(--ui-parchment);white-space:nowrap;text-shadow:1px 1px 0 #231a2e;
 background:linear-gradient(#22305a,#1d2a4b 60%,#18213f);border:2px solid #231a2e;box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--c) 50%,var(--ui-gold-lo)),2px 2px 0 #231a2e}
.cu-online .s{font:400 var(--cu-fs-label-min,12px)/12px var(--ui-body);letter-spacing:1px;text-transform:uppercase;color:var(--c)}
.cu-online .p,.cu-online .n{overflow:hidden;text-overflow:ellipsis}
.cu-online .p::before,.cu-online .n::before{content:"";display:inline-block;width:2px;height:2px;margin:0 8px 3px 0;background:var(--ui-parchment-dim)}
.cu-online .n{color:var(--ui-gold-hi)}
/* when the chip is short of room the place name gives way first, so the head count stays whole in any language */
.cu-online .n{flex:0 0 auto;max-width:60%}.cu-online .p{flex:0 1 auto;min-width:0}
.cu-online .v{display:inline-block}
.cu-online .v.bump{animation:lm-bump .24s steps(3)}
@keyframes lm-bump{40%{translate:0 -2px;color:#fff}}
.cu-online .dot{position:relative;flex:none;width:10px;height:10px;border-radius:50%;background:var(--c);border:2px solid #231a2e}
.cu-online[data-state="online"]{--c:#8fe39a}
.cu-online[data-state="offline"]{--c:#8b93c9;background:#1b2442b0;color:var(--ui-parchment-dim)}
.cu-online[data-state="offline"] .dot{background:#1b2442;box-shadow:inset 0 0 0 2px var(--c)}
.cu-online[data-state="connecting"] .dot{background:#1b2442;box-shadow:inset 0 0 0 2px var(--c)}
.cu-online[data-state="connecting"] .s::after{content:"";display:inline-block;width:12px;height:2px;margin-left:2px;background:linear-gradient(90deg,currentColor 0 2px,#0000 2px 5px,currentColor 5px 7px,#0000 7px 10px,currentColor 10px 12px) 0 0/12px 2px no-repeat}
/* variants: compact (dot, state, count), state (dot and state), text (the Esc menu eyebrow: place and count) */
.cu-online[data-variant="compact"] :is(.p,.u),.cu-online[data-variant="state"] :is(.p,.n){display:none}
.cu-online[data-variant="state"]{min-height:24px;padding:2px 8px 2px 6px;gap:6px}
.cu-online[data-variant="state"] .dot{width:8px;height:8px}
.cu-online[data-variant="text"]{all:unset;display:inline-flex;align-items:center;gap:0;max-width:100%;font:400 var(--cu-fs-label-min,12px)/12px var(--ui-body);letter-spacing:0;text-transform:uppercase;color:var(--ui-gold);text-shadow:1px 1px 0 #231a2e;white-space:nowrap;overflow:hidden}
.cu-online[data-variant="text"] .dot{width:6px;height:6px;margin:0 8px 1px 0;border:0;border-radius:0;box-shadow:0 0 0 1px #231a2e,1px 1px 0 1px #231a2e}
.cu-online[data-variant="text"]:not([data-state="online"]) .dot{background:#1b2442;box-shadow:inset 0 0 0 2px var(--c),0 0 0 1px #231a2e,1px 1px 0 1px #231a2e}
.cu-online[data-variant="text"] .s{color:var(--c)}
.cu-online[data-variant="text"] .n{color:var(--ui-gold-hi)}
.cu-online[data-variant="text"] .p{min-width:0}
.cu-online[data-variant="text"] .n{flex:none}
.cu-online[data-variant="text"] :is(.p,.n)::before{background:currentColor;margin:0 8px 2px}

/* ---------- Lobby corners (shown while walking the plaza) ---------- */
.cu-lobbyhud{position:absolute;inset:var(--cu-safe-top,env(safe-area-inset-top,0px)) var(--cu-safe-right,env(safe-area-inset-right,0px)) var(--cu-safe-bottom,env(safe-area-inset-bottom,0px)) var(--cu-safe-left,env(safe-area-inset-left,0px));container:cu-lobby/size;pointer-events:none;outline:none}
.cu-lobby-top{position:absolute;top:24px;left:28px;right:28px;display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 16px}
.cu-lobby-top>*,.cu-lobby-keys>*{pointer-events:auto}
.cu-place{display:flex;flex-direction:column;gap:6px}
.cu-place small{display:flex;align-items:center;gap:8px;font:400 var(--cu-fs-label-min,12px)/12px var(--ui-body);letter-spacing:1px;text-transform:uppercase;color:var(--ui-gold);text-shadow:1px 1px 0 #231a2e}
.cu-place small::after{content:"";width:48px;height:2px;background:linear-gradient(90deg,var(--ui-gold),#f4c67b00);box-shadow:0 1px 0 #231a2e}
.cu-place b{margin:-8px 0 -10px;font:400 42px/42px var(--ui-display);color:var(--ui-gold-hi);white-space:nowrap;
 text-shadow:2px 0 0 #231a2e,-2px 0 0 #231a2e,0 2px 0 #231a2e,0 -2px 0 #231a2e,2px 2px 0 #231a2e,-2px 2px 0 #231a2e,2px -2px 0 #231a2e,-2px -2px 0 #231a2e,0 4px 0 #231a2e,2px 4px 0 #231a2e,-2px 4px 0 #231a2e}
.cu-lobby-chip{margin-left:auto}
.cu-lobby-keys{position:absolute;left:28px;bottom:24px;display:flex;align-items:center;gap:16px}
.cu-lobby-walk{display:inline-flex;align-items:center;gap:8px;font:700 16px/22px var(--ui-body);color:var(--ui-parchment);text-shadow:2px 2px 0 #231a2e}
.cu-lobby-menu{all:unset;pointer-events:auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:0 14px 0 10px;cursor:pointer;
 font:700 16px/22px var(--ui-body);color:var(--ui-parchment);text-shadow:1px 1px 0 #231a2e;
 background:linear-gradient(#22305a,#1d2a4b 60%,#18213f);border:2px solid #231a2e;--edge:inset 0 2px 0 #ffffff14,inset 0 -2px 0 #0000002e,inset 0 0 0 2px #b98a4566;box-shadow:var(--edge),2px 2px 0 #231a2e;
 transition:translate var(--cu-t-hover,160ms),box-shadow var(--cu-t-hover,160ms),filter var(--cu-t-hover,160ms)}
.cu-lobby-menu .cu-gl-menu{display:none;width:24px;height:24px}
.cu-lobby-menu:is(:hover,:focus-visible){--edge:inset 0 2px 0 #ffffff14,inset 0 -2px 0 #0000002e,inset 0 0 0 2px var(--ui-gold);translate:0 -2px;filter:brightness(1.06);color:var(--ui-gold-hi);outline:none}
.cu-lobby-menu:focus-visible{box-shadow:var(--edge),2px 2px 0 #231a2e,0 0 0 2px #231a2e,0 0 0 5px var(--ui-gold-hi)}
.cu-lobby-menu:active{translate:1px 1px;box-shadow:var(--edge),1px 1px 0 #231a2e;filter:brightness(.92)}
/* corners arrive last on the dive from the title */
.cu-stage[data-dive] .cu-lobbyhud [data-flow]{transition-delay:calc(560ms + var(--i,0)*60ms)}

/* ---------- Esc menu: a tapestry slab over the dimmed plaza ---------- */
/* --pl/--pr: the cloth's inner margins (the right one clears the slant); --clip: the slab's shape (slanted right edge and
   a swallow-tail), shared by the cloth and its edge layers */
.cu-pause{position:absolute;inset:0;container:cu-pause/size;--slab-x:calc(20px + var(--cu-safe-left,env(safe-area-inset-left,0px)));--slab-w:480px}
/* the world dims behind the slab; the slab itself stays solid cloth and only travels, so it never ghosts mid-slide */
.cu-pause::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .3s ease;
 background:radial-gradient(22% 34% at 72% 64%,#ffe2a326,#ffe2a300),linear-gradient(90deg,#120d22e6 0,#120d22a8 36%,#120d2240 66%,#120d2273)}
.mf-screen:is(.is-active,.is-entering) .cu-pause::before{opacity:1}
.mf-screen.is-leaving .cu-pause::before{opacity:0;transition:opacity .26s ease calc(var(--n,8)*18ms)}
.cu-pause-slab{position:absolute;top:0;bottom:0;left:var(--slab-x);width:min(var(--slab-w),calc(100% - var(--slab-x)));--pl:28px;--pr:54px;--clip:polygon(0 0,100% 0,calc(100% - 34px) 100%,50% calc(100% - 36px),0 100%);
 transform:translate3d(calc(-100% - var(--slab-x) - 24px),0,0);transition:transform .42s var(--cu-ease-out,cubic-bezier(.16,.84,.24,1))}
.mf-screen:is(.is-active,.is-entering) .cu-pause-slab{transform:none}
.mf-screen.is-leaving .cu-pause-slab{transform:translate3d(calc(-100% - var(--slab-x) - 24px),0,0);transition:transform .26s var(--cu-ease-in,cubic-bezier(.5,0,.8,.4)) calc(var(--n,8)*18ms)}
/* gold rod with round finials, hung across the top */
.cu-pause-slab::before{content:"";position:absolute;z-index:2;top:2px;left:-12px;right:-14px;height:16px;pointer-events:none;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M5 0h6v1h2v2h1v2h1v6h-1v2h-1v2h-2v1h-6v-1h-2v-2h-1v-2h-1v-6h1v-2h1v-2h2z' fill='%23231a2e'/%3E%3Cpath d='M5 2h6v1h1v1h1v1h1v6h-1v1h-1v1h-1v1h-6v-1h-1v-1h-1v-1h-1v-6h1v-1h1v-1h1z' fill='%23f4c67b'/%3E%3Cpath d='M5 3h3v1h-2v1h-1v2h-1v-2h1v-1z' fill='%23fff3cd'/%3E%3Cpath d='M12 8h1v3h-1v1h-1v1h-3v-1h2v-1h1v-1h1z' fill='%23b98a45'/%3E%3C/svg%3E") 0 0/16px 16px no-repeat,
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M5 0h6v1h2v2h1v2h1v6h-1v2h-1v2h-2v1h-6v-1h-2v-2h-1v-2h-1v-6h1v-2h1v-2h2z' fill='%23231a2e'/%3E%3Cpath d='M5 2h6v1h1v1h1v1h1v6h-1v1h-1v1h-1v1h-6v-1h-1v-1h-1v-1h-1v-6h1v-1h1v-1h1z' fill='%23f4c67b'/%3E%3Cpath d='M5 3h3v1h-2v1h-1v2h-1v-2h1v-1z' fill='%23fff3cd'/%3E%3Cpath d='M12 8h1v3h-1v1h-1v1h-3v-1h2v-1h1v-1h1z' fill='%23b98a45'/%3E%3C/svg%3E") 100% 0/16px 16px no-repeat,
  linear-gradient(#ffe2a3 0 2px,#f4c67b 2px 4px,#b98a45 4px) 50% 6px/calc(100% - 24px) 6px no-repeat,linear-gradient(#231a2e 0 0) 50% 4px/calc(100% - 24px) 10px no-repeat}
/* the edge (2px ink, 3px gold, 2px ink and an 8px drop down-right) is four offset copies of the cloth's own shape under it,
   painted once: no filter has to run again while the slab travels or its items slide in */
.cu-pause-cloth{position:absolute;inset:8px 0 0;isolation:isolate}
.cu-pause-cloth::before,.cu-pause-cloth::after,.cu-pause-edge::before,.cu-pause-edge::after{content:"";position:absolute;inset:0;clip-path:var(--clip);pointer-events:none}
.cu-pause-cloth::before{z-index:0;translate:15px 13px;background:#231a2e99}
.cu-pause-cloth::after{z-index:1;translate:7px 7px;background:#231a2e}
.cu-pause-edge{position:absolute;inset:0}
.cu-pause-edge::before{z-index:2;translate:5px 5px;background:#f4c67b}
.cu-pause-edge::after{z-index:3;translate:2px 2px;background:#231a2e}
.cu-pause-panel{position:absolute;z-index:4;inset:0;display:flex;flex-direction:column;padding-top:var(--cu-safe-top,env(safe-area-inset-top,0px));padding-bottom:calc(36px + var(--cu-safe-bottom,env(safe-area-inset-bottom,0px)));clip-path:var(--clip);
 background:var(--cu-mat-weave,repeating-linear-gradient(0deg,#ffffff07 0 2px,#0000 2px 4px)),linear-gradient(90deg,#0000 0 3px,#f4c67b 3px 5px,#231a2e 5px 7px,#0000 7px) 0 0/100% 100% no-repeat,
  linear-gradient(#0000 0 8px,#b98a45 8px 10px,#0000 10px) 0 0/100% 100% no-repeat,linear-gradient(#24335e,#1b2546 38%,#141c36);
 box-shadow:inset 3px 0 0 #231a2e}
/* head: eyebrow, the Menu title and the Esc back key. It stays put above the scroller, never under the rod */
.cu-pause-head{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px 12px;padding:18px var(--pr) 0 var(--pl)}
.cu-pause-where{grid-column:1;min-width:0;display:flex}
.cu-pause-head h2{grid-column:1;margin:-8px 0 -10px;font:400 42px/42px var(--ui-display);color:var(--ui-parchment);white-space:nowrap;
 text-shadow:2px 0 0 #231a2e,-2px 0 0 #231a2e,0 2px 0 #231a2e,0 -2px 0 #231a2e,2px 2px 0 #231a2e,-2px 2px 0 #231a2e,2px -2px 0 #231a2e,-2px -2px 0 #231a2e,0 4px 0 #231a2e,2px 4px 0 #231a2e,-2px 4px 0 #231a2e}
.cu-pause-back{all:unset;box-sizing:border-box;grid-column:2;grid-row:1/3;align-self:center;display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 10px 0 6px;cursor:pointer;pointer-events:auto;
 font:400 14px/20px var(--ui-body);color:var(--ui-parchment-dim);border:2px solid #5966a1;transition:color var(--cu-t-hover,160ms),border-color var(--cu-t-hover,160ms),translate var(--cu-t-hover,160ms)}
.cu-pause-back .cu-gl-back{display:none;width:12px;height:12px}
.cu-pause-back:is(:hover,:focus-visible){color:var(--ui-gold-hi);border-color:var(--ui-gold);translate:0 -2px;outline:none}
.cu-pause-back:focus-visible{box-shadow:0 0 0 2px #231a2e,0 0 0 5px var(--ui-gold-hi)}
/* the scroller holds the player card and the list; an edge fades only where more of the list hides behind it */
.cu-pause-scroll{position:relative;flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:12px var(--pr) 14px var(--pl);display:flex;flex-direction:column;gap:12px}
.cu-pause-scroll::-webkit-scrollbar{display:none}
.cu-pause.scrolls .cu-pause-scroll{--mt:0px;--mb:0px;-webkit-mask:linear-gradient(#0000 0,#000 var(--mt),#000 calc(100% - var(--mb)),#0000 100%);mask:linear-gradient(#0000 0,#000 var(--mt),#000 calc(100% - var(--mb)),#0000 100%)}
.cu-pause.scrolls:not(.at-top) .cu-pause-scroll{--mt:20px}
.cu-pause.scrolls:not(.at-end) .cu-pause-scroll{--mb:40px}
/* player card: the mini crest (red cross and team shield on the rim), the name on a rolled scroll and the stats line
   (owner call 6: no account button, no lock; the card ends after the line) */
.cu-pause-who{flex:none;display:grid;grid-template-columns:70px minmax(0,1fr);grid-template-areas:"crest name" "crest note";gap:4px 12px;align-items:center;padding:10px 12px 12px 10px;
 background:linear-gradient(#141c36,#101730);border:2px solid #231a2e;box-shadow:inset 0 0 0 2px #ffffff0d,inset 0 -3px 0 #0a0e1c66,0 2px 0 #ffffff10}
.cu-minicrest{grid-area:crest;position:relative;width:64px;height:64px;margin:3px;border-radius:50%;overflow:visible;
 background:radial-gradient(70% 70% at 35% 30%,#ffe2a3,#f4c67b 50%,#b98a45);box-shadow:inset 0 0 0 2px #231a2e,0 0 0 3px #f4c67b,0 0 0 5px #231a2e,3px 4px 0 5px #231a2e88}
.cu-minicrest>svg{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;clip-path:circle(31px at 50% 50%)}
.cu-minicrest>.ui-ico{position:absolute;inset:0;margin:auto;--ico:48px}
.cu-minicrest .x{position:absolute;left:-5px;top:-3px;width:18px;height:18px;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h3v3h3v3h-3v3h-3v-3h-3v-3h3z' fill='%23231a2e'/%3E%3Cpath d='M4 1h1v3h3v1h-3v3h-1v-3h-3v-1h3z' fill='%23c8343f'/%3E%3Cpath d='M4 1h1v1h-1zM1 4h1v1h-1z' fill='%23ff8a7a'/%3E%3C/svg%3E") 0 0/18px 18px;image-rendering:pixelated}
/* the team shield, top-right on the rim: dawn teal, lit from the top-left, a gold sun boss */
.cu-minicrest .sh{position:absolute;right:-5px;top:-3px;width:18px;height:20px;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h9v6h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1z' fill='%23231a2e'/%3E%3Cpath d='M1 1h7v5h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1z' fill='%2380eee2'/%3E%3Cpath d='M5 1h3v5h-1v1h-1v1h-1z' fill='%235fd0c4'/%3E%3Cpath d='M1 1h4v1h-3v4h-1z' fill='%23d8fbf6'/%3E%3Cpath d='M4 2h1v1h1v1h-1v1h-1v-1h-1v-1h1z' fill='%23f4c67b'/%3E%3C/svg%3E") 0 0/18px 20px;image-rendering:pixelated}
/* the name scroll: blackletter 42 (Jacquard's pixel-exact rung), stepping to the 21 rung when the name will not fit */
.cu-scroll{grid-area:name;align-self:end;justify-self:start;position:relative;box-sizing:border-box;display:block;max-width:calc(100% - 18px);height:38px;margin:0 9px;padding:0 8px;
 background:linear-gradient(#fff8e0 0 3px,#fff3cd 3px 60%,#f3e2b8 60%);border-block:2px solid #231a2e;box-shadow:inset 0 -2px 0 #e1c993}
.cu-scroll::before,.cu-scroll::after{content:"";position:absolute;top:-5px;bottom:-5px;width:8px;box-shadow:inset 0 2px 0 #231a2e,inset 0 -2px 0 #231a2e}
.cu-scroll::before{left:-9px;background:linear-gradient(90deg,#231a2e 0 2px,#c9a86a 2px 4px,#f3e2b8 4px 6px,#231a2e 6px 8px)}
.cu-scroll::after{right:-9px;background:linear-gradient(90deg,#231a2e 0 2px,#f3e2b8 2px 4px,#c9a86a 4px 6px,#231a2e 6px 8px)}
.cu-scroll b{display:block;height:42px;margin-top:-4px;font:400 42px/42px var(--ui-display);color:#231a2e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;unicode-bidi:isolate}
.cu-scroll[data-fit="21"]{height:24px}
.cu-scroll[data-fit="21"] b{height:21px;margin-top:0;font-size:21px;line-height:21px}
.cu-who-note{grid-area:note;align-self:start;margin:0;font:400 12px/16px var(--ui-body);color:var(--ui-parchment-dim);text-wrap:pretty}
/* the list and its gliding Gilt Selector plate */
.cu-pause-list{position:relative;flex:1 0 auto;display:flex;flex-direction:column}
/* the plate arrives with the list (items enter from 150ms) and leaves with it. A warm gold wash, opaque enough to read as
   gold on the navy cloth (a thin #f4c67b wash mixes to grey there) */
.cu-pause-sel{z-index:0;opacity:0;margin-left:-6px;background:linear-gradient(90deg,#ffc76b66 0,#f4c67b38 45%,#f4c67b00 92%);box-shadow:inset 0 2px 0 #ffe2a326,inset 0 -2px 0 #0a0e1c40}
.mf-screen.is-active .cu-pause-sel.on{opacity:1;transition:translate var(--cu-t-sel,180ms) var(--cu-ease-pop,cubic-bezier(.2,.9,.3,1.3)),top var(--cu-t-sel,180ms) var(--cu-ease-pop,cubic-bezier(.2,.9,.3,1.3)),height var(--cu-t-sel,180ms) var(--cu-ease-pop,cubic-bezier(.2,.9,.3,1.3)),opacity .2s ease .12s}
.cu-pause-sel.is-quit{background:linear-gradient(90deg,#ff6a5c52 0,#ff6a5c24 45%,#ff6a5c00 92%)}
.cu-pause-sel.is-quit::before{background:linear-gradient(90deg,#ff8a7a 0 50%,#c8343f 50%)}
.cu-pause-sel.is-quit::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 11'%3E%3Cuse href='%23c' x='1' y='1' fill='%23231a2e'/%3E%3Cg fill='%23ff8a7a'%3E%3Cpath id='c' d='M0 0h3v1h1v1h1v1h1v1h1v2h-1v1h-1v1h-1v1h-1v1h-3v-1h1v-1h1v-1h1v-1h1v-2h-1v-1h-1v-1h-1v-1h-1z'/%3E%3C/g%3E%3C/svg%3E")}
.cu-pause-menu{position:relative;z-index:1;flex:1;gap:0}
.cu-pause-menu li{display:flex}
.cu-pause-menu button{min-height:52px;padding:5px 36px 5px 10px;gap:14px;font:700 24px/28px var(--ui-body);transform:none;
 transition:translate var(--cu-t-sel,180ms) var(--cu-ease-pop,cubic-bezier(.2,.9,.3,1.3)),color var(--cu-t-hover,160ms),filter var(--cu-t-press,90ms)}
.cu-pause-menu button::before{display:none}
/* the plate is the only selection mark: no second nudge for hover or focus (menus.css) on an item it is not on */
.cu-pause-menu button:is(:hover,:focus-visible){transform:none;outline:none}
.cu-pause-menu button:not(.is-sel):is(:hover,:focus-visible){translate:none;color:var(--ui-parchment)}
.cu-pause-menu .ui-ico{--ico:32px}
.cu-pause-menu .l{display:flex;flex-direction:column;min-width:0}
.cu-pause-menu .l b{font:inherit}
.cu-pause-menu small{font:400 14px/20px var(--ui-body);color:var(--ui-parchment-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cu-pause-menu button.is-sel{color:var(--ui-gold-hi);translate:4px 0}
.cu-pause-menu button.is-sel small{color:var(--ui-parchment)}
.cu-pause-menu button.pop .ui-ico{animation:lm-pop .24s steps(3)}
@keyframes lm-pop{50%{scale:1.25;rotate:-6deg}}
.cu-pause-menu button:is(:active,.is-press){translate:12px 2px;filter:brightness(.88)}
.cu-pause-menu li.quit{margin-top:auto;padding-top:14px;position:relative}
.cu-pause-menu li.quit::before{content:"";position:absolute;left:0;right:8px;top:6px;height:2px;background:#231a2e;box-shadow:0 2px 0 #ffffff12}
.cu-pause-menu li.quit button{color:var(--ui-parchment-dim)}
.cu-pause-menu li.quit button.is-sel{color:#ff8a7a}
/* live peek: what the selected item leads to, on the right over the plaza. The whole set fades in once the slab has
   landed and sits on its own layer, so the cards are drawn once rather than on every frame of the slide */
.cu-pause-peeks{position:absolute;inset:0;pointer-events:none;opacity:0;will-change:opacity}
.mf-screen.is-active .cu-pause-peeks{opacity:1;transition:opacity .3s ease .42s}
.mf-screen.is-leaving .cu-pause-peeks{opacity:0;transition:opacity .16s ease}
.cu-pause-peek{position:absolute;right:6%;top:19%;display:flex;flex-direction:column;align-items:center;gap:14px;opacity:0;translate:0 12px;
 transition:opacity var(--cu-t-panel,280ms) ease,translate var(--cu-t-panel,280ms) var(--cu-ease-out,cubic-bezier(.16,.84,.24,1))}
.cu-pause-peek[data-for="creator"]{top:auto;bottom:9%}
.cu-pause:is([data-peek="play"]) .cu-pause-peek[data-for="play"],.cu-pause:is([data-peek="creator"]) .cu-pause-peek[data-for="creator"]{opacity:1;translate:none;transition-delay:60ms}
/* a dark pool behind the peek, deepest under the fan, so it reads as foreground against whatever the world puts there */
.cu-pause-peek::before{content:"";position:absolute;z-index:-1;inset:-56px -80px -64px;background:radial-gradient(42% 12% at 50% 81%,#120d22e0,#120d2200),radial-gradient(closest-side,#120d22d0,#120d22a0 55%,#120d2200)}
.cu-peek-cap{order:-1}
.cu-peek-fan{display:flex;padding:0 0 0 28px}
.cu-peek-card{position:relative;width:120px;height:160px;margin-left:-28px;rotate:calc(var(--k)*2.6deg);translate:0 calc(var(--k)*var(--k)*5px);
 border:3px solid #231a2e;box-shadow:inset 0 0 0 2px var(--ui-gold-lo),6px 6px 0 #231a2e88;background:#1d2a4b;overflow:hidden}
.cu-peek-card>:is(svg,img){display:block;width:100%;height:100%}
.cu-peek-card::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 2px var(--ui-gold-lo),inset 0 0 0 4px #231a2e66;pointer-events:none}
.cu-peek-cap{padding:6px 12px;font:700 16px/20px var(--ui-body);color:var(--ui-parchment);text-shadow:2px 2px 0 #231a2e;background:linear-gradient(90deg,#120d2200,#120d22d9 18% 82%,#120d2200)}
.cu-peek-chibi{position:relative;width:200px;height:260px;margin-top:-56px}
.cu-peek-chibi::before{content:"";position:absolute;left:30px;right:30px;bottom:4px;height:22px;border-radius:50%;background:#231a2e66}
.cu-peek-chibi::after{content:"";position:absolute;inset:-20px -30px 20px;z-index:-1;background:radial-gradient(50% 50% at 50% 55%,#ffe2a344,#ffe2a300 70%)}
.cu-peek-chibi>svg{position:relative;width:100%;height:100%;filter:drop-shadow(0 -2px 0 #80eee2)}
.pk-wave .pk-f{visibility:hidden}
.pk-wave .pk-f:first-child{visibility:visible}

/* ---------- Tiers (container queries on the screens themselves) ---------- */
@container cu-press (max-width:1040px){
 .cu-press-in{--d:105px;--p:5px;--k:.8333;--lh:246px;--db:64px;--cr:-14px;--rb:-17px}
 .cu-dust i{scale:.8}
}
@container cu-press (max-height:700px){
 .cu-press-in{--d:105px;--p:5px;--k:.8333;--lh:246px;--db:64px;--cr:-14px;--rb:-17px}
 .cu-dust i{scale:.8}
}
@container cu-press (max-height:620px){
 .cu-press-in{--d:84px;--p:4px;--k:.6667;--lh:213px;--db:47px;--cr:-12px;--rb:-14px;--top:clamp(28px,8cqh,96px)}
 .cu-dust i{scale:.7}
}
@container cu-press (max-width:640px){
 .cu-press-chip{top:16px;right:16px;max-width:calc(100% - 32px)}
 .cu-press-chip .cu-online :is(.p,.u){display:none}
 .cu-press-in{--d:63px;--p:3px;--k:.5;--lh:170px;--db:30px;--cr:-10px;--rb:-11px;--rib:16px;--top:clamp(56px,15cqh,120px)}
 .cu-ribbon{max-width:100%}
 /* N3-06: a 390 px phone (342 px inside the shared safe area) wraps the tagline instead of scrolling sideways */
 .cu-ribbon .band{padding:3px 12px 2px;line-height:20px;min-width:0;white-space:normal;text-wrap:balance;text-align:center}
 .cu-ribbon .tail{width:24px;height:32px;margin-top:4px}
 .cu-enter{min-height:52px;padding:0 20px;max-width:calc(100% - 80px)}
 .cu-dust i:nth-child(3n+1){display:none}
 .cu-press-note{font-size:12px}
}
/* short (phone landscape): the lockup takes the left half; the plate keeps its height on the right half, where the plaza
   camera pans the maypole (cu-plaza tier below), and the stub note runs along the bottom edge in one line, under the
   cast's feet instead of over them. Wide stages only: a small portrait stage (288x478 in the mockup page on a 320 phone)
   is short too, and must keep the stacked phone layout */
@container cu-press (max-height:500px) and (min-width:500px){
 .cu-press-in{--d:63px;--p:3px;--k:.5;--lh:170px;--db:30px;--cr:-10px;--rb:-11px;--rib:16px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;padding:0 16px}
 .cu-lockup{grid-column:1;margin:12px auto}
 .cu-ribbon .band{padding:3px 12px 2px;line-height:20px}
 .cu-ribbon .tail{width:24px;height:32px;margin-top:4px}
 .cu-enter{left:50%;right:0;max-width:calc(50% - 56px)}
 .cu-press-foot{left:16px;right:16px;bottom:6px}
 .cu-press-note{padding-block:4px}
}
@container cu-plaza (max-height:500px) and (min-width:500px){
 .cu-stage[data-screen="press"] .cu-plaza>svg{transform:translate(calc(25cqw + var(--vx,0)*-1.2px),calc(max(36.72cqw*var(--pz),65.28cqh*var(--pz)) - 42cqh - 8px)) translate(0,0) scale(var(--pz,1))}
}
@container cu-lobby (max-width:640px){
 .cu-lobby-top{top:16px;left:16px;right:16px}
 .cu-lobby-keys{left:16px;bottom:16px}
 .cu-lobbyhud .cu-online:not([data-variant="text"]) :is(.p,.u){display:none}
 .cu-lobbyhud .cu-online{padding-inline:8px 10px}
}
/* the peek needs the room right of the slab; it steps down, then leaves, as the stage narrows */
@container cu-pause (max-width:1100px){
 .cu-pause-peek{right:3%;scale:.84;transform-origin:100% 0}
 .cu-pause-peek[data-for="creator"]{transform-origin:100% 100%}
}
@container cu-pause (max-width:920px){.cu-pause-peeks{display:none}}
/* medium height (most laptop and tablet stages): every item keeps its subtitle and Quit stays in view */
@container cu-pause (max-height:720px){
 .cu-pause-head{padding-top:16px}
 .cu-pause-scroll{gap:8px;padding-top:8px;padding-bottom:10px}
 .cu-pause-who{padding:8px 12px 8px 8px;row-gap:2px}
 .cu-pause-menu button{min-height:44px;padding-block:2px}
 .cu-pause-menu small{line-height:18px}
 .cu-pause-menu li.quit{padding-top:8px}
 .cu-pause-menu li.quit::before{top:3px}
}
/* short: the subtitles go, and the eyebrow moves up beside the title so the head is one row */
@container cu-pause (max-height:600px){
 .cu-pause-menu small{display:none}
 .cu-pause-menu button{min-height:44px;padding-block:4px}
}
@container cu-pause (max-height:600px) and (min-width:500px){
 .cu-pause-head{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:16px;padding-top:16px}
 .cu-pause-scroll{padding-top:6px;padding-bottom:8px}
 .cu-pause-who{padding-block:6px}
 .cu-pause-head h2{grid-row:1;margin:-10px 0 -8px}
 .cu-pause-where{grid-column:2;grid-row:1;padding-top:4px}
 .cu-pause-where .cu-online[data-state="online"] .s,.cu-pause-where .cu-online[data-state="online"] .p::before{display:none}
 .cu-pause-back{grid-column:3;grid-row:1}
}
/* phone: the slab is the screen; the crest stays beside the name, which steps to the 21 rung when it must */
@container cu-pause (max-width:640px){
 .cu-pause-slab{--slab-x:var(--cu-safe-left,env(safe-area-inset-left,0px));--slab-w:calc(100% - var(--cu-safe-left,env(safe-area-inset-left,0px)) - var(--cu-safe-right,env(safe-area-inset-right,0px)));--pl:12px;--pr:12px}
 .cu-pause-slab::before{left:-4px;right:-4px}
 .cu-pause-cloth::before,.cu-pause-cloth::after,.cu-pause-edge{display:none}
 .cu-pause-panel{clip-path:none;box-shadow:none;padding-bottom:var(--cu-safe-bottom,env(safe-area-inset-bottom,0px))}
 .cu-pause-head{padding-top:24px}
 .cu-pause-scroll{padding-bottom:20px}
 .cu-pause-list{flex:0 0 auto}
 .cu-pause-menu{flex:0 0 auto}
 .cu-pause-menu li.quit{margin-top:20px}
 .cu-pause-menu button{padding:6px 30px 6px 6px;gap:12px}
 .cu-pause-menu small{font-size:12px;line-height:16px;white-space:normal;text-wrap:balance;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
 .cu-pause-who{grid-template-columns:54px minmax(0,1fr);grid-template-areas:"crest note" "name name";column-gap:10px;padding:10px}
 .cu-who-note{align-self:center}
 /* the scroll hangs under the crest, as on the HUD crest, with the card's full width for the name */
 .cu-scroll{position:relative;z-index:1;margin-top:-4px}
 .cu-minicrest{width:48px;height:48px}
 .cu-minicrest>svg{clip-path:circle(23px at 50% 50%)}
 .cu-minicrest .x{width:14px;height:14px;background-size:14px 14px;left:-4px;top:-3px}
 .cu-minicrest .sh{width:14px;height:16px;background-size:14px 16px;right:-4px;top:-3px}
}
@container cu-pause (max-width:330px){
 .cu-pause-menu button{font-size:20px;line-height:24px}
 .cu-scroll{padding-inline:5px}
 .cu-pause-where{grid-column:1/-1}
 .cu-pause-back{grid-row:2}
}
/* short phones keep the list to labels too (the phone tier above sets how subtitles wrap) */
@container cu-pause (max-height:600px){.cu-pause-menu small{display:none}}
/* phone landscape: the head is one row, the player card stays on the left while the list scrolls on the right */
@container cu-pause (max-height:420px) and (min-width:500px){
 .cu-pause-slab{--pl:16px;--pr:16px}
 .cu-pause-head{padding-top:22px}
 .cu-pause-scroll{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:start;column-gap:20px;padding-top:10px;padding-bottom:12px}
 .cu-pause-who{position:sticky;top:0}
 .cu-pause-menu li.quit{margin-top:12px}
}

/* ---------- Touch: tap copy, a real Menu button, a back icon ---------- */
@media (hover:none) and (pointer:coarse){
 .cu-enter .k{display:none}
 .cu-enter .t{display:inline}
 .cu-lobby-walk{display:none}
 .cu-lobby-menu{min-height:48px;min-width:48px;padding:0 14px 0 12px}
 .cu-lobby-menu kbd,.cu-pause-back kbd{display:none}
 .cu-lobby-menu .cu-gl-menu{display:block}
 .cu-pause-back .cu-gl-back{display:block}
 .cu-pause-back{min-height:44px;padding:0 12px}
}

/* ---------- Idle life and moments, only for viewers who allow motion ---------- */
@media (prefers-reduced-motion:no-preference){
 .mf-screen.is-active .cu-lockup-in{animation:lm-stamp .5s steps(6) both}
 .mf-screen.is-active .cu-dust i{animation:lm-dust .6s steps(4) .42s both}
 .cu-lockup-word .g{animation:lm-glint 5s steps(24) 1.2s infinite}
 .cu-stage[data-tint="press"] .cu-tint[data-t="press"]::before{animation:lm-rays 60s steps(180) infinite alternate}
 .mf-screen.is-active .cu-enter{animation:lm-breathe 2.2s ease-in-out infinite}
 .cu-enter::before{animation:lm-nudge-l 1.6s steps(2) infinite}
 .cu-enter::after{animation:lm-nudge-r 1.6s steps(2) infinite}
 .cu-online[data-state="online"]:not([data-variant="state"],[data-variant="text"]) .dot::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid var(--c);animation:lm-ping 1.8s steps(6) infinite}
 .cu-online[data-state="connecting"] .s::after{animation:lm-dots 1.2s steps(4) infinite}
 .cu-plaza .pz-jet{animation:pz-jet 1.1s steps(3) infinite alternate}
 .cu-plaza .pz-flag{animation:pz-flap .9s steps(2) calc(var(--d,0)*-110ms) infinite}
 .cu-plaza .pz-bob{animation:pz-bob 1.4s steps(2) calc(var(--k,0)*-350ms) infinite}
 .cu-plaza .pz-light{animation:pz-twinkle 1.4s steps(2) calc(var(--d,0)*-470ms) infinite}
 .cu-stage[data-dive] .cu-plaza .pz-chibi{animation:pz-hop .5s var(--cu-ease-pop,cubic-bezier(.2,.9,.3,1.3)) calc(380ms + var(--k,0)*80ms) both}
 .cu-stage[data-dive] .cu-plaza .pz-light{animation:pz-chase .7s steps(2) calc(300ms + var(--d,0)*40ms) both}
 .cu-pause[data-peek="creator"] .pk-wave .pk-f{animation:pk-flip .8s steps(1) calc(var(--f,0)*200ms) infinite}
}
@keyframes lm-stamp{0%{scale:1.35;opacity:0}60%{scale:.96;opacity:1}100%{scale:1;opacity:1}}
@keyframes lm-dust{0%{opacity:1;translate:0 0}100%{opacity:0;translate:var(--x) var(--y)}}
@keyframes lm-glint{0%,64%{background-position:-80% 0}100%{background-position:180% 0}}
@keyframes lm-rays{to{--fa:18deg}}
@keyframes lm-breathe{50%{box-shadow:var(--edge),4px 4px 0 #231a2e99,var(--cu-glow-cta,0 0 28px #ffe2a366)}}
@keyframes lm-nudge-l{50%{translate:-4px 0}}
@keyframes lm-nudge-r{50%{translate:4px 0}}
@keyframes lm-ping{0%{scale:.6;opacity:1}100%{scale:1.7;opacity:0}}
@keyframes lm-dots{0%{width:0}100%{width:16px}}
@keyframes pz-jet{to{scale:1 1.18}}
@keyframes pz-flap{50%{transform:skewY(-8deg) scaleX(.9)}}
@keyframes pz-bob{50%{translate:0 -2px}}
@keyframes pz-twinkle{50%{opacity:.35}}
@keyframes pz-hop{40%{translate:0 -14px;scale:1 1.06}70%{translate:0 0;scale:1 .94}100%{translate:0 0;scale:1}}
@keyframes pz-chase{0%{fill:#fff3cd;opacity:.3}50%{fill:#ffe2a3;opacity:1}100%{fill:#fff3cd;opacity:1}}
@keyframes pk-flip{0%{visibility:visible}25%,100%{visibility:hidden}}

/* ---------- Reduced motion: every state still shows, as short fades; the camera cuts ---------- */
@media (prefers-reduced-motion:reduce){
 .cu-plaza>svg,.cu-backdrop{transition:none}
 .cu-stage .cu-backdrop svg{transition:none}
 .cu-stage .cu-backdrop [data-layer],.cu-stage:is([data-screen="press"],[data-screen="lobby"],[data-screen="pause"]) .cu-backdrop [data-layer="mid"]{transition:filter .16s linear}
 .cu-stage:is([data-screen="press"],[data-screen="lobby"],[data-screen="pause"]) .cu-topbar{transform:none;opacity:0;transition:opacity .16s linear,visibility 0s linear .16s}
 .mf-screen .cu-pause::before,.mf-screen.is-leaving .cu-pause::before{transition:opacity .16s linear}
 .mf-screen .cu-pause-slab,.mf-screen.is-leaving .cu-pause-slab{transform:none;opacity:0;transition:opacity .16s linear}
 .mf-screen:is(.is-active,.is-entering) .cu-pause-slab{opacity:1}
 .mf-screen.is-leaving .cu-lockup,.mf-screen.is-leaving .cu-enter{transform:none;scale:none}
 .cu-pause-peek{translate:none;transition:opacity .16s linear}
 .mf-screen.is-active .cu-pause-peeks{transition:opacity .16s linear .2s}
 .cu-pause-menu button{transition:color .12s linear}
 .cu-pause-menu button.is-sel{translate:none}
 .mf-screen.is-active .cu-pause-sel.on{transition:opacity .12s linear}
 .cu-enter{box-shadow:var(--edge),4px 4px 0 #231a2e99,0 0 20px #ffe2a344}
 .cu-online[data-state="connecting"] .s::after{width:12px}
 .cu-online .v.bump{animation:none}
}

/* ---------- B4-03 loop cap: at most 2 endless decorative loops on the title and lobby ----------
   Kept: the warm ember/flame ambience (plaza lights pz-twinkle, or the ember layer cu-rise on Last Light tint) and the
   selected-item shimmer (lm-breathe on the active Enter / selected CTA). Everything else rests on its first frame.
   The all-screens mockup opts out with <html data-loops="all">; low-spec and reduced motion still stop everything. */
:root:not([data-loops="all"]) .cu-stage .cu-lockup-word .g,
:root:not([data-loops="all"]) .cu-stage .cu-tint::before,
:root:not([data-loops="all"]) .cu-stage .cu-enter::before,
:root:not([data-loops="all"]) .cu-stage .cu-enter::after,
:root:not([data-loops="all"]) .cu-stage .cu-online .dot::after,
:root:not([data-loops="all"]) .cu-stage .cu-plaza .pz-jet,
:root:not([data-loops="all"]) .cu-stage .cu-plaza .pz-flag,
:root:not([data-loops="all"]) .cu-stage .cu-plaza .pz-bob,
:root:not([data-loops="all"]) .cu-stage .cu-backdrop [data-layer="near"]>*,
:root:not([data-loops="all"]) .cu-stage .cu-cta::after{animation:none}
:root:not([data-loops="all"]) .cu-stage .cu-online[data-state="connecting"] .s::after{animation:none;width:16px}
/* one ambience only: when the ember layer runs, the plaza lights rest */
:root:not([data-loops="all"]) .cu-stage[data-tint="lastlight"] .cu-plaza .pz-light{animation:none}
