@import url('https://fonts.googleapis.com/css2?family=East+Sea+Dokdo&family=Nanum+Brush+Script&family=Song+Myung:wght@400;700&family=Yeon+Sung&display=swap');

:root {
    --bg-main: #120D0A; /* Dark aged ink & charred Hanji paper background */
    --bg-secondary: #1E1611; /* Deep hanji parchment tone */
    --accent-gold: #D4A359; /* Antique Joseon Gold */
    --accent-gold-light: #F0C987; /* Light Aged Gold */
    --accent-red: #FF2E43; /* Eerie Joseon Vermilion Ink Red */
    --text-main: #F5EBE1; /* Aged Hanji Paper White/Ivory */
    --text-dim: #C2B3A3; /* Muted Hanji Ink Text */
    --lock-bg: rgba(18, 13, 10, 0.92);
    --font-heading: 'Gungsuh', 'GungsuhChe', '궁서', 'Batang', 'Noto Serif KR', serif;
    --font-body: 'Gungsuh', '궁서', 'Pretendard', sans-serif;
}

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

body {
    background-color: #000000;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app-container {
    width: 100%;
    max-width: 480px; /* Mobile first, center on desktop */
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: #120D0A url('./assets/hanji_bg.webp') repeat;
    background-size: 512px 512px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

.funnel-step.active {
    display: flex;
    z-index: 10;
}

.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: 1; transform: scale(1.03); }
}

/* 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;
}

.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: transparent !important;
    z-index: 100;
    pointer-events: none;
}

.fixed-bottom-btn-container > * {
    pointer-events: auto;
}

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;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.btn-primary {
    background: linear-gradient(145deg, #DAA520 0%, #B8860B 50%, #7A5807 100%) !important;
    color: #FFF8EE !important;
    padding: 18px 24px;
    font-family: var(--font-heading);
    font-size: 18px !important;
    font-weight: 900 !important;
    letter-spacing: -0.3px;
    border: 1.5px solid #FFE485 !important;
    border-radius: 16px !important;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.85),
        0 4px 0 #4D3704,
        0 0 25px rgba(218, 165, 32, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    text-shadow: 
        0 1px 0 #4D3704,
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 0 10px rgba(0, 0, 0, 0.8) !important;
    transform: perspective(600px) rotateX(2deg);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: perspective(600px) rotateX(0deg) translateY(-2deg) !important;
    box-shadow: 
        0 14px 32px rgba(0, 0, 0, 0.95),
        0 5px 0 #4D3704,
        0 0 35px rgba(255, 215, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
    background: linear-gradient(145deg, #E8B832 0%, #C9961A 50%, #8C650A 100%) !important;
}

.btn-primary:active {
    transform: perspective(600px) translateY(3deg) scale(0.98) !important;
    box-shadow: 
        0 4px 14px rgba(0, 0, 0, 0.8),
        0 1px 0 #4D3704,
        0 0 15px rgba(218, 165, 32, 0.3) !important;
}

.btn-primary.gold-glow {
    opacity: 1 !important;
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.9),
        0 4px 0 #4D3704,
        0 0 30px rgba(255, 215, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    animation: goldGlowFlicker 2.5s infinite ease-in-out;
}

@keyframes goldGlowFlicker {
    0%, 100% {
        box-shadow: 
            0 10px 28px rgba(0, 0, 0, 0.9),
            0 4px 0 #4D3704,
            0 0 25px rgba(255, 215, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
    50% {
        box-shadow: 
            0 12px 35px rgba(0, 0, 0, 0.95),
            0 5px 0 #4D3704,
            0 0 45px rgba(255, 220, 50, 0.9),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

.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;
}

/* 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: linear-gradient(135deg, rgba(32, 23, 17, 0.9), rgba(20, 14, 10, 0.95));
    border: 1px solid rgba(212, 163, 89, 0.4);
    border-radius: 12px;
    color: #F5EBE1;
    text-align: center;
    transition: all 0.3s;
    outline: none;
    font-family: var(--font-heading);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.form-large-input:focus {
    border-color: var(--accent-gold);
    background: rgba(45, 33, 23, 0.95);
    box-shadow: 0 0 15px rgba(212, 163, 89, 0.35), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.form-option-btn {
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(38, 28, 20, 0.9), rgba(24, 18, 13, 0.95));
    border: 1px solid rgba(212, 163, 89, 0.3);
    border-radius: 12px;
    color: #F5EBE1;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.form-option-btn:hover, .form-option-btn:active {
    background: linear-gradient(135deg, rgba(60, 44, 30, 0.95), rgba(40, 28, 19, 0.95));
    border-color: var(--accent-gold);
    color: var(--accent-gold-light);
    box-shadow: 0 0 15px rgba(212, 163, 89, 0.35);
}

.calendar-toggle {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
}

.cal-toggle-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, rgba(34, 25, 18, 0.9), rgba(22, 16, 11, 0.95));
    border: 1px solid rgba(212, 163, 89, 0.3);
    color: var(--text-dim);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.cal-toggle-btn.active {
    background: linear-gradient(135deg, rgba(60, 44, 30, 0.95), rgba(40, 28, 19, 0.95));
    border-color: var(--accent-gold);
    color: var(--accent-gold-light);
    box-shadow: 0 0 12px rgba(212, 163, 89, 0.3);
}

.form-mbti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-height: none;
    overflow: visible;
}

.form-mbti-btn {
    background: linear-gradient(135deg, rgba(34, 25, 18, 0.9), rgba(22, 16, 11, 0.95));
    border: 1px solid rgba(212, 163, 89, 0.25);
    padding: 10px 2px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
    width: 100%;
}

.form-mbti-btn:hover, .form-mbti-btn:active {
    background: rgba(212, 163, 89, 0.2);
    border-color: var(--accent-gold);
}

/* 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: clamp(12px, 4.2vw, 20px);
    color: var(--accent-gold);
    margin-bottom: 8px;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}

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

.speech-bubble {
    background-color: rgba(38, 28, 20, 0.95);
    background-image: url('./assets/hanji_card.webp');
    background-size: 400px 400px;
    border: 1.5px solid rgba(212, 163, 89, 0.4);
    border-radius: 0 16px 16px 16px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    font-family: var(--font-heading);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(0, 0, 0, 0.5);
    color: #F5EBE1;
}

.teaser-card {
    background-color: rgba(36, 26, 18, 0.95);
    background-image: url('./assets/hanji_card.webp');
    background-size: 400px 400px;
    border: 1.5px solid rgba(212, 163, 89, 0.35);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(0, 0, 0, 0.6);
}

.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: rgba(32, 23, 16, 0.75);
    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-book-page,
.result-book-page *,
#result-paper-viewport * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.result-view .chapter {
    margin-bottom: 60px;
    padding-top: 24px;
}

.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;
}


/* 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; }

.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 - Clean Ultra-Luxury Joseon Dark Lacquer Theme */
.app-footer {
    position: relative;
    margin-top: 48px;
    padding: 32px 24px 32px 24px;
    background: linear-gradient(180deg, #140A0D 0%, #080405 100%);
    border-top: 2px solid #8C6A3C;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.95);
    text-align: center;
}

/* 헤더 아래의 뇌문(雷文) 띠(.top-nav::after)를 위아래로 뒤집어 푸터 위에 똑같이 두른다.
   결제 화면처럼 푸터 위 여백이 없으면 띠가 본문 아래쪽에 겹치는데, 본문(.funnel-step.active, z-index 10)에
   가려지지 않도록 그보다 위에 그린다. */
.app-footer::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background-color: #120A0C;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M0 10H12M1 10V2H11V8H3V4H9V6H5' fill='none' stroke='%23B8954A' stroke-width='.9'/%3E%3Cpath d='M0 11.6H12' stroke='%236E5230' stroke-width='.6'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom center;
    transform: scaleY(-1);
    pointer-events: none;
    z-index: 11;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
}

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

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

/* 사업자 정보 접기·펼치기 — '정보 보기'에 밑줄 */
.biz-toggle-row {
    margin-bottom: 4px;
}

.biz-toggle {
    width: auto;
    height: auto;
    margin: 0;
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.biz-toggle__link {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.biz-toggle__arrow {
    font-size: 10px;
    opacity: 0.8;
}

#dynamic-biz-info[hidden] {
    display: none;
}

/* 푸터 약관 링크 — '서비스 이용약관'은 진하게, 나머지는 한 톤 낮게 */
.footer-legal-links span {
    margin: 0 4px;
    opacity: 0.6;
}

.footer-legal-link {
    display: inline-block;
    padding: 4px 2px;
    color: var(--text-dim);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal-link--main {
    color: var(--text-main);
    font-weight: 700;
}

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

/* Top Navigation - Clean Joseon Dark Lacquer with Scalloped Kiwa Tile Eaves (UUUUUU) Bottom Border */
.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: linear-gradient(180deg, #1A0F12 0%, #0E0709 100%);
    border-bottom: 2px solid #8C6A3C;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(16px);
    z-index: 100;
}

/* Joseon 뇌문(雷文) Key-Fret Trim Bottom Border Element */
.top-nav::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background-color: #120A0C;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M0 10H12M1 10V2H11V8H3V4H9V6H5' fill='none' stroke='%23B8954A' stroke-width='.9'/%3E%3Cpath d='M0 11.6H12' stroke='%236E5230' stroke-width='.6'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom center;
    pointer-events: none;
    z-index: 101;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
}
.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, .mystic-divider {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 80% !important;
    max-width: 600px !important;
    height: 32px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border: none !important;
    position: relative !important;
    box-sizing: border-box !important;
    /* Draw a single gold line that fades out on both ends (html2canvas rendering safe) */
    background: linear-gradient(to right, transparent, rgba(218, 165, 32, 0.65) 20%, rgba(218, 165, 32, 0.65) 80%, transparent) no-repeat center center / 100% 1px !important;
}

.traditional-divider {
    margin-top: 64px !important;
    margin-bottom: 64px !important;
}

.mystic-divider {
    margin-top: 48px !important;
    margin-bottom: 48px !important;
}

/* Remove pseudo-elements for complete html2canvas compatibility */


.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(14px, 5.2vw, 28px) !important; 
    font-weight: 900 !important; 
    color: #FFFFFF !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 16px !important; 
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important; 
    word-break: keep-all !important; 
    text-shadow: 
        2px 2px 0px #8B6508,
        4px 4px 0px #4A3500,
        6px 6px 0px #000000,
        8px 8px 18px rgba(0, 0, 0, 0.95),
        0 0 25px rgba(255, 215, 0, 0.75),
        0 0 45px rgba(218, 165, 32, 0.5) !important;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.95)) !important;
    transform: perspective(600px) rotateX(2deg) !important;
    transform-origin: center center !important;
    letter-spacing: -0.5px !important;
}

.empathy-topic .section-title {
    color: #FFF8E7 !important;
    font-size: clamp(13px, 4.8vw, 26px) !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    white-space: nowrap !important;
    text-shadow: 
        2px 2px 0px #9A6A00,
        4px 4px 0px #503500,
        6px 6px 0px #000000,
        8px 8px 18px rgba(0, 0, 0, 0.95),
        0 0 25px rgba(255, 215, 0, 0.85),
        0 0 50px rgba(255, 175, 0, 0.6) !important;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.95)) !important;
}

.sub-desc { font-size: 16px; line-height: 1.6; text-align: center; }
.tags-container {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.tag.outline {
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    border: 1.5px solid #8C6A3C !important;
    color: #26170E !important;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: inset 0 0 10px rgba(160, 120, 60, 0.25), 0 4px 14px rgba(0,0,0,0.5) !important;
    transition: all 0.3s;
    text-shadow: none !important;
    white-space: nowrap !important;
    flex-shrink: 0;
}
.tag.outline:hover { background: #FAF4E8 !important; border-color: #A88754 !important; }

@media (max-width: 480px) {
    .tags-container {
        gap: 6px !important;
    }
    .tag.outline {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}
@media (max-width: 360px) {
    .tags-container {
        gap: 4px !important;
    }
    .tag.outline {
        padding: 6px 8px !important;
        font-size: 11.5px !important;
    }
}
.photo-cards { display: flex; justify-content: center; width: 100%; }
.photo-wrapper { 
    width: 240px; 
    height: 240px; 
    max-width: 80vw;
    max-height: 80vw;
    aspect-ratio: 1 / 1;
    overflow: hidden; 
    border-radius: 20px; 
    border: 1.5px solid rgba(218, 165, 32, 0.5); 
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(218, 165, 32, 0.2); 
    margin: 0 auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.photo-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(218, 165, 32, 0.35);
}
.photo-card { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.speech-bubble.dark {
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E6D5B8 100%) !important;
    border: 1.5px solid #8C6A3C !important;
    border-radius: 18px !important;
    padding: 18px 20px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1F120A !important;
    font-family: var(--font-heading) !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.7),
        inset 0 0 12px rgba(180, 140, 70, 0.25) !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
    transform: perspective(600px) rotateX(1deg);
    word-break: keep-all; /* '없을/까?'처럼 단어 중간에서 줄이 바뀌지 않게 */
}

.stats-card { 
    background: linear-gradient(145deg, rgba(35, 20, 10, 0.95) 0%, rgba(15, 5, 10, 0.95) 100%); 
    border: 1.5px solid rgba(218, 165, 32, 0.5); 
    padding: 22px 24px; 
    border-radius: 20px; 
    font-size: 18px; 
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.85),
        0 0 25px rgba(218, 165, 32, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(0, 0, 0, 0.8);
    transform: perspective(600px) rotateX(2deg);
    margin: 12px auto 20px;
}
.stats-card .highlight { 
    color: #FFD700 !important; 
    font-size: 30px !important; 
    font-weight: 900 !important; 
    display: block; 
    margin-bottom: 4px; 
    text-shadow: 
        0 1px 0 #B8860B,
        0 2px 0 #8B6508,
        0 3px 6px rgba(0, 0, 0, 0.95),
        0 0 20px rgba(255, 215, 0, 0.7) !important;
}
.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: 19px; font-weight: 700; margin-bottom: 8px; color: #ffffff; text-shadow: 0 2px 10px rgba(255,255,255,0.1); }
.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: 275px; 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: 178px; /* 가로 스크롤 카드 높이(160px) + 그림자 여유 공간 고려 */
    overflow: hidden; /* Pure CSS animation only needs hidden */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.onboarding-review-slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to right, var(--bg-main, #0B0F19), transparent);
    z-index: 5;
    pointer-events: none;
}
.onboarding-review-slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to left, var(--bg-main, #0B0F19), transparent);
    z-index: 5;
    pointer-events: none;
}
.onboarding-review-slider-container::-webkit-scrollbar {
    display: none;
}
.review-marquee {
    display: flex;
    flex-direction: row; /* 가로 스크롤 방향 */
    gap: 16px;
    width: max-content;
    animation: marqueeScroll 25s linear infinite !important; /* Pure CSS animation */
}
.review-marquee .review-card {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
.review-marquee .review-card .review-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    margin: 0 auto 18px auto;
    border: 1px solid rgba(218, 165, 32, 0.5);
    background: rgba(218, 165, 32, 0.08);
    padding: 3px 12px;
    border-radius: 20px;
}
.review-marquee .review-card .stars {
    font-size: 24px;
    margin-bottom: 0;
}
.review-marquee .review-card .reviewer {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-align: right;
    display: block;
    margin-top: 12px;
}
.review-marquee .review-card .review-text {
    font-size: 16.5px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.55;
    margin-bottom: 0;
}

/* 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-color: rgba(36, 26, 18, 0.95); background-image: url('./assets/hanji_card.webp'); background-size: 400px 400px; border: 1.5px solid rgba(212, 163, 89, 0.35); border-radius: 12px; padding: 16px 20px; }
.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; }
.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); }
.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 */
/* ============================================================
   로딩 화면 — 화면을 꽉 채우는 옛 흑백 필름 배경
   ============================================================ */
/* 로딩은 브랜드 스토리처럼 화면을 통째로 쓰는 몰입 구간이다.
   헤더는 nextStep 에서 숨기고, 푸터/하단바는 아래에서 숨겨 영상이 화면을 꽉 채우게 한다.
   fixed 로 띄우면 #app-container 의 max-width:480px 를 벗어나
   데스크탑에서 화면 전체로 퍼지므로 절대 쓰지 않는다. */
#step-loading {
    position: relative;
    overflow: hidden;
}

#step-loading.active ~ .app-footer,
#step-loading.active ~ #app-bottom-nav,
#step-loading.active ~ .bottom-nav-bar {
    display: none !important;
}

/* 글자 묶음을 화면 한가운데로 (섹션이 이미 100dvh라 flex:1 로 채운다) */
.loading-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-overlay .loading-subtext {
    max-width: 260px;
    word-break: keep-all;
    text-wrap: balance;
    line-height: 1.55;
}

.loading-film {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #070504;
    pointer-events: none;
}

.loading-film__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 흑백·대비·밝기 보정은 영상 파일에 구워져 있다.
       CSS filter 를 걸면 비디오가 GPU 고속 합성 경로에서 빠져
       매 프레임 필터 합성을 거치므로 여기서는 걸지 않는다. */
}

/* 글씨가 읽히도록 위·아래를 눌러주는 스크림 */
.loading-film__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(7, 5, 4, 0.72) 0%,
            rgba(7, 5, 4, 0.14) 22%,
            rgba(7, 5, 4, 0.16) 50%,
            rgba(7, 5, 4, 0.78) 100%),
        radial-gradient(125% 72% at 50% 42%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.6) 100%);
}

/* 영사기 깜빡임 */
.loading-film__flicker {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.1;
    animation: filmFlicker 0.22s steps(2, end) infinite;
}

@keyframes filmFlicker {
    0%   { opacity: 0.04; }
    100% { opacity: 0.16; }
}

@media (prefers-reduced-motion: reduce) {
    .loading-film__flicker { animation: none; }
}

/* 영상 위에 올라가는 글자는 그림자로 띄운다 */
.loading-overlay .loading-text,
.loading-overlay .loading-subtext {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 26px rgba(0, 0, 0, 0.8);
}

.loading-overlay .loading-r-card .review-title,
.loading-overlay .loading-r-card .reviewer,
.loading-overlay .loading-review-note {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.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; }
.loading-r-card .review-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    margin: 0 auto 10px auto;
    border: 1px solid rgba(218, 165, 32, 0.5);
    background: rgba(218, 165, 32, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
}
.loading-r-card .stars {
    font-size: 13px;
    margin-bottom: 0;
}
.loading-r-card .reviewer {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-align: right;
    display: block;
    margin-top: 8px;
}
.loading-r-card .review-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
    line-height: 1.4;
    text-align: center;
}

/* 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));
}

/* ============================================================
   히어로 — 조선 후기 흑백 사진 (나무에 묶인 여인)
   낡아 해진 인화지 실루엣을 마스크로 그대로 따냈다
   ============================================================ */
