/* SIM-01 (KB v3.5, 1.2): tela de treino "série atual". Cabe em 390 × 844 sem rolar; números grandes e botões de
   pelo menos 48 px para uso com uma mão. No computador, 560 px centralizados com a lista de exercícios à direita. */

.wk { display: flex; flex-direction: column; gap: var(--space-2); }
.wk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.wk-aside { display: none; }
@media (min-width: 1024px) {
  .wk-layout { grid-template-columns: minmax(0, 560px) 280px; justify-content: center; align-items: start; }
  .wk-aside { display: block; position: sticky; top: calc(var(--header-h) + var(--space-4)); }
  .wk-aside h2 { font-size: 15px; margin-bottom: var(--space-2); }
}

.wk-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: var(--space-2); }
.wk-head .btn-icon { width: 44px; height: 44px; }
.wk-title { font-size: 15px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Barra por exercício: um trecho para cada exercício, preenchido pelas séries feitas nele */
.wk-progress { display: flex; gap: 3px; height: 6px; }
.wk-seg { flex: 1 1 0; min-width: 0; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.wk-seg > span { display: block; height: 100%; background: var(--brand); transition: width var(--dur-med) var(--ease-out); }
.wk-progress-label { font-size: 13px; margin: 0; }

.wk-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.wk-ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.wk-ex-name { font-size: 20px; line-height: 26px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.wk-ex-head .btn-outline { flex-shrink: 0; }
.wk-meta { font-size: 13px; margin: 0; }
.wk-guidance {
  font-size: 13px; margin: 0; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wk-set-label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-align: center; margin: var(--space-2) 0 0; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 6px; }

.wk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.wk-kind-time { grid-template-columns: minmax(0, 1fr); }
.wk-field { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.wk-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px; width: 100%; }
.wk-step {
  width: 44px; height: 52px; border-radius: var(--radius-md); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.wk-step:active { background: var(--surface-2); }
.wk-num {
  width: 100%; min-width: 0; height: 60px; text-align: center; font-family: var(--font-metric); font-size: 30px; font-weight: 700;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--input-bg); color: var(--text); padding: 0 2px;
  -moz-appearance: textfield; appearance: textfield;
}
.wk-num::-webkit-outer-spin-button, .wk-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wk-unit { font-size: 13px; color: var(--text-2); }
.wk-lasttime { text-align: center; font-size: 13px; margin: 0; }

.wk-main { min-height: 56px; font-size: 17px; margin-top: var(--space-2); }
.wk-main.is-flash { background: var(--success-fill); }

.wk-more summary { cursor: pointer; font-size: 13px; color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.wk-more-body { display: grid; gap: 6px; padding-top: var(--space-2); }

.wk-dots { display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center; }
span.wk-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-block; margin: 0 7px; }
/* Estado nunca só pela cor (KB v3.4, 4.1): a feita é cheia e tem marca de toque */
button.wk-dot {
  width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
button.wk-dot::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--brand), inset 0 0 0 3px var(--surface); }
button.wk-dot:focus-visible { outline: 2px solid var(--focus-ring); }
.wk-last { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }

.wk-rest {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-bottom)); z-index: 85;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap;
  padding: var(--space-2) var(--space-4); background: var(--surface); border-top: 1px solid var(--border-strong);
}
.wk-rest strong { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.wk-rest .timer-digits { font-family: var(--font-metric); font-size: 18px; }
.wk-rest-actions { display: inline-flex; gap: 6px; }
@media (min-width: 1024px) {
  .wk-rest { left: var(--sidebar-w); bottom: 0; justify-content: center; gap: var(--space-4); }
}
/* Espaço para a barra de descanso não cobrir o último elemento */
.wk:has(.wk-rest) { padding-bottom: 64px; }

.wk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wk-list-item {
  width: 100%; display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; text-align: left;
  min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.wk-list-item span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-list-item.is-current { border-color: var(--brand); border-width: 2px; font-weight: 700; }

.wk-menu { display: grid; gap: 6px; }
.wk-menu-item {
  min-height: 48px; text-align: left; padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.wk-menu-item.is-danger { color: var(--danger); border-color: var(--danger); }
.wk-edit { display: grid; gap: 6px; }
.wk-edit .btn-danger { justify-self: start; margin-top: var(--space-2); }

.wk-continue { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); border-color: var(--brand); }
.wk-safety { margin: 0; }
.wk-perception { justify-content: center; }
.exec-summary-volume { text-align: left; margin: 10px 0; }

/* Celular: a tela de treino aproveita a altura toda (cabeçalho do app mais baixo) */
@media (max-width: 1023px) {
  .wk-card { padding: var(--space-3); }
}

/* SIM-01: seletor rápido de esforço (só com esforço-alvo na ficha) */
.wk-effort { display: grid; gap: 4px; justify-items: center; font-size: 13px; }
.wk-effort-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.wk-effort-chips .chip { min-height: 36px; }
