:root{--ink:#3d2a19;--glass:rgba(255,248,228,.88);--wood:#814c22;--green:#6aad31;--shadow:0 8px 22px rgba(56,34,15,.22)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;font-family:ui-rounded,"SF Pro Rounded",system-ui,sans-serif;color:var(--ink)}
body{background:#65b4ec url('assets/background.png') center/cover no-repeat;overscroll-behavior:none}.game{width:min(100%,520px);height:100dvh;margin:auto;padding:calc(env(safe-area-inset-top) + 8px) 10px calc(env(safe-area-inset-bottom) + 10px);display:flex;flex-direction:column;gap:8px;position:relative}
.glass{background:var(--glass);border:2px solid rgba(255,255,255,.55);box-shadow:var(--shadow);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.top-strip{height:64px;border-radius:20px;display:grid;grid-template-columns:1fr 1.6fr 1fr;align-items:center;padding:5px 9px}.level{font-weight:900;font-size:14px}.brand{text-align:center;font-weight:1000;line-height:.86;font-size:17px;color:#f7a719;text-shadow:0 2px 0 #663510}.brand span{font-size:15px;color:#d94a3e}.sound{justify-self:end;border:0;background:#fff3cb;width:42px;height:42px;border-radius:50%;font-size:20px;box-shadow:0 3px 8px #0002}
.target-panel{border-radius:20px;padding:8px 11px}.target-panel.free{background:rgba(240,252,255,.9)}.target-label{text-transform:uppercase;font-weight:950;font-size:10px;letter-spacing:.12em}.target-line{display:grid;grid-template-columns:58px 1fr auto;align-items:center;gap:10px;margin-top:4px}.target-swatch{width:56px;height:56px;border-radius:50%;border:5px solid white;box-shadow:0 4px 12px #0003}.target-copy strong{display:block;font-size:18px}.target-copy small{font-size:11px;line-height:1.15;display:block}.stars{font-weight:900;font-size:13px}
.workbench{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:space-between;position:relative}.pots{display:flex;justify-content:center;align-items:flex-start;gap:3px;min-height:110px;position:relative;z-index:12}.pot-btn{border:0;background:none;padding:0;width:19%;max-width:92px;position:relative;display:flex;flex-direction:column;align-items:center;transition:opacity .18s ease,transform .18s ease}.pot-btn img{width:100%;height:auto;display:block;filter:drop-shadow(0 6px 5px rgba(0,0,0,.22))}.pot-btn .pot-name{font-size:10px;font-weight:950;background:rgba(255,249,220,.9);border-radius:10px;padding:2px 6px;margin-top:-9px}.pot-btn .count{position:absolute;right:1px;top:4px;width:24px;height:24px;border-radius:50%;background:#fff7d6;border:2px solid #8c5b24;display:grid;place-items:center;font-size:11px;font-weight:1000}.pot-btn.source-hidden{opacity:.08;transform:scale(.9)}
.mix-zone{flex:1;min-height:180px;display:flex;align-items:flex-end;justify-content:center;position:relative;overflow:visible}.bowl-wrap{position:relative;width:min(76vw,350px);aspect-ratio:1/1;display:grid;place-items:center;z-index:4}.bowl{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:5;pointer-events:none}.liquid{position:absolute;z-index:6;width:57%;height:23%;top:30.5%;left:21.5%;border-radius:50%;background:#f0eadf;box-shadow:inset 0 7px 10px #fff5,inset 0 -7px 12px #0002,0 1px 0 rgba(255,255,255,.55);transition:background .5s ease;overflow:hidden}.liquid::after{content:"";position:absolute;inset:7% 5% 48%;border-radius:50%;background:linear-gradient(180deg,rgba(255,255,255,.34),rgba(255,255,255,0));transform:rotate(-5deg)}.swirl{position:absolute;z-index:7;width:45%;height:17%;top:33.5%;left:27.5%;border-radius:50%;opacity:0;pointer-events:none}.swirl.active{opacity:.9;background:conic-gradient(from 0deg,#fff0 0 12%,#fff9 18%,#fff0 30%,#fff6 48%,#fff0 63%);animation:spin .8s ease-out}@keyframes spin{from{transform:rotate(0) scale(.7)}to{transform:rotate(620deg) scale(1.08);opacity:0}}
.pour-stream{position:fixed;z-index:41;width:13px;height:0;border-radius:7px 7px 11px 11px;opacity:0;pointer-events:none;transform-origin:top center;box-shadow:inset 3px 0 4px #fff6,1px 2px 3px #0002}.pour-stream.active{opacity:1;animation:streamPulse .78s ease-in-out}@keyframes streamPulse{0%{transform:scaleX(.55);opacity:0}12%{transform:scaleX(1);opacity:1}72%{transform:scaleX(.88);opacity:1}100%{transform:scaleX(.3);opacity:0}}
.impact{position:fixed;z-index:42;width:34px;height:14px;border-radius:50%;opacity:0;pointer-events:none;border:3px solid rgba(255,255,255,.65)}.impact.active{animation:impact .55s ease-out}@keyframes impact{0%{opacity:.95;transform:translate(-50%,-50%) scale(.3)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.1)}}
.flying-pot{position:fixed;z-index:40;display:none;pointer-events:none;will-change:left,top,transform}.flying-pot.active{display:block}.flying-pot img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 8px rgba(0,0,0,.25))}
.feedback{border-radius:18px;padding:8px 12px}.feedback-top{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:950}.feedback-top b{font-size:17px;color:#6c3d1f}.meter{height:12px;background:#4d2c1b33;border-radius:99px;overflow:hidden;margin-top:7px}.meter>div{height:100%;width:0;background:linear-gradient(90deg,#e7b832,#7ccc3e);border-radius:99px;transition:width .4s ease}.recipe{text-align:center;font-size:11px;font-weight:800;margin-top:5px;min-height:14px}
.controls{display:grid;grid-template-columns:54px 54px 1fr 54px;gap:7px;align-items:center}.round-control{border:0;background:none;padding:0;width:54px;height:54px}.round-control img{width:100%;height:100%;object-fit:contain}.round-control:disabled{opacity:.4}.mode-control{height:50px;border:3px solid #4f6c18;border-radius:22px;background:linear-gradient(#9bdb42,#66a926);color:white;font-size:15px;font-weight:1000;text-shadow:0 2px 0 #42610d;box-shadow:0 5px 0 #3f6617,0 9px 16px #0003;padding:0 10px}.mode-control.free{border-color:#226c8c;background:linear-gradient(#54c6e9,#2787bd);text-shadow:0 2px 0 #1e6686;box-shadow:0 5px 0 #1f698d,0 9px 16px #0003}.mode-control:active{transform:translateY(2px)}
.toast{position:fixed;z-index:70;left:50%;bottom:calc(env(safe-area-inset-bottom) + 74px);transform:translate(-50%,20px);width:min(90%,460px);padding:12px 15px;border-radius:16px;background:#3f2c1eea;color:white;text-align:center;font-weight:900;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
.overlay{position:fixed;z-index:100;inset:0;background:#16211099;display:grid;place-items:center;padding:20px;backdrop-filter:blur(6px)}.hidden{display:none}.success-card{width:min(100%,380px);background:#fff4ce;border:5px solid #9c642c;border-radius:28px;padding:20px;text-align:center;box-shadow:0 18px 60px #0006}.success-star{width:78px}.success-card h2{font-size:29px;margin:2px}.success-card p{margin:6px 0}.success-score{font-size:38px;font-weight:1000}.earned-stars{font-size:28px;margin:5px}.success-card button{width:100%;border:0;border-radius:18px;padding:14px;background:#72b932;color:white;font-weight:1000;font-size:17px}.confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}.confetti-piece{position:absolute;top:-20px;width:9px;height:16px;border-radius:3px;animation:fall 2s linear forwards}@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
@media(max-height:740px){.top-strip{height:54px}.target-panel{padding:6px 9px}.target-swatch{width:48px;height:48px}.target-line{grid-template-columns:50px 1fr auto}.pots{min-height:90px}.pot-btn{max-width:74px}.mix-zone{min-height:150px}.bowl-wrap{width:min(58vw,280px)}.controls{grid-template-columns:48px 48px 1fr 48px}.round-control{width:48px;height:48px}.mode-control{height:46px;font-size:13px}.feedback{padding:6px 10px}}

/* V4 visual/animation corrections */
.feedback{height:96px;min-height:96px;max-height:96px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.feedback-top{height:38px;min-height:38px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
#encouragement{font-size:14px;line-height:1.08;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-width:0}
#encouragement.msg-small{font-size:12.5px}
#encouragement.msg-xsmall{font-size:11.5px}
.feedback-top b{white-space:nowrap}
.recipe{height:14px;min-height:14px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* The visible colour is deliberately flat and exact: no gloss/filter/gradient. */
.liquid{width:59%;height:25.5%;top:27.6%;left:20.5%;background:#f0eadf;box-shadow:none;filter:none;transition:background .42s linear;overflow:hidden}
.liquid::after{display:none!important;content:none!important}
.swirl{width:49%;height:19%;top:31%;left:25.5%}

/* Stream is a pure paint strip. It extends into the liquid ellipse. */
.pour-stream{width:13px;border-radius:6px 6px 8px 8px;box-shadow:none;filter:none}
.impact{width:30px;height:12px}

@media(max-height:740px){
 .feedback{height:84px;min-height:84px;max-height:84px;padding:5px 10px}
 .feedback-top{height:32px;min-height:32px}
 #encouragement{font-size:12.5px}
 #encouragement.msg-small{font-size:11.5px}
 #encouragement.msg-xsmall{font-size:10.5px}
}
\n\n/* V5 - bowl opening and transient mixing */\n/* Exact opening cut from the 256x256 bowl frame: x=58..198, y=76..132. */\n.bowl{z-index:6}\n.liquid{\n  z-index:4;\n  left:22.65625%;\n  top:29.6875%;\n  width:54.6875%;\n  height:21.875%;\n  border-radius:50%;\n  box-shadow:none!important;\n  filter:none!important;\n  transition:background .20s linear;\n  overflow:hidden;\n}\n.liquid::after{display:none!important;content:none!important}\n.swirl{\n  z-index:5;\n  left:22.65625%;\n  top:29.6875%;\n  width:54.6875%;\n  height:21.875%;\n  border-radius:50%;\n  overflow:hidden;\n  opacity:0;\n  transform-origin:50% 50%;\n  background:transparent;\n}\n.swirl.active{\n  opacity:.92;\n  background:conic-gradient(from 0deg,\n    var(--mix-old,#f0eadf) 0 18%,\n    var(--mix-new,#fff) 24% 40%,\n    var(--mix-old,#f0eadf) 48% 64%,\n    var(--mix-new,#fff) 72% 88%,\n    var(--mix-old,#f0eadf) 96% 100%);\n  animation:mixSpin .82s linear infinite;\n}\n@keyframes mixSpin{\n  0%{transform:rotate(0deg) scale(.98)}\n  50%{transform:rotate(180deg) scale(1.03)}\n  100%{transform:rotate(360deg) scale(.98)}\n}\n

/* V5.1 - calibrated from real iPhone screenshots */
/* Liquid sits behind the ceramic rim instead of looking like a disk laid on top. */
.liquid{left:25.2%;top:32.1%;width:49.6%;height:17.6%;z-index:4}
.swirl{left:25.2%;top:32.1%;width:49.6%;height:17.6%;z-index:5}
.bowl{z-index:6}
