/* MER-05 is a viewport-sized game, not a page inside the laboratory shell. */
body.mer05-full{overflow:hidden;background:#263f35;color:#f6e8c6}body.mer05-full>header{display:none}body.mer05-full #app{width:100%;max-width:none;height:100vh;height:100dvh;margin:0;padding:0;overflow:hidden}body.mer05-full #modal{border-radius:0;border:4px solid #71553b;background:#f6e6bd;color:#3e3429;box-shadow:0 0 0 3px #34291e,0 12px 0 #1d292888}body.mer05-full #modal button{border-radius:0}
.m5-screen{--edge:#3a3027;--cream:#f3e2b7;--green:#456c50;--dark:#253f37;position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#9faf9f url('../../assets/mer05/room.png') center/100% 100% no-repeat;image-rendering:pixelated;color:#302b24;font-family:ui-monospace,Consolas,'Courier New',monospace;line-height:1.1;isolation:isolate}.m5-screen *{box-sizing:border-box}.m5-screen img,.m5-drag img,.m5-fly img{image-rendering:pixelated;user-select:none;-webkit-user-drag:none}.m5-screen button{font-family:inherit;border-radius:0;min-height:0;padding:8px;background:#e9d3a1;color:#352e24;border:2px solid #523d2c;box-shadow:inset 0 2px #fff2cc,inset 0 -3px #bb9868,0 3px #392d24;font-weight:900;transition:none;touch-action:manipulation}.m5-screen button:hover:not(:disabled){filter:brightness(1.09)}.m5-screen button:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 2px #b1976f,0 1px #392d24}.m5-screen button:disabled{opacity:.55;cursor:default}.m5-screen button:focus-visible{outline:3px solid #ffdd72;outline-offset:2px}.m5-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;padding:5px 10px;background:#263f35;color:#fff0c6;border-bottom:4px solid #182e28;box-shadow:inset 0 -2px #729077;z-index:3}.m5-top strong{font-size:clamp(12px,2vw,20px);text-align:center;letter-spacing:.04em}.m5-topright{display:flex;gap:6px}.m5-top .m5-square{font-size:21px;line-height:1;width:38px;height:32px;padding:0;color:#f6e9c3;background:#466b54;border-color:#182e28;box-shadow:inset 0 2px #779278,inset 0 -3px #2b4a3a,0 2px #162b24}.m5-hud{display:grid;grid-template-columns:1.15fr 1fr 1.45fr 1.05fr 1fr;flex:none;background:linear-gradient(#40554a,#2f4439);color:#f9ecc8;border-bottom:4px solid #26382e;position:relative;z-index:3;box-shadow:0 3px 0 #203028}.m5-hud>div{min-width:0;padding:6px 8px 5px;border-right:2px solid #293b30;display:flex;flex-direction:column;align-items:center;gap:3px;justify-content:center}.m5-hud small{font-size:clamp(8px,1.25vw,12px);font-weight:bold;color:#d3d5af}.m5-hud b{font-size:clamp(17px,3.2vw,31px);letter-spacing:1px;font-variant-numeric:tabular-nums;color:#ffe39a;text-shadow:2px 2px #202f27}.m5-hud .m5-timer i{display:block;width:90%;height:7px;background:#192c26;border:1px solid #849279}.m5-hud .m5-timer em{display:block;height:100%;background:#9bbf6d}.m5-timer.urgent b{color:#ffb68b}.m5-timer.urgent em{background:#e37c50}.m5-playfield{flex:1;min-height:0;display:grid;grid-template-rows:minmax(104px,38%) minmax(0,1fr);padding:0 clamp(8px,3vw,40px) clamp(8px,2vh,20px);gap:clamp(5px,1vh,10px);position:relative}.m5-playfield::before{content:'';position:absolute;inset:0;background:linear-gradient(to bottom,rgba(255,239,190,.12),rgba(0,0,0,0) 30%,rgba(0,0,0,.06));pointer-events:none;z-index:0}.m5-playfield::after{content:'';position:absolute;left:0;right:0;bottom:0;height:18%;background:linear-gradient(to top,rgba(66,43,22,.10),rgba(0,0,0,0));pointer-events:none;z-index:0}.m5-ambience{position:absolute;inset:0;pointer-events:none;z-index:0}.m5-wallband{position:absolute;left:0;right:0;top:0;height:37%;background:linear-gradient(#bed0c0,#9db49e);opacity:.45}.m5-window,.m5-clock,.m5-banner,.m5-lamp,.m5-plantdecor,.m5-pass,.m5-steam{position:absolute}.m5-window{width:14%;height:18%;top:6.5%;background:#7b5d3e;border:4px solid #5d432e;box-shadow:inset 0 0 0 3px #d6c18f}.m5-window i{position:absolute;display:block;inset:8% 10%;background:linear-gradient(#bfe4ec 72%,#77ad66 72%);overflow:hidden}.m5-window i::before,.m5-window i::after{content:'';position:absolute;background:#d9f4ff}.m5-window i::before{width:8px;height:8px;top:18%;left:20%;animation:m5cloud 14s linear infinite}.m5-window i::after{width:11px;height:11px;top:36%;left:62%;animation:m5cloud 11s linear infinite reverse}.m5-window-a{left:3%}.m5-window-b{right:4%}.m5-banner{left:50%;top:5.5%;transform:translateX(-50%);padding:6px 16px;background:#6e8a4c;color:#fff0c6;border:3px solid #40592d;box-shadow:0 3px #304126;font-weight:900;letter-spacing:.08em}.m5-clock{right:25%;top:7%;width:42px;height:42px;border-radius:50%;background:#f6ecce;border:4px solid #735537;box-shadow:0 3px #513822}.m5-clock::before,.m5-clock::after{content:'';position:absolute;left:50%;top:50%;background:#533b25;transform-origin:bottom center}.m5-clock::before{width:3px;height:10px;transform:translate(-50%,-100%) rotate(35deg)}.m5-clock::after{width:2px;height:14px;transform:translate(-50%,-100%) rotate(180deg)}.m5-clock span{position:absolute;left:50%;bottom:-16px;width:4px;height:12px;background:#533b25;transform:translateX(-50%);animation:m5pendulum 1.4s ease-in-out infinite}.m5-lamp{top:0;width:6px;height:56px;background:#60472e}.m5-lamp::after{content:'';position:absolute;left:50%;bottom:-18px;transform:translateX(-50%);width:44px;height:22px;background:#ead39c;border:3px solid #725538}.m5-lamp-a{left:30%}.m5-lamp-b{left:72%}.m5-plantdecor{bottom:35%;width:24px;height:34px;background:#77563a;border:3px solid #563a24;box-shadow:0 3px #46311f}.m5-plantdecor::before,.m5-plantdecor::after{content:'';position:absolute;bottom:70%;width:12px;height:18px;background:#6f9953;border:2px solid #4d713d;transform-origin:bottom center;animation:m5leaf 2.8s ease-in-out infinite}.m5-plantdecor::before{left:-4px;transform:rotate(-15deg)}.m5-plantdecor::after{right:-4px;transform:rotate(15deg);animation-delay:-1.2s}.m5-plant-a{left:21%}.m5-plant-b{right:18%}.m5-pass{left:51%;top:35%;width:68px;height:16px;transform:translateX(-50%);background:#8a6843;border:3px solid #5c4029;box-shadow:0 2px #4c3624}.m5-pass::before{content:'';position:absolute;left:6px;right:6px;top:3px;height:2px;background:#d9be84}.m5-pass::after{content:'';position:absolute;left:12px;right:12px;bottom:-10px;height:10px;background:linear-gradient(rgba(246,230,185,.24),rgba(0,0,0,0))}.m5-steam{left:53%;top:31%;width:8px;height:18px;background:#f7f1db99;filter:blur(.3px);animation:m5steam 1.6s ease-in-out infinite}.m5-steam.s1{transform:translateX(-34px)}.m5-steam.s2{transform:translateX(-12px);animation-delay:-.5s}.m5-steam.s3{transform:translateX(10px);animation-delay:-1s}.m5-queuearea,.m5-counter{position:relative;z-index:1}.m5-queuearea{display:flex;flex-direction:column;justify-content:flex-end;min-height:0;padding-top:4px}.m5-label{display:flex;justify-content:space-between;align-items:center;font-size:clamp(10px,1.4vw,15px);font-weight:900;color:#f8e8bf;background:linear-gradient(#3b5544,#31493b);border:2px solid #20372b;box-shadow:inset 0 2px #7c9678,0 3px #213228;padding:5px 9px;flex:none;letter-spacing:.07em}.m5-label span{letter-spacing:0;font-size:.85em}.m5-queue{display:flex;flex:1;min-height:0;align-items:flex-end;justify-content:center;gap:clamp(3px,1vw,14px);padding:2px 0 0;position:relative}.m5-queue .m5-customer{width:min(18.5%,170px);height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:2px;background:none;border:0;box-shadow:none;padding:0;filter:none!important;position:relative}.m5-customer:disabled{opacity:.82!important}.m5-ticket{display:flex;flex-direction:column;gap:2px;width:100%;background:linear-gradient(#fff5d7,#f2e0b1);border:2px solid #795a3b;box-shadow:2px 3px #55452d66,inset 0 2px #fff7e6,inset 0 -2px #d4b77e;padding:3px;position:relative;font-size:clamp(9px,1.3vw,13px);color:#473725}.m5-ticket.special{background:#ffe2a0;border-color:#af7437}.m5-ticket>span{display:flex;justify-content:center;gap:2px}.m5-ticket i{display:flex;align-items:center;flex-direction:column;font-style:normal;min-width:0;flex:1}.m5-ticket img{width:clamp(19px,3.8vw,38px);max-width:100%;height:clamp(15px,3vh,30px);object-fit:contain}.m5-kid{height:clamp(30px,10vh,92px);min-height:0;max-height:48%;object-fit:contain;animation:m5bob 1.5s steps(2,end) infinite;filter:drop-shadow(2px 2px #2e3a2f55)}.m5-customer:nth-child(even) .m5-kid{animation-delay:-.6s}.m5-more,.m5-emptyqueue{align-self:center;background:#f2deb2;border:2px solid #76593c;padding:8px;font-weight:900}.m5-counter{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(6px,2vw,24px);padding:5px 0 0;border-top:4px solid #6b5035}.m5-work,.m5-stockarea{min-height:0;min-width:0;display:flex;flex-direction:column;gap:5px}.m5-tabs{display:flex;flex:none;gap:5px;min-height:28px}.m5-tabs>*{flex:1;text-align:center;padding:4px!important;font-size:clamp(10px,1.5vw,14px);min-width:0}.m5-tabs button[aria-pressed=true]{background:#f4c871;border-color:#765331;box-shadow:inset 0 2px #ffe7ad,inset 0 -3px #bd8a43,0 3px #392d24}.m5-free{background:#b8a17d;border:2px dashed #8d7553;color:#574833;display:grid;place-items:center;font-weight:bold}.m5-trayzone{flex:1;min-height:0;display:flex;flex-direction:column;gap:4px}.m5-orderline{display:flex;align-items:center;justify-content:space-between;gap:5px;background:linear-gradient(#f0deb4,#e0c791);border:2px solid #785a3e;padding:3px 6px;font-size:clamp(9px,1.3vw,13px);flex:none;box-shadow:0 3px #9c825b}.m5-needs{display:flex;gap:3px}.m5-needs span{display:flex;align-items:center;gap:1px;padding:2px;background:#d6bc89;border:1px solid #a88a58;white-space:nowrap}.m5-needs .matched{background:#c0d1a0;border-color:#648353;color:#284b32}.m5-needs img{width:clamp(17px,2.6vw,31px);height:clamp(16px,3.2vh,30px);object-fit:contain}.m5-plate{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(3px,.7vw,7px);padding:clamp(5px,1vw,13px);background:linear-gradient(#afc1b8,#96a8a0);border:4px solid #536d66;box-shadow:inset 0 4px #e6ecda,inset 0 -5px #7f958d,0 4px #69583c;position:relative;overflow:hidden}.m5-well{min-width:0;min-height:0;display:grid;place-items:center;border:2px solid #728b81;background:#819b91;box-shadow:inset 0 4px #657e75,inset 0 -3px #b5c8b9;overflow:hidden}.m5-well button{width:100%;height:100%;padding:0;border:0;box-shadow:none;background:none;display:grid;place-items:center}.m5-well img{width:90%;height:90%;max-height:95px;object-fit:contain;filter:drop-shadow(2px 3px #3b554a55);animation:m5foodIdle 2.6s steps(2,end) infinite}.m5-screen .m5-deliver{flex:none;background:#59764e;color:#fff2c6;border-color:#304930;box-shadow:inset 0 2px #a3b67b,inset 0 -4px #39573c,0 3px #392d24;min-height:38px;font-size:clamp(12px,2vw,18px)}.m5-screen .m5-deliver.ready{background:#527d43;outline:2px solid #d6e89b;outline-offset:-5px}.m5-emptytray{flex:1;display:grid;place-items:center;background:#a5b7aa;border:4px solid #58716a;font-weight:bold;color:#4a6057}.m5-stock{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:5px;flex:1;min-height:0}.m5-bin{min-height:0;min-width:0;display:flex;flex-direction:column;gap:3px}.m5-stock .m5-food{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:0;flex:1;min-height:0;padding:3px 4px;background:linear-gradient(#e4cea4,#d2b27b);touch-action:none;overflow:hidden;box-shadow:inset 0 2px #f6e7c7,inset 0 -3px #b68f59,0 3px #6d5438}.m5-foodname{font-size:clamp(10px,1.4vw,15px);text-transform:uppercase}.m5-food img{width:100%;height:0;flex:1;min-height:0;object-fit:contain;animation:m5foodIdle 2.2s steps(2,end) infinite;filter:drop-shadow(1px 2px #5e47316e)}.m5-stockcount{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:clamp(12px,2vw,20px)}.m5-stockcount small{font-size:10px;border:1px solid #98794f;background:#efe2bd;padding:1px 4px}.m5-stock .m5-refill{flex:none;min-height:25px;padding:3px;font-size:clamp(9px,1.3vw,12px);background:linear-gradient(90deg,#a4bd78 var(--refill,0%),#ead5aa var(--refill,0%));box-shadow:inset 0 -2px #b69a6e,0 2px #392d24}.m5-refill:disabled{opacity:.7!important}.m5-fx{position:absolute;z-index:5;top:34%;left:50%;transform:translate(-50%,-50%);white-space:nowrap;pointer-events:none;opacity:0;background:#274c37;color:#f5edba;border:3px solid #d9df9c;box-shadow:3px 4px #253e2b,0 0 0 2px rgba(255,255,255,.12) inset;font-weight:900;font-size:clamp(12px,3vw,25px);padding:9px 14px;max-width:90%;text-align:center}.m5-fx[data-type=bad]{background:#8a4436;border-color:#e9ad8c}.m5-fx[data-type=neutral]{background:#72563c;border-color:#e8cd9c}.m5-fx.show{animation:m5pop 1.2s steps(10,end) forwards}.m5-pausecover{position:absolute;inset:0;background:#1c3026aa;z-index:6;display:grid;place-items:center}.m5-pausecover[hidden]{display:none}.m5-pausebox{display:grid;gap:12px;min-width:210px;text-align:center;padding:20px;background:#f0dfb7;border:4px solid #72563c;box-shadow:0 0 0 3px #372c24,0 6px #372c24}.m5-drag{position:fixed;z-index:1000;pointer-events:none;transform:translate(-50%,-50%);width:68px;height:68px}.m5-drag img{width:100%;height:100%;object-fit:contain}.m5-fly{position:fixed;z-index:1200;pointer-events:none;transform:translate(-50%,-50%);width:60px;height:60px;transition:transform .48s steps(8,end),opacity .48s linear;opacity:1}.m5-fly img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(1px 2px #3b554a70)}.m5-fly.go{transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(.85);opacity:.92}.m5-fly-discard.go{transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(.6) rotate(-20deg);opacity:0}.m5-fly-deliver{width:86px;height:58px}.m5-fly-deliver.go{transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(.75);opacity:0}.m5-mini-plate{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);width:100%;height:100%;padding:6px;background:#dce6dd;border:3px solid #5b766d;gap:2px}.m5-mini-plate img,.m5-mini-plate i{width:100%;height:100%;object-fit:contain;background:#7d978d}.pulse{animation:m5pulse .42s steps(4,end)}.m5-menu,.m5-results{background-size:cover;background-position:center}.m5-menuinner{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px;gap:clamp(12px,3vh,30px);background:#263d3025}.m5-sign{text-align:center;background:linear-gradient(#f4e7bf,#ead7a6);padding:clamp(10px,2vw,24px) clamp(20px,6vw,75px);border:5px solid #7a5738;box-shadow:inset 0 0 0 3px #c4a36d,0 0 0 3px #493526,0 7px #493526}.m5-overline{font-size:clamp(9px,1.4vw,13px);letter-spacing:.1em;font-weight:bold;color:#65553a}.m5-sign h1,.m5-resultbox h1{font-family:inherit;font-size:clamp(27px,5vw,62px);line-height:1.05;letter-spacing:.02em;color:#3c5940;text-shadow:2px 2px #c0b28a;margin:8px 0 12px}.m5-mode{display:flex;gap:6px}.m5-mode button{flex:1}.m5-mode button[aria-pressed=true]{background:#52744e;color:#fff2c6;border-color:#334d37;box-shadow:inset 0 2px #91a674,inset 0 -3px #38553c,0 3px #392d24}.m5-stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;width:min(100%,880px)}.m5-stages button{text-align:left;padding:12px 8px;display:flex;flex-direction:column;gap:7px}.m5-stages button strong{font-size:clamp(10px,1.6vw,16px)}.m5-stages button small{font-size:clamp(9px,1.3vw,12px)}.m5-num{font-size:24px;color:#54704a}.m5-resultbox{margin:auto;width:min(95%,570px);max-height:calc(100% - 54px);overflow:auto;background:linear-gradient(#f7ebc8,#eedbb1);border:5px solid #725437;box-shadow:inset 0 0 0 3px #c5a26d,0 0 0 3px #463525,0 7px #463525;padding:clamp(10px,2vh,20px);text-align:center}.m5-resultbox h1{font-size:clamp(21px,4vw,35px)}.m5-medal{display:inline-block;padding:5px 18px;border:2px solid #9d835b;background:#d6c19a;font-weight:900}.m5-medal.ouro{background:#efca65;border-color:#b17c38}.m5-medal.prata{background:#cbd8d0;border-color:#7b918b}.m5-medal.bronze{background:#cc9164;border-color:#915939}.m5-finalscore{font-size:clamp(28px,7vh,54px);font-weight:900;color:#38573b;line-height:1.1;margin:6px}.m5-finalscore small{font-size:12px;display:block}.m5-record{font-size:12px;font-weight:bold;color:#6d5337}.m5-resultgrid{display:grid;grid-template-columns:repeat(4,1fr);margin:9px 0;background:#e4cf9e;border:2px solid #b19160}.m5-resultgrid span{display:flex;flex-direction:column;gap:3px;padding:7px 2px;font-size:clamp(9px,1.6vw,12px);border-right:1px solid #b19160}.m5-resultgrid b{font-size:clamp(16px,3vw,23px)}.m5-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:4px;font-size:12px;text-align:left;margin-bottom:8px}.m5-breakdown span{display:flex;justify-content:space-between;border-bottom:1px solid #c6ab78;padding:3px}.m5-subbreakdown{font-size:12px;color:#6d5337;margin-bottom:10px}.m5-resultactions{display:flex;gap:6px}.m5-resultactions button{flex:1;font-size:clamp(10px,1.8vw,14px)}
@keyframes m5bob{50%{transform:translateY(-2px)}}@keyframes m5pop{0%{opacity:0;transform:translate(-50%,-30%)}10%,75%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-50%,-70%)}}@keyframes m5cloud{0%{transform:translateX(-14px)}100%{transform:translateX(24px)}}@keyframes m5pendulum{0%,100%{transform:translateX(-50%) rotate(-18deg)}50%{transform:translateX(-50%) rotate(18deg)}}@keyframes m5leaf{0%,100%{transform:rotate(-15deg)}50%{transform:rotate(-3deg)}}@keyframes m5steam{0%{opacity:0;transform:translateY(6px) scale(.8)}30%{opacity:.7}100%{opacity:0;transform:translateY(-18px) scale(1.15)}}@keyframes m5foodIdle{50%{transform:translateY(-1px)}}@keyframes m5pulse{50%{filter:brightness(1.12);transform:translateY(-1px)}}body.reduce .m5-kid,body.reduce .m5-food img,body.reduce .m5-well img,body.reduce .m5-window i::before,body.reduce .m5-window i::after,body.reduce .m5-steam,body.reduce .m5-clock span,body.reduce .m5-plantdecor::before,body.reduce .m5-plantdecor::after{animation:none}body.reduce .m5-fx.show{animation:none;opacity:1}body.reduce .m5-fly{display:none}
@media(max-width:650px) and (orientation:portrait){.m5-playfield{grid-template-rows:minmax(95px,25%) minmax(0,1fr);padding:0 5px 5px;gap:3px}.m5-counter{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1.08fr);gap:5px;padding-top:3px}.m5-hud>div{padding:4px 2px}.m5-work,.m5-stockarea{gap:3px}.m5-label{padding:3px 6px}.m5-plate{padding:5px;gap:3px;border-width:3px}.m5-tabs{min-height:22px}.m5-screen .m5-deliver{min-height:29px;padding:4px}.m5-stock{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.m5-stock .m5-food{padding:2px}.m5-stock .m5-refill{min-height:20px;padding:1px}.m5-foodname{font-size:10px}.m5-stages{grid-template-columns:repeat(2,minmax(0,1fr))}.m5-stages button{padding:8px;gap:3px}.m5-kid{height:45px}.m5-ticket img{height:18px}.m5-ticket{padding:2px}.m5-queue .m5-customer{width:19%}.m5-queue{gap:2px}.m5-menuinner{justify-content:safe center}.m5-top strong{font-size:12px}.m5-top .m5-square{width:32px;height:29px}.m5-window{width:18%;height:13%;top:8%}.m5-banner{font-size:10px;padding:4px 8px}.m5-clock{display:none}.m5-plantdecor{display:none}.m5-pass{top:33%}}
@media(max-height:520px) and (orientation:landscape){.m5-top{min-height:31px;padding:2px 6px}.m5-top .m5-square{height:25px;width:30px;font-size:16px}.m5-hud>div{padding:2px;gap:1px}.m5-hud b{font-size:17px}.m5-playfield{grid-template-rows:minmax(73px,31%) minmax(0,1fr);padding:0 6px 5px;gap:3px}.m5-label{padding:2px 5px}.m5-kid{height:30px}.m5-ticket img{height:16px}.m5-counter{gap:8px;padding-top:2px}.m5-tabs{min-height:20px}.m5-work,.m5-stockarea{gap:3px}.m5-plate{border-width:2px;padding:3px;gap:2px}.m5-stock .m5-refill{min-height:18px;padding:1px}.m5-screen .m5-deliver{min-height:25px;padding:3px}.m5-menuinner{gap:8px}.m5-sign{padding:7px 20px}.m5-sign h1{font-size:27px}.m5-stages button{padding:6px;gap:3px}.m5-resultbox{max-height:calc(100% - 38px)}.m5-window{height:16%;top:5%}.m5-banner{top:4.5%}}

