/* Bootstrap 위에 얹는 QuitPal 커스텀 스타일 (RULES.md 6-1: Bootstrap 기반) */

:root {
    --qp-mint: #10B981;
    --qp-mint-dark: #059669;
    --qp-mint-light: #ECFDF5;
    --qp-amber: #F59E0B;
    --qp-amber-dark: #D97706;
    --qp-amber-light: #FEF3C7;
    --qp-coral: #FF6B6B;
    --qp-coral-dark: #EE5253;
    --qp-coral-light: #FFEFEF;
    --qp-cream: #F8FAFC;
    --qp-ink: #0F172A;
}

body {
    background: var(--qp-cream);
    color: var(--qp-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.qp-icon-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.qp-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Bootstrap 기본 success 팔레트를 QuitPal 민트 톤으로 통일 */
.btn-success {
    --bs-btn-bg: var(--qp-mint);
    --bs-btn-border-color: var(--qp-mint);
    --bs-btn-hover-bg: var(--qp-mint-dark);
    --bs-btn-hover-border-color: var(--qp-mint-dark);
    --bs-btn-active-bg: var(--qp-mint-dark);
    --bs-btn-active-border-color: var(--qp-mint-dark);
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}
.btn-outline-success {
    --bs-btn-color: var(--qp-mint-dark);
    --bs-btn-border-color: var(--qp-mint);
    --bs-btn-hover-bg: var(--qp-mint);
    --bs-btn-hover-border-color: var(--qp-mint);
    --bs-btn-active-bg: var(--qp-mint);
    --bs-btn-active-border-color: var(--qp-mint);
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-outline-success:hover {
    transform: translateY(-2px);
}
.text-success {
    color: var(--qp-mint-dark) !important;
}

.qp-auth-page, .qp-form-page {
    max-width: 440px;
    padding-top: 48px;
}

.qp-dashboard, .qp-badges-page, .qp-leaderboard-page, .qp-challenges-page, .qp-benefits-page, .qp-mypage {
    max-width: 720px;
    padding-bottom: 48px;
}

/* PC 반응형: Bootstrap 표준 container 폭(lg=960px/xl=1140px)에 맞춰 넓힌다.
   .qp-page-hero는 원래부터 이 클래스들 없이 표준 .container만 쓰므로(자체 max-width 없음),
   본문 폭을 이 값들로 맞추면 히어로와 본문의 좌우 정렬선이 자연스럽게 맞아떨어진다.
   .qp-mypage는 내부 카드가 폼(입력창)이라 컨테이너만 넓히면 입력창이 화면 전체로 길게
   늘어나 어색해지므로, 컨테이너 확장과 별개로 프로필/닉네임/비밀번호/탈퇴 카드를
   mypage.html에서 row/col-md-6 2열로 재배치해 넓어진 폭을 카드 개수로 흡수한다. */
@media (min-width: 992px) {
    .qp-auth-page, .qp-form-page { max-width: 480px; padding-top: 80px; }
    .qp-dashboard, .qp-badges-page, .qp-leaderboard-page, .qp-challenges-page, .qp-benefits-page, .qp-mypage { max-width: 960px; }
}
@media (min-width: 1200px) {
    .qp-dashboard, .qp-badges-page, .qp-leaderboard-page, .qp-challenges-page, .qp-benefits-page, .qp-mypage { max-width: 1140px; }
}

/* 공통 상단 내비게이션 */
.qp-navbar {
    background: #fff;
    border-bottom: 1px solid #EDE6D3;
}
/* 드롭다운 메뉴의 위치 기준점. header/guestHeader fragment의 nav에 붙는다. */
.qp-navbar-relative {
    position: relative;
}

/* 햄버거 버튼 — 열림 상태(aria-expanded=true)일 때 메뉴 아이콘 대신 닫기 아이콘을 보여준다. */
.qp-hamburger-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid #2B2B2B;
    border-radius: 10px;
    color: #2B2B2B;
    transition: background 0.15s, transform 0.15s;
}
.qp-hamburger-btn .qp-icon { width: 18px; height: 18px; }
.qp-hamburger-btn:hover {
    background: #F4F1E6;
}
.qp-hamburger-btn:active {
    transform: scale(0.94);
}
/* .qp-icon의 display:inline-block과 명시도가 같아 CSS 선언 순서에 좌우되던 문제를 막기 위해
   .qp-hamburger-btn과 묶어 명시도를 높인다(닫힌 상태에서 ☰/✕ 아이콘이 겹쳐 보이던 버그). */
.qp-hamburger-btn .qp-hamburger-icon-close { display: none; }
.qp-hamburger-btn[aria-expanded="true"] .qp-hamburger-icon-open { display: none; }
.qp-hamburger-btn[aria-expanded="true"] .qp-hamburger-icon-close { display: inline-block; }

/* 드롭다운 메뉴 — 상단바(로고+햄버거 버튼)는 그대로 유지된 채, 그 아래에 내용 높이만큼만
   펼쳐진다(화면 전체를 덮지 않음). 절제된 타이포그래피와 얇은 구분선으로 위계를 만드는
   미니멀 톤은 이전 풀스크린 버전에서 그대로 가져왔다. */
.qp-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-bottom: 1px solid #EDE6D3;
    box-shadow: 0 12px 28px rgba(43, 43, 43, 0.1);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    animation: qp-menu-drop-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes qp-menu-drop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.qp-menu-links {
    display: flex;
    flex-direction: column;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 8px 24px 4px;
}
.qp-menu-link {
    position: relative;
    padding: 15px 2px;
    border-bottom: 1px solid #F0EBDC;
    color: #2B2B2B;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -.01em;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.qp-menu-link::after {
    content: '';
    position: absolute;
    left: 2px;
    bottom: -1px;
    width: 0;
    height: 1px;
    background: var(--qp-mint-dark);
    transition: width 0.25s ease;
}
.qp-menu-link:hover {
    color: var(--qp-mint-dark);
    padding-left: 8px;
}
.qp-menu-link:hover::after {
    width: 28px;
}
.qp-menu-link.active {
    color: var(--qp-mint-dark);
    font-weight: 600;
}
.qp-menu-link.active::after {
    width: 28px;
}

.qp-menu-footer {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 24px 20px;
    border-top: 1px solid #F0EBDC;
}
.qp-menu-login-link {
    color: #6B6152;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.qp-menu-login-link:hover {
    color: #2B2B2B;
}
.qp-menu-signup-btn {
    color: #fff;
    background: var(--qp-ink);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: .01em;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.qp-menu-signup-btn:hover {
    background: var(--qp-mint-dark);
    transform: translateY(-1px);
}
.qp-menu-logout-btn {
    color: #6B6152;
    background: none;
    border: 1px solid #E4DCC5;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: .01em;
    padding: 10px 22px;
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.qp-menu-logout-btn:hover {
    color: #B23A3A;
    border-color: #E6B8B8;
    background: #FBEAEA;
}

/* PC 반응형(Bootstrap lg=992px 기준): 모바일 전용이던 햄버거+드롭다운을 로고 옆 가로
   메뉴바로 바꾼다. 마크업/JS는 그대로 두고 CSS만으로 배치를 바꾼다 — quitpalMenu(common.js)는
   hidden/aria-expanded만 토글하는데, 여기서 버튼을 숨겨 클릭 자체를 막고 드롭다운은
   [hidden]이어도 항상 보이게 강제하므로 JS 동작과 무관하게 항상 펼쳐진 상태로 유지된다. */
@media (min-width: 992px) {
    .qp-hamburger-btn { display: none; }

    #qpMenuDropdown[hidden] { display: flex !important; }
    .qp-menu-dropdown {
        position: static;
        box-shadow: none;
        border-bottom: none;
        max-height: none;
        overflow: visible;
        animation: none;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .qp-menu-links {
        flex-direction: row;
        flex-wrap: nowrap;
        max-width: none;
        width: auto;
        margin: 0;
        padding: 0 0 0 32px;
        gap: 4px;
        flex: 1;
    }
    .qp-menu-link {
        padding: 8px 14px;
        border-bottom: none;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .qp-menu-link::after { bottom: 2px; }
    .qp-menu-footer {
        max-width: none;
        width: auto;
        margin: 0;
        padding: 0;
        border-top: none;
        flex-shrink: 0;
    }
    .qp-menu-login-link, .qp-menu-signup-btn, .qp-menu-logout-btn {
        white-space: nowrap;
    }
}

/* 히어로 카드: 밝은 민트 -> 앰버 그라디언트로 "희망차고 밝은" 톤 */
.qp-streak-card {
    background: linear-gradient(135deg, var(--qp-mint) 0%, var(--qp-mint-dark) 55%, var(--qp-amber-dark) 130%);
    color: #fff;
    position: relative;
    overflow: hidden;
    animation: qp-fade-up 0.5s ease both;
}
.qp-streak-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.16), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255,214,140,0.25), transparent 45%);
    pointer-events: none;
}
.qp-streak-card .card-body {
    position: relative;
    z-index: 1;
}

/* 랜딩페이지 */
.qp-hero {
    background: linear-gradient(135deg, var(--qp-mint) 0%, var(--qp-mint-dark) 60%, #0F5C3A 100%);
}

.qp-feature-card {
    border: 1px solid #E7E0CC;
    border-radius: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.qp-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(46, 158, 107, 0.14);
}
.qp-feature-icon {
    color: var(--qp-amber);
    font-size: 22px;
}

.qp-journey-section {
    background: #fff;
    border: 1px solid #E7E0CC;
    border-radius: 14px;
    padding: 32px 20px;
}
.qp-journey-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--qp-mint);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.qp-journey-num .qp-icon {
    width: 18px;
    height: 18px;
}
.qp-journey-step {
    transition: transform 0.2s ease;
}
.qp-journey-step:hover {
    transform: translateY(-3px);
}

.qp-footer {
    border-top: 1px solid #E7E0CC;
    background: #fff;
}

/* 대시보드 히어로 공통 요소 */
.qp-eyebrow {
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.06em;
}
.qp-hero-sub {
    color: rgba(255, 255, 255, 0.92);
}

.qp-xp-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
    max-width: 320px;
    margin: 0 auto;
}
.qp-xp-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--qp-amber) 0%, #FFD98A 100%);
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.qp-health-card {
    border-color: #CFE9D9;
}
.qp-health-card #qpHealthRecovery {
    color: var(--qp-mint-dark);
}

