* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

.wrap-body {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background-color: #12051c;
    background-image: url(../images/bg-h5.webp?v=20261109-5);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

a {
    text-decoration: none;
    color: #fff;
}

.header-area {
    position: relative;
    z-index: 20;
    width: 100%;
}

.header-activity {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 0.7rem 0;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
}

.logoo {
    display: block;
    width: auto;
    height: 3.125rem;
}

.icon-img.icon-pc,
.logoo.icon-pc {
    display: none !important;
}

.contact-list {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btnimg.sp,
.btn_list.backup {
    display: none;
}

.icon-img {
    display: block;
    width: auto;
    height: 3.6rem;
}

.main-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100dvh - 4.2rem);
}

.pc-stage,
.char-pc {
    display: none;
}

.covers {
    position: relative;
    z-index: 4;
    width: 100%;
    margin: 0 0 0.55rem;
    overflow: hidden;
    pointer-events: none;
}

.covers-track {
    display: flex;
    width: max-content;
    animation: covers-scroll 40s linear infinite;
}

.covers-track img {
    display: block;
    flex-shrink: 0;
    height: 4.5rem;
    width: auto;
    user-select: none;
}

@keyframes covers-scroll {
    to {
        transform: translateX(calc(-100% / 3));
    }
}

.h5-hero {
    position: relative;
    flex: 1;
    min-height: 18rem;
    width: 100%;
}

.hero-h5-group {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 78%;
    width: 100%;
    object-fit: contain;
    object-position: center top;
    pointer-events: none;
    opacity: 0;
    transform: scale(1.05);
    transition:
        opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-h5-group.is-active {
    opacity: 1;
    transform: scale(1);
}

.title-h5 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.footer-area {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
}

.app {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.15rem;
    width: 100%;
}

.btn_list {
    flex: 1;
    max-width: 48%;
}

.btn_list img {
    display: block;
    width: 100%;
    height: auto;
}

.setup-tips-container {
    display: flex;
    justify-content: center;
    padding: 0.7rem 0 0;
}

.setup-tips-container img {
    width: auto;
    height: 1.5rem;
}

.qr-area {
    display: none;
}

.spinner-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 5, 28, 0.85);
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #e040fb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pwa-entry {
    position: fixed;
    display: flex;
    bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    right: max(calc((100vw - 750px) / 2 + 10px), 10px);
    flex-direction: column;
    align-items: center;
    width: min(18.6667vw, 140px);
    padding: 0;
    border: 0;
    background: transparent;
    color: #f3e6ff;
    cursor: pointer;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.pwa-entry[hidden] {
    display: none !important;
}

.pwa-entry-icon {
    position: relative;
    display: block;
    width: min(16vw, 120px);
    height: min(16vw, 120px);
    pointer-events: none;
}

.pwa-entry-icon img {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: min(17.3333vw, 130px);
    height: min(16.2667vw, 122px);
    max-width: none;
    transform: translateX(-50%);
    pointer-events: none;
}

.pwa-entry > span:last-child {
    display: flex;
    width: 100%;
    height: min(6.4vw, 48px);
    align-items: center;
    justify-content: center;
    border: min(0.1333vw, 1px) solid #d48bff;
    border-radius: 999px;
    background: linear-gradient(90deg, #a24dff, #6b1cb8);
    box-shadow: 0 min(0.5333vw, 4px) min(0.2667vw, 2px) rgba(0, 0, 0, 0.25);
    font-size: min(3.2vw, 24px);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-h5-group {
        transition: none;
    }
}

@media screen and (min-width: 768px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .wrap-body {
        background-image: url(../images/bg-pc.webp?v=20261109-5);
        background-position: center center;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .header-area {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
    }

    .header-activity {
        align-items: flex-start;
        padding: 2.78vh 1.04vw 0 1.56vw;
    }

    .logoo {
        height: clamp(3.4rem, 9.26vh, 6.25rem);
    }

    .icon-img.icon-h5,
    .logoo.icon-h5,
    .title-h5 {
        display: none !important;
    }

    .icon-img.icon-pc,
    .logoo.icon-pc {
        display: block !important;
    }

    .icon-img.icon-pc {
        height: clamp(1.7rem, 3.52vh, 2.375rem);
    }

    .contact-list {
        gap: 0.83vw;
        align-items: center;
        padding-top: 0.2vh;
    }

    .main-content {
        height: 100%;
        min-height: 0;
    }

    .h5-hero,
    .app,
    .setup-tips-container {
        display: none;
    }

    .pc-stage {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 5;
        pointer-events: none;
    }

    .title-pc {
        display: block;
        position: absolute;
        left: 3.96%;
        top: 13.89%;
        width: 46.35%;
        height: auto;
        pointer-events: none;
    }

    .qr-area {
        display: block;
        position: absolute;
        left: 5.83%;
        top: 54.72%;
        width: 42.4%;
        pointer-events: auto;
    }

    .qr-panel {
        position: relative;
        width: 100%;
        aspect-ratio: 814 / 250;
    }

    .qr-panel-bg {
        display: block;
        width: 100%;
        height: auto;
        pointer-events: none;
    }

    .qr-code {
        position: absolute;
        left: 4.55%;
        top: 18.4%;
        width: 16.2%;
        height: 52.8%;
        overflow: hidden;
        border-radius: 0.28rem;
    }

    .qr-code canvas,
    .qr-code img,
    .qr-code table {
        display: block;
        width: 100% !important;
        height: 100% !important;
    }

    .char-pc {
        display: block;
        position: absolute;
        z-index: 2;
        right: 0;
        bottom: 0;
        height: min(100dvh, calc(51.5104vw * 1080 / 989), 1080px);
        width: auto;
        aspect-ratio: 989 / 1080;
        object-fit: fill;
        pointer-events: none;
        opacity: 0;
        transform: scale(1.05);
        transition:
            opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1),
            transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .char-pc.is-active {
        opacity: 1;
        transform: scale(1);
    }

    .covers {
        display: block;
        position: absolute;
        z-index: 4;
        left: 0;
        right: 0;
        bottom: 2.78vh;
        margin: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .covers-track {
        animation-duration: 80s;
    }

    .covers-track img {
        height: min(18.52dvh, 200px);
        margin-right: 0.63vw;
    }

    .footer-area {
        display: none;
    }

    .pwa-entry {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .char-pc {
        transition: none;
    }
}
