.footer-box {
    background-color: #181818;
    width: 100%;
    overflow: hidden;
}

.footer-social-home {
    display: none;
}

a.footer-social-home-item {
    border-radius: 50%;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

/* Homepage PC footer — exact 1920px Figma proportions with viewport scaling. */
@media (min-width: 1024px) {
    body.home-page .footer-box {
        min-height: min(252px, 13.125vw);
        background: #282828;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.home-page .footer-outer {
        width: min(1800px, calc(100% - 120px));
        max-width: none;
        min-height: min(251px, 13.072917vw);
        padding: min(24px, 1.25vw) 0;
        gap: min(12px, 0.625vw);
    }

    body.home-page .footer-main {
        gap: min(32px, 1.666667vw);
    }

    body.home-page .footer-product {
        gap: min(18px, 0.9375vw);
    }

    body.home-page .footer-brand {
        gap: min(18px, 0.9375vw);
    }

    body.home-page .footer-logo {
        width: min(178px, 9.270833vw);
        height: min(49px, 2.552083vw);
        object-fit: contain;
    }

    body.home-page .footer-brand .footer-muted-text {
        font-size: clamp(14px, 0.9375vw, 18px);
        line-height: clamp(20px, 1.25vw, 24px);
    }

    body.home-page .footer-contact {
        gap: min(4px, 0.208333vw);
    }

    body.home-page .footer-contact-line,
    body.home-page .footer-links {
        font-size: clamp(12px, 0.833333vw, 16px);
        line-height: clamp(18px, 1.145833vw, 22px);
    }

    body.home-page .footer-links {
        gap: min(15px, 0.78125vw);
    }

    body.home-page .footer-links a + a {
        padding-left: min(16px, 0.833333vw);
    }

    body.home-page .footer-links a + a::before {
        height: min(18px, 0.9375vw);
    }

    body.home-page .footer-bottom {
        min-height: min(38px, 1.979167vw);
        gap: min(24px, 1.25vw);
    }

    body.home-page .footer-copy {
        font-size: clamp(11px, 0.729167vw, 14px);
        line-height: clamp(16px, 1.041667vw, 20px);
    }

    body.home-page .footer-social {
        display: none;
    }

    body.home-page .footer-social-home {
        display: flex;
        align-items: center;
        gap: min(16px, 0.833333vw);
    }

    body.home-page .footer-social-home-item,
    body.home-page .footer-social-home-item img {
        width: min(38px, 1.979167vw);
        height: min(38px, 1.979167vw);
        display: block;
        flex: 0 0 auto;
    }
}

.footer-muted-text {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
}

.footer-outer {
    align-self: stretch;
    width: min(1800px, calc(100% - 120px));
    max-width: none;
    padding: 36px 0;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    display: flex;
    box-sizing: border-box;
    margin: 0 auto;
}

.footer-brand {
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    display: inline-flex;
}

.footer-brand-lockup {
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    display: inline-flex;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 180ms ease, transform 180ms ease;
}

.footer-brand-lockup:hover,
.footer-brand-lockup:focus-visible {
    opacity: 0.82;
    transform: translateY(-1px);
}

.footer-logo {
    width: auto;
    height: 36px;
    display: block;
}

.footer-icon-link--h5 {
    display: none;
}

.footer-row {
    align-self: stretch;
    height: 24px;
    justify-content: space-between;
    align-items: center;
    display: flex;
    gap: 18px;
}

.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #EC237F;
}

.footer-contact {
    display: none;
}

.footer-contact-line {
    justify-content: center;
    display: flex;
    flex-direction: column;
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
    text-decoration: none;
    transition: color 180ms ease;
}

a.footer-contact-line:hover,
a.footer-contact-line:focus-visible {
    color: #EC237F;
}