.qp-challenge-row,
.qp-crew-row {
    padding: 8px 0;
    border-bottom: 1px solid #F1ECDA;
}
.qp-challenge-row:last-child,
.qp-crew-row:last-child {
    border-bottom: none;
}

/* 완료된 챌린지에 살짝 튀는 느낌 */
.qp-challenge-row .badge.text-bg-success {
    background-color: var(--qp-mint) !important;
    animation: qp-pop 0.4s ease;
}

/* empty state 미리보기 */
.qp-milestone-preview li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.9rem;
}
.qp-milestone-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
    background: var(--qp-amber);
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.5);
    animation: qp-pulse 2.2s ease-out infinite;
}
.qp-milestone-preview li:nth-child(2) .qp-milestone-dot { animation-delay: 0.3s; }
.qp-milestone-preview li:nth-child(3) .qp-milestone-dot { animation-delay: 0.6s; }
.qp-milestone-preview li:nth-child(4) .qp-milestone-dot { animation-delay: 0.9s; }

/* 카드 등장 애니메이션: 대시보드 그리드 카드가 살짝 아래에서 떠오르며 나타남 */
.qp-dashboard .card {
    animation: qp-fade-up 0.45s ease both;
}
.qp-dashboard .row.g-3 > [class^="col-"]:nth-child(1) .card { animation-delay: 0.05s; }
.qp-dashboard .row.g-3 > [class^="col-"]:nth-child(2) .card { animation-delay: 0.1s; }
.qp-dashboard .row.g-3 > [class^="col-"]:nth-child(3) .card { animation-delay: 0.15s; }
.qp-dashboard .row.g-3 > [class^="col-"]:nth-child(4) .card { animation-delay: 0.2s; }

