/* Z Gym — estilos. Escuro, limpo, pensado primeiro para o celular. */
:root {
  --bg: #0a0a0b;
  --s1: #121214;
  --s2: #18181b;
  --s3: #202024;
  --line: #26262b;
  --line2: #323238;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #6b6b74;
  --acc: #ff7a1a;
  --acc-2: #ffc233;
  --acc-ink: #1a0b00;
  --ok: #34d399;
  --danger: #ff5a5f;
  --radius: 16px;
  --radius-sm: 11px;
  --nav-h: 64px;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--s3); border: 1px solid var(--line2);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .12s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary {
  background: linear-gradient(180deg, #ff8f2e, #f25f00);
  border-color: transparent; color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 24px -10px rgba(255,110,0,.7);
}
.btn-ghost { background: transparent; border-color: var(--line2); }
.btn-danger { background: transparent; border-color: rgba(255,90,95,.35); color: var(--danger); }
.btn-lg { height: 52px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--muted); transition: background .2s, color .2s, transform .12s;
}
.icon-btn:active { transform: scale(.92); background: var(--s3); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip-btn {
  height: 30px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.08);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.chip-btn:active { background: rgba(255,255,255,.16); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea, .input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--s2); border: 1px solid var(--line); outline: none;
  font-size: 16px; /* 16px evita zoom automático no iPhone */
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--acc); background: var(--s1); box-shadow: 0 0 0 3px rgba(255,122,26,.15);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--dim); margin: -4px 0 14px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 0 0 10px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--dim); }
.pass-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.check { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }

/* ---------- Login ---------- */
.login {
  position: fixed; inset: 0; overflow: hidden auto;
  background:
    radial-gradient(120% 70% at 50% 32%, #1c0e04 0%, #0d0806 45%, #050505 100%);
  display: grid; place-items: center;
}
.login::after { /* grão sutil para o fundo não ficar chapado */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.login-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.login-flash { position: absolute; inset: 0; background: #fff6e0; opacity: 0; pointer-events: none; z-index: 3; }
.login.flash .login-flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.login.shake .login-inner { animation: shake .42s linear; }
@keyframes shake {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-6px,3px); } 20% { transform: translate(5px,-4px); }
  30% { transform: translate(-4px,-2px); } 40% { transform: translate(4px,3px); } 50% { transform: translate(-3px,2px); }
  60% { transform: translate(3px,-2px); } 70% { transform: translate(-2px,1px); } 80% { transform: translate(1px,-1px); }
}
.login-inner {
  position: relative; z-index: 2; width: min(380px, 100%); padding: 32px 22px calc(28px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center;
}
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 34px; }
.login-z {
  width: min(46vw, 190px); height: auto; overflow: visible;
  filter: drop-shadow(0 0 0 rgba(255,140,0,0));
  transform: scale(.72); opacity: 0;
  transition: transform .9s var(--ease), opacity .5s, filter .6s;
}
.login.charging .login-z { opacity: .9; transform: scale(.82); filter: blur(1px) brightness(.8); }
.login.powered .login-z {
  opacity: 1; transform: scale(1);
  filter: drop-shadow(0 0 18px rgba(255,140,0,.55)) drop-shadow(0 0 2px rgba(255,220,120,.9));
  transition: transform .5s cubic-bezier(.2,1.6,.4,1), opacity .2s, filter .3s;
}
.login-logo.zap .login-z { filter: drop-shadow(0 0 26px rgba(160,210,255,.9)) brightness(1.35); transition: none; }
.z-shine { transform: translateX(0); }
.login.powered .z-shine { animation: shine 5.5s 1.2s ease-in-out infinite; }
@keyframes shine { 0% { transform: translateX(0); } 22%,100% { transform: translateX(360px); } }
.login-word {
  margin-top: 6px; font-family: var(--display); font-size: clamp(34px, 10vw, 46px); letter-spacing: .32em; padding-left: .32em;
  line-height: 1; color: transparent;
  background: linear-gradient(180deg, #fff4b8 0%, #ffc21a 35%, #ff6a00 75%, #b8140b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1px rgba(255,210,90,.35);
  opacity: 0; transform: translateY(10px); transition: opacity .6s .35s, transform .8s .35s var(--ease), letter-spacing 1.2s .35s var(--ease);
}
.login.powered .login-word { opacity: 1; transform: none; }
.login-form {
  width: 100%; opacity: 0; transform: translateY(16px); transition: opacity .6s .6s, transform .7s .6s var(--ease);
}
.login.powered .login-form { opacity: 1; transform: none; }
.login-form .field input { background: rgba(20,16,14,.7); border-color: rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.login.leaving .login-inner { transition: opacity .35s, transform .45s var(--ease); opacity: 0; transform: scale(1.04); }

/* ---------- Primeiro acesso ---------- */
.first { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; }
.first-card { width: min(420px, 100%); }
.first-z { width: 64px; height: 60px; margin-bottom: 18px; }
.first h1 { font-size: 26px; margin-bottom: 6px; }
.first p.muted { margin: 0 0 24px; }

/* ---------- Estrutura do app ---------- */
.app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: rgba(10,10,11,.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.brand { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.brand-z { width: 30px; height: 28px; }
.brand span { font-family: var(--display); font-size: 19px; letter-spacing: .18em; color: #ffd27a; }
.topbar-title { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.topbar-title.show { opacity: 1; }
.top-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--s3); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--muted); flex-shrink: 0; border: 1px solid var(--line2); }
.top-avatar img { width: 100%; height: 100%; object-fit: cover; }

.view {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 18px 16px calc(var(--nav-h) + var(--safe-b) + 28px);
}
.view.enter { animation: viewIn .32s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(12,12,13,.9); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid rgba(255,255,255,.06);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font-size: 11px; font-weight: 600; position: relative; transition: color .2s; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { stroke: var(--acc); transform: translateY(-1px); }
.tabbar a::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--acc); transform: scaleX(0); transition: transform .3s var(--ease); }
.tabbar a.active::before { transform: scaleX(1); }

@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  .tabbar {
    top: calc(var(--top-h) + var(--safe-t)); bottom: 0; right: auto; width: 220px; height: auto; padding: 18px 12px;
    display: flex; flex-direction: column; gap: 4px; background: transparent; border-top: 0; border-right: 1px solid var(--line); backdrop-filter: none;
  }
  .tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 14px; height: 44px; padding: 0 14px; border-radius: 12px; }
  .tabbar a:hover { background: var(--s1); color: var(--text); }
  .tabbar a.active { background: var(--s2); }
  .tabbar a::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 3px; height: auto; transform: scaleY(0); }
  .tabbar a.active::before { transform: scaleY(1); }
  .view { padding-left: 236px; max-width: 1000px; padding-right: 16px; padding-bottom: 60px; }
  .restbar { left: 236px !important; }
}

