/* ==========================================================================
   v10 kitchen (in-game) — same Western animated color-block look as menu-v10.css.
   Violet HUD, striped awning, cream counter, chunky tiles; art carries the detail.
   #stage prefixes win over the five older sheets without editing them.
   ========================================================================== */
#stage.game-screen{font-family:var(--x-font);--k-counter-1:#ffe6bd;--k-counter-2:#ffd093;--k-counter-edge:#f29b4c;--k-tile:#fff8e8;--k-tile-edge:#e2a566;--k-ink:#4a2a12;}
#stage.game-screen .sprite-art{filter:none;}

/* ---------------- Scene behind the customers ---------------- */
#stage.game-screen .game-scene{background:#ffd9a8;}
#stage.game-screen .game-scene>.kitchen-backdrop{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 78%;}
#stage.game-screen .game-shade{background:none;}

/* ---------------- HUD ---------------- */
#stage.game-screen .game-header{background:linear-gradient(var(--x-violet-1),var(--x-violet-2));border:0;border-radius:0;box-shadow:0 4px 0 var(--x-violet-3);color:#fff;z-index:6;}
#stage.game-screen .level-tag b{color:#fff;font-weight:1000;letter-spacing:1px;-webkit-text-stroke:4px var(--x-violet-3);paint-order:stroke fill;text-shadow:none;}
#stage.game-screen .level-tag small{color:#e9defF;text-shadow:none;}
#stage.game-screen .level-tag b>span{color:#ffe27a;-webkit-text-stroke:0;}
/* Pin + number instead of a word. */
#stage.game-screen .level-tag b.level-no{display:flex;align-items:center;gap:3px;line-height:1;}
#stage.game-screen .level-tag b.level-no>svg{width:30px;height:30px;flex:none;filter:drop-shadow(0 2px 0 var(--x-violet-3));}
#stage.game-screen .level-tag b.level-no>i{font-style:normal;}
/* The old red seal becomes A-Fu's face (cell 1,1 of the 3x2 mascot atlas). */
#stage.game-screen .level-tag .brand-seal{width:42px;height:42px;flex:none;border:3px solid #fff;border-radius:50%;font-size:0;color:transparent;text-shadow:none;
 background:#ffd36b url(./public/art/mascot-v10.png) 50% 100%/300% 200% no-repeat;box-shadow:0 3px 0 var(--x-violet-3);}
#stage.game-screen .game-header .icon-button{border:3px solid #fff;border-radius:50%;color:#fff;background:linear-gradient(var(--x-orange-1),var(--x-orange-2));box-shadow:0 4px 0 var(--x-orange-3);}
#stage.game-screen .game-header .icon-button:active{transform:translateY(3px);box-shadow:0 1px 0 var(--x-orange-3);}
/* Goal: the whole pill fills up green. */
#stage.game-screen .goal-hud{border:3px solid #fff;border-radius:20px;background:var(--x-violet-3);box-shadow:0 3px 0 #1f1147;}
#stage.game-screen #goal-label{display:flex;align-items:center;}
#stage.game-screen #goal-label>svg{width:30px;height:30px;color:#fff;filter:drop-shadow(0 2px 0 #0003);}
#stage.game-screen #goal-text{color:#fff;font-weight:1000;font-variant-numeric:tabular-nums;-webkit-text-stroke:4px var(--x-violet-3);paint-order:stroke fill;text-shadow:none;}
#stage.game-screen .goal-track{border:2px solid #fff;border-radius:9px;background:#1f1147;box-shadow:none;overflow:hidden;}
#stage.game-screen .goal-track>i,#stage.game-screen .achieved .goal-track>i{display:block;height:100%;border-radius:0 7px 7px 0;background:linear-gradient(var(--x-green-1),var(--x-green-2));box-shadow:inset 0 3px 0 #ffffff55;transition:width .25s ease-out;}
#stage.game-screen #combo-dots>i{border-color:#fff;}
#stage.game-screen .combo-hud{color:#fff;}
#stage.game-screen .customer-count{border:3px solid #fff;border-radius:20px;background:var(--x-violet-3);color:#fff;box-shadow:0 3px 0 #1f1147;justify-content:center;}
#stage.game-screen .customer-count>b{color:#fff;font-weight:1000;-webkit-text-stroke:4px var(--x-violet-3);paint-order:stroke fill;}
#stage.game-screen .customer-count .guest-count-icon>svg{width:28px;height:28px;filter:drop-shadow(0 2px 0 #0003);}

