/* MyShape: mobile first, escuro por padrão, claro automático conforme o sistema. */
:root {
  color-scheme: dark light;
  --bg: #090b0e;
  --surface: #12161c;
  --surface2: #1a2028;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f5f7;
  --muted: #9aa5b1;
  --accent: #c8ff3d;
  --accent-ink: #0b1200;
  --accent-text: #c8ff3d;
  --accent-soft: rgba(200, 255, 61, .12);
  --glow: rgba(200, 255, 61, .09);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .12);
  --warn: #ffb84d;
  --nav-bg: rgba(12, 15, 19, .86);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --nav-h: 66px;
  --r: 20px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface2: #eef1f5;
    --line: rgba(10, 20, 30, .09);
    --text: #0d1117;
    --muted: #5b6672;
    --accent-text: #3c7a00;
    --accent-soft: rgba(120, 190, 0, .14);
    --glow: rgba(150, 220, 20, .16);
    --danger: #d83a3a;
    --danger-soft: rgba(216, 58, 58, .1);
    --warn: #b36b00;
    --nav-bg: rgba(255, 255, 255, .88);
    --shadow: 0 10px 30px rgba(20, 40, 60, .12);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 38% at 85% -8%, var(--glow), transparent 70%);
}
body.lock { overflow: hidden; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.ico { width: 22px; height: 22px; flex: none; }

#app {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto; min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 8px) 20px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}
body.no-nav #app { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
body.no-nav.has-timer #app { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.has-timer:not(.no-nav) #app { padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom)); }

.screen { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; }
.enter { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.boot, .boot-screen { text-align: center; color: var(--muted); }
.boot-screen { align-items: center; justify-content: center; min-height: 70dvh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent-text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tipografia ---------- */
.top { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.top h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.025em; font-weight: 800; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.pad { padding: 8px 2px; }
.accent { color: var(--accent-text); }
.sec-title { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 6px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 22px; width: 100%;
  border: 0; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 750; font-size: 17px; text-decoration: none;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 42px; width: auto; padding: 0 16px; font-size: 15px; border-radius: 13px; }
.btn.danger-text, .danger-text { color: var(--danger); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; white-space: nowrap; }
.btn-row .btn.grow2 { flex: 1.7; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.link-btn { background: none; border: 0; padding: 10px 0 2px; font-size: 14px; font-weight: 600; text-align: left; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.card-title { font-size: 15px; font-weight: 700; }
.badge {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 750;
}
.badge.abandonado { background: var(--danger-soft); color: var(--danger); }
.badge.concluido { background: var(--accent-soft); }
.err { color: var(--danger); font-size: 14px; min-height: 0; }
.err:empty { display: none; }

/* ---------- login ---------- */
.login { justify-content: center; min-height: 92dvh; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.hero { font-size: clamp(36px, 11vw, 52px); line-height: 1.02; letter-spacing: -.035em; font-weight: 850; }
.sub { color: var(--muted); font-size: 17px; max-width: 34ch; }
.login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.input, .search {
  width: 100%; min-height: 54px; padding: 0 16px; font-size: 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--text);
}
.input::placeholder, .search::placeholder, .num-input::placeholder, .set-input::placeholder { color: var(--muted); opacity: .8; }
.input:focus, .search:focus, .num-input:focus, .set-input:focus { outline: none; border-color: var(--accent-text); }

/* ---------- navegação ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--nav-bg); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-in { max-width: 560px; margin: 0 auto; display: flex; height: var(--nav-h); }
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 650; position: relative;
}
.nav-btn[aria-current="page"] { color: var(--accent-text); }
.nav-btn[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent-text);
}
body.no-nav .nav { display: none; }

/* ---------- hoje ---------- */
.empty { align-items: center; text-align: center; padding: 28px 22px; }
.empty-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.empty-ico .ico { width: 30px; height: 30px; }
.empty h2 { font-size: 22px; letter-spacing: -.02em; }
.goal-card { gap: 16px; }
.gc-top { display: flex; justify-content: space-between; gap: 10px; }
.progress { flex: 1; height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.progress.thick { flex: none; height: 10px; }
.progress-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .5s ease; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-v { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12px; color: var(--muted); }
.banner { border-color: var(--warn); }
.phase { gap: 8px; }
.phase-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phase.deload .badge { background: rgba(255, 184, 77, .16); color: var(--warn); }
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-card {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: left;
}
.day-card.next { border-color: var(--accent-text); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.day-letter { width: 44px; height: 44px; border-radius: 14px; background: var(--surface2); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--accent-text); flex: none; }
.day-card.done .day-letter { background: var(--accent); color: var(--accent-ink); }
.day-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.day-title { font-weight: 700; }
.day-sub { font-size: 13px; color: var(--muted); }

/* ---------- exercícios ---------- */
.ex-list { display: flex; flex-direction: column; gap: 10px; }
.ex { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ex-main, .lib-item, .more-row {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px;
  background: none; border: 0; text-align: left; width: 100%;
}
.ex-num { width: 36px; height: 36px; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; font-weight: 800; color: var(--accent-text); flex: none; }
.ex-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ex-name { font-weight: 700; }
.ex-sub { font-size: 13px; color: var(--muted); }
.rx { color: var(--text); font-weight: 800; }
.ex-rest {
  width: 74px; flex: none; border: 0; border-left: 1px solid var(--line); background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
}
.ex-rest .ico { width: 20px; height: 20px; color: var(--accent-text); }
.note-card { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.note-card b { color: var(--text); }
.sticky-cta { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); padding-top: 8px; }
.sticky-cta .btn { box-shadow: var(--shadow); }

/* ---------- registro do treino ---------- */
.sess-ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sess-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sess-name { font-size: 18px; letter-spacing: -.01em; }
.hint { font-size: 13px; color: var(--muted); background: var(--surface2); padding: 10px 12px; border-radius: 12px; }
.set-head, .set-row { display: grid; grid-template-columns: 34px 1fr 1fr 48px; gap: 8px; align-items: center; }
.set-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 0 2px; }
.set-head span:nth-child(2), .set-head span:nth-child(3) { text-align: center; }
.set-n { width: 30px; height: 30px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.set-input {
  width: 100%; min-height: 48px; text-align: center; font-size: 18px; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 13px; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.set-check { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); display: grid; place-items: center; }
.set-check.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.set-actions { display: flex; gap: 8px; }
.q-foot { padding-top: 6px; }

/* ---------- progresso ---------- */
.chart { width: 100%; height: auto; display: block; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-label { fill: var(--muted); font-size: 10px; }
.c-exp { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 5; }
.c-today { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.c-act { stroke: var(--accent-text); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--accent-text); stroke: var(--surface); stroke-width: 2; }
.c-goal { fill: none; stroke: var(--accent-text); stroke-width: 2.5; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.lg::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.lg.act::before { background: var(--accent-text); }
.lg.exp::before { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); }
.insight { font-size: 14px; padding: 12px 14px; background: var(--accent-soft); border-radius: 14px; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 120px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.bar-track { flex: 1; width: 100%; background: var(--surface2); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill { display: block; width: 100%; height: 0; background: var(--muted); border-radius: 6px; transition: height .4s ease; }
.bar-col.full .bar-fill { background: var(--accent); }
.bar-col.future { opacity: .45; }
.bar-col.now .bar-n { color: var(--accent-text); font-weight: 800; }
.bar-n { font-size: 10px; color: var(--muted); }

/* ---------- listas e histórico ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.hist-item { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.hist-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hist-item details summary { list-style: none; cursor: pointer; }
.hist-item details summary::-webkit-details-marker { display: none; }
.hist-sets { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.delta { margin-left: 8px; font-size: 13px; font-weight: 700; }
.delta.down { color: var(--accent-text); }
.delta.up { color: var(--warn); }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.seg-btn { flex: 1; min-height: 40px; border: 0; background: none; border-radius: 12px; font-weight: 650; font-size: 14px; color: var(--muted); }
.seg-btn[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 10px; border-radius: 999px; background: var(--surface2); font-size: 12px; font-weight: 650; color: var(--muted); }
.tag.strong { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- mais / biblioteca ---------- */
.more-row { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.more-ico { width: 40px; height: 40px; border-radius: 13px; background: var(--surface2); display: grid; place-items: center; color: var(--accent-text); flex: none; }
.more-row.danger-text .more-ico { color: var(--danger); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 650; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.lib-list { display: flex; flex-direction: column; gap: 8px; }
.lib-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }

/* ---------- questionário ---------- */
.quiz-top { display: flex; align-items: center; gap: 14px; }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.q-title { font-size: 30px; line-height: 1.08; letter-spacing: -.03em; font-weight: 850; margin-top: 8px; }
.q-hint { color: var(--muted); }
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.opt {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px;
  transition: border-color .15s, background .15s, transform .1s;
}
.opt:active { transform: scale(.985); }
.opt-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt-t { font-size: 17px; font-weight: 700; }
.opt-d { font-size: 14px; color: var(--muted); }
.opt-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.opt-check .ico { width: 16px; height: 16px; }
.opt[aria-pressed="true"] { border-color: var(--accent-text); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.opt[aria-pressed="true"] .opt-check { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.num-wrap { display: flex; align-items: baseline; gap: 10px; padding: 18px 4px; border-bottom: 2px solid var(--line); }
.num-input { flex: 1; min-width: 0; background: none; border: 0; font-size: 56px; font-weight: 850; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.num-input:focus { outline: none; }
.unit { font-size: 22px; color: var(--muted); font-weight: 700; }
.summary { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row dt { color: var(--muted); font-size: 14px; }
.sum-row dd { font-weight: 650; text-align: right; font-size: 15px; }
.pace { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); font-size: 14px; }
.pace.warn { background: rgba(255, 184, 77, .14); }
.pace.high { background: var(--danger-soft); }

/* ---------- folhas, avisos, cronômetro ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.overlay.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 28px 28px 0 0; padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(28px); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.overlay.open .sheet { transform: none; }
.sheet-head { position: sticky; top: -10px; display: flex; justify-content: center; align-items: center; padding: 6px 0 4px; margin: 0 -22px; background: var(--surface); }
.sheet-head .icon-btn { position: absolute; right: 16px; top: 4px; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-title { font-size: 24px; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 6px; padding-right: 40px; }
.ex-sheet { display: flex; flex-direction: column; gap: 10px; }
.ex-sheet h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding-left: 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.callout { padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); font-size: 15px; }
.confirm { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 650; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.more-fields summary { cursor: pointer; font-weight: 650; padding: 8px 0; color: var(--accent-text); }

.toast {
  position: fixed; left: 50%; z-index: 80; transform: translate(-50%, 12px); opacity: 0;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 650; font-size: 14px;
  max-width: calc(100% - 40px); text-align: center; transition: opacity .2s, transform .2s; box-shadow: var(--shadow);
}
body.no-nav .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
body.has-timer .toast { bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
body.no-nav.has-timer .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.timer {
  position: fixed; left: 12px; right: 12px; z-index: 50; margin: 0 auto; max-width: 536px;
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 8px; padding: 10px 12px 10px 18px;
  background: var(--accent); color: var(--accent-ink); border-radius: 20px; box-shadow: var(--shadow);
}
body.no-nav .timer { bottom: calc(14px + env(safe-area-inset-bottom)); }
.timer.on { display: flex; }
.timer-info { flex: 1; display: flex; flex-direction: column; line-height: 1.1; }
.timer-label { font-size: 12px; font-weight: 700; opacity: .75; }
.timer-time { font-size: 30px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-btn { min-width: 46px; height: 46px; border-radius: 14px; border: 0; background: rgba(0, 0, 0, .12); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; }
.timer.ring { animation: ring .5s ease 3; }
@keyframes ring { 50% { transform: scale(1.03); } }

/* ---------- imagem do exercício (acordeão) ---------- */
.accordion { background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.accordion summary {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 18px;
  font-weight: 750; font-size: 17px; cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary span:nth-of-type(1) { flex: 1; text-align: center; }
.accordion .chev { width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s; flex: none; }
.accordion[open] .chev { transform: rotate(-135deg); margin-top: 4px; }
.anim { position: relative; aspect-ratio: 3 / 2; background: var(--surface); }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.anim img:nth-child(2) { animation: flip 1.8s ease-in-out infinite alternate; }
@keyframes flip { 0%, 35% { opacity: 0; } 65%, 100% { opacity: 1; } }
.acc-note { padding: 10px 16px 14px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .anim { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .anim img { position: static; height: auto; aspect-ratio: 3 / 2; }
  .anim img:nth-child(2) { animation: none !important; opacity: 1; }
  .acc-note { display: none; }
}

/* ---------- medidas ---------- */
.measures { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mlabel { color: var(--muted); font-size: 14px; }
.mval { font-weight: 700; font-variant-numeric: tabular-nums; }
.mrow .delta { margin-left: 0; text-align: right; }

/* ---------- fotos ---------- */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumb-btn { display: block; padding: 0; border: 0; background: var(--surface2); border-radius: 12px; overflow: hidden; width: 100%; }
.thumb, .cmp-img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface2); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-item { position: relative; display: block; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface2); }
.grid-date { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font-size: 11px; font-weight: 700; color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cmp-fig figcaption { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.photo-big { display: block; width: 100%; max-height: 62dvh; object-fit: contain; border-radius: 16px; background: var(--surface2); }
.preview img { display: block; width: 100%; max-height: 46dvh; object-fit: contain; border-radius: 16px; background: var(--surface2); }
.preview:empty { display: none; }
.tips { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: disc; color: var(--muted); font-size: 14px; }
.nudge { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
.nudge-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.nudge-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nudge .btn { width: auto; flex: none; }
.sticky-cta.nav-offset { bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (min-width: 600px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 28px; max-height: 84dvh; }
}
