/* Mobile overrides load last; desktop presentation and production logic stay intact. */
.mobile-toolbar,.mobile-nav-close,.mobile-nav-shade{display:none}
@media(max-width:760px){
 html,body{min-height:100%;width:100%}
 .mobile-toolbar{display:flex;align-items:center;gap:16px;position:fixed;inset:0 0 auto;height:calc(60px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;background:#fff;border-bottom:1px solid var(--line);z-index:40}
 .mobile-toolbar button{min-height:44px;padding:0 12px;border:1px solid #dce2eb;border-radius:10px;background:#fff;color:#315ee8;font:inherit}
 .mobile-toolbar strong{font-size:17px}
 body .app-shell{display:block;padding-top:calc(60px + env(safe-area-inset-top))}
 body .app-shell>.sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(88vw,320px)!important;height:100dvh;max-height:none!important;padding:calc(60px + env(safe-area-inset-top)) 14px 24px!important;z-index:92;transform:translateX(-105%);visibility:hidden;overflow-y:auto;overscroll-behavior:contain;transition:transform .2s ease,visibility .2s}
 body.mobile-nav-open .app-shell>.sidebar{display:flex!important;transform:translateX(0);visibility:visible}
 body .app-shell>.sidebar .nav-list{display:grid!important;overflow:visible!important}
 body .app-shell>.sidebar .workspace-switch,body .app-shell>.sidebar .profile,body .app-shell>.sidebar .service-mini,body .app-shell>.sidebar .nav-system{display:revert}
 body .app-shell>.sidebar .nav-item{min-height:48px;width:100%}
 .mobile-nav-close{display:block;position:absolute;right:12px;top:calc(8px + env(safe-area-inset-top));width:44px;height:44px;border:1px solid #dce2eb;border-radius:12px;background:#fff;font-size:28px;color:#344158}
 .mobile-nav-shade:not([hidden]){display:block;position:fixed;inset:0;border:0;background:#14243f70;z-index:91;width:100%;height:100dvh}
 body .app-shell>.main-area{margin-left:0;width:100%;min-width:0}
 body .app-shell .topbar{position:static;height:auto;min-height:70px;padding:16px 12px;gap:12px;flex-wrap:wrap}
 .topbar h1{font-size:22px}.topbar p{font-size:10px}.top-actions{margin-left:auto}
 body .view{padding:12px 12px calc(24px + env(safe-area-inset-bottom));width:100%;min-width:0}
 #projectListPane,#projectEditorPane{width:calc(100% - 24px)}
 .studio-layout,.dashboard-grid,.buyer-layout,.project-identity-card,.project-identity-fields,.form-grid,.photo-model-controls,.seed-output-settings,.ca-options,.sv-fields-grid,.production-action-row,.photo-board-row,.pq-submit,.ca-submit-row .pq-submit,.sv-workspace .pq-submit{grid-template-columns:minmax(0,1fr)!important}
 .project-grid,.project-module-grid,.home-recent-grid,.quick-grid{grid-template-columns:minmax(0,1fr)}
 .stats-grid,.statistics-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .buyer-side{position:static}.buyer-section,.ca-card,.panel,.project-identity-card{padding:16px;min-width:0}
 .photo-board-row>.photo-board-card,.photo-board-row>.photo-board-actions{grid-column:auto;grid-row:auto}
 .production-action-row>.production-start-button,.pq-submit>.primary-button{min-height:84px}
 .hero-copy{padding:20px}.hero-copy h2{font-size:22px}
 .project-context-bar,.buyer-save-row,.buyer-result-head,.buyer-result-head-actions,.library-toolbar{flex-wrap:wrap;gap:8px}
 .buyer-stepper{display:flex;overflow-x:auto;max-width:100%;gap:12px}.buyer-stepper>i{display:none}.buyer-stepper button{flex:0 0 auto}
 .field input,.field select,.field textarea,.ca-card input,.ca-card select,.ca-card textarea,.request-review textarea,.request-review select{font-size:16px!important;max-width:100%;min-width:0}
 .modal-backdrop,.request-review-overlay{padding:8px}
 .modal-card,.action-confirm-card,.project-dialog-card{width:100%;max-width:100%;max-height:calc(100dvh - 16px);overflow-y:auto;padding:16px}
 .request-review,.request-review.pp-planner{width:100%;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:16px}
 .rr-header,.pp-planner .rr-header{padding:12px;gap:10px;flex-wrap:wrap;flex-shrink:0}
 .rr-header h3{font-size:19px}.rr-header p{font-size:12px}.rr-header small{letter-spacing:0}
 .pp-header-tools{gap:8px;max-width:100%}.pp-header-tools select{max-width:100%;min-width:0}
 .rr-scroll{padding:12px;flex:1;min-height:0;overscroll-behavior:contain}
 .rr-rule{padding:12px}.pp-planner .pp-suggestions-card>.rr-rule-heading>div{min-width:0}
 .rr-footer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));flex-shrink:0;max-height:42dvh;overflow-y:auto}
 .rr-footer>div{display:flex;flex-wrap:wrap;gap:8px}.rr-footer button{flex:1 1 auto;min-height:44px;white-space:normal;padding:10px}
 .rr-footer .ai-model-fields{flex-basis:100%;min-width:0}.rr-footer p{margin-bottom:8px}
 .modal-actions{flex-wrap:wrap}.modal-actions button{min-height:44px}
 .library-batch-bar,.library-batch-bar>div{flex-wrap:wrap;gap:8px;min-width:0}
 .simple-module-card{grid-template-columns:40px minmax(0,1fr);gap:10px}.simple-module-card>label,.simple-module-card>.module-image-input{grid-column:1/-1;min-width:0}.simple-module-card button{min-height:44px}
 .simple-module-description{grid-column:1/-1;min-width:0}.module-image-heading{flex-wrap:wrap}
 .pp-planner .pp-suggestions-card>.rr-rule-heading>div{flex-basis:100%}.pp-planner .rr-footer button{white-space:normal}
 .simple-module-list{grid-template-columns:minmax(0,1fr);min-width:0}.simple-module-card{min-width:0}.module-image-actions button{white-space:normal}
 .seed-bulk-reference-control{flex-wrap:wrap;display:flex;gap:10px}.seed-bulk-reference-control>*{min-width:0;max-width:100%}
 .rr-rule-heading{flex-wrap:wrap}.rr-picker select{min-width:0}
}