.hero-photo {
    --hp-w: clamp(226px, 66vw, 286px);
    position: relative;
    width: var(--hp-w);
    aspect-ratio: 720 / 1044;
    margin: 6px auto 14px;
    z-index: 2;
    /* 실루엣을 따라가는 그림자 — 해진 가장자리가 그대로 드러난다 */
    filter:
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6))
        drop-shadow(0 12px 20px rgba(0, 0, 0, 0.72))
        drop-shadow(0 30px 48px rgba(0, 0, 0, 0.55));
    animation: heroPhotoFloat 7s ease-in-out infinite;
    will-change: transform;
}

.hero-photo__sheet {
    position: absolute;
    inset: 0;
    -webkit-mask: url('assets/hero_photo_mask.png') center / 100% 100% no-repeat;
    mask: url('assets/hero_photo_mask.png') center / 100% 100% no-repeat;
}

.hero-photo__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    /* 세피아 기운을 덜어내 흑백에 가깝게 */
    filter: grayscale(0.68) contrast(1.06) brightness(0.96);
}

/* 인화지가 살짝 휘어 보이도록 하는 명암 */
.hero-photo__sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(101deg,
            rgba(28, 18, 8, 0.3) 0%,
            rgba(28, 18, 8, 0.06) 10%,
            rgba(255, 248, 228, 0.1) 34%,
            rgba(255, 255, 255, 0) 54%,
            rgba(28, 18, 8, 0.07) 80%,
            rgba(28, 18, 8, 0.32) 100%),
        radial-gradient(115% 50% at 50% 100%, rgba(18, 11, 5, 0.34), rgba(0, 0, 0, 0) 70%),
        radial-gradient(110% 36% at 50% 0%, rgba(18, 11, 5, 0.22), rgba(0, 0, 0, 0) 74%);
}

@keyframes heroPhotoFloat {
    0%, 100% {
        transform: perspective(1100px) translateY(0) rotateX(2.4deg) rotateY(-1.8deg) rotate(-0.5deg);
    }
    50% {
        transform: perspective(1100px) translateY(-7px) rotateX(0.6deg) rotateY(1.6deg) rotate(0.4deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-photo {
        animation: none;
        transform: perspective(1100px) rotateX(1.5deg) rotateY(-1deg);
    }
}

/* 마스크 미지원 브라우저 대비 */
@supports not ((-webkit-mask-image: url('assets/hero_photo_mask.png')) or (mask-image: url('assets/hero_photo_mask.png'))) {
    .hero-photo__sheet {
        border-radius: 4px;
        overflow: hidden;
    }
}

/* 3D Curled Edge Photo Card */
.curled-photo-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto 16px;
    perspective: 1000px;
    z-index: 2;
}

/* Bottom Left Curled Corner Shadow */
.curled-photo-wrapper::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 10px;
    width: 44%;
    height: 24px;
    box-shadow: -10px 18px 22px rgba(0, 0, 0, 0.95);
    transform: rotate(-7deg) skew(-12deg);
    border-radius: 12px / 70px;
    z-index: 1;
    pointer-events: none;
}

/* Bottom Right Curled Corner Shadow */
.curled-photo-wrapper::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 10px;
    width: 44%;
    height: 24px;
    box-shadow: 10px 18px 22px rgba(0, 0, 0, 0.95);
    transform: rotate(7deg) skew(12deg);
    border-radius: 12px / 70px;
    z-index: 1;
    pointer-events: none;
}

.curled-photo-card {
    position: relative;
    z-index: 2;
    width: 220px;
    height: 260px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 14px 35px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transform: perspective(900px) rotateX(3deg) rotateY(-1.5deg);
    filter: contrast(1.1) brightness(0.96);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.curled-photo-card.square-card {
    width: 230px;
    height: 230px;
    max-width: 78vw;
    max-height: 78vw;
    aspect-ratio: 1 / 1;
}

/* 랜딩 공감 슬라이드 — 세로형 사진 */
.curled-photo-card.portrait-card {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
}

.curled-photo-wrapper:hover .curled-photo-card {
    transform: perspective(900px) rotateX(0deg) rotateY(0deg) scale(1.02);
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

@keyframes floatCurled3D {
    0%, 100% {
        transform: perspective(900px) translateY(0px) rotateX(3deg) rotateY(-1.5deg);
    }
    50% {
        transform: perspective(900px) translateY(-8px) rotateX(5deg) rotateY(-1.5deg);
    }
}

/* 3D Text Depth & Shadow Typography */
.title-3d-effect {
    font-size: clamp(26px, 7vw, 42px) !important;
    font-weight: 900 !important;
    color: #FFFFFF !important;
    line-height: 1.4 !important;
    text-shadow: 
        2px 2px 0px #800010,
        4px 4px 0px #4A000A,
        6px 6px 0px #000000,
        8px 8px 20px rgba(0, 0, 0, 0.95),
        0 0 25px rgba(255, 77, 90, 0.85),
        0 0 50px rgba(218, 165, 32, 0.6) !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.95)) !important;
    transform: perspective(600px) rotateX(2deg);
    letter-spacing: -0.5px;
}

.witch-title-text {
    font-family: var(--font-heading) !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.5px !important;
    text-shadow: 
        1.5px 1.5px 0px #800010,
        3px 3px 0px #4A000A,
        4.5px 4.5px 0px #000000,
        6px 6px 12px rgba(0, 0, 0, 0.95),
        0 0 20px rgba(255, 77, 90, 0.85),
        0 0 35px rgba(218, 165, 32, 0.6) !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.95)) !important;
    transform: perspective(600px) rotateX(2deg);
    display: inline-block;
}

.sub-desc-3d {
    line-height: 1.8 !important;
    font-family: var(--font-heading) !important;
    font-weight: 400 !important;
    letter-spacing: -0.3px !important;
    font-size: clamp(14px, 4vw, 18px) !important;
    color: #F8F8FF !important;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.95),
        0 4px 12px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 0, 0, 0.8) !important;
}

.quote-3d-badge {
    display: inline-block !important;
    margin-top: 14px !important;
    padding: 10px 22px !important;
    background: linear-gradient(135deg, rgba(255, 46, 67, 0.2) 0%, rgba(15, 5, 10, 0.95) 50%, rgba(218, 165, 32, 0.2) 100%) !important;
    border: 1px solid rgba(255, 77, 90, 0.5) !important;
    border-radius: 30px !important;
    color: #FF5263 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-size: clamp(12px, 3.9vw, 17px) !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.85),
        0 0 20px rgba(255, 46, 67, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    text-shadow: 
        0 1px 0 #7A000E,
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(255, 82, 99, 0.8) !important;
    transform: perspective(600px) rotateX(2deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-3d-badge:hover {
    transform: perspective(600px) rotateX(0deg) scale(1.03);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.95),
        0 0 28px rgba(255, 46, 67, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.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);
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 100;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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: #000000;
    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; }
}

/* Small spinner for button loading state */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin-anim 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin-anim {
    to { transform: rotate(360deg); }
}

/* User Review Modal Loading Bar */
@keyframes reviewLoadingBarSlide {
    0% { left: -40%; width: 40%; }
    50% { left: 30%; width: 50%; }
    100% { left: 100%; width: 40%; }
}

.review-loading-indeterminate {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #8C6A3C, #DAA520, #8C6A3C);
    border-radius: 3px;
    animation: reviewLoadingBarSlide 1.4s infinite ease-in-out;
}

/* User Auth Modal Custom Tabs & Inputs */
.login-tab {
    color: var(--text-dim);
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
}
.login-tab:hover {
    color: #fff;
}
.login-tab.active {
    color: var(--accent-gold) !important;
}
.input-group input:focus {
    outline: none;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

/* ==========================================
   Premium Mobile Dashboard Redesign Styles
   ========================================== */

.dashboard-hero {
    position: relative;
    padding: 24px 10px 20px 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.dashboard-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-logo-container {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(218, 165, 32, 0.1);
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.5);
}

.dashboard-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.dashboard-brand-text {
    display: flex;
    flex-direction: column;
}

.dashboard-title-main {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(218, 165, 32, 0.5);
}

.dashboard-title-sub {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-gold-light);
    letter-spacing: 2px;
    margin-top: -2px;
}

.dashboard-tagline {
    margin-top: 16px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    word-break: keep-all;
    max-width: 70%;
    z-index: 2;
    position: relative;
}

.hero-character-wrapper {
    position: absolute;
    right: -15px;
    top: -15px;
    width: 150px;
    height: 150px;
    opacity: 0.75;
    pointer-events: none;
    z-index: 1;
}

.hero-character-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: radial-gradient(circle, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle, black 30%, transparent 80%);
}

/* Promo Card ("실시간 천기문답") */
.promo-card {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 24, 64, 0.95) 0%, rgba(5, 12, 36, 0.98) 100%);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.18), inset 0 0 15px rgba(218, 165, 32, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-2px);
    border-color: rgba(218, 165, 32, 0.6);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.28), 0 0 20px rgba(218, 165, 32, 0.25);
}

.promo-badge-row {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-new {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold-light);
}

.badge-free {
    background: #1E3A8A;
    color: #93C5FD;
    border: 1px solid #3B82F6;
}

.promo-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.promo-info {
    flex: 1;
    z-index: 2;
    padding-right: 120px;
}

.promo-card-title {
    font-family: var(--font-heading);
    font-size: 23px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.promo-tag-row {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.tag-pill {
    font-size: 11px;
    color: #F8F8FF;
    background: rgba(255, 255, 255, 0.07);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-card-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.7;
    word-break: keep-all;
}

.promo-character-side {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 140px;
    height: 100%;
    z-index: 1;
}

.promo-side-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    mask-image: linear-gradient(to left, black 35%, transparent 95%);
    -webkit-mask-image: linear-gradient(to left, black 35%, transparent 95%);
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}

.promo-btn-arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
}

.circle-arrow-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    background: rgba(218, 165, 32, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-light);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2);
    transition: all 0.3s ease;
}

.promo-card:hover .circle-arrow-btn {
    background: var(--accent-gold);
    color: #000;
    transform: scale(1.05);
}

.arrow-symbol {
    font-size: 16px;
    font-weight: bold;
}

/* Service Section Title */
.service-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-title-label {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--accent-gold-light);
    font-weight: 700;
}

.section-more-link {
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s ease;
}

.section-more-link:hover {
    color: var(--accent-gold);
}

/* Service Cards */
.service-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.service-list-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 42, 0.55);
    border: 1px solid rgba(218, 165, 32, 0.16);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-list-card:hover {
    border-color: var(--accent-gold);
    background: rgba(10, 14, 42, 0.75);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.15);
    transform: translateY(-1px);
}

.card-content-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.card-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card-text-block {
    display: flex;
    flex-direction: column;
}

