/* Visitenkarte A18 (31.10.2026): Figur "Wussten Sie schon?" in drei Positionen (data-pos 1 oben rechts, 2 im Seitenfluss,
   3 Lasche rechts), Tipps-Fenster groesser, verschiebbar (kueche.js kc.ziehen), Liquid Glass. Kommt nach tipps.css.
   Bausteine: Fall-Pendel und Kachel wie die Gutscheine (nav-gg.css), Federkurven aus a11.css, kc-schiene (kueche.css),
   versteckte Checkbox + Label (a16.css). Bewegt werden nur transform und opacity; visibility schaltet hart. */

/* Termin: Symbol in der ersten Zeile, beide Zeilen exakt mittig (wie A17) */
.knopf.termin { gap: 0; }
.termin-text { align-items: center; text-align: center; }
.termin-text b { display: inline-flex; align-items: center; gap: 8px; }
.termin-text b .i { flex: none; }

.tp-schalter { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

/* Schalter: --tp-an springt auf 1 (fest positioniert: ab 560 px Scrollen; im Seitenfluss: wenn die Figur ins Bild kommt).
   Die Figur fragt ihn per Style-Query ab und tritt dann zeitbasiert mit Feder auf. Ohne scroll-gesteuerte Animation bleibt
   die feste Figur weg, die im Seitenfluss steht einfach da. */
@property --tp-an { syntax: "<integer>"; inherits: true; initial-value: 0; }
@keyframes tp-schalten { from { --tp-an: 0; } to { --tp-an: 1; } }
.tp-ort { font-size: 10px; pointer-events: none; }
.tp[data-pos="1"] .tp-ort, .tp[data-pos="3"] .tp-ort { position: fixed; z-index: 60; }
@supports (animation-timeline: scroll()) {
  .tp[data-pos="1"] .tp-ort, .tp[data-pos="3"] .tp-ort { animation: tp-schalten linear both; animation-timeline: scroll(root); animation-range: 560px 561px; }
  html.app-huelle .tp[data-pos="1"] .tp-ort, html.app-huelle .tp[data-pos="3"] .tp-ort { animation-timeline: --seite; }   /* In-App: body scrollt */
  .tp[data-pos="2"] .tp-ort { animation: tp-schalten linear both; animation-timeline: view(); animation-range: entry 45% entry 46%; }
}
@supports not (animation-timeline: scroll()) { .tp[data-pos="2"] .tp-ort { --tp-an: 1; } }

.tp-figur { position: relative; display: flex; flex-direction: column; align-items: center; opacity: 0; visibility: hidden;
  transition: transform 480ms var(--feder-seite), opacity 220ms linear, visibility 0s linear 480ms; }
.tp-figur-auf { display: flex; flex-direction: column; align-items: center; cursor: pointer; pointer-events: none;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; transition: transform 180ms var(--feder-pille); }
.tp-figur-auf:active { transform: scale(0.94); }
.tp-motiv { display: block; width: 60px; height: 60px; animation: tp-schweben 3.6s ease-in-out infinite; }
.tp-motiv svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
@keyframes tp-schweben { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); } 50% { transform: translate3d(0, -5px, 0) rotate(3deg); } }
.tp-funkeln { transform-origin: 32px 26px; animation: tp-funkeln 2.4s ease-in-out infinite; }
@keyframes tp-funkeln { 0%, 100% { opacity: 0.35; transform: scale(0.92); } 50% { opacity: 0.8; transform: scale(1.06); } }
.tp-muenze { animation: tp-muenze 2.6s cubic-bezier(0.5, 0, 0.75, 0) infinite; }
@keyframes tp-muenze { 0%, 30% { opacity: 0; transform: translateY(-6px); } 45% { opacity: 1; } 80% { opacity: 1; transform: translateY(7px); }
  92%, 100% { opacity: 0; transform: translateY(9px); } }
.tp-tropfen { animation: tp-tropfen 1.8s linear infinite; }
.tp-tropfen + .tp-tropfen { animation-delay: 0.9s; }
@keyframes tp-tropfen { 0% { opacity: 0; transform: translateY(-4px); } 20% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(8px); } }

