/* ===========================================================
   SbyCrewConnect – Apple / iOS inspired UI
   Klar, luftig, touch-optimiert, sanfte Motion
   =========================================================== */

:root {
    --navy: #1c1c1e;
    --navy-light: #2c2c2e;
    --accent: #007aff;
    --accent-dark: #0066d6;
    --accent-light: rgba(0, 122, 255, 0.12);
    --green: #34c759;
    --green-dark: #248a3d;
    --green-light: rgba(52, 199, 89, 0.14);
    --bg: #f2f2f7;
    --bg-elevated: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.82);
    --text: #1c1c1e;
    --muted: #8e8e93;
    --border: rgba(60, 60, 67, 0.12);
    --separator: rgba(60, 60, 67, 0.18);
    --success: #34c759;
    --success-bg: rgba(52, 199, 89, 0.14);
    --error: #ff3b30;
    --error-bg: rgba(255, 59, 48, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --blur: saturate(180%) blur(20px);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
    --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --touch: 44px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-elevated: #1c1c1e;
        --card-bg: rgba(28, 28, 30, 0.86);
        --text: #f5f5f7;
        --muted: #98989d;
        --border: rgba(84, 84, 88, 0.45);
        --separator: rgba(84, 84, 88, 0.55);
        --navy: #f5f5f7;
        --navy-light: #2c2c2e;
        --accent-light: rgba(10, 132, 255, 0.22);
        --green-light: rgba(48, 209, 88, 0.18);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes soft-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(0, 122, 255, 0.1), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(52, 199, 89, 0.08), transparent 50%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    min-height: 100dvh;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    padding-bottom: var(--safe-bottom);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    animation: fade-up 0.55s var(--ease-out) both;
}
h2 {
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Auth-Seiten ---------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0, 122, 255, 0.35), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(52, 199, 89, 0.2), transparent 45%),
        #0a0a0c;
}

.auth-card {
    background: var(--bg-elevated);
    border-radius: 28px;
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: scale-in 0.5s var(--ease-out) both;
    border: 1px solid var(--border);
}

.brand { color: var(--text); margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -0.03em; }
.subtitle { color: var(--muted); margin-top: 0; }

/* ---------- Formulare ---------- */
label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
input, select, textarea {
    width: 100%;
    padding: 13px 14px;
    min-height: var(--touch);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 16px; /* iOS: verhindert Auto-Zoom */
    font-family: inherit;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
    -webkit-appearance: none;
    appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
textarea { resize: vertical; min-height: 88px; }
.hint { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }

.btn-primary {
    margin-top: 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 20px;
    min-height: var(--touch);
    border-radius: var(--radius-pill);
    font-size: 1.02rem;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.28);
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-small {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 10px 16px;
    min-height: 36px;
    font-size: 0.9rem;
}

.btn-add {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 11px 18px;
    min-height: 40px;
    border-radius: var(--radius-pill);
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(52, 199, 89, 0.28);
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out);
    display: inline-flex;
    align-items: center;
}
.btn-add:hover { background: var(--green-dark); }
.btn-add:active { transform: scale(0.96); }

.btn-ghost {
    background: rgba(120, 120, 128, 0.12);
    border: none;
    color: var(--text);
    padding: 10px 16px;
    min-height: 40px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: inherit;
    font-weight: 550;
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.btn-ghost:hover { background: rgba(120, 120, 128, 0.2); text-decoration: none; }
.btn-ghost:active { transform: scale(0.96); }

.switch-link { text-align: center; margin-top: 18px; font-size: 0.9rem; }

.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 0.92rem;
    animation: fade-up 0.4s var(--ease-out) both;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
}
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* Flash-Meldung direkt unter der Navigation */
.page-flash {
    max-width: 980px;
    margin: 12px auto 0;
    width: calc(100% - 36px);
}

/* Hinweisbanner „E-Mail bestätigen“ */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px max(16px, var(--safe-right)) 10px max(16px, var(--safe-left));
    background: rgba(255, 159, 10, 0.14);
    color: #9a6400;
    font-size: 0.88rem;
    font-weight: 550;
    border-bottom: 1px solid rgba(255, 159, 10, 0.25);
    animation: fade-up 0.4s var(--ease-out) both;
}
@media (prefers-color-scheme: dark) {
    .verify-banner { color: #ffd7a0; background: rgba(255, 159, 10, 0.16); }
}
.verify-banner form { margin: 0; display: inline; }
.verify-banner-btn {
    background: rgba(255, 159, 10, 0.22);
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 650;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out);
}
.verify-banner-btn:hover { background: rgba(255, 159, 10, 0.32); }
.verify-banner-btn:active { transform: scale(0.96); }

