/* Mobile fixes: clipped content, janky snap-scroll, heavy blur, font flash, horizontal scroll */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
body { overflow-x: clip; }
img, video, iframe, svg { max-width: 100%; }
@media (max-width: 991px) {
  /* 1) No forced snapping on phones (caused stuck/jumpy scrolling) */
  html, html.is-home-page { scroll-snap-type: none !important; }
  html.is-home-page *, html.is-home-page .main-footer { scroll-snap-stop: normal !important; }
  .features-grid { scroll-snap-type: x mandatory; } /* horizontal card slider stays */

  /* 2) Sections must grow with content instead of clipping it */
  .music-section, .highlights-section, .video-section, .shop-section, .fan-club-section {
    height: auto !important; min-height: calc(100vh - 64px); min-height: calc(100dvh - 64px);
    overflow: visible !important; padding-top: 24px; padding-bottom: 24px;
  }
  .fan-club-info { height: auto !important; min-height: 0; padding: 36px 0 20px; }
  .fan-club-news { height: auto !important; padding-top: 30px; }
  .features-section { height: auto !important; min-height: 0; padding: 20px 0 10px; }
  .features-grid { margin-top: 0 !important; }
  .main-footer { min-height: 0 !important; }
  .music-section__list { max-height: none; overflow: visible; }
  .song-row:nth-child(n+6) { display: flex !important; }

  /* 3) Lighter rendering: heavy blur makes mid-range phones lag */
  .global-player, .global-player *, .main-header, .rs-content-panel, .track-glass-effect,
  .track-main, .track-sidebar, .events-card, .news-card, .btn, .social-btn {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .ambient-bg__orb { filter: none !important; opacity: .35; }
  .archive-hero__visualizer { transform: none !important; }
}
@media (max-width: 480px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .btn { white-space: normal; }
  p, h1, h2, h3, h4, a { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Desktop hero: fills the viewport by percentage; stories overlay the bottom of the image
   (no empty dark band, works on any large screen) */
@media (min-width: 992px) {
  .rs-home-top, .admin-bar .rs-home-top {
    position: relative; display: block; overflow: hidden;
    height: calc(100vh - 64px); height: calc(100dvh - 64px);
    min-height: 520px; max-height: none;
  }
  .admin-bar .rs-home-top { height: calc(100vh - 96px); height: calc(100dvh - 96px); }
  .rs-home-top > .hero-section {
    position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-height: none; flex: none;
  }
  .rs-home-top > .rs-stories {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    width: 100%; height: auto; flex: none; background: none; border-top: 0; overflow: visible;
  }
  .rs-home-top .rs-stories__inner { height: auto; padding-block: clamp(14px, 2.4vh, 28px); }
  .rs-home-top:not(.rs-home-top--no-stories) .hero-section .container {
    padding-bottom: clamp(150px, 20vh, 220px);
  }
  /* Bottom shadow: fades the image smoothly into the page background (stories sit on top of it) */
  .rs-home-top .hero-section__overlay {
    background-image: linear-gradient(to top,
      var(--site-bg-color) 0%,
      var(--site-bg-color) 10%,
      rgba(25,28,31,.85) 22%,
      rgba(25,28,31,.4) 38%,
      rgba(25,28,31,0) 60%);
  }
}
