/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    background: #0d0d12;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

/* ===== PC: QR 코드 안내 ===== */
.seo-title{
    position:absolute;
    left:-9999px;
    width:1px;
    height:1px;
    overflow:hidden;
}

.desktop-gate {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 77, 136, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(120, 60, 200, 0.12) 0%, transparent 60%),
        #0d0d12;
}

.desktop-gate__card {
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.desktop-gate__logo {
    width: 120px;
    margin: 0 auto 28px;
}

.desktop-gate__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: #fff;
}

.desktop-gate__desc {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 32px;
}

.desktop-gate__qr-wrap {
    display: inline-flex;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
}

.desktop-gate__qr {
    width: 220px;
    height: 220px;
}

.desktop-gate__qr img,
.desktop-gate__qr canvas {
    display: block;
    image-rendering: pixelated;
}

.desktop-gate__hint {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
}

@media (min-width: 769px) {
    .desktop-gate {
        display: flex;
    }

    .mobile-only {
        display: none !important;
    }
}

/* ===== 모바일: 랜딩 페이지 ===== */
.mobile-only {
    display: block;
}

.app-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.main {
    position: relative;
    width: 100%;
    /* 하단 다운로드 바 공간 확보, 이미지 하단 가림 방지 */
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

.main-box {
    width: 100%;
}

.hero-bg {
    width: 100%;
    height: auto;
    vertical-align: top;
}

.download-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 999;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 15, 15, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 8px 32px rgba(0,0,0,.45),
        inset 0 1px 0 rgba(255,255,255,.05);
    padding-bottom: calc(
        14px + env(safe-area-inset-bottom)
    );
}

.download-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    max-width: 360px;
    margin: 0 auto;
}

.store-btn {
    flex: 1;
    max-width: 168px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-btn:active {
    transform: scale(0.96);
    opacity: 0.85;
}

.store-btn img {
    width: 100%;
    height: auto;
}

/* ===== 팝업 ===== */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#overlay.is-open {
    display: flex;
}

.popup {
    position: relative;
    width: 100%;
    max-width: 280px;
    padding: 40px 24px 32px;
    background: rgba(20, 20, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-align: center;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close img {
    width: 28px;
    height: 28px;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.popup-link {
    display: block;
    width: 140px;
}

.popup-link img {
    width: 100%;
}

/* ===== 소형 화면 대응 ===== */
@media (max-width: 360px) {
    .download-btns {
        gap: 8px;
    }

    .store-btn {
        max-width: 150px;
    }
}

@media (max-height: 600px) and (max-width: 768px) {
    .download-bar {
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
}