/* Striped awning with a scalloped edge hangs under the HUD. */
#stage.game-screen .awning{border:0;box-shadow:none;z-index:5;overflow:visible;background:repeating-linear-gradient(90deg,var(--x-orange-2) 0 30px,#fff6e0 30px 60px);}
#stage.game-screen .awning:before{display:none;}
#stage.game-screen .awning:after{content:"";position:absolute;left:0;right:0;top:100%;height:13px;pointer-events:none;
 background:repeating-linear-gradient(90deg,var(--x-orange-2) 0 30px,#fff6e0 30px 60px);
 -webkit-mask:radial-gradient(ellipse 15px 13px at 50% 0,#000 96%,#0000 100%) 0 0/30px 13px repeat-x;mask:radial-gradient(ellipse 15px 13px at 50% 0,#000 96%,#0000 100%) 0 0/30px 13px repeat-x;
 filter:drop-shadow(0 3px 0 #0000002e);}
#stage.game-screen .awning>span{border:3px solid #fff;border-radius:16px;background:var(--x-violet-2);color:#fff;box-shadow:0 3px 0 var(--x-violet-3);font-weight:900;}

/* ---------------- Customers and orders ---------------- */
#stage.game-screen .customer{background:none;border:0;box-shadow:none;}
#stage.game-screen .customer-person>svg{filter:drop-shadow(0 6px 0 #3a206022);}
#stage.game-screen .customer.impatient .customer-person{animation:k-fidget .5s ease-in-out infinite alternate;}
#stage.game-screen .order-bubble{border:0;border-radius:22px;background:#fff;box-shadow:0 5px 0 #3a20602e,0 0 0 3px #fff;}
#stage.game-screen .order-bubble:after{background:#fff;border:0;}
#stage.game-screen .order-item{border:0;background:none;box-shadow:none;}
#stage.game-screen .order-item.delivered>svg,#stage.game-screen .order-item.delivered>.iced-drink{opacity:.3;filter:grayscale(.6);}
#stage.game-screen .order-item>i{border:2px solid #fff;border-radius:50%;background:var(--x-green-2);color:#fff;box-shadow:0 2px 0 var(--x-green-3);}
#stage.game-screen .patience-meter{border:2px solid #fff;border-radius:8px;background:#3a206055;overflow:hidden;box-shadow:none;}
#stage.game-screen .patience-meter>i{border-radius:0;}
#stage.game-screen .vip-customer .order-bubble{box-shadow:0 5px 0 #c2550c55,0 0 0 4px var(--x-orange-1);}
#stage.game-screen .vip-label{border:3px solid #fff;background:var(--x-orange-2);color:#fff;box-shadow:0 3px 0 var(--x-orange-3);}

/* ---------------- Counter and kitchen ---------------- */
#stage.game-screen .counter-rail{border:0;border-radius:0;background:linear-gradient(#fffdf6,#fff1d6);box-shadow:0 5px 0 var(--k-counter-edge),0 -3px 0 #3a20601f;z-index:4;}
#stage.game-screen .counter-rail:before{display:none;}
#stage.game-screen .counter-rail>span{color:#d39a5c;text-shadow:none;}
#stage.game-screen .kitchen,#stage.game-screen.specialty-game .kitchen.specialty-counter{border:0;border-radius:0;background:linear-gradient(var(--k-counter-1),var(--k-counter-2));box-shadow:none;color:var(--k-ink);}
#stage.game-screen .station{border:0;background:none;box-shadow:none;}
#stage.game-screen .station-title b{color:var(--k-ink);}
#stage.game-screen .station-title small{color:#9a6a3c;}

/* Griddle: one dark hot plate with round burner spots. */
#stage.game-screen .griddle{border:4px solid #a59cc4;border-radius:24px;background:linear-gradient(#51476f,#3b3156);box-shadow:0 6px 0 #6f6693,inset 0 4px 0 #ffffff1f;}
#stage.game-screen .griddle-slot{border:0;border-radius:18px;background:radial-gradient(closest-side,#2d2545 0 82%,#2d254500 84%);box-shadow:none;overflow:visible;}
#stage.game-screen .griddle-slot.ready{background:radial-gradient(closest-side,#5a3a2a 0 82%,#5a3a2a00 84%);}
#stage.game-screen .griddle-slot.danger{background:radial-gradient(closest-side,#a53a2a 0 82%,#a53a2a00 84%);}
#stage.game-screen .griddle-slot>svg{filter:drop-shadow(0 4px 0 #0000003d);}
#stage.game-screen .griddle-cross{color:#ffffff59;font-size:30px;font-weight:900;text-shadow:none;}
#stage.game-screen .griddle-slot.locked{opacity:.5;background:radial-gradient(closest-side,#2d2545 0 82%,#2d254500 84%);}
#stage.game-screen .cook-ring{border:2px solid #fff;border-radius:8px;box-shadow:none;background:linear-gradient(0deg,var(--x-green-2) var(--progress),#1c143399 var(--progress));}
#stage.game-screen .ready .cook-ring{background:linear-gradient(0deg,var(--x-orange-1) var(--progress),#1c143399 var(--progress));}
#stage.game-screen .danger .cook-ring{background:linear-gradient(0deg,#ff5a3c var(--progress),#1c143399 var(--progress));}
#stage.game-screen .cook-status{border:2px solid #fff;border-radius:50%;background:var(--x-green-2);color:#fff;box-shadow:0 2px 0 var(--x-green-3);}
#stage.game-screen .cooking .cook-status{background:var(--x-orange-2);box-shadow:0 2px 0 var(--x-orange-3);}
#stage.game-screen .burnt .cook-status,#stage.game-screen .danger .cook-status{background:#f0492f;box-shadow:0 2px 0 #9c2413;}
#stage.game-screen .cook-status>svg{filter:none;}

/* Plates: a mint serving tray. */
#stage.game-screen .plates{border:4px solid #fff;border-radius:24px;background:linear-gradient(#bff0e2,#93dcc8);box-shadow:0 6px 0 #5fb7a1,inset 0 4px 0 #ffffff66;}
#stage.game-screen .plate-slot{border:0;border-radius:18px;background:none;box-shadow:none;}
#stage.game-screen .plate-slot.full{background:radial-gradient(closest-side,#ffffff73 0 80%,#fff0 82%);}
#stage.game-screen .plate-dish,#stage.game-screen .plate-slot.empty .plate-dish{border:0;background:none;box-shadow:none;}
#stage.game-screen .plate-dish>svg{filter:drop-shadow(0 4px 0 #2d7f6b33);}
#stage.game-screen .plate-slot.empty .plate-dish>svg{opacity:.8;}
#stage.game-screen .plate-slot small{color:#2d6f5f;}

/* Ingredient tiles: art only, thick bottom edge like every other button. */
#stage.game-screen .ingredient{border:0;border-radius:18px;background:linear-gradient(#fff,var(--k-tile));box-shadow:0 5px 0 var(--k-tile-edge),0 0 0 3px #fff;color:var(--k-ink);}
#stage.game-screen .ingredient:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 var(--k-tile-edge),0 0 0 3px #fff;}
#stage.game-screen .ingredient>span>svg{filter:drop-shadow(0 3px 0 #0000001f);}
#stage.game-screen .ingredient:disabled{border:0;background:#e9dcc6;box-shadow:0 5px 0 #c7b594,0 0 0 3px #f4ead8;}
#stage.game-screen .ingredient b{color:var(--k-ink);}
#stage.game-screen .ingredient small{color:#9a6a3c;}
#stage.game-screen .toppings .ingredient>svg:last-child{background:#fff;border-radius:50%;}

/* Winter melon tea row. */
#stage.game-screen .tea-station{border:0;background:none;box-shadow:none;}
#stage.game-screen .tea-dispenser>svg{filter:drop-shadow(0 4px 0 #0000001f);}
#stage.game-screen .tea-tray{border:3px solid #fff;border-radius:20px;background:linear-gradient(#ffd9a3,#ffbf73);box-shadow:0 5px 0 #e08f3f,inset 0 3px 0 #ffffff66;}
#stage.game-screen .tea-cup{border-radius:14px;}
#stage.game-screen .tea-cup.filled:active{background:#ffffff66;}
#stage.game-screen .tea-cup>svg{filter:drop-shadow(0 3px 0 #0000001f);}
#stage.game-screen .cup-outline{border:3px dashed #ffffffd9;border-radius:6px 6px 12px 12px;background:#ffffff40;}
#stage.game-screen .tea-refill>div{border:2px solid #fff;border-radius:6px;background:#3a206055;}
#stage.game-screen .tea-refill i{background:linear-gradient(var(--x-green-1),var(--x-green-2));}

/* Tea shop and grill work counters. */
#stage.game-screen #stall-work{gap:8px;padding:4px 4px 0;scrollbar-width:none;touch-action:pan-y;}
#stage.game-screen #stall-work::-webkit-scrollbar{display:none;}
#stage.game-screen .work-bays,#stage.game-screen .work-tools{gap:8px 10px;}
#stage.game-screen .work-control{border:0;border-radius:18px;background:linear-gradient(#fff,var(--k-tile));box-shadow:0 5px 0 var(--k-tile-edge),0 0 0 3px #fff;color:var(--k-ink);}
#stage.game-screen .work-control:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 var(--k-tile-edge),0 0 0 3px #fff;}
#stage.game-screen .work-control>b{font-weight:900;color:var(--k-ink);}
#stage.game-screen .work-control .work-art>svg{filter:drop-shadow(0 3px 0 #0000001f);}
#stage.game-screen .work-bays .work-control{background:linear-gradient(#c9f3e7,#9fe0cd);box-shadow:0 6px 0 #5fb7a1,0 0 0 4px #fff;}
#stage.game-screen.grill .work-bays .work-control{background:linear-gradient(#5b5078,#3f3559);box-shadow:0 6px 0 #6f6693,0 0 0 4px #a59cc4;color:#fff;}
#stage.game-screen.grill .work-bays .work-control>b{color:#fff;}
#stage.game-screen .work-bays .work-control:disabled{filter:none;opacity:1;}
#stage.game-screen .work-tools .work-control:disabled{filter:none;background:#e9dcc6;box-shadow:0 5px 0 #c7b594,0 0 0 3px #f4ead8;}
#stage.game-screen .work-control.chosen{outline:0;background:linear-gradient(var(--x-orange-1),#ffb347);box-shadow:0 5px 0 var(--x-orange-3),0 0 0 4px #fff;transform:translateY(-3px);}
#stage.game-screen .bay-meter{height:9px;border:2px solid #fff;border-radius:7px;background:#3a206055;}
#stage.game-screen .bay-meter i{background:linear-gradient(var(--x-green-1),var(--x-green-2));}
#stage.game-screen .work-foot{color:#8a5a2f;font-weight:700;}
#stage.game-screen .work-foot .work-control{background:linear-gradient(#ff8c7a,#f0492f);box-shadow:0 5px 0 #9c2413,0 0 0 3px #fff;color:#fff;}
#stage.game-screen .work-foot .work-control>b{color:#fff;}

/* ---------------- Footer ---------------- */
#stage.game-screen .game-footer{border:0;background:linear-gradient(var(--x-violet-2),var(--x-violet-3));box-shadow:0 -4px 0 #ffffff33;color:#fff;}
#stage.game-screen .game-footer>span,#stage.game-screen .game-footer b{color:#fff;text-shadow:none;}
#stage.game-screen .game-footer b{font-weight:1000;font-variant-numeric:tabular-nums;}
#stage.game-screen .game-footer .game-tip{color:#e9defF;}
#stage.game-screen .game-footer>button{border:3px solid #fff;border-radius:16px;background:linear-gradient(var(--x-violet-1),var(--x-violet-2));color:#fff;box-shadow:0 3px 0 #1f1147;}
#stage.game-screen .rule-chip{color:#fff;}

/* ---------------- Tutorial card ---------------- */
#stage.game-screen .tutorial-card{border:3px solid #fff;border-radius:22px;background:linear-gradient(var(--x-violet-1),var(--x-violet-2));box-shadow:0 5px 0 var(--x-violet-3);color:#fff;}
#stage.game-screen .tutorial-card :is(b,p,small){color:#fff;text-shadow:none;font-weight:800;}
#stage.game-screen .tutorial-card>button{border:3px solid #fff;border-radius:16px;background:linear-gradient(var(--x-orange-1),var(--x-orange-2));box-shadow:0 3px 0 var(--x-orange-3);color:#fff;font-weight:900;}
#stage.game-screen .tutorial-target{outline-color:#fff !important;box-shadow:0 0 0 6px var(--x-orange-1),0 0 22px #ffe27a !important;}

/* ---------------- Night-open banner ---------------- */
#stage.game-screen #opening-banner{background:linear-gradient(#5b3bb0f2,#35206ef7);color:#fff;}
#stage.game-screen #opening-banner small{color:#ffe27a;font-weight:900;letter-spacing:2px;}
#stage.game-screen #opening-banner b{color:#fff;text-shadow:0 4px 0 var(--x-violet-3);font-weight:1000;}
#stage.game-screen #opening-banner span{color:#e9defF;}

/* ==========================================================================
   Phone layout: everything bleeds to the screen edge, no tan frame.
   ========================================================================== */
#stage.game-screen.portrait-layout{background:var(--k-counter-2);box-shadow:none;grid-template-columns:minmax(0,1fr);
 --k-bleed-l:calc(-1 * var(--safe-left));--k-bleed-r:calc(-1 * var(--safe-right));}
#stage.game-screen.portrait-layout .game-scene{top:0;left:0;right:0;height:calc(50% + var(--safe-top) / 2);}
#stage.game-screen.portrait-layout .game-header{margin:calc(-1 * var(--safe-top)) var(--k-bleed-r) 0 var(--k-bleed-l);padding:calc(var(--safe-top) + 4px) calc(var(--safe-right) + 2px) 6px calc(var(--safe-left) + 2px);
 align-self:start;height:calc(100% + var(--safe-top) - 12px);box-shadow:none;grid-template-columns:minmax(0,1fr) 84px;grid-template-rows:42px 36px;gap:4px 10px;border-radius:0;}
#stage.game-screen.portrait-layout .level-tag b{font-size:28px;}
#stage.game-screen.portrait-layout .game-header-right>.icon-button{width:48px;height:48px;min-width:48px;min-height:48px;align-self:center;}
/* Goal on phones: the whole pill fills up green behind the number. */
#stage.game-screen.portrait-layout .goal-hud{position:relative;overflow:hidden;height:36px;padding:0;border-width:3px;}
#stage.game-screen.portrait-layout .goal-hud>div:first-child{position:relative;z-index:1;height:100%;margin:0;padding:0 12px 0 5px;display:flex;align-items:center;justify-content:space-between;gap:6px;line-height:1;}
#stage.game-screen.portrait-layout .goal-track{position:absolute;inset:0;width:auto;height:auto;margin:0;border:0;border-radius:0;background:none;}
#stage.game-screen.portrait-layout .goal-track>i{border-radius:0 14px 14px 0;}
#stage.game-screen.portrait-layout #goal-text{font-size:22px;line-height:1;}
#stage.game-screen.portrait-layout #goal-label>svg{width:30px;height:30px;}
#stage.game-screen.portrait-layout .customer-count{height:36px;padding:0 8px;gap:4px;border-radius:20px;}
#stage.game-screen.portrait-layout .customer-count>b{font-size:22px;line-height:1;}
/* The stripes sit in the last 12px of the header row and the scallops in the awning's own row, so nothing covers the guests. */
#stage.game-screen.portrait-layout .awning{margin:0 var(--k-bleed-r) 0 var(--k-bleed-l);height:auto;min-height:0;transform:translateY(-100%);}
#stage.game-screen.portrait-layout .patience-meter{width:8px;}
#stage.game-screen.portrait-layout .order-bubble:after{border:0;}
#stage.game-screen.portrait-layout .counter-rail{margin:0 var(--k-bleed-r) 0 var(--k-bleed-l);height:auto;border:0;}
#stage.game-screen.portrait-layout .kitchen{margin:0 var(--k-bleed-r) 0 var(--k-bleed-l);padding:12px calc(var(--safe-right) + 2px) 10px calc(var(--safe-left) + 2px);gap:12px 10px;border:0;
 grid-template-rows:minmax(112px,1fr) 60px 58px;}
