/* TaskBirds Responsive Safe Layer v140
   Adapts existing design to mobile/tablet/desktop without changing text, images, colors, or content order.
*/
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
body{min-width:0}
img,svg,video,canvas{max-width:100%;height:auto}
iframe{max-width:100%}
input,select,textarea,button{max-width:100%}
.container,.classic-container,.tb-auth-main,.account-page-layout,.account-main-area,.tb-page,.tb-wrap,.tb-layout,.tb-panel,.tb-content,.tb-shop-page,.tb-surfing-wrap,.tb-youtube-page,.tb-collect-page,.tb-deposit-page,.tb-withdraw-wrap,.tb-addep-page,.tb-settings-page,.profile-v98{max-width:100%;min-width:0}
.table-wrap,.table-responsive,.tb-table-wrap,.tb-my-box,.tb-addep-history,.tb-history-wrap,.tb-active-birds-wrap,.tb-active-birds-table-wrap,.tb-withdraw-history,.tb-deposit-history,.tb-transactions,.tb-admin-table-wrap,.tb-report-wrap,.tb-ch-history{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
table{max-width:100%}

@media (max-width:768px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .container,.classic-container,.tb-auth-main,.account-page-layout,.account-main-area{width:100%;max-width:100%;min-width:0;padding-left:10px;padding-right:10px;margin-left:auto;margin-right:auto}
  .account-page-layout{display:block}
  .account-main-area{padding-left:0;padding-right:0}
  .classic-nav,.tb-top-menu,.tb-top-cards,.global-stats-bar{max-width:100%;overflow:hidden}
  .classic-nav,.tb-top-menu,.tb-top-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .classic-nav a,.tb-top-menu a,.tb-top-cards a{min-width:0;text-align:center;white-space:normal}
  .tb-shop-summary,.profile-stats-v98,.profile-heroes-v180,.tb-stats,.tb-deposit-steps,.tb-pay-status-grid,.tb-settings-grid,.tb-form-grid,.tb-provider-grid,.tb-gifts-grid{display:grid;grid-template-columns:1fr;gap:12px}
  .tb-heroes-grid,.heroes-grid,.tb-shop-grid,.tb-hero-grid,.tb-birds-grid,.tb-surfing-list,.tb-surf-grid,.tb-task-list,.tb-video-list,.tb-youtube-grid{display:grid;grid-template-columns:1fr;gap:14px}
  .tb-hero-card,.hero-card,.tb-shop-hero,.tb-bird-card,.tb-video-item,.tb-task,.tb-surf-card,.tb-provider-card{width:100%;max-width:100%;min-width:0}
  .tb-shop-card,.tb-surfing-shell,.tb-youtube-card,.tb-collect-card,.tb-deposit-shell,.tb-withdraw-shell,.tb-addep-card,.tb-settings-card,.profile-v98,.tb-card,.ui-card,.card{width:100%;max-width:100%;min-width:0}
  .tb-video-item,.tb-task{grid-template-columns:1fr}
  .tb-video-meta,.tb-surf-meta,.tb-task-meta{display:flex;flex-wrap:wrap;gap:7px}
  button,.btn,.tb-btn,.tb-buy-btn,.tb-watch-btn,.tb-yt-btn,.tb-surf-btn,.tb-deposit-btn,.tb-withdraw-btn,.tb-collect-btn,.tb-submit-btn,input[type="submit"]{min-height:46px;touch-action:manipulation}
  .account-main-area table,.tb-my-table,.tb-addep-table,.tb-active-birds-table,.tb-history-table,.tb-admin-table,.table{min-width:640px}
  .account-main-area:has(table),.tb-panel:has(table),.tb-card:has(table){overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tb-watch-page{max-width:100%;overflow-x:hidden}
  .tb-watch-top{max-width:100%}
  .tb-stage{width:100%;max-width:100%;padding-left:8px;padding-right:8px}
  .tb-frame-wrap{max-width:100%;aspect-ratio:16/9}
}

@media (max-width:480px){
  .container,.classic-container,.tb-auth-main,.account-page-layout{padding-left:8px;padding-right:8px}
  .classic-nav,.tb-top-menu,.tb-top-cards{grid-template-columns:1fr}
  h1,.tb-shop-title,.tb-youtube-title,.tb-collect-title,.tb-deposit-title,.tb-withdraw-title,.tb-addep-title{word-break:break-word}
  .tb-content-head,.tb-promo,.tb-watch-top,.tb-watch-actions{grid-template-columns:1fr}
  .tb-faucetpay-showcase,.tb-payment-showcase{position:static;width:100%;max-width:100%;margin-left:0;margin-right:0}
  .tb-checks{padding-left:0;padding-right:0}
  .tb-hero-content{grid-template-columns:1fr}
  .tb-hero-footer{grid-template-columns:1fr}
  .tb-hero-stats{grid-template-columns:1fr}
  .tb-buy-btn,.tb-watch-btn,.tb-yt-btn,.tb-surf-btn,.tb-deposit-btn,.tb-withdraw-btn,.tb-collect-btn,.tb-submit-btn{width:100%}
  .tb-time-box{max-width:20vw}
  .tb-captcha-modal{width:95vw;max-width:95vw}
}
