/* Telegram theme variables keep the invitation and guide legible in both themes. */
.hantik-invite {
  position: fixed; z-index: 20;
  bottom: max(16px, env(safe-area-inset-bottom)); left: 12px; right: 12px;
  max-width: 420px; margin: auto; padding: 20px 32px 18px 100px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); color: var(--text);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
}
.hantik-invite img { position: absolute; width: 88px; height: 110px; object-fit: contain; left: 6px; bottom: 20px; }
.hantik-invite.hantik-invite-text-only { padding-left: 20px; }
.hantik-invite h2 { font-size: 18px; line-height: 1.2; margin: 0 0 8px; }
.hantik-invite p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.hantik-invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hantik-invite button, .driver-popover.hantik-tour button {
  font: inherit; font-size: 14px; cursor: pointer;
  min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); text-shadow: none;
}
.hantik-invite-actions button:first-child { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.hantik-invite-actions button:last-child { background: var(--card); color: var(--text); }
.hantik-invite button:disabled { opacity: .6; cursor: wait; }
.hantik-invite .hantik-invite-close {
  position: absolute; top: 2px; right: 2px; border: 0;
  width: 34px; min-height: 34px; padding: 4px; background: none; color: var(--muted); font-size: 23px;
}
.hantik-invite [role="status"] { margin-top: 10px; font-size: 13px; }
.hantik-invite button:focus-visible, .driver-popover.hantik-tour button:focus-visible {
  outline: 3px solid var(--link); outline-offset: 2px;
}
.driver-popover.hantik-tour {
  box-sizing: border-box; width: min(340px, calc(100vw - 28px));
  min-width: 0; max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 22px 18px 16px; border-radius: 18px;
  background: var(--card); color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .22); font-family: inherit;
}
.driver-popover.hantik-tour .driver-popover-title { padding-right: 14px; font-size: 19px; line-height: 1.3; color: var(--text); }
.driver-popover.hantik-tour .driver-popover-title::before { content: "🦊 "; }
.driver-popover.hantik-tour .driver-popover-description { font-size: 14px; line-height: 1.5; color: var(--text); }
.driver-popover.hantik-tour .driver-popover-footer { gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.driver-popover.hantik-tour .driver-popover-progress-text { color: var(--muted); font-size: 12px; }
.driver-popover.hantik-tour .driver-popover-navigation-btns { display: flex; gap: 6px; }
.driver-popover.hantik-tour .driver-popover-prev-btn { background: var(--card); color: var(--text); }
.driver-popover.hantik-tour .driver-popover-next-btn { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.driver-popover.hantik-tour .driver-popover-close-btn { color: var(--muted); border: 0; background: transparent; min-height: 32px; width: 32px; padding: 0; }
.driver-popover.hantik-tour .hantik-tour-skip { display: block; border: 0; background: none; color: var(--muted); padding: 5px 0; margin-top: 6px; }
.driver-popover.hantik-tour .driver-popover-arrow-side-top { border-top-color: var(--card); }
.driver-popover.hantik-tour .driver-popover-arrow-side-bottom { border-bottom-color: var(--card); }
.driver-popover.hantik-tour .driver-popover-arrow-side-left { border-left-color: var(--card); }
.driver-popover.hantik-tour .driver-popover-arrow-side-right { border-right-color: var(--card); }
/* Native filter dialogs occupy the browser's top layer above Driver's overlay. */
.driver-active dialog[open], .driver-active dialog[open] * { pointer-events: auto; }
@media (max-width: 350px) {
  .hantik-invite { padding-left: 78px; }
  .hantik-invite img { width: 68px; height: 90px; }
  .hantik-invite-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .hantik-invite, .driver-popover.hantik-tour { scroll-behavior: auto; }
}