#stage.game-screen.portrait-layout .griddle,#stage.game-screen.portrait-layout .plates{padding:6px;gap:4px;border-width:4px;}
#stage.game-screen.portrait-layout .griddle-slot,#stage.game-screen.portrait-layout .plate-slot{padding:3px;}
#stage.game-screen.portrait-layout .griddle-slot>.cook-status{right:0;bottom:0;width:28px;height:28px;border-radius:50%;}
#stage.game-screen.portrait-layout .cook-ring{left:0;bottom:6px;width:10px;height:66%;}
#stage.game-screen.portrait-layout .ingredient{padding:3px;background:linear-gradient(#fff,var(--k-tile));}
#stage.game-screen.portrait-layout .ingredient:disabled{border:0;background:#e9dcc6;}
#stage.game-screen.portrait-layout .ingredient>span>svg{max-height:58px;}
#stage.game-screen.portrait-layout .tea-station{grid-template-columns:56px minmax(0,1fr);gap:10px;}
#stage.game-screen.portrait-layout .tea-dispenser{width:56px;height:56px;}
#stage.game-screen.portrait-layout .tea-tray{padding:2px 8px;border-width:3px;}
#stage.game-screen.portrait-layout .tea-refill{width:56px;}
#stage.game-screen.portrait-layout .tea-refill>div{height:8px;}
#stage.game-screen.portrait-layout.specialty-game .kitchen.specialty-counter{padding:12px calc(var(--safe-right) + 2px) 10px calc(var(--safe-left) + 2px);}
#stage.game-screen.portrait-layout #stall-work{justify-content:space-between;}
#stage.game-screen.portrait-layout .work-bays .work-control{min-height:98px;padding:4px 3px 6px;}
#stage.game-screen.portrait-layout .work-bays .work-art{height:clamp(54px,8vh,72px);}
#stage.game-screen.portrait-layout .work-tools{grid-template-columns:repeat(4,minmax(0,1fr));}
#stage.game-screen.portrait-layout .work-tools .work-control{min-height:68px;}
#stage.game-screen.portrait-layout .work-tools .work-art{width:44px;height:44px;}
#stage.game-screen.portrait-layout .work-foot .work-control{min-height:44px;flex-basis:60px;}
#stage.game-screen.portrait-layout .game-footer{margin:0 var(--k-bleed-r) calc(-1 * var(--safe-bottom)) var(--k-bleed-l);padding:4px calc(var(--safe-right) + 6px) calc(var(--safe-bottom) + 4px) calc(var(--safe-left) + 6px);background:linear-gradient(var(--x-violet-2),var(--x-violet-3));}
#stage.game-screen.portrait-layout .game-footer>span{justify-content:center;font-size:18px;color:#fff;}
#stage.game-screen.portrait-layout .game-footer b{font-size:22px;color:#fff;}
#stage.game-screen.portrait-layout .game-footer>span>svg{width:30px;height:30px;}
#stage.game-screen.portrait-layout .game-footer .game-tip.challenge-status{color:#fff;}
#stage.game-screen.portrait-layout.short-layout .game-header{grid-template-rows:40px 34px;padding-top:calc(var(--safe-top) + 2px);padding-bottom:4px;}
#stage.game-screen.portrait-layout.short-layout .goal-hud,#stage.game-screen.portrait-layout.short-layout .customer-count{height:34px;}
#stage.game-screen.portrait-layout.short-layout .level-tag .brand-seal{width:38px;height:38px;}
#stage.game-screen.portrait-layout.short-layout .game-header-right>.icon-button{width:46px;height:46px;min-width:46px;min-height:46px;}
#stage.game-screen.portrait-layout.tight-layout .game-header{grid-template-rows:38px 34px;}
#stage.game-screen.portrait-layout.short-layout .kitchen{padding-top:9px;gap:9px 10px;grid-template-rows:minmax(104px,1fr) 54px 52px;}
#stage.game-screen.portrait-layout.compact-layout .work-bays .work-control{min-height:68px;padding:3px 3px 5px;}
#stage.game-screen.portrait-layout.compact-layout .work-foot{font-size:12px;line-height:1.25;}
#stage.game-screen.portrait-layout.compact-layout .work-foot .work-control{min-height:40px;}
#stage.game-screen.portrait-layout.compact-layout .work-bays .work-art{height:36px;}
#stage.game-screen.portrait-layout.compact-layout .work-tools .work-control{min-height:50px;}
#stage.game-screen.portrait-layout.compact-layout .work-tools .work-art{width:30px;height:30px;}
#stage.game-screen.portrait-layout.compact-layout .work-control>b{font-size:13px;line-height:16px;}

