:root {
    --bg-main: #0B0F19; /* Deeper than Midnight Blue for better contrast */
    --bg-secondary: #0A0A2A; /* Darker Navy Blue */
    --accent-gold: #DAA520;
    --accent-gold-light: #FFD700;
    --text-main: #F8F8FF; /* Ghost White */
    --text-dim: #A0A5B5;
    --lock-bg: rgba(11, 15, 25, 0.85);
    --font-heading: 'Noto Serif KR', serif;
    --font-body: 'Pretendard', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app-container {
    width: 100%;
    max-width: 480px; /* Mobile first, center on desktop */
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(circle at center 20vh, var(--bg-secondary) 0%, var(--bg-main) 100vh);
    display: flex;
    flex-direction: column;
}

.funnel-step {
    flex: 1;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out forwards;
    position: relative;
}

.funnel-step.active {
    display: flex;
}

.content-wrapper {
    flex: 1;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.scrollable {
    /* Native body scrolling enabled */
}

.scrollable::-webkit-scrollbar {
    display: none;
}

.pb-padding {
    padding-bottom: 100px; /* Space for sticky bottom */
}

.centered {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Typography */
h1, h2, h3, .pre-title, .ch-label {
    font-family: var(--font-heading);
}

.gold-text {
    color: var(--accent-gold-light);
}

/* Landing Step */
.header-area {
    text-align: center;
    margin-top: 40px;
}

.pre-title {
    color: var(--accent-gold);
    font-size: clamp(12px, 3.5vw, 14px);
    letter-spacing: 2px;
    margin-bottom: 8px;
    white-space: nowrap;
    word-break: keep-all;
}

.main-title {
    font-size: clamp(22px, 6.5vw, 36px);
    font-weight: 700;
    text-shadow: 0 0 20px rgba(218, 165, 32, 0.4);
    white-space: nowrap;
    word-break: keep-all;
}

.hero-image-container {
    position: relative;
    height: 300px;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.goblin-img {
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.6), inset 0 0 20px rgba(218, 165, 32, 0.3);
    background: var(--bg-main);
}

.floating-anim {
    animation: float 4s ease-in-out infinite;
}

.floating-item {
    position: absolute;
    width: 60px;
    filter: drop-shadow(0 0 15px rgba(218, 165, 32, 0.4));
    animation: float-rotate 6s ease-in-out infinite;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.8);
}

.item-anim-1 { top: 20%; left: 10%; animation-delay: 0s; }
.item-anim-2 { bottom: 20%; right: 5%; width: 50px; animation-delay: 1.5s; }
.item-anim-3 { bottom: 10%; left: 15%; width: 55px; animation-delay: 3s; }

@keyframes float-rotate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.loading-images-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.loading-item {
    position: absolute;
    width: 80px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    animation: cycleLoading 3s infinite;
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.8);
}

.load-anim-1 { animation-delay: 0s; }
.load-anim-2 { animation-delay: 1s; }
.load-anim-3 { animation-delay: 2s; }

@keyframes cycleLoading {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(-10deg); }
    10%, 23% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(0deg); }
    33% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(10deg); }
}

.copy-area {
    text-align: center;
    margin-bottom: 40px;
}

.sub-headline {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--accent-gold-light);
    line-height: 1.4;
}

.desc {
    color: var(--text-dim);
    font-size: 15px;
}

/* Buttons */
.action-area {
    margin-top: auto;
    padding-bottom: 24px;
}

.fixed-bottom-btn-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 16px 24px 24px 24px;
    background: linear-gradient(to top, var(--bg-main) 80%, transparent);
    z-index: 100;
}

button {
    border: none;
    outline: none;
    font-family: var(--font-body);
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #B8860B 100%);
    color: #000;
    padding: 18px 24px;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary.gold-glow {
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.6);
    animation: flicker 2s infinite;
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-dim);
    padding: 16px 24px;
    margin-bottom: 12px;
}

/* Form Styles */
.form-layout {
    height: 100%;
}