/* ---------- Blocos de conteúdo ---------- */
.page-head { margin: 4px 0 18px; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 26px 0 10px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 16px; }
.stack > * + * { margin-top: 10px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; stroke: var(--dim); fill: none; stroke-width: 1.6; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; background: var(--s3); color: var(--muted); letter-spacing: .02em; }
.badge-acc { background: rgba(255,122,26,.14); color: #ffa15c; }
.badge-ok { background: rgba(52,211,153,.12); color: var(--ok); }
.badge-warn { background: rgba(255,194,51,.12); color: var(--acc-2); }
.badge-off { background: rgba(255,90,95,.12); color: var(--danger); }
.pressable { transition: transform .14s var(--ease), background .2s, border-color .2s; }
.pressable:active { transform: scale(.985); }
@media (hover: hover) { .pressable:hover { border-color: var(--line2); background: var(--s2); } }

/* Início */
.hello { font-size: 14px; color: var(--muted); }
.hello strong { display: block; font-size: 26px; color: var(--text); font-weight: 800; margin-top: 2px; }
.resume {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-top: 16px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(255,122,26,.16), rgba(255,122,26,.04)); border: 1px solid rgba(255,122,26,.3);
}
.resume .grow { flex: 1; min-width: 0; }
.resume small { display: block; color: #ffb27a; font-weight: 600; font-size: 12px; }
.hero {
  position: relative; overflow: hidden; margin-top: 16px; padding: 20px; border-radius: 20px;
  background: radial-gradient(140% 120% at 100% 0%, rgba(255,122,26,.22), transparent 55%), var(--s1);
  border: 1px solid var(--line);
}
.hero-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #ffa15c; }
.hero-main { display: flex; align-items: center; gap: 16px; margin: 10px 0 18px; }
.letter {
  font-family: var(--display); line-height: 1; color: transparent;
  background: linear-gradient(180deg, #fff4b8, #ffc21a 35%, #ff6a00 75%, #b8140b); -webkit-background-clip: text; background-clip: text;
}
.hero .letter { font-size: 76px; }
.hero h2 { font-family: var(--display); font-size: 34px; letter-spacing: .04em; font-weight: 400; line-height: 1; }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.week div { text-align: center; font-size: 11px; font-weight: 600; color: var(--dim); }
.week i { display: block; height: 34px; margin-top: 5px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); }
.week .on i { background: linear-gradient(180deg, #ff9a3c, #f25f00); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(255,110,0,.8); }
.week .today { color: var(--text); }
.week .today i { border-color: var(--line2); }
.week i { display: grid; place-items: center; }
.week i em { font-style: normal; font-family: var(--display); font-size: 17px; color: var(--text); letter-spacing: .02em; }
.week i em.zzz { font-family: Inter, sans-serif; font-size: 11px; font-weight: 800; color: #7c8cff; letter-spacing: .04em; font-style: italic; }
.week .on i em { color: #fff; }
.week .today { color: var(--acc); }
.week .today i { border-color: var(--acc); }
.section-row { display: flex; justify-content: space-between; align-items: baseline; }
.section-row .link { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--acc); font-size: 13px; }
.hero-rest { background: radial-gradient(140% 120% at 100% 0%, rgba(124,140,255,.18), transparent 55%), var(--s1); }
.hero-rest .hero-label { color: #9aa6ff; }
.zzz-big { font-family: var(--display); font-size: 54px; line-height: 1; color: #9aa6ff; font-style: italic; letter-spacing: .02em; }
.rest-next { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.rest-next b { color: var(--text); }
.sched { display: grid; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; }
.sched-row span { font-weight: 600; font-size: 14px; }
.sched-row select { height: 44px; padding: 0 12px; border-radius: 11px; background: var(--s2); border: 1px solid var(--line); outline: none; font-size: 15px; width: 100%; }
.sched-row select:focus { border-color: var(--acc); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.days { display: grid; gap: 10px; }
@media (min-width: 620px) { .days { grid-template-columns: 1fr 1fr; } }
.day {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--s1); border: 1px solid var(--line);
}
.day .letter { font-size: 40px; width: 38px; text-align: center; }
.day .grow { flex: 1; min-width: 0; }
.day h3 { font-size: 16px; font-weight: 700; }
.day p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.day.next { border-color: rgba(255,122,26,.45); }
.chev { width: 18px; height: 18px; stroke: var(--dim); fill: none; stroke-width: 2; flex-shrink: 0; }
details.guide { margin-top: 12px; }
details.guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 600; }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary svg { transition: transform .25s var(--ease); }
details.guide[open] summary svg { transform: rotate(90deg); }
.guide-body { padding: 0 16px 14px; color: var(--muted); font-size: 14px; }
.guide-body p { margin: 0 0 8px; }
.guide-body b { color: var(--text); }

/* Lista de exercícios do dia */
.ex-list { display: grid; gap: 8px; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.ex-row .grow { flex: 1; min-width: 0; }
.ex-row h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.ex-row p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.ex-idx { width: 22px; text-align: center; color: var(--dim); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.thumb { width: 58px; height: 58px; border-radius: 11px; overflow: hidden; background: #fff; flex-shrink: 0; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg { background: var(--s3); display: grid; place-items: center; }
.thumb.noimg svg { width: 24px; height: 24px; stroke: var(--dim); fill: none; stroke-width: 1.8; }
.thumb .play { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 6px; background: rgba(0,0,0,.65); display: grid; place-items: center; }
.thumb .play svg { width: 10px; height: 10px; fill: #fff; stroke: none; }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); margin-top: 18px; z-index: 5; }
@media (min-width: 900px) { .sticky-cta { bottom: 16px; } }

/* ---------- Sessão ---------- */
.sess-head { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 10; margin: -18px -16px 14px; padding: 12px 16px; background: rgba(10,10,11,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.sess-head-row { display: flex; align-items: center; gap: 12px; }
.sess-head h1 { font-size: 18px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--acc-2); font-size: 15px; }
.progress { height: 4px; border-radius: 4px; background: var(--s3); margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ff9a3c, #ffc233); transition: width .5s var(--ease); }
.saving { font-size: 12px; color: var(--dim); min-width: 52px; text-align: right; transition: opacity .3s; }

.xcard { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: border-color .3s; }
.xcard.complete { border-color: rgba(52,211,153,.35); }
.xcard-head { display: flex; align-items: center; gap: 12px; padding: 12px; }
.xcard-head .grow { flex: 1; min-width: 0; }
.xcard-head h3 { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.xcard-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.xcard .thumb { width: 50px; height: 50px; }
.prev-line { padding: 0 12px 8px; font-size: 12.5px; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.prev-line b { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.item-note { margin: 0 12px 10px; padding: 8px 10px; border-radius: 9px; background: var(--s2); font-size: 13px; color: var(--muted); }
.sets { padding: 0 8px 8px; }
.set-grid { display: grid; grid-template-columns: 30px 1fr 1fr 46px; gap: 6px; align-items: center; }
.base-load { display: flex; align-items: center; gap: 12px; margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.base-load label { flex: 1; font-weight: 700; font-size: 15px; }
.base-load small { display: block; font-size: 12px; font-weight: 500; color: var(--dim); }
.base-input { position: relative; width: 132px; }
.base-input input { width: 100%; height: 48px; padding: 0 38px 0 12px; border-radius: 11px; text-align: center; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--bg); border: 1px solid var(--line2); outline: none; transition: border-color .2s, box-shadow .2s; }
.base-input input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255,122,26,.15); }
.base-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 13px; font-weight: 700; pointer-events: none; }
.ex-obs { padding: 0 12px 12px; }
.ex-obs textarea { width: 100%; min-height: 40px; resize: none; overflow: hidden; padding: 10px 12px; border-radius: 11px; background: transparent; border: 1px dashed var(--line2);
  font-size: 14px; line-height: 1.4; outline: none; transition: border-color .2s, background .2s; }
.ex-obs textarea:focus { border-style: solid; border-color: var(--acc); background: var(--bg); }
.ex-obs textarea::placeholder { color: var(--dim); }
.set-row[data-pre] input { color: #c9c9cf; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.avatar-pick { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2px solid transparent; transition: transform .15s var(--ease), border-color .2s; background: var(--s3); }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick:active { transform: scale(.94); }
.avatar-pick.on { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255,122,26,.2); }
.avatar-grid figcaption { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.set-labels { padding: 0 4px 4px; font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.set-labels span { text-align: center; }
.set-row { padding: 4px; border-radius: 11px; transition: background .25s; }
.set-row.done { background: rgba(52,211,153,.08); }
.set-no { text-align: center; font-weight: 800; color: var(--dim); font-size: 14px; }
.set-row.done .set-no { color: var(--ok); }
.set-row input {
  width: 100%; height: 44px; border-radius: 10px; text-align: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--s2); border: 1px solid transparent; outline: none; transition: border-color .2s, background .2s;
  -moz-appearance: textfield;
}
.set-row input::-webkit-outer-spin-button, .set-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-row input::placeholder { color: #55555d; font-weight: 600; }
.set-row input:focus { border-color: var(--acc); background: var(--bg); }
.set-row.done input { background: transparent; }
.set-check {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--s3); color: var(--dim); transition: background .2s, color .2s, transform .15s var(--ease);
}
.set-check svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.set-check:active { transform: scale(.9); }
.set-row.done .set-check { background: var(--ok); color: #04210f; animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(1.12); } }
.set-actions { display: flex; gap: 8px; padding: 4px 4px 6px; }
.set-actions .btn-sm { background: transparent; border-color: var(--line); color: var(--muted); }

.restbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 25;
  border-radius: 16px; overflow: hidden; background: #1d1d21; border: 1px solid var(--line2);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); animation: slideUp .35s var(--ease);
}
@media (min-width: 900px) { .restbar { right: auto; width: 460px; bottom: 16px; } }
.restbar-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: rgba(255,122,26,.16); transform-origin: left; }
.restbar-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.restbar-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.restbar-time { font-size: 22px; font-variant-numeric: tabular-nums; margin-right: auto; min-width: 58px; }
.restbar.over .restbar-time { color: var(--ok); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Mídia ---------- */
.media { border-radius: var(--radius); overflow: hidden; background: #000; position: relative; }
.media video, .media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.demo { position: relative; background: #fff; aspect-ratio: 4 / 3; }
.demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.demo img + img { animation: demoflip 1.7s steps(1, end) infinite; }
@keyframes demoflip { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.demo-tag { position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 7px; background: rgba(0,0,0,.6); color: #fff; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); margin-bottom: 10px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--s3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.media-empty { padding: 34px 16px; text-align: center; color: var(--muted); background: var(--s1); border: 1px dashed var(--line2); border-radius: var(--radius); }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
@media (min-width: 560px) { .demo-grid { grid-template-columns: repeat(3, 1fr); } }
.demo-pick { border-radius: 12px; overflow: hidden; background: var(--s2); border: 2px solid transparent; text-align: left; transition: border-color .2s, transform .12s; }
.demo-pick:active { transform: scale(.97); }
.demo-pick.on { border-color: var(--acc); }
.demo-pick .demo { aspect-ratio: 4 / 3; }
.demo-pick .demo img + img { animation: none; opacity: 0; }
.demo-pick:hover .demo img + img, .demo-pick.on .demo img + img { animation: demoflip 1.7s steps(1, end) infinite; }
.demo-pick span { display: block; padding: 7px 8px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.demo-pick small { display: block; color: var(--dim); font-weight: 500; }
.upbar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; margin: 10px 0; }
.upbar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .2s; }

/* Gráfico e histórico */
.chart { width: 100%; height: 150px; display: block; }
.chart .line { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--bg); stroke: var(--acc); stroke-width: 2; }
.chart .lbl { fill: var(--dim); font-size: 11px; font-family: Inter, sans-serif; }
.hist-row { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row time { color: var(--muted); font-size: 13px; width: 74px; flex-shrink: 0; }
.hist-row .sets-txt { flex: 1; color: var(--text); font-variant-numeric: tabular-nums; word-spacing: 2px; }
.hist-row b { color: var(--acc-2); font-variant-numeric: tabular-nums; }
.sess-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.sess-date { width: 46px; text-align: center; flex-shrink: 0; }
.sess-date b { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.sess-date span { font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; }
.sess-row .grow { flex: 1; min-width: 0; }
.sess-row h3 { font-size: 15px; font-weight: 700; }
.sess-row p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.month { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: capitalize; margin: 22px 0 8px; }

/* Perfil */
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--s3); display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--muted); position: relative; flex-shrink: 0; border: 2px solid var(--line2); }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg .cam { position: absolute; inset: auto 0 0 0; height: 26px; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.avatar-lg .cam svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; }
.profile-top h1 { font-size: 22px; font-weight: 800; }
.profile-top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; word-break: break-all; }
.menu { overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); }
.menu > :last-child { border-bottom: 0; }
.menu svg.ic { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu .grow { flex: 1; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.user-row .top-avatar { width: 40px; height: 40px; }
.user-row .grow { flex: 1; min-width: 0; }
.user-row h3 { font-size: 15px; font-weight: 700; }
.user-row p { margin: 1px 0 4px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* Editor de plano */
.pday { margin-bottom: 14px; }
.pday-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.pday-head .letter { font-size: 30px; }
.pday-head h3 { flex: 1; font-size: 16px; font-weight: 700; }
.pitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.pitem .grow { flex: 1; min-width: 0; }
.pitem h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.pitem p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.pitem .icon-btn { width: 34px; height: 34px; }
.pday-foot { padding: 10px 12px; }

/* ---------- Painel inferior (sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--s1); border-top: 1px solid var(--line2); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .34s var(--ease);
}
.sheet.open .sheet-panel { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line2); margin: 2px auto 14px; }
.sheet h2 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.sheet .sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet-actions .btn { flex: 1; }
@media (min-width: 700px) {
  .sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: 20px; border: 1px solid var(--line2);
    transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .2s; padding-bottom: 20px; max-height: 86dvh; }
  .sheet.open .sheet-panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grip { display: none; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #26262b; border: 1px solid var(--line2); color: var(--text); padding: 11px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 14px 34px -10px rgba(0,0,0,.8); max-width: calc(100vw - 32px);
  transition: transform .3s var(--ease), opacity .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255,90,95,.5); }

.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--s1) 0%, var(--s2) 50%, var(--s1) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .demo img + img { animation: demoflip 1.7s steps(1, end) infinite !important; }
}

/* ---------- Sanfona dos treinos ---------- */
details.pday > summary { list-style: none; cursor: pointer; user-select: none; }
details.pday > summary::-webkit-details-marker { display: none; }
details.pday > summary .chev { transition: transform .25s var(--ease); }
details.pday[open] > summary .chev { transform: rotate(90deg); }
details.pday:not([open]) > summary { border-bottom: 0; }
.pday-head h3 small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }
details.pday[open] > summary ~ * { animation: viewIn .28s var(--ease); }

/* ---------- Escala semanal ---------- */
.week-card { padding: 16px; margin-bottom: 6px; }
.wc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wc-head h3 { font-size: 16px; font-weight: 800; }
.wc-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.wc-chips div { text-align: center; padding: 8px 0; border-radius: 11px; background: var(--s2); border: 1px solid var(--line); }
.wc-chips small { display: block; font-size: 11px; font-weight: 600; color: var(--dim); }
.wc-chips b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.2; }
.wc-chips .rest b { font-family: Inter, sans-serif; font-size: 12px; font-weight: 800; font-style: italic; color: #9aa6ff; line-height: 24px; }
.wc-chips .today { border-color: var(--acc); }
.wc-form { display: none; }
.week-card.editing .wc-form { display: block; }
.week-card.editing .wc-chips, .week-card.editing .period, .week-card.editing .wc-chips ~ .progress { display: none; }
.period { margin: 10px 0 6px; font-size: 13px; color: var(--muted); }
.period b { color: var(--text); }
.period.over { color: var(--acc-2); }

/* ---------- Stats do início ---------- */
.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .14s var(--ease), border-color .2s; }
.stat-btn:active { transform: scale(.97); }
@media (hover: hover) { .stat-btn:hover { border-color: var(--line2); } }
.stat-top { display: flex; align-items: center; gap: 6px; height: 30px; }
.stat-top b { font-size: 22px; }
.stat-top small { font-size: 12px; font-weight: 600; color: var(--muted); align-self: flex-end; margin-bottom: 3px; }
.stat-lvl .lvl-name { font-size: 14px; font-weight: 800; color: var(--lc); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl-ic { flex-shrink: 0; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lc, #fff) 35%, transparent)); }

/* Chama SSJ */
.ssj { position: relative; width: 20px; height: 28px; flex-shrink: 0; }
.ssj svg { width: 100%; height: 100%; display: block; overflow: visible; filter: grayscale(1) brightness(.45); }
.ssj.on svg { filter: drop-shadow(0 0 6px rgba(255,170,30,.75)); transform-origin: 50% 100%; animation: ssjFlick .42s ease-in-out infinite alternate; }
.ssj.on .f2 { transform-origin: 50% 100%; animation: ssjCore .3s ease-in-out infinite alternate; }
@keyframes ssjFlick { 0% { transform: scale(1, 1) skewX(0deg); } 50% { transform: scale(.94, 1.08) skewX(-3deg); } 100% { transform: scale(1.03, .96) skewX(3deg); } }
@keyframes ssjCore { from { transform: scaleY(.9); opacity: .75; } to { transform: scaleY(1.08); opacity: 1; } }
.ssj i { position: absolute; bottom: 4px; width: 1.5px; height: 9px; border-radius: 2px; background: linear-gradient(#fff3b0, rgba(255,160,0,0)); opacity: 0; }
.ssj.on i { animation: ssjRise 1.1s linear infinite; }
.ssj i:nth-of-type(1) { left: 1px; animation-delay: 0s; }
.ssj i:nth-of-type(2) { left: 9px; animation-delay: .4s; }
.ssj i:nth-of-type(3) { left: 18px; animation-delay: .75s; }
@keyframes ssjRise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-26px); opacity: 0; } }

/* Níveis */
.lvl-now { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); }
.lvl-now small { display: block; font-size: 12px; color: var(--dim); font-weight: 600; }
.lvl-now b { display: block; font-size: 20px; font-weight: 800; color: var(--lc); }
.lvl-now span { font-size: 13px; color: var(--muted); }
.lvl-list { display: grid; gap: 8px; }
.lvl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); opacity: .55; }
.lvl-row.got { opacity: 1; }
.lvl-row.cur { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 8%, transparent); }
.lvl-row b { display: block; font-size: 14.5px; }
.lvl-row span { font-size: 12.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ssj.on svg, .ssj.on .f2, .ssj.on i { animation: none !important; } .ssj.on i { opacity: 0; } }

/* Painel "Seus treinos" */
.tt { padding: 4px 14px; }
.tt-row { display: grid; grid-template-columns: 1fr 92px 92px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tt-row:last-child { border-bottom: 0; }
.tt-row span { font-weight: 600; }
.tt-row b { text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; }
.tt-head { padding: 8px 0; }
.tt-head small { text-align: right; font-size: 11.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
img.lvl-ic { object-fit: contain; }

/* ---------- Gymbro ---------- */
.mode-btn { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 16px; margin-bottom: 10px; border-radius: 16px;
  background: var(--s2); border: 1px solid var(--line2); transition: border-color .2s, transform .12s var(--ease); }
.mode-btn:active { transform: scale(.98); }
.mode-btn:disabled { opacity: .45; }
@media (hover: hover) { .mode-btn:not(:disabled):hover { border-color: var(--acc); } }
.mode-btn b { display: block; font-size: 16px; }
.mode-btn small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.mode-ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,122,26,.14); display: grid; place-items: center; flex-shrink: 0; }
.mode-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crew-card { margin: 0 0 12px; padding: 12px; border-radius: var(--radius); background: var(--s1); border: 1px solid var(--line); display: grid; gap: 10px; }
.crew-card.done p { margin: 0; font-size: 14px; }
.crew-card svg, .hist-crew svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -2px; margin-right: 4px; }
.crew-gym { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); }
.crew-gym span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-gym svg:first-child { stroke: var(--acc); }
.crew-with { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.crew-avs { display: inline-flex; }
.crew-avs .mini-av + .mini-av { margin-left: -8px; }
.mini-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--s3); border: 2px solid var(--s1); display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.mini-av img { width: 100%; height: 100%; object-fit: cover; }
.crew-avs.sm .mini-av { width: 20px; height: 20px; font-size: 8px; border-width: 1.5px; }
.crew-invite { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(255,122,26,.1); border: 1px solid rgba(255,122,26,.3); font-size: 14px; }
.crew-invite > span:not(.mini-av) { flex: 1; min-width: 0; line-height: 1.35; }
.crew-invite .mini-av { width: 34px; height: 34px; flex: none; }
.crew-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crew-actions:empty { display: none; }
.bro-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bro-row:last-child { border-bottom: 0; }
.bro-row .mini-av { width: 42px; height: 42px; font-size: 14px; }
.bro-row .grow { flex: 1; min-width: 0; }
.bro-row b { display: block; font-size: 15px; }
.bro-row small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-crew { display: flex; align-items: center; gap: 6px; margin-top: 4px !important; font-size: 12.5px !important; }

/* Início do treino */
.seg-sm { margin: 0; width: 132px; flex-shrink: 0; }
.seg-sm button { height: 30px; }
.seg button:disabled { opacity: .4; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); margin-bottom: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--acc); background: rgba(255,122,26,.07); }
.opt.dis { opacity: .45; cursor: default; }
.opt input { margin-top: 3px; accent-color: var(--acc); width: 18px; height: 18px; flex-shrink: 0; }
.opt b { display: block; font-size: 14.5px; }
.opt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.yn { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); }
.yn span { flex: 1; font-size: 14.5px; font-weight: 600; }
.start-note { margin: 0; padding: 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.start-note svg { width: 15px; height: 15px; fill: none; stroke: var(--acc); stroke-width: 2; vertical-align: -2px; margin-right: 6px; }
.privacy { display: flex; gap: 10px; margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line2); }
.privacy svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.9; margin-top: 1px; }
.privacy p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.link { color: var(--acc); font-weight: 600; }

/* Instalar app */
.install-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; }
.install-card img { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.install-card .grow { flex: 1; min-width: 0; }
.install-card b { display: block; font-size: 15.5px; }
.install-card small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.steps { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; }
.steps li::marker { color: var(--acc); font-weight: 800; }
.kbd { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 5px; border-radius: 7px; background: var(--s3); border: 1px solid var(--line2); vertical-align: -6px; font-weight: 800; }
.kbd svg { width: 15px; height: 15px; fill: none; stroke: #4c9dff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Aura dos níveis (streak e nível) ---------- */
/* Paleta por nível: --lc cor do nível, --f0/--f1/--f2 chama (base, meio, ponta), --spd velocidade */
.lvl-humano   { --f0: #ff6a00; --f1: #ffc233; --f2: #fff6c2; --spd: 7s; }
.lvl-namek    { --f0: #15803d; --f1: #4ade80; --f2: #dcfce7; --spd: 6s; }
.lvl-saiyajin { --f0: #ea580c; --f1: #fb923c; --f2: #ffedd5; --spd: 4.5s; }
.lvl-kaioshin { --f0: #9333ea; --f1: #facc15; --f2: #fef9c3; --spd: 5s; }
.lvl-majin    { --f0: #9f1239; --f1: #fb4f6f; --f2: #ffe4e6; --spd: 3.4s; }
.lvl-super    { --f0: #f59e0b; --f1: #fde047; --f2: #fffbeb; --spd: 2.4s; }

.lvl-fx { position: relative; overflow: hidden; isolation: isolate; border-color: transparent; }
.lvl-fx > :not(.fx-aura) { position: relative; z-index: 2; }
.fx-aura { position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; }
/* borda: faixa de luz girando em volta do cartão */
.lvl-fx::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(260%, 420px); aspect-ratio: 1; z-index: -2;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--lc) 35%, transparent) 76%, var(--lc) 86%, transparent 94%);
  animation: auraSpin var(--spd) linear infinite; }
.lvl-fx::after { content: ''; position: absolute; inset: 1.5px; z-index: -1; border-radius: calc(var(--radius, 14px) - 2px);
  background: radial-gradient(130% 85% at 50% 125%, color-mix(in srgb, var(--lc) 26%, transparent), transparent 62%), var(--s1);
  animation: auraBreathe calc(var(--spd) * .55) ease-in-out infinite alternate; }
.stat.lvl-fx::after { border-radius: 12px; }
.lvl-now.lvl-fx::after { background: radial-gradient(130% 85% at 50% 125%, color-mix(in srgb, var(--lc) 26%, transparent), transparent 62%), var(--s2); }
@keyframes auraSpin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(1turn); } }
@keyframes auraBreathe { from { opacity: .82; } to { opacity: 1; } }
.lvl-fx.lvl-humano::before { background: conic-gradient(from 0deg, transparent 0 80%, color-mix(in srgb, var(--lc) 40%, transparent) 92%, transparent 100%); }
.lvl-fx.off::before { animation: none; opacity: .25; }

/* faíscas de ki subindo */
.fx-aura i { position: absolute; bottom: -6px; width: 2px; height: 16px; border-radius: 2px; opacity: 0;
  background: linear-gradient(to top, transparent, var(--lc), #fff); filter: drop-shadow(0 0 3px var(--lc));
  animation: kiRise calc(var(--spd) * .42) ease-in infinite; }
.fx-aura i:nth-child(1) { left: 14%; animation-delay: 0s; }
.fx-aura i:nth-child(2) { left: 34%; animation-delay: .55s; height: 11px; }
.fx-aura i:nth-child(3) { left: 55%; animation-delay: 1.1s; }
.fx-aura i:nth-child(4) { left: 74%; animation-delay: .3s; height: 12px; }
.fx-aura i:nth-child(5) { left: 88%; animation-delay: .85s; }
@keyframes kiRise { 0% { transform: translateY(0); opacity: 0; } 18% { opacity: .9; } 100% { transform: translateY(-96px); opacity: 0; } }
.lvl-fx.off .fx-aura i { display: none; }

/* ícone do nível flutua com brilho da cor do nível */
.lvl-fx .lvl-ic { animation: lvlFloat calc(var(--spd) * .5) ease-in-out infinite alternate; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lc) 70%, transparent)); }
@keyframes lvlFloat { from { transform: translateY(1px) scale(1); } to { transform: translateY(-2px) scale(1.06); } }
.lvl-fx .lvl-name { text-shadow: 0 0 12px color-mix(in srgb, var(--lc) 45%, transparent); }

/* Kaioshin: brilho sagrado passando */
.lvl-kaioshin .fx-aura::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(254,243,199,.18), transparent); animation: holyShine 4.2s ease-in-out infinite; }
@keyframes holyShine { 0%, 55% { left: -50%; } 100% { left: 120%; } }
/* Majin: pulso escuro e irregular */
.lvl-majin.lvl-fx::after { animation: majinPulse 2.6s steps(1, end) infinite, auraBreathe 1.8s ease-in-out infinite alternate; }
@keyframes majinPulse { 0%, 100% { filter: none; } 46% { filter: brightness(1.25) saturate(1.3); } 48% { filter: none; } 52% { filter: brightness(1.15); } 54% { filter: none; } }
/* Super Saiyajin: aura dourada forte + raios azuis (SSJ2) */
.lvl-super.lvl-fx::before { background: conic-gradient(from 0deg, transparent 0 45%, rgba(253,224,71,.5) 62%, #fde047 78%, #fff 84%, transparent 92%); }
.lvl-super .fx-aura i { width: 2.5px; background: linear-gradient(to top, transparent, #fbbf24, #fffbeb); }
.lvl-super .ssj.on svg { filter: drop-shadow(0 0 8px rgba(253,224,71,.9)); animation-duration: .28s; }

@media (prefers-reduced-motion: reduce) {
  .lvl-fx::before, .lvl-fx::after, .fx-aura i, .fx-aura::after,   .fx-aura i, }

/* Stats do início: treinos + streak lado a lado, nível em faixa inteira */
.stats:has(.stat-lvl) { grid-template-columns: 1fr 1fr; }
.stat-lvl { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.stat-lvl .lvl-body { flex: 1; min-width: 0; }
.stat-lvl .lvl-body > span { display: block; font-size: 12px; color: var(--muted); }
.stat-lvl .lvl-name { display: block; font-size: 19px; font-weight: 800; color: var(--lc); margin: 1px 0 6px; }
.stat-lvl small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.lvl-bar { height: 5px; border-radius: 5px; background: var(--s3); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--lc) 60%, transparent), var(--lc));
  box-shadow: 0 0 8px var(--lc); }

/* ---------- Aura na foto do perfil ---------- */
.profile-top .av-wrap { position: relative; flex-shrink: 0; border-radius: 50%; }
.av-wrap.has-aura { padding: 5px; }
.av-wrap.has-aura::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 35%, color-mix(in srgb, var(--lc) 45%, transparent) 55%, var(--lc) 72%, #fff 76%, var(--lc) 80%, transparent 95%);
  animation: auraSpinPlain var(--spd, 4s) linear infinite; }
.av-wrap.has-aura::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--lc) 38%, transparent) 40%, transparent 70%);
  animation: auraBreathe calc(var(--spd, 4s) * .5) ease-in-out infinite alternate; }
