/* 页面转场：像一张有重量的纸从导航位置滑过，不使用巨大的圆形遮罩。 */
.portal-transition-layer{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
  overflow:hidden;
  background:var(--transition-base,#f2efe9);
  clip-path:inset(0 100% 0 0);
  will-change:clip-path;
}
.portal-transition-layer::before{
  content:"";
  position:absolute;
  inset:-8% -3%;
  background:var(--transition-accent,#2b5965);
  clip-path:polygon(0 0,94% 0,100% 100%,6% 100%);
  transform:translateX(-1.5%);
}
.portal-transition-layer::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:var(--transition-x,50%);
  width:1px;
  background:rgba(255,255,255,.62);
  box-shadow:9px 0 0 rgba(255,255,255,.18);
  opacity:.78;
}
.portal-transition-layer.is-leaving{animation:portalTransitionCover .36s cubic-bezier(.16,1,.3,1) forwards}
.portal-transition-layer.is-entering{
  clip-path:inset(0);
  animation:portalTransitionReveal .42s cubic-bezier(.16,1,.3,1) .01s forwards;
}
@keyframes portalTransitionCover{
  from{clip-path:inset(0 100% 0 0)}
  to{clip-path:inset(0)}
}
@keyframes portalTransitionReveal{
  from{clip-path:inset(0)}
  to{clip-path:inset(0 100% 0 0)}
}
/* 四页的转场边缘也不同：路线、规则、档案、工作台各有自己的“纸张”。 */
.portal-transition-layer[data-theme="skills"]::before{clip-path:polygon(0 0,97% 0,91% 100%,0 100%)}
.portal-transition-layer[data-theme="rules"]::before{clip-path:polygon(0 0,93% 0,93% 100%,0 100%)}
.portal-transition-layer[data-theme="cases"]::before{clip-path:polygon(0 0,96% 0,100% 94%,94% 100%,0 100%)}
.portal-transition-layer[data-theme="write"]::before{clip-path:polygon(0 0,95% 0,95% 100%,0 100%)}
html.is-portal-transitioning,html.is-portal-transitioning body{overflow:hidden!important}
@media(prefers-reduced-motion:reduce){
  .portal-transition-layer.is-leaving,.portal-transition-layer.is-entering,
  .portal-transition-layer.is-leaving::after,.portal-transition-layer.is-entering::after{animation-duration:.01ms!important;animation-delay:0!important}
}
