/* ==========================================
   Physiognomy (관상) Service Styles
   ========================================== */
/* Life Hexagon Section */
.life-hexagon-section {
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.hexagon-chart-wrapper {
    width: 100%;
    height: 240px;
    margin-top: 15px;
    position: relative;
}

/* #faceView background inherited from .view-section */

.face-analysis-container {
    padding: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.face-upload-zone {
    width: 100%;
    min-height: 300px;
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-out;
}

.face-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 168, 255, 0.05);
}

.upload-placeholder {
    text-align: center;
    color: var(--text-primary);
}

.upload-placeholder p {
    font-weight: 700;
    margin-top: 5px;
}

.upload-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

.upload-guide-notice {
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 12px 15px;
}

.upload-guide-notice p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-guide-notice b {
    color: var(--primary);
}

.image-preview-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#faceImagePreview {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

#faceMarkerCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    /* Markers on top of everything */
}

/* Cropper Container */
.cropper-container {
    width: 100%;
    max-width: 500px;
    height: 500px;
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius-md);
    margin: 0 auto;
}

#faceImagePreview {
    display: block;
    max-width: 100%;
}

/* Customizing Cropper.js UI */
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
    /* Oval/Circular Crop Area */
}

.cropper-view-box {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
}

.cropper-line,
.cropper-point {
    background-color: var(--primary);
}

.cropper-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

/* --- Dashboard v3.0 Extensions --- */
.charts-bottom-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    /* Give more space to spectrum */
    gap: 30px;
    align-items: stretch;
    margin-top: 30px;
}

.indicator-group,
.spectrum-group {
    flex: 1;
    min-width: 0;
    /* Prevent overflow */
}

.vertical-chart-container {
    height: 220px;
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.spectrum-group.dashboard-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    /* Reduced since it's below now */
}

.total-energy-score-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-top: 10px;
}

.energy-score-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.score-unit {
    font-size: 1.2rem;
    margin-left: 5px;
    color: #64748b;
}

.spectrum-gauge-wrapper.improved {
    width: 100%;
    max-width: 400px;
    padding: 10px 0;
}

.spectrum-track.improved {
    height: 12px;
    background: linear-gradient(90deg, #e2e8f0, #6366f1, #fbbf24);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.spectrum-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 700;
}

.spectrum-pointer.simple {
    width: 4px;
    height: 100%;
    position: absolute;
    top: 0;
    background: #1e293b;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Key Landmark Points on Image */
.face-key-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 120;
    /* Above callouts */
    box-shadow:
        0 0 10px #fff,
        0 0 20px rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    animation: pointPulse 2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pointPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* Face Guideline Overlay - Subtle hint, not a wall */
.face-guideline-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    /* Below cropper controls */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    /* Make it more subtle */
}

.eye-line {
    width: 60%;
    height: 1px;
    border-top: 2px dashed #00d2ff;
    position: absolute;
    top: 38%;
    /* Adjusted for better face alignment */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.nose-line {
    width: 1px;
    height: 70%;
    border-left: 2px dashed #00d2ff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.guide-label {
    position: absolute;
    font-size: 11px;
    font-weight: 800;
    color: #00d2ff;
    white-space: nowrap;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8), 0 0 2px black;
    pointer-events: none;
}

.eye-line .guide-label {
    top: -16px;
    left: 10px;
}

.nose-line .guide-label {
    top: 10px;
    left: 6px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
}

.face-outline {
    width: 220px;
    height: 300px;
    border: 1px solid rgba(0, 210, 255, 0.4);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    z-index: 1;
}

/* v7.7 Final Stand: Centering logic moved to inline styles in index.html for PDF capture stability */

.face-markers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 110;
}

.face-marker-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ff4757;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(255, 71, 87, 0.8), 0 0 0 2px white;
    animation: markerPulse 1.5s infinite;
}

@keyframes markerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 68, 68, 0.8);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    pointer-events: auto !important;
}

/* Scanning Animation */
.scanning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(4px);
}

.scanner-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 15px var(--primary);
    animation: scanAnimation 2.5s ease-in-out infinite;
}

@keyframes scanAnimation {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

.scanning-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.scanning-dots {
    display: flex;
    gap: 8px;
}

.scanning-dots .dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

.scanning-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.scanning-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* Face Result Dashboard */
.face-result-dashboard {
    margin-top: var(--spacing-xl);
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dashboard-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.persona-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-split-grid {
    display: grid !important;
    grid-template-columns: 475px 1fr !important;
    /* Enlarged photo area -> Slightly reduced to give 5% more space to right column */
    gap: var(--spacing-lg);
    align-items: stretch;
}

@media (max-width: 1200px) {
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
}

.heatmap-container {
    position: relative;
    display: block;
    border-radius: var(--radius-md);
}

.heatmap-container img#faceFullPreview {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: var(--radius-md);
}

.face-mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: transparent;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --gold: #d4af37;
    --gold-light: #fef3c7;
}

.face-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(99, 102, 241, 0.8) 50%,
            transparent 100%);
    box-shadow: 0 0 15px 2px rgba(99, 102, 241, 0.6);
    z-index: 10;
    pointer-events: none;
    display: none;
    /* Controlled by JS */
}