/* ---------- Navigation (Glass) ---------- */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: var(--text);
    padding: calc(10px + var(--safe-top)) 18px 10px;
    flex-wrap: nowrap;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.25s var(--ease-out);
}
@media (prefers-color-scheme: dark) {
    .topnav { background: rgba(28, 28, 30, 0.78); }
}
.topnav .brand {
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    object-fit: cover;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.brand-text { line-height: 1; }

/* Eingecheckter Flughafen im Header – dunkles Chip wie der Airport-Header */
.topnav-airport {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: auto;
    padding: 5px 7px 5px 11px;
    border-radius: 12px;
    background: linear-gradient(145deg, #1c1c1e 0%, #2c2c2e 55%, #3a3a3c 100%);
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out);
}
.topnav-airport:hover { text-decoration: none; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.topnav-airport:active { transform: scale(0.96); }
.topnav-airport-icao {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    color: #f5f5f7;
    line-height: 1;
}
.topnav-airport-iata {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #4da3ff;
    background: rgba(10, 132, 255, 0.18);
    padding: 3px 6px;
    border-radius: 7px;
    line-height: 1;
}
/* Wenn das Flughafen-Chip da ist, weicht der App-Name auf Mobil */
.topnav:has(.topnav-airport) .brand-text { display: none; }
@media (min-width: 721px) {
    .topnav:has(.topnav-airport) .brand-text { display: inline; }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 4px;
}
.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}
.auth-brand .brand {
    margin: 0;
    font-size: 1.55rem;
}
.topnav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav-links a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 9px 14px;
    min-height: 38px;
    border-radius: var(--radius-pill);
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
    display: inline-flex;
    align-items: center;
}
.nav-icon { margin-right: 4px; }
.topnav-links a:hover {
    color: var(--text);
    text-decoration: none;
    background: rgba(120, 120, 128, 0.12);
}
.topnav-links a.active {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
}
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; flex-shrink: 0; }
.nav-avatar-link {
    display: flex;
    border-radius: 50%;
    line-height: 0;
    transition: transform 0.2s var(--ease-spring);
}
.nav-avatar-link:active { transform: scale(0.94); }
.nav-username { display: none; }
@media (min-width: 720px) { .nav-username { display: inline; } }
.nav-user .btn-ghost {
    color: var(--accent);
    background: var(--accent-light);
    padding: 8px 14px;
    font-weight: 600;
}
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
}
.nav-badge[hidden] { display: none !important; }
.msg-new-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--error);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* Bottom Tab Bar – mobil (iOS-Style) */
.bottom-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + var(--safe-bottom));
    justify-content: space-around;
    align-items: stretch;
    gap: 4px;
}
@media (prefers-color-scheme: dark) {
    .bottom-tabbar { background: rgba(28, 28, 30, 0.9); }
}
.tab-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 4px;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
}
.tab-item:hover { text-decoration: none; color: var(--text); }
.tab-item:active { transform: scale(0.96); }
.tab-item.is-active {
    color: var(--accent);
    background: var(--accent-light);
}
.tab-icon { font-size: 1.25rem; line-height: 1; }
.tab-label { font-size: 0.68rem; letter-spacing: 0.01em; }
.tab-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    margin: 0;
    min-width: 16px;
    height: 16px;
    font-size: 0.62rem;
}

/* ---------- Sub-Navigation (iOS Segmented) ---------- */
.subnav {
    display: flex;
    gap: 0;
    background: rgba(120, 120, 128, 0.12);
    width: calc(100% - 36px);
    max-width: 944px;
    margin: 14px auto 0;
    padding: 3px;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    animation: fade-up 0.45s var(--ease-out) both;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav-tab {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    min-height: 40px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--muted);
    border-bottom: none;
    white-space: nowrap;
    border-radius: 10px;
    transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.2s var(--ease-spring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.subnav-tab:hover { color: var(--text); text-decoration: none; }
.subnav-tab:active { transform: scale(0.97); }
.subnav-active {
    color: var(--text);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

/* ---------- Layout ---------- */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 18px calc(48px + var(--safe-bottom));
}
.container-narrow { max-width: 560px; }
.section-title { margin-top: 40px; }
.settings-first { margin-top: 20px; }

.card-form {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 14px 0;
    box-shadow: var(--shadow-sm);
    animation: scale-in 0.4s var(--ease-out) both;
}

details.card-form summary { cursor: pointer; list-style: none; }
details.card-form summary::-webkit-details-marker { display: none; }

.form-row { display: flex; gap: 14px; }
.form-row > div { flex: 1; }

/* ---------- Dashboard ---------- */
.my-status-banner {
    background: var(--accent-light);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    animation: fade-up 0.5s var(--ease-out) both;
}

.airport-group { margin-bottom: 28px; }
.pilot-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.pilot-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pilot-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
}
.pilot-card:active { transform: scale(0.985); }
.avatar-placeholder {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), #5ac8fa);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    border: 1px solid var(--border);
}
.avatar-edit-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.avatar-upload-label { cursor: pointer; display: inline-block; }
.note { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); }
.grow { flex: 1; }
.inline-form { display: flex; gap: 8px; }
.pilot-card { flex-wrap: wrap; }
.conversation-card { text-decoration: none; color: inherit; }
.conversation-card:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow-md); }

.chat-header { display: flex; align-items: center; gap: 14px; margin: 10px 0 4px; }
.chat-header-name { margin: 0; }
.settings-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Avatar-Blasen auf Leaflet-Karten ---------- */
.map-avatar-bubble { background: none; border: none; }
.map-avatar-bubble .bubble-inner {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-weight: 700;
    color: var(--accent);
}
.map-avatar-bubble .bubble-inner img { width: 100%; height: 100%; object-fit: cover; }
.map-dot-icon { background: none; border: none; }
.map-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-sm); }

/* ---------- Chat ---------- */
.chat-window {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 300px;
    max-height: 60vh;
    overflow-y: auto;
    margin: 16px 0;
    -webkit-overflow-scrolling: touch;
}
.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    position: relative;
    animation: scale-in 0.3s var(--ease-out) both;
}
.chat-mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.chat-theirs { align-self: flex-start; background: rgba(120, 120, 128, 0.16); border-bottom-left-radius: 6px; }
.chat-time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 4px; }
.chat-input-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-form textarea { flex: 1; }

