/* Common header and account design used by home and the game-page template. */
.forest-top[hidden]{display:none!important}
body:not(.forest-page) #sticky-downloads.forest-top{position:fixed;inset:0 0 auto;z-index:90;zoom:1.25}

body .side-account-action{font-family:'Microsoft JhengHei',sans-serif;font-weight:900;line-height:1.1}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{width:clamp(200px,12vw,275px)}body:not(.forest-page) .side-account-action{font-size:clamp(28.75px,2.625vw,45px)!important}}
@media(max-width:1100px){body:not(.forest-page) #doll-showcase>.side-account-panel,body:not(.forest-page) main>.side-account-panel{width:auto}body:not(.forest-page) main>.side-account-panel .side-account-action{width:min(32.5vw,162.5px);font-size:clamp(25px,5vw,35px)!important}}
.forest-top{font-family:'Microsoft JhengHei',sans-serif}
.forest-top-grid .download-card{aspect-ratio:auto}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{width:clamp(200px,15vw,275px)}}

.forest-top-grid .download-card .download-copy{font-size:inherit!important;line-height:inherit;font-family:inherit;font-weight:inherit;color:inherit;text-shadow:inherit;-webkit-text-stroke:0}
/* The public header uses one consistent button treatment on every page. */
.forest-top .forest-top-grid .download-card,.forest-top .forest-top-grid .download-card:hover{background:linear-gradient(180deg,#405264,#17232f 44%,#080d14 55%,#141e29)!important}
.forest-top .forest-top-grid .download-card::before,.forest-top .forest-top-grid .download-card::after{display:none!important;content:none!important}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel,body:not(.forest-page) .utility-rail{top:clamp(150px,50vh,calc(125vh - 575px))}body.forest-page .side-account-panel,body.forest-page .utility-rail{top:clamp(120px,40vh,calc(100vh - 460px))}}
/* Randomized falling coins remain behind page content at the two sides. */
@keyframes shared-coin-rain{0%{transform:translate(0,-3vh) rotate(-35deg) scale(.78);opacity:0}8%{opacity:.8}48%{transform:translate(var(--coin-wobble),55vh) rotate(100deg) scale(.95);opacity:.85}90%{opacity:.75}100%{transform:translate(var(--coin-drift),118vh) rotate(220deg) scale(.82);opacity:0}}
body .flying-coin{animation-name:shared-coin-rain!important;animation-duration:var(--coin-duration,6s)!important;animation-timing-function:linear!important}
@media(prefers-reduced-motion:reduce){body .flying-coin{animation:none!important;opacity:.4}}

@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{width:clamp(160px,10vw,187.5px);top:clamp(137.5px,20vh,200px)}body:not(.forest-page) .side-account-action{font-size:clamp(21px,1.8vw,30px)!important}body.forest-page .side-account-panel{width:clamp(128px,8vw,150px);top:clamp(110px,16vh,160px);left:max(8px,calc((100vw - min(1120px,100vw - 380px))/2 - clamp(128px,8vw,150px) - 12px))}body.forest-page .side-account-action{font-size:clamp(17px,1.45vw,24px)}}
body .coin-field .flying-coin{background:url("../../images/doremi-coin.png") center/contain no-repeat!important;border:0!important;box-shadow:none!important}body .coin-field .flying-coin::after{display:none!important}
#downloads .download-card{display:flex;align-items:center;justify-content:center;gap:8px}#downloads .download-card:not(.recharge-v2) .download-icon{position:static;flex:0 0 clamp(28px,3vw,48px);width:clamp(28px,3vw,48px);height:clamp(28px,3vw,48px);max-height:none}#downloads .download-card .download-copy{flex:0 1 auto;width:auto;margin:0;text-align:center}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{width:clamp(145px,8vw,150px);top:125px}body.forest-page .side-account-panel{width:clamp(116px,6.4vw,120px);top:100px;left:max(8px,calc((100vw - min(1120px,100vw - 380px))/2 - clamp(116px,6.4vw,120px) - 12px))}}
@media(max-width:1100px){body .side-account-action,body .side-account-action.side-recharge{padding:8px}body .side-account-action span{white-space:nowrap}body .side-account-action .side-action-icon{width:32%;height:auto;max-height:34%}}
/* Fixed treasure replaces the falling coins. */
body .coin-field{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.treasure-pile{position:absolute;left:max(8px,calc(50% - 700px));bottom:3%;width:clamp(160px,15vw,240px);aspect-ratio:2.5/1;background:url('../../images/treasure-pile-v50.png') center/contain no-repeat;filter:drop-shadow(0 0 9px #ffbf4577);animation:treasure-glow 3s ease-in-out infinite alternate}
body:not(.forest-page) .treasure-pile{left:max(10px,calc(50% - 875px));width:clamp(200px,18.75vw,300px)}
.treasure-pile i{position:absolute;width:18px;height:18px;background:radial-gradient(circle,#fff 0 8%,#fff9a8 10%,#ffdd4677 32%,transparent 70%);filter:drop-shadow(0 0 6px #fff8a1);animation:treasure-sparkle 2.6s ease-in-out infinite}
.treasure-pile i:after{content:'✦';position:absolute;inset:-7px;color:#fff8bd;text-align:center;font-size:27px;line-height:27px}.treasure-pile i:nth-child(1){left:23%;top:28%}.treasure-pile i:nth-child(2){left:52%;top:6%;animation-delay:.8s}.treasure-pile i:nth-child(3){left:76%;top:39%;animation-delay:1.6s}
@keyframes treasure-glow{from{filter:drop-shadow(0 0 5px #ffbb4455) brightness(1)}to{filter:drop-shadow(0 0 14px #ffd650aa) brightness(1.13)}}
@keyframes treasure-sparkle{0%,100%{opacity:.15;transform:scale(.45) rotate(0deg)}45%{opacity:1;transform:scale(1.15) rotate(35deg)}}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{top:187.5px}body.forest-page .side-account-panel{top:150px}}
@media(max-width:1100px){.coin-field .treasure-pile{display:none}}
@media(prefers-reduced-motion:reduce){.treasure-pile,.treasure-pile i{animation:none}}
@media(min-width:1101px){.treasure-pile{left:max(8px,calc(50% - 825px))}body:not(.forest-page) .treasure-pile{left:max(10px,calc(50% - 1000px))}}
/* Taller heaps on both sides, with the character foreground restored above them. */
@media(min-width:1101px){
 body .coin-field .treasure-pile,body:not(.forest-page) .coin-field .treasure-pile{left:auto;right:auto;bottom:0;width:clamp(250px,23vw,390px);aspect-ratio:1.05/1;background:none;animation:treasure-glow-strong 2.1s ease-in-out infinite alternate;z-index:0}
 body .coin-field .treasure-left{left:max(-55px,calc(50% - 790px))}body .coin-field .treasure-right{right:max(-55px,calc(50% - 790px))}
 body:not(.forest-page) .coin-field .treasure-left{left:max(-69px,calc(50% - 988px))}body:not(.forest-page) .coin-field .treasure-right{right:max(-69px,calc(50% - 988px))}
 .treasure-layer{position:absolute;width:100%;height:42%;background:url('../../images/treasure-pile-v50.png') center/contain no-repeat}.layer-back{bottom:38%;width:75%;left:15%;filter:brightness(.83)}.layer-middle{bottom:20%;width:90%;left:6%;filter:brightness(.94)}.layer-front{bottom:2%}
 .treasure-foreground{position:absolute;inset:0;z-index:1;background:linear-gradient(#318bd017,#318bd017),url('../../images/optimized-v149/playland-background-wide.webp') center top/cover fixed no-repeat;pointer-events:none}
 .foreground-left{clip-path:polygon(0 61%,11% 61%,12% 69%,13.8% 79%,13% 89%,13.5% 100%,0 100%)}
 .foreground-right{clip-path:polygon(100% 61%,89% 61%,88% 69%,86.2% 79%,87% 89%,86.5% 100%,100% 100%)}
 .treasure-pile i{z-index:2;width:28px;height:28px;background:radial-gradient(circle,#fff 0 8%,#fff9a8 13%,#ffd045aa 38%,transparent 74%);filter:drop-shadow(0 0 11px #fff5a0);animation:treasure-sparkle-strong 1.9s ease-in-out infinite}
 .treasure-pile i:after{inset:-10px;font-size:43px;line-height:43px}.treasure-pile i:nth-of-type(1){left:20%;top:46%}.treasure-pile i:nth-of-type(2){left:50%;top:24%;animation-delay:.4s}.treasure-pile i:nth-of-type(3){left:72%;top:51%;animation-delay:.8s}.treasure-pile i:nth-of-type(4){left:35%;top:68%;animation-delay:1.2s}.treasure-pile i:nth-of-type(5){left:82%;top:74%;animation-delay:1.6s}.treasure-pile i:nth-of-type(6){left:59%;top:82%;animation-delay:.2s}
}
@keyframes treasure-glow-strong{from{filter:drop-shadow(0 0 7px #ffb33288) brightness(.97)}to{filter:drop-shadow(0 0 23px #ffde57ee) brightness(1.27)}}
@keyframes treasure-sparkle-strong{0%,100%{opacity:.15;transform:scale(.35) rotate(0deg)}40%{opacity:1;transform:scale(1.4) rotate(40deg)}}
@media(prefers-reduced-motion:reduce){body .coin-field .treasure-pile,.treasure-pile i{animation:none!important}}
@media(min-width:1101px) and (max-width:1600px){.foreground-left{clip-path:polygon(0 61%,7% 61%,8% 69%,9.5% 79%,9% 89%,9% 100%,0 100%)}.foreground-right{clip-path:polygon(100% 61%,93% 61%,92% 69%,90.5% 79%,91% 89%,91% 100%,100% 100%)}}
/* Brighter gold and larger, more frequent flashes on both treasure heaps. */
@media(min-width:1101px){
 .treasure-pile i{width:38px;height:38px;background:radial-gradient(circle,#fff 0 12%,#fffddd 15%,#ffe677cc 34%,#ffb90066 55%,transparent 75%);filter:drop-shadow(0 0 16px #fff2a0);animation:treasure-sparkle-v52 1.55s ease-in-out infinite}
 .treasure-pile i:after{content:'✦';inset:-13px;font-size:58px;line-height:58px;color:#fffce3;text-shadow:0 0 8px #fff,0 0 20px #ffca2b}
 body .coin-field .treasure-pile{animation:treasure-glow-v52 1.9s ease-in-out infinite alternate}
}
@keyframes treasure-sparkle-v52{0%,100%{opacity:.18;transform:scale(.45) rotate(-18deg)}35%{opacity:1;transform:scale(1.4) rotate(25deg)}55%{opacity:.85;transform:scale(1.1) rotate(40deg)}}
@keyframes treasure-glow-v52{from{filter:drop-shadow(0 0 7px #ffb33299) brightness(1)}to{filter:drop-shadow(0 0 25px #ffda48f5) brightness(1.25)}}
@media(prefers-reduced-motion:reduce){body .coin-field .treasure-pile,.treasure-pile i{animation:none!important}}
@media(min-width:1101px) and (max-width:1600px){.foreground-left{clip-path:polygon(0 61%,7% 61%,9% 69%,9% 77%,6% 87%,5% 100%,0 100%)}.foreground-right{clip-path:polygon(100% 61%,93% 61%,91% 69%,91% 77%,94% 87%,95% 100%,100% 100%)}}
/* Right-side sapphire and blossom accent in place of the coin heap. */
.jewel-decoration{display:none}
@media(min-width:1101px){.jewel-decoration{display:block;position:absolute;right:8px;bottom:1%;width:clamp(180px,18vw,300px);aspect-ratio:1/1;background:url('../../images/sapphire-blossom-v53.png') center/contain no-repeat;z-index:0;filter:drop-shadow(0 0 12px #5fd9ff99);animation:jewel-glow 3s ease-in-out infinite alternate}.jewel-decoration i{position:absolute;width:22px;height:22px;border-radius:50%;background:radial-gradient(circle,#fff 0 12%,#cfffff 20%,#8bdcff99 42%,transparent 70%);animation:jewel-sparkle 2.5s ease-in-out infinite}.jewel-decoration i:after{content:'✦';position:absolute;inset:-8px;text-align:center;font-size:30px;line-height:30px;color:#fff;text-shadow:0 0 12px #86eaff}.jewel-decoration i:nth-child(1){top:26%;left:23%}.jewel-decoration i:nth-child(2){top:14%;left:64%;animation-delay:.7s}.jewel-decoration i:nth-child(3){top:59%;left:76%;animation-delay:1.3s}.jewel-decoration i:nth-child(4){top:72%;left:30%;animation-delay:1.8s}}
@keyframes jewel-glow{from{filter:drop-shadow(0 0 7px #58cbff77)}to{filter:drop-shadow(0 0 19px #9cf4ffc9)}}@keyframes jewel-sparkle{0%,100%{opacity:.15;transform:scale(.4)}45%{opacity:1;transform:scale(1.15)}}
@media(prefers-reduced-motion:reduce){.jewel-decoration,.jewel-decoration i{animation:none!important}}
@media(min-width:1101px){.jewel-decoration{width:clamp(240px,25vw,390px);animation:jewel-glow-v54 2.2s ease-in-out infinite alternate}.jewel-decoration i{width:35px;height:35px;background:radial-gradient(circle,#fff 0 13%,#eeffff 18%,#80eaffdd 38%,#48bffb66 56%,transparent 75%);filter:drop-shadow(0 0 12px #e0ffff);animation:jewel-sparkle-v54 1.7s ease-in-out infinite}.jewel-decoration i:after{inset:-13px;font-size:50px;line-height:50px;text-shadow:0 0 8px #fff,0 0 20px #5bdfff}}
@keyframes jewel-glow-v54{from{filter:drop-shadow(0 0 9px #58cbff99) brightness(1)}to{filter:drop-shadow(0 0 22px #9cf4ffeb) brightness(1.18)}}
@keyframes jewel-sparkle-v54{0%,100%{opacity:.2;transform:scale(.42) rotate(-15deg)}40%{opacity:1;transform:scale(1.35) rotate(25deg)}}
@media(prefers-reduced-motion:reduce){.jewel-decoration,.jewel-decoration i{animation:none!important}}
/* A continuous illuminated bed of gold runs behind the central content and characters. */
.treasure-ribbon{display:none}
@media(min-width:1101px){.treasure-ribbon{position:absolute;display:block;left:0;right:0;bottom:0;height:clamp(150px,20vh,220px);background:url('../../images/optimized-v149/treasure-ribbon-v55.webp') center bottom/auto 100% repeat-x;filter:drop-shadow(0 0 10px #ffbc3888);z-index:0;animation:ribbon-glow 2.4s ease-in-out infinite alternate}.treasure-ribbon i{position:absolute;width:40px;height:40px;background:radial-gradient(circle,#fff 0 12%,#fffddd 17%,#ffe677cc 35%,transparent 72%);animation:ribbon-sparkle 1.8s ease-in-out infinite}.treasure-ribbon i:after{content:'✦';position:absolute;inset:-10px;color:#fffde4;font-size:46px;line-height:46px;text-align:center;text-shadow:0 0 9px #fff,0 0 18px #ffcb32}.treasure-ribbon i:nth-child(1){left:10%;top:17%}.treasure-ribbon i:nth-child(2){left:17%;top:49%;animation-delay:.4s}.treasure-ribbon i:nth-child(3){left:25%;top:25%;animation-delay:.8s}.treasure-ribbon i:nth-child(4){right:10%;top:17%;animation-delay:.5s}.treasure-ribbon i:nth-child(5){right:17%;top:49%;animation-delay:1s}.treasure-ribbon i:nth-child(6){right:25%;top:25%;animation-delay:1.5s}}
@keyframes ribbon-glow{from{filter:drop-shadow(0 0 7px #ffb53888) brightness(1)}to{filter:drop-shadow(0 0 20px #ffdc4ddd) brightness(1.18)}}@keyframes ribbon-sparkle{0%,100%{opacity:.2;transform:scale(.4)}40%{opacity:1;transform:scale(1.25)}}
@media(prefers-reduced-motion:reduce){.treasure-ribbon,.treasure-ribbon i{animation:none!important}}
@media(min-width:1101px){.treasure-ribbon{height:clamp(225px,32vh,320px)}}
/* Raised continuous gold, with its opaque base aligned to the viewport edge. */
@media(min-width:1101px){.treasure-ribbon{--ribbon-height:clamp(310px,46vh,460px);height:var(--ribbon-height);background-position:center calc(100% + var(--ribbon-height)*.17);animation:ribbon-glow-v56 1.7s ease-in-out infinite alternate}.treasure-ribbon i{width:52px;height:52px;background:radial-gradient(circle,#fff 0 11%,#fffce3 16%,#ffe56ddd 35%,#ffb70077 54%,transparent 73%);filter:drop-shadow(0 0 13px #fff2a0);animation:ribbon-sparkle-v56 1.45s ease-in-out infinite}.treasure-ribbon i:after{inset:-13px;font-size:60px;line-height:60px;text-shadow:0 0 10px #fff,0 0 23px #ffd026}}
@keyframes ribbon-glow-v56{from{filter:drop-shadow(0 0 9px #ffb53899) brightness(1)}to{filter:drop-shadow(0 0 25px #ffdf56f0) brightness(1.23)}}
@keyframes ribbon-sparkle-v56{0%,100%{opacity:.2;transform:scale(.4) rotate(-15deg)}35%{opacity:1;transform:scale(1.45) rotate(25deg)}55%{opacity:.85;transform:scale(1.1) rotate(40deg)}}
@media(prefers-reduced-motion:reduce){.treasure-ribbon,.treasure-ribbon i{animation:none!important}}
/* Show one continuous illustration across the viewport, with distinct left and right details. */
@media(min-width:1101px){.treasure-ribbon{background-repeat:no-repeat;background-size:100% auto;background-position:center calc(100% + 5.667vw)}}
@media(min-width:1101px){.treasure-ribbon{background-size:auto 100%;background-position:left calc(100% + var(--ribbon-height)*.17)}.treasure-ribbon::before{content:"";position:absolute;inset:0 0 0 50%;background:url('../../images/optimized-v149/treasure-right-v57.webp') right bottom/auto 100% no-repeat;pointer-events:none}.treasure-ribbon i{z-index:1}}
/* Keep sparkles close to the content edges, away from character silhouettes. */
@media(min-width:1101px){.treasure-ribbon i:nth-child(1){left:calc(var(--safe-left,200px) - 58px);right:auto;top:52%}.treasure-ribbon i:nth-child(2){left:calc(var(--safe-left,200px) - 58px);right:auto;top:78%}.treasure-ribbon i:nth-child(3),.treasure-ribbon i:nth-child(6){display:none}.treasure-ribbon i:nth-child(4){left:auto;right:calc(var(--safe-right,200px) - 58px);top:52%}.treasure-ribbon i:nth-child(5){left:auto;right:calc(var(--safe-right,200px) - 58px);top:78%}}
@media(min-width:1101px) and (max-width:1600px){.treasure-ribbon i{width:28px;height:28px}.treasure-ribbon i:after{font-size:34px;line-height:34px;inset:-5px}.treasure-ribbon i:nth-child(1),.treasure-ribbon i:nth-child(2){left:calc(var(--safe-left,190px) - 32px)}.treasure-ribbon i:nth-child(4),.treasure-ribbon i:nth-child(5){right:calc(var(--safe-right,190px) - 32px)}}
/* The common game-page board uses the homepage panel color and border. */
body.forest-page .rule-card{background:#1a6295;border:1px solid #65bce9;box-shadow:0 8px 24px #00172c99}

/* Same physical content width as the home page. */
body.forest-page .rule-card{width:min(calc(80vw - 22.4px),calc(44.8vw + 244.8px));max-width:none}
@media(min-width:1101px){.treasure-ribbon{background-size:max(60%,calc(var(--ribbon-height) * 3)) 100%}.treasure-ribbon::before{mask-image:linear-gradient(to right,transparent,#000 24%);-webkit-mask-image:linear-gradient(to right,transparent,#000 24%)}}

/* Preserve the character artwork as one uninterrupted background. */
@media(min-width:1101px){.treasure-foreground{display:none}.treasure-ribbon{mask-image:linear-gradient(to right,transparent 0%,transparent 10%,#000 16%,#000 84%,transparent 90%,transparent 100%);-webkit-mask-image:linear-gradient(to right,transparent 0%,transparent 10%,#000 16%,#000 84%,transparent 90%,transparent 100%)}}

/* A stable borderless account control and gold download labels on every page. */
body .side-account-action,body .side-account-action.side-recharge{border:0!important;border-radius:12px;background:linear-gradient(180deg,#0886d2,#034789 52%,#032c68)!important;box-shadow:0 4px 14px #00173d99!important}
body .download-card .download-copy,body .forest-top .download-card .download-copy{color:#ffe27e!important;text-shadow:0 2px 3px #351900!important}
@media(min-width:1101px){body:not(.forest-page) #doll-showcase>.side-account-panel{width:150px!important}body.forest-page .side-account-panel{width:120px!important}}
@media(max-width:1100px){body.forest-page .side-account-action{box-sizing:border-box;width:min(26vw,130px)!important;flex:0 0 min(26vw,130px)}}
@media(max-width:1100px){body.forest-page .side-account-action,body.forest-page .side-account-action.side-recharge{padding:8px!important}}

/* Fine gold outline and upper highlight for member and top-up buttons. */
body .side-account-action,body .side-account-action.side-recharge{border:2px solid #edc466!important;border-radius:12px;background:radial-gradient(ellipse 82% 35% at 50% -4%,#a8f3ffbc 0%,#38baf070 38%,transparent 75%),linear-gradient(180deg,#087bc0,#034789 52%,#032c68)!important;box-shadow:inset 0 1px 4px #fff9b988,0 -3px 10px #f9da7c45,0 4px 14px #00173d99!important}
/* Keep only the border already drawn into each carousel artwork. */
#videos .video-grid>.hero{border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important}
#videos .video-grid>.hero::before{display:none!important}
#videos .video-grid>.hero .carousel-slides{inset:0!important;border:0!important;box-shadow:none!important;border-radius:0!important}
#videos .hero .carousel-link{inset:0}
/* The game-page link is twice the original scale, while staying inside the page. */
body.forest-page .back.bottom{font-size:2em;line-height:1.7;padding:20px 32px;max-width:calc(100% - 24px);white-space:nowrap}
