/* 
    ConnectAILab v3 - Premium Oriental Aesthetic
    Theme: Modern Ink-wash & Deep Harmony 
*/

:root {
    --bg-light: #fdfbf8;
    --bg-surface: #ffffff;
    --accent: #a67c52; /* Refined Bronze/Gold */
    --accent-bright: #c4a47c;
    --text-main: #1c1c1c;
    --text-dim: #5c5c5c;
    --ink-black: #050505;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --text-dark: #1c1c1c;
    --bg-dark: #1c1c1c;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --primary-color: #a67c52;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: #e8e3dc; /* 데스크탑에서 보이는 바깥 배경 (차분한 베이지) */
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Montserrat', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
    position: relative;
    /* 기본 모바일/태블릿 너비 */
    max-width: 100%; 
}

/* PC(데스크탑) 화면에서만 넓게 보기 설정 */
@media (min-width: 1024px) {
    body {
        max-width: 1200px; /* PC 웹사이트 버전 너비 */
    }
    
    /* 앱 미리보기 모드일 때는 PC에서도 좁게 표시 */
    body.mode-app {
        max-width: 500px !important;
    }
}

/* 모바일 앱 느낌을 유지하고 싶을 때를 위한 스마트폰 전용 너비 제한 */
@media (max-width: 500px) {
    body {
        max-width: 100%;
    }
}

h1, h2, h3, .logo-text {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Background Effects */
.background-grain {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/pinstriped-suit.png');
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

.ink-wash-bg {
    position: fixed;
    top: -10%; right: -10%;
    width: 60%; height: 80%;
    background: radial-gradient(circle, rgba(166, 124, 82, 0.03) 0%, rgba(253, 251, 248, 0) 70%);
    filter: blur(80px);
    z-index: -1;
}

/* Header */
#main-header {
    padding: 0.8rem 0; /* 헤더 두께를 줄여 선을 위로 올림 */
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 251, 248, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: 3rem; /* 1.5rem에서 2배 확대 */
    letter-spacing: 0.2rem;
    color: var(--accent);
    white-space: nowrap;
    font-weight: 900;
}

/* 모바일/앱 모드에서 로고 크기 축소 */
@media (max-width: 500px) {
    .logo-text {
        font-size: 1.8rem;
    }
}
body.mode-app .logo-text {
    font-size: 1.8rem;
}

.logo-subtitle {
    display: none; /* CONNECT AI LAB 제거 */
}

/* User Info Display */
#user-info-display {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(166, 124, 82, 0.05);
    border: 1px solid rgba(166, 124, 82, 0.1);
}

.welcome-text {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

#welcome-zodiac, #welcome-mbti {
    color: var(--accent);
    font-weight: 700;
}

.desktop-nav {
    width: 100%;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.desktop-nav a:hover {
    color: var(--accent);
}

/* 앱(PWA)으로 실행 시 또는 미리보기 모드(?mode=app) 시 상단 네비게이션 메뉴 숨기기 */
@media all and (display-mode: standalone) {
    .desktop-nav {
        display: none !important;
    }
    #main-header {
        padding: 1rem 0; /* 앱에서는 헤더 높이 최소화 */
    }
}

/* PC 브라우저 미리보기 전용 스타일 */
body.mode-app .desktop-nav {
    display: none !important;
}
body.mode-app #main-header {
    padding: 1rem 0;
}

/* --- Bottom Navigation (App Only) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background: rgba(253, 251, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.7rem 0 calc(0.7rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.03);
}

/* 앱 모드 또는 standalone 시 표시 */
@media all and (display-mode: standalone) {
    .bottom-nav { display: flex; }
    body { padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
}
body.mode-app .bottom-nav {
    display: flex;
}
body.mode-app {
    padding-bottom: 75px;
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-dim);
    transition: var(--transition);
    position: relative;
    flex: 1;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30%;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-icon {
    font-size: 1.3rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    filter: grayscale(1) opacity(0.6);
}

.nav-item:active .nav-icon {
    transform: scale(0.85);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
    filter: grayscale(0) opacity(1);
}


.nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}


.signup-cta {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    border-radius: 2px;
}

.signup-cta:hover {
    background: var(--accent);
    color: var(--bg-dark) !important;
}

/* Hero Section */
#hero {
    padding: 2rem 0 4rem 0; /* 아래쪽 여백도 줄여서 다음 섹션을 끌어올림 */
    min-height: 40vh; /* 높이를 절반으로 줄임 */
    display: flex;
    align-items: flex-start;
    padding-top: 2rem; 
}

.hero-wrapper {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    align-items: center;
}