/* ---------- Karte ---------- */
.map-controls { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.toggle-label input { width: auto; min-height: auto; }
.map-container {
    width: 100%;
    height: min(62vh, 520px);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: scale-in 0.5s var(--ease-out) both;
}
/* ---------- Flugnummer-Suche ---------- */
[hidden] { display: none !important; }
.flight-search { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 4px; flex-wrap: wrap; }
.flight-search input {
    flex: 1 1 160px;
    min-height: 40px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.flight-search .btn-small { flex: 0 0 auto; align-self: center; }
.flight-results { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.flight-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}
.flight-card--live { border-left: 3px solid var(--accent); }
.flight-card--empty { color: var(--muted); text-align: center; }
.flight-card__title { font-weight: 650; margin-bottom: 4px; }
.flight-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.82rem; }
.flight-card__route { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 0.85rem; }
.flight-note { font-size: 0.8rem; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }
.plane-marker { background: none; border: none; }
.plane-glyph {
    font-size: 22px;
    line-height: 34px;
    text-align: center;
    color: var(--accent);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s var(--ease-out);
}

.map-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.legend-self { background: #007aff; }
.legend-friend { background: #34c759; }
.legend-public { background: #ff9f0a; }
.legend-anon { background: #8e8e93; }

/* ---------- Handling / Bewertungen ---------- */
.avg-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.avg-chip {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}

/* ---------- Check-in ---------- */
.checkin-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-sm);
    animation: fade-up 0.45s var(--ease-out) both;
}
.checkin-active {
    background: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(0, 122, 255, 0.3);
}
.checkin-active .muted { color: rgba(255, 255, 255, 0.8); }
.manual-checkin { margin-top: 10px; }
.manual-checkin summary { cursor: pointer; color: var(--muted); }

/* ---------- Empfehlungen: Flughafen-Header, Filter, Toggle ---------- */
.page-recommendations h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
}
.page-lead {
    margin: 0 0 18px;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    animation: fade-up 0.55s var(--ease-out) 0.04s both;
}
.rec-title, .rec-desc {
    transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}
.rec-title.is-swapping, .rec-desc.is-swapping {
    opacity: 0;
    transform: translateY(4px);
}

.airport-header {
    margin: 8px 0 18px;
    animation: fade-up 0.5s var(--ease-out) 0.05s both;
}
.airport-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(145deg, #1c1c1e 0%, #2c2c2e 55%, #3a3a3c 100%);
    color: #f5f5f7;
    border-radius: 22px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.airport-chip::after {
    content: "";
    position: absolute;
    inset: -40% auto auto 40%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.35), transparent 70%);
    pointer-events: none;
}
.airport-chip .muted { color: rgba(235, 235, 245, 0.6); }
.airport-chip > * { position: relative; z-index: 1; }
.airport-icao {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.35rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    border-radius: 14px;
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.airport-switch-form { margin-top: 8px; gap: 8px; }
.airport-switch-form input[type="text"] {
    width: auto;
    flex: 1;
    min-width: 160px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
}

/* Flughafen ist an den Check-in gebunden: rein informativ, nicht klickbar */
.airport-chip-static { cursor: default; }
.airport-checkin-note { margin: 8px 2px 0; }
.checkin-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.checkin-required .btn-primary { margin-top: 0; width: auto; }

.airport-inline-form { margin-top: 10px; }
.airport-field {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    max-width: 280px;
}
.airport-field input {
    flex: 1;
    border: none;
    background: transparent;
    margin: 0;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: none;
}
.airport-field input:focus {
    outline: none;
    box-shadow: none;
}
.airport-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
.airport-field-btn {
    border: none;
    background: transparent;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--accent);
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
}
.airport-field-btn:active { transform: scale(0.94); }
.airport-field-btn:hover { background: var(--accent-light); }

.category-filter-form { margin: 0; }
.chip-filter {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.chip-filter::-webkit-scrollbar { display: none; }

.rec-filter-menu {
    margin: 8px 0 12px;
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    animation: fade-up 0.45s var(--ease-out) both;
}
.rec-filter-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--text);
    user-select: none;
}
.rec-filter-summary::-webkit-details-marker { display: none; }
.rec-filter-summary::after {
    content: "▾";
    margin-left: auto;
    color: var(--muted);
    font-size: 0.75rem;
    transition: transform 0.2s var(--ease-out);
}
.rec-filter-menu[open] > .rec-filter-summary::after {
    transform: rotate(180deg);
}
.rec-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}
.rec-filter-menu .category-filter-form {
    padding: 0 12px 12px;
    border-top: 1px solid var(--border);
}
.chip-filter-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    padding: 10px 0 4px;
    mask-image: none;
}
.chip-filter-compact .chip {
    padding: 5px 9px;
    min-height: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
    box-shadow: none;
}
.chip-filter-compact .chip-icon { font-size: 0.85rem; }
.rec-filter-menu .rec-filter-reset {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.78rem;
}

.rec-filter-reset {
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--accent);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: var(--accent-light);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(120, 120, 128, 0.12);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    padding: 10px 14px;
    min-height: 40px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out), color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
.chip-icon { font-size: 1.05rem; line-height: 1; }
.chip-label { line-height: 1; }
.chip:active { transform: scale(0.96); }
.chip-all { font-weight: 700; }
.chip-active {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.28);
}
.chip-clear { color: var(--muted); text-decoration: none; background: transparent; box-shadow: none; }
.chip-clear:hover { text-decoration: none; color: var(--text); }

