/* FitPro — 训练中 workout-session */

.screen-content--session {
  padding-bottom: 100px !important;
}

.stack-top--session h1 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-timer {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  white-space: nowrap;
}

.session-progress {
  margin-bottom: 16px;
}

.session-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.session-progress-meta strong {
  color: var(--brand);
  font-weight: 700;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 12px rgba(217, 255, 0, 0.4);
  transition: width 0.3s ease;
}

.exercise-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.exercise-card-top {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.exercise-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--surface-section);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exercise-thumb .sport-icon-img {
  width: 36px;
  height: 36px;
}

.exercise-info h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.exercise-info p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.exercise-nav {
  display: flex;
  gap: 8px;
}

.exercise-nav-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.exercise-nav-btn i {
  font-size: 11px;
  color: var(--brand);
}

.exercise-nav-btn.is-active {
  border-color: rgba(217, 255, 0, 0.45);
  background: var(--brand-muted);
  color: var(--brand);
}

.exercise-nav-btn:active {
  transform: scale(0.97);
}

.exercise-nav-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.exercise-tips-panel {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.28s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.exercise-tips-panel.is-open {
  max-height: 280px;
  margin-top: 12px;
  opacity: 1;
}

.exercise-tips-panel h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
}

.exercise-tips-panel ul {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 12px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
}

.exercise-tips-panel li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #e5e5e5;
}

.exercise-tips-panel li:last-child {
  margin-bottom: 0;
}

.exercise-tips-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.exercise-tips-panel li strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-overlay.is-open {
  display: flex;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 72%;
  padding: 12px 16px 24px;
  border-radius: 24px 24px 0 0;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-bottom: none;
  animation: sheet-up 0.28s ease;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.sheet-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.sheet-desc {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sheet-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
}

.sheet-search i {
  color: var(--text-muted);
  font-size: 14px;
}

.sheet-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 14px;
  outline: none;
}

.sheet-search input::placeholder {
  color: var(--text-muted);
}

.replace-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.replace-list::-webkit-scrollbar {
  display: none;
}

.replace-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.replace-item:last-child {
  margin-bottom: 0;
}

.replace-item:active {
  transform: scale(0.98);
}

.replace-item.is-current {
  border-color: rgba(217, 255, 0, 0.4);
  background: var(--brand-muted);
}

.replace-item .replace-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.replace-item .replace-icon .sport-icon-img {
  width: 22px;
  height: 22px;
}

.replace-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.replace-item small {
  font-size: 11px;
  color: var(--text-secondary);
}

.replace-item .replace-tag {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-muted);
}

.replace-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  list-style: none;
}

.session-toast {
  position: absolute;
  left: 50%;
  bottom: 108px;
  z-index: 50;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.session-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.set-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
}

.set-row.is-current {
  border-color: rgba(217, 255, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(217, 255, 0, 0.12);
}

.set-row.is-done {
  opacity: 0.55;
}

.set-row .set-index {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.set-row.is-current .set-index {
  color: var(--brand);
}

.set-input {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
}

.set-input label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.set-input input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.set-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.set-check.is-checked {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-primary);
}

.session-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 12px 16px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.95) 24%);
}

.session-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
}

.session-actions .btn-rest {
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.session-actions .btn-next {
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--text-on-primary);
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
}

.session-actions .btn-end {
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.session-actions .btn-rest:active,
.session-actions .btn-next:active,
.session-actions .btn-end:active {
  transform: scale(0.97);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.overlay.is-open {
  display: flex;
}

.overlay-card {
  width: 100%;
  max-width: 300px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  text-align: center;
}

.overlay-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.overlay-card p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rest-timer-value {
  margin-bottom: 20px;
  font-size: 48px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  letter-spacing: -0.03em;
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-actions .btn-primary-block {
  padding: 14px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--text-on-primary);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.overlay-actions .btn-ghost-block {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.overlay-actions .btn-danger-block {
  padding: 14px;
  border-radius: 14px;
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

