/* Short, transparent reading scenes alternate with time for the shared particle field. */
.memory-story { position: relative; }
/* The opening occupies the viewport, not the viewport plus the role bar's reserve.
   Keep this constant throughout an expanded story to avoid scroll jumps at its end. */
.has-memory-story:not(:has(.story-returning)) { padding-top: 0; }
.has-memory-story:not(:has(.story-returning, .story-library-visible)) { --section-sticky-top: 0px; }
.has-memory-story:not(:has(.story-returning, .story-library-visible)) :is(.viewbar--floating, .viewbar-error) {
  opacity: 0;
  translate: 0 var(--reading-offset, calc(-100% - var(--viewbar-clearance)));
  visibility: hidden;
  pointer-events: none;
}
.story-returning > .memory-story { display: none; }
.story-home-header { display: none; }
.story-returning > .story-home-header { display: block; }
.story-scene { position: relative; padding: 8px 0; scroll-margin-top: 24px; }
.story-copy { position: relative; z-index: 1; max-width: var(--story-copy-width); background: transparent; }
.story-scene:nth-child(odd) .story-copy { margin-left: auto; }
.story-scene--opening .story-copy {
  margin-inline: auto;
  min-height: var(--story-opening-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.story-copy h1 { margin: 0 0 22px; }
.story-copy p { margin: 0 0 20px; text-wrap: pretty; }
.story-copy .m-narrative-accent { margin-block: 28px; text-wrap: balance; }
.story-copy .m-narrative-accent:first-child { margin-top: 0; }
.story-copy p:last-child { margin-bottom: 0; }
.story-scroll-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.story-scroll-hint { animation: story-scroll-direction calc(var(--motion-hero) * 2) var(--motion-hero-ease) infinite; }
@keyframes story-scroll-direction {
  0%, 20%, 100% { translate: 0 0; }
  60% { translate: 0 var(--motion-detail-distance); }
}
@media (prefers-reduced-motion: reduce) { .story-scroll-hint { animation: none; } }
.story-scene--opening { text-align: center; padding-top: 20px; }
/* The pause is the morphing interval, not another particle canvas or sticky panel. */
.story-breath { height: var(--story-transition-height); margin-top: 0; pointer-events: none; }
.story-library { scroll-margin-top: 24px; padding-top: 12px; }
.story-account { margin-bottom: 16px; }
.story-brand-study { font-family: var(--font-display); font-size: var(--story-heading); letter-spacing: -.04em; }
.story-brand-study span { margin-right: 10px; }
/* Reuse the site's translucent matte FAB; reveal only after the story. */
.story-create .m-fab-label { display: inline; }
.story-create.m-primary-cta { transition: translate var(--motion-reading-controls) var(--motion-switch-ease), background-color .2s, opacity var(--motion-reading-controls) ease, transform .65s cubic-bezier(.22,1,.36,1), visibility .65s; }
.js .story-create:not(.is-visible) { opacity: 0; transform: translateY(calc(100% + 40px)); visibility: hidden; pointer-events: none; }
html:not(.js) .story-create { position: static; }
/* site-shell already reserves 80px for the floating action; do not add it twice. */
@media (max-width: 560px) {
  .story-create.m-primary-cta {
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    width: calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right)));
    box-sizing: border-box; justify-content: center;
  }
}
.story-library > .landing-list:first-child { margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { .story-create.m-primary-cta { transition: none; } }

.story-palette-study { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0; }
.story-palette-study span { height: 44px; border-radius: var(--r-sm); }

/* The questions precede the final creation row. */
#your-memory-page .faq-list + .mem-link--create { margin-top: 24px; margin-bottom: 0; border-top: 1px solid var(--line); border-bottom: 0; }
