
.tf-handoff { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); box-sizing: border-box; opacity: 0; transition: opacity .18s ease; }
.tf-handoff.is-open { opacity: 1; }
.tf-handoff.is-leaving { opacity: 0; pointer-events: none; }
@media (min-width: 640px) { .tf-handoff { align-items: center; } }
.tf-handoff-scrim { position: absolute; inset: 0; background: var(--scrim, rgba(10, 12, 20, .55)); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tf-handoff-card { position: relative; width: min(100%, 440px); box-sizing: border-box; padding: 22px 22px 18px; border-radius: 22px;
  background: var(--tg-theme-bg-color, var(--bg2, var(--panel-solid, #fff))); color: var(--tg-theme-text-color, var(--text, var(--txt, #14161c)));
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35); font-family: var(--ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif);
  transform: translateY(18px) scale(.98); transition: transform .22s cubic-bezier(.2, .8, .2, 1); text-align: center; }
.tf-handoff.is-open .tf-handoff-card { transform: none; }
.tf-handoff-glyph { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1;
  background: linear-gradient(135deg, rgba(64, 132, 255, .18), rgba(120, 88, 255, .18)); position: relative; }
.tf-handoff-glyph::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(64, 132, 255, .35); animation: tfHandoffPulse 1.6s ease-out infinite; }
.tf-handoff-glyph.is-telegram .tf-handoff-plane { display: inline-block; animation: tfHandoffFly 1.6s ease-in-out infinite; }
@keyframes tfHandoffPulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes tfHandoffFly { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
@media (prefers-reduced-motion: reduce) { .tf-handoff-glyph::after, .tf-handoff-glyph.is-telegram .tf-handoff-plane { animation: none; } }
.tf-handoff-title { margin: 0 0 8px; font-size: 20px; line-height: 1.2; font-weight: 700; }
.tf-handoff-body { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: var(--tg-theme-text-color, var(--text, var(--txt, #14161c))); }
.tf-handoff-target { font-weight: 700; padding: 1px 7px; border-radius: 8px; background: rgba(64, 132, 255, .14); white-space: nowrap; unicode-bidi: isolate; }
.tf-handoff-safe { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; text-align: start;
  background: rgba(64, 200, 120, .10); color: var(--tg-theme-hint-color, var(--subtitle, var(--muted, #4a5160))); }
.tf-handoff-lock { margin-inline-end: 2px; }
.tf-handoff-skip { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 14px; font-size: 13px; color: var(--tg-theme-hint-color, var(--hint, var(--muted, #6b7280))); cursor: pointer; user-select: none; }
.tf-handoff-skip input { width: 16px; height: 16px; margin: 0; accent-color: #4084ff; }
.tf-handoff-acts { display: flex; flex-direction: column; gap: 8px; }
.tf-handoff-acts button { appearance: none; border: 0; border-radius: 14px; padding: 13px 16px; font: 600 15px/1.2 inherit; cursor: pointer; }
.tf-handoff-go { background: var(--tg-theme-button-color, linear-gradient(135deg, #4084ff, #7858ff)); color: var(--tg-theme-button-text-color, #fff); }
.tf-handoff-go:focus-visible, .tf-handoff-stay:focus-visible { outline: 2px solid #4084ff; outline-offset: 2px; }
.tf-handoff-stay { background: transparent; color: var(--tg-theme-hint-color, var(--subtitle, var(--muted, #4a5160))); }
@media (prefers-color-scheme: dark) {
  .tf-handoff-card { background: var(--tg-theme-bg-color, var(--bg2, var(--panel-solid, #1a1d26))); color: var(--tg-theme-text-color, var(--text, var(--txt, #f2f3f7))); }
  .tf-handoff-body { color: var(--tg-theme-text-color, var(--text, var(--txt, #f2f3f7))); }
}
