/* MahjongTableFlow — speed + device fixes (2026-11-22). Loaded last on the main pages.
   Only overrides; no new visual design. */

/* 1. Clip sideways overflow without turning <html>/<body> into scroll
      containers (overflow-x:hidden on both breaks momentum scrolling and
      sticky elements on iOS Safari and in-app browsers). */
@supports (overflow:clip){html,body{overflow-x:clip!important}}

/* 2. Smoother scrolling on phones and tablets: live background blur behind
      the sticky nav and the photo captions is re-painted on every scroll
      frame. Use a solid, slightly translucent colour instead. */
@media (max-width:1024px),(pointer:coarse){
  .nav{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:rgba(250,246,238,.97)!important}
  .role-scene__aside,.role-scene__links,.role-object,.product-label{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .role-scene__aside,.role-scene__links{background:rgba(5,24,20,.86)!important}
  .c-tile--soft,.c-tile--softer{filter:none!important}
}

/* 3. Small phones (iPhone SE / 320–360px): the two homepage demo panels were
      wider than the screen and got cut off on the right; the logo text wrapped. */
.proof-pair,.proof-pair>*,.demo,.tourney-sim{min-width:0;max-width:100%}
@media (max-width:380px){
  .demo,.tourney-sim{padding:22px 16px!important}
  .nav .brand{font-size:14px!important;white-space:nowrap;gap:8px}
  .nav .brand img{width:36px!important;height:36px!important}
}

/* 4. Finger-sized links (44px minimum touch target) on touch screens. */
@media (pointer:coarse){
  .footer-links a,.text-link,.at-featured__all,.choice-card .text-link,.demo__cta .text-link{display:inline-flex;align-items:center;min-height:44px}
  .footer-links{row-gap:0}
}

/* 5. Images never stretch; they keep their own proportions. */
img{max-width:100%}
.at-shop-hero__cover img{height:auto;object-fit:contain}
@media (pointer:coarse){
  .library-group__item a{display:inline-flex;align-items:center;min-height:44px}
  .at-shop-hero a.text-link,.at-shop-hero__actions a{min-height:44px;display:inline-flex;align-items:center}
}
@media (max-width:480px){
  .demo__step{flex-direction:column;gap:4px}
  .demo__step b{min-width:0}
}

/* 6. Short laptop screens (1366x768, 1280x720) and landscape tablets: the
      homepage hero headline was so tall that the two buttons fell below the
      fold. Scale the hero type with the screen height as well as the width. */
@media (min-width:721px) and (max-height:880px){
  .cinema-hero h1{font-size:clamp(48px,min(7.3vw,11.5vh),112px)!important}
  .cinema-hero .kicker{margin-bottom:14px}
  .cinema-hero__content{padding-top:clamp(28px,4vh,60px)!important;padding-bottom:clamp(48px,7vh,90px)!important}
  .cinema-hero__lead{margin:20px 0 24px!important}
  .cinema-hero__scroll{display:none!important}
}
@media (pointer:coarse){
  .at-footer-nav a{display:inline-flex;align-items:center;min-height:44px}
  .v2-crumb a,.page-breadcrumbs a{display:inline-block;padding:12px 0}
}

/* 7. Library cards: the category tag sat on top of the product name printed
      on each cover. On every screen size move it to the bottom corner. */
.product-card .product-label{top:auto!important;bottom:12px!important}
