/* Shared mobile layout corrections. Keep wide content scrollable, never hide it. */
.mobile-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
@media(max-width:768px){
 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea{font-size:16px!important;max-width:100%;box-sizing:border-box}
 button,input,select,textarea{touch-action:manipulation}
 main,.container,.card,.panel,.grid>*,.section-grid>*{min-width:0}
 .card canvas,.panel canvas{max-width:100%}
 .info-row{gap:12px;align-items:flex-start}
 .info-row .info-value{min-width:0;max-width:65%;text-align:end;overflow-wrap:anywhere}
 #expCards{flex-wrap:wrap}
 #expCards .exp-opt{flex:1 1 130px!important;min-width:0}
 .modal-box,.modal-content{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
 dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px)}
 .users-table,.errors-table{max-width:100%;overflow-x:auto}
 .challenge-workspace{flex-direction:column!important;height:auto!important;min-width:0}
 .challenge-chart-panel{flex:none!important;height:480px;min-height:360px}
 .challenge-order-panel{width:100%!important;min-width:0;overflow:visible!important}
 .challenge-order-panel>div{min-width:0}
 .challenge-order-panel button{min-height:44px;white-space:normal;margin-left:0}
 #challengeContent input,#challengeContent select{min-height:44px}
 #cOpenTrades button{min-width:44px;min-height:44px}
 #challengeContent table{display:block;max-width:100%;overflow-x:auto;white-space:nowrap}
 #challengeContent .grid{grid-template-columns:minmax(0,1fr)!important}
 #referralDialog input,#profileReferral input{font-size:16px}
}
@media(max-width:480px){
 .header{flex-wrap:wrap;gap:12px}
 .header-links{flex-wrap:wrap;gap:8px;min-width:0}
 .header-meta{overflow-wrap:anywhere;min-width:0}
 .info-label{flex-shrink:0}
 #profileReferral .btn,.field .btn,.modal-box button{min-height:44px}
 .challenge-chart-panel{height:420px}
 #referralDialog [data-close]{width:44px;height:44px;inset-block-start:10px;inset-inline-end:10px}
}
@media(max-width:768px),(max-height:600px){
 .onboarding-overlay{height:100dvh;justify-content:flex-start;padding-top:max(68px,env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom);overflow:hidden}
 .ob-content{flex:1;min-height:0;max-height:none;width:100%;padding:12px 20px 24px;overflow-y:auto;overscroll-behavior:contain}
 .ob-nav{position:static;flex-shrink:0;width:100%;padding:12px 16px;background:var(--bg,#0d120f);border-top:1px solid var(--border,#394238);gap:8px}
 .ob-next,.ob-back,.ob-skip{min-height:44px;padding:10px 14px;font-size:13px}
 .ob-skip{top:12px;right:16px}
 .ob-dots{flex:1;justify-content:center;flex-wrap:wrap;max-width:80px;gap:5px}
 .ob-dot{width:6px;height:6px}
 .ob-exp-cards{flex-direction:column;gap:12px;align-items:stretch}
 .ob-exp-card{width:100%;padding:14px}
 .ob-title{font-size:24px}
 .ob-subtitle{font-size:13px;letter-spacing:1px;overflow-wrap:anywhere}
 #expBanner{flex-wrap:wrap;padding:14px!important;gap:10px!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
 #expBanner button{min-height:44px}
}
@media(max-width:480px){
 .otp-inputs{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px!important;direction:ltr}
 .otp-inputs input{width:100%!important;min-width:0;height:48px!important;padding:0!important;font-size:20px!important}
 .otp-sent-msg strong{overflow-wrap:anywhere}
 .checkbox-group{align-items:flex-start}
 .checkbox-group input{flex-shrink:0}
}
