/* Agent D: Handy-Fassung «Stories mit 3D». Gilt nur mit html.handy (Telefon hochkant oder ?handy=1).
   Aufbau: oben Fortschritt je Halt und Kapitelknopf, Mitte die Szene mit Tsari, unten im Daumenbereich der Text
   auf einem ruhigen Verlauf in der Grundfarbe (Tag hell, Nacht Tinte). Pop-ups und Kapitelwahl als Blätter von unten. */

html.handy { background: #dfe9f5; --st-oben: env(safe-area-inset-top, 0px); --st-unten: env(safe-area-inset-bottom, 0px); --st-rand: 20px; -webkit-tap-highlight-color: transparent; }
.handy body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.handy .tafel a, .handy .tafel button, .handy dialog, .handy .st-blatt { -webkit-user-select: auto; user-select: auto; }

/* Bisherige Bedienung der Flugfassung weg: Kopf, Schiene, Vor/Zurück, Mehr lesen, Hinweise */
.handy .kopf, .handy .schiene, .handy .en-hinweis, .handy .tafel .mehr, .handy .weiter-hinweis, .handy .flug .untertitel, .handy .station .untertitel { display: none !important; }
.handy .ladehinweis { left: 50%; right: auto; translate: -50% 0; bottom: calc(var(--st-unten) + 28px); font-size: 1rem; font-weight: 560; white-space: nowrap; }

/* ---------- Kopf: Fortschritt und Kapitel ---------- */
.st-kopf { display: none; }
.handy .st-kopf { display: block; position: fixed; inset: 0 0 auto 0; z-index: 30; padding: calc(var(--st-oben) + 8px) 12px 0; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in oklch, var(--grund) 62%, transparent), color-mix(in oklch, var(--grund) 0%, transparent));
  transition: opacity 240ms var(--ease); padding-bottom: 18px; }
.st-kopf > * { pointer-events: auto; }
.st-leiste { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; height: 3px; }
.st-leiste li { flex: 1; border-radius: 2px; background: color-mix(in oklch, var(--text) 24%, transparent); overflow: hidden; transition: background-color 900ms var(--ease); }
.st-leiste i { display: block; height: 100%; width: calc(var(--f, 0) * 100%); background: var(--text); border-radius: 2px; transition: background-color 900ms var(--ease); }
.st-leiste li.voll i { width: 100%; }
.st-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; min-height: 40px; }
.st-ort { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.2; color: var(--text); text-shadow: 0 0 14px color-mix(in oklch, var(--grund) 80%, transparent); max-width: 62%; opacity: 1; transition: opacity 300ms var(--ease); }
.st-fliegt .st-ort { opacity: 0; }
.st-kapitel { font: inherit; font-size: 0.9375rem; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 16px; border: 0; border-radius: 999px;
  background: color-mix(in oklch, var(--grund) 88%, transparent); color: var(--text); cursor: pointer; transition: transform 160ms var(--ease), background-color 900ms var(--ease), color 900ms var(--ease); }
.st-kap-pfeil { width: 8px; height: 8px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; rotate: 45deg; translate: 0 2px; }
.st-pause .st-kopf { opacity: 0.25; }

