/* Circlely App-Schicht: gilt nur mit html.is-app */

/* Textgröße aus den iPhone-Einstellungen (Bedienungshilfen → Größerer Text).
   Die App setzt --text-scale (1 = Standard, höchstens 2 = 200 %), alle Schriftgrößen sind in rem.
   Auf der Website fehlt die Angabe: dann gilt die Schriftgröße des Browsers wie bisher. */
html { font-size: calc(var(--text-scale, 1) * 100%); }

/* ---------- Bewegung: Federn statt fester Kurven ----------
   Kurven aus echter Federphysik (tests/federn.py), beschrieben wie in SwiftUI mit response und
   dampingFraction. iPhones ohne linear() (vor iOS 17.2) bekommen eine ähnliche feste Kurve. */
:root {
  --spring-press: cubic-bezier(0.34, 1.4, 0.64, 1); --spring-press-d: 0.45s;
  --spring-snappy: cubic-bezier(0.25, 1.1, 0.5, 1); --spring-snappy-d: 0.35s;
  --spring-smooth: cubic-bezier(0.22, 1, 0.36, 1); --spring-smooth-d: 0.5s;
  --spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1); --spring-bouncy-d: 0.6s;
  --press-in: 0.08s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* Loslassen nach dem Drücken (Knöpfe, Karten): kleines Nachfedern · response 0.34, damping 0.58 · Überschwingen 10.7 % */
    --spring-press: linear(0, 0.0213, 0.078, 0.16, 0.2582, 0.3651, 0.4743, 0.5809, 0.6811, 0.7722, 0.8524, 0.921, 0.9776, 1.0226, 1.0567, 1.081, 1.0965, 1.1047, 1.1068, 1.104, 1.0976, 1.0886, 1.078, 1.0665, 1.0548, 1.0435, 1.0329, 1.0233, 1.0149, 1.0077, 1.0018, 0.9971, 0.9936, 0.9911, 0.9896, 0.9888, 0.9886, 0.989, 0.9897, 0.9907, 0.9918, 0.993, 0.9943, 0.9955, 0.9966, 0.9976, 0.9985, 0.9993, 1);
    --spring-press-d: 0.56s;
    /* Auswahl-Wechsel (Umschalter, Schalter, Tab-Pille) · response 0.3, damping 0.8 · Überschwingen 1.5 % */
    --spring-snappy: linear(0, 0.0145, 0.0528, 0.1079, 0.174, 0.2465, 0.322, 0.3974, 0.4708, 0.5407, 0.6059, 0.6658, 0.72, 0.7686, 0.8115, 0.8489, 0.8812, 0.9088, 0.932, 0.9514, 0.9672, 0.9801, 0.9903, 0.9982, 1.0042, 1.0086, 1.0116, 1.0136, 1.0147, 1.0151, 1.015, 1.0145, 1.0138, 1.0128, 1.0117, 1.0106, 1.0094, 1.0083, 1.0072, 1.0062, 1.0053, 1.0045, 1.0037, 1.003, 1.0024, 1.0019, 1.0015, 1.0011, 1);
    --spring-snappy-d: 0.41s;
    /* Blätter öffnen, Karte wird zum Blatt: ruhig, ohne Nachschwingen · response 0.42, damping 1.0 · Überschwingen 0 % */
    --spring-smooth: linear(0, 0.0159, 0.0563, 0.1122, 0.1771, 0.2461, 0.3158, 0.3841, 0.4492, 0.5102, 0.5666, 0.6181, 0.6648, 0.7068, 0.7443, 0.7776, 0.807, 0.8329, 0.8556, 0.8755, 0.8928, 0.9079, 0.9209, 0.9322, 0.942, 0.9504, 0.9576, 0.9638, 0.9692, 0.9737, 0.9776, 0.981, 0.9839, 0.9863, 0.9884, 0.9901, 0.9916, 0.9929, 0.994, 0.9949, 0.9957, 0.9964, 0.9969, 0.9974, 0.9978, 0.9982, 0.9984, 0.9987, 1);
    --spring-smooth-d: 0.61s;
    /* Erfolgsmomente (Haken, Du-bist-dabei) · response 0.5, damping 0.62 · Überschwingen 8.3 % */
    --spring-bouncy: linear(0, 0.021, 0.0766, 0.1564, 0.2516, 0.3547, 0.4597, 0.5619, 0.6579, 0.7453, 0.8225, 0.8888, 0.9441, 0.9887, 1.0234, 1.049, 1.0666, 1.0775, 1.0827, 1.0833, 1.0804, 1.075, 1.0678, 1.0596, 1.0508, 1.0421, 1.0337, 1.0259, 1.0189, 1.0128, 1.0076, 1.0033, 0.9998, 0.9972, 0.9953, 0.9941, 0.9933, 0.993, 0.9931, 0.9934, 0.9939, 0.9946, 0.9953, 0.996, 0.9967, 0.9974, 0.998, 0.9986, 1);
    --spring-bouncy-d: 0.82s;
  }
}

