/* Treino: preto profundo, laranja em degradê, cards arredondados e barras de traços */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(fonts/sora-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/dm-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/dm-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --bg: #0a0a0b; --s1: #121214; --s2: #1a1a1d; --s3: #242428;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --tx: #f5f5f6; --mute: #8e8e96;
  --acc: #ff6a2b; --acc-grad: linear-gradient(135deg, #ff9a4a 0%, #ff5a1f 100%);
  --acc-tx: #1c0a03; --acc-soft: rgba(255,106,43,.10); --acc-line: rgba(255,106,43,.5);
  --ok: #4ade80; --bad: #ff5d5d; --warn: #ffb020;
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --nav: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --gl: max(18px, env(safe-area-inset-left, 0px)); --gr: max(18px, env(safe-area-inset-right, 0px));
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background-color: var(--bg); color: var(--tx); font: 15px/1.45 var(--font); }
body { min-height: 100dvh; overscroll-behavior-y: none; background-repeat: no-repeat;
  background-image: radial-gradient(90% 38% at 50% -6%, rgba(255,106,43,.14), transparent 70%); }
#app { max-width: 560px; margin: 0 auto; padding: calc(18px + var(--safe-t)) var(--gr) calc(var(--nav) + var(--safe-b) + 28px) var(--gl); }
body.no-tabs #app { padding-bottom: calc(28px + var(--safe-b)); }
body.in-workout #app { padding-bottom: calc(112px + var(--safe-b)); }
h1 { font-size: 30px; line-height: 1.1; font-weight: 700; margin: 4px 0 6px; letter-spacing: -.035em; }
h2 { font-size: 17px; font-weight: 600; margin: 26px 0 12px; letter-spacing: -.02em; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
.mute { color: var(--mute); } .small { font-size: 13px; } .center { text-align: center; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.ic { display: inline-grid; place-items: center; }
.ic svg, .round svg, .chk svg, .btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* Cards */
.card { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)), var(--s1);
  border: 1px solid var(--line); border-radius: 26px; padding: 18px; }
.card + .card { margin-top: 12px; }
.card.hero { background: linear-gradient(135deg, #ff9a4a 0%, #ff5a1f 100%); border: 0; color: #fff; position: relative;
  overflow: hidden; padding: 20px; box-shadow: 0 22px 50px -22px rgba(255,90,31,.7); }
.card.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 80% at 100% 0%, rgba(255,255,255,.3), transparent 62%); }
.card.hero > * { position: relative; z-index: 1; }
.hero .mute { color: rgba(255,255,255,.88); font-weight: 500; }
.hero .tag { background: rgba(255,255,255,.22); color: #fff; }
.hero .big { font-size: 46px; letter-spacing: -.05em; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cards2 .card + .card { margin-top: 0; }
.stat { padding: 16px; } .stat .v { font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.stat .k { color: var(--mute); font-size: 12px; margin-top: 4px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: var(--s3); color: var(--tx); }
.tag.acc { background: var(--acc-grad); color: var(--acc-tx); }
.big { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }

/* Botões */
.btn { appearance: none; border: 0; border-radius: 99px; background: var(--s3); color: var(--tx); font: inherit; font-weight: 600;
  min-height: 56px; padding: 0 22px; width: 100%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: scale(.98); }
.btn.acc { background: var(--acc-grad); color: var(--acc-tx); box-shadow: 0 14px 30px -12px rgba(255,90,31,.7); }
.btn.dark { background: #0a0a0b; color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); }
.btn.line { background: var(--acc-soft); border: 1.5px solid var(--acc-line); }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid rgba(255,93,93,.35); }
.btn.sm { min-height: 40px; width: auto; padding: 0 16px; font-size: 13px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.round { appearance: none; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--tx); display: grid; place-items: center; cursor: pointer; padding: 0; }
.round[disabled] { opacity: .3; pointer-events: none; }
.hero .round { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.25); color: #fff; }

/* Formulário */
label.f { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 6px; }
input, select, textarea { width: 100%; min-height: 54px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--s2); color: var(--tx); font: inherit; padding: 10px 16px; }
input:focus, select:focus, textarea:focus { outline: 1.5px solid var(--acc-line); outline-offset: 0; }
input::placeholder { color: #5f5f66; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.statbox { background: var(--s2); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; }
.statbox b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.statbox span { display: block; color: var(--mute); font-size: 11px; margin-top: 2px; }

/* Barra flutuante de abas */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 20;
  width: min(calc(100% - var(--gl) - var(--gr)), 440px); display: flex; gap: 2px; padding: 6px;
  background: rgba(22,22,25,.84); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: 99px; box-shadow: 0 20px 44px -14px rgba(0,0,0,.9); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; border-radius: 99px;
  color: var(--mute); text-decoration: none; font-size: 10.5px; font-weight: 600; }
.tabs a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { background: rgba(255,255,255,.08); color: var(--acc); }

/* Abas segmentadas */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 5px; scrollbar-width: none; background: var(--s1);
  border: 1px solid var(--line); border-radius: 99px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 auto; min-width: 54px; padding: 11px 18px; border-radius: 99px; background: transparent; color: var(--mute);
  border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--acc-grad); color: var(--acc-tx); }