/* ==========================================================================
   Wordless kitchen: pictures, badges and numbers instead of labels.
   The words stay in the page for screen readers (visually hidden).
   ========================================================================== */
#stage.game-screen .work-control>b,#stage.game-screen .work-hint{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;}
#stage.game-screen .work-control{overflow:visible;}
#stage.game-screen .work-status{position:absolute;right:-5px;top:-7px;z-index:2;width:32px;height:32px;display:grid;place-items:center;border:3px solid #fff;border-radius:50%;
 background:var(--x-green-2);color:#fff;box-shadow:0 3px 0 var(--x-green-3);pointer-events:none;}
#stage.game-screen .work-status[hidden],#stage.game-screen .work-count[hidden]{display:none;}
#stage.game-screen .work-status>svg,#stage.game-screen .work-bays .work-status>svg{width:18px;height:18px;max-width:none;filter:none;}
#stage.game-screen :is([data-status="wait"],[data-status="turn"]) .work-status>svg{width:100%;height:100%;}
#stage.game-screen [data-status^="apply:"] .work-status>svg{width:30px;height:30px;}
#stage.game-screen [data-status="cooking"] .work-status>svg{width:22px;height:22px;}
#stage.game-screen [data-status="ready"]{animation:k-ready .7s ease-in-out infinite alternate;}
#stage.game-screen [data-status="cooking"] .work-status{background:var(--x-orange-2);box-shadow:0 3px 0 var(--x-orange-3);}
#stage.game-screen [data-status="burnt"] .work-status{background:#f0492f;box-shadow:0 3px 0 #9c2413;}
#stage.game-screen :is([data-status="wait"],[data-status="turn"]) .work-status{width:38px;height:38px;right:-8px;top:-10px;border:0;border-radius:0;background:none;box-shadow:none;filter:drop-shadow(0 2px 0 #0003);}
#stage.game-screen [data-status="turn"] .work-status{width:46px;height:46px;animation:k-spin 1s ease-in-out infinite;}
#stage.game-screen [data-status="turn"]{box-shadow:0 6px 0 var(--x-orange-3),0 0 0 4px var(--x-orange-1) !important;}
#stage.game-screen [data-status^="apply:"] .work-status{width:40px;height:40px;right:-8px;top:-10px;background:#fff;box-shadow:0 3px 0 var(--x-orange-3),0 0 0 3px var(--x-orange-1);animation:k-ready .5s ease-in-out infinite alternate;}
#stage.game-screen [data-status^="apply:"]{box-shadow:0 6px 0 var(--x-orange-3),0 0 0 4px var(--x-orange-1) !important;}
#stage.game-screen .work-count{position:absolute;right:3px;bottom:5px;z-index:2;padding:0 7px;border:2px solid #fff;border-radius:11px;background:var(--x-violet-2);color:#fff;
 font-style:normal;font-weight:1000;font-size:13px;line-height:18px;font-variant-numeric:tabular-nums;pointer-events:none;}
