* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation; /* 모바일 더블탭 확대 방지 */
}

body {
    font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background: #f5f0eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

#app {
    width: 100%;
    max-width: 480px;
}

/* ── 화면 전환 ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── 공통 카드 ── */
.card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 시작 화면 ── */
.big-emoji {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 15px;
    color: #888;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* ── 진행 바 ── */
.progress-wrap {
    height: 7px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    border-radius: 4px;
    transition: width 0.45s ease;
}

.q-count {
    text-align: right;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 22px;
}

/* ── 질문 ── */
.question-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 24px;
    min-height: 56px;
}

/* ── 선택지 ── */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 15px 18px;
    text-align: left;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.45;
}

.option-btn:hover {
    background: #f0ebff;
    border-color: #a78bfa;
    color: #6d28d9;
    transform: translateY(-2px);
}

.option-btn.selected {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #5b21b6;
}

/* ── 결과 카드 ── */
.result-card {
    text-align: center;
}

.result-label {
    font-size: 13px;
    color: #aaa;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.result-year {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 6px;
}

.result-nickname {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
}

.result-emoji {
    font-size: 52px;
    margin-bottom: 14px;
}

.result-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    margin-bottom: 18px;
    padding: 0 4px;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.tag {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ── 세대별 컬러 테마 ── */
.gen-80 { background: linear-gradient(135deg, #fff8e1, #fff3e0); }
.gen-80 .result-year { color: #e65100; }
.gen-80 .tag { background: #fff3e0; color: #bf360c; }

.gen-90 { background: linear-gradient(135deg, #fce4ec, #f3e5f5); }
.gen-90 .result-year { color: #ad1457; }
.gen-90 .tag { background: #fce4ec; color: #880e4f; }

.gen-00 { background: linear-gradient(135deg, #e3f2fd, #e8eaf6); }
.gen-00 .result-year { color: #1565c0; }
.gen-00 .tag { background: #e3f2fd; color: #0d47a1; }

.gen-10 { background: linear-gradient(135deg, #e8f5e9, #f1f8e9); }
.gen-10 .result-year { color: #2e7d32; }
.gen-10 .tag { background: #e8f5e9; color: #1b5e20; }

/* ── 버튼 ── */
.btn-primary {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.4);
}

.btn-row {
    display: flex;
    gap: 8px;
}

.btn-secondary {
    flex: 1;
    display: block;
    width: 100%;
    padding: 13px 8px;
    background: #fff;
    color: #7c3aed;
    border: 2px solid #a78bfa;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f5f3ff;
    transform: translateY(-1px);
}

/* 이미지 저장 중 로딩 표시 */
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
