/* Ending layout measured from the active 9:16 mother. Frames are generated art. */
#game[data-route="win"] .world-scene .room.layered{left:calc(-1 * var(--aspect-side));right:calc(-1 * var(--aspect-side));mask-image:none;background-image:url('assets/ending-room-v47.webp');background-size:100% 100%}
#game[data-route="win"] .world-prop{visibility:hidden}
#game[data-route="win"] .ending-title{position:absolute;left:30px;top:57px;width:330px;height:132px;margin:0;padding:0;background:url('assets/ending-title-v47.webp') center/contain no-repeat;z-index:5}
.ending-title>span{position:absolute;left:45px;right:45px;top:39px;height:59px;display:flex;align-items:center;justify-content:center;white-space:nowrap;font-size:35px;font-weight:900;line-height:1.4;letter-spacing:1px;color:#4e2b14}
#game[data-route="win"] .adult-pet.win-pet{left:80px;top:224px;width:242px;height:242px;object-fit:contain}
.ending-name{position:absolute;left:99px;top:463px;width:192px;height:50px;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background:url('assets/ending-name-v47.webp') center/contain no-repeat;font-size:23px;font-weight:900;line-height:1.4;letter-spacing:2px;z-index:5;color:#57331a}
.ending-stats{position:absolute;left:27px;top:517px;width:336px;height:195px;background:url('assets/ending-stats-v47.webp') center/100% 100% no-repeat;z-index:5}
.ending-growth-label{position:absolute;left:28%;right:28%;top:6%;height:16%;display:flex;align-items:center;justify-content:center;gap:5px;font-size:19px;font-weight:800;line-height:1.4;white-space:nowrap}
.ending-growth-label img{display:block;width:24px;height:22px;object-fit:contain}
.ending-growth-seal{position:absolute;left:29%;top:25%;width:16%;height:27%;object-fit:contain}
.ending-growth-value{position:absolute;left:46%;right:31%;top:22%;height:33%;display:flex;align-items:center;justify-content:center;font-size:42px;font-weight:900;line-height:1.4;color:#4e2b14}
.ending-counter{position:absolute;top:61%;height:29%;width:20%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.ending-counter.sport{left:27%}.ending-counter.music{left:72%}
.ending-counter>span{font-size:14px;font-weight:800;line-height:1.4}
.ending-counter>div{display:flex;align-items:baseline;justify-content:center;gap:4px;white-space:nowrap;line-height:1.4}
.ending-counter strong{font-size:24px;line-height:1.4;font-weight:900;color:#347d9c}
.ending-counter.music strong{color:#5d7a38}
.ending-counter small{font-size:12px;line-height:1.4;font-weight:700}
.ending-actions{position:absolute;left:13px;right:13px;top:718px;display:flex;justify-content:center;gap:8px;z-index:6}
#game[data-route="win"] .ending-actions .art-button{width:178px;min-height:64px;height:64px;margin:0;padding:4px 10px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:19px;line-height:1.4;letter-spacing:0;white-space:nowrap}
#game[data-route="win"] .ending-actions .art-button::before{inset:0;background-size:contain;pointer-events:none}
.ending-actions .button-glyph{width:22px;height:22px;flex:0 0 22px}
.ending-actions .ending-baby-glyph{width:29px;height:29px;flex-basis:29px}
/* The first collection score uses the same generated medallion as the ending. */
.album-first-score{display:flex;align-items:center;justify-content:center;gap:6px;height:31px;flex-shrink:0}
.album-first-score .album-growth-flower{display:block;width:22px;height:22px;object-fit:contain;flex:0 0 22px}
.album-first-score .album-first-value{display:block;font-size:22px;line-height:1.4}

/* V55 fixed illustrated title. Keep live statistics and the original layout. */
#game[data-route="win"] .ending-title{background:none}
#game[data-route="win"] .ending-sign-lettered{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
