/* Forma — workout mode: exercise, rest, walking, summary. */

.wk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.wk-top .exit {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 0 4px;
}

.wk-top .elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--ink-faint);
  font-weight: 600;
}

/* the signature rail, one segment per set of the whole session */
.wk-rail {
  margin-bottom: 22px;
}

.wk-rail .rail-seg {
  height: 8px;
}

.wk-rail .rail-seg.gap-after {
  margin-right: 4px;
}

.wk-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.wk-exercise-name {
  font-size: clamp(30px, 8.5vw, 40px);
  margin-top: 6px;
}

.wk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.wk-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 99px;
  padding: 5px 11px;
}

.wk-tag.rose {
  color: var(--rose-deep);
  background: rgba(240, 222, 221, 0.65);
  border-color: rgba(255, 255, 255, 0.75);
}

.wk-target {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.wk-target .numeral {
  font-size: 30px;
  line-height: 1;
}

.wk-target .at {
  font-size: 15px;
  color: var(--ink-soft);
}

.wk-last {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.wk-ready {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--moss);
  background: var(--moss-tint);
  border-radius: 99px;
  padding: 6px 12px;
}

.wk-guide {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wk-guide details {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.32));
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

.wk-guide summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--tap);
  padding: 10px 14px;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}

.wk-guide summary::-webkit-details-marker {
  display: none;
}

.wk-guide summary::after {
  content: '+';
  font-size: 18px;
  color: var(--ink-faint);
}

.wk-guide details[open] summary::after {
  content: '−';
}

.wk-guide .body {
  padding: 0 14px 12px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.wk-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  font-weight: 650;
  font-size: 14.5px;
  color: var(--rose-deep);
}

/* embedded form-demo player (tap-to-load) */
.wk-video {
  margin-top: 14px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 30px -14px rgba(80, 55, 58, 0.35);
  background: rgba(50, 40, 42, 0.2);
}

.wk-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.wk-video-poster {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.wk-video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wk-video-poster .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(160deg, rgba(200, 118, 133, 0.85), rgba(150, 78, 92, 0.85));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 26px -8px rgba(60, 30, 36, 0.5);
  transition: transform 0.15s ease;
}

.wk-video-poster:hover .play-badge {
  transform: translate(-50%, -50%) scale(1.06);
}

.wk-video-poster .play-badge svg {
  width: 26px;
  height: 26px;
}

.wk-video-poster .play-lbl {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: #fff;
  background: rgba(40, 30, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 99px;
  padding: 5px 11px;
}

.wk-demo-ext {
  min-height: 40px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* set panel */

.set-panel {
  margin-top: 22px;
  padding: 18px;
}

.set-panel .set-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.set-panel .set-head .numeral {
  font-size: 20px;
}

.set-dots {
  display: flex;
  gap: 6px;
}

.set-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.set-dots i.done {
  background: var(--rose);
}

.set-dots i.now {
  background: var(--rose-tint);
  box-shadow: inset 0 0 0 1.5px var(--rose);
}

.set-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.set-inputs .field.single {
  grid-column: 1 / -1;
}

.wk-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.wk-nav button {
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 99px;
  font-weight: 650;
  font-size: 14.5px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wk-nav button:not(:disabled):hover {
  color: var(--rose-deep);
}

.wk-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.wk-done-note {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--moss);
  font-weight: 600;
  text-align: center;
}

/* ---------- rest overlay ---------- */

.rest-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(250, 245, 239, 0.55);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  text-align: center;
}

.rest-overlay .eyebrow {
  color: var(--rose-deep);
}

.rest-count {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(100px, 32vw, 156px);
  font-weight: 590;
  line-height: 1;
  margin: 18px 0 8px;
  color: var(--ink);
}

.rest-rail {
  width: min(300px, 70vw);
  height: 8px;
  border-radius: 99px;
  background: var(--rose-tint);
  overflow: hidden;
  margin: 14px 0 26px;
}

.rest-rail .rail-fill {
  height: 100%;
  background: var(--rose);
  border-radius: 99px;
  transform-origin: left;
  transition: transform 1s linear;
}

.rest-next {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 34px;
}

.rest-next b {
  color: var(--ink);
  font-weight: 650;
}

.rest-count.paused {
  color: var(--ink-faint);
}

.rest-actions {
  display: flex;
  gap: 10px;
}

.rest-actions .btn {
  min-width: 130px;
}

/* ---------- walking ---------- */

.walk-hero {
  text-align: center;
  margin-top: 12vh;
}

.walk-hero .numeral {
  font-size: clamp(72px, 24vw, 110px);
  line-height: 1;
  color: var(--moss);
}

.walk-hero .unit-lbl {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.walk-fields {
  display: flex;
  gap: 12px;
  margin: 30px 0 22px;
}

.walk-fields .field {
  flex: 1;
}

/* ---------- summary ---------- */

.summary-hero {
  text-align: center;
  margin-top: 6vh;
}

.summary-mark {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--rose-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.summary-mark svg {
  width: 34px;
  height: 34px;
  stroke: var(--rose-deep);
}

.summary-hero .display {
  font-size: clamp(30px, 8vw, 38px);
}

.summary-hero .sub {
  margin-top: 8px;
  color: var(--ink-soft);
}

.summary-stats {
  margin: 28px 0 8px;
  padding: 6px 20px;
}

.difficulty-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.difficulty-row button {
  flex: 1;
  min-height: 52px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-weight: 650;
  font-size: 15px;
  color: var(--ink-soft);
  background: var(--card);
}

.difficulty-row button[aria-pressed='true'] {
  border-color: var(--rose);
  background: var(--rose-faint);
  color: var(--rose-deep);
}
