:root {
  --bg: #FBF7F4;
  --card: #FFFFFF;
  --card-border: #ECE4DF;
  --text: #1E1A1D;
  --text-dim: #5B525D;
  --accent: #C8325E;
  --accent-soft: #FCEAF0;
  --accent-soft-2: #F3E9E4;
  --radius: 16px;
  --radius-sm: 12px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 22px 28px;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: fade .35s cubic-bezier(.22,.9,.3,1);
  background: var(--bg);
}
.screen.active { display: flex; }

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

/* Ícones de linha */
.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-badge svg { width: 22px; height: 22px; stroke: var(--text); }
.icon-badge.pink { background: var(--accent-soft); }
.icon-badge.pink svg { stroke: var(--accent); }
.icon-badge.sm { width: 36px; height: 36px; }
.icon-badge.sm svg { width: 18px; height: 18px; }

/* Intro */
.intro-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.intro-brand .icon-badge { background: var(--accent); }
.intro-brand .icon-badge svg { stroke: #fff; }
.intro-brand span { font-size: 1.15rem; font-weight: 700; }

.intro-content h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 14px; font-weight: 700; }
.intro-content h1 .accent { color: var(--accent); }
.subtitle { color: var(--text-dim); font-size: 1rem; line-height: 1.5; margin-bottom: 28px; }

.intro-preview-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(30,26,29,.04);
  margin-bottom: 26px;
}
.intro-preview-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.intro-preview-head .icon-badge { width: 54px; height: 54px; }
.intro-preview-head .icon-badge svg { width: 26px; height: 26px; }
.intro-preview-head strong { display: block; font-size: 1.05rem; font-weight: 700; }
.intro-preview-head span { color: var(--text-dim); font-size: .85rem; }
.fake-waveform { display: flex; align-items: center; gap: 2px; height: 32px; margin-bottom: 14px; }
.fake-waveform i { width: 3px; border-radius: 2px; background: var(--accent-soft-2); flex-shrink: 0; }
.fake-waveform i.on { background: var(--accent); }
.intro-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.intro-tags span { border-radius: 999px; padding: 7px 14px; font-size: .82rem; font-weight: 600; background: var(--accent-soft-2); color: var(--text); }
.intro-tags span.on { background: var(--accent-soft); color: var(--accent); }

.intro-features { margin-bottom: 26px; display: flex; flex-direction: column; gap: 16px; }
.intro-feature { display: flex; align-items: center; gap: 14px; }
.intro-feature p { margin: 0; font-size: .98rem; }

.intro-footnote { text-align: center; color: var(--text-dim); font-size: .85rem; margin-top: 14px; }

/* Botões */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  height: 56px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}
.btn-primary:not(:disabled):hover { background: #B32B54; }
.btn-primary:not(:disabled):active { transform: scale(.98); }
.btn-big { height: 56px; font-size: 1.02rem; }
.btn-whatsapp {
  display: flex;
  text-decoration: none;
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--card-border);
  color: var(--text);
}
.btn-whatsapp:hover { background: var(--accent-soft-2); }
.btn-bottom-fixed { margin-top: auto; padding-top: 18px; }

/* Cabeçalho do quiz (voltar + etapa + barra) */
.quiz-head { margin-bottom: 22px; }
.quiz-topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.btn-back {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-back svg { width: 18px; height: 18px; stroke: var(--text); }
.quiz-progress { flex: 1; }
.quiz-progress-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-dim); margin-bottom: 8px; }
.quiz-progress-label .step-pct { color: var(--accent); font-weight: 600; }
.progress-bar-wrap { background: var(--accent-soft-2); border-radius: 999px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--accent); transition: width .35s ease; border-radius: 999px; }
.quiz-head h2 { font-size: 26px; line-height: 1.3; margin: 0 0 6px; font-weight: 600; }
.quiz-sub { color: var(--text-dim); font-size: 1rem; margin: 0; }