/* ---------- Text unten im Daumenbereich ---------- */
html.handy.flug .station .tafel {
  position: absolute !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; translate: none !important; transform: none !important;
  width: auto !important; max-width: none !important; max-height: 58svh !important; height: auto !important;
  padding: 84px var(--st-rand) calc(var(--st-unten) + 18px) !important; gap: 12px !important; border-radius: 0 !important; overflow: hidden !important;
  align-items: flex-start !important; text-align: left !important;
  background: linear-gradient(to top, var(--grund) 0%, color-mix(in oklch, var(--grund) 94%, transparent) 52%, color-mix(in oklch, var(--grund) 0%, transparent) 100%) !important;
}
.handy .farbe-hell .satz, .handy .farbe-hell .tafel, .handy .farbe-dunkel .satz, .handy .farbe-dunkel .tafel,
.handy .farbe-hoch-hell .satz, .handy .farbe-hoch-dunkel .satz { color: var(--text); text-shadow: none; }
.handy.flug .mit-schleier .satz::before { content: none; }
/* Schleier der Telefonfassung (Verlauf von oben, für Text oben) lag über Tsari: weg, der Text hat unten seinen eigenen Papierverlauf */
html.handy.flug .station::before { content: none !important; }   /* alle Station-Schleier (mit-schleier, prolog-schritt): Text hat unten den eigenen Verlauf */
.handy .satz { align-items: flex-start !important; gap: 0.18em; max-width: 100%; }
/* Fassung 10 B: feste Schriftstufen, auf dem Handy gleich an jedem Halt. Anschluss und Detail mindestens 17 px, Kern gross. */
html.handy .satz .sz.anschluss, html.handy .satz .sz.detail { font-size: 1.0625rem !important; line-height: 1.3 !important; font-weight: 560 !important; max-width: 34ch; }
html.handy .satz .sz.anschluss { margin: 0 0 0.4rem; }
html.handy .satz .sz.detail { margin: 0.7rem 0 0; color: color-mix(in oklch, var(--text) 86%, var(--grund)); }
html.handy .satz .sz.kern { font-size: clamp(2.3rem, 11vw, 3.2rem) !important; line-height: 0.9 !important; max-width: none; margin: 0; }
html.handy #start .satz .sz.kern { font-size: clamp(3.2rem, 17vw, 5rem) !important; line-height: 0.84 !important; }
.handy .uebergang { font-size: 1.0625rem; font-weight: 560; }
.handy .quelle-klein { font-size: 0.8125rem; opacity: 0.75; }
.handy .knoepfe { gap: 10px; width: 100%; }
.handy .knoepfe .knopf { min-height: 50px; font-size: 1.0625rem; padding: 0 22px; }
.handy .knopf, .handy .kapitel-knopf, .handy .st-kap, .handy .st-kapitel { transition: transform 160ms var(--ease), background-color 200ms var(--ease), color 200ms var(--ease); }
.handy .knopf:active, .handy .st-kapitel:active, .handy .st-kap:active, .handy .pp-wahl button:active, .handy .pp-zu:active, .handy .ws-zu:active { transform: scale(0.96); }
.handy .knopf:active { background: var(--tinte); }
.handy .knopf-zwei:active { background: var(--text); color: var(--grund); }
.handy .firmenlogo { max-width: 100%; }
/* Titel P1: Name gross, Knopf darunter */
.handy #start .tafel { padding-bottom: calc(var(--st-unten) + 40px); }
.handy #start .einsteigen { min-height: 54px; }

/* Einblendungen (Pitch-Foto, Eventfoto Mainz): wie ein Foto, das ins Bild fällt, im oberen Bildteil */
html.handy.flug .station .einblendung { left: auto !important; right: 3vw !important; top: calc(var(--st-oben) + 76px) !important; bottom: auto !important; width: 46vw !important; height: auto !important; translate: none !important; rotate: 2.5deg; box-shadow: 0 12px 30px rgb(4 8 20 / 0.35); }
html.handy.flug .station .einblendung img { width: 100% !important; height: auto !important; }

/* Ortsschild im Bild nicht doppelt zum Ort oben */
.handy .ortsschild { display: none; }

/* Tipp-Rückmeldung am Rand */
.st-tipp { display: none; }
.handy .st-tipp { display: block; position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.st-tipp span { position: absolute; top: 0; bottom: 0; width: 34vw; opacity: 0; }
.st-tipp-l { left: 0; background: linear-gradient(to right, color-mix(in oklch, var(--text) 18%, transparent), transparent); }
.st-tipp-r { right: 0; background: linear-gradient(to left, color-mix(in oklch, var(--text) 18%, transparent), transparent); }
.st-tipp span.an { animation: st-tipp 420ms var(--ease); }
@keyframes st-tipp { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* Hinweis zur Bedienung (nur am Anfang) */
.st-hinweis { display: none; }
.handy .st-hinweis { display: block; position: fixed; left: 50%; top: calc(var(--st-oben) + 66px); translate: -50% -6px; z-index: 29; margin: 0; padding: 8px 14px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: var(--tinte); color: var(--papier); font-size: 0.875rem; font-weight: 600; line-height: 1.3; text-align: center; width: max-content; max-width: calc(100vw - 48px); border-radius: 16px; opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease), translate 600ms var(--ease); }
.handy .st-hinweis.an { opacity: 1; translate: -50% 0; transition-delay: 1200ms; }

/* Querformat: freundlich bitten, das Handy wieder zu drehen */
.st-quer { display: none; }
@media (orientation: landscape) and (max-height: 540px) {
  .handy .st-quer { display: grid; place-items: center; position: fixed; inset: 0; z-index: 60; background: var(--grund); color: var(--text); text-align: center; padding: 24px; }
  .handy .st-quer p { font-family: var(--display); font-weight: 800; font-size: 2rem; text-transform: uppercase; line-height: 1; }
}

/* Vor/Zurück für Tastatur und Vorleser: erst sichtbar mit Fokus */
.st-sr { display: none; }
.handy .st-sr { display: flex; gap: 8px; position: fixed; left: 12px; bottom: calc(var(--st-unten) + 12px); z-index: 35; }
.st-sr button { font: inherit; font-weight: 650; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--tinte); color: var(--papier); }
.st-sr button:not(:focus-visible) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }

