/* Garden materials and direct-touch tools. Workshop keeps its own layout. */
.seed-ball{display:block;position:relative;border-radius:50%;background:radial-gradient(ellipse at 30% 23%,#fff9 0%,#fff0 24%),radial-gradient(circle at 34% 30%,var(--seed-light) 0%,var(--seed) 48%,var(--seed-dark) 100%);box-shadow:inset -2px -3px 4px #5a380c29,inset 1px 1px 2px #fff8,1px 3px 3px #38200f40;aspect-ratio:1;pointer-events:none}
.seed-ball::after{content:"";position:absolute;inset:0;border-radius:inherit;background:url('assets/number-play/clay-surface.webp') center/cover;mix-blend-mode:soft-light;opacity:.24}
.hole .seed-ball.seed{left:27%;top:22%;width:46%;height:46%;filter:none}
.garden-tools{gap:24px;align-items:flex-end;padding:0 8px;z-index:12;max-width:340px}.garden-bowl-tool{display:flex;flex-direction:column;align-items:center;position:relative}.garden-tools .seed-supply,.garden-tools #paint-bowl{position:relative;width:112px;height:88px;border:0;background:none;padding:0;touch-action:none}.garden-tools .seed-supply .bowl-wood{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.bowl-seeds{position:absolute;inset:0;pointer-events:none}.bowl-ball{position:absolute;width:17%;height:auto;transform:translate(-50%,-50%);transition:left .36s cubic-bezier(.3,.8,.4,1),top .42s cubic-bezier(.3,1.5,.5,1),opacity .16s}.bowl-ball.in-hand{opacity:0}.bowl-caption{font-family:Gaegu,system-ui;font-size:20px;line-height:18px;color:#52633a}.garden-tools #paint-bowl img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.chosen-seed{position:absolute;width:23px;right:0;bottom:10px;filter:drop-shadow(0 1px 1px #fff)}.chosen-seed .seed-ball{width:100%}.garden-tools button:disabled{opacity:.8}.garden-tools #paint-bowl:active{transform:rotate(-4deg) scale(.97)}
.seed-color-wheel{position:fixed;margin:0;padding:0;width:246px;height:246px;max-height:none;max-width:calc(100vw - 24px);border:0;overflow:visible;border-radius:50%;background:radial-gradient(circle,#fff3d8 0 23%,#edce91 24% 28%,#fff8e9 29% 63%,#d2a066 64% 69%,#85572d 70%);box-shadow:0 12px 30px #38220e66,inset 0 2px 3px #fff8;animation:wheel-open .22s ease-out}.seed-color-wheel::backdrop{background:#29351930;backdrop-filter:blur(2px)}.color-petals{position:relative;width:100%;height:100%;background:conic-gradient(from 0deg,#f5c64222,#74afe333,#b288de22,#ef78ae33,#f2756322,#f5c64222);border-radius:50%}.color-petal{position:absolute;left:50%;top:50%;width:70px;height:70px;margin:-35px;border:2px solid #fff8;border-radius:50%;background:radial-gradient(circle at 40% 25%,#fff8,var(--petal));box-shadow:inset 0 2px 3px #fff8,0 3px 3px #5d381840;transform:rotate(var(--angle)) translateY(-78px) rotate(calc(-1 * var(--angle)));padding:0}.color-petal[aria-pressed=true]{outline:3px solid #607e39;outline-offset:3px}.color-petal img{position:absolute;width:45px;height:58px;object-fit:contain;left:18px;bottom:8px;filter:drop-shadow(0 2px 1px #30281250)}.color-petal .seed-ball{position:absolute;width:23px;left:6px;bottom:7px;z-index:1}.wheel-close{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;width:46px;height:46px;border:1px solid #b19e65;background:#fff6d9;color:#546839;font-size:32px;line-height:1;box-shadow:0 2px 3px #65432625}
.leaf-hand{width:118px;height:118px;transform-origin:38px 38px}.leaf-hand>img,.garden-drag>img{width:100%;height:100%;object-fit:contain}.carried-seed{position:absolute;left:23%;top:23%;width:19%;height:19%;z-index:2}.garden-drag{width:118px!important;height:118px!important;transform:translate(-38px,-38px)!important}.drop-ready{box-shadow:0 0 0 3px #f5d561,0 0 15px #ffd665aa;background:#eac75c22}
.hole .sprout.flowering{width:135%;height:195%;left:-17.5%;bottom:29%;max-width:none;filter:none}.flowering img{position:absolute;bottom:0;left:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 3px 1px #18361035)}.flowering .young-plant{animation:leaf-to-flower 1.1s both;animation-delay:var(--delay)}.flowering .bloom-plant{animation:flower-open 1.2s both;animation-delay:var(--delay);transform-origin:50% 100%}.flowering.fully-grown .young-plant{display:none}.flowering.fully-grown .bloom-plant{animation:none}
@keyframes leaf-to-flower{0%,35%{opacity:1;transform:scale(.72)}75%,100%{opacity:0;transform:scale(1)}}@keyframes flower-open{0%,30%{opacity:0;transform:scale(.4,.6)}70%{opacity:1;transform:scale(1.06)}100%{opacity:1;transform:scale(1)}}@keyframes wheel-open{from{opacity:0;transform:scale(.65) translateY(30px)}to{opacity:1;transform:none}}
@media(max-height:660px) and (max-width:599px){.garden-tools{gap:20px}.garden-tools .seed-supply,.garden-tools #paint-bowl{width:98px;height:74px}.bowl-caption{font-size:18px;line-height:15px}.chosen-seed{width:20px;bottom:8px}}
@media(max-height:570px) and (min-width:600px){.garden-tools{gap:3px;justify-content:center}.garden-tools .seed-supply,.garden-tools #paint-bowl{width:112px;height:80px}.bowl-caption{font-size:17px;line-height:15px}}
@media(prefers-reduced-motion:reduce){.flowering .young-plant{display:none}.bowl-ball{transition:none}.seed-color-wheel,.flowering .bloom-plant{animation:none}}
/* Dice centers are closer together than ten-frame cells; keep each blossom legible. */
.holes.dice .sprout.flowering{width:106%;height:155%;left:-3%;bottom:29%}

/* A wide seed basin; separate spheres retain depth and settle into a loose pile. */
.garden-tools{max-width:370px;gap:18px}
.garden-tools .seed-supply{width:176px;height:102px;cursor:grab}
.garden-tools .seed-supply:active{cursor:grabbing}
.garden-tools .seed-supply .bowl-wood{object-fit:fill}
.bowl-ball{width:12.3%;transform:translate(-50%,-50%) scale(var(--ball-scale,1)) rotate(var(--ball-angle,0deg));box-shadow:inset -2px -3px 4px #5a380c29,inset 1px 1px 2px #fff8,1px 3px 3px #38200f65}
.bowl-seeds{inset:8% 1% 8%}
@media(max-height:660px) and (max-width:599px){.garden-tools .seed-supply{width:160px;height:86px}.garden-tools{gap:14px}}
@media(max-height:570px) and (min-width:600px){.garden-tools .seed-supply{width:138px;height:80px}.garden-tools{gap:3px}}

.garden-tools .seed-supply .bowl-front{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;clip-path:inset(69% 0 0);z-index:90;pointer-events:none}

/* Raised action toys with readable labels, including on completed gardens. */
.garden .toy-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;flex:0 0 auto;width:60px;height:70px;min-width:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:16px;background:none;box-shadow:none;text-decoration:none;color:#654726;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.garden .toy-icon{display:block;width:54px;height:54px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 1px #69401840);transform-origin:50% 80%;transition:transform .16s cubic-bezier(.2,.8,.3,1.3),filter .16s}
.garden .toy-label{font:700 15px/15px Gaegu,system-ui,sans-serif;white-space:nowrap;pointer-events:none;text-shadow:0 1px #fff4d9}
.garden .toy-button:active .toy-icon{transform:translateY(3px) scale(.92,.95);filter:drop-shadow(0 1px 1px #69401840) brightness(1.06)}
.garden .bottom{grid-template-columns:60px minmax(0,1fr) 60px}.garden .primary{min-height:44px}
@media(hover:hover){.garden .toy-button:hover .toy-icon{transform:translateY(-2px) rotate(-5deg)}.garden #remove:hover .toy-icon{transform:translateY(-2px) rotate(8deg)}.garden .toy-button:active .toy-icon{transform:translateY(3px) scale(.92,.95)}}
@media(max-width:599px){.garden .toy-button{width:54px;height:64px}.garden .toy-icon{width:49px;height:49px}.garden .toy-label{font-size:14px;line-height:14px}.garden .bottom{grid-template-columns:54px minmax(0,1fr) 54px}}
@media(max-height:660px) and (max-width:599px){.garden .game{grid-template-rows:64px 77px minmax(90px,1fr) auto 72px}.garden .primary{font-size:17px}}
@media(max-width:350px){.garden .primary{font-size:15px;padding:8px 4px}.garden .top-actions{gap:4px}}
@media(max-height:570px) and (min-width:600px){.garden .game{grid-template-rows:54px minmax(0,1fr) 120px}.garden .primary{min-height:44px}.garden .home-toy{flex-direction:row;width:92px;height:48px;gap:3px}.garden .home-toy .toy-icon{width:43px;height:43px}.garden .bottom .toy-button{width:54px;height:62px}.garden .bottom .toy-icon{width:47px;height:47px}.garden .bottom .toy-label{font-size:14px;line-height:14px}.garden .bottom{grid-template-columns:54px minmax(0,1fr) 54px}}
@media(prefers-reduced-motion:reduce){.garden .toy-button:hover .toy-icon,.garden .toy-button:active .toy-icon{transform:none}}

/* Garden buddy: seedling that cheers and grows into the sprout when the garden blooms. */
.garden-buddy{aspect-ratio:1;width:auto;overflow:visible}
.garden-buddy .buddy-grow,.garden-buddy .buddy-idle,.garden-buddy .buddy-body{position:absolute;inset:0;transform-origin:50% 100%}
.garden-buddy .buddy-grow{transform-origin:60% 100%;transition:transform .8s cubic-bezier(.3,1.55,.45,1)}
.garden-buddy.grown .buddy-grow{transform:scale(1.22)}
.garden-buddy .buddy-body img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;transform-origin:50% 100%;transition:opacity .3s ease,transform .5s cubic-bezier(.3,1.6,.5,1)}
.garden-buddy .buddy-sprout{opacity:0;transform:scale(.72,.6)}
.garden-buddy.grown .buddy-sprout{opacity:1;transform:none}
.garden-buddy.grown .buddy-seedling{opacity:0;transform:scale(1.1,1.25)}
.garden-buddy .buddy-idle{animation:buddy-breathe 3.4s ease-in-out infinite}
.garden-buddy.grown .buddy-idle{animation:buddy-sway 2.3s ease-in-out infinite}
.garden-buddy.settled,.garden-buddy.settled *{transition:none!important}
.buddy-sparks{position:absolute;left:50%;top:22%;width:0;height:0;overflow:visible;z-index:2}
.buddy-spark{position:absolute;left:0;top:0;display:block;font-style:normal;pointer-events:none;will-change:transform,opacity}
.buddy-spark.star{font-size:20px;line-height:1;color:#f9d764;text-shadow:0 0 6px #fff6}
.buddy-spark.leaf{width:11px;height:17px;border-radius:0 100% 0 100%;background:linear-gradient(135deg,#a6d65a,#5d9a2c)}
.buddy-spark.petal{width:12px;height:12px;border-radius:60% 40% 60% 40%;box-shadow:inset -2px -2px 3px #0002,inset 2px 2px 2px #fff7}
@keyframes buddy-breathe{0%,100%{transform:none}50%{transform:scale(.985,1.03)}}
@keyframes buddy-sway{0%,100%{transform:rotate(-3deg)}25%{transform:translateY(-4%) scale(.98,1.03)}50%{transform:rotate(3deg)}75%{transform:translateY(-4%) scale(.98,1.03)}}

/* Carrying a planted seed out of its hole, back to the bowl or to another hole. */
.hole.lifted .seed,.hole.lifted .sprout{opacity:.22}
.garden-tools #seed-bowl{transition:transform .18s ease,filter .18s ease}
.garden-tools #seed-bowl.return-ready{transform:scale(1.07);filter:drop-shadow(0 0 9px #ffd661) drop-shadow(0 0 3px #fff3c2)}
.bowl-ball.arrive{animation:ball-arrive .45s cubic-bezier(.3,1.6,.5,1)}
@keyframes ball-arrive{from{scale:1.9;opacity:.4}to{scale:1;opacity:1}}

/* Painting a planted seed: drag the flower-color pot onto it. */
.garden-tools #paint-bowl{cursor:grab}
.garden-tools #paint-bowl.dipping{transform:rotate(-6deg) scale(.95)}
.drag-ghost.paint-drag{width:66px;height:66px;transform:translate(-50%,-88%);filter:drop-shadow(0 8px 6px #49352145)}
.paint-dab{position:absolute;inset:8px;border-radius:50% 50% 46% 54%/58% 58% 42% 42%;background:radial-gradient(circle at 36% 30%,var(--seed-light) 0 14%,var(--seed) 46%,var(--seed-dark) 100%);box-shadow:inset 0 -4px 6px #0002,0 0 0 3px #fffbe9cc}
.paint-dab::after{content:'';position:absolute;left:46%;bottom:-11px;width:12px;height:16px;border-radius:50% 50% 50% 50%/40% 40% 60% 60%;background:var(--seed);box-shadow:inset 0 -2px 3px #0002}
.hole.paint-ready{box-shadow:0 0 0 3px var(--paint),0 0 16px var(--paint);background:#fff3}
.hole.painted::after{content:'';position:absolute;left:50%;top:48%;width:70%;height:70%;border-radius:50%;border:4px solid var(--paint);transform:translate(-50%,-50%);pointer-events:none;animation:paint-splash .6s ease-out forwards}
@keyframes paint-splash{from{opacity:.95;transform:translate(-50%,-50%) scale(.4)}to{opacity:0;transform:translate(-50%,-50%) scale(1.6)}}
.hole .seed.repainted{animation:seed-repaint .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes seed-repaint{0%{transform:scale(.6)}60%{transform:scale(1.18)}100%{transform:none}}
