/* V55: final mobile shop and fully rebuilt top-up page. Loaded last. */
html body:not(.view-game) section#topupModal.commerce-page {
  padding: clamp(5px,1vw,12px) !important;
  background:
    radial-gradient(circle at 12% 15%,rgba(40,221,255,.28),transparent 25%),
    radial-gradient(circle at 88% 82%,rgba(255,195,45,.25),transparent 24%),
    linear-gradient(135deg,rgba(4,31,94,.9),rgba(73,27,137,.84)),
    url('../assets/bg-main.png') center/cover no-repeat !important;
}
html body:not(.view-game) section#topupModal.commerce-page > .topup-card {
  box-sizing: border-box !important;
  width: min(1040px,97vw) !important;
  height: min(760px,96dvh) !important;
  max-height: 96dvh !important;
  overflow: hidden !important;
  padding: clamp(9px,1.3vw,18px) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0,1fr) auto !important;
  gap: clamp(7px,1vh,13px) !important;
  border: 3px solid #67e8ff !important;
  border-radius: clamp(18px,2.4vw,30px) !important;
  background:
    radial-gradient(circle at 90% 0,rgba(132,77,255,.42),transparent 30%),
    linear-gradient(145deg,rgba(8,70,170,.98),rgba(31,25,112,.98)) !important;
  box-shadow: 0 8px 0 #071747,0 25px 65px rgba(0,0,0,.48) !important;
}
html body:not(.view-game) #topupModal .shop-header {
  position: relative !important;
  min-height: 78px !important;
  padding: 9px 150px 9px 14px !important;
  display: flex !important;
  align-items: center !important;
  border: 2px solid rgba(255,255,255,.35) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg,#237fe9,#673bd8) !important;
  box-shadow: 0 5px 0 rgba(5,25,91,.65) !important;
}
html body:not(.view-game) #topupModal .shop-header::before {
  content: '💎' !important;
  margin-right: 11px !important;
  font-size: 34px !important;
}
html body:not(.view-game) #topupModal .panel-kicker {
  display: inline-flex !important;
  padding: 4px 10px !important;
  border: 2px solid #fff !important;
  border-radius: 999px !important;
  color: #172554 !important;
  background: linear-gradient(135deg,#7ff5ff,#4fd3ff) !important;
  text-shadow: none !important;
  box-shadow: 0 3px 0 #1689bb !important;
}
html body:not(.view-game) #topupModal .shop-header h2 { margin: 2px 0 0 !important; color: #fff !important; font-size: clamp(24px,3vw,36px) !important; line-height: 1 !important; text-shadow: 0 3px 0 rgba(10,24,89,.55) !important; }
html body:not(.view-game) #topupModal .shop-header p { margin: 4px 0 0 !important; color: #e8fbff !important; font-size: 12px !important; font-weight: 750 !important; }
html body:not(.view-game) #topupModal a#closeTopUpBtn.commerce-back-btn {
  position: absolute !important;
  top: 17px !important;
  right: 15px !important;
  width: 126px !important;
  height: 42px !important;
  min-width: 126px !important;
  min-height: 42px !important;
  padding: 7px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  border: 2px solid #fff !important;
  border-radius: 13px !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 1 !important;
  background: linear-gradient(135deg,#ff6a55,#e83767) !important;
  box-shadow: 0 4px 0 #911e48 !important;
}
html body:not(.view-game) #topupModal .topup-intro {
  box-sizing: border-box !important;
  min-height: 66px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  display: grid !important;
  grid-template-columns: 46px 1fr !important;
  gap: 10px !important;
  align-items: center !important;
  border: 2px solid rgba(117,231,255,.55) !important;
  border-radius: 16px !important;
  background: rgba(4,31,100,.6) !important;
}
html body:not(.view-game) #topupModal img.topup-main-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: contain !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body:not(.view-game) #topupModal .topup-intro p { margin: 0 0 2px !important; color: #fff !important; font-size: 13px !important; }
html body:not(.view-game) #topupModal .topup-intro small { color: #bdefff !important; font-size: 10px !important; line-height: 1.25 !important; }
html body:not(.view-game) #topupModal #topUpPackages.topup-grid {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: clamp(8px,1.3vw,16px) !important;
}
html body:not(.view-game) #topupModal .topup-package {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: clamp(10px,1.4vw,18px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border: 3px solid #bcecff !important;
  border-radius: 22px !important;
  color: #18336d !important;
  background: linear-gradient(160deg,#fff,#e8f7ff) !important;
  box-shadow: 0 6px 0 #4f8fc4,0 14px 24px rgba(0,0,0,.2) !important;
}
html body:not(.view-game) #topupModal .topup-package:nth-child(2) { border-color: #ffe257 !important; background: linear-gradient(160deg,#fffbd8,#ffe88a) !important; box-shadow: 0 6px 0 #bd8613,0 0 22px rgba(255,216,48,.28) !important; }
html body:not(.view-game) #topupModal .topup-package:nth-child(3) { border-color: #e6c8ff !important; background: linear-gradient(160deg,#fff,#eee0ff) !important; box-shadow: 0 6px 0 #8054bb,0 14px 24px rgba(0,0,0,.2) !important; }
html body:not(.view-game) #topupModal .topup-package::before { content: '🪙' !important; display: block !important; margin-bottom: 5px !important; font-size: clamp(28px,5vh,52px) !important; filter: drop-shadow(0 4px 0 rgba(153,83,0,.22)) !important; }
html body:not(.view-game) #topupModal .topup-package::before { display: none !important; content: none !important; }
html body:not(.view-game) #topupModal img.topup-coin-art {
  display: block !important;
  width: clamp(34px,5.2vh,52px) !important;
  height: clamp(34px,5.2vh,52px) !important;
  min-width: 34px !important;
  max-width: 52px !important;
  min-height: 34px !important;
  max-height: 52px !important;
  margin: 0 0 5px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  background: transparent !important;
  box-shadow: 0 4px 0 rgba(153,83,0,.22) !important;
}
html body:not(.view-game) #topupModal .topup-badge { margin: 0 0 6px !important; padding: 4px 9px !important; font-size: 10px !important; }
html body:not(.view-game) #topupModal .topup-points { font-size: clamp(18px,2.5vw,29px) !important; }
html body:not(.view-game) #topupModal .topup-points img { width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body:not(.view-game) #topupModal .topup-price { margin: 5px 0 9px !important; font-size: 14px !important; }
html body:not(.view-game) #topupModal .google-pay-btn { min-height: 40px !important; padding: 6px 9px !important; border: 2px solid #fff !important; border-radius: 12px !important; color: #fff !important; font-size: 11px !important; background: linear-gradient(135deg,#161616,#3d3d3d) !important; box-shadow: 0 4px 0 #000 !important; }
html body:not(.view-game) #topupModal .payment-security-note { margin: 0 !important; padding: 7px 10px !important; border-radius: 12px !important; color: #dff8ff !important; font-size: 9px !important; line-height: 1.25 !important; background: rgba(1,18,63,.6) !important; }