.rec-translated-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-size: 0.68rem;
    font-weight: 650;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.3;
    vertical-align: middle;
}
.rec-translated-badge.is-loading {
    color: var(--muted);
    background: rgba(120, 120, 128, 0.14);
    animation: soft-pulse 1.4s var(--ease-out) infinite;
}
.rec-card[open] .rec-translated-badge { font-size: 0.72rem; }

.lang-pref-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0 8px;
}
.lang-pref-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(120, 120, 128, 0.1);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
}
.lang-pref-option input { position: absolute; opacity: 0; pointer-events: none; }
.lang-pref-option.is-active {
    border-color: var(--accent);
    background: var(--accent-light);
}
.lang-pref-option:active { transform: scale(0.98); }
.lang-pref-code {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}
.language-pref-form .btn-primary { margin-top: 12px; }
.btn-logout-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--error);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.25);
    margin-top: 12px;
}
.btn-logout-mobile:hover { background: #d70015; color: #fff; text-decoration: none; }

.view-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
    flex-wrap: wrap;
    animation: fade-up 0.5s var(--ease-out) 0.12s both;
}
.toggle-btn {
    background: rgba(120, 120, 128, 0.12);
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    min-height: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
    display: inline-flex;
    align-items: center;
}
.toggle-btn:hover { text-decoration: none; color: var(--text); }
.toggle-btn:active { transform: scale(0.96); }
.toggle-active {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.add-rec-inline { margin-left: auto; }
.add-rec-inline summary { cursor: pointer; list-style: none; }
.add-rec-inline summary::-webkit-details-marker { display: none; }
.add-rec-inline .card-form {
    position: relative;
    z-index: 5;
    max-width: min(420px, 92vw);
    margin-top: 10px;
}

.comments-block {
    margin-top: 14px;
    border-top: 1px solid var(--separator);
    padding-top: 12px;
}
.comments-block summary {
    cursor: pointer;
    list-style: none;
    font-weight: 550;
    transition: color 0.2s var(--ease-out);
}
.comments-block summary::-webkit-details-marker { display: none; }
.comments-block summary:hover { color: var(--accent); }
.comment-list { list-style: none; padding: 0; margin: 8px 0; }
.comment-list li {
    font-size: 0.88rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.comment-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.comment-form input[type="text"] {
    flex: 1;
    border-radius: var(--radius-pill);
    min-height: 40px;
}

/* ---------- Empfehlungen: Ortssuche & Fotos ---------- */
.place-search-row { display: flex; gap: 8px; margin-top: 6px; align-items: stretch; }
.place-search-row input { flex: 1; margin: 0; border-radius: var(--radius-sm); }
.place-search-row .btn-ghost { flex: 0 0 auto; padding: 0 14px; margin: 0; min-width: 44px; }
.place-search-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.search-result-item {
    text-align: left;
    background: rgba(120, 120, 128, 0.1);
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.86rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
}
.search-result-item:hover { background: var(--accent); color: #fff; }
.search-result-item:active { transform: scale(0.98); }
.pick-map {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-top: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.rec-photo-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 10px 0;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rec-photo-strip::-webkit-scrollbar { display: none; }
.rec-photo-strip a {
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s var(--ease-spring);
}
.rec-photo-strip a:active { transform: scale(0.95); }
.rec-photo-strip img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
    border: none;
}

/* ---------- Empfehlungs-Karten ---------- */
.filter-bar { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; }

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.rec-card {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out), border-color 0.25s var(--ease-out);
    animation: fade-up 0.55s var(--ease-out) both;
    display: block;
    overflow: hidden;
}
.rec-card:nth-child(1) { animation-delay: 0.05s; }
.rec-card:nth-child(2) { animation-delay: 0.1s; }
.rec-card:nth-child(3) { animation-delay: 0.15s; }
.rec-card:nth-child(4) { animation-delay: 0.2s; }
.rec-card:nth-child(5) { animation-delay: 0.25s; }
.rec-card:nth-child(6) { animation-delay: 0.3s; }
.rec-card:nth-child(n+7) { animation-delay: 0.35s; }

.rec-card-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    user-select: none;
}
.rec-card-summary::-webkit-details-marker { display: none; }
.rec-card-summary::marker { content: ''; }
.rec-card-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(120, 120, 128, 0.12);
}
.rec-card-thumb-icon {
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}
.rec-card-summary-text {
    min-width: 0;
    flex: 1;
}
.rec-card-detail {
    padding: 0 12px 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.rec-card[open] {
    grid-column: 1 / -1;
}
.stars-compact {
    margin: 2px 0 0;
    font-size: 0.78rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

@media (hover: hover) {
    .rec-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: rgba(0, 122, 255, 0.25);
    }
}
.rec-card:active { transform: scale(0.985); }

.rec-category {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 650;
    letter-spacing: 0.01em;
    display: block;
    line-height: 1.2;
}
.rec-card-meta-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.rec-card-meta-row .rec-category { display: inline; }
.rec-distance {
    font-size: 0.7rem;
    font-weight: 650;
    color: var(--muted);
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2;
}
.rec-distance.is-approx { opacity: 0.8; font-style: italic; }
.rec-card[open] .rec-distance { font-size: 0.8rem; }

/* Sortierung (im Filtermenü) */
#recSortbar.is-locating a[data-sort="distance"] { opacity: 0.6; }
#recSortbar a.is-disabled { opacity: 0.45; }
.rec-sort-hint { flex-basis: 100%; margin-top: 4px; }

/* Durchschnittsbewertung (Kachel-Kopf) */
.rec-avg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rating-stars { color: #ff9f0a; letter-spacing: 1px; }
.rating-value { font-weight: 700; color: var(--text); }
.rating-count { color: var(--muted); font-weight: 500; }
.rating-empty { color: var(--muted); font-weight: 500; font-size: 0.9em; }

/* Bewertungs-Widget im Detail */
.rec-rate {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 4px;
    padding: 10px 12px;
    background: rgba(120, 120, 128, 0.1);
    border-radius: 14px;
}
.rec-rate-label { font-size: 0.85rem; font-weight: 650; color: var(--muted); }
.rec-rate-stars { display: inline-flex; }
.rec-rate-star {
    background: none;
    border: none;
    padding: 2px;
    margin: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: rgba(120, 120, 128, 0.45);
    transition: color 0.15s var(--ease-out), transform 0.15s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}
.rec-rate-star.is-on { color: #ff9f0a; }
.rec-rate-star:active { transform: scale(0.85); }
@media (hover: hover) {
    .rec-rate-star:hover { color: #ffb733; }
}
.rec-rate-remove {
    background: none;
    border: none;
    color: var(--accent);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
}
.rec-rate-saved {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--success);
    animation: fade-up 0.3s var(--ease-out) both;
}

/* Handling: Bewertung mit Kommentarfeld */
.handling-rate { align-items: stretch; }
.handling-rate .rec-rate-label { align-self: center; }
.handling-rate-comment {
    flex-basis: 100%;
    min-height: 44px;
    margin: 2px 0 0;
    font-size: 0.9rem;
}
.handling-rate-actions {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.handling-rate-actions .btn-primary { margin-top: 0; }

.rec-filter-grouplabel {
    margin: 12px 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
}
.rec-card h3,
.rec-card .rec-title {
    margin: 2px 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rec-card[open] .rec-title {
    -webkit-line-clamp: unset;
    font-size: 1.1rem;
}
.rec-desc {
    margin: 8px 0;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.45;
    opacity: 0.92;
}
.stars {
    color: #ff9f0a;
    letter-spacing: 2px;
    font-size: 1.05rem;
    margin: 6px 0;
}

.rec-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lang-toggle {
    display: inline-flex;
    background: rgba(120, 120, 128, 0.14);
    border: none;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    padding: 2px;
}
.lang-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: var(--muted);
    border-radius: 7px;
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-spring);
}
.lang-btn.active {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.lang-btn:active { transform: scale(0.94); }

.rec-map-preview {
    display: block;
    margin: 12px 0 10px;
    border-radius: 16px;
    overflow: hidden;
    border: none;
    line-height: 0;
    box-shadow: inset 0 0 0 1px var(--border);
    transition: transform 0.3s var(--ease-spring);
}
.rec-map-preview:active { transform: scale(0.98); }
.rec-map-preview img {
    width: 100%;
    height: 148px;
    object-fit: cover;
    display: block;
}

.rec-maps-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 4px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--accent);
    text-decoration: none;
    background: var(--accent-light);
    border-radius: var(--radius-pill);
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out);
    align-self: flex-start;
}
.rec-maps-link:hover { text-decoration: none; background: rgba(0, 122, 255, 0.18); }
.rec-maps-link:active { transform: scale(0.96); }

.edit-rec-block {
    margin-top: 14px;
    border-top: 1px solid var(--separator);
    padding-top: 12px;
}
.edit-rec-block summary {
    cursor: pointer;
    list-style: none;
    font-weight: 550;
}
.edit-rec-block summary::-webkit-details-marker { display: none; }
.edit-rec-form {
    margin-top: 12px;
    max-width: 100%;
    animation: scale-in 0.35s var(--ease-out) both;
}
.edit-rec-form .btn-primary { margin-top: 12px; }

/* details open: weiche Expand-Animation */
details.edit-rec-block[open] > summary,
details.comments-block[open] > summary,
details.add-rec-inline[open] > summary {
    color: var(--accent);
}

/* ---------- Sonstiges ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.empty-state {
    color: var(--muted);
    font-style: normal;
    padding: 36px 16px;
    text-align: center;
    background: rgba(120, 120, 128, 0.08);
    border-radius: var(--radius);
    animation: fade-up 0.5s var(--ease-out) both;
}
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.badge-verified { color: var(--success); font-weight: 600; }
.badge-pending { color: #ff9f0a; font-weight: 600; }

/* ---------- iOS / Mobile App Shell ---------- */
    @media (max-width: 720px) {
    :root {
        --radius: 18px;
    }

    body {
        background-attachment: scroll;
        padding-bottom: calc(64px + var(--safe-bottom));
    }

    .topnav {
        padding: calc(8px + var(--safe-top)) 14px 8px;
        gap: 8px;
    }
    .topnav .brand { font-size: 1.02rem; gap: 7px; }
    .brand-logo { width: 28px; height: 28px; border-radius: 8px; }
    .topnav-links { display: none; }
    .nav-logout { display: none; }
    .nav-username { display: none !important; }

    .bottom-tabbar { display: flex; }

    /* Nur EINE dauerhafte Navigation auf Mobil: die Tab-Leiste unten.
       Die Airport-Unternavigation wird zum iOS-Segmented-Control direkt
       unter dem Titel – Teil des Inhalts, nicht ein zweites, klebendes Menü. */
    .subnav {
        width: calc(100% - 28px);
        margin: 10px auto 0;
        position: static;
        top: auto;
        z-index: auto;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(120, 120, 128, 0.14);
    }
    .subnav-tab {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 0.82rem;
    }
    /* Titel rückt näher an die Unternavigation, damit beide als ein Block lesen */
    .subnav + .container > h1:first-child,
    .subnav + .container > .airport-header:first-child { margin-top: 14px; }

    .container {
        padding: 16px 14px 28px;
        max-width: 100%;
    }
    .container-narrow { max-width: 100%; }

    h1 {
        font-size: 1.65rem;
        margin-bottom: 4px;
    }
    .page-lead { font-size: 0.95rem; margin-bottom: 14px; }

    .card-form {
        padding: 16px;
        border-radius: 18px;
        margin: 12px 0;
    }

    .airport-chip {
        padding: 14px;
        border-radius: 18px;
        gap: 12px;
    }
    .airport-icao {
        font-size: 1.15rem;
        padding: 8px 10px;
    }

    .airport-field { max-width: 100%; }
    .rec-filter-menu { margin: 6px 0 10px; }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }

    .recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .rec-card {
        border-radius: 16px;
    }
    .rec-card-summary { padding: 10px; gap: 8px; }
    .rec-card-thumb { width: 38px; height: 38px; border-radius: 10px; }
    .rec-card .rec-title { font-size: 0.88rem; }

    .view-toggle {
        gap: 8px;
        margin: 10px 0 14px;
    }
    .toggle-btn { flex: 1; justify-content: center; }
    .add-rec-inline {
        width: 100%;
        margin-left: 0;
        flex-basis: 100%;
    }
    .add-rec-inline .btn-add,
    .add-rec-inline > summary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .add-rec-inline .card-form { max-width: 100%; }

    .map-container {
        height: min(52vh, 420px);
        border-radius: 18px;
        margin-left: -2px;
        margin-right: -2px;
        width: calc(100% + 4px);
    }

    .pilot-card {
        padding: 12px;
        border-radius: 16px;
        gap: 10px;
    }
    .pilot-card .inline-form {
        width: 100%;
        margin-top: 4px;
    }
    .pilot-card .btn-primary,
    .pilot-card .btn-add,
    .pilot-card .btn-ghost {
        flex: 1;
        justify-content: center;
    }

    .comment-form {
        flex-direction: column;
        align-items: stretch;
    }
    .comment-form .btn-ghost,
    .comment-form button {
        width: 100%;
        justify-content: center;
    }

    .form-row { flex-direction: column; gap: 0; }

    .chat-header {
        gap: 12px;
        margin-bottom: 8px;
    }
    .chat-header-name { font-size: 1.35rem; }
    .chat-window {
        min-height: 42vh;
        max-height: none;
        height: calc(100dvh - 280px - var(--safe-bottom));
        border-radius: 18px;
        margin-bottom: 10px;
    }
    .chat-input-form {
        position: sticky;
        bottom: calc(58px + var(--safe-bottom));
        z-index: 40;
        background: var(--bg);
        padding: 8px 0 calc(8px + var(--safe-bottom));
        gap: 8px;
        align-items: stretch;
        flex-direction: column;
    }
    .chat-input-form textarea {
        min-height: 48px;
        border-radius: 16px;
    }
    .chat-input-form .btn-primary {
        width: 100%;
        margin-top: 0;
    }
    .chat-bubble { max-width: 88%; }

    .checkin-card { padding: 14px; border-radius: 18px; }
    .my-status-banner { padding: 14px; border-radius: 18px; }

    .settings-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .settings-links .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .lang-pref-segment { gap: 8px; }
    .auth-card { padding: 28px 22px; border-radius: 24px; }
}

