/* Lumo Couple Challenge – mobile-first base */

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

:root {
  --bg-page: #F6F1FF;
  --text-dark: #29243F;
  --text-muted: rgba(41, 36, 63, 0.65);
  --brand-purple: #5C45B8;
  --brand-purple-dark: #332D6E;
  --border-soft: rgba(51, 45, 110, 0.08);
  --flag-red-bg: #FFF0F1;
  --flag-red-accent: #ED5C68;
  --flag-green-bg: #ECF9F1;
  --flag-green-accent: #46A874;
  --card-bg: #FFFFFF;
  --card-radius: 28px;
  --cta-primary-bg: #5C45B8;
  --cta-primary-text: #FFFFFF;
  --text-trust: rgba(41, 36, 63, 0.82);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

.challenge-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    calc(20px + var(--safe-top))
    20px
    calc(20px + var(--safe-bottom));
}

.challenge-screen {
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.35s ease-out;
  flex-shrink: 0;
}

.challenge-screen:not(.hidden) {
  margin-top: auto;
  margin-bottom: auto;
}

.challenge-screen.hidden {
  display: none !important;
}

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

/* Typography */
.challenge-badge {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 12px;
  text-align: center;
}

.challenge-headline {
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.challenge-subline {
  font-size: 17px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 8px;
}

.challenge-meta {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(92, 69, 184, 0.05);
  border: 1px solid rgba(92, 69, 184, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-purple-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.challenge-footnote {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.45;
}

.challenge-footnote--trust {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-trust);
  text-align: left;
}

.footnote-lock {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--brand-purple);
}

/* Illustrations */
.hero-illu-wrap {
  display: block;
  margin: 0 auto 6px;
}

.hero-illu {
  display: block;
  width: 100%;
  max-width: 264px;
  height: auto;
  margin: 0 auto;
}

.hero-screen {
  text-align: center;
}

.hero-screen .hero-illu-wrap {
  margin-bottom: 22px;
}

.hero-screen .challenge-badge {
  margin-bottom: 10px;
}

.hero-screen .challenge-headline {
  margin-bottom: 10px;
}

.hero-screen .challenge-subline {
  margin-bottom: 16px;
}

.hero-screen .meta-pills {
  margin-bottom: 28px;
}

.hero-screen .challenge-footnote--trust {
  margin-top: 16px;
}

.hero-screen .btn-hero-cta {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 16px;
}

.wait-illu {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  margin: 0 auto 24px;
}

/* Buttons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: var(--cta-primary-bg);
  color: var(--cta-primary-text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--brand-purple);
  border-radius: 16px;
  background: transparent;
  color: var(--brand-purple);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:active {
  transform: scale(0.98);
  background: rgba(92, 69, 184, 0.06);
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand-purple);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Loading */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.loading-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-purple);
  opacity: 0.35;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.25; }
  50% { transform: scale(1); opacity: 0.45; }
}

.loading-text {
  font-size: 15px;
  color: var(--text-muted);
}

/* Collapsed private link */
.collapsed-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.collapsed-panel.hidden {
  display: none;
}

.private-link-box {
  margin-top: 10px;
  padding: 12px;
  background: rgba(92, 69, 184, 0.06);
  border-radius: 12px;
  font-size: 12px;
  word-break: break-all;
  color: var(--brand-purple-dark);
}