.footer-icon-link {
    display: block;
    line-height: 0;
    width: 24px;
    height: 24px;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.footer-icon-link:hover,
.footer-icon-link:focus-visible,
a.footer-social-home-item:hover,
a.footer-social-home-item:focus-visible {
    background-color: rgba(250, 220, 68, 0.18);
    box-shadow: 0 0 0 1px rgba(250, 220, 68, 0.45);
    transform: translateY(-2px);
}

.footer-contact-sep {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.20);
}

.footer-icons {
    justify-content: center;
    align-items: center;
    gap: 18px;
    display: flex;
    flex-shrink: 0;
}

.footer-icon-outer {
    width: 24px;
    height: 24px;
    position: relative;
    overflow: hidden;
    display: block;
    object-fit: contain;
}

.footer-icon-divider {
    width: 1px;
    height: 15px;
    background: white;
}

.footer-copy {
    color: #A3A3A3;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
}

.footer-social {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-social-label {
    display: none;
}

.h5-tabbar {
    display: none;
}

@media (max-width: 1200px) {
    .footer-outer {
        padding-left: 48px;
        padding-right: 48px;
    }
}

@media (max-width: 767px) {
    .footer-box {
        background: #0A0A0A;
        padding: 0 16px 24px;
        box-sizing: border-box;
    }

    .footer-outer {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.05);
        overflow: hidden;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.10);
    }

    .footer-row {
        display: contents;
    }

    .footer-brand {
        gap: 4px;
        order: 1;
        width: 100%;
    }

    .footer-brand-lockup {
        gap: 4px;
    }

    .footer-logo {
        width: auto;
        height: 32px;
        display: block;
        flex-shrink: 0;
    }

    .footer-brand .footer-muted-text {
        display: none;
    }

    .footer-copy {
        order: 2;
        color: white;
        font-size: 12px;
        line-height: 18px;
    }

    .footer-links {
        order: 3;
        flex-wrap: wrap;
        align-content: center;
        align-items: center;
        white-space: normal;
        gap: 12px;
        width: 100%;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.60);
        font-size: 12px;
        line-height: 18px;
    }

    .footer-links a + a {
        position: relative;
        padding-left: 13px;
    }

    .footer-links a + a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 12px;
        background: rgba(255, 255, 255, 0.20);
    }

    .footer-contact {
        display: none;
    }

    .footer-social {
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.10);
        box-sizing: border-box;
    }

    .footer-social-label {
        display: block;
        color: white;
        font-size: 14px;
        font-family: PingFang SC, sans-serif;
        font-weight: 400;
        line-height: 20px;
    }

    .footer-icons {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
    }

    .footer-icon-divider {
        display: none;
    }

    .footer-icon-link,
    .footer-icon-link--h5 {
        width: 38px;
        height: 38px;
        background: rgba(255, 255, 255, 0.10);
        border-radius: 9999px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .footer-icon-link .footer-icon-outer {
        width: 18px;
        height: 18px;
    }

    body.has-h5-tabbar .h5-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        width: 100%;
        padding: 6px 16px calc(6px + env(safe-area-inset-bottom, 0px));
        background: #101010;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }

    .h5-tabbar-item {
        flex: 1 1 0;
        padding: 2px 16px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2px;
        display: flex;
        text-decoration: none;
        color: #808080;
        font-size: 12px;
        font-family: PingFang SC, sans-serif;
        font-weight: 400;
        line-height: 18px;
        text-align: center;
        transition: color 180ms ease, background-color 180ms ease;
    }

    .h5-tabbar-icon {
        width: 24px;
        height: 24px;
        display: block;
        object-fit: contain;
    }

    .h5-tabbar-item.is-active {
        color: #EC237F;
    }

    .h5-tabbar-item:hover,
    .h5-tabbar-item:focus-visible {
        color: #EC237F;
        background: rgba(250, 220, 68, 0.08);
        border-radius: 8px;
    }

    body.has-h5-tabbar {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }
}

/* Shared Figma footer shell used by the home and ranking pages. */
.home-mobile-footer {
    display: none;
}