@media (max-width: 380px) {
    .tab-label { font-size: 0.62rem; }
    .airport-chip { flex-direction: column; align-items: flex-start; }
    h1 { font-size: 1.45rem; }
}

@supports (padding: max(0px)) {
    .topnav {
        padding-left: max(14px, var(--safe-left));
        padding-right: max(14px, var(--safe-right));
    }
    .bottom-tabbar {
        padding-left: max(8px, var(--safe-left));
        padding-right: max(8px, var(--safe-right));
    }
}

/* ---------- Crew Posts ---------- */
.crew-time-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 10px;
}

/* ----- "Neuer Post": Trigger-Karte ----- */
.crew-create { margin: 14px 0 4px; }
.crew-create > summary.crew-create-trigger {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.crew-create > summary.crew-create-trigger::-webkit-details-marker { display: none; }
.crew-create > summary.crew-create-trigger:hover { box-shadow: var(--shadow-md); }
.crew-create > summary.crew-create-trigger:active { transform: scale(0.985); }
.crew-create[open] > summary.crew-create-trigger {
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.crew-create-trigger-plus {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.28);
    transition: transform 0.28s var(--ease-spring);
}
.crew-create[open] .crew-create-trigger-plus { transform: rotate(135deg); background: var(--accent); box-shadow: 0 6px 16px rgba(0, 122, 255, 0.28); }
.crew-create-trigger-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; text-align: left; }
.crew-create-trigger-title { font-weight: 650; font-size: 1rem; letter-spacing: -0.01em; }
.crew-create-trigger-sub { color: var(--muted); font-size: 0.82rem; }
.crew-create-trigger-chevron { color: var(--muted); font-size: 1.3rem; transition: transform 0.28s var(--ease-spring); }
.crew-create[open] .crew-create-trigger-chevron { transform: rotate(90deg); }

