/* Shared square promo ads — used by home / detail / play / user-center. */ .square-promo { --square-promo-s: var(--detail-s, var(--play-s, var(--account-s, min(1, 100vw / 1920px)))); box-sizing: border-box; width: 100%; overflow: hidden; } .square-promo__track { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; width: max-content; max-width: 100%; } .square-promo__group { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: flex-start; gap: 16px; } .square-promo.is-marquee .square-promo__track { max-width: none; animation: square-promo-marquee 28s linear infinite; will-change: transform; } .square-promo.is-marquee .square-promo__group { padding-right: 16px; } .square-promo.is-marquee:hover .square-promo__track { animation-play-state: paused; } @keyframes square-promo-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } } @media (prefers-reduced-motion: reduce) { .square-promo.is-marquee .square-promo__track { animation: none; } } .square-promo__item { width: 80px; min-width: 80px; flex: 0 0 80px; display: inline-flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 4px; color: #fff; font-size: 12px; font-family: "PingFang SC", sans-serif; font-weight: 400; line-height: 18px; text-align: center; text-decoration: none; box-sizing: border-box; } .square-promo__item:visited { color: #fff; } .square-promo__cover { position: relative; display: block; width: 80px; height: 80px; overflow: hidden; background: #464646; border-radius: 12px; outline: 1px solid rgba(255, 255, 255, 0.3); outline-offset: -1px; box-sizing: border-box; } .square-promo__cover img { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; object-fit: cover; } .square-promo__title { display: block; width: 100%; max-width: 100%; color: #fff; font-size: inherit; font-weight: 400; line-height: 18px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; } @media (min-width: 768px) { .square-promo { height: calc(102px * var(--square-promo-s)); display: flex; align-items: center; } .square-promo__track { width: 100%; max-width: 100%; height: 100%; justify-content: flex-start; align-items: center; } .square-promo__group { height: 100%; align-items: center; gap: calc(16px * var(--square-promo-s)); } .square-promo.is-marquee .square-promo__group { padding-right: calc(16px * var(--square-promo-s)); } .square-promo__item { width: calc(80px * var(--square-promo-s)); min-width: calc(80px * var(--square-promo-s)); flex: 0 0 calc(80px * var(--square-promo-s)); gap: calc(4px * var(--square-promo-s)); font-size: calc(12px * var(--square-promo-s)); line-height: calc(18px * var(--square-promo-s)); } .square-promo__cover { width: calc(80px * var(--square-promo-s)); height: calc(80px * var(--square-promo-s)); border-radius: calc(12px * var(--square-promo-s)); } .square-promo__title { font-size: calc(12px * var(--square-promo-s)); line-height: calc(18px * var(--square-promo-s)); white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; text-overflow: ellipsis; } } @media (max-width: 767px) { .square-promo--pc-only { display: none !important; } .square-promo { min-height: 78px; height: auto; display: block; } .square-promo__group { gap: 8px; padding-right: 0; } .square-promo.is-marquee .square-promo__group { padding-right: 8px; } .square-promo__item { width: clamp(48px, 14.933333vw, 56px); min-width: clamp(48px, 14.933333vw, 56px); flex: 0 0 clamp(48px, 14.933333vw, 56px); gap: 4px; font-size: 12px; line-height: 18px; } .square-promo__cover { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 9px; outline-color: rgba(255, 255, 255, 0.1); } .square-promo__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }