/* くまのプーさん — スクロール連動フェード（fade-in / is-visible） */

body.tl-body--honey {
  background-color: #2e2418;
  background-image:
    radial-gradient(ellipse 65% 45% at 20% 35%, rgba(120, 85, 40, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 82% 72%, rgba(0, 0, 0, 0.22) 0%, transparent 50%),
    repeating-linear-gradient(
      92deg,
      transparent,
      transparent 30px,
      rgba(0, 0, 0, 0.03) 30px,
      rgba(0, 0, 0, 0.03) 31px
    ),
    linear-gradient(175deg, #5a4228 0%, #45321f 28%, #2e2418 68%, #221a12 100%);
  color: var(--tl-paper);
}

body.tl-body--honey::before {
  background-image:
    radial-gradient(circle at 16% 52%, rgba(180, 130, 60, 0.14) 0%, transparent 20%),
    radial-gradient(circle at 24% 58%, rgba(90, 60, 30, 0.1) 0%, transparent 24%);
}

body.tl-body--honey::after {
  opacity: 0.09;
}

.tl-story {
  overflow-x: hidden;
}

.tl-napkin-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  background: rgba(34, 26, 18, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 110, 0.12);
}

.tl-napkin-header__back {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(244, 234, 216, 0.72);
  text-decoration: none;
  transition: color 0.2s;
}

.tl-napkin-header__back:hover {
  color: var(--tl-paper);
}

.tl-napkin-header__series {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(212, 175, 110, 0.55);
  font-style: italic;
}

.tl-scroll-panel {
  position: relative;
  height: var(--panel-height, 130vh);
}

.tl-scroll-panel--cover {
  height: 108vh;
}

.tl-scroll-panel__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.25rem, 5.5vh, 4rem) clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 1.5vh, 1.25rem);
  transition: opacity 0.3s ease;
  will-change: opacity;
}

.tl-scroll-panel__sticky::before {
  content: '';
  position: absolute;
  left: 8%;
  top: 22%;
  width: clamp(5rem, 14vw, 9rem);
  height: clamp(5rem, 14vw, 9rem);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(180, 130, 55, 0.18) 0%,
    rgba(120, 80, 35, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
  opacity: inherit;
}

.tl-scroll-panel--cover .tl-scroll-panel__sticky {
  align-items: center;
}

.tl-napkin-cover__title-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 28rem);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 248, 230, 0.4) 0%, transparent 55%),
    var(--tl-paper);
  color: var(--tl-ink);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 20px 40px rgba(0, 0, 0, 0.35);
}

.tl-napkin-cover__series {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--tl-accent);
  margin: 0 0 1rem;
}

.tl-napkin-cover__title {
  font-size: clamp(1.35rem, 4vw, 1.95rem);
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.1em;
  margin: 0 0 0.65rem;
}

.tl-napkin-cover__en {
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--tl-ink-muted);
  margin: 0 0 0.5rem;
}

.tl-napkin-cover__tagline {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--tl-ink-muted);
  margin: 0 0 1.1rem;
}

.tl-napkin-cover__meta {
  font-size: 0.76rem;
  line-height: 1.9;
  color: var(--tl-ink-muted);
  margin: 0 0 1.5rem;
}

.tl-napkin-cover__hint {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--tl-ink-muted);
  margin: 0;
  opacity: 0.65;
}

/* fade-in：1.75秒で不透明度＋上方向スライド */

.scene .fade-in {
  --reveal-delay: 0ms;
  --reveal-duration: 1.75s;
  --reveal-opacity-duration: 1.75s;
  --reveal-distance: 1.75rem;
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  transition:
    opacity var(--reveal-opacity-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay),
    transform var(--reveal-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay);
  will-change: opacity, transform;
}

.scene .tl-scroll-panel__visual.fade-in {
  --reveal-delay: 0ms;
}

.scene .tl-scroll-panel__copy.fade-in {
  --reveal-delay: 180ms;
}

.tl-scene-reveal.is-visible .fade-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tl-story__outro .fade-in {
  --reveal-duration: 1.6s;
  --reveal-opacity-duration: 1.6s;
  --reveal-distance: 1.25rem;
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  transition:
    opacity var(--reveal-opacity-duration) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--reveal-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-scene-reveal.is-visible .tl-story__outro-inner.fade-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tl-scroll-panel__stage {
  position: relative;
  z-index: 1;
  width: min(96vw, 76rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.tl-scroll-panel__visual {
  flex-shrink: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(255, 252, 245, 0.05);
  border: 1px solid rgba(212, 175, 110, 0.16);
  border-radius: 3px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.tl-scroll-panel__figure {
  margin: 0;
  filter: sepia(0.08) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.tl-scroll-panel__figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 20rem);
  object-fit: contain;
  border-radius: 2px;
}

.tl-scroll-panel__copy {
  position: relative;
  flex: 1;
  padding: clamp(1rem, 2vw, 1.5rem);
  background:
    linear-gradient(180deg, rgba(255, 248, 230, 0.5) 0%, transparent 35%),
    var(--tl-paper);
  color: var(--tl-ink);
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.tl-scroll-panel__num {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--tl-accent);
  margin: 0 0 0.35rem;
  text-align: center;
}

.tl-scroll-panel__chapter {
  font-size: clamp(1.05rem, 2.5vw, 1.22rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  margin: 0 0 0.65rem;
}

.tl-scroll-panel__copy p {
  font-size: clamp(0.9rem, 1.6vw, 1.02rem);
  line-height: 1.9;
  letter-spacing: 0.04em;
  margin: 0 0 0.55rem;
}

.tl-scroll-panel__end {
  text-align: center;
  color: var(--tl-accent);
  margin-top: 0.5rem !important;
}

.tl-story__outro {
  position: relative;
  z-index: 100;
  min-height: 32vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 2.5rem;
  background-color: #2e2418;
}

.tl-story__outro-inner {
  text-align: center;
  max-width: 32rem;
}

.tl-story__credit {
  font-size: 0.74rem;
  color: rgba(244, 234, 216, 0.68);
  line-height: 2;
  margin: 0 0 1.5rem;
  text-align: left;
}

.tl-story__back {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--tl-paper);
  text-decoration: none;
  border: 1px solid rgba(244, 234, 216, 0.3);
  border-radius: 2px;
  transition: background 0.25s, border-color 0.25s;
}

.tl-story__back:hover {
  background: rgba(244, 234, 216, 0.08);
  border-color: rgba(244, 234, 216, 0.55);
}

@media (min-width: 900px) {
  .tl-scroll-panel__stage {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(0.85rem, 1.5vw, 1.35rem);
  }

  .tl-scroll-panel__visual {
    flex: 0 0 min(48%, 28rem);
  }

  .tl-scroll-panel__copy {
    flex: 1;
    min-width: 0;
  }

  .tl-scroll-panel__figure img {
    max-height: min(68vh, 24rem);
  }
}

@media (max-width: 640px) {
  .tl-scroll-panel__figure img {
    max-height: min(34vh, 14rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-scroll-panel {
    height: auto;
    min-height: auto;
  }

  .tl-scroll-panel__sticky {
    position: relative;
    height: auto;
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 3rem;
    opacity: 1 !important;
  }

  .tl-scroll-panel__sticky,
  .fade-in,
  .tl-napkin-cover__title-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