.card-item-title {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.card-item-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

.card-content-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-thumb-image {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(218, 165, 32, 0.2);
    background: var(--bg-main);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.card-thumb-image.scroll-thumb {
    object-position: center;
}

.card-thumb-image.tarot-thumb {
    object-position: center;
}

.card-thumb-image.pouch-thumb {
    object-position: center;
}

.card-thumb-image.couple-thumb {
    object-position: top;
}

.card-item-arrow {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.service-list-card:hover .card-item-arrow {
    color: var(--accent-gold-light);
}

/* Service page header for Service tab */
.service-page-header {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.service-page-title {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--accent-gold-light);
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.service-page-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* Bottom Navigation Bar */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 70px;
    background: #060a1e;
    border-top: 1px solid rgba(218, 165, 32, 0.25);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 10px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #fff;
}

.nav-item.active {
    color: var(--accent-gold-light) !important;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

.center-btn {
    position: relative;
    flex: 1.2;
    display: flex;
    justify-content: center;
    cursor: default;
}

.center-circle {
    position: absolute;
    top: -24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A1F3C 0%, #06091F 100%);
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(218, 165, 32, 0.6), inset 0 0 8px rgba(218, 165, 32, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.center-btn:hover .center-circle {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(218, 165, 32, 0.85), inset 0 0 10px rgba(218, 165, 32, 0.5);
}

.center-logo-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.6));
    transition: transform 0.3s ease;
}

.center-btn:hover .center-logo-img {
    transform: scale(1.05);
}

.timer-clock-icon {
    color: currentColor;
    flex-shrink: 0;
}

.suggested-query-btn {
    background: rgba(218, 165, 32, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.25);
    border-radius: 16px;
    color: var(--accent-gold-light);
    padding: 6px 12px;
    font-size: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggested-query-btn:hover {
    background: rgba(218, 165, 32, 0.2);
    border-color: var(--accent-gold);
    color: #fff;
    transform: translateY(-1px);
}

.suggested-query-btn:active {
    transform: translateY(0) scale(0.97);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes statusPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* ==========================================================
   Premium Paid Report Visualization Dashboard Styles
   ========================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.love-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.visual-card {
    background: rgba(18, 24, 41, 0.95);
    border: 1px solid rgba(218, 165, 32, 0.15);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(218, 165, 32, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.visual-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(218, 165, 32, 0.08);
}

.card-title-mini {
    font-family: var(--font-heading);
    color: var(--accent-gold-light);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    border-left: 3px solid var(--accent-gold);
    padding-left: 10px;
    letter-spacing: 0.5px;
}

/* 1. Score Card Components */
.score-circle-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.score-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-bg-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.score-fill-circle {
    fill: none;
    stroke: #00f2fe; /* cyan */
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
    filter: drop-shadow(0 0 4px #00f2fe);
}

.score-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-num {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.score-grade {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold-light);
    margin-top: 4px;
    background: rgba(218, 165, 32, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.mini-scores-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.mini-score-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.mini-score-item span {
    color: var(--text-dim);
}

.mini-score-item .val {
    font-weight: 800;
    color: var(--accent-gold);
}

/* 2. Radar Charts */
.radar-chart-container {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-grid-line {
    stroke: rgba(218, 165, 32, 0.15);
    stroke-width: 0.5;
}

.radar-axis-line {
    stroke: rgba(218, 165, 32, 0.25);
    stroke-width: 0.8;
}

.radar-polygon {
    fill: rgba(0, 242, 254, 0.2);
    stroke: #00f2fe;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 2px #00f2fe);
}

.radar-label {
    fill: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
}

.radar-dot {
    fill: var(--accent-gold);
    stroke: #fff;
    stroke-width: 1;
}

/* 13. Calendar V2 */
.calendar-grid-v2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .calendar-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cal-month-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 4px;
    text-align: center;
    transition: all 0.2s ease;
}

.cal-month-card.success {
    border-color: rgba(218, 165, 32, 0.4);
    background: rgba(218, 165, 32, 0.04);
}

.cal-month-card.warning {
    border-color: rgba(255, 77, 77, 0.3);
    background: rgba(255, 77, 77, 0.04);
}

.cal-month-card .month-lbl {
    font-size: 11px;
    color: var(--text-dim);
    display: block;
}

.cal-month-card.success .month-lbl {
    color: var(--accent-gold-light);
    font-weight: bold;
}

.cal-month-card.warning .month-lbl {
    color: #ff6b6b;
    font-weight: bold;
}

.cal-month-card .month-kw {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
    display: block;
}

/* 3 & 11. Line Charts */
.line-chart-container {
    width: 100%;
    height: 140px;
    margin-bottom: 10px;
}

.line-chart-container .graph-path {
    fill: none;
    stroke: #00f2fe;
    stroke-width: 2.5;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 4px rgba(0, 242, 254, 0.3));
    animation: none !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
}

.chart-indicators {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    margin-top: 10px;
}

.ind-item.in { color: var(--accent-gold-light); font-weight: bold; }
.ind-item.out { color: #ff6b6b; font-weight: bold; }

/* 4. Matrix list */
.matrix-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matrix-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.matrix-lbl-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
}

.matrix-lbl { color: var(--text-main); }
.matrix-val { color: var(--accent-gold); }

.matrix-bar-bg {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.matrix-bar-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.matrix-item.high .matrix-bar-fill {
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    box-shadow: 0 0 8px var(--accent-gold-light);
}

.matrix-item.low .matrix-bar-fill {
    background: #ff4d4d;
}

/* 5. Recommended Jobs TOP 7 */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 12px;
}

.job-rank-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
}

.job-info {
    flex: 1;
}

.job-name-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
}

.job-reason {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* 7. Red Thread Timeline */
.red-thread-timeline-container {
    position: relative;
    padding-left: 24px;
    margin: 10px 0;
}

.timeline-line-svg {
    position: absolute;
    top: 0;
    left: 8px;
    width: 20px;
    height: 100%;
    pointer-events: none;
}

.red-thread-path {
    fill: none;
    stroke: #ff4d4d;
    stroke-width: 2;
    stroke-dasharray: 4 2;
    animation: weaveThread 4s linear infinite;
}

@keyframes weaveThread {
    to { stroke-dashoffset: -20; }
}

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

.t-dot-v2 {
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 100%;
}

.t-icon-v2 {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff4d4d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    border: 1px solid #fff;
    box-shadow: 0 0 6px #ff4d4d;
}

.t-card-v2 {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 14px;
}

.t-month-v2 {
    font-size: 11px;
    font-weight: bold;
    color: #ff6b6b;
}

.t-title-v2 {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    margin-top: 2px;
}

.t-desc-v2 {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* 8. Spouse Card */
.spouse-inner {
    display: flex;
    gap: 16px;
    align-items: center;
}

@media (max-width: 480px) {
    .spouse-inner {
        flex-direction: column;
    }
}

.spouse-silhouette-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.spouse-photo-container {
    width: 135px;
    height: 180px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
}

.spouse-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spouse-photo-container.loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmerSpouse 1.5s infinite;
    font-size: 0; /* hide silhouette icon */
}

@keyframes shimmerSpouse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spouse-photo-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(218, 165, 32, 0.15);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin-anim 1s linear infinite;
    display: inline-block;
}

.vibe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 140px;
}

.vibe-tag {
    font-size: 9px;
    background: rgba(218, 165, 32, 0.15);
    color: var(--accent-gold-light);
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.spouse-details-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sp-detail {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding-bottom: 4px;
}

.sp-detail span { color: var(--text-dim); }
.sp-detail strong { color: #fff; text-align: right; }

/* 9. Marriage Card */
.marriage-body {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .marriage-body {
        flex-direction: column;
    }
}

.marriage-radial {
    flex-shrink: 0;
}

.radial-gauge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.radial-inner {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.radial-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-gold-light);
}

.radial-lbl {
    font-size: 9px;
    color: var(--text-dim);
}

.marriage-sub-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* 10. Helpers Card */
.helpers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .helpers-grid {
        grid-template-columns: 1fr;
    }
}

.helper-box {
    border-radius: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.01);
}

.helper-box.good { border: 1px solid rgba(0, 242, 254, 0.2); }
.helper-box.bad { border: 1px solid rgba(255, 77, 77, 0.2); }

.helper-box h4 {
    font-size: 13px;
    margin-bottom: 10px;
}

.helper-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.helper-box li {
    font-size: 11px;
    line-height: 1.4;
}

.helper-box li strong {
    display: block;
    color: #fff;
}

.helper-box.good li strong { color: var(--accent-gold-light); }
.helper-box.bad li strong { color: #ff6b6b; }

.helper-box li span {
    color: var(--text-dim);
}

/* 12. Caution Warnings */
.caution-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.caution-item-card {
    background: rgba(255, 77, 77, 0.02);
    border: 1px solid rgba(255, 77, 77, 0.15);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.caution-item-card:hover {
    border-color: rgba(255, 77, 77, 0.4);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.1);
}

.caution-item-card .warn-icon {
    font-size: 16px;
    color: #ff4d4d;
    flex-shrink: 0;
    margin-top: 1px;
}

.caution-item-card h4 {
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 700;
}

.caution-item-card p {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-top: 2px;
    line-height: 1.4;
}

/* 15. Summary Save Card */
.summary-save-card {
    background: linear-gradient(135deg, #0f1526, #060912);
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    padding: 24px;
    margin: 30px auto;
    max-width: 420px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 20px rgba(218, 165, 32, 0.2);
}

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.summary-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--accent-gold);
}

.summary-header-text h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    color: var(--accent-gold-light);
}

.summary-header-text p {
    font-size: 10px;
    color: var(--text-dim);
}

.summary-scores-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.sum-score-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 6px 2px;
    text-align: center;
}

.sum-score-item .lbl {
    font-size: 10px;
    color: var(--text-dim);
    display: block;
}

.sum-score-item strong {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--accent-gold);
    margin-top: 2px;
    display: block;
}

.summary-details-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sum-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sum-detail-item strong {
    font-size: 11px;
    color: var(--accent-gold-light);
}

.sum-detail-item span {
    font-size: 12px;
    color: #fff;
}

.sum-badge-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sum-kw-badge {
    background: rgba(218, 165, 32, 0.12);
    color: var(--accent-gold-light);
    border: 1px solid rgba(218, 165, 32, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
}

.sum-comment-box {
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--accent-gold);
    padding: 10px;
    border-radius: 0 8px 8px 0;
    margin-top: 4px;
}

.sum-comment-box strong {
    font-size: 10.5px;
    color: var(--accent-gold-light);
    display: block;
}

.sum-comment-box p {
    font-size: 11.5px;
    color: #dfd8cb;
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
}

/* Hide empty speech bubbles to prevent displaying empty gray boxes */
.speech-bubble:empty {
    display: none !important;
}

/* Mockup CSS */
.chat-mockup-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.mockup-phone {
    width: 100%;
    max-width: 320px;
    height: 330px;
    background: rgba(6, 10, 30, 0.95);
    border: 1.5px solid rgba(218, 165, 32, 0.25);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.mockup-header {
    background: rgba(11, 15, 42, 0.98);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(218, 165, 32, 0.15);
}

.mockup-avatar {
    width: 24px;
    height: 24px;
    background: var(--bg-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid var(--accent-gold);
}

.mockup-name {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.mockup-chat-area {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    position: relative;
}

.mockup-msg {
    display: flex;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
}

.mockup-msg.user-msg {
    justify-content: flex-end;
    animation: slideInUp 0.5s cubic-bezier(0.1, 1, 0.1, 1) 0.5s forwards, fadeOut 0.5s ease-in 10.5s forwards;
}

.mockup-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.4;
}

.user-msg .mockup-bubble {
    background: linear-gradient(135deg, #d4af37, #aa7c11);
    color: #000;
    font-weight: bold;
    border-top-right-radius: 2px;
}

/* Typing Dots Animation */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: typingBounce 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

.typing-msg {
    animation: fadeIn 0.3s ease-out 1.5s forwards, fadeOut 0.2s ease-in 3.5s forwards;
}

.response-msg {
    animation: slideInUp 0.6s cubic-bezier(0.1, 1, 0.1, 1) 3.7s forwards, fadeOut 0.5s ease-in 10.5s forwards;
}

.mockup-presets, .mockup-presets-js {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.mockup-presets {
    opacity: 0;
    transform: translateY(5px);
    animation: slideInUp 0.5s cubic-bezier(0.1, 1, 0.1, 1) 5.5s forwards, fadeOut 0.5s ease-in 10.5s forwards;
}

.mockup-presets-js {
    opacity: 1;
    transform: translateY(0);
}

.mockup-preset-btn {
    background: rgba(218, 165, 32, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.25);
    border-radius: 12px;
    color: var(--accent-gold-light);
    padding: 4px 8px;
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.mockup-preset-btn:hover {
    background: rgba(218, 165, 32, 0.2);
    border-color: var(--accent-gold);
    color: #fff;
    transform: translateY(-1px);
}

.mockup-preset-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Animations definition */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Virtual Mouse Cursor & Click Simulation */
.virtual-cursor {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI0RBQTUyMCIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIxLjUiPjxwb2x5Z29uIHBvaW50cz0iNCwyIDExLDIwIDE0LDEzIDIxLDExIi8+PC9zdmc+") no-repeat;
    background-size: contain;
    transition: left 0.8s ease-in-out, top 0.8s ease-in-out, transform 0.2s ease-in-out, opacity 0.4s ease-in-out;
}

.mockup-preset-btn.mockup-active {
    background: rgba(218, 165, 32, 0.4) !important;
    border-color: var(--accent-gold) !important;
    color: #fff !important;
    transform: scale(0.95);
}

/* ==========================================================================
   Premium Dashboard Onboarding Redesign Style
   ========================================================================== */

.new-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px; /* 1.2x scaled up */
    padding: 0 24px;
    background: rgba(10, 16, 45, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-brand-logo {
    width: 38px; /* 1.2x scaled up */
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.3);
    object-fit: cover;
}

.new-brand-text {
    display: flex;
    flex-direction: column;
}

.new-brand-title {
    font-size: 18px; /* 1.2x scaled up */
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.new-brand-subtitle {
    font-size: 11px; /* 1.2x scaled up */
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-elements-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.new-hero-section {
    position: relative;
    background-color: #0B0F19;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 44px 24px;
    min-height: 200px;
    border-radius: 16px;
    margin: 16px 20px 24px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.hero-particles-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 45%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hanja-particle {
    position: absolute;
    bottom: -30px;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
    animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-240px) rotate(15deg);
        opacity: 0;
    }
}

.new-hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(16px, 5.2vw, 23px);
    font-weight: 700;
    color: #ffffff;
    line-height: 2.2;
    letter-spacing: 1px;
    margin: 0;
    text-align: left;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

.new-hero-cta {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #B8860B 100%);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(218, 165, 32, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    width: auto;
    max-width: fit-content;
    position: relative;
    z-index: 1;
}

.new-hero-cta:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(218, 165, 32, 0.2);
    position: relative;
    z-index: 1;
}

/* 2-Column Services Grid */
.new-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px 28px 20px;
}

.new-service-card {
    position: relative;
    background: rgba(10, 16, 45, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.new-service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.15);
}

.new-card-badge {
    font-size: 12px; /* 1.2x scaled up */
    font-weight: 800;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.12);
    padding: 4px 10px; /* 1.2x scaled up */
    border-radius: 10px;
    align-self: flex-start;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.new-card-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.new-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-card-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 12px;
    width: 100%;
    overflow: hidden;
}

.new-card-tags span {
    font-size: 9.5px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5px 6px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.new-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}

.new-card-action {
    font-size: 12.5px;
    font-weight: 700;
    color: #000000;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #B8860B 100%);
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.new-card-action .arrow-icon {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.new-service-card:hover .new-card-action {
    background: linear-gradient(135deg, #FFF 0%, var(--accent-gold) 100%);
    box-shadow: 0 6px 16px rgba(218, 165, 32, 0.35);
}

.new-service-card:hover .new-card-action .arrow-icon {
    transform: translateX(3px);
}

/* Chat Card Simulated Bubble Overlay */
.chat-card-wrapper {
    position: relative;
}

.chat-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 16, 45, 0.85) 30%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
    gap: 8px;
    pointer-events: none;
}

.chat-bubble-mini {
    font-size: 11px; /* 1.2x scaled up */
    padding: 6px 10px; /* 1.2x scaled up */
    border-radius: 12px;
    max-width: 85%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: floatMiniBubble 4s infinite ease-in-out;
}

.chat-bubble-mini.user-mini {
    align-self: flex-end;
    background: var(--accent-gold);
    color: #0c0f24;
    border-bottom-right-radius: 2px;
    transform-origin: right bottom;
}

.dots-mini {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 10px;
}

.dots-mini span {
    width: 4px;
    height: 4px;
    background: #FFFFFF;
    border-radius: 50%;
    animation: bounceMiniDots 1.4s infinite ease-in-out both;
}

.dots-mini span:nth-child(1) { animation-delay: -0.32s; }
.dots-mini span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceMiniDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes floatMiniBubble {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.02); }
}

/* Mobile Optimization for 2-Column Services Grid */
@media (max-width: 480px) {
    .new-services-grid {
        gap: 8px;
        padding: 0 20px 28px 20px;
    }
    .new-service-card {
        padding: 10px;
        border-radius: 14px;
    }
    .new-card-badge {
        font-size: 11px;
        padding: 3px 8px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    .new-card-image-wrapper {
        margin-bottom: 8px;
        border-radius: 10px;
    }
    .new-card-tags {
        gap: 3px;
        margin-bottom: 8px;
    }
    .new-card-tags span {
        font-size: 8.5px;
        padding: 1.5px 4px;
        border-radius: 4px;
    }
    .new-card-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .new-card-action {
        font-size: 11px;
        padding: 8px 6px;
        border-radius: 8px;
    }
}

/* Reviews Section */
.new-reviews-section {
    padding: 28px 20px 36px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.new-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    width: 100%;
}

.new-reviews-title {
    font-size: 15px; /* 1.2x scaled up from 13px */
    color: #FFFFFF;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-reviews-title .divider {
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}

.new-reviews-title .reviews-count {
    font-size: 12.5px; /* 1.2x scaled up from 11px */
    color: var(--accent-gold);
    font-weight: 500;
}

.review-refresh-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.45);
    color: var(--accent-gold);
    font-size: 11.5px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex-shrink: 0;
}
.review-refresh-btn:hover, .review-refresh-btn:active {
    background: rgba(218, 165, 32, 0.2);
    border-color: #FFD700;
    color: #ffffff;
    transform: scale(0.96);
}
.review-refresh-btn svg {
    transition: transform 0.4s ease;
}
.review-refresh-btn.spinning svg {
    animation: rotateRefresh 0.8s linear infinite;
}
@keyframes rotateRefresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Infinite Marquee Scroll for Reviews */
.new-reviews-marquee-container {
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    position: relative;
    padding: 10px 0;
}
.new-reviews-marquee-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to right, var(--bg-main, #0B0F19), transparent);
    z-index: 5;
    pointer-events: none;
}
.new-reviews-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to left, var(--bg-main, #0B0F19), transparent);
    z-index: 5;
    pointer-events: none;
}
.new-reviews-marquee-container::-webkit-scrollbar {
    display: none;
}

.new-reviews-marquee-track {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    width: max-content;
    gap: 16px;
    animation: marqueeScroll 35s linear infinite !important;
}

.new-review-card {
    flex: 0 0 160px; /* Square width */
    height: 160px;   /* Square height */
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.new-review-card .review-header {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    border: 1px solid rgba(218, 165, 32, 0.5);
    background: rgba(218, 165, 32, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 4px;
}

.new-review-card .review-stars {
    color: #FFD700;
    font-size: 11px;
    letter-spacing: -0.5px;
}

.new-review-card .reviewer-name {
    font-size: 10px;
    color: var(--text-dim);
    text-align: right;
    display: block;
}

.new-review-card .review-text {
    font-size: 11.5px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    word-break: keep-all;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 8px)); /* Scrolls exactly half the track width */
    }
}

@keyframes marqueeScrollVertical {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(calc(-50% - 6px)); /* Translate exactly half height */
    }
}

/* Payment Toast Animation styles */
.payment-toast {
    background: rgba(11, 15, 25, 0.96);
    border: 1px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(218, 165, 32, 0.2);
    border-radius: 30px;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.payment-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.payment-toast.hide {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Saju Scroll Card Container */
/* Saju Bronze Mirror Container */
/* Antique Mirror Container */
/* Saju Widescreen Card Style */
/* Saju Widescreen Card 3D Flip Layout */
.saju-card-wrapper {
    position: relative;
    margin: 32px -10px; /* Negative margin pulls the card outward to reduce visual padding to half */
    width: calc(100% + 20px); /* Adjust width to fit the negative margins */
    max-width: calc(100% + 20px);
    box-sizing: border-box;
    perspective: 1000px; /* Enable 3D depth */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
}

.saju-card-inner {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Snap/elastic rotation effect */
    cursor: pointer;
}

/* Flipped state toggled on wrapper click */
.saju-card-wrapper.flipped .saju-card-inner {
    transform: rotateY(180deg);
}

/* Common Card Face Styles */
.saju-card-front, .saju-card-back {
    border-radius: 16px;
    border: 1.5px solid rgba(218, 165, 32, 0.25);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(218, 165, 32, 0.05);
    backface-visibility: hidden; /* Hide elements when rotated facing back */
    overflow: hidden;
}

/* Card Front: The actual result, starts rotated out of view */
.saju-card-front {
    position: relative; /* Acts as the height driver for the entire card structure */
    z-index: 2;
    transform: rotateY(180deg); /* Hidden initially, shown when parent is flipped */
    background: #0d121d; /* Deep slate theme background */
    display: flex;
    flex-direction: column;
}

/* Card Back: The mysterious cover, shown initially */
.saju-card-back {
    position: absolute; /* Absolute covers the front exactly, keeping sizes consistent */
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    transform: rotateY(0deg); /* Visible initially */
    background: radial-gradient(circle at 50% 50%, #151924 0%, #080a0f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Space top, middle, bottom elements perfectly */
    padding: 48px 24px 44px 24px; /* Balanced interior margins to isolate elements */
    box-sizing: border-box;
    text-align: center;
}

/* Premium Diagonal Gold Checkered Mesh Pattern for Card Back */
.card-back-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #080a0f;
    background-image: 
        repeating-linear-gradient(135deg, transparent, transparent 18px, rgba(218, 165, 32, 0.12) 18px, rgba(218, 165, 32, 0.12) 20px),
        repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(218, 165, 32, 0.12) 18px, rgba(218, 165, 32, 0.12) 20px);
    border-radius: 14px;
    pointer-events: none;
    z-index: 1;
}

/* Card Back Title (Static, 2x Larger, Placed at the Top) */
.card-back-title {
    color: #fff;
    font-size: clamp(28px, 7.5vw, 36px); /* 2x larger than previous size, scales on mobile */
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    letter-spacing: 1.5px;
    z-index: 2;
    /* Luxury multi-layered gold/black 3D chiseled text shadow */
    text-shadow: 
        0 2px 0 #b38e3b, 
        0 4px 0 #70541d, 
        0 6px 8px rgba(0, 0, 0, 0.85), 
        0 0 10px rgba(255, 215, 0, 0.25);
    margin: 0;
}

/* Official Golden Logo Image on Card Back (Static, Placed at the Bottom) */
.card-back-logo-img {
    width: 125px;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)) brightness(1.05);
    margin: 0;
}

/* Prompt Button on Card Back */
.card-back-prompt {
    color: #ffd700;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 2;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    animation: pulseBackPrompt 1.5s infinite alternate ease-in-out;
}

@keyframes pulseBackPrompt {
    0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 5px rgba(218, 165, 32, 0.1); }
    100% { transform: scale(1.04); opacity: 1; box-shadow: 0 0 15px rgba(218, 165, 32, 0.3); }
}

/* Front Details: Images and typography */
.saju-card-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Matches native 16:9 ratio of images for absolutely ZERO crop on top/bottom */
    overflow: hidden;
    background: #000;
    border-bottom: 2px solid rgba(218, 165, 32, 0.2);
    position: relative;
    flex-shrink: 0;
}

.saju-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.saju-card-content {
    flex: 1;
    padding: 24px 20px 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.saju-card-label {
    color: var(--accent-gold-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: block;
}

.saju-card-title {
    color: #fff;
    font-size: clamp(17px, 5vw, 21px);
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    line-height: 1.4;
    margin: 0 0 12px 0;
    word-break: keep-all;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.saju-card-desc {
    color: #a0aec0;
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0;
    word-break: keep-all;
    text-align: center;
}


.mystic-divider-icon svg {
    filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.45)) !important;
}

/* On step-result (which uses result-view), the background color is #0B0F19. */
.result-view 

/* ==========================================
   마녀 대화 시간제 과금 추가 스타일
   ========================================== */
.duration-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    width: 100%;
}

.duration-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-dim) !important;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    outline: none;
}

.duration-btn:hover {
    border-color: rgba(218, 165, 32, 0.5) !important;
    background: rgba(218, 165, 32, 0.05) !important;
    color: var(--accent-gold-light) !important;
}

.duration-btn.active {
    border-color: var(--accent-gold) !important;
    background: rgba(218, 165, 32, 0.15) !important;
    color: var(--accent-gold) !important;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2) !important;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 4px rgba(218, 165, 32, 0.2);
    }
    100% {
        box-shadow: 0 0 12px rgba(218, 165, 32, 0.4);
    }
}

/* 글로벌 스크롤바 디자인 통일 (어두운 골드 테마) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 18, 24, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-gold, #daa520), rgba(218, 165, 32, 0.4));
    border-radius: 10px;
    border: 2px solid rgba(18, 18, 24, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd700, rgba(218, 165, 32, 0.7));
}

/* Firefox 표준 지원 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(218, 165, 32, 0.5) rgba(18, 18, 24, 0.6);
}

/* Capture Mode Override for html2canvas (Forcing flat layout) */
.capturing .saju-card-inner {
    transform: none !important;
    transform-style: flat !important;
    perspective: none !important;
}

.premium-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    border: 2px solid #8C6A3C !important;
    border-radius: 20px;
    padding: 28px 20px;
    box-sizing: border-box;
    margin-bottom: 32px;
    box-shadow: inset 0 0 20px rgba(180, 140, 70, 0.3), 0 10px 35px rgba(0, 0, 0, 0.75) !important;
}

