/* Responsive nav and shelf rules: keep Telegram mobile and desktop visually consistent. */

.region-page .shelf-row {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x proximity !important;
  padding-bottom: 8px !important;
  cursor: grab;
}

.region-page .shelf-row.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none !important;
}

.region-page .shelf-row .game-card {
  scroll-snap-align: start !important;
}

.region-page .genre-shelf .game-tag,
.region-page .no-tag-shelf .game-tag {
  display: none !important;
}

.region-page .genre-shelf .game-meta {
  margin-top: 8px !important;
}

.sub-visual-logo.is-ps-plus-wordmark {
  font-size: clamp(22px, 4.4vw, 34px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.05em !important;
  white-space: nowrap !important;
}

.preorder-release {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(93, 231, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(72, 119, 255, 0.2), rgba(10, 18, 34, 0.72));
  color: rgba(235, 243, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.preorder-release strong {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.topup-card {
  width: 170px;
  min-width: 170px;
  color: #fff;
  cursor: pointer;
}

.topup-visual {
  position: relative;
  height: 168px;
  overflow: hidden;
  border: 1px solid rgba(93, 231, 255, 0.22);
  border-radius: 22px;
  background: radial-gradient(circle at 18% 16%, rgba(93, 231, 255, 0.34), transparent 28%), radial-gradient(circle at 86% 84%, rgba(255, 126, 68, 0.48), transparent 36%), linear-gradient(145deg, #09172d 0%, #10274a 48%, #2f160e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.topup-brand,
.topup-title,
.topup-amount,
.topup-region {
  position: absolute;
  left: 16px;
  right: 16px;
  z-index: 1;
}

.topup-brand {
  top: 16px;
  color: rgba(166, 237, 255, 0.9);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.topup-title {
  top: 48px;
  max-width: 120px;
  font-size: 18px;
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

.topup-amount {
  bottom: 44px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 213, 103, 0.96), rgba(255, 129, 72, 0.96));
  color: #071425;
  font-size: 21px;
  font-weight: 1000;
}

.topup-region {
  bottom: 16px;
  color: rgba(239, 247, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.topup-info {
  padding-top: 10px;
}

.topup-info h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 900;
}

.topup-info p {
  margin: 0 0 7px;
  color: rgba(197, 211, 236, 0.75);
  font-size: 12px;
  font-weight: 700;
}

.topup-info strong {
  display: block;
  font-size: 18px;
  font-weight: 1000;
}

.region-page .shelf.is-preorder-shelf .shelf-row {
  align-items: stretch !important;
}

.region-page .shelf.is-preorder-shelf .game-card {
  display: flex !important;
  flex-direction: column !important;
  height: 382px !important;
  min-height: 382px !important;
  box-sizing: border-box !important;
}

.region-page .shelf.is-preorder-shelf .game-cover {
  flex: 0 0 auto !important;
}

.region-page .shelf.is-preorder-shelf .game-price {
  flex: 0 0 22px !important;
  min-height: 22px !important;
  display: flex !important;
  align-items: center !important;
  margin-top: 10px !important;
  margin-bottom: 2px !important;
}

.region-page .shelf.is-preorder-shelf .game-name {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
}

.region-page .shelf.is-preorder-shelf .game-meta {
  flex: 0 0 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
}

.region-page .shelf.is-preorder-shelf .preorder-release {
  flex: 0 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

@media (min-width: 561px) {
  /* Keep the nav compact on desktop instead of stretching to ~520px, which made
     the icons look tiny with too much empty space. Match the mobile dimensions
     (which look right) so the bar stays tight and proportionate on wide screens. */
  .region-bottom-nav {
    width: min(calc(100% - 40px), 392px) !important;
    gap: 7px !important;
    align-items: center !important;
  }

  .region-bottom-nav .region-nav-back {
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 18px !important;
  }

  .region-bottom-nav .region-nav-back::before {
    width: 20px !important;
    height: 20px !important;
  }

  .region-bottom-nav .region-nav-tabs {
    height: 58px !important;
    min-width: 0 !important;
    border-radius: 22px !important;
    padding: 5px !important;
    gap: 3px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .region-bottom-nav .region-nav-tab {
    min-width: 0 !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 17px !important;
    padding: 0 4px !important;
    gap: 3px !important;
  }

  .region-bottom-nav .region-nav-icon,
  .region-bottom-nav .region-nav-icon::before {
    width: 20px !important;
    height: 20px !important;
  }

  .region-bottom-nav .region-nav-label {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 9px !important;
    line-height: 1 !important;
    letter-spacing: -0.1px !important;
  }

  .region-nav-badge {
    right: 6px !important;
    top: 5px !important;
    min-width: 17px !important;
    height: 17px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 560px) {
  .region-bottom-nav {
    width: min(calc(100% - 18px), 560px) !important;
  }

  .region-bottom-nav .region-nav-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .region-bottom-nav .region-nav-tab {
    min-width: 0 !important;
  }

  .region-page .shelf.is-preorder-shelf .game-card {
    height: 392px !important;
    min-height: 392px !important;
  }
}