/* Kachel wie "300 € fuers Empfehlen" (nav-gg.css .ggn-preis) */
.tp-kachel { position: relative; margin-top: -0.3em; display: grid; justify-items: center; gap: 0.25em; padding: 0.45em 0.8em 0.5em;
  border-radius: 1.1em; color: #fff; background: linear-gradient(180deg, rgba(52, 56, 60, 0.94), rgba(26, 28, 31, 0.96));
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.35), 0 0.5em 1.4em rgba(0, 0, 0, 0.55), 0 0 1.6em rgba(62, 224, 143, 0.18); }
.tp-kachel b { font-size: 1.6em; line-height: 1; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.tp-kachel small { font-size: 0.95em; line-height: 1.1; font-weight: 600; white-space: nowrap; color: var(--accent); }

.tp-figur-weg { position: absolute; top: -2px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  color: var(--text-2); background: rgba(44, 46, 49, 0.96); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer; pointer-events: none; -webkit-tap-highlight-color: transparent; }
.tp-figur-weg::before { content: ""; position: absolute; inset: -11px; }   /* Tippflaeche 44 px */
.tp-figur-weg svg, .tp-zu svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.tp-figur-weg svg { width: 10px; height: 10px; }

/* ---- Position 1: oben rechts unter der Leiste. Schwebt gross herein, dockt nach gut 2 s klein an (Kachel blendet aus) ---- */
.tp[data-pos="1"] .tp-ort { top: calc(var(--safe-oben) + 66px); right: max(8px, env(safe-area-inset-right, 0px)); width: 94px; }
.tp[data-pos="1"] .tp-figur { transform-origin: 100% 0; transform: translate3d(130px, -40px, 0) rotate(28deg); }
@keyframes tp-rein-r {
  0% { opacity: 0; transform: translate3d(130px, -40px, 0) rotate(28deg); } 12% { opacity: 1; }
  45% { transform: translate3d(-7px, 3px, 0) rotate(-10deg); } 68% { transform: translate3d(3px, -1px, 0) rotate(5deg); }
  86% { transform: translate3d(-1px, 0, 0) rotate(-2deg); } 100% { opacity: 1; transform: none; } }
@keyframes tp-andocken { from { transform: none; } to { transform: scale(0.58); } }
@keyframes tp-kachel-weg { to { opacity: 0; transform: translateY(-6px) scale(0.8); } }

/* ---- Position 2: im Seitenfluss zwischen zwei Abschnitten, poppt beim Hineinscrollen auf, mit Sprechblase ---- */
.tp[data-pos="2"] { margin: var(--s4, 32px) 0 0; }
.tp[data-pos="2"] .tp-ort { display: flex; justify-content: center; }
.tp[data-pos="2"] .tp-figur-auf { flex-direction: row; gap: 14px; }
.tp[data-pos="2"] .tp-figur-mitte { display: flex; flex-direction: column; align-items: center; }
.tp[data-pos="2"] .tp-figur { transform-origin: 50% 70%; transform: scale(0.3) rotate(-18deg); }
.tp-blase { position: relative; max-width: 168px; padding: 10px 14px; border-radius: 18px 18px 18px 6px; font-size: 15px; line-height: 20px;
  font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16); }
.tp-blase small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--accent); }
@keyframes tp-pop { 0% { opacity: 0; transform: scale(0.3) rotate(-18deg); } 55% { opacity: 1; transform: scale(1.08) rotate(5deg); }
  75% { transform: scale(0.97) rotate(-2deg); } 100% { opacity: 1; transform: none; } }

/* ---- Position 3: kleine Lasche am rechten Rand, mittig in der Hoehe, gleitet beim Scrollen heraus ---- */
.tp[data-pos="3"] .tp-ort { right: 0; top: 50%; margin-top: -48px; }
.tp[data-pos="3"] .tp-figur { transform-origin: 100% 50%; transform: translate3d(110%, 0, 0); }
.tp[data-pos="3"] .tp-figur-auf { padding: 8px 8px 7px 10px; border-radius: 20px 0 0 20px;
  background: linear-gradient(180deg, rgba(52, 56, 60, 0.95), rgba(26, 28, 31, 0.97));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.3), inset 0.5px 0 0 rgba(255, 255, 255, 0.18), -6px 8px 24px rgba(0, 0, 0, 0.5),
    0 0 1.6em rgba(62, 224, 143, 0.14); }
