*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:var(--font);background:var(--paper)}button,.back{font:inherit;font-weight:800;color:inherit;border:2px solid var(--edge-dark);border-bottom-width:4px;border-radius:18px;background:var(--paper);min-width:48px;min-height:48px;padding:7px 10px;text-decoration:none;cursor:pointer;touch-action:manipulation;display:inline-flex;align-items:center;justify-content:center;gap:5px}button:focus-visible,a:focus-visible{outline:4px solid var(--focus);outline-offset:2px}button:disabled{cursor:default;opacity:.5}button[aria-pressed=true]{background:var(--picked);border-color:var(--forest);box-shadow:inset 0 0 0 2px var(--forest)}#mix-game{height:100dvh;max-width:1250px;margin:auto;display:grid;grid-template-rows:60px minmax(0,1fr) auto}header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;z-index:2}h1{font-size:clamp(17px,2.6vw,27px);margin:0;text-align:center}#world{position:relative;min-height:0;overflow:hidden;background:#c9edf0;border-block:3px solid #a3c8a0;display:flex;align-items:end;justify-content:center}#world:before{content:'';position:absolute;inset:45% 0 0;background:#9fc77d}.scene{position:relative;width:100%;height:100%;overflow:visible}#status{position:absolute;z-index:1;top:6px;left:8px;right:8px;text-align:center;margin:0;font-size:clamp(17px,2.7vw,25px);font-weight:800;text-shadow:0 2px #fff9e9;padding:3px}#controls{padding:8px 12px 5px;background:var(--grain),var(--paper);position:relative;display:grid;gap:7px}#ingredients{display:flex;justify-content:center;gap:10px}#ingredients button{flex:1;max-width:210px;min-width:0;height:88px;padding:4px;position:relative;font-size:18px}#ingredients img{height:70px;width:68px;object-fit:contain}#ingredients .check{position:absolute;right:6px;top:2px;font-size:15px}#recipe{display:flex;gap:8px;align-items:center;justify-content:center}.slot-wrap{display:flex;gap:2px;align-items:center;flex:1;max-width:220px}.slot{min-width:0;flex:1;height:60px;border-style:dashed;font-size:15px;padding:2px 6px}.slot img{height:50px;width:42px;object-fit:contain}.slot[aria-pressed=true]{border-style:solid}.remove{width:48px;padding:0;font-size:22px}.plus{font-size:24px;font-weight:800}.actions{display:flex;justify-content:center;gap:10px}.actions button{height:56px}#mix{background:var(--gold);border-color:var(--gold-edge);min-width:145px;font-size:24px}#reset{font-size:16px}#save{margin:0;font-size:12px;text-align:center;min-height:0}#save:empty{display:none}#demo{display:flex;align-items:center;justify-content:center;gap:5px;font-size:14px}#demo[hidden]{display:none}#demo button{padding:4px 8px}body.demonstrating #show-help{visibility:hidden}[data-demo-cue]{outline:5px solid var(--focus)!important;outline-offset:1px!important}.actor-img{filter:drop-shadow(0 6px 2px #36593733)}#result.arrive{animation:arrive .7s cubic-bezier(.2,.8,.3,1)}#swirl{transform-origin:400px 358px}.swirling #swirl{animation:swirl 1.3s ease-in-out infinite}.pouring #paint-streams{animation:flow .35s ease-out}.celebrating .petals{animation:blossom .6s ease-out;transform-box:fill-box;transform-origin:center}@keyframes arrive{from{transform:translateY(160px) scale(.65);opacity:0}to{transform:none;opacity:1}}@keyframes flow{from{opacity:0}to{opacity:1}}@keyframes swirl{to{transform:rotate(360deg)}}@keyframes blossom{from{transform:scale(.2)}to{transform:scale(1)}}@media(max-width:600px) and (orientation:portrait){header{gap:4px;padding:4px 6px}.back,#show-help{font-size:13px;padding:5px 7px}#ingredients button{flex-direction:column;gap:0;font-size:16px;height:86px}#ingredients img{height:58px;width:58px}#controls{padding:7px 8px;gap:6px}.slot-wrap{gap:1px}.slot{font-size:13px;padding:1px 3px}.slot img{width:33px}.remove{min-width:48px}.plus{font-size:20px}#recipe{gap:3px}#mix-game{grid-template-rows:56px minmax(0,1fr) auto}body.demonstrating #ingredients button{height:72px}body.demonstrating #ingredients img{height:45px}#demo strong{font-size:12px}}@media(orientation:landscape) and (max-height:650px){#mix-game{grid-template-columns:minmax(0,1fr) 230px;grid-template-rows:52px minmax(0,1fr)}header{grid-column:1/-1}#world{grid-column:1;grid-row:2}#controls{grid-column:2;grid-row:2;padding:4px 6px;gap:4px;align-content:center}#ingredients{gap:4px}#ingredients button{height:75px;flex-direction:column;gap:0;font-size:14px}#ingredients img{height:48px;width:45px}#recipe{gap:2px}.slot-wrap{position:relative;max-width:100px;flex-direction:column;gap:2px}.slot{width:100%;height:58px;font-size:12px;gap:0;padding:2px}.slot img{width:28px;height:40px}.remove{height:48px;min-height:48px;width:100%;font-size:18px}.actions{gap:4px}.actions button{padding:4px;font-size:13px}#mix{min-width:91px;font-size:22px}#demo{flex-wrap:wrap;gap:3px}#demo strong{display:none}body.demonstrating #ingredients button{height:60px}body.demonstrating #ingredients img{height:34px}#status{font-size:17px;top:4px}}@media(prefers-reduced-motion:reduce){#result.arrive,.swirling #swirl,.pouring #paint-streams,.celebrating .petals{animation:none}}

