/* ── Session overlay ───────────────────────────────────────────────────────── */
#session-page {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  flex-direction: column;
  overflow-y: auto;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bot);
}

#session-page.active { display: flex; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.session-title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: 22px;
  color: var(--text2);
  letter-spacing: 1px;
}

.session-elapsed {
  font-size: 13px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

/* ── Body ──────────────────────────────────────────────────────────────────── */
.session-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
}

#active-view {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Exercise display ──────────────────────────────────────────────────────── */
.exercise-display {
  text-align: center;
  margin-bottom: 32px;
  width: 100%;
}

.ex-progress {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
  font-weight: 600;
}

.ex-img-display {
  width: 200px;
  border-radius: var(--r-xl);
  background: var(--surface);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 52px;
}
.ex-img-display img { width: 100%; height: auto; object-fit: contain; display: block; }
.ex-img-display .ex-anim { width: 100%; }

.ex-name {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: 48px;
  letter-spacing: 1px;
  line-height: 1;
  word-break: break-word;
}

.ex-set-info {
  font-size: 16px;
  color: var(--text2);
  margin-top: 10px;
}

/* ── Set dots ──────────────────────────────────────────────────────────────── */
.set-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}

.set-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface3);
  transition: all 0.3s;
}

.set-dot.done    { background: var(--accent); opacity: 0.5; }
.set-dot.current { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); transform: scale(1.25); opacity: 1; }

/* ── Session controls ──────────────────────────────────────────────────────── */
.session-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.session-controls-row {
  display: flex;
  gap: 10px;
}
.session-controls-row .btn { flex: 1; }

/* ── Rest screen ───────────────────────────────────────────────────────────── */
.rest-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
}
.rest-screen.show { display: flex; }

.rest-label {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: 28px;
  color: var(--text2);
  letter-spacing: 3px;
}

.rest-next {
  font-size: 13px;
  color: var(--text3);
  margin-top: 6px;
  text-align: center;
}

.timer-ring {
  position: relative;
  margin: 20px auto;
}

.timer-ring svg { transform: rotate(-90deg); }

.timer-ring circle { transition: stroke-dashoffset 1s linear; }

.timer-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: 68px;
  color: var(--accent);
  letter-spacing: 2px;
}

/* ── Done screen ───────────────────────────────────────────────────────────── */
.workout-done-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
}
.workout-done-screen.show { display: flex; }

.done-icon  { font-size: 68px; margin-bottom: 16px; }
.done-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; font-size: 48px; color: var(--green); letter-spacing: 2px; }
.done-sub   { color: var(--text2); font-size: 15px; margin-top: 8px; }

.done-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
  width: 100%;
}
