/* Banking summary cards only: keep three columns on phones in both orientations. */
@media (max-width: 900px), (max-height: 540px) and (pointer: coarse) {
  #banking-rates-panel > .banking-rate-grid,
  #dashboard-section > .balance-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }
  #banking-rates-panel > .banking-rate-grid > .balance-card,
  #dashboard-section > .balance-container > .balance-card {
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    padding: 9px 6px;
    margin-bottom: 0;
  }
  #banking-rates-panel > .banking-rate-grid > .balance-card h4,
  #dashboard-section > .balance-container > .balance-card h4 {
    font-size: clamp(.68rem, 2.3vw, .84rem);
    line-height: 1.3;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  #banking-rates-panel > .banking-rate-grid .seven-segment,
  #dashboard-section > .balance-container .seven-segment {
    font-size: clamp(.75rem, 2.7vw, 1.05rem);
    letter-spacing: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  #dashboard-section > .balance-container .btn-neon.small {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    padding: 7px 3px;
    font-size: .65rem;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Outrank the legacy banking page orientation rule without affecting other grids. */
@media (max-width:900px), (max-height:540px) and (pointer:coarse){
 html.unipay-page-banking-services.unipay-interface-mobile body #dashboard-section > .balance-container,
 html.unipay-page-banking-services.unipay-interface-mobile body #banking-rates-panel > .banking-rate-grid {grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
