@font-face {
    font-family: 'Birthstone-Local';
    src: url('/static/fonts/Birthstone.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Colors */
    --color-bg: #fcfbf9;
    --color-text: #2c2c2c;
    --color-text-light: #5f5f5f;
    --color-accent: #d4b58e;
    --color-surface: #ffffff;
    --color-border: #e8e2da;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', Helvetica, Arial, sans-serif;
    --font-signature: 'Birthstone-Local', 'Birthstone', cursive;

    /* Spacing & Layout */
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll lock — iOS WebView / 카카오톡 인앱브라우저 포함 */
html.modal-open {
    overflow: hidden;
}
body.modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Prevent image dragging globally */
img {
    -webkit-user-drag: none;
}

/* Prevent text selection in visual/interactive sections */
.hero-section,
.gallery-section,
.minigame-section {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

@media (max-width: 768px) {
    .section {
        padding: var(--spacing-lg) 0;
    }
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 1rem auto 0;
}

/* Animations Tools */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    height: 100dvh; /* 주소표시줄 크기 변화에 실시간 대응 */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    background: url('/static/images/photos/title.webp') center/cover no-repeat;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        /* Better performance on mobile */
    }
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Slightly stronger darkening for white-on-white photography cases */
    background: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    margin-bottom: 80px;
    /* Added to prevent overlap with scroll indicator */
    animation: fadeInContent 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-names-container {
    animation: heroFadeIn 2.5s ease-out forwards;
    opacity: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-signature {
    font-family: var(--font-signature);
    font-size: clamp(4.5rem, 16vw, 9rem);
    font-weight: 400;
    color: #fff;
    margin-bottom: -1rem;
    line-height: 1;
    position: relative;
}

.hero-signature::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    color: rgba(0, 0, 0, 0.85);
    /* Maintain soft signature shadow */
    filter: blur(12px);
    pointer-events: none;
    white-space: nowrap;
}

.hero-names-row::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    color: rgba(0, 0, 0, 0.95);
    /* Darker for names */
    filter: blur(8px);
    /* Sharper focus for small text legibility */
    pointer-events: none;
    white-space: nowrap;
}

/* Additional ultra-tight shadow layer for names to ensure 'pop' on white flowers */
.hero-names-row {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: clamp(0.95rem, 3.8vw, 1.3rem);
    color: #fff;
    letter-spacing: 0.12em;
    /* Slightly wider for modern feel */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-names-row .label {
    font-size: 0.85em;
    opacity: 0.8;
    margin-right: 0.2rem;
}

.hero-names-row .divider {
    margin: 0 0.8rem;
    opacity: 0.4;
    font-weight: 200;
}

@media (max-width: 768px) {
    .hero-signature {
        font-size: clamp(4rem, 20vw, 6rem);
        margin-bottom: -0.5rem;
    }

    .hero-names-row {
        gap: 0.3rem;
    }
}

.hero-content .subtitle {
    font-size: 1.1rem;
    letter-spacing: 2px;
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid #fff;
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* Greeting */
.greeting-section {
    background-color: var(--color-surface);
    text-align: center;
}

/* ── Photobooth Section ── */
.photobooth-section {
    background-color: var(--color-surface);
    text-align: center;
}

.photobooth-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-top: 2rem;
}

.photobooth-image-wrap {
    width: 100%;
    max-width: 360px;
}

.photobooth-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    display: block;
}

.photobooth-text {
    font-family: 'Gowun Dodum', sans-serif;
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 2;
    word-break: keep-all;
}

.photobooth-text p {
    margin-bottom: 0.6rem;
}

.photobooth-text strong {
    color: var(--color-text);
    font-weight: 700;
}

.photobooth-sub {
    margin-top: 1.4rem !important;
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.9;
}

.greeting-text p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
    font-size: 1.1rem;
}

.invitation-image-container {
    margin: 3rem auto;
    width: 100%;
    max-width: 500px;
    /* Adjust to preferred 'proper size' */
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.invitation-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.parents-info {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.parents-row {
    font-size: 1.1rem;
}

.parents-row .relation {
    color: var(--color-text-light);
    margin: 0 0.5rem;
    font-size: 0.9em;
}

.parents-row .name {
    font-weight: 600;
    font-size: 1.2rem;
}

/* Base styles for Gallery, Game & Map Placeholder - content follows in execution step */

.btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--color-text);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn:hover {
    background-color: var(--color-accent);
}

.hidden {
    display: none !important;
}

footer {
    background-color: var(--color-text);
    color: #fff;
    text-align: center;
    padding: 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Navigation Buttons */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--color-text);
    width: 90px;
}

