:root {
  --pink: #E83C7A; --pink-2: #F28AB3; --pink-bg: #FFF3F8; --pink-soft: #FBE6EF;
  --dark: #2A1E24; --muted: #7A6670; --green: #22B35A; --red: #E8344E; --orange: #F07A1A;
  --purple: #7C4DDB; --blue: #2F6FE4; --yellow: #FFD34D; --card: #fff; --line: #F1D5E2;
  --r: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--pink-bg); color: var(--dark); font-family: Poppins, system-ui, sans-serif; font-weight: 500; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
main { max-width: 480px; margin: 0 auto; padding: 16px 16px 24px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.15; }
h1 { font-size: 26px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0; line-height: 1.45; }
button { font-family: inherit; cursor: pointer; border: 0; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.stack { display: grid; gap: 14px; }
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: 0 6px 18px rgba(120, 30, 70, .08); }
.btn { text-align: center; text-decoration: none; display: block; width: 100%; padding: 16px; border-radius: 18px; background: var(--pink); color: #fff; font-weight: 800; font-size: 18px; box-shadow: 0 5px 0 #B9245C; transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #B9245C; }
.btn.ghost { background: #fff; color: var(--pink); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn.green { background: var(--green); box-shadow: 0 5px 0 #178041; }
.btn.small { padding: 10px 14px; font-size: 15px; width: auto; display: inline-block; }
.btn[disabled] { opacity: .5; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; color: #fff; background: var(--dark); }
.pill.pink { background: var(--pink); } .pill.green { background: var(--green); } .pill.orange { background: var(--orange); } .pill.purple { background: var(--purple); }

/* topo */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.top img { width: 56px; height: 56px; border-radius: 50%; background: var(--pink-soft); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(120,30,70,.15); object-fit: cover; object-position: 50% 12%; }
.brand { font-weight: 800; font-size: 13px; color: var(--pink); letter-spacing: .3px; }

/* hoje */
.today { background: linear-gradient(135deg, var(--pink) 0%, #F0508A 100%); color: #fff; border-radius: 26px; padding: 20px; position: relative; overflow: hidden; }
.today .big { font-size: 34px; font-weight: 800; }
.today .emoji { position: absolute; right: 14px; top: 8px; font-size: 64px; opacity: .9; }
.today .btn { background: #fff; color: var(--pink); box-shadow: 0 5px 0 rgba(0,0,0,.15); margin-top: 16px; }
.ring { width: 74px; height: 74px; flex: none; }
.tip { border-left: 6px solid var(--yellow); }
.grid30 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { aspect-ratio: 1; border-radius: 12px; background: var(--pink-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-weight: 800; font-size: 14px; line-height: 1; border: 2px solid transparent; color: var(--dark); padding: 0; }
.day small { font-size: 12px; margin-top: 3px; line-height: 1; }
.day.done { background: var(--green); color: #fff; }
.day.now { border-color: var(--pink); box-shadow: 0 0 0 3px #F9C9DC; }
.day.rest { background: #F7EEF2; color: var(--muted); }
.weeklbl { font-size: 12px; font-weight: 800; color: var(--muted); margin: 8px 0 4px; }

/* lista de exercícios */
.exitem { display: flex; align-items: center; gap: 12px; background: #fff; padding: 10px; border-radius: 18px; width: 100%; text-align: left; color: var(--dark); }
.exitem video, .exthumb { width: 64px; height: 64px; border-radius: 14px; background: var(--pink-soft); object-fit: cover; flex: none; }
.exitem b { display: block; font-size: 15px; }
.exitem .dose { color: var(--pink); font-weight: 800; font-size: 14px; }
.badge-viral { font-size: 11px; background: #FFE7A3; color: #7A4B00; padding: 1px 8px; border-radius: 99px; font-weight: 800; margin-left: 4px; white-space: nowrap; }

/* modal ficha */
.modal { position: fixed; inset: 0; background: rgba(42, 30, 36, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--pink-bg); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; border-radius: 28px 28px 0 0; padding: 0 0 24px; animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }
.sheet video { width: 100%; aspect-ratio: 1; display: block; background: var(--pink-soft); border-radius: 28px 28px 0 0; }
.sheet .in { padding: 16px; display: grid; gap: 12px; }
.close { position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; width: 40px; height: 40px; border-radius: 50%; background: #fff; font-size: 20px; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.box { border-radius: 18px; padding: 14px; background: #fff; }
.box.red { background: #FDE8EC; border: 2px solid #F7B8C3; }
.box.green { background: #E6F7EC; border: 2px solid #A9E0BD; }
.box.yellow { background: #FFF6D6; border: 2px solid #F5DD8A; }
.box h3 { margin-bottom: 6px; font-size: 15px; }
ol.passos { margin: 0; padding-left: 22px; display: grid; gap: 6px; }

/* treino guiado */
.player { position: fixed; inset: 0; background: var(--pink-bg); z-index: 40; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.player .bar { height: 8px; background: var(--line); }
.player .bar i { display: block; height: 100%; background: var(--pink); transition: width .3s; }
.player .head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.player .x { background: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; }
.player .body { flex: 1; overflow: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.player video { width: 100%; max-height: 42vh; aspect-ratio: 1; object-fit: cover; border-radius: 26px; background: var(--pink-soft); }
.player .foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.bignum { font-size: 72px; font-weight: 800; line-height: 1; color: var(--pink); }
.bignum.timer { font-variant-numeric: tabular-nums; }
.rest { background: var(--dark); color: #fff; }
.rest .bignum { color: var(--yellow); }
.rest .muted { color: #D9C6CF; }
.chip { display: inline-block; background: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.rest .chip { background: #3C2D35; color: #fff; }

/* abas */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; display: flex; justify-content: center; gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(120,30,70,.08); z-index: 30; }
.tabs button { flex: 1; max-width: 150px; background: none; font-weight: 700; font-size: 12px; color: var(--muted); padding: 4px; border-radius: 14px; display: grid; justify-items: center; }
.tabs button span { font-size: 22px; }
.tabs button.on { color: var(--pink); background: var(--pink-bg); }

/* formulários */
input[type=text], input[type=number] { width: 100%; padding: 14px; border-radius: 14px; border: 2px solid var(--line); font: inherit; font-size: 17px; background: #fff; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
label.check input { width: 22px; height: 22px; accent-color: var(--pink); flex: none; margin-top: 1px; }
.hero { text-align: center; display: grid; gap: 12px; justify-items: center; }
.hero img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; object-position: 50% 10%; background: var(--pink-soft); border: 5px solid #fff; box-shadow: 0 8px 24px rgba(232,60,122,.25); }
.compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.compare div { background: #fff; border-radius: 14px; padding: 10px 4px; }
.compare b { display: block; font-size: 22px; }
.confetti { font-size: 64px; animation: bounce 1s infinite alternate; }
@keyframes bounce { to { transform: translateY(-10px) rotate(6deg); } }
.legal { font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- v4: retenção ---------- */
select { font: inherit; font-weight: 700; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--dark); }
.streak { display: grid; justify-items: center; background: #fff; border-radius: 16px; padding: 6px 10px; font-size: 18px; line-height: 1; box-shadow: 0 3px 10px rgba(120,30,70,.1); }
.streak b { font-size: 15px; margin-top: 2px; }
.bubble { display: flex; gap: 10px; align-items: flex-end; }
.bubble img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--pink-soft); border: 2px solid #fff; flex: none; }
.bubble p { background: #fff; border-radius: 18px 18px 18px 4px; padding: 12px 14px; font-size: 15px; font-weight: 600; box-shadow: 0 4px 14px rgba(120,30,70,.08); }
.today .big { font-size: 28px; padding-right: 64px; }
.today .emoji { font-size: 52px; }
.today > div[style] { padding-right: 60px; }
.pava { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--pink-soft); border: 4px solid #fff; margin: 0 auto; box-shadow: 0 6px 16px rgba(232,60,122,.2); }
.cal summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.cal summary::-webkit-details-marker { display: none; }
.cal summary b::after { content: ' ▾'; color: var(--pink); }
.cal[open] summary { margin-bottom: 6px; }
.today-bar { height: 8px; background: rgba(255,255,255,.3); border-radius: 9px; overflow: hidden; margin-top: 12px; }
.today-bar i { display: block; height: 100%; background: #fff; border-radius: 9px; }
.wstrip { display: flex; gap: 6px; margin-top: 10px; }
.ws { flex: 1; text-align: center; background: var(--pink-bg); border-radius: 12px; padding: 6px 0; border: 2px solid transparent; }
.ws small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.ws span { font-size: 18px; font-weight: 800; }
.ws.done { background: var(--green); } .ws.done small, .ws.done span { color: #fff; }
.ws.now { border-color: var(--pink); }
.day.lock { opacity: .55; }
.install { border: 2px dashed var(--pink-2); }
.rec { font-size: 12px; font-weight: 700; color: #7A4B00; }
.demobar { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--dark); color: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.demobar .btn { flex: none; font-size: 13px; padding: 8px 12px; }
.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -120%); background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 600; z-index: 90; transition: transform .3s; max-width: 92vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.on { transform: translate(-50%, 0); }
.confbox { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confbox i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(720deg) translateX(40px); } }
.exthumb.big { width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px; }

/* ficha e player: vídeo com o músculo */
.vwrap { position: relative; }
.vwrap video { display: block; }
.muscle { position: absolute; left: 12px; bottom: 12px; background: #fff; border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 13px; box-shadow: 0 3px 10px rgba(0,0,0,.12); max-width: calc(100% - 24px); }
.muscle::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); margin-right: 6px; box-shadow: 0 0 0 3px #F9C9DC; vertical-align: 1px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(232,60,122,.15); } }
.sheet .muscle { left: 16px; bottom: 16px; }
.how { position: absolute; right: 12px; top: 12px; background: var(--dark); color: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 800; font-size: 13px; }

/* progresso */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: #fff; border-radius: 18px; padding: 12px 6px; text-align: center; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 92px; }
.stat b { font-size: 26px; font-weight: 900; color: var(--pink); line-height: 1; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat .ring { color: var(--dark); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { background: #fff; border-radius: 18px; padding: 12px 8px; text-align: center; display: grid; gap: 3px; justify-items: center; opacity: .55; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; box-shadow: 0 6px 16px rgba(232,60,122,.15); }
.badge span { font-size: 30px; }
.badge b { font-size: 12px; line-height: 1.2; }
.badge small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.recrow { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.recrow:last-child { border: 0; }
.recrow b { color: var(--pink); }

/* player v4 */
.player .segs { display: flex; gap: 4px; padding: 10px 16px 0; }
.player .segs i { flex: 1; height: 6px; border-radius: 9px; background: var(--line); }
.player .segs i.ok { background: var(--pink); }
.player .segs i.cur { background: var(--pink-2); }
.rest .segs i { background: #4A3842; } .rest .segs i.ok { background: var(--yellow); } .rest .segs i.cur { background: #B9962F; }
.player .head .small { font-size: 13px; text-align: center; flex: 1; }
.player .vwrap video { width: 100%; max-height: 38vh; aspect-ratio: 1; object-fit: cover; border-radius: 26px; background: var(--pink-soft); }
.setline { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.chip.pinkc { background: var(--pink); color: #fff; }
.bigring { position: relative; width: 210px; height: 210px; margin: 4px auto; flex: none; }
.bigring .ring { width: 210px; height: 210px; }
.bigring .arc { transition: stroke-dashoffset .9s linear; }
.bigtxt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rest .bigtxt { color: var(--yellow); }
.ctrls { display: flex; gap: 8px; }
.cbtn { flex: 1; background: #fff; color: var(--dark); border-radius: 14px; padding: 11px 6px; font-weight: 800; font-size: 14px; border: 2px solid var(--line); }
.cbtn[disabled] { opacity: .4; }
.cbtn.on { background: var(--yellow); }
.cbtn.add { flex: none; margin: -4px auto 0; padding: 6px 14px; }
.rest .cbtn { background: #3C2D35; color: #fff; border-color: #4A3842; }
.logbox { background: #3C2D35; border-radius: 18px; padding: 12px; display: grid; gap: 6px; }
.logbox small { color: #D9C6CF; }
.logbox small b { color: var(--yellow); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper button { width: 46px; height: 46px; border-radius: 50%; background: #fff; font-size: 26px; font-weight: 900; color: var(--dark); }
.stepper span { font-size: 40px; font-weight: 900; min-width: 64px; color: #fff; }
.nextcard { display: flex; gap: 12px; align-items: center; background: #3C2D35; border-radius: 18px; padding: 8px; text-align: left; }
.nextcard video { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--pink-soft); flex: none; }
.nextcard small { color: #D9C6CF; font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.nextcard b { display: block; color: #fff; }
.sumrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sumrow div { background: #fff; border-radius: 16px; padding: 10px 4px; display: grid; }
.sumrow b { font-size: 26px; font-weight: 900; color: var(--pink); }
.sumrow span { font-size: 12px; color: var(--muted); font-weight: 700; }
.newbadge { display: flex; gap: 12px; align-items: center; background: #FFF6D6; border: 2px solid #F5DD8A; border-radius: 18px; padding: 10px 14px; text-align: left; animation: pop .5s ease-out; }
.newbadge span { font-size: 34px; }
.newbadge small { font-size: 11px; font-weight: 800; color: #7A4B00; letter-spacing: .5px; }
.newbadge b { display: block; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } }
@media (max-height: 700px) { .bigring, .bigring .ring { width: 170px; height: 170px; } .bigtxt { font-size: 52px; } .player .vwrap video { max-height: 30vh; } }
