/* Phone usability fixes verified against the November 18 recording. */
@media(max-width:640px){
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar:not([hidden]){width:min(300px,calc(100vw - 48px))!important;padding:16px!important;gap:12px!important;align-items:stretch!important;overflow-y:auto;overscroll-behavior:contain}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar .classic-drawer-head{flex-direction:row!important;justify-content:space-between!important;align-items:center!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #sidebarClose{order:1!important;margin:0!important;width:44px!important;height:44px!important;min-height:44px!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar .product-company{justify-content:flex-start!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #createBtn{min-height:48px!important;padding:12px 16px!important;font-size:16px!important;color:var(--brand-on-gold,#fff)!important;text-align:left!important;white-space:normal!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #createBtn::before,
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #createBtn::after{content:none!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar>nav .nav{flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;height:auto!important;min-height:48px!important;padding:12px!important;gap:14px!important;text-align:left!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar>nav .nav>span:last-of-type{font-size:16px!important;line-height:1.4!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar>a.product-settings,
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #authLogoutBtn{font-size:16px!important;min-height:48px!important;padding:12px!important;text-align:left!important}
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar>a.product-settings::after,
 html body .app.product-pages-shell[data-sidebar-mode=compact] #appSidebar #authLogoutBtn::after{content:none!important}
 html body .app.product-pages-shell #projectDailyLogScreen .dl-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html body .app.product-pages-shell #projectDailyLogScreen .dl-summary>div{padding:12px!important;min-height:0!important}
 html body .app.product-pages-shell #projectDailyLogScreen .dl-summary>div:last-child{grid-column:1/-1}
 html body .app.product-pages-shell #projectDailyLogScreen .dl-summary strong{font-size:24px!important;line-height:1.25!important;margin:4px 0!important}
 html body .app.product-pages-shell #projectDailyLogScreen .dl-summary small{font-size:12px!important;line-height:1.4!important}
 #dailyLogModal .dl-form-grid>label{min-width:0}
 #dailyLogModal input[type=date]{max-width:100%;min-width:0;box-sizing:border-box}
 #dailyLogModal .dev41-head,#dailyLogModal .dev39-crew-head{flex-wrap:wrap;gap:12px}
 #dailyLogModal #dev41AddMaterial,#dailyLogModal #dev39AddCrewBtn{flex:0 0 auto;white-space:nowrap;word-break:normal;overflow-wrap:normal;min-width:140px;min-height:44px}
}

/* Real photos keep their labels on a readable surface, in either theme. */
html body .app.product-pages-shell .photo-gallery .dev40-real-photo{aspect-ratio:auto!important;display:flex;flex-direction:column;background:var(--brand-surface);border:1px solid var(--brand-line)}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo::after{content:none!important}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo>img{width:100%;height:160px;object-fit:cover;border-radius:0;flex:none}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo .photo-badge{color:#fff!important;background:rgba(0,0,0,.78)!important;font-size:12px!important;line-height:1.3;padding:6px 9px;max-width:calc(100% - 18px)}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo .photo-caption{position:static!important;padding:12px!important;color:var(--brand-text)!important;background:var(--brand-surface);overflow-wrap:anywhere}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo .photo-caption strong{color:var(--brand-text)!important;font-size:15px!important;line-height:1.4!important}
html body .app.product-pages-shell .photo-gallery .dev40-real-photo .photo-caption small{color:var(--brand-muted)!important;font-size:13px!important;line-height:1.4!important;opacity:1}
@media(max-width:420px){html body .app.product-pages-shell .photo-gallery .dev40-real-photo>img{height:132px}}