/* Phone landscape: all shop content stays visible, with one compact avatar row. */
@media (max-height: 560px) and (orientation: landscape) {
  html body:not(.view-game) #shopModal .shop-header > div {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr) !important;
    align-items: center !important;
    gap: 8px !important;
  }
  html body:not(.view-game) #shopModal .shop-header .panel-kicker {
    margin: 0 !important;
    white-space: nowrap !important;
  }
  html body:not(.view-game) #shopModal .shop-header h2 {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  html body:not(.view-game) section#shopModal.commerce-page > .shop-card {
    grid-template-rows: 48px 34px 15px 60px 15px minmax(0,1fr) !important;
    gap: 3px !important;
    padding: 6px !important;
  }
  html body:not(.view-game) #shopModal #skinGrid.skin-grid {
    grid-template-columns: repeat(8,minmax(0,1fr)) !important;
    grid-template-rows: minmax(0,1fr) !important;
    gap: 4px !important;
  }
  html body:not(.view-game) #shopModal #skinGrid > .skin-card { padding: 3px !important; }
  html body:not(.view-game) #shopModal #skinGrid > .skin-card > img.avatar-art { width: 30px !important; height: 30px !important; }
  html body:not(.view-game) #shopModal #skinGrid h4 { margin: 2px 0 0 !important; font-size: 8px !important; white-space: nowrap !important; }
  html body:not(.view-game) #shopModal #skinGrid .avatar-price { min-height: 12px !important; margin: 0 0 2px !important; font-size: 7px !important; }
  html body:not(.view-game) #shopModal #skinGrid button { width: 94% !important; min-height: 18px !important; padding: 1px !important; font-size: 7px !important; }

  html body:not(.view-game) section#topupModal.commerce-page > .topup-card {
    grid-template-rows: 50px 46px minmax(0,1fr) 30px !important;
    gap: 5px !important;
    padding: 7px !important;
  }
  html body:not(.view-game) #topupModal .shop-header { min-height: 50px !important; padding: 4px 104px 4px 9px !important; }
  html body:not(.view-game) #topupModal .shop-header::before,
  html body:not(.view-game) #topupModal .shop-header p { display: none !important; }
  html body:not(.view-game) #topupModal .shop-header h2 { font-size: 18px !important; }
  html body:not(.view-game) #topupModal .panel-kicker { padding: 2px 7px !important; font-size: 8px !important; }
  html body:not(.view-game) #topupModal a#closeTopUpBtn.commerce-back-btn { top: 8px !important; right: 8px !important; width: 90px !important; min-width: 90px !important; height: 31px !important; min-height: 31px !important; font-size: 9px !important; }
  html body:not(.view-game) #topupModal .topup-intro { min-height: 46px !important; padding: 4px 7px !important; grid-template-columns: 30px 1fr !important; }
  html body:not(.view-game) #topupModal img.topup-main-icon { width: 28px !important; height: 28px !important; min-width: 28px !important; max-width: 28px !important; min-height: 28px !important; max-height: 28px !important; }
  html body:not(.view-game) #topupModal .topup-intro p { font-size: 9px !important; }
  html body:not(.view-game) #topupModal .topup-intro small { font-size: 7px !important; }
  html body:not(.view-game) #topupModal .topup-package { padding: 5px !important; border-width: 2px !important; border-radius: 12px !important; box-shadow: 0 3px 0 #4f8fc4 !important; }
  html body:not(.view-game) #topupModal img.topup-coin-art {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin-bottom: 1px !important;
    box-shadow: 0 2px 0 rgba(153,83,0,.22) !important;
  }
  html body:not(.view-game) #topupModal .topup-badge { margin-bottom: 2px !important; padding: 2px 5px !important; font-size: 7px !important; }
  html body:not(.view-game) #topupModal .topup-points { font-size: 13px !important; }
  html body:not(.view-game) #topupModal .topup-price { margin: 2px 0 4px !important; font-size: 9px !important; }
  html body:not(.view-game) #topupModal .google-pay-btn { min-height: 25px !important; padding: 2px !important; font-size: 7px !important; box-shadow: 0 2px 0 #000 !important; }
  html body:not(.view-game) #topupModal .payment-security-note { padding: 4px 6px !important; font-size: 6px !important; }
}

