/* Mobile content layer. The desktop composition remains owned by its original styles. */
@media (max-width: 760px), (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  #home-view { min-width: 0; }

  /* Keep one complete banner in view; native rails retain swipe and keyboard support. */
  body[data-auth-state="guest"] .hero.bn-home {
    width: 100%; margin: 0; min-height: clamp(330px, 94vw, 430px);
    border: 1px solid #36514d; border-radius: 15px;
    background: #142320;
  }
  .bn-home .bn-slide { align-items: center; }
  body[data-auth-state="guest"] .bn-home .hero-copy {
    max-width: 100%; width: 100%; padding: 25px 20px 32px;
  }
  .bn-home .hero-art { width: 100%; height: 100%; object-fit: cover; object-position: 67% 50%; opacity: .92; }
  .bn-home .bn-slide::after {
    background: linear-gradient(90deg, #101e1df0 0%, #122522ca 39%, #13232020 86%),
      linear-gradient(0deg, #15221f85, transparent 55%);
  }
  .bn-home .eyebrow { font-size: 9px; letter-spacing: 1.3px; margin-bottom: 16px; }
  .bn-home .bn-title { font-size: clamp(30px, 8vw, 40px); line-height: 1.25; letter-spacing: -.8px; margin-bottom: 14px; }
  body[data-auth-state="guest"] .bn-home .hero-copy p {
    max-width: 220px; font-size: 13px; line-height: 1.7; margin-bottom: 20px;
  }
  body[data-auth-state="guest"] .bn-home .hero-cta { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
  .bn-home .hero-cta .btn { min-height: 44px; font-size: 13px; padding-inline: 18px; }
  .bn-home .hero-cta .sub-cta { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
  .bn-home .hero-corner { right: 14px; bottom: 12px; font-size: 8px; letter-spacing: 1.3px; }

  .member-bn { margin: 0; }
  .member-bn-window { aspect-ratio: auto; height: clamp(216px, 60vw, 300px); min-height: 216px; max-height: none; border: 1px solid #36514d; border-radius: 14px; }
  .member-bn-slide { flex-basis: 100%; }
  .member-bn-copy { width: 78%; max-width: 350px; padding: 20px; }
  .member-bn-kicker { display: flex; flex-wrap: wrap; gap: 5px 7px; font-size: 11px; margin-bottom: 10px; }
  .member-bn-kicker > span { font-size: 9px; }
  .member-bn-copy h2 { font-size: clamp(23px, 6.1vw, 32px); line-height: 1.3; margin-bottom: 10px; }
  .member-bn-copy p { font-size: 13px; line-height: 1.65; margin-bottom: 16px; }
  .member-bn-action { min-height: 44px; font-size: 13px; padding-inline: 16px; }
  .member-bn-art { object-position: 63% center; }
  .member-bn-slide::after { background: linear-gradient(90deg, #101c1bf0, #10201dd0 39%, #101c1b24 88%); }
  .member-bn > .bn-pagination { min-height: 40px; margin-top: 0; }
  .member-bn .bn-dot { height: 40px; width: 34px; }

  .announcement { margin: 14px 0 16px; padding: 11px 12px; border-radius: 9px; gap: 8px; min-width: 0; }
  .announcement strong { font-size: 11px; }
  .announcement > span:not(.sep) { font-size: 11px; }
  .categories {
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden;
    margin: 0 0 24px; padding: 2px 0 6px; scroll-snap-type: none;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  }
  .categories > .category { flex: 0 0 auto; min-width: 112px; min-height: 48px; padding: 10px 14px; gap: 8px; font-size: 12px; border-radius: 9px; }
  .categories > .category .icon { width: 20px; height: 20px; flex: none; }
  #home-view .section { margin: 26px 0; }
  #home-view #table, #home-view #crypto, #home-view #fishing { display: block; }
  #home-view .section-head { gap: 8px; margin-bottom: 13px; }
  #home-view .section-title { min-width: 0; gap: 7px; }
  #home-view .section-title h2 { font-size: 18px; line-height: 1.45; letter-spacing: 0; }
  #home-view .section-title > .icon { width: 21px; height: 21px; flex: none; }
  #home-view .rail-controls .view-all { display: inline-flex; align-items: center; min-height: 40px; font-size: 12px; white-space: nowrap; }

  .games.home-game-rail {
    grid-template-columns: none; grid-template-rows: auto; grid-auto-flow: column;
    grid-auto-columns: clamp(104px, 29vw, 190px); gap: 10px; padding-bottom: 6px;
  }
  .home-game-rail .game-cover { aspect-ratio: 3 / 4; border-radius: 10px; }
  .home-game-rail .game-info { padding-top: 8px; }
  .home-game-rail .game-info strong { font-size: 12px; line-height: 1.5; }
  .home-game-rail .game-info small { font-size: 10px; margin-top: 3px; }
  .home-game-rail .game-label { font-size: 9px; }
  .live-games.home-live-rail {
    grid-template-columns: none; grid-template-rows: auto; grid-auto-flow: column;
    grid-auto-columns: clamp(178px, 58vw, 310px); gap: 11px; padding-bottom: 6px;
  }
  .home-live-rail .live-card { border-radius: 11px; }
  .home-live-rail .live-image { aspect-ratio: 1.45; }
  .home-live-rail .live-bottom { padding: 12px; gap: 8px; min-height: 65px; }
  .home-live-rail .live-bottom strong { font-size: 13px; }
  .home-live-rail .live-bottom small { font-size: 11px; line-height: 1.5; }
  .home-live-rail .circle-arrow { width: 27px; height: 27px; }
  .home-live-rail .live-label { top: 10px; left: 10px; font-size: 9px; }

  #home-view .wins-section .section-head { align-items: flex-start; }
  #home-view .wins-section .section-title { flex-wrap: wrap; row-gap: 4px; }
  #home-view .wins-section .section-title h2 { font-size: 17px; }
  .wins-controls { gap: 4px; flex: none; }
  .wins-pause { min-height: 40px; min-width: 44px; padding: 7px 8px; font-size: 11px; }
  .wins-demo { font-size: 9px; line-height: 1.4; }
  .wins-track, .wins-set { gap: 10px; }
  .win-card { width: 84px; flex: 0 0 84px; }
  .win-card > img { aspect-ratio: 7 / 8; border-radius: 9px; }
  .win-meta { gap: 4px; margin-top: 7px; }
  .win-avatar { width: 15px; height: 15px; font-size: 8px; }
  .win-meta small { font-size: 9px; }
  .win-meta strong { font-size: 11px; letter-spacing: 0; white-space: nowrap; }

  #home-view .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0; }
  #home-view .promo { min-height: 208px; padding: 16px 14px; border-radius: 12px; }
  #home-view .promo-copy { max-width: 100%; }
  #home-view .promo .mini-label { font-size: 9px; line-height: 1.5; letter-spacing: .5px; }
  #home-view .promo h3 { font-size: 18px; line-height: 1.5; margin: 10px 0 7px; }
  #home-view .promo p { font-size: 12px; line-height: 1.6; max-width: none; }
  #home-view .promo a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-size: 12px; }
  #home-view .promo-art { width: 74px; height: 74px; right: -7px; bottom: -7px; opacity: .24; pointer-events: none; }
  #home-view .sport-banner { min-height: 224px; padding: 24px 20px; margin: 27px 0; border-radius: 14px; }
  #home-view .sport-banner > div:first-child { position: relative; z-index: 1; }
  #home-view .sport-banner .eyebrow { font-size: 10px; }
  #home-view .sport-banner h2 { font-size: clamp(22px, 6vw, 28px); line-height: 1.45; max-width: 15em; margin-block: 12px; }
  #home-view .sport-banner p { max-width: 250px; font-size: 13px; line-height: 1.7; }
  #home-view .sport-banner .btn { min-height: 44px; font-size: 13px; padding-inline: 18px; }
  #home-view .sport-art { opacity: .35; right: -60px; }

  /* The same complete provider list is available on phones and desktop. */
  .all-partners { margin: 30px 0 24px; padding: 22px 0; }
  .all-partners .partner-mobile { display: none; }
  .all-partners .partners-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .all-partners .providers-title { margin: 0; font-size: 15px; line-height: 1.5; letter-spacing: .5px; }
  .all-partners .partners-controls { position: static; display: flex; gap: 6px; flex: none; }
  .partners-controls button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #454f4d; border-radius: 9px; background: #242d2b; color: #c4d6d0; font-size: 23px; }
  .all-partners .partner-rail {
    display: flex; flex-wrap: nowrap; gap: 9px; overflow-x: auto; overflow-y: hidden;
    padding: 3px 0 9px; overscroll-behavior-x: contain; touch-action: pan-x pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #45665c transparent;
  }
  .partner-card { display: flex; align-items: center; justify-content: center; flex: 0 0 116px; width: 116px; height: 62px; padding: 10px; border: 1px solid #40514a; border-radius: 10px; background: #252e2a; }
  .partner-mark { display: flex; align-items: center; justify-content: center; width: 94px; height: 40px; color: #c8d5cf; }
  .partner-mark strong { font-family: inherit; font-size: 16px; font-style: normal; font-weight: 700; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }
  .partner-card:active { background: #314b40; border-color: #6be3c0; }

  .catalog-search { width: 100%; max-width: none; padding: 6px 6px 6px 12px; gap: 8px; border-radius: 11px; }
  .catalog-search > .icon { width: 18px; height: 18px; flex: none; }
  .catalog-search input { min-height: 42px; font-size: 16px; width: 0; }
  .catalog-search .btn { min-height: 44px; flex: none; padding-inline: 14px; font-size: 13px; }
  .catalog-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
  .catalog-tools > p { grid-column: 1 / -1; margin: 0; font-size: 12px; }
  .catalog-tools label { display: flex; flex-direction: column; align-items: stretch; gap: 7px; font-size: 12px; }
  .catalog-tools select { width: 100%; max-width: 100%; min-height: 44px; font-size: 14px; padding-left: 10px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 10px; }
  .catalog-grid .catalog-desktop-card { display: block; }
  .catalog-grid .catalog-mobile-card { display: none; }
  .catalog-grid .game { min-width: 0; }
  .catalog-grid .game-cover { aspect-ratio: 3 / 4; border-radius: 10px; }
  .catalog-grid .game-info strong { font-size: 12px; line-height: 1.5; }
  .catalog-grid .game-info small { font-size: 10px; line-height: 1.5; margin-top: 3px; }
  .catalog-grid .game-play { display: none; }
  .catalog-load-more { gap: 14px; margin: 26px 0 12px; }
  .catalog-load-more .btn { min-width: min(100%, 240px); min-height: 46px; font-size: 14px; }
  .catalog-load-more p { font-size: 12px; line-height: 1.5; text-align: center; }

  .game-detail { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 20px; border-radius: 14px; }
  .detail-art { width: min(60%, 210px); height: auto; aspect-ratio: 3 / 4; margin: 0 auto; border-radius: 12px; }
  .detail-art img { height: 100%; object-fit: contain; }
  .detail-copy { min-width: 0; }
  .detail-copy h2 { font-size: 24px; line-height: 1.4; overflow-wrap: anywhere; }
  .detail-copy p { font-size: 14px; line-height: 1.75; }
  .detail-copy dl { margin-block: 20px; }
  .detail-copy dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; font-size: 13px; }
  .detail-copy dd { overflow-wrap: anywhere; }
  .detail-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .detail-actions .btn { min-height: 46px; width: 100%; font-size: 14px; }
  .ui-game-toolbar { padding: 12px; gap: 8px; flex-wrap: wrap; }
  .ui-game-toolbar > div { min-width: 110px; }
  .ui-game-toolbar > .btn { min-height: 44px; min-width: 44px; padding-inline: 12px; }
  .ui-game-toolbar > .btn:last-child { display: inline-flex; }
  .ui-game-stage { min-height: min(65svh, 520px); }
  .ui-game-placeholder { padding: 30px 18px; max-width: 100%; }
  .ui-game-placeholder h2 { font-size: 23px; line-height: 1.5; }
  .ui-game-placeholder p { font-size: 13px; line-height: 1.8; }
  .ui-game-placeholder .btn { min-height: 44px; font-size: 13px; }
  .ui-game-footer { flex-wrap: wrap; gap: 10px; font-size: 11px; line-height: 1.7; }
}

@media (max-width: 359px) {
  body[data-auth-state="guest"] .bn-home .hero-copy { padding-inline: 17px; }
  .bn-home .bn-title { font-size: 30px; }
  .bn-home .hero-cta .btn { padding-inline: 14px; }
  .bn-home .hero-cta .sub-cta { font-size: 11px; }
  .member-bn-copy { width: 87%; padding-inline: 17px; }
  .member-bn-copy h2 { font-size: 22px; }
  .member-bn-copy p { font-size: 12px; }
  #home-view .promo-grid { grid-template-columns: 1fr; }
  #home-view .promo { min-height: 164px; padding: 20px; }
  #home-view .promo h3 { font-size: 19px; }
  #home-view .promo-art { width: 108px; height: 108px; opacity: .32; }
  #home-view .wins-section .section-title h2 { font-size: 16px; }
  #home-view .wins-section .section-title > .icon { display: none; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}

@media (min-width: 540px) and (max-width: 760px) {
  body[data-auth-state="guest"] .hero.bn-home { min-height: 370px; }
  body[data-auth-state="guest"] .bn-home .hero-copy { padding: 32px; }
  .member-bn-copy { padding: 26px; }
  .games.home-game-rail { grid-auto-columns: calc((100% - 32px) / 4.1); }
  .live-games.home-live-rail { grid-auto-columns: calc((100% - 12px) / 2.15); }
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-detail { grid-template-columns: minmax(150px, .7fr) 1fr; gap: 22px; }
  .detail-art { width: 100%; max-width: 220px; }
}

@media (min-width: 761px) and (max-width: 1024px) and (min-height: 501px) {
  .games.home-game-rail { grid-auto-columns: calc((100% - 32px) / 4.1); }
  .live-games.home-live-rail { grid-template-rows: auto; grid-auto-columns: calc((100% - 14px) / 2.2); }
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-tools { flex-wrap: wrap; }
  .catalog-tools > p { flex-basis: 100%; margin: 0; }
}

@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  body[data-auth-state="guest"] .hero.bn-home { min-height: 300px; }
  .member-bn-window { min-height: 220px; height: 240px; }
  .ui-game-stage { min-height: 320px; }
}