.av-wrap.has-aura .avatar-lg { position: relative; z-index: 1; border-color: var(--bg); border-width: 3px; }
.av-wrap .fx-aura { inset: -14px -6px -4px; border-radius: 50%; overflow: visible; z-index: 2; }
.av-wrap .fx-aura i { bottom: 6px; animation-duration: calc(var(--spd, 4s) * .5); }
.av-wrap .av-wrap @keyframes auraSpinPlain { to { transform: rotate(1turn); } }
.av-wrap.lvl-majin::after { animation: majinPulse 2.6s steps(1, end) infinite, auraBreathe 1.8s ease-in-out infinite alternate; }

/* fotos pequenas (topo, listas): anel de brilho na cor do nível */
.top-avatar.has-aura, .mini-av.has-aura { overflow: visible; position: relative; border-color: var(--lc);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lc) 60%, transparent), 0 0 10px color-mix(in srgb, var(--lc) 70%, transparent);
  animation: auraRing calc(var(--spd, 4s) * .5) ease-in-out infinite alternate; }
.top-avatar.has-aura img, .mini-av.has-aura img { border-radius: 50%; }
@keyframes auraRing { from { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lc) 45%, transparent), 0 0 6px color-mix(in srgb, var(--lc) 45%, transparent); }
  to { box-shadow: 0 0 0 2px var(--lc), 0 0 14px var(--lc); } }
