*{box-sizing:border-box}
body{margin:0;background:#392b21;color:var(--ink,#684532);font-family:system-ui,-apple-system,sans-serif;overflow:hidden}
button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}
#stage{position:absolute;left:50%;margin-left:-225px;width:450px;height:800px;transform-origin:top center;background-size:cover;background-position:center;overflow:hidden;isolation:isolate}
header{position:absolute;inset:12px 14px auto;display:flex;align-items:center;gap:8px;z-index:5;height:38px}
header a,nav button{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--control-edge,#fff1cc);border-radius:50%;background:linear-gradient(var(--control-top,#fff5dc),var(--control-bottom,#e9c992));box-shadow:inset 0 2px 1px #fff,0 2px 0 var(--control-depth,#b78954),0 4px 6px #70472030;text-decoration:none;color:inherit;font-weight:800}
header a{font-size:28px}.wallet{padding:7px 9px;border:1px solid var(--wallet-edge,#ffe9b8);border-radius:20px;background:linear-gradient(var(--wallet-top,#fff9e8),var(--wallet-bottom,#f0d7aa));box-shadow:inset 0 2px 0 #fff9,0 2px 0 #b7895450;font-size:12px;gap:4px}.wallet b{font-size:16px}nav{display:flex;gap:7px;margin-inline-start:auto}
.heading{position:absolute;top:55px;left:55px;width:340px;height:91px;z-index:2}.heading img{width:100%;height:100%;object-fit:contain}
.pantry{position:absolute;top:163px;left:93px;width:264px;height:144px;z-index:1}#hero{width:100%;height:100%;object-fit:contain;transform-origin:50% 80%}#hero.cheer{animation:cheer .65s ease-in-out}
#basketGlow{position:absolute;left:27px;top:87px;width:64px;height:25px;border-radius:50%;pointer-events:none;opacity:0;background:radial-gradient(ellipse,#fffef0 10%,#ffd779aa 40%,transparent 72%)}#basketGlow.glow{animation:basket-glow .7s ease-out}
.status-line{display:flex;align-items:center;justify-content:center;gap:8px;min-height:20px}#waveToast{font-size:11px;line-height:16px;color:var(--ink);opacity:.8}#waveToast:empty{display:none}
.result{position:absolute;top:317px;left:34px;width:382px;height:63px;text-align:center;padding:4px 8px 6px;border:1px solid var(--result-edge,#f7e3bd);border-radius:18px;background:linear-gradient(var(--result-top,#fff9eaef),var(--result-bottom,#f6e3c5ef));box-shadow:inset 0 1px 1px #fff,0 3px 7px #845d3020;z-index:3}
#message{min-height:20px;font-size:12px;font-weight:700;line-height:18px}.scores{display:flex;justify-content:center;align-items:center;gap:0}.scores>div{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;flex:1;padding:0 4px;height:29px}.scores>div+div{border-inline-start:1px solid #bc95664d}.scores span{font-size:12px}.scores b{font-size:23px;color:var(--accent,#bd7438)}.scores.settled>div:first-child{display:none}.scores.settled>div+div{border:0}.scores.settled b{font-size:25px}.result.profit{box-shadow:inset 0 1px 1px #fff,0 0 14px #edbd6470}.result small{display:none}
.board-shell{position:absolute;left:30px;top:391px;width:390px;height:312px;padding:12px;border:4px solid var(--board-edge,#fce9c5);border-radius:27px;background:repeating-linear-gradient(3deg,transparent 0 12px,#ad73380a 13px 14px),linear-gradient(130deg,var(--board-top,#f4d7aa),var(--board-bottom,#dfbb86));box-shadow:inset 0 2px 1px #fff8,inset 0 -3px 3px #bc854322,0 4px 0 var(--board-depth,#b58e5e),0 7px 12px #66402125;z-index:1}
#board{position:relative;width:358px;height:280px;direction:ltr;overflow:hidden;border-radius:14px}.food-slot{position:absolute;width:65.6px;height:50px;margin:3px;border-radius:15px;background:radial-gradient(ellipse at 50% 100%,var(--slot-top,#f3dcb7),var(--slot-bottom,#eed5ac));box-shadow:inset 0 2px 3px #865b3419,inset 0 -1px 1px #fff5}
.cell{position:absolute;width:71.6px;height:56px;display:grid;place-items:center;will-change:transform;transition:transform .55s cubic-bezier(.22,.7,.3,1)}.cell img{width:60px;height:49px;object-fit:contain;filter:drop-shadow(1px 3px 2px #79522a35)}.cell[data-food="0"] img{width:64px;height:53px}.cell[data-food="1"] img{width:62px;height:51px}.cell.matched{z-index:2;background:var(--match-fill,#fff3a18c);border-radius:15px;box-shadow:inset 0 0 0 2px var(--match-edge,#e7bf69)}.cell.matched img{animation:pulse .38s ease-in-out infinite alternate}
footer{position:absolute;top:720px;left:19px;width:412px;text-align:center;z-index:4}.actions{display:flex;gap:10px}.actions button{width:calc((100% - 20px)/3);height:59px;border:1px solid var(--button-edge,#fce9c4);border-radius:18px;background:linear-gradient(var(--button-top,#ffedc4),var(--button-bottom,#edc991));box-shadow:inset 0 2px 1px #fff9,inset 0 -2px 2px #c8924325,0 3px 0 var(--button-depth,#b28954),0 5px 8px #71482230;font-weight:700;color:var(--ink)}.actions span,.actions b{display:block}.actions span{font-size:16px;line-height:24px}.actions b{font-size:14px;font-weight:600;line-height:20px;opacity:.85}.actions button:active{transform:translateY(2px);box-shadow:0 1px 0 var(--button-pressed,#a9773b)}.actions button:disabled{cursor:default;filter:saturate(.65);color:var(--disabled-ink,#876747)}footer>small{display:block;font-size:9px;line-height:10px;margin-top:8px;color:#fff4e1;text-shadow:0 1px 2px #543719}
#retry{position:absolute;bottom:83px;left:50%;transform:translateX(-50%);padding:8px 20px;border-radius:18px;background:var(--retry-surface,#fff4dc);border:1px solid var(--retry-edge,#b99069);z-index:5}
#flights{position:absolute;inset:0;pointer-events:none;z-index:4}.flying-food{position:absolute;width:46px;height:46px;object-fit:contain}.point-spark{position:absolute;width:17px;height:17px;border-radius:50%;border:2px solid #fff0ad;background:radial-gradient(circle at 30% 25%,#fff7bb,#efb638 70%);box-shadow:0 0 10px #ffd662;}
dialog{width:min(90vw,420px);max-height:82vh;border:2px solid var(--dialog-edge,#d6b085);border-radius:22px;padding:24px;background:var(--panel,#fff0d9);color:var(--ink,#684532)}dialog::backdrop{background:#30231599}#close{float:right;border:0;background:none;font-size:27px}#dialogBody{white-space:pre-line;font-size:14px;line-height:1.7}.record{padding:10px 0;border-bottom:1px solid #bd94663a}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}[hidden]{display:none!important}
@keyframes pulse{to{transform:scale(1.14)}}@keyframes cheer{40%{transform:translateY(-4px) rotate(-2deg)}70%{transform:rotate(2deg)}}@keyframes basket-glow{20%{opacity:1;transform:scale(1.2)}100%{opacity:0;transform:scale(1.8)}}@media(prefers-reduced-motion:reduce){.cell{transition:none}.cell.matched img,#hero.cheer,#basketGlow.glow{animation:none}}