/* ---------- Kapitelwahl: Blatt von unten, fast Vollbild ---------- */
.st-blatt[hidden] { display: none; }
.st-blatt { position: fixed; inset: 0; z-index: 50; background: rgb(13 22 38 / 0); transition: background-color 300ms var(--ease); }
.st-blatt.an { background: rgb(13 22 38 / 0.5); }
.st-blatt-innen { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--st-oben) + 14px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--papier); color: var(--tinte); border-radius: 22px 22px 0 0; padding: 8px var(--st-rand) calc(var(--st-unten) + 20px);
  transform: translateY(100%); transition: transform 340ms cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 8px; }
.st-blatt.an .st-blatt-innen { transform: translateY(var(--zug, 0px)); }
.st-blatt.st-zieht .st-blatt-innen { transition: none; }
.st-griff { width: 44px; height: 5px; border-radius: 3px; background: color-mix(in oklch, var(--tinte) 28%, transparent); margin: 2px auto 10px; flex-shrink: 0; }
.st-blatt-titel { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.3rem, 11vw, 3rem); line-height: 0.88; margin: 6px 0 10px; }
.st-kap-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.st-kap-liste li + li { border-top: 1px solid color-mix(in oklch, var(--tinte) 12%, transparent); }
.st-kap { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-decoration: none; }
.st-kap-liste .st-kap { width: 100%; display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 10px 6px; border-radius: 12px; }
.st-kap-liste .st-kap[aria-current] { background: color-mix(in oklch, var(--kobalt) 9%, transparent); }
.st-kap-liste .st-kap:active { background: color-mix(in oklch, var(--kobalt) 16%, transparent); }
.st-kap svg { width: 76px; height: 70px; overflow: visible; }
.st-kap polyline { fill: none; stroke: #2a231f; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.st-blatt.an .st-kap polyline { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms cubic-bezier(.4,.1,.2,1) calc(var(--j) * 90ms + 160ms); }
.st-kap-text { display: grid; gap: 2px; }
.st-kap-text b { font-family: var(--display); font-weight: 850; font-size: 1.85rem; line-height: 0.95; text-transform: uppercase; }
.st-kap-text small { font-size: 0.9375rem; font-weight: 520; opacity: 0.8; }
.st-kap-text small:empty { display: none; }
.st-kap-haken { width: 26px; text-align: center; color: var(--kobalt); font-weight: 800; font-size: 1.1rem; }
.st-kap.gesehen .st-kap-haken::after { content: "✓"; }
.st-blatt-unten { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.st-kap-klein { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--tinte); font-weight: 650; font-size: 1rem; }
.st-kap-klein:active { background: var(--tinte); color: var(--papier); }
.st-blatt-zu { font: inherit; font-weight: 650; font-size: 1rem; align-self: center; margin-top: auto; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--tinte); color: var(--papier); cursor: pointer; }

/* ---------- Pop-ups als Blatt von unten ---------- */
.handy dialog.popup .pp-buehne { inset: auto 0 0 0; top: calc(var(--st-oben) + 14px); display: block; padding: 6px 16px calc(var(--st-unten) + 20px); pointer-events: auto; overflow-y: auto; overscroll-behavior: contain;
  background: var(--papier); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgb(0 0 0 / 0.25);
  transform: translateY(100%); transition: transform 360ms cubic-bezier(.2,.8,.2,1); }
