/* 第二章结尾 — 六条独立情感流动带 */

.emotion-flow {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
}

.emotion-flow__phase {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

.emotion-flow__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh var(--space-md) 3vh;
  gap: 1rem;
}

.emotion-flow__title {
  margin: 0;
  font-family: "Noto Serif SC", var(--font-serif);
  font-weight: 300;
  font-synthesis: none;
  font-size: clamp(0.88rem, 1.55vw, 1.02rem);
  letter-spacing: 0.08em;
  line-height: 2.15;
  color: rgba(48, 48, 48, 0.78);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.emotion-flow__chart-host {
  width: min(980px, 96vw);
  flex: 1 1 auto;
  max-height: min(74vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.emotion-flow__svg {
  width: 100%;
  height: auto;
  max-height: min(74vh, 620px);
  display: block;
  overflow: visible;
}

.emotion-flow__ribbon-path {
  stroke: none;
}

.emotion-flow__ribbon-stream {
  mix-blend-mode: multiply;
}

.emotion-flow__ribbon--highlight .emotion-flow__ribbon-path {
  opacity: 1;
}

.emotion-flow__ribbon--highlight .emotion-flow__ribbon-stream {
  opacity: 0.94;
}

.emotion-flow__ribbon--muted .emotion-flow__ribbon-path {
  opacity: 0.52;
}

.emotion-flow__ribbon--muted .emotion-flow__ribbon-stream {
  opacity: 0.2;
}

.emotion-flow__flow-labels {
  pointer-events: none;
}

.emotion-flow__ribbon-label {
  font-family: "Noto Serif SC", var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.04em;
  fill: rgba(48, 48, 48, 0.82);
}

.emotion-flow__ribbon-label--source {
  font-weight: 400;
}

.emotion-flow__ribbon-label--count {
  font-family: "Noto Sans SC", var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  fill: rgba(80, 80, 80, 0.56);
}

.emotion-flow__ribbon-label--target {
  font-weight: 400;
}

.emotion-flow__ribbon-label--pct {
  font-family: "Noto Sans SC", var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.emotion-flow__ribbon-label--pct-highlight {
  fill: rgba(255, 255, 255, 0.92);
  paint-order: stroke fill;
  stroke: rgba(36, 52, 68, 0.22);
  stroke-width: 2px;
}

.emotion-flow__ribbon-label--pct-muted {
  fill: rgba(80, 88, 96, 0.38);
}

.emotion-flow__note {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  font-size: clamp(0.72rem, 1.6vw, 0.82rem);
  font-weight: 100;
  font-synthesis: none;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: rgba(58, 58, 58, 0.88);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

.emotion-flow + .reading-prose,
.emotion-flow .reading-prose {
  padding: 12vh var(--space-md) 16vh;
}

@media (max-width: 640px) {
  .emotion-flow__chart-host {
    width: min(980px, 98vw);
    max-height: min(66vh, 540px);
  }

  .emotion-flow__ribbon-label {
    font-size: 13px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emotion-flow__ribbon-stream {
    display: none;
  }
}