.crew-create .card-form.crew-form {
    margin: 0;
    max-width: none;
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    animation: none;
}

/* ----- Formular-Abschnitte ----- */
.crew-form-section { padding: 4px 0 16px; }
.crew-form-section + .crew-form-section { border-top: 1px solid var(--separator); padding-top: 14px; }
.crew-form-legend {
    margin: 2px 0 4px;
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}
.crew-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crew-airport-row { display: flex; gap: 8px; align-items: stretch; }
.crew-airport-row input { flex: 1; text-transform: uppercase; }
.crew-locate-btn {
    flex: 0 0 auto;
    padding: 0 14px;
    min-width: 46px;
    font-size: 1.05rem;
}
.crew-form textarea { min-height: 60px; }

.crew-duration-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.crew-duration-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-right: 2px; }
.chip-sm {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 0.8rem;
    font-weight: 650;
    box-shadow: none;
}

/* ----- Segmented Control (Sichtbarkeit) ----- */
.segmented {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(120, 120, 128, 0.12);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}
.segmented-option {
    flex: 1;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}
.segmented-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.segmented-option > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.segmented-option input:checked + span,
.segmented-option.is-selected > span {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.segmented-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.crew-form-actions { margin-top: 4px; }
.crew-form-actions .btn-primary { margin-top: 8px; }

.crew-member-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 4px;
    max-height: 240px;
    overflow: auto;
    padding: 2px;
}
.crew-member-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 10px;
    border-radius: 14px;
    background: rgba(120, 120, 128, 0.08);
    border: 1px solid transparent;
    cursor: pointer;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.crew-member-name { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--text); }
