/* Phone and tablet refinements. Loaded after page styles; login is excluded. */
@media screen and (max-width:900px){
  body{min-width:0;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .bvg-global-header-inner{min-width:0}
  .bvg-global-logo,.bvg-global-logo img{width:46px;height:46px;border-radius:10px}
  .bvg-global-logo{top:6px}
  .bvg-global-mobile-toggle{width:46px;height:46px;touch-action:manipulation}
  .bvg-global-header-right{max-height:calc(100vh - 58px);max-height:calc(100dvh - 58px);overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(16px,env(safe-area-inset-bottom))}
  .bvg-global-nav-link,.bvg-global-tools-dropdown a{min-height:46px;height:auto;padding:12px;box-sizing:border-box}
  .bvg-global-welcome{white-space:normal;overflow-wrap:anywhere}
  .bvg-contact-strip{gap:6px 16px;padding:8px 12px}
  .bvg-contact-strip a{min-height:44px;box-sizing:border-box}
  .bvg-contact-strip strong{flex-basis:100%;text-align:center}
  main,section,article,form,fieldset,.panel{min-width:0}
  input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=hidden]),select,textarea{font-size:16px!important;max-width:100%;box-sizing:border-box}
  input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=hidden]),select{min-height:44px}
  button,input[type=submit],.button-link,.bvg-btn,.portal-btn,.hero-btn{min-height:44px;touch-action:manipulation}
  input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px;flex-shrink:0}
  :focus-visible{outline:2px solid #82c7ff;outline-offset:3px}
  .bvg-mobile-table-scroll,.admin-table-wrap,.scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .bvg-mobile-table-scroll{width:100%;min-width:0}
  .bvg-mobile-table-scroll:focus-visible{outline-offset:-2px}
  pre{max-width:100%;overflow-x:auto;box-sizing:border-box}
  .bmwx-code-box,.account-row strong,.member-account-strip,.suite-account-strip{overflow-wrap:anywhere}
  .bvg-admin-layout .admin-shell{padding-left:0!important;padding-right:0!important}
  .bvg-admin-sidebar nav a,.bvg-admin-tabs a{min-height:44px;box-sizing:border-box;display:flex;align-items:center}
}
@media screen and (max-width:600px){
  .hero-wrap,.bottom-feature-wrap,.bvg-container{max-width:100%;box-sizing:border-box}
  .hero-wrap{padding:28px 16px;gap:24px}
  .hero-left,.hero-right{min-width:0}
  .metal-logo{font-size:clamp(28px,8.5vw,48px)!important;letter-spacing:-1px!important}
  .hero-tagline{font-size:16px;line-height:1.5}
  .hero-actions{display:flex;flex-direction:column;align-items:stretch}
  .hero-actions .hero-btn{width:100%;box-sizing:border-box;justify-content:center;white-space:normal;text-align:center}
  .hero-point p,.bottom-feature p{font-size:14px;line-height:1.55}
  .bottom-feature-wrap{grid-template-columns:1fr;padding:0 16px 24px}
  .bvg-container{padding-left:16px;padding-right:16px}
  .zcsfa-title-row h1,.fsc-title-row h1,.ccid-title-row h1,.ambient-tool-line h1,.bvg-tool-page-heading h1,.access-page-head h1{font-size:clamp(27px,8vw,36px)!important;line-height:1.12!important;letter-spacing:-1px!important;overflow-wrap:anywhere}
  .bvg-page-heading,.zcsfa-title-row,.ccid-title-row,.ambient-tool-heading,.ambient-tool-line,.whr-heading,.bmwx-hero,.bmwx-panel-head-wide{flex-direction:column;align-items:flex-start;gap:12px}
  .main-grid,.zcsfa-workspace,.zcsfa-fields,.ccid-grid,.whr-grid,.whr-workflow,.bmwx-grid-two,.bmwx-lower-grid,.bmwx-vehicle-grid,.ambient-dashboard-grid,.ambient-edit-grid,.ambient-bdc2-editor,.ambient-actions-bar{grid-template-columns:minmax(0,1fr)!important}
  .search-row{display:flex;flex-direction:column;align-items:stretch}
  .search-row input,.search-row button{width:100%;min-width:0;box-sizing:border-box}
  .zcsfa-form-actions,.zcsfa-preview-footer,.ccid-id-row,.ambient-upload-actions,.bmwx-pair-row,.account-actions{flex-wrap:wrap;gap:10px}
  .zcsfa-form-actions>button,.bmwx-pair-row>button,.account-actions>.button-link{flex:1 1 160px}
  .ambient-analysis-bar{flex-wrap:wrap}
  .ambient-analysis-stat,.ambient-analyzed{min-width:0;flex:1 1 90px;padding:10px}
  .ambient-analysis-bar .new-file{margin:10px;width:calc(100% - 20px)}
  .ambient-library-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ambient-preview-head{flex-wrap:wrap}
  .ambient-drop{flex-wrap:wrap}.ambient-drop-copy{flex-basis:150px}
  .ambient-browse{min-height:44px;display:flex;align-items:center}
  .ambient-action-button,.ambient-download-button{justify-content:center;min-height:48px}
  .member-dashboard,.bmwx-shell,.whr-shell,.ccid-shell,.zcsfa-shell{max-width:100%;box-sizing:border-box;padding-left:14px;padding-right:14px}
  .suite-tool-grid,.member-status-grid,.suite-status-grid,.tool-catalog{grid-template-columns:minmax(0,1fr)!important}
  .suite-tool-actions,.member-dashboard-actions{flex-wrap:wrap}
  .suite-tool-action{min-height:44px;display:flex;align-items:center;justify-content:center}
  .bvg-admin-layout .member-profile-card,.bvg-admin-layout .admin-section{padding:16px}
  .bvg-admin-layout .member-tool-control-row{padding:14px 0}
  .bvg-admin-layout .member-tool-control-row>form{width:100%;align-items:stretch}
  .bvg-admin-layout .member-tool-control-row>form>*{max-width:100%;box-sizing:border-box}
  .bvg-admin-layout .member-tool-control-row>form>input{min-width:0;flex:1 1 100%}
  .bvg-admin-layout .admin-action-cluster form,.bvg-admin-layout .delete-member-form{display:flex;flex-wrap:wrap;gap:10px}
  .bvg-admin-layout .admin-action-cluster form>input:not([type=hidden]),.bvg-admin-layout .delete-member-form>input:not([type=hidden]){width:100%;min-width:0}
  .bvg-admin-layout .ista-form{align-items:stretch;flex-direction:column}
  .bvg-admin-layout .ista-form label{min-width:0;width:100%}
  .bvg-registration-page>.member-auth-brand{padding:24px 18px}
  .bvg-registration-page .member-auth-brand-copy{margin-top:20px}
  .bvg-registration-page>.member-auth-form-wrap{padding:24px 18px}
  .member-message-page>.bvg-contact-strip{grid-column:1/-1}
  .member-message-page{grid-template-rows:58px auto 1fr}
  .member-message-card{box-sizing:border-box;overflow-wrap:anywhere}
}
@media (prefers-reduced-motion:reduce){
  .approved-home .hud-ring,.approved-home .hero-car,.approved-home .approved-circuit{animation:none!important}
}
@media screen and (max-width:600px){
  .bvg-registration-page .member-auth-brand-copy h1{font-size:clamp(27px,8vw,40px);line-height:1.15}
  .ccid-file-picker{min-width:0;max-width:100%;box-sizing:border-box;flex-wrap:wrap}
  .ccid-file-picker input[type=file]{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
}
@media screen and (max-width:600px){
  .ccid-file-picker{position:relative}
  .ccid-file-picker input[type=file]{width:1px;height:1px;min-height:1px;padding:0;inset:0}
  .ccid-file-picker:focus-within{outline:2px solid #82c7ff;outline-offset:3px}
}