.hero-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.3rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.35;
    margin-bottom: 2rem;
    font-weight: 900;
    word-break: keep-all;
}

.hl-ink {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
    max-width: 500px;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

/* App Only CTA */
.app-only-cta {
    display: none; /* 기본 숨김 */
    margin-top: 2.5rem;
}

body.mode-app .app-only-cta {
    display: block;
}
@media all and (display-mode: standalone) {
    .app-only-cta {
        display: block;
    }
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(196, 164, 124, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

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

/* MBTI Options Buttons */
.btn-mbti-option {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-dark);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', 'Noto Serif KR', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-mbti-option:hover {
    border-color: var(--accent);
    background: rgba(196, 164, 124, 0.05);
    transform: translateY(-2px);
}

.btn-mbti-option.selected {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(196, 164, 124, 0.3);
}

/* Hero Visual - Premium Circle */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ink-circle-container {
    width: 280px;
    height: 280px;
    position: relative;
}

.ink-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(196, 164, 124, 0.2);
    border-radius: 50%;
    /* 회전과 색상 반전 애니메이션을 동시에 적용 */
    animation: rotate 20s linear infinite, invert-shift 10s ease-in-out infinite alternate;
}

.ink-circle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
}

.ink-circle-inner {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(196, 164, 124, 0.1) 0%, transparent 70%);
    border: 1px dashed rgba(196, 164, 124, 0.1);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite alternate, invert-shift 10s ease-in-out infinite alternate;
}

.ink-circle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Nanum Brush Script', cursive;
    font-size: 4rem; /* 붓글씨 느낌을 위해 크기 확대 */
    font-weight: 400;
    letter-spacing: 0.2rem;
    background: linear-gradient(135deg, #8c735a 0%, #d4bc9c 30%, #8c735a 60%, #fdfbf8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(166, 124, 82, 0.5));
    animation: center-float 5s ease-in-out infinite, shine 8s linear infinite;
    z-index: 5;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}


