:root {
  --mint: #5dd6a8;
  --mint-dark: #3fc491;
  --mint-soft: #eef9f4;
  --ink: #111827;
  --sub: #4b5563;
  --muted: #9ca3af;
  --bg: #ffffff;
  --paper: #f7f8f7;
  --border: #e7ebe9;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --phone: 430px;
  --topbar: 52px;
  --dock: 76px;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: #e8eaed;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

.cl-app {
  width: min(100%, var(--phone));
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Top bar */
.cl-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar);
  padding: max(8px, var(--sat)) 16px 8px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

.cl-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  min-height: 40px;
  cursor: default;
  user-select: none;
}

.cl-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--mint);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.cl-topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cl-step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--sub);
}

.cl-topbar-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--mint-dark);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* Progress */
.cl-progress {
  flex-shrink: 0;
  height: 3px;
  background: var(--paper);
}

.cl-progress-fill {
  height: 100%;
  width: 11%;
  background: var(--mint);
  transition: width 0.25s ease;
}

/* Swipe track */
.cl-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
}

.cl-track::-webkit-scrollbar { display: none; }

.cl-screen {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 18px 18px calc(var(--dock) + var(--sab) + 12px);
}

.cl-screen-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.cl-screen-final {
  justify-content: center;
  text-align: center;
  align-items: stretch;
}

.cl-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mint-dark);
}

h1 {
  font-size: clamp(1.55rem, 6.5vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.cl-lead {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--sub);
  line-height: 1.4;
}

.cl-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* Hero product shot — capped so it fits above the dock on small phones */
.cl-hero-shot {
  display: flex;
  justify-content: center;
  margin: 2px auto 0;
  width: min(100%, 260px);
  max-height: min(49dvh, 364px);
}

.cl-hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(49dvh, 364px);
  object-fit: contain;
  object-position: top center;
}

/* Steps */
.cl-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cl-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.cl-steps span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.cl-steps strong { display: block; font-size: 0.95rem; }
.cl-steps p { font-size: 0.85rem; color: var(--sub); font-weight: 500; margin-top: 2px; }

/* Checklist */
.cl-check-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl-check-progress span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sub);
}

.cl-check-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}

.cl-check-fill {
  height: 100%;
  width: 0%;
  background: var(--mint);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.cl-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-check {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
}

.cl-check.is-done {
  background: var(--mint-soft);
  border-color: rgba(93, 214, 168, 0.5);
}

.cl-check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-check.is-done .cl-check-box {
  background: var(--mint);
  border-color: var(--mint-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.cl-check.is-done .cl-check-box::after { content: '✓'; }

.cl-check-copy strong { display: block; font-size: 0.9rem; font-weight: 700; }
.cl-check-copy span { display: block; font-size: 0.78rem; color: var(--sub); margin-top: 1px; }

/* Kit */
.cl-kit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cl-kit-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
}

.cl-kit-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.cl-kit-preview {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: pre-wrap;
  line-height: 1.35;
  margin-bottom: 10px;
  min-height: 48px;
}

.cl-kit-qr {
  min-height: 72px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  margin-bottom: 10px;
}

.cl-kit-actions {
  display: flex;
  gap: 8px;
}

/* Captions */
.cl-tones {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.cl-tones::-webkit-scrollbar { display: none; }

.cl-tone {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sub);
  background: var(--bg);
}

.cl-tone.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.cl-caption-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
}

.cl-caption-card p {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: pre-wrap;
  line-height: 1.4;
  min-height: 100px;
  margin-bottom: 12px;
}

/* Practices */
.cl-practices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-practice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.cl-practice h3 {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.cl-practice p {
  font-size: 0.85rem;
  color: var(--sub);
  font-weight: 500;
}

/* Challenge */
.cl-challenge-card {
  padding: 18px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
}

.cl-challenge-line {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
}

.cl-challenge-goal {
  margin-top: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mint);
  line-height: 1.25;
}

/* FAQ */
.cl-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 12px;
  background: var(--paper);
}

.cl-faq summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.cl-faq summary::-webkit-details-marker { display: none; }

.cl-faq p {
  padding: 0 0 12px;
  font-size: 0.88rem;
  color: var(--sub);
  font-weight: 500;
  line-height: 1.4;
}

.cl-final-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.cl-final-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* Buttons */
.cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--mint);
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(93, 214, 168, 0.22);
  -webkit-tap-highlight-color: transparent;
}

.cl-btn:active { transform: scale(0.98); }

.cl-btn-ghost {
  background: transparent;
  color: var(--sub);
  box-shadow: none;
  border: 1.5px solid var(--border);
  font-weight: 700;
}

.cl-btn-block { width: 100%; }
.cl-btn-lg { min-height: 52px; font-size: 1.02rem; }

.cl-btn-soft {
  flex: 1;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

/* Dock */
.cl-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px calc(10px + var(--sab));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cl-dock-back {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 50px;
}

.cl-dock-next {
  flex: 1;
  min-height: 50px;
}

.cl-dock-next.is-final {
  background: #0f172a;
  color: #fff;
  box-shadow: none;
}

/* Toast */
.cl-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock) + var(--sab) + 12px);
  transform: translateX(-50%) translateY(8px);
  max-width: min(90vw, 300px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  text-align: center;
}

.cl-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 480px) {
  body { padding: 20px 0; }
  .cl-app {
    height: min(100dvh - 40px, 820px);
    border-radius: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cl-track { scroll-behavior: auto; }
  .cl-progress-fill, .cl-check-fill, .cl-toast { transition: none; }
}
