/* New Littles activities use edge-to-edge illustrated scenes as their game canvas. */
.next-game-dialog{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;overflow:hidden;background:#47784c}
.next-game-dialog::backdrop{background:#10271f}
.next-screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(8px,2vh,18px);padding:calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 12px) calc(env(safe-area-inset-bottom) + 10px) calc(env(safe-area-inset-left) + 12px);box-sizing:border-box;color:#294d3b;background-image:linear-gradient(#142d1b22,#142d1b52),var(--next-scene);background-size:cover;background-position:center;isolation:isolate;overflow:auto}
.next-header,.next-footer{position:absolute;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px}
.next-header{top:max(10px,env(safe-area-inset-top));color:white;text-shadow:0 2px 5px #1c331caa}.next-header small{font-size:clamp(10px,2vw,14px);font-weight:800;letter-spacing:.07em}.next-header h2{font-size:clamp(20px,4vw,34px);margin:2px 0}.next-home{width:48px;height:48px;border:2px solid #fff;border-radius:50%;font-size:30px;line-height:1;background:#fff4;color:white;touch-action:manipulation}
.next-footer{bottom:max(10px,env(safe-area-inset-bottom));justify-content:flex-start}
.next-card{width:min(720px,94vw);max-height:min(76dvh,780px);overflow:auto;box-sizing:border-box;border:3px solid #fff9e7;border-radius:26px;padding:clamp(14px,3vw,28px);background:#fff9e9f2;box-shadow:0 12px 34px #19352266;text-align:center;overscroll-behavior:contain}
.next-intro,.next-result{width:min(600px,92vw)}.next-card p{font-size:clamp(17px,3vw,23px);line-height:1.4;margin:10px auto}.next-farmer{width:clamp(82px,17vw,150px);height:clamp(82px,17vw,150px);object-fit:contain}.next-level{font-size:15px!important;font-weight:800;color:#537347}
.next-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:14px}.next-primary,.next-secondary{min-height:54px;padding:10px 18px;border-radius:18px;font-size:clamp(16px,2.7vw,20px);font-weight:800;touch-action:manipulation;cursor:pointer}.next-primary{background:#38834a;color:white;border:2px solid #276a38}.next-secondary{background:#fffef5;color:#365d42;border:2px solid #bdd0a8}
.next-play{width:min(860px,95vw);max-height:calc(100dvh - 120px);margin-top:42px;padding:clamp(12px,2.5vw,24px)}.next-status{font-weight:900;color:#537347;font-size:16px}.next-prompt{min-height:54px;display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;font-size:clamp(18px,3vw,27px);font-weight:800}.next-target{width:clamp(66px,12vw,112px);height:clamp(66px,12vw,112px);object-fit:contain;vertical-align:middle}.next-target.small{width:64px;height:64px}.next-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(132px,36vw),1fr));align-items:stretch;justify-content:center;gap:clamp(8px,2vw,16px);margin:10px auto;max-width:660px}.next-choice{min-height:clamp(98px,18vh,156px);border:3px solid #e2d3ad;border-radius:20px;background:#fffef7;color:#294d3b;font-weight:800;font-size:clamp(15px,2.5vw,20px);padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:manipulation;cursor:pointer}.next-choice img{width:min(100%,112px);height:clamp(56px,11vh,104px);object-fit:contain}.next-choice:active,.next-choice.revealed{border-color:#77a35b;background:#f4fae9}.next-choice.matched{border-color:#76a764;background:#e8f5db;opacity:.82}.next-choice:disabled{cursor:default}.next-back{font-size:clamp(32px,7vw,56px);color:#6c9455}.next-feedback{min-height:24px;font-size:16px!important;margin:4px!important}.next-change-pair{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.next-change-pair span{padding:8px 12px;border-radius:14px;background:#eef4dc}.next-change-pair b{display:block;font-size:clamp(24px,5vw,40px);margin-top:6px}.next-puzzle{display:grid;grid-template-columns:repeat(2,minmax(110px,190px));gap:8px;justify-content:center}.next-piece{aspect-ratio:1;border:3px solid #eadcb8;border-radius:12px;color:#fff;font-size:20px;font-weight:bold;text-shadow:0 1px 4px #000;background-size:200% 200%;background-position:calc((var(--piece) % 2)*100%) calc(floor(var(--piece) / 2)*100%);touch-action:manipulation}.next-baskets{display:grid;grid-template-columns:1fr 1fr;gap:12px}.next-fruit-row{font-size:clamp(22px,5vw,42px);line-height:1.2;max-width:100%;overflow-wrap:anywhere}
@media(max-width:520px){.next-screen{justify-content:flex-start;padding-top:calc(env(safe-area-inset-top) + 60px);padding-bottom:calc(env(safe-area-inset-bottom) + 54px)}.next-card{width:100%;max-height:100%;padding:12px}.next-play{margin-top:auto;margin-bottom:auto}.next-board{grid-template-columns:repeat(2,minmax(0,1fr))}.next-choice{min-height:100px}.next-intro,.next-result{margin:auto 0}.next-footer{bottom:max(8px,env(safe-area-inset-bottom))}}
@media(orientation:landscape) and (max-height:520px){.next-screen{padding-top:calc(env(safe-area-inset-top) + 48px);padding-bottom:calc(env(safe-area-inset-bottom) + 46px)}.next-card{max-height:calc(100dvh - 105px);padding:10px 14px}.next-farmer{width:64px;height:64px}.next-card p{font-size:16px;margin:5px auto}.next-choice{min-height:86px}.next-choice img{height:60px}.next-prompt{min-height:36px}.next-play{width:min(900px,94vw)}}
@media(prefers-reduced-motion:reduce){.next-choice{scroll-behavior:auto}}
.next-belt-stop{display:contents}.next-belt{display:flex;align-items:center;gap:12px;max-width:660px;width:100%;overflow:hidden;min-height:clamp(120px,23vh,180px);padding:8px;box-sizing:border-box;background:#92764d66;border-radius:18px}.next-belt .next-belt-stop{display:block;flex:0 0 clamp(110px,20vw,145px);animation:next-conveyor 8s linear var(--belt-delay) infinite}.next-belt .next-choice{width:100%;min-height:clamp(94px,17vh,140px)}.next-icon{display:block;font-size:clamp(42px,9vw,68px);line-height:1.1}.next-choice span:last-child{display:block}@keyframes next-conveyor{from{transform:translateX(75vw)}to{transform:translateX(-75vw)}}
.next-belt{gap:8px;padding:12px}.next-belt .next-belt-stop{flex:1 1 0;min-width:0;animation:next-belt-sway 2.8s ease-in-out var(--belt-delay) infinite alternate}.next-belt .next-choice{min-width:0;padding:6px}.next-belt-stop{overflow:hidden}@keyframes next-belt-sway{from{transform:translateX(0)}to{transform:translateX(10px)}}
.next-order{display:flex;justify-content:center;gap:8px;width:100%;margin-top:6px}.next-order-item{position:relative;width:clamp(56px,12vw,82px);height:clamp(56px,12vw,82px);border:3px solid #d8c9a5;border-radius:16px;background:#fffef7;opacity:.66}.next-order-item.current{opacity:1;border-color:#43834e;box-shadow:0 0 0 4px #a9d38e}.next-order-item img{width:100%;height:100%;object-fit:contain}.next-order-item b{position:absolute;left:-6px;top:-7px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#397b48;color:#fff;font-size:14px}
.next-change-pair{display:grid;gap:6px;max-width:580px;margin:6px auto}.next-change-row{display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 10px;border-radius:14px;background:#eef4dc}.next-change-row>span{min-width:52px;font-weight:900;color:#456843}.next-change-row>div{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}.next-change-animal{display:flex;flex-direction:column;align-items:center;gap:1px;min-width:48px;padding:2px!important;background:transparent!important}.next-change-animal img{width:clamp(34px,7vw,56px);height:clamp(34px,7vw,56px);object-fit:contain}.next-change-animal small{font-size:11px;font-weight:800}.next-change-empty{display:grid;place-items:center;width:42px;height:42px;border:2px dashed #b5c69b;border-radius:50%;background:#fff9;font-weight:900;color:#6e8953}
.next-puzzle{grid-template-columns:repeat(2,minmax(72px,150px));gap:6px;padding:6px;border-radius:14px;background:#fff8e5}.next-slot{display:grid;place-items:center;padding:0;background:#e8e2ce;border:2px dashed #b6a982;overflow:hidden}.next-slot>span:first-child{font-size:clamp(24px,5vw,44px);color:#9c8d67}.next-slot.filled{padding:0;border-style:solid}.next-slot-image{display:block;width:100%;height:100%;background-size:200% 200%;background-position:var(--piece-x) var(--piece-y)}.next-puzzle-hint{font-size:15px!important;margin:4px auto!important}.next-puzzle-tray{display:grid;grid-template-columns:repeat(4,minmax(52px,96px));gap:8px;justify-content:center;margin:6px auto}.next-tile{width:clamp(52px,12vw,88px);padding:0;background-size:200% 200%;background-position:var(--piece-x) var(--piece-y)}.next-tile.selected{outline:4px solid #77a35b;outline-offset:2px;transform:translateY(-3px)}
.next-count-board{grid-template-columns:1fr;justify-items:center;gap:8px}.next-count-basket{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;width:min(100%,430px);min-height:90px;padding:10px;box-sizing:border-box;border:3px solid #c89a55;border-radius:18px 18px 32px 32px;background:repeating-linear-gradient(90deg,#f8e7c8 0 12px,#eed9b1 12px 20px);box-shadow:inset 0 0 0 4px #fff8}.next-count-basket img{width:clamp(42px,10vw,68px);height:clamp(42px,10vw,68px);object-fit:contain}.next-number-choices{display:flex;justify-content:center;gap:10px}.next-number{width:clamp(64px,17vw,92px);min-height:74px;font-size:clamp(28px,6vw,42px)}.next-fruit-row{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2px}.next-fruit-row img{width:clamp(34px,7vw,56px);height:clamp(34px,7vw,56px);object-fit:contain}
.next-board.next-picture-board{grid-template-columns:minmax(0,1fr);justify-items:center;gap:4px;max-width:620px}.next-puzzle-reference{width:clamp(100px,15vw,130px);height:clamp(54px,8vw,72px);object-fit:cover;border:3px solid #fff;border-radius:12px;box-shadow:0 2px 8px #38533445}.next-picture-board .next-puzzle{width:max-content;grid-template-columns:repeat(2,minmax(76px,100px));gap:5px;margin:4px auto}.next-picture-board .next-puzzle-tray{width:min(100%,360px);grid-template-columns:repeat(4,minmax(56px,76px));gap:6px;margin:4px auto}.next-picture-board .next-tile{width:clamp(56px,8vw,76px);min-height:0}
@media(max-width:520px){.next-change-row{gap:3px;padding:4px}.next-change-animal{min-width:40px}.next-change-animal img{width:34px;height:34px}.next-change-animal small{font-size:10px}.next-order{gap:6px}.next-puzzle-tray{grid-template-columns:repeat(4,minmax(46px,1fr));gap:6px}.next-tile{width:100%;min-height:62px}}
.next-memory-board{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(104px,15vh,132px);align-items:stretch}.next-memory-board .next-choice{height:100%;min-height:0;box-sizing:border-box;overflow:hidden}.next-memory-board .next-choice img{width:min(100%,100px);height:min(8vh,72px);flex:0 0 auto;object-fit:contain}.next-memory-board .next-choice>span:not(.next-back){line-height:1.1}.next-memory-board .next-back{display:grid;place-items:center;width:clamp(46px,8vh,64px);height:clamp(46px,8vh,64px);line-height:1}
@media(orientation:landscape) and (max-height:520px){.next-memory-board{grid-auto-rows:90px}.next-memory-board .next-choice img{height:52px}.next-memory-board .next-back{width:44px;height:44px}}

/* Keep the farm visible around the actual play objects. */
.next-card.next-play{background:#fff7e71c;border-color:#fff8df55;box-shadow:none}.next-status{display:table;margin:0 auto 8px;padding:7px 16px;border:2px solid #fff9e9;border-radius:20px;background:#fff7e9ef;color:#536e3c;box-shadow:0 3px 0 #624b2933}.next-prompt{padding:10px 12px;border-radius:20px;background:#fff9e9f0;box-shadow:0 4px 0 #4b382a26;color:#4c3825}.next-feedback{display:table;margin:8px auto!important;border-radius:14px;padding:6px 12px;background:#fff9e9eb;color:#4a6339}.next-choice{box-shadow:0 5px 0 #8d70484d;transition:translate .16s,box-shadow .16s}.next-choice:active{translate:0 3px;box-shadow:0 2px 0 #8d70484d}.next-choice.next-picked{border-color:#ffd469;background:#fff2b8;animation:next-found .6s ease-in-out}.next-choice.matched{animation:next-found .6s ease-in-out}.next-result h3{color:#4a683c}.next-result h3:before{content:'★ ★ ★';display:block;font-size:40px;letter-spacing:6px;color:#d9951c;text-shadow:0 2px #f4d778;margin-bottom:8px}@keyframes next-found{35%{translate:0 -10px;scale:1.06}65%{translate:0 -3px;scale:1.03}to{translate:0 0;scale:1}}@media(prefers-reduced-motion:reduce){.next-choice{transition:none}.next-choice.next-picked,.next-choice.matched{animation:none}}

.next-memory-board .next-choice{position:relative;overflow:hidden;padding:0;isolation:isolate;background:#fff9e9}.next-memory-board .next-choice .next-card-back{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:inherit;opacity:1;transition:opacity .18s ease-out,rotate .2s ease-out}.next-memory-board .next-choice .next-card-face{position:absolute;left:7%;top:4%;width:86%;height:78%;max-width:none;object-fit:contain;opacity:0;rotate:y -20deg;transition:opacity .18s ease-out,rotate .2s ease-out}.next-card-name{position:absolute;left:0;right:0;bottom:3%;font-size:clamp(12px,2vw,18px);font-weight:850;line-height:1.1;opacity:0}.next-memory-board .next-choice.revealed .next-card-back,.next-memory-board .next-choice.matched .next-card-back{opacity:0;rotate:y 20deg}.next-memory-board .next-choice.revealed .next-card-face,.next-memory-board .next-choice.matched .next-card-face,.next-memory-board .next-choice.revealed .next-card-name,.next-memory-board .next-choice.matched .next-card-name{opacity:1;rotate:y 0deg}@media(prefers-reduced-motion:reduce){.next-memory-board .next-choice img{transition:none!important}}

.next-home-picture{position:relative;display:block;width:100%;height:clamp(75px,15vh,125px);overflow:hidden;border-radius:13px;background:#e0d4ac}.next-choice .next-home-picture>img:first-child{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover}.next-choice .next-home-picture .next-home-friend{position:absolute;bottom:0;right:2%;width:58%;height:82%;filter:drop-shadow(0 3px 2px #362b2155)}.next-category-basket{position:relative;display:block;width:130px;max-width:100%;height:105px}.next-choice .next-category-basket>img:first-child{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain}.next-choice .next-category-basket .next-basket-food{position:absolute;top:25%;width:40%;height:55%;object-fit:contain}.next-basket-food.food-0{left:16%}.next-basket-food.food-1{left:45%}.next-category-basket:after{content:'';position:absolute;inset:0;background:url(assets/generated/play-pieces/harvest-basket.webp) center/contain no-repeat;clip-path:inset(60% 0 0);pointer-events:none}

.next-choice.next-demonstrating{border:5px solid #ffda72;background:#fff1b4;box-shadow:0 0 0 5px #fff7ca77,0 7px 0 #a77432;translate:0 -7px;scale:1.06;filter:drop-shadow(0 0 12px #fff4b66b)}@media(prefers-reduced-motion:reduce){.next-choice.next-demonstrating{translate:none;scale:1}}