.handy dialog.popup.an .pp-buehne { transform: translateY(var(--zug, 0px)); }
.handy dialog.popup.st-zieht .pp-buehne { transition: none; }
.handy dialog.popup .pp-inhalt { width: 100%; max-width: none; max-height: none; overflow: visible; grid-template-columns: 1fr; gap: 16px; padding: 0; background: none; box-shadow: none; border-radius: 0; transform: none; opacity: 1; filter: none; transition: none; }
.handy dialog.popup .pp-zu { position: absolute; top: 10px; right: 12px; min-height: 40px; padding: 0 16px; background: var(--tinte); color: var(--papier); font-size: 0.9375rem; }
.handy dialog.popup .pp-text { padding-bottom: 4px; }
.handy dialog.popup .pp-text .pp-titel, .handy dialog.popup .pp-titel { font-size: clamp(2rem, 9.6vw, 2.6rem); line-height: 0.92; margin-top: 2px; }
.handy dialog.popup .pp-klein { font-size: 1.0625rem; }
.handy dialog.popup .pp-text p { font-size: 1.0625rem; }
.handy dialog.popup .pp-inhalt > :first-child { margin-top: 44px; }
.handy dialog.popup .pp-inhalt.pa-swiper .pp-handy { width: min(270px, 70vw); height: min(54vh, 520px); justify-self: center; }
.handy dialog.popup .pp-wahl button { min-height: 44px; }
.handy dialog.popup .pp-links .knopf { min-height: 50px; }
.handy dialog.spiel { position: fixed; inset: auto 0 0 0; top: calc(var(--st-oben) + 14px); width: 100%; max-width: none; max-height: none; margin: 0; border-radius: 22px 22px 0 0; padding: 8px 16px calc(var(--st-unten) + 20px); overflow-y: auto;
  transform: translateY(var(--zug, 0px)); }
.handy dialog.spiel.st-zieht { transition: none; }
.handy dialog.spiel .st-griff { background: color-mix(in oklch, var(--papier) 40%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .handy *, .handy *::before, .handy *::after { transition-duration: 1ms !important; animation: none !important; }
  .st-kap polyline { stroke-dashoffset: 0; }
}

/* ---------- Plakatwand (Abzweigung «Alle Vorträge»): Plakate als Streifen zum Wischen, Tippen öffnet das Plakat als Blatt ---------- */
html.handy.flug .plakat-knoepfe { position: static; inset: auto; display: flex; gap: 10px; margin: 2px calc(-1 * var(--st-rand)) 4px; padding: 4px var(--st-rand) 6px; width: calc(100% + 2 * var(--st-rand));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--st-rand); scrollbar-width: none; pointer-events: auto; touch-action: pan-x; }
html.handy.flug .plakat-knoepfe::-webkit-scrollbar { display: none; }
html.handy.flug .plakat-knoepfe li { display: flex; flex: 0 0 auto; scroll-snap-align: start; }
html.handy.flug .plakat-k { position: static; display: grid; align-content: start; gap: 4px; width: 142px; min-height: 84px; padding: 12px 14px; text-align: left;
  font-size: 0.9375rem; line-height: 1.2; color: var(--tinte); background: var(--papier); border-radius: 6px; box-shadow: 2px 3px 0 rgb(4 8 20 / 0.55); rotate: -0.8deg; }
html.handy.flug .plakat-knoepfe li:nth-child(even) .plakat-k { rotate: 0.9deg; }
html.handy.flug .plakat-k .pk-datum { font-size: 0.8125rem; font-weight: 650; opacity: 0.75; }
html.handy.flug .plakat-k .pk-anlass { font-family: var(--display); font-weight: 850; text-transform: uppercase; font-size: 1.25rem; line-height: 0.95; }
html.handy.flug .plakat-k:active { transform: scale(0.96); }
html.handy.flug #k2-plakate .quelle-klein { position: static !important; font-size: 0.8125rem; }
html.handy.flug .plakat-k.mit-bild { width: 104px; min-height: 0; padding: 0; background: none; box-shadow: 0 6px 16px rgb(0 0 0 / 0.45); border-radius: 3px; overflow: hidden; }
html.handy.flug .plakat-k.mit-bild img { display: block; width: 100%; height: auto; }
html.handy.flug .plakat-k.mit-bild span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Agent M: Grafikkontext verloren (iOS bei Speicherdruck): Grundfarbe statt leerer Leinwand, Ladehinweis wieder da */
.handy.kontext-weg .vorhang { opacity: 1; }
.handy.kontext-weg .ladehinweis { opacity: 1; z-index: 5; }