.step-content-area {
    flex: 1;
    padding: 24px 20px 48px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

/* Goblin Profile Header in Step */
.step-goblin-profile {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
}

.step-goblin-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    background: var(--bg-main);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.2);
    flex-shrink: 0;
}

.step-goblin-bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 0 16px 16px 16px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.step-goblin-bubble strong {
    color: var(--accent-gold-light);
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.step-goblin-bubble .sub-text {
    font-size: 13px;
    color: var(--text-dim);
    display: block;
    margin-top: 8px;
}

/* User Input Area in Step */
.step-user-input {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-large-input {
    width: 100%;
    padding: 20px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 12px;
    color: white;
    text-align: center;
    transition: all 0.3s;
    outline: none;
    font-family: var(--font-body);
}

.form-large-input:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2);
}

.form-option-btn {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.form-option-btn:hover, .form-option-btn:active {
    background: rgba(218, 165, 32, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold-light);
}

.form-mbti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 8px;
}

.form-mbti-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 4px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.form-mbti-btn:hover, .form-mbti-btn:active {
    background: rgba(218, 165, 32, 0.15);
    border-color: var(--accent-gold);
}

.form-mbti-btn .mbti-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.form-mbti-btn:hover .mbti-label {
    color: var(--accent-gold-light);
}

.form-mbti-btn .mbti-desc {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.2;
    word-break: keep-all;
}

/* Calendar Toggle (Solar/Lunar) */
.calendar-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.cal-toggle-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cal-toggle-btn.active {
    background: rgba(218, 165, 32, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold-light);
}

/* Preset Cards */
.preset-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.preset-card {
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.preset-card:active {
    background: rgba(218, 165, 32, 0.2);
    border-color: var(--accent-gold);
}

.step-header {
    margin: 32px 0;
    text-align: left;
}

.step-header.center {
    text-align: center;
}

.step-header h2 {
    font-size: 24px;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

input[type="text"], input[type="date"], select, textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s;
    margin: 0;
}

input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    position: relative;
}

select option {
    background: var(--bg-main);
    color: var(--text-main);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-gold);
    outline: none;
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 8px;
    margin: 0;
    cursor: pointer;
}

.radio-group input[type="radio"]:checked + label {
    background: rgba(218, 165, 32, 0.1);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Loading */
.loading-spinner {
    width: 100px;
    animation: float 2s infinite, flicker 1s infinite;
    margin-bottom: 24px;
}

.loading-text {
    font-size: 20px;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

/* Teaser / Results */
.teaser-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    margin-top: 24px;
}

.small-goblin {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    background: var(--bg-main);
}

.speech-bubble {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 0 16px 16px 16px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.teaser-card {
    background: rgba(25, 25, 112, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
}

.tag {
    display: inline-block;
    font-size: 12px;
    color: var(--bg-main);
    background: var(--accent-gold);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 12px;
}

.teaser-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.teaser-card p {
    color: var(--text-dim);
    font-size: 14px;
}

.lock-card {
    overflow: hidden;
    min-height: 230px;
}

.blur-text {
    filter: blur(4px);
    opacity: 0.5;
    user-select: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--lock-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    backdrop-filter: blur(2px);
}

.lock-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.lock-overlay h3 {
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.sticky-bottom {
    margin-top: 32px;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
    z-index: 20;
}

/* Paywall */
.package-preview {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--accent-gold);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 32px;
}

.package-preview img {
    width: 120px;
    margin-bottom: 16px;
    animation: float 3s infinite;
}

.price-box {
    margin-bottom: 24px;
}

.price-label {
    font-size: 12px;
    color: var(--text-dim);
}

.price {
    font-size: 32px;
    color: var(--accent-gold-light);
}

.benefit-list {
    list-style: none;
    text-align: left;
    font-size: 14px;
}

.benefit-list li {
    margin-bottom: 8px;
    color: var(--text-main);
}

.payment-methods h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-dim);
}

.btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    padding: 16px;
}