.crew-member-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.crew-member-check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--separator);
    color: transparent;
    font-size: 0.72rem;
    font-weight: 800;
    transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.crew-member-option:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.crew-member-option:has(input:checked),
.crew-member-option.is-selected {
    background: var(--accent-light);
    border-color: var(--accent);
}
.crew-member-option:has(input:checked) .crew-member-check,
.crew-member-option.is-selected .crew-member-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.crew-member-self {
    background: var(--green-light);
    cursor: default;
}
.crew-member-self .crew-member-check { background: var(--green); border-color: var(--green); color: #fff; }

.crew-filter-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0 4px;
}
.crew-post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.crew-post-card {
    background: var(--card-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.crew-post-card-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}
.crew-post-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.crew-post-location {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.crew-post-note {
    margin: 8px 0;
    font-size: 0.94rem;
}
.crew-post-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 6px;
}
.crew-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.12);
    font-size: 0.82rem;
    font-weight: 600;
}
.crew-member-chip.is-pending {
    background: transparent;
    border: 1px dashed var(--separator);
    color: var(--muted);
}
.crew-member-chip.is-pending .avatar-img,
.crew-member-chip.is-pending .avatar-placeholder { opacity: 0.55; }

.crew-going-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 700;
}
@media (prefers-color-scheme: dark) {
    .crew-going-badge { color: var(--green); }
}

.crew-post-invited {
    align-items: center;
    margin: 2px 0 6px;
}
.crew-invited-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.crew-respond {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 2px;
    padding-top: 10px;
    border-top: 1px solid var(--separator);
}
.crew-respond-state {
    font-size: 0.86rem;
    font-weight: 650;
}
.crew-respond-state.is-going { color: var(--green-dark); }
.crew-respond-state.is-invited { color: var(--accent); }
.crew-respond-state.is-declined { color: var(--muted); }
@media (prefers-color-scheme: dark) {
    .crew-respond-state.is-going { color: var(--green); }
}
.crew-respond .btn-add.btn-small,
.crew-respond .btn-ghost.btn-small { margin-left: 0; }

.crew-post-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}
.crew-post-foot p { margin: 0; }
.crew-delete-form { flex-shrink: 0; }
.section-title-link {
    color: inherit;
    text-decoration: none;
}
.section-title-link:hover { color: var(--accent); }

@media (max-width: 560px) {
    .crew-time-row { grid-template-columns: 1fr; }
    .crew-field-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   UI-/Motion-Politur & iOS-Feinschliff  (v2)
   =========================================================== */

/* ---- Touch: 300ms-Delay & Doppeltipp-Zoom weg, native Farben ---- */
a, button, summary, label, input, select, textarea,
.chip, .tab-item, .subnav-tab, .toggle-btn, .lang-btn,
.pilot-card, .rec-card, .crew-post-card, .conversation-card {
    touch-action: manipulation;
}
input, select, textarea, [type="checkbox"], [type="radio"], progress {
    accent-color: var(--accent);
}
::selection { background: var(--accent-light); }

/* ---- Fokus nur für Tastatur zeigen (iOS-Tap ohne Ring) ---- */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}
a:focus-visible,
button:focus-visible,
.chip:focus-visible,
.tab-item:focus-visible,
.subnav-tab:focus-visible { outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
}

/* ---- Glass-Navigation: weicher Übergang + Schatten beim Scrollen ---- */
.topnav {
    transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
        border-color 0.3s var(--ease-out);
    border-bottom-color: transparent;
}
.topnav.is-scrolled {
    box-shadow: 0 1px 0 var(--separator), 0 8px 24px rgba(0, 0, 0, 0.06);
    border-bottom-color: var(--border);
}
@media (prefers-color-scheme: dark) {
    .topnav.is-scrolled { box-shadow: 0 1px 0 var(--separator), 0 8px 24px rgba(0, 0, 0, 0.4); }
}

