:root {
  --bg: #f6efe9;
  --card: #fffaf6;
  --ink: #2b2420;
  --muted: #7a6d65;
  --line: #eadfd6;
  --accent: #c0705a;
  --accent-ink: #fff;
  --soft: #f0dcd2;
  --ok: #5d8a6b;
  --warn-bg: #fbe9e2;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(80, 50, 30, .08);
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
#app { max-width: 560px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); min-height: 100vh; }
body.com-nav #app { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 21px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.25; }
h3.sub { font-family: Inter, sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.sec { margin: 28px 0 12px; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.centro { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; width: 100%; min-height: 52px; padding: 8px 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: 600 16px Inter, sans-serif; cursor: pointer; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.sec { background: var(--soft); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--muted); min-height: 40px; width: auto; padding: 0 8px; font-weight: 500; }
.btn.wa { background: #25d366; color: #fff; }
.btn[disabled] { opacity: .6; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:active { transform: scale(.99); }

label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=search], input[type=password], input:not([type]) { width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: 16px Inter, sans-serif; color: var(--ink); }
input:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.erro { color: #b3402a; font-size: 14px; min-height: 20px; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Login */
.hero { text-align: center; padding: 32px 0 24px; }
.hero .logo { width: 96px; height: 96px; margin: 0 auto 16px; display: block; border-radius: 24px; object-fit: cover; box-shadow: var(--shadow); }

.hero .subtitulo { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--accent); }

/* Marca no topo da home */
.marca { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.marca img { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; }
.marca b { display: block; font: 600 16px/1.2 Fraunces, Georgia, serif; }
.marca span { display: block; font-size: 12px; color: var(--accent); font-weight: 600; }

/* Topo */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.back { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 22px; line-height: 1; cursor: pointer; }
.back.sobre { position: absolute; top: 12px; left: 12px; background: rgba(255, 250, 246, .92); border: 0; }
.pill { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-weight: 600; font-size: 14px; }

/* Tags e chips */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: #9a4f3a; }
.tag.mini { margin-top: 6px; font-size: 11px; padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.rolar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.rolar::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Animação de exercício (2 fotos alternando) */
.anim { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); border-radius: 14px; }
.anim img, .anim video, .anim iframe, .anim svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.anim img.b { animation: troca 2.8s ease-in-out infinite; }
.anim.parado img.b { animation-play-state: paused; }
.anim.yt { aspect-ratio: 16 / 9; }
.anim.foto img { object-position: center 40%; }
@keyframes troca { 0%, 30% { opacity: 0; } 45%, 80% { opacity: 1; } 95%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .anim img.b { animation-duration: 6s; } }

.cover { position: relative; margin: -20px -16px 0; }
.cover .anim, .anim.capa { border-radius: 0 0 24px 24px; }
.cover .anim { aspect-ratio: 16 / 11; }

/* Destaque da home */
.destaque { padding: 0; overflow: hidden; }
.destaque .anim { border-radius: 0; aspect-ratio: 16 / 9; }
.destaque-info { padding: 14px 16px 16px; }
.destaque-info h2 { margin-top: 8px; }

/* Banner de módulo */
a.card.promo { position: relative; margin-top: 20px; padding: 0; overflow: hidden; border: 0; min-height: 230px; color: #fff; }
.promo .anim { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 25, 18, .15) 0%, rgba(43, 25, 18, .85) 75%); }
.promo-info { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; min-height: 230px; padding: 18px; }
.promo-info h2 { font-size: 26px; }
.promo-info p { font-size: 14px; opacity: .92; }
.tag.claro { align-self: flex-start; background: rgba(255, 255, 255, .92); color: #9a4f3a; }
.btn.claro { align-self: flex-start; width: auto; min-height: 42px; background: #fff; color: var(--ink); font-size: 14px; }

/* Cartões de programa */
.sub-sec { font-size: 19px; margin-bottom: 12px; }
.progs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card.prog-card { padding: 0; overflow: hidden; }
.card.prog-card .anim { border-radius: 0; }
.prog-card-info { padding: 10px 12px 12px; }
.prog-card-info .muted { font-size: 12px; }

/* Itens de lista */
.card.item { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px; }
.thumb { width: 96px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.thumb .anim { height: 100%; aspect-ratio: auto; border-radius: 0; }
.thumb.icone { display: grid; place-items: center; font-size: 32px; }
.card.linha { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }

/* Grade da biblioteca */
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card.ex { padding: 0; overflow: hidden; }
.card.ex .anim { border-radius: 0; }
.ex-info { padding: 10px 12px 12px; }
.ex-info h3 { font-size: 15px; }
.ex-info .muted { font-size: 12px; }

/* Estatísticas */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stats b { display: block; font: 600 22px Fraunces, serif; }
.stats span { font-size: 12px; color: var(--muted); }

.prog { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }

.barras { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; margin-top: 12px; align-items: end; }
.barra { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; color: var(--muted); }
.barra i { width: 100%; max-width: 28px; min-height: 4px; background: var(--accent); border-radius: 6px 6px 3px 3px; }
.barra .val { font-weight: 600; color: var(--ink); min-height: 18px; }

/* Desafio */
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 16px; }
.dia { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 15px; }
.dia.feito { background: var(--ok); border-color: var(--ok); color: #fff; }
.dia.hoje { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Textos de exercício */
ol.passos { padding-left: 20px; margin: 0; }
ol.passos li + li { margin-top: 6px; }
.box { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.box.alerta { background: var(--warn-bg); }

/* Player */
.player { display: flex; flex-direction: column; gap: 14px; }
.player .anim.palco { border-radius: var(--radius); box-shadow: var(--shadow); }
.player.pausa .anim.palco { opacity: .85; }
.player .fase { font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.player h2 { font-size: 24px; }
.aviso { text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 8px; font-weight: 600; }
.relogio { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.relogio svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.relogio circle { fill: none; stroke-width: 7; }
.relogio .trilha { stroke: var(--soft); }
.relogio .anel { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.player.pausa .relogio .anel { stroke: var(--ok); }
.relogio span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 38px Fraunces, serif; font-variant-numeric: tabular-nums; }
.controles { display: flex; justify-content: center; align-items: center; gap: 22px; }
.redondo { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 18px; color: var(--ink); cursor: pointer; }
.redondo.grande { width: 72px; height: 72px; background: var(--accent); border: 0; color: #fff; font-size: 22px; }
details summary { cursor: pointer; }

.fim { text-align: center; padding-top: 40px; }
.fim .big { font-size: 64px; }

/* Alunas: comparador antes/depois */
.card.resultado { padding: 0; overflow: hidden; }
.comp { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--soft); touch-action: pan-y; }
.comp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comp-antes { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.comp-linha { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .35); pointer-events: none; }
.comp-linha::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.comp-lbl { position: absolute; top: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(43, 36, 32, .72); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.comp-lbl.l { left: 12px; } .comp-lbl.r { right: 12px; }
.comp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.comp:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
.resultado-info { padding: 12px 16px 14px; }
.big-ico { font-size: 40px; }

/* Navegação inferior */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 4px; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); background: rgba(255, 250, 246, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.nav[hidden] { display: none; }
.nav a { flex: 1; min-width: 0; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 500; border-radius: 12px; }
.nav a.on { color: var(--accent); font-weight: 600; }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