.preview-info-panel {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.preview-info-panel h3 {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    font-family: var(--font-heading);
    color: #1F120A !important;
    text-shadow: none !important;
}

.preview-info-panel h3 .gold-text {
    color: #8C2318 !important; /* Deep Vermilion Calligraphy Red on Hanji */
    text-shadow: none !important;
}

.preview-info-panel p {
    margin-top: 4px !important;
    margin-bottom: 12px !important;
    color: #4A3728 !important;
    font-weight: 600 !important;
}

.feature-grid-square {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.feature-square-card {
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    border: 1.5px solid #8C6A3C !important;
    border-radius: 14px;
    padding: 14px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(160, 120, 60, 0.25), 0 4px 14px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 100px;
}

.feature-square-card:hover {
    transform: translateY(-2px);
    border-color: #8C6A3C !important;
    box-shadow: inset 0 0 12px rgba(180, 140, 70, 0.25), 0 6px 18px rgba(0, 0, 0, 0.2) !important;
}

.feature-square-icon {
    font-size: 26px;
    margin-bottom: 6px;
    line-height: 1;
    flex-shrink: 0;
}

.feature-square-title {
    color: #26170E !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-family: var(--font-heading);
}

@media (max-width: 480px) {
    .feature-grid-square {
        gap: 6px;
        margin-top: 16px;
    }
    .feature-square-card {
        padding: 12px 4px;
        min-height: 92px;
        border-radius: 12px;
    }
    .feature-square-icon {
        font-size: 22px;
        margin-bottom: 4px;
    }
    .feature-square-title {
        font-size: 11.5px;
        line-height: 1.25;
    }
}

@media (max-width: 360px) {
    .feature-grid-square {
        gap: 4px;
    }
    .feature-square-card {
        padding: 10px 2px;
        min-height: 86px;
    }
    .feature-square-icon {
        font-size: 20px;
        margin-bottom: 3px;
    }
    .feature-square-title {
        font-size: 10.5px;
        line-height: 1.2;
    }
}

.feature-grid {
    display: flex;
    flex-direction: column; /* Stack horizontal blocks vertically */
    gap: 12px;
    width: 100%;
    margin-top: 16px;
}

.feature-card {
    background: linear-gradient(145deg, #FFFBF5 0%, #F6ECDA 100%) !important;
    border: 1.5px solid #A88754 !important;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    box-shadow: inset 0 0 8px rgba(180, 140, 70, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: #8C6A3C !important;
}

.feature-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.feature-title {
    color: #1F120A !important;
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    text-align: left;
    font-family: var(--font-heading);
}

.feature-desc {
    color: #4A3728 !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    word-break: keep-all;
}

.feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.feature-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    text-align: left;
}

.feature-desc {
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.6;
    margin: 0;
    word-break: keep-all;
    text-align: left;
}

/* Smartphone Mockup */
.preview-phone-mockup {
    width: 100%;
    max-width: 320px;
    height: 480px;
    background: #000;
    border: 8px solid #1a1a24;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(218, 165, 32, 0.15);
    display: flex;
    flex-direction: column;
    margin: 12px auto;
}

.phone-notch {
    width: 120px;
    height: 20px;
    background: #1a1a24;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen-viewport {
    flex: 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #0b0f19;
    padding-top: 24px; /* Space for notch */
}

/* ==========================================
   Mock Saju Table & Preview Mockup Spacing & Dividers
   ========================================== */
.mock-saju-table {
    display: flex;
    gap: 6px;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.mock-saju-pillar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mock-pillar-label {
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 2px;
    text-align: center;
}

.mock-pillar-card {
    border-radius: 6px;
    padding: 8px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.mock-pillar-star {
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 2px;
    text-align: center;
}

.mock-pillar-char {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    text-align: center;
}

.mock-pillar-element {
    font-size: 9px;
    margin-top: 2px;
    text-align: center;
}

/* Chapter Dividers & Inner Spacing inside the Mockup Viewport */
.preview-scroll-content > div {
    border-bottom: 1px dashed rgba(218, 165, 32, 0.25);
    padding-bottom: 24px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.preview-scroll-content > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.mock-ch-label {
    font-size: 11px;
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
}

.mock-ch-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-top: 0;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.35;
    word-break: keep-all;
}

.mock-tarot-card {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(218, 165, 32, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
    background: #0b0f19;
}

.mock-tarot-card svg {
    width: 100%;
    height: auto;
    display: block;
}

.mock-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    word-break: keep-all;
    text-align: left;
}

/* ==========================================
   Result Premium Header Style
   ========================================== */
.result-premium-header {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
    padding-top: 16px;
    box-sizing: border-box;
}

.result-header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.result-header-logo {
    display: none;
}

.result-header-title-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-header-title-main {
    color: var(--accent-gold);
    font-family: 'Noto Serif KR', serif;
    font-weight: 800;
    font-size: clamp(17px, 5vw, 21px);
    letter-spacing: 2px;
    line-height: 1.3;
}

.result-header-title-sub {
    color: #fff;
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(26px, 8vw, 34px);
    letter-spacing: 1px;
    line-height: 1.3;
    margin-top: 6px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.result-header-banner {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    background: transparent;
}

.result-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Softly fade all four edges of the image into black background */
    mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, black 45%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, black 45%, transparent 100%);
}

.result-banner-overlay {
    display: none;
}

.result-header-message {
    text-align: center;
    padding: 0 16px;
}

.result-msg-line1 {
    color: var(--text-main, #fff);
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: clamp(16px, 5vw, 21px);
    line-height: 1.4;
    margin: 0 0 6px 0;
    word-break: keep-all;
}

.result-msg-line2 {
    color: var(--accent-gold-light);
    font-family: 'Noto Serif KR', serif;
    font-weight: 800;
    font-size: clamp(14px, 4.5vw, 18px);
    line-height: 1.4;
    margin: 0;
    word-break: keep-all;
}

/* ==========================================
   Loading Reviews Style Overrides
   ========================================== */
.loading-review-container {
    width: 100%;
    max-width: 320px;
    margin: 32px auto 0;
    position: relative;
    height: 180px;
}

.loading-r-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    background: rgba(13, 18, 29, 0.96) !important;
    border: 1px solid rgba(218, 165, 32, 0.35) !important;
    border-left: 1px solid rgba(218, 165, 32, 0.35) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 15px rgba(218, 165, 32, 0.05);
    transition: opacity 0.5s ease-in-out;
}

.loading-r-card .review-header {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 0 14px 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.loading-r-card .stars {
    font-size: 16px !important;
    color: #fbbf24 !important;
    letter-spacing: 2px;
}

.loading-r-card .review-title {
    font-size: 14.5px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    line-height: 1.65 !important;
    text-align: left !important;
    word-break: keep-all;
    margin-bottom: 12px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.loading-r-card .review-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.loading-r-card .reviewer {
    font-size: 11.5px !important;
    color: rgba(255, 255, 255, 0.45) !important;
    margin: 0 !important;
    text-align: right !important;
    display: inline-block !important;
}

.highlight-yellow {
    color: #ffd700 !important;
    font-weight: 700 !important;
    display: inline !important;
}

/* Step Teaser (Free Preview) Hanji Background Override */
#step-teaser, .spooky-bg {
    background: #120D0A url('./assets/hanji_bg.webp') repeat !important;
    background-size: 512px 512px !important;
}

/* ── NEW LAYOUT (REFERENCE) ── */
:root {
    --ref-border-gold: rgba(212, 163, 89, 0.35);
    --ref-border-blue: rgba(212, 163, 89, 0.35);
    --ref-blue: #D4A359;
    --ref-blue2: #F0C987;
}

/* Animations */
.s {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    animation: tw var(--d) var(--dl) ease-in-out infinite;
}
@keyframes tw {
    0%, 100% { opacity: 0; }
    50% { opacity: var(--op); }
}
@keyframes hflk {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    30% { transform: scaleX(0.96) scaleY(1.04); }
    60% { transform: scaleX(1.03) scaleY(0.96); }
}
@keyframes shine {
    0%, 100% { left: -60%; }
    50% { left: 130%; }
}
@keyframes pulse-live {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(76, 255, 145, 0.5); }
    50% { opacity: 1; box-shadow: 0 0 0 4px rgba(76, 255, 145, 0); }
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.5); }
    60% { box-shadow: 0 0 0 5px rgba(218, 165, 32, 0); }
}
@keyframes card-glow {
    0%, 100% { box-shadow: 0 0 0 1px var(--ref-border-gold); }
    50% { box-shadow: 0 0 16px rgba(218, 165, 32, 0.15), 0 0 0 1px rgba(218, 165, 32, 0.35); }
}

/* Hero Section */
.hero-ref {
    position: relative;
    min-height: 360px; /* 단락 자체의 세로 높이를 360px로 대폭 늘림 */
    overflow: hidden;
    padding: 24px 20px 24px 20px;
    background: transparent;
    display: flex;
    align-items: center; /* 늘어난 높이에 맞춰 내부 텍스트 콘텐츠를 세로 중앙 정렬 */
}
.hero-ref-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 25%, rgba(60, 44, 30, 0.25) 0%, transparent 60%),
                radial-gradient(circle at 15% 85%, rgba(40, 28, 19, 0.2) 0%, transparent 65%);
    z-index: 0;
}
.hero-ref-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.hero-ref-char {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%; /* 가로 100%를 다시 가득 채움 */
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.08) 12%, black 60%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.08) 12%, black 60%);
}
.hero-ref-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 가로 100%를 채우며 늘어난 세로 높이만큼 아래까지 잘 보이도록 함 */
    object-position: right top;
    filter: brightness(0.8) saturate(1.15);
    -webkit-mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 72%, transparent 100%);
}
.hero-ref-char-ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #050a12, #0a1630, #061024);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ph-flame {
    font-size: 60px;
    filter: hue-rotate(200deg) saturate(1.8) brightness(0.85);
    opacity: 0.55;
    animation: hflk 2.2s ease-in-out infinite;
}
.hero-ref-content {
    position: relative;
    z-index: 2;
    width: 58%;
}
.logo-img-ref {
    display: block;
    width: 180px;
    max-width: 100%;
    margin-bottom: 12px;
    mix-blend-mode: screen;
    filter: brightness(1.05) contrast(1.1);
}
.hero-ref-desc {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 16px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
.hero-ref-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px; /* 다른 두 버튼과 동일한 세로 높이(패딩) 적용 */
    background: linear-gradient(135deg, #8a6200, var(--accent-gold), var(--accent-gold-light));
    border: none;
    border-radius: 12px;
    font-size: 14px; /* 글씨 크기를 다른 두 버튼과 동일하게 맞춤 (기존 12px) */
    font-weight: 900;
    font-family: var(--font-body);
    color: #060400;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 230, 120, 0.25), 0 4px 15px rgba(218, 165, 32, 0.4);
    max-width: 178px; /* 글씨 및 패딩 증가에 맞춰 최대 너비 조정 */
    width: 100%;
    text-align: center;
    white-space: nowrap; /* 무조건 한 줄 표시 */
}
.hero-ref-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 35%;
    height: 200%;
    background: rgba(255, 255, 255, 0.28);
    transform: skewX(-20deg);
    animation: shine 2.2s ease-in-out infinite;
}

/* Gold Divider */
.gold-divider-ref {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin: 4px 0 16px 0;
}
.gd-ref-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(218, 165, 32, 0.25), transparent);
}
.gd-ref-gem {
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(218, 165, 32, 0.5);
}

/* Stats Bar */
.stats-bar-ref {
    display: flex;
    background: rgba(8, 15, 28, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 16px;
}
.stat-ref-item {
    flex: 1;
    padding: 12px 8px;
    position: relative;
    text-align: center;
}
.stat-ref-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
}
.stat-ref-num {
    font-size: 15px;
    font-weight: 900;
    color: var(--accent-gold-light);
    display: block;
    font-family: var(--font-body);
}
.stat-ref-label {
    font-size: 9.5px;
    color: var(--text-dim);
    display: block;
    margin-top: 2px;
    font-family: var(--font-body);
}

/* Live Bar */
.live-bar-ref {
    margin: 0 20px 20px 20px;
    background: rgba(74, 158, 255, 0.04);
    border: 1px solid rgba(74, 158, 255, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.live-ref-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4cff91;
    flex-shrink: 0;
    animation: pulse-live 1.2s ease-in-out infinite;
}
.live-ref-txt {
    font-size: 11px;
    color: rgba(248, 248, 255, 0.6);
    flex: 1;
    font-family: var(--font-body);
}
.live-ref-txt strong {
    color: var(--accent-gold-light);
    font-weight: 700;
}
.live-ref-badge {
    font-size: 9px;
    font-weight: bold;
    color: rgba(74, 158, 255, 0.8);
    background: rgba(74, 158, 255, 0.08);
    border: 1px solid rgba(74, 158, 255, 0.2);
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

/* Service Section */
.svc-ref-section {
    padding: 0 20px 20px 20px;
}
.svc-ref-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.svc-ref-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-body);
}

/* Cards */
.big-ref-card {
    border-radius: 16px;
    border: 1.5px solid #8C6A3C !important;
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    color: #1F120A !important;
    box-shadow: inset 0 0 10px rgba(180, 140, 70, 0.25), 0 6px 20px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
    display: flex;
    margin-bottom: 16px;
    cursor: pointer;
    min-height: 152px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.big-ref-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.big-ref-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 16px 0 0 16px;
}

.card-ref-cheongi {
    border-color: rgba(212, 163, 89, 0.4);
    animation: card-glow 3s ease-in-out infinite;
}
.card-ref-cheongi::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 55%, rgba(212, 163, 89, 0.08), transparent 55%);
    pointer-events: none;
}
.card-ref-cheongi::after {
    background: linear-gradient(to bottom, #D4A359, rgba(212, 163, 89, 0.3));
}

.card-ref-saju {
    border-color: var(--ref-border-gold);
}
.card-ref-saju::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 55%, rgba(218, 165, 32, 0.04), transparent 55%);
    pointer-events: none;
}
.card-ref-saju::after {
    background: linear-gradient(to bottom, var(--accent-gold), rgba(218, 165, 32, 0.3));
}

.big-ref-card-content {
    width: 55%; /* 가로 너비를 55%로 늘려 버튼 및 글씨 확장 공간 확보 */
    flex-shrink: 0;
    padding: 16px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.big-ref-card-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.badge-ref {
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-body);
}
.badge-ref-gold {
    background: #8C6A3C;
    color: #FFF8EE;
}
.badge-ref-blue {
    background: #8C6A3C;
    color: #FFF8EE;
}
.badge-ref-outline-pop {
    background: rgba(218, 165, 32, 0.08);
    border: 1px solid rgba(218, 165, 32, 0.25);
    color: var(--accent-gold-light);
}

.big-ref-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.big-ref-card-icon {
    font-size: 20px;
}
.big-ref-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #1F120A !important;
    font-family: var(--font-heading);
    white-space: nowrap;
}
.big-ref-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.tag-ref {
    font-size: 9.5px;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-body);
}
.tag-ref-gold {
    color: #4A3728;
    background: rgba(140, 106, 60, 0.1);
    border: 1px solid rgba(140, 106, 60, 0.25);
}
.tag-ref-blue {
    color: #4A3728;
    background: rgba(140, 106, 60, 0.1);
    border: 1px solid rgba(140, 106, 60, 0.25);
}
.big-ref-card-desc {
    font-size: 11.5px;
    color: #4A3728 !important;
    line-height: 1.6;
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.big-ref-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 900;
    font-family: var(--font-body);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    align-self: flex-start;
    max-width: 148px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}
.btn-ref-gold {
    background: linear-gradient(135deg, #8a6200, var(--accent-gold), var(--accent-gold-light));
    color: #080300;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.25);
}
.btn-ref-gold::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.18);
    transform: skewX(-20deg);
    animation: shine 2.5s ease-in-out infinite;
}
.btn-ref-blue {
    background: #8C6A3C;
    color: #FFF8EE;
    border: 1px solid #A88754;
}
.btn-ref-blue::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.08);
    transform: skewX(-20deg);
    animation: shine 2.8s ease-in-out infinite;
}

/* Card Image Area */
.big-ref-card-img {
    width: 45%; /* 가로 너비를 45%로 축소하여 콘텐츠 영역 확보 */
    flex-shrink: 0;
    position: relative;
}
.img-ref-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.img-ref-ph-saju {
    background: linear-gradient(to right, transparent 0%, #080e1a 45%, #08101e 100%);
}
.img-ref-ph-saju::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 55% 40%, rgba(218, 165, 32, 0.15), transparent 55%);
}
.img-ref-ph-cheongi {
    background: linear-gradient(to right, transparent 0%, #060c1a 45%, #0d1c3a 100%);
}
.img-ref-ph-cheongi::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 45% 35%, rgba(74, 158, 255, 0.2), transparent 55%);
}
.img-ref-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transform: scale(1.1) translateX(-10px); /* 가로 50% 분할 상자에 맞춰 적절한 1.1배 크기 조절 및 이동 */
    transform-origin: center;
}
.img-ref-emoji {
    position: relative;
    left: -11px; /* 축소된 문양 이동폭에 맞춰 이모지도 11px 이동으로 조정 */
    z-index: 2;
    font-size: 36px;
    opacity: 0.55;
    animation: hflk 2s ease-in-out infinite;
}

/* ==========================================
   Unified Review Card Design (Yellowish Aged Hanji Parchment Theme)
   ========================================== */
.new-review-card,
.review-marquee .review-card,
.loading-r-card,
.review-card {
    box-sizing: border-box !important;
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    border: 1.5px solid #8C6A3C !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    box-shadow: inset 0 0 10px rgba(180, 140, 70, 0.25), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    transition: opacity 0.5s ease-in-out;
}

/* Horizontal card dimensions for marquees */
.new-review-card {
    flex: 0 0 220px !important;
    height: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 6px !important;
}
.review-marquee .review-card {
    flex: 0 0 220px !important;
    height: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 6px !important;
}

/* Header inside unified cards */
.new-review-card .review-header,
.review-marquee .review-card .review-header,
.loading-r-card .review-header {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 0 8px 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Stars */
.new-review-card .review-stars,
.review-marquee .review-card .stars,
.loading-r-card .stars,
.review-card .stars {
    font-size: 14px !important;
    color: #B86B00 !important; /* Bronze Gold Stars on Hanji */
    letter-spacing: 2px !important;
}

/* Review Text */
.new-review-card .review-text,
.review-marquee .review-card .review-text,
.loading-r-card .review-title,
.review-card .review-text,
.review-card .review-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1F120A !important; /* Dark Calligraphy Ink text on yellowish Hanji! */
    line-height: 1.55 !important;
    text-align: left !important;
    margin: 0 0 8px 0 !important;
    word-break: keep-all;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: calc(12.5px * 1.55 * 3) !important;
    -webkit-text-size-adjust: 100%;
    font-family: var(--font-heading) !important;
}

/* Reviewer name/info alignment to bottom right */
.new-review-card .reviewer-name,
.review-marquee .review-card .reviewer,
.loading-r-card .reviewer,
.review-card .reviewer {
    font-size: 11.5px !important;
    color: #5C4636 !important; /* Dark Sepia Ink reviewer text */
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: right !important;
    display: block !important;
    width: 100% !important;
}


/* ==========================================
   Premium Ebook (해설서 책 펼침) Styles
   ========================================== */

