/* Motor de Apps — visual base. As cores vêm do product.json de cada produto. */

:root {
  --primary: #5b5bd6;
  --primary-ink: #ffffff;
  --accent: #ffb020;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --text: #1f1d2b;
  --muted: color-mix(in srgb, var(--text) 58%, transparent);
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --soft: color-mix(in srgb, var(--primary) 12%, var(--surface));
  --ok: #1f9d55;
  --bad: #d64545;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 20px rgb(0 0 0 / 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 16px;
}

html[data-font='rounded'] { --font: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
html[data-font='clean'] { --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
html.large { font-size: 19px; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font, system-ui, sans-serif); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

.icon { display: inline-flex; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.break { word-break: break-all; }
.lead { font-size: 1.08rem; }

/* ---------- moldura ---------- */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 1.05rem; margin: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-left: 8px; }
.content { width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 16px calc(96px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.content:focus { outline: none; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-around;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.navitem { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 600; }
.navitem.active { color: var(--primary); background: var(--soft); }

/* ---------- blocos ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); color: inherit; text-decoration: none; display: block; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-title { margin: 6px 0 0; font-size: 1rem; color: var(--muted); font-weight: 700; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--primary); font-size: 0.78rem; font-weight: 700; }
.pill.demo { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); }
.notice { background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.big-emoji { font-size: 3rem; line-height: 1; margin-bottom: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.soft { background: var(--soft); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.btn.big { min-height: 56px; font-size: 1.05rem; }
.linkbtn { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 8px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; text-decoration: none; }
.linkbtn.block { width: 100%; }
.iconbtn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 0; background: transparent; color: var(--text); font-size: 1.4rem; cursor: pointer; text-decoration: none; }
.iconbtn:hover { background: var(--soft); }

.progress { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: inherit; transition: width 0.4s ease; }

/* ---------- login ---------- */
.auth { min-height: 100dvh; max-width: 440px; margin: 0 auto; padding: 32px 18px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.auth-hero { text-align: center; }
.auth-logo { border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 10px; }
.auth-card { display: flex; flex-direction: column; gap: 12px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-links { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.92rem; }
input[type='email'], input[type='password'], input[type='text'], input[type='search'] {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem;
}
input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.pw .linkbtn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- início ---------- */
.hello h2 { font-size: 1.6rem; }
.hello p { margin: 0; }
.hero { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--surface)), var(--surface)); }
.hero h3 { font-size: 1.25rem; margin: 0; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-btn { align-self: flex-start; }
.medals { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.medal { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); opacity: 0.55; text-align: center; }
.medal.earned { opacity: 1; border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.medal-emoji { font-size: 1.8rem; }
.medal-name { font-size: 0.74rem; font-weight: 700; line-height: 1.2; }
.modules { display: flex; flex-direction: column; gap: 10px; }
.module { display: flex; align-items: center; gap: 14px; }
.module-emoji { font-size: 1.8rem; width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--soft); }
.module-body { flex: 1; display: flex; flex-direction: column; }
.module.is-locked { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.install { display: flex; align-items: center; gap: 10px; border: 1.5px dashed color-mix(in srgb, var(--primary) 40%, transparent); }
.install-text { flex: 1; display: flex; flex-direction: column; }

/* ---------- programa ---------- */
.program-progress { display: flex; flex-direction: column; gap: 6px; }
.days { display: flex; flex-direction: column; gap: 10px; }
.day { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.day-n { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--soft); color: var(--primary); font-weight: 800; }
.day-body { flex: 1; display: flex; flex-direction: column; }
.day.done .day-n { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.day.locked, .day.soon { opacity: 0.6; }
.status { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.status.done { background: var(--ok); color: #fff; }
.status.open { background: var(--primary); color: var(--primary-ink); }
.status.locked { background: var(--line); color: var(--muted); }
.status.soon { padding: 0 10px; background: var(--line); color: var(--muted); }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.day-head h2 { margin: 0; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head h3 { margin: 0; }
.step-n { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 0.85rem; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.placeholder { background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 16px; }
.rich p:last-child { margin-bottom: 0; }
.rich.story { font-size: 1.08rem; }
.story-img { border-radius: 14px; }
.slot { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; padding: 0 3px; border-radius: 4px; font-weight: 700; }
.prayer { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-style: italic; }
.prayer .btn { align-self: flex-start; font-style: normal; }
.verse { margin: 0; padding: 14px 16px; border-left: 4px solid var(--primary); background: var(--soft); border-radius: 0 14px 14px 0; font-size: 1.08rem; }
.verse p { margin: 0 0 6px; }
.verse cite { font-style: normal; font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.step .btn.soft.small { align-self: flex-start; }
.quiz-q { font-weight: 700; font-size: 1.08rem; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { min-height: 54px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.quiz-opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.quiz-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.quiz-opt:disabled { cursor: default; }
.quiz-feedback { margin: 0; font-weight: 700; min-height: 1.5em; }
.quiz-feedback.right { color: var(--ok); }
.quiz-feedback.wrong { color: var(--bad); }

/* ---------- biblioteca ---------- */
.search { display: flex; align-items: center; gap: 8px; padding-left: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; color: var(--muted); }
.search input { border: 0; box-shadow: none !important; padding-left: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.lib-list { display: flex; flex-direction: column; gap: 10px; }
.lib-item { display: flex; gap: 10px; align-items: flex-start; }
.lib-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.lib-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--primary); }
.fav { color: var(--muted); }
.fav.on { color: #f5a400; }
.fav.on svg { fill: currentColor; }
.script { white-space: normal; font-size: 1.02rem; }

/* ---------- downloads e loja ---------- */
.downloads { display: grid; gap: 10px; }
.download { display: flex; gap: 14px; align-items: center; }
.download img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.download-body { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.offer { display: flex; flex-direction: column; gap: 10px; }
.offer.highlight { border: 2px solid var(--primary); }
.offer.owned { opacity: 0.85; }
.offer .pill { align-self: flex-start; }
.offer-head { display: flex; gap: 12px; align-items: center; }
.offer-head > div { display: flex; flex-direction: column; }
.price { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.old-price { text-decoration: line-through; color: var(--muted); font-size: 0.85rem; }
.bullets { margin: 0; padding-left: 20px; }
.bullets li { margin-bottom: 4px; }
.locked-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 18px; }

/* ---------- perfil ---------- */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.as-button { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.switch { width: 54px; height: 32px; border-radius: 999px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: none; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: left 0.2s ease; }
.switch[aria-checked='true'] { background: var(--primary); }
.switch[aria-checked='true'] span { left: 25px; }

/* ---------- avisos, janelas, efeitos ---------- */
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; transition: all 0.25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad); color: #fff; }
.toast.success { background: var(--ok); color: #fff; }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 0.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: fade 0.2s ease; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: 22px; padding: 22px 18px 16px; display: flex; flex-direction: column; gap: 12px; max-height: 90dvh; overflow: auto; animation: rise 0.25s ease; }
@media (min-width: 600px) { .overlay { align-items: center; } }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.steps-list li { display: flex; gap: 12px; align-items: center; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.2s ease-in forwards; }
.splash { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--soft); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.rich-list { margin: 0 0 12px; padding-left: 22px; } .rich-list li { margin: 4px 0; }

/* ---------- ferramentas (calculadora) ---------- */
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc-head { display: flex; align-items: center; gap: 8px; }
.calc-field { display: flex; flex-direction: column; gap: 4px; }
.calc-field-label { font-weight: 700; font-size: 0.92rem; }
.calc-input { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.calc-input:focus-within { border-color: var(--primary); }
.calc-input input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text); outline: none; }
.affix { color: var(--muted); font-weight: 700; }
.calc-out { margin-top: 12px; }
.calc-result { display: flex; flex-direction: column; gap: 12px; }
.calc-main { display: flex; flex-direction: column; gap: 2px; }
.calc-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.calc-value { font-size: 2.2rem; line-height: 1.1; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-grid > div { display: flex; flex-direction: column; gap: 2px; }
.calc-grid strong { font-size: 1.2rem; }
.calc-note { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 0.92rem; }
.calc-note.warn { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.calc-note.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.module-emoji.is-icon, .big-emoji.is-icon { font-size: 0; color: var(--primary); }
.big-emoji.is-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--soft); }
.big-emoji.is-icon svg { width: 30px; height: 30px; }

/* ---------- estilo editorial (produtos para profissionais) ---------- */
html[data-style='editorial'] {
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', 'Noto Serif', Georgia, serif;
  --radius: 6px;
  --shadow: none;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --muted: color-mix(in srgb, var(--text) 55%, transparent);
  letter-spacing: 0.005em;
}
html[data-style='editorial'] h1, html[data-style='editorial'] h2, html[data-style='editorial'] h3,
html[data-style='editorial'] .topbar-title, html[data-style='editorial'] .price, html[data-style='editorial'] .calc-value {
  font-family: var(--serif); font-weight: 600; letter-spacing: 0;
}
html[data-style='editorial'] .hello h2 { font-size: 1.85rem; font-weight: 500; }
html[data-style='editorial'] .topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); }
html[data-style='editorial'] .brand-dot { width: 6px; height: 6px; background: var(--accent); }
html[data-style='editorial'] .card { border-radius: var(--radius); border-color: var(--line); }
html[data-style='editorial'] .section-title,
html[data-style='editorial'] .pill,
html[data-style='editorial'] .tag,
html[data-style='editorial'] .navitem { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.68rem; font-weight: 700; }
html[data-style='editorial'] .section-title { color: var(--muted); }
html[data-style='editorial'] .pill { background: transparent; border: 1px solid currentColor; color: var(--accent); border-radius: 2px; padding: 3px 8px; }
html[data-style='editorial'] .pill.demo { color: var(--muted); }
html[data-style='editorial'] .tag { background: transparent; color: var(--accent); padding: 0; }
html[data-style='editorial'] .btn { border-radius: 4px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; min-height: 50px; }
html[data-style='editorial'] .btn.big { font-size: 0.85rem; min-height: 56px; }
html[data-style='editorial'] .btn.small { font-size: 0.72rem; min-height: 38px; }
html[data-style='editorial'] .btn.soft { background: transparent; color: var(--text); border: 1px solid var(--text); }
html[data-style='editorial'] .linkbtn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
html[data-style='editorial'] input[type='email'], html[data-style='editorial'] input[type='password'], html[data-style='editorial'] input[type='text'],
html[data-style='editorial'] input[type='search'], html[data-style='editorial'] .search, html[data-style='editorial'] .calc-input { border-radius: 4px; border-width: 1px; }
html[data-style='editorial'] .auth-logo { border-radius: 14px; box-shadow: none; }
html[data-style='editorial'] .auth-hero h1 { font-size: 2rem; font-weight: 500; }
/* destaque escuro */
html[data-style='editorial'] .hero { background: var(--text); color: var(--bg); border: 0; }
html[data-style='editorial'] .hero .muted { color: color-mix(in srgb, var(--bg) 65%, transparent); }
html[data-style='editorial'] .hero .pill { color: var(--accent); }
html[data-style='editorial'] .hero h3 { font-size: 1.5rem; font-weight: 500; }
html[data-style='editorial'] .hero .progress { background: color-mix(in srgb, var(--bg) 18%, transparent); height: 2px; }
html[data-style='editorial'] .hero .progress-fill { background: var(--accent); }
html[data-style='editorial'] .hero .btn.primary { background: var(--accent); color: var(--text); }
html[data-style='editorial'] .progress { height: 3px; }
html[data-style='editorial'] .progress-fill { background: var(--text); }
/* listas de conteúdo */
html[data-style='editorial'] .module-emoji { width: 44px; height: 44px; border-radius: 50%; background: transparent; border: 1px solid var(--line); }
html[data-style='editorial'] .module-emoji.is-icon { color: var(--text); }
html[data-style='editorial'] .module strong, html[data-style='editorial'] .day-body strong, html[data-style='editorial'] .lib-main strong { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
html[data-style='editorial'] .module.is-locked { background: transparent; border-style: dashed; }
html[data-style='editorial'] .day-n { background: transparent; border-radius: 0; color: var(--accent); font-family: var(--serif); font-size: 1.5rem; font-weight: 500; width: 36px; }
html[data-style='editorial'] .day.done .day-n { background: transparent; color: var(--ok); }
html[data-style='editorial'] .status { border-radius: 50%; }
html[data-style='editorial'] .status.open { background: var(--text); color: var(--bg); }
html[data-style='editorial'] .step-n { background: transparent; color: var(--accent); border: 1px solid var(--accent); font-family: var(--serif); font-weight: 600; }
html[data-style='editorial'] .video.placeholder { background: var(--text); color: var(--bg); border-radius: 4px; }
html[data-style='editorial'] .video.placeholder .muted { color: color-mix(in srgb, var(--bg) 65%, transparent); }
html[data-style='editorial'] .video.placeholder .big-emoji.is-icon { background: transparent; border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); color: var(--bg); }
html[data-style='editorial'] .verse { border-left: 2px solid var(--accent); background: transparent; border-radius: 0; font-family: var(--serif); font-size: 1.15rem; }
html[data-style='editorial'] .verse cite { color: var(--accent); font-family: var(--font); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; }
html[data-style='editorial'] .prayer { background: var(--soft); font-style: normal; border-radius: 4px; border-left: 2px solid var(--accent); }
html[data-style='editorial'] .chip { border-radius: 2px; border-width: 1px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; }
html[data-style='editorial'] .chip[aria-pressed='true'] { background: var(--text); border-color: var(--text); color: var(--bg); }
html[data-style='editorial'] .slot { background: color-mix(in srgb, var(--accent) 22%, transparent); }
html[data-style='editorial'] .script { font-size: 1.05rem; line-height: 1.6; }
html[data-style='editorial'] .offer.highlight { border: 1px solid var(--text); box-shadow: inset 0 3px 0 var(--accent); }
html[data-style='editorial'] .price { color: var(--text); font-weight: 600; }
html[data-style='editorial'] .navitem.active { background: transparent; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); border-radius: 0; }
html[data-style='editorial'] .install { border: 1px solid var(--line); }
html[data-style='editorial'] .modal { border-radius: 8px; }
html[data-style='editorial'] .big-emoji.is-icon { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
html[data-style='editorial'] .calc-out { background: var(--text); color: var(--bg); border: 0; }
html[data-style='editorial'] .calc-out .muted, html[data-style='editorial'] .calc-out .calc-label { color: color-mix(in srgb, var(--bg) 65%, transparent); }
html[data-style='editorial'] .calc-out .calc-value { color: var(--accent); font-weight: 500; }
html[data-style='editorial'] .calc-note.warn, html[data-style='editorial'] .calc-note.ok { background: color-mix(in srgb, var(--bg) 10%, transparent); }

/* ---------- estilo infantil (product.style = "kids") ---------- */
html[data-style='kids'] {
  --k1: #ff8a3d; --k2: #2fb8a6; --k3: #8b6cf6; --k4: #ff5d8f; --k5: #3aa0ff; --k6: #f2b600;
  --radius: 22px;
  --shadow: 0 2px 0 color-mix(in srgb, var(--text) 8%, transparent), 0 8px 22px rgb(0 0 0 / 0.06);
  --kid-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.2 6.8 1-4.9 4.8 1.2 6.8L12 17.6l-6.1 3.2 1.2-6.8L2.2 9.2 9 8.2z' fill='%23ffc531' stroke='%23e8a400' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  --kid-ball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 40 40'%3E%3Cdefs%3E%3CclipPath id='cb'%3E%3Ccircle r='17'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r='17' fill='%23fff'/%3E%3Cg clip-path='url(%23cb)' fill='%232b2420'%3E%3Cpath d='M0.0 -5.4 L5.1 -1.7 L3.2 4.4 L-3.2 4.4 L-5.1 -1.7z'/%3E%3Cpath d='M7.1 -9.7 L5.2 -15.3 L10.0 -18.8 L14.7 -15.3 L12.9 -9.7z'/%3E%3Cpath d='M11.4 3.7 L16.2 0.3 L20.9 3.7 L19.1 9.3 L13.2 9.3z'/%3E%3Cpath d='M0.0 12.0 L4.8 15.5 L2.9 21.0 L-2.9 21.0 L-4.8 15.5z'/%3E%3Cpath d='M-11.4 3.7 L-13.2 9.3 L-19.1 9.3 L-20.9 3.7 L-16.2 0.3z'/%3E%3Cpath d='M-7.1 -9.7 L-12.9 -9.7 L-14.7 -15.3 L-10.0 -18.8 L-5.2 -15.3z'/%3E%3C/g%3E%3Cpath d='M0.0 -5.4L0.0 -11.0M5.1 -1.7L10.5 -3.4M3.2 4.4L6.5 8.9M-3.2 4.4L-6.5 8.9M-5.1 -1.7L-10.5 -3.4' stroke='%232b2420' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle r='17' fill='none' stroke='%232b2420' stroke-width='2'/%3E%3C/svg%3E");
}
html[data-style='kids'] body { background-color: var(--bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%0A%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' opacity='0.3'%3E%0A%3Cpath d='M38 22l5.9 12 13.1 1.9-9.5 9.3 2.2 13.1L38 52.1l-11.7 6.2 2.2-13.1L19 35.9 32.1 34z' fill='%23ffc531' stroke='%23e8a400'/%3E%0A%3Cg transform='translate(190 40)' stroke='none'%3E%3Cdefs%3E%3CclipPath id='cb'%3E%3Ccircle r='17'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r='17' fill='%23fff'/%3E%3Cg clip-path='url(%23cb)' fill='%232b2420'%3E%3Cpath d='M0.0 -5.4 L5.1 -1.7 L3.2 4.4 L-3.2 4.4 L-5.1 -1.7z'/%3E%3Cpath d='M7.1 -9.7 L5.2 -15.3 L10.0 -18.8 L14.7 -15.3 L12.9 -9.7z'/%3E%3Cpath d='M11.4 3.7 L16.2 0.3 L20.9 3.7 L19.1 9.3 L13.2 9.3z'/%3E%3Cpath d='M0.0 12.0 L4.8 15.5 L2.9 21.0 L-2.9 21.0 L-4.8 15.5z'/%3E%3Cpath d='M-11.4 3.7 L-13.2 9.3 L-19.1 9.3 L-20.9 3.7 L-16.2 0.3z'/%3E%3Cpath d='M-7.1 -9.7 L-12.9 -9.7 L-14.7 -15.3 L-10.0 -18.8 L-5.2 -15.3z'/%3E%3C/g%3E%3Cpath d='M0.0 -5.4L0.0 -11.0M5.1 -1.7L10.5 -3.4M3.2 4.4L6.5 8.9M-3.2 4.4L-6.5 8.9M-5.1 -1.7L-10.5 -3.4' stroke='%232b2420' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle r='17' fill='none' stroke='%232b2420' stroke-width='2'/%3E%3C/g%3E%0A%3Cpath d='M96 128c-9 0-14-6-14-12 0-7 6-12 13-11 2-7 8-11 15-11 9 0 15 6 16 14 6 0 11 5 11 10 0 6-5 10-11 10z' fill='%23fff' stroke='%233aa0ff'/%3E%0A%3Cpath d='M214 150c-6-6-15 0-9 8l9 9 9-9c6-8-3-14-9-8z' fill='%23ff8fb1' stroke='%23ff5d8f'/%3E%0A%3Cpath d='M30 200a26 26 0 0 1 52 0M38 200a18 18 0 0 1 36 0M46 200a10 10 0 0 1 20 0' stroke='%238b6cf6'/%3E%0A%3Cpath d='M150 226l26-26 8 8-26 26-11 3z' fill='%23ffd58a' stroke='%23e8820f'/%3E%3Cpath d='M176 200l8 8' stroke='%23e8820f'/%3E%0A%3Ccircle cx='132' cy='40' r='4' fill='%232fb8a6' stroke='none'/%3E%3Ccircle cx='240' cy='226' r='3.5' fill='%23ff8a3d' stroke='none'/%3E%3Ccircle cx='112' cy='196' r='3' fill='%233aa0ff' stroke='none'/%3E%3Ccircle cx='20' cy='126' r='3.5' fill='%23ff5d8f' stroke='none'/%3E%0A%3Cpath d='M236 98l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8-4.2-4.1 5.8-.8z' fill='%232fb8a6' stroke='%232fb8a6'/%3E%0A%3Cpath d='M120 70l2 4 4.4.6-3.2 3.1.8 4.4-4-2.1-4 2.1.8-4.4-3.2-3.1 4.4-.6z' fill='%23ff8a3d' stroke='%23ff8a3d'/%3E%0A%3C/g%3E%3C/svg%3E"); background-size: 260px 260px; background-attachment: fixed; }
html[data-style='kids'] .topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 2px dashed color-mix(in srgb, var(--primary) 25%, transparent); }
html[data-style='kids'] .topbar-title { font-weight: 900; letter-spacing: 0.01em; }
html[data-style='kids'] .brand-dot { width: 22px; height: 22px; border-radius: 0; background: var(--kid-star) center / contain no-repeat; }
html[data-style='kids'] h1, html[data-style='kids'] h2, html[data-style='kids'] h3 { font-weight: 900; }
html[data-style='kids'] .hello h2 { font-size: 1.75rem; }
html[data-style='kids'] .hello h2::after { content: ''; display: inline-block; width: 30px; height: 30px; margin-left: 8px; vertical-align: -5px; background: var(--kid-ball) center / contain no-repeat; animation: kid-bounce 2.4s ease-in-out infinite; }
@keyframes kid-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-7px) rotate(25deg); } 60% { transform: translateY(0) rotate(40deg); } }
@media (prefers-reduced-motion: reduce) { html[data-style='kids'] .hello h2::after { animation: none; } }

/* cartão de destaque */
html[data-style='kids'] .hero { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #ffc531)); box-shadow: 0 6px 0 color-mix(in srgb, var(--primary) 70%, #000 30%), 0 14px 30px color-mix(in srgb, var(--primary) 30%, transparent); }
html[data-style='kids'] .hero::before { content: ''; position: absolute; right: -34px; bottom: -46px; width: 140px; height: 140px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-width='5' stroke-linecap='round' opacity='.55'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Cpath d='M50 8v12M50 80v12M8 50h12M80 50h12M20 20l8 8M72 72l8 8M80 20l-8 8M28 72l-8 8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
html[data-style='kids'] .hero::after { content: ''; position: absolute; right: 22px; bottom: 20px; width: 46px; height: 46px; background: var(--kid-ball) center / contain no-repeat; transform: rotate(-15deg); }
html[data-style='kids'] .hero .pill { background: rgb(255 255 255 / 0.25); color: #fff; }
html[data-style='kids'] .hero-top { position: relative; z-index: 1; }
html[data-style='kids'] .hero .muted { color: rgb(255 255 255 / 0.85); }
html[data-style='kids'] .hero h3 { font-size: 1.35rem; max-width: 80%; position: relative; }
html[data-style='kids'] .hero .progress { background: rgb(255 255 255 / 0.3); max-width: 75%; }
html[data-style='kids'] .hero .progress-fill { background: #fff; }
html[data-style='kids'] .hero .btn.primary { background: #fff; color: var(--primary); box-shadow: 0 4px 0 rgb(0 0 0 / 0.15); position: relative; }

/* botões com cara de bala */
html[data-style='kids'] .btn { border-radius: 16px; font-weight: 800; }
html[data-style='kids'] .btn.primary { box-shadow: 0 4px 0 color-mix(in srgb, var(--primary) 70%, #000 30%); }
html[data-style='kids'] .btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--primary) 70%, #000 30%); }

/* títulos de seção com estrela */
html[data-style='kids'] .section-title { color: var(--text); font-weight: 900; font-size: 1.08rem; display: flex; align-items: center; gap: 6px; }
html[data-style='kids'] .section-title::before { content: ''; width: 20px; height: 20px; background: var(--kid-star) center / contain no-repeat; }

/* cores que se revezam nos cartões */
html[data-style='kids'] .modules > :nth-child(6n+1), html[data-style='kids'] .days > :nth-child(6n+1), html[data-style='kids'] .medals > :nth-child(6n+1) { --kc: var(--k1); }
html[data-style='kids'] .modules > :nth-child(6n+2), html[data-style='kids'] .days > :nth-child(6n+2), html[data-style='kids'] .medals > :nth-child(6n+2) { --kc: var(--k2); }
html[data-style='kids'] .modules > :nth-child(6n+3), html[data-style='kids'] .days > :nth-child(6n+3), html[data-style='kids'] .medals > :nth-child(6n+3) { --kc: var(--k3); }
html[data-style='kids'] .modules > :nth-child(6n+4), html[data-style='kids'] .days > :nth-child(6n+4), html[data-style='kids'] .medals > :nth-child(6n+4) { --kc: var(--k4); }
html[data-style='kids'] .modules > :nth-child(6n+5), html[data-style='kids'] .days > :nth-child(6n+5), html[data-style='kids'] .medals > :nth-child(6n+5) { --kc: var(--k5); }
html[data-style='kids'] .modules > :nth-child(6n+6), html[data-style='kids'] .days > :nth-child(6n+6), html[data-style='kids'] .medals > :nth-child(6n+6) { --kc: var(--k6); }
html[data-style='kids'] .module { border: 2px solid color-mix(in srgb, var(--kc) 30%, transparent); box-shadow: 0 4px 0 color-mix(in srgb, var(--kc) 25%, transparent); }
html[data-style='kids'] .module-emoji { background: color-mix(in srgb, var(--kc) 18%, var(--surface)); border-radius: 18px; transform: rotate(-4deg); }
html[data-style='kids'] .modules > :nth-child(even) .module-emoji { transform: rotate(4deg); }
html[data-style='kids'] .module.is-locked { border-style: dashed; box-shadow: none; }
html[data-style='kids'] .module.is-locked .module-emoji { filter: grayscale(0.4); }

/* dias como figurinhas */
html[data-style='kids'] .day { border: 2px solid color-mix(in srgb, var(--kc) 25%, transparent); box-shadow: 0 4px 0 color-mix(in srgb, var(--kc) 22%, transparent); }
html[data-style='kids'] .day-n { width: 46px; height: 46px; border-radius: 14px; background: var(--kc); color: #fff; font-size: 1.15rem; font-weight: 900; border: 3px solid #fff; box-shadow: 0 3px 8px color-mix(in srgb, var(--kc) 45%, transparent); transform: rotate(-5deg); }
html[data-style='kids'] .days > :nth-child(even) .day-n { transform: rotate(5deg); }
html[data-style='kids'] .day.done .day-n { background: var(--ok); color: #fff; }
html[data-style='kids'] .status.open { background: var(--kc, var(--primary)); box-shadow: 0 3px 0 color-mix(in srgb, var(--kc, var(--primary)) 70%, #000 30%); }

/* conquistas */
html[data-style='kids'] .medal { border: 2px dashed color-mix(in srgb, var(--kc) 40%, transparent); }
html[data-style='kids'] .medal.earned { border-style: solid; border-color: var(--kc); background: color-mix(in srgb, var(--kc) 15%, var(--surface)); }

/* barra de progresso listrada */
html[data-style='kids'] .progress { height: 12px; }
html[data-style='kids'] .progress-fill { background: repeating-linear-gradient(-45deg, var(--primary) 0 10px, color-mix(in srgb, var(--primary) 75%, #fff) 10px 20px); }

/* passos do dia */
html[data-style='kids'] .step-n { background: var(--k2); box-shadow: 0 3px 0 color-mix(in srgb, var(--k2) 70%, #000 30%); }
html[data-style='kids'] .install { border: 2px dashed var(--k5); }
html[data-style='kids'] .navitem.active { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); font-weight: 800; }
html[data-style='kids'] .auth-logo { transform: rotate(-4deg); box-shadow: 0 6px 0 color-mix(in srgb, var(--primary) 30%, transparent); }

/* decorações extras */
html[data-style='kids'] .hello { position: relative; }
html[data-style='kids'] .hello::before { content: ''; position: absolute; right: 4px; top: -2px; width: 34px; height: 34px; background: var(--kid-star) center / contain no-repeat; transform: rotate(-14deg); }
html[data-style='kids'] .hero { background-image: radial-gradient(circle at 18% 88%, rgb(255 255 255 / 0.35) 0 5px, transparent 6px), radial-gradient(circle at 62% 14%, rgb(255 232 120 / 0.9) 0 5px, transparent 6px), radial-gradient(circle at 48% 78%, rgb(255 255 255 / 0.5) 0 4px, transparent 5px), radial-gradient(circle at 80% 46%, rgb(255 255 255 / 0.4) 0 3px, transparent 4px), linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #ffc531)); }

/* ---------- tabelas e links no texto ---------- */
.rich-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 4px 0 8px; }
.rich-table th, .rich-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rich-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.rich-table td:last-child, .rich-table th:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.rich-link { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