#world:before{display:none}#swirl{animation:none}.swirling #swirl path{animation:paint-stir 1s ease-in-out infinite alternate;transform-origin:400px 358px}@keyframes paint-stir{to{transform:scaleX(-1)}}
#controls{grid-template-columns:minmax(0,1fr) 52px;column-gap:4px}#ingredients{grid-column:1;gap:3px}#ingredients button{font-size:12px;height:76px;flex-direction:column;gap:0;border-radius:14px}#ingredients img,#ingredients .blob-icon{width:42px;height:48px;object-fit:contain}#more-paints{grid-column:2;grid-row:1;font-size:12px;padding:2px;flex-direction:column}#recipe,.actions,#save,#demo{grid-column:1/-1}.slot-wrap{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:2px;max-width:240px}.slot{width:100%;height:56px}.slot img,.slot .blob-icon{width:32px;height:44px}.slot span{overflow:hidden;max-width:75px;text-overflow:ellipsis;white-space:nowrap}.remove{width:48px;height:48px}.dose{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:2px}.dose button{width:48px;padding:0;font-size:23px}.dose output{font-size:11px;letter-spacing:-1px;text-align:center;min-width:18px}#reuse{background:var(--gold);border-color:var(--gold-edge);font-size:16px}button[hidden],#palette[hidden]{display:none!important}#palette{position:fixed;z-index:20;inset:60px 8px 8px;background:var(--paper);border:3px solid var(--edge-dark);border-radius:20px;padding:10px;overflow:auto;box-shadow:0 0 0 100vmax #304c3e88;max-width:700px;margin:auto}#palette-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(85px,1fr));gap:8px}#palette-grid button{min-height:100px;flex-direction:column;font-size:13px;position:relative}#palette-grid img{height:60px;width:60px;object-fit:contain}#palette-grid .check{position:absolute;top:2px;right:5px}.palette-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.blob-icon{height:44px;width:44px;flex:none}@media(max-width:600px) and (orientation:portrait){#controls{padding:5px 6px;gap:4px}#ingredients button{height:72px;font-size:10px;min-width:48px}#ingredients img{height:44px;width:38px}#recipe{gap:2px}.slot{font-size:11px;padding:0 2px;gap:0}.slot-wrap{gap:1px}.slot span{max-width:48px}.actions button{height:56px}body.demonstrating #ingredients button{height:64px}body.demonstrating #ingredients img{height:35px}#demo{gap:3px}#demo strong{display:none}#demo button{min-height:48px}.dose button{min-height:48px}}@media(orientation:landscape) and (max-height:650px){#mix-game{grid-template-columns:minmax(0,1fr) 270px}#controls{gap:3px;padding:3px 5px;grid-template-columns:minmax(0,1fr) 48px}#ingredients button{height:64px;min-width:0;font-size:9px;padding:1px;border-radius:10px}#ingredients img{height:38px;width:33px}#more-paints{font-size:10px;padding:0}.slot-wrap{flex-direction:initial;max-width:122px;grid-template-columns:minmax(0,1fr) 48px}.slot{font-size:10px;height:52px;flex-direction:column}.slot img,.slot .blob-icon{height:30px;width:25px}.slot span{max-width:62px}.remove{height:48px;width:48px}.dose button{height:48px}.actions button{height:56px;font-size:12px}#mix{font-size:22px}#reuse{font-size:13px}#demo{position:fixed;top:3px;left:100px;right:100px;z-index:10;background:var(--paper);height:46px}#demo button{height:44px;min-height:44px}#demo strong{display:none}body.demonstrating #ingredients button{height:64px}body.demonstrating #ingredients img{height:38px}#palette{inset:54px 8px 5px}#palette-grid{grid-template-columns:repeat(5,1fr)}#palette-grid button{min-height:88px}#palette-grid img{height:48px;width:48px}}@media(prefers-reduced-motion:reduce){.swirling #swirl path{animation:none}}
@media(orientation:landscape) and (max-height:650px){#mix-game{grid-template-columns:minmax(0,1fr) 320px}#ingredients button{min-width:48px}#demo button{min-height:48px;height:48px}}
[data-colour=white] img,[data-colour=black] img{border:2px solid var(--edge-dark);border-radius:50%;background:white}[data-colour=black] img{background:#171719}.dose output{font-size:10px;letter-spacing:-1px;white-space:nowrap}
#result.arrive{transform-box:fill-box;transform-origin:center bottom}@keyframes arrive{from{transform:translateY(70px) scale(.65);opacity:0}to{transform:none;opacity:1}}
