body:has(.app-shell) {
    margin: 0;
    background: #fff;
}

.app-screen {
    display: none;
}

.app-screen.is-show {
    display: block;
}

.app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    background: #fff;
    border-top: 1px solid #e8edf3;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(20, 40, 70, 0.06);
}

.app-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a93a3;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app-tab .rh-ico {
    width: 22px;
    height: 22px;
}

.app-tab.is-on {
    color: #2b7fff;
}

.shop-page {
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    padding: 12px 16px 88px;
    background: #fff;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    color: #243447;
}

.shop-brand {
    text-align: center;
    color: #2b7fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 4px 0 14px;
}

.shop-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #5b6573;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.shop-loc .rh-ico {
    width: 16px;
    height: 16px;
    color: #2b7fff;
}

.shop-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f3f5f8;
    color: #9aa3b2;
    font-size: 14px;
    margin-bottom: 14px;
}

.shop-search input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    color: #243447;
}

.shop-search .rh-ico {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.shop-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 22px 18px 18px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #e8f3ff 0%, #d6ebff 55%, #fff4d6 100%);
}

.shop-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 54px solid #ffd54a;
    border-right: 54px solid transparent;
}

.shop-hero h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #2b7fff;
    line-height: 1.25;
}

.shop-hero p {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    color: #ff4d7a;
    letter-spacing: 0.02em;
}

.shop-hero-tag {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #ff4d7a;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.shop-promo-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 16px;
    color: #2b7fff;
    font-size: 13px;
    font-weight: 700;
}

.shop-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
    margin-bottom: 16px;
}

.shop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #243447;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.shop-icon i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f4f7fb;
    color: #2b7fff;
}

.shop-icon .rh-ico {
    width: 24px;
    height: 24px;
}

.shop-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.shop-sec-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.shop-sec-head span {
    color: #8a93a3;
    font-size: 13px;
}

.shop-store {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #f3f5f8;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
}

.shop-store-cover {
    aspect-ratio: 7 / 5;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b7fff 60%, #93c5fd 100%);
}

.shop-store-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-store-empty {
    margin: 8px 0 0;
    color: #8a93a3;
    font-size: 14px;
}

.shop-store-body {
    padding: 10px 12px 12px;
    background: #fff;
}

.shop-store-body strong {
    display: block;
    font-size: 15px;
}

.shop-store-body small {
    color: #8a93a3;
}

.empty-page {
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 20px 88px;
    text-align: center;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
}

.empty-page h1 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #243447;
}

.empty-page p {
    margin: 0;
    color: #8a93a3;
}

.app-brand {
    display: none;
}

@media (min-width: 700px) {
    body:has(.app-shell),
    body:has(.resthome-page) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-height: 100vh;
        background: #f4f8fb;
    }

    .app-tabbar {
        order: -1;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        align-items: center;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        padding: 0 max(24px, calc((100% - 1180px) / 2));
        border: 0;
        border-bottom: 1px solid #eceff3;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
        z-index: 40;
    }

    .app-tabbar::before {
        content: "OPQ";
        margin-right: auto;
        color: #2b7fff;
        font-size: 28px;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.2;
        font-family: 'Microsoft JhengHei', Arial, sans-serif;
    }

    .app-tabbar:has(.app-brand)::before {
        content: none;
    }

    .app-brand {
        display: block;
        margin-right: auto;
        min-width: 0;
        max-width: 46%;
        overflow: hidden;
        color: #2b7fff;
        font-size: 28px;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-family: 'Microsoft JhengHei', Arial, sans-serif;
    }

    .app-tab {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 8px;
        min-height: 64px;
        padding: 0 18px;
        border-radius: 0;
        color: #3d4654;
        font-size: 18px;
    }

    .app-tab.is-on {
        color: #2b7fff;
        background: transparent;
        box-shadow: inset 0 -2px 0 #2b7fff;
    }

    .app-tab:hover {
        color: #2b7fff;
    }

    .shop-page {
        width: min(1180px, calc(100% - 48px));
        max-width: none;
        min-height: 0;
        margin: 22px auto 48px;
        padding: 8px 0 24px;
        background: transparent;
    }

    .shop-brand {
        display: none;
    }

    .shop-stores {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .shop-stores .shop-store {
        margin-bottom: 0;
    }

    .empty-page {
        width: min(720px, calc(100% - 48px));
        max-width: none;
        min-height: 0;
        margin: 48px auto;
        padding: 72px 32px;
    }

    .home-page {
        min-height: 0;
        padding-bottom: 48px;
    }

    .home-container {
        max-width: 720px;
    }
}