@keyframes qp-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes qp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(245, 166, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
}

@keyframes qp-pop {
    0%   { transform: scale(0.7); }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .qp-streak-card,
    .qp-dashboard .card,
    .qp-milestone-dot,
    .qp-challenge-row .badge.text-bg-success {
        animation: none !important;
    }
    .qp-xp-bar-fill {
        transition: none !important;
    }
}

/* ═══════════════════════════════
   공통 empty state
   ═══════════════════════════════ */
.qp-empty-block {
    text-align: center;
    padding: 40px 20px;
    color: #8B9A8E;
}
.qp-empty-block .qp-empty-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

/* ═══════════════════════════════
/* ═══════════════════════════════
   배지함 Option A 프리미엄 3D 트로피 룸
   ═══════════════════════════════ */
.qp-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
}
.qp-badge-tile {
    text-align: center;
    padding: 18px 10px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #E2E8F0;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.qp-badge-tile.earned {
    background: linear-gradient(145deg, #FFFFFF 0%, #FFFDF2 100%);
    border: 2px solid #F5A623;
    box-shadow: 0 10px 24px -5px rgba(245, 166, 35, 0.25);
    cursor: pointer;
}
.qp-badge-tile.earned::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0.5;
}
.qp-badge-tile.earned:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 14px 28px -4px rgba(245, 166, 35, 0.35);
}
.qp-badge-tile.locked {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    opacity: 0.72;
}
.qp-badge-tile.locked:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    border-color: #94A3B8;
}
.qp-badge-tile.earned .qp-badge-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4);
}
.qp-badge-tile.earned .qp-badge-icon.has-img {
    background: transparent;
    box-shadow: none;
}
.qp-badge-tile.locked .qp-badge-icon {
    background: #E2E8F0;
    color: #94A3B8;
}
.qp-badge-icon {
    width: 58px; height: 58px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    transition: transform 0.3s ease;
}
.qp-badge-tile:hover .qp-badge-icon {
    transform: rotate(6deg) scale(1.08);
}
.qp-badge-icon .qp-icon {
    width: 28px;
    height: 28px;
}
.qp-badge-icon img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}
.qp-badge-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.3;
    margin-bottom: 4px;
}
.qp-badge-tile.locked .qp-badge-name {
    color: #64748B;
}
.qp-badge-date {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ═══════════════════════════════
   리더보드
   ═══════════════════════════════ */
.qp-rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid #F1ECDA;
}
.qp-rank-row:last-child { border-bottom: none; }
.qp-rank-num {
    width: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #8B9A8E;
}
.qp-rank-row.top1 .qp-rank-num { color: var(--qp-amber-dark); }
.qp-rank-row.top2 .qp-rank-num { color: #8A8F98; }
.qp-rank-row.top3 .qp-rank-num { color: #B08050; }
.qp-rank-medal { font-size: 1.1rem; }
.qp-rank-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.92rem;
    color: #2A3A2E;
}
.qp-rank-value {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--qp-mint-dark);
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════
   챌린지
   ═══════════════════════════════ */
.qp-challenge-card {
    background: #fff;
    border: 1px solid #EDE6D3;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    animation: qp-fade-up 0.4s ease both;
}
.qp-challenge-card.completed {
    border-color: #BFE6D2;
    background: #F3FBF6;
}
.qp-challenge-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #EFEBDD;
    overflow: hidden;
    margin: 10px 0 6px;
}
.qp-challenge-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--qp-mint) 0%, #58C795 100%);
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.qp-info-card {
    border: 1px solid #EDE6D3;
    border-radius: 14px;
    background: linear-gradient(180deg, #FFFDF7 0%, #fff 100%);
}
.qp-info-step {
    height: 100%;
}
.qp-challenge-type-badge {
    background: #EAF7F0;
    color: var(--qp-mint-dark);
    font-weight: 600;
    font-size: .7rem;
}

/* ═══════════════════════════════
   아이콘 (SVG 스프라이트, /images/icons.svg 참조)
   ═══════════════════════════════ */
.qp-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: none;
}
.qp-icon-lg { width: 28px; height: 28px; }
.qp-icon-xl { width: 40px; height: 40px; }