/* Agent M: Swiper-Pop-up. Die Aufnahme ist eine Desktop-Ansicht im Querformat (1040x728); im Laptop-Rahmen wurde sie auf dem Handy
   winzig, oben angeschnitten und wirkte zufällig. Hier zeigt ein Handy-Rahmen nur die Karte mit den Knöpfen (linker Teil der
   Aufnahme, Ausschnitt 410x728 ab x 50): so sieht man, was der Swiper ist, in lesbarer Grösse. */
.handy dialog.popup .pp-inhalt.pa-swiper .pp-swiperschirm { justify-self: center; width: min(250px, 64vw); aspect-ratio: 410 / 728; height: auto; max-height: 56dvh;
  border: 9px solid #22252b; border-radius: 30px; background: #fff; box-shadow: 0 18px 40px rgb(4 8 20 / 0.28); margin-top: 56px; }
.handy dialog.popup .pp-inhalt.pa-swiper .pp-swiperschirm video { width: 100%; height: 100%; object-fit: cover; object-position: 5% 50%; }
@media (max-height: 640px) { .handy dialog.popup .pp-inhalt.pa-swiper .pp-swiperschirm { width: min(200px, 52vw); } }

/* Agent M: niedrige Handys (iPhone SE 375x667, 320x568). Der Text lief unten aus der Fläche: Logo-Kärtchen (W4, B3),
   «Pitch ansehen» (A2), «Selber spielen» (P3) waren abgeschnitten. Kern richtet sich hier auch nach der Höhe,
   die Textfläche darf etwas höher werden, Abstände enger. Anschluss und Detail bleiben bei 16 px. */
@media (max-height: 700px) {
  html.handy.flug .station .tafel { max-height: 68svh !important; padding-top: 56px !important; gap: 8px !important; padding-bottom: calc(var(--st-unten) + 12px) !important; }
  html.handy .satz .sz.kern { font-size: clamp(1.9rem, min(10vw, 6.2dvh), 2.8rem) !important; }
  html.handy .satz .sz.anschluss, html.handy .satz .sz.detail { font-size: 1rem !important; line-height: 1.28 !important; }
  html.handy .satz .sz.detail { margin-top: 0.45rem; }
  .handy .knoepfe .knopf { min-height: 46px; font-size: 1rem; }
  html.handy .firmenlogo img, html[data-geraet="telefon-hoch"].handy .firmenlogo.fl-gross img { height: 46px !important; width: auto; }
  html.handy .firmenlogo.fl-gross { flex-direction: row; align-items: center; padding-block: 6px; }
}
/* Glückskeks-Blatt: Titel nicht unter dem Schliessen-Knopf, Knöpfe ganz sichtbar */
.handy dialog.popup .pp-inhalt.pa-keks { align-content: start; justify-items: start; }
.handy dialog.popup .pp-inhalt.pa-keks .pp-keks { justify-self: center; width: min(300px, 86vw); height: min(190px, 24dvh); }
.handy dialog.popup .pp-inhalt.pa-keks .kk-ganz { width: min(200px, 56vw); }
.handy dialog.popup .pp-inhalt.pa-keks .kh { width: min(140px, 40vw); }
@media (max-height: 700px) {
  /* Plakatwand: Plakatstreifen niedriger, damit die Quellenzeile darunter ganz Platz hat */
  html.handy.flug .plakat-k.mit-bild { width: 76px; }
  html.handy.flug #k2-plakate .quelle-klein { font-size: 0.75rem; line-height: 1.25; }
}

/* ---------- Agent M: Telefon quer (bisherige Flugfassung, nicht die Stories). Der Text lief unten in die Zeile mit Zurück,
   Ort und Weiter («Pitch ansehen», «Selber spielen», Logo-Kärtchen lagen unter dem Zurück-Knopf). Jetzt: Text links oben bis
   über diese Zeile, Ort neben dem Zurück-Knopf, Quellenzeile darunter, Schrift nach der Höhe. */
[data-geraet="telefon-quer"].flug .station .tafel { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; top: calc(var(--kopf-h) + 4px) !important; justify-content: flex-end; overflow: hidden;
  width: min(52vw, 480px) !important; max-width: none !important; padding: 10px 14px !important; gap: 6px !important; left: max(var(--rand), env(safe-area-inset-left, 0px)) !important; }
[data-geraet="telefon-quer"] .satz .sz.kern { font-size: clamp(1.4rem, 7.2dvh, 2.3rem) !important; line-height: 0.92 !important; }
[data-geraet="telefon-quer"] .satz .sz.anschluss, [data-geraet="telefon-quer"] .satz .sz.detail { font-size: clamp(0.875rem, 4dvh, 1rem) !important; line-height: 1.28 !important; }
[data-geraet="telefon-quer"] .knoepfe .knopf { min-height: 40px; padding-block: 0; }
[data-geraet="telefon-quer"] .firmenlogo img, [data-geraet="telefon-quer"] .firmenlogo.fl-gross img { height: 40px !important; width: auto; }
[data-geraet="telefon-quer"] .firmenlogo.fl-gross { flex-direction: row; align-items: center; padding-block: 4px; }
[data-geraet="telefon-quer"].flug .station .untertitel { left: calc(max(var(--rand), env(safe-area-inset-left, 0px)) + 62px) !important; bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important; max-width: calc(100vw - 260px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-geraet="telefon-quer"].flug .station .tafel .quelle-klein { position: static !important; inset: auto !important; font-size: 0.6875rem !important; line-height: 1.2; margin: 0; }
[data-geraet="telefon-quer"].flug .station .tafel .satz, [data-geraet="telefon-quer"].flug .station .tafel .satz .sz { max-width: none !important; }
[data-geraet="telefon-quer"].flug .station .tafel .satz .sz.kern { max-width: 19ch !important; }
[data-geraet="telefon-quer"].flug .station .tafel .satz .sz.anschluss, [data-geraet="telefon-quer"].flug .station .tafel .satz .sz.detail { max-width: 40ch !important; }
/* Agent M: Mainz hatte auf dem Handy einen negativen Rand von der Desktop-Fassung (Text 6 px vom Bildrand) */
html.handy.flug #k2-mainz .tafel { margin: 0 !important; }

/* Agent M (Q2): Zweitknöpfe (Agent-Check, LinkedIn) wirkten auf dunklem Grund grau und deaktiviert (55 % Weiss mit dunkler Schrift).
   Jetzt wie «Weiter mit der Geschichte»: durchsichtig, volle Kontur und Schrift in der Textfarbe. */
html.handy .knoepfe .knopf.knopf-zwei { background: transparent !important; color: var(--text) !important; box-shadow: inset 0 0 0 2px var(--text) !important; border-color: transparent !important; opacity: 1 !important; }
html.handy .knoepfe .knopf.knopf-zwei:active { background: var(--text) !important; color: var(--grund) !important; }
.st-ganz { white-space: nowrap; }

/* Agent M (Q3 N5): Bildtitel im Bilderrahmen auf dem Handy lag dünn und weiss über hellen Bildstellen (gelbes Tram).
   Jetzt auf einem dunklen Verlauf am unteren Bildrand, etwas kräftiger, Uhr kleiner, damit der Titel Platz hat. */
.handy .rt-bild::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; pointer-events: none;
  background: linear-gradient(to top, rgb(13 22 38 / 0.82), rgb(13 22 38 / 0.45) 55%, rgb(13 22 38 / 0)); }
.handy .rt-bild .rt-bildtext, .handy .rt-bild .rt-uhr { z-index: 1; }
.handy .rt-bild .rt-bildtext { left: 14px; right: 96px; bottom: 12px; font-size: 1.0625rem; font-weight: 600; text-shadow: none; }
.handy .rt-bild .rt-uhr { right: 14px; bottom: 8px; font-size: 1.9rem; text-shadow: none; }

/* ---------- Agent M (Runde M5, Tsari: «Ein Weiter-Knopf braucht es»): sichtbare Knöpfe Zurück und Weiter unten.
   Gleiche Knöpfe wie auf dem Desktop (Weiter dunkel gefüllt, Zurück mit Kontur), mindestens 52 px, über der Safe-Area.
   Der Text rückt darüber; Tippen links und rechts geht weiterhin. */
html.handy .vorzurueck { display: flex !important; left: 0; right: 0; bottom: 0; padding: 0 var(--st-rand) calc(10px + var(--st-unten)); justify-content: space-between; z-index: 31; pointer-events: none; }
html.handy .vorzurueck button { pointer-events: auto; min-height: 52px; min-width: 52px; font-size: 1rem; }
html.handy .vorzurueck .vz-zurueck { padding: 0; width: 52px; justify-content: center; }
html.handy .vorzurueck .vz-zurueck .vz-text { display: none; }
html.handy .vorzurueck .vz-weiter { padding: 0 22px; gap: 10px; }
html.handy .vorzurueck button:active { transform: scale(0.96); }
html.handy.flug .station .tafel { padding-bottom: calc(var(--st-unten) + 76px) !important; }
@media (max-height: 700px) { html.handy.flug .station .tafel { padding-bottom: calc(var(--st-unten) + 70px) !important; } }
/* Halte mit eigenen Knöpfen (Titel, Wahl, Frage, Epilog): der eigene Knopf ist der Weg weiter, die Leiste bleibt dezent */
/* Agent M (M7): Weiter immer sichtbar, auch an Halten mit eigenen Knöpfen (Tsari: «bei b-firma ist der Weiter-Button nicht da») */
html.handy:has(#start.aktiv) .vorzurueck { display: none !important; }
html.handy:has(#start.aktiv) #start .tafel { padding-bottom: calc(var(--st-unten) + 40px) !important; }
html.handy .st-hinweis { display: none !important; }
.st-blatt:not([hidden]) ~ .vorzurueck, html.handy:has(dialog[open]) .vorzurueck { visibility: hidden; }
/* Agent M (M5): Kontakt immer erreichbar, dezent neben dem Kapitel-Knopf */
.st-rechts { display: inline-flex; gap: 8px; align-items: center; flex-shrink: 0; }
.st-kontakt { font: inherit; font-size: 0.9375rem; font-weight: 650; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); transition: transform 160ms var(--ease), background-color 900ms var(--ease), color 900ms var(--ease); }
.st-kontakt:active { transform: scale(0.96); }
.st-kontakt[hidden] { display: none; }
.st-ort { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) { .st-kontakt, .st-kapitel { font-size: 0.875rem; padding: 0 11px; } }
/* Agent M: Einblendung (Pitch-Foto, Mainz) erst sichtbar, wenn das Bild geladen ist (vorher leerer Rahmen) */
.flug .station .einblendung:not(.geladen) { visibility: hidden !important; }
/* Agent M: Plakatwand-Quelle auf dem Handy über der neuen unteren Leiste (Zurück/Weiter) */
html.handy.flug #k2-plakate .quelle-klein { position: static !important; bottom: auto !important; }

/* ---------- Agent M, Runde M6 (Mängel Q4) ---------- */
/* Knopfreihen im Text (b-firma) umbrechen statt quer aus dem Bild laufen */
html.handy.flug .station .tafel .knoepfe { flex-wrap: wrap !important; overflow: visible !important; }
html.handy.flug .station .tafel .knoepfe .knopf { white-space: normal; text-align: left; }
/* Ort im Kopf: Etikett mit Fläche wie auf dem Desktop, 16 px vom Rand, bei Bedarf zweizeilig statt abgeschnitten */
html.handy .st-kopf { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
html.handy .st-ort { white-space: normal; text-overflow: clip; overflow: visible; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-size: 0.8125rem; line-height: 1.2; padding: 5px 10px; border-radius: 10px; max-width: 46%;
  background: color-mix(in oklch, var(--grund) 88%, transparent); text-shadow: none; }
html.handy .st-ort:empty { display: none; }
/* «Schreib mir» mit Fläche (Kirchturm lief durch die reine Kontur) */
html.handy .st-kontakt { background: color-mix(in oklch, var(--grund) 88%, transparent); }
/* Kapitelende-Zeichen lagen auf dem Handy oben über Tsaris Kopf (k2-artikel). Der Weiter-Knopf nennt das nächste Kapitel,
   der Kapitel-Knopf öffnet die ganze Wahl: auf dem Handy darum ohne die Zeichenreihe. */
/* Koordinator 14.11.: wieder sichtbar, G11 setzt die Karte auf dem Handy in die Textspalte (nie auf Tsari). */
/* Ohne Flug, Handy: Kapitelanfang kürzer (vorher eine leere Bildschirmhöhe vor dem Zeichen) */
@media (max-width: 767px) {
  .textfassung .of-auftakt { height: 115svh; margin-bottom: -55svh; }
}
html.handy.flug .station .tafel .knoepfe { gap: 8px !important; }
html.handy.flug .station .tafel .knoepfe .knopf { min-height: 44px; font-size: 0.9375rem; padding: 0 16px; }
html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .tafel { max-height: calc(100svh - var(--st-oben) - 96px) !important; }
@media (max-height: 700px) {
  html.handy.flug .station .tafel .knoepfe { gap: 6px !important; }
  html.handy.flug .station .tafel .knoepfe .knopf { min-height: 44px; font-size: 0.875rem; padding: 0 13px; }
  html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .satz .sz.detail { font-size: 0.9375rem !important; }
}
@media (max-width: 399px) { html.handy .st-ort { -webkit-line-clamp: 3; font-size: 0.75rem; padding: 4px 8px; } }
/* viele Knöpfe (b-firma): Textfläche darf bis unter den Kopf wachsen, statt unten in die Leiste zu laufen */
html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .tafel { max-height: calc(100svh - var(--st-oben) - 96px) !important; }
@media (max-height: 600px) {
  html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .satz .sz.detail { font-size: 0.875rem !important; line-height: 1.25 !important; }
  html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .satz .sz.kern { font-size: 1.6rem !important; }
}
@media (max-height: 600px) {
  /* 320x568: passt auch dann nicht ganz; die Textfläche lässt sich dort scrollen statt in die Leiste zu laufen */
  html.handy.flug .station:has(.knoepfe .knopf:nth-child(4)) .tafel { overflow-y: auto !important; justify-content: flex-start !important; overscroll-behavior: contain; padding-top: 24px !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 76px), transparent calc(100% - 60px)); mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 76px), transparent calc(100% - 60px)); }
}
/* Agent M (nach G11): Halte mit Kapitelende-Karte in der Textspalte dürfen höher werden, damit Karte und untere Leiste nicht kollidieren (Mainz) */
html.handy.flug .station .tafel:has(.kapitelende.im-text) { max-height: calc(100svh - var(--st-oben) - 96px) !important; }

