* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: #f2f2f0;
    color: #3c3333;

    font-family:
        Arial,
        "Noto Sans KR",
        sans-serif;
}

.preview-page {
    width: min(860px, 100%);
    min-height: 100vh;

    margin: 0 auto;

    background: #fafaf9;
}

/* =========================
   ENVELOPE
========================= */

.envelope-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.envelope-button {
    position: relative;

    width: min(86vw, 350px);

    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.envelope-canvas {
    display: block;

    width: 100%;
    height: auto;

    filter:
        drop-shadow(
            0 12px 20px
            rgba(60, 51, 51, 0.12)
        );
}

.envelope-message {
    position: absolute;

    top: 25%;
    left: 21%;

    width: 58%;

    color: #4a403c;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.75;

    text-align: center;

    white-space: pre-line;

    pointer-events: none;
}

.envelope-message.empty {
    color: #8c8580;
    text-align: center;
}

.envelope-message[hidden] {
    display: none;
}

/* =========================
   INTRO
========================= */

.intro-section {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 32px 20px 46px;
}

.intro-stage {
    position: relative;

    width: min(82vw, 340px);

    aspect-ratio: 5 / 7;
}

.intro-photo-window {
    position: absolute;

    left: 5%;
    top: 11.4%;

    width: 90%;
    height: 77.1%;

    overflow: hidden;

    background: #f4f1ee;

    z-index: 1;
}

.intro-photo {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.intro-frame {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    z-index: 4;

    pointer-events: none;
}

.intro-particle {
    position: absolute;
    inset: 0;

    z-index: 5;

    pointer-events: none;
}

.intro-particle img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;
}

.intro-copy {
    width: min(88vw, 360px);

    margin-top: 0;
    margin-bottom: 10px;

    color: #433b38;

    font-size: 14px;
    line-height: 1.8;

    text-align: center;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.intro-copy:empty {
    display: none;
}

@media (min-width: 768px) {

    .preview-page {
        box-shadow:
            0 0 40px
            rgba(60, 51, 51, 0.08);
    }
}


/* ENVELOPE_FLY_MOTION_20260910 */

/*
    FINAL ENVELOPE MOTION

    0~2 sec : 50% -> 110%
    2~3 sec : 110% -> 100%
    3~4 sec : fade out + rise
    4~5 sec : opened envelope fade in
*/

.envelope-section {
    overflow: hidden;
}

.envelope-button {
    opacity: 0;

    transform:
        scale(0.5);

    transform-origin:
        50% 50%;

    will-change:
        transform,
        opacity;

    cursor: default !important;
}

.envelope-button.envelope-arrived {
    animation:
        envelopeZoomArrival
        3s
        ease-in-out
        both;
}

@keyframes envelopeZoomArrival {

    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    8% {
        opacity: 1;
    }

    66.666% {
        opacity: 1;
        transform: scale(1.10);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/*
    ?? ???? ???
    ??? ??? canvas? ??.
    ? animation? ???? ?? ??.
*/
.envelope-canvas {
    opacity: 1;

    transform:
        translateY(0);

    transition:
        opacity 0.7s ease,
        transform 0.7s
            cubic-bezier(
                0.22,
                0.65,
                0.28,
                1
            )
        !important;
}


/*
    ?? ??:
    1? ?? ??? ?? ???? ???
*/
.envelope-button.envelope-fade-out
.envelope-canvas {
    opacity: 0;

    transform:
        translateY(-18px);
}


/*
    ??? ??? ?? ??
*/
.envelope-button.is-open
.envelope-canvas {
    transform:
        translateY(-18px);

    transition:
        opacity 1s ease !important;
}


/*
    ?? ???? ??? ????
    ??? ???? ??
*/
.envelope-button.open-pre-fade
.envelope-canvas {
    opacity: 0 !important;
}


/*
    ??? ?? ??? ??
    1? ?? ??? ??
*/
.envelope-message {
    opacity: 0 !important;

    transform: none !important;

    transition:
        opacity 1s ease
        !important;
}

.envelope-message.envelope-message-rise {
    opacity: 1 !important;
}




/* HELIUMGAS_PREVIEW_LAYOUT_BALANCE_20260910 */

/* =========================
   WEB
   ========================= */
@media (min-width: 761px) {

    .envelope-section {
        height: auto !important;
        min-height: 0 !important;

        padding-top: 55px !important;
        padding-bottom: 0 !important;

        margin-bottom: 0 !important;
    }

    .envelope-button {
        width: 520px !important;
        max-width: 78% !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }

    .intro-section,
    #previewIntroSection {
        height: auto !important;
        min-height: 0 !important;

        margin-top: 75px !important;
        padding-top: 0 !important;
    }

    .intro-stage,
    .intro-preview-stage,
    #previewIntroStage {
        width: 540px !important;
        max-width: 82% !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }
}


/* =========================
   MOBILE
   ========================= */
@media (max-width: 760px) {

    .envelope-section {
        height: auto !important;
        min-height: 0 !important;

        padding-top: 28px !important;
        padding-bottom: 0 !important;

        margin-bottom: 0 !important;
    }

    .envelope-button {
        width: min(86vw, 360px) !important;
        max-width: 86vw !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }

    .intro-section,
    #previewIntroSection {
        height: auto !important;
        min-height: 0 !important;

        margin-top: 52px !important;
        padding-top: 0 !important;
    }

    .intro-stage,
    .intro-preview-stage,
    #previewIntroStage {
        width: min(90vw, 430px) !important;
        max-width: 90vw !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* /HELIUMGAS_PREVIEW_LAYOUT_BALANCE_20260910 */



/* HELIUMGAS_AFTER_ENVELOPE_REVEAL_20260910 */

/*
    ?? ??? ?? ???? ????
    ?? ??? ??? ?? ??? ??.
*/
.preview-content-root > section:not(.envelope-section),
#previewIntroSection {
    opacity: 0;
    visibility: hidden;

    transform:
        translateY(18px);

    transition:
        opacity 0.9s ease,
        transform 0.9s ease,
        visibility 0s linear 0.9s;
}


/*
    ?? ?? ?? ?
    INTRO ?? ??? ???? ??? ??.
*/
.preview-content-root.preview-body-visible
> section:not(.envelope-section),

.preview-page.preview-body-visible
.preview-content-root
> section:not(.envelope-section),

.preview-content-root.preview-body-visible
#previewIntroSection,

.preview-page.preview-body-visible
.preview-content-root
#previewIntroSection {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0);

    transition:
        opacity 0.9s ease,
        transform 0.9s ease,
        visibility 0s;
}