/* ═══════════════════════════════
   페이지 히어로 (헤더-히어로-컨텐츠-풋터 4단 구조)
   ═══════════════════════════════ */
.qp-page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--qp-mint) 0%, var(--qp-mint-dark) 55%, #163F2C 100%);
    overflow: hidden;
}
.qp-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='26' fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}
.qp-page-hero .container {
    position: relative;
    z-index: 1;
}
.qp-hero-badge {
    background: var(--qp-amber);
    color: #3A2600;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.qp-hero-sub2 {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    max-width: 60ch;
}
.qp-page-hero h1 {
    text-wrap: balance;
}

/* ═══════════════════════════════
   풋터
   ═══════════════════════════════ */
.qp-footer2 {
    background: #14231B;
    color: rgba(255, 255, 255, 0.75);
    padding: 2.5rem 0;
    margin-top: 3rem;
}
.qp-footer2 a {
    color: #FFD98A;
}

/* ═══════════════════════════════
   재흡연 기록 이력
   ═══════════════════════════════ */
.qp-log-row {
    background: #fff;
    border: 1px solid #EDE6D3;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    animation: qp-fade-up 0.4s ease both;
}
.qp-log-trigger-badge {
    background: #F1EFE6;
    color: #6B6152;
    font-weight: 600;
    font-size: .74rem;
}