.nav-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.2s;
}

.nav-btn:hover .nav-icon {
    transform: scale(0.95);
}

.nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Account Slider */
.account-slider-outer {
    overflow: visible;
}

.account-slider-track {
    display: flex;
    transition: transform 0.35s ease;
    touch-action: pan-y;
    gap: 12px;
}

.account-slide {
    flex-shrink: 0;
    box-sizing: border-box;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.slider-dot {
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--color-border);
    color: #aaa;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}

.slider-dot.active {
    background: var(--color-accent);
    color: #fff;
}

/* Calendar & Timer */
.calendar-section {
    background-color: var(--color-bg);
    text-align: center;
}

.calendar-header {
    margin-bottom: 2rem;
}

.calendar-header .cal-date {
    font-size: 2.2rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.calendar-header .cal-time {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-family: 'Noto Sans KR', sans-serif;
}

.calendar-body {
    max-width: 350px;
    margin: 0 auto 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.cal-weekdays,
.cal-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px 0;
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
}

.cal-weekdays {
    margin-bottom: 1rem;
    font-weight: 400;
    font-size: 1rem;
}

.cal-weekdays .sun {
    color: #e57373;
}

.cal-dates {
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.cal-dates .sun {
    color: #e57373;
}

.cal-dates span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto;
}

.cal-dates .highlight {
    background-color: var(--color-accent);
    /* pink circle */
    color: #fff !important;
    border-radius: 50%;
    font-weight: 600;
}

.timer-container {
    margin-top: 2rem;
    font-family: var(--font-heading);
    contain: layout style;
}

.timer-labels {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
    color: #a0a0a0;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.timer-labels span {
    width: 50px;
}

.timer-values {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    gap: 0.2rem;
    font-variant-numeric: tabular-nums;
}

.timer-values span {
    width: 50px;
    text-align: center;
    display: inline-block;
}

.timer-values .colon {
    width: 15px;
    font-size: 1.2rem;
    position: relative;
    top: -2px;
    color: #a0a0a0;
}

.timer-footer {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--color-text);
    font-size: 1.1rem;
}

.timer-footer strong {
    color: var(--color-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 3ch;
    text-align: right;
}

/* ── iPhone 12 Pro / Mini / Small Phones (max-width: 420px) ── */
@media (max-width: 420px) {
    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Hero */
    .hero-signature {
        font-size: clamp(3rem, 18vw, 5rem);
    }

    .hero-signature::before,
    .hero-names-row::before {
        display: none; /* Remove heavy blur layers for performance */
    }

    .hero-names-row {
        font-size: clamp(0.8rem, 3.5vw, 1rem);
        gap: 0.2rem;
    }

    .hero-content .subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .hero-content .date {
        font-size: 1rem !important;
    }

    /* Calendar */
    .calendar-header .cal-date {
        font-size: 1.6rem;
    }

    .calendar-body {
        max-width: 300px;
        padding: 1.5rem 0;
    }

    .cal-weekdays,
    .cal-dates {
        gap: 10px 0;
    }

    .cal-dates span {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    /* Timer */
    .timer-values {
        font-size: 2rem;
    }

    .timer-values span {
        width: 40px;
    }

    .timer-labels {
        gap: 1.2rem;
    }

    .timer-labels span {
        width: 40px;
        font-size: 0.7rem;
    }

    .timer-footer {
        font-size: 0.95rem;
    }

    /* Greeting */
    .greeting-text p {
        font-size: 0.95rem;
    }

    .parents-row {
        font-size: 0.95rem;
    }

    .parents-row .name {
        font-size: 1.05rem;
    }

    /* Nav buttons (Map) */
    .nav-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .nav-btn {
        width: 75px;
        font-size: 0.8rem;
    }

    /* Account Section */
    .account-box {
        padding: 20px 15px !important;
    }

    .account-card {
        padding: 18px 12px 15px !important;
    }

    .account-card div:first-child {
        font-size: 0.95rem !important;
        word-break: keep-all;
    }

    .account-greeting {
        font-size: 0.9rem !important;
    }

    /* Runner game overlays */
    .runner-start-overlay,
    .runner-over-overlay {
        padding: 20px;
    }

    .runner-score-board {
        font-size: 0.9rem;
        padding: 4px 10px;
        gap: 10px;
    }

    /* Footer */
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.8rem;
    }
}


.acct-copy-btn {
    white-space: nowrap !important;
    font-size: clamp(0.65rem, 3.8vw, 0.85rem) !important;
    padding-left: clamp(4px, 1.5vw, 12px) !important;
    padding-right: clamp(4px, 1.5vw, 12px) !important;
}
