/* App4 only. Load after the existing wallet and theme styles; no app rebuild needed. */
html[data-app-domain="app4.akingames.online"] .php-wallet {
  position: relative;
  isolation: isolate;
  z-index: 1;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

html[data-app-domain="app4.akingames.online"] .php-wallet > :is(.php-wallet-hero, .php-balance-box, .php-wallet-actions, .php-wallet-usage, .php-trust-strip) {
  position: relative;
  z-index: 1;
  opacity: 1;
  background: #fffef8 !important;
  color: #20382d;
}

html[data-app-domain="app4.akingames.online"] .php-wallet .php-wallet-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 18px;
  padding: 24px 18px;
  background: linear-gradient(135deg, #fffef8, #eaf3df) !important;
}

html[data-app-domain="app4.akingames.online"] .php-wallet-hero > div:first-child {
  flex: 1 1 190px;
  min-width: 0;
}

html[data-app-domain="app4.akingames.online"] .php-wallet-hero strong {
  font-size: clamp(26px, 7vw, 34px);
  overflow-wrap: anywhere;
  color: #20382d !important;
}

html[data-app-domain="app4.akingames.online"] .php-wallet .php-wallet-art {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 86px;
  width: 86px;
  height: 52px;
  margin: 22px 8px 0 auto;
}

html[data-app-domain="app4.akingames.online"] .php-balance-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 14px 0;
}

html[data-app-domain="app4.akingames.online"] .php-balance-row > strong {
  grid-column: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 20px;
}

html[data-app-domain="app4.akingames.online"] .php-balance-copy b { font-size: 13px; }
html[data-app-domain="app4.akingames.online"] .php-balance-copy small { font-size: 11px; line-height: 1.5; }
html[data-app-domain="app4.akingames.online"] .php-balance-copy em { font-size: 10px; }
html[data-app-domain="app4.akingames.online"] .php-balance-copy button { min-height: 36px; padding: 7px 10px; font-size: 11px; }

html[data-app-domain="app4.akingames.online"] .php-wallet-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-app-domain="app4.akingames.online"] .php-wallet-actions a {
  min-height: 112px;
  padding: 14px 6px;
  border: 0;
  gap: 3px;
}

html[data-app-domain="app4.akingames.online"] .php-wallet-actions b { font-size: 11px; line-height: 1.4; }
html[data-app-domain="app4.akingames.online"] .php-wallet-actions small { display: block; font-size: 10px; line-height: 1.4; color: #526458; }
html[data-app-domain="app4.akingames.online"] .php-wallet-usage > b { font-size: 13px; }
html[data-app-domain="app4.akingames.online"] .php-wallet-usage p { font-size: 12px; line-height: 1.6; }

@media (max-width: 360px) {
  html[data-app-domain="app4.akingames.online"] .php-wallet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
