/* Shared garden furniture. Artwork stays behind the child’s letter, pet and rewards. */
.room-art{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.lg-stars .stars-stage>:not(.reward-scene),.lg-party .party-stage>:not(.reward-scene),.pet-room .pet-racks{position:relative;z-index:1}
.room-floor{position:absolute;left:50%;top:70%;width:100vw;height:max(60vh,340px);transform:translateX(-50%);z-index:-2;pointer-events:none;overflow:visible}
.lg-app .lg-pet{overflow:hidden}
.lg-app .pet-stage.pet-room{width:min(100%,900px);margin:auto;flex:0 0 auto;min-height:0;overflow:visible;gap:12px;padding:4px 0 12px}
.lg-app .pet-room .pet-hero{flex:0 0 auto;min-height:0;max-height:none;padding:28px 0 0;display:flex;align-items:center;justify-content:center;isolation:isolate}
.pet-diorama{position:relative;aspect-ratio:600 / 430;width:min(100%,540px);max-height:100%;isolation:isolate}
.pet-alcove{position:absolute;inset:0;z-index:-1;pointer-events:none}
.lg-app .pet-room .pet-big{position:absolute;left:50%;bottom:9%;transform:translateX(-50%);width:57%;height:76%;margin:0;padding:0;display:grid;place-items:end center;isolation:isolate}
.lg-app .pet-room .pet-big>.lg-animal,.lg-app .pet-room .pet-big>svg{position:absolute;inset:0;height:100%!important;width:100%!important;max-width:100%;max-height:100%;min-height:0}
.lg-app .pet-room .pet-big::before{display:none}
.lg-app .pet-room .lg-star-chip{top:0;left:auto;right:12px;transform:none;z-index:3}
.lg-app .pet-room .pet-bubble{top:6px;right:0;border:2px solid #a89478}
.lg-app .pet-room .pet-flower{right:6px;bottom:4px;width:58px;pointer-events:none}.pet-room .pet-flower svg{width:100%;height:auto}
.lg-app .pet-room .pet-racks{flex:0 0 auto;max-width:560px;min-width:0;width:100%;gap:6px;padding:0 2px}
.wardrobe-tabs{display:flex;justify-content:center;gap:16px;position:relative;z-index:1}
.wardrobe-tabs button{width:64px;min-height:48px;display:grid;place-items:center;border:3px solid #4a3620;border-radius:18px 18px 10px 10px;background:linear-gradient(#fffdf7,#fffaf0 65%,#e5dcc8);box-shadow:0 4px 0 #a89478,inset 0 2px 0 #fffdf7;cursor:pointer;padding:4px 10px}
.wardrobe-tabs button svg{width:36px;height:36px}
.wardrobe-tabs button[aria-selected=true]{background:linear-gradient(#ccfbef,#b7e779);border-color:#2f5c46;box-shadow:0 4px 0 #2f5c46,inset 0 2px 0 #fffaf0}
.wardrobe-panel{display:flex;align-items:center;gap:4px;min-height:124px;width:100%;min-width:0}
.wardrobe-prev,.wardrobe-more{display:grid;place-items:center;flex:0 0 44px;width:44px;height:48px;padding:8px 4px;border:3px solid #4a3620;border-radius:18px;background:linear-gradient(#fffdf7,#fffaf0 65%,#e5dcc8);color:#4a3620;box-shadow:0 4px 0 #a89478;cursor:pointer}
.wardrobe-prev svg{transform:rotate(180deg)}.wardrobe-prev:disabled,.wardrobe-more:disabled{opacity:.4;box-shadow:none;cursor:default}
.lg-app .pet-room .pet-shelf,.lg-app .pet-room .pet-color-rack{border:3px solid #4a3620;border-radius:22px;background:linear-gradient(#2f5c46,#4e9677 72%,#a89478 72%,#c9bda4);box-shadow:0 5px 0 #4a3620,inset 0 3px 0 #c9bda4}
.lg-app .pet-room .pet-shelf{flex:1;min-width:0;max-width:none;min-height:124px;padding:9px 8px 13px;gap:8px;margin:0;mask-image:none;-webkit-mask-image:none}
.lg-app .pet-room .pet-acc{width:104px;min-height:126px;padding:7px 4px;justify-content:flex-start;gap:4px;border:2px solid #4a3620;background:linear-gradient(#fffdf7,#fffaf0 65%,#e5dcc8);border-radius:16px;box-shadow:0 3px 0 #a89478}
.lg-app .pet-room .pet-acc.is-worn{background:linear-gradient(#ccfbef,#fffaf0 75%,#b7e779);border-color:#2f5c46;box-shadow:0 3px 0 #2f5c46;outline:2px solid #b7e779;outline-offset:-4px}
.lg-app .pet-room .pet-acc-art{width:100%;height:90px;display:grid;place-items:end center}.pet-room .pet-acc-art>svg,.pet-room .pet-acc-art>.lg-animal{height:90px!important;width:90px!important;max-width:100%!important}
.lg-app .pet-room .pet-color-rack{width:100%;min-height:124px;padding:12px 8px;justify-content:center}
.lg-app .pet-room .pet-color-options{gap:12px;padding:10px 12px}.lg-app .pet-room .pet-color-swatch{width:44px;height:44px;flex:0 0 44px;border-color:#4a3620;box-shadow:0 4px 0 #4a3620,inset 0 3px 0 #fffaf0}
.wardrobe-tabs button:focus-visible,.wardrobe-panel button:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
/* The nest is part of the environment, with a clear opening for the egg. */
.lg-app .hatch-stage{position:relative;width:min(600px,100%);margin:auto;isolation:isolate;gap:18px}
.hatch-nest{position:absolute;inset:auto 0 0;height:260px;z-index:-1;pointer-events:none}
.lg-app .hatch-egg::before,.lg-app .hatch-egg::after{display:none}
.lg-app .hatch-pet{position:relative;z-index:1}
.lg-app .hatch-hues{padding:10px;background:#fffaf0;border:2px solid #c9bda4;border-radius:28px;gap:10px}
/* A paper teaching board is furniture, never the source of an Arabic glyph. */
.lg-app .lg-meet .meet-stage{position:relative;isolation:isolate;width:min(580px,100%);padding:12px 8px 20px;border:0;background:none;box-shadow:none;gap:16px;max-height:none;overflow:visible}
.lesson-furniture{position:absolute;inset:0;z-index:-1;pointer-events:none}
.lesson-furniture svg{object-fit:contain}
.lg-app .lg-meet .meet-bud{width:130px;height:140px;min-height:0;margin:0;background:none;border:0;box-shadow:none;display:grid;place-items:center}
.lg-app .lg-meet .meet-bud>svg{width:120px;height:130px}
.lg-app .lg-meet .meet-card .art-blob{width:100%;height:100%;max-height:none}
.lg-app .lg-meet .meet-make{max-width:100%;gap:8px}
.lg-app .lg-meet .meet-piece .art-blob{width:clamp(96px,25vw,145px)}
.lg-app .lg-meet .meet-dots{flex-shrink:0}
/* Characters, planting and furniture share one fixed-proportion garden frame. */
.reward-scene{position:relative;width:min(560px,100%);aspect-ratio:600 / 430;height:auto;flex:0 0 auto;isolation:isolate}
.reward-ground{position:absolute;inset:0;z-index:-1;pointer-events:none}
.lg-app .reward-scene .garden-reward{position:absolute;bottom:10%;left:23%;width:52%;margin:0}
.lg-app .reward-scene .reward-friend{position:absolute;right:2%;bottom:13%;width:32%;height:62%;display:grid;place-items:end center}
.reward-friend>svg,.reward-friend>.lg-animal{width:100%!important;height:100%!important}
.lg-app .reward-scene .party-pair{position:absolute;inset:0;display:block}
.lg-app .reward-scene .party-mascot{position:absolute;left:4%;bottom:13%;width:23%;height:59%;animation:none}
.lg-app .reward-scene .party-pet{position:absolute;right:0;bottom:13%;width:34%;height:65%;display:grid;place-items:end center}
.lg-app .reward-scene .party-pair svg,.lg-app .reward-scene .party-pair .lg-animal{width:100%!important;height:100%!important;max-height:none}
.lg-app .reward-scene .party-pet .pet-bubble{right:0;top:-20px}
.lg-app:not(.lg-boat-adventure) :is(.lg-stars .stars-stage,.lg-party .party-stage){width:min(600px,100%);gap:12px;padding:12px 6px;flex-shrink:1;overflow:visible}
.lg-app .lg-party .party-stars,.lg-app .lg-stars .stars-row{position:relative;z-index:2;flex-shrink:0;margin:0;background:linear-gradient(#fffdf7,#fffaf0 65%,#e5dcc8);border:3px solid #4a3620;box-shadow:0 5px 0 #a89478}
.lg-app .lg-party .party-flower{position:absolute;left:50%;top:12%;transform:translateX(-50%);pointer-events:none;z-index:2}
.lg-app .lg-party .party-flower svg{width:80px;height:80px}
.lg-app .lg-party .garden-practice-links,.lg-app .lg-stars .garden-practice-links{gap:12px}
.lg-app .lg-party .garden-practice-links button,.lg-app .lg-stars .garden-practice-links button{width:64px;height:52px;border-width:2px;border-radius:18px}
.lg-app .lg-party .garden-practice-links svg,.lg-app .lg-stars .garden-practice-links svg{width:48px;height:42px}
.lg-app:has(.reward-scene),.lg-app:has(.pet-room){background:linear-gradient(#ccfbef,#fffaf0 54%,#b7e779)}
.lg-app[data-garden-phase="night"]:has(.reward-scene),.lg-app[data-garden-phase="night"]:has(.pet-room){background:linear-gradient(#6064a0,#34375f 65%,#2f5c46)}
.lg-app[data-garden-phase="night"] :is(.reward-scene,.pet-diorama)>.room-floor{--room-meadow:#7fce54;--room-water:#3a8fc4;--room-water-shade:#4a4d84}
/* Sticker paper, binding and packet belong to the same warm material family. */
.lg-app .lg-album .album-stage{scrollbar-width:thin;scrollbar-color:#a89478 #fffaf0;justify-content:flex-start;gap:14px;padding:6px 4px 24px;max-width:620px;width:100%;margin:auto}
.lg-app .lg-album .album-grid{position:relative;width:100%;max-width:560px;border:2px solid #a89478;border-left:10px solid #c9bda4;border-radius:12px 24px 24px 12px;background:#fffaf0;box-shadow:4px 5px 0 #e5dcc8;padding:16px 12px;gap:12px;overflow:visible}
.lg-app .lg-album .album-pack{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:10px;width:auto;padding:0 10px;margin:0;min-height:96px}
.lg-app .lg-album .album-pack>.room-pack{height:96px;width:82px}
@media(max-height:650px){
 .lg-app .lg-meet .meet-stage{padding:8px 4px 16px;gap:10px}

 .reward-scene{width:min(345px,100%)}
 .lg-app .lg-party .party-stage,.lg-app .lg-stars .stars-stage{gap:10px;padding:8px 2px}
 .lg-app .hatch-nest{height:240px}
}
@media(max-height:420px) and (min-width:500px){
 .lg-app .pet-stage.pet-room{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;padding:0 0 8px;align-items:center}
 .lg-app .pet-room .pet-racks{padding:0 4px}.wardrobe-tabs{gap:10px}.wardrobe-tabs button{width:58px}
 .lg-app .pet-room .pet-color-options{flex-wrap:wrap;justify-content:center;max-width:180px}
 .lg-app .lg-meet .meet-stage{margin:12px auto;padding:8px 16px 12px;gap:8px;max-width:480px}

 .lg-app .lg-meet{overflow-y:auto}
 .lg-app .lg-party,.lg-app .lg-stars{overflow:hidden}
}
.lg-app .hatch-hero{position:relative;isolation:isolate;display:grid;place-items:center;width:100%;height:300px;padding-bottom:26px;flex-shrink:0}
.lg-app .hatch-hero .hatch-nest{position:absolute;inset:auto 0 0;width:100%;height:260px;transform:none;z-index:-1}
@media(max-height:650px){.lg-app .hatch-hero{height:260px;padding-bottom:24px}.lg-app .hatch-hero .hatch-nest{height:240px}.lg-app .hatch-stage{gap:12px}}
@media(max-height:420px){.lg-app .lg-hatch{overflow-y:auto}.lg-app .hatch-stage{flex:none}.lg-app .hatch-hero{height:245px}}
/* Chapter wayfinding is a compact picture row, never a stack of intrinsic SVGs. */
.journey-route{display:flex;align-items:center;justify-content:center;gap:12px;flex:0 0 auto;padding:0;margin:0;height:40px}
.journey-stop{position:relative;display:grid;place-items:center;width:40px;height:36px;border-radius:12px;background:#fffaf0;border:1px solid #c9bda4}
.journey-stop>svg{width:28px;height:28px;display:block}.journey-stop.is-done{background:#ccfbef;border-color:#4e9677}
.journey-stop>i{position:absolute;bottom:-3px;right:-3px;width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:#4e9677;color:#fffaf0}.journey-stop>i svg{width:12px;height:12px}
.lg-app .practice-garden-hub{min-height:0;overflow-y:auto;padding:4px 4px 14px}
.lg-app .practice-garden-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0}
.lg-app .practice-garden-choices button{min-width:0;min-height:190px;flex-direction:column;padding:8px;gap:6px}
.lg-app .practice-garden-choices button>svg,.lg-app .practice-garden-choices .practice-friend-picture{width:100%;height:124px;max-height:124px;flex:0 0 124px}
.lg-app .practice-garden-choices .practice-friend-picture>.practice-picture{width:100%;height:100%;max-height:none}
.lg-app .practice-garden-choices .practice-play{width:32px;height:32px}
@media(max-width:600px){
 .lg-app .practice-garden-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .lg-app .practice-garden-choices button{min-height:134px;padding:7px;gap:4px}
 .lg-app .practice-garden-choices button>svg,.lg-app .practice-garden-choices .practice-friend-picture{height:84px;max-height:84px;flex-basis:84px}
}
@media(max-height:650px){.lg-app .lg-stars .stars-stage{gap:8px}.lg-app .lg-stars .journey-route{height:36px}}

/* All pet parts share one 600×430 room, so their floor cannot drift on resize. */
@media(max-height:650px) and (orientation:portrait){
 .lg-app .pet-room .pet-hero{min-height:0;padding-top:26px}
 .pet-diorama{width:min(100%,300px)}
 .lg-app .pet-stage.pet-room{gap:6px}
}
@media(max-height:420px) and (min-width:500px){
 .lg-app .pet-room .pet-hero{padding:26px 0 0;min-height:0}
 .pet-diorama{width:min(100%,270px)}
 .pet-diorama>.room-floor{width:200vw}
}
.album-supply{display:flex;align-items:center;justify-content:center;gap:26px;flex:0 0 auto;width:100%;padding:0 8px 4px}
.lg-app .lg-album .album-stage{gap:16px}
.lg-app .lg-album .album-grid{background:linear-gradient(90deg,#e5dcc8 0,#fffaf0 5%,#fffdf7 50%,#fffaf0);border-color:#a89478;border-left-color:#c9bda4;padding:14px;gap:10px;box-sizing:border-box}
.lg-app .lg-album .album-slot{display:grid;place-items:center;aspect-ratio:1;min-width:0;padding:2px;background:#e5dcc8;border:1px dashed #c9bda4;border-radius:18px;box-shadow:none}
.lg-app .lg-album button.album-slot{background:#fffaf0;border:1px solid #c9bda4;box-shadow:0 3px 0 #e5dcc8,inset 0 2px 0 #fffdf7}
.lg-app .lg-album .album-slot .art-sticker{width:100%;height:100%;max-width:104px;max-height:104px}
.lg-app .lg-album span.album-slot .art-sticker{width:88%;height:88%}
.lg-app .lg-album .album-pack .pet-acc-cost{padding:6px 8px;background:#fffaf0;border-radius:14px;color:#70501b}

.meet-display{position:relative;isolation:isolate;display:grid;place-items:center;width:min(100%,540px);aspect-ratio:600 / 430;flex-shrink:0}
.lg-app .lg-meet .meet-display .meet-card{position:absolute;left:19%;bottom:8%;height:92%;width:62%;padding:0;display:grid;place-items:end center}
.lg-app .lg-meet .meet-display .meet-card .art-blob{width:100%;height:100%;max-height:none}
.lg-app .lg-meet .meet-display .meet-bud{position:absolute;left:calc(50% - 65px);bottom:8%}
@media(max-height:650px){.meet-display{max-width:350px}}
@media(max-height:420px) and (min-width:500px){.meet-display{max-width:320px}.lg-app .lg-meet .meet-stage{max-width:440px}.lg-app .lg-meet{overflow-y:auto}}

.lg-app .lg-meet .meet-display .meet-make{position:absolute;inset:auto 4% 12%;justify-content:center;align-items:flex-end}

/* Short screens put actions alongside the same proportional scene. */
@media(max-height:450px) and (orientation:landscape) {
 .lg-app:not(.lg-boat-adventure) :is(.lg-stars .stars-stage,.lg-party .party-stage){display:grid;grid-template-columns:minmax(0,1fr) 204px;grid-template-rows:36px 64px 64px;column-gap:12px;row-gap:8px;width:min(690px,100%);padding:4px;margin:auto;box-sizing:border-box}
 .lg-app:not(.lg-boat-adventure) :is(.lg-stars,.lg-party) .reward-scene{grid-column:1;grid-row:1 / 4;width:min(100%,400px,calc((100vh - 64px) * 600 / 430));height:auto;max-width:none;justify-self:center;align-self:center}
 .lg-app:not(.lg-boat-adventure) :is(.lg-stars,.lg-party) .journey-route{grid-column:2;grid-row:1}
 .lg-app:not(.lg-boat-adventure) .lg-party .party-capstone{grid-column:2;grid-row:1;margin:0}
 .lg-app:not(.lg-boat-adventure) :is(.lg-stars .stars-row,.lg-party .party-stars){grid-column:2;grid-row:2;justify-self:center}
 .lg-app:not(.lg-boat-adventure) :is(.lg-stars .stars-nav,.lg-party .party-actions){grid-column:2;grid-row:3;justify-content:center;gap:12px}
 .reward-scene>.room-floor{width:200vw;height:38vh}
}

.sticker-flight{position:fixed;z-index:80;pointer-events:none}
.sticker-flight svg{width:100%;height:100%;display:block}
.pack-friend{position:absolute;left:-14px;bottom:-10px;width:84px;pointer-events:none}

/* ---------- album tabs + My letters (2026-10-01) ---------- */
.album-tabs{display:flex;gap:10px;justify-content:center;flex:0 0 auto}
.album-tab{width:56px;height:46px;display:grid;place-items:center;border:2px solid #a89478;border-radius:16px 16px 12px 12px;background:#e5dcc8;color:#70501b;box-shadow:0 3px 0 #c9bda4;cursor:pointer}
.album-tab.is-on{background:#fffaf0;color:#4a3620;border-color:#4a3620;box-shadow:0 3px 0 #70501b}
.album-tab:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.book-pages{width:100%;max-width:560px;box-sizing:border-box;padding:10px 8px;display:grid;gap:12px;background:#fffaf0;border:2px solid #a89478;border-left:10px solid #c9bda4;border-radius:12px 24px 24px 12px}
.book-land{display:grid;gap:6px;padding:8px 8px 10px;border-radius:18px;background:#fffdf7;border:2px dashed #e5dcc8}
.book-land-head{display:flex;align-items:center;justify-content:space-between}
.book-land-sign svg{width:34px;height:34px;display:block}
.book-land-plant{width:34px}.book-land-plant svg{width:100%;display:block}
.book-letters{display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:6px;justify-items:center}
.book-letter{width:66px;padding:0;border:0;background:none;cursor:pointer;border-radius:16px}
.book-letter svg{display:block;width:66px;height:auto}
.book-letter:focus-visible{outline:4px solid var(--lg-focus);outline-offset:2px}
.book-letter.is-said{animation:book-said 520ms cubic-bezier(.3,1.6,.5,1)}
@keyframes book-said{40%{transform:translateY(-6px) scale(1.08)}100%{transform:none}}
.book-land.is-unopened{display:flex;align-items:center;gap:10px;border-style:dotted}
.book-seed svg{display:block}
.lg-reduce-motion .book-letter.is-said{animation:none}
@media(prefers-reduced-motion:reduce){.book-letter.is-said{animation:none}}

/* ---------- playroom toys (2026-10-01) ---------- */
.lg-app .pet-room .room-toy{position:absolute;z-index:3;padding:0;border:0;background:none;cursor:pointer;display:block}
.lg-app .pet-room .room-toy svg{display:block;width:100%;height:auto;overflow:visible}
.lg-app .pet-room .room-ball{left:4%;bottom:5%;width:17%;min-width:48px}
.lg-app .pet-room .room-drum{right:4%;bottom:5%;width:18%;min-width:50px}
.lg-app .pet-room .room-wand{left:7%;bottom:30%;width:12%;min-width:36px}
.lg-app .pet-room .room-toy:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px;border-radius:14px}
.room-ball.is-rolling .toy-ball{animation:toy-roll 1s cubic-bezier(.3,1.2,.5,1);transform-box:fill-box;transform-origin:50% 50%}
@keyframes toy-roll{0%{transform:none}35%{transform:translate(70%,-18%) rotate(200deg)}60%{transform:translate(110%,0) rotate(320deg)}100%{transform:none}}
.room-drum.is-beat .toy-drum{animation:toy-beat 260ms ease-out;transform-box:fill-box;transform-origin:50% 100%}
@keyframes toy-beat{40%{transform:scaleY(.86) scaleX(1.06)}100%{transform:none}}
.lg-app .pet-room .pet-big.is-dancing>:is(svg,.lg-animal){animation:pet-dance 1.2s ease-in-out;transform-origin:50% 100%}
@keyframes pet-dance{0%,100%{rotate:0deg;translate:0 0}20%{rotate:-8deg;translate:-4% -6%}40%{rotate:8deg;translate:4% 0}60%{rotate:-6deg;translate:-4% -5%}80%{rotate:5deg;translate:2% 0}}
.room-bubble{position:absolute;bottom:42%;z-index:4;width:12%;padding:0;border:0;background:none;cursor:pointer;animation:toy-bubble 5s ease-in-out both}
.room-bubble svg{display:block;width:100%;height:auto}
.room-bubble.is-popped{animation:toy-pop 240ms ease-out forwards}
@keyframes toy-bubble{0%{transform:translate(0,30px) scale(.4);opacity:0}10%{opacity:1}50%{transform:translate(var(--sway,10px),-90px) scale(1)}90%{opacity:1}100%{transform:translate(0,-190px) scale(1.05);opacity:0}}
@keyframes toy-pop{to{transform:scale(1.6);opacity:0}}
.lg-reduce-motion .room-ball.is-rolling .toy-ball,.lg-reduce-motion .room-drum.is-beat .toy-drum,.lg-reduce-motion .pet-room .pet-big.is-dancing>*{animation:none}
.lg-reduce-motion .room-bubble{animation:none;bottom:60%}
@media(prefers-reduced-motion:reduce){.room-ball.is-rolling .toy-ball,.room-drum.is-beat .toy-drum,.pet-room .pet-big.is-dancing{animation:none}.room-bubble{animation:none;bottom:60%}}

/* ---------- v4 Growing Friend: trick stage + performances ---------- */
.lg-app .pet-room .pet-trick-stage{display:grid;grid-template-columns:repeat(auto-fit,minmax(58px,1fr));gap:8px;padding:10px;background:#fffaf0;border:2px solid #a89478;border-radius:22px}
.pet-trick{aspect-ratio:1;min-width:52px;padding:6px;border:2px solid #4a3620;border-radius:16px;background:#fffdf7;box-shadow:0 3px 0 #70501b;cursor:pointer;display:grid;place-items:center}
.pet-trick svg{width:100%;height:100%}
.pet-trick.is-seed{border-color:#c9bda4;border-style:dashed;background:#e5dcc8;box-shadow:none}
.pet-trick:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.lg-app .pet-room .pet-big[class*="does-"]>:is(svg,.lg-animal){transform-origin:50% 100%}
.lg-app .pet-room .pet-big.does-spin>:is(svg,.lg-animal){animation:trick-spin 900ms ease-in-out}
.lg-app .pet-room .pet-big.does-hop>:is(svg,.lg-animal){animation:trick-hop 1100ms ease-out}
.lg-app .pet-room .pet-big.does-sway>:is(svg,.lg-animal){animation:pet-dance 1.2s ease-in-out}
.lg-app .pet-room .pet-big.does-sing>:is(svg,.lg-animal){animation:trick-sing 1.4s ease-in-out}
.lg-app .pet-room .pet-big.does-stretch>:is(svg,.lg-animal){animation:trick-stretch 1s cubic-bezier(.3,1.5,.5,1)}
.lg-app .pet-room .pet-big.does-juggle>:is(svg,.lg-animal){animation:trick-sing 1.4s ease-in-out}
.lg-app .pet-room .pet-big.does-roll>:is(svg,.lg-animal){animation:trick-roll 1s ease-in-out}
@keyframes trick-spin{50%{rotate:0deg;scale:-1 1}100%{scale:1 1}}
@keyframes trick-hop{0%,100%{translate:0 0}15%,48%,81%{translate:0 -14%}30%,64%{translate:0 0}}
@keyframes trick-sing{0%,100%{rotate:0deg}25%{rotate:-4deg}75%{rotate:4deg}}
@keyframes trick-stretch{0%,100%{scale:1 1}40%{scale:.9 1.18}70%{scale:1.08 .92}}
@keyframes trick-roll{0%{rotate:0deg;translate:0 0}50%{translate:0 -12%}100%{rotate:360deg;translate:0 0}}
.trick-fx{position:absolute;left:50%;top:18%;width:40%;height:40%;translate:-50% 0;pointer-events:none;z-index:4}
.trick-fx.is-sing i{position:absolute;bottom:0;width:16px;height:22px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 22'%3E%3Cpath d='M6 18V3L15 1V15' fill='none' stroke='%234a3620' stroke-width='2.4'/%3E%3Cellipse cx='4' cy='18' rx='4' ry='3' fill='%23b49fcf' stroke='%234a3620' stroke-width='1.6'/%3E%3C/svg%3E") center/contain no-repeat;animation:trick-note 1.6s ease-out forwards}
.trick-fx.is-sing i:nth-child(1){left:10%}.trick-fx.is-sing i:nth-child(2){left:45%;animation-delay:.25s}.trick-fx.is-sing i:nth-child(3){left:80%;animation-delay:.5s}
@keyframes trick-note{0%{opacity:0;transform:translateY(20px)}20%{opacity:1}100%{opacity:0;transform:translateY(-60px) rotate(14deg)}}
.trick-fx.is-juggle b{position:absolute;left:45%;bottom:0;width:16px;height:16px;border-radius:50%;border:2px solid #4a3620;animation:trick-ball 700ms ease-in-out 2 alternate}
.trick-fx.is-juggle b:nth-child(1){background:#ee806f}.trick-fx.is-juggle b:nth-child(2){background:#f3c955;animation-delay:.23s}.trick-fx.is-juggle b:nth-child(3){background:#62cdf4;animation-delay:.46s}
@keyframes trick-ball{0%{transform:translate(-40px,0)}50%{transform:translate(0,-70px)}100%{transform:translate(40px,0)}}
.lg-reduce-motion .trick-fx{display:none}
@media(prefers-reduced-motion:reduce){.trick-fx{display:none}}

/* ---------- v5 sticker stand: earn the choice (spec 02) ---------- */
.sticker-stand{width:min(380px,calc(100vw - 28px));box-sizing:border-box;padding:12px 14px 18px;border:3px solid #a89478;border-radius:32px;background:#fffaf0;box-shadow:0 8px 0 #c9bda4;display:grid;justify-items:center;gap:8px;overflow:visible;position:relative}
.sticker-stand::backdrop{background:#23253fb3}
.stand-roof svg{display:block}
.stand-shelf{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;padding:10px 8px;width:100%;box-sizing:border-box;background:#c69434;border:3px solid #4a3620;border-radius:18px;box-shadow:inset 0 3px 0 #ffe49a}
.stand-choice{padding:0;border:0;background:none;cursor:pointer;border-radius:50%;transition:transform 260ms cubic-bezier(.3,1.5,.5,1),opacity 260ms}
.stand-choice:hover{transform:translateY(-4px)}
.stand-choice:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.stand-choice svg{display:block}
.stand-choice.is-chosen{transform:translateY(-10px) scale(1.15)}
.stand-choice.is-passed{opacity:.35;transform:scale(.9)}
.stand-price{display:flex;align-items:center;gap:4px;padding:4px 12px;border-radius:14px;background:#fffdf7;border:2px solid #a89478;color:#70501b;font-weight:800}
.stand-close{position:absolute;right:-10px;top:-10px;width:46px;height:46px}
.album-stand.is-free .stand-gift{background:#ffe49a}
.lg-reduce-motion .stand-choice{transition:none}

/* ---------- v8 Quran Word Shelf ---------- */
.shelf-case{width:100%;max-width:560px;box-sizing:border-box;display:grid;gap:16px;padding:14px 10px;background:linear-gradient(#a89478,#70501b);border:3px solid #4a3620;border-radius:22px;box-shadow:0 6px 0 #4a3620}
.shelf-row{position:relative;display:grid;gap:0}
.shelf-words{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:0 4px 6px}
.shelf-board{display:block;height:12px;border-radius:4px;background:#c69434;border:2px solid #4a3620;box-shadow:0 4px 0 #2b1e12}
.shelf-word{position:relative;min-width:74px;min-height:58px;padding:6px 12px 10px;border:2px solid #4a3620;border-radius:12px 12px 6px 6px;background:#fffaf0;box-shadow:0 3px 0 #c9bda4;font:30px/1.6 "Amiri Quran",serif;color:#4a3620;cursor:pointer}
.shelf-word .shelf-glint{position:absolute;top:-8px;left:-8px;width:18px;height:18px}
.shelf-word:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.shelf-word.is-heard{animation:book-said 520ms cubic-bezier(.3,1.6,.5,1);background:#ffe49a}
.lg-reduce-motion .shelf-word.is-heard{animation:none}

/* ---------- v15 Ayah Garden ---------- */
.ayah-doors{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:100%;max-width:560px}
.ayah-door{padding:4px 14px 10px;border:3px solid #4a3620;border-radius:22px 22px 10px 10px;background:linear-gradient(#ffe49a,#f3c955);box-shadow:0 4px 0 #70501b;font:24px/1.7 "Amiri Quran",serif;color:#4a3620;cursor:pointer}
.ayah-door:focus-visible,.ayah-word:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.ayah-stage{position:relative;display:grid;justify-items:center;gap:12px;width:min(100%,640px);margin:auto;padding:6px 4px 24px}
.ayah-title{padding:2px 22px 10px;border:3px solid #4a3620;border-radius:999px;background:#fffaf0;font:30px/1.6 "Amiri Quran",serif;color:#4a3620;box-shadow:0 4px 0 #c9bda4}
.ayah-dots{display:flex;gap:8px}
.ayah-dots i{width:12px;height:12px;border-radius:50%;border:2px solid #4a3620;background:#e5dcc8}
.ayah-dots i.is-on{background:#f3c955;transform:scale(1.25)}.ayah-dots i.is-done{background:#7fce54}
.ayah-words{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%;box-sizing:border-box;padding:16px 10px;background:#fffaf0;border:3px solid #a89478;border-radius:24px}
.ayah-word{padding:4px 14px 14px;border:2px solid #c9bda4;border-radius:16px;background:#fffdf7;font:38px/1.9 "Amiri Quran",serif;color:#4a3620;cursor:pointer;transition:background 200ms,transform 200ms}
.ayah-word.is-read{background:#ccfbef;border-color:#62cdf4}
.ayah-word.is-reading{background:#ffe49a;border-color:#4a3620;transform:translateY(-4px) scale(1.06);box-shadow:0 4px 0 #70501b}
/* Arabic reads right to left: the previous ayah is on the right, the next on the left. */
.ayah-controls{display:flex;align-items:center;gap:16px;direction:rtl}
.ayah-controls .ayah-next svg{transform:scaleX(-1)}
.ayah-friend{position:absolute;left:2px;top:0;width:60px;pointer-events:none}
.ayah-controls button:disabled{opacity:.35;box-shadow:none}
.lg-reduce-motion .ayah-word{transition:none}

/* ---------- v16 Letter Constellations ---------- */
.star-chart{width:100%;max-width:520px;height:auto;border:3px solid #4a3620;border-radius:30px;box-shadow:0 6px 0 #4a3620}
.chart-star{cursor:pointer;outline:none}
.chart-star:focus-visible path{stroke:#e8743c;stroke-width:3}
.chart-star.is-bright{animation:chart-glow 3.6s ease-in-out infinite alternate}
.chart-star.is-twinkle path{transform-box:fill-box;transform-origin:50% 50%;animation:chart-twinkle 520ms cubic-bezier(.3,1.6,.5,1)}
@keyframes chart-glow{from{opacity:.86}to{opacity:1}}
@keyframes chart-twinkle{40%{transform:scale(1.4) rotate(20deg)}100%{transform:none}}
.lg-reduce-motion .chart-star,.lg-reduce-motion .chart-star path{animation:none!important}

/* ---------- v19 Quran Treasury ---------- */
.album-slot.is-treasury{position:relative}
.album-slot .treasury-glint{position:absolute;top:2px;right:2px;width:20px;height:20px;pointer-events:none}
.treasury-plaque{display:grid;justify-items:center;gap:2px;margin:0 auto 12px;padding:6px 22px 10px;border:3px solid #70501b;border-radius:18px;background:linear-gradient(#ffe49a,#f3c955);box-shadow:0 4px 0 #70501b,inset 0 2px 0 #fffdf7;color:#4a3620;cursor:pointer}
.treasury-word{font:40px/1.8 "Amiri Quran",serif}
.treasury-ref{font:16px/1.4 "Amiri Quran",serif;color:#70501b}
.treasury-plaque svg{width:22px;height:22px}
.treasury-plaque.is-heard{animation:book-said 520ms cubic-bezier(.3,1.6,.5,1)}
.treasury-plaque:focus-visible{outline:4px solid var(--lg-focus);outline-offset:3px}
.lg-reduce-motion .treasury-plaque.is-heard{animation:none}
