*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:#101016;color:#fff}
#app{height:100%;display:grid;place-items:center;background:#101016}
#game-shell{position:relative;width:min(100vw,520px);height:100svh;max-height:980px;overflow:hidden;border-radius:22px;background:#84d9ff url('background.webp') center/cover no-repeat;box-shadow:0 18px 80px #0008}
canvas{width:100%;height:100%;display:block;touch-action:none}
.overlay{position:absolute;z-index:5;pointer-events:none}
#top-ui{top:16px;left:16px;right:16px;display:flex;justify-content:space-between;align-items:center}
.coin-pill,.next-pill{pointer-events:auto;background:#fff4;border:2px solid #fff8;backdrop-filter:blur(8px);border-radius:999px;padding:8px 14px;color:#512c16;text-shadow:0 1px #fff;font-weight:900;box-shadow:0 5px 16px #0002}
.coin{color:#f4b431;text-shadow:0 2px #b36a00;margin-right:6px}.tiny{font-size:14px}
.next-pill{display:flex;gap:10px;align-items:center;padding:8px 10px 8px 16px}.mini-drink{display:grid;place-items:center;width:44px;height:44px;background:#fff9;border-radius:16px;padding:6px}
#order-card{top:13px;left:50%;transform:translateX(-50%);width:218px;min-height:82px;background:#fffffff2;color:#55231a;text-align:left;padding:10px 15px;border-radius:26px;box-shadow:0 10px 28px #0002;border:3px solid #fff;backdrop-filter:blur(8px);display:grid;grid-template-columns:64px 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center}
#order-card:before{content:"";position:absolute;inset:6px;border-radius:22px;border:1px solid #ffd4bd;pointer-events:none}
#order-card h1{font-size:14px;color:#a92224;margin:0;font-weight:950;grid-column:2;line-height:1;text-transform:uppercase;letter-spacing:.2px}
#order-card small{display:none}.target-drink{width:60px;height:60px;margin:0;grid-row:1 / span 2;grid-column:1;filter:drop-shadow(0 4px 4px #0002);text-align:center;display:grid;place-items:center}.order-row{display:flex;justify-content:flex-start;gap:5px;border-top:0;padding-top:2px;font-weight:950;font-size:16px;grid-column:2}.order-row span:first-child{display:none}
#bottom-ui{left:14px;right:14px;bottom:20px;display:flex;gap:10px;align-items:center;pointer-events:auto}
#merge-tree{flex:1;display:flex;justify-content:space-around;align-items:center;gap:0;background:#fff4ef;border:2px solid #c98f58;border-radius:999px;padding:8px 8px;box-shadow:0 6px 16px #0002;overflow:hidden}.tree-item{width:20px;height:20px;display:grid;place-items:center;line-height:1;opacity:.82;transition:transform .16s ease,opacity .16s ease}.tree-item.active-target{opacity:1;transform:scale(1.25)}
button{pointer-events:auto;border:0;border-radius:999px;background:linear-gradient(#ffb03a,#ff6a00);color:white;font-size:18px;font-weight:950;padding:13px 20px;box-shadow:0 8px 0 #b94700,0 15px 22px #0004;text-shadow:0 2px #a43a00;cursor:pointer}button:active{transform:translateY(4px);box-shadow:0 4px 0 #b94700}.panel{pointer-events:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(86%,360px);background:#fff8;color:#4e2d18;padding:24px;text-align:center;border-radius:26px;border:3px solid #fff;box-shadow:0 18px 50px #0005}.panel h2{font-size:34px;margin:0 0 10px;color:#b51e25}.panel p{line-height:1.45;font-weight:700}.hidden{display:none!important}
@media (max-width:420px){.tree-item{width:17px;height:17px}#merge-tree{padding:8px 6px}button{font-size:16px;padding:12px 16px}#order-card{width:198px;min-height:76px;grid-template-columns:58px 1fr}.target-drink{width:54px;height:54px}#order-card h1{font-size:12px}.order-row{font-size:15px}}
@media (max-width:380px){#order-card{top:13px;width:184px;min-height:70px;grid-template-columns:52px 1fr}.target-drink{width:48px;height:48px}.tree-item{width:15px;height:15px}button{font-size:15px;padding:11px 14px}.coin-pill,.next-pill{padding:7px 10px}.mini-drink{width:38px;height:38px;padding:5px}}

.ui-drink-svg{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.18))}
.tree-item .ui-drink-svg{width:18px;height:18px}
.target-drink .ui-drink-svg{width:56px;height:56px}
.mini-drink .ui-drink-svg{width:30px;height:30px}

.tree-item.locked{opacity:.18;filter:grayscale(1)}
.tree-item.locked .ui-drink-svg{opacity:.45}
