/* Fixed, fully composed scenery; only ground decals, creatures and controls are overlays. */
.world[data-view=prep]{--camp-ink:#fff4d8;--camp-gold:#dabb79;position:relative;display:block;height:100svh;min-height:700px;isolation:isolate;background:#87af44;overflow:hidden}
.world[data-view=prep]::before{position:absolute;inset:0;background:url('assets/camp-unified-calm-v2.webp') center/100% 100% no-repeat;filter:none;z-index:-2}
.world[data-view=prep]::after{position:absolute;inset:0;background:linear-gradient(0deg,#49371324,transparent 13%);z-index:-1;pointer-events:none}
.world[data-view=prep] .main{display:block;position:absolute;inset:0;width:100%;height:100%;min-height:0;max-width:none;padding:0;margin:0}
.world[data-view=prep] .prep-scene{position:relative;display:block;width:100%;height:100%;min-height:0}
.world[data-view=prep] .camp-topbar{position:absolute;z-index:10;inset:0 0 auto;display:block;min-height:0;height:auto;padding:22px 28px;background:none;border:0;box-shadow:none;pointer-events:none}
.camp-topbar .hud{display:flex;justify-content:space-between;align-items:flex-start;width:100%;gap:12px}
.camp-topbar .camp-vitals,.camp-topbar .round{display:flex;align-items:center;gap:24px;padding:10px 22px;border:3px solid var(--camp-gold);border-radius:24px;background:linear-gradient(#142831a8,#162830df),url('assets/material-academy-v1-opt1.webp') center/400px;box-shadow:inset 0 2px #fff0b366,inset 0 -3px #070f1644,0 4px 0 #68512b,0 7px 12px #263b342b;color:var(--camp-ink);text-shadow:0 2px #12232e;pointer-events:auto}
.camp-topbar .magic{display:flex;gap:7px;filter:none}
.camp-topbar .heart{width:34px;height:34px;fill:#a4e66e;stroke:#47743b;stroke-width:1;filter:drop-shadow(0 2px 0 #10262d)}
.camp-topbar .heart.empty{fill:#4c5c50;stroke:#819776;opacity:.8}
.camp-topbar .energy{display:flex;align-items:center;gap:5px;padding:0;min-width:0;font-size:30px;line-height:36px;background:none;border:0;border-radius:0;box-shadow:none}
.camp-topbar .energy-icon{width:34px;height:34px;margin:0}
.camp-topbar .round{gap:10px;font-size:25px;line-height:36px;white-space:nowrap}
.camp-topbar .round small{font-size:23px;color:#f6eacb;font-weight:700}
.world[data-view=prep] .pasture{position:absolute;display:flex;padding:32px 0 0;isolation:auto;z-index:3;justify-content:flex-end}
.world[data-view=prep] .pasture::before,.world[data-view=prep] .pasture::after{display:none}
.world[data-view=prep] .team-pasture{left:4%;top:23%;width:77%;height:29%}
.world[data-view=prep] .bench-pasture{left:11%;top:53%;width:49%;height:39%;padding-top:28px}
.world[data-view=prep] .shop-pasture{left:63%;top:56%;width:19%;height:33%;padding:28px 8px 0}
.world[data-view=prep] .pasture-title{top:0;left:0;right:0;padding:0;gap:8px;align-items:center}
.world[data-view=prep] .pasture-title h2{color:var(--camp-ink);font-size:19px;line-height:25px;padding:3px 20px 5px;border-radius:8px 20px 20px 8px;border:2px solid #d0ab64;background:linear-gradient(#263b41c9,#172931e8),url('assets/material-academy-v1-opt1.webp') center/250px;text-shadow:0 2px #18303a;box-shadow:0 3px #705937;white-space:nowrap}
.world[data-view=prep] .pasture-title h2 span{font-size:12px;color:#e7d4a2;margin-left:5px}
.world[data-view=prep] .pasture-title button{font-size:12px;background:#263b41db;color:#fff1ce;border:1px solid #d0ab648c;border-radius:16px;padding:4px 12px}
.world[data-view=prep] .slot-row{height:100%;width:100%;max-width:none;margin:0;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:12px!important;align-items:stretch;overflow:visible;padding:0}
.world[data-view=prep] .bench-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr));gap:8px 16px!important}
.world[data-view=prep] .shop-row{position:relative;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr));gap:7px!important;padding:7px 10px 6px;isolation:isolate}
.world[data-view=prep] .shop-row::before{content:'';position:absolute;inset:-7px -10px -9px;background:url('assets/camp-shop-cloth-v1-opt1.webp') center/100% 100% no-repeat;z-index:-1;pointer-events:none}
.world[data-view=prep] .slot{height:100%!important;min-height:0;padding:25px 0 0;isolation:isolate}
.world[data-view=prep] .slot .pet-motion,.world[data-view=prep] .slot .item-visual{height:0;flex:1;min-height:0;max-height:none;width:100%}
.world[data-view=prep] .slot .pet-visual{max-height:none!important}
.world[data-view=prep] .pet-visual img{object-position:50% 100%;filter:drop-shadow(0 4px 2px #3e332d3d)}
.world[data-view=prep] .slot .unit-hud{height:43px;position:static!important;z-index:4;flex-shrink:0}
.world[data-view=prep] .slot .pet-level{top:3px;left:50%;font-size:16px;line-height:20px;padding:1px 6px;border-radius:5px;background:#1e3138c4;color:#fff9dc;text-shadow:0 1px 1px #10252b;font-weight:900;transform:translateX(-50%)}
.world[data-view=prep] .slot .stats{display:flex;gap:3px;width:100%;max-width:116px;height:43px;margin:0 auto;align-items:center}
.world[data-view=prep] .slot .stat.hp,.world[data-view=prep] .slot .stat.atk{width:49px;height:43px;flex:0 1 49px;font-size:min(26px,calc(74px / var(--digits,2)));line-height:1;max-width:none}
.world[data-view=prep] .slot .stat.atk{order:-1}
.world[data-view=prep] .bench-row .slot{padding-top:18px}
.world[data-view=prep] .bench-row .unit-hud,.world[data-view=prep] .bench-row .stats{height:34px}
.world[data-view=prep] .bench-row .stat.hp,.world[data-view=prep] .bench-row .stat.atk{width:40px;height:35px;flex-basis:40px;font-size:min(23px,calc(65px / var(--digits,2)))}
.world[data-view=prep] .slot .merge-count{top:5px;left:auto;right:3%;transform:none;font-size:13px!important;line-height:19px;height:19px;min-width:0;color:#fff8d8;text-shadow:0 1px 2px #293229;opacity:1}
.world[data-view=prep] .slot .merge-count::before{font-size:8px;margin-right:1px}
.world[data-view=prep] .slot::after{content:'';position:absolute;width:90%;height:40%;left:5%;bottom:20px;background:url('assets/camp-earth-pad-v1-opt1.webp') center/100% 100% no-repeat;box-shadow:none;border:0;border-radius:50%;opacity:.94;z-index:-1;pointer-events:none}
.world[data-view=prep] .team-pasture .slot::after{height:23%;bottom:29px;opacity:.23;filter:hue-rotate(22deg) saturate(.8)}
.world[data-view=prep] .slot .ground-mark{display:none}
.world[data-view=prep] .shop-row .slot::after{background:none;bottom:5px;opacity:1}
.world[data-view=prep] .slot.selected::after,.world[data-view=prep] .slot:focus-visible::after{outline:3px solid #ffe68b;outline-offset:1px;filter:drop-shadow(0 0 8px #ffe788);opacity:1}
.world[data-view=prep] .slot[data-fx-drop=valid]::after{outline:2px solid #f5e9a0;opacity:1}
.world[data-view=prep] .slot[data-fx-drop=active]::after{outline:4px solid #fffac9;filter:drop-shadow(0 0 10px #ffe96e);opacity:1}
.world[data-view=prep] .shop-row .slot{padding-top:21px}
.world[data-view=prep] .shop-row .unit-hud{height:32px}
.world[data-view=prep] .shop-row .stats{height:32px;max-width:85px}
.world[data-view=prep] .shop-row .stat.hp,.world[data-view=prep] .shop-row .stat.atk{width:36px;height:32px;flex-basis:36px;font-size:min(20px,calc(57px / var(--digits,2)))}
.world[data-view=prep] .shop-row .pet-level{font-size:12px;line-height:17px;top:1px;padding:0 4px}
.world[data-view=prep] .shop-row .merge-count{font-size:10px!important;line-height:16px;top:1px;right:0}
.world[data-view=prep] .item-name{color:#fff4d6;text-shadow:0 1px 2px #413128,1px 0 #413128,-1px 0 #413128;font-size:13px;line-height:32px;padding:0;white-space:nowrap}
.world[data-view=prep] .shop-controls{position:absolute;top:calc(100% + 12px);left:-3%;width:106%;display:flex;flex-wrap:nowrap;gap:8px}
.world[data-view=prep] .shop-controls button{flex:1;min-width:0;padding:8px 3px;font-size:15px;white-space:nowrap}
.world[data-view=prep] .shop-purchase-cost{position:absolute;top:calc(100% + 60px);bottom:auto;font-size:12px;line-height:17px;color:#fff3cf;text-shadow:0 1px 3px #422f1a}
.world[data-view=prep] .scene-footer{position:absolute;left:3%;right:2%;bottom:2%;display:flex;gap:14px;min-height:0;height:48px;padding:0;pointer-events:none;z-index:7}
.world[data-view=prep] .scene-footer>*{pointer-events:auto}
.world[data-view=prep] .camp-tools{display:flex;align-items:center;gap:9px}
.world[data-view=prep] .save-status{display:inline!important;min-width:64px;color:#fff2d4;text-shadow:0 1px 3px #3d301f;opacity:.85}
.world[data-view=prep] .scene-footer .battle-button{margin-left:auto;width:14%;min-width:120px;height:52px;font-size:23px}
.world[data-view=prep] .scene-footer .sell-zone{min-height:44px;padding:5px 18px;line-height:18px;font-size:13px}
.world[data-view=prep] .scene-footer .sell-zone span{display:inline;font-size:13px;margin-left:4px}
.world[data-view=prep] .shop-controls button,.world[data-view=prep] .scene-footer button{border:2px solid #d1aa65;border-radius:15px;background:linear-gradient(#ffecb4,#e6c37b);color:#343b36;box-shadow:inset 0 2px #fff5c8,0 3px #7b5732,0 5px 10px #553c2526;transition:filter .15s,translate .15s}
.world[data-view=prep] .scene-footer .battle-button{background:linear-gradient(#ffe799,#efb73f);border-color:#fff1b1;box-shadow:0 0 0 2px #95622d,inset 0 2px #fff5bf,0 4px #81582d}
.world[data-view=prep] .scene-footer .quiet{font-size:12px;padding:6px 12px;background:#283f41e6;color:#ffebbd;border-color:#c4a063;box-shadow:0 2px #725437}
.world[data-view=prep] button:hover:not(:disabled){translate:0 -1px;transform:none}
@media(min-width:1700px){.world[data-view=prep] .team-pasture{left:7%;width:73%}.world[data-view=prep] .bench-pasture{left:13%;width:47%}}
@media(max-width:1000px){
 .world[data-view=prep]{min-height:650px}.world[data-view=prep] .camp-topbar{padding:16px}
 .camp-topbar .camp-vitals,.camp-topbar .round{padding:7px 14px;gap:14px;border-radius:19px}.camp-topbar .heart{width:27px;height:27px}.camp-topbar .magic{gap:4px}.camp-topbar .energy{font-size:25px;line-height:29px}.camp-topbar .energy-icon{width:28px;height:28px}.camp-topbar .round{font-size:20px;line-height:29px}.camp-topbar .round small{font-size:18px}
 .world[data-view=prep] .pasture-title h2{font-size:15px;padding:1px 12px;line-height:23px}.world[data-view=prep] .pasture-title button{font-size:10px;padding:3px 9px}
 .world[data-view=prep] .slot-row{gap:4px!important}.world[data-view=prep] .bench-row{gap:8px 5px!important}.world[data-view=prep] .slot{padding-top:22px}.world[data-view=prep] .slot .pet-level{font-size:13px;line-height:17px}
 .world[data-view=prep] .slot .unit-hud,.world[data-view=prep] .slot .stats{height:34px}.world[data-view=prep] .slot .stat.hp,.world[data-view=prep] .slot .stat.atk{width:38px;height:34px;flex-basis:38px;font-size:min(21px,calc(56px / var(--digits,2)))}
 .world[data-view=prep] .slot .merge-count{font-size:11px!important;right:0}.world[data-view=prep] .shop-row{padding:3px;gap:5px!important}.world[data-view=prep] .shop-row .pet-level{font-size:11px}.world[data-view=prep] .shop-row .stats,.world[data-view=prep] .shop-row .unit-hud{height:27px}.world[data-view=prep] .shop-row .stat.hp,.world[data-view=prep] .shop-row .stat.atk{height:27px;width:29px;flex-basis:29px;font-size:min(17px,calc(45px / var(--digits,2)))}
 .world[data-view=prep] .shop-controls{gap:5px}.world[data-view=prep] .shop-controls button{font-size:12px;padding:7px 1px}.world[data-view=prep] .shop-purchase-cost{top:calc(100% + 51px);font-size:10px}.world[data-view=prep] .scene-footer{gap:7px;height:42px}.world[data-view=prep] .scene-footer .battle-button{font-size:19px;height:44px;min-width:98px}.world[data-view=prep] .scene-footer .sell-zone{padding:5px 8px}.world[data-view=prep] .save-status{font-size:10px;min-width:55px}
}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep]{min-height:850px;height:max(100svh,850px);overflow:hidden}.world[data-view=prep]::before{background-image:url('assets/camp-portrait-calm-v2.webp');background-size:100% 100%;background-position:center}
 .world[data-view=prep] .camp-topbar{padding:12px 8px}.camp-topbar .camp-vitals,.camp-topbar .round{padding:5px 9px;gap:8px;border-width:2px;border-radius:15px}.camp-topbar .heart{width:21px;height:23px}.camp-topbar .magic{gap:2px}.camp-topbar .energy{font-size:21px;line-height:27px}.camp-topbar .energy-icon{width:24px;height:24px}.camp-topbar .round{font-size:15px;line-height:27px;gap:5px}.camp-topbar .round small{font-size:13px}
 .world[data-view=prep] .team-pasture{left:2%;top:28%;width:96%;height:21%;padding-top:31px}.world[data-view=prep] .bench-pasture{left:2%;top:59%;width:59%;height:31%;padding-top:30px}.world[data-view=prep] .shop-pasture{left:65%;top:65%;width:32%;height:23%;padding:28px 2px 0}
 .world[data-view=prep] .pasture-title h2{font-size:13px;line-height:20px;padding:2px 10px}.world[data-view=prep] .pasture-title h2 span{font-size:10px;margin-left:2px}
 .world[data-view=prep] .slot-row{gap:1px!important}.world[data-view=prep] .bench-row{gap:8px 2px!important}.world[data-view=prep] .slot{padding-top:20px}.world[data-view=prep] .slot .pet-level{font-size:11px;padding:0 3px;line-height:16px;top:0}.world[data-view=prep] .slot .merge-count{font-size:9px!important;top:18px;line-height:12px}.world[data-view=prep] .slot .merge-count::before{font-size:6px}
 .world[data-view=prep] .slot .unit-hud,.world[data-view=prep] .slot .stats{height:27px;gap:0}.world[data-view=prep] .slot .stat.hp,.world[data-view=prep] .slot .stat.atk{height:27px;width:29px;flex-basis:29px;font-size:min(17px,calc(43px / var(--digits,2)))}
 .world[data-view=prep] .slot::after{width:100%;left:0;height:30%;bottom:18px}.world[data-view=prep] .shop-row{gap:4px!important;padding:2px}.world[data-view=prep] .shop-row .slot{padding-top:18px}.world[data-view=prep] .shop-row .pet-level{font-size:10px}.world[data-view=prep] .shop-row .merge-count{top:16px;font-size:8px!important}.world[data-view=prep] .shop-row .unit-hud,.world[data-view=prep] .shop-row .stats{height:25px}.world[data-view=prep] .shop-row .stat.hp,.world[data-view=prep] .shop-row .stat.atk{width:25px;height:24px;flex-basis:25px;font-size:min(15px,calc(40px / var(--digits,2)))}
 .world[data-view=prep] .shop-controls{top:calc(100% + 10px);gap:4px;left:-3%;width:106%}.world[data-view=prep] .shop-controls button{padding:8px 0;font-size:10px;border-radius:10px}.world[data-view=prep] .shop-purchase-cost{top:calc(100% + 49px);font-size:10px}.world[data-view=prep] .item-name{font-size:10px;line-height:25px}
 .world[data-view=prep] .scene-footer{bottom:1.4%;left:2%;right:2%;height:37px;gap:6px}.world[data-view=prep] .scene-footer .sell-zone{font-size:11px;min-height:34px;padding:4px 6px;border-radius:10px}.world[data-view=prep] .scene-footer .sell-zone span{font-size:10px;margin:0}.world[data-view=prep] .camp-tools{gap:4px}.world[data-view=prep] .scene-footer .quiet{padding:5px 7px;font-size:10px;border-radius:9px}.world[data-view=prep] .save-status{display:none!important}.world[data-view=prep] .scene-footer .battle-button{min-width:83px;height:37px;font-size:17px;border-radius:12px}.world[data-view=prep] .battle-button span{font-size:18px;margin:0}
}
@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep]{min-height:390px;height:100svh}.world[data-view=prep] .camp-topbar{padding:7px 13px}.camp-topbar .camp-vitals,.camp-topbar .round{padding:3px 10px;border-width:2px;gap:12px;border-radius:13px}.camp-topbar .heart{width:22px;height:22px}.camp-topbar .energy{font-size:20px;line-height:24px}.camp-topbar .energy-icon{width:22px;height:22px}.camp-topbar .round{font-size:17px;line-height:24px}.camp-topbar .round small{font-size:15px}
 .world[data-view=prep] .team-pasture{top:20%;height:31%}.world[data-view=prep] .bench-pasture{top:53%;height:35%}.world[data-view=prep] .shop-pasture{top:54%;height:30%}.world[data-view=prep] .pasture{padding-top:21px}.world[data-view=prep] .pasture-title h2{font-size:11px;line-height:17px;padding:1px 10px}.world[data-view=prep] .pasture-title button{font-size:9px;padding:2px 8px}.world[data-view=prep] .slot{padding-top:15px}.world[data-view=prep] .slot .pet-level{font-size:10px;line-height:13px;padding:0 3px;top:0}.world[data-view=prep] .slot .merge-count{font-size:9px!important;line-height:13px;top:0}
 .world[data-view=prep] .slot .unit-hud,.world[data-view=prep] .slot .stats{height:23px}.world[data-view=prep] .slot .stat.hp,.world[data-view=prep] .slot .stat.atk{height:23px;width:27px;flex-basis:27px;font-size:min(15px,calc(42px / var(--digits,2)))}.world[data-view=prep] .bench-row{gap:1px 8px!important}.world[data-view=prep] .shop-row{gap:1px!important;padding:2px}.world[data-view=prep] .shop-row .slot{padding-top:13px}.world[data-view=prep] .shop-row .unit-hud,.world[data-view=prep] .shop-row .stats{height:20px}.world[data-view=prep] .shop-row .stat.hp,.world[data-view=prep] .shop-row .stat.atk{height:20px;width:23px;flex-basis:23px;font-size:min(13px,calc(35px / var(--digits,2)))}.world[data-view=prep] .shop-row .pet-level{font-size:9px;line-height:11px}.world[data-view=prep] .shop-row .merge-count{font-size:8px!important;line-height:11px}.world[data-view=prep] .slot::after{bottom:13px}.world[data-view=prep] .item-name{font-size:10px;line-height:20px}
 .world[data-view=prep] .shop-controls{top:calc(100% + 5px)}.world[data-view=prep] .shop-controls button{padding:3px 1px;font-size:10px;border-radius:9px}.world[data-view=prep] .shop-purchase-cost{top:calc(100% + 32px);font-size:9px}.world[data-view=prep] .scene-footer{height:30px;bottom:2%;gap:8px}.world[data-view=prep] .scene-footer .sell-zone{min-height:29px;font-size:10px;padding:3px 8px}.world[data-view=prep] .scene-footer .sell-zone span{font-size:10px}.world[data-view=prep] .scene-footer .quiet{font-size:10px;padding:3px 9px}.world[data-view=prep] .scene-footer .battle-button{min-width:96px;height:31px;font-size:17px;min-height:0}.world[data-view=prep] .save-status{font-size:9px}
}
/* Keep compact screens usable instead of shrinking reserve pets into tiny icons. */
@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep]{height:100svh;min-height:390px}
 .world[data-view=prep] .team-pasture{top:17%;height:33%;padding-top:19px}
 .world[data-view=prep] .bench-pasture{top:50%;height:41%;padding-top:18px}
 .world[data-view=prep] .bench-row .slot{padding-top:12px}
 .world[data-view=prep] .bench-row .unit-hud,.world[data-view=prep] .bench-row .stats{height:20px}
 .world[data-view=prep] .bench-row .stat.hp,.world[data-view=prep] .bench-row .stat.atk{height:20px;width:24px;flex-basis:24px;font-size:min(14px,calc(40px / var(--digits,2)))}
 .world[data-view=prep] .shop-pasture{top:53%;height:32%}
}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep] .team-pasture{top:22%;height:17%}
 .world[data-view=prep] .bench-pasture{top:55%;height:35%}
 .world[data-view=prep] .team-pasture .slot .pet-level{top:auto;bottom:calc(29px + 15vw)}
 .world[data-view=prep] .team-pasture .slot .merge-count{top:auto;bottom:calc(22px + 12vw)}
 .world[data-view=prep] .bench-pasture .slot .pet-level{top:auto;bottom:calc(29px + 14vw)}
 .world[data-view=prep] .bench-pasture .slot .merge-count{top:auto;bottom:calc(23px + 11vw)}
 .world[data-view=prep] .shop-purchase-cost{top:calc(100% + 44px);font-size:9px}
 .world[data-view=prep] .shop-pasture{top:64%;height:23%}
}
/* Keep the composed scenery and its interactive landmarks in one proportional canvas. */
body:has(.world[data-view=prep]){background:#203936}
.world[data-view=prep]{width:min(100%,calc(100svh * 1586 / 992));height:auto!important;min-height:0!important;aspect-ratio:1586 / 992;margin:0 auto}
.world[data-view=prep]::before{background-size:contain!important}
.world[data-view=prep] .team-pasture .pet-visual img{scale:.86;transform-origin:50% 100%}
.world[data-view=prep] .bench-pasture .pet-visual img,.world[data-view=prep] .bench-pasture .item-visual img{scale:.84;transform-origin:50% 100%}
/* Match each hit area and foot position to the perspective pads painted on the cloth. */
.world[data-view=prep] .shop-pasture{height:auto!important;padding:28px 0 0}
.world[data-view=prep] .shop-row{display:block;flex:none;height:auto;width:100%;aspect-ratio:768 / 698;padding:0}
.world[data-view=prep] .shop-row::before{inset:0;background-size:contain}
.world[data-view=prep] .shop-row .slot{position:absolute;width:40%;height:45%!important;padding:0;top:0;left:13%}
.world[data-view=prep] .shop-row .slot:nth-child(2){left:47%}
.world[data-view=prep] .shop-row .slot:nth-child(3){top:35%;left:9%}
.world[data-view=prep] .shop-row .slot:nth-child(4){top:35%;left:51%}
.world[data-view=prep] .shop-row .slot .pet-motion,.world[data-view=prep] .shop-row .slot .item-visual{position:absolute;left:15%;bottom:32%;width:70%;height:51%;flex:none}
.world[data-view=prep] .shop-row .slot .unit-hud{position:absolute!important;bottom:0;left:0;width:100%}
.world[data-view=prep] .shop-row .item-name{position:absolute;bottom:0;left:0;width:100%}
.world[data-view=prep] .shop-row .pet-level{top:0}
.world[data-view=prep] .shop-row .merge-count{top:0;right:0}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep]{width:100%;aspect-ratio:853 / 1844}
 .world[data-view=prep] .shop-pasture{top:67%;padding-top:26px}
}
@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep] .shop-pasture{padding-top:21px}
}
/* HUD numbers sit below each pet; level/merge remain anchored to its full slot. */
.world[data-view=prep] .shop-row .slot .unit-hud{position:static!important}
.world[data-view=prep] .shop-row .slot .stats{position:absolute;bottom:0;left:50%;transform:translateX(-50%)}
.world[data-view=prep] .shop-row .pet-level{top:-5px}
.world[data-view=prep] .shop-row .merge-count{top:-3px}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep] .shop-pasture{left:62%;width:36%}
 .world[data-view=prep] .shop-row .slot .pet-motion,.world[data-view=prep] .shop-row .slot .item-visual{height:62%}
 .world[data-view=prep] .shop-row .slot .stats{height:20px;gap:0}
 .world[data-view=prep] .shop-row .slot .stat.atk,.world[data-view=prep] .shop-row .slot .stat.hp{height:20px;width:22px;flex-basis:22px;font-size:min(13px,calc(35px / var(--digits,2)))}
 .world[data-view=prep] .shop-row .pet-level{font-size:9px;line-height:11px;top:-5px}
 .world[data-view=prep] .shop-row .merge-count{font-size:7px!important;line-height:10px;top:-4px}
}
.world[data-view=prep] .shop-pasture{padding-top:42px}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .pet-level{top:25%}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .merge-count{top:25%}
@media(max-width:600px) and (orientation:portrait){.world[data-view=prep] .shop-pasture{padding-top:34px}}
@media(orientation:landscape) and (max-height:540px){.world[data-view=prep] .shop-pasture{padding-top:27px}}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .pet-level{top:13%;font-size:10px;line-height:12px}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .merge-count{top:13%}
/* Preparation: health first, with spending and selling gathered around the merchant. */
.world[data-view=prep] .slot .stat.hp{order:0}
.world[data-view=prep] .slot .stat.atk{order:1}
.world[data-view=prep] .merchant-wallet{position:absolute;right:0;top:0;z-index:5}
.world[data-view=prep] .merchant-wallet .energy{display:flex;align-items:center;gap:5px;font-size:24px;line-height:32px;padding:2px 10px;background:#20383ced;color:#fff5d9;border:2px solid #dabb79;border-radius:12px;box-shadow:0 3px #765633;min-width:72px}
.world[data-view=prep] .merchant-wallet .energy-icon{width:26px;height:26px;margin:0}
.world[data-view=prep] .shop-pasture>.sell-zone{position:absolute;left:calc(100% + 18px);top:calc(100% - 68px);width:72%;height:64px;min-height:48px;padding:8px;font-size:18px;color:#fff2d0;border:2px dashed #e3c580;border-radius:15px;background:#29433eef;box-shadow:0 3px #745735}
.world[data-view=prep] .shop-pasture>.sell-zone span{display:block;font-size:14px}
@media(max-width:1000px){
 .world[data-view=prep] .merchant-wallet .energy{font-size:18px;line-height:25px;min-width:56px;padding:1px 6px}
 .world[data-view=prep] .merchant-wallet .energy-icon{width:22px;height:22px}
 .world[data-view=prep] .shop-pasture>.sell-zone{left:calc(100% + 8px);font-size:14px;height:52px}
}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep] .team-pasture{left:3%;top:11%;width:94%;height:31%;padding-top:28px}
 .world[data-view=prep] .team-pasture .slot-row{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr));gap:6px 10px!important}
 .world[data-view=prep] .bench-pasture{left:3%;top:48%;width:47%;height:45%;padding-top:28px}
 .world[data-view=prep] .bench-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(0,1fr));gap:8px 8px!important}
 .world[data-view=prep] .team-pasture .slot .pet-level,.world[data-view=prep] .bench-pasture .slot .pet-level{top:0;bottom:auto}
 .world[data-view=prep] .team-pasture .slot .merge-count,.world[data-view=prep] .bench-pasture .slot .merge-count{top:2px;bottom:auto;right:3%}
 .world[data-view=prep] .team-pasture .slot{padding-top:17px}
 .world[data-view=prep] .bench-row .slot{padding-top:15px;padding-bottom:0}
 .world[data-view=prep] .bench-row .slot .unit-hud,.world[data-view=prep] .bench-row .slot .stats{height:24px}
 .world[data-view=prep] .bench-row .slot .stat.hp,.world[data-view=prep] .bench-row .slot .stat.atk{height:24px;width:27px;flex-basis:27px;font-size:min(16px,calc(42px / var(--digits,2)))}
 .world[data-view=prep] .shop-pasture{left:54%;top:51%;width:43%;padding-top:72px}
 .world[data-view=prep] .shop-pasture .pasture-title h2{font-size:14px;line-height:22px}
 .world[data-view=prep] .merchant-wallet{top:34px;left:0;right:auto}
 .world[data-view=prep] .merchant-wallet .energy{font-size:23px;line-height:27px;min-width:78px}
 .world[data-view=prep] .merchant-wallet .energy-icon{width:25px;height:25px}
 .world[data-view=prep] .shop-controls{top:calc(100% + 29px);left:0;width:100%;gap:6px}
 .world[data-view=prep] .shop-controls button{font-size:12px;padding:8px 1px}
 .world[data-view=prep] .shop-purchase-cost{top:calc(100% + 2px);font-size:11px;line-height:18px;margin:0}
 .world[data-view=prep] .shop-pasture>.sell-zone{top:calc(100% + 73px);left:0;width:100%;height:52px;font-size:17px;min-height:52px}
 .world[data-view=prep] .shop-pasture>.sell-zone span{display:inline;margin-left:8px;font-size:14px}
}
@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep] .merchant-wallet{top:-28px}
 .world[data-view=prep] .merchant-wallet .energy{font-size:16px;line-height:21px}
 .world[data-view=prep] .shop-pasture>.sell-zone{top:calc(100% - 48px);height:48px;font-size:13px}
}
/* Quiet scenery and a compact, unlabelled preparation layout. */
.world[data-view=prep] .team-pasture{top:20%;height:26%;padding-top:0}
.world[data-view=prep] .bench-pasture{top:56%;height:36%;padding-top:0}
.world[data-view=prep] .shop-pasture{left:61%;width:21%;padding-top:0}
.world[data-view=prep] .shop-row .slot .pet-motion,.world[data-view=prep] .shop-row .slot .item-visual{left:12%;width:76%;height:57%}
.world[data-view=prep] .merchant-wallet{top:calc(100% - 116px);left:calc(100% + 18px);right:auto;width:72%;display:flex;justify-content:center}
.world[data-view=prep] .merchant-wallet .energy{justify-content:center;min-width:90px}
@media(max-width:1000px){.world[data-view=prep] .merchant-wallet{left:calc(100% + 8px)}}
@media(max-width:600px) and (orientation:portrait){
 .world[data-view=prep] .team-pasture{top:10%;height:28%;padding-top:0}
 .world[data-view=prep] .bench-pasture{top:51%;height:42%;padding-top:0}
 .world[data-view=prep] .shop-pasture{left:52%;width:45%;top:51%;padding-top:0}
 .world[data-view=prep] .shop-row .slot .pet-motion,.world[data-view=prep] .shop-row .slot .item-visual{height:66%}
 .world[data-view=prep] .merchant-wallet{top:calc(100% + 73px);left:0;width:100%;right:auto;justify-content:center}
 .world[data-view=prep] .shop-pasture>.sell-zone{top:calc(100% + 116px)}
}
@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep] .team-pasture{top:16%;height:29%;padding-top:0}
 .world[data-view=prep] .bench-pasture{top:55%;height:36%;padding-top:0}
 .world[data-view=prep] .merchant-wallet{top:calc(100% - 83px)}
}
/* Reserve separate bands for upper stats, lower labels, and lower artwork. */
.world[data-view=prep] .shop-row{container-type:inline-size}
.world[data-view=prep] .shop-row .slot .stats{top:70%;bottom:auto;height:clamp(18px,9cqw,28px);gap:2px}
.world[data-view=prep] .shop-row .slot .stat.hp,.world[data-view=prep] .shop-row .slot .stat.atk{height:100%;width:clamp(22px,10cqw,32px);flex-basis:clamp(22px,10cqw,32px);font-size:clamp(12px,6cqw,20px)}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .pet-level{top:22%;font-size:10px;line-height:11px}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .merge-count{top:22%;line-height:11px}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .pet-motion,.world[data-view=prep] .shop-row .slot:nth-child(n+3) .item-visual{height:44%;bottom:15.5556%}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .stats{top:94%}
.world[data-view=prep] .shop-row .slot:nth-child(n+3) .item-name{top:94%;bottom:auto;line-height:clamp(18px,9cqw,28px)}

@media(orientation:landscape) and (max-height:540px){
 .world[data-view=prep] .shop-row .slot .stats{height:14px}
 .world[data-view=prep] .shop-row .slot .stat.hp,.world[data-view=prep] .shop-row .slot .stat.atk{font-size:11px;width:19px;flex-basis:19px}
 .world[data-view=prep] .shop-row .slot:nth-child(n+3) .pet-level{font-size:8px;line-height:9px}
 .world[data-view=prep] .shop-row .slot:nth-child(n+3) .merge-count{line-height:9px}
}
