.mayo-feature-steps {
  --mayo-fs-gap: 48px;
  --mayo-fs-left-width: 36%;
  --mayo-fs-badge-size: 28px;
  --mayo-fs-dot-height: 4px;
  --mayo-fs-accent: var(--e-global-color-primary, #26abe3);
  --mayo-fs-muted: #9aa3ad;
  --mayo-fs-text: #353d45;
  --mayo-fs-desc: #6b7280;
  --mayo-fs-line: #c5e8f6;
  --mayo-fs-dot: #e6e9ec;
  display: flex;
  align-items: center;
  gap: var(--mayo-fs-gap);
  width: 100%;
}

.mayo-feature-steps__left {
  flex: 0 0 var(--mayo-fs-left-width);
  max-width: var(--mayo-fs-left-width);
  min-width: 0;
}

.mayo-feature-steps__right {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.mayo-feature-steps__title {
  margin: 0 0 16px;
  color: var(--mayo-fs-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
}

.mayo-feature-steps__desc {
  margin: 0 0 28px;
  color: var(--mayo-fs-desc);
  font-size: 15px;
  line-height: 1.7;
}

.mayo-feature-steps__list {
  --mayo-fs-list-gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--mayo-fs-list-gap);
}

.mayo-feature-steps__step {
  position: relative;
  margin: 0;
  padding: 0;
}

.mayo-feature-steps__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--mayo-fs-badge-size) / 2);
  top: var(--mayo-fs-badge-size);
  bottom: calc(-1 * var(--mayo-fs-list-gap));
  width: 1px;
  background-color: var(--mayo-fs-line);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.mayo-feature-steps__step-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.mayo-feature-steps__badge {
  flex: 0 0 var(--mayo-fs-badge-size);
  width: var(--mayo-fs-badge-size);
  height: var(--mayo-fs-badge-size);
  border-radius: 50%;
  border: 1.5px solid var(--mayo-fs-line);
  background: #fff;
  color: var(--mayo-fs-accent);
  display: inline-grid;
  place-content: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.mayo-feature-steps__step-label {
  color: var(--mayo-fs-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  transition: color 0.25s ease, font-weight 0.25s ease;
}

.mayo-feature-steps__step.is-active .mayo-feature-steps__badge {
  background-color: var(--mayo-fs-accent);
  border-color: var(--mayo-fs-accent);
  color: #fff;
}

.mayo-feature-steps__step.is-active .mayo-feature-steps__step-label {
  color: var(--mayo-fs-text);
  font-weight: 600;
}

.mayo-feature-steps__stage {
  width: 100%;
}

.mayo-feature-steps__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: pointer;
}

.mayo-feature-steps__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.mayo-feature-steps__slide {
  display: none;
  margin: 0;
  width: 100%;
}

.mayo-feature-steps__slide.is-active {
  display: block;
}

.mayo-feature-steps__frame {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f5f7;
  line-height: 0;
  /* Reduce blur when parent tab/wrapper fades */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.mayo-feature-steps__frame--placeholder {
  min-height: 200px;
  display: grid;
  place-content: center;
  color: var(--mayo-fs-muted);
  font-size: 14px;
  line-height: 1.4;
}

.mayo-feature-steps__img {
  display: block;
  width: 100%;
  height: auto;
  /* Keep bitmap crisp during/after opacity fade on wrappers */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  filter: none;
  opacity: 1;
}

/* After JS knows each image size, lock viewport height to avoid swap jump. */
.mayo-feature-steps__viewport.is-sized .mayo-feature-steps__slide.is-active,
.mayo-feature-steps__viewport.is-sized .mayo-feature-steps__frame {
  height: 100%;
}

.mayo-feature-steps__viewport.is-sized .mayo-feature-steps__img {
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

/* Isolate from parent fade compositing when possible */
.mayo-feature-steps__stage,
.mayo-feature-steps__viewport {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  isolation: isolate;
}

.mayo-feature-steps__pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.mayo-feature-steps__dots {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  background: transparent;
}

.mayo-feature-steps__dot {
  position: relative;
  flex: 1 1 0;
  height: var(--mayo-fs-dot-height);
  border-radius: 999px;
  background-color: var(--mayo-fs-dot);
  cursor: pointer;
  transition: background-color 0.25s ease;
}

/* expand hit area — visual bar stays thin */
.mayo-feature-steps__dot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 24px;
  transform: translateY(-50%);
}

.mayo-feature-steps__dot.is-active {
  background-color: var(--mayo-fs-accent);
}

.mayo-feature-steps__counter {
  flex: 0 0 auto;
  color: var(--mayo-fs-muted);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mayo-feature-steps__empty {
  color: var(--mayo-fs-muted);
  font-size: 14px;
}

/* --- 手機斷點 (860px 以下) --- */
@media (max-width: 860px) {
  .mayo-feature-steps {
    flex-direction: column;
    align-items: stretch;
    --mayo-fs-gap: 28px;
  }

  .mayo-feature-steps__left,
  .mayo-feature-steps__right {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }

  .mayo-feature-steps__title {
    font-size: 22px;
  }
}