.crew-avs .mini-av.has-aura { z-index: 1; }

/* bloco de escolha */
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row > span { flex: 1; }
.switch-row b { display: block; font-size: 15px; }
.switch-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.switch { appearance: none; width: 48px; height: 28px; border-radius: 28px; background: var(--s3); border: 1px solid var(--line2); position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #d4d4d8; transition: transform .25s var(--ease), background .2s; }
.switch:checked { background: var(--acc); border-color: var(--acc); }
.switch:checked::after { transform: translateX(20px); background: #fff; }
.aura-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; transition: opacity .2s; }
.aura-grid.dim-all { opacity: .55; }
.aura-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: var(--s2);
  border: 1px solid var(--line); text-align: center; transition: border-color .2s, transform .12s var(--ease); }
.aura-pick:active:not(:disabled) { transform: scale(.96); }
.aura-pick b { font-size: 12.5px; color: var(--lc); line-height: 1.2; }
.aura-pick small { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.aura-pick.on { border-color: var(--lc); box-shadow: 0 0 0 1px var(--lc), 0 0 16px color-mix(in srgb, var(--lc) 35%, transparent); }
.aura-pick.locked { opacity: .45; }
.aura-pick.locked .lvl-ic { filter: grayscale(1); }
.aura-pick .lk { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .av-wrap.has-aura::before, .av-wrap.has-aura::after, .top-avatar.has-aura, .mini-av.has-aura { animation: none !important; } }
.av-wrap .fx-aura::after { display: none; }

/* ---------- Perfil: cartão do topo com fundo animado ---------- */
.profile-hero { position: relative; margin: -4px 0 16px; padding: 18px 16px; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: var(--s1); border: 1px solid var(--line); }
.profile-hero .profile-top { margin: 0; position: relative; z-index: 2; }
.profile-hero .grow { min-width: 0; }
.profile-hero.bg-on { border-color: color-mix(in srgb, var(--lc) 35%, var(--line)); }
.hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.profile-hero.bg-on::before { content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 90% at 20% 110%, color-mix(in srgb, var(--lc) 32%, transparent), transparent 60%),
              linear-gradient(160deg, color-mix(in srgb, var(--lc) 10%, transparent), transparent 55%); }