/* ═══════════════════════════════
   SOS 대기 화면 — 호흡법 / 명상 / 원형 카운트다운
   ═══════════════════════════════ */
.qp-breathing-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}
.qp-breathing-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #EAF7F0 0%, #BFE6D2 100%);
    border: 2px solid var(--qp-mint);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: qp-breathing-cycle 12s ease-in-out infinite;
}
.qp-breathing-label {
    color: var(--qp-mint-dark);
    font-weight: 700;
    font-size: 0.95rem;
}
@keyframes qp-breathing-cycle {
    0%   { transform: scale(0.7); }
    33%  { transform: scale(1.25); }
    66%  { transform: scale(1.25); }
    100% { transform: scale(0.7); }
}

.qp-meditation-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    padding: 0 12px;
}
.qp-meditation-line {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--qp-ink);
    animation: qp-meditation-fade 4s ease-in-out infinite;
}
@keyframes qp-meditation-fade {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}

.qp-countdown-ring {
    position: relative;
    width: 120px;
    height: 120px;
}
.qp-countdown-svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}
.qp-countdown-track {
    fill: none;
    stroke: #EFEBDD;
    stroke-width: 8;
}
.qp-countdown-progress {
    fill: none;
    stroke: var(--qp-mint);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}
.qp-countdown-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--qp-ink);
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════
   SOS 극복 축하 화면
   ═══════════════════════════════ */
.qp-celebrate-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--qp-amber) 0%, var(--qp-amber-dark) 55%, #8A5A00 100%);
}
.qp-celebrate-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='26' fill='none' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}
#qpConfettiCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.qp-celebrate-medal {
    width: 64px;
    height: 64px;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
    animation: qp-medal-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes qp-medal-pop {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}
.qp-celebrate-hero h1 {
    text-wrap: balance;
    animation: qp-fade-up 0.5s ease 0.15s both;
}
.qp-celebrate-hero .qp-hero-sub2 {
    animation: qp-fade-up 0.5s ease 0.25s both;
}
.qp-celebrate-xp {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 800;
    animation: qp-fade-up 0.5s ease 0.35s both;
}
.qp-celebrate-xp .qp-count-up {
    font-size: 3.4rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.qp-celebrate-xp-unit {
    font-size: 1.3rem;
    opacity: 0.9;
}
.qp-celebrate-levelup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--qp-amber-dark);
    font-weight: 800;
    font-size: 1.05rem;
    padding: 12px 26px;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    animation: qp-levelup-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}
@keyframes qp-levelup-in {
    0%   { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════
   개인정보 처리방침
   ═══════════════════════════════ */
.qp-privacy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.qp-privacy-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: #4A4A4A;
    line-height: 1.6;
}
.qp-privacy-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--qp-mint);
}
.qp-privacy-list li:last-child {
    margin-bottom: 0;
}
