diff --git a/src/client/components/pwa-install-prompt.tsx b/src/client/components/pwa-install-prompt.tsx
new file mode 100644
index 0000000..463df61
--- /dev/null
+++ b/src/client/components/pwa-install-prompt.tsx
@@ -0,0 +1,93 @@
+import { useEffect, useState } from 'react';
+
+declare global {
+ interface Navigator { standalone?: boolean }
+}
+
+const LAST_SHOWN_KEY = 'pwaInstallPrompt_lastShown';
+
+function isIOS(): boolean {
+ if (typeof navigator === 'undefined') return false;
+ const ua = navigator.userAgent || '';
+ const iOS = /iPhone|iPad|iPod/i.test(ua);
+ const iPadOS13Plus = /Macintosh/.test(ua) && 'ontouchend' in document;
+ return iOS || iPadOS13Plus;
+}
+
+function isSafari(): boolean {
+ const ua = navigator.userAgent || '';
+ const isSafari = /Safari/i.test(ua) && !/CriOS|FxiOS|EdgiOS/i.test(ua);
+ return isSafari;
+}
+
+function isStandalone(): boolean {
+ const navStandalone = (navigator as any)?.standalone === true;
+ const mm = typeof window !== 'undefined' && window.matchMedia
+ ? window.matchMedia('(display-mode: standalone)').matches
+ : false;
+ return Boolean(navStandalone || mm);
+}
+
+export function PWAInstallPrompt({ hidden = false }: { hidden?: boolean }) {
+ if (hidden) return null;
+ const [show, setShow] = useState(false);
+ const [initialized, setInitialized] = useState(false);
+
+ useEffect(() => {
+ // Only run on client
+ if (typeof window === 'undefined') return;
+
+ const eligible = isIOS() && isSafari() && !isStandalone();
+ if (!eligible) {
+ setInitialized(true);
+ return;
+ }
+
+ let lastShown = 0;
+ try {
+ lastShown = Number(localStorage.getItem(LAST_SHOWN_KEY) || 0);
+ } catch {}
+ const oneWeek = 7 * 24 * 60 * 60 * 1000;
+ const shouldShow = !lastShown || Date.now() - lastShown > oneWeek;
+
+ setShow(shouldShow);
+ setInitialized(true);
+ }, []);
+
+ const dismiss = () => {
+ try { localStorage.setItem(LAST_SHOWN_KEY, String(Date.now())); } catch {}
+ setShow(false);
+ };
+
+ if (!initialized || !show) return null;
+
+ return (
+
+
+
+
+
📱
+
+
App installieren
+
So installierst du Stargirlnails als App auf deinem iPhone/iPad:
+
+ - Öffne diese Seite in Safari (nicht Chrome oder andere Browser).
+ - Tippe auf das Teilen-Symbol (□↑) unten in der Mitte.
+ - Scrolle nach unten und wähle „Zum Home-Bildschirm".
+ - Tippe auf „Hinzufügen".
+
+
✨ Schneller Zugriff, keine App-Store-Installation nötig, automatische Updates.
+
+
+
+
+ );
+}
+
+export default PWAInstallPrompt;
+