/* Homepage-only styles. Every selector is prefixed with sgc-home/host to keep
   the receive, record and mine menus independent. */
body.sgc-home-active {
    background: #eaf2f8;
}

body.sgc-home-active .sgc-home-host > :not(.sgc-home-shell):not(.feature-tabbar):not(.tabbar):not(uni-tabbar) {
    display: none !important;
}

.sgc-home-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 465px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 18px 14px 96px;
    box-sizing: border-box;
    overflow-x: hidden;
    background: linear-gradient(180deg, #fffaf7 0%, #f4fbfd 100%);
    color: #24364b;
}

.sgc-home-card {
    border-radius: 12px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 8px 24px rgba(67, 91, 115, .08);
}

.sgc-home-carousel {
    margin-bottom: 12px;
    padding: 8px;
}

.sgc-home-carousel-track {
    overflow: hidden;
    border-radius: 10px;
}

.sgc-home-banner {
    display: block;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f1f4f7;
    color: #9aa9b7;
    text-align: center;
    text-decoration: none;
}

.sgc-home-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sgc-home-empty {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fff1ea, #ffe2df 55%, #f6e9f4);
}

.sgc-home-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 2px;
}

.sgc-home-carousel-dots i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #f5cfc6;
}

.sgc-home-carousel-dots i.is-active {
    width: 18px;
    background: #ff654f;
}

.sgc-home-account {
    margin-bottom: 12px;
    padding: 12px;
}

.sgc-home-account h2,
.sgc-home-links h2 {
    margin: 0 0 10px;
    color: #172d46;
    font-size: 16px;
}

.sgc-home-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sgc-home-account-grid > div {
    padding: 8px 10px;
    border-radius: 9px;
    background: #f5f8fb;
}

.sgc-home-account-grid > div.is-money {
    background: #fff0ef;
}

.sgc-home-account small {
    display: block;
    color: #8a9aad;
    font-size: 11px;
}

.sgc-home-account strong {
    display: block;
    margin-top: 3px;
    color: #18304b;
    font-size: 14px;
}

.sgc-home-account .is-money strong {
    color: #ff4f55;
    font-size: 17px;
}

.sgc-home-announcement {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin-bottom: 12px;
    padding: 0 12px;
    overflow: hidden;
    border: 1px solid #ffd2c8;
    border-radius: 9px;
    background: #fff8f4;
    color: #b65e50;
    font-size: 13px;
}

.sgc-home-notice-icon {
    flex: 0 0 auto;
    color: #ff654f;
    font-size: 18px;
}

.sgc-home-notice-track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.sgc-home-notice-track span {
    display: inline-block;
    min-width: 100%;
    animation: sgc-home-marquee 18s linear infinite;
}

@keyframes sgc-home-marquee {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

.sgc-home-level {
    margin-bottom: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #fff4dc, #fffaf2);
}

.sgc-home-level-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sgc-home-level-badge {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f5a32c;
    color: #fff;
    font-size: 24px;
}

.sgc-home-level-head small {
    display: block;
    color: #a47a49;
    font-size: 11px;
}

.sgc-home-level-head strong {
    display: block;
    margin-top: 2px;
    color: #2c2118;
    font-size: 20px;
}

.sgc-home-score {
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    color: #986e44;
    font-size: 11px;
    white-space: nowrap;
}

.sgc-home-level-progress {
    height: 7px;
    margin: 12px 0 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f2dfc0;
}

.sgc-home-level-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #ff9d44;
}

.sgc-home-level-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sgc-home-level-chips span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #8290a0;
    font-size: 11px;
}

.sgc-home-level-chips span.is-current {
    background: #33251d;
    color: #fff;
}

.sgc-home-links {
    padding: 14px 12px;
}

.sgc-home-links-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.sgc-home-links h2 {
    margin: 0;
}

.sgc-home-mall-entry {
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb33c, #ff654f);
    box-shadow: 0 5px 12px rgba(255, 101, 79, .22);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.sgc-home-links-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.sgc-home-link-tile {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 8px 4px;
    border: 1px solid #edf0f3;
    border-radius: 9px;
    background: #fafbfd;
    color: #34485d;
    font-size: 11px;
    text-align: center;
    text-decoration: none;
}

.sgc-home-link-tile img {
    display: block;
    width: 56px;
    height: 34px;
    margin-bottom: 5px;
    object-fit: contain;
}

.sgc-home-link-tile.is-logo-missing img {
    visibility: hidden;
}

.sgc-home-tabbar {
    position: fixed;
    z-index: 10020;
    bottom: 0;
    left: 50%;
    display: grid;
    width: min(100%, 465px);
    min-height: 64px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    transform: translateX(-50%);
    border-top: 1px solid #e8edf2;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 24px rgba(53, 73, 94, .08);
}

.sgc-home-tabbar-button {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a99aa;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.sgc-home-tabbar-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
}

.sgc-home-tabbar-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sgc-home-tabbar-button.is-active {
    color: #ff5c59;
}

.sgc-home-tabbar-button.is-receive .sgc-home-tabbar-icon {
    width: 44px;
    height: 44px;
    margin-top: -23px;
    background: linear-gradient(135deg, #ff766d, #ff4866);
    box-shadow: 0 7px 16px rgba(255, 76, 98, .28);
    color: #fff;
}

.sgc-home-tabbar-button.is-receive .sgc-home-tabbar-label {
    color: #ff5c59;
}

.sgc-home-mall-page {
    width: min(100%, 465px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #fffaf7, #f4fbfd);
}

.sgc-home-mall-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sgc-home-mall-header button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #ff654f;
    font-size: 28px;
}

.sgc-home-mall-header h1 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 20px;
}

.sgc-home-mall-intro {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #ffd2c8;
    border-radius: 10px;
    background: #fff6f2;
    color: #bd5c4f;
}

.sgc-home-mall-empty {
    margin-top: 32px;
    padding: 42px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .84);
    color: #9aa8b5;
    text-align: center;
}

@media (max-width: 360px) {
    .sgc-home-shell {
        padding-right: 10px;
        padding-left: 10px;
    }

    .sgc-home-links-grid {
        gap: 6px;
    }

    .sgc-home-link-tile img {
        width: 48px;
    }
}
