/*#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;
}
/* 非作用且不在轉場中的 page 完全隱藏 */
.pg:not(.is-active):not(.use-transition) {
    visibility: hidden;
}
/* 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, 100cqh, 0);
}
.pg.pg-action__slide-down:not(.is-active) {
    transform: translate3d(0, -100cqh, 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;

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

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

/*#region - PAGE CONTENT - */
.page-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5cqw;
    text-align: center;
}
/*#endregion */

/*#region - P01_POINT CARD_CONTENT - */
.point-card__stamps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4cqw;
}
/*#endregion */

/*#region - P01_POINT CARD_STAMP - */
.stamp {
    width: 20cqw;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 0.6cqw dashed #aaa;
    border-radius: 50%;
    color: #777;
}

.stamp.is-collected {
    border-style: solid;
    border-color: #167c42;
    background: #dff5e7;
    color: #167c42;
}

.stamp.is-collecting {
    animation: jello-horizontal 1s both;
    transition:
        opacity 0.2s ease-out,
        background-color 0.2s ease-out;
    border-style: solid;
    border-color: #167c42;
    background: #dff5e7;
    color: #167c42;
}

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

/*#region - P02_SCANNER_CONTENT - */
.scanner__camera {
    width: 76cqw;
    aspect-ratio: 1;
    overflow: hidden;
    background: #333;
}

.scanner__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.scanner__status {
    min-height: 6cqw;
    color: #333;
    font-size: 3.8cqw;
}
/*#endregion */
