#app-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: appFadeIn .2s ease;
}
@keyframes appFadeIn { from { opacity:0 } to { opacity:1 } }

#app-popup {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  /* max-width set dynamically by JS via --app-popup-width */
  max-width: var(--app-popup-width, 480px);
  overflow: hidden;
  position: relative;
  animation: appSlideUp .28s cubic-bezier(.34,1.3,.64,1);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
@keyframes appSlideUp {
  from { opacity:0; transform:translateY(28px) scale(.94) }
  to   { opacity:1; transform:none }
}

/* ── Close button ── */
#app-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: background .15s, transform .15s;
}
#app-close:hover { background: rgba(0,0,0,.82); transform: scale(1.1); }

/* ── Banner image ── */
#app-link { display: block; line-height: 0; }
#app-img  { width: 100%; display: block; }

/* ── CTA footer ── */
#app-footer {
  padding: 14px 18px 18px;
  background: #fff;
}

#app-cta {
  display: block;
  text-align: center;
  background: #FF9900;
  color: #111;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s, transform .1s;
  border: none;
  cursor: pointer;
}
#app-cta:hover  { background: #e68a00; transform: translateY(-1px); }
#app-cta:active { transform: translateY(0); }

#app-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#app-amazon-icon {
  width: 72px;
  height: 22px;
  flex-shrink: 0;
}

#app-cta-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  letter-spacing: .01em;
}

#app-cta-arrow {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

@media (max-width: 480px) {
  #app-popup { border-radius: 12px; }
  #app-cta { font-size: 15px; padding: 13px 16px; }
}