/* 0.5.2 — persistent scene, physical stations, and contained motion */
body.mer05-full #app{position:fixed;inset:0;width:100%;height:100dvh;max-height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);box-sizing:border-box}
.m5-play{background-color:#aab49b;background-size:100% 100%}.m5-play .m5-top{min-height:38px;padding:3px 8px}.m5-play .m5-hud{grid-template-columns:repeat(5,minmax(0,1fr));border-bottom-width:2px}.m5-play .m5-hud>div{gap:2px;padding:4px 2px}.m5-play .m5-hud b{letter-spacing:0;font-size:clamp(15px,2.6vw,27px)}.m5-play .m5-hud small{font-size:clamp(8px,1.2vw,11px);white-space:nowrap}.m5-play .m5-hud .m52-hot{color:#ffd077;text-shadow:2px 2px #604328}.m52-field{grid-template-rows:minmax(106px,36%) minmax(0,1fr);padding:0 clamp(5px,2vw,24px) 8px;gap:6px}.m52-field .m5-wallband,.m52-field .m5-window,.m52-field .m5-banner,.m52-field .m5-clock,.m52-field .m5-lamp,.m52-field .m5-plantdecor,.m52-field .m5-pass,.m52-field .m5-steam{display:none}/* Existing pixel-painted room supplies furniture and windows. */
.m52-field .m5-queuearea{padding:4px 0 0}.m52-queuehead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:5px;min-height:25px;padding:3px 5px;background:#314c3b;color:#f8e8bf;border:2px solid #20372b;font-size:clamp(9px,1.3vw,13px);font-weight:900;box-shadow:inset 0 2px #68816a}.m52-queuehead>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m52-pass-target{background:#8d7147;border:1px solid #d9b67d;padding:2px 5px;color:#fff4d0}.m52-queuehead #m52notice{text-align:center;color:#f1e1b6}.m52-queuehead #m52notice[data-type=good]{color:#cce7a7}.m52-queuehead #m52notice[data-type=bad]{color:#ffc0a2}.m52-field .m5-queue{gap:clamp(3px,.8vw,12px);justify-content:center;align-items:stretch;overflow:hidden;padding:4px 1px 2px;min-height:0}.m52-field .m5-queue .m5-customer{width:clamp(48px,18%,155px);flex:0 1 155px;height:auto;min-width:0;gap:2px;justify-content:flex-end;overflow:hidden}.m52-field .m5-ticket{padding:3px 2px;gap:2px;min-height:0;max-height:65%;width:100%;line-height:1.1;overflow:hidden;border-width:2px;box-shadow:0 2px #483b2c55}.m52-field .m5-ticket>span{min-height:0;display:flex;gap:1px}.m52-field .m5-ticket i{min-width:0}.m52-field .m5-ticket i img{width:100%;max-width:30px;height:clamp(13px,3vh,27px)}.m52-field .m5-ticket i b{font-size:clamp(9px,1.5vw,12px)}.m52-field .m5-ticket .m52-customerstatus{display:block;font-size:clamp(7px,1vw,10px);font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#d7c69e;color:#604d31;padding:2px 0}.m52-field .m52-active .m5-ticket{border-color:#496d4b;background:#e6eec7}.m52-field .m52-selected .m5-ticket{border-color:#355a3b;box-shadow:0 0 0 2px #b7d389 inset}.m52-field .m52-selected .m52-customerstatus{background:#4d7148;color:#fff7d9}.m52-field .m5-kid{height:auto;width:auto;max-width:65%;max-height:47%;min-height:16px;object-fit:contain;animation:none}.m52-enter{animation:m52-enter .28s ease-out both}.m52-field .m5-more{padding:4px;min-width:24px;font-size:11px;align-self:center}.m52-field .m5-more[hidden]{display:none}.m52-empty:after{content:'Aguardando a fila';align-self:center;background:#f1e3bf;border:2px solid #8a704c;padding:5px 9px;font-size:12px;font-weight:bold}
.m52-field .m5-counter{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(5px,1.2vw,16px);padding:6px;background:#b38c5e;border:3px solid #745438;box-shadow:inset 0 3px #e4be86,inset 0 -3px #98754d;min-height:0}.m52-field .m5-work,.m52-field .m5-stockarea{gap:4px;min-width:0;min-height:0}.m52-field .m5-label{padding:3px 6px;font-size:clamp(10px,1.2vw,13px);letter-spacing:.025em}.m52-field .m5-tabs{gap:3px;min-height:24px}.m52-field .m5-tabs button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;min-height:24px}.m52-field .m5-orderline{min-height:25px;padding:2px 4px;overflow:hidden;gap:3px}.m52-field .m5-orderline>b{white-space:nowrap;font-size:clamp(9px,1.4vw,13px)}.m52-field .m5-needs{min-width:0;gap:2px;justify-content:flex-end}.m52-field .m5-needs span{min-width:0;font-size:clamp(9px,1.3vw,13px);padding:1px 3px}.m52-field .m5-needs img{width:clamp(14px,2.5vw,27px);height:clamp(13px,2.8vh,25px)}.m52-field .m5-needs .over{background:#efd1b2;border-color:#a75a40}.m52-field .m5-plate{background:#c0cfc5;border-color:#526f67;padding:clamp(4px,1vw,12px);gap:4px;box-shadow:inset 0 3px #e4e9d9,inset 0 -4px #8da49b,0 3px #745c3d}.m52-field .m5-well{background:#91a99e;border-color:#6b867d;box-shadow:inset 0 3px #758e85,inset 0 -2px #c2d2c6;position:relative}.m52-field .m5-well button{padding:0;min-height:0;overflow:hidden;touch-action:manipulation}.m52-field .m5-well button[hidden]{display:none}.m52-field .m5-well img{animation:none;width:94%;height:94%;max-height:none;filter:drop-shadow(2px 2px #3b554a55)}.m52-field .m52-pending button{visibility:hidden}.m52-field .m52-drop{outline:3px solid #d2e69b;outline-offset:-5px}.m52-field .m52-departing .m5-well button{visibility:hidden}.m52-trayfoot{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.5fr);gap:4px;flex:none;min-height:30px}.m52-field .m52-discard{background:#785b46;color:#f7e7c5;opacity:1;font-size:clamp(8px,1vw,12px);padding:2px;overflow:hidden;box-shadow:inset 0 2px #a37f5f}.m52-field .m5-deliver{min-height:30px;padding:4px;font-size:clamp(10px,1.4vw,16px);white-space:nowrap;overflow:hidden}.m52-field .m5-stock{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px}.m52-field .m5-stock:has(.m5-bin:nth-child(3):last-child){grid-template-rows:minmax(0,1fr)}.m52-field .m5-bin{gap:3px}.m52-field .m5-food{background:#c3a779;border:2px solid #735537;padding:3px;justify-content:flex-start;box-shadow:inset 0 2px #e7cfa2,0 2px #715135;touch-action:none}.m52-field .m5-foodname{font-size:clamp(9px,1.3vw,13px);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#e6d0a4;border:1px solid #ad9064;padding:2px 1px}.m52-pan{display:grid;place-items:center;position:relative;flex:1;min-height:0;width:100%;overflow:hidden}.m52-field .m52-pan img{height:100%;width:100%;min-height:0;object-fit:contain;animation:none;max-height:100%;display:block}.m52-field .m52-emptybin .m52-pan img{filter:grayscale(1);opacity:.32}.m52-field .m5-stockcount{position:relative;background:#ece2c1;padding:2px 4px;border:1px solid #99794e;font-size:clamp(11px,1.7vw,17px);isolation:isolate;overflow:hidden;line-height:1}.m52-field .m5-stockcount::before{content:'';position:absolute;z-index:-1;inset:0 auto 0 0;width:var(--fill,100%);background:#c4d09a;transition:width .16s}.m52-field .m5-stockcount small{padding:0 3px;font-size:9px}.m52-field .m5-refill{min-height:24px;font-size:clamp(9px,1.1vw,12px);padding:2px;white-space:nowrap}.m52-pansteam{position:absolute;top:15%;left:52%;width:3px;height:8px;background:#fff4d6;box-shadow:-5px 3px #fff4d6aa,5px 2px #fff4d688;opacity:0;animation:m52-steam 2.6s steps(8,end) infinite;pointer-events:none}.m5-food[data-key=salada] .m52-pansteam,.m5-food[data-key=fruta] .m52-pansteam,.m5-food[data-key=pao] .m52-pansteam,.m52-emptybin .m52-pansteam{display:none}.m52-refilling .m52-pansteam{display:none}
.m52-motion{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:hidden}.m52-flying{position:absolute;transform:translate(-50%,-50%);width:46px;height:46px;pointer-events:none;will-change:transform;filter:drop-shadow(2px 3px #263a3066)}.m52-flying img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.m52-held{width:54px;height:54px;filter:drop-shadow(3px 5px #263a3080)}.m52-points{position:absolute;min-width:34px;text-align:center;white-space:nowrap;padding:3px 6px;background:#31573c;border:2px solid #e3e9ae;color:#fff4bf;font-weight:900;font-size:15px;box-shadow:2px 2px #263a30;pointer-events:none}.m52-motion .m5-mini-plate{padding:3px;gap:1px;grid-template-rows:repeat(2,minmax(0,1fr))}.m52-motion .m5-mini-plate>*{min-height:0;min-width:0}.m5-screen button,.m5-screen .m5-sign,.m5-screen .m5-resultbox{overflow-wrap:anywhere}.m5-screen .m5-resultgrid span{min-width:0;overflow-wrap:anywhere}.m5-screen .m5-resultactions button{min-width:0}.m52-paused .m52-enter,.m52-paused .m52-pansteam{animation-play-state:paused}
@keyframes m52-enter{from{transform:translateX(12px);opacity:.45}to{transform:translateX(0);opacity:1}}@keyframes m52-steam{0%{opacity:0;transform:translateY(4px)}25%{opacity:.65}80%{opacity:.15}100%{opacity:0;transform:translate(5px,-12px)}}
@media(max-width:700px) and (orientation:portrait){.m5-play .m5-top{min-height:35px}.m5-play .m5-hud b{font-size:18px}.m52-field{grid-template-rows:minmax(90px,24%) minmax(0,1fr);padding:0 4px 4px;gap:3px}.m52-field .m5-counter{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1.1fr);gap:4px;padding:4px;border-width:2px}.m52-field .m5-work,.m52-field .m5-stockarea{gap:3px}.m52-field .m5-label{padding:2px 4px}.m52-field .m5-tabs{min-height:23px}.m52-field .m5-tabs button{min-height:23px;padding:2px!important;font-size:11px}.m52-field .m5-orderline{min-height:23px}.m52-field .m5-trayzone{gap:3px}.m52-field .m5-plate{padding:3px;gap:3px;border-width:2px}.m52-field .m5-stock{gap:3px}.m52-field .m5-food{padding:2px}.m52-field .m5-foodname{padding:1px;font-size:10px}.m52-field .m5-stockcount{padding:1px 3px}.m52-field .m5-refill{min-height:25px;padding:1px}.m52-field .m5-deliver,.m52-field .m52-discard{min-height:28px}.m52-field .m5-ticket .m52-customerstatus{font-size:8px}.m52-field .m5-queue .m5-customer{flex-basis:19%}.m52-field .m5-kid{max-height:39%}.m52-field .m5-ticket{max-height:66%}}
@media(max-height:470px) and (orientation:landscape){.m5-play .m5-top{min-height:29px;padding:1px 4px}.m5-play .m5-top .m5-square{height:25px;width:30px}.m5-play .m5-hud>div{padding:1px;gap:1px}.m5-play .m5-hud b{font-size:16px}.m52-field{grid-template-rows:minmax(66px,31%) minmax(0,1fr);gap:3px;padding:0 4px 3px}.m52-queuehead{min-height:20px;padding:1px 4px}.m52-field .m5-ticket{max-height:72%;padding:1px}.m52-field .m5-ticket .m52-customerstatus{font-size:8px;padding:0}.m52-field .m5-ticket i img{height:13px}.m52-field .m5-kid{max-height:30%}.m52-field .m5-counter{gap:5px;padding:3px;border-width:2px}.m52-field .m5-work,.m52-field .m5-stockarea{gap:2px}.m52-field .m5-label{padding:1px 4px;font-size:10px}.m52-field .m5-tabs,.m52-field .m5-tabs button{min-height:19px}.m52-field .m5-tabs button{padding:1px!important}.m52-field .m5-orderline{min-height:20px;padding:1px}.m52-field .m5-plate{padding:2px;gap:2px;border-width:2px}.m52-field .m5-trayzone{gap:2px}.m52-trayfoot{min-height:24px}.m52-field .m5-deliver,.m52-field .m52-discard{min-height:24px;padding:1px}.m52-field .m5-stock{gap:3px}.m52-field .m5-bin{gap:1px}.m52-field .m5-food{padding:1px}.m52-field .m5-foodname{padding:0;font-size:9px}.m52-field .m5-stockcount{padding:0 3px;font-size:10px}.m52-field .m5-refill{min-height:19px;padding:0}}
body.reduce .m52-enter,body.reduce .m52-pansteam{animation:none}@media(prefers-reduced-motion:reduce){.m52-enter,.m52-pansteam{animation:none}.m52-field .m5-stockcount::before{transition:none}}
.m52-field .m5-queue .m5-customer{transform:initial}.m52-field .m5-queue .m5-customer.m52-enter{animation:m52-enter .28s ease-out both}.m52-field .m5-queue .m5-customer.m52-leaving{animation:none}.m52-field .m52-emptybin .m52-pan img{filter:none;opacity:1}.m52-light{position:absolute;pointer-events:none;z-index:0;inset:0;overflow:hidden}.m52-light::before,.m52-light::after{content:'';position:absolute;top:5%;height:18%;width:12%;background:#fff0bf;opacity:.09;clip-path:polygon(0 0,70% 0,100% 100%,30% 100%);animation:m52-daylight 12s ease-in-out infinite alternate}.m52-light::before{left:5%}.m52-light::after{right:8%;animation-delay:-6s}@keyframes m52-daylight{from{opacity:.04;transform:translateX(-3px)}to{opacity:.14;transform:translateX(4px)}}.m52-paused .m52-light::before,.m52-paused .m52-light::after{animation-play-state:paused}body.reduce .m52-light::before,body.reduce .m52-light::after{animation:none}@media(prefers-reduced-motion:reduce){.m52-light::before,.m52-light::after,.m52-field .m5-queue .m5-customer.m52-enter{animation:none}}body.reduce .m52-field .m5-queue .m5-customer.m52-enter{animation:none}

/* 0.5.4 — visible active order, smooth movement and tutorial */
.m52-field .m5-queue .m5-customer{display:grid;grid-template-rows:minmax(0,1fr) minmax(24px,44%);align-items:end;justify-items:center;align-content:stretch;opacity:1!important;overflow:hidden;flex:1 1 0;max-width:155px;width:auto}.m52-field .m5-ticket{max-height:none;min-height:0;align-self:end;overflow:visible;gap:1px;padding:2px;display:flex;box-sizing:border-box}.m52-field .m5-kid{width:auto;height:100%;max-height:100%;max-width:85%;min-height:0;align-self:end;object-fit:contain;display:block}.m52-field .m52-selected .m5-kid{filter:drop-shadow(0 2px #283b32) drop-shadow(0 0 2px #e5cf78)}.m52-field .m5-ticket>span{min-height:0}.m52-field .m5-ticket i img{height:clamp(11px,2.7vh,24px);flex:none}.m52-field .m5-ticket .m52-customerstatus{padding:1px 0}.m52-field .m5-queue{align-items:stretch;min-height:0}.m52-field .m5-ticket b{line-height:1}.m52-field .m5-more{flex:none}.m54-stockhead{gap:4px;min-width:0;letter-spacing:0}.m54-stockhead #m5refills{margin-left:auto}.m5-screen .m54-all{padding:3px 6px;font-size:clamp(9px,1.3vw,12px);line-height:1.1;min-height:23px;white-space:nowrap;background:#e2c477;color:#3c3726;box-shadow:inset 0 2px #ffe6a1,inset 0 -2px #ac8e51,0 2px #273b30}.m54-all small{font-size:.9em;color:#6c5735}.m54-tutorial{flex:none;min-height:25px;padding:4px 6px;background:#f8e7b4;color:#453a28;border:2px solid #8e693c;box-shadow:inset 0 1px #fff4d7;font-size:clamp(10px,1.35vw,14px);font-weight:bold;text-align:center;overflow-wrap:anywhere;line-height:1.15;margin-bottom:3px}.m5-screen .m54-guide{outline:2px solid #f9de78;outline-offset:-3px;box-shadow:inset 0 0 0 3px #f7db93,0 0 0 1px #75563b}.m52-field .m5-counter{background:#b99669;box-shadow:inset 0 3px #e4c18b,inset 0 -3px #8e704b}.m52-field .m5-food{background:#d1b485}.m52-field .m5-ticket{background:#f3e2b7}.m52-field .m52-selected .m5-ticket{background:#e7edc5}.m52-field .m5-plate{background:#b6c9be}.m52-flying{will-change:transform;filter:none}.m52-flying img{filter:drop-shadow(1px 2px #263a3066)}.m52-field .m5-needs span{white-space:nowrap}.m52-field .m5-orderline>b{font-size:clamp(8px,1.1vw,12px)}.m52-field .m5-queue .m5-customer.m52-enter{animation-duration:.22s}.m5-stages:has(>button:only-child){grid-template-columns:minmax(0,280px);justify-content:center}.m52-field .m5-queue .m5-customer:disabled{opacity:1!important}.m5-screen button:disabled{cursor:default}.m52-queuehead #m52notice{font-size:clamp(8px,1.15vw,12px)}
@media(max-width:700px) and (orientation:portrait){.m52-field .m5-queue .m5-customer{grid-template-rows:minmax(0,1fr) minmax(22px,38%)}.m52-field .m5-ticket i img{height:14px}.m52-field:has(.m54-tutorial){grid-template-rows:minmax(130px,28%) minmax(0,1fr)}.m5-screen .m54-all{min-height:26px}.m52-field .m5-stock .m5-refill{min-height:25px}.m52-field .m5-orderline>b{font-size:9px}}
@media(max-height:470px) and (orientation:landscape){.m52-field .m5-queue .m5-customer{grid-template-rows:minmax(0,1fr) minmax(21px,35%)}.m52-field .m5-ticket i img{height:11px}.m52-field .m5-ticket .m52-customerstatus{font-size:7px}.m54-tutorial{min-height:19px;padding:2px;font-size:9px;margin-bottom:1px}.m52-field:has(.m54-tutorial){grid-template-rows:minmax(110px,35%) minmax(0,1fr)}.m5-screen .m54-all{min-height:18px;padding:1px 4px}}

.m52-field .m5-needs .m54-needtext{display:flex;flex-direction:column;align-items:center;justify-content:center;background:none;border:0;padding:0;gap:1px;min-width:0;line-height:1}.m54-needtext small{font-size:clamp(7px,.9vw,10px);font-weight:bold;max-width:100%}.m52-field .m5-needs>span{padding:2px 3px;gap:2px}.m52-field .m5-needs{flex:1;min-width:0}.m52-field .m5-orderline>b{flex:none}.m52-field .m5-needs>span{min-width:0;overflow:hidden}.m52-field .m5-needs>span img{flex:none}@media(max-width:400px){.m52-field .m5-needs>span{padding:1px;gap:1px}.m52-field .m5-needs img{width:13px}.m54-needtext small{font-size:7px}.m52-field .m5-orderline>b{font-size:8px}}
