/* Bhaktilok autopay — fixed single-screen viewport, no page scroll */
:root {
  --cream: #fff8f0;
  --cream-deep: #ffedd5;
  --white: #ffffff;
  --text: #1e293b;
  --text-mid: #475569;
  --saffron: #e65100;
  --saffron-light: #ff9800;
  --saffron-dark: #bf360c;
  --radius-card: 14px;
  --radius-pill: 999px;
  --shadow: 0 8px 30px rgba(191, 54, 12, 0.14);
  --shadow-soft: 0 2px 12px rgba(15, 23, 42, 0.06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.4;
  background: radial-gradient(
      120% 80% at 50% -20%,
      rgba(255, 183, 77, 0.35),
      transparent 55%
    ),
    linear-gradient(165deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.viewport {
  --type-xs: clamp(0.55rem, 1.6vw + 0.45dvh, 0.72rem);
  --type-sm: clamp(0.62rem, 2vw + 0.5dvh, 0.8rem);
  --type-base: clamp(0.82rem, 2.6vw + 0.65dvh, 1.08rem);
  --type-lg: clamp(0.95rem, 3.4vw + 0.75dvh, 1.22rem);
  --type-xl: clamp(1.15rem, 5vw + 1dvh, 1.85rem);
  --type-price: clamp(2rem, 10vw + 1.5dvh, 3.25rem);
  --type-cta: clamp(0.85rem, 3.2vw + 0.55dvh, 1.02rem);

  height: 100dvh;
  max-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.8vw, 10px);
  padding: calc(10px + var(--safe-top)) clamp(14px, 5vw, 20px) 0;
  overflow: hidden;
}

.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(191, 54, 12, 0.08);
}

.card--hero {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #4a148c, #bf360c);
  border-radius: inherit;
  overflow: hidden;
}

.video-wrap--sound-pending {
  cursor: pointer;
}

.video-wrap--paused {
  cursor: pointer;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-video[hidden] {
  display: none;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(74, 20, 12, 0.82);
  color: #fff;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  -webkit-tap-highlight-color: transparent;
}

.video-play-btn[hidden] {
  display: none;
}

.video-play-btn__icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-left: 3px;
}

.hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.hero-placeholder[hidden] {
  display: none;
}

.hero-placeholder__om {
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  line-height: 1;
  opacity: 0.95;
}

.hero-placeholder__text {
  font-size: clamp(0.85rem, 3.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sound-toast {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 4vw, 20px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  margin: 0;
  border-radius: 999px;
  background: rgba(74, 20, 12, 0.92);
  color: #fff;
  font: inherit;
  font-size: clamp(0.72rem, 3vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.25;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.sound-toast[hidden] {
  display: none;
}

.sound-toast__icon {
  flex-shrink: 0;
  font-size: 1.05em;
  line-height: 1;
  opacity: 0.95;
}

.sound-toast__text {
  text-align: center;
  line-height: 1.3;
}

.card--offer {
  --offer-gap: clamp(6px, 1.2dvh, 12px);
  --offer-pad-y: clamp(10px, 2dvh, 18px);
  --offer-pad-x: clamp(12px, 4vw, 18px);

  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.offer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--offer-gap);
  padding: var(--offer-pad-y) var(--offer-pad-x);
  text-align: center;
}

.offer-title {
  margin: 0;
  text-align: center;
  font-size: var(--type-base);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #334155;
  line-height: 1.25;
}

.offer-divider {
  width: min(18rem, 88%);
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 3.5vw, 18px);
}

.price-old {
  font-size: var(--type-lg);
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.price-new {
  font-size: var(--type-price);
  font-weight: 900;
  color: #f97316;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.offer-sub {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: var(--type-sm);
  color: #64748b;
  font-weight: 500;
  line-height: 1.3;
}

.offer-sub__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #94a3b8;
}

.offer-features {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.offer-features__track {
  display: flex;
  gap: clamp(24px, 8vw, 40px);
  width: max-content;
  animation: offerFeaturesMarquee 28s linear infinite;
}

.offer-features__text {
  flex-shrink: 0;
  font-size: var(--type-sm);
  font-weight: 800;
  color: #334155;
  line-height: 1.35;
  white-space: nowrap;
}

@keyframes offerFeaturesMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.offer-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.5vw, 8px);
  width: 100%;
  padding: clamp(8px, 1.4dvh, 12px) var(--offer-pad-x);
  background: #fff9ed;
  border-top: 1px solid rgba(251, 191, 36, 0.22);
  font-size: var(--type-sm);
  font-weight: 800;
  color: #334155;
  line-height: 1.2;
}

.flag {
  font-size: clamp(0.85rem, 2.5vw + 0.35dvh, 1rem);
  line-height: 1;
}

.register-status {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--type-sm);
  font-weight: 700;
  color: var(--saffron-dark);
  background: rgba(255, 183, 77, 0.22);
  border: 1px solid rgba(230, 81, 0, 0.2);
  border-radius: 12px;
  animation: statusPop 0.35s ease;
}

.register-status[hidden] {
  display: none !important;
}

.register-status__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--saffron);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