.btn-pay.kakaopay { background: #FEE500; color: #000; }
.btn-pay.naverpay { background: #03C75A; color: #FFF; }
.btn-pay.tosspay { background: #0050FF; color: #FFF; }
.btn-pay.creditcard { background: #333; color: #FFF; }

/* Full Results */
.result-view .chapter {
    margin-bottom: 60px;
    padding-top: 24px;
    border-top: 1px dashed rgba(218, 165, 32, 0.3);
}

.result-view .chapter:first-child {
    border-top: none;
}

.ch-label {
    color: var(--text-dim);
    font-size: clamp(12px, 3.5vw, 14px);
    margin-bottom: 8px;
    white-space: nowrap;
    word-break: keep-all;
}

.result-view h2 {
    font-size: 24px;
    color: var(--accent-gold-light);
    margin-bottom: 24px;
}

.ch-image {
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 32px auto;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
}

.info-card.gold-border {
    border: 1px solid var(--accent-gold);
}

.card-title {
    font-weight: 700;
    margin-bottom: 16px;
}

.thermometer-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.thermo-bulb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8b8b, #ff4b4b);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.6);
    flex-shrink: 0;
}

.gauge-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.gauge-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.temp-fill {
    background: linear-gradient(90deg, #ffb347, #ff4b4b);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.5);
}

.vault-container {
    width: 140px;
    height: 180px;
    margin: 24px auto;
    border-radius: 12px;
    background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
    position: relative;
    overflow: hidden;
    border: 6px solid #222;
    box-shadow: inset 0 20px 40px rgba(0,0,0,0.9), 0 0 20px rgba(218,165,32,0.2);
}

.vault-container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border: 2px solid var(--accent-gold);
    border-radius: 6px;
    z-index: 10;
    pointer-events: none;
}

.vault-coins {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 20%, transparent 40%),
        linear-gradient(0deg, #d4af37 0%, #ffd700 50%, #b8860b 100%);
    background-size: 40px 10px, 100% 10px;
    border-top: 2px solid #ffeba1;
    transition: height 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 -10px 20px rgba(218,165,32,0.5);
}

.vault-coins::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(0,0,0,0.3) 9px, rgba(0,0,0,0.3) 10px);
}

.timeline {
    position: relative;
    padding-left: 20px;
    margin-top: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.t-item {
    position: relative;
    margin-bottom: 24px;
}

.t-dot {
    position: absolute;
    left: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    top: 6px;
}

.t-item.info .t-dot { background: #00E5FF; box-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
.t-item.warning .t-dot { background: #FF4B4B; box-shadow: 0 0 10px rgba(255, 75, 75, 0.5); }
.t-item.success .t-dot { background: var(--accent-gold); box-shadow: 0 0 10px rgba(218, 165, 32, 0.5); }

.t-text {
    font-size: 15px;
}

.ending-card {
    background: radial-gradient(circle at top, rgba(218, 165, 32, 0.2), transparent);
    border: 1px solid var(--accent-gold);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 32px;
}

.ending-card img {
    width: 80px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 2px solid var(--accent-gold);
}

.ending-card h3 {
    font-size: 18px;
    line-height: 1.5;
    font-family: var(--font-heading);
}

/* Floating Kakao */
.floating-kakao {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #FEE500;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
    transition: transform 0.2s;
}

.floating-kakao:active {
    transform: scale(0.9);
}

.floating-kakao img {
    width: 30px;
}

/* Updated Thermometer UI */
.thermometer-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 16px 0;
}

.thermo-bulb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), #FF4B4B);
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.5);
    border: 2px solid rgba(255,255,255,0.1);
}

.thermometer-wrapper .gauge-bar {
    margin-bottom: 0;
    flex: 1;
    margin-left: -8px;
    height: 12px;
    border-radius: 0 6px 6px 0;
    z-index: 1;
}

/* Updated Timeline UI */
.t-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-left: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.t-month {
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 4px;
}

.t-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.t-desc {
    font-size: 14px;
    color: var(--text-dim);
}