body.site-shell.rank-page-body,
body.site-shell.list-page-body {
    --site-footer-margin-top: 18px;
}

@media (min-width: 1024px) {
    body.site-shell .footer-box {
        min-height: min(252px, 13.125vw);
        background: #282828;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.site-shell .footer-outer {
        width: min(1800px, calc(100% - 120px));
        max-width: none;
        min-height: min(251px, 13.072917vw);
        padding: min(24px, 1.25vw) 0;
        gap: min(12px, 0.625vw);
    }

    body.site-shell .footer-main {
        gap: min(32px, 1.666667vw);
    }

    body.site-shell .footer-product,
    body.site-shell .footer-brand {
        gap: min(18px, 0.9375vw);
    }

    body.site-shell .footer-logo {
        width: min(178px, 9.270833vw);
        height: min(49px, 2.552083vw);
        object-fit: contain;
    }

    body.site-shell .footer-brand .footer-muted-text {
        font-size: clamp(14px, 0.9375vw, 18px);
        line-height: clamp(20px, 1.25vw, 24px);
    }

    body.site-shell .footer-contact {
        gap: min(4px, 0.208333vw);
    }

    body.site-shell .footer-contact-line,
    body.site-shell .footer-links {
        font-size: clamp(12px, 0.833333vw, 16px);
        line-height: clamp(18px, 1.145833vw, 22px);
    }

    body.site-shell .footer-bottom {
        min-height: min(38px, 1.979167vw);
        gap: min(24px, 1.25vw);
    }

    body.site-shell .footer-copy {
        font-size: clamp(11px, 0.729167vw, 14px);
        line-height: clamp(16px, 1.041667vw, 20px);
    }

    body.site-shell .footer-social {
        display: none;
    }

    body.site-shell .footer-social-home {
        display: flex;
        align-items: center;
        gap: min(16px, 0.833333vw);
    }

    body.site-shell .footer-social-home-item,
    body.site-shell .footer-social-home-item img {
        width: min(38px, 1.979167vw);
        height: min(38px, 1.979167vw);
        display: block;
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    body.site-shell.has-h5-tabbar {
        padding-bottom: 0;
    }

    body.site-shell.has-h5-tabbar .h5-tabbar,
    body.site-shell > .footer-box {
        display: none;
    }

    body.site-shell .home-mobile-footer {
        width: calc(100% - (2 * var(--site-shell-gutter)));
        margin: var(--site-footer-margin-top) var(--site-shell-gutter) max(12px, env(safe-area-inset-bottom, 0px));
        padding: 18px 16px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 18px;
        overflow: hidden;
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 18px;
    }

    .site-shell .home-mobile-footer-logo {
        width: auto;
        height: 39.5px;
        display: block;
        object-fit: contain;
    }

    .site-shell .home-mobile-footer-legal {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        color: rgba(255, 255, 255, 0.55);
        font: 400 12px/18px "PingFang SC", sans-serif;
    }

    .site-shell .home-mobile-footer-legal p {
        margin: 0;
    }

    .site-shell .home-mobile-footer-links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 12px;
        font: 400 12px/18px "PingFang SC", sans-serif;
    }

    .site-shell .home-mobile-footer-links a {
        position: relative;
        padding-left: 13px;
        color: #fff;
        text-decoration: none;
        transition: color 180ms ease;
    }

    .site-shell .home-mobile-footer-links a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 12px;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-50%);
    }

    .site-shell .home-mobile-footer-links a:hover,
    .site-shell .home-mobile-footer-links a:focus-visible {
        color: #EC237F;
    }

    .site-shell .home-mobile-footer-divider {
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .site-shell .home-mobile-footer-actions {
        width: 100%;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .site-shell .home-mobile-footer-social {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .site-shell .home-mobile-footer-social a,
    .site-shell .home-mobile-footer-social span,
    .site-shell .home-mobile-footer-social img {
        width: 38px;
        height: 38px;
        display: block;
        flex: 0 0 auto;
    }

    .site-shell .home-mobile-footer-social a {
        border-radius: 50%;
        transition: box-shadow 180ms ease, transform 180ms ease;
    }

    .site-shell .home-mobile-footer-social a:hover,
    .site-shell .home-mobile-footer-social a:focus-visible {
        box-shadow: 0 0 0 2px rgba(250, 220, 68, 0.5);
        transform: translateY(-2px);
    }

    .site-shell .home-mobile-footer-top {
        width: 36px;
        height: 36px;
        padding: 0;
        display: block;
        border: 0;
        border-radius: 999px;
        background: transparent;
        cursor: pointer;
    }

    .site-shell .home-mobile-footer-top img {
        display: block;
        width: 36px;
        height: 36px;
    }
}

/* Footer structure shared by the refreshed home and the existing pages. */
.footer-outer {
    width: min(1800px, calc(100% - 120px));
    max-width: 1800px;
    padding: 36px 0;
    gap: 12px;
}

.footer-main {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.footer-product {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer-brand {
    gap: 18px;
}

.footer-logo {
    height: 49px;
}

.footer-brand .footer-muted-text {
    font-size: 18px;
    line-height: 24px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.footer-contact-line {
    font-size: 16px;
    line-height: 22px;
}

.footer-links {
    gap: 15px;
    color: #FFFFFF;
    font-size: 16px;
    line-height: 22px;
}

.footer-links a + a {
    position: relative;
    padding-left: 16px;
}

.footer-links a + a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%);
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-copy {
    font-size: 14px;
    line-height: 20px;
}

.footer-social {
    display: flex;
}

.footer-icons {
    gap: 16px;
}

.footer-icon-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.footer-icon-link .footer-icon-outer {
    width: 20px;
    height: 20px;
}

.footer-icon-divider {
    display: none;
}

/* Desktop: the brand row spans the full footer instead of inheriting the
   narrower product column used by contacts. */
@media (min-width: 768px) {
    .footer-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        column-gap: 32px;
        row-gap: 18px;
    }

    .footer-product {
        display: contents;
    }

    .footer-brand {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        min-width: 0;
    }

    .footer-contact {
        grid-column: 1;
        grid-row: 2;
    }

    .footer-links {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
}

@media (max-width: 767px) {
    .footer-box {
        padding: 0 16px 24px;
        background: #0F0F0F;
    }

    .footer-outer {
        width: 100%;
        max-width: none;
        padding: 18px 16px;
        gap: 18px;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 18px;
    }

    .footer-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .footer-product {
        display: flex;
        width: 100%;
        align-items: center;
        gap: 10px;
    }

    .footer-brand {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-logo {
        height: 34px;
    }

    .footer-brand .footer-muted-text {
        display: block;
        width: 100%;
        color: rgba(255, 255, 255, 0.55);
        font-size: 12px;
        line-height: 18px;
        text-align: left;
    }

    .footer-contact {
        display: none;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
        gap: 12px;
        color: #FFFFFF;
        font-size: 12px;
        line-height: 18px;
    }

    .footer-links a + a {
        padding-left: 13px;
    }

    .footer-links a + a::before {
        height: 12px;
    }

    .footer-bottom {
        align-items: center;
    }

    .footer-copy {
        color: rgba(255, 255, 255, 0.55);
        font-size: 12px;
        line-height: 18px;
    }

    .footer-social {
        width: auto;
        padding: 0;
        border: 0;
    }

    .footer-social-label {
        display: none;
    }

    .footer-icons {
        width: auto;
        gap: 12px;
    }

    .footer-icon-link,
    .footer-icon-link--h5 {
        width: 36px;
        height: 36px;
    }

    body.home-page.has-h5-tabbar {
        padding-bottom: 0;
    }

    body.home-page.has-h5-tabbar .h5-tabbar {
        display: none;
    }
}
