.TrailWalk-wrapper {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.TrailWalk-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: var(--bg-color);
  filter: var(--user-content-filter);
  z-index: -1;
  pointer-events: none;
}

.TrailWalk {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: flex;
  flex-direction: column;
}

.TrailWalk-progressSticky {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1rem 0 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  isolation: isolate;
  /* Break out of container to span full width */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

.TrailWalk-progressSticky::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--bg-color);
  filter: var(--user-content-filter);
  z-index: -1;
  pointer-events: none;
}

.TrailWalk-progressLine {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-subtle) 20%,
    var(--border-subtle) 80%,
    transparent
  );
  margin-top: 1rem;
}

.TrailWalk-contentArea {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.TrailWalk-walkersOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.TrailWalk-walkersOverlay--active {
  opacity: 1;
}

.TrailWalk-walker {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 5s 0.8s ease-out;
  pointer-events: auto;
}

/* Mobile: always deemphasized, behind cards, delayed transition */
@media (max-width: 768px) {
  .TrailWalk-walkersOverlay {
    opacity: 0.35;
  }

  .TrailWalk-walkersOverlay--active {
    opacity: 0.35;
  }

  .TrailWalk-walker {
    transition: transform 5s 2s ease-out;
  }
}

.TrailWalk-separator {
  max-width: 600px;
  margin: 3rem auto;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.TrailWalk-upcomingIndicator {
  margin: 3rem 0;
  padding: 1.5rem;
  text-align: center;
  opacity: 0.5;
}

.TrailWalk-upcomingDots {
  font-size: 1.5rem;
  color: var(--text-muted);
  letter-spacing: 0.5rem;
  margin-bottom: 0.5rem;
}

.TrailWalk-upcomingText {
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: lowercase;
}

.TrailWalk-footer {
  max-width: 600px;
  margin: 4rem auto 0;
  padding: 0rem 1rem;
  text-align: center;
}

.TrailWalk-abandonButton {
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  background-color: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: lowercase;
}

@media (hover: hover) {
  .TrailWalk-abandonButton:hover {
    color: var(--text-secondary);
    text-decoration: underline;
  }
}

.TrailWalk-abandonButton:active {
  color: var(--text-secondary);
  transition-duration: 0.05s;
}

.TrailWalk-publishButton {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: lowercase;
  filter: var(--user-content-filter);
}

@media (hover: hover) {
  .TrailWalk-publishButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }
}

.TrailWalk-publishButton:active:not(:disabled) {
  transform: scale(0.98);
  transition-duration: 0.05s;
}

.TrailWalk-publishButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.TrailWalk-publishError {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 1rem;
  font-size: 0.9375rem;
  color: #d9534f;
  text-align: left;
  background: rgba(217, 83, 79, 0.1);
  border-radius: 6px;
  text-transform: lowercase;
}

.TrailWalk-publishError ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.TrailWalk-publishError li {
  margin: 0.25rem 0;
}

.TrailWalk-publishError li::before {
  content: "• ";
  color: #d9534f;
}

/* Desktop enhancements */
@media (min-width: 769px) {
  .TrailWalk {
    padding: 2rem 2rem 4rem;
  }

  .TrailWalk-progressSticky {
    padding: 1.5rem 0 0;
    margin-bottom: 2rem;
  }

  .TrailWalk-progressLine {
    margin-top: 1.5rem;
  }

  .TrailWalk-upcomingIndicator {
    margin: 4rem 0;
    padding: 2rem;
  }

  .TrailWalk-footer {
    margin: 6rem auto 0;
  }

  .TrailWalk-publishButton {
    font-size: 1.125rem;
    padding: 1rem 3rem;
  }
}