.hero-fx .blob { position: absolute; width: 180px; height: 180px; border-radius: 50%; filter: blur(38px); opacity: .5;
  background: var(--lc); mix-blend-mode: screen; }
.hero-fx .b1 { left: -40px; bottom: -90px; animation: blobA calc(var(--spd, 4s) * 2.2) ease-in-out infinite alternate; }
.hero-fx .b2 { right: -60px; top: -110px; width: 150px; height: 150px; opacity: .3; animation: blobB calc(var(--spd, 4s) * 2.8) ease-in-out infinite alternate; }
@keyframes blobA { from { transform: translate(0, 0) scale(1); } to { transform: translate(120px, -30px) scale(1.25); } }
@keyframes blobB { from { transform: translate(0, 0) scale(1); } to { transform: translate(-90px, 40px) scale(.85); } }
.hero-fx .fx-aura i { height: 22px; animation-duration: calc(var(--spd, 4s) * .55); }
.hero-fx .fx-aura i:nth-child(1) { left: 8%; } .hero-fx .fx-aura i:nth-child(2) { left: 27%; }
.hero-fx .fx-aura i:nth-child(3) { left: 51%; } .hero-fx .fx-aura i:nth-child(4) { left: 70%; } .hero-fx .fx-aura i:nth-child(5) { left: 92%; }
@keyframes kiRiseTall { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .85; } 100% { transform: translateY(-170px); opacity: 0; } }
.hero-fx .fx-aura i { animation-name: kiRiseTall; }
.hero-fx .hero-fx .lvl-majin .hero-fx .blob { animation-timing-function: steps(24); }

