:root {
    --bg: #121212;
    --accent: #0CABA8;
    --link: #80D7CF;
    --text-primary: #FFFFFF;
    --font: 'Chiron Hei HK', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    overflow-x: hidden;
}

.page {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    background: var(--bg);
    overflow-x: hidden;
    overflow-y: auto;
}

/* ── 포스터 영역 ── */
.poster-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    overflow: hidden;
    z-index: 1;
}

.poster-fade {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    pointer-events: none;
    height: calc(50vh / 6);
}

.poster-fade--top {
    top: 0;
    background: linear-gradient(to bottom, var(--bg), transparent);
}

.poster-fade--bottom {
    bottom: 0;
    background: linear-gradient(to top, var(--bg), transparent);
}

.poster-rows {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.poster-row {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.poster-track {
    display: flex;
    height: 100%;
    width: max-content;
    will-change: transform;
    gap: 4px;
}

.poster-track.entrance-animate-left {
    animation: entrance-from-left 1000ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

.poster-track.entrance-animate-right {
    animation: entrance-from-right 1000ms cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes entrance-from-left {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

@keyframes entrance-from-right {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.poster-track.marquee-left {
    animation: marquee-left 60s linear infinite;
}

.poster-track.marquee-right {
    animation: marquee-right 70s linear infinite;
}

.poster-row--3 .poster-track.marquee-left {
    animation-duration: 66s;
}

@keyframes marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes marquee-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.poster-item {
    flex-shrink: 0;
    height: 100%;
    width: calc((50vh / 3) * (2 / 3));
    padding: 4px;
}

.poster-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ── 중앙 로고 ── */
.logo-center {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 36px;
    z-index: 10;
    object-fit: contain;
}

/* ── 하단 콘텐츠 (뷰포트 하단 50%) ── */
.content {
    position: absolute;
    top: 50vh;
    top: 50dvh;
    left: 0;
    right: 0;
    height: 50vh;
    height: 50dvh;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.welcome-block {
    flex-shrink: 0;
    width: 100%;
    max-width: 480px;
    text-align: center;
    /* 로고 하단(50% + 18px) + 12px 간격 */
    padding-top: calc(18px + 12px);
}

.actions-block {
    flex: 1;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: min(11vw, 64px);
    min-height: 0;
}

.welcome-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--accent);
}

.welcome-subtitle {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--text-primary);
}

.play-store-link {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: min(10vw, 60px);
    line-height: 0;
    cursor: pointer;
}

.play-store-badge {
    display: block;
    width: auto;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.legal-links {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    width: 50vw;
    margin: 0 auto;
    transform: translateY(-28px);
}

.copyright {
    flex-shrink: 0;
    width: 50vw;
    margin: 20px auto 0;
    padding-bottom: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
}

.legal-link {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--link);
    text-decoration: none;
}

.legal-link--terms {
    text-align: left;
}

.legal-link--privacy {
    text-align: center;
}

.legal-link--tiktok {
    text-align: right;
}

.legal-link:hover {
    opacity: 0.85;
}

/* ── PC ── */
@media (min-width: 768px) {
    .welcome-block,
    .actions-block {
        max-width: 480px;
    }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .poster-track.entrance-animate-left,
    .poster-track.entrance-animate-right {
        animation: none;
    }

    .poster-track.marquee-left,
    .poster-track.marquee-right {
        animation: none;
    }
}
