/* Desktop app shell: keep the established mobile design, centered and readable. */
@media (min-width: 651px) {
  :root { --nova-desktop-width: 480px; }
  html { scroll-padding-top: 24px; }
  body { min-width: 0; padding-bottom: 115px; background: radial-gradient(ellipse 600px 520px at 50% 0%, #251351 0%, transparent 82%), #090b20 !important; }
  .header, main, footer { width: min(var(--nova-desktop-width), calc(100% - 36px)) !important; max-width: var(--nova-desktop-width) !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box !important; }
  .header { height: 86px !important; padding: 0 16px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; position: relative !important; }
  .header .logo { font-size: 27px !important; }
  .header .logo-symbol { font-size: 35px !important; }
  .header nav, .header-guide { display: none !important; }
  .header::after { content: '☰'; color: #f8f5ff; font-size: 27px; line-height: 1; margin-right: 3px; }
  main { display: block !important; }
  .hero { display: block !important; min-height: 0 !important; margin: 0 0 18px !important; padding: 0 !important; }
  .hero-copy { padding: 15px 17px 4px !important; max-width: none !important; width: 100% !important; box-sizing: border-box !important; }
  .hero h1 { font-size: 35px !important; line-height: 1.15 !important; letter-spacing: -1.4px !important; margin: 0 0 12px !important; }
  .hero-copy > p { font-size: 14px !important; line-height: 1.5 !important; max-width: 38ch !important; margin: 0 !important; }
  .hero-art, .hero-stats { display: none !important; }
  .hero .search-shell { width: 100% !important; max-width: none !important; height: 54px !important; margin-top: 18px !important; padding: 0 11px !important; border-radius: 21px !important; box-sizing: border-box !important; gap: 9px !important; }
  .hero .search-shell input { font-size: 13px !important; }
  .hero .search-shell .search-icon svg { width: 20px !important; height: 20px !important; }
  .hero .search-shell .search-decor { gap: 8px !important; padding-right: 6px !important; }
  .hero .search-shell .search-mic { width: 17px !important; height: 20px !important; }
  .hero .search-shell .search-sparkles { width: 19px !important; height: 19px !important; }
  body:not(.discover-view):not(.detail-view) .shortcuts-section, .discover-view .shortcuts-section { width: 100% !important; max-width: none !important; box-sizing: border-box !important; padding: 0 12px !important; margin: 0 auto 24px !important; display: block !important; }
  body:not(.discover-view):not(.detail-view) .shortcut-grid, .discover-view .shortcut-grid { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 11px !important; }
  .discover-view .shortcut { height: auto !important; min-height: 0 !important; aspect-ratio: 1.89 !important; padding: 0 !important; }
  .discover-view .shortcut > * { visibility: hidden !important; }
  .discover-view .shortcut-games { background: url('./art/discover-games.png') center/100% 100% no-repeat !important; }
  .discover-view .shortcut-apps { background: url('./art/discover-apps.png') center/100% 100% no-repeat !important; }
  .discover-view .shortcut-rewards { background: url('./art/discover-rewards.png') center/100% 100% no-repeat !important; }
  .discover-view .shortcut-trending { background: url('./art/discover-trending.png') center/100% 100% no-repeat !important; }
  .discover-view .shortcuts-section .section-head { margin: 0 0 18px !important; }
  .discover-view .shortcuts-section .section-head h2 { font-size: 33px !important; }
  .discover-view .discover-intro { font-size: 14px !important; }
  body:not(.discover-view):not(.detail-view) .featured-section, .trending-section, .catalog-section { width: 100% !important; max-width: none !important; box-sizing: border-box !important; padding: 0 12px !important; margin-left: auto !important; margin-right: auto !important; }
  body:not(.discover-view):not(.detail-view) .featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; }
  body:not(.discover-view):not(.detail-view) .featured-card h3 { font-size: 13px !important; }
  body:not(.discover-view):not(.detail-view) .featured-card .feature-description { font-size: 11px !important; }
  .trending-list { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 9px !important; }
  .trending-card { min-width: 0 !important; }
  .catalog-section { padding-bottom: 105px !important; }
  .catalog-head { display: block !important; }
  .catalog-controls { width: 100% !important; box-sizing: border-box !important; display: flex !important; justify-content: space-between !important; flex-wrap: nowrap !important; margin: 16px 0 !important; }
  .catalog-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  .app-card { min-height: 70px !important; }
  .app-card .icon-img { width: 50px !important; height: 50px !important; flex: 0 0 50px !important; }
  .mobile-tabs { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important; align-items: center !important; gap: 3px !important; position: fixed !important; z-index: 100 !important; width: min(454px,calc(100vw - 46px)) !important; max-width: 454px !important; left: 50% !important; right: auto !important; bottom: 15px !important; transform: translateX(-50%) !important; padding: 7px 8px !important; min-height: 76px !important; border: 1px solid #6a3cd0 !important; border-radius: 30px !important; background: linear-gradient(145deg,#171344f7,#0b0d2df8) !important; box-shadow: 0 8px 28px #0009,inset 0 1px #ffffff17,0 0 19px #6127e534 !important; backdrop-filter: blur(20px) !important; box-sizing: border-box !important; }
  .mobile-tabs a { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 5px !important; min-width: 0 !important; min-height: 62px !important; padding: 7px 2px !important; border-radius: 23px !important; text-decoration: none !important; color: #d3d0ee !important; }
  .mobile-tabs a span { height: 26px !important; }
  .mobile-tabs a small { font-size: 11px !important; line-height: 1.1 !important; white-space: nowrap !important; }
  .mobile-tabs a.active { background: radial-gradient(ellipse at 50% 0%,#b845ff,#5d18d0 57%,#31105c 100%) !important; box-shadow: 0 0 22px #a32aff9c,inset 0 1px #d997ff !important; border: 1px solid #a53dff66 !important; color: white !important; }
  .mobile-tabs a:not(.active) { background: transparent !important; border: 1px solid transparent !important; box-shadow: none !important; }
  footer { padding: 20px 12px 110px !important; }
  .footer-top { display: block !important; }
  .discover-view .hero, .discover-view .featured-section, .discover-view .trending-section { display: none !important; }
}

/* Desktop search: allow the live results panel to escape the hero card.
   The original wide-screen hero clipped the dropdown via overflow:hidden. */
@media (min-width: 651px) {
  .hero { overflow: visible !important; position: relative !important; z-index: 30 !important; }
  .hero-copy { position: relative !important; z-index: 31 !important; }
  .hero .search-shell { position: relative !important; overflow: visible !important; z-index: 32 !important; }
  .hero #search-results:not(.hidden) { display: block !important; position: absolute !important; top: calc(100% + 9px) !important; left: 0 !important; right: 0 !important; z-index: 50 !important; max-height: min(420px, 55vh) !important; overflow-y: auto !important; overscroll-behavior: contain !important; }
}