#stage.game-screen .work-control .bay-meter{position:absolute;left:12%;right:12%;bottom:7px;width:auto;}
#stage.game-screen.portrait-layout .work-bays .work-control{padding:4px 3px 18px;}
#stage.game-screen.portrait-layout .work-bays .work-art{height:clamp(58px,9vh,80px);}
#stage.game-screen.portrait-layout .work-tools .work-art{width:54px;height:54px;}
#stage.game-screen.portrait-layout .work-foot{justify-content:flex-end;}
#stage.game-screen.portrait-layout .work-foot .work-control{flex-basis:64px;}
#stage.game-screen.portrait-layout.compact-layout .work-bays .work-control{padding:3px 3px 15px;}
#stage.game-screen.portrait-layout.compact-layout .work-bays .work-art{height:44px;}
#stage.game-screen.portrait-layout.compact-layout .work-tools .work-art{width:40px;height:40px;}
#stage.game-screen.portrait-layout.compact-layout .work-status{width:28px;height:28px;}

/* Challenge rules in the footer: picture + count. */
#stage.game-screen .rule-chip{display:inline-flex;align-items:center;gap:4px;padding:0 10px 0 4px;border-radius:14px;background:#1f114799;color:#fff;}
#stage.game-screen .rule-chip>svg{width:26px;height:26px;flex:none;}
#stage.game-screen .rule-chip>b{color:#fff;font-weight:1000;font-variant-numeric:tabular-nums;}
#stage.game-screen .rule-chip.passed>b{color:var(--x-green-1);}
#stage.game-screen .rule-warning .rule-chip:not(.passed){background:#f0492f;}
#stage.game-screen.portrait-layout .game-footer .game-tip.challenge-status{justify-content:center;gap:12px;}

