.ui-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; } .ui-modal--bottom { display: flex; align-items: flex-end; justify-content: center; } .ui-modal--center { display: flex; align-items: center; justify-content: center; } .ui-modal__overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.45); animation: uiModalFade 0.25s ease; } .ui-modal__body { position: relative; background: var(--card-bg); box-sizing: border-box; } .ui-modal--bottom .ui-modal__body { width: 100%; border-radius: 32rpx 32rpx 0 0; padding: 28rpx 32rpx 40rpx; /* bottom sheet 需要避开 Dock TabBar (占视口底部 ~158rpx)。 168rpx 留出可见间距。 */ padding-bottom: calc(168rpx + env(safe-area-inset-bottom)); animation: uiModalSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1); } .ui-modal--center .ui-modal__body { width: 560rpx; border-radius: 28rpx; padding: 48rpx 40rpx 36rpx; animation: uiModalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); text-align: center; } .ui-modal__handle { width: 64rpx; height: 8rpx; background: var(--bg-soft); border-radius: 4rpx; margin: 0 auto 24rpx; } @keyframes uiModalFade { from { opacity: 0; } to { opacity: 1; } } @keyframes uiModalSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } @keyframes uiModalPop { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.05); } to { transform: scale(1); opacity: 1; } }