/* Opções em grade (cards com ícone) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.option-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  position: relative;
  transition: border-color .12s ease, background .12s ease;
}
.option-card:hover { border-color: #DCCCD3; }
.option-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.option-card .icon-badge { margin-bottom: 14px; }
.option-card.selected .icon-badge { background: #fff; }
.option-card .option-label { font-size: 1rem; font-weight: 600; display: block; }
.option-card.selected .option-label { color: var(--accent); }
.option-card .check-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
  align-items: center;
  justify-content: center;
}
.option-card .check-badge svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; }
.option-card.selected .check-badge { display: flex; }

/* Cards simples (sem ícone) usados pra grupos/categorias */
.option-card.plain { text-align: left; padding: 18px 16px; display: flex; align-items: center; justify-content: space-between; }
.option-card.plain .option-label { font-weight: 600; }
.option-card.simple { display: flex; align-items: center; justify-content: center; min-height: 58px; text-align: center; }

/* Listas em pill (ocasião/gênero específicos, com prévia) */
.options-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 2px 2px 2px 0; }
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 10px 10px 18px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.option-row:hover { border-color: #DCCCD3; }
.option-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.option-row .label { font-size: .98rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.option-row.selected .label { color: var(--accent); }
.option-row .label svg { width: 15px; height: 15px; stroke: var(--accent); stroke-width: 3; }
.option-row .preview-btn {
  background: var(--accent-soft-2);
  border: none;
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 10px;
}
.option-row .preview-btn svg { width: 14px; height: 14px; }
.option-row .preview-btn { color: var(--text); }
.option-row .preview-btn:hover { background: var(--accent-soft); }
.option-row .preview-btn.tocando { background: var(--accent); color: #fff; }

/* Inputs */
.text-input, .textarea-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 16px;
  font-family: inherit;
}
.text-input:focus, .textarea-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-hint { color: var(--text-dim); font-size: .85rem; margin: -10px 0 16px; }
.input-label { font-size: .9rem; font-weight: 600; margin-bottom: 8px; display: block; }

.whatsapp-input-wrap { display: flex; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-sm); margin-bottom: 16px; }
.whatsapp-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.whatsapp-input-wrap span { padding: 0 0 0 16px; color: var(--text-dim); font-weight: 600; }
.whatsapp-input-wrap input { border: none; background: transparent; padding: 16px; font-size: 1rem; flex: 1; font-family: inherit; color: var(--text); }
.whatsapp-input-wrap input:focus { outline: none; }

.info-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px; }
.info-card p { margin: 0; font-size: .95rem; }

/* Chips de detalhe */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 500;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Resumo */
.summary-sentence {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 18px;
  color: var(--text-dim);
}
.summary-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 6px 20px; margin-bottom: 22px; }
.summary-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--card-border); }
.summary-card .row:last-child { border-bottom: none; }
.summary-card .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary-card b { color: var(--text-dim); font-weight: 500; font-size: .82rem; }
.summary-card .val { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.summary-card a.edit { color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; flex-shrink: 0; cursor: pointer; }

/* Loading */
.loading-content { width: 100%; }
.loading-video-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background: var(--accent-soft-2);
  margin-bottom: 24px;
}
.loading-video-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loading-content h2 { font-size: 26px; font-weight: 600; margin: 0 0 8px; }
.loading-content .quiz-sub { margin-bottom: 20px; }
.loading-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.loading-progress-row span:first-child { font-weight: 600; font-size: .98rem; }
.progress-pct { font-size: .98rem; font-weight: 700; color: var(--accent); margin: 0; }
.progress-msg { display: none; }
.loading-checklist { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 6px 18px; margin-top: 22px; }
.loading-checklist .check-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--card-border); font-size: 1rem; color: var(--text-dim); }
.loading-checklist .check-item:last-child { border-bottom: none; }
.loading-checklist .check-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--card-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.loading-checklist .check-dot svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; display: none; }
.loading-checklist .check-item.done { color: var(--text); }
.loading-checklist .check-item.done .check-dot { background: var(--accent); border-color: var(--accent); }
.loading-checklist .check-item.done .check-dot svg { display: block; }
.loading-checklist .check-item.active { color: var(--text); font-weight: 600; }
.loading-checklist .check-item.active .check-dot { border-color: var(--accent); }
.loading-checklist .check-item.active .check-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Preview */
.preview-content { width: 100%; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; background: #E3F5E9; color: #1E8A4C; font-weight: 700; font-size: .82rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.status-badge svg { width: 13px; height: 13px; stroke: #1E8A4C; stroke-width: 3; }
.preview-content h2 { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
.preview-sub { color: var(--text-dim); margin: 0 0 22px; font-size: 1rem; }
.player-mock { background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; padding: 20px; margin-bottom: 18px; }
.player-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.player-head strong { display: block; font-size: 1.05rem; font-weight: 700; }
.player-head span { color: var(--text-dim); font-size: .85rem; }
.player-bar { height: 6px; background: var(--accent-soft-2); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.player-fill { height: 100%; width: 0%; background: var(--accent); transition: width .2s linear; }
.player-times { display: flex; justify-content: space-between; color: var(--text-dim); font-size: .82rem; margin-bottom: 18px; }
.play-btn { background: var(--accent); border: none; color: #fff; width: 64px; height: 64px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.play-btn svg { width: 22px; height: 22px; }

/* Vídeo embutido (loading antigo / pré-checkout) */
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto 20px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--accent-soft-2);
}
.video-embed-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--accent);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(30,26,29,.18);
  transition: transform .15s ease, opacity .15s ease;
}
.video-play-btn svg { width: 22px; height: 22px; fill: var(--accent); margin-left: 2px; }
.video-play-btn:hover { transform: translate(-50%, -50%) scale(1.06); }
.video-play-btn.escondido { opacity: 0; pointer-events: none; }

