/* G&C REV10W FIX59 R3 — iPhone / Samsung narrow-mobile visual parity.
 * Source-level audit target: common member-facing layouts that previously
 * changed structure only because Samsung/Android PWAs commonly report a
 * 360–390px CSS viewport while current large iPhones sit around 393–430px.
 *
 * Keep genuine ultra-narrow fallbacks below 341px. Between 341–430px, prefer
 * the same compact composition where the controls/cards have enough room.
 */

@media (min-width:341px) and (max-width:430px){
  /* Home: keep the compact iPhone 2-column quick-action composition. */
  .gcHomeQuickActions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .gcHomeQuickButton{
    min-width:0!important;
    padding-inline:8px!important;
    font-size:11px!important;
  }
  .gcHomeQuickButton.primary{grid-column:1/-1!important}

  /* Home events: date/time summary remains two-up instead of becoming a tall
     Samsung-only single column. */
  .gcHomeEventSchedule{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .gcHomeEventScheduleRow{padding:8px!important}
  .gcHomeEventScheduleRow strong{font-size:10px!important}

  /* Profile hero: the two primary actions already fit in the iPhone layout;
     preserve that composition on 360–390px Android widths. */
  .gcProfileHeroActions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .gcProfileHeroActions>button{
    min-width:0!important;
    padding-inline:7px!important;
    font-size:10.5px!important;
    white-space:normal!important;
    line-height:1.15!important;
  }

  /* Profile collection overview: two-up cards + full-width Platinum on all
     normal phone widths, with readable labels instead of Samsung-only microtype. */
  .gcProfileCollectionGrid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .gcProfileCollectionButton{
    min-width:0!important;
    min-height:92px!important;
    padding:10px!important;
  }
  .gcProfileCollectionLead{gap:7px!important;min-width:0!important}
  .gcProfileCollectionIcon{
    width:34px!important;height:34px!important;flex-basis:34px!important;
  }
  .gcProfileCollectionButton .gcProfileCollectionName{
    min-width:0!important;
    padding-right:27px!important;
    font-size:11.2px!important;
    line-height:1.15!important;
  }
  .gcProfileCollectionButton .gcProfileCollectionOpen{
    font-size:7.4px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
  .gcProfileCollectionButton .gcProfileCollectionCount{
    right:9px!important;top:16px!important;
    min-width:24px!important;
    font-size:21px!important;
  }
  .gcProfileCollection-platinum{
    grid-column:1/-1!important;
    min-height:76px!important;
    padding:10px 46px 10px 12px!important;
  }
  .gcProfileCollection-platinum .gcProfileCollectionName{
    padding-right:0!important;
    font-size:12px!important;
  }
  .gcProfileCollection-platinum .gcProfileCollectionOpen{font-size:7.6px!important}
  .gcProfileCollection-platinum .gcProfileCollectionCount{
    position:absolute!important;
    right:13px!important;top:16px!important;
    width:auto!important;min-width:24px!important;height:auto!important;
    margin:0!important;padding:0!important;
    display:block!important;
    border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;
    transform:none!important;
    font-size:22px!important;line-height:1!important;text-align:right!important;
  }

  /* Game Reviews summary: guard against older <=380px rules that stacked the
     two score panels only on narrower Android widths. */
  .gameReviewsPage .gameReviewsSummaryCard{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .gameReviewsPage .gameReviewsRecommendPanel{
    padding-top:8px!important;
    border-top:0!important;
  }

  /* Vault catalogue: keep the established two-column phone layout through the
     Samsung A-series width band; true single-column fallback remains <=340px. */
  body.gcVaultPage .gcVaultGrid,
  .gcVaultPage .gcVaultGrid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  /* Gold Merchant actions: same two-column mobile control density as iPhone. */
  .gcMerchantActions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .gcMerchantAction{
    min-width:0!important;
    width:100%!important;
    padding-inline:7px!important;
    font-size:8.8px!important;
  }
  .gcMerchantAction--dibs{grid-column:1/-1!important}

  /* Request a Game: preserve the premium input + compact Search button row on
     mainstream Samsung widths. Only ultra-narrow phones stack below 341px. */
  #gc35RequestModal .gc35RequestSearch{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 94px!important;
    gap:8px!important;
    align-items:stretch!important;
  }
  #gc35RequestModal #gc35RequestSearchBtn{
    width:auto!important;
    min-width:94px!important;
    padding-inline:10px!important;
  }

  /* Shared Browse Games shortcut: do not remove supporting copy solely because
     the Android CSS viewport is narrower than a large iPhone. */
  .gamesCatalogueSection.gcGamesBrowseOnly .gamesCatalogueCopy small{
    display:block!important;
    font-size:8.4px!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

/* Preserve safe fallbacks for genuinely tiny legacy devices. */
@media (max-width:340px){
  .gcHomeQuickActions{grid-template-columns:1fr!important}
  .gcHomeQuickButton.primary{grid-column:auto!important}
  .gcHomeEventSchedule{grid-template-columns:1fr!important}
  .gcProfileHeroActions{grid-template-columns:1fr!important}
  body.gcVaultPage .gcVaultGrid,.gcVaultPage .gcVaultGrid{grid-template-columns:1fr!important}
  .gcMerchantActions{grid-template-columns:1fr!important}
  .gcMerchantAction--dibs{grid-column:auto!important}
  #gc35RequestModal .gc35RequestSearch{grid-template-columns:1fr!important}
  #gc35RequestModal #gc35RequestSearchBtn{width:100%!important}
}
