html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, "Microsoft YaHei", 微软雅黑, sans-serif;
    min-height: 100%;
    height: 100%;
    width: 100%;
    background: #f6f8fa;
    box-sizing: border-box;
    overflow-x: hidden;
    font-size: clamp(14px, 3.8vw, 18px);
}

body.modal-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    transition: 0.2s;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #f4b400;
    outline-offset: 3px;
}

p {
    margin: 0;
}

img {
    line-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
    display: block;
}

.section {
    background: #fff url(../img/BG.png) 50% 00% no-repeat;
    background-image: image-set(url(../img/BG.webp) type("image/webp"), url(../img/BG.png) type("image/png"));
    background-size: 100% auto;
    margin: 0 auto;
    width: min(100%, 540px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
}

header {
    width: 100%;
    min-height: 64px;
    height: 9vh;
    padding: env(safe-area-inset-top) 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.logo {
    height: min(3rem, 55px);
}

header .btn img {
    height: min(2.2rem, 33px);
}

header .btn:hover {
    filter: brightness(1.2);
    transition: 0s;
}


/* 視覺 */
.main {
    display: block;
    text-align: center;
    transition: .5s;
    animation: fadeDown_In 1s;
    width: min(100%, 500px);
    margin-bottom: .2rem;
}

.main picture,
.pop picture {
    display: block;
}

@keyframes fadeDown_In {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.main img {
    width: 100%;
    height: auto;
}

.container {
    width: 100%;
    padding: 0 1.5rem 2rem;
    box-sizing: border-box;
}

.menu {
    margin-bottom: .5rem;
    background: #fff;
    width: 100%;
    min-height: 68px;
    height: min(4.5rem, 75px);
    box-shadow: 0 0 min(1.5vw, 8px) rgba(0, 46, 166, .3);
    display: grid;
    grid-template-columns: 50% 50%;
    box-sizing: border-box;
    border-radius: .6rem;
    align-items: center;
    justify-content: space-around;
    align-content: center;
}
.menu:hover{
    box-shadow: 0 3px min(1.5vw, 15px) rgba(0, 46, 166, .3);
}

.menu_flex {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: min(9vw, 70%);
}

.menu img {
    height: 100%;
}

.menu span {
    color: #002ea6;
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.popBtn {
    color: #fff;
    background: #002ea6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: .8rem;
    border-radius: 6px;
    cursor: pointer;
    position: fixed;
    z-index: 1;
    bottom: 5%;
    overflow: hidden;
}

.popBtn[hidden] {
    display: none;
}

.install-btn,
.dismiss-btn {
    min-height: 38px;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .8rem .5rem 1rem;
}

.install-btn img {
    height: .9rem;
    margin-right: .5rem;
    display: block;
}

.install-divider {
    width: 1px;
    align-self: stretch;
    margin: 8px 0;
    background: rgba(255, 255, 255, .45);
}

.dismiss-btn {
    padding: .5rem .85rem;
}

.install-btn:hover,
.dismiss-btn:hover {
    background: rgba(255, 255, 255, .14);
}

/* 彈窗 */
.pop {
    display: none;
    position: fixed;
    z-index: 3;
    width: min(95%, 500px);
    text-align: center;
    /* top: 0; */
    top: 50%;
    max-height: min(92dvh, 900px);
    overflow-y: auto;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pop::-webkit-scrollbar,
.popImg::-webkit-scrollbar {
    display: none;
}

.popImg {
    position: relative;
    /* height: 100vh; */
    overflow: auto;
}

.close {
    width: 2.5rem;
    height: 2.5rem;
    padding: .25rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    position: fixed;
    right: 15px;
    top: 15px;
    z-index: 5;
}

.pop img {
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

.cover {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    display: none;
}

.route-loading {
    position: fixed;
    z-index: 4;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    color: #fff;
    background: rgba(0, 46, 166, .92);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
    white-space: nowrap;
}

.route-loading[hidden] {
    display: none;
}

@media screen and (max-height: 900px) {
    .section {
        width: min(100%, 500px);
    }

    .main img {
        margin: 0 auto;
        width: auto;
        height: 38vh;
    }

    .menu {
        height: min(9vh, 70px);
    }

    .popBtn { bottom: max(2%, env(safe-area-inset-bottom)); }
}

@media screen and (max-width: 500px) {
    header {
        padding: env(safe-area-inset-top) 1.2rem 0;
    }
}
