/* A small, optional viewing control opposite the music button. */
.story-toggle[hidden]{display:none}
.story-toggle{
  position:fixed;
  left:max(12px,calc((100vw - 640px)/2 + 16px),env(safe-area-inset-left,0px));
  bottom:calc(var(--dock-clearance,67px) + 12px);
  z-index:40;
  display:flex;align-items:center;justify-content:center;gap:7px;
  min-height:44px;min-width:44px;max-width:calc(50vw - 24px);
  padding:9px 13px 9px 10px;
  border:1px solid #c8b8977d;border-radius:30px;
  background:#faf7f0f2;color:#8a7554;
  box-shadow:0 3px 12px #6c54340d;
  font:10px/1.5 var(--sans,-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif);
  letter-spacing:.7px;white-space:nowrap;touch-action:manipulation;
  transition:background-color .25s ease,color .25s ease;
}
.story-toggle-icon{width:18px;height:18px;flex:none;stroke-width:1.2}
.story-toggle[data-state="running"],.story-toggle[data-state="waiting"]{background:#f2eadcf2;color:#7f6747}
.story-toggle:active{background:#eadfcb}
.letter-closed .story-toggle,.modal-open .story-toggle{display:none}
html.story-running{scroll-behavior:auto!important}
.cover .cover-photo{animation:none;transform:none}

/* Finite entry animations only: there is never an invisible waiting state. */
.story-text.story-seen{
  animation:storyTextArrive .85s cubic-bezier(.22,.68,.25,1) both;
  animation-delay:var(--story-delay,0ms);
}
.story-line.story-seen{
  transform-origin:left center;
  animation:storyLineDraw 1.1s cubic-bezier(.22,.68,.25,1) both;
}
.story-photo.story-seen::after{
  content:"";position:absolute;inset:0;z-index:2;
  pointer-events:none;background:var(--paper,#f7f3eb);
  transform-origin:center bottom;
  animation:storyPhotoUnveil .75s cubic-bezier(.22,.68,.25,1) both;
}
.story-photo.story-seen>img{
  transform-origin:center center;
  animation:storyPhotoSettle 3s cubic-bezier(.2,.6,.3,1) 1 both;
}
@keyframes storyTextArrive{
  from{opacity:.15;transform:translate3d(0,8px,0)}
  to{opacity:1;transform:translate3d(0,0,0)}
}
@keyframes storyLineDraw{
  from{opacity:.3;transform:scaleX(.15)}
  to{opacity:1;transform:scaleX(1)}
}
@keyframes storyPhotoUnveil{
  from{transform:scaleY(1);opacity:.14}
  to{transform:scaleY(0);opacity:0}
}
@keyframes storyPhotoSettle{
  from{transform:scale(1.018)}
  to{transform:scale(1)}
}
@media(max-width:359px){.story-toggle{padding-left:9px;padding-right:11px;gap:5px;font-size:9px;letter-spacing:.4px}}
@media(prefers-reduced-motion:reduce){
  .story-toggle{display:none}
  .story-enter.story-seen,.story-enter.story-seen::after{animation:none!important;transition:none!important;transform:none;opacity:1}
  .story-photo.story-seen>img{animation:none!important;transition:none!important;transform:none}
  .story-photo.story-seen::after{display:none}
}