.footer {
  flex: 0 0 auto;
  padding: 0 clamp(14px, 5vw, 20px) calc(12px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.55));
}

.footer-pay {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-pay[hidden] {
  display: none !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  padding-top: 2px;
}

.footer-links a {
  font-size: var(--type-xs);
  color: var(--text-mid);
  text-decoration: none;
  white-space: nowrap;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--saffron-dark);
  text-decoration: underline;
}

.upi-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid rgba(71, 85, 105, 0.12);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  -webkit-tap-highlight-color: transparent;
}

.upi-box:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

.upi-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.upi-label {
  flex: 1;
  font-size: clamp(0.8rem, 3vw, 0.9rem);
  font-weight: 600;
}

.upi-change {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 2px;
}

.cta {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--type-cta);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--saffron-light), var(--saffron-dark));
  box-shadow: 0 6px 20px rgba(191, 54, 12, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.cta--hero {
  font-size: var(--type-cta);
  min-height: clamp(48px, 7dvh, 52px);
}

.cta:active:not(:disabled) {
  transform: scale(0.98);
}

.cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cta .cta-emoji {
  font-size: 1.05rem;
}

.cta--loading .cta-emoji {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  font-size: 0;
}

#signup-btn[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes statusPop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 90;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(3px);
}

.backdrop[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: linear-gradient(180deg, #fffaf5 0%, var(--cream) 100%);
  border-radius: 20px 20px 0 0;
  padding: 8px 20px calc(20px + var(--safe-bottom));
  max-width: 440px;
  margin: 0 auto;
  animation: slideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.14);
}

.sheet[hidden] {
  display: none !important;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.1);
  margin: 4px auto 14px;
}

.sheet__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
}

.sheet__sub {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--text-mid);
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid rgba(71, 85, 105, 0.15);
  border-radius: 12px;
  padding: 2px 12px;
  margin-bottom: 8px;
}

.phone-cc {
  font-weight: 800;
  color: var(--text-mid);
  font-size: 0.95rem;
}

.phone-field input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  padding: 11px 4px;
  min-width: 0;
  font-family: inherit;
}

.phone-field input:focus {
  outline: none;
}

.name-sheet__badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #fff3e0;
  color: #e65100;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sheet__sub--center {
  text-align: center;
}

.name-field {
  background: var(--white);
  border: 1px solid rgba(71, 85, 105, 0.15);
  border-radius: 12px;
  padding: 2px 12px;
  margin-bottom: 8px;
}

.name-field input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  padding: 11px 4px;
  min-width: 0;
  font-family: inherit;
}

.name-field input:focus {
  outline: none;
}

.field-error {
  color: #b91c1c;
  font-size: 0.8rem;
  margin: 0 0 10px;
}

.btn-primary {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  background: linear-gradient(180deg, var(--saffron-light), var(--saffron-dark));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(191, 54, 12, 0.3);
}

.upi-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: min(52vh, 380px);
  overflow-y: auto;
}

.upi-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid transparent;
  margin-bottom: 4px;
}

.upi-list li[aria-selected="true"] {
  border-color: var(--saffron);
  background: rgba(255, 183, 77, 0.12);
}

.upi-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
}

.upi-list span {
  font-weight: 600;
}

.qrcode {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  min-height: 200px;
  align-items: center;
}

.qr-wait {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-mid);
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff3e0;
  color: #e65100;
  font-size: 1.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.success-text {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.45;
}

.btn-store {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--saffron-light), var(--saffron-dark));
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(191, 54, 12, 0.3);
}