@media (max-width: 620px) and (orientation: portrait) {
  html body:not(.view-game) section#topupModal.commerce-page > .topup-card { grid-template-rows: 70px 65px minmax(0,1fr) 42px !important; }
  html body:not(.view-game) #topupModal #topUpPackages.topup-grid { grid-template-columns: 1fr !important; grid-template-rows: repeat(3,minmax(0,1fr)) !important; gap: 6px !important; }
  html body:not(.view-game) #topupModal .topup-package { display: grid !important; grid-template-columns: 42px 1fr 88px !important; grid-template-rows: 1fr 1fr !important; text-align: left !important; padding: 5px 8px !important; }
  html body:not(.view-game) #topupModal img.topup-coin-art { grid-row: 1/3 !important; width: 30px !important; height: 30px !important; min-width: 30px !important; max-width: 30px !important; min-height: 30px !important; max-height: 30px !important; margin: 0 !important; }
  html body:not(.view-game) #topupModal .topup-badge { justify-self: start !important; margin: 0 !important; }
  html body:not(.view-game) #topupModal .topup-points { justify-content: flex-start !important; font-size: 15px !important; }
  html body:not(.view-game) #topupModal .topup-price { margin: 0 !important; font-size: 10px !important; }
  html body:not(.view-game) #topupModal .google-pay-btn { grid-column: 3 !important; grid-row: 1/3 !important; min-height: 32px !important; align-self: center !important; font-size: 8px !important; }
}
