/* Game-owned HUD. Protected platform UI is owned only by shared/header.js. */
.game{--animal-board-height:clamp(256px,calc(var(--pde-scene-h,895px) - 460px),365px)}
.level-row{left:127px;top:235px;width:160px;height:29px;font-size:19px;color:#714119;z-index:3;font-weight:700}
.level-row i{display:none}
.hud{left:17px;top:261px;width:380px;height:78px;border:0;border-radius:0;background:none;box-shadow:none;isolation:isolate;overflow:visible}
.hud::before{content:"";position:absolute;left:0;top:-42px;width:380px;height:126.667px;background:url('assets/wood-hud-v21.png') center/100% 100% no-repeat;z-index:-1;opacity:1;pointer-events:none}
.hud::after{display:none}
.collect-title{left:110px;top:6px;height:19px;font-size:13px;line-height:19px;color:#8b6037}
.goals .goal{top:29px;height:38px;width:70px}
.goals .goal .animal{left:0;top:0;width:38px;height:38px;object-fit:contain}
.goals .goal .animal:is(.fox,.bear,.frog,.cat){width:36px;height:40px;top:-1px;object-fit:fill}
.goals .goal b{left:36px;top:4px;width:30px;height:30px;font:700 23px/30px "PingFang SC",sans-serif;color:#714119;transform:translateY(-1px)}
.moves-wrap{left:0;top:0;width:93px;height:78px;border:0}
.moves-wrap .hud-label{top:6px;width:93px;height:21px;font:700 15px/21px "PingFang SC",sans-serif;color:#714119}
.moves-wrap strong{top:24px;width:93px;height:42px;font:700 37px/42px "PingFang SC",sans-serif;color:#895023;transform:translateY(-1px)}
.board-frame{top:365px;height:var(--animal-board-height);border:2px solid #8fbc4d;box-shadow:inset 0 2px 5px #264c2280,0 4px 0 #4a782a,0 7px 9px #2b551e33}
.tools{top:calc(365px + var(--animal-board-height) + 28px)}
.tools .tool{border:1.5px solid #bd944b;background:linear-gradient(135deg,#fffceb,#f8e8bc);box-shadow:inset 0 2px 1px #fffef1,inset 0 -3px 2px #d7b575,0 4px 0 #9a783d,0 7px 6px #36613540}
.tools .tool:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px 1px #fffef1,inset 0 -2px 2px #d7b575,0 2px 0 #9a783d,0 4px 4px #36613540}
.tools #pause{filter:drop-shadow(0 3px 1px #8d64286b)}
/* One expression for one cascade; no second COMBO/CASCADE label stack. */
#praise{left:42px;top:340px;width:330px;height:75px;flex-direction:row;gap:5px;filter:drop-shadow(0 2px 2px #77501733)}
.praise-word{width:auto;max-width:245px;height:47px}.praise-word .art-word-image{max-width:245px;max-height:47px}
.praise-count{font-size:27px;height:30px;flex:none}.praise-count .art-glyph{height:30px}
#praise[data-tier="1"]{filter:drop-shadow(0 2px 2px #77501733)}
#praise[data-tier="4"],#praise[data-tier="5"],#praise[data-tier="6"]{filter:drop-shadow(0 2px 2px #77501733) drop-shadow(0 0 8px #fff39b)}
@media(prefers-reduced-motion:reduce){#praise.visible{opacity:1}}

/* v22: align content to the usable face, leaving room for the bevel. */
.collect-title{left:110px;top:12px;height:17px;font-size:12px;line-height:17px}
.goals .goal{top:33px;height:30px;width:70px}
.goals .goal .animal{top:0;width:30px;height:30px;object-fit:contain}
.goals .goal .animal:is(.fox,.bear,.frog,.cat){top:-1px;width:29px;height:32px;object-fit:fill}
.goals .goal b{left:33px;top:0;width:30px;height:30px;font-size:21px;line-height:30px;transform:none}
.moves-wrap .hud-label{top:12px;height:19px;font-size:14px;line-height:19px}
.moves-wrap strong{top:31px;height:34px;font-size:32px;line-height:34px;transform:none}
.tools{gap:18px}
.tools .tool,.tools #shuffle{width:144px;height:54px;padding:0 15px 4px;gap:9px;align-items:center;justify-content:center;border:0;border-radius:0;background:url('assets/wood-button-v22.png') center/100% 100% no-repeat;box-shadow:none;font-size:23px;line-height:30px;color:#714119;filter:drop-shadow(0 3px 2px #39582135)}
.tools .tool>span{transform:none;flex:none;line-height:30px}
.tools .tool>img{width:29px;height:32px;flex:none;object-fit:contain}
.tools #shuffle>img{width:34px;height:29px}
.tools .tool:active:not(:disabled){transform:translateY(2px);box-shadow:none;filter:brightness(.97)}
.tools .tool b{right:-2px;top:-8px;width:29px;height:29px;font-size:20px;line-height:27px}

/* v23: native-ratio art, soft sculpted tool icons, wider board gutters. */
.game{--animal-board-height:clamp(256px,calc(var(--pde-scene-h,895px) - 480px),340px)}
.hud{left:24px;top:261px;width:366px;height:78px}
.hud::before{top:-42px;width:366px;height:122px;background-image:url('assets/wood-hud-v23.webp');background-size:contain}
.level-row{top:229px;font-size:18px}
.collect-title{display:none}
.goals .goal{top:19px;transform:translateX(-10px);height:40px}
.goals .goal .animal{width:36px;height:40px;object-fit:contain}
.goals .goal .animal:is(.fox,.bear,.frog,.cat){width:34px;height:40px;top:0;object-fit:contain}
.goals .goal b{left:36px;top:5px;font-size:22px}
.moves-wrap{width:83px}.moves-wrap .hud-label{top:8px;width:83px}.moves-wrap strong{top:29px;width:83px;font-size:31px}
.board-frame{left:30px;width:354px;top:359px}
.tools{left:25px;top:calc(359px + var(--animal-board-height) + 30px);gap:18px}
.tools .tool,.tools #shuffle{width:132px;height:44px;background-size:contain;padding:0 12px 3px;gap:5px;font-size:21px}
.tools .tool>img{width:34px;height:34px;background:url('assets/tools-3d-v23.png') left center/300% 100% no-repeat}
.tools #shuffle>img{width:34px;height:34px;background-position:center}
.tools #pause{width:50px;height:50px;filter:none}
.tools #pause img{width:50px;height:50px;background:url('assets/tools-3d-v23.png') right center/300% 100% no-repeat}

/* v24: reference-style goal portraits and roomy rounded rectangular controls. */
.goals .goal .animal.goal-portrait{width:44px;height:44px;top:-2px;left:-3px;background:url('assets/goal-portraits-v24.webp') var(--portrait-position) center/300% 100% no-repeat;object-fit:contain}
.goals .goal b{left:39px;top:5px;font-size:21px}
.tools{left:23px;gap:14px}
.tools .tool,.tools #shuffle{width:140px;height:58px;border:3px solid #bc8a43;border-radius:13px;background:linear-gradient(145deg,#fffcef,#f6e6c0);box-shadow:inset 0 2px 0 #fffdf3,inset 0 -3px 0 #e0bd80,0 4px 0 #906132,0 6px 5px #43622540;padding:0 13px 3px;gap:8px;font-size:21px;line-height:28px}
.tools .tool>span{line-height:28px}
.tools .tool:active:not(:disabled){box-shadow:inset 0 2px 0 #fffdf3,inset 0 -3px 0 #e0bd80,0 2px 0 #906132;transform:translateY(2px)}

/* v25: center the two-line count inside the inset face, excluding its rim. */
.moves-wrap{left:8px;top:7px;width:76px;height:53px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:0}
.moves-wrap .hud-label{position:static;width:100%;height:18px;font-size:14px;line-height:18px;text-align:center}
.moves-wrap strong{position:static;width:100%;height:30px;font-size:29px;line-height:30px;text-align:center;transform:none;-webkit-text-stroke:0;font-variant-numeric:tabular-nums}

/* v26: match the HUD's painted wood rim; icons have no ground shadows. */
.tools .tool,.tools #shuffle{background:url('assets/wood-button-v26.webp') center/contain no-repeat;border:0;border-radius:13px;box-shadow:none;filter:none;padding:0 13px 1px}
.tools .tool:active:not(:disabled){box-shadow:none;filter:brightness(.97)}
.tools .tool>img,.tools #pause img{background-image:url('assets/tools-no-shadow-v26.webp');filter:none;box-shadow:none}
.tools #pause{filter:none;box-shadow:none}

/* v28: enlarge the title 5.6%, retaining its center. */
h1{left:17px;top:138px;width:380px;height:76px}

/* v29: align all target subjects to the inset face center (HUD y=34). */
.goals .goal{top:6px;height:56px;width:76px;display:flex;align-items:center;gap:0}
.goals .goal .animal,.goals .goal .animal:is(.fox,.bear,.frog,.cat){position:static;width:48px;height:48px;flex:none;object-fit:contain}
.goals .goal .animal.goal-portrait{position:static;left:auto;top:auto;width:56px;height:56px;flex:none;background-size:300% 100%;background-position:var(--portrait-position) center}
.goals .goal b{position:static;left:auto;top:auto;width:24px;height:32px;flex:none;display:grid;place-items:center;font-size:21px;line-height:32px;transform:none;margin-left:-1px}

/* v30: title +15% from v28, retaining its center. */
h1{left:-11.5px;top:132.3px;width:437px;height:87.4px}

/* v31: size by artwork ratio, not a too-short contain box. */
h1{left:17px;top:123px;width:380px;height:105px}
.goals .goal{top:5px;height:56px}

/* v34: all six targets use the exact same assets as their board counterparts. */
.goals .goal .animal,.goals .goal .animal:is(.fox,.bear,.frog,.cat){width:48px;height:48px;object-fit:contain}
.challenge-return{width:156px;height:65px;padding:0 14px 2px;display:grid;place-items:center;border:0;border-radius:13px;background:url('assets/wood-button-v26.webp') center/contain no-repeat;box-shadow:none;color:#714119;font:700 22px/28px "PingFang SC",sans-serif;white-space:nowrap}
.challenge-return:active{filter:brightness(.96)}

/* Circle and digit scale together in one coordinate system. */
.tools .tool #shuffle-count {
  width: 29px; height: 29px; padding: 0; border: 0;
  background: none; box-shadow: none; pointer-events: none;
}
#shuffle-count svg { display: block; width: 100%; height: 100%; }
#shuffle-count g > * { display: none; }
#shuffle-count[data-count="0"] .digit-0,
#shuffle-count[data-count="1"] .digit-1,
#shuffle-count[data-count="2"] .digit-2 { display: inline; }
