/* Wobble Pals · 2026-10-30 visual polish
   Full-bleed premium thumbnails + safe bottom actions on mobile.
   Scope exclusively to Shop and Profile; no change to game physics or economy. */

/* The source preview canvases are 180×150 while the current card is square.
   object-fit:contain was letterboxing them against their dark fallback canvas
   background. Center-crop, never distort, to fill the square without strips. */
#modal .shop-screen .premium-grid>.premium-card button.premium-media{
  overflow:hidden!important;
  isolation:isolate;
  background:#e8dbf1!important;
  border-radius:13px!important;
}
#modal .shop-screen .premium-grid>.premium-card button.premium-media>canvas,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>img.premium-art{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:11px!important;
  aspect-ratio:auto!important;
  object-fit:cover!important;
  object-position:center!important;
  box-shadow:none!important;
}
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-expression-art,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-skin-art,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-container-art,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-look-art,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-effect-art,
#modal .shop-screen .premium-grid>.premium-card button.premium-media>.premium-bundle-art{
  object-fit:cover!important;
}
#modal .shop-screen .premium-grid>.premium-card button.premium-media::after{
  z-index:2;
}
/* Prevent inline cards and their button shadows from colliding with the row below. */
#modal .shop-screen .premium-grid{row-gap:13px!important;padding-bottom:8px!important;}
#modal .shop-screen .premium-grid>.premium-card{padding-bottom:10px!important;}
#modal .shop-screen .premium-grid>.premium-card>.premium-buy{
  flex-shrink:0!important;
  min-height:36px!important;
  margin-bottom:1px!important;
}

/* Full-height modals must reserve the button's painted shadow, not just
   its content box, above the bottom border and Android gesture inset. */
#modal .card:has(.profile-dashboard){
  padding-bottom:max(20px,calc(14px + env(safe-area-inset-bottom,0px)))!important;
}
#modal .profile-dashboard{
  height:min(610px,calc(100dvh - 108px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)))!important;
  max-height:100%!important;
}
#modal .profile-dashboard>.profile-actions{
  box-sizing:border-box;
  flex-shrink:0!important;
  min-height:68px;
  margin-top:8px!important;
  padding:9px 7px 13px!important;
  overflow:visible;
}
#modal .profile-dashboard>.profile-actions .button{
  box-sizing:border-box;
  min-height:45px;
  padding:10px 18px!important;
  margin:0 0 4px!important;
  box-shadow:0 4px #77543f;
}
#modal .profile-dashboard .profile-content{scroll-padding-bottom:12px;}
#modal .card:has(.shop-screen){
  padding-bottom:max(26px,calc(19px + env(safe-area-inset-bottom,0px)))!important;
  scroll-padding-bottom:30px!important;
}
#modal .shop-screen .ui-section:last-of-type,
#modal .shop-screen .premium-tx-list{
  margin-bottom:9px!important;
}
#modal .card:has(.ui-screen) .ui-footer{
  padding-bottom:max(9px,env(safe-area-inset-bottom,0px))!important;
}
/* Reduce long scroll paint flashes while heavy content remains offscreen. */
#modal .shop-screen .premium-card{
  contain:layout style;
}
@media(max-width:360px){
  #modal .profile-dashboard{height:min(570px,calc(100dvh - 112px - env(safe-area-inset-bottom,0px)))!important;}
  #modal .profile-dashboard>.profile-actions{min-height:65px;padding-bottom:12px!important;}
}
@media(prefers-reduced-motion:reduce){
  #modal .shop-screen .premium-media>canvas{animation:none!important;}
}

/* Premium Containers are not automatically Prismatic. No category badges. */
#modal .shop-screen .premium-card:has(.premium-container-art)::after{display:none!important;content:none!important}
