/* Wish jar + adoption (wish-jar.js). The squishy and the gold fill sit behind the see-through jar picture. */
.wj-jar{position:relative;flex:none;width:52px;height:52px;margin:0 2px;padding:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.wj-jar[hidden]{display:none!important}
.wj-jar .wj-glass,.wj-big .wj-glass{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:3;pointer-events:none;filter:drop-shadow(0 3px 3px #6b4a6540)}
.wj-fill{position:absolute;z-index:2;left:20%;right:20%;bottom:9%;height:calc(var(--wj-fill,0%)*.24);border-radius:4px 4px 18% 18%/4px 4px 30% 30%;background:url('./assets/icons3d/r-coin.webp') 0 0/30% auto,url('./assets/icons3d/r-coin.webp') 15% 45%/30% auto,linear-gradient(#ffe27a,#f2b937);box-shadow:inset 0 2px 0 #fff3b0;transition:height .6s cubic-bezier(.34,1.3,.5,1)}
.wj-toy{position:absolute;z-index:1;left:23%;right:23%;bottom:20%;height:42%;display:grid;place-items:center}
.wj-toy>*,.wj-toy img,.wj-new>*,.wj-new img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.wj-jar.wj-ready{animation:wj-glow 1.6s ease-in-out infinite}
.wj-jar.wj-ready::after{content:'';position:absolute;inset:-4px;border-radius:50%;background:radial-gradient(#fff4b0aa,transparent 65%);z-index:0;animation:wj-pulse 1.6s ease-in-out infinite}
@keyframes wj-glow{0%,100%{transform:rotate(0)}10%{transform:rotate(-8deg)}20%{transform:rotate(7deg)}30%{transform:rotate(0)}}
@keyframes wj-pulse{50%{opacity:.35;transform:scale(1.15)}}
/* the jar button beside the play-for-coins button when the basket is short */
.wj-add{position:absolute;bottom:calc(100% + 12px);left:50%;width:clamp(58px,15vw,72px);height:clamp(58px,15vw,72px);margin-left:calc(clamp(58px,15vw,72px)/-2);padding:4px;border:3px solid #fff;border-radius:22px;background:#fdf2fb;box-shadow:0 5px 0 #e7c7df,0 8px 16px #6b4a6533;cursor:pointer;animation:wj-glow 2.4s ease-in-out infinite}
.wj-add img{width:100%;height:100%;object-fit:contain}
.wj-add b{position:absolute;right:-8px;top:-8px;width:26px;height:26px;border-radius:50%;background:#ffd84d;color:#fff;font:900 16px/26px system-ui;box-shadow:0 2px 0 #e0a92a}
.wj-add.on{background:#fff6c9;box-shadow:0 5px 0 #e6c35d,0 0 0 4px #ffe58a}
.wj-fly{position:fixed;z-index:95;width:60px;height:60px;pointer-events:none}
.wj-fly>*,.wj-fly img{width:100%;height:100%;object-fit:contain}
/* sheets */
.wj-sheet{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:16px;background:#3a2a4a66;animation:wj-in .22s ease-out}
.wj-card{position:relative;width:min(380px,100%);max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:22px 20px 18px;border-radius:30px;background:radial-gradient(120% 90% at 50% 0%,#fffdf8,#fbf1e3);border:3px solid #fff;box-shadow:0 18px 40px -10px #3a2a4a88;text-align:center;color:#5c4a78;display:flex;flex-direction:column;align-items:center;gap:12px}
.wj-card h2{margin:0;font-size:26px;line-height:1.1;color:#6a4bb0}
.wj-x{position:absolute;right:12px;top:12px;width:44px;height:44px;border:0;border-radius:50%;background:#f4ecf8;color:#7a6496;font:26px/1 system-ui;cursor:pointer}
.wj-big{position:relative;width:170px;height:170px}
.wj-card.wj-ready .wj-big{animation:wj-glow 1.6s ease-in-out infinite}
.wj-coins{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;max-width:300px}
.wj-coins img{width:30px;height:30px;object-fit:contain}
.wj-coins img.ghost{filter:grayscale(1) brightness(1.25);opacity:.38}
.wj-coins.wj-stacks{display:grid;grid-template-rows:repeat(5,7px);grid-auto-flow:column;grid-auto-columns:34px;gap:0 6px;transform:scaleY(-1);min-height:62px;align-content:end}
.wj-coins.wj-stacks img{transform:scaleY(-1);align-self:start}
.wj-row{display:flex;gap:14px;justify-content:center}
.wj-home,.wj-earn{position:relative;width:84px;height:84px;padding:0;border:3px solid #fff;border-radius:24px;cursor:pointer}
.wj-home{display:grid;place-items:center;background:linear-gradient(#8fe0b5,#5cc492);box-shadow:0 5px 0 #3e9c6f,0 10px 18px #2e7a5544;animation:wj-glow 1.8s ease-in-out infinite}
.wj-home img{width:46px;height:46px}
.wj-home svg{position:absolute;right:-9px;bottom:-9px;width:32px;height:32px;padding:5px;border-radius:50%;background:#fff;fill:none;stroke:#3e9c6f;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;box-sizing:border-box}
.wj-earn{background:#fff8e6;box-shadow:0 5px 0 #e3c78f,0 8px 16px #6b4a6533}
.wj-earn>img:first-child{width:100%;height:100%;object-fit:contain;border-radius:20px;padding:9%;box-sizing:border-box;background:radial-gradient(circle at 50% 40%,#fffbe6,#ffe8a3)}
.wj-earn-coin{position:absolute;right:-9px;bottom:-9px;width:40%;height:40%;object-fit:contain}
.wj-change{border:0;background:none;color:#8a7a99;font:inherit;font-size:15px;text-decoration:underline;cursor:pointer;min-height:44px}
/* adoption */
.wj-new{width:150px;height:150px;animation:wj-hop 1.2s cubic-bezier(.34,1.5,.5,1) both}
@keyframes wj-hop{0%{transform:translateY(30px) scale(.4);opacity:0}45%{transform:translateY(-14px) scale(1.08,.94);opacity:1}70%{transform:translateY(0) scale(.96,1.05)}100%{transform:none}}
.wj-hearts{position:absolute;left:0;right:0;top:20px;height:0;pointer-events:none}
.wj-hearts i{position:absolute;font-style:normal;color:#f28bb0;font-size:22px;animation:wj-heart 2.4s ease-out infinite}
.wj-hearts i:nth-child(1){left:28%;animation-delay:.3s}.wj-hearts i:nth-child(2){left:66%;animation-delay:1s;font-size:16px}.wj-hearts i:nth-child(3){left:44%;animation-delay:1.7s;font-size:18px}
@keyframes wj-heart{0%{transform:translateY(120px) scale(.4);opacity:0}25%{opacity:1}100%{transform:translateY(0) scale(1);opacity:0}}
.wj-names{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.wj-name,.wj-own input{min-height:48px;padding:0 16px;border:3px solid #fff;border-radius:999px;background:#f4ecf8;color:#6a4bb0;font:inherit;font-weight:800;font-size:18px;box-shadow:0 3px 0 #e2d3ec;cursor:pointer}
.wj-name.on{background:linear-gradient(#fff3c4,#ffd978);color:#8a5413;box-shadow:0 3px 0 #e0a92a,0 0 0 3px #ffe58a}
.wj-own input{width:120px;cursor:text;text-align:center;box-sizing:border-box}
.wj-day{display:flex;align-items:center;gap:8px;margin:0;font-size:15px;color:#8a7a99}
.wj-day img{width:28px;height:28px}
.wj-hi{min-height:56px;padding:0 28px;border:3px solid #fff;border-radius:999px;background:linear-gradient(#8fe0b5,#5cc492);color:#fff;font:inherit;font-weight:900;font-size:22px;text-shadow:0 1px 0 #3e9c6f;box-shadow:0 5px 0 #3e9c6f;cursor:pointer}
/* Purchased-toy naming uses the same visual rhythm as the first dumpling's naming card. */
.wj-adopt .wj-card{width:min(92vw,500px);height:min(78dvh,650px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:hidden;padding:clamp(20px,4vw,30px);border-radius:36px;background:#fffaf0;box-shadow:0 9px 0 #d6c3aa,0 22px 42px #34234455;gap:0;justify-content:space-between}
.wj-adopt .wj-card h2{flex:none;color:#8654a5;font-size:clamp(27px,6vw,37px);line-height:1.1;padding:2px 0 14px}
.wj-adopt .wj-new{flex:0 1 auto;min-height:0;width:min(66vw,30dvh,280px);height:min(66vw,30dvh,280px);aspect-ratio:1;display:grid;place-items:center;margin:auto;background:radial-gradient(circle,#fcf8ff 50%,#f4e7fb 75%,#fffaf0 76%);border-radius:50%;animation:wj-hop 1.2s cubic-bezier(.34,1.5,.5,1) both}
.wj-adopt .wj-new>*,.wj-adopt .wj-new img{width:86%;height:86%;max-width:86%;max-height:86%;object-fit:contain}
.wj-adopt .wj-names{flex:none;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 12px}
.wj-adopt .wj-name,.wj-adopt .wj-own input{width:100%;height:clamp(54px,7dvh,66px);min-height:0;box-sizing:border-box;border-radius:22px;background:#fff9ef;color:#8054a0;box-shadow:0 5px 0 #cbb5d1;font-size:clamp(16px,4vw,21px);line-height:1.08;padding:0 8px;white-space:normal;overflow-wrap:break-word}
.wj-adopt .wj-name.on{background:#e8fcf3;border-color:#72cdb8;color:#3f7d6f;box-shadow:0 5px 0 #68aa9b}
.wj-adopt .wj-own{min-width:0}
.wj-adopt .wj-own input{font-size:clamp(18px,5vw,24px);background:#fff9ef}
.wj-adopt .wj-own input:focus{font-size:16px;outline:3px solid #72cdb8;outline-offset:2px}
.wj-adopt .wj-day{flex:none;align-self:center;font-size:clamp(11px,2.8vw,15px);margin:0 0 12px;color:#8a7a99;white-space:nowrap}
.wj-adopt .wj-day img{width:23px;height:23px}
.wj-adopt .wj-hi{flex:none;width:100%;min-height:66px;border-radius:24px;background:#8cddca;color:#20594f;text-shadow:none;box-shadow:0 5px 0 #69b3a1,0 9px 16px #4d8f7c33;font-size:clamp(20px,5vw,27px)}
@media(max-height:690px){.wj-adopt .wj-card{height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:14px 18px}.wj-adopt .wj-card h2{padding-bottom:4px}.wj-adopt .wj-names{margin:4px 0 6px}.wj-adopt .wj-day{margin-bottom:6px}.wj-adopt .wj-hi{min-height:54px}}
@keyframes wj-in{from{opacity:0}}
@media(prefers-reduced-motion:reduce){.wj-jar.wj-ready,.wj-jar.wj-ready::after,.wj-add,.wj-card.wj-ready .wj-big,.wj-home,.wj-new,.wj-hearts i,.wj-sheet{animation:none!important}.wj-fill,.wj-toy{transition:none}}
@media(max-width:420px){.wj-jar{width:44px;height:44px;margin:0}}
.wj-jar.wj-float{position:fixed;z-index:40;width:48px;height:48px;margin:0}
/* Shuffle / Slides after today's dumpling: dimmed with a moon */
.gm-tile.wj-sleepy .gm-icon>img:first-child{filter:grayscale(.55) brightness(.8)}
.gm-tile.wj-sleepy .gm-badge{opacity:.4}
.gm-tile .gm-icon img.wj-moon{position:absolute!important;inset:auto 5% auto auto!important;top:5%!important;width:36%!important;height:36%!important;max-width:none;margin:0;border-radius:0;object-fit:contain;z-index:2;filter:drop-shadow(0 3px 4px #3a2a4a55);animation:wj-doze 3s ease-in-out infinite}
@keyframes wj-doze{50%{transform:translateY(-4px) rotate(-6deg)}}
/* "2 more for Pebble!" under the jar */
.wj-bubble{position:fixed;z-index:85;width:max-content;max-width:calc(100vw - 16px);white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;border:3px solid #fff;border-radius:999px;background:#fff8e6;color:#8a5413;font-weight:800;font-size:16px;box-shadow:0 4px 12px #6b4a6533;pointer-events:none;animation:wj-in .25s ease-out}
.wj-bubble img{width:24px;height:24px}
@media(prefers-reduced-motion:reduce){.gm-tile .gm-icon img.wj-moon{animation:none}}
.gm-tile.wj-sleepy .gm-icon{position:relative}
/* coins (= game wins) still to go, under the jar */
.wj-left{position:absolute;left:50%;bottom:-6px;translate:-50% 0;z-index:3;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:999px;background:#fff;border:2px solid #f2c14e;font:900 12px/16px "Grandstander",ui-rounded,system-ui,sans-serif;color:#9a6a12;text-align:center;box-shadow:0 2px 4px #6b4a6530;pointer-events:none}
.wj-left:empty{display:none}
/* night (Mac, 10/24): the wish jar sheets ("Name me!", pick a wish) use the shared plum night colors from theme.css */
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-sheet{background:#0f0a1fa6}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-card{background:linear-gradient(var(--sq-card-top),var(--sq-card-bottom))!important;border-color:var(--sq-card-edge)!important;box-shadow:0 8px 0 var(--sq-card-shadow),var(--sq-glow),0 25px 60px #0009!important;color:var(--sq-text)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-card h2{color:var(--sq-title)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-new{background:radial-gradient(circle,#4a3d78,#2c2347 70%)!important}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-x{background:var(--sq-chip);color:var(--sq-chip-ink);box-shadow:0 3px 0 var(--sq-card-shadow)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) :is(.wj-name:not(.on),.wj-own input){background:linear-gradient(var(--sq-btn-top),var(--sq-btn-bottom));color:var(--sq-btn-ink);border-color:var(--sq-btn-edge);box-shadow:inset 0 2px 0 #ffffff22,0 4px 0 var(--sq-btn-shadow)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-own input::placeholder{color:var(--sq-soft)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-name.on{border-color:#ffe58a}
body:is(.night-time,.calm-mode):not(.sq-newplayer) :is(.wj-day,.wj-change){color:var(--sq-soft)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-hi{border-color:var(--sq-card-edge)}
body:is(.night-time,.calm-mode):not(.sq-newplayer) .wj-earn{background:var(--sq-well);box-shadow:0 5px 0 var(--sq-card-shadow)}
.wj-sheet{z-index:2147482000}/* sits above the floating bubble visitor (it drew over the name buttons) */