.tp[data-pos="3"] .tp-motiv { width: 40px; height: 40px; }
.tp[data-pos="3"] .tp-kachel { margin: 3px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
.tp[data-pos="3"] .tp-kachel b { font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--accent); }
.tp[data-pos="3"] .tp-kachel small { display: none; }
.tp[data-pos="3"] .tp-figur-weg { top: -9px; left: -9px; right: auto; }
@keyframes tp-lasche { 0% { opacity: 0; transform: translate3d(110%, 0, 0); } 30% { opacity: 1; } 70% { transform: translate3d(-6px, 0, 0); }
  100% { opacity: 1; transform: none; } }

/* ---- sichtbar (Style-Query auf den Schalter) ---- */
@container style(--tp-an: 1) {
  .tp-figur { opacity: 1; visibility: visible; transition: none; }
  .tp[data-pos="1"] .tp-figur { transform: scale(0.58);
    animation: tp-rein-r 1.25s cubic-bezier(0.37, 0, 0.63, 1) both, tp-andocken 0.6s var(--feder-pille) 2.6s forwards; }
  .tp[data-pos="1"] .tp-kachel { animation: tp-kachel-weg 0.35s ease 2.6s forwards; }
  .tp[data-pos="2"] .tp-figur { transform: none; animation: tp-pop 0.9s cubic-bezier(0.37, 0, 0.63, 1) both; }
  .tp[data-pos="3"] .tp-figur { transform: none; animation: tp-lasche 0.8s cubic-bezier(0.37, 0, 0.63, 1) both; }
}
/* antippbar erst, wenn sichtbar (nach den Grundregeln, sonst gewinnt deren pointer-events: none) */
@container style(--tp-an: 1) { .tp-figur-auf, .tp-figur-weg { pointer-events: auto; } }
#tp-weg:checked ~ .tp-ort .tp-figur { opacity: 0; visibility: hidden; animation: none;
  transition: transform 520ms var(--feder-seite), opacity 260ms linear, visibility 0s linear 520ms; }
.tp[data-pos="1"] #tp-weg:checked ~ .tp-ort .tp-figur { transform: translate3d(130px, -40px, 0) rotate(28deg); }
.tp[data-pos="3"] #tp-weg:checked ~ .tp-ort .tp-figur { transform: translate3d(110%, 0, 0); }
#tp-weg:checked ~ .tp-ort .tp-figur-auf, #tp-weg:checked ~ .tp-ort .tp-figur-weg { pointer-events: none; }
#tp-auf:checked ~ .tp-ort .tp-figur { transform: scale(1.18); opacity: 0; animation: none; transition: transform 360ms var(--feder-seite), opacity 140ms linear; }
#tp-auf:focus-visible ~ .tp-ort .tp-figur-auf, #tp-weg:focus-visible ~ .tp-ort .tp-figur-weg { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 14px; }

/* ---- Schleier und Fenster ---- */
.tp-schleier { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.32); opacity: 0; visibility: hidden;
  transition: opacity 320ms linear, visibility 0s linear 320ms; -webkit-tap-highlight-color: transparent; }
#tp-auf:checked ~ .tp-schleier { opacity: 1; visibility: visible; transition: opacity 320ms linear, visibility 0s; }

/* Halter: fest positioniert, traegt die Verschiebung durch den Finger (kc.ziehen setzt transform). Das Fenster darin geht aus der
   Figur auf (Ursprung je Position) mit leichtem Ueberschwingen wie ein iOS-Kontextmenue und schliesst ohne. */
.tp-zug { position: fixed; z-index: 100; width: min(360px, calc(100% - 16px)); pointer-events: none; }
.tp[data-pos="1"] .tp-zug { top: calc(var(--safe-oben) + 66px); right: max(8px, env(safe-area-inset-right, 0px)); }
.tp[data-pos="2"] .tp-zug { left: 0; right: 0; margin: 0 auto; bottom: calc(var(--dock-h) + var(--safe-unten) + 18px); }
.tp[data-pos="3"] .tp-zug { right: max(8px, env(safe-area-inset-right, 0px)); top: max(calc(var(--safe-oben) + 66px), calc(50% - 215px)); }