/* Weiche Übergänge zwischen den Seiten (Safari 18.2+, sonst ohne Wirkung) */
@view-transition { navigation: auto; }
/* Kurz halten: Tab-Wechsel sollen sich sofort anfühlen wie in einer iPhone-App */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.12s; }
.app-tabbar { view-transition-name: app-tabbar; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

.is-app body {
  padding-top: var(--sat, env(safe-area-inset-top, 0px));
  padding-bottom: calc(84px + var(--sab, env(safe-area-inset-bottom, 0px)));
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
}
/* Die Seite selbst wandert nie seitlich (Wisch-Leisten wie die Filter scrollen weiterhin) */
html.is-app { overflow-x: hidden; overscroll-behavior-x: none; }
.is-app body { overscroll-behavior-x: none; }
/* Fokus-Rahmen nur bei Tastatur-Bedienung. Beim Tippen bliebe er sonst nach dem
   Schließen eines Fensters an der Karte hängen. Eingabefelder behalten ihn. */
.is-app:not(.app-kbd) :focus-visible:not(input):not(textarea):not(select),
.is-app:not(.app-kbd) .event-open:focus-visible::after { outline: none; }
.is-app input, .is-app textarea, .is-app [contenteditable], .is-app .chat-msg .text { -webkit-user-select: text; user-select: text; }

/* Website-Kopf, -Menü und -Fuß gibt es in der App nicht */
.is-app .site-header,
.is-app .mobile-nav,
.is-app .site-footer,
.is-app .skip-link { display: none !important; }

/* Werbeflächen der Website, die in der App keinen Sinn ergeben */
.is-app .cta-panel,
.is-app .promo-card { display: none !important; }
.is-app main > section.section:has(.promo-card) { display: none; }

/* Kompaktere Kopfbereiche */
.is-app .page-hero { padding-top: 12px; padding-bottom: 8px; }
.is-app .page-hero .display { font-size: clamp(2rem, 1.4rem + 3vw, 2.6rem); }
.is-app .page-hero .lead { font-size: 1rem; margin-top: 12px; }
.is-app .legal { padding-top: 16px; }
.is-app .acct-wrap > .updated { display: none; }
.is-app .app-hidden { display: none !important; }
.is-app.app-subpage .legal,
.is-app.app-subpage main { padding-top: 0; }

/* Drücken: sofort einsinken, beim Loslassen federt es zurück (wie Knöpfe in iPhone-Apps).
   Karten sinken erst nach einem Wimpernschlag ein, damit sie beim Scrollen nicht zucken. */
.is-app :is(.btn, .chip, .icon-btn, .app-title-action, .app-back, .ui-sheet-item, .ui-sheet-cancel, .copy-btn) {
  transition: transform var(--spring-press-d) var(--spring-press), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.is-app :is(.btn, .chip, .icon-btn, .app-title-action, .copy-btn):active:not(:disabled) {
  transform: scale(0.96);
  transition: transform var(--press-in) ease-out, background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.is-app .app-title-action:active { transform: scale(0.9); }
.is-app :is(.ui-sheet-item, .ui-sheet-cancel, .app-back):active { transform: scale(0.98); transition-duration: var(--press-in); }
.is-app :is(.event-card, .acct-event-item, .person-card) {
  transition: transform var(--spring-press-d) var(--spring-press), box-shadow 0.25s, background-color 0.2s, opacity 0.2s;
}
.is-app :is(.event-card, .acct-event-item, .person-card):active:not(:has(:is(button, a):active:not(.event-open))) {
  transform: scale(0.98);
  transition: transform 0.12s ease-out 0.04s, box-shadow 0.25s, background-color 0.2s;
}
.is-app .event-card:hover { transform: none; }
/* Zeilen in Listen hellen beim Antippen kurz auf und verblassen dann (wie Tabellenzeilen) */
.is-app .app-more-list :is(a, button) { position: relative; z-index: 0; transition: color 0.2s; }
.is-app .app-more-list :is(a, button)::before {
  content: ""; position: absolute; inset: 1px -12px; z-index: -1; border-radius: 12px;
  background: var(--surface-2); opacity: 0; transition: opacity 0.45s ease-out;
}
.is-app .app-more-list :is(a, button):active::before { opacity: 1; transition-duration: 0s; }
@media (prefers-reduced-motion: reduce) {
  .is-app :is(.btn, .chip, .icon-btn, .app-title-action, .event-card, .acct-event-item, .person-card):active { transform: none !important; opacity: 0.7; }
}

/* Umschalter (Alle Tage | Wochentags …, Liste | Karte, Hell | Dunkel): Die Auswahl gleitet mit einer Feder
   von einer Option zur nächsten. app.js legt dafür einen „Schlitten“ hinter die gewählte Option. */
.is-app .segmented.has-thumb { position: relative; isolation: isolate; }
.is-app .segmented.has-thumb > button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.is-app .seg-thumb {
  position: absolute; z-index: -1; top: 0; left: 0;
  width: var(--seg-w, 0px);
  height: var(--seg-h, 0px);
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm), 0 0 0 0.5px var(--line);
  transform: translate(var(--seg-x, 0px), var(--seg-y, 0px));
  transition: transform var(--spring-snappy-d) var(--spring-snappy), width var(--spring-snappy-d) var(--spring-snappy), height var(--spring-snappy-d) var(--spring-snappy), scale 0.2s var(--ease-out);
  pointer-events: none;
}
.is-app .seg-thumb.no-anim { transition: none; }
/* Wer auf die gewählte Option drückt, sieht den Schlitten leicht einsinken */
.is-app .segmented.has-thumb:has(> button[aria-pressed="true"]:active) .seg-thumb { scale: 0.95; }
.is-app .segmented.has-thumb > button { position: relative; transition: color 0.25s, opacity 0.2s; }
.is-app .segmented.has-thumb > button:active:not([aria-pressed="true"]) { opacity: 0.55; }

/* ---------- Großer Titel mit Aktion ---------- */
.app-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.is-app .app-title-row h1 { margin: 0; font-size: 2.1rem; letter-spacing: -0.01em; }
.app-title-action {
  display: none;
  flex: 0 0 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  /* iPhone-typischer „getönter“ Knopf statt schwebendem Android-Kreis mit Schatten */
  background: var(--brick-tint);
  color: var(--brick);
  cursor: pointer;
}
.app-title-action svg { width: 22px; height: 22px; stroke-width: 2.2; }
.app-title-action:active { transform: scale(0.9); }
.is-app.app-signed-in[data-app-tab="treffen"] .app-title-action { display: inline-flex; }
.is-app:has(#onboarding-card:not([hidden])) .app-title-action { display: none !important; }
.is-app:not(.app-signed-in) .acct-wrap > .app-title-row { display: none; }

/* Kompakte Leiste, sobald der große Titel weggescrollt ist */
.app-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 55;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: calc(44px + var(--sat, env(safe-area-inset-top, 0px)));
  padding-bottom: 11px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.app-navbar strong { font-family: var(--sans); font-size: 1rem; font-weight: 650; }
.app-navbar.is-visible { opacity: 1; }

/* Abschnittswechsel auf der Konto-Seite sanft einblenden */
.app-tab-in .acct-wrap > *:not(.app-title-row) { animation: app-fade-in 0.15s ease-out both; }
@keyframes app-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tab-Leiste ---------- */
.app-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--sab, env(safe-area-inset-bottom, 0px)));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  border-top: 1px solid var(--line);
  touch-action: none; /* Leiste steht fest: Wischen darauf bewegt nichts, Tippen geht normal */
}
.app-kb-open .app-tabbar { display: none; }
/* Unter einem offenen Fenster (Treffen, Chat, Formular) verschwindet die Tab-Leiste */
.app-tabbar { transition: transform 0.25s var(--ease-out), visibility 0s linear 0s; }
.app-tabbar.is-covered { transform: translateY(110%); visibility: hidden; transition: transform 0.2s ease-in, visibility 0s linear 0.2s; }