@keyframes scanLineMove {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Feature Analysis Callouts */
.feature-callout {
    position: absolute;
    z-index: 100;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    max-width: 280px;
}

.feature-callout.side-left {
    flex-direction: row-reverse;
    transform: translateX(-100%) translateY(-50%);
    /* Move box completely to the left of the point */
}

/* Ensure the entrance animation doesn't overwrite the necessary transform */
.feature-callout.side-left[style*="opacity: 1"] {
    transform: translateX(-100%) translateY(-50%) scale(1) !important;
}

.callout-connector {
    width: 100px;
    /* Lengthened to move box away from face */
    height: 2px;
    /* Slightly thicker */
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.callout-connector::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    top: -2px;
    box-shadow: 0 0 10px #fff;
}

.side-left .callout-connector::after {
    right: 0;
    /* Dot on feature (right side of line) */
}

.side-right .callout-connector::after {
    left: 0;
    /* Dot on feature (left side of line) */
}

.callout-box {
    background: rgba(255, 255, 255, 0.25);
    /* Ultra-transparent as requested */
    backdrop-filter: blur(4px);
    /* Reduced blur for better visibility */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    /* Smaller boxes */
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.callout-box:hover {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

.callout-label {
    font-size: 0.8rem;
    /* Smaller font */
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0;
    /* Minimal margin */
    display: flex;
    align-items: center;
    gap: 4px;
}

.callout-status {
    display: none;
    /* Hide status in interactive photo overlay, show in right panel */
}

.callout-status {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.heatmap-legend {
    display: none !important;
    /* Hide redundant legends as requested */
}

.heatmap-legend {
    display: none !important;
    /* Hide redundant legends for cleaner look */
}

.heatmap-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.heatmap-dot {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    opacity: 0.7;
    animation: flowPulse 3s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Move blur to a pseudo-element so the text stays sharp */
.heatmap-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    filter: blur(8px);
    z-index: -1;
}

.marker-label {
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8), 0 0 2px black;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    letter-spacing: -0.5px;
    position: relative;
    top: -2px;
}

/* Five Elements Colors based on Kim Seung-ho's principles */
.heatmap-dot.region-forehead {
    background: radial-gradient(circle, rgba(255, 65, 108, 0.8) 0%, rgba(58, 123, 213, 0.4) 50%, transparent 70%);
}

/* Fire/Wood */
.heatmap-dot.region-nose {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 165, 0, 0.4) 50%, transparent 70%);
}

/* Earth/Gold */
.heatmap-dot.region-cheek {
    background: radial-gradient(circle, rgba(236, 240, 241, 1) 0%, rgba(189, 195, 199, 0.5) 50%, transparent 70%);
}

/* Metal/Silver */
.heatmap-dot.region-mouth {
    background: radial-gradient(circle, rgba(142, 68, 173, 0.8) 0%, rgba(44, 62, 80, 0.6) 50%, transparent 70%);
}

/* Water */

/* Luminosity Peak */
.heatmap-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20%;
    height: 20%;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px 5px white;
    opacity: var(--intensity, 0.5);
}

@keyframes flowPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.9;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}

.horizontal-chart-container {
    width: 100%;
    height: 300px;
}

/* Physiognomy Spectrum Gauge */
.spectrum-section {
    padding: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.spectrum-title {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
}

.spectrum-gauge-wrapper {
    position: relative;
    padding: 10px 10px 25px;
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.spectrum-labels span {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
}

.spectrum-track {
    height: 12px;
    background: linear-gradient(to right, #e2e8f0 0%, #cbd5e1 20%, #6366f1 50%, #fbc531 80%, #ffd700 100%);
    border-radius: 20px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.spectrum-pointer {
    position: absolute;
    top: -5px;
    left: 0%;
    /* Dynamic */
    width: 2px;
    height: 22px;
    background: #000;
    transform: translateX(-50%);
    transition: left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}

.pointer-tip {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #000;
}

.pointer-score {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.pointer-score::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #1e293b;
}

/* Score Section */
.score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.overall-score-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 900;
    text-anchor: middle;
}

.grade-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.4);
    white-space: nowrap;
    animation: bounceIn 1s 0.5s both;
}

/* Radar Chart */
.chart-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radar-chart-wrapper {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

#faceRadarChart {
    width: 100%;
    height: auto;
}

.radar-polygon-bg {
    fill: rgba(0, 0, 0, 0.03);
    stroke: #ddd;
    stroke-width: 0.5;
}

.radar-grid-line {
    stroke: #eee;
    stroke-width: 0.5;
    stroke-dasharray: 2;
}

.radar-value-area {
    fill: rgba(255, 65, 108, 0.3);
    stroke: #ff416c;
    stroke-width: 2.5;
    /* Sharper */
    transition: all 1s ease;
}

.radar-label {
    font-size: 6px;
    fill: var(--text-muted);
    font-weight: 600;
}

.v2-result-main-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #2d3436;
    margin: 40px 0 20px;
}

/* Override Global Styles for Physiognomy */
.highlighted-box {
    background: #fefcbf !important;
    border: 2px dashed #d69e2e !important;
    color: #744210 !important;
}

/* Horizontal Crop Detail Sections (1 line) */
.pdf-palace-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    /* v6.8 Three columns */
    gap: 15px !important;
    margin-top: 15px;
}

.crop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.crop-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.crop-card:hover {
    transform: translateY(-5px);
}

.crop-card canvas {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0, 168, 255, 0.2);
}

.crop-card .crop-label {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.crop-card .crop-note {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.6;
    text-align: center;
}

/* Master's Certificate Refinement (Clean White & Gray) */
.master-certificate-frame {
    margin-top: 40px;
    padding: 1px;
    /* Subtle outer padding for border look */
    background: #e2e8f0;
    /* Gray Border Color */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    border: none;
}

.certificate-inner {
    background: #ffffff;
    border-radius: 11px;
    padding: 24px;
    border: none;
}

.persona-subtitle-v10 {
    color: #4b5563;
    font-size: 0.95rem;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
}

.integrated-conclusion-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    text-align: left;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-top: 1px solid #e2e8f0;
    font-family: 'Pretendard', sans-serif;
}


.special-highlight-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fefcbf;
    color: #744210;
    padding: 18px 30px;
    border-radius: 40px;
    font-weight: 800;
    border: 2px dashed #d69e2e;
    margin: 10px 0 20px;
    font-size: 1.15rem;
    line-height: 1.6;
}

.special-highlight-box i {
    color: #fab005;
    font-size: 1.4rem;
}

.special-highlight-box span {
    font-weight: 800;
    color: #744210;
    font-family: 'Nanum Gothic', sans-serif;
}

.master-conclusion-box {
    margin-bottom: 20px !important;
    border: none !important;
    /* v6.3 Removed dashed border */
    background: linear-gradient(to bottom, #fffbeb, #ffffff) !important;
    border-radius: 18px !important;
    padding: 30px !important;
    color: #744210;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2) !important;
    box-sizing: border-box;
    width: 96% !important;
    /* Slightly wider for live UI */
    margin: 10px auto 20px !important;
}

.master-conclusion-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(214, 158, 46, 0.1) 0%, transparent 70%);
}

.conclusion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #744210;
    font-size: 1.25rem;
    font-weight: 800;
}

.conclusion-text {
    font-size: 0.95rem;
    /* Reduced from 1.1rem */
    line-height: 1.8;
    font-family: 'Nanum Myeongjo', serif;
    color: #5d4037;
}