.t-item.warning .t-card { border-left: 3px solid #FF4B4B; }
.t-item.success .t-card { border-left: 3px solid var(--accent-gold); }
.t-item:not(.warning):not(.success) .t-card { border-left: 3px solid #4B8BFF; }

/* Updated Relationship Map UI */
.node-title { font-weight: 700; font-size: 14px; }
.node-desc { font-size: 12px; color: var(--text-dim); }
.map-node.warning .node-desc { color: #FFbaba; }


/* Visualization Components */
.intro-images {
    position: relative;
    height: auto;
    padding: 20px 0;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-images .ch-image {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.6), inset 0 0 20px rgba(218, 165, 32, 0.3);
    background: var(--bg-main);
}

.ch-image-small {
    position: absolute;
    width: 60px;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.8);
}

.ch-image-small:nth-child(2) { top: 10%; right: 10%; }
.ch-image-small:nth-child(3) { bottom: 10%; left: 10%; }
.ch-image-small:nth-child(4) { top: 10%; left: 10%; }

.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 2s; }
.delay-3 { animation-delay: 3s; }

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge.positive { background: rgba(218, 165, 32, 0.2); color: var(--accent-gold-light); border: 1px solid var(--accent-gold); }
.badge.negative { background: rgba(255, 75, 75, 0.1); color: #FF6B6B; border: 1px solid #FF6B6B; }

.temp-fill { background: linear-gradient(90deg, var(--accent-gold), #FF4B4B) !important; }

.goblin-step {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="%23DAA520"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/></svg>');
    background-color: transparent !important;
    width: 14px;
    height: 14px;
    left: -22px;
}

.wave-graph {
    height: 120px;
    width: 100%;
    margin-bottom: 16px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.graph-path {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0px 0px 4px rgba(218, 165, 32, 0.5));
    animation: drawPath 2s ease-out forwards;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

.relationship-types {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.r-card {
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--text-dim);
}

.r-card h4 { font-size: 15px; margin-bottom: 4px; }
.r-card.good { border-left-color: var(--accent-gold); }
.r-card.good h4 { color: var(--accent-gold); }
.r-card.bad { border-left-color: #FF4B4B; }
.r-card.bad h4 { color: #FF4B4B; }

.cash-flow {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.cf-item {
    flex: 1;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    text-align: center;
}

.cf-item.in strong { color: var(--accent-gold-light); display: block; margin-bottom: 8px; }
.cf-item.out strong { color: #FF6B6B; display: block; margin-bottom: 8px; }

.relationship-map {
    position: relative;
    height: 250px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 50%;
    margin: 64px auto;
    width: 250px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.relationship-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.rel-node {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(11,15,25,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.rel-node.good { border-left: 4px solid var(--accent-gold); }
.rel-node.bad { border-left: 4px solid #FF6B6B; background: rgba(255,75,75,0.05); }

.silhouette {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-main); border: 2px solid var(--accent-gold);
    display: flex; justify-content: center; align-items: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.rel-node.bad .silhouette { border-color: #FF6B6B; color: #FF6B6B; }

.node-text { display: flex; flex-direction: column; text-align: left; flex: 1; }
.node-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; color: var(--text-main); }
.node-desc { font-size: 14px; color: var(--text-dim); line-height: 1.4; }

.mt-2 { margin-top: 16px; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 24px 0;
}

.cal-month {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 4px;
    text-align: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.cal-month.red-bul {
    background: rgba(255, 75, 75, 0.15);
    border: 1px solid #FF4B4B;
    color: #FFbaba;
}

.cal-month.gold-bul {
    background: rgba(218, 165, 32, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold-light);
    font-weight: bold;
    animation: flicker 2s infinite;
}

.action-list {
    padding-left: 20px;
    list-style-type: none;
}

.action-list li {
    margin-bottom: 12px;
    position: relative;
}

.action-list li::before {
    content: '•';
    color: var(--accent-gold);
    position: absolute;
    left: -15px;
    font-weight: bold;
}

/* Footer Styles */
.app-footer {
    margin-top: 48px;
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-content {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.8;
    opacity: 0.7;
}

.footer-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ========================================================= */
/* New Styles Added for Refactoring */
/* ========================================================= */

/* Top Navigation */
.top-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.pt-nav { padding-top: 80px; }
.nav-logo { height: 50px; object-fit: contain; }
.nav-right { display: flex; gap: 12px; }
.icon-btn { background: transparent; border: none; color: var(--text-main); padding: 4px; border-radius: 50%; display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; }

/* Profile Modal */
.modal { display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-content { background-color: var(--bg-secondary); border: 1px solid var(--accent-gold); border-radius: 16px; padding: 24px; width: 90%; max-width: 400px; position: relative; color: var(--text-main); }
.close-btn { color: var(--text-dim); position: absolute; right: 20px; top: 16px; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-btn:hover { color: var(--accent-gold); }
.modal h3 { color: var(--accent-gold); margin-bottom: 12px; font-size: 18px; }
.profile-info p { margin-bottom: 8px; font-size: 15px; }
.modal-divider { border: 0; height: 1px; background: rgba(255,255,255,0.1); margin: 20px 0; }
.purchase-list { list-style: none; padding: 0; font-size: 14px; }
.purchase-list li { padding: 12px; background: rgba(255,255,255,0.05); border-radius: 8px; margin-bottom: 8px; }
.empty-list { text-align: center; color: var(--text-dim); }

/* Utilities */
.center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.w-full { width: 100%; }
.column { flex-direction: column; }

.traditional-divider {
    width: 80%;
    height: 1px;
    margin: 64px auto;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.5), transparent);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.traditional-divider::after {
    content: '';
    width: 32px;
    height: 32px;
    background-color: var(--bg-main);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23daa520' stroke-width='1.2'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z'/%3E%3Cpath d='M12 2a10 10 0 0 1 0 20c0-5.523 4.477-10 10-10H2c5.523 0 10-4.477 10-10z'/%3E%3C/svg%3E");
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 50%;
}

.preview-scroll-container {
    animation: scrollVerticalPreview 40s linear infinite;
    display: flex;
    flex-direction: column;
}
@keyframes scrollVerticalPreview {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 16px)); }
}

/* Onboarding */
.onboarding-logo { width: 220px; margin: 0 auto; display: block; filter: drop-shadow(0 0 25px rgba(218, 165, 32, 0.4)); }
.section-title { font-size: clamp(20px, 6vw, 28px); font-weight: 800; color: var(--text-main); margin-bottom: 12px; white-space: nowrap; word-break: keep-all; }
.sub-desc { font-size: 16px; line-height: 1.6; text-align: center; }
.tags-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tag.outline { background: rgba(218, 165, 32, 0.05); border: 1px solid rgba(218, 165, 32, 0.4); color: var(--accent-gold-light); padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; font-family: var(--font-body); display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: all 0.3s; }
.tag.outline:hover { background: rgba(218, 165, 32, 0.15); border-color: var(--accent-gold); }
.photo-cards { display: flex; justify-content: center; gap: 16px; }
.photo-wrapper { width: 140px; height: 180px; overflow: hidden; border-radius: 12px; border: 2px solid var(--accent-gold); box-shadow: 0 4px 15px rgba(218,165,32,0.3); }
.photo-card { width: 100%; height: 100%; object-fit: cover; }
.speech-bubble.dark { background: rgba(11,15,25,0.8); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px; font-size: 15px; color: var(--text-main); }
.stats-card { background: linear-gradient(135deg, rgba(218,165,32,0.1) 0%, rgba(255,255,255,0.05) 100%); border: 1px solid var(--accent-gold); padding: 20px; border-radius: 16px; font-size: 16px; }
.stats-card .highlight { color: var(--accent-gold-light); font-size: 24px; font-weight: 800; display: block; margin-bottom: 4px; }
.stats-card .highlight.inline { display: inline-block; margin-bottom: 0; margin-right: 4px; }
.review-cards { display: flex; flex-direction: column; gap: 12px; }
.review-card { background: rgba(255,255,255,0.05); padding: 16px; border-radius: 12px; border-left: 3px solid var(--accent-gold); text-align: left;}
.review-card .stars { color: #FFD700; font-size: 16px; margin-bottom: 4px; letter-spacing: 2px; }
.review-card .review-title { font-size: 16px; margin-bottom: 4px; color: var(--text-main); }
.review-card .review-text { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; line-height: 1.4; }
.review-card .reviewer { font-size: 12px; color: rgba(255,255,255,0.4); text-align: right; }

.photo-slider-container { width: 100%; position: relative; height: 180px; overflow: hidden; margin: 0 auto; }
.empathy-topic { animation: fadeIn 0.6s ease-out; }
#onboarding-photo-slider { position: relative; width: 100%; height: 100%; }
.photo-slide { position: absolute; top: 0; left: 0; width: 100%; transition: opacity 0.5s ease-in-out; }

.onboarding-review-slider-container { 
    width: 100%; 
    position: relative; 
    height: 420px; 
    overflow: hidden; 
    mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
}
.review-marquee {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: scrollVertical 25s linear infinite;
}
.review-marquee:hover {
    animation-play-state: paused;
}
@keyframes scrollVertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 6px)); }
}

/* Service Cards */
.service-cards-area { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.service-card { display: flex; align-items: center; gap: 16px; background: rgba(25, 25, 112, 0.4); border: 1px solid rgba(255,255,255,0.05); padding: 20px; border-radius: 16px; }
.s-icon { font-size: 32px; background: rgba(218,165,32,0.1); width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; border-radius: 50%; }
.s-content h3 { font-size: 18px; color: var(--accent-gold); margin-bottom: 4px; }
.s-content p { font-size: 14px; color: var(--text-dim); }

/* Chat Layout */
.chat-layout { overflow: hidden; }
.progress-container { padding: 16px; background: rgba(11,15,25,0.9); z-index: 10; border-bottom: 1px solid rgba(255,255,255,0.05); }
.progress-text { font-size: 14px; color: var(--accent-gold); margin-bottom: 8px; font-weight: 600; }
.progress-bar-bg { height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold), #FFD700); width: 0%; transition: width 0.5s ease; }
.chat-wrapper { flex: 1; padding: 20px; overflow-y: auto; scroll-behavior: smooth; display: flex; flex-direction: column; }
.chat-history { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
.chat-msg { display: flex; margin-bottom: 8px; width: 100%; animation: fadeIn 0.4s ease-out; }
.goblin-msg-container { justify-content: flex-start; }
.user-msg-container { justify-content: flex-end; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent-gold); background: var(--bg-main); margin-right: 12px; align-self: flex-start; }
.msg-content { max-width: 75%; }
.msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.goblin-bubble { background: rgba(255,255,255,0.1); color: var(--text-main); border-top-left-radius: 4px; border: 1px solid rgba(255,255,255,0.05); }
.goblin-bubble strong { color: var(--accent-gold); }
.sub-text { font-size: 13px; color: var(--text-dim); display: block; margin-top: 4px; }
.user-bubble { background: var(--accent-gold); color: #000; border-top-right-radius: 4px; font-weight: 600; }

.chat-input-area { padding: 16px; background: var(--bg-secondary); border-top: 1px solid rgba(255,255,255,0.05); }
.chat-input-row { display: flex; gap: 12px; width: 100%; }
.chat-input-row input[type="text"], .chat-input-row input[type="date"], .chat-input-row select, .chat-input-row textarea { flex: 1; border: 1px solid rgba(218,165,32,0.3); background: rgba(11,15,25,0.5); padding: 12px 16px; border-radius: 8px; color: white; font-family: var(--font-body); }
textarea.form-large-input::-webkit-scrollbar { width: 6px; }
textarea.form-large-input::-webkit-scrollbar-track { background: transparent; }
textarea.form-large-input::-webkit-scrollbar-thumb { background: rgba(218,165,32,0.3); border-radius: 4px; }
textarea.form-large-input::-webkit-scrollbar-thumb:hover { background: rgba(218,165,32,0.6); }
.chat-send-btn { background: var(--accent-gold); color: #000; border: none; padding: 0 20px; border-radius: 8px; font-weight: 700; cursor: pointer; min-width: 80px; width: auto; flex-shrink: 0; }

.chat-options { display: flex; gap: 12px; flex-wrap: wrap; }
.chat-opt-btn { flex: 1; min-width: calc(50% - 6px); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 16px; border-radius: 8px; color: var(--text-main); font-weight: 600; transition: all 0.2s; }
.chat-opt-btn:active { background: rgba(218,165,32,0.2); border-color: var(--accent-gold); }

/* MBTI Grid */
.mbti-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
.mbti-grid::-webkit-scrollbar { width: 4px; }
.mbti-grid::-webkit-scrollbar-thumb { background: rgba(218,165,32,0.5); border-radius: 4px; }
.mbti-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; transition: all 0.2s; cursor: pointer; }
.mbti-btn:active { background: rgba(218,165,32,0.2); border-color: var(--accent-gold); }
.mbti-label { font-size: 18px; font-weight: 800; color: var(--accent-gold-light); }

/* PDF Export Styles */
.pdf-export-mode {
    background: #f4e4bc; /* 고서 느낌의 탁한 양피지 베이스 색상 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139,69,19,0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 90%, rgba(139,69,19,0.04) 0%, transparent 30%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    color: #2b1d14 !important; /* 짙은 갈색/검은색 텍스트 */
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif !important; /* 고딕체 */
}

.pdf-export-mode * {
    color: #2b1d14 !important;
    text-shadow: none !important;
}

.pdf-export-mode .chapter {
    page-break-inside: avoid;
    padding: 60px 40px !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pdf-export-mode .speech-bubble {
    background: rgba(139, 69, 19, 0.08) !important;
    border: 1px solid rgba(139, 69, 19, 0.2) !important;
}

.pdf-export-mode .info-card {
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(139, 69, 19, 0.3) !important;
}

.pdf-export-mode h2 {
    color: #5c3a21 !important;
    font-weight: 800 !important;
}

.pdf-export-mode .ch-label {
    color: #8b5a2b !important;
    font-weight: bold;
}

.pdf-export-mode .vault-container {
    background: rgba(139,69,19,0.2) !important;
    border-color: #8b5a2b !important;
    box-shadow: none !important;
}
.pdf-export-mode .vault-coins {
    background-color: #d4af37 !important; /* 금색 */
}

.pdf-export-mode .rel-node {
    background: rgba(255,255,255,0.7) !important;
    border-color: #8b5a2b !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.pdf-export-mode .graph-path {
    stroke: #8b5a2b !important;
}

.pdf-cover-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    page-break-after: always;
}

.pdf-cover-page img {
    width: 200px;
    margin-bottom: 40px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.pdf-cover-title {
    font-size: 48px;
    font-weight: 900;
    color: #2b1d14;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.pdf-cover-subtitle {
    font-size: 24px;
    color: #5c3a21;
}
.mbti-desc { font-size: 12px; color: var(--text-dim); }

/* Loading Reviews */
.loading-review-container { width: 100%; max-width: 300px; margin: 32px auto 0; position: relative; height: 120px; }
.loading-review-slider { position: relative; width: 100%; height: 100%; }
.loading-r-card { position: absolute; top: 0; left: 0; width: 100%; transition: opacity 0.5s ease-in-out; }

/* Mini Lock Cards Row */
.lock-cards-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.mini-lock-card {
    flex: 1;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 12px;
    padding: 16px 6px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

.mini-lock-icon {
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

.mini-lock-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 12px;
    word-break: keep-all;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-lock-desc {
    font-size: 11px;
    color: var(--accent-gold);
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.2);
    padding: 6px 2px;
    border-radius: 6px;
    font-weight: 600;
    width: 100%;
    line-height: 1.2;
}

.mini-lock-desc .sub-txt {
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 400;
}

/* Smoke Logo Animation */
.smoke-logo-container {
    position: relative;
    width: 260px;
    height: auto;
    margin: 0 auto 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    width: 100%;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

.smoke-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(218,165,32,0.1) 40%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    z-index: 1;
    filter: blur(14px);
    animation: riseSmoke 5s infinite ease-in;
    pointer-events: none;
}

.smoke-effect.delay-1 { animation-delay: 1.6s; left: 40%; width: 120px; animation-duration: 5.5s; }
.smoke-effect.delay-2 { animation-delay: 3.2s; left: 60%; width: 160px; animation-duration: 6s; }

@keyframes riseSmoke {
    0% {
        transform: translate(-50%, 20px) scale(0.6) rotate(0deg);
        opacity: 0;
    }
    30% {
        opacity: 0.7;
    }
    100% {
        transform: translate(calc(-50% + 40px), -160px) scale(3.5) rotate(45deg);
        opacity: 0;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    animation: fadeInOut 3s infinite;
}

.scroll-text {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 4px;
    font-weight: 600;
}

.scroll-arrow-anim {
    font-size: 18px;
    color: var(--accent-gold);
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-dark);
    margin: auto;
    padding: 24px;
    border: 1px solid rgba(218,165,32,0.3);
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(218,165,32,0.05);
}

.close-btn {
    color: var(--text-dim);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent-gold);
    text-decoration: none;
    cursor: pointer;
}

/* ========================================== */
/* PDF Export Mode (Old Book Style) */
/* ========================================== */
.pdf-export-mode {
    background-color: #fdf5e6 !important;
    background-image: radial-gradient(#d4c3a3 1px, transparent 1px);
    background-size: 20px 20px;
    color: #3b2f2f !important;
    padding: 40px !important;
}
.pdf-export-mode .chapter {
    page-break-before: always;
    page-break-inside: avoid;
    min-height: 100vh;
    border-top: none !important;
    padding: 20px;
    border: 2px solid #8b7355;
    border-radius: 4px;
    margin-bottom: 20px;
}
.pdf-export-mode .chapter:first-child {
    page-break-before: avoid;
}
.pdf-export-mode .pdf-cover-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    page-break-after: always;
    border: 4px double #8b7355;
    padding: 40px;
}
.pdf-export-mode .pdf-cover-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    border: 2px solid #8b7355;
}
.pdf-export-mode .pdf-cover-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 36px;
    font-weight: 700;
    color: #5c4033;
    margin: 20px 0;
    border-bottom: 2px dashed #8b7355;
    padding-bottom: 10px;
}
.pdf-export-mode .pdf-cover-subtitle {
    font-size: 18px;
    color: #8b7355;
    margin-bottom: 40px;
}
.pdf-export-mode .pdf-cover-domain {
    margin-top: auto;
    font-size: 20px;
    font-weight: bold;
    color: #5c4033;
    letter-spacing: 2px;
}
.pdf-export-mode .action-area {
    display: none !important;
}
.pdf-export-mode .speech-bubble {
    background: rgba(139, 115, 85, 0.1);
    color: #3b2f2f;
    border-color: #8b7355;
}
.pdf-export-mode h2 {
    color: #5c4033;
}
.pdf-export-mode .info-card {
    background: transparent;
    border: 1px solid #8b7355;
}


/* ========================================== */
/* Global Asset Preloader */
/* ========================================== */
#global-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 15, 25, 1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

#global-preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mystic-text {
    color: var(--accent-gold);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    animation: breathingText 2.5s infinite ease-in-out;
}

@keyframes breathingText {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 15px rgba(218, 165, 32, 0.8); }
}

.mystic-progress-bar {
    width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.mystic-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, var(--accent-gold), #FFF);
    box-shadow: 0 0 10px var(--accent-gold);
    transition: width 0.3s ease-out;
}

@keyframes pulseWarning {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; text-shadow: 0 0 20px #FF4B4B; }
    100% { transform: scale(1); opacity: 1; }
}