/* selo do nível atual */
.lvl-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px 4px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--lc) 14%, var(--s2)); border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent); cursor: pointer; }
.lvl-badge span { font-size: 13px; font-weight: 800; color: var(--lc); }
.lvl-badge small { font-size: 12px; color: var(--muted); font-weight: 600; }
.lvl-badge .lvl-ic { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--lc) 60%, transparent)); }

/* voltar nas subtelas do perfil */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; margin: -4px 0 10px; }
.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (prefers-reduced-motion: reduce) { .hero-fx .blob { animation: none !important; } }

/* ---------- Super Saiyajin (canvas: chamas + raios) ---------- */
.fx-canvas-el { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.av-wrap .fx-canvas { inset: -26px; z-index: 0; }
.lvl-super.lvl-fx::before { background: conic-gradient(from 0deg, rgba(255,200,40,.25) 0 30%, #ffd84a 45%, #fff6c8 50%, #ffd84a 55%, rgba(255,200,40,.25) 70% 100%);
  animation-duration: 1.6s; }
.lvl-super.lvl-fx::after { background: radial-gradient(140% 100% at 50% 130%, rgba(255,190,30,.42), rgba(255,140,0,.12) 45%, transparent 70%), #151208;
  animation: auraBreathe .9s ease-in-out infinite alternate; }
.lvl-super .lvl-name, .lvl-super .stat-top b { text-shadow: 0 0 10px rgba(255,210,60,.75), 0 0 2px #fff3b0; }
/* clarão quando cai um raio */
.lvl-fx.zap::after { filter: brightness(1.9) saturate(1.2); }
.profile-hero.zap::before { filter: brightness(2); }
.av-wrap.zap::after { filter: brightness(2); }
.av-wrap.zap .avatar-lg { filter: brightness(1.15); }
.lvl-fx::after, .profile-hero::before, .av-wrap::after { transition: filter .1s; }
.lvl-super.lvl-fx span, .lvl-super.lvl-fx small, .lvl-super .lvl-body > span { color: #f4f0dc; text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 0 8px rgba(0,0,0,.8); }
.profile-hero.lvl-super .profile-top p, .profile-hero.lvl-super h1 { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.7); }

/* Modo demonstração (usuário de teste) */
.demo-card { margin-top: 12px; border-style: dashed; }
.demo-head b { display: block; font-size: 15px; }
.demo-head small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.demo-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.demo-levels button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: 11px; background: var(--s2);
  border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--lc); transition: border-color .2s, transform .12s var(--ease); }
.demo-levels button:active { transform: scale(.96); }
.demo-levels button.on { border-color: var(--lc); box-shadow: 0 0 0 1px var(--lc), 0 0 14px color-mix(in srgb, var(--lc) 35%, transparent); }
/* Majin: estalos pequenos também clareiam o cartão */
.lvl-majin.lvl-fx.zap::after { filter: brightness(1.4) saturate(1.3); }

/* Alongamentos */
.badge-stretch { background: rgba(96,165,250,.14); color: #7cb8ff; }
.set-grid.stretch { grid-template-columns: 30px 1fr 46px; }
.stretch-dur { height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--s2); font-weight: 700; font-size: 16px; color: var(--muted); }
.set-row.done .stretch-dur { background: transparent; color: var(--text); }
.xcard.is-stretch { border-color: rgba(96,165,250,.22); }
.xcard h3 .badge { vertical-align: 2px; margin-left: 4px; }

/* Botões lado a lado que não podem alargar a tela no celular */
.media-actions .btn { min-width: 0; white-space: normal; height: auto; min-height: 44px; padding: 8px 10px; line-height: 1.2; }
.row2 > *, .row3 > * { min-width: 0; }
.page-head-row > div:first-child { min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.head-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Divisão do plano (A B C D E) em texto normal */
.split { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.split span { min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px; display: inline-grid; place-items: center;
  background: var(--s3); border: 1px solid var(--line2); font-size: 13px; font-weight: 700; color: var(--text); }

/* Papéis e ficha do usuário */
.badge-dev { background: linear-gradient(90deg, rgba(255,194,51,.22), rgba(255,122,26,.22)); color: #ffd27a; }
.us-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.us-plan { padding: 4px 14px 12px; }
.us-plan-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.us-plan-row small { display: block; font-size: 12px; color: var(--muted); }
.us-plan-row b { display: block; font-size: 15px; }
.us-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.protected-note { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255,194,51,.08); border: 1px solid rgba(255,194,51,.3); color: var(--acc-2); font-size: 14px; margin: 0 0 12px; }
.protected-note svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; }
.pick-list { overflow: hidden; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.pick-row:last-child { border-bottom: 0; }
.pick-row b { display: block; font-size: 15px; }

/* Plano compartilhado */
.plan-meta { margin: 6px 0 0 !important; font-size: 12.5px !important; }
.plan-members { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; font-size: 13.5px; color: var(--muted); }
.plan-members b { color: var(--text); }
.pick-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--acc); flex-shrink: 0; }
.pick-row small { display: block; font-size: 12.5px; }
label.pick-row { cursor: pointer; }