/* Detailed Analysis Cards (Restored & Refined for v4.0) */
/* 🏰 12 Palaces Card Grid V5 */
.palace-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 992px) {
    .palace-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .palace-cards-grid {
        grid-template-columns: 1fr;
    }
}

.palace-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: all 0.2s;
}

.palace-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.palace-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.palace-card .num-badge {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.palace-card .card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.palace-card .meaning-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    display: block;
}

.palace-card .desc-text {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.palace-card .bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.palace-card .card-bar-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.palace-card .card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* ✨ Improvement Grid V5 */
.improvement-grid-v5 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .improvement-grid-v5 {
        grid-template-columns: 1fr;
    }
}

.improvement-card-v5 {
    background: rgba(99, 102, 241, 0.04);
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.improvement-card-v5:hover {
    background: rgba(99, 102, 241, 0.07);
    border-style: solid;
    transform: translateY(-2px);
}

.improvement-card-v5 .icon {
    font-size: 1.4rem;
    color: var(--primary);
}

.improvement-card-v5 .ititle {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    /* Dark Slate / Blackish */
    margin-bottom: 4px;
}

.improvement-card-v5 .idesc {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}

.improvement-card-v5 .idesc strong {
    color: var(--primary);
}

/* 🎨 Icon Color Variations */
.improvement-card-v5 .icon.c-blue {
    color: #3b82f6;
}

.improvement-card-v5 .icon.c-orange {
    color: #f59e0b;
}

.improvement-card-v5 .icon.c-green {
    color: #10b981;
}

.improvement-card-v5 .icon.c-purple {
    color: #8b5cf6;
}

.improvement-card-v5 .icon.c-pink {
    color: #ec4899;
}

/* 🛡️ Persona & Header Display */
.persona-title-display {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
    text-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
    margin: 10px 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.8s ease backwards;
}

/* 🏰 premium-v4 Split Grid */
.dashboard-split-grid.premium-v4 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
    width: 100% !important;
}

.dashboard-split-grid.premium-v4>div {
    min-width: 0 !important;
    /* Prevents overflow-based widening */
    flex: 1 !important;
}

@media (max-width: 992px) {
    .dashboard-split-grid.premium-v4 {
        grid-template-columns: 1fr !important;
    }
}

.stats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ⚡ Circular Score Gauge V4 */
.circular-score-wrapper-v4 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.circular-gauge-v4 {
    position: relative;
    width: 160px;
    height: 160px;
}

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

.circular-gauge-v4 circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.circular-gauge-v4 .bg {
    stroke: rgba(0, 0, 0, 0.05);
}