/* Tutorial: A-Fu, a picture strip of the step, progress dots, and a hand tapping the target. */
#stage.game-screen .tutorial-demo{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:0 4px;}
#stage.game-screen .tutorial-strip{display:flex;align-items:center;gap:4px;padding:2px 10px;border-radius:16px;background:#ffffff26;}
#stage.game-screen .tutorial-strip>svg{width:44px;height:44px;flex:none;filter:drop-shadow(0 2px 0 #0003);}
#stage.game-screen .tutorial-arrow{display:grid;place-items:center;color:#ffe27a;}
#stage.game-screen .tutorial-arrow>svg{width:22px;height:22px;}
#stage.game-screen .tutorial-dots{display:flex;gap:5px;flex:none;}
#stage.game-screen .tutorial-dots>i{width:10px;height:10px;border-radius:50%;background:#ffffff40;}
#stage.game-screen .tutorial-dots>i.done{background:var(--x-green-1);box-shadow:0 0 0 2px #fff;}
#stage.game-screen .tutorial-card>button>svg{width:24px;height:24px;color:#fff;}
#stage.game-screen .tutorial-target{z-index:20;overflow:visible;}
/* While the first pancake cooks there is nothing to tap: the hourglass in the strip says wait. */
#stage.game-screen .tutorial-strip>.hint-hourglass{animation:k-spin 1.6s ease-in-out infinite;}
#stage.game-screen .tutorial-target::after{content:none;}
#stage.game-screen .tutorial-target:not(.tutorial-wait)::after{content:"";position:absolute;left:46%;top:46%;right:auto;bottom:auto;z-index:30;width:72px;height:72px;padding:0;border:0;border-radius:0;box-shadow:none;font-size:0;pointer-events:none;
 background:url(./public/art/hints-v10.png) 0 0/300% 200% no-repeat;filter:drop-shadow(0 4px 0 #0000004d);transform-origin:10% 10%;animation:k-tap .9s ease-in-out infinite;}

/* Night-open banner: goal picture + number, guests picture + number. */
#stage.game-screen #opening-banner{gap:18px;}
#stage.game-screen #opening-banner>b{display:flex;align-items:center;gap:12px;font-size:64px;line-height:1;font-variant-numeric:tabular-nums;-webkit-text-stroke:6px var(--x-violet-3);paint-order:stroke fill;text-shadow:none;}
#stage.game-screen #opening-banner>b>svg{width:68px;height:68px;color:#fff;}
#stage.game-screen #opening-banner>span{display:flex;align-items:center;gap:8px;font-size:36px;font-weight:1000;color:#fff;}
#stage.game-screen #opening-banner>span>i{font-style:normal;}
#stage.game-screen #opening-banner>span>svg{width:44px;height:44px;}

/* Floating feedback: number + picture. */
#stage.game-screen .floating-text{display:flex;align-items:center;gap:4px;color:#fff;font-weight:1000;text-shadow:none;-webkit-text-stroke:5px var(--x-violet-3);paint-order:stroke fill;}
#stage.game-screen .floating-text>svg{width:34px;height:34px;flex:none;}
#stage.game-screen .floating-text.combo{color:#ffe27a;}

/* Wide layout: the same pictures carry the meaning, so captions go; keyboard keys stay. */
#stage.game-screen :is(.station-title,.ingredient>div,.plate-slot>small,.counter-rail>span,.customer-place,#combo-label,.awning>span,.level-tag small,.level-tag b>span,.tea-refill>span){display:none;}
#stage.game-screen .game-tip:not(.challenge-status){display:none;}
#stage.game-screen .game-footer>button{font-size:0;gap:0;}
#stage.game-screen .game-footer>button>svg{width:22px;height:22px;}

/* A mistake shakes the place it happened instead of showing a sentence. */
#stage .nudge{animation:k-nope .42s ease-in-out;}
#stage.game-screen :is(#griddle,#plates,#tea-tray,.work-bays,.work-control,.plate-action-grid).nudge{outline:4px solid #ff5a3c;outline-offset:2px;border-radius:22px;}
#stage.game-screen #customers.nudge .order-bubble{box-shadow:0 5px 0 #9c241355,0 0 0 4px #ff5a3c;}
#stage.game-screen .floating-text.lost>svg{width:46px;height:46px;}
@keyframes k-nope{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
@keyframes k-ready{from{transform:translateY(0)}to{transform:translateY(-4px)}}
@keyframes k-spin{0%,20%{transform:rotate(0)}80%,100%{transform:rotate(180deg)}}
@keyframes k-tap{0%,100%{transform:translate(8px,8px) scale(1)}50%{transform:translate(0,0) scale(.88)}}
@keyframes k-fidget{from{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg)}}
@media (prefers-reduced-motion:reduce){#stage.game-screen .customer.impatient .customer-person,#stage.game-screen [data-status],#stage.game-screen .work-status,#stage.game-screen .tutorial-target::after{animation:none !important;}}

/* ---------------- Stage 2: egg basket and lemon tub ---------------- */
/* Portrait: four ingredient tiles under the two working areas (dough, egg | basil, cheese) and the lemon beside the cups. */
#stage.game-screen.portrait-layout .kitchen{grid-template-columns:repeat(12,minmax(0,1fr));}
#stage.game-screen.portrait-layout .griddle{grid-column:1/7;}
#stage.game-screen.portrait-layout .plates{grid-column:7/13;}
#stage.game-screen.portrait-layout .raw-ingredient{grid-column:1/4;grid-row:2;}
#stage.game-screen.portrait-layout .egg-ingredient{grid-column:4/7;grid-row:2;}
#stage.game-screen.portrait-layout .toppings .ingredient[data-action="basil"]{grid-column:7/10;grid-row:2;}
#stage.game-screen.portrait-layout .toppings .ingredient[data-action="cheese"]{grid-column:10/13;grid-row:2;}
#stage.game-screen.portrait-layout .tea-station{grid-template-columns:56px minmax(0,1fr) 72px;}
#stage.game-screen.portrait-layout .lemon-ingredient{grid-column:3;grid-row:1;height:100%;min-height:0;}
#stage.game-screen .ingredient{position:relative;}
#stage.game-screen .ingredient>svg:last-child{position:absolute;top:2px;right:2px;width:22px;height:22px;padding:2px;border-radius:50%;background:#fff;}
#stage.game-screen .ingredient:disabled>span{filter:grayscale(1);opacity:.55;}
/* Desktop: the egg basket sits beside the dough, the lemon tub under the cups. */
#stage.game-screen:not(.portrait-layout) .griddle-station{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;column-gap:11px;}
#stage.game-screen:not(.portrait-layout) .griddle-station>:is(.station-title,.griddle){grid-column:1/-1;}
#stage.game-screen:not(.portrait-layout) .egg-ingredient{height:76px;min-height:76px;margin-top:12px;}
#stage.game-screen:not(.portrait-layout) .tea-dispenser{height:100px;}
#stage.game-screen:not(.portrait-layout) .lemon-ingredient{height:58px;min-height:58px;margin-top:8px;width:100%;}
#stage.game-screen:not(.portrait-layout) .lemon-ingredient>span>svg{width:54px;height:50px;}
/* A new ingredient pulses until it has been used once in the level that introduces it. */
#stage.game-screen .ingredient.fresh-tool:not(.used):not(:disabled){animation:freshTool 1.1s ease-in-out infinite;}
@keyframes freshTool{0%,100%{box-shadow:0 5px 0 var(--k-tile-edge),0 0 0 3px #fff,0 0 0 4px #ffcf3a00;}50%{box-shadow:0 5px 0 var(--k-tile-edge),0 0 0 3px #fff,0 0 0 9px #ffcf3a;}}
@media (prefers-reduced-motion:reduce){#stage.game-screen .ingredient.fresh-tool:not(.used):not(:disabled){animation:none;box-shadow:0 5px 0 var(--k-tile-edge),0 0 0 3px #fff,0 0 0 7px #ffcf3a;}}
/* The recipe of a new dish on the opening banner. */
#stage.game-screen #opening-banner>.w-recipe{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:26px;background:#fff8e6;box-shadow:0 5px 0 #f0c869;}
#stage.game-screen #opening-banner>.w-recipe>span{display:flex;align-items:center;gap:4px;font-size:inherit;}
#stage.game-screen #opening-banner>.w-recipe .w-op{font-style:normal;font-weight:1000;font-size:24px;line-height:1;color:#9a6a3c;}
#stage.game-screen #opening-banner>.w-recipe .tutorial-arrow{color:#ef7d2d;}
#stage.game-screen #opening-banner>.w-recipe>.w-recipe-star{display:grid;place-items:center;}
