/* Keep the full morph menu on-screen when expanded, including on phones. */
#morphWrapper {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: top .3s var(--ease), transform .3s var(--ease);
}
#morphWrapper.is-open {
  top: 34px;
  transform: none;
}
#morphWrapper.is-open + .morph-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  #morphWrapper { transition: none; }
}

/* Keep each reveal face in its own stacking context so its lettering cannot
   paint through the other face while the clip-path animates. */
.reveal-art__still { z-index: 0; isolation: isolate; }
.reveal-art__alive { z-index: 1; isolation: isolate; }

/* Phone layouts retain the same artwork and interactions at a smaller scale. */
@media (max-width: 600px) {
  html { scroll-padding-top: 76px; }
  .header, .header.is-scrolled { height: 60px; }
  .header-actions { gap: 5px; }
  .search-button, .motion-button, .hamburger { width: 44px; height: 44px; }
  .brand { gap: 7px; }
  .brand__number { font-size: 31px; }
  .brand__word { font-size: 13px; }
  .brand__word small { margin-top: 5px; }
  .mobile-nav { max-height: calc(100svh - 60px); overflow-y: auto; }

  .experiment__stage--magnet { height: 230px; }
  .magnet-orbit { width: min(68%, 190px); height: auto; aspect-ratio: 1; }
  .magnet-orbit--two { width: min(94%, 265px); }
  .magnet-demo { min-height: 56px; max-width: calc(100% - 32px); padding: 0 18px; gap: 15px; }
  .magnet-caption { bottom: 17px; line-height: 1.5; }

  .experiment__stage--reveal { height: 260px; }
  .reveal-art__still, .reveal-art__alive { padding: 0 14px 54px; }
  .reveal-art__still > span, .reveal-art__alive > span { font-size: clamp(45px, 13vw, 65px); line-height: 1.15; }
  .reveal-art__alive .red-period { font: inherit; }
  .reveal-art small { margin-top: 9px; line-height: 1.4; }
  .reveal-art__still:before { width: 140px; height: 140px; }
  .reveal-art__alive:before { width: 180px; height: 180px; }
  .reveal-trigger { bottom: 16px; }

  .experiment:last-child .experiment__stage--morph {
    height: auto;
    min-height: 180px;
    padding: 26px 0 22px;
    gap: 22px;
  }
  #morphWrapper, #morphWrapper.is-open { position: relative; top: auto; transform: none; }
  .morph-trigger { min-height: 56px; }
  .morph-options button { min-height: 44px; }
  .morph-hint { position: relative; bottom: auto; margin: 0; line-height: 1.5; }
  #morphWrapper.is-open + .morph-hint { opacity: 1; }

  .story-dialog__shell { min-height: min(620px, calc(100svh - 24px)); padding: 24px 20px; }
  .story-dialog__head { gap: 14px; line-height: 1.5; }
  .story-dialog__head button { flex-shrink: 0; width: 44px; height: 44px; }
  .story-dialog__content { min-width: 0; padding: 28px 0; }
  .story-dialog h2 { font-size: clamp(30px, 9.5vw, 54px); line-height: 1.08; overflow-wrap: break-word; }
  .story-controls { flex-wrap: wrap; }
  .story-dialog__bottom small { line-height: 1.5; }
}
@media (max-width: 360px) {
  .header { padding: 0 12px; }
  .header-actions { gap: 4px; }
  .brand__number { font-size: 29px; }
  .brand__word { font-size: 11px; }
}
/* Dialog content stays reachable on short phones and landscape viewports. */
@media (max-width: 850px), (max-height: 600px) {
  .story-dialog, .search-dialog, .project-dialog { max-height: calc(100svh - 24px); overflow-y: auto; }
}
@media (max-width: 600px) {
  .contact__inner > * { min-width: 0; }
}
@media (max-width: 360px) {
  .contact h2 { font-size: clamp(44px, 14vw, 50px); }
}

/* Use drawn editorial slashes, never platform-dependent star/emoji glyphs. */
.editorial-mark {
  display: inline-block;
  position: relative;
  width: .85em;
  height: .8em;
  flex: 0 0 auto;
  vertical-align: -.04em;
  color: var(--red);
}
.editorial-mark::before, .editorial-mark::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: .18em;
  background: currentColor;
  transform: skewX(-20deg);
}
.editorial-mark::before { left: .2em; }
.editorial-mark::after { left: .55em; }
.btn--red .editorial-mark, .magnet-demo .editorial-mark,
.ticker .editorial-mark { color: var(--ink); }