.circular-gauge-v4 .fill {
    stroke: var(--primary);
    stroke-dasharray: 282.6;
    stroke-dashoffset: 282.6;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.circular-gauge-v4 .score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.circular-gauge-v4 .score-text span {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
}

.circular-gauge-v4 .score-text small {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
}

/* 📊 Sidebar Energy Indicators */
.sidebar-indicators-grid {
    display: grid;
    gap: 12px;
}

.sidebar-indicator-card {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.sidebar-indicator-card .label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
}

.sidebar-indicator-card .val {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
}

/* 📋 12 Palaces Table-like Layout */
.palaces-table-header {
    display: grid;
    grid-template-columns: 40px 100px 120px 1fr 180px;
    gap: 15px;
    padding: 10px 20px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 10px;
}

.palaces-table-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.palace-row {
    display: grid;
    grid-template-columns: 40px 100px 120px 1fr 180px;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

.palace-row:hover {
    background: #fdfdfd;
    border-color: var(--primary-light);
    transform: scale(1.01);
}

.palace-row .col-num {
    font-weight: 800;
    color: var(--primary);
}

.palace-row .col-palace {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.9rem;
}

.palace-row .col-meaning {
    font-weight: 700;
    color: #64748b;
    font-size: 0.82rem;
}

.palace-row .col-desc {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.palace-row .col-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.palace-row .bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 992px) {
    .palaces-table-header {
        display: none;
    }

    .palace-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* 🏰 12 Palaces System Styles */
.face-detail-grid.palaces-12 {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
}

.palace-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.palace-item:hover {
    transform: translateX(5px);
    background: white;
    border-color: var(--primary);
}

.palace-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.palace-num {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.palace-title-box {
    flex: 1;
}

.palace-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.palace-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.palace-desc {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
    margin: 0;
}

/* Horizontal Bar Chart for Palaces */
.palace-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.palace-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 3px;
    width: 0;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Numbered Markers: Semi-transparent and number-only */
.face-numeric-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    background: rgba(99, 102, 241, 0.45) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    z-index: 1000 !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

@keyframes markerPop {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.face-numeric-marker:hover {
    background: rgba(99, 102, 241, 0.8);
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 31;
}

.marker-label-v4 {
    display: none;
    /* Removed labels from photo */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: translateX(-50%) scale(0.3);
        opacity: 0;
    }

    50% {
        transform: translateX(-50%) scale(1.05);
    }

    70% {
        transform: translateX(-50%) scale(0.9);
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

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

    .crop-grid {
        grid-template-columns: 1fr 1fr;
    }

    .face-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Physiognomy PDF-specific styles (A4 Enforced)
   ========================================== */
.pdf-template-wrapper .face-report-layout {
    display: block !important;
    width: 794px !important;
    min-width: 794px !important;
    margin: 0 auto !important;
    background: white !important;
    padding: 0 !important;
}

.pdf-page.face-page {
    width: 794px !important;
    height: 1123px !important;
    /* A4 Height */
    position: relative !important;
    overflow: hidden !important;
    background: white !important;
    margin: 0 !important;
    padding: 12mm 18mm 12mm 12mm !important;
    /* v5.9 Increased right padding for buffer */
    box-sizing: border-box !important;
}

.pdf-face-dashboard {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #fdfdfd !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 25px !important;
    width: 100% !important;
}

.pdf-score-value {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    color: #d69e2e !important;
}

.pdf-radar-section {
    width: 280px !important;
}

.pdf-radar-wrapper {
    width: 220px !important;
    height: 220px !important;
    margin: 0 auto !important;
}

#face-pdf-radar {
    width: 100% !important;
    height: 100% !important;
}

.pdf-crop-grid-print {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    /* Reduced from 15px */
    width: 100% !important;
}

.pdf-crop-canvas-print {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    border: 1px solid #d69e2e !important;
}

.pdf-crop-item-print {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

.pdf-crop-label {
    color: #0BC5EA !important;
    /* Sky Blue */
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 8px 0 4px 0 !important;
}

.pdf-crop-note {
    font-size: 11px !important;
    color: #4A5568 !important;
    line-height: 1.4 !important;
}

/* Gold Box (v4.7 -> v6.3 Shadow Approach) */
.pdf-gold-box-print {
    background: #fffbeb !important;
    border: none !important;
    /* Removed solid gold border as requested */
    border-radius: 15px !important;
    padding: 20px !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15) !important;
    box-sizing: border-box !important;
    width: 92% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    position: relative !important;
}

/* v5.6 DEAD END for the black vertical line (before element in styles.css) */
.pdf-gold-box-print::before,
.pdf-summary-box-print::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    background: transparent !important;
}

/* Page 1 Split Hero - v4.9 Robust Grid Sync */
.pdf-split-hero-container {
    display: flex !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin-top: 15px !important;
    width: 100% !important;
    align-items: start !important;
}

/* v6.0 12 Palace Grid for PDF */
.pdf-palace-grid-print {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

.pdf-palace-card-v60 {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px !important;
    position: relative !important;
    box-sizing: border-box !important;
}

.pdf-palace-card-v60.gil {
    border-left: 4px solid #4f46e5 !important;
    background: #f5f3ff !important;
    /* Subtle purple tint */
}

.pdf-palace-card-v60.hyung {
    border-left: 4px solid #cbd5e1 !important;
    /* v6.4 Replaced red with neutral gray */
    background: #f8fafc !important;
}

.pdf-palace-card-v60 .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.pdf-palace-card-v60 .palace-num {
    background: #f1f5f9 !important;
    color: #475569 !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.pdf-palace-card-v60 .palace-title {
    font-size: 10pt;
    font-weight: 800;
    color: #1e293b;
    flex: 1;
}

.pdf-palace-card-v60 .num-badge-right {
    font-size: 32pt !important;
    font-weight: 900 !important;
    color: rgba(79, 70, 229, 0.08) !important;
    position: absolute !important;
    right: 5px !important;
    top: -5px !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.pdf-palace-card-v60 .palace-score {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    margin-top: 4px;
}

/* v7.0 Palace Badge Marker */
.palace-badge-marker {
    background: #4f46e5 !important;
    color: #ffffff !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    margin-right: 8px !important;
}

.pdf-palace-card-v60 .palace-desc {
    font-size: 10.5px !important;
    line-height: 1.5 !important;
    color: #475569 !important;
    margin: 0 !important;
}

/* v6.4 Centered Gauge Text for Face PDF */
.pdf-score-box-p1 .gauge-value-print-centered {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.pdf-hero-left,
.pdf-hero-right {
    min-width: 0 !important;
    /* Prevent grid blow-up from large content */
}

.pdf-captured-hero-img {
    width: 100% !important;
    /* CRITICAL: Must constrain the 2x scale capture image */
    height: auto !important;
    display: block !important;
    border-radius: 12px !important;
}

.pdf-main-image-container-v2 {
    width: 100% !important;
    background: #f8fafc !important;
    border-radius: 15px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

.pdf-regional-stack-v3 {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.pdf-regional-card-v3 {
    display: flex !important;
    align-items: center !important;
    background: #fdfdfd !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 10px !important;
    padding: 10px !important;
    gap: 15px !important;
}

.pdf-regional-card-v3 .card-left-v3 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 90px !important;
    flex-shrink: 0 !important;
}

.pdf-regional-card-v3 .card-left-v3 canvas {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    border: 1.5px solid #0BC5EA !important;
}

.pdf-regional-card-v3.no-photo {
    padding: 12px 15px !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.pdf-regional-card-v3.no-photo .label-badge {
    background: #0BC5EA !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.pdf-regional-card-v3 .card-right-v3 p {
    font-size: 12.5px !important;
    color: #2d3748 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Page 2 Energy Dashboard - v4.7 Bars Left, Score Right */
.pdf-energy-dashboard-v3 {
    background: #fdfdfd !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 20px !important;
    padding: 25px !important;
}

.energy-visual-split.v47-bars-score {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 40px !important;
}

.bar-box-v47 {
    flex: 1.2 !important;
    text-align: center !important;
}

.score-box-v47 {
    flex: 1 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.pdf-energy-bars-container-v47 {
    width: 100% !important;
    height: 220px !important;
}

.pdf-captured-bars-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.pdf-spectrum-track-v47 {
    position: relative !important;
    width: 90% !important;
    margin: 40px auto 10px !important;
}

.spectrum-bar-print-v47 {
    height: 14px !important;
    background: linear-gradient(to right, #e2e8f0 0%, #6366f1 50%, #ffd700 100%) !important;
    border-radius: 20px !important;
}

.total-score-badge-v47 {
    position: absolute !important;
    top: -45px !important;
    right: 0 !important;
    background: transparent !important;
    color: #1e293b !important;
    padding: 6px 0 !important;
    font-weight: 900 !important;
    font-size: 2.2rem !important;
    font-family: 'Outfit', sans-serif !important;
    text-shadow: 2px 2px 0px rgba(212, 175, 55, 0.2) !important;
}

/* Page 3 Footer Refinement - v5.1 */
.pdf-v51-footer-combined {
    border-top: 1px solid #edf2f7 !important;
    padding-top: 30px !important;
}

.pdf-v51-slogan-group .slogan-text-v51 {
    font-size: 16pt !important;
    font-weight: 800 !important;
    color: #744210 !important;
    border-bottom: 2.5px solid #d4af37 !important;
    display: inline-block !important;
    padding-bottom: 5px !important;
    margin-bottom: 8px !important;
}

.pdf-v51-slogan-group .site-url-v51 {
    color: #a0aec0 !important;
    font-size: 10pt !important;
    letter-spacing: 1px !important;
}

/* Life Indicators Split Layout */
.pdf-life-indicators-split {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    width: 100% !important;
}

.pdf-analysis-item-v3 {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 15px !important;
    padding: 20px !important;
}

.pdf-analysis-item-v3 .label {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #4a5568 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
}

.pdf-analysis-item-v3 .text {
    font-size: 13.5px !important;
    color: #2d3748 !important;
    line-height: 1.6 !important;
}

/* Spacing for Master Conclusion Section */
#faceMasterConclusionArea {
    margin-top: 40px !important;
    padding-top: 20px !important;
    position: relative !important;
    padding: 25px !important;
    background: #fdfdfd !important;
    border-radius: 15px !important;
    border-left: none !important;
    /* WEB UI: Remove black vertical line */
}

/* Conclusion & Seal */
/* .pdf-final-signature-fixed - Moved to #faceMasterConclusionArea */

.pdf-conclusion-area {
    margin-bottom: 20px !important;
    border: none !important;
    /* Remove border as requested */
    background: linear-gradient(to bottom, #fffbeb, #ffffff) !important;
    /* Subtle yellow gradient */
    border-radius: 18px !important;
    padding: 25px !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15) !important;
    /* Enhanced shadow for depth */
    box-sizing: border-box !important;
    width: 94% !important;
    /* Reduced width to prevent clipping */
    margin-left: auto !important;
    margin-right: auto !important;
}

.pdf-conclusion-area .conclusion-title {
    font-size: 16px !important;
    /* Reduced from 18px */
    color: #1a202c !important;
    margin-bottom: 12px !important;
}

/* Web Result Header Sync */
.face-indicators-header {
    text-align: center !important;
    margin-bottom: 30px !important;
}

.face-indicators-main-title {
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    color: #1a202c !important;
    background: linear-gradient(135deg, #2d3748, #4a5568) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ==========================================
   Compatibility (궁합) Styles
   ========================================== */
/* #compatibilityView background inherited from .view-section */

.compatibility-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 8px;
}

.comp-dual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    align-items: start;
}

.comp-info-panel {
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.comp-info-panel .panel-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 168, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.comp-info-panel .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.comp-info-panel .form-group input,
.comp-info-panel .form-group select {
    width: 100%;
    height: 54px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Match global form-input */
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: #fff;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.comp-info-panel .form-group input:focus,
.comp-info-panel .form-group select:focus {
    border-color: #00d2d3;
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.15);
    outline: none;
}

.comp-info-panel .form-group {
    margin-bottom: 24px;
}

.comp-info-panel .form-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 15px;
}

/* Gender Toggle V2 - Button Style */
.gender-toggle-v2 {
    display: flex;
    gap: 10px;
}

.gender-toggle-v2 input[type="radio"] {
    display: none;
}

.gender-toggle-v2 label {
    flex: 1;
    height: 50px;
    display: grid !important;
    place-items: center !important;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
}

.gender-toggle-v2 input[type="radio"]:checked+label {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(74, 194, 232, 0.3);
}

.comp-upload-zone {
    width: 100%;
    height: 150px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.comp-upload-zone.square {
    aspect-ratio: 1 / 1;
    height: auto;
}

.comp-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 168, 255, 0.05);
}

.comp-upload-zone .upload-placeholder p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.comp-face-upload .upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
}

.pdf-palace-card-v60 .num-badge {
    background: #eef2ff;
    color: #4f46e2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 8pt;
    font-weight: 700;
}

/* v6.7 PDF Bar Styles */
.pdf-bar-section {
    margin-top: 8px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
}

.pdf-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 8pt;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
}

.pdf-bar-bg {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.pdf-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.bonus-badge {
    background: #FF5E5E;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
}

.comp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 8px;
}

.stat-value-bar {
    position: relative;
    height: 24px;
    background: #edf2f7;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #FF7EB3 0%, #FF758C 100%);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.1, 0, 0.3, 1);
}

.stat-value-bar span {
    position: relative;
    z-index: 2;
    margin-left: auto;
    margin-right: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #2d3748;
}

.bed-chemistry-section {
    background: rgba(255, 230, 230, 0.3);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 100, 100, 0.1);
}

.chemistry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.chem-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chem-item .label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 600;
}

.chem-icons {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.bed-humor-comment {
    background: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #2d3748;
    border-left: 4px solid #FF758C;
    line-height: 1.5;
}

.key-matching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.match-keyword-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.match-keyword-card h5 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--primary);
}

.match-keyword-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #4a5568;
}

.comp-summary-hook {
    text-align: center;
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border-bottom: 4px solid #FF758C;
}

.comp-summary-hook .one-liner {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Fix for side-by-side croppers */
.comp-upload-zone .cropper-container {
    height: 100% !important;
    max-width: none !important;
    border-radius: 0;
}

.comp-upload-zone .image-preview-wrapper {
    width: 100%;
    height: 100%;
}

.analysis-action {
    margin-top: 40px;
}

.analysis-action .btn-unified {
    height: 64px;
    font-size: 1.25rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, #00d2d3 100%);
    box-shadow: 0 10px 25px rgba(0, 168, 255, 0.3);
}

.comp-face-upload {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Score Explainer Styling */
.score-explainer {
    text-align: left;
    background: rgba(255, 255, 255, 0.4);
    padding: 12px;
    border-radius: 12px;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
}

.score-explainer .reason {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 4px;
}

.score-explainer .meaning {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.4;
    font-family: 'Nanum Gothic', sans-serif;
}

/* Prescription Area Styling */
.master-prescription-area {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.2);
    /* Saju Gold */
    position: relative;
    overflow: hidden;
}

.master-prescription-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #e8d1a7 100%);
}

.master-prescription-area .section-title {
    text-align: center;
    color: #846a36;
    margin-bottom: 25px;
    font-weight: 800;
}

.prescription-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.prescription-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 16px;
    align-items: flex-start;
    transition: transform 0.3s;
}

.prescription-item:hover {
    transform: scale(1.02);
}

.prescription-item.caution {
    background: #fff5f5;
    border: 1px solid #fed7d7;
}

.prescription-item.tip {
    background: #fffaf0;
    border: 1px solid #feebc8;
}

.prescription-item.lucky {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
}

.prescription-item .icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.prescription-item .content h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 800;
}

.prescription-item.caution h5 {
    color: #c53030;
}

.prescription-item.tip h5 {
    color: #9c4221;
}

.prescription-item.lucky h5 {
    color: #276749;
}

.prescription-item .content p {
    margin: 0;
    font-size: 0.95rem;
    color: #2d3748;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .comp-stats-grid {
        grid-template-columns: 1fr;
    }
}

.comp-summary-hook .face-summary-box {
    color: #4a5568;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 1.6rem;
    /* Increased size */
    font-weight: 800;
    /* Bolded for better contrast */
    color: var(--primary);
    line-height: 1.4;
    max-width: 800px;
    margin: 10px auto;
}

@media (max-width: 768px) {
    .comp-dual-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .compatibility-container {
        padding: 15px;
    }

    .comp-info-panel .form-grid {
        grid-template-columns: 1fr;
    }
}

/* [NEW] Visualization Header: Circular + Radar */
.comp-viz-header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 30px auto;
}

