/* FoldText 只继承现有标题样式，不声明字号、字重或文字颜色。 */
.head h2.fold-text {
  display: block;
  white-space: normal;
  user-select: text;
}

.fold-text-visual {
  display: inline;
}

.fold-text-word {
  display: inline-block;
  white-space: nowrap;
}

.fold-text-whitespace {
  display: inline;
  white-space: pre;
}

.fold-text-segment {
  display: inline-block;
  line-height: inherit;
  perspective: var(--fold-perspective, 700px);
  transform-style: preserve-3d;
  vertical-align: baseline;
}

.fold-text-piece {
  position: relative;
  display: inline-block;
  color: inherit;
  line-height: inherit;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.fold-text-piece::after {
  content: '';
  position: absolute;
  inset: -.08em -.02em;
  pointer-events: none;
  opacity: var(--fold-crease, 0);
  mix-blend-mode: multiply;
  border-radius: .08em;
  background: linear-gradient(180deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.22) 42%, rgba(255,255,255,.26) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .fold-text-piece {
    opacity: 1 !important;
    transform: none !important;
  }

  .fold-text-piece::after {
    opacity: 0 !important;
  }
}