/* 원본 해설 콘텐츠는 화면에서 숨김 (e북 페이지 소스 + 이메일 캡처 전용) */
.ebook-source {
    display: none;
}

/* html2canvas 이메일 캡처(.capturing 클론) 시에는 원본 전체를 펼쳐서 캡처 */
.capturing .ebook-source {
    display: block !important;
}
.capturing #ebook-cover-stage {
    display: none !important;
}
#result-source-content,
#result-source-content * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}
.capturing #result-source-content .reveal-on-scroll {
    opacity: 1 !important;
}

/* ---------- 책 표지 디자인 (공용) ---------- */
.witch-cover {
    position: relative;
    aspect-ratio: 1 / 1.45;
    background:
        radial-gradient(ellipse at 30% 18%, rgba(212, 163, 89, 0.10), transparent 55%),
        radial-gradient(ellipse at 75% 90%, rgba(120, 60, 90, 0.14), transparent 60%),
        linear-gradient(150deg, #2A1620 0%, #170D12 45%, #1E1218 100%);
    border-radius: 6px 14px 14px 6px;
    border: 1px solid #3A2A22;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65), inset 0 0 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}
.witch-cover::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(255, 255, 255, 0.05) 60%, transparent);
    pointer-events: none;
    z-index: 1;
}
.cover-frame {
    position: absolute;
    inset: 12px;
    border: 1.5px solid rgba(212, 163, 89, 0.55);
    border-radius: 4px 10px 10px 4px;
    box-shadow: inset 0 0 0 3px rgba(212, 163, 89, 0.10);
    pointer-events: none;
}
.cover-frame::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(212, 163, 89, 0.25);
    border-radius: 3px 8px 8px 3px;
}
.cover-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px 28px;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}
.cover-ornament {
    color: rgba(212, 163, 89, 0.85);
    font-size: 11px;
    letter-spacing: 5px;
    margin-top: 14px;
    margin-bottom: 10px;
}
.cover-logo {
    width: 28%;
    max-width: 85px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
    margin-bottom: 12px;
}
.cover-name {
    font-family: var(--font-heading);
    color: var(--accent-gold-light);
    font-size: clamp(12px, 3.2vw, 16px);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 6px;
    word-break: keep-all;
}
.cover-name .ebook-cover-name {
    color: #FFD98A;
    font-weight: 900;
}
.cover-title {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--accent-gold);
    font-size: clamp(18px, 4.8vw, 26px);
    line-height: 1.3;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    word-break: keep-all;
}
.cover-divider {
    width: 58px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 163, 89, 0.85), transparent);
    margin: 12px 0 8px;
}
.cover-footer {
    color: rgba(194, 179, 163, 0.85);
    font-size: 9px;
    letter-spacing: 2.5px;
    font-weight: 700;
    margin-bottom: 16px;
}
.cover-open-hint {
    margin-top: 18px;
    color: rgba(240, 201, 135, 0.85);
    font-size: 12px;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 163, 89, 0.4);
    border-radius: 16px;
    padding: 6px 16px;
    animation: ebookHintPulse 2.2s ease-in-out infinite;
}
.cover-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 236, 190, 0.08) 45%, rgba(255, 236, 190, 0.20) 50%, rgba(255, 236, 190, 0.08) 55%, transparent 70%);
    transform: translateX(-130%);
    animation: ebookCoverShine 3.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes ebookCoverShine {
    0%, 55% { transform: translateX(-130%); }
    85%, 100% { transform: translateX(130%); }
}
@keyframes ebookHintPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ---------- step-result 화면의 미니 커버 ---------- */
#ebook-cover-stage {
    padding: 10px 0 4px;
    text-align: center;
}
.ebook-cover-mini {
    width: min(76%, 290px);
    margin: 0 auto;
    cursor: pointer;
    animation: ebookCoverFloat 4.5s ease-in-out infinite;
}
.ebook-cover-mini:active {
    transform: scale(0.98);
}
@keyframes ebookCoverFloat {
    0%, 100% { transform: translateY(0); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65); }
    50% { transform: translateY(-8px); box-shadow: 0 30px 55px rgba(0, 0, 0, 0.75); }
}
.ebook-open-hint {
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 12.5px;
    letter-spacing: 0.4px;
    animation: ebookHintPulse 2.2s ease-in-out infinite;
}

/* ---------- 전체화면 e북 모달 ---------- */
#ebook-modal {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#ebook-modal.show {
    display: flex;
}
.ebook-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 38%, rgba(44, 24, 34, 0.94), rgba(8, 5, 8, 0.99) 78%);
}
.ebook-close-btn {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 163, 89, 0.45);
    background: rgba(20, 12, 16, 0.75);
    color: var(--accent-gold-light);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.ebook-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 12px 10px;
    box-sizing: border-box;
}

/* ---------- 책 본체 (펼침 스프레드) ---------- */
.ebook-book {
    position: relative;
    width: min(96vw, 1000px, calc((100dvh - 175px) * 1.3793));
    aspect-ratio: 2 / 1.45;
    perspective: 2800px;
    transition: transform 1s cubic-bezier(0.32, 0.06, 0.24, 1);
}
.ebook-book.closed {
    transform: translateX(-25%);
}
.ebook-book.open {
    transform: translateX(0);
}
.ebook-page {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 2;
}
.ebook-book.closed .ebook-page,
.ebook-book.closed .ebook-spine {
    opacity: 0;
}
/* 표지 넘김과 페이지 등장 타이밍 맞추기
   - 펼칠 때: 오른쪽 종이는 처음부터(표지가 가려줌), 왼쪽 종이는 표지가 90도를 넘어간 뒤 등장
   - 덮을 때: 왼쪽 종이는 바로 사라지고, 오른쪽 종이는 표지가 다 덮은 뒤 사라짐 */
