diff --git a/mechanic-pwa/frontend/src/index.css b/mechanic-pwa/frontend/src/index.css index 90fffd9..6f8cbf4 100644 --- a/mechanic-pwa/frontend/src/index.css +++ b/mechanic-pwa/frontend/src/index.css @@ -31,5 +31,20 @@ * { @apply border-border; } body { @apply bg-background text-foreground font-sans; + /* iOS PWA: status bar (status-bar-style=black-translucent) и home-indicator + перекрывают контент при viewport-fit=cover. Сдвигаем body content вниз + на высоту safe-area, чтобы шапки/кнопки не уезжали под системные зоны. */ + padding-top: env(safe-area-inset-top); + padding-bottom: env(safe-area-inset-bottom); + } +} + +@layer utilities { + /* iOS PWA: position:sticky + top:0 прилипает к самому верху viewport, + т.е. под статус-бар (containing-block тут не помогает). Переопределяем + top у всех Tailwind .top-0, чтобы шапки залипали ниже notch. */ + .sticky.top-0, + .fixed.top-0 { + top: env(safe-area-inset-top); } }