/* Liquid Glass (iOS): sehr transparent, starke Unschaerfe mit mehr Saettigung, feine Lichtkante oben und links,
   weiche Spiegelung oben links und ein schraeger Glanzstreifen */
.tp-blatt { position: relative; padding: 8px 0 12px; border-radius: 30px; isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.06)), rgba(28, 30, 34, 0.46);
  -webkit-backdrop-filter: blur(28px) saturate(190%) brightness(1.06); backdrop-filter: blur(28px) saturate(190%) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 1px 0 0 rgba(255, 255, 255, 0.16), inset 0 0 0 0.5px rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07), 0 24px 64px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: scale(0.3); opacity: 0; visibility: hidden;
  transition: transform 380ms var(--feder-seite), opacity 180ms linear 120ms, visibility 0s linear 380ms; }
.tp-blatt::before, .tp-blatt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; }
.tp-blatt::before { background: radial-gradient(120% 70% at 12% 0%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%); }
.tp-blatt::after { background: linear-gradient(115deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.06) 44%, rgba(255, 255, 255, 0) 56%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tp-blatt { background-color: rgba(28, 30, 34, 0.96); } }
.tp[data-pos="1"] .tp-blatt { transform-origin: calc(100% - 30px) 30px; }
.tp[data-pos="2"] .tp-blatt { transform-origin: 50% 100%; }
.tp[data-pos="3"] .tp-blatt { transform-origin: 100% 50%; }
#tp-auf:checked ~ .tp-zug .tp-blatt { transform: none; opacity: 1; visibility: visible; pointer-events: auto;
  transition: transform 560ms var(--feder-pille), opacity 120ms linear, visibility 0s; }

.tp-kopf { display: flex; align-items: center; gap: 8px; padding: 14px 12px 0 16px; touch-action: none; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }   /* iOS: keine Textauswahl/Lupe beim Ziehen */
.kc-zieht .tp-kopf { cursor: grabbing; }
.tp-griff { position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }
.tp-kopf .tp-motiv { width: 30px; height: 30px; animation: none; }
.tp-kopf .tp-motiv svg { filter: none; }
.tp-kopf h2 { flex: 1; margin: 0; font-size: 18px; line-height: 23px; font-weight: 700; letter-spacing: -0.015em; }
.tp-zu { position: relative; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.4); color: var(--text);
  cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tp-zu::before { content: ""; position: absolute; inset: -7px; }
.tp-zu svg { width: 12px; height: 12px; }
.tp-karten { list-style: none; margin: 12px 0 0; padding: 0 16px 2px; scroll-padding-inline: 16px; --kc-rand: 16px; }
.tp-karte { width: calc(100% - 34px); display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  opacity: 0; transform: translate3d(24px, 0, 0); transition: transform 260ms var(--feder-seite), opacity 120ms linear; }
#tp-auf:checked ~ .tp-zug .tp-karte { opacity: 1; transform: none;
  transition: transform 620ms var(--feder-seite) calc(140ms + var(--i) * 70ms), opacity 300ms linear calc(140ms + var(--i) * 70ms); }
.tp-karte .tipp-titel { font-size: 17px; line-height: 22px; }
.tp-karte .tipp-text { font-size: 15px; line-height: 21px; color: rgba(235, 235, 245, 0.78); }
.tp-punkte { display: none; justify-content: center; gap: 6px; margin-top: 12px; }
.tp-karten[data-kc-rand] + .tp-punkte { display: flex; }
.tp-punkte span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25);
  transition: transform 320ms var(--kc-kurve), background-color 320ms var(--kc-kurve); }
.tp-punkte span.ist-an { background: var(--accent); transform: scale(1.35); }
.tp-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 0; padding: 0 18px;
  font-size: 12px; line-height: 16px; color: rgba(235, 235, 245, 0.55); }
.tp-fuss a { flex: none; color: var(--accent); font-weight: 600; padding: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  .tp-figur, .tp-blatt, .tp-karte, .tp-kachel { transform: none !important; animation: none !important;
    transition-property: opacity, visibility !important; transition-duration: 200ms, 0s !important; transition-delay: 0s !important; }
  .tp-motiv, .tp-muenze, .tp-funkeln, .tp-tropfen { animation: none !important; }
  .tp-figur-auf:active { transform: none; }
}