.ebook-page-left {
    transition: opacity 0.15s ease 0s;
}
.ebook-page-right {
    transition: opacity 0.05s linear 0.9s;
}
.ebook-book.open .ebook-page-left {
    transition: opacity 0.01s linear 0.62s;
}
.ebook-book.open .ebook-page-right {
    transition: opacity 0.01s linear 0s;
}
.ebook-page-left {
    left: 0;
    border-radius: 10px 2px 2px 10px;
    background: linear-gradient(105deg, #EFE4CF 0%, #FBF5EA 10%, #FBF5EA 86%, #F0E5D2 100%);
    box-shadow: -8px 12px 34px rgba(0, 0, 0, 0.55), inset -14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.ebook-page-right {
    left: 50%;
    border-radius: 2px 10px 10px 2px;
    background: linear-gradient(255deg, #EFE4CF 0%, #FBF5EA 10%, #FBF5EA 86%, #F0E5D2 100%);
    box-shadow: 8px 12px 34px rgba(0, 0, 0, 0.55), inset 14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.ebook-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 46px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(80, 50, 20, 0.22) 42%, rgba(60, 35, 12, 0.38) 50%, rgba(80, 50, 20, 0.22) 58%, transparent);
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.15s ease 0s;
}
.ebook-book.open .ebook-spine {
    transition: opacity 0.3s ease 0.62s;
}
.ebook-page-inner {
    position: absolute;
    inset: 0;
    padding: 30px 26px 34px;
    /* 종이 한 장 = 화면 한 장. 넘치는 분량은 JS가 다음 페이지로 넘기므로 스크롤 없음 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #1A0F12;
    /* 다크 UI용 색 변수를 종이 위에서 읽히는 먹색 계열로 재정의 */
    --text-dim: #6B5847;
    --text-main: #1A0F12;
    --accent-gold: #8C6A3C;
    --accent-gold-light: #A97C22;
}
/* 페이지 내용 래퍼: 세로 중앙 정렬 + 넘칠 때 축소 보정 */
.ebook-fit {
    width: 100%;
    transform-origin: center center;
}
/* 측정 전용 히든 페이지 — 실제 페이지와 동일한 레이아웃이어야 계산이 맞는다 */
.ebook-measure {
    position: absolute !important;
    inset: auto !important;
    left: -10000px !important;
    top: 0 !important;
    box-sizing: border-box;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}
.ebook-page-num {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 10.5px;
    color: #A08A67;
    font-family: var(--font-heading);
    letter-spacing: 3px;
    pointer-events: none;
}

/* e북 페이지 안 콘텐츠 보정 (종이 위 가독성) */
.ebook-page-inner .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}
.ebook-page-inner .graph-path {
    animation: none !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
}
/* 카드 이미지는 플립 3D 변환 없이 항상 앞면으로 */
.ebook-page-inner .saju-card-inner,
.ebook-page-inner .saju-card,
.ebook-page-inner .saju-card-front {
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
}
.ebook-page-inner .saju-card-wrapper {
    margin: 0 0 4px 0 !important;
}
.ebook-page-inner .ch-label {
    color: #8C6A3C;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-align: center;
}
.ebook-page-inner h2 {
    color: #2A1A10;
    font-family: var(--font-heading);
    font-size: clamp(19px, 2.6vw, 27px) !important;
    text-align: center;
    margin-bottom: 18px !important;
}
.ebook-page-inner .chapter,
.ebook-page-inner .ebook-chapter-head {
    margin: 0;
    padding: 0;
}
.ebook-page-inner .mystic-divider {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* 본문: 종이 위 먹색 글씨 (배경 이미지·말풍선 테두리 제거) */
.ebook-page-inner .speech-bubble {
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: #1A0F12 !important;
}
.ebook-para {
    margin: 0 0 16px 0;
    color: #1A0F12;
    font-size: 15px;
    line-height: 1.85;
    letter-spacing: -0.2px;
    word-break: keep-all;
    text-align: left;
}
.ebook-para:last-child {
    margin-bottom: 0;
}
/* 하이라이트는 노란색 유지 — 종이 위에서 읽히도록 형광펜 방식으로.
   배경 높이를 글자 크기(em)로 고정하고 줄 가운데에 앉혀, 줄 간격이 넓어도
   위아래 문장을 덮지 않게 한다. (line-height 만큼 배경을 그리는 렌더러 대비) */
.ebook-page-inner .highlight-yellow {
    display: inline;
    line-height: 1.2;
    color: #3A2A08 !important;
    background-color: transparent;
    background-image: linear-gradient(180deg, #FFE9A3 0%, #FFD75A 100%);
    background-repeat: no-repeat;
    background-size: 100% 1.05em;
    background-position: left center;
    font-weight: 700 !important;
    padding: 0 1px;
    border-radius: 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* 서장 왼쪽 페이지: 다크 배경용 흰 글자 → 종이용 먹색으로 보정 */
.ebook-page-inner .result-premium-header {
    margin-bottom: 0;
    padding-top: 0;
}
.ebook-page-inner .result-header-top {
    margin-bottom: 18px;
}
.ebook-page-inner .result-header-banner {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}
.ebook-page-inner .result-banner-img {
    width: auto;
    max-width: 100%;
    max-height: 42vh;
    object-fit: contain;
}
.ebook-page-inner .result-header-title-main {
    color: #8C6A3C;
}
.ebook-page-inner .result-header-title-sub {
    color: #2A1A10;
    text-shadow: none;
}
.ebook-page-inner .result-msg-line1 {
    color: #2C221E;
}
.ebook-page-inner .result-msg-line2 {
    color: #8C6A3C;
}
/* 사주 명식표: 다크 UI용 밝은 글자색을 종이용으로 치환 */
.ebook-page-inner [style*="color: #D0D5E5"] {
    color: #3A2A20 !important;
}
.ebook-page-inner [style*="color: rgba(255,255,255,0.8)"] {
    color: #5A4636 !important;
}
.ebook-page-inner [style*="color: #FFD700"] {
    color: #A97C22 !important;
}

/* ---------- 넘김 낱장 (flip leaf) ---------- */
.ebook-flip-leaf {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 50%;
    transform-origin: left center;
    transform-style: preserve-3d;
    z-index: 8;
    display: none;
    will-change: transform;
}
.ebook-flip-leaf.flipping {
    display: block;
}
.ebook-leaf-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.ebook-leaf-face .ebook-page-inner {
    overflow: hidden;
}
.ebook-leaf-front {
    background: linear-gradient(255deg, #EFE4CF 0%, #FBF5EA 10%, #FBF5EA 86%, #F0E5D2 100%);
    border-radius: 2px 10px 10px 2px;
    box-shadow: inset 14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.ebook-leaf-back {
    background: linear-gradient(105deg, #EFE4CF 0%, #FBF5EA 10%, #FBF5EA 86%, #F0E5D2 100%);
    border-radius: 10px 2px 2px 10px;
    box-shadow: inset -14px 0 26px -16px rgba(90, 60, 20, 0.5);
    transform: rotateY(180deg);
}

/* ---------- 전체화면 모달 속 표지 (펼침 애니메이션) ---------- */
.ebook-cover-full {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 50%;
    z-index: 10;
    transform-origin: left center;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 1s cubic-bezier(0.32, 0.06, 0.24, 1);
}
.ebook-cover-full .cover-face-front {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 2px 12px 12px 2px;
}
/* 표지 뒷면 = 왼쪽 첫 페이지. 표지가 넘어가면 그대로 왼쪽 종이가 된다 */
.ebook-cover-full .cover-face-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    overflow: hidden;
    background: linear-gradient(105deg, #EFE4CF 0%, #FBF5EA 10%, #FBF5EA 86%, #F0E5D2 100%);
    border-radius: 10px 2px 2px 10px;
    box-shadow: -8px 12px 34px rgba(0, 0, 0, 0.55), inset -14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.ebook-book.open .ebook-cover-full {
    transform: rotateY(-180deg);
    pointer-events: none;
    /* 커버가 90도를 지나 넘어가고 나면 페이지(z:2) 뒤로 내려보낸다 */
    z-index: 1;
    transition: transform 1s cubic-bezier(0.32, 0.06, 0.24, 1), z-index 0s 0.5s;
}

/* ---------- 하단 내비게이션 ---------- */
.ebook-nav {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom, 0px));
}
.ebook-nav-btn {
    flex: 0 0 auto;
    width: auto;            /* 전역 button { width: 100% } 무력화 */
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(212, 163, 89, 0.45);
    color: var(--accent-gold);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.ebook-nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
/* 인디케이터: 글자가 잘리지 않고 항상 배지 안에 중앙 정렬되도록 */
.ebook-indicator {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-gold-light);
    background: rgba(212, 163, 89, 0.14);
    border: 1px solid rgba(212, 163, 89, 0.4);
    padding: 8px 14px;
    border-radius: 16px;
    letter-spacing: 0.2px;
    line-height: 1.3;
    white-space: nowrap;
}
@media (max-width: 420px) {
    .ebook-nav {
        gap: 7px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .ebook-nav-btn {
        padding: 10px 11px;
        font-size: 12px;
    }
    .ebook-indicator {
        font-size: 11px;
        padding: 8px 10px;
        letter-spacing: 0;
    }
}

/* ---------- 모바일(세로): 한 페이지씩 넘기는 모드 ---------- */
@media (max-width: 699px) {
    .ebook-book {
        width: min(94vw, calc((100dvh - 190px) / 1.45));
        aspect-ratio: 1 / 1.45;
    }
    .ebook-book.closed {
        transform: none;
    }
    .ebook-page-left,
    .ebook-page-num {
        display: none;
    }
    .ebook-page-right {
        left: 0;
        width: 100%;
        border-radius: 10px;
        background: linear-gradient(255deg, #F0E5D2 0%, #FBF5EA 8%, #FBF5EA 92%, #F0E5D2 100%);
    }
    .ebook-spine {
        display: none;
    }
    .ebook-flip-leaf {
        left: 0;
        width: 100%;
    }
    .ebook-leaf-front,
    .ebook-leaf-back {
        border-radius: 10px;
    }
    .ebook-cover-full {
        left: 0;
        width: 100%;
    }
    .ebook-cover-full .cover-face-front {
        border-radius: 10px;
    }
    .ebook-book.open .ebook-cover-full {
        transform: rotateY(-120deg);
        opacity: 0;
        z-index: 10; /* 모바일은 투명도로 사라지므로 항상 위에 둔다 */
        transition: transform 0.85s cubic-bezier(0.32, 0.06, 0.24, 1), opacity 0.5s ease 0.3s;
    }
    .ebook-page-inner {
        padding: 26px 20px 28px;
    }
    .ebook-page-inner .result-banner-img {
        max-height: 30vh;
    }
    .ebook-page-inner .result-header-top,
    .ebook-page-inner .result-header-banner {
        margin-bottom: 14px;
    }
    .ebook-para {
        font-size: 14.5px;
        line-height: 1.8;
    }
}

/* ==========================================
   해설서 PDF(전자책) 출력용 오프스크린 종이
   화면과 무관하게 항상 같은 크기·같은 글자 크기로 찍히도록 값을 고정한다
   ========================================== */
.ebook-pdf-stage {
    position: fixed;
    left: -20000px;
    top: 0;
    width: 480px;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
}
.ebook-pdf-paper {
    position: relative;
    width: 480px;
    height: 696px;
    overflow: hidden;
    background: linear-gradient(255deg, #F3E9D6 0%, #FBF5EA 8%, #FBF5EA 92%, #F1E7D4 100%);
}
.ebook-pdf-paper .ebook-page-inner {
    padding: 36px 32px 46px;
}
.ebook-pdf-cover-slot {
    position: absolute;
    inset: 0;
    display: none;
}
.ebook-pdf-paper.is-cover .ebook-pdf-cover-slot {
    display: block;
}
.ebook-pdf-paper.is-cover .ebook-pdf-content,
.ebook-pdf-paper.is-cover .ebook-pdf-folio {
    display: none;
}
.ebook-pdf-folio {
    position: absolute;
    bottom: 18px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 4px;
    color: #A08A67;
}

/* 화면 크기에 따라 달라지는 값(vw·vh·미디어쿼리)을 PDF에서는 고정 */
.ebook-pdf-paper .ebook-para {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 16px;
}
.ebook-pdf-paper h2 {
    font-size: 24px !important;
    margin-bottom: 18px !important;
}
.ebook-pdf-paper .ch-label {
    font-size: 12px;
    margin-bottom: 10px;
}
.ebook-pdf-paper .result-banner-img {
    max-height: 300px;
    /* html2canvas가 mask-image를 지원하지 않아 사각형으로 찍히므로 모서리만 둥글게 */
    mask-image: none;
    -webkit-mask-image: none;
    border-radius: 10px;
}
.ebook-pdf-paper .result-header-title-main {
    font-size: 19px;
}
.ebook-pdf-paper .result-header-title-sub {
    font-size: 30px;
}
.ebook-pdf-paper .result-msg-line1 {
    font-size: 18px;
}
.ebook-pdf-paper .result-msg-line2 {
    font-size: 15px;
}

/* PDF 표지 */
.ebook-pdf-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
}
.ebook-pdf-cover .cover-content {
    padding: 72px 35px 68px !important;
}
.ebook-pdf-cover .cover-frame {
    inset: 25px !important;
}
.ebook-pdf-cover .cover-ornament {
    font-size: 14.5px !important;
    letter-spacing: 6px !important;
    margin-top: 32px !important;
    margin-bottom: 14px !important;
}
.ebook-pdf-cover .cover-logo {
    width: 104px;
    max-width: none;
}
.ebook-pdf-cover .cover-name {
    font-size: 21px;
}
.ebook-pdf-cover .cover-title {
    font-size: 38px;
}
.ebook-pdf-cover .cover-footer {
    font-size: 12px;
    letter-spacing: 3px !important;
    margin-bottom: 30px !important;
}


/* ==========================================================================

/* ==========================================================================

/* ==========================================================================

/* ==========================================================================

/* ==========================================================================
   ✦ TRADITIONAL KOREAN FAN GOLD DIVIDER SYSTEM (전통 접선 부채 천기 구분선 - BULLETPROOF)
   ========================================================================== */

.mystic-divider,
.traditional-divider,
.modal-divider,
.cover-divider,
.antique-divider,
hr {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 90% !important;
    max-width: 580px !important;
    margin: 36px auto !important;
    border: none !important;
    background: none !important;
    background-image: none !important;
    position: relative !important;
    height: 40px !important;
    box-sizing: border-box !important;
}

.modal-divider {
    margin: 20px auto !important;
    max-width: 360px !important;
    height: 32px !important;
}

/* Left Line */
.mystic-divider::before,
.traditional-divider::before,
.modal-divider::before,
.cover-divider::before,
.antique-divider::before,
hr::before {
    content: "" !important;
    display: block !important;
    flex: 1 !important;
    height: 1.5px !important;
    background: linear-gradient(to right, transparent 0%, #8C6A3C 40%, #D4AF37 85%, #E5C158 100%) !important;
    opacity: 0.9 !important;
}

/* Right Line */
.mystic-divider::after,
.traditional-divider::after,
.modal-divider::after,
.cover-divider::after,
.antique-divider::after,
hr::after {
    content: "" !important;
    display: block !important;
    flex: 1 !important;
    height: 1.5px !important;
    background: linear-gradient(to left, transparent 0%, #8C6A3C 40%, #D4AF37 85%, #E5C158 100%) !important;
    opacity: 0.9 !important;
}

/* Center Fan Emblem Container */
.mystic-divider-icon,
.traditional-divider-icon,
.modal-divider-icon {
    padding: 0 16px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    width: auto !important;
    height: auto !important;
}

.mystic-divider-icon svg,
.traditional-divider-icon svg,
.fan-icon-svg {
    width: 36px !important;
    height: 36px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 8px rgba(218, 165, 32, 0.8)) !important;
}

/* ==========================================================================
   ✦ TRADITIONAL KOREAN FAN GOLD DIVIDER SYSTEM (전통 접선 부채 천기 구분선)
   ========================================================================== */

.mystic-divider,
.traditional-divider,
.modal-divider,
.cover-divider,
.antique-divider,
hr {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 88% !important;
    max-width: 580px !important;
    margin: 36px auto !important;
    border: none !important;
    background: transparent !important;
    position: relative !important;
    height: 36px !important;
    box-sizing: border-box !important;
}

.modal-divider {
    margin: 20px auto !important;
    max-width: 360px !important;
    height: 28px !important;
}

/* Left Line */
.mystic-divider::before,
.traditional-divider::before,
.modal-divider::before,
.cover-divider::before,
.antique-divider::before,
hr::before {
    content: "" !important;
    display: block !important;
    flex: 1 !important;
    height: 1.5px !important;
    background: linear-gradient(to right, transparent 0%, #8C6A3C 40%, #D4AF37 85%, #E5C158 100%) !important;
    opacity: 0.85 !important;
}

/* Right Line */
.mystic-divider::after,
.traditional-divider::after,
.modal-divider::after,
.cover-divider::after,
.antique-divider::after,
hr::after {
    content: "" !important;
    display: block !important;
    flex: 1 !important;
    height: 1.5px !important;
    background: linear-gradient(to left, transparent 0%, #8C6A3C 40%, #D4AF37 85%, #E5C158 100%) !important;
    opacity: 0.85 !important;
}

/* Center Fan Emblem Container */
.mystic-divider-icon,
.traditional-divider-icon,
.modal-divider-icon {
    padding: 0 14px !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.mystic-divider-icon svg,
.traditional-divider-icon svg,
.fan-icon-svg {
    width: 32px !important;
    height: 32px !important;
    filter: drop-shadow(0 0 8px rgba(218, 165, 32, 0.7)) !important;
}


/* ==========================================================================
   ✦ WARM BROWN SAJU TABLE CARD BOX (나의 사주 명식 갈색 박스 카드)
   ========================================================================== */
.saju-table-container {
    margin: 24px 0 32px 0 !important;
    text-align: center !important;
    background: rgba(45, 30, 20, 0.65) !important;
    background-image: url('./assets/hanji_card.webp') !important;
    background-size: 400px 400px !important;
    border: 1.5px solid #8C6A3C !important;
    border-radius: 16px !important;
    padding: 22px 18px !important;
    box-shadow: inset 0 0 12px rgba(160, 120, 60, 0.2), 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.saju-table-container h3 {
    color: var(--accent-gold-light) !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    font-family: var(--font-heading) !important;
    margin-bottom: 16px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}

/* Ebook Reader Mode compatibility */
.ebook-page-inner .saju-table-container {
    background: rgba(140, 106, 60, 0.12) !important;
    background-image: none !important;
    border: 1.5px solid #8C6A3C !important;
    border-radius: 14px !important;
    padding: 16px 14px !important;
    margin: 14px 0 20px 0 !important;
    box-shadow: inset 0 0 8px rgba(160, 120, 60, 0.15) !important;
}

.ebook-page-inner .saju-table-container h3 {
    color: #8C6A3C !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    margin-bottom: 12px !important;
    text-shadow: none !important;
}

/* ==========================================================================

/* ==========================================================================
   ✦ INTERACTIVE 3D STACK REVIEW DECK (조선 족자 괘서 3D 덱 카루셀)
   ========================================================================== */

.mystic-review-stack-container {
    position: relative !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 24px auto 16px auto !important;
    padding: 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.mystic-review-deck {
    position: relative !important;
    width: 100% !important;
    height: 185px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    perspective: 1000px !important;
}

.mystic-stack-card {
    position: absolute !important;
    width: 90% !important;
    max-width: 360px !important;
    height: 165px !important;
    background: linear-gradient(145deg, #FAF4E8 0%, #F1E5CF 50%, #E5D4B6 100%) !important;
    border: 1.5px solid #8C6A3C !important;
    border-left: 6px solid #6E502B !important;
    border-radius: 6px 16px 16px 6px !important;
    padding: 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: inset 0 0 12px rgba(160, 120, 60, 0.25), 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.45s ease, filter 0.45s ease !important;
    cursor: pointer !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

/* Red Stamp Seal */
.mystic-stack-card .card-stamp {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    width: 24px !important;
    height: 24px !important;
    border: 1.5px solid #B91C1C !important;
    border-radius: 4px !important;
    color: #B91C1C !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: rotate(-8deg) !important;
    font-family: var(--font-heading) !important;
    opacity: 0.85 !important;
    pointer-events: none !important;
}

.mystic-stack-card .card-stars {
    color: #B86B00 !important;
    font-size: 15px !important;
    letter-spacing: 2px !important;
    margin-bottom: 4px !important;
}

.mystic-stack-card .card-text {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #26170E !important;
    line-height: 1.5 !important;
    font-family: var(--font-heading) !important;
    word-break: keep-all !important;
    margin: 0 !important;
}

.mystic-stack-card .card-reviewer {
    font-size: 12px !important;
    color: #6E502B !important;
    font-weight: 700 !important;
    text-align: right !important;
    margin-top: 6px !important;
}

/* 3D Stack Positioning Classes */
.mystic-stack-card.active {
    z-index: 5 !important;
    transform: translateY(0) scale(1) rotate(0deg) !important;
    opacity: 1 !important;
    filter: brightness(1) !important;
    box-shadow: inset 0 0 12px rgba(160, 120, 60, 0.3), 0 12px 35px rgba(218, 165, 32, 0.3) !important;
}

.mystic-stack-card.next-1 {
    z-index: 4 !important;
    transform: translateY(12px) scale(0.94) rotate(3.5deg) !important;
    opacity: 0.85 !important;
    filter: brightness(0.85) !important;
}

.mystic-stack-card.next-2 {
    z-index: 3 !important;
    transform: translateY(22px) scale(0.88) rotate(-2.5deg) !important;
    opacity: 0.6 !important;
    filter: brightness(0.7) !important;
}

.mystic-stack-card.prev-1 {
    z-index: 4 !important;
    transform: translateY(12px) scale(0.94) rotate(-3.5deg) !important;
    opacity: 0.85 !important;
    filter: brightness(0.85) !important;
}

.mystic-stack-card.hidden {
    z-index: 1 !important;
    transform: translateY(30px) scale(0.8) rotate(0deg) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Controls & Indicators */
.mystic-stack-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 14px !important;
}

.stack-nav-btn {
    background: rgba(140, 106, 60, 0.15) !important;
    border: 1px solid #8C6A3C !important;
    color: var(--accent-gold-light) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 11px !important;
    transition: all 0.2s ease !important;
}

.stack-nav-btn:hover {
    background: #8C6A3C !important;
    color: #FFF !important;
    transform: scale(1.1) !important;
}

.stack-dots {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.stack-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: rgba(218, 165, 32, 0.3) !important;
    border: 1px solid rgba(218, 165, 32, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.stack-dot.active {
    width: 22px !important;
    border-radius: 10px !important;
    background: var(--accent-gold-light) !important;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.7) !important;
}

/* ==========================================================================
   MINI EBOOK TEASER (맛보기 e북)
   결제 후 실제로 열리는 '해설서 e북'과 동일한 연출을 축소 재현한다.
   표지가 넘어가고 → 종이 낱장이 3D로 넘어가고 → 마지막 장에서 다시 표지로 순환.
   ========================================================================== */
.mini-ebook {
    max-width: 340px;
    margin: 0 auto;
}
.mini-book {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.45;
    perspective: 2000px;
    -webkit-perspective: 2000px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
/* 책 뒤로 겹쳐 보이는 남은 장들 */
.mini-book::before,
.mini-book::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: #F2E8D6;
    border: 1px solid #D9C9AF;
    z-index: 1;
    pointer-events: none;
}
.mini-book::before { transform: translate(7px, 7px) rotate(1.1deg); opacity: 0.7; }
.mini-book::after  { transform: translate(3px, 3px) rotate(-0.7deg); opacity: 0.9; }

.mini-page {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(255deg, #F0E5D2 0%, #FBF5EA 8%, #FBF5EA 92%, #F0E5D2 100%);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6), inset 14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.mini-page-inner {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    padding: 20px 18px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #1A0F12;
}
.mini-fit {
    width: 100%;
    transform-origin: center center;
}
.mini-page-num {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 4;
    font-family: var(--font-heading);
    font-size: 9.5px;
    letter-spacing: 3px;
    color: #A08A67;
    pointer-events: none;
}

/* ---------- 넘어가는 낱장 ---------- */
.mini-leaf {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    transform-origin: left center;
    transform-style: preserve-3d;
    will-change: transform;
}
.mini-leaf.flipping { display: block; }
.mini-leaf-face {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.mini-leaf-front {
    background: linear-gradient(255deg, #F0E5D2 0%, #FBF5EA 8%, #FBF5EA 92%, #F0E5D2 100%);
    box-shadow: inset 14px 0 26px -16px rgba(90, 60, 20, 0.5);
}
.mini-leaf-back {
    background: linear-gradient(105deg, #F0E5D2 0%, #FBF5EA 8%, #FBF5EA 92%, #F0E5D2 100%);
    box-shadow: inset -14px 0 26px -16px rgba(90, 60, 20, 0.5);
    transform: rotateY(180deg);
}

/* ---------- 표지 ---------- */
.mini-cover {
    position: absolute;
    inset: 0;
    z-index: 10;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.32, 0.06, 0.24, 1), opacity 0.45s ease 0.3s;
}
.mini-book.open .mini-cover {
    transform: rotateY(-125deg);
    opacity: 0;
    pointer-events: none;
}
.mini-cover .witch-cover {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border-radius: 10px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55);
}
.mini-cover .cover-frame { inset: 10px; }
.mini-cover .cover-content { padding: 14px 16px; }
.mini-cover .cover-logo { width: 30%; max-width: 78px; margin-bottom: 8px; }
.mini-cover .cover-name { font-size: 13px; margin-bottom: 4px; }
.mini-cover .cover-title { font-size: 21px; }
.mini-cover .cover-footer { font-size: 8.5px; letter-spacing: 2px; }

.mini-ebook-hint {
    margin: 16px 0 0 0;
    text-align: center;
    font-size: 11.5px;
    color: rgba(240, 232, 212, 0.6);
    letter-spacing: 0.2px;
    word-break: keep-all;
}
.mini-ebook-hint b { color: var(--accent-gold-light); font-weight: 800; }

/* ---------- 종이 위 본문 (실제 해설서 지면과 동일한 톤) ---------- */
.mini-ch-label {
    color: #8C6A3C;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 6px;
}
.mini-ch-title {
    font-family: var(--font-heading);
    font-weight: 900;
    color: #2A1A10;
    font-size: 17px;
    line-height: 1.35;
    text-align: center;
    margin: 0 0 12px 0;
    word-break: keep-all;
}
.mini-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(140, 106, 60, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    margin: 0 0 12px 0;
}
.mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mini-para {
    margin: 0 0 10px 0;
    color: #1A0F12;
    font-size: 12.5px;
    line-height: 1.75;
    letter-spacing: -0.2px;
    word-break: keep-all;
    text-align: left;
}
.mini-para:last-child { margin-bottom: 0; }
.mini-hl {
    display: inline;
    line-height: 1.2;
    color: #3A2A08;
    background-image: linear-gradient(180deg, #FFE9A3 0%, #FFD75A 100%);
    background-repeat: no-repeat;
    background-size: 100% 1.05em;
    background-position: left center;
    font-weight: 700;
    padding: 0 1px;
    border-radius: 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* 명식표 */
.mini-saju-box {
    background: rgba(140, 106, 60, 0.10);
    border: 1.5px solid #8C6A3C;
    border-radius: 12px;
    padding: 12px 10px;
    margin: 0 0 12px 0;
    box-shadow: inset 0 0 8px rgba(160, 120, 60, 0.15);
}
.mini-saju-title {
    font-family: var(--font-heading);
    color: #8C6A3C;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
}
.mini-saju-row { display: flex; gap: 5px; justify-content: center; }
.mini-pillar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-pillar-label {
    font-size: 9.5px;
    font-weight: 800;
    color: #6B5847;
    text-align: center;
    margin-bottom: 2px;
    white-space: nowrap;
}
.mini-pillar.is-day .mini-pillar-label { color: #8C6A3C; }
.mini-pillar-cell {
    border-radius: 6px;
    padding: 6px 2px;
    text-align: center;
    border: 1px solid rgba(140, 106, 60, 0.35);
    background: rgba(255, 255, 255, 0.6);
}
.mini-pillar.is-day .mini-pillar-cell {
    background: rgba(192, 40, 46, 0.09);
    border-color: rgba(192, 40, 46, 0.45);
}
.mini-pillar-char { font-size: 19px; font-weight: 900; line-height: 1.1; }
.mini-pillar-el { font-size: 8.5px; color: #6B5847; margin-top: 1px; }
.mini-saju-note { font-size: 9.5px; color: #8A7460; text-align: right; margin-top: 8px; }

.mini-daypillar { border-top: 1px dashed rgba(140, 106, 60, 0.45); padding-top: 10px; }
.mini-daypillar-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 900;
    color: #8C6A3C;
    text-align: center;
    margin-bottom: 6px;
}

/* 대운 타이밍 그래프 */
.mini-timeline {
    background: rgba(140, 106, 60, 0.08);
    border: 1px solid rgba(140, 106, 60, 0.35);
    border-radius: 10px;
    padding: 12px 12px 10px;
    margin: 0 0 12px 0;
}
.mini-timeline-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 900;
    color: #8C6A3C;
    margin-bottom: 10px;
}
.mini-timeline-bars { display: flex; align-items: flex-end; gap: 8px; height: 84px; }
.mini-tl-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.mini-tl-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, rgba(140, 106, 60, 0.55), rgba(140, 106, 60, 0.2));
}
.mini-tl-item.is-peak .mini-tl-bar {
    background: linear-gradient(180deg, #E5C158, #B8860B);
    box-shadow: 0 0 10px rgba(200, 150, 40, 0.5);
}
.mini-tl-year { font-size: 9px; font-weight: 700; color: #6B5847; margin-top: 5px; }
.mini-tl-item.is-peak .mini-tl-year { color: #A9761A; font-weight: 900; }
.mini-tl-caption { font-size: 10.5px; color: #5A4636; margin-top: 8px; line-height: 1.5; word-break: keep-all; }

@media (max-width: 380px) {
    .mini-ebook { max-width: 300px; }
    .mini-page-inner { padding: 16px 14px 24px; }
    .mini-ch-title { font-size: 15.5px; }
    .mini-para { font-size: 12px; }
}

/* ============================================================
   로딩 화면 리뷰 — 한지 카드 배경을 걷어내고 글자만 띄운다
   (영상을 최대한 가리지 않기 위함. 위쪽 한지 카드 규칙이
    !important 라 같은 강도 + 더 높은 특이도로 덮는다)
   ============================================================ */
.loading-overlay .loading-review-container {
    height: 88px;
    margin-top: 22px;
    max-width: 320px;
}

.loading-overlay .loading-r-card {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-align: center !important;
}

.loading-overlay .loading-r-card .review-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 0 7px 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.loading-overlay .loading-r-card .stars {
    font-size: 15px !important;
    color: #FFC94A !important;
    letter-spacing: 3px !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 16px rgba(0, 0, 0, 0.85) !important;
}

.loading-overlay .loading-r-card .review-title {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    text-align: center !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.4 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.85) !important;
}

.loading-overlay .loading-r-card .reviewer {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-align: center !important;
    display: block !important;
    margin-top: 0 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95) !important;
}

/* ============================================================
   낡은 사진 컴포넌트 변형 — 결제 페이지 / 이북 표지
   ============================================================ */
.hero-photo--static {
    animation: none;
    transform: perspective(1100px) rotateX(1.5deg) rotateY(-1deg);
}

/* 이북 표지는 책에 붙어있는 사진이라 뜬 그림자가 있으면 안 된다 */
.hero-photo--ebook {
    --hp-w: auto;
    width: auto;
    height: min(40vh, 330px);
    margin: 0 auto;
    filter: none;
}

/* 사진과 겹치지 않게 아래로 내린 배지 */
.pay-single-badge {
    display: inline-block;
    margin: 16px auto 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-gold);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    color: var(--accent-gold);
    font-weight: 800;
    white-space: nowrap;
}

/* ============================================================
   결제 페이지 — 무료 vs 프리미엄 비교 (좌우 대비)
   두 열의 칸을 한 그리드에 번갈아 넣어 같은 행끼리 높이가 맞는다.
   열 카드 배경은 컨테이너의 ::before(무료)/::after(프리미엄)로 그린다.
   프리미엄 열은 위아래로 조금 더 길게 그려 '솟아오른' 카드처럼 보이게 한다.
   ============================================================ */
#step-paywall .cmp-duel {
    --duel-gap: 12px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--duel-gap);
    max-width: 460px;
    margin: 18px auto 34px;
    padding-bottom: 12px;
}

#step-paywall .cmp-duel::before,
#step-paywall .cmp-duel::after {
    content: '';
    position: absolute;
    width: calc(50% - var(--duel-gap) / 2);
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
}

/* 무료 열: 빛바랜 한지 */
#step-paywall .cmp-duel::before {
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(160deg, #F6EEDF 0%, #EADCC2 55%, #DCC8A6 100%);
    border: 1.5px solid rgba(140, 106, 60, 0.75);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    filter: saturate(0.8);
}

/* 프리미엄 열: 금테 두른 먹빛 카드, 위아래로 8px 더 솟는다 */
#step-paywall .cmp-duel::after {
    right: 0;
    top: -8px;
    bottom: -8px;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(212, 163, 89, 0.18) 0%, rgba(212, 163, 89, 0) 70%),
        linear-gradient(180deg, #23141A 0%, #0E0709 100%);
    border: 1.5px solid var(--accent-gold);
    box-shadow:
        inset 0 0 18px rgba(212, 163, 89, 0.14),
        0 8px 28px rgba(0, 0, 0, 0.6),
        0 0 26px rgba(212, 163, 89, 0.22);
}

#step-paywall .cmp-duel > * {
    position: relative;
    z-index: 1;
}

/* --- 머리 --- */
#step-paywall .cmp-duel-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 8px 12px;
    text-align: center;
    font-family: var(--font-heading);
}

#step-paywall .cmp-duel-head-icon {
    font-size: 20px;
    line-height: 1.2;
}

#step-paywall .cmp-duel-head-name {
    font-size: 15.5px;
    font-weight: 900;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

#step-paywall .cmp-duel-head-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

#step-paywall .cmp-duel-head.cmp-duel-free .cmp-duel-head-name { color: #4A3424; }
#step-paywall .cmp-duel-head.cmp-duel-free .cmp-duel-head-sub { color: rgba(74, 52, 36, 0.6); }
#step-paywall .cmp-duel-head.cmp-duel-paid .cmp-duel-head-name { color: var(--accent-gold-light); }
#step-paywall .cmp-duel-head.cmp-duel-paid .cmp-duel-head-sub { color: rgba(245, 235, 225, 0.65); }

#step-paywall .cmp-duel-ribbon {
    position: absolute;
    top: -19px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    color: #1A0F12;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(212, 163, 89, 0.45);
}

/* 두 열 머리 사이 경계에 걸치는 VS 인장 */
#step-paywall .cmp-duel-vs {
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: var(--accent-gold-light);
    background: linear-gradient(180deg, #1A0F12 0%, #0E0709 100%);
    border: 1.5px solid var(--accent-gold);
    box-shadow: 0 0 14px rgba(212, 163, 89, 0.4), 0 0 0 4px rgba(14, 7, 9, 0.55);
}

/* --- 항목 칸 --- */
#step-paywall .cmp-duel-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 46px;
    padding: 7px 10px 7px 12px;
    font-family: var(--font-heading);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    word-break: keep-all;
    text-align: left;
}

#step-paywall .cmp-duel-cell.cmp-duel-free {
    color: rgba(58, 40, 28, 0.72);
    border-top: 1px dashed rgba(140, 106, 60, 0.3);
}

#step-paywall .cmp-duel-cell.cmp-duel-paid {
    color: #F5EBE1;
    border-top: 1px dashed rgba(212, 163, 89, 0.22);
}

#step-paywall .cmp-duel-mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

#step-paywall .cmp-duel-free .cmp-duel-mark {
    color: #B91C1C;
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.35);
}

#step-paywall .cmp-duel-paid .cmp-duel-mark {
    color: #1A0F12;
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 8px rgba(212, 163, 89, 0.45);
}

@media (max-width: 360px) {
    #step-paywall .cmp-duel { --duel-gap: 8px; }
    #step-paywall .cmp-duel-head-name { font-size: 14px; }
    #step-paywall .cmp-duel-cell { font-size: 12px; padding: 6px 7px 6px 9px; gap: 5px; }
}


/* ============================================================
   브랜드 스토리 — 낡은 사진을 한 장씩 넘기는 마녀의 내력
   (무료로 사주보기 → 입력 사이에 끼어드는 몰입 구간)
   ============================================================ */
#step-story {
    background: #07050a;
}

/* 스토리는 화면을 통째로 쓰는 연출이라 푸터/하단바를 감춘다 */
#step-story.active ~ .app-footer,
#step-story.active ~ #app-bottom-nav,
#step-story.active ~ .bottom-nav-bar {
    display: none !important;
}

.witch-story {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    background:
        radial-gradient(120% 70% at 50% 8%, rgba(84, 52, 20, 0.34), rgba(0, 0, 0, 0) 62%),
        radial-gradient(100% 60% at 50% 108%, rgba(150, 44, 14, 0.24), rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #0a0710 0%, #060409 55%, #0a0508 100%);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* 오래된 필름 입자 */
.witch-story__grain {
    position: absolute;
    inset: -50%;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
    animation: witchStoryGrain 0.9s steps(3) infinite;
    mix-blend-mode: overlay;
}

@keyframes witchStoryGrain {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-3%, 2%); }
    66%  { transform: translate(2%, -3%); }
    100% { transform: translate(0, 0); }
}

/* 상단 — 진행 눈금 */
.witch-story__top {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.witch-story__progress {
    display: flex;
    gap: 5px;
    flex: 1;
}

.witch-story__tick {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: rgba(212, 175, 55, 0.18);
    transition: background 0.45s ease, box-shadow 0.45s ease;
}

.witch-story__tick.is-done {
    background: rgba(212, 175, 55, 0.9);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.55);
}

/* 건너뛰기 — 하단, 안내 문구 자리에 놓인다 */
.witch-story__skip {
    background: transparent;
    border: none;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(233, 220, 198, 0.42);
    cursor: pointer;
    transition: color 0.2s ease;
}

.witch-story__skip:hover { color: rgba(255, 228, 133, 0.9); }

.witch-story__skip.is-hidden { display: none; }

/* 사진 무대 */
.witch-story__stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 0;
    padding: 14px 0 4px;
}

.witch-story__photo {
    position: relative;
    width: min(78vw, 300px);
    max-height: 100%;
    aspect-ratio: 760 / 1018;
    cursor: pointer;
    /* 해진 인화지 실루엣을 그대로 따라가는 그림자 */
    filter:
        drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6))
        drop-shadow(0 14px 26px rgba(0, 0, 0, 0.75))
        drop-shadow(0 34px 54px rgba(0, 0, 0, 0.6));
}

/* 사진 바깥의 흰 바탕을 잘라내는 실루엣 마스크 (장면마다 --story-mask 로 교체) */
.witch-story__sheet {
    position: absolute;
    inset: 0;
    -webkit-mask: var(--story-mask) center / 100% 100% no-repeat;
    mask: var(--story-mask) center / 100% 100% no-repeat;
}

.witch-story__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    filter: grayscale(0.5) contrast(1.05) brightness(0.97);
}

/* 인화지가 살짝 휘어 보이는 명암 */
.witch-story__sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(101deg,
            rgba(28, 18, 8, 0.26) 0%,
            rgba(28, 18, 8, 0.04) 12%,
            rgba(255, 248, 228, 0.08) 36%,
            rgba(255, 255, 255, 0) 56%,
            rgba(28, 18, 8, 0.06) 82%,
            rgba(28, 18, 8, 0.28) 100%),
        radial-gradient(115% 46% at 50% 100%, rgba(18, 11, 5, 0.3), rgba(0, 0, 0, 0) 70%);
}

