:root {
  color-scheme: dark;
  --cream:#fff0d6; --muted:#e4b894; --gold:#ffda73;
  --plum:#482131; --edge:#a65839; --wood:#412019;
  font-family:"PingFang SC","Microsoft YaHei UI","Noto Sans CJK SC",system-ui,sans-serif;
  color:var(--cream); background:#21131f;
}
* { box-sizing:border-box; }
body { margin:0; background:radial-gradient(ellipse at 50% 12%,#3b2030,#20121e 75%); min-height:100svh; }
button { cursor:pointer; font:inherit; color:inherit; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
button:focus-visible { outline:3px solid #ffe88a; outline-offset:3px; z-index:5; }
button:disabled { cursor:default; }
[hidden] { display:none!important; }
h1,h2,p { margin:0; }
[data-icon] { display:inline-flex; flex:none; }
[data-icon] svg { width:100%; height:100%; }
.game { max-width:1650px; margin:auto; padding:14px; }
.opening { min-height:min(720px,calc(100svh - 28px)); display:grid; place-items:stretch; padding:clamp(8px,2.5vw,35px); border:2px solid #87492a; border-radius:25px; background:radial-gradient(ellipse at 50% 0%,#b55f35 0%,transparent 58%),linear-gradient(165deg,#432016,#2f1823 77%); box-shadow:inset 0 2px 2px #ffb17057,0 6px 22px #10060dbb; }
.opening-door { display:grid; place-items:center; min-height:0; padding:clamp(21px,6vh,60px) 12px; border:clamp(4px,1.1vw,16px) solid #542b23; border-top-color:#804126; border-bottom-color:#38201d; border-radius:17px; background:radial-gradient(ellipse at 50% 40%,#c2743966,#2716229c 78%),repeating-linear-gradient(0deg,#301c20 0 3px,#7a4430 3px 5px,#63402c 5px 35px,#74402b 36px,#42261d 39px); box-shadow:inset 0 10px 19px #231117d9,inset 0 -6px 13px #1b1218b3,0 0 0 1px #c98044; }
.opening-content { display:grid; justify-items:center; gap:10px; text-align:center; }
.opening-logo { width:clamp(88px,13vw,166px); height:auto; filter:drop-shadow(0 6px 3px #391b14b5) drop-shadow(0 0 23px #ff953169); }
.opening h1 { font-size:clamp(34px,6.4vw,89px); font-weight:1000; letter-spacing:.07em; line-height:1.2; color:#ffd494; text-shadow:0 3px #b95d2c,0 7px 6px #270a0a; }
.opening-level { margin-top:5px; color:#ffe6bc; font-size:clamp(16px,2vw,26px); font-weight:850; }
.opening-goal { color:#ffdab0; font-size:clamp(14px,1.4vw,20px); font-weight:700; }
.opening-actions { display:flex; gap:20px; margin-top:7px; }
.opening-actions .text-button { font-size:clamp(13px,1.3vw,18px); padding:6px 9px; }
.stall { animation:open-stall .48s ease-out both; }
.stall:focus { outline:none; }
@keyframes open-stall { from { opacity:0; clip-path:inset(0 0 18%); } to { opacity:1; clip-path:inset(0); } }
.top,.supply { border:2px solid #673421; background:repeating-linear-gradient(178deg,#6e3521a0 0px,#4b241a44 3px,#2f171350 6px,#52261c66 10px),linear-gradient(105deg,#351b17,#783e27 48%,#3a1b19); box-shadow:inset 0 1px 4px #e97c424e,0 4px 14px #0f0610a0; }
.top { display:grid; grid-template-columns:auto 1fr auto; gap:clamp(10px,2vw,28px); align-items:center; padding:8px 13px; border-radius:23px 23px 12px 12px; min-height:78px; }
.wordmark { display:flex; align-items:center; gap:7px; padding:0 8px 0 0; white-space:nowrap; }
.logo { font-size:36px; width:clamp(38px,4.5vw,65px); height:clamp(42px,4.5vw,65px); display:grid; place-items:center; filter:drop-shadow(0 2px 4px #110706); }
.logo img { width:100%; height:100%; object-fit:contain; }
.wordmark h1 { line-height:1.2; font-weight:1000; letter-spacing:.045em; font-size:clamp(22px,2.51vw,41px); color:#ffd494; text-shadow:0 2px 0 #b95d2c,0 4px 2px #240c0d; }
.wordmark p { font-size:clamp(7px,.86vw,14px); font-weight:850; margin:.2em 0 .12em; letter-spacing:.12em; color:#fdb36c; text-align:center; }
.hud { display:grid; grid-template-columns:.86fr 1.05fr .96fr 1.3fr .8fr; gap:clamp(6px,1vw,16px); min-width:0; }
.stat,.utility button { border:1px solid #a75568; border-top-color:#bd7588; background:linear-gradient(#56293c,#401c2e 70%); border-radius:15px; box-shadow:inset 0 2px 2px #ffd7af24,inset 0 -4px 0 #230a18,0 3px 5px #1b0808ac; }
.stat { color:#ffe9d6; display:flex; align-items:center; justify-content:center; white-space:nowrap; min-width:0; padding:0 6px 3px; gap:clamp(4px,.61vw,10px); height:clamp(39px,4.12vw,60px); font-weight:800; font-size:clamp(11px,1.16vw,18px); }
.stat [data-icon] { width:clamp(16px,1.8vw,28px); height:clamp(16px,1.8vw,28px); color:#ffc48e; }
.stat strong { font-variant-numeric:tabular-nums; font-size:clamp(16px,1.84vw,29px); color:var(--gold); line-height:1; }
.stat-level strong { font-size:clamp(13px,1.42vw,22px); color:#fff0df; }
.stat.stat-revenue { flex-direction:column; flex-wrap:nowrap; gap:2px; line-height:1; }
.stat-revenue .stat-label { flex-basis:auto; font-size:clamp(10px,.95vw,15px); }
.revenue-values { display:flex; align-items:baseline; justify-content:center; gap:3px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.revenue-values span { font-size:clamp(9px,.86vw,14px); color:#ffcda5; }
.stat .rush { color:#ff8b73; }
.utility { display:flex; gap:9px; }
.utility button { width:clamp(34px,3.55vw,54px); height:clamp(37px,3.75vw,57px); color:#ffd09b; display:grid; place-items:center; padding:0 0 3px; }
.utility [data-icon] { width:52%; height:52%; }
.utility button:hover,.stat-level:hover { background:linear-gradient(#74364c,#552738); }
.scene { position:relative; isolation:isolate; overflow:hidden; container-type:inline-size; margin:4px 0 0; border:2px solid #9b4729; border-radius:24px 24px 13px 13px; background:#4b251b; box-shadow:0 2px 9px #130709; }
.market-view { position:relative; height:clamp(226px,calc(57svh - 118px),450px); background:#302337 url("assets/night-market.jpg") center top / 100% 174% no-repeat; }
.workbench { display:grid; grid-template-columns:minmax(0,1fr) clamp(103px,17cqw,240px); column-gap:clamp(6px,1.3cqw,22px); row-gap:5px; align-items:stretch; padding:7px clamp(8px,1.15cqw,16px) 9px; border-top:3px solid #d48a48; background:repeating-linear-gradient(178deg,#bb6d3635 0 2px,#3e1b0c32 4px,transparent 6px 13px),linear-gradient(#93532d,#693821 63%,#44231a); box-shadow:inset 0 4px 11px #3e180970; }
.cookline { display:grid; grid-area:1/1; grid-template-columns:minmax(0,1fr); gap:clamp(4px,.85cqw,12px); min-height:clamp(113px,14.6cqw,224px); }
.cookline:has(.milk-station:not([hidden])) { grid-template-columns:clamp(78px,25%,224px) minmax(0,1fr); }
.grill-station { position:relative; min-width:0; isolation:isolate; }
.grill-station::before { content:""; position:absolute; z-index:-1; inset:4% 0 3%; background:url("assets/grill-rack-0.png") center / 100% 100% no-repeat; filter:drop-shadow(0 5px 3px #240e09b5); }
.grill-station:has(.grill[data-slots="7"])::before { background-image:url("assets/grill-rack-1.png"); }
.customers { --order-width:clamp(84px,11cqw,130px); --order-height:clamp(124px,19.5cqw,190px); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); position:absolute; inset:7% 10% 0; z-index:2; pointer-events:none; }
.customer { position:relative; height:100%; min-height:0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; border:0; background:none; padding:0; outline-offset:-2px; pointer-events:auto; }
.customers[data-seats="1"] { grid-template-columns:1fr minmax(0,clamp(225px,61cqw,540px)) 1fr; }
.customers[data-seats="1"] .customer { flex-direction:row-reverse; align-items:flex-end; justify-content:center; gap:clamp(7px,1.2cqw,18px); }
.customers[data-seats="1"] .bubble { margin-bottom:clamp(7px,1.35cqw,19px); }
.customers[data-seats="1"] .bubble::after { left:0; bottom:23%; transform:translateX(-51%) rotate(135deg); }
.customers[data-seats="1"] .guest-frame { width:clamp(109px,24cqw,257px); height:84%; }
.customer[data-paid="true"] { cursor:default; pointer-events:none; }
.guest-frame { position:relative; height:55%; min-height:0; width:100%; pointer-events:none; }
.guest-portrait { position:absolute; inset:0; display:flex; justify-content:center; align-items:flex-end; overflow:hidden; }
.guest-pose { position:relative; width:88%; height:100%; filter:drop-shadow(0 6px 8px #13052770); }
.portrait { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; object-position:center bottom; }
.portrait-uneasy,.portrait-impatient,.portrait-happy { opacity:0; mask-image:linear-gradient(#000 0 62%,transparent 79%); transition:opacity .28s ease-in-out; }
.customer:is([data-mood="uneasy"],[data-mood="impatient"]) .portrait-uneasy,.customer[data-mood="impatient"] .portrait-impatient { opacity:1; }
.customer[data-happy="true"] .portrait-happy { opacity:1; }
.customer[data-happy="true"] .guest-frame::after { content:"✧"; position:absolute; left:52%; bottom:27%; z-index:1; color:#fff1aa; font-size:clamp(17px,3cqw,37px); text-shadow:0 0 10px #ffad45; animation:guest-delight .78s ease-out both; }
@keyframes guest-delight { from { opacity:0; transform:translateY(12px) scale(.65); } 25% { opacity:1; transform:translateY(0) scale(1); } to { opacity:0; transform:translateY(-25px) scale(.8); } }
.customer.enter .guest-pose { animation:guest-arrives .53s ease-out both; }
.customer.enter .bubble { animation:order-appears .23s .35s ease-out both; }
@keyframes guest-arrives { 0% { opacity:0; translate:var(--arrival-x) 68%; } 42% { opacity:1; translate:calc(var(--arrival-x) * .38) 10%; } 74% { translate:5px -3%; } 100% { translate:0 0; } }
@keyframes order-appears { from { opacity:0; translate:0 7px; } to { opacity:1; translate:0 0; } }
.bubble { --patience-width:clamp(8px,1.05cqw,14px); position:relative; flex:none; display:flex; flex-direction:column; justify-content:center; width:min(100%,var(--order-width)); min-height:var(--order-height); color:#552c20; font-weight:700; text-align:left; background:linear-gradient(#fff5e2,#ffdfae); box-shadow:inset 0 0 0 2px #fff0d796,0 3px 0 #a56235,0 5px 12px #1805117a; border:2px solid #f0c893; border-radius:clamp(11px,1.2cqw,19px); padding:6px calc(var(--patience-width) + 10px) 6px 5px; margin-bottom:8px; }
.customer:hover .bubble,.customer[aria-pressed=true] .bubble { border-color:#ffba57; box-shadow:inset 0 0 0 2px #fff7dd,0 0 0 2px #ffb449a3,0 4px 9px #1f07148c; }
.customer[aria-pressed=true] .bubble { outline:2px solid #ffce76; outline-offset:2px; }
.bubble::after { content:""; position:absolute; width:15px; height:15px; transform:translateX(-50%) rotate(45deg); bottom:-7px; left:50%; background:#ffe1b1; border:solid #edbc83; border-width:0 2px 2px 0; border-radius:0 0 4px; z-index:-1; }
.speech { position:absolute; z-index:4; left:72%; bottom:calc(100% - 21px); width:max-content; max-width:min(155px,calc(var(--order-width) + 34px)); border:1px solid #f7cb91; border-radius:12px; padding:5px 8px; background:#fff1d9; color:#5b2f23; text-align:left; line-height:1.22; font-size:clamp(10px,1.05cqw,14px); font-weight:750; box-shadow:0 2px 6px #190e2182; }
.speech::after { content:""; position:absolute; bottom:-4px; left:9px; width:6px; height:6px; transform:rotate(45deg); border:solid #f7cb91; border-width:0 1px 1px 0; background:inherit; }
.speech:empty { display:none; }
.customers:not([data-seats="1"]) .speech { max-width:var(--order-width); }
.orders { display:grid; gap:2px; }
.order-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px; padding:2px 3px; border-radius:7px; background:#fff7e44f; line-height:1.15; font-size:clamp(12px,1.18cqw,16px); text-align:left; }
.order-dish { position:relative; display:grid; place-items:center; min-width:0; }
.order-dish > img { display:block; width:100%; height:clamp(27px,3.3cqw,36px); object-fit:contain; filter:drop-shadow(0 2px 1px #8d48265e); }
.bubble:has(.order-seasoning:not([hidden])) .orders { flex:1; align-content:center; }
.order-seasoning { display:grid; place-items:center; flex:none; margin-top:4px; padding-top:3px; border-top:1px dashed #c58855; }
.order-seasoning img { display:block; width:clamp(27px,3.4cqw,40px); height:clamp(20px,2.85cqw,31px); object-fit:contain; filter:drop-shadow(0 1px 1px #8d482654); }
.order-quantity { display:grid; justify-items:center; gap:2px; white-space:nowrap; font-weight:900; font-variant-numeric:tabular-nums; }
.order-item.complete { background:#e6edc9; }
.order-check { color:#3c712a; font-size:1.22em; line-height:.85; }
.flavor { border-radius:4px; padding:1px 3px; color:#fff8de; font-weight:800; font-size:.94em; }
.flavor.plain { background:#77503b; }.flavor.chili { background:#a92d27; }.flavor.garlic { background:#5b6830; }.flavor.cumin { background:#815027; }
.flavor.honey { background:#92501b; }.flavor.pepper { background:#4a403d; }
.patience { position:absolute; inset:8px 5px 8px auto; width:var(--patience-width); border:1px solid #a97853; background:#ae826c; box-shadow:inset 0 1px 2px #65301870; border-radius:20px; overflow:hidden; }
.patience i { display:block; height:100%; width:100%; border-radius:20px; background:linear-gradient(#a4df48,#518b20); transform-origin:center bottom; transition:transform .16s linear; }
.customer[data-mood="uneasy"] .patience i { background:linear-gradient(#ffd369,#d38b29); }
.customer[data-mood="impatient"] .patience i { background:linear-gradient(#ff9069,#bd412b); }
.payment-trail { position:fixed; z-index:12; pointer-events:none; }
.payment-trail i { position:absolute; display:grid; place-items:center; width:19px; height:19px; border:2px solid #ffe591; border-radius:50%; background:linear-gradient(#ffcf43,#dc720e); box-shadow:0 0 8px #ffc65b9c; color:#672a08; font:bold 12px/1 sans-serif; animation:coin-flight .54s ease-in both; }
.payment-trail i:nth-of-type(2) { animation-delay:.07s; --arc:23px; }
.payment-trail i:nth-of-type(3) { animation-delay:.14s; --arc:-18px; }
.payment-value { position:absolute; white-space:nowrap; color:#fff390; text-shadow:0 2px #973d0e,0 3px 6px #2c120e; font-size:clamp(17px,3cqw,29px); animation:payment-value .63s ease-out both; }
@keyframes coin-flight { from { opacity:0; translate:-50% -50%; } 20% { opacity:1; } 52% { translate:calc(var(--cash-x)*.5 + var(--arc,0px)) calc(var(--cash-y)*.62 - 14px); } to { opacity:.15; translate:var(--cash-x) var(--cash-y); scale:.55; } }
@keyframes payment-value { from { opacity:0; translate:-50% -90%; } 22%,60% { opacity:1; } to { opacity:0; translate:-50% -185%; } }
.cash-paid { animation:cash-paid .32s ease-out both; }
@keyframes cash-paid { 45% { scale:1.14; color:#fff6bc; text-shadow:0 0 10px #ffca54; } }
.cash-deducted { animation:cash-deducted .55s ease-out both; }
@keyframes cash-deducted { 40% { scale:1.18; color:#ffad9e; text-shadow:0 0 9px #ff7564; } }
.waste-fee { position:fixed; z-index:12; pointer-events:none; padding:3px 8px; border:1px solid #ff9b83; border-radius:99px; background:#751e24; color:#ffe2d5; box-shadow:0 3px 8px #24080bc9; font-size:clamp(13px,1.8cqw,19px); font-weight:950; white-space:nowrap; translate:-50% -100%; animation:waste-fee .9s ease-out both; }
@keyframes waste-fee { from { opacity:0; translate:-50% -70%; } 16%,64% { opacity:1; } to { opacity:0; translate:-50% calc(-100% - 26px); } }
.grill { position:absolute; inset:12% 7% 25%; display:grid; grid-template-columns:repeat(var(--grill-slots,5),minmax(0,1fr)); gap:1.1%; z-index:2; }
.slot { border:1px solid transparent; border-radius:11px; background:transparent; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:0; min-width:0; color:#ffe3a6; position:relative; touch-action:none; }
.skewer-art { display:block; position:relative; width:77%; height:86%; }
.skewer-art img { position:absolute; top:50%; left:50%; display:block; width:auto; height:var(--skewer-height,84%); max-width:none; transform:translate(-50%,-50%) rotate(var(--skewer-angle,-33deg)); filter:sepia(var(--sear,0)) hue-rotate(var(--taste-tone,0deg)) saturate(calc(1.09 + var(--taste-color,0) + var(--sear,0))) brightness(calc(1.05 + var(--oil-shine,0) + var(--taste-light,0))) drop-shadow(1px 2px 2px #160604cf); animation:sizzle .85s ease-in-out alternate infinite; transition:filter .2s ease-out; pointer-events:none; }
.skewer-art[data-look="raw"] img { filter:sepia(var(--sear,0)) saturate(calc(1.05 + var(--sear,0))) brightness(calc(1.12 + var(--oil-shine,0))) drop-shadow(1px 2px 2px #160604cf); }
.held-oil-brush,.waste-ghost { position:fixed; z-index:15; pointer-events:none; }
.held-oil-brush { left:0; top:0; width:clamp(30px,5vw,53px); aspect-ratio:1; transform-origin:center; }
.held-oil-brush img,.waste-ghost > img { width:100%; height:100%; object-fit:contain; filter:brightness(1.18) drop-shadow(0 2px 3px #251011ac); }
.oil-brush-returning { animation:brush-return .46s ease-in-out both; }
@keyframes brush-return {
  0% { opacity:1; }
  76% { opacity:1; transform:translate3d(var(--oil-home-x),calc(var(--oil-home-y) - 5px),0) rotate(68deg) scale(.75); }
  100% { opacity:0; transform:translate3d(var(--oil-home-x),var(--oil-home-y),0) rotate(59deg) scale(.44); }
}
.grill.oil-held .slot { cursor:none; }
.oil-glint { position:absolute; z-index:3; inset:23% 24%; pointer-events:none; border-radius:50%; background:radial-gradient(ellipse at 48% 50%,#fff6cfb0 0%,#ffce7436 30%,transparent 64%); animation:oil-wet .43s ease-out both; }
@keyframes oil-wet { from { opacity:0; transform:translateY(-35%) scale(.47,.82); } 25% { opacity:1; } to { opacity:0; transform:translateY(35%) scale(.86,.67); } }
.waste-ghost { width:clamp(43px,8vw,70px); height:clamp(43px,8vw,70px); translate:-50% -50%; }
.waste-ghost .skewer-art { width:100%; height:100%; }
.waste-ghost .skewer-art,.waste-ghost .skewer-art img { animation:none; }
.waste-dragging img { visibility:hidden; }
.waste-ghost-burnt > img { filter:brightness(.57) saturate(.66) drop-shadow(0 2px 2px #210e0c8c); }
.slot[data-oiled="true"] { --oil-shine:.10; }
.slot[data-flavor="chili"] { --taste-tone:-14deg; --taste-color:.33; --taste-light:-.06; }
.slot[data-flavor="garlic"] { --taste-tone:6deg; --taste-color:-.12; --taste-light:.16; }
.slot[data-flavor="cumin"] { --taste-tone:5deg; --taste-color:.15; --taste-light:-.13; }
.slot[data-flavor="honey"] { --taste-tone:6deg; --taste-color:.25; --taste-light:.09; }
.slot[data-flavor="pepper"] { --taste-color:-.15; --taste-light:-.17; }
.slot.burnt .skewer-art img { filter:brightness(.32) saturate(.31) drop-shadow(0 4px 3px #160604aa); }
.skewer-art.turning { animation:flip-skewer .46s ease-in-out both; }
.slot[data-side="back"] .skewer-art:not(.turning) { transform:scaleX(-1); }
@keyframes flip-skewer { 0% { transform:perspective(160px) rotateY(0deg); } 54% { transform:perspective(160px) translateY(-12px) rotateY(110deg) scale(1.11); } 100% { transform:perspective(160px) rotateY(180deg); } }
.slot.flip,.slot.ready { border-color:#ffc45b; background:#ffe06b14; box-shadow:inset 0 0 17px #ffc5534d; }
.slot.ready { border-color:#dbef6e; }.slot.burnt { border-color:#ff7757; }
.slot.waste-picked { outline:2px solid #ffb06e; background:#a349295e; }
.slot-tag { position:absolute; top:6%; right:4%; margin:0; font-size:clamp(10px,.95vw,14px); line-height:1; white-space:nowrap; font-weight:800; background:#271711e8; color:#ffecb5; border-radius:7px; padding:3px 6px; }
.slot-flavor { position:absolute; bottom:13%; left:50%; translate:-50% 0; font-size:clamp(8px,.78vw,12px); line-height:1.2; white-space:nowrap; }
.grill-tool { position:absolute; z-index:1; top:19.5%; left:16%; width:68%; height:61%; pointer-events:none; filter:drop-shadow(0 2px 2px #2b0d07cc); animation-duration:.68s; animation-timing-function:ease-out; animation-fill-mode:both; }
.grill-tool > img { display:block; width:100%; height:100%; object-fit:contain; }
.brush-pass { animation-name:brush-pass; }
.shake-pass { animation-name:shake-pass; }
@keyframes brush-pass { 0% { opacity:.3; transform:translate(var(--tool-x),var(--tool-y)) rotate(-24deg); } 25% { opacity:1; } 51% { transform:translate(11%,-18%) rotate(-11deg); } 79% { opacity:1; transform:translate(-11%,11%) rotate(9deg); } 100% { opacity:0; transform:translate(-22%,31%) rotate(14deg); } }
@keyframes shake-pass { 0% { opacity:0; transform:translate(var(--tool-x),var(--tool-y)); } 38% { opacity:1; transform:translate(14%,-40%) rotate(111deg); } 55% { transform:translate(-8%,-52%) rotate(84deg); } 71% { opacity:1; transform:translate(14%,-40%) rotate(105deg); } 100% { opacity:0; transform:translate(20%,-53%) rotate(15deg); } }
.slot.ready .slot-tag { background:#c6e66b; color:#28350e; }.slot.flip .slot-tag { background:#ffbd5b; color:#4f210c; }
.slot.burn-warning .slot-tag { background:#ad321d; color:#fff0cf; }
.slot.burn-warning { border-color:#ff7a52; box-shadow:inset 0 0 13px #ff572e90; }
.slot[data-oiled="false"]:is(.raw,.ready) .slot-tag { background:#ffe49a; color:#56311c; }
.heat { position:absolute; bottom:4%; width:63%; height:4px; background:#280d0a; border-radius:8px; overflow:hidden; }
.heat i { display:block; height:100%; width:100%; transform-origin:left; background:#ffbc48; border-radius:8px; }
@keyframes sizzle { from { translate:0 0; } to { translate:0 -2px; } }
.counter-plate { position:relative; grid-area:1/2; z-index:3; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(53px,1fr) auto; gap:4px; justify-items:center; align-items:center; padding:3px 0; }
.plate-settings { position:relative; color:#512715; font-size:clamp(14px,1.45vw,24px); font-weight:900; text-align:center; white-space:nowrap; background:linear-gradient(#ffdfa1,#d68842); border:2px solid #e7a75d; border-radius:7px; padding:.1em .55em; box-shadow:0 3px #6d321d,0 5px 8px #361409a8; rotate:-3deg; }
.plate-settings:hover { background:linear-gradient(#fff0b9,#e5964e); }
.plate-settings span { display:inline-block; margin-left:.34em; border-left:1px solid #a36036; padding-left:.4em; font-size:.59em; vertical-align:.13em; }
.counter-plate small { font-size:.77em; }
.counter-plate small:not(:empty) { margin-left:.2em; }
.plate-tray { position:relative; isolation:isolate; width:100%; height:100%; min-height:0; container-type:size; }
.plate-surface { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.plate-surface img { display:block; width:min(96cqw,184cqh); height:auto; aspect-ratio:1.9; object-fit:fill; filter:drop-shadow(0 2px 3px #2b110fa0); }
.plate-items { position:absolute; left:50%; top:50%; translate:-50% -50%; width:min(83cqw,159cqh); height:min(40cqw,76cqh); display:flex; flex-wrap:wrap; justify-content:center; align-content:center; gap:0; }
.plate-item { flex:0 0 32%; height:48%; max-height:66px; position:relative; border:0; background:transparent; border-radius:9px; padding:0; touch-action:none; }
.plate-items[data-count="1"] .plate-item { flex-basis:69%; height:78%; max-height:101px; }
.plate-items[data-count="2"] .plate-item { flex-basis:37%; height:75%; max-height:94px; }
.plate-items[data-count="3"] .plate-item { height:70%; max-height:76px; }
.plate-items[data-count="4"] .plate-item { flex-basis:42%; }
.plate-item::before { content:""; position:absolute; inset:47% 9% 13%; background:radial-gradient(ellipse,#1c0b07a0,transparent 69%); pointer-events:none; }
.plate-item img { position:relative; display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; filter:drop-shadow(0 1px 1px #240f09ba); }
.plate-item[data-kind="food"] img { transform:scaleY(.82) rotate(19deg); }
.plate-items[data-count="2"] .plate-item img { width:118%; margin-left:-9%; }
.plate-item i { position:absolute; bottom:-2px; right:-1px; font-size:8px; line-height:1; font-style:normal; }
.slot.seasoned::after { content:""; pointer-events:none; position:absolute; width:3px; height:3px; left:47%; top:46%; border-radius:50%; color:#ffd483; background:currentColor; box-shadow:-10px -5px 0 #ffa452,8px -9px 0 #fff1b2,12px 5px 0 #ffe38f,-8px 9px 0 #ffc266; animation:sprinkle .6s ease-out both; }
.slot.seasoned::after { animation-delay:.23s; }
@keyframes sprinkle { from { opacity:1; transform:scale(.5) translateY(-5px); } to { opacity:0; transform:scale(1.9) translateY(3px); } }
.gold { background:linear-gradient(#ffb020 0%,#ff7d06 53%,#ea4600 100%); color:#fff4d2; border:2px solid #ffbb49; border-top-color:#ffe276; border-radius:999px; font-weight:1000; box-shadow:inset 0 -5px 0 #b934087a,0 4px 0 #8f260d,0 6px 10px #2f130cbb; text-shadow:0 2px 1px #a63815; }
.gold:hover { background:linear-gradient(#ffc348,#fa6908 78%); }
.serve { position:relative; z-index:1; grid-row:3; width:100%; padding:.22em .27em .34em; line-height:1.15; white-space:nowrap; font-size:clamp(17px,2.28vw,37px); }
.serve:disabled { filter:saturate(.65) brightness(.89); }
.trash-button { grid-area:2/2; justify-self:end; align-self:end; z-index:4; display:flex; flex-direction:column; align-items:center; gap:2px; padding:0 5px; border:0; border-radius:8px; color:#fff0dc; font-weight:850; font-size:clamp(10px,1vw,15px); white-space:nowrap; background:none; text-shadow:0 1px 2px #361409; }
.trash-art { display:block; position:relative; width:clamp(36px,4.4vw,58px); height:clamp(48px,5.4vw,71px); }
.trash-art img { position:absolute; bottom:0; left:0; width:100%; display:block; pointer-events:none; filter:brightness(1.2) drop-shadow(0 3px 2px #28130b85); }
.trash-open,.trash-button[data-open="true"] .trash-closed { visibility:hidden; }
.trash-button[data-open="true"] .trash-open { visibility:visible; }
.trash-button[data-open="true"] { color:#ffdb84; }
.start { margin-top:13px; padding:.47em 1.85em .58em; font-size:clamp(21px,2.3vw,33px); white-space:nowrap; }
.sauce-bar { grid-area:2/1; align-self:end; z-index:3; min-width:0; }
.condiment-rack { display:flex; flex-wrap:wrap; align-items:end; gap:6px clamp(12px,2.7cqw,33px); padding-left:3px; }
.condiment-group { display:flex; flex-wrap:wrap; gap:clamp(4px,1cqw,13px); align-items:end; max-width:100%; }
.condiment-bowls .condiment-icon > img { height:84%; align-self:end; }
.sauce-option { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; width:clamp(44px,7.4cqw,82px); min-width:0; min-height:32px; padding:0 1px 1px; background:none; color:#ffe8c9; border:0; border-radius:7px; font-size:clamp(10px,.98cqw,14px); font-weight:850; line-height:1.1; white-space:nowrap; text-shadow:0 1px 3px #28130b,0 1px #28130b; }
.condiment-art { position:relative; display:block; width:100%; }
.condiment-icon { --counter-light:1.02; width:100%; height:clamp(34px,5.3cqw,62px); display:grid; grid-template-rows:minmax(0,1fr); place-items:center; filter:brightness(var(--counter-light)) drop-shadow(0 3px 2px #28130ba3); transition:filter .18s ease,translate .18s ease; }
.condiment-icon > img { display:block; width:100%; height:100%; min-height:0; object-fit:contain; object-position:bottom center; }
.condiment-lock { position:absolute; top:0; right:0; width:clamp(12px,1.7cqw,19px); height:clamp(12px,1.7cqw,19px); object-fit:contain; filter:drop-shadow(0 1px 2px #28130b); }
.sauce-option:disabled { color:#e4c4aa; }
.sauce-option:enabled:hover .condiment-icon,.sauce-option[aria-pressed="true"] .condiment-icon { --counter-light:1.22; translate:0 -2px; }
.sauce-option:enabled:active .condiment-icon { translate:0 1px; }
.milk-station { min-width:0; display:grid; grid-template-rows:minmax(0,1fr); margin-bottom:8px; padding:2px 2px 0; }
.milk-hobs { display:flex; min-height:0; gap:4px; }
.station-button { position:relative; display:grid; flex:1; min-width:0; grid-template-rows:auto minmax(38px,1fr) auto; align-items:center; justify-items:center; gap:1px; padding:2px 1px 9px; border:0; background:none; font-size:clamp(9px,1.02cqw,13px); font-weight:800; line-height:1.15; white-space:nowrap; color:#ffecce; text-shadow:0 1px 2px #311405; }
.station-button[data-state=ready] .drink-time { color:#e9ffb5; }
.station-button[data-state=burnt] { touch-action:none; }
.station-button[data-state=burnt] .drink-time { color:#ffc298; }
.station-button .heat { width:82%; bottom:3px; }
.station-button[data-state=ready] .heat i { background:#b8e567; }
.station-button[data-state=burnt] .heat i { background:#e96e45; }
.milk-art { position:relative; isolation:isolate; width:100%; height:100%; max-width:142px; container-type:size; }
.milk-base { position:absolute; left:50%; bottom:3%; translate:-50% 0; width:min(100cqw,75cqh); height:auto; display:none; pointer-events:none; filter:drop-shadow(0 2px 2px #210e0c8c); }
.station-button.waste-dragging .milk-base { display:block; visibility:visible; }
.milk-prop { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; object-position:center bottom; pointer-events:none; filter:drop-shadow(0 2px 2px #210e0c8c); }
.station-button:hover .milk-prop { filter:brightness(1.09) drop-shadow(0 2px 2px #210e0c8c); }
.station-button[data-state=heating] .milk-prop { filter:brightness(1.06) drop-shadow(0 1px 3px #f4794290); }
.station-button[data-state=burnt] .milk-prop { filter:brightness(.57) saturate(.66) drop-shadow(0 2px 2px #210e0c8c); }
.station-button.waste-picked .milk-prop { filter:brightness(.65) saturate(.72) drop-shadow(0 0 4px #fba66f); }
.milk-steam { position:absolute; display:none; inset:0; pointer-events:none; }
.station-button:is([data-state=heating],[data-state=ready],[data-state=burnt]) .milk-steam { display:block; }
.milk-steam i { position:absolute; left:40%; bottom:73%; width:19%; height:27%; border-radius:64% 30% 62% 38%; background:radial-gradient(ellipse,#fff1d5a0,transparent 70%); filter:blur(1px); opacity:0; animation:milk-steam 1.3s ease-out infinite; }
.milk-steam i:nth-child(2) { left:51%; animation-delay:-.46s; }.milk-steam i:nth-child(3) { left:33%; animation-delay:-.88s; }
.station-button[data-state=burnt] .milk-steam i { background:radial-gradient(ellipse,#6a534ad0,transparent 70%); }
@keyframes milk-steam { 20% { opacity:.85; } to { opacity:0; transform:translate(5px,-19px) scale(1.55) rotate(15deg); } }
.game:not(.running) .milk-steam i { animation-play-state:paused; }
.embers { position:absolute; inset:33% 8% 22%; z-index:1; pointer-events:none; }
.embers i { position:absolute; width:3px; height:3px; background:#ffd05f; box-shadow:0 0 6px 3px #ff620580; border-radius:50%; bottom:40%; animation:ember var(--life) ease-out var(--delay) infinite; }
@keyframes ember { 0% { opacity:0; translate:0 0; } 17% { opacity:.84; } 100% { opacity:0; translate:20px -110px; } }
.supply { border-radius:15px 15px 24px 24px; padding:8px clamp(10px,3.1vw,51px) 12px; }
.supply-top { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:0 1px 7px; }
.supply-top h2 { display:flex; gap:6px; align-items:center; white-space:nowrap; color:#ffce96; font-size:clamp(14px,1.12vw,17px); }
.supply-top h2 [data-icon] { width:17px; height:17px; }
.supply-top p { color:#ffdbc0; font-size:clamp(11px,.98vw,15px); line-height:1.3; text-align:center; margin-inline:auto; }
.supply-messages { display:grid; flex:1; min-width:0; }
.supply-messages p { grid-area:1/1; align-self:center; }
.supply-messages:has(.toast:not([hidden])) #hint { visibility:hidden; }
.supply-messages .toast { color:#fff1ba; font-weight:850; }
.supply-messages .toast.good { color:#e3f4aa; }
.text-button { padding:0; flex:none; background:none; border:0; color:#ffd894; font-size:clamp(11px,.98vw,15px); text-decoration:underline; }
.ingredients { --ingredient-gap:clamp(6px,1.15vw,18px); display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:calc(var(--ingredient-gap)*1.75); }
.ingredient-group { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:var(--ingredient-gap); }
.ingredient { position:relative; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2px 4px 6px; height:clamp(66px,7.1vw,114px); border:2px solid #ffe0a6; border-radius:clamp(10px,1.5vw,24px); box-shadow:inset 0 -5px 0 #a8673e72,0 4px 0 #3b1a14,0 5px 8px #1c100e86; background:radial-gradient(ellipse at center,#fff3d1,#efbb7c); color:#572c19; font-weight:1000; line-height:1.15; white-space:nowrap; font-size:clamp(11px,1.38vw,21px); }
.ingredient img { display:block; width:82%; height:72%; object-fit:contain; filter:drop-shadow(0 4px 2px #86451d53); }
.ingredient:not(:disabled):hover { background:#fff0bf; translate:0 -2px; }
.ingredient:disabled { background:linear-gradient(#825742,#664132); border-color:#a97459; color:#f7cfaa; box-shadow:inset 0 -5px #44281fc7,0 4px #321a16; font-weight:700; font-size:clamp(10px,1vw,15px); }
.ingredient:disabled img { width:49%; height:56%; opacity:.9; }
.game:not(.running) .skewer-art img,.game:not(.running) .embers i { animation-play-state:paused; }
.dialog { width:min(calc(100% - 30px),490px); max-height:calc(100svh - 30px); padding:26px; border:2px solid #c78551; border-radius:23px; background:linear-gradient(145deg,#533026,#311b24); box-shadow:inset 0 1px #ecad6870,0 20px 75px #0f060de3; color:var(--cream); }
.dialog::backdrop { background:#1a0a19bd; backdrop-filter:blur(5px); }
.dialog h2 { color:#ffd393; margin:0 0 12px; font-size:27px; }
.dialog p,.dialog li { color:#f7d8b9; line-height:1.6; font-size:15px; }
.dialog ul { padding-left:1.35em; margin:10px 0; }
.dialog li + li { margin-top:6px; }
.dialog .gold { padding:7px 19px 9px; }
.dialog-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:19px; }
.dialog-title-icon { width:48px; height:48px; object-fit:contain; display:block; margin-bottom:9px; }
.dialog[data-panel="result"] { position:fixed; inset:0; margin:auto; width:min(calc(100% - 30px),440px); height:fit-content; padding:clamp(20px,5vw,34px); text-align:center; }
.dialog[data-panel="result"] .dialog-title-icon { width:54px; height:54px; margin:0 auto 9px; }
.dialog[data-panel="result"] h2 { font-size:clamp(24px,4.5vw,31px); line-height:1.2; }
.dialog[data-panel="result"] p { text-wrap:balance; }
.dialog[data-panel="result"] p + p { margin-top:4px; }
.dialog[data-panel="result"] .dialog-actions { flex-direction:column; justify-content:center; gap:10px; }
.dialog[data-panel="result"] .dialog-actions .text-button { padding:3px 9px; }
.level-list { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin:13px 0; }
.level-button { text-align:left; padding:8px 11px; background:#75432d; border:1px solid #b97b55; border-radius:9px; font-weight:800; }
.level-button:disabled { opacity:.49; }.level-button small { display:block; font-weight:500; margin-top:2px; color:#ffe2b9; }
.plate-options { display:grid; gap:8px; margin:14px 0 4px; }
.plate-option { display:grid; grid-template-columns:85px minmax(0,1fr); grid-template-rows:1fr 1fr; column-gap:12px; align-items:center; text-align:left; min-height:62px; border:1px solid #b57855; border-radius:12px; padding:6px 11px; background:#734532; color:#fff1d5; }
.plate-option img { grid-row:span 2; width:85px; height:50px; object-fit:contain; filter:drop-shadow(0 2px 3px #27100c97); }
.plate-option strong { align-self:end; line-height:1.2; }
.plate-option span { align-self:start; font-size:12px; line-height:1.4; color:#ffdfba; margin-top:3px; }
.plate-option:hover,.plate-option[aria-pressed=true] { background:#8c5633; border-color:#ffce86; }
.plate-option[aria-pressed=true] strong::after { content:"使用中"; font-size:10px; color:#fff0b4; margin-left:6px; background:#532e23; border-radius:5px; padding:2px 4px; }
@media(max-width:1100px) {
  .top { min-height:67px; gap:10px; padding-inline:8px; }
  .wordmark { padding:0; }
  .stat { gap:4px; }
  .stat:nth-child(n+4) [data-icon] { display:none; }
  .utility { gap:5px; }
  .supply { padding-inline:18px; }
}
@media(min-width:650px) {
  .customers[data-seats="1"] .customer { translate:clamp(-63px,-7.3cqw,-16px) 0; }
  .customers:not([data-seats="1"]) .customer { flex-direction:row-reverse; align-items:flex-end; justify-content:center; gap:clamp(4px,.65cqw,9px); }
  .customers:not([data-seats="1"]) .bubble { margin-bottom:8px; }
  .customers:not([data-seats="1"]) .bubble::after { left:0; bottom:23%; transform:translateX(-51%) rotate(135deg); }
  .customers:not([data-seats="1"]) .guest-frame { width:49%; height:78%; }
  .customers:not([data-seats="1"]) .speech { left:auto; right:52%; }
  .customers:not([data-seats="1"]) .speech::after { left:auto; right:8px; }
}
@media(max-width:649px) {
  .market-view:has(.customers:not([data-seats="1"])) { min-height:246px; }
  .customers:not([data-seats="1"]) .guest-frame { flex:1; max-height:104px; }
  .customers:not([data-seats="1"]) .guest-portrait { justify-content:flex-start; }
  .customers:not([data-seats="1"]) .guest-pose { width:72%; }
  .customers:not([data-seats="1"]) .speech { left:55%; bottom:auto; top:0; max-width:45%; padding:3px 4px; font-size:9px; }
  .customers:not([data-seats="1"]) .speech::after { left:-3px; bottom:7px; transform:rotate(135deg); }
}
@media(min-width:841px) and (max-height:830px) {
  .plate-settings { font-size:clamp(13px,1.33cqw,19px); }
  .serve { font-size:clamp(17px,1.75cqw,24px); }
}
@media(max-width:840px) {
  .game { padding:7px; }
  .opening { min-height:min(640px,calc(100svh - 14px)); border-radius:18px; }
  .top { grid-template-columns:1fr auto; grid-template-areas:"mark utility" "hud hud"; gap:6px; padding:6px 7px 8px; border-radius:17px 17px 10px 10px; }
  .wordmark { grid-area:mark; gap:5px; }.wordmark h1 { font-size:24px; }.wordmark p { font-size:8px; }
  .hud { grid-area:hud; gap:4px; grid-template-columns:.9fr .98fr .91fr 1.23fr .82fr; }
  .stat { height:39px; padding:3px 3px 5px; border-radius:9px; gap:2px; flex-wrap:wrap; align-content:center; line-height:1; }
  .stat strong { font-size:16px; }.stat-level strong { font-size:13px; }
  .stat [data-icon] { height:13px; width:13px; }.stat:not(.stat-level) [data-icon] { display:none; }
  .stat-label { font-size:10px; flex-basis:100%; text-align:center; color:#ffcda5; }
  .utility { grid-area:utility; }.utility button { border-radius:10px; }
  .scene { border-radius:14px 14px 10px 10px; }
  .market-view { height:clamp(204px,34cqw,255px); background-size:auto 174%; }
  .workbench { grid-template-columns:minmax(0,1fr) clamp(101px,21cqw,144px); padding:6px 7px 8px; }
  .cookline { min-height:clamp(112px,19cqw,158px); }
  .customers { inset:2% 1% 0; grid-template-columns:1fr 1fr 1fr; gap:1%; }
  .guest-frame { height:52%; }
  .guest-pose { width:91%; }
  .bubble { padding:4px calc(var(--patience-width) + 7px) 4px 4px; border-radius:11px; margin-bottom:7px; }
  .bubble::after { width:8px; height:8px; bottom:-5px; }
  .orders { gap:2px; }
  .order-dish > img { height:clamp(26px,3.7cqw,32px); }
  .patience { inset:6px 4px 6px auto; }
  .slot-tag { font-size:9px; padding:3px; }
  .counter-plate { grid-template-rows:auto minmax(52px,1fr) auto; padding:0; gap:3px; }
  .plate-settings { grid-area:1/1/2/-1; rotate:0deg; font-size:clamp(10px,1.7vw,15px); padding:.14em .28em .2em; }
  .plate-settings span { margin-left:.25em; padding-left:.28em; color:#592b17; font-size:.72em; }
  .counter-plate .plate-tray { width:min(100%,144px); }
  .serve { grid-area:3/1; width:100%; font-size:clamp(14px,2.1vw,20px); padding:.21em .3em .28em; }
  .trash-button { min-width:44px; font-size:clamp(9px,1.5vw,12px); line-height:1.1; }
  .sauce-option { width:clamp(41px,10cqw,70px); }
  .condiment-icon { height:clamp(34px,6.7cqw,52px); }
  .supply { padding:6px 6px 9px; border-radius:10px 10px 16px 16px; }
  .supply-top { gap:5px; padding-bottom:6px; }
  .supply-top h2 { font-size:12px; gap:3px; }.supply-top h2 [data-icon] { width:13px; height:13px; }
  .supply-top p,.text-button { font-size:10px; }
  .ingredients { --ingredient-gap:3px; }
  .ingredient { font-size:clamp(9px,2.45vw,13px); border-width:1px; padding:2px 0 4px; height:58px; }
  .ingredient:disabled { font-size:clamp(8px,2.2vw,12px); }
  .ingredient img { height:67%; }
}
@media(max-width:550px) {
  .ingredients { --ingredient-gap:5px; grid-template-columns:minmax(0,1fr); }
  .customers:not([data-seats="1"]) { --order-width:90px; }
  .cookline:has(.milk-station:not([hidden])) .slot-tag { max-width:96%; padding:2px 1px; overflow:hidden; text-overflow:ellipsis; }
}
@media(max-width:430px) {
  .cookline { grid-column:1/-1; }
  .counter-plate { grid-area:2/2; }
  .trash-button { grid-area:3/2; }
  .sauce-bar { grid-row:2/4; align-self:center; }
  .condiment-group { gap:4px; }
  .sauce-option { width:clamp(36px,9.7cqw,45px); }
}
@media(max-width:370px) { .slot-tag { font-size:8px; }.stat-level strong,.stat .stat-label { font-size:9px; }.stat strong { font-size:13px; }.stat-level [data-icon] { display:none; } }
@media(orientation:landscape) and (max-height:520px) {
  :root {
    --game-inset-top:max(5px,env(safe-area-inset-top));
    --game-inset-bottom:max(5px,env(safe-area-inset-bottom));
    --game-inset-inline:max(6px,env(safe-area-inset-left),env(safe-area-inset-right));
  }
  .game { height:100dvh; padding:var(--game-inset-top) var(--game-inset-inline) var(--game-inset-bottom); }
  .opening { height:100%; min-height:0; padding:clamp(8px,3dvh,16px); }
  .opening-door { padding:8px 12px; }
  .opening-content { gap:clamp(4px,1.5dvh,8px); }
  .opening-logo { width:clamp(48px,19dvh,94px); }
  .opening h1 { font-size:clamp(30px,10.7dvh,56px); }
  .opening-level,.opening-actions { margin-top:0; }
  .start { margin-top:4px; font-size:clamp(18px,5.8dvh,27px); }

  .stall { display:grid; height:100%; grid-template-rows:auto minmax(0,1fr) auto; gap:4px; }
  .top {
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"mark hud utility";
    min-height:0; gap:6px; padding:2px 5px 3px; border-radius:12px 12px 8px 8px;
  }
  .wordmark { grid-area:mark; gap:4px; padding:0; }
  .wordmark h1 { font-size:clamp(13px,2.45vw,22px); }
  .wordmark p { font-size:clamp(6px,1.06vw,9px); }
  .logo { width:clamp(23px,4.2vw,35px); height:30px; }
  .hud { grid-area:hud; gap:4px; grid-template-columns:.86fr 1fr .88fr 1.45fr .95fr; }
  .stat {
    height:34px; border-radius:8px; padding:2px 2px 4px; gap:2px;
    flex-wrap:wrap; align-content:center; line-height:1;
  }
  .stat strong { font-size:clamp(12px,1.95vw,16px); }
  .stat .stat-label,.revenue-values span { font-size:clamp(9px,1.35vw,11px); }
  .stat-label { flex-basis:100%; text-align:center; color:#ffcda5; }
  .stat [data-icon] { width:12px; height:12px; }
  .stat:not(.stat-level) [data-icon] { display:none; }
  .utility { grid-area:utility; gap:3px; }
  .utility button { width:clamp(32px,5.1vw,42px); height:34px; border-radius:8px; }

  .scene { display:grid; grid-template-rows:minmax(0,1fr) clamp(94px,31dvh,158px); margin:0; min-height:0; }
  .market-view,.market-view:has(.customers:not([data-seats="1"])) {
    height:auto; min-height:0; background-size:cover;
  }
  .customers { --order-width:clamp(96px,17cqw,154px); inset:4px 2% 0; gap:2%; }
  .customers[data-seats] .customer {
    flex-direction:row-reverse; align-items:flex-end; justify-content:center; gap:4px; translate:none;
  }
  .customers[data-seats] .guest-frame { flex:none; width:44%; height:100%; max-height:none; }
  .customers:not([data-seats="1"]) .guest-frame { width:min(44%,calc(100% - var(--order-width) - 4px)); }
  .customers[data-seats] .guest-portrait { justify-content:center; }
  .customers[data-seats] .guest-pose { width:100%; }
  .customers[data-seats] .bubble {
    --patience-width:6px;
    min-height:0; margin-bottom:5px; padding:3px 12px 3px 3px; border-radius:8px;
  }
  .customers[data-seats] .bubble::after {
    left:0; bottom:23%; width:8px; height:8px; transform:translateX(-51%) rotate(135deg);
  }
  .patience { inset:4px 3px 4px auto; }
  .customers[data-seats] .speech {
    left:auto; right:0; top:0; bottom:auto; max-width:min(100%,140px);
    padding:3px 5px; font-size:10px;
  }
  .customers[data-seats] .speech::after { left:9px; right:auto; bottom:-4px; transform:rotate(45deg); }
  .orders { grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); }
  .order-item { grid-template-columns:minmax(0,1fr); gap:0; padding:1px; font-size:11px; }
  .order-dish > img { height:clamp(15px,5.5dvh,27px); }
  .order-quantity { grid-auto-flow:column; justify-content:center; }
  .order-seasoning { margin-top:2px; padding-top:1px; }
  .order-seasoning img { width:23px; height:clamp(13px,4.5dvh,23px); }

  .workbench {
    grid-template-columns:minmax(0,1fr) clamp(88px,15cqw,168px) clamp(44px,6cqw,70px);
    grid-template-rows:minmax(0,1fr) auto; gap:3px clamp(4px,1cqw,12px);
    padding:3px 6px 5px;
  }
  .cookline { grid-area:1/1; min-height:0; }
  .grill { inset:6% 5% 15%; }
  .slot-tag { font-size:clamp(9px,1.38cqw,12px); padding:2px 3px; }
  .milk-station { margin:0; padding:0; }
  .station-button { grid-template-rows:auto minmax(0,1fr) auto; padding:0 1px 6px; }
  .counter-plate {
    grid-area:1/2/3/3; grid-template-rows:auto minmax(0,1fr) auto;
    padding:0; gap:3px;
  }
  .plate-settings { font-size:clamp(10px,1.65cqw,16px); padding:2px 4px; rotate:none; }
  .serve { font-size:clamp(14px,2cqw,21px); padding:3px 5px 5px; }
  .trash-button { grid-area:1/3/3/4; justify-self:center; padding:0; font-size:10px; }
  .trash-art { width:clamp(32px,5.7cqw,52px); height:clamp(42px,14dvh,65px); }
  .sauce-bar { grid-area:2/1; align-self:end; }
  .condiment-rack,.condiment-group { flex-wrap:nowrap; gap:clamp(3px,1cqw,10px); }
  .condiment-rack { padding:0; }
  .sauce-option { width:clamp(36px,7cqw,66px); min-height:34px; gap:1px; font-size:10px; }
  .condiment-icon { height:clamp(20px,7dvh,37px); }

  .supply { padding:3px 6px 6px; border-radius:8px 8px 12px 12px; }
  .supply-top { gap:5px; padding:0 0 3px; }
  .supply-top h2 { font-size:12px; }
  .supply-top h2 [data-icon] { width:13px; height:13px; }
  .supply-top p { font-size:clamp(10px,1.55vw,13px); }
  .ingredients { --ingredient-gap:clamp(3px,.75vw,9px); grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ingredient,.ingredient:disabled { height:clamp(40px,13dvh,66px); font-size:clamp(10px,1.65vw,15px); }
  .ingredient { border-width:1px; padding:1px 0 3px; border-radius:8px; }
  .ingredient img { height:65%; }

  .dialog,.dialog[data-panel="result"] {
    --dialog-inset:max(10px,var(--game-inset-inline));
    position:fixed;
    inset:var(--game-inset-top) var(--dialog-inset) var(--game-inset-bottom);
    margin:auto;
    width:min(calc(100% - var(--dialog-inset) - var(--dialog-inset)),640px);
    max-height:calc(100dvh - var(--game-inset-top) - var(--game-inset-bottom));
    padding:clamp(10px,3.6dvh,20px);
  }
  .dialog h2,.dialog[data-panel="result"] h2 { font-size:clamp(19px,6.4dvh,26px); margin:0 0 6px; }
  .dialog p,.dialog li { font-size:clamp(12px,3.65dvh,15px); line-height:1.35; }
  .dialog ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 24px; margin:6px 0; }
  .dialog li + li { margin-top:0; }
  .dialog-actions { gap:8px; margin-top:8px; }
  .dialog .gold { padding:5px 15px 7px; }
  .dialog[data-panel="result"] .dialog-title-icon { width:42px; height:42px; margin-bottom:5px; }
  .dialog[data-panel="result"] .dialog-actions { flex-direction:row; }
  .level-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:7px 0; }
  .level-button { padding:4px 6px; font-size:12px; }
  .plate-options { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:7px 0 4px; }
  .plate-option { display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px 5px; text-align:center; }
  .plate-option img { height:clamp(30px,13dvh,50px); }
  .plate-option strong,.plate-option span { align-self:auto; margin-top:0; }
}
@media(orientation:landscape) and (max-height:340px) {
  .customers { --order-width:clamp(110px,18cqw,154px); }
  .customers[data-seats] .bubble { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .order-item { font-size:10px; line-height:1.1; }
  .order-quantity { gap:1px; }
  .order-seasoning { margin:0 0 0 2px; padding:0 0 0 2px; border:0; border-left:1px dashed #c58855; }
  .order-seasoning img { width:16px; height:16px; }
}
@media(orientation:landscape) and (max-height:285px) {
  .opening-door { padding-block:4px; }
  .opening-content { gap:3px; line-height:1.2; }
  .opening-logo { width:46px; max-height:56px; object-fit:contain; }
  .start { padding-block:6px 8px; }
  .opening-actions .text-button { padding-block:4px; }
  .stall { gap:3px; }
  .top { padding-block:2px; }
  .stat,.utility button { height:30px; }
  .scene { grid-template-rows:minmax(0,1fr) clamp(82px,33dvh,94px); }
  .customers { inset-block-start:2px; }
  .customers[data-seats] .bubble { margin-bottom:4px; padding-block:2px; }
  .sauce-option { min-height:30px; }
  .condiment-icon { height:18px; }
  .supply { padding-block:2px 3px; }
  .ingredient,.ingredient:disabled { height:38px; }
  .dialog h2 { margin-bottom:4px; }
  .dialog p,.dialog li { line-height:1.25; }
  .dialog ul { gap:3px 17px; }
  .dialog-actions { margin-top:6px; }
  .dialog .gold { line-height:1.2; }
  .level-list { gap:3px; margin-block:5px; }
  .level-button { padding:3px 5px; }
  .level-button small { margin-top:1px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-delay:0s!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } .waste-fee,.cash-deducted { animation:none; } .cash-deducted { color:#ffad9e; } }

