#tc-first-visit-promo {
  width: min(680px, calc(100vw - 32px));
  max-width: 680px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(2, 12, 27, 0.5);
}

#tc-first-visit-promo::backdrop {
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(8px);
}

#tc-first-visit-promo[open] {
  animation: tc-promo-enter 220ms ease-out;
}

.tc-first-visit-promo__frame {
  position: relative;
  display: flex;
  max-height: calc(100dvh - 32px);
  flex-direction: column;
}

.tc-first-visit-promo__poster-link {
  display: block;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
}

.tc-first-visit-promo__poster {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 112px);
  object-fit: contain;
}

.tc-first-visit-promo__close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  color: #0f172a;
  font: 700 28px/1 system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(2, 12, 27, 0.24);
  cursor: pointer;
  touch-action: manipulation;
}

.tc-first-visit-promo__close:hover {
  color: #ffffff;
  background: #0b5f9e;
}

.tc-first-visit-promo__close:focus-visible,
.tc-first-visit-promo__cta:focus-visible,
.tc-first-visit-promo__poster-link:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.tc-first-visit-promo__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #dbe4ef;
}

.tc-first-visit-promo__message {
  margin: 0;
  color: #334155;
  font: 600 14px/1.35 Inter, system-ui, sans-serif;
}

.tc-first-visit-promo__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  color: #ffffff;
  font: 800 14px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  background: #16a34a;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.25);
  touch-action: manipulation;
}

.tc-first-visit-promo__cta:hover {
  color: #ffffff;
  background: #15803d;
}

.tc-first-visit-promo__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.tc-first-visit-promo-open,
html.tc-first-visit-promo-open body {
  overflow: hidden;
}

@keyframes tc-promo-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  #tc-first-visit-promo {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }

  .tc-first-visit-promo__frame {
    max-height: calc(100dvh - 16px);
  }

  .tc-first-visit-promo__poster-link {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .tc-first-visit-promo__poster {
    max-width: 100%;
    max-height: none;
  }

  .tc-first-visit-promo__close {
    top: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
  }

  .tc-first-visit-promo__footer {
    position: sticky;
    z-index: 1;
    bottom: 0;
    flex: 0 0 auto;
    min-height: 86px;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .tc-first-visit-promo__message {
    font-size: 13px;
  }

  .tc-first-visit-promo__cta {
    min-height: 48px;
    padding: 0 15px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .tc-first-visit-promo__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
  }

  .tc-first-visit-promo__message {
    text-align: center;
  }

  .tc-first-visit-promo__cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #tc-first-visit-promo[open] {
    animation: none;
  }
}