/*
    3? ? ??? ?? ?
    ?? ?? ?? ??? ??? ??.
    ?? ?? ?? ? ??? ?? ?? ??.
*/
.envelope-button.envelope-motion-locked {
    animation: none !important;

    opacity: 1 !important;

    transform:
        scale(1) !important;
}

/* /HELIUMGAS_AFTER_ENVELOPE_REVEAL_20260910 */



/* HELIUMGAS_INTRO_COPY_VISUAL_ATTACH_20260910 */

/*
    INTRO ??? ??? ??? ?? ? ??? ??.
    ?? ?? ?? ???? ?? ???.
*/
/* HELIUMGAS_INTRO_PREVIEW_FONTS_20260910 */

@font-face {
    font-family: 'PretendardMedium';
    src: url('../fonts/hg-font-01-pretendard-medium.ttf')
        format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SchoolSafeChalk';
    src: url('../fonts/hg-font-03-school-safe-chalk.ttf')
        format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ridibatang';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_twelve@1.0/RIDIBatang.woff')
        format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}



/* HELIUMGAS_FONT_SCOPE_PREVIEW_FIX_20260910 */

/* ?? ???? ?? ?? ?? ??? ?? ??? */
#previewEnvelopeMessage {
    font-family:
        'PretendardMedium',
        'Noto Sans KR',
        sans-serif !important;
}
