/* Experiment: BOTTO1 bottom sheet on the homepage, opened only via /?aktion=botto1 (QR). Mobile first. */
.pz { --pz-ease: cubic-bezier(0.32, 0.72, 0, 1); --pz-out: cubic-bezier(0.23, 1, 0.32, 1); }
.pz-backdrop { position: fixed; inset: 0; z-index: 2147483600; background: rgba(15, 23, 42, .38); opacity: 0; transition: opacity .32s ease; }
.pz-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483601; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 24px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff; color: #23282e;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, .18); transform: translateY(100%); transition: transform .42s var(--pz-ease); touch-action: pan-x; font-family: Geist, system-ui, sans-serif; }
.pz.is-open .pz-backdrop { opacity: 1; }
.pz.is-open .pz-sheet { transform: translateY(var(--pz-drag, 0px)); }
.pz.is-dragging .pz-sheet { transition: none; }
.pz [hidden] { display: none !important; }

.pz-grab { width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: #d5d9de; }
.pz-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f3f5; color: #23282e; cursor: pointer; }
.pz-close svg { width: 18px; height: 18px; }

/* Hero: the letter card from /botto with the courier Botto beside it */
.pz-hero { position: relative; height: 176px; margin: 6px -8px 6px; border-radius: 22px; background: radial-gradient(60% 70% at 45% 55%, #F5EFE1 0%, rgba(245, 239, 225, 0) 75%); }
.pz-card { position: absolute; left: 50%; top: 22px; width: 216px; margin-left: -150px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 10px 12px; border: 0; border-radius: 10px;
  background: #FFFDF8; color: #23282e; box-shadow: inset 0 0 0 5px #FFFDF8, inset 0 0 0 6px rgba(212, 175, 55, .4), 0 10px 24px -10px rgba(15, 23, 42, .3); rotate: -4deg; cursor: pointer; touch-action: manipulation; }
.pz-from { font-size: 9px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #82662B; }
.pz-plus { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.04em; color: #B08F45; }
.pz-card b { font: 700 16px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .16em; }
.pz-card small { font-size: 10px; color: #626972; }
.pz-card.is-done small { color: #82662B; font-weight: 600; }
.pz-card:active { scale: .98; }
.pz-botto { position: absolute; right: 4px; top: 8px; width: 150px; height: 150px; }
.pz-botto svg { display: block; width: 100%; height: 100%; overflow: visible; }

.pz h2 { margin: 4px 0 0; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-weight: 600; text-align: center; text-wrap: balance; }
.pz-sub { margin: 6px 0 0; font-size: 16px; color: #626972; text-align: center; }
.pz-steps { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pz-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.pz-steps b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #F5EFE1; color: #82662B; font: 700 12px/1 ui-monospace, Consolas, monospace; }
.pz-cta { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 18px; border-radius: 14px; background: #23282e; color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; touch-action: manipulation; }
.pz-cta:active { opacity: .88; }
.pz-later { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: none; color: #626972; font-size: 15px; cursor: pointer; }
.pz-terms { display: block; margin-top: 2px; font-size: 12px; color: #8a9098; text-align: center; text-decoration: underline; text-decoration-color: #dfe2e5; text-underline-offset: 3px; }

/* After closing, a small chip keeps the code reachable */
.pz-chip { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2147483599; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px; border: 0; border-radius: 999px;
  background: #23282e; color: #fff; font: 600 14px/1 Geist, system-ui, sans-serif; box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .45); transform: translate(-50%, 0); transition: transform .3s var(--pz-out), opacity .3s ease; cursor: pointer; }
.pz-chip i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #D4AF37; color: #0F172A; font-style: normal; font-size: 12px; font-weight: 700; }
.pz-chip[data-hide] { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }

/* The site's consent banner waits until the sheet is closed */
body.pz-open .telemetry-consent { visibility: hidden; }
body.pz-open { overflow: hidden; }

@media (min-width: 720px) {
  .pz-sheet { left: 50%; right: auto; bottom: 50%; width: 420px; border-radius: 26px; translate: -50% 50%; transform: scale(.96); opacity: 0; transition: transform .3s var(--pz-out), opacity .2s ease; }
  .pz.is-open .pz-sheet { transform: none; opacity: 1; }
  .pz-grab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pz-sheet { transform: none; opacity: 0; transition: opacity .2s ease; }
  .pz.is-open .pz-sheet { opacity: 1; }
}
/* The consent banner also sits at the bottom: the chip waits until it is gone (it is removed after a choice). */
body:has(.telemetry-consent) .pz-chip { opacity: 0; pointer-events: none; }

/* Pulling the sheet up must not reveal the page below: a white extension under it (box-shadow is not clipped). */
.pz-sheet { box-shadow: 0 -12px 40px rgba(15, 23, 42, .18), 0 240px 0 0 #fff; }

/* Entrance, once per opening: the card slides in, then Botto hops with his parts following a beat later
   (same choreography as /botto, compressed). Parts pivot where they attach. */
.pz-botto :is(.cb-head, .cb-ant, .cb-hl, .cb-hr, .cb-jet) { transform-box: view-box; }
.pz-botto .cb-head { transform-origin: 100px 108px; }
.pz-botto .cb-ant { transform-origin: 100px 34px; }
.pz-botto .cb-hr { transform-origin: 156px 104px; }
.pz-botto .cb-hl { transform-origin: 48px 140px; }
.pz-botto .cb-jet { transform-origin: 100px 163px; }
.pz.is-open .pz-card { animation: pzCard .6s var(--pz-out) .2s both; }
.pz.is-open .pz-botto { transform-origin: 50% 85%; animation: pzBotIn .7s var(--pz-out) .25s both, pzHop .72s linear 1s; }
.pz.is-open .pz-botto .cb-head { animation: pzHead .8s linear 1.05s; }
.pz.is-open .pz-botto .cb-ant { animation: pzAnt 1s linear 1.1s; }
.pz.is-open .pz-botto .cb-hr { animation: pzLift .8s linear 1s; }
.pz.is-open .pz-botto .cb-hl { animation: pzSwing .85s linear 1.08s; }
.pz.is-open .pz-botto .cb-jet { animation: pzJet .55s linear 1.07s; }
.pz.is-open .pz-botto > svg { animation: pzFloat 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1.9s infinite; }
@keyframes pzCard { from { opacity: 0; transform: translateY(18px) rotate(4deg) scale(.96); } }
@keyframes pzBotIn { from { opacity: 0; transform: translate(60px, -40px) rotate(10deg); } }
@keyframes pzHop {
  0% { transform: none; animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1); }
  14% { transform: translateY(3px) scale(1.03, .97); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  46% { transform: translateY(-12px) rotate(-5deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  76% { transform: translateY(2px) rotate(1deg); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  100% { transform: none; }
}
@keyframes pzHead {
  0% { transform: none; animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1); }
  18% { transform: translateY(1.5px) rotate(2deg); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  50% { transform: translateY(-1px) rotate(-3deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  78% { transform: rotate(1.2deg); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  100% { transform: none; }
}
@keyframes pzAnt {
  0% { transform: none; } 24% { transform: rotate(-10deg); } 50% { transform: rotate(7deg); }
  72% { transform: rotate(-3deg); } 88% { transform: rotate(1deg); } 100% { transform: none; }
}
@keyframes pzLift {
  0% { transform: none; } 15% { transform: translateY(2px); } 46% { transform: translate(2px, -8px) rotate(-9deg); }
  76% { transform: translateY(1px) rotate(2deg); } 100% { transform: none; }
}
@keyframes pzSwing { 0% { transform: none; } 22% { transform: translateY(-2px); } 52% { transform: translate(-1px, 5px); } 80% { transform: translateY(-1.5px); } 100% { transform: none; } }
@keyframes pzJet { 0% { transform: none; } 30% { transform: scale(1.5, 1.9); } 100% { transform: none; } }
@keyframes pzFloat { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .pz.is-open :is(.pz-card, .pz-botto, .pz-botto *, .pz-botto > svg) { animation: none !important; }
}

/* Botto overlapped the close button and swallowed its taps: keep the button on top, Botto tap-through. */
.pz-close { z-index: 2; }
.pz-botto { pointer-events: none; }

/* Reopen button: a gold +1 coin in the bottom-right corner. */
.pz-chip { left: auto; right: calc(16px + env(safe-area-inset-right)); justify-content: center; width: 56px; height: 56px; min-height: 0; padding: 0; border-radius: 50%;
  background: linear-gradient(135deg, #FDE047, #D4AF37 50%, #996515); color: #0F172A; font: 700 19px/1 Geist, system-ui, sans-serif; letter-spacing: -.03em;
  box-shadow: inset 0 0 0 2px rgba(255, 246, 213, .6), 0 10px 24px -8px rgba(15, 23, 42, .5); transform: none; }
.pz-chip[data-hide] { transform: translateY(12px) scale(.9); }
.pz-chip:active { scale: .94; }

/* Less empty space under "Erst umsehen" (owner feedback on iPhone): keep only the safe area plus a small gap. */
.pz-sheet { padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
.pz-later { margin-top: 2px; }
.pz-close { background: none; color: #626972; }
/* Opening focuses the sheet (for screen readers and Esc), not the X: no focus ring on open. Keyboard focus still shows it. */
.pz-sheet:focus { outline: none; }
