/* v3.10.110: restore active-game mobile header and reduce mobile paint cost. */
@media (max-width: 860px) {
  html { scroll-behavior: auto !important; }
  body { background-attachment: scroll !important; overscroll-behavior-y: auto !important; }
  body::before { display: none !important; content: none !important; }

  /* Later legacy rules hid this header after launching LOTTO. */
  .portal.game-active .topbar,
  .portal.game-active.sidebar-collapsed .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 190 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "brand utility" !important;
    width: 100% !important;
    min-height: 54px !important;
    padding: 5px 7px !important;
    gap: 5px !important;
  }
  .portal.game-active .sidebar,
  .portal.game-active .sidebar-backdrop { display: none !important; }
  .portal.game-active .header-brand-home { display: inline-flex !important; }
  .portal.game-active .main-shell {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }
  .portal.game-active .content {
    width: 100% !important;
    min-width: 0 !important;
    padding: 5px 4px calc(76px + env(safe-area-inset-bottom)) !important;
  }
  .portal.game-active #view-games {
    width: 100% !important;
    min-height: calc(100dvh - 54px) !important;
    height: auto !important;
    padding: 0 !important;
  }
  .portal.game-active #gameRuntime {
    min-height: calc(100dvh - 58px) !important;
    height: auto !important;
  }

  /* Low-cost mobile surfaces: retain hierarchy without repeated GPU blur. */
  .sidebar, .topbar, .panel, .stat-card, .table-wrap, .modal-card,
  .ui-dialog-card, .notification-panel, .wallet-action-shell,
  .support-popup-card, .game-card, .featured-game-card, .compact-game-card,
  .lotto-result-card, .topbar-wallet-card, .account-center-modal-card,
  .mobile-bottom-nav {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: 0 5px 16px rgba(0,0,0,.20) !important;
  }
  .view:not(.hidden), .panel, .stat-card, .game-card, .featured-game-card,
  .compact-game-card, .lotto-result-card, .support-popup-card, .modal-card {
    animation: none !important;
  }
  .button, .nav-button, .mobile-bottom-nav-button, .game-card,
  .featured-game-card, .compact-game-card {
    transition: background-color .10s linear, border-color .10s linear, color .10s linear !important;
    will-change: auto !important;
  }
  .button:hover, .nav-button:hover, .mobile-bottom-nav-button:hover,
  .game-card:hover, .featured-game-card:hover, .compact-game-card:hover { transform: none !important; }
  .featured-game-card, .compact-game-card, .lotto-result-card, .panel, .stat-card { contain: layout paint !important; }
  .moving-announcement .announcement-track { animation-duration: 28s !important; }
}

@media (max-width: 430px) {
  .portal.game-active .topbar,
  .portal.game-active.sidebar-collapsed .topbar { min-height: 50px !important; }
  .portal.game-active #view-games { min-height: calc(100dvh - 50px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .moving-announcement .announcement-track { animation: none !important; }
}
