/* ピーターラビット — スクロール連動フェード（画像／本文 分離） */

body.tl-body--napkin {
  background-color: #2a1e14;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 40%, rgba(80, 55, 35, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 70%, rgba(0, 0, 0, 0.25) 0%, transparent 50%),
    repeating-linear-gradient(
      88deg,
      transparent,
      transparent 28px,
      rgba(0, 0, 0, 0.035) 28px,
      rgba(0, 0, 0, 0.035) 29px
    ),
    linear-gradient(175deg, #4a3528 0%, #3d2b1f 30%, #2a1e14 70%, #1f1610 100%);
  color: var(--tl-paper);
}

body.tl-body--napkin::before {
  background-image:
    radial-gradient(circle at 18% 55%, rgba(90, 60, 35, 0.18) 0%, transparent 18%),
    radial-gradient(circle at 22% 58%, rgba(60, 40, 25, 0.12) 0%, transparent 22%);
}

body.tl-body--napkin::after {
  opacity: 0.1;
}

.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(31, 22, 16, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(196, 165, 116, 0.1);
}

.tl-napkin-header__back {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(244, 234, 216, 0.7);
  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(196, 165, 116, 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: 6%;
  top: 20%;
  width: clamp(5rem, 14vw, 9rem);
  height: clamp(5rem, 14vw, 9rem);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(70, 45, 25, 0.22) 0%,
    rgba(70, 45, 25, 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, 255, 255, 0.35) 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);
  transform: none;
  will-change: auto;
}

/* ── トップページ同型リビール ── */

.tl-scene-reveal .tl-reveal-item {
  --reveal-delay: 0ms;
  --reveal-duration: 1.45s;
  --reveal-opacity-duration: 1.45s;
  --reveal-distance: 2rem;
  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;
}

.tl-scene-reveal.is-visible .tl-reveal-item {
  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-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.4rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
}

.tl-napkin-cover__en {
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--tl-ink-muted);
  margin: 0 0 1.25rem;
}

.tl-napkin-cover__meta {
  font-size: 0.78rem;
  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;
}

/* 画像コンテナ */
.tl-scroll-panel__visual {
  flex-shrink: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(255, 252, 245, 0.04);
  border: 1px solid rgba(196, 165, 116, 0.15);
  border-radius: 3px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.tl-scroll-panel__figure {
  margin: 0;
  filter: 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, 255, 255, 0.45) 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__copy::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.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__caption {
  font-size: 0.82rem;
  color: var(--tl-ink-muted);
  text-align: center;
  margin: 0 0 0.75rem;
  line-height: 1.8;
}

.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: 28vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 2.5rem;
  background-color: #2a1e14;
}

.tl-story__outro-inner {
  text-align: center;
  max-width: 28rem;
}

.tl-story__credit {
  font-size: 0.78rem;
  color: rgba(244, 234, 216, 0.7);
  line-height: 2;
  margin: 0 0 1.5rem;
}

.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,
  .tl-reveal-item,
  .tl-napkin-cover__title-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
