/* v5.2 — last layer: mobile/tablet fixes + accessibility. Loaded after every other stylesheet. */
html,body{overflow-x:clip}
:where(button,select,input,textarea,a,[tabindex]):focus-visible{outline:3px solid #0f766e!important;outline-offset:2px!important}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media (max-width:900px){
 .page,.studio-view,.home-view{max-width:100%!important;min-width:0!important}
 .page{padding-inline:max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-left))!important}
 /* header: brand on top, controls wrap beneath, nothing truncated */
 .site-header,.global-commandbar{height:auto!important;min-height:0!important;max-height:none!important}
 .site-header{display:flex!important;overflow:visible!important;flex-wrap:wrap!important;gap:8px!important;padding:8px 10px!important;position:static!important}
 .site-header .brand{flex:1 1 100%!important;min-width:0!important}
 .site-header .sub{white-space:normal!important}
 .header-links{display:flex!important;flex:1 1 100%!important;gap:6px!important;overflow-x:auto;scrollbar-width:none}
 .header-link{flex:1 0 auto!important;min-height:44px!important;justify-content:center!important;white-space:nowrap!important}
 .header-actions{display:flex!important;flex:1 1 100%!important;flex-wrap:wrap!important;gap:6px!important}
 .header-actions select{flex:1 1 110px!important;min-width:0!important;width:auto!important;max-width:none!important;min-height:44px!important;font-size:16px!important;text-overflow:clip!important}
 .header-actions .icon-btn{flex:0 0 44px!important;width:44px!important;height:44px!important}
 /* command bar: wrap instead of overflowing */
 .global-commandbar{position:static!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:8px!important;overflow:visible!important}
 .global-commandbar>*,.format-section,.ratio-quickbar{min-width:0!important;max-width:100%!important}
 .format-section{flex:1 1 100%!important;flex-wrap:wrap!important}
 .format-section>.quickbar-actions,.format-section>.ratio-quickbar{flex:1 1 100%!important}
 .ratio-quickbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;overflow:visible!important}
 .ratio-option{flex:1 1 56px!important;min-height:44px!important}
 .quickbar-actions{display:flex!important;flex:1 1 100%!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:8px!important}
 .quickbar-actions .sync-review-toggle.sync-top{flex:1 1 150px!important;width:auto!important;min-width:0!important;height:44px!important;padding:0 12px!important;font-size:14px!important;white-space:nowrap!important}
 .quickbar-actions #exportBtn{width:44px!important;min-width:44px!important;height:44px!important;flex:0 0 44px!important}
 .quickbar-actions .ai-review-notice .notice-toggle{width:auto!important;min-width:44px!important;height:44px!important;padding:0 12px!important;font-size:14px!important}
 .ai-review-notice{flex:1 1 100%!important;max-width:100%!important;min-width:0!important}
 .ai-review-notice.notice-collapsed{flex:0 0 auto!important;position:static!important;inset:auto!important}
 .quickbar-actions .ai-review-notice .notice-toggle{position:static!important}
 .notice-message{position:static!important;width:auto!important;max-width:100%!important}
 /* inputs: ≥16px stops iOS zoom; ≥44px touch targets */
 .studio-view input,.studio-view select,.studio-view textarea{font-size:16px!important;min-height:44px!important;max-width:100%!important}
 .studio-view button{min-height:44px!important}
 .home-features{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:0!important;padding:0!important;width:100%!important}
 .home-feature{min-width:0!important}
 .home-feature strong,.home-feature small{overflow-wrap:anywhere}
}
@media (max-width:520px){
 .home-features{grid-template-columns:1fr!important}
 .header-link-icon{display:none}
}
