:root { --creme: #fff6ef; --coral: #ff6b5c; --coral2: #ff9a76; --ameixa: #3b2a5c; --menta: #8fd6ca; --cinza: #8a7f93; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Figtree', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif; color: var(--ameixa); background: var(--creme); overscroll-behavior: none; }
.aula { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.palco { position: relative; background: radial-gradient(60% 55% at 74% 30%, #ffe7a8cc 0%, #ffe7a800 100%), linear-gradient(180deg, #f6f3e4 0%, #e4eee2 62%, #d3e3d3 100%); border-radius: 0 0 36px 36px; overflow: hidden; }
.palco canvas { display: block; width: 100%; aspect-ratio: 1 / 0.8; touch-action: none; }
.topo { position: absolute; inset: 12px 14px auto; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.topo > * { pointer-events: auto; }
.chip { background: #ffffffd9; backdrop-filter: blur(6px); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 10px #3b2a5c14; }
.redondo { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #ffffffd9; font-size: 20px; color: var(--ameixa); box-shadow: 0 2px 10px #3b2a5c14; }
.barra { height: 5px; background: #3b2a5c14; } .barra i { display: block; height: 100%; width: 0; background: var(--folha, #2f6b55); border-radius: 0 4px 4px 0; }
.info { padding: 18px 22px 6px; } .info h1 { margin: 0; font-size: 30px; letter-spacing: -0.015em; font-family: 'Fraunces', Georgia, serif; font-weight: 600; } .info p { margin: 4px 0 0; color: var(--cinza); font-size: 16px; }
.painel { display: flex; align-items: center; gap: 18px; padding: 10px 22px; }
.anel { --k: 0.7; position: relative; width: 104px; height: 104px; flex: none; display: grid; place-items: center; }
.anel::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--menta); opacity: 0.35; transform: scale(var(--k)); transition: transform 0.25s linear, background 0.4s; }
.anel.expira::before { background: var(--coral2); }
.anel b { position: relative; font-size: 17px; }
.conta { flex: 1; } .conta .n { font-size: 44px; font-weight: 800; line-height: 1; } .conta .n small { font-size: 20px; color: var(--cinza); font-weight: 600; }
.conta .dica { margin-top: 6px; font-size: 15px; color: var(--cinza); min-height: 38px; }
.controles { margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 18px; padding: 14px 22px 26px; }
.controles button { border: 0; background: #fff; color: var(--ameixa); width: 58px; height: 58px; border-radius: 50%; font-size: 22px; box-shadow: 0 4px 16px #3b2a5c1f; }
.controles .play { width: 84px; height: 84px; font-size: 32px; color: #fff; background: var(--coral); box-shadow: 0 10px 26px #ef5f6b55; }
.controles button:active { transform: scale(0.94); }
.comecar { position: absolute; inset: 0; display: grid; place-items: center; background: #f2f5efb3; backdrop-filter: blur(2px); border: 0; font: inherit; color: inherit; }
.comecar span { background: var(--coral); color: #fff; font-weight: 800; font-size: 20px; padding: 18px 38px; border-radius: 999px; box-shadow: 0 10px 26px #ff6b5c66; }
.aseguir { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #ffffffee; border-radius: 18px; padding: 12px 22px; text-align: center; box-shadow: 0 8px 24px #3b2a5c26; min-width: 60%; }
.aseguir small { display: block; color: var(--cinza); font-size: 13px; } .aseguir b { font-size: 18px; }
.controles .pular { width: 50px; height: 50px; font-size: 18px; }
.carregando { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cinza); font-weight: 600; }
[hidden] { display: none !important; }

.como { display: block; margin: 6px 22px 0; padding: 14px; border: 0; border-radius: 16px; background: #fff; font: inherit; font-weight: 700; font-size: 16px; color: var(--folha, #2f6b55); box-shadow: 0 3px 12px #1b372e10; }
.conta .dica { font-size: 16px; } .info p { font-size: 17px; }

/* aula sem "boiar": barra por exercício, legenda da fala, músculos trabalhando, cartão de fim de exercício, reprodução automática */
.barra { display: flex; gap: 4px; height: 6px; background: none; padding: 0 14px; margin-top: 8px; } .barra span { flex: 1; background: #1b372e1a; border-radius: 4px; overflow: hidden; }
.barra i { border-radius: 4px; transition: width 0.25s linear; }
.info p { min-height: 2.7em; transition: color 0.2s; } .info p.fala { color: var(--ameixa); font-weight: 700; }
.info p.fala::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); margin-right: 8px; vertical-align: 1px; animation: pulsa 1.2s ease-in-out infinite; }
.trabalha { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; background: #10231dd9; color: #eafff8; border-radius: 999px; padding: 7px 14px 7px 11px; font-size: 13.5px; font-weight: 700; max-width: calc(100% - 24px); }
.trabalha i { width: 10px; height: 10px; border-radius: 50%; background: #35ffd0; box-shadow: 0 0 10px 3px #35ffd0aa; flex: none; animation: pulsa 1.4s ease-in-out infinite; }
.conta .falta { display: block; margin-top: 4px; font-size: 13.5px; color: var(--cinza); font-variant-numeric: tabular-nums; }
.fimex { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px 20px; background: #f2f5eff5; text-align: center; }
.fimex small { font-size: 15px; font-weight: 700; color: var(--folha, #2f6b55); } .fimex .ok { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--folha, #2f6b55); color: #fff; font-size: 13px; margin-right: 4px; }
.fimex h3 { margin: 6px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 28px; } .fimex > .ok { width: 56px; height: 56px; font-size: 30px; margin: 0 auto; } .fimex p { margin: 0; color: var(--cinza); }
.fimex .prox { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px; text-align: left; box-shadow: 0 4px 14px #1b372e14; } .fimex .prox img { width: 100px; height: 75px; object-fit: cover; border-radius: 12px; flex: none; }
.fimex .prox span { display: block; font-size: 13px; color: var(--cinza); font-weight: 700; } .fimex .prox b { font-family: 'Fraunces', Georgia, serif; font-size: 21px; line-height: 1.15; }
.fimex button { border: 0; font: inherit; border-radius: 999px; padding: 13px 18px; font-weight: 800; font-size: 17px; } .fimex .vai { background: var(--coral); color: #fff; box-shadow: 0 8px 20px #ef5f6b44; } .fimex .vai i { font-style: normal; font-variant-numeric: tabular-nums; }
.fimex .repetir { background: none; color: var(--cinza); padding: 4px; font-size: 15px; }
.auto { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px 18px; margin-top: -12px; font-size: 14.5px; color: var(--cinza); font-weight: 600; position: relative; }
.auto input { position: absolute; opacity: 0; } .auto span { width: 40px; height: 24px; border-radius: 999px; background: #1b372e2e; position: relative; flex: none; transition: background 0.2s; }
.auto span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px #0003; }
.auto input:checked + span { background: var(--folha, #2f6b55); } .auto input:checked + span::after { transform: translateX(16px); } .auto input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
@keyframes pulsa { 50% { opacity: 0.45; transform: scale(0.8); } }

/* cabe em 812 px de altura com o botão de reprodução automática à vista */
.info { padding: 12px 22px 2px; } .info h1 { font-size: 27px; } .painel { padding: 4px 22px; } .anel { width: 86px; height: 86px; } .conta .n { font-size: 38px; }
.conta .dica { min-height: 2.5em; line-height: 1.25; text-wrap: pretty; }   /* dica de cuidado é segurança: nunca cortar com "…" */
@media (max-width: 359px) { .conta .dica { font-size: 14.5px; } .painel { gap: 12px; } }
.controles { padding: 10px 22px 10px; margin-top: auto; } .controles .play { width: 76px; height: 76px; } .controles button { width: 54px; height: 54px; }
.auto { margin-top: 0; padding: 2px 22px 14px; }

/* responsivo: a tela de aula ocupa exatamente a altura do aparelho. Quem encolhe é o palco (a boneca fica menor), nunca os
   controles: tocar, pular e a chave de reprodução automática ficam sempre à vista, do iPhone SE ao Android grande. Só rola
   se nem com o palco no mínimo couber. Com o cartão de fim de exercício aberto, some o que não importa e o palco cresce. */
.aula { height: 100dvh; min-height: 0; overflow-y: auto; }
.aula > * { flex: none; }
.aula > .palco { flex: 1 1 0; min-height: 170px; max-height: calc(min(100vw, 520px) * 0.8); }
.palco canvas { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.aula.com-cartao .info p, .aula.com-cartao .painel, .aula.com-cartao .como, .aula.com-cartao .pix-aula { display: none; }
.aula.com-cartao > .palco { min-height: 290px; }
@media (max-height: 700px) { .info { padding-top: 8px; } .info h1 { font-size: 24px; } .info p { font-size: 15.5px; min-height: 2.5em; } .como { padding: 10px; } .controles { padding: 6px 22px; } .controles .play { width: 66px; height: 66px; } .auto { padding-bottom: 8px; } }
/* aparelho baixo (Android antigo dentro do Chrome, ~360x560): o texto pode passar da tela e rolar, mas os controles ficam presos embaixo */
@media (max-height: 640px) {
  .aula > .palco { min-height: 150px; } .trabalha { font-size: 12px; padding: 4px 10px 4px 8px; bottom: 6px; left: 8px; }
  .controles { position: sticky; bottom: 34px; z-index: 3; background: linear-gradient(#f2f5ef00, var(--fundo, #f2f5ef) 22%); padding-top: 14px; margin-top: auto; }
  .auto { position: sticky; bottom: 0; z-index: 3; background: var(--fundo, #f2f5ef); padding: 4px 22px 8px; min-height: 34px; }
  .controles .play { width: 60px; height: 60px; font-size: 26px; } .controles button { width: 48px; height: 48px; }
}