/* Pré-checkout / Finalizar pedido */
.precheck-content { width: 100%; }
.precheck-content .quiz-topbar { align-items: flex-start; margin-bottom: 20px; }
.precheck-h2 { font-size: 22px; font-weight: 600; margin: 8px 0 2px; }
.secure-note { display: flex; align-items: center; gap: 6px; color: #1E8A4C; font-weight: 600; font-size: .88rem; margin: 0; }
.secure-note svg { width: 15px; height: 15px; }
.precheck-sub { color: var(--text-dim); font-size: 1rem; margin: 0 0 20px; }

.order-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.order-card strong { display: block; font-size: 1.05rem; font-weight: 700; }
.order-card span#order-sub { display: block; color: var(--text-dim); font-size: .85rem; margin-bottom: 8px; }
.status-badge.sm { font-size: .75rem; padding: 4px 10px; margin: 0; }
.status-badge.sm svg { width: 11px; height: 11px; }

.price-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; opacity: 1; transition: opacity .6s ease; }
.price-card.oculto { opacity: 0; }
.price-card .price-row-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.price-card .price-label { color: var(--text-dim); font-size: .85rem; margin: 0 0 4px; }
.price-card .price-value { font-size: 2rem; font-weight: 700; margin: 0; }
.price-card .price-value span { font-size: 1.1rem; font-weight: 600; vertical-align: top; }
.price-card .price-installment { margin: 6px 0 0; color: var(--text-dim); font-size: .88rem; }
.price-card .price-installment b { color: var(--text); font-weight: 700; }
.price-card .price-tag { background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; flex-shrink: 0; }
.price-features { border-top: 1px solid var(--card-border); padding-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.price-features .feature-row { display: flex; align-items: center; gap: 12px; font-size: .95rem; }

.pay-methods-label { font-weight: 600; font-size: .92rem; margin: 0 0 10px; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pay-method { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.pay-method.selected { border-color: var(--accent); background: var(--accent-soft); }
.pay-method-info { flex: 1; min-width: 0; }
.pay-method-info strong { display: flex; align-items: center; gap: 8px; font-size: .96rem; }
.pay-method-info span { color: var(--text-dim); font-size: .8rem; }
.pay-method-tag { background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pay-method-price { text-align: right; }
.pay-method-price strong { display: block; font-size: .92rem; }
.pay-method-price span { color: var(--text-dim); font-size: .76rem; }
.pay-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--card-border); flex-shrink: 0; position: relative; }
.pay-method.selected .pay-radio { border-color: var(--accent); }
.pay-method.selected .pay-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }

.guarantee-box { display: flex; align-items: flex-start; gap: 12px; background: #F3F9F5; border: 1px solid #D5EBDD; border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.guarantee-box strong { display: block; font-size: .92rem; margin-bottom: 2px; }
.guarantee-box span { color: var(--text-dim); font-size: .84rem; }

.precheck-note { color: var(--text-dim); font-size: .8rem; text-align: center; margin-top: 14px; }