.overall-score-section {
    flex: 1;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radar-viz-section {
    flex: 1.5;
    max-width: 400px;
    /* Reduced half size from 800 */
}

/* Re-styling Score Circle for Compatibility (Mini version) */
.overall-score-circle.mini {
    width: 140px;
    height: 140px;
    position: relative;
}

.overall-score-circle.mini .label {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #4a5568;
    text-align: center;
}

.overall-score-circle.mini .percentage {
    font-size: 0.6rem;
    font-weight: 800;
    fill: #1a202c;
    font-family: var(--font-primary);
}

.overall-score-circle.mini .circle {
    stroke: url(#compScoreGradient);
    /* Apply sky blue gradient */
    stroke-width: 2.8;
}

/* Media Query for mobile viz stacking */
@media (max-width: 768px) {
    .comp-viz-header {
        flex-direction: column;
        padding: 20px;
    }

    .radar-viz-section {
        max-width: 100%;
    }
}

/* Segmented Explanation Text */
.score-explainer .highlight {
    color: var(--primary);
    /* Sky Blue */
    font-weight: 800;
    font-size: 1rem;
    display: block;
    margin-bottom: 6px;
}

.score-explainer .detail {
    color: #2d3748;
    /* Black */
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================
   Compatibility PDF Styles (Printing)
   ========================================== */
.comp-pdf-main-title {
    font-size: 20pt;
    font-weight: 900;
    color: #1a202c;
    margin: 0;
    line-height: 1.3;
}

.comp-pdf-section-title {
    font-size: 14pt;
    font-weight: 800;
    color: var(--primary);
    /* Sky Blue Branding */
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 12px;
    margin-top: 20px;
}

/* Page 1: Dashboard Elements */
.pdf-face-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
}

.pdf-score-circle-section {
    text-align: center;
    width: 30%;
}

.pdf-score-label {
    font-size: 10pt;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 8px;
}

.pdf-score-value.sky-gradient-text {
    font-size: 32pt;
    font-weight: 900;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.pdf-radar-section {
    width: 65%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pdf-radar-wrapper {
    width: 200px;
    height: 200px;
    position: relative;
    /* CRITICAL for SVG sizing in PDF */
}

/* Page 1: Summary Box */
.pdf-summary-box-print {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: none !important;
    /* Override legacy black line from styles.css */
    border-radius: 10px;
    padding: 12px;
    font-size: 9pt;
    /* Reduced from 10pt */
    line-height: 1.6;
    color: #2d3748;
    box-sizing: border-box !important;
    width: 92% !important;
    /* v5.9 Synced to gold box for safety */
    margin: 0 auto;
}

/* Page 2: Detailed Analysis Grid */
.pdf-analysis-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Columns */
    gap: 12px;
}

.pdf-v2-item-print {
    background: white;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 10px;
}

.pdf-item-label {
    font-size: 11pt;
    font-weight: 800;
    color: #ff416c;
    /* Pink-Red Tone */
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-item-content {
    font-size: 9pt;
    color: #4a5568;
    line-height: 1.5;
}

/* Page 2: Bed Chemistry */
.pdf-bed-chemistry-box-print {
    background: #fff5f5;
    /* Light Red/Pink Tint */
    border: 1px solid #feb2b2;
    border-radius: 10px;
    padding: 12px;
}

.pdf-icons-grid-print {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
}

.pdf-humor-text-print {
    font-size: 10pt;
    font-weight: 700;
    color: #c53030;
    /* Red darker */
    text-align: center;
    margin-top: 5px;
}

/* ==========================================
   Compatibility PDF Overhaul Styles
   ========================================== */
.pdf-page.comp-page {
    padding: 50px 60px !important;
    /* increased margins */
    background: #fff;
    min-height: 297mm;
    box-shadow: none;
}

/* Dashboard & Metrics */
.pdf-face-dashboard.enhanced {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
}

.pdf-score-circle-section.large {
    width: 40%;
}

.pdf-score-circle-svg-wrapper {
    width: 220px;
    /* Increased from 180 */
    height: 220px;
    margin: 0 auto;
}

.pdf-circular-chart-svg {
    display: block;
    margin: 10px auto;
    max-width: 100%;
    max-height: 100%;
}

.pdf-circular-chart-svg .circle-bg {
    fill: none;
    stroke: #edf2f7;
    stroke-width: 2.8;
}

.pdf-circular-chart-svg .circle {
    fill: none;
    stroke: #ff416c;
    /* Red-Toned */
    stroke-width: 3.2;
    /* Slightly thicker */
    stroke-linecap: round;
}

.pdf-score-value.pink-gradient-text {
    font-size: 32pt;
    font-weight: 900;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.pdf-circular-chart-svg .percentage {
    fill: #2d3748;
    font-family: var(--font-primary);
    font-size: 8px;
    font-weight: 800;
    text-anchor: middle;
}

.pdf-radar-section.large {
    width: 55%;
}

.pdf-radar-wrapper.large {
    width: 250px;
    /* Increased from 220 */
    height: 250px;
}

/* 2x2 Analysis Grid on Page 1 */
.pdf-analysis-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.pdf-v2-item-print {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.pdf-item-label {
    font-size: 12pt;
    /* Larger */
    font-weight: 800;
    color: #ff416c;
    /* Passionate Red-Tone */
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-item-content {
    font-size: 10pt;
    color: #4a5568;
    line-height: 1.6;
}

/* Bed Chemistry on Page 2 */
.pdf-bed-chemistry-box-print {
    background: #fffafb;
    border: 1px solid #ffe3e3;
    border-radius: 15px;
    padding: 25px;
}

.pdf-icons-grid-print {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.pdf-chem-item-print {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pdf-chem-item-print .label {
    font-size: 10pt;
    font-weight: 700;
    color: #4a5568;
}

.pdf-chem-item-print .icons {
    font-size: 14pt;
    letter-spacing: 2px;
}

/* Prescription Styles */
.pdf-prescription-grid-print {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pdf-prescription-item-print {
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pdf-prescription-item-print.caution {
    background: #fff5f5;
    border-color: #feb2b2;
}

.pdf-prescription-item-print.tip {
    background: #f0fff4;
    border-color: #9ae6b4;
}

.pdf-prescription-item-print.lucky {
    background: #fffaf0;
    border-color: #fbd38d;
}

.pdf-prescription-item-print .label {
    font-size: 10pt;
    font-weight: 800;
    margin-bottom: 8px;
}

.pdf-prescription-item-print .content {
    font-size: 9pt;
    color: #2d3748;
    line-height: 1.5;
}

.pdf-summary-name-highlight {
    color: var(--primary);
    font-weight: 800;
}

/* Eye Line Guide for Face Analysis */
.cropper-view-box {
    position: relative;
}

.eye-line-guide {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 100;
}

.eye-line-guide::before,
.eye-line-guide::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    border-top: 1.5px dashed rgba(74, 194, 232, 0.8);
    top: 50%;
    transform: translateY(-50%);
}

.eye-label {
    background: rgba(74, 194, 232, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    position: absolute;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(74, 194, 232, 0.3);
}

.eye-label.left {
    left: -10px;
}

.eye-label.right {
    right: -10px;
}

/* Heatmap Legend Styling - Hidden for Grid mode */
.heatmap-legend {
    display: none !important;
}

.heatmap-legend {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #edf2f7;
    margin-top: 1rem;
}

.legend-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 12px;
    text-align: center;
}

.legend-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #4a5568;
    background: white;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.dot-preview {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-preview.region-forehead {
    background: #ff416c;
}

.dot-preview.region-nose {
    background: #ffd700;
}

.dot-preview.region-cheek {
    background: #ecf0f1;
    border: 1px solid #ddd;
}

.dot-preview.region-mouth {
    background: #8e44ad;
}

.legend-note {
    font-size: 0.75rem;
    color: #718096;
    text-align: center;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    line-height: 1.5;
}

/* Face Summary Group (v6.1) */
.face-summary-group {
    background: rgba(79, 70, 229, 0.04);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(79, 70, 229, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

#faceComparisonText {
    color: #4f46e5;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    background: white;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
    display: inline-block;
}

#faceAnalysisPointsList {
    width: 100%;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

#faceAnalysisPointsList ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#faceAnalysisPointsList li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

#faceAnalysisPointsList li::before {
    content: '•';
    color: #4f46e5;
    font-weight: 800;
    position: absolute;
    left: 0;
}

#faceAnalysisPointsList strong {
    color: #4f46e5;
    margin-right: 5px;
}

.legend-note strong {
    color: #6366f1;
}

/* High-Level Summaries (Bottom Container) */
.master-summaries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    /* Reduced gap slightly for 2x2 balance */
    margin-top: 20px;
}

.master-summaries-grid.v2x2-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 768px) {
    .master-summaries-grid {
        grid-template-columns: 1fr;
    }
}

.summary-box {
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.summary-header .icon {
    font-size: 1.5rem;
}

.summary-header h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
}

.summary-box p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Improvement Points Section (Web) - v5.0 */
.improvement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.improvement-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.improvement-card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.improvement-card h5 {
    margin: 0;
    font-weight: 800;
    color: #2d3748;
}

.improvement-card p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}

/* PDF Layout Consolidation Styles - v5.0 */
.pdf-life-indicators-full-v50 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

.pdf-improvement-grid-v50 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    margin-top: 20px !important;
}

/* Badge for Energy Indicator Basis (v5.2) */
.badge-soft-gold {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    border: 1px solid #fde68a !important;
    display: inline-block !important;
    margin-top: 4px !important;
}

.pdf-improvement-item-v50 {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
}

.pdf-improvement-item-v50 .header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.pdf-improvement-item-v50 .label {
    font-weight: 800 !important;
    color: #2d3748 !important;
    font-size: 11pt !important;
}

.pdf-improvement-item-v50 .text {
    font-size: 10pt !important;
    color: #4a5568 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

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

.life-hexagon-section {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.life-hexagon-section canvas {
    max-height: 250px;
}

/* Radar Chart Custom Legend */
.radar-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #64748b;
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Palace Card Highlighting */
.palace-card.highlight {
    border: 2px solid var(--primary) !important;
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(251, 197, 49, 0.4) !important;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modern Solution (개운법) Styling v6.0 */
.modern-sol {
    display: block;
    background: rgba(251, 197, 49, 0.1);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #444;
    margin-top: 10px;
    line-height: 1.4;
}

.modern-sol i {
    color: var(--primary);
    margin-right: 5px;
}

/* ==========================================
   Upgraded Iljin (Daily Fortune) Styles
   ========================================== */

/* ==========================================
   Upgraded Iljin (Daily Fortune) Styles
   ========================================== */

.daily-analysis-step {
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s ease backwards;
}

.daily-analysis-step.card-style {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: 100%;
}

.step-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: #000000;
    margin-bottom: var(--spacing-md);
    padding-left: 0;
    border-left: none;
}

/* 2-Column Layout for Daily Analysis */
.daily-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .daily-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Step 1: Total Score Hero */
.total-score-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(74, 194, 232, 0.05) 0%, rgba(0, 210, 211, 0.05) 100%);
    border-radius: var(--radius-lg);
}

.score-circle-display {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(74, 194, 232, 0.2);
    border: 8px solid var(--primary-light);
    transition: all 0.5s ease;
}

.score-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.score-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.score-message-box {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 400px;
    line-height: 1.5;
}

/* Step 2: Golden Time Grid */
.golden-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.golden-time-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}

.golden-time-card:hover {
    transform: translateY(-5px);
}

.golden-time-card.peak {
    background: rgba(251, 197, 49, 0.1);
    border: 1px solid rgba(251, 197, 49, 0.3);
}

.golden-time-card.caution {
    background: rgba(255, 71, 87, 0.05);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.gt-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.gt-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.gt-time {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
}

.gt-advice-box {
    background: rgba(255, 255, 255, 0.5);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px dashed var(--glass-border);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Step 3: Radar Chart */
.radar-chart-container {
    width: 100%;
    height: 320px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Step 4: Lucky Items Cards (New) */
.lucky-items-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.lucky-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.lucky-item-card:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.lic-icon {
    font-size: 1.6rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.lic-info {
    flex: 1;
}

.lic-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.lic-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Step 5: Energy Detail */
.energy-detail-box {
    background: transparent;
}

.energy-bars-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Reduced from 20px */
}

.energy-item .label-row {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 0.85rem;
    /* Reduced from 1rem */
    margin-bottom: 6px;
    /* Reduced from 8px */
    color: var(--text-primary);
}

.energy-item .label-row i {
    color: var(--primary);
    margin-right: 6px;
}

.progress-outer {
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.energy-comment {
    background: rgba(74, 194, 232, 0.08);
    padding: 12px;
    /* Reduced from 16px */
    border-radius: 12px;
    font-weight: 700;
    color: #0c4a6e;
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    border: 1.5px solid rgba(74, 194, 232, 0.2);
    margin-top: 20px;
    /* Reduced from 24px */
}

/* V5: Samjeong (Three Regions) Analysis Styles */
.samjeong-analysis-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    height: 100%;
}

.samjeong-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sam-header {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.sam-score {
    color: var(--primary);
}

.sam-bar-bg {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.sam-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.sam-comment {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.3;
    padding-left: 5px;
}

/* Samjeong Guideline Overlay */
.samjeong-guide-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3), 0 0 2px rgba(0, 0, 0, 0.2);
    z-index: 500;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.line-label {
    position: absolute;
    left: 10px;
    top: -22px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 2px 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 1);
    letter-spacing: -0.02em;
}

.line-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.samjeong-ratio-display {
    position: absolute;
    right: 15px;
    top: 15px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    z-index: 20;
}

.face-pose-warning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.face-pose-warning .warning-box {
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
    animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

/* [NEW] Palace Summary v10.0 (Requirement 4) */
.palace-summary-v10 {
    background: rgba(99, 102, 241, 0.05);
    padding: 12px;
    border-radius: 8px;
}

.palace-summary-v10 .summary-line {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.palace-summary-v10 .badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
}

.badge-s {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-c {
    background: #ef4444;
}

/* [NEW] Palace Rank Badges (Requirement 3) */
.p-rank-badge {
    font-weight: 900;
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rank-s {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.rank-a {
    background: #dcfce7;
    color: #166534;
}

.rank-b {
    background: #f3f4f6;
    color: #374151;
}

.rank-c {
    background: #fee2e2;
    color: #991b1b;
    border: 1px dashed #ef4444;
}

/* Compact Palace List */
.palace-compact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.palace-compact-list.side-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.compact-palace-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.compact-palace-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.p-num-top-right {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    opacity: 0.6;
    background: rgba(100, 116, 139, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.compact-palace-item.gil .p-num-top-right {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.compact-palace-item.hyung .p-num-top-right {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.p-info {
    flex: 1;
}

.p-title-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.p-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.p-score {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
}

.p-desc-short {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-bar-mini {
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
}

.p-bar-mini .p-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

/* Premium Radar Chart V5 */
.hexagon-chart-wrapper-v5 {
    position: relative;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hexagon-chart-wrapper-v5 canvas {
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.2));
}

@media (max-width: 768px) {
    .dashboard-split-grid.premium-v4 {
        grid-template-columns: 1fr;
    }
}

/* --- 12 Palace Grid v8.5 --- */
.palace-grid-v85 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 6px !important;
    /* Narrower gaps, especially vertical */
    width: 100%;
}

.palace-grid-v85 .compact-palace-item {
    background: white;
    padding: 8px 10px !important;
    /* More compact */
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.palace-grid-v85 .compact-palace-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.p-num-inline {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    transform: none !important;
    animation: none !important;
    opacity: 0.8 !important;
    background: rgba(79, 70, 229, 0.4) !important;
    color: white !important;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1) !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: none !important;
    z-index: 10 !important;
}

.palace-grid-v85 .p-info {
    width: 100%;
}

.palace-grid-v85 .p-title-row {
    padding-right: 22px;
    /* Reserve space for number marker */
}

.palace-grid-v85 .p-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    /* Strictly single line */
    overflow: hidden;
    text-overflow: ellipsis;
}

.palace-grid-v85 .p-area-tag {
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 2px;
}

.palace-grid-v85 .p-desc-short {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
    margin-bottom: 4px !important;
    /* Tighter spacing */
    flex-grow: 1;
}

.palace-grid-v85 .p-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.palace-grid-v85 .p-bar-mini {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    flex-grow: 1;
    overflow: hidden;
}

.palace-grid-v85 .p-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* Rank-specific Bar Colors (v11.0) - Celestial Premium Palette */
.p-bar-fill-s {
    background: linear-gradient(90deg, #6366f1, #a855f7) !important;
    /* Indigo to Purple */
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.p-bar-fill-a {
    background: linear-gradient(90deg, #0ea5e9, #2dd4bf) !important;
    /* Blue to Teal */
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.2);
}

.p-bar-fill-b {
    background: #94a3b8 !important;
    /* Muted Slate */
}

.p-bar-fill-c {
    background: #fb7185 !important;
    /* Sophisticated Soft Rose */
}

/* Red */

.palace-grid-v85 .p-score-v2 {
    font-size: 0.8rem;
    font-weight: 800;
    color: #6366f1;
    min-width: 35px;
    text-align: right;
}

@media (max-width: 992px) {
    .palace-grid-v85 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .palace-grid-v85 {
        grid-template-columns: 1fr;
    }
}

/* [NEW] Inner Compatibility v3.1 Bar Colors */
.p-bar-fill-rose, .p-bar-fill-physical {
    background: linear-gradient(90deg, #ff7675, #d63031) !important;
    box-shadow: 0 0 10px rgba(214, 48, 49, 0.3);
}

.p-bar-fill-orange, .p-bar-fill-spark {
    background: linear-gradient(90deg, #fab1a0, #e17055) !important;
    box-shadow: 0 0 10px rgba(225, 112, 85, 0.3);
}

.p-bar-fill-purple, .p-bar-fill-connection {
    background: linear-gradient(90deg, #a29bfe, #6c5ce7) !important;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.p-bar-fill-red, .p-bar-fill-indulgence {
    background: linear-gradient(90deg, #00b894, #006266) !important; 
    /* Designer Choice: Deep Emerald/Teal for Indulgence for a 'Deep Abyss' feel */
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.3);
}

.action-square-card .action-score {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 8px 0;
}

.action-square-card .action-oneline {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.4;
    font-weight: 500;
}