:root{--ink:#553b43;--red:#db555c;--pink:#fce4e7;--peach:#ffe2b7;--cream:#fffbf4;--navy:#243b62}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Mali,'Noto Sans Thai',Tahoma,sans-serif;color:var(--ink);background:#fff9f5}button{font:inherit}button:focus-visible,.target-plate:focus-visible,a:focus-visible{outline:4px solid #409dc8;outline-offset:3px}.topbar{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px clamp(12px,2vw,30px);background:linear-gradient(90deg,#fae1cf,#fff4e4,#fce4ec);border-bottom:3px solid #eebaac;min-height:76px;position:relative;z-index:3}.logo{font-size:clamp(19px,2vw,30px);color:#8c373b;font-weight:700;text-decoration:none;white-space:nowrap}.logo span{font-size:1.1em}.hud{display:flex;gap:10px;align-items:center}.hud-pill{background:#fffdf6;border:3px solid #d99f8e;border-radius:25px;box-shadow:0 4px 0 #ad706b4d;padding:6px 15px;font-weight:700;font-size:19px;white-space:nowrap}.tools{display:flex;gap:7px}.round-btn{width:45px;height:45px;border:2px solid #b77573;border-radius:50%;background:#fff9eb;cursor:pointer;box-shadow:0 3px 0 #d3a8a0;font-size:22px}.round-btn:active{transform:translateY(3px);box-shadow:none}.game-screen{max-width:1600px;margin:auto;padding:14px clamp(9px,1.4vw,24px) 6px}.restaurant{position:relative;overflow:hidden;border:6px solid #e5b07f;border-radius:28px;background:#e8c5a8 url('assets/restaurant.png') center center/cover no-repeat;min-height:740px;box-shadow:0 9px 0 #ca8d71,0 15px 34px #6c3c2638;isolation:isolate}.restaurant:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom,transparent 0 46%,rgba(62,31,25,.07) 55%,transparent 68%);z-index:-1}.sakura{position:absolute;font-size:64px;color:#f9aabd;opacity:.83;text-shadow:3px 4px #fff7;pointer-events:none}.blossom-a{left:10%;top:15%}.blossom-b{right:7%;top:23%;font-size:30px}.challenge{position:absolute;left:50%;top:14%;transform:translateX(-50%);z-index:1;display:flex;flex-direction:column;align-items:center;gap:9px;min-width:min(88vw,500px)}.challenge-label{font-size:clamp(14px,1.5vw,19px);font-weight:700;padding:5px 22px;background:#ffecdb;border-radius:30px;border:2px solid #bd8276;box-shadow:0 4px 0 #cc9b81}.target-plate{width:clamp(280px,38vw,520px);height:clamp(120px,14vw,172px);border-radius:50%;background:radial-gradient(ellipse at 50% 36%,#fff 0 36%,#eef6ff 40% 52%,#8eb5ec 54% 59%,#3068bf 61% 64%,#dbe8ff 67% 73%,#2968bb 77%);border:5px solid #2d5db2;box-shadow:0 9px 0 #315592,0 15px 17px #28233d55;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .25s}.target-plate .target-text{background:#fffefb;border:4px solid #25364d;border-radius:22px;padding:6px 17px;font-size:clamp(21px,3.1vw,37px);font-weight:700;text-align:center;color:#24344d;box-shadow:0 4px 0 #bed6ed88;line-height:1.45;white-space:nowrap}.plate-stars{position:absolute;right:11%;top:12%;color:#ffe49d;text-shadow:0 2px #d8ab5a;font-size:30px}.challenge-tip{text-align:center;padding:6px 17px;border-radius:16px;background:#fff8f2e8;color:#594044;font-weight:700;max-width:550px;font-size:clamp(12px,1.3vw,16px)}.target-plate.success{animation:platePop .55s ease-out}.target-plate.shake{animation:shake .35s}.chef-quote{position:absolute;right:8%;top:48%;transform:translateY(-50%);max-width:250px;background:#fffaf3ef;border:3px solid #f1b6a1;box-shadow:4px 5px #7b5b5844;border-radius:20px;padding:9px 15px;font-size:clamp(12px,1.3vw,17px);text-align:center;z-index:2}.conveyor-scene{position:absolute;bottom:11.5%;width:100%;height:270px;left:0;z-index:2}.belt-heading{display:flex;justify-content:space-between;align-items:center;padding:4px 20px;color:white;font-size:clamp(14px,1.5vw,20px);font-weight:700;background:#8f3e3dc9;border-block:2px solid #ffe2b9;text-shadow:1px 2px #773336}.mini-tip{font-size:12px;font-weight:500}.belt-window{height:210px;overflow:hidden;position:relative;background:repeating-linear-gradient(90deg,#aaa9bb 0 6px,#88899c 6px 11px,#656878 12px 18px,#8e8fa1 19px 140px);border-top:6px solid #323547;border-bottom:6px solid #343745;box-shadow:inset 0 8px 13px #0005,inset 0 -10px 12px #0005}.belt-track{position:relative;width:100%;height:100%;will-change:transform}.sushi{width:clamp(140px,17vw,230px);height:190px;position:absolute;top:1px;background:none;border:0;padding:0;display:block;cursor:grab;touch-action:pan-y;transition:filter .18s,scale .18s}.sushi img{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(1px 7px 2px #1b192744)}.sushi:hover{scale:1.08;filter:drop-shadow(0 0 9px #ffe37e)}.sushi:active{cursor:grabbing}.sushi:disabled{cursor:default}.belt-base{height:22px;background:repeating-linear-gradient(90deg,#ae5a36 0 60px,#9e4c35 60px 70px);border-block:4px solid #eaa66b}.below-game{margin:25px auto 10px;max-width:1040px}.progress-card{border:2px solid #ecd0bc;background:#fff;border-radius:20px;padding:13px 20px;box-shadow:0 5px 0 #ecd8cb}.progress-title{display:flex;justify-content:space-between;font-weight:700}.progress-bar{height:17px;border-radius:20px;background:#f4e7dc;margin-top:8px;overflow:hidden}.progress-bar>div{height:100%;width:0;background:linear-gradient(90deg,#ffca74,#ee7d87);border-radius:20px;transition:width .35s}.legend{display:flex;gap:16px;flex-wrap:wrap;justify-content:center;margin:16px;color:#755e5d;font-weight:600;font-size:14px}footer{text-align:center;font-size:12px;color:#9e8581;padding:12px 14px 18px}.overlay{position:fixed;inset:0;display:grid;place-items:center;z-index:50;background:#221d2bcf;backdrop-filter:blur(6px);padding:20px}.overlay.hidden{display:none}.dialog{border-radius:32px;padding:clamp(20px,4vw,42px);background:linear-gradient(145deg,#fff8f2,#ffe6ec);border:5px solid #fff;box-shadow:0 0 0 6px #e7a1a2,0 22px 45px #1118;width:min(600px,100%);max-height:90vh;overflow:auto;text-align:center}.dialog h1{font-size:clamp(27px,4vw,46px);color:#a44555;margin:8px}.dialog h2{font-size:clamp(22px,3vw,33px);color:#a44555}.dialog p{line-height:1.8}.dialog .large-emoji{font-size:62px}.dialog button{background:#e97179;border:3px solid #ad454e;border-radius:20px;padding:12px 32px;color:#fff;font-weight:700;font-size:20px;cursor:pointer;box-shadow:0 5px #a94a4e;margin:9px}.dialog button.secondary{background:#fbe8ba;color:#6d4c44;border-color:#d6a16c;box-shadow:0 5px #d0aa89}.dialog input{font:inherit;background:#fff;border:3px solid #edb1b5;border-radius:16px;padding:12px;width:100%;max-width:370px;text-align:center;font-size:18px}.dialog .howto{text-align:left;background:#fffdf5;border-radius:18px;border:2px dashed #dfbcb6;padding:10px 16px;margin:16px 0}.dialog .final-score{font-size:57px;font-weight:700;color:#d45b67;line-height:1.3}.toast{position:fixed;top:90px;left:50%;transform:translateX(-50%) translateY(-20px);border-radius:19px;background:#fffaf1;color:#754e47;box-shadow:0 7px 28px #0005;border:3px solid #e8bf9d;padding:11px 22px;z-index:90;font-size:20px;font-weight:700;text-align:center;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:90vw}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.flying-sushi{position:fixed;z-index:100;pointer-events:none;object-fit:contain;transition:transform .6s cubic-bezier(.15,.67,.3,1.15),opacity .6s}.floating-star{position:fixed;pointer-events:none;z-index:60;font-size:36px;animation:starFloat .8s forwards}.chef-speech{font-size:14px}.stats{display:flex;justify-content:center;gap:15px;flex-wrap:wrap;margin:12px 0}.stats div{padding:12px;background:#fff9f0;border:2px solid #ebcfc1;border-radius:16px;min-width:105px}@keyframes platePop{0%{transform:scale(1)}40%{transform:scale(1.13)}100%{transform:scale(1)}}@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}@keyframes starFloat{to{transform:translateY(-110px) rotate(25deg);opacity:0}}
@media(max-width:1100px){.restaurant{min-height:640px}.challenge{top:9%}.chef-quote{right:2%;top:47%;font-size:12px}.conveyor-scene{bottom:9%}}@media(max-width:760px){.topbar{flex-wrap:wrap;gap:6px}.logo{font-size:20px}.hud{order:3;width:100%;justify-content:center}.hud-pill{font-size:16px;padding:4px 12px}.tools{margin-left:auto}.round-btn{width:39px;height:39px;font-size:18px}.restaurant{min-height:590px;border-width:4px;background-position:58% center}.challenge{top:11%;width:94%;gap:6px}.challenge-tip{font-size:11px}.target-plate{width:min(80vw,400px);height:120px}.target-text{font-size:22px!important}.chef-quote{top:47%;right:2%;max-width:142px;font-size:11px}.conveyor-scene{bottom:12%;height:230px}.belt-window{height:177px}.sushi{height:165px;width:185px}.belt-heading{padding:6px 8px;font-size:13px}.mini-tip{display:none}.blossom-a{display:none}.legend{font-size:12px}}@media(max-width:420px){.restaurant{min-height:530px}.challenge{top:7%}.target-plate{height:105px}.target-text{font-size:19px!important}.chef-quote{top:40%;right:1%;max-width:127px}.conveyor-scene{height:194px;bottom:8%}.belt-window{height:148px}.sushi{height:138px;width:160px}.belt-heading{font-size:12px}.hud-pill{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}

.chopstick-hand{position:absolute;left:-45px;bottom:-65px;width:220px;height:168px;object-fit:contain;object-position:left bottom;pointer-events:none;z-index:3;filter:drop-shadow(3px 6px 5px #351d2450);transform:rotate(-16deg)}
@media(max-width:760px){.chopstick-hand{width:126px;height:105px;bottom:-25px;left:-36px}}

/* Original Japanese-style game background music controls */
.volume-control{display:flex;align-items:center;gap:5px;background:#fffaf0;border:2px solid #d8a68c;border-radius:20px;padding:6px 9px;color:#8c373b;font-size:12px;font-weight:700;white-space:nowrap}.volume-control input{width:73px;accent-color:#db6976;cursor:pointer}.round-btn.music-off{opacity:.65;background:#ede6e4}@media(max-width:760px){.volume-control{padding:4px 6px}.volume-control input{width:52px}.volume-control span{display:none}}

/* Credit at the bottom of the welcome screen */
.dialog .welcome-credit{margin:18px auto 0;padding-top:12px;border-top:1px dashed #dfaeb3;color:#865c63;font-size:clamp(13px,2vw,16px);font-weight:700;text-align:center}