@keyframes center-float {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

@keyframes shine {
    to { background-position: 200% center; }
}


@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes invert-shift {
    0% { filter: invert(0) hue-rotate(0deg); }
    50% { filter: invert(0.8) hue-rotate(180deg); }
    100% { filter: invert(0) hue-rotate(0deg); }
}

@keyframes pulse {
    from { transform: scale(0.95); opacity: 0.5; }
    to { transform: scale(1.05); opacity: 1; }
}

/* Service Grid */
#services {
    padding: 80px 0;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* PC 화면에서 메뉴를 3열로 배치 */
@media (min-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 앱 미리보기 시에는 다시 1열로 변경 */
    body.mode-app .service-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.service-card:hover {
    background: var(--bg-surface);
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(166, 124, 82, 0.1);
}

.service-card:hover::after {
    width: 100%;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-card {
    background: var(--bg-surface);
    width: 100%;
    max-width: 550px;
    padding: 3rem;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: var(--transition);
    max-height: 90vh; /* 화면 높이에 맞춤 */
    overflow-y: auto; /* 내용이 많으면 스크롤 */
    -webkit-overflow-scrolling: touch;
}

.modal-overlay:not(.hidden) .modal-card {
    transform: scale(1);
}

/* 앱 모드 전용 모달(팝업) 크기 조정 */
body.mode-app .modal-card {
    width: 92% !important;
    max-width: 460px !important;
    padding: 1.8rem 1.2rem !important;
    max-height: 82vh !important; /* 하단 네비게이션 공간 확보 */
}
@media all and (display-mode: standalone) {
    .modal-card {
        width: 92% !important;
        max-width: 460px !important;
        padding: 1.8rem 1.2rem !important;
        max-height: 82vh !important; /* 하단 네비게이션 공간 확보 */
    }
    
    .wide-modal {
        max-width: 460px !important;
    }

    .input-group {
        margin-bottom: 1rem !important;
    }

    .auth-form p {
        margin-bottom: 1.2rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

.close-modal {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
}

.tab-switcher {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2.5rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.tab-btn.active {
    color: var(--accent);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 2px;
    background: var(--accent);
}

.auth-form h2 {
    margin-bottom: 0.5rem;
}

.auth-form p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-form.hidden, .hidden {
    display: none !important;
}

.summary-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.summary-list {
    background: var(--bg-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.sum-row:last-child {
    margin-bottom: 0;
}

.sum-row span {
    color: var(--text-dim);
}

.sum-row strong {
    color: var(--accent);
}

.summary-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.welcome-text {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.logout-link {
    color: #c62828 !important;
    font-weight: 600;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    color: var(--text-main);
    border-radius: 2px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.btn-special {
    background: linear-gradient(135deg, var(--accent) 0%, #b38f61 100%);
}

/* Footer */
#main-footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

#main-footer p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .ink-circle-container {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-card {
        padding: 2rem 1.5rem;
    }
}

/* Dual Saju Layout (Compatibility) */
.dual-saju-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 4rem;
}

.saju-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.analysis-content {
    background: var(--bg-surface);
    padding: 3rem;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    line-height: 2;
    white-space: pre-wrap;
    font-size: 1.05rem;
}

.analysis-section {
    margin-bottom: 2.5rem;
}

.analysis-section h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-section h4::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--accent);
    display: inline-block;
}

#partner-form .btn-special {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
}

@media (max-width: 850px) {
    .dual-saju-wrapper {
        grid-template-columns: 1fr;
    }
}

/* History Modal & List */
.wide-modal {
    max-width: 800px;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
}

.history-item:hover {
    border-color: var(--accent);
    background: #fff;
    transform: translateX(5px);
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.history-type {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.history-name {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-view {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 2px;
}

.empty-msg {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
    opacity: 0.6;
}

/* MBTI 60 Questions Custom UI */
.mbti-q-box {
    background: rgba(255, 255, 255, 0.7); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    border: 1px solid var(--glass-border);
}
.q-text {
    font-weight: 600; 
    color: var(--text-dark); 
    margin-bottom: 15px;
}
.mbti-options-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mbti-options-row .btn-mbti-option {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 12px 15px;
}
.btn-custom {
    background: transparent;
    border: 1px dashed var(--accent);
    color: var(--accent);
}
.custom-input-wrap {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    animation: fadeInDown 0.3s ease;
}
.custom-input-wrap input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}
.custom-input-wrap input:focus {
    outline: none;
    border-color: var(--accent);
}
.btn-save-custom {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Service Card Price Badges */
.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
}

.badge-free {
    background-color: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-mid {
    background-color: rgba(140, 115, 90, 0.1);
    color: #8c735a;
    border: 1px solid rgba(140, 115, 90, 0.3);
}

.badge-premium {
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* --- Premium Share Bar --- */
.share-section {
    margin: 4rem 0 2rem;
    padding: 2rem;
    background: rgba(166, 124, 82, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    animation: fadeInUp 1s ease-out;
}

.share-divider {
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.share-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0;
    width: 100%; height: 1px;
    background: var(--glass-border);
    z-index: 1;
}

.share-divider span {
    position: relative;
    z-index: 2;
    background: #fdfbf8; /* body bg */
    padding: 0 1.5rem;
    font-family: 'Noto Serif KR', serif;
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-dim);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--accent);
    color: var(--accent);
}

.share-btn .icon {
    font-size: 1.2rem;
}

.share-btn.kakao:hover {
    background: #FEE500;
    border-color: #FEE500;
    color: #3C1E1E;
}

.share-btn.download:hover {
    background: var(--text-main);
    color: white;
}

/* ── 후기 작성 (result.html) ─────────────────────────────── */
.review-write-section {
    margin: 3rem 0 1rem;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    text-align: center;
}
.review-stars-input {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 0.5rem;
}
.review-star {
    font-size: 2.8rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
}
.review-star:hover, .review-star.active { color: #f9a825; transform: scale(1.1); }
.review-hint { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.review-comment-input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--bg-light);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin-top: 0.8rem;
}

/* ── 후기 목록 (index.html) ──────────────────────────────── */
.reviews-section {
    padding: 5rem 0;
    background: var(--bg-surface);
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.review-card {
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
}
.review-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
.review-card-stars { color: #f9a825; font-size: 1rem; margin-bottom: 0.8rem; }
.review-card-comment {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-style: italic;
}
.review-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.review-verified {
    color: var(--accent);
    font-weight: 600;
    margin-left: 0.4rem;
}
@media (max-width: 768px) {
    .reviews-grid { grid-template-columns: 1fr; }
}

.share-btn.link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.share-btn.copied {
    background: #2e7d32;
    border-color: #2e7d32;
    color: white;
}

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

@media (max-width: 500px) {
    .share-buttons {
        flex-direction: column;
    }
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Subscription Section --- */
.subscription-section {
    margin: 2rem 0;
    animation: fadeInUp 0.8s ease-out;
}

.sub-card {
    background: white;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.sub-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sub-icon {
    font-size: 1.5rem;
    background: rgba(166, 124, 82, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.sub-text h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
}

.sub-text p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

@media (max-width: 500px) {
    .sub-card {
        padding: 1.2rem;
    }
    .sub-text p {
        font-size: 0.75rem;
    }
}