/* ---------- Rahmenseite (app.html): Bereiche als Ebenen, nur einer sichtbar ---------- */
html.app-shell, .app-shell body { height: 100%; overflow: hidden; }
.app-shell body { padding: 0 !important; background: var(--bg); }
.app-frame {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}
.app-frame.is-inactive { visibility: hidden; pointer-events: none; }
.app-tab-pill {
  position: absolute;
  top: 6px;
  left: 8px;
  width: calc((100% - 16px) / 4);
  height: 56px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--brick) 12%, transparent);
  transform: translateX(calc(var(--tab-index, 0) * 100%));
  transition: transform 0.4s var(--ease-spring);
  pointer-events: none;
}
.app-tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 56px;
  border-radius: 16px;
  color: var(--ink-muted);
  font-size: 11px; /* wächst wie die iPhone-Tab-Leiste nicht mit der Textgröße */
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s;
}
.app-tabbar a svg { width: 24px; height: 24px; }
.app-tabbar a.is-active { color: var(--brick); }
.app-tabbar a.is-active svg { stroke-width: 2.2; }
.app-tabbar a.is-bounce svg { animation: app-bounce 0.45s var(--ease-spring); }
@keyframes app-bounce { 0% { transform: scale(1); } 35% { transform: scale(0.82); } 100% { transform: scale(1); } }

