:root{--coral:#f2766a;--coral-d:#e05d50;--coral-l:#ffe2dc;--teal:#0d6a6e;--teal-d:#0a5155;--teal-l:#d5efec;--cream:#fff8f0;--ink:#0f3b3e;--u:min(100vw,177.78vh)/100}
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}
body{font-family:Fredoka,system-ui,sans-serif;color:var(--ink);cursor:none}
button,a,input,select,textarea,label{cursor:none}
#counter{position:fixed;inset:-2%;background-size:cover;background-position:center;z-index:0}
#counter::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.28))}
#scene{position:relative;z-index:1;width:calc(var(--u)*100);height:calc(var(--u)*56.25);margin:0 auto;top:50%;transform:translateY(-50%)}
.install-note{position:fixed;top:8px;left:50%;transform:translateX(-50%);background:#fff3cd;padding:8px 14px;border-radius:10px;z-index:99;font-size:14px}
#band{position:absolute;top:0;left:0;right:0;height:calc(var(--u)*3.1);background:var(--coral);display:flex;gap:calc(var(--u)*1.6);align-items:center;padding:0 calc(var(--u)*2);color:var(--teal-d);font-weight:600;font-size:calc(var(--u)*1)}
#band::after{content:'';position:absolute;left:0;right:0;top:100%;height:calc(var(--u)*.7);background:radial-gradient(circle at calc(var(--u)*.5) 0,var(--coral) calc(var(--u)*.55),transparent calc(var(--u)*.6));background-size:calc(var(--u)*1.1) 100%}
#band span{position:relative}#band span:not(.how):hover::after{content:'';position:absolute;left:0;right:0;bottom:-3px;height:2px;background:var(--teal-d)}
#band .how{margin-inline-start:auto}.how .pop{display:none;position:absolute;top:130%;inset-inline-end:0;background:var(--cream);padding:12px;border-radius:10px;width:calc(var(--u)*22);line-height:1.7;box-shadow:0 8px 24px rgba(0,0,0,.25);z-index:30}
.how:hover .pop{display:block}.lang{color:#fff;font-weight:700;text-decoration:none}
#logo{position:absolute;left:calc(var(--u)*2.2);top:calc(var(--u)*4.6);display:flex;gap:calc(var(--u)*1)}
.lg{font-family:'Lilita One';font-size:calc(var(--u)*3.9);line-height:.82;-webkit-text-stroke:calc(var(--u)*.16) #fff;paint-order:stroke;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25));display:flex;flex-direction:column}
.lg .t{color:var(--teal)}.lg .c{color:var(--coral)}
#logo .tag{font-family:'Caveat Brush';color:var(--coral);font-size:calc(var(--u)*1.8);transform:rotate(-5deg)}
.sticker{position:absolute;font-family:'Caveat Brush';font-size:calc(var(--u)*2);z-index:5;pointer-events:none}
body.open .sticker{pointer-events:none} /* decorative only: a sticker must never swallow a drag meant for a pan beneath it */
.st1{top:calc(var(--u)*4.4);right:calc(var(--u)*3);color:var(--teal);transform:rotate(3deg)}
/* "Make it yours" lives in the bottom-left corner, BELOW the pans grid and
   clear of the centred bar — its old spot (top:51.6u, same band as the last
   pan row + the bar) painted it over the seaweed pan's name tag. It is
   anchored to the scene's bottom edge, so it can never drift into the
   bowl, the pans or the bar whatever box size is active. */
.st2{left:calc(var(--u)*2);bottom:calc(var(--u)*.5);color:var(--coral);transform:rotate(-3deg)}
.st3{right:calc(var(--u)*2.5);bottom:calc(var(--u)*1);color:var(--coral);transform:rotate(-6deg)}
#introCopy{position:absolute;left:calc(var(--u)*7);top:calc(var(--u)*17);width:calc(var(--u)*24);transition:.5s}
#introCopy h1{font-family:'Lilita One';color:var(--teal);font-size:calc(var(--u)*3.6);margin:0}
#introCopy p{font-size:calc(var(--u)*1.05)}
#closedBox{position:absolute;left:calc(var(--u)*32.5);top:calc(var(--u)*16.4);width:calc(var(--u)*38);height:calc(var(--u)*30);transform:rotate(-1deg);transition:.5s;z-index:6}
#closedBox:hover{transform:rotate(-1deg) translateY(-6px)}
#closedBox img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 10px rgba(0,0,0,.35))}
#openBtn{position:absolute;top:calc(var(--u)*46);left:50%;transform:translateX(-50%);background:var(--teal);color:#fff;border:0;border-radius:999px;padding:calc(var(--u)*.9) calc(var(--u)*2);font:600 calc(var(--u)*1.2) Fredoka;z-index:6}
body.open #closedBox,body.open #introCopy,body.open #openBtn{opacity:0;pointer-events:none;transform:translateY(-20px) rotate(-4deg)}
#pans,#bottles,#boxOpen,#bowl,#sideSpot,#sides,#bar,#extraTrays,.st2,.st3{opacity:0;pointer-events:none}
body.open #pans,body.open #bottles,body.open #boxOpen,body.open #bowl,body.open #sideSpot,body.open #sides,body.open #bar,body.open #extraTrays,body.open .st2,body.open .st3{opacity:1;pointer-events:auto;animation:spring .5s}
/* from-only keyframes: the animation must end on each element's OWN transform
   (e.g. the bar's translateX(-50%)). A filled 'to{transform:none}' used to stick
   forever and shoved the bottom bar half its width to the right. */
@keyframes spring{from{transform:translateY(30px) scale(.8)}}
/* Dragging must never scroll the page or trigger callouts on touch screens. */
.pan,.bottle,.side,.pile,#closedBox,#bowl{touch-action:none;-webkit-tap-highlight-color:transparent}
#scene{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.spr{background-repeat:no-repeat;filter:drop-shadow(0 10px 10px rgba(0,0,0,.35))}
#scene{overflow:visible}
/* Pans: a real 2-column grid in normal flow — every pan and every name tag gets
   its own space, so names can never overlap, stack or be clipped by a neighbour. */
#pans{position:absolute;left:calc(var(--u)*1.1);top:calc(var(--u)*15.8);width:calc(var(--u)*22.6);display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--u)*.9) calc(var(--u)*.8);z-index:4}
.pan{position:relative;width:100%;display:flex;flex-direction:column;align-items:center}
.pan:hover{transform:translateY(-5px) scale(1.03)}
.pan-spr{position:relative;width:100%;height:calc(var(--u)*6.4)}
.pan-spr img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px rgba(0,0,0,.3))}
.pan-spr .spr{position:absolute;left:0;top:0}
.ptag{position:static;transform:none;margin-top:calc(var(--u)*.3);background:var(--teal);color:#fff;border-radius:999px;padding:3px 9px;font-size:max(9px,calc(var(--u)*.8));line-height:1.3;white-space:normal;text-align:center;max-width:calc(var(--u)*11.8);overflow:visible;z-index:3}
.ptag .ic{background:#fff;border-radius:50%;padding:1px 4px;display:inline-block}
.pan.used .ptag{background:var(--coral)}
#bottles{position:absolute;left:calc(var(--u)*29);top:calc(var(--u)*4.4);display:flex;gap:calc(var(--u)*1.4);z-index:4}
.bottle{width:calc(var(--u)*5.6);height:calc(var(--u)*16);position:relative}
.bottle:hover{transform:translateY(-6px) rotate(-3deg)}
.bottle.held-src{opacity:0}
.b-spr{width:100%;height:84%;position:relative}
.b-spr img{width:100%;height:100%;object-fit:contain}
.b-spr .spr{position:absolute;left:0;top:0}
.btag{position:absolute;top:86%;left:50%;transform:translateX(-50%);background:var(--cream);border-radius:999px;padding:3px 8px;font-size:max(8px,calc(var(--u)*.78));line-height:1.25;white-space:normal;text-align:center;width:max-content;max-width:calc(var(--u)*7.6);z-index:5;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.bottle.used .btag{background:var(--teal);color:#fff}
/* The stage wraps box + bowl + side compartment. On desktop it is a transparent
   full-scene layer (children keep their scene coordinates, computed in PHP from
   the admin box size); on portrait phones it becomes the box-sized stage that
   the bowl / side compartment are positioned against in %. */
#stage{position:absolute;inset:0}
/* The box PICTURE slot: the image is contain-fitted inside this box and clipped
   to it — it physically cannot paint over the bowl layer next to it. */
#boxOpen{position:absolute;left:calc(var(--u)*29.5);top:calc(var(--u)*22.4);overflow:hidden;border-radius:calc(var(--u)*1)}
#boxOpen .boximg,#boxOpen .boxspr{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
/* The BOWL layer: NOT a child of the box and NOT sized or positioned by any
   image — PHP positions it from the admin box geometry (inline style), so it
   tracks the box at any size; the values here are the default-size fallback. */
#bowl{position:absolute;left:calc(var(--u)*31.4);top:calc(var(--u)*23.2);width:calc(var(--u)*24.6*var(--bscale,1));height:calc(var(--u)*25.6*var(--bscale,1));transition:box-shadow .2s;border-radius:50%;z-index:6}
#bowl.glow{box-shadow:0 0 0 calc(var(--u)*.5) var(--coral),0 0 30px var(--coral)}
#bowl .bowlimg,#bowl .bowl-spr{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
#bowl .r{opacity:0;transition:opacity .35s}#bowl.has-rice .r{opacity:1}#bowl.has-rice .e{opacity:0}
#bowl.squash{animation:squash .35s}@keyframes squash{40%{transform:scale(1.08,.9)}}
/* Piles, sauce and garnish cover the WHOLE bowl element (inset:0) and share
   the bowl's own coordinate system with the drop handler — the old inset
   layer (7%/2%, 86%x66%) shifted every pile up onto the bowl's top rim and
   squeezed the sauce into the top of the rice. The rice ellipse itself is
   enforced in JS (RICE) for drops and as the sauce canvas clip. */
#piles,#sauceCv,#garnish{position:absolute;inset:0;width:100%;height:100%}
#piles{z-index:2}.pile{position:absolute;width:42%;aspect-ratio:442/462;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center}
.pile img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 6px rgba(0,0,0,.3))}
.pile .spr{position:absolute;left:0;top:0}
.pile.drop{animation:drop .4s}@keyframes drop{0%{transform:translate(-50%,-90%) scale(1.25)}60%{transform:translate(-50%,-50%) scale(1.08,.9)}100%{transform:translate(-50%,-50%)}}
#sauceCv{z-index:3;pointer-events:none;touch-action:none}
#garnish{z-index:4;pointer-events:none}.gpiece{position:absolute;border-radius:2px;animation:gfall .5s both}
@keyframes gfall{from{transform:translateY(-160px);opacity:0}to{transform:none;opacity:1}}
/* The side compartment: sibling of the box picture, positioned by PHP from the
   box geometry so it always lands on the box's right compartment. */
#sideSpot{position:absolute;left:calc(var(--u)*56.4);top:calc(var(--u)*27.6);width:calc(var(--u)*12.6);height:calc(var(--u)*13.6);z-index:5}
.menucard{background:var(--cream);font-family:'Caveat Brush';color:var(--coral);transform:rotate(-2deg);padding:8px;border-radius:8px;text-align:center;font-size:calc(var(--u)*1.15);line-height:1.25;max-width:100%;overflow-wrap:break-word}
.slot.filled .menucard{display:none}
/* A filled side lives INSIDE its slot: the container clips to the slot, the
   single child is centred, and an uploaded image is contain-fitted. A side
   can no longer slide below its tray, spill out of it, or drag a neighbour
   sprite in with it. */
.sideIn{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;pointer-events:none}
#sideSpot .sideIn{position:absolute;inset:0}
.sideIn img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 8px 8px rgba(0,0,0,.3))}
.slot.dragover{outline:3px dashed var(--coral);outline-offset:4px;border-radius:12px}
/* Extra trays: a vertical column in the gap between the box (right edge 71.5u)
   and the sides shelf (left edge 86u), aligned with the box top (inline style).
   They used to sit at top:51u in a row UNDER the box — the same band as the
   bottom bar, and taller than the scene, so they overlapped the bar and were
   clipped off-screen. Tray height comes from PHP (--trayh) so any number of
   compartments fits between the box top and the bar band. */
#extraTrays{position:absolute;left:calc(var(--u)*72.6);top:calc(var(--u)*22.4);display:flex;flex-direction:column;gap:calc(var(--u)*.8);width:calc(var(--u)*12.4);z-index:4}
.tray{background:var(--teal);border-radius:12px;width:100%;height:calc(var(--u)*var(--trayh,9.5));flex:none;position:relative;padding:4px;box-shadow:inset 0 0 0 4px var(--teal-d);overflow:hidden}
.tray-name{color:#fff;font-size:calc(var(--u)*.8);position:relative;z-index:2}
.tray .sideIn{position:absolute;inset:20% 6% 5%}
/* Sides shelf: a vertical flex column in normal flow — each side and its full
   name tag get their own row, so tags never stack, overlap or get clipped. */
#sides{position:absolute;right:calc(var(--u)*1.4);top:calc(var(--u)*7.6);width:calc(var(--u)*12.6);display:flex;flex-direction:column;gap:calc(var(--u)*1);z-index:4}
.side{position:relative;width:100%;display:flex;flex-direction:column;align-items:center}
.side.dim{opacity:.35}
.s-spr{position:relative;width:100%;height:calc(var(--u)*8.2)}
.s-spr img{width:100%;height:100%;object-fit:contain}
.s-spr .spr{position:absolute;left:0;top:0}
.stag{background:var(--teal);color:#fff;border-radius:999px;padding:3px 8px;font-size:max(9px,calc(var(--u)*.8));line-height:1.3;text-align:center;white-space:normal;width:100%;overflow:visible;z-index:3}
#bar{position:absolute;top:calc(var(--u)*51.2);left:50%;transform:translateX(-50%);background:var(--cream);border-radius:999px;display:flex;gap:calc(var(--u)*1.2);align-items:center;padding:calc(var(--u)*.7) calc(var(--u)*1.4);box-shadow:0 8px 24px rgba(0,0,0,.2);z-index:8;max-width:97vw}
.steps{display:flex;gap:calc(var(--u)*.8)}.steps span{padding:4px 10px;border-radius:999px;font-size:calc(var(--u)*.9)}
.steps span.cur{background:var(--teal-l)}.steps i{font-style:normal;border:2px solid var(--teal);border-radius:50%;padding:0 6px;margin-inline-end:4px}
.steps span.done i{background:var(--teal);color:#fff}
#total{font-family:'Courier Prime';font-weight:700;font-size:calc(var(--u)*1.3)}
#pileCount{font-size:calc(var(--u)*.85);font-weight:600;background:var(--teal-l);border-radius:999px;padding:4px 10px;white-space:nowrap}
#pileCount.full{background:var(--coral);color:#fff}
.logoimg{height:calc(var(--u)*6.4);max-width:calc(var(--u)*16);object-fit:contain;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25))}
/* Box preset chips: the customer can pick one of the admin's enabled box
   presets; the builder re-layouts around it immediately. */
#boxChips{position:absolute;left:calc(var(--u)*1.1);top:calc(var(--u)*11.9);display:flex;gap:calc(var(--u)*.6);align-items:center;z-index:7;flex-wrap:wrap;max-width:calc(var(--u)*26)}
#boxChips .chips-label{font-weight:700;font-size:calc(var(--u)*.95);color:var(--teal-d);background:rgba(255,248,240,.85);padding:3px 8px;border-radius:999px}
.chip{background:var(--cream);border:2px solid var(--teal);color:var(--teal-d);border-radius:999px;padding:5px 12px;font:600 calc(var(--u)*.9) Fredoka;min-height:34px}
.chip.on{background:var(--teal);color:#fff}
body:not(.open) #boxChips{display:none}
#topOff{background:var(--coral);color:#fff;border:0;border-radius:999px;padding:8px 16px;font:600 calc(var(--u)*1) Fredoka}
#topOff:disabled{opacity:.4}#undo{background:none;border:0;text-decoration:underline;font:500 calc(var(--u)*.95) Fredoka}
#toast{position:absolute;left:50%;bottom:calc(var(--u)*7);transform:translateX(-50%) scale(0);background:var(--teal);color:#fff;padding:8px 18px;border-radius:999px;z-index:40;transition:transform .25s;font-size:calc(var(--u)*1)}
#toast.show{transform:translateX(-50%) scale(1)}
#held{position:fixed;z-index:60;pointer-events:none;filter:drop-shadow(0 14px 14px rgba(0,0,0,.4))}
#held img{width:100%}
/* The glove starts OFF-SCREEN (it used to sit at 0,0 covering the language
   button in the corner), is smaller and slightly translucent so it never
   hides the bowl / toppings / trays under it, and JS hides it entirely
   while the checkout modal is open. */
#glove{position:fixed;z-index:70;pointer-events:none;left:0;top:0;width:44px;height:47px;opacity:.88;transform:translate(-200px,-200px)}
#topOff,#undo{white-space:nowrap;flex:none}
.ptag{max-width:100%}
.pr{unicode-bidi:isolate}
#total{direction:ltr}
#receipt .link{font-family:Fredoka,system-ui,sans-serif;line-height:1.7;padding:6px}
#receipt #rcClose{position:absolute;top:6px;inset-inline-end:6px;width:36px;height:36px;border-radius:50%;border:0;background:var(--coral);color:#fff;font-size:16px;font-weight:700;cursor:pointer;z-index:3;margin:0;padding:0}
.flash{outline:3px solid var(--coral) !important;outline-offset:4px;border-radius:12px}
#band [data-go]{cursor:pointer}
#receipt,#receipt *,#checkout,#checkout *{cursor:auto}
#receipt button,#receipt label,#checkout button,#checkout label,.selwrap select{cursor:pointer}
#checkout input,#checkout textarea{cursor:text}
body.nativecur,body.nativecur *{cursor:auto}
#scene img{-webkit-user-drag:none;user-select:none}
#receipt{position:absolute;left:calc(var(--u)*1.5);top:calc(var(--u)*10);width:calc(var(--u)*21);background:var(--cream);padding:16px;transform:rotate(-1.2deg);z-index:20;border-radius:4px;box-shadow:0 10px 30px rgba(0,0,0,.3);font-family:'Courier Prime'}
#receipt h3{font-family:'Lilita One';color:var(--teal);margin:0;text-align:center}
.rc-sub{text-align:center;margin:2px}.r-total{display:flex;justify-content:space-between;font-weight:700}
#receipt button{width:100%;margin-top:8px;background:var(--teal);color:#fff;border:0;border-radius:8px;padding:9px;font:600 15px Fredoka}
#receipt .link,#ckClose.link{background:none;color:var(--teal);text-decoration:underline}
#checkout{position:fixed;inset:0;background:rgba(20,40,40,.35);backdrop-filter:blur(8px);z-index:80;display:flex;align-items:center;justify-content:center}
#checkout[hidden]{display:none}
.ck-card{background:var(--coral-l);transform:rotate(-1deg);border-radius:18px;padding:26px;width:min(430px,92vw);position:relative;animation:spring .4s;max-height:92dvh;overflow-y:auto}
.ck-card h2{font-family:'Lilita One';color:var(--teal-d)}
.ck-card label{display:block;margin:10px 0 4px;font-weight:600}
.ck-card input,.ck-card select,.ck-card textarea{width:100%;padding:10px;border-radius:8px;border:1px solid #bbb;font:500 15px Fredoka;cursor:auto;min-height:46px}
/* Dropdowns: the native arrow is replaced by a BIG chevron in a coloured
   disc (in .selwrap, built by JS around every <select>) so nobody can miss
   that the field opens a list. The select itself stays a real <select>:
   it opens/closes natively with mouse, touch and keyboard everywhere. */
.selwrap{position:relative}
.selwrap select{appearance:none;-webkit-appearance:none;padding-inline-end:46px;cursor:pointer;background:#fff}
.selwrap .chev{position:absolute;inset-inline-end:8px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;pointer-events:none}
.selwrap select.missing{outline:3px solid var(--coral);outline-offset:1px}
/* Close control: a big, obvious circular ✕ pinned to the card's corner —
   46px touch target, always visible, above the form. */
#ckClose{position:absolute;top:10px;inset-inline-end:10px;width:46px;height:46px;border-radius:50%;border:0;background:var(--coral);color:#fff;font-size:20px;font-weight:700;z-index:5;box-shadow:0 4px 12px rgba(0,0,0,.25);cursor:pointer}
#ckClose:hover{background:var(--coral-d)}
.ck-cancel{display:block;width:100%;margin-top:8px;background:none;border:0;color:var(--teal-d);text-decoration:underline;font:600 15px Fredoka;padding:10px;cursor:pointer;min-height:44px}
#placeOrder{background:var(--coral);color:#fff;border:0;border-radius:999px;padding:12px 20px;font:700 16px Fredoka;width:100%;margin-top:12px;min-height:48px}
.wa{display:block;background:#25d366;color:#fff;text-align:center;padding:11px;border-radius:999px;text-decoration:none;font-weight:700;margin:10px 0}
#again{background:var(--teal);color:#fff;border:0;border-radius:999px;padding:11px 18px;font:600 15px Fredoka;width:100%}
.tick{width:74px;height:74px;border-radius:50%;background:var(--teal);color:#fff;font-size:40px;display:flex;align-items:center;justify-content:center;margin:0 auto}
.err{color:#c0392b;min-height:1em}.ck-total{font-family:'Courier Prime';font-weight:700;margin-top:10px}
/* Small screens / portrait phones: the 16:9 scene gets small, so name tags get
   a readable px floor, are allowed to wrap onto two lines, and every container
   is overflow-visible — a name is NEVER cut off on any device. */
@media (max-width:700px){
 .steps span{font-size:11px}
 .ptag,.stag{font-size:max(9px,calc(var(--u)*.8));max-width:calc(var(--u)*12.5)}
 .btag{font-size:max(8px,calc(var(--u)*.78))}
 #pans,#sides,#bottles{overflow:visible}
 .pan-spr{height:calc(var(--u)*6.4)} .s-spr{height:calc(var(--u)*7.6)}
 #bar{max-width:96vw;flex-wrap:wrap;justify-content:center;border-radius:18px}
 #logo .tag{display:none}
}
@media (orientation:portrait) and (max-width:700px){
 /* keep the builder usable: tags stay legible even though u is small */
 .ptag,.stag,.btag{letter-spacing:0}
 #toast{font-size:max(11px,calc(var(--u)*1))}
}

/* =====================================================================
   PORTRAIT PHONES / TABLETS — the real mobile layout.
   The desktop scene is a 16:9 letterbox: on a portrait phone --u collapses
   to 100vw/100 and the WHOLE builder was squeezed into a ~219px-tall strip
   in the middle of the screen (tiny pans, unreadable tags, impossible taps,
   a 96px bowl). Here the scene becomes a tall, scrollable portrait canvas
   (100u wide, ~277u tall): bottles on top, then the stage (box + bowl +
   side compartment, positioned in px by layoutBox() so they stay aligned
   at ANY admin box size) IN THE MIDDLE, then the pans in a full-width grid
   directly under the stage, then the sides in a row, then the extra trays.
   The bar, toast and receipt become fixed overlays with real touch
   targets. All geometry is still in u (=1vw here), and every hit-test in
   the JS uses getBoundingClientRect, so dragging, sauce and drops keep
   working unchanged.
   ===================================================================== */
@media (orientation:portrait) and (max-width:1024px){
 html,body{height:auto;overflow-x:hidden;overflow-y:auto}
 #scene{width:100vw;height:calc(var(--u)*277);top:0;transform:none;margin:0}
 body:not(.open) #scene{height:calc(var(--u)*166)}
 #scene[data-trays="0"]{height:calc(var(--u)*260)}
 /* header band + logo */
 #band{height:calc(var(--u)*9);font-size:max(12px,calc(var(--u)*3.1));gap:calc(var(--u)*2.2);padding:0 calc(var(--u)*3);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
 #band span,#band a{flex:none;white-space:nowrap}
 #band::after{height:calc(var(--u)*1.4)}
 .how .pop{width:min(76vw,320px);font-size:13px;line-height:1.6}
 #logo{left:calc(var(--u)*4);top:calc(var(--u)*11.5);z-index:6}
 .lg{font-size:calc(var(--u)*8.6)}
 #logo .tag{display:block;font-size:calc(var(--u)*4.2)}
 .st1{top:calc(var(--u)*13);right:calc(var(--u)*3);font-size:calc(var(--u)*4.6)}
 body.open .st1{display:none} /* would crowd the bottles row once building */
 .st2,.st3{display:none}
 /* intro */
 #introCopy{left:calc(var(--u)*5);top:calc(var(--u)*27);width:calc(var(--u)*90);z-index:5}
 #introCopy h1{font-size:calc(var(--u)*8.6)}
 #introCopy p{font-size:max(14px,calc(var(--u)*3.9));line-height:1.55}
 #closedBox{left:calc(var(--u)*6);top:calc(var(--u)*70);width:calc(var(--u)*88);height:calc(var(--u)*62)}
 #openBtn{top:calc(var(--u)*140);font-size:max(15px,calc(var(--u)*4));padding:calc(var(--u)*2.4) calc(var(--u)*5);min-height:48px}
 /* PORTRAIT ORDER (top → bottom): band, logo, BOTTLES, box chips, the
    STAGE (box + bowl) IN THE MIDDLE, then the pans directly under it, then
    sides, then extra trays. The old layout put the pans first and the box
    at top:154u — the customer had to drag an ingredient the whole height
    of the phone (scrolling mid-drag) to reach the bowl. Now, on a typical
    390x844 phone (216u of visible height), the stage AND the pans are on
    screen together: every drag is a short hop with no scrolling. */
 /* bottles row (centred, big enough to grab) */
 #bottles{top:calc(var(--u)*22) !important;left:calc(50% - var(--u)*18.9);gap:calc(var(--u)*2.4);z-index:4}
 .bottle{width:calc(var(--u)*11);height:calc(var(--u)*25)}
 .btag{font-size:max(10px,calc(var(--u)*2.9));max-width:calc(var(--u)*16.5);padding:4px 8px}
 /* box chips: a wrapping row directly above the stage it resizes */
 #boxChips{left:calc(var(--u)*2);right:calc(var(--u)*2);top:calc(var(--u)*50.5);max-width:none}
 #boxChips .chips-label{font-size:max(11px,calc(var(--u)*3))}
 .chip{font-size:max(12px,calc(var(--u)*3.2));min-height:44px;padding:6px 14px}
 /* stage = the box, at the admin aspect ratio. Box / bowl / side-spot
    positions inside it are set IN PIXELS by layoutBox() in store.js from
    the active box definition — the same formulas as the desktop scene —
    so an admin size change or a preset chip re-layouts the phone too. */
 #stage{inset:auto;left:calc(var(--u)*2);top:calc(var(--u)*64);width:calc(var(--u)*96);aspect-ratio:var(--boxw,42)/var(--boxh,28)}
 .menucard{font-size:max(12px,calc(var(--u)*3.4));padding:6px}
 /* pans: full-width 2-column grid DIRECTLY under the stage, readable
    tags, 44px+ targets — a short drag up into the bowl, never a scroll. */
 #pans{left:calc(var(--u)*2);width:calc(var(--u)*96);top:calc(var(--u)*135);gap:calc(var(--u)*2)}
 .pan-spr{height:calc(var(--u)*13.5)}
 .ptag{font-size:max(11px,calc(var(--u)*3.1));max-width:calc(var(--u)*45);padding:5px 10px;line-height:1.35}
 /* sides: a wrapping row under the pans */
 #sides{left:calc(var(--u)*2);right:auto;width:calc(var(--u)*96);top:calc(var(--u)*217);flex-direction:row;flex-wrap:wrap;gap:calc(var(--u)*2)}
 .side{flex:1 1 28%;min-width:0}
 .s-spr{height:calc(var(--u)*14)}
 .stag{font-size:max(11px,calc(var(--u)*3));padding:5px 6px;line-height:1.35}
 /* extra trays: a row under the sides */
 #extraTrays{left:calc(var(--u)*2) !important;top:calc(var(--u)*240) !important;width:calc(var(--u)*96);flex-direction:row;gap:calc(var(--u)*2)}
 .tray{flex:1 1 0;width:auto;height:calc(var(--u)*15)}
 .tray-name{font-size:max(11px,calc(var(--u)*3))}
 /* fixed bottom bar with real touch targets */
 #bar{position:fixed;top:auto;bottom:10px;left:50%;transform:translateX(-50%);width:96vw;max-width:96vw;flex-wrap:wrap;justify-content:center;border-radius:20px;padding:calc(var(--u)*2) calc(var(--u)*3);gap:calc(var(--u)*2);z-index:86}
 .steps{gap:4px;flex-wrap:wrap;justify-content:center;min-width:0}
 .steps span{font-size:10.5px;padding:4px 6px;white-space:nowrap}
 #total{font-size:17px}
 #topOff{font-size:14px;padding:11px 18px;min-height:44px}
 #undo{font-size:13px;padding:10px 6px;min-height:44px}
 /* toast + receipt as fixed overlays */
 #toast{position:fixed;left:50%;bottom:164px;font-size:max(12px,calc(var(--u)*3.4));max-width:92vw;white-space:normal;text-align:center;z-index:90}
 #receipt{position:fixed;left:50%;top:9dvh;transform:translateX(-50%) rotate(-1.2deg);width:min(92vw,350px);max-height:80dvh;overflow-y:auto;z-index:88;font-size:14px}
 #glove{width:44px;height:47px}
}
/* Short landscape screens (phones on their side): keep the desktop scene but
   guarantee the bar and tags stay inside it. */
@media (orientation:landscape) and (max-height:500px){
 #bar{max-width:98vw;flex-wrap:wrap;justify-content:center;border-radius:18px}
 .ptag,.stag,.btag{line-height:1.25}
}