/* Listas */
.list > .item { display: flex; gap: 12px; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.item .dot { flex: none; width: 42px; height: 42px; border-radius: 14px; background: var(--acc-soft); color: var(--acc);
  display: grid; place-items: center; font-weight: 700; font-family: var(--mono); }
.chev { color: var(--mute); display: inline-grid; place-items: center; }
.chev svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--s1); border: 1px solid var(--line);
  border-radius: 22px; cursor: pointer; }
.ex-row + .ex-row { margin-top: 8px; }
.ex-row .ix { flex: none; width: 46px; height: 46px; border-radius: 16px; background: var(--acc-soft); color: var(--acc);
  display: grid; place-items: center; font: 500 16px var(--mono); }
.ex-row .nm { font-weight: 600; letter-spacing: -.01em; }

/* Barras de traços */
.ticks { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.ticks i { flex: 1; max-width: 6px; height: 100%; border-radius: 3px; background: rgba(255,255,255,.14); }
.ticks i.on { background: #fff; }
.hero .ticks i { background: rgba(255,255,255,.34); } .hero .ticks i.on { background: #fff; }
.vols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 16px; }
.vols .ticks { height: 40px; gap: 2px; } .vols .ticks i { max-width: none; }
.vols .g0 i.on { background: var(--acc); } .vols .g1 i.on { background: #fff; } .vols .g2 i.on { background: #6c6c74; }
.vols .nm { font-size: 12px; color: var(--mute); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.vols .nm b { color: var(--tx); font-weight: 600; text-transform: capitalize; }
.vols .sub { font-size: 11.5px; color: var(--mute); }

/* Semana */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.day { border-radius: 16px; padding: 9px 0 10px; text-align: center; background: var(--s2); color: var(--mute);
  font-size: 11px; font-weight: 600; display: grid; gap: 6px; justify-items: center; }
.day .n { font: 500 13px var(--mono); color: var(--tx); }
.day.done { background: var(--acc-grad); color: rgba(28,10,3,.75); }
.day.done .n { color: var(--acc-tx); }
.day.today:not(.done) { outline: 1.5px solid var(--acc-line); }
.day svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Treino em andamento */
.wk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.wk-mid { display: grid; justify-items: center; gap: 4px; }
.segs { display: flex; gap: 4px; margin: 0 0 18px; }
.segs i { flex: 1; height: 4px; border-radius: 4px; background: var(--s3); }
.segs i.done { background: var(--acc); } .segs i.cur { background: #fff; }
.ex-name { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.04em; margin: 10px 0 6px; }
.hint { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; font-size: 13.5px; }
.hint b { color: var(--acc); font-weight: 600; }
.set { display: grid; grid-template-columns: 30px 1fr 1fr 46px; gap: 8px; align-items: center; padding: 8px 8px 8px 12px;
  background: var(--s1); border: 1px solid var(--line); border-radius: 26px; }
.set + .set { margin-top: 8px; }
.set .n { font: 500 13px var(--mono); color: var(--mute); }
.set.next { border-color: var(--acc-line); }
.pill-in { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 50px;
  padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--s3); color: var(--tx); font: inherit; cursor: pointer; text-align: left; }
.pill-in b { font: 500 20px var(--mono); }
.pill-in em { font-style: normal; font-size: 10.5px; color: var(--mute); letter-spacing: .04em; align-self: center; }
.set.next .pill-in { border-color: var(--acc-line); }
.set.done .pill-in { background: rgba(255,255,255,.05); }
.chk { appearance: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line2); background: transparent;
  color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.set.next .chk { border-color: var(--acc-line); color: var(--acc); }
.chk.on { background: var(--acc-grad); border-color: transparent; color: var(--acc-tx); box-shadow: 0 8px 20px -8px rgba(255,90,31,.8); }
.chk svg { stroke-width: 2.4; }
.setctl { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.setctl .round { width: 52px; height: 52px; }
.wk-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px var(--gr) calc(12px + var(--safe-b)) var(--gl);
  background: linear-gradient(180deg, transparent, rgba(10,10,11,.92) 38%); }
.wk-foot .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.wk-foot .in.one { grid-template-columns: 1fr; }
.pillbtn { position: relative; overflow: hidden; appearance: none; height: 58px; border-radius: 99px; border: 1.5px solid var(--acc-line);
  background: rgba(24,14,10,.9); color: var(--tx); font: inherit; font-weight: 600; font-size: 13px; white-space: nowrap; display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px; cursor: pointer; gap: 8px; }
.pillbtn > * { position: relative; z-index: 1; }
.pillbtn .fill { position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,106,43,.28); transition: width .25s linear; }
.pillbtn .tm { font: 500 15px var(--mono); }
.pillbtn.run { border-color: var(--acc); }
.pillbtn.done { border-color: var(--ok); } .pillbtn.done .fill { background: rgba(74,222,128,.3); }
.pillbtn.main { background: var(--acc-grad); border-color: transparent; color: var(--acc-tx); box-shadow: 0 14px 30px -12px rgba(255,90,31,.75); }
.pillbtn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Roda de seleção de número */
.wheel { position: relative; height: 230px; display: grid; grid-template-rows: repeat(5, 1fr); align-items: center; justify-items: center;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: ns-resize;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent); }
.w-n { font-weight: 600; letter-spacing: -.04em; line-height: 1; color: #c9c9cf; }
.w-n.k2, .w-n.km2 { font-size: 26px; opacity: .32; } .w-n.k1, .w-n.km1 { font-size: 34px; opacity: .6; }
.w-n.k0 { font-size: 64px; color: #fff; }
.picker { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 26px; padding: 8px 10px; background: var(--s2); }
.picker .unit { text-align: center; font-size: 11px; letter-spacing: .12em; color: var(--mute); margin-top: -6px; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 12px 0 16px; flex-wrap: wrap; }
.steps button { appearance: none; border: 1px solid var(--line); background: var(--s2); color: var(--mute); font: 500 13px var(--mono);
  padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.steps button.on { border-color: var(--acc-line); color: var(--acc); }

/* Folha, aviso, extras */
.progress { height: 6px; background: var(--s3); border-radius: 9px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--acc-grad); }
#sheet-root .back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px); display: flex; align-items: flex-end; }
#sheet-root .sheet { width: 100%; max-width: 560px; margin: 0 auto; max-height: 92dvh; overflow-y: auto; background: #101012;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 32px 32px 0 0;
  padding: 20px var(--gr) calc(20px + var(--safe-b)) var(--gl); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; left: var(--gl); right: var(--gr); top: calc(12px + var(--safe-t)); z-index: 80; max-width: 520px; margin: 0 auto;
  background: #232327; border: 1px solid var(--line2); padding: 13px 16px; border-radius: 18px; font-size: 13.5px;
  opacity: 0; transform: translateY(-14px); pointer-events: none; transition: .2s; }
.toast.on { opacity: 1; transform: none; } .toast.err { border-color: rgba(255,93,93,.5); color: #ffb3b3; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; background: var(--s2); display: block; }
.thumb.sm { width: 52px; aspect-ratio: 1; flex: none; border-radius: 14px; }
.svgchart { width: 100%; height: auto; display: block; }
pre.fb { white-space: pre-wrap; font: inherit; margin: 0; }
.spin { width: 22px; height: 22px; border: 3px solid var(--s3); border-top-color: var(--acc); border-radius: 50%;
  animation: sp .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