/* ---------- Leiste auf Unterseiten ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid var(--line);
}
.app-topbar strong { font-family: var(--sans); font-size: 1rem; font-weight: 650; }
.app-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 10px 0 2px;
  border: 0;
  background: none;
  color: var(--brick);
  font: 500 1rem var(--sans);
  cursor: pointer;
}
.app-back svg { width: 24px; height: 24px; }
.is-app.app-subpage body { padding-top: 0; }
.is-app.app-subpage .app-topbar { padding-top: var(--sat, env(safe-area-inset-top, 0px)); }
.is-app.app-subpage body { padding-bottom: calc(24px + var(--sab, env(safe-area-inset-bottom, 0px))); }

/* ---------- Konto-Seite in der App ---------- */
.is-app .acct-wrap { max-width: 560px; }
/* Treffen und Leute liegen direkt auf dem Hintergrund, ohne Karte drumherum */
.is-app #treffen.acct-card,
.is-app #leute.acct-card { padding: 0; border: 0; background: none; box-shadow: none; gap: 14px; }
.is-app #treffen .acct-events-head h2,
.is-app #leute > h2 { display: none; }
.is-app #btn-new-event { display: none; }
.is-app #treffen .acct-events-head { display: none; }
.is-app .acct-events-group h3,
.is-app .app-section-label { margin: 6px 4px 10px; font-family: var(--sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.is-app .acct-event-item,
.is-app .person-card { background: var(--surface); box-shadow: var(--shadow-sm); }
.is-app #leute > .acct-hint { margin: 0 4px; }

/* Profil-Kopf nur im Profil-Tab, als großer Auftritt */
.is-app .acct-header-band { flex-wrap: wrap; justify-content: center; text-align: center; padding: 26px 20px 22px; }
.is-app .acct-header-band .acct-avatar { width: 84px; height: 84px; font-size: 2rem; }
.is-app .acct-header-band .acct-who { flex: 1 1 100%; }
.is-app .acct-header-band .acct-who h2 { font-size: 1.3125rem; white-space: normal; }
.is-app .acct-header-band #btn-logout { display: none; }

.is-app #profil .acct-avatar-row .acct-avatar { display: none; }
.is-app .acct-hint, .is-app .acct-muted-note { hyphens: manual; }

/* Einstellungen */
.app-setting { display: flex; flex-direction: column; gap: 10px; }
.app-setting-label { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.app-setting-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); cursor: pointer; }
.app-setting-row > span { display: flex; flex-direction: column; gap: 3px; }
.app-theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.app-lang-seg { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
.app-lang-seg button { min-height: 40px; }
.app-setting-gap { margin-top: 4px; }
.app-lang-note { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--gold-tint); color: var(--gold-ink); font-size: 0.875rem; font-weight: 600; }
.app-theme-seg button { min-height: 40px; }
.app-switch {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 51px; width: 51px; height: 31px; margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease-out;
}
.app-switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform var(--spring-snappy-d) var(--spring-snappy), width var(--spring-snappy-d) var(--spring-snappy);
}
.app-switch:checked { background: #34A853; }
.app-switch:checked::after { transform: translateX(20px); }
/* Beim Drücken zieht sich der Knopf in die Länge, wie beim Schalter in den iPhone-Einstellungen */
.app-switch:active::after { width: 33px; }
.app-switch:checked:active::after { transform: translateX(14px); }
.app-switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Tippflächen mindestens 44 px (Apple-Empfehlung) */
.is-app .part-row .acct-btn-link,
.is-app .person-row .acct-btn-link,
.is-app .chat-msg .meta button { min-height: 44px; padding: 0 6px; }
.is-app .chat-msg .meta { align-items: center; }
.is-app .acct-btn-link { min-height: 44px; }

/* „Mehr“ im Profil */
/* .is-app davor: sonst rückt die Regel für Listen in Rechtstexten (.legal ul) die Einträge ein (war schon in 1.0 so) */
.is-app .app-more-list { list-style: none; margin: 0; padding: 0; }
.app-more-list li + li { border-top: 1px solid var(--line); }
.app-more-list a, .app-more-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 0.9375rem var(--sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.app-more-list a svg { width: 18px; height: 18px; color: var(--ink-muted); }
.app-more-list .app-logout { color: #C24A3F; }
.app-version { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin-top: 12px; text-align: center; }
.app-version .app-logo { width: 16px; height: 16px; }

/* Logo */
.app-logo path { stroke: var(--teal); }
.app-logo circle { fill: var(--brick); }

/* ---------- Begrüßung (nicht angemeldet) ---------- */
/* Willkommen in der App (abgemeldet): füllt den ganzen Bildschirm, das Formular kommt als Blatt von unten.
   Der Text liegt in WebGL, damit das Glas ihn bricht; das DOM bleibt für Vorlesen und als Rückfall. */
.app-welcome { display: none; }
.is-app:not(.app-signed-in) .app-welcome { display: block; position: fixed; inset: 0; z-index: 40; overflow: hidden; background: #FFEFE4; color: #2A2320; touch-action: none; user-select: none; -webkit-user-select: none; }
.is-app:not(.app-signed-in) .acct-wrap > h1 { display: none; }
.app-welcome canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.app-welcome .copy { position: absolute; left: 24px; right: 24px; top: 34%; text-align: center; pointer-events: none; }
.app-welcome:not(.kein-gl) .copy { opacity: 0; }
.app-welcome .kick { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; }
.app-welcome .copy h2 { margin: 0; color: inherit; font-size: min(42px, 11vw); }
.app-welcome .copy h2 em { font-style: italic; }
.app-welcome .sub { margin: 12px auto 0; max-width: 30ch; font-size: 1rem; line-height: 1.45; }
.aw-fallback { display: none; }
.app-welcome.kein-skript .aw-fallback { display: flex; position: absolute; left: 24px; right: 24px; width: auto; bottom: calc(env(safe-area-inset-bottom) + 24px); }
.app-welcome.kein-gl { background: linear-gradient(#FFF6EE, #FFE6D6 45%, #FFC9B0); }
.app-welcome.kein-gl canvas { display: none; }
/* Steht sofort, die Grafik blendet darüber ein, sobald sie bereit ist */
.aw-poster { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: linear-gradient(#FFF6EE, #FFECE0 55%, #FFE2D2); }
.aw-poster p { position: absolute; left: 0; right: 0; top: calc(43% - .97em); margin: 0; text-align: center; font: 400 min(29px, 7.4vw, calc((100vw - 44px) / 13.7))/1.26 Inter, sans-serif; letter-spacing: -.5px; color: #2A2320; }
.aw-poster i { --k: min(66vw, 42vh); position: absolute; left: 50%; top: calc(100% - .7 * var(--k)); width: calc(2 * var(--k)); height: calc(2 * var(--k)); margin-left: calc(-1 * var(--k)); border-radius: 50%; background: rgba(255, 251, 246, .8); box-shadow: inset 0 2px 8px #fff, 0 -4px 22px rgba(120, 60, 30, .07); }
@media (min-width: 700px) { .aw-poster p { font-size: 38px; } }
.aw-poster span { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 58px); text-align: center; font: 400 14px Inter, sans-serif; color: rgba(42, 35, 32, .6); }
.aw-poster span::before { content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: rgba(42, 35, 32, .22); }
.app-welcome.gl canvas { opacity: 0; transition: opacity .55s ease; }
.app-welcome.gl-da canvas { opacity: 1; }
.app-welcome.kein-gl .aw-poster, .app-welcome.gl-weg .aw-poster { display: none; }
.app-welcome.gl:not(.gl-da) .ziehen { opacity: 0; }
.aw-recht { position: fixed; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 2px); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; font: 400 .6875rem Inter, sans-serif; }
.aw-recht a { padding: 8px 6px; color: rgba(42, 35, 32, .68); text-decoration: none; }
.aw-recht .aw-widerruf { color: #2A2320; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.app-welcome .ziehen { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 44px); translate: -50% 0; border: 0; background: none; padding: 14px 22px; font: 400 14px Inter, sans-serif; white-space: nowrap; color: rgba(42, 35, 32, .6); transition: opacity .5s; touch-action: none; }
.app-welcome .ziehen::before { content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: rgba(42, 35, 32, .22); }
.app-welcome.gl.weg .ziehen, .app-welcome.weg .ziehen, .app-welcome.kein-gl .ziehen { opacity: 0; pointer-events: none; }
.app-welcome .login { position: fixed; left: max(24px, calc(50% - 200px)); right: max(24px, calc(50% - 200px)); bottom: calc(env(safe-area-inset-bottom) + 34px); display: grid; gap: 10px; pointer-events: none; }
.app-welcome .login > * { opacity: 0; translate: 0 18px; transition: opacity 1s var(--ease-out), translate 1.1s var(--ease-out); }
.app-welcome.bereit .login { pointer-events: auto; }
.app-welcome.bereit .login > * { opacity: 1; translate: 0 0; }
.app-welcome.bereit .login > :nth-child(2) { transition-delay: .14s; }
.app-welcome.bereit .login > :nth-child(3) { transition-delay: .28s; }
.app-welcome.offen .login > * { opacity: 0; transition-delay: 0s !important; pointer-events: none; }
.lk { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 8px 16px; border: 0; border-radius: 999px; font: 600 .9375rem Inter, sans-serif; cursor: pointer; }
.lk svg { width: 19px; height: 19px; flex: none; }
.lk-g { background: #fff; color: #1F1F1F; box-shadow: inset 0 0 0 1px rgba(42, 35, 32, .09), 0 10px 24px -20px rgba(90, 40, 20, .5); }
.lk-a { background: #000; color: #fff; }
/* Apples eigener Knopf als Bild (Apple-Vorgabe), kein nachgebautes Logo */
.lk-a.lk-bild { padding: 0; background: none; }
.lk-bild img { display: block; width: 100%; height: 52px; }
.lk-m { background: none; color: #2A2320; min-height: 44px; font-size: .9375rem; }
.app-welcome .hinweis { position: fixed; left: 50%; bottom: 196px; translate: -50% 0; padding: 7px 14px; border-radius: 999px; background: rgba(42, 35, 32, .86); color: #fff; font: 600 13px Inter, sans-serif; white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.app-welcome .ini { position: fixed; left: 0; top: 0; width: 60px; height: 60px; margin: -30px 0 0 -30px; display: grid; place-items: center; pointer-events: none; font: 600 26px Inter, sans-serif; color: #2A2320; opacity: 0; transition: opacity .6s; }
/* Blatt */
.aw-sheet { display: contents; }
.is-app:not(.app-signed-in) .aw-sheet {
  display: block; position: fixed; left: max(0px, calc(50% - 300px)); right: max(0px, calc(50% - 300px)); bottom: 0; z-index: 41;
  max-height: calc(100dvh - 30vh); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 24px);
  background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .35);
  transform: translateY(105%); transition: transform .5s var(--ease-out);
}
.is-app:not(.app-signed-in) .aw-open .aw-sheet { transform: none; }
.aw-grab, .aw-close { display: none; }
.is-app:not(.app-signed-in) .aw-grab { display: block; width: 40px; height: 5px; border-radius: 3px; margin: 0 auto 12px; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.is-app:not(.app-signed-in) .aw-close { display: flex; position: absolute; right: 14px; top: 8px; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.is-app:not(.app-signed-in) .aw-close::after { content: ''; position: absolute; inset: -6px; } /* Tippfläche 44 pt */
.is-app:not(.app-signed-in) .aw-sheet .acct-tabs { margin: 40px 0 12px; }
/* Der Startbildschirm ist immer hell, das Blatt deshalb auch im Dunkelmodus creme */
.is-app:not(.app-signed-in) .aw-sheet { --bg: #F4F1EA; --bg-alt: #ECE7DC; --surface: #FCFAF6; --surface-2: #F1EDE4; --ink: #1D2620; --ink-soft: #465148; --ink-muted: #5A655C; --line: rgba(29, 38, 32, 0.12); --line-strong: rgba(29, 38, 32, 0.22); --brick: #AB4325; --brick-tint: #F3E0D5; --teal: #2F5147; --teal-deep: #1E3A31; --teal-tint: #DDE7E0; --gold: #D99A34; --gold-ink: #82540E; --gold-tint: #F6E7C8; --sage-ink: #4B6639; --sage-tint: #E4EBD9; --plum-ink: #7A3D62; --plum-tint: #F0E1EA; --sky-ink: #2D5870; --sky-tint: #DDE8EE; --btn-bg: #AB4325; --btn-bg-hover: #933820; --btn-ink: #FFFFFF; --band-bg: #1E3A31; --band-ink: #F2EFE7; --band-soft: #BDD0C5; --band-line: rgba(242, 239, 231, 0.16); --cta-bg: #A2401F; --cta-ink: #FFF8F2; --cta-soft: #F8DDCF; --focus: #1E3A31; --success-bg: #DDE7E0; --success-ink: #1E3A31; --shadow-sm: 0 1px 2px rgba(45, 33, 20, 0.06), 0 1px 1px rgba(45, 33, 20, 0.03); --shadow-md: 0 2px 4px rgba(45, 33, 20, 0.04), 0 10px 28px -8px rgba(45, 33, 20, 0.14); --shadow-lg: 0 4px 10px rgba(45, 33, 20, 0.05), 0 28px 56px -16px rgba(45, 33, 20, 0.26); color-scheme: light; color: var(--ink); }
@media (prefers-contrast: more) { .is-app:not(.app-signed-in) .aw-sheet { --ink-soft: #2F3A32; --ink-muted: #3B463E; --line: rgba(29, 38, 32, 0.28); --line-strong: rgba(29, 38, 32, 0.45); } }
/* Google und Apple stehen schon auf dem Startbildschirm, im Blatt bleibt nur E-Mail */
.is-app:not(.app-signed-in) .aw-sheet #oauth-box, .is-app:not(.app-signed-in) .aw-sheet #apple-box { display: none; }
@media (prefers-reduced-motion: reduce) {
  .aw-sheet, .app-welcome .login > * { transition: none !important; }
}

/* ---------- Herunterziehen zum Aktualisieren ---------- */
.app-ptr {
  position: fixed;
  top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 8px);
  left: 50%;
  z-index: 58;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: -20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(calc(var(--pull, 0px) - 50px)) rotate(var(--turn, 0deg));
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
  pointer-events: none;
}
.app-ptr .app-logo { width: 24px; height: 24px; }
.app-ptr.is-pulling { opacity: 1; transition: none; }
.app-ptr.is-armed { opacity: 1; }
.app-ptr.is-loading { opacity: 1; transform: translateY(24px); animation: app-ptr-spin 0.8s linear infinite; }
@keyframes app-ptr-spin { to { rotate: 360deg; } }

/* ---------- Offline-Hinweis ---------- */
.app-offline {
  position: fixed;
  left: 12px; right: 12px;
  top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 8px);
  z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8438rem; line-height: 1.4;
  box-shadow: var(--shadow-lg);
  /* Versteckt: komplett über den Bildschirmrand hinaus (inkl. Statusleiste) und unsichtbar.
     Vorher ragte der untere Teil auf iPhones mit hoher Statusleiste als heller Balken hervor. */
  transform: translateY(calc(-100% - 40px - var(--sat, env(safe-area-inset-top, 0px))));
  visibility: hidden;
  transition: transform 0.4s var(--ease-out), visibility 0s linear 0.4s;
}
.app-offline svg { flex: 0 0 20px; width: 20px; height: 20px; }
.app-offline.is-visible { transform: none; visibility: visible; transition: transform 0.4s var(--ease-out), visibility 0s; }

/* ---------- Entdecken ---------- */
.is-app .page-hero:has(#eventsCity) .kicker,
.is-app .page-hero:has(#eventsCity) .lead { display: none; }
.is-app .page-hero:has(#eventsCity) .btn-row { margin-top: 10px; }
.is-app #catChips { position: sticky; top: calc(44px + var(--sat, env(safe-area-inset-top, 0px))); z-index: 20; margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.is-app .event-grid { margin-top: 14px; gap: 14px; }
.is-app .event-media { aspect-ratio: auto; height: 104px; }
.is-app .event-media .cat-glyph { width: 58px; left: 50%; right: auto; top: 50%; bottom: auto; translate: -50% -50%; }
.is-app .date-badge { top: 12px; left: 12px; min-width: 52px; padding: 6px 8px 5px; }
.is-app .price-badge { top: 12px; right: 12px; }
.is-app .event-body { padding: 16px 18px 18px; }
.is-app .event-card h3 { font-size: 1.18rem; margin: 6px 0 10px; }
.is-app .event-foot { padding-top: 14px; }
.is-app .event-skel { height: 250px; }
/* Filter in einer wischbaren Zeile statt übereinander */
.is-app .events-toolbar { margin-top: 10px; }
.is-app .events-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; gap: 8px; }
.is-app .events-filters::-webkit-scrollbar { display: none; }
.is-app .events-filters > * { flex: 0 0 auto; }
.is-app .events-toolbar .segmented, .is-app .events-filters .select-wrap, .is-app .events-filters .select-wrap select { width: auto; }
.is-app .events-toolbar .segmented button { flex: 0 0 auto; padding: 0 14px; }
.is-app .result-count { margin-top: 6px; font-size: 0.8125rem; }

/* Dialoge unten wie ein Blatt, mit Abstand zur Home-Leiste */
.is-app .event-dialog { padding-bottom: var(--sab, env(safe-area-inset-bottom, 0px)); }
.is-app .event-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.is-app .event-dialog .dialog-actions > * { flex: 1 1 calc(50% - 5px); min-width: 0; }
.is-app .event-dialog .dialog-actions > .btn-primary,
.is-app .event-dialog .dialog-actions > .acct-muted-note { flex-basis: 100%; }
.is-app .event-dialog .dialog-actions > .btn[data-close]:not(.btn-primary) { display: none; }
.is-app .dialog-media .price-badge { right: 62px; }
/* Griff oben an Blättern: nach unten wischen schließt */
.is-app .event-dialog::before,
.is-app .acct-dialog::before {
  content: "";
  position: sticky;
  top: 8px;
  z-index: 3;
  display: block;
  width: 38px; height: 5px;
  margin: 8px auto -13px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}
.is-app .acct-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; padding-bottom: var(--sab, env(safe-area-inset-bottom, 0px)); }
/* Blätter kommen mit einer ruhigen Feder hoch und gleiten beim Schließen wieder nach unten.
   Der abgedunkelte Hintergrund blendet im selben Takt ein und aus. */
@media (max-width: 759px) {
  .is-app :is(.event-dialog, .acct-dialog)[open] { animation: app-sheet-in var(--spring-smooth-d) var(--spring-smooth) backwards; }
  .is-app .ui-sheet[open] { animation: app-sheet-in var(--spring-smooth-d) var(--spring-smooth) backwards; }
  .is-app :is(.event-dialog, .acct-dialog, .ui-sheet)[open]::backdrop { animation: app-fade-in 0.32s ease-out backwards; }
  .is-app :is(.event-dialog, .acct-dialog, .ui-sheet).app-closing { animation: app-sheet-out 0.28s cubic-bezier(0.4, 0, 0.9, 0.6) forwards; }
  .is-app :is(.event-dialog, .acct-dialog, .ui-sheet, .ui-dialog).app-closing::backdrop,
  .is-app .event-dialog.app-collapsing::backdrop { animation: app-fade-out 0.28s ease-in forwards; }
  /* Karte wird zum Blatt (app.js): dann übernimmt die Karten-Animation, nicht das Hochgleiten */
  .is-app .event-dialog.app-expanding { animation: none; }
  .is-app .ui-sheet.is-closing { opacity: 1; translate: 0 100%; transition: translate 0.24s cubic-bezier(0.4, 0, 0.9, 0.6); }
}
/* Hinweise und Rückfragen springen wie iPhone-Hinweise kurz aus der Tiefe auf */
.is-app .ui-dialog[open] { animation: app-alert-in var(--spring-snappy-d) var(--spring-snappy) backwards; }
.is-app .ui-dialog[open]::backdrop { animation: app-fade-in 0.25s ease-out backwards; }
.is-app .ui-dialog.app-closing { animation: app-fade-out 0.16s ease-in forwards; }
@keyframes app-sheet-in { from { translate: 0 100%; } }
@keyframes app-sheet-out { to { translate: 0 105%; } }
@keyframes app-alert-in { from { opacity: 0; scale: 1.14; } }
@keyframes app-fade-out { to { opacity: 0; } }
/* Beim Wegziehen eines Blatts wird der Hintergrund im gleichen Maß heller (Wert setzt app.js) */
.is-app :is(.event-dialog, .acct-dialog).is-dragging::backdrop { opacity: calc(1 - var(--drag-p, 0)); animation: none; }
@media (prefers-reduced-motion: reduce) {
  .is-app :is(.event-dialog, .acct-dialog, .ui-sheet, .ui-dialog)[open] { animation: app-fade-in 0.2s ease-out backwards; }
  .is-app :is(.event-dialog, .acct-dialog, .ui-sheet, .ui-dialog).app-closing { animation: app-fade-out 0.15s ease-in forwards; }
}
.is-app .acct-dialog-body { max-height: 88dvh; }
.is-dragging { transition: none !important; }
.is-app .ui-toasts { bottom: calc(96px + var(--sab, env(safe-area-inset-bottom, 0px))); }

/* Version 1 der App: Anmeldung per E-Mail (Google- und Apple-Login folgen) */
.is-app #oauth-box { display: none !important; }

/* ---------- Einführung beim ersten Start ---------- */
.app-intro {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  padding: calc(var(--sat, env(safe-area-inset-top, 0px)) + 10px) 0 calc(env(safe-area-inset-bottom, 0px) + 22px);
  animation: app-intro-in 0.3s var(--ease-out); transition: opacity 0.3s var(--ease-out);
}
/* Ohne Animation (z. B. Hintergrund-Tab) ist die Einführung sofort sichtbar, nie unsichtbar und blockierend */
@keyframes app-intro-in { from { opacity: 0; } }
.app-intro.is-closing { opacity: 0; pointer-events: none; }
.app-intro-skip { align-self: flex-end; margin: 0 12px; padding: 10px 12px; border: 0; background: none; color: var(--ink-muted); font: 500 0.9375rem/1 var(--sans); cursor: pointer; }
.app-intro-viewport { flex: 1; min-height: 0; overflow: hidden; }
.app-intro-track { display: flex; width: 100%; height: 100%; transition: transform 0.45s var(--ease-out); }
.app-intro-card { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 32px; text-align: center; }
.app-intro-icon { width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; margin-bottom: 8px; }
.app-intro-icon svg { width: 44px; height: 44px; }
.app-intro-icon .app-logo { width: 52px; height: 52px; }
.app-intro-icon.tint-brick { background: var(--brick-tint); }
.app-intro-icon.tint-sage { background: var(--sage-tint); color: var(--sage-ink); }
.app-intro-icon.tint-gold { background: var(--gold-tint); color: var(--gold-ink); }
.app-intro-icon.tint-plum { background: var(--plum-tint); color: var(--plum-ink); }
.app-intro-card h2 { margin: 0; font: 600 1.75rem/1.15 var(--serif); }
.app-intro-card p { margin: 0; max-width: 340px; color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.5; }
.app-intro-foot { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 0 24px; }
.app-intro-foot .btn { max-width: 420px; }
.app-intro-dots { display: flex; gap: 8px; }
.app-intro-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width 0.3s var(--ease-out), background 0.3s; }
.app-intro-dots i.is-active { width: 22px; background: var(--brick); }
@media (prefers-reduced-motion: reduce) { .app-intro, .app-intro-track, .app-intro-dots i { transition: none; animation: none; } }

/* ---------- Echte iPhone-Tab-Leiste (App mit CirclelyTabBar) ----------
   Die App zeichnet die Leiste selbst. Die Seite lässt unten so viel Platz, wie sie hoch ist (--ntb, inkl. Home-Leiste). */
.has-native-tabbar .app-tabbar { display: none !important; }
.is-app.has-native-tabbar body { padding-bottom: calc(var(--ntb, 83px) + 16px); }
.is-app.has-native-tabbar .ui-toasts { bottom: calc(var(--ntb, 83px) + 12px); }

/* ---------- Entdecken: Umschalter Liste | Karte (nur App mit Apple-Karte) ---------- */
.is-app .app-viewswitch { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 0 0 14px; }
.is-app .app-viewswitch button { justify-content: center; }

/* ---------- Breite Fenster ohne iPad-Leiste: iPhone Duo aufgeklappt, iPad geteilte Ansicht ----------
   Ab 600px Breite stehen Treffen in zwei Spalten. Normale iPhones sind schmaler (höchstens ca. 440px).
   Der Abstand zwischen den Spalten liegt mittig, beim aufgeklappten iPhone Duo also über dem Falz. */
@media (min-width: 600px) {
  .is-app .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .is-app .acct-wrap { max-width: 720px; }
  .is-app .acct-dialog { max-width: 620px; margin-inline: auto; }
}

/* Sehr breit (iPad quer, iPhone Duo aufgeklappt quer): Meine Treffen und Deine Leute ebenfalls zweispaltig,
   damit keine Karte über den Falz läuft. Der Rest (Profil, Formulare) bleibt schmal und mittig. */
@media (min-width: 900px) {
  .is-app:is([data-app-tab="treffen"], [data-app-tab="leute"]) .acct-wrap { max-width: 1040px; }
  .is-app :is(#list-joined-events, #list-hosted-events, #list-people, .acct-earlier > .acct-events-list) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 10px; align-items: start;
  }
  .is-app :is(#list-joined-events, #list-hosted-events, #list-people) > :is(.acct-empty, .acct-skeleton, .acct-earlier, .acct-muted-note) { grid-column: 1 / -1; }
}

/* ---------- iPad (ab App 1.1 läuft die App dort in voller Größe) ----------
   iPhones sind immer schmaler als 760px (Hochformat), daher ändert sich dort nichts. */
@media (min-width: 760px) {
  .is-app .acct-wrap { max-width: 720px; }
  /* Unten angedockte Fenster mittig statt über die ganze Breite */
  .is-app .acct-dialog { max-width: 620px; margin: auto; border-radius: 28px; padding-bottom: 0; }
  /* Mittige Fenster auf dem iPad brauchen keinen Wisch-Griff */
  .is-app .event-dialog::before, .is-app .acct-dialog::before { display: none; }
}

/* iPad: Die Tab-Leiste schwebt oben in der Mitte (wie in iPadOS), der Inhalt läuft darunter durch.
   app.js schaltet das um, sobald das Fenster breit und hoch genug ist (auch beim Wechsel in die geteilte Ansicht). */
@media (min-width: 760px) and (min-height: 600px) {
  .app-shell.has-top-tabbar .app-tabbar {
    top: calc(env(safe-area-inset-top, 0px) + 10px); bottom: auto; left: 50%; right: auto;
    width: max-content;
    grid-template-columns: repeat(4, 150px);
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    box-shadow: 0 10px 30px -14px rgba(45, 33, 20, 0.35), inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
    translate: -50% 0;
  }
  .app-shell.has-top-tabbar .app-tab-pill { top: 5px; left: 5px; width: 150px; height: 42px; border-radius: 999px; transition: transform var(--spring-snappy-d) var(--spring-snappy); }
  .app-shell.has-top-tabbar .app-tabbar a { flex-direction: row; gap: 8px; min-height: 42px; border-radius: 999px; font-size: 14px; }
  .app-shell.has-top-tabbar .app-tabbar a svg { width: 20px; height: 20px; }
  .app-shell.has-top-tabbar .app-tabbar.is-covered { transform: translateY(calc(-100% - 40px)); }
  /* Seiten in den Bereichen: oben Platz für die schwebende Leiste, unten keiner mehr */
  .is-app.has-top-tabbar body { padding-top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 70px); padding-bottom: calc(28px + var(--sab, env(safe-area-inset-bottom, 0px))); }
  .is-app.has-top-tabbar .app-navbar { display: none; }
  .is-app.has-top-tabbar #catChips { top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 62px); }
  .is-app.has-top-tabbar .ui-toasts { bottom: calc(24px + var(--sab, env(safe-area-inset-bottom, 0px))); }
  .is-app.has-top-tabbar .app-ptr { top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 72px); }
  .is-app.has-top-tabbar.app-subpage body { padding-top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 62px); }
  .is-app.has-top-tabbar.app-subpage .app-topbar { top: calc(var(--sat, env(safe-area-inset-top, 0px)) + 62px); padding-top: 0; }
  .is-app.has-top-tabbar .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Erfolgsmoment (z. B. „Super, du bist dabei!“) ----------
   Ein Haken zeichnet sich in einem Kreis, der mit einer Feder aufspringt. */
.ui-success-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 2px auto -2px; border-radius: 50%; background: var(--success-bg); color: var(--success-ink); }
.ui-success-mark svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ui-success-mark path { stroke-dasharray: 30; stroke-dashoffset: 0; }
.ui-dialog.is-success .ui-dialog-body { text-align: center; }
.ui-dialog.is-success .ui-dialog-actions { justify-content: stretch; }
.ui-dialog.is-success .ui-dialog-actions .btn { flex: 1; }
.is-app .ui-dialog[open] .ui-success-mark { animation: app-pop var(--spring-bouncy-d) var(--spring-bouncy) 0.08s backwards; }
.is-app .ui-dialog[open] .ui-success-mark path { animation: app-draw 0.42s cubic-bezier(0.65, 0, 0.35, 1) 0.26s backwards; }
@keyframes app-pop { from { scale: 0.4; opacity: 0; } }
@keyframes app-draw { from { stroke-dashoffset: 30; } }
@media (prefers-reduced-motion: reduce) { .is-app .ui-dialog[open] .ui-success-mark, .is-app .ui-dialog[open] .ui-success-mark path { animation: none; } }

/* ---------- Bedienungshilfen des iPhones (setzt die App) ----------
   „Fettere Schrift“: alles eine Stufe kräftiger. „Transparenz reduzieren“: keine Milchglas-Flächen. */
.ios-bold body { font-weight: 500; }
.ios-bold :is(b, strong, h1, h2, h3, h4, .btn, label, .app-setting-label) { font-weight: 700; }
.ios-solid * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.ios-solid :is(.app-navbar, .app-topbar, #catChips, .app-tabbar) { background: var(--bg) !important; }
.ios-solid :is(dialog)::backdrop { background: rgba(14, 20, 16, 0.6) !important; }
/* „Kontrast erhöhen“ (versteht WebKit selbst): dunklere Nebentexte und kräftigere Linien */
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --ink-soft: #2F3A32; --ink-muted: #3B463E; --line: rgba(29, 38, 32, 0.28); --line-strong: rgba(29, 38, 32, 0.45); }
}
@media (prefers-contrast: more) { :root[data-theme="light"] { --ink-soft: #2F3A32; --ink-muted: #3B463E; --line: rgba(29, 38, 32, 0.28); --line-strong: rgba(29, 38, 32, 0.45); } }
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink-soft: #D6DDD2; --ink-muted: #C3CCBF; --line: rgba(237, 239, 232, 0.26); --line-strong: rgba(237, 239, 232, 0.42); }
}
@media (prefers-contrast: more) { :root[data-theme="dark"] { --ink-soft: #D6DDD2; --ink-muted: #C3CCBF; --line: rgba(237, 239, 232, 0.26); --line-strong: rgba(237, 239, 232, 0.42); } }

/* ---------- Große Schrift: umbrechen statt abschneiden ---------- */
/* Einstellungen: Optionen dürfen in eine zweite Zeile rutschen */
.is-app .app-theme-seg, .is-app .app-lang-seg { display: flex; flex-wrap: wrap; }
.is-app .app-theme-seg > button, .is-app .app-lang-seg > button { flex: 1 1 auto; }
/* „Dein nächstes Treffen“: Titel in bis zu zwei Zeilen statt „Run Club an der E…“ */
.is-app .next-up strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Platz-Zeile unter Treffen-Karten bricht um, statt über den Rand zu laufen */
.is-app .spots-row { flex-wrap: wrap; gap: 2px 12px; }
