/*#region - SPLASH - */
.splash {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sp__bar-wrap {
  width: 75cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3cqw;
}
.sp__bar-bg {
  width: 100%;
  height: 0.5cqw;
  background: #ddd;
  overflow: hidden;
}
.sp__bar-fill {
  height: 0.5cqw;
  width: 0%;
  background: #3a3a3a;
  transition: width 0.08s linear;
}
.sp__pct {
  font-size: 3cqw;
  letter-spacing: 1cqw;
  color: #3a3a3a;
}
/*#endregion */

/*#region - PAGE - */
.pg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  backface-visibility: hidden;
  opacity: 1;
  pointer-events: none;
}
/* use-transition：啟用 page 切換動畫 */
.pg.use-transition {
  transition:
    transform 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.44s ease;
}
/* is-active：表示 page 已進入畫面，可被顯示 */
.pg.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* is-current：表示目前可互動的 page */
.pg.is-current {
  pointer-events: auto;
}
.pg__wrapper {
  width: 100%;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: clip;
}
/*#endregion */

/*#region - PAGE ACTION - */
.pg.pg-action__slide-left:not(.is-active) {
  transform: translate3d(100cqw, 0, 0);
}
.pg.pg-action__slide-right:not(.is-active) {
  transform: translate3d(-100cqw, 0, 0);
}
.pg.pg-action__slide-up:not(.is-active) {
  transform: translate3d(0, max(100%, calc(100cqw / (var(--base-ratio)))), 0);
}
.pg.pg-action__slide-down:not(.is-active) {
  transform: translate3d(0, -max(100%, calc(100cqw / (var(--base-ratio)))), 0);
}
.pg.pg-action__fade:not(.is-active) {
  opacity: 0;
  transform: translate3d(0, 0, 0);
}
/*#endregion */

/*#region - BUTTON - */
.btn {
  transition: all 0.1s ease;
  border: none;
  cursor: pointer;
  /* 移除連結或按鈕可能帶出的底線 */
  text-decoration: none;
  /* 避免長按或拖曳時反白選取 */
  user-select: none;
  -webkit-user-select: none;
  /* 移除行動裝置點擊高亮 */
  -webkit-tap-highlight-color: transparent;
  z-index: 100;

  &:hover {
    filter: brightness(1.02);
  }

  &:active {
    /* 按下時提供輕微回饋 */
    transform: translateY(0.2cqw);
    filter: brightness(0.95);
  }
}
/*#endregion */

/*#region - IMAGE - */
img {
  /* 避免長按拖曳反白選取、跳出瀏覽器儲存圖片選單 */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-drag: none;
}
/*#endregion */

/*#region - ANIMATION - */
@keyframes jello-horizontal {
  0% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
  30% {
    -webkit-transform: scale3d(1.25, 0.75, 1);
    transform: scale3d(1.25, 0.75, 1);
  }
  40% {
    -webkit-transform: scale3d(0.75, 1.25, 1);
    transform: scale3d(0.75, 1.25, 1);
  }
  50% {
    -webkit-transform: scale3d(1.15, 0.85, 1);
    transform: scale3d(1.15, 0.85, 1);
  }
  65% {
    -webkit-transform: scale3d(0.95, 1.05, 1);
    transform: scale3d(0.95, 1.05, 1);
  }
  75% {
    -webkit-transform: scale3d(1.05, 0.95, 1);
    transform: scale3d(1.05, 0.95, 1);
  }
  100% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
  }
}
/*#endregion */
