/* ============================================================
   Naturerlebnis PWA — App-Shell
   ============================================================ */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--lichtgrau);
    color: var(--normal-text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--nabu-blau); }

img { max-width: 100%; }

/* ── Kopfbereich ──────────────────────────────────────────── */

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--app-header-height);
    padding: 0 16px;
    background: var(--nabu-blau);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.app-header__logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
}

.app-header__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__subtitle {
    font-size: 0.7rem;
    opacity: .85;
    font-weight: 400;
}

.app-header__back {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px 6px;
    margin-left: -6px;
    border-radius: 6px;
}
.app-header__back:active { background: rgba(255,255,255,.15); }

/* ── Hauptbereich ─────────────────────────────────────────── */

.app-main {
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 16px;
    padding-bottom: calc(96px + var(--safe-bottom));
    min-height: calc(100vh - var(--app-header-height));
}

.app-lade-hinweis {
    text-align: center;
    color: var(--text-headline-sub);
    padding: 40px 0;
    font-size: 0.9rem;
}

.app-offline-banner {
    display: none;
    background: var(--gelb-dunkel-60);
    color: #fff;
    font-size: 0.8rem;
    text-align: center;
    padding: 6px 10px;
}
.app-offline-banner--sichtbar { display: block; }

/* ── Footer ───────────────────────────────────────────────── */

.app-footer {
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 20px 16px 40px;
    font-size: 0.75rem;
    color: var(--text-headline-sub);
    text-align: center;
}
.app-footer a { color: inherit; text-decoration: underline; }

/* ============================================================
   Install-Overlay (Bottom Sheet) — "Zum Home-Bildschirm"
   ============================================================ */

.install-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.32,.72,0,1);
    padding: 14px 14px calc(14px + var(--safe-bottom));
}
.install-overlay--sichtbar { transform: translateY(0); }

.install-overlay__karte {
    max-width: 520px;
    margin: 0 auto;
    background: var(--main-background);
    border-radius: 16px;
    box-shadow: 0 -2px 3px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.25);
    padding: 14px 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
}

.install-overlay__icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.install-overlay__content { flex: 1; min-width: 0; }

.install-overlay__title {
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0 0 2px;
    color: var(--normal-text-color);
}

.install-overlay__text {
    font-size: 0.8rem;
    color: var(--text-headline-sub);
    margin: 0 0 10px;
    line-height: 1.4;
}

.install-overlay__text strong { color: var(--normal-text-color); }

/* iOS-Schritte mit Symbolen */
.install-overlay__steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.install-overlay__step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--normal-text-color);
}
.install-overlay__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--nabu-blau);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}
.install-overlay__step-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.install-overlay__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.install-overlay__btn {
    background: var(--dunkelgruen);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.install-overlay__btn:active { background: var(--dunkelgruen-dunkel-30); }

.install-overlay__dismiss {
    background: none;
    border: none;
    color: var(--text-headline-sub);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 8px 4px;
}

.install-overlay__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--lichtgrau);
    color: var(--dunkelgrau);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 380px) {
    .install-overlay__icon { display: none; }
}