/* ---- Sanftes Einblenden beim Scrollen (per IntersectionObserver) ---- */
.js .reveal {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    transition:
        opacity 0.5s var(--ease-out) var(--reveal-delay, 0ms),
        transform 0.55s var(--ease-ios) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js .reveal.in-view {
    opacity: 1;
    transform: none;
}
/* Grundanimationen einzelner Karten nicht doppelt abspielen */
.js .rec-card.reveal { animation: none; }

/* ---- Druck-Feedback (touchstart-Klasse aus ui-polish.js) ---- */
.is-pressed {
    transform: scale(0.965) !important;
    transition: transform 0.09s var(--ease-out) !important;
}
.pilot-card.is-pressed,
.rec-card.is-pressed,
.crew-post-card.is-pressed { transform: scale(0.985) !important; }
.btn-primary.is-pressed { filter: brightness(0.94); }

/* ---- Buttons: etwas lebendigere Reaktion ---- */
.btn-primary, .btn-add, .btn-ghost, .toggle-btn, .chip {
    -webkit-user-select: none;
    user-select: none;
}
.btn-primary:active { transform: scale(0.96); box-shadow: 0 3px 12px rgba(0, 122, 255, 0.24); }
.btn-add:active { box-shadow: 0 3px 12px rgba(52, 199, 89, 0.22); }

/* ---- Bottom-Tabbar: animierter aktiver Zustand ---- */
.tab-item {
    -webkit-tap-highlight-color: transparent;
    transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out),
        transform 0.2s var(--ease-spring);
}
.tab-item .tab-icon {
    transition: transform 0.3s var(--ease-spring);
}
.tab-item.is-active .tab-icon {
    transform: translateY(-1px) scale(1.12);
}
.tab-item.is-active .tab-label { font-weight: 700; }
.tab-item.is-active {
    background: var(--accent-light);
    animation: seg-pop 0.3s var(--ease-spring) both;
}

/* ---- Segmented Sub-Nav: aktiver Tab "poppt" leicht ---- */
.subnav-active { animation: seg-pop 0.32s var(--ease-spring) both; }
@keyframes seg-pop {
    from { transform: scale(0.9); opacity: 0.6; }
    to   { transform: scale(1); opacity: 1; }
}

/* ---- Scroll-Container: kein Rubberband-Durchschlagen, Momentum ---- */
.chat-window, .subnav, .chip-filter, .chip-filter-compact,
.place-search-results, .crew-member-picker, .rec-photo-strip {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ---- Aufklapp-Panels weich öffnen (moderne Browser) ---- */
@supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    details.card-form,
    details.comments-block,
    details.edit-rec-block,
    details.manual-checkin,
    details.rec-filter-menu,
    details.add-rec-inline {
        overflow: clip;
    }
    details.card-form::details-content,
    details.comments-block::details-content,
    details.edit-rec-block::details-content,
    details.manual-checkin::details-content,
    details.rec-filter-menu::details-content,
    details.add-rec-inline::details-content {
        height: 0;
        opacity: 0;
        transition: height 0.32s var(--ease-ios), opacity 0.28s var(--ease-out), content-visibility 0.32s allow-discrete;
        content-visibility: hidden;
    }
    details[open].card-form::details-content,
    details[open].comments-block::details-content,
    details[open].edit-rec-block::details-content,
    details[open].manual-checkin::details-content,
    details[open].rec-filter-menu::details-content,
    details[open].add-rec-inline::details-content {
        height: auto;
        opacity: 1;
        content-visibility: visible;
    }
}

/* ---- Skelett-/Ladeschimmer (Utility) ---- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(120, 120, 128, 0.14);
    border-radius: var(--radius-sm);
    color: transparent !important;
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---- Alerts: iOS-artiges Einrutschen ---- */
.alert {
    animation: alert-in 0.42s var(--ease-ios) both;
    border: 1px solid var(--border);
}
@keyframes alert-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* ---- Chat-Blasen: eintreffende Nachricht mit Richtung ---- */
.chat-theirs { animation: bubble-in-left 0.32s var(--ease-spring) both; }
.chat-mine   { animation: bubble-in-right 0.32s var(--ease-spring) both; }
@keyframes bubble-in-left {
    from { opacity: 0; transform: translateY(6px) translateX(-6px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}
@keyframes bubble-in-right {
    from { opacity: 0; transform: translateY(6px) translateX(6px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* ---- Modal-freie Overlays / sticky Eingaben an der Safe-Area ---- */
.chat-input-form { padding-bottom: var(--safe-bottom); }

/* ---- iOS: Standalone-Modus (vom Homescreen gestartet) ---- */
@media (display-mode: standalone) {
    .topnav { padding-top: calc(6px + var(--safe-top)); }
    a { -webkit-touch-callout: none; }
}

/* ---- Feingranulares Reduced-Motion für die neuen Effekte ---- */
@media (prefers-reduced-motion: reduce) {
    .js .reveal,
    .js .reveal.in-view {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .tab-item.is-active .tab-icon { transform: none; }
    .tab-item.is-active,
    .subnav-active,
    .alert,
    .chat-theirs,
    .chat-mine { animation: none !important; }
    .is-pressed { transform: none !important; }
    details::details-content { transition: none !important; }
}