/* 장면 전환 — 들어올 때는 살짝 밀려 올라오고, 나갈 때는 가라앉는다 */
.witch-story__photo.is-entering {
    animation: witchStoryPhotoIn 0.85s cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

.witch-story__photo.is-leaving {
    animation: witchStoryPhotoOut 0.32s ease-in both;
}

/* 흐릿하게 인화되는 느낌은 안쪽 시트에 준다.
   (바깥 .witch-story__photo 의 filter 는 실루엣 그림자용이라 덮어쓰면 안 된다) */
.witch-story__photo.is-entering .witch-story__sheet {
    animation: witchStorySheetIn 0.85s cubic-bezier(0.2, 0.7, 0.25, 1) both;
}

@keyframes witchStoryPhotoIn {
    from { opacity: 0; transform: perspective(1100px) translateY(16px) scale(1.06) rotate(-0.8deg); }
    to   { opacity: 1; transform: perspective(1100px) translateY(0) scale(1) rotate(-0.4deg); }
}

@keyframes witchStorySheetIn {
    from { filter: blur(6px); }
    to   { filter: blur(0); }
}

@keyframes witchStoryPhotoOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-10px) scale(0.97); }
}

/* 사진 밑 해설 */
.witch-story__caption {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 4px 4px 0;
    /* 장면마다 글 줄 수가 달라도 사진이 위아래로 움찔하지 않도록 높이를 잡아둔다 */
    min-height: 152px;
}

.witch-story__caption.is-entering {
    animation: witchStoryCaptionIn 0.8s ease-out 0.18s both;
}

.witch-story__caption.is-leaving {
    animation: witchStoryCaptionOut 0.28s ease-in both;
}

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

@keyframes witchStoryCaptionOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.witch-story__chapter {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--accent-gold);
    opacity: 0.8;
    margin-bottom: 10px;
    text-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
}

.witch-story__text {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(14px, 4.1vw, 16.5px);
    font-weight: 600;
    line-height: 1.75;
    color: #EFE4D2;
    word-break: keep-all;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.witch-story__text b {
    color: #FFE485;
    font-weight: 900;
}

/* 하단 — 건너뛰기 / 마지막 장의 CTA */
.witch-story__bottom {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 420px;
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 12px;
}

/* 사진 바로 아래 붙는 안내 — 사진을 누르라고 짚어준다 */
.witch-story__hint {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: rgba(233, 220, 198, 0.42);
    animation: witchStoryHintPulse 2.6s ease-in-out infinite;
}

.witch-story__hint::before {
    content: '☞';
    margin-right: 6px;
    color: rgba(212, 175, 55, 0.75);
}

.witch-story__hint.is-hidden {
    visibility: hidden;
}

@keyframes witchStoryHintPulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.witch-story__cta {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.witch-story__cta.is-visible {
    display: flex;
    animation: witchStoryCtaIn 0.7s ease-out 0.5s both;
}

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

.witch-story__cta-line {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-gold);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}

.witch-story__cta .btn-primary {
    width: 100%;
}

/* 화면이 짧은 기기에서는 사진을 줄여 글이 잘리지 않게 한다 */
@media (max-height: 700px) {
    .witch-story__photo { width: min(60vw, 230px); }
    .witch-story__caption { min-height: 124px; }
    .witch-story__text { font-size: 13.5px; line-height: 1.65; }
    /* CTA(마지막 장)가 들어와도 사진이 밀리지 않게 높이를 맞춰둔다 */
    .witch-story__bottom { min-height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
    .witch-story__grain,
    .witch-story__hint { animation: none; }
    .witch-story__photo.is-entering,
    .witch-story__caption.is-entering { animation-duration: 0.3s; }
}


/* ==========================================
   결제 화면 — 상품 카드와 상세 소개 (pw-*)
   사진 패널은 본문 여백(24px)을 넘어 화면 폭을 꽉 채운다.
   ========================================== */
#step-paywall .pw-product {
    margin: 4px 0 14px;
    border: 1.5px solid rgba(212, 163, 89, 0.5);
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #1A0F12 0%, #0E0709 100%);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.7);
}

#step-paywall .pw-product-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#step-paywall .pw-product-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#step-paywall .pw-product-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 15, 18, 0) 55%, #1A0F12 100%);
    pointer-events: none;
}

#step-paywall .pw-product-body {
    padding: 6px 20px 22px;
    text-align: center;
}

#step-paywall .pw-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

#step-paywall .pw-price-orig {
    font-size: 16px;
    font-weight: 600;
    color: rgba(240, 232, 212, 0.42);
    text-decoration: line-through;
}

#step-paywall .pw-discount {
    padding: 4px 9px;
    border: 1px solid rgba(192, 40, 46, 0.55);
    border-radius: 6px;
    background: rgba(192, 40, 46, 0.25);
    font-size: 12px;
    font-weight: 800;
    color: #FF6B6B;
    line-height: 1;
}

#step-paywall .pw-discount[hidden] {
    display: none;
}

#step-paywall .pw-price {
    display: inline-block;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#step-paywall .pw-feats {
    list-style: none;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(212, 163, 89, 0.2);
    display: grid;
    gap: 11px;
    text-align: left;
}

#step-paywall .pw-feats li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.5;
    color: #EFE4D2;
    word-break: keep-all;
}

#step-paywall .pw-feats li::before {
    content: '';
    flex: 0 0 20px;
    height: 20px;
    margin-top: 1px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.6' fill='rgba(218,165,32,0.15)' stroke='%23E8C46A' stroke-width='1.3'/%3E%3Cpath d='M6 10.3l2.6 2.6L14 7.6' fill='none' stroke='%23E8C46A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 서비스 제공 안내 — 상품 카드 안, 구성 목록 바로 아래 가운데 */
#step-paywall .pw-product-body .service-provision {
    max-width: none;
    margin: 18px 0 0;
}

/* --- 소개 패널 공통 --- */
/* 소개 패널들은 한지 바탕 위에 하나로 이어진 어두운 판처럼 놓인다 (글자 대비를 높이려고) */
#step-paywall .pw-sec {
    position: relative;
    margin: 0 -24px;
    padding: 56px 24px;
    text-align: center;
    word-break: keep-all;
    background: radial-gradient(80% 36% at 50% 0%, rgba(218, 165, 32, 0.08) 0%, rgba(0, 0, 0, 0) 70%), #0B0709;
}

#step-paywall .pw-sec + .pw-sec {
    border-top: 1px solid rgba(212, 163, 89, 0.14);
}

#step-paywall .pw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--accent-gold);
}

#step-paywall .pw-kicker::before,
#step-paywall .pw-kicker::after {
    content: '';
    width: 22px;
    height: 1px;
    background: rgba(218, 165, 32, 0.6);
}

#step-paywall .pw-h {
    margin: 0;
    font-family: var(--font-heading);
    line-height: 1.3;
}

#step-paywall .pw-h small {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #EADFCB;
}

#step-paywall .pw-h strong {
    display: block;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(170deg, #F6DD8E 0%, var(--accent-gold-light) 45%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 10px rgba(218, 165, 32, 0.25));
}

#step-paywall .pw-lead {
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 1.85;
    color: #D9CDB9;
}

#step-paywall .pw-gold {
    color: var(--accent-gold-light);
    font-weight: 700;
}

#step-paywall .pw-red {
    color: #F0625A;
    font-weight: 700;
}

/* 금색 장식선 */
#step-paywall .pw-orn {
    display: block;
    width: 150px;
    height: 9px;
    margin: 22px auto;
    background:
        radial-gradient(circle, var(--accent-gold) 0 3px, transparent 3.5px) center / 9px 9px no-repeat,
        linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.75) 40%, transparent 42%, transparent 58%, rgba(218, 165, 32, 0.75) 60%, transparent) center / 100% 1px no-repeat;
}

/* --- 1. 첫마디 --- */
#step-paywall .pw-hook {
    padding-bottom: 0;
    border-top: 1px solid rgba(212, 163, 89, 0.4);
    background: radial-gradient(90% 50% at 50% 0%, rgba(218, 165, 32, 0.1) 0%, rgba(0, 0, 0, 0) 70%), #0B0709;
    overflow: hidden;
}

#step-paywall .pw-plate {
    display: inline-block;
    margin-bottom: 20px;
    padding: 6px 26px;
    border: 1px solid rgba(218, 165, 32, 0.6);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(218, 165, 32, 0.14), rgba(218, 165, 32, 0.04));
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-gold-light);
    box-shadow: inset 0 0 0 3px rgba(11, 7, 9, 0.9), inset 0 0 0 4px rgba(218, 165, 32, 0.35);
}

#step-paywall .pw-hook .pw-h strong {
    font-size: 36px;
}

#step-paywall .pw-hook-lead {
    margin: 22px 0 0;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.6;
    color: #F1E7D6;
}

#step-paywall .pw-hook-body {
    margin: 0;
    font-size: 16px;
    line-height: 1.9;
    color: #E3D7C3;
}

#step-paywall .pw-hook-img {
    margin: 26px -24px 0;
}

#step-paywall .pw-hook-img img,
#step-paywall .pw-final-img img {
    display: block;
    width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 82%, transparent 100%);
}

#step-paywall .pw-hook-img img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

/* --- 2. 다른 이유 --- */
#step-paywall .pw-pillars {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

#step-paywall .pw-pillar {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 16px;
    border: 1px solid rgba(212, 163, 89, 0.3);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(218, 165, 32, 0.07), rgba(255, 255, 255, 0.02));
    text-align: left;
}

#step-paywall .pw-pillar-ico {
    flex: 0 0 44px;
    height: 44px;
    border: 1px solid rgba(218, 165, 32, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-light);
    background: rgba(218, 165, 32, 0.08);
}

#step-paywall .pw-pillar-ico svg,
#step-paywall .pw-trust-ico svg,
#step-paywall .pw-vs-row svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#step-paywall .pw-pillar-ico svg {
    width: 22px;
    height: 22px;
}

#step-paywall .pw-pillar-title {
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-gold-light);
    line-height: 1.4;
}

#step-paywall .pw-pillar-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: #CFC2AE;
}

#step-paywall .pw-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

#step-paywall .pw-trust > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border: 1px solid rgba(212, 163, 89, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 11.5px;
    line-height: 1.45;
    color: #CDBFA9;
}

#step-paywall .pw-trust-ico {
    color: var(--accent-gold);
}

#step-paywall .pw-trust-ico svg {
    display: block;
    width: 22px;
    height: 22px;
}

/* --- 3. 비교 --- */
#step-paywall .pw-vs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

#step-paywall .pw-vs-col {
    border-radius: 14px;
    padding: 0 10px 6px;
    overflow: hidden;
}