.toast {
  position: fixed;
  bottom: calc(88px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: 0 auto;
  padding: 11px 14px;
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
  font-size: 0.84rem;
  z-index: 200;
  text-align: center;
  animation: toastIn 0.25s ease;
}

.toast[hidden] {
  display: none !important;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  margin: 0 auto;
  padding-bottom: var(--safe-bottom);
}

.success-page__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 32px;
  text-align: center;
}

.success-page__title {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.success-page__actions {
  width: 100%;
  max-width: 360px;
  margin-top: 8px;
}

.success-page__home {
  display: block;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--saffron-dark);
  text-decoration: none;
}

@media (min-height: 740px) {
  .viewport {
    --type-xs: clamp(0.6rem, 1.7vw + 0.55dvh, 0.78rem);
    --type-sm: clamp(0.68rem, 2.1vw + 0.6dvh, 0.88rem);
    --type-base: clamp(0.9rem, 2.8vw + 0.75dvh, 1.15rem);
    --type-lg: clamp(1rem, 3.6vw + 0.85dvh, 1.3rem);
    --type-xl: clamp(1.25rem, 5.5vw + 1.15dvh, 2rem);
    --type-price: clamp(2.35rem, 11vw + 1.8dvh, 3.5rem);
    --type-cta: clamp(0.92rem, 3.4vw + 0.65dvh, 1.08rem);
  }

  .card--offer {
    --offer-gap: clamp(8px, 1.4dvh, 14px);
    --offer-pad-y: clamp(12px, 2.2dvh, 20px);
  }
}

@media (max-height: 620px) {
  .viewport {
    --type-xs: clamp(0.5rem, 1.4vw + 0.3dvh, 0.62rem);
    --type-sm: clamp(0.56rem, 1.8vw + 0.35dvh, 0.68rem);
    --type-base: clamp(0.74rem, 2.2vw + 0.45dvh, 0.86rem);
    --type-lg: clamp(0.82rem, 2.8vw + 0.5dvh, 0.98rem);
    --type-xl: clamp(1rem, 4.2vw + 0.65dvh, 1.28rem);
    --type-price: clamp(1.65rem, 8.5vw + 1dvh, 2.35rem);
    --type-cta: clamp(0.78rem, 2.8vw + 0.4dvh, 0.9rem);
  }

  .stage {
    padding-top: calc(6px + var(--safe-top));
    gap: 4px;
  }

  .card--hero {
    aspect-ratio: 10 / 9;
  }

  .card--offer {
    --offer-gap: 4px;
    --offer-pad-y: 8px;
    --offer-pad-x: 9px;
  }

  .register-status {
    padding: 6px 10px;
  }

  .footer {
    gap: 8px;
  }

  .cta--hero {
    min-height: 44px;
  }
}

@media (max-height: 520px) {
  .viewport {
    --type-xs: clamp(0.48rem, 1.2vw + 0.25dvh, 0.58rem);
    --type-sm: clamp(0.52rem, 1.6vw + 0.3dvh, 0.62rem);
    --type-base: clamp(0.68rem, 2vw + 0.35dvh, 0.8rem);
    --type-lg: clamp(0.76rem, 2.5vw + 0.4dvh, 0.9rem);
    --type-xl: clamp(0.92rem, 3.8vw + 0.5dvh, 1.15rem);
    --type-price: clamp(1.45rem, 7.5vw + 0.8dvh, 2rem);
    --type-cta: clamp(0.72rem, 2.5vw + 0.35dvh, 0.84rem);
  }

  .card--hero {
    aspect-ratio: 4 / 3;
  }

  .card--offer {
    --offer-gap: 3px;
    --offer-pad-y: 6px;
    --offer-pad-x: 8px;
  }
}

@media (max-width: 360px) {
  .viewport {
    --type-price: clamp(1.55rem, 9vw + 0.6dvh, 2.1rem);
  }

  .card--offer {
    --offer-pad-x: 8px;
  }

  .price-row {
    gap: 8px;
  }

  .offer-features__text {
    font-size: clamp(0.5rem, 2.4vw + 0.2dvh, 0.62rem);
  }
}

@media (min-width: 480px) {
  .viewport,
  .sheet {
    max-width: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-features__track {
    animation: none;
  }

  .cta .cta-emoji {
    animation: none;
  }

  .register-status {
    animation: none;
  }
}
