/* Keep the reader and its audio alive behind the separate world viewport. */
body.journey-open > :not(.journey-shell),
body.journey-open > :not(.journey-shell) * {
  visibility: hidden !important;
  pointer-events: none !important;
  animation-play-state: paused !important;
}
.journey-shell {
  position: fixed; inset: 0 0 auto; z-index: 30;
  /* Give the grid a definite visible height, so the iframe receives only the
     space below the soundtrack bar as Safari expands or retracts its tools. */
  height: 100%; height: 100dvh; box-sizing: border-box;
  /* The containing page owns device insets; an iframe may report them as zero. */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: #eceee6; color: #354538;
}
.journey-bar {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 18px;
  min-height: 56px; padding: max(5px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 5px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid #7f8d722b; background: #f2f3ed;
}
.journey-return {
  flex-shrink: 0; min-height: 44px; border: 0; padding: 8px 6px;
  color: #40513c; background: transparent; cursor: pointer; font: 13px var(--font-zh);
}
.journey-return:focus-visible { outline: 2px solid #6b7d55; outline-offset: 1px; border-radius: 5px; }
.journey-bar .music-player { position: relative; inset: auto; margin-left: auto; flex-shrink: 0; }
.journey-bar .music-player .music { min-width: 44px; min-height: 44px; }
.journey-bar .track-toggle { min-height: 44px; }
.journey-world { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #d9ded1; }
@media (max-width: 600px) {
  .journey-bar { gap: 8px; }
}