#step-paywall .pw-vs-common {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

#step-paywall .pw-vs-witch {
    border: 1px solid rgba(218, 165, 32, 0.6);
    background: linear-gradient(180deg, rgba(218, 165, 32, 0.12), rgba(218, 165, 32, 0.03));
    box-shadow: 0 0 22px rgba(218, 165, 32, 0.12);
}

#step-paywall .pw-vs-head {
    margin: 0 -10px 4px;
    padding: 11px 6px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
}

#step-paywall .pw-vs-common .pw-vs-head {
    background: rgba(255, 255, 255, 0.06);
    color: #BDB2A2;
}

#step-paywall .pw-vs-witch .pw-vs-head {
    background: linear-gradient(180deg, rgba(218, 165, 32, 0.35), rgba(218, 165, 32, 0.18));
    color: #FFF3D2;
}

#step-paywall .pw-vs-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 62px;
    padding: 8px 2px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

#step-paywall .pw-vs-row + .pw-vs-row {
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

#step-paywall .pw-vs-row svg {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
}

#step-paywall .pw-vs-common .pw-vs-row {
    color: #A99F91;
}

#step-paywall .pw-vs-witch .pw-vs-row {
    color: #F3E6CC;
}

#step-paywall .pw-vs-witch .pw-vs-row svg {
    color: var(--accent-gold-light);
}

#step-paywall .pw-vs-badge {
    position: absolute;
    left: 50%;
    top: 58px;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid rgba(218, 165, 32, 0.7);
    border-radius: 50%;
    background: #120B0D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 900;
    color: var(--accent-gold-light);
    z-index: 1;
}

#step-paywall .pw-banner {
    margin-top: 22px;
    padding: 20px 16px;
    border: 1px solid rgba(218, 165, 32, 0.45);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(26, 15, 18, 0.95), rgba(14, 7, 9, 0.95));
    box-shadow: inset 0 0 0 4px #0B0709, inset 0 0 0 5px rgba(218, 165, 32, 0.25);
    font-family: var(--font-heading);
    font-size: 19px;
    line-height: 1.55;
    color: #EADFCB;
}

#step-paywall .pw-banner strong {
    color: var(--accent-gold-light);
    font-size: 22px;
}

/* --- 4. 고민 목록 --- */
#step-paywall .pw-checks {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

#step-paywall .pw-checks li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 1px solid rgba(218, 165, 32, 0.35);
    border-radius: 12px;
    background: rgba(218, 165, 32, 0.05);
    text-align: left;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.5;
    color: #F1E7D6;
}

#step-paywall .pw-checks li::before {
    content: '';
    flex: 0 0 26px;
    height: 26px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect x='2.5' y='2.5' width='21' height='21' rx='5' fill='rgba(218,165,32,0.12)' stroke='%23E8C46A' stroke-width='1.6'/%3E%3Cpath d='M7.5 13.5l3.6 3.6L19 9' fill='none' stroke='%23E8C46A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* --- 5. 후기 --- */
#step-paywall .pw-voices {
    margin-top: 28px;
}

/* 스크립트가 후기를 섞고 두 벌로 이어 붙이면 is-rolling 이 붙어 아래에서 위로 흐른다.
   카드 사이 간격을 gap 이 아니라 margin-bottom 으로 둬야 -50% 이동이 정확히 한 벌 길이가 된다. */
#step-paywall .pw-voices.is-rolling {
    height: 480px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 88%, transparent 100%);
}

#step-paywall .pw-voices.is-rolling .pw-voices-track {
    animation: pw-roll var(--roll-dur, 40s) linear infinite;
    will-change: transform;
}

#step-paywall .pw-voices.is-rolling:hover .pw-voices-track {
    animation-play-state: paused;
}

@keyframes pw-roll {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    #step-paywall .pw-voices.is-rolling { overflow-y: auto; }
    #step-paywall .pw-voices.is-rolling .pw-voices-track { animation: none; }
}

#step-paywall .pw-voice {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    margin: 0 0 12px;
    padding: 16px 14px;
    border: 1px solid rgba(212, 163, 89, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    text-align: left;
}

#step-paywall .pw-voice-who {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #B9AD9B;
    text-align: center;
}

#step-paywall .pw-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background:
        no-repeat center 8px / 30px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 34'%3E%3Ccircle cx='15' cy='10' r='7' fill='%23A79A86'/%3E%3Cpath d='M1 34c1-9 6.6-13.5 14-13.5S28 25 29 34z' fill='%23A79A86'/%3E%3C/svg%3E"),
        #2A2125;
    border: 1px solid rgba(212, 163, 89, 0.3);
    overflow: hidden;
}

#step-paywall .pw-voice-tag {
    padding: 2px 8px;
    border: 1px solid rgba(218, 165, 32, 0.4);
    border-radius: 999px;
    font-size: 11px;
    color: var(--accent-gold-light);
    white-space: nowrap;
}

#step-paywall .pw-voice blockquote {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    color: #F1E7D6;
}

#step-paywall .pw-stars {
    margin-bottom: 4px;
    font-size: 14px;
    letter-spacing: 2px;
    color: #F2C14E;
}

#step-paywall .pw-voice em {
    font-style: normal;
    color: var(--accent-gold-light);
}

/* --- 6. 마지막 권유 --- */
#step-paywall .pw-final {
    padding: 48px 16px 56px;
    border-bottom: 1px solid rgba(212, 163, 89, 0.4);
}

#step-paywall .pw-final-frame {
    position: relative;
    padding: 36px 0 28px;
    border: 1px solid rgba(218, 165, 32, 0.6);
    border-radius: 20px;
    background: radial-gradient(90% 40% at 50% 0%, rgba(218, 165, 32, 0.12) 0%, rgba(0, 0, 0, 0) 70%), linear-gradient(180deg, #140B0E 0%, #0A0608 100%);
    box-shadow: inset 0 0 0 5px rgba(10, 6, 8, 0.9), inset 0 0 0 6px rgba(218, 165, 32, 0.25), 0 12px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

#step-paywall .pw-final .pw-h strong {
    font-size: 29px;
}

#step-paywall .pw-final-lines {
    margin: 20px 20px 0;
    font-size: 16px;
    line-height: 1.85;
    color: #E3D7C3;
}

#step-paywall .pw-final-lines + .pw-orn {
    margin: 18px auto 0;
}

#step-paywall .pw-final-img {
    margin-top: 10px;
}

#step-paywall .pw-final-img img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

#step-paywall .pw-final-quote {
    position: relative;
    margin: -46px 16px 0;
    padding: 20px 16px;
    border: 1px solid rgba(218, 165, 32, 0.5);
    border-radius: 6px;
    background: rgba(12, 7, 9, 0.92);
    box-shadow: inset 0 0 0 4px rgba(12, 7, 9, 0.9), inset 0 0 0 5px rgba(218, 165, 32, 0.22);
    font-family: var(--font-heading);
    font-size: 17px;
    line-height: 1.65;
    color: #EADFCB;
}

#step-paywall .pw-final-quote strong {
    color: var(--accent-gold-light);
    font-size: 19px;
}

/* 결제 수단·쿠폰·실시간 인원 — 마지막 패널 안, 인용 문구 바로 아래.
   원래 페이지 맨 아래에 있던 요소라 인라인 여백이 박혀 있어 !important 로 패널 안쪽 여백에 맞춘다. */
#step-paywall .pw-final-frame .payment-methods {
    margin: 24px 16px 0 !important;
}

#step-paywall .pw-final-frame .payment-methods h3 {
    margin-bottom: 4px;
    font-family: var(--font-heading);
    font-size: 17px;
    color: #EADFCB;
}

#step-paywall .pw-final-frame #coupon-trigger-container {
    margin: 14px 16px 0 !important;
}

#step-paywall .pw-final-frame .coupon-area {
    width: auto !important;
    margin: 12px 16px 0 !important;
}

#step-paywall .pw-final-frame .live-stats-box {
    margin: 20px 16px 0 !important;
}

/* 내 쿠폰 칸도 패널 안쪽 박스들과 같은 좌우 여백에 맞춘다 */
#step-paywall .pw-final-frame .my-coupon-chip {
    width: auto;
    max-width: none;
    margin: 20px 16px 0;
}

/* 무료 vs 프리미엄 비교 제목 */
#step-paywall .pw-compare-h {
    margin-bottom: 26px;
}

@media (max-width: 360px) {
    #step-paywall .pw-h strong { font-size: 28px; }
    #step-paywall .pw-hook .pw-h strong { font-size: 31px; }
    #step-paywall .pw-vs-row { font-size: 12.5px; gap: 7px; }
    #step-paywall .pw-vs-row svg { flex-basis: 22px; width: 22px; height: 22px; }
}

/* 결제 화면 — 마지막 어두운 패널(결제 수단·실시간 인원)이 하단 정보에 바로 이어지도록
   본문 아래 여백(다른 화면의 고정 버튼 자리)과 푸터 위 여백을 없앤다. */
#step-paywall > .content-wrapper.pb-padding {
    padding-bottom: 0;
}

#app-container.paywall-active .app-footer {
    margin-top: 0;
}

/* ============================================================
   회원가입 환영 쿠폰 — 결제 화면 가입 유도 팝업 · 쿠폰 도착 알림 · 내 쿠폰
   ============================================================ */
/* 결제 화면 실시간 구매 알림(#payment-toast-container, z-index 10000)보다 위에 띄운다 */
.coupon-modal {
    z-index: 10001;
    padding: 16px;
    background-color: rgba(4, 2, 3, 0.82);
}

.coupon-modal__card {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: auto;
    padding: 26px 22px 18px;
    border: 1.5px solid #8C6A3C;
    border-radius: 18px;
    background: radial-gradient(120% 70% at 50% 0%, rgba(212, 163, 89, 0.22) 0%, rgba(212, 163, 89, 0) 60%),
                linear-gradient(180deg, #1F1216 0%, #0E0709 100%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(240, 201, 135, 0.08);
    color: var(--text-main);
    text-align: center;
    animation: couponPop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

@keyframes couponPop {
    0%   { transform: translateY(18px) scale(0.92); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

.coupon-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.coupon-modal__ribbon {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 46, 67, 0.16);
    border: 1px solid rgba(255, 46, 67, 0.45);
    color: #FF8A96;
    font-size: 12.5px;
    font-weight: 800;
}

.coupon-modal__title {
    margin: 0 0 14px;
    color: var(--accent-gold-light) !important;
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.35;
    word-break: keep-all;
}

.coupon-modal__sub {
    margin: -6px 0 14px;
    color: var(--text-dim);
    font-size: 13.5px;
}

/* 쿠폰 티켓 — 양옆이 파인 금빛 쿠폰 */
.coupon-ticket {
    position: relative;
    margin: 0 auto 14px;
    padding: 16px 18px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #F7DCA2 0%, #E2B565 48%, #C8913F 100%);
    color: #2A170B;
    box-shadow: 0 8px 22px rgba(212, 163, 89, 0.35);
}

.coupon-ticket::before,
.coupon-ticket::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background: #160C0F;
}
.coupon-ticket::before { left: -9px; }
.coupon-ticket::after { right: -9px; }

.coupon-ticket__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1;
}

.coupon-ticket__num {
    font-size: 48px;
    letter-spacing: -1px;
}

.coupon-ticket__won {
    font-size: 22px;
}

.coupon-ticket__label {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1.5px dashed rgba(42, 23, 11, 0.35);
    font-size: 12.5px;
    font-weight: 800;
}

.coupon-ticket__code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 6px 6px 12px;
    border-radius: 10px;
    background: rgba(255, 251, 240, 0.75);
}

.coupon-ticket__code code {
    font-family: monospace;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #2A170B;
}

.coupon-copy-btn {
    flex-shrink: 0;
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: #2A170B;
    color: #F7DCA2;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.coupon-copy-btn.is-copied {
    background: #1F7A3E;
    color: #fff;
}

.coupon-modal__price {
    margin: 0 0 14px;
    color: var(--text-main);
    font-size: 14px;
}

.coupon-modal__price s {
    color: var(--text-dim);
}

.coupon-modal__price strong {
    color: var(--accent-gold-light);
    font-size: 17px;
}

.coupon-modal__kakao,
.coupon-modal__primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin: 0;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    animation: couponNudge 2.4s ease-in-out 0.8s infinite;
}

/* 카카오 버튼은 두 줄로 나눠 금액을 크게 보인다 (한 줄이면 좁은 화면에서 끝 글자만 다음 줄로 떨어진다) */
.coupon-modal__kakao {
    flex-direction: column;
    gap: 1px;
    min-height: 58px;
    padding: 8px 12px;
    background: #FEE500;
    color: #191919;
}

.coupon-modal__kakao-top {
    font-size: 13px;
    font-weight: 700;
}

.coupon-modal__kakao-main {
    font-size: 18px;
    font-weight: 900;
}

.coupon-modal__primary {
    background: linear-gradient(135deg, #F0C987 0%, #D4A359 100%);
    color: #2A170B;
}

@keyframes couponNudge {
    0%, 86%, 100% { transform: none; }
    90% { transform: scale(1.03); }
    95% { transform: scale(0.99); }
}

@media (prefers-reduced-motion: reduce) {
    .coupon-modal__card,
    .coupon-modal__kakao,
    .coupon-modal__primary { animation: none; }
}

.coupon-modal__hint {
    margin: 10px 0 4px;
    color: #FFB5BD;
    font-size: 12.5px;
    font-weight: 700;
    word-break: keep-all;
    text-wrap: balance;
}

.coupon-modal__card--arrived .coupon-modal__hint {
    color: var(--text-dim);
    font-weight: 500;
}

.coupon-modal__alt,
.coupon-modal__skip {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    padding: 8px;
    border: none;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
}

.coupon-modal__alt {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

.coupon-modal__skip {
    color: rgba(194, 179, 163, 0.7);
    font-size: 12px;
}

.coupon-arrived__burst {
    margin-bottom: 4px;
    font-size: 46px;
    line-height: 1;
    animation: couponBurst 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

@keyframes couponBurst {
    0%   { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

/* 결제 화면 — 내 쿠폰 바로 적용 */
.my-coupon-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 14px auto 0;
    padding: 10px 10px 10px 14px;
    border: 1.5px dashed rgba(240, 201, 135, 0.7);
    border-radius: 12px;
    background: rgba(212, 163, 89, 0.12);
    color: var(--text-main);
    font-size: 14px;
}

.my-coupon-chip[hidden] {
    display: none;
}

.my-coupon-chip strong {
    color: var(--accent-gold-light);
}

.my-coupon-chip__btn {
    flex-shrink: 0;
    width: auto;
    height: 36px;
    margin: 0;
    padding: 0 16px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #F0C987 0%, #D4A359 100%);
    color: #2A170B;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

/* 마이페이지 — 제목 아래 '내 사주 명부 / 내 쿠폰함' 탭 */
.mypage-title {
    margin: 0 0 12px;
    color: #26170E !important;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 900;
}

.mypage-tabs {
    display: flex;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(140, 106, 60, 0.3);
}

.mypage-tab {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    margin: 0 0 -1px;
    padding: 10px 4px;
    border: none;
    border-bottom: 2.5px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #8C7A66;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.mypage-tab.is-active {
    border-bottom-color: #8C6A3C;
    color: #26170E;
}

.mypage-tab__badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #B91C1C;
    color: #fff;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
}

.mypage-tab__badge[hidden],
.mypage-panel[hidden] {
    display: none;
}

.mypage-panel {
    max-height: 260px;
    margin-bottom: 20px;
    overflow-y: auto;
}

.my-coupons__empty {
    padding: 20px 0;
    color: #5A422D;
    font-weight: 700;
    text-align: center;
}

.my-coupons__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.my-coupon-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 10px 10px 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F7DCA2 0%, #E2B565 100%);
    color: #2A170B;
}

.my-coupon-item.is-used {
    background: rgba(140, 106, 60, 0.18);
    color: #6B5847;
}

.my-coupon-item__amount {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
}

.my-coupon-item__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: 11.5px;
    font-weight: 700;
}

.my-coupon-item__info code {
    font-family: monospace;
    font-size: 13.5px;
    letter-spacing: 0.5px;
}

.my-coupon-item__state {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
}

.my-coupons__hint {
    margin: 2px 0 0;
    color: #5A422D;
    font-size: 11.5px;
}

/* ============================================================
   회원가입 약관 동의 — 가입 탭 · 가입 쿠폰 팝업 · 동의 창 (agreeBoxHtml)
   ============================================================ */
/* 약관 보기 창은 로그인 창·쿠폰 팝업(10001) 위에 뜬다 */
#terms-modal {
    z-index: 10010;
}

.agree-box {
    margin: 4px 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 163, 89, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.agree-box.is-checked {
    border-color: rgba(212, 163, 89, 0.75);
}

.agree-box.is-error {
    border-color: #E0575B;
    background: rgba(224, 87, 91, 0.08);
}

.agree-box.is-shaking {
    animation: agreeShake 0.42s ease;
}

@keyframes agreeShake {
    0%, 100% { transform: none; }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .agree-box.is-shaking { animation: none; }
}

.agree-box--compact {
    margin: 0 0 12px;
    padding: 10px 12px;
}

.agree-box__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.agree-box label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.agree-box input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 1.5px solid rgba(212, 163, 89, 0.75);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.agree-box input[type="checkbox"]:checked {
    border-color: #D4A359;
    background: #D4A359 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='%232A170B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.agree-box input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent-gold-light);
    outline-offset: 2px;
}

.agree-box__all span {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
}

.agree-box__toggle,
.agree-box__view {
    flex-shrink: 0;
    width: auto;
    margin: 0;
    padding: 4px 2px;
    border: none;
    background: none;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.agree-box__view {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.agree-box__items {
    display: none;
    margin: 10px 0 0;
    padding: 8px 0 0;
    border-top: 1px dashed rgba(212, 163, 89, 0.28);
    list-style: none;
}

.agree-box.is-open .agree-box__items,
.agree-box--static .agree-box__items {
    display: block;
}

.agree-box--static .agree-box__toggle {
    display: none;
}

.agree-box__items li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 8px;
    padding: 5px 0;
}

.agree-box__items label span {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
}

.agree-box__items em {
    color: var(--accent-gold);
    font-style: normal;
    font-weight: 700;
}

.agree-box__detail {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    margin: 4px 0 2px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-dim);
    font-size: 11.5px;
    line-height: 1.55;
    word-break: keep-all;
}

.agree-box__detail[hidden],
.agree-box__error[hidden] {
    display: none;
}

.agree-box__detail dt {
    color: var(--text-main);
    font-weight: 700;
    white-space: nowrap;
}

.agree-box__detail dd {
    margin: 0;
}

.agree-box__error {
    margin: 8px 0 0;
    color: #FF8A8D;
    font-size: 12.5px;
    font-weight: 700;
}