/* ---------- Agent M, Runde M7: Grundregel untere Leiste und Touch ----------
   Die Leiste mit Zurück/Weiter liegt immer oben auf (z-index über allem ausser Blättern) und ist nie überdeckt.
   Gerechnet wird mit der kleinsten sichtbaren Höhe (svh, Safari mit Adressleiste) und der Safe-Area unten.
   Was nicht in die Textfläche passt, scrollt in ihr; ein weicher Rand zeigt, dass es weitergeht. */
html.handy .vorzurueck { z-index: 40; }
html.handy.flug .station .tafel { overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: none; }
html.handy.flug .station .tafel::-webkit-scrollbar { display: none; }
html.handy.flug .station .tafel.st-scrollt { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 84px), transparent calc(100% - 66px)); mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 84px), transparent calc(100% - 66px)); }
/* Kein Doppeltipp-Zoom, keine Verzögerung auf Knöpfen; Kopfknöpfe mindestens 44 px */
html.handy button, html.handy a, html.handy [role="tab"] { touch-action: manipulation; }
html.handy .st-kapitel, html.handy .st-kontakt { min-height: 44px; }
html.handy dialog .pp-buehne, html.handy dialog.spiel { touch-action: pan-y; }
html.handy.flug .station .tafel { touch-action: pan-y; }
/* Fusszeile im Epilog (Quellen, Impressum): Tippfläche 44 px */
html.handy .epilog-fuss a, html.handy .epilog-fuss button { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 6px; }
/* Wahl: bewusst ohne Weiter (Tsari: man entscheidet sich dort), auch auf dem Handy. Regel von G in geraete.css gilt. */
