/* ANTIFIX — global mobile hardening */
html,body{max-width:100%;overflow-x:hidden}
img,video,canvas,svg{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%}

@media(max-width:700px){
    .shell{width:min(100% - 28px,var(--shell,1180px))!important}
    .section{overflow:clip}

    /* Forms across public pages */
    .form-grid{
        grid-template-columns:1fr!important;
    }
    .form-grid>.full{
        grid-column:auto!important;
    }
    input,select,textarea{
        min-width:0!important;
    }

    /* Public cards/grids should not force horizontal overflow. */
    .article-grid,
    .portfolio-grid,
    .product-grid,
    .market-grid{
        grid-template-columns:1fr!important;
    }

    /* Long content such as emails, domains and URLs. */
    p,a,dd,td,th,h1,h2,h3,h4,h5{
        overflow-wrap:anywhere;
    }

    /* Touch-friendly buttons. */
    .btn{
        min-height:40px;
    }
}

@media(max-width:480px){
    .shell{width:min(100% - 22px,var(--shell,1180px))!important}
}

/* Admin generic responsive safety */
@media(max-width:680px){
    .admin-main{
        min-width:0!important;
        overflow-x:hidden!important;
    }
    .admin-section,
    .analytics-panel,
    .detail-card{
        min-width:0!important;
    }
    .table-wrap{
        max-width:100%;
        overflow-x:auto!important;
        -webkit-overflow-scrolling:touch;
    }
    .admin-title{
        align-items:flex-start!important;
        flex-direction:column!important;
    }
    .admin-title-actions{
        max-width:100%;
    }
    .admin-section-head{
        gap:8px;
    }
    .admin-section-head,
    .admin-section-head>div{
        min-width:0;
    }
    .admin-section input,
    .admin-section select,
    .admin-section textarea{
        min-width:0!important;
        max-width:100%!important;
    }
}
