/* AAYYY mobile layout overrides. Loaded after style.css on screens up to 720px. */
/* Final mobile pass: keep desktop rules intact and resolve all narrow-screen layouts here. */
@media(max-width:720px){
  html,body{
    max-width:100%;
    overflow-x:hidden;
  }
  body{
    font-size:15px;
  }
  main,
  main>*,
  .wrap,
  .footer-inner{
    min-width:0;
  }
  .wrap,
  .footer-inner{
    width:calc(100% - 28px);
  }
  img,
  video,
  iframe{
    max-width:100%;
    height:auto;
  }
  h1,h2,h3,p,a,span,li,dd,dt,summary{
    overflow-wrap:break-word;
  }
  .section{
    padding:38px 0;
  }

  /* Header */
  .nav{
    min-height:60px;
    height:60px;
    padding:0;
    gap:8px;
  }
  .brand{
    flex:0 0 auto;
  }
  .brand-logo{
    width:auto;
    height:27px;
  }
  .nav-links{
    min-width:0;
    gap:1px;
    font-size:12px;
    font-weight:700;
  }
  .nav-links a{
    flex:0 0 auto;
    padding:7px 5px;
    white-space:nowrap;
  }
  .nav-links a[href*="play-on-pc"]{
    display:none!important;
  }
  .nav-links a[href*="play-on-pc"],
  .page-home .nav-links a[href*="play-on-pc"],
  .page-games .nav-links a[href*="play-on-pc"],
  .emulator-page .nav-links a[href*="play-on-pc"]{
    padding:8px 10px;
    box-shadow:none;
  }

  /* Shared headings and footer */
  .section-headline,
  .home-section-intro{
    align-items:flex-start;
    gap:10px;
  }
  .section-headline h2,
  .home-section-intro h2,
  .page-games .directory-section .section-headline h2{
    font-size:25px;
  }
  .section-headline>div,
  .home-section-intro>div{
    min-width:0;
  }
  .section-headline p{
    font-size:14px;
    line-height:1.55;
  }
  .site-footer{
    margin-top:0;
  }
  .footer-inner{
    padding:25px 0 22px;
  }
  .footer-top{
    align-items:flex-start;
    flex-direction:column;
    gap:21px;
    padding-bottom:0;
  }
  .footer-copyright{
    width:100%;
    gap:11px;
    white-space:normal;
  }
  .footer-copyright img{
    width:44px;
    height:25px;
  }
  .footer-links{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 20px;
  }
  .footer-links a{
    font-size:12px;
  }

  /* Home */
  .page-home .home-hero-grid{
    min-height:278px;
    padding-top:38px;
    padding-bottom:38px;
  }
  .page-home .home-hero-copy h1{
    font-size:36px;
    line-height:1.06;
  }
  .page-home .home-hero-copy>p{
    margin-top:14px;
    font-size:14px;
    line-height:1.55;
  }
  .home-hero-actions{
    margin-top:20px;
  }
  .home-hero-primary{
    min-height:44px;
    padding:0 17px;
    font-size:14px;
  }
  .home-latest{
    padding-top:40px;
    padding-bottom:38px;
  }
  .home-section-intro{
    margin-bottom:12px;
    padding-bottom:14px;
  }
  .home-section-intro>a{
    flex:0 0 auto;
    padding-top:5px;
    white-space:nowrap;
  }
  .page-home .home-article-stream .post-card{
    padding:18px 0;
  }
  .page-home .home-article-stream .post-card img{
    border-radius:13px;
  }
  .page-home .home-article-stream .post-card h2{
    font-size:20px;
  }
  .page-home .home-article-stream .post-card>div,
  .home-channel-game span{
    min-width:0;
  }
  .home-channel-index{
    padding-top:22px;
  }
  .home-emulator-link{
    padding:18px;
  }
  .home-text-feed{
    padding-top:0;
  }
  .text-article-list{
    column-gap:0;
  }
  .ranking-preview-grid{
    gap:30px;
  }

  /* Games directory */
  .page-games .directory-hero>.directory-hero-grid{
    gap:22px;
    padding-top:34px;
    padding-bottom:30px;
  }
  .page-games .directory-hero-copy h1{
    font-size:36px;
    line-height:1.08;
  }
  .page-games .directory-hero-copy>p{
    margin-top:13px;
    font-size:14px;
  }
  .directory-icon-streams{
    width:100%;
    padding:0;
  }
  .directory-stream-icon{
    width:54px;
    height:54px;
    flex-basis:54px;
    border-radius:14px;
  }
  .page-games .game-directory>.section{
    padding-top:4px;
  }
  .page-games .directory-section{
    padding:31px 0!important;
  }
  .page-games .directory-section .section-headline{
    margin-bottom:14px;
  }
  .page-games .directory-section .game-library-grid,
  .page-games .directory-section .channel-index-grid{
    gap:3px 12px;
  }
  .page-games .directory-section .game-library-item,
  .page-games #channels .channel-index-item{
    min-height:62px;
    padding:7px 5px 7px 34px;
  }
  .page-games .directory-section .game-library-item:before,
  .page-games #channels .channel-index-item:before{
    left:3px;
    font-size:11px;
  }
  .directory-section .game-library-item img,
  .directory-section .channel-index-item img{
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:10px;
  }
  .page-games .directory-section .game-library-item span:last-child,
  .page-games .directory-section .channel-index-item span:last-child{
    min-width:0;
    font-size:13px;
    line-height:1.25;
  }

  /* Shared game-topic hero */
  .game-topic-hero,
  .article-topic-hero{
    min-height:0;
    display:block;
  }
  .game-topic-content,
  .article-topic-hero .game-topic-content{
    padding:25px 0 68px;
  }
  .crumb{
    margin-bottom:14px;
    font-size:12px;
  }
  .game-topic-heading{
    display:block;
    margin-top:0;
  }
  .game-topic-title,
  .article-topic-hero .game-topic-title{
    display:grid;
    grid-template-columns:54px minmax(0,1fr);
    align-items:start;
    gap:11px;
  }
  .game-topic-title>img,
  .game-topic-title>a,
  .game-topic-title>a>img{
    width:54px;
    height:54px;
  }
  .game-topic-title>img,
  .game-topic-title>a>img{
    border-radius:15px;
  }
  .game-topic-title>div{
    min-width:0;
  }
  .game-topic-title h1,
  .article-topic-hero .game-topic-title h1{
    font-size:27px;
    line-height:1.13;
  }
  .game-topic-title p:not(.topic-kicker){
    font-size:13px;
    line-height:1.5;
  }
  .article-topic-hero .game-topic-title p:not(.topic-kicker){
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
  }
  .article-meta{
    gap:6px 12px;
    margin-top:12px;
    font-size:12px;
  }
  .article-meta span+span:before{
    display:none;
  }
  .game-topic-rating{
    width:auto;
    min-width:0;
    margin:14px 0 0;
    padding:0;
    display:flex;
    align-items:center;
    gap:8px;
    text-align:left;
  }
  .game-topic-rating strong{
    font-size:27px;
  }
  .game-topic-rating small{
    margin:0;
  }
  .game-topic-tabs{
    width:calc(100% - 28px);
  }
  .game-topic-tabs nav{
    gap:2px;
  }
  .game-topic-tabs a{
    min-width:0;
    padding:12px 4px;
    border-radius:9px 9px 0 0;
    font-size:12px;
    white-space:nowrap;
  }

  /* Article */
  .article-page .article-section{
    padding:28px 0 8px;
  }
  .article-page .article-toc{
    margin-bottom:24px;
    padding-top:12px;
  }
  .article-toc nav{
    display:flex;
    overflow-x:auto;
    gap:7px;
    padding:8px 0 4px;
    border:0;
    scrollbar-width:none;
  }
  .article-toc nav::-webkit-scrollbar{
    display:none;
  }
  .article-toc nav a,
  .article-toc nav a.active{
    flex:0 0 auto;
    max-width:230px;
    overflow:hidden;
    padding:8px 11px;
    border:1px solid var(--line);
    border-radius:999px;
    background:#fff;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .toc-game-link{
    margin-top:10px;
  }
  .article-page .article-body{
    min-width:0;
  }
  .article-body p,
  .article-body li,
  .content p,
  .content li{
    font-size:15px;
    line-height:1.72;
  }
  .article-intro{
    font-size:16px!important;
  }
  .article-body h2,
  .content h2{
    margin-top:30px;
    font-size:23px;
  }
  .article-body h3,
  .content h3{
    font-size:18px;
  }
  .content pre,
  .article-body pre{
    max-width:100%;
    overflow-x:auto;
  }
  .content table,
  .article-body table{
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    overflow-x:auto;
  }
  .author-box{
    gap:11px;
  }
  .author-box>div{
    min-width:0;
  }
  .article-page .article-rightbar,
  .category-page .category-sidebar,
  .topic-flat-page .topic-sidebar{
    margin-top:32px;
  }
  .article-page .comments-wrap{
    width:calc(100% - 28px);
  }
  .community-comments .community-comment{
    gap:10px;
  }
  .community-comments .community-avatar{
    width:34px;
    height:34px;
  }
  .community-comments .community-meta{
    gap:4px 8px;
  }

  /* Category, gift codes, and game-specific PC pages */
  .category-page .category-guide-list,
  .topic-flat-page main>.wrap.section{
    padding:30px 0 44px;
  }
  .category-list-intro{
    margin-bottom:8px;
  }
  .category-page .category-stream .guide-row{
    padding:17px 0 21px;
  }
  .category-page .category-stream .guide-row img{
    border-radius:13px;
  }
  .topic-flat-page .codes-card{
    padding:0;
  }
  .topic-flat-page .topic-main .codes-card+.codes-card{
    margin-top:30px;
    padding-top:30px;
  }
  .topic-flat-page .codes-card h2{
    font-size:23px;
  }
  .gift-code-item{
    min-width:0;
    padding:13px 0;
  }
  .gift-code{
    max-width:100%;
    overflow-x:auto;
    font-size:14px;
  }
  .gift-code-actions{
    width:100%;
    gap:6px;
  }
  .gift-code-actions button{
    flex:0 0 auto;
  }
  .redeem-help-grid,
  .install-setup-grid{
    gap:26px;
    margin-top:16px;
  }
  .code-alert-card{display:block;padding:22px}.code-alert-card h2{font-size:24px}.code-alert-form{margin-top:20px}.code-alert-input-row{display:block}.code-alert-input-row input,.code-alert-input-row button{width:100%;box-sizing:border-box}.code-alert-input-row button{height:44px;margin-top:9px}
  .expired-disclosure summary{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:4px 10px;
  }
  .expired-disclosure summary span,
  .codes-page .expired-disclosure summary span{
    grid-column:1;
    grid-row:2;
    margin-left:0;
    text-align:left;
  }
  .expired-disclosure summary:after,
  .codes-page .expired-disclosure summary:after{
    grid-column:2;
    grid-row:1/3;
    align-self:center;
    margin-left:0;
  }
  .requirements-list div{
    display:grid;
    gap:3px;
  }
  .requirements-list strong{
    overflow-wrap:anywhere;
  }
  .pc-showcase{
    height:auto;
    aspect-ratio:16/9;
    border-radius:12px;
  }
  .review-form-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .review-form-row input{
    width:100%;
  }

  /* LDPlayer landing page */
  .emulator-hero-grid{
    min-height:0;
  }
  .emulator-hero-copy{
    padding:46px 0 10px;
  }
  .emulator-page .emulator-hero h1{
    font-size:37px;
    line-height:1.07;
  }
  .emulator-lead{
    margin-top:17px;
    font-size:15px;
    line-height:1.6;
  }
  .emulator-actions{
    margin-top:23px;
  }
  .emulator-download{
    min-height:58px;
    padding:0 19px;
    font-size:16px;
  }
  .emulator-visual{
    min-height:235px;
    overflow:hidden;
  }
  .emulator-page .emulator-visual .emulator-hero-art{
    top:50%;
    right:auto;
    left:50%;
    width:135%;
    height:auto;
    max-width:none;
    transform:translate(-50%,-50%);
  }
  .emulator-proof-row{
    gap:0;
    padding:12px 0;
  }
  .emulator-proof-row>div,
  .emulator-proof-row>div:first-child,
  .emulator-proof-row>div:nth-child(3){
    min-width:0;
    padding:13px 12px;
  }
  .emulator-proof-row>div:nth-child(odd){
    padding-left:0;
  }
  .emulator-proof-row>div:nth-child(even){
    padding-right:0;
    border-right:0;
  }
  .emulator-proof strong{
    font-size:16px;
  }
  .emulator-proof span{
    font-size:12px;
    line-height:1.4;
  }
  .emulator-section{
    padding:54px 0;
  }
  .emulator-section-title{
    margin-bottom:30px;
  }
  .emulator-section-title h2,
  .emulator-showcase-copy h2,
  .emulator-requirements h2{
    font-size:31px;
  }
  .emulator-section-title>span{
    font-size:15px;
    line-height:1.6;
  }
  .emulator-feature-list article{
    grid-template-columns:36px minmax(0,1fr);
    gap:12px;
    padding:23px 0;
  }
  .feature-number{
    font-size:18px;
  }
  .emulator-feature-list h3{
    font-size:19px;
  }
  .emulator-feature-list p,
  .emulator-showcase-copy>p:not(.emulator-eyebrow){
    font-size:15px;
  }
  .emulator-showcase{
    padding:52px 0;
  }
  .emulator-showcase-grid{
    gap:30px;
  }
  .emulator-showcase-image{
    border-radius:16px;
  }
  .emulator-step-row li,
  .emulator-step-row li:first-child{
    gap:13px;
    padding:21px 0;
  }
  .emulator-requirements{
    padding:54px 0;
  }
  .emulator-requirements-grid{
    gap:26px;
  }
  .emulator-requirements dl div{
    grid-template-columns:1fr;
    gap:3px;
    padding:12px 0;
  }
  .emulator-faq-list summary{
    padding:18px 35px 18px 0;
    font-size:15px;
  }
  .emulator-final-cta{
    padding:43px 0;
  }
  .emulator-final-cta .wrap{
    gap:22px;
  }
  .emulator-final-cta h2{
    font-size:27px;
  }
  .emulator-final-cta a{
    width:100%;
    padding:13px 18px;
    text-align:center;
  }

  /* Legal pages */
  .legal-page>.category{
    margin-top:25px;
  }
  .legal-page>h1{
    font-size:31px;
  }
  .legal-page>.content{
    padding-top:20px;
  }
  .legal-tabs{
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .legal-tabs::-webkit-scrollbar{
    display:none;
  }
  .legal-tabs a{
    flex:0 0 auto;
    padding:13px 12px 11px;
    font-size:13px;
    white-space:nowrap;
  }
}

@media(max-width:420px){
  .page-games .directory-section .game-library-grid,
  .page-games .directory-section .channel-index-grid{
    grid-template-columns:1fr;
  }
  .page-games .directory-section .game-library-item,
  .page-games #channels .channel-index-item{
    min-height:58px;
  }
}

@media(max-width:720px){
  .topic-flat-page .topic-main .code-alert-card{display:block!important;margin-top:30px!important;padding:22px!important}
  .topic-flat-page .topic-main .code-alert-card h2{font-size:22px}
  .code-alert-icon{width:48px;height:48px;flex-basis:48px}
  .topic-flat-page .code-alert-form{margin-top:20px}
}
