/* analytics.css — 운영 인사이트(#analytics-content) 전용 스타일 */
/* dashboard.css에서 분리. dashboard.css 바로 다음에 link되어 기존 cascade 순서를 유지한다. */
/* === 운영 인사이트 전용 스타일 === */
/* 퓨어·깔끔한 연한 채도 팔레트 (실서비스 수준 통일) */
/* 프로젝트 선택 전: 메인 세로 스크롤 잠금 + 스크롤 힌트 숨김 */
#main-content-area.insight-awaiting-project {
    overflow: hidden !important;
    overscroll-behavior: contain;
}

#main-content-area.insight-awaiting-project .insight-slide-hint,
#main-content-area.insight-awaiting-project .slide-nav-hint,
#main-content-area.insight-awaiting-project .scroll-arrow-down {
    display: none !important;
}

#analytics-content {
    --insight-pastel-mint: rgba(184, 212, 200, 0.85);
    --insight-pastel-sage: rgba(167, 196, 181, 0.9);
    --insight-pastel-lavender: rgba(212, 200, 220, 0.85);
    --insight-pastel-sky: rgba(200, 220, 230, 0.85);
    --insight-pastel-sand: rgba(230, 220, 205, 0.85);
    --insight-pastel-blush: rgba(230, 210, 215, 0.85);
    --insight-accent: rgba(122, 139, 139, 0.5);
    --insight-accent-strong: rgba(109, 152, 134, 0.35);
    --insight-text-muted: #8B9A9A;
    --insight-border: rgba(184, 212, 200, 0.25);
    --insight-shadow: 0 4px 24px rgba(122, 139, 139, 0.06);
    --insight-shadow-hover: 0 12px 40px rgba(122, 139, 139, 0.1);
}

/* 분석 개요 섹션 */
.analytics-overview {
    margin-bottom: 40px;
}

.overview-header {
    text-align: center;
    margin-bottom: 32px;
}

.overview-header h2 {
    font-size: 2em;
    margin-bottom: 8px;
    color: var(--text-primary-color);
    font-weight: 700;
}

.overview-header p {
    color: var(--text-secondary-color);
    font-size: 1.1em;
    margin: 0;
}

.analytics-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.analytics-stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

/* 인사이트 상단 카드 - 슬라이드형 스크롤 애니 */
/* 운영 인사이트 메인 영역 - 슬라이드형 스크롤 애니 */
#analytics-content .content-section.modern-section {
    opacity: 0.15;
    transform: scale(0.97) translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    min-height: calc(100vh - 160px);
    padding-bottom: 72px;
    scroll-margin-top: 120px;
}

#analytics-content .content-section.modern-section.insight-slide-active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

#analytics-content .content-section.modern-section.insight-slide-active .section-header-modern,
#analytics-content .content-section.modern-section.insight-slide-active .charts-grid,
#analytics-content .content-section.modern-section.insight-slide-active .modern-table-container,
#analytics-content .content-section.modern-section.insight-slide-active .artwork-total-view-wrap,
#analytics-content .content-section.modern-section.insight-slide-active .artwork-total-cards-grid {
    animation: insightContentFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.insight-slide-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-size: 0.9em;
    color: var(--insight-text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: insightHintPulse 3s ease-in-out infinite;
}

@keyframes insightHintPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#analytics-content .insight-intro-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
}

#analytics-content .insight-intro-section::before {
    content: '✦';
    position: absolute;
    top: 20%;
    left: 15%;
    font-size: 2em;
    color: var(--insight-accent);
    animation: introFloat1 8s ease-in-out infinite;
    z-index: 0;
}

#analytics-content .insight-intro-section::after {
    content: '✧';
    position: absolute;
    top: 60%;
    left: 75%;
    font-size: 1.5em;
    color: var(--insight-accent);
    animation: introFloat2 10s ease-in-out infinite;
    z-index: 0;
}

/* 인사이트 첫 슬라이드 - 프로젝트 선택 */
.insight-project-select-wrap {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.insight-project-select-title {
    margin: 0 0 36px 0;
    font-size: 1.65em;
    font-weight: 300;
    font-family: 'Noto Serif KR', Georgia, serif;
    color: var(--insight-text-muted, #8B9A9A);
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.5;
}

.insight-project-cards-scroll-outer {
    position: relative;
    max-width: 760px;
    width: 100%;
}

.insight-project-cards-scroll-outer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 56px;
    background: linear-gradient(to right, var(--content-bg, #F5F6F7) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.insight-project-cards-scroll-outer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56px;
    background: linear-gradient(to right, transparent 0%, var(--content-bg, #F5F6F7) 100%);
    pointer-events: none;
    z-index: 2;
}

.insight-project-cards-scroll-wrap {
    position: relative;
    max-width: 760px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    cursor: grab;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 calc(50% - 140px);
}

.insight-project-cards-scroll-wrap.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
}

.insight-project-cards-scroll-wrap.is-dragging .insight-project-card {
    cursor: grabbing;
}

.insight-project-cards-scroll-wrap::-webkit-scrollbar {
    display: none;
}

.insight-project-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    width: max-content;
    padding: 12px calc(50% - 140px) 28px calc(50% - 140px);
}

.insight-project-card {
    appearance: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    min-width: 160px;
    min-height: 70px;
    scroll-snap-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 154, 154, 0.18);
    border-radius: 16px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.85);
    color: #9aabab;
    font-size: 0.85em;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    animation: insightProjectCardEnter 0.5s ease-out forwards;
    opacity: 0;
}

.insight-project-card:hover {
    border-color: rgba(109, 152, 134, 0.4);
    background: #fafbfc;
    box-shadow: 0 6px 20px rgba(109, 152, 134, 0.12);
}

.insight-project-card:focus {
    outline: 2px solid rgba(109, 152, 134, 0.5);
    outline-offset: 2px;
}

.insight-project-card.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: rgba(245, 246, 247, 0.85);
    color: #b5bcbc;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto;
}
.insight-project-card.is-disabled:hover {
    border-color: rgba(139, 154, 154, 0.18);
    background: rgba(245, 246, 247, 0.85);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.insight-project-card.is-disabled .insight-project-card-title {
    font-size: 0.92em;
    color: #8b9999;
    font-weight: 500;
}
.insight-project-card.is-disabled .insight-project-card-note {
    font-size: 0.72em;
    color: #b5bcbc;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.insight-project-card.insight-project-card--main {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    min-height: 110px !important;
    flex-shrink: 0 !important;
    padding: 28px 24px !important;
    font-size: 1.15em !important;
    font-weight: 600 !important;
    color: #3a4a4a !important;
    border-color: rgba(109, 152, 134, 0.5) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9f7 100%) !important;
    box-shadow: 0 10px 32px rgba(109, 152, 134, 0.2) !important;
    z-index: 1;
}

.insight-project-card.insight-project-card--main:hover {
    box-shadow: 0 14px 40px rgba(109, 152, 134, 0.25) !important;
}

.insight-project-card.insight-project-card--main:focus {
    outline: 2px solid rgba(109, 152, 134, 0.6) !important;
    outline-offset: 2px !important;
}


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

.insight-intro-card.insight-intro-card-enter .insight-intro-hello,
.insight-intro-card.insight-intro-card-enter .insight-intro-title {
    animation: introTyping 2s steps(20, end) forwards;
    width: 0;
}

.insight-intro-card.insight-intro-card-enter .insight-intro-title {
    animation: introTyping 2.2s steps(26, end) 2s forwards;
}

.insight-intro-card::before {
    content: '✦';
    position: absolute;
    top: 35%;
    left: 85%;
    font-size: 2.5em;
    color: var(--insight-accent);
    animation: introFloat3 12s ease-in-out infinite;
    z-index: 0;
}

.insight-intro-card::after {
    content: '✧';
    position: absolute;
    top: 75%;
    left: 20%;
    font-size: 1.8em;
    color: var(--insight-accent);
    animation: introFloat4 9s ease-in-out infinite;
    z-index: 0;
}

@keyframes introFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
    25% { transform: translate(30px, -20px) rotate(90deg); opacity: 1; }
    50% { transform: translate(15px, 40px) rotate(180deg); opacity: 0.5; }
    75% { transform: translate(-20px, 10px) rotate(270deg); opacity: 0.8; }
}

@keyframes introFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.5; }
    33% { transform: translate(-40px, 30px) rotate(120deg); opacity: 1; }
    66% { transform: translate(20px, -25px) rotate(240deg); opacity: 0.4; }
}

@keyframes introFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
    40% { transform: translate(-25px, -35px) rotate(144deg); opacity: 0.9; }
    80% { transform: translate(35px, 20px) rotate(288deg); opacity: 0.6; }
}

@keyframes introFloat4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
    50% { transform: translate(40px, -40px) rotate(180deg); opacity: 1; }
}

.insight-intro-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.insight-intro-hello {
    margin: 0 0 32px 0;
    font-size: 4.5em;
    font-weight: 300;
    font-family: 'Noto Serif KR', Georgia, serif;
    background: linear-gradient(135deg, #7A8B8B 0%, #8B9A9A 50%, #6D9886 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    animation: introTyping 2s steps(20, end) forwards;
    width: 0;
}

.insight-intro-title {
    margin: 0;
    font-size: 2.2em;
    font-weight: 300;
    font-family: 'Noto Serif KR', Georgia, serif;
    color: var(--insight-text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    animation: introTyping 2.2s steps(26, end) 2s forwards;
    width: 0;
}

@keyframes introTyping {
    from { 
        width: 0; 
        opacity: 1;
    }
    to { 
        width: 100%; 
        opacity: 1;
    }
}

#analytics-content .charts-grid.two-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: auto;
}

/* 컬렉션별 비교 데이터 분석 - 프로젝트 선택 드롭다운 숨김 */
.analytics-chart-section .compare-exhibition-filter-wrap {
    display: none !important;
}

/* 컬렉션별 인사이트 - 프로젝트/날짜/태그 필터 숨김 */
.analytics-chart-section .artwork-total-filter-wrap {
    display: none !important;
}

/* 컬렉션별 인사이트 - 우상단 안내 문구 */
.artwork-total-hint {
    font-size: 0.85em;
    color: var(--insight-text-muted, #8B9A9A);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* 컬렉션별 전체 데이터 - 인사이트를 테이블 아래로, chart-insight 스타일 통일 */
.analytics-chart-section .chart-insight.artwork-total-insight {
    margin-top: 16px;
}

/* 컬렉션별 전체 데이터 - 헤더 레이아웃 (제목 + 뷰 토글) */
.artwork-total-header.artwork-total-header {
    flex-wrap: wrap;
    gap: 12px;
}
.artwork-total-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.artwork-total-view-toggle {
    display: flex;
    gap: 0;
    background: rgba(184, 212, 200, 0.15);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(184, 212, 200, 0.25);
}
.artwork-total-view-toggle .view-toggle-btn {
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--insight-text-muted, #8B9A9A);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.artwork-total-view-toggle .view-toggle-btn:hover {
    color: #5A6B6B;
    transform: translateY(-1px);
    transition: all 0.3s ease-in-out;
}
.artwork-total-view-toggle .view-toggle-btn.active {
    background: #FFFFFF;
    color: var(--primary-color, #6D9886);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 컬렉션별 전체 데이터 - 뷰 래퍼 */
.artwork-total-view-wrap {
    margin-top: 24px;
}
.artwork-total-section .artwork-total-view-wrap .modern-table-container {
    margin-top: 0;
}
.artwork-total-card-view {
    display: none;
}
.artwork-total-card-view[aria-hidden="false"] {
    display: block;
}

/* 컬렉션별 전체 데이터 - 테이블 뷰 강화 (썸네일, 행 호버) */
#artwork-statistics-body .table-row {
    background: linear-gradient(to right,
        rgba(109, 152, 134, 0.02) 0%,
        rgba(109, 152, 134, 0.04) 18%,
        rgba(109, 152, 134, 0.02) 28%,
        rgba(109, 152, 134, 0.06) 38%,
        rgba(109, 152, 134, 0.03) 48%,
        rgba(109, 152, 134, 0.07) 58%,
        rgba(109, 152, 134, 0.02) 68%,
        rgba(109, 152, 134, 0.05) 78%,
        rgba(109, 152, 134, 0.04) 88%,
        rgba(109, 152, 134, 0.04) 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: left top;
    transition: background-size 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 8px;
}
#artwork-statistics-body .table-row:hover {
    background-size: 100% 100%;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 152, 134, 0.1), 0 2px 6px rgba(0, 0, 0, 0.03);
}
#artwork-statistics-body .artwork-thumbnail.artwork-thumbnail-img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
}
#artwork-statistics-body .artwork-thumbnail.artwork-thumbnail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 컬렉션 한눈에 테이블 - 태그 위치 미세 조정 */
#artwork-statistics-body td.tags-cell .tag-list {
    margin-top: 0px;
}
.tag-more {
    font-size: 0.75em;
    color: var(--insight-text-muted, #8B9A9A);
    margin-left: 4px;
    vertical-align: middle;
}

/* 컬렉션별 전체 데이터 - 카드 뷰 */
.artwork-total-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: 550px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.artwork-total-cards-grid::-webkit-scrollbar {
    display: none;
}
.artwork-total-cards-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--insight-text-muted, #8B9A9A);
    font-size: 0.95em;
}
.artwork-total-card {
    background: #FFFFFF;
    border: 1px solid rgba(184, 212, 200, 0.2);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(122, 139, 139, 0.06);
}
.artwork-total-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(122, 139, 139, 0.12);
    border-color: rgba(109, 152, 134, 0.4);
}
.artwork-total-card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(184, 212, 200, 0.2) 0%, rgba(212, 200, 220, 0.1) 100%);
}
.artwork-total-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.artwork-total-card:hover .artwork-total-card-thumb img {
    transform: scale(1.05);
}
.artwork-total-card-body {
    padding: 16px;
}
.artwork-total-card-title {
    font-size: 1em;
    font-weight: 600;
    color: #5A6B6B;
    margin-bottom: 6px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.artwork-total-card-title:hover {
    color: var(--primary-color, #6D9886);
}
.artwork-total-card-meta {
    font-size: 0.8em;
    color: var(--insight-text-muted, #8B9A9A);
    margin-bottom: 10px;
}
.artwork-total-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

/* 카드 태그 회전 애니메이션용 고정 높이 */
.artwork-total-card-tags.tag-rotating {
    min-height: 28px;
    max-height: 28px;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.artwork-total-card-tags .analytics-tag {
    margin: 0;
}
.artwork-total-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.artwork-total-card-metric {
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(184, 212, 200, 0.1) 0%, rgba(212, 200, 220, 0.06) 100%);
    border-radius: 8px;
    text-align: center;
}
.artwork-total-card-metric .metric-label {
    display: block;
    font-size: 0.7em;
    color: var(--insight-text-muted, #8B9A9A);
    margin-bottom: 2px;
}
.artwork-total-card-metric .metric-val {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary-color);
}

/* 컬렉션별 전체 데이터 - 반응형: 모바일 카드 뷰만 */
@media (max-width: 768px) {
    .artwork-total-view-toggle {
        display: none;
    }
    .artwork-total-view-wrap .artwork-total-table-view {
        display: none !important;
    }
    .artwork-total-view-wrap .artwork-total-card-view {
        display: block !important;
    }
    .artwork-total-view-wrap .artwork-total-card-view[aria-hidden="true"] {
        display: block !important;
    }
    .artwork-total-cards-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }
}

/* 한 프로젝트 내 컬렉션 비교 3개 차트 - 슬라이드에 꽉 차도록 세로 길게 */
.charts-grid.compare-three-charts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 24px;
    margin-top: 24px;
    min-height: 500px;
}

.chart-card.compare-chart-card {
    height: 500px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--insight-border);
    box-shadow: var(--insight-shadow);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card.compare-chart-card:hover {
    box-shadow: var(--insight-shadow-hover);
    border-color: rgba(184, 212, 200, 0.4);
}

.chart-card.compare-chart-card .chart-canvas-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    max-height: 360px;
    overflow: hidden;
}

.chart-card.compare-chart-card .chart-canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 360px !important;
}

.chart-card.compare-chart-card .chart-insight {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(109, 152, 134, 0.08) 0%, rgba(184, 212, 200, 0.05) 100%);
    border-radius: 14px;
    border: 1px solid rgba(184, 212, 200, 0.15);
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .charts-grid.compare-three-charts {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .chart-card.compare-chart-card {
        height: 440px;
        min-height: 440px;
    }
}

/* 컬렉션순위 슬라이드 - 카드 형태 + 좌우 버튼 */
.artwork-ranking-section .artwork-ranking-hint {
    font-size: 0.85em;
    color: var(--insight-text-muted, #8B9A9A);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
/* 태그 트리맵 섹션 - 프로젝트 인기 TOP과 동일 hint 스타일 */
.tag-treemap-section .tag-treemap-hint {
    font-size: 0.85em;
    color: var(--insight-text-muted, #8B9A9A);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.artwork-ranking-slider-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    position: relative;
}
.artwork-ranking-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--insight-border, rgba(184, 212, 200, 0.4));
    background: #FFFFFF;
    color: #5A6B6B;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(122, 139, 139, 0.08);
}
.artwork-ranking-nav:hover {
    background: linear-gradient(135deg, rgba(184, 212, 200, 0.2) 0%, rgba(212, 200, 220, 0.1) 100%);
    border-color: var(--insight-accent-strong, rgba(109, 152, 134, 0.5));
    box-shadow: 0 4px 20px rgba(122, 139, 139, 0.12);
}
.artwork-ranking-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.artwork-ranking-slider {
    flex: 1;
    overflow: hidden;
    min-height: 240px;
}
.artwork-ranking-cards {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.artwork-ranking-card {
    flex: 0 0 65%;
    width: 65%;
    min-width: 0;
    padding: 12px;
    transition: filter 0.35s ease, opacity 0.35s ease;
}
.artwork-ranking-card.artwork-ranking-card-blurred {
    filter: blur(4px);
    opacity: 0.75;
}
.artwork-ranking-card.artwork-ranking-card-current {
    filter: none;
    opacity: 1;
}
.artwork-ranking-card-inner {
    background: #FFFFFF;
    border: 1px solid var(--insight-border);
    box-shadow: var(--insight-shadow);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}
.artwork-ranking-hover-insight {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, rgba(109, 152, 134, 0.96) 0%, rgba(88, 130, 160, 0.94) 50%, rgba(74, 144, 226, 0.92) 100%);
    color: #FFFFFF;
    font-size: 1.12em;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
    z-index: 2;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.artwork-ranking-hover-insight-text {
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.artwork-ranking-hover-insight-text.insight-slide-out,
.insight-panel-cycle-text.insight-slide-out {
    opacity: 0;
    transform: translateY(-6px);
}
.artwork-ranking-hover-insight-text.insight-slide-in,
.insight-panel-cycle-text.insight-slide-in {
    animation: artworkInsightSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.insight-panel-cycle-text {
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
@keyframes artworkInsightSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.artwork-ranking-card-inner:hover .artwork-ranking-hover-insight {
    opacity: 1;
    visibility: visible;
}
.artwork-ranking-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(184, 212, 200, 0.15) 0%, rgba(212, 200, 220, 0.1) 100%);
    flex-shrink: 0;
}
.artwork-ranking-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.artwork-ranking-card-inner:hover {
    box-shadow: var(--insight-shadow-hover);
    border-color: rgba(184, 212, 200, 0.4);
}
.artwork-ranking-card-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(109, 152, 134, 0.2) 0%, rgba(184, 212, 200, 0.15) 100%);
    color: var(--insight-accent-strong, #6D9886);
    font-weight: 700;
    font-size: 1em;
}
.artwork-ranking-card-title {
    margin: 0;
    font-size: 1.08em;
    font-weight: 600;
    color: #5A6B6B;
    letter-spacing: 0.02em;
}
.artwork-ranking-card-meta {
    font-size: 0.85em;
    color: var(--insight-text-muted, #8B9A9A);
}
.artwork-ranking-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.artwork-ranking-metric {
    padding: 8px;
    background: linear-gradient(135deg, rgba(184, 212, 200, 0.1) 0%, rgba(212, 200, 220, 0.06) 100%);
    border-radius: 8px;
    text-align: center;
}
.artwork-ranking-metric-label {
    font-size: 0.7em;
    color: var(--insight-text-muted);
}
.artwork-ranking-metric-value {
    font-size: 0.85em;
    font-weight: 600;
    color: #5A6B6B;
}
.artwork-ranking-indicator {
    margin-top: 8px;
    text-align: center;
    font-size: 0.9em;
    color: var(--insight-text-muted);
}
.artwork-ranking-section .section-header-modern {
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .artwork-ranking-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .artwork-ranking-card-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 통일된 2열 차트 그리드 (상관관계·태그) */
.charts-grid.chart-grid-unified {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 24px;
    min-height: 420px;
}

.chart-card.unified-chart-card {
    height: 420px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #ffffff 0%, rgba(248, 250, 252, 0.98) 50%, rgba(241, 245, 249, 0.95) 100%);
    border: 1px solid rgba(184, 212, 200, 0.32);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(122, 139, 139, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card.unified-chart-card:hover {
    box-shadow: 0 12px 40px rgba(122, 139, 139, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(184, 212, 200, 0.45);
}

.chart-card.unified-chart-card .chart-canvas-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    max-height: 320px;
    overflow: hidden;
}

.chart-card.unified-chart-card .chart-canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 320px !important;
}

/* 상관관계 버블 차트 - Chart.js 기본 툴팁(숫자 말풍선) 숨김, 사이드 패널만 사용 */
.chart-card.unified-chart-card#like-correlation-scatter-container .chartjs-tooltip,
.chart-card.unified-chart-card#like-correlation-scatter-container [id*="chartjs-tooltip"] {
    display: none !important;
}

/* 상관관계 버블 차트 - 레이아웃 (차트 + 사이드 패널) */
.chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-layout {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    gap: 16px;
    margin-top: 14px;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-canvas-wrapper {
    flex: 1 1 auto;
    width: 100%;
    aspect-ratio: 1;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

/* 사이드 패널 */
.chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-side-panel {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    padding: 8px;
    overflow: hidden;
    min-height: 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.95) 100%);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(100, 116, 139, 0.7);
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-placeholder.side-panel-placeholder-visible {
    opacity: 1;
    transform: translateY(0);
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-content {
    display: none;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 0;
    flex: 1;
    justify-content: flex-start;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-content.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 130px;
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-title {
    font-size: 0.98em;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-insight {
    font-size: 0.86em;
    color: #475569;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: keep-all;
    flex-shrink: 0;
    min-height: 0;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .side-panel-ratio {
    font-size: 0.82em;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: keep-all;
    flex-shrink: 0;
    min-height: 0;
}

@media (max-width: 900px) {
    .chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-layout {
        flex-direction: column;
    }
    .chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-side-panel {
        width: 100%;
        min-height: 120px;
    }
}

.chart-card.unified-chart-card#like-correlation-scatter-container .bubble-chart-canvas-wrapper canvas {
    max-height: none !important;
    width: 100% !important;
    height: 100% !important;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .chart-header {
    margin-bottom: 0;
    padding: 10px 12px 10px;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .chart-header h3 {
    font-size: 0.98em;
    color: #5A6B6B;
}

.chart-card.unified-chart-card#like-correlation-scatter-container .chart-insight {
    margin-top: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(109, 152, 134, 0.08) 0%, rgba(184, 212, 200, 0.05) 50%, rgba(200, 220, 230, 0.03) 100%);
    border-radius: 14px;
    border: 1px solid rgba(184, 212, 200, 0.15);
    box-shadow: 0 2px 10px rgba(109, 152, 134, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* 태그 트리맵 (unified 내부) */
.chart-card.unified-chart-card.tag-treemap-chart-card .tag-treemap-canvas-wrapper {
    flex: 1;
    min-height: 320px;
    height: auto;
}

@media (max-width: 1200px) {
    .charts-grid.chart-grid-unified {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .chart-card.unified-chart-card {
        height: 360px;
        min-height: 360px;
    }
}

.analytics-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.analytics-stat-card.primary::before { background: linear-gradient(90deg, rgba(167, 196, 181, 0.9), rgba(184, 212, 200, 0.9)); }
.analytics-stat-card.success::before { background: linear-gradient(90deg, rgba(184, 212, 200, 0.9), rgba(200, 220, 230, 0.9)); }
.analytics-stat-card.info::before { background: linear-gradient(90deg, rgba(200, 220, 230, 0.9), rgba(212, 200, 220, 0.9)); }
.analytics-stat-card.warning::before { background: linear-gradient(90deg, rgba(230, 220, 205, 0.9), rgba(230, 210, 215, 0.9)); }

.analytics-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* 필터 스타일 */
.analytics-filters {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-secondary-color);
}

.modern-select, .modern-input {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-primary-color);
    font-size: 0.9em;
    transition: all 0.3s ease;
    min-width: 140px;
}

.modern-select:focus, .modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109, 152, 134, 0.1);
}

/* 인사이트 박스 */
.insight-box {
    background: linear-gradient(145deg, rgba(109, 152, 134, 0.08) 0%, rgba(184, 212, 200, 0.05) 40%, rgba(212, 200, 220, 0.03) 100%);
    border: 1px solid rgba(184, 212, 200, 0.2);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(109, 152, 134, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.insight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color, #6D9886), rgba(109, 152, 134, 0.15));
    border-radius: 16px 16px 0 0;
}

.insight-box:hover {
    border-color: rgba(109, 152, 134, 0.3);
    box-shadow: 0 6px 24px rgba(109, 152, 134, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.insight-box .insight-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: linear-gradient(135deg, rgba(109, 152, 134, 0.2) 0%, rgba(134, 168, 151, 0.15) 100%);
    color: var(--primary-color, #6D9886);
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(109, 152, 134, 0.12);
}

.insight-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.insight-content {
    color: var(--text-secondary-color);
    line-height: 1.6;
    flex: 1;
}

.insight-content strong {
    color: var(--text-primary-color);
}

/* 현대적인 테이블 스타일 */
.modern-table-container {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(122, 139, 139, 0.06);
    border: 1px solid rgba(184, 212, 200, 0.2);

    overflow-y: auto;
    overflow-x: hidden;
    max-height: 550px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.modern-table-container::-webkit-scrollbar {
    display: none;
}

.modern-data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;

    border-collapse: separate;
}

.modern-data-table thead {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.modern-data-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.9em;
    border-bottom: 2px solid var(--border-color);

    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
}

.th-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-icon {
    font-size: 0.8em;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.sort-icon:hover {
    opacity: 1;
}

.modern-data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.table-row:hover {
    background: rgba(109, 152, 134, 0.02);
}

/* 컬렉션 정보 셀 */
.artwork-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.artwork-thumbnail {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.artwork-details {
    min-width: 0;
}

.artwork-title {
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 4px;
    font-size: 0.95em;
}

/* 컬렉션별 전체 데이터: 컬렉션명 카드와 동일 스타일 (볼드, 색상) */
#artwork-statistics-body .artwork-title {
    font-weight: 600;
    color: #5A6B6B;
}

.artwork-meta {
    color: var(--text-secondary-color);
    font-size: 0.8em;
}

/* 태그 스타일 */
.analytics-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    margin: 2px;
    white-space: nowrap;
    text-align: center;
}

.analytics-tag.small { padding: 2px 5px; font-size: 0.7em; }
.analytics-tag.large { padding: 5px 10px; font-size: 0.85em; }

/* 태그 rotation용 고정 크기 (너비 변동 방지) */
.analytics-tag.tag-size-fixed {
    min-width: 50px;
    max-width: 92px;
    height: 22px;
    line-height: 22px;
    font-size: 0.7em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-tag.modern { background: linear-gradient(135deg, #A5B4FC, #818CF8); }
.analytics-tag.ar { background: linear-gradient(135deg, #A7F3D0, #6EE7B7); }
.analytics-tag.interactive { background: linear-gradient(135deg, #FECACA, #FDBA74); }
.analytics-tag.nature { background: linear-gradient(135deg, #BBF7D0, #86EFAC); }
.analytics-tag.painting { background: linear-gradient(135deg, #E9D5FF, #C4B5FD); }
.analytics-tag.landscape { background: linear-gradient(135deg, #FED7AA, #FDBA74); }
.analytics-tag.tech { background: linear-gradient(135deg, #BFDBFE, #93C5FD); }
.analytics-tag.digital { background: linear-gradient(135deg, #FBCFE8, #F9A8D4); }

/* 태그 rotation 애니메이션 */
.tag-fade-out {
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* 태그 회전 애니메이션용 고정 높이 (너비 변동 방지) */
.tag-list.tag-rotating {
    min-height: 28px;
    max-height: 28px;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* 태그 호버 인사이트 (프로젝트 인기 TOP과 동일 디자인) */
.analytics-tag-wrap {
    position: relative;
    display: inline-block;
}
.analytics-tag-hover-insight {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 280px;
    padding: 14px 18px;
    background: linear-gradient(160deg, rgba(109, 152, 134, 0.96) 0%, rgba(88, 130, 160, 0.94) 50%, rgba(74, 144, 226, 0.92) 100%);
    color: #FFFFFF;
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    pointer-events: none;
}
.analytics-tag-hover-insight::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(88, 130, 160, 0.94);
}
.analytics-tag-hover-insight-text {
    display: block;
    animation: tagInsightSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes tagInsightSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.analytics-tag-wrap:hover .analytics-tag-hover-insight {
    opacity: 1;
    visibility: visible;
}

/* 컬렉션별 전체 데이터: 태그 데이터 볼드 제거 */
#artwork-statistics-body .analytics-tag {
    font-weight: 400;
}

/* 수치 셀 */
.metric-value {
    font-weight: 700;
    color: var(--text-primary-color);
    font-size: 1em;
    margin-bottom: 2px;
}

/* 컬렉션별 전체 데이터: 수치 데이터 볼드 제거, artwork-meta와 동일 채도 */
#artwork-statistics-body .metric-value {
    font-weight: 400;
    color: var(--text-secondary-color);
}

.metric-value.high {
    color: #4CAF50;
}

.metric-trend {
    font-size: 0.8em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
}

.metric-trend.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.metric-trend.negative {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.metric-trend.neutral {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
}

/* 퍼센티지 표시 */
.percentage-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.percentage-value {
    font-weight: 700;
    font-size: 0.95em;
}

.percentage-display.high .percentage-value { color: #4CAF50; }
.percentage-display.medium .percentage-value { color: #FF9800; }
.percentage-display.low .percentage-value { color: #F44336; }

.percentage-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.percentage-display.high .percentage-fill { background: linear-gradient(90deg, #4CAF50, #45a049); }
.percentage-display.medium .percentage-fill { background: linear-gradient(90deg, #FF9800, #F57C00); }
.percentage-display.low .percentage-fill { background: linear-gradient(90deg, #F44336, #D32F2F); }

/* 추천사항 */
.recommendation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
}

.recommendation.excellent {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.recommendation.good {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.recommendation.attention {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.rec-icon {
    font-size: 1em;
}

.rec-text {
    white-space: nowrap;
}

/* 차트 그리드 */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-card canvas {
    flex: 1;
    max-height: 280px !important;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary-color);
}

.chart-period {
    font-size: 0.8em;
    color: var(--text-secondary-color);
    background: rgba(109, 152, 134, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

/* 상관관계 · 태그 트리맵 차트 기간 레이블 스타일 통일 (태그처럼 여백) */
.chart-card.unified-chart-card#like-correlation-scatter-container .chart-period,
.tag-treemap-chart-card .chart-period {
    font-size: 0.8em;
    color: var(--text-secondary-color);
    background: rgba(109, 152, 134, 0.1);
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
    margin: 4px 0;
}

/* 태그 분석 콘텐츠 */
.tag-analytics-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tag-analytics-content::-webkit-scrollbar {
    display: none;
}

/* 태그 순위 트리맵 (2D 격자형) */
.tag-treemap-section {
    margin-top: 32px;
}

.tag-treemap-chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.tag-treemap-chart-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 12px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tag-treemap-chart-card .chart-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #5A6B6B;
}

.tag-treemap-layout {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.tag-treemap-canvas-wrapper {
    flex: 1;
    min-width: 0;
    height: 420px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tag-treemap-grid-bg {
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 10% 10%;
}

.tag-treemap-canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.tag-treemap-chart-card .chart-insight {
    margin-top: 12px;
    padding: 14px 18px;
}

/* 태그 트리맵 - 사이드 패널 (호버 인사이트) */
.tag-treemap-side-panel {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.96) 50%, rgba(226, 232, 240, 0.94) 100%);
    border-radius: 14px;
    border: 1px solid rgba(184, 212, 200, 0.3);
    box-shadow: 0 4px 20px rgba(122, 139, 139, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.tag-treemap-panel-placeholder {
    color: var(--insight-text-muted, #94A3B8);
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-treemap-panel-placeholder.tag-treemap-panel-placeholder-visible {
    opacity: 1;
    transform: translateY(0);
}

.tag-treemap-panel-content {
    display: none;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-treemap-panel-content.tag-treemap-panel-content-visible {
    opacity: 1;
    transform: translateY(0);
}

.tag-treemap-panel-fixed {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tag-treemap-panel-rank {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--primary-color, #6D9886);
    letter-spacing: 0.05em;
}
.tag-treemap-panel-percent {
    font-size: 0.88em;
    font-weight: 700;
    color: #334155;
}
.tag-treemap-panel-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #64748B;
    line-height: 1.35;
}

.tag-treemap-panel-insight {
    font-size: 0.88em;
    color: #475569;
    line-height: 1.6;
    padding-top: 8px;
    border-top: 1px solid rgba(184, 212, 200, 0.25);
    white-space: pre-line;
    word-break: keep-all;
}
.tag-treemap-panel-insight .insight-panel-cycle-text {
    white-space: pre-line;
    word-break: keep-all;
}

@media (max-width: 900px) {
    .tag-treemap-layout {
        flex-direction: column;
    }
    .tag-treemap-side-panel {
        width: 100%;
        min-height: 140px;
    }
}

.tag-metric {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 12px;
}

.tag-metric:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tag-rank {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-number {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    flex-shrink: 0;
}

.tag-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tag-count {
    font-size: 0.85em;
    color: var(--text-secondary-color);
    align-self: flex-end;
}

.tag-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.tag-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* 태그 상세 분석 */
.tag-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.tag-detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-detail-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.tag-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tag-trend {
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.tag-trend.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.tag-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.tag-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-secondary-color);
    font-size: 0.9em;
}

.stat-value {
    color: var(--text-primary-color);
    font-weight: 600;
    font-size: 0.9em;
}

.tag-related {
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.related-label {
    color: var(--text-secondary-color);
    font-size: 0.85em;
    margin-right: 8px;
}

/* ====================================
   컬렉션 상세 모달 - 가로/세로 크기 확대
   ==================================== */
#artwork-detail-modal .modal-container {
    max-width: 1300px;
    width: 95%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    /* ar-content-modal-large의 충돌 animation 제거 */
    animation: none;
    /* 열릴 때 초기 위치: 아래에서 살짝 올라오며 등장 */
    transform: scale(0.96) translateY(24px);
    /* 부드러운 expo-out 곡선으로 전환 */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

#artwork-detail-modal .modal-header {
    flex-shrink: 0;
}

#artwork-detail-modal .modal-body {
    flex: 1;
    min-height: 0;
    max-height: none;
}

#artwork-detail-modal .modal-footer {
    flex-shrink: 0;
}

/* ====================================
   컬렉션 상세 모달 - 열기/닫기 애니메이션 세련화
   ==================================== */

/* 오버레이: expo-out 곡선 + 더 깊은 블러로 몰입감 강화 */
#artwork-detail-modal {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#artwork-detail-modal.show {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 컨테이너: 열림 완료 상태 (아래서 올라와 제자리에 안착) */
#artwork-detail-modal.show .modal-container {
    transform: scale(1) translateY(0);
}

/* 닫기 전용 애니메이션: 아래로 살짝 내려가며 빠르게 페이드아웃 */
#artwork-detail-modal.is-closing {
    animation: artworkOverlayFadeOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}
#artwork-detail-modal.is-closing .modal-container {
    animation: artworkModalSlideOut 0.24s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes artworkModalSlideOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.97) translateY(14px); }
}
@keyframes artworkOverlayFadeOut {
    from { opacity: 1; backdrop-filter: blur(8px); background-color: rgba(0, 0, 0, 0.5); }
    to   { opacity: 0; backdrop-filter: blur(0px); background-color: rgba(0, 0, 0, 0); }
}

/* 작품별 상세데이터 그래프 - 인사이트 색톤 적용 (#5A6B6B, #8B9A9A) */
#artwork-detail-modal .modal-header-text {
    flex: 1;
    min-width: 0;
}
#artwork-detail-modal .modal-title {
    color: #5A6B6B;
}
#artwork-detail-modal .modal-chart-hover-hint {
    margin: 0;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.9em;
    color: #8B9A9A;
    font-weight: 500;
    letter-spacing: 0.02em;
    align-self: center;
}

#artwork-detail-modal .temp-title-group h3 {
    color: #5A6B6B;
}

#artwork-detail-modal .temp-subtitle {
    color: #8B9A9A;
}

#artwork-detail-modal .slide-nav-hint {
    color: #8B9A9A;
}

#artwork-detail-modal .top-chart-card:has(#duration-ratio-chart) .chart-container::before {
    color: #5A6B6B;
}

#artwork-detail-modal .top-chart-card:has(#duration-ratio-chart) .chart-container::after {
    color: #8B9A9A;
}

#artwork-detail-modal .insight-item .insight-text {
    color: #5A6B6B;
}

#artwork-detail-modal .insight-item .insight-text strong {
    color: #5A6B6B;
}

/* 모달 차트 툴팁 - 강화된 디자인 (컨설팅 포함) */
#artwork-detail-modal .chartjs-tooltip {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

.modal-chart-tooltip {
    position: fixed;
    z-index: 10000;
    padding: 14px 18px;
    background: rgba(248, 253, 251, 0.98);
    border: 1px solid rgba(184, 212, 200, 0.3);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(109, 152, 134, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 12px;
    font-weight: 600;
    color: #4a5e5e;
    font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: scale(0.94) translateY(6px);
    transform-origin: top left;
    overflow: visible;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
    width: max-content;
}
.modal-chart-tooltip.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.modal-chart-tooltip .tooltip-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #5A6B6B;
}
.modal-chart-tooltip .tooltip-body {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
    color: #5A6B6B;
    white-space: nowrap;
}
.modal-chart-tooltip .tooltip-footer {
    font-size: 11px;
    color: #5A6B6B;
    padding-top: 8px;
    border-top: 1px solid rgba(184, 212, 200, 0.3);
    white-space: nowrap;
}

/* ====================================
   슬라이드 전환 (PPT 스타일)
   ==================================== */

#artwork-detail-modal .modal-body.modal-slides-container {
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    padding: 24px 48px 24px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#artwork-detail-modal .modal-body.modal-slides-container::-webkit-scrollbar {
    display: none;
}

#artwork-detail-modal .modal-slides-wrapper {
    display: block;
}

.modal-slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: calc(92vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0 32px 0;
    box-sizing: border-box;
    opacity: 0.2;
    transform: scale(0.94) translateY(8px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.modal-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-slide .slide-inner {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.modal-slide-divider .slide-inner {
    text-align: center;
}

.divider-content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.divider-content-center .divider-icon {
    font-size: 4em;
    margin-bottom: 24px;
    animation: dividerIconPulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 6px 16px rgba(122, 139, 139, 0.15));
}

@keyframes dividerIconPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

.divider-content-center .divider-title {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #7A8B8B 0%, #6D9886 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider-content-center .divider-subtitle {
    font-size: 1.1em;
    color: var(--insight-text-muted);
    margin: 0 0 32px 0;
    font-weight: 500;
}

.divider-content-center .scroll-arrow-down {
    font-size: 2.5em;
    color: var(--insight-accent-strong);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(12px); }
}

.divider-content-center.mini .divider-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.divider-content-center.mini .divider-title {
    font-size: 1.6em;
}

/* 인사이트 메인: 테마 전환 구간 - 인트로와 동일한 ✦✧ 떠다니는 배경 */
.insight-theme-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}
.insight-theme-divider::before {
    content: '✦';
    position: absolute;
    top: 20%;
    left: 15%;
    font-size: 2em;
    color: var(--insight-accent);
    animation: introFloat1 8s ease-in-out infinite;
    z-index: 0;
}
.insight-theme-divider::after {
    content: '✧';
    position: absolute;
    top: 60%;
    left: 75%;
    font-size: 1.5em;
    color: var(--insight-accent);
    animation: introFloat2 10s ease-in-out infinite;
    z-index: 0;
}
.insight-theme-divider .insight-divider-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}
.insight-theme-divider .insight-divider-inner::before {
    content: '✦';
    position: absolute;
    top: 35%;
    left: 85%;
    font-size: 2.5em;
    color: var(--insight-accent);
    animation: introFloat3 12s ease-in-out infinite;
    z-index: 0;
}
.insight-theme-divider .insight-divider-inner::after {
    content: '✧';
    position: absolute;
    top: 75%;
    left: 20%;
    font-size: 1.8em;
    color: var(--insight-accent);
    animation: introFloat4 9s ease-in-out infinite;
    z-index: 0;
}
.insight-theme-divider .divider-content-center {
    min-height: 280px;
}
.insight-theme-divider .insight-divider-inner .divider-content-center {
    opacity: 0;
    transform: scale(0.9) translateY(35px);
    filter: blur(3px);
    transition: none;
}
.insight-theme-divider.insight-slide-active .insight-divider-inner .divider-content-center {
    animation: themeDividerSinkIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes themeDividerSinkIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(40px);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.slide-nav-hint {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9em;
    color: #9CA3AF;
    font-weight: 500;
}

/* 슬라이드 인디케이터 (우측) */
.slide-indicators {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
    pointer-events: none;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #D1D5DB;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.slide-dot:hover {
    border-color: rgba(109, 152, 134, 0.5);
    background: rgba(184, 212, 200, 0.4);
}

.slide-dot.active {
    background: rgba(109, 152, 134, 0.6);
    border-color: rgba(109, 152, 134, 0.6);
    transform: scale(1.3);
}

/* ====================================
   상위 3개 차트 - 한 줄 배치
   ==================================== */

.top-three-charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

/* 슬라이드 3번 전용: 2열 레이아웃 */
.top-three-charts.two-column-layout {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 48px;
    margin-bottom: 20px;
}

.top-three-charts.two-column-layout .top-chart-card .chart-container {
    max-height: 450px;
}

#artwork-detail-modal .top-three-charts {
    overflow: visible;
}

#artwork-detail-modal .top-chart-card {
    overflow: visible;
}

.top-chart-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 560px;
}

.top-chart-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.top-chart-card .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 8px;
}

.top-chart-card .chart-header h3 {
    font-size: 1em;
    font-weight: 700;
    color: #5A6B6B;
    margin: 0;
    line-height: 1.4;
}

.top-chart-card .chart-period {
    font-size: 0.75em;
    color: #8B9A9A;
    background: rgba(184, 212, 200, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    font-weight: 600;
}

.top-chart-card .chart-container {
    flex: 1;
    position: relative;
    min-height: 200px;
    max-height: 400px;
    margin-bottom: 12px;
    overflow: hidden;
}

.top-chart-card .chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 컬렉션 상세 모달 슬라이드 1 - 체류시간 도넛 중앙 총 인원수 표시 */
.top-chart-card:has(#duration-ratio-chart) .chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-chart-card:has(#duration-ratio-chart) .chart-container::before {
    content: attr(data-total);
    position: absolute;
    top: 50%;
    left: 66%;
    transform: translate(-50%, -80%);
    font-size: 1.4em;
    font-weight: 800;
    color: #2c3e50;
    pointer-events: none;
    z-index: 1;
}

.top-chart-card:has(#duration-ratio-chart) .chart-container::after {
    content: '회 관람';
    position: absolute;
    top: 50%;
    left: 66%;
    transform: translate(-50%, 25%);
    font-size: 0.95em;
    color: #576574;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.chart-insight {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(145deg, rgba(109, 152, 134, 0.07) 0%, rgba(184, 212, 200, 0.04) 50%, rgba(200, 220, 230, 0.03) 100%);
    border-radius: 14px;
    border: 1px solid rgba(184, 212, 200, 0.15);
    margin-top: auto;
    box-shadow: 0 2px 10px rgba(109, 152, 134, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.chart-insight:hover {
    box-shadow: 0 4px 16px rgba(109, 152, 134, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(184, 212, 200, 0.28);
}

.chart-insight .insight-icon {
    font-size: 1.2em;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    background: linear-gradient(135deg, rgba(109, 152, 134, 0.18) 0%, rgba(134, 168, 151, 0.12) 100%);
    color: var(--primary-color, #6D9886);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 4px rgba(109, 152, 134, 0.08);
}

.chart-insight .insight-text {
    font-size: 0.86em;
    color: #5a7070;
    line-height: 1.55;
    font-weight: 500;
}

/* ====================================
   컬렉션 온도 추이 Showcase (모달용)
   ==================================== */

.temperature-showcase {
    margin-bottom: 32px;
}

.temperature-card.featured {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.temperature-card.featured:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.temperature-card.featured::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
    animation: tempPulse 4s ease-in-out infinite;
}

@keyframes tempPulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-5%, -5%) scale(1.1); opacity: 0.8; }
}

.temp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    gap: 16px;
}

.temp-icon {
    font-size: 3em;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: tempIconFloat 3s ease-in-out infinite;
}

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

.temp-title-group {
    flex: 1;
}

.temp-title-group h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.temp-subtitle {
    font-size: 0.9em;
    color: #6B7280;
    font-weight: 500;
}

.current-temp-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(0, 0, 0, 0.05);
    min-width: 140px;
}

.temp-value {
    font-size: 2.4em;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.temp-status {
    font-size: 0.95em;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
}

.temp-chart-container {
    height: 280px;
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.temp-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.temp-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(145deg, #ffffff, rgba(250, 253, 252, 0.98));
    border-radius: 14px;
    border: 1px solid rgba(184, 212, 200, 0.18);
    box-shadow: 0 2px 12px rgba(109, 152, 134, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.insight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #E5E7EB;
    border-radius: 14px 14px 0 0;
}

.insight-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(109, 152, 134, 0.1);
    border-color: rgba(184, 212, 200, 0.3);
}

.insight-item.hot {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.04) 0%, white 100%);
}
.insight-item.hot::before {
    background: linear-gradient(90deg, #EF4444, rgba(239, 68, 68, 0.2));
}

.insight-item.warm {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.04) 0%, white 100%);
}
.insight-item.warm::before {
    background: linear-gradient(90deg, #F59E0B, rgba(245, 158, 11, 0.2));
}

.insight-item.cool {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.04) 0%, white 100%);
}
.insight-item.cool::before {
    background: linear-gradient(90deg, #3B82F6, rgba(59, 130, 246, 0.2));
}

.insight-icon {
    font-size: 1.5em;
    line-height: 1;
    flex-shrink: 0;
}

.insight-text {
    font-size: 0.95em;
    color: #374151;
    line-height: 1.5;
    font-weight: 500;
}

.insight-text strong {
    font-weight: 700;
    color: #111827;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .top-three-charts {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .top-chart-card .chart-container {
        min-height: 180px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .temperature-card.featured {
        padding: 20px;
    }
    
    .temp-header {
        flex-wrap: wrap;
    }
    
    .current-temp-badge {
        min-width: 100px;
        padding: 12px 16px;
    }
    
    .temp-value {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* 컬렉션 상세 모달 - 모바일에서 전체화면 */
    #artwork-detail-modal .modal-container {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
    }

    .modal-slide {
        min-height: calc(100vh - 140px);
        padding: 20px 0;
    }

    .slide-indicators {
        right: 8px;
    }

    .slide-dot {
        width: 8px;
        height: 8px;
    }

    .divider-content-center .divider-icon {
        font-size: 3em;
    }

    .divider-content-center .divider-title {
        font-size: 1.5em;
    }

    .top-three-charts {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .top-chart-card {
        padding: 16px;
    }
    
    .top-chart-card .chart-header h3 {
        font-size: 0.92em;
    }
    
    .top-chart-card .chart-container {
        min-height: 160px;
    }
    
    .chart-insight {
        padding: 10px 14px;
    }
    
    .chart-insight .insight-text {
        font-size: 0.82em;
    }

    .analytics-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .tag-analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-data-table {
        font-size: 0.85em;
    }
    
    .modern-data-table th,
    .modern-data-table td {
        padding: 12px 8px;
    }
}

/* 다크모드 지원 (미래 확장을 위한 기본 구조) */
@media (prefers-color-scheme: dark) {
    .stat-card, .insight-card, .status-card, .modern-section, .activity-log {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .welcome-section {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* ====================================
   키리 AI 데이터 컨설팅 · 컨설턴트 노트 (12장 내부 페이지네이션)
   ==================================== */

.kiri-consulting-section {
    position: relative;
    padding: 52px 44px 40px;
    background: linear-gradient(165deg, #FBF9F4 0%, #F4F9F7 55%, #EEF6F4 100%);
    border-radius: 20px;
    border: 1px solid rgba(184, 212, 200, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 반투명 유리막: 섹션 진입 시 페이드아웃 (기존 동작 유지) */
.kiri-glass-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(251, 249, 244, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px rgba(184, 212, 200, 0.15);
    pointer-events: auto; /* 로딩 중엔 클릭 차단 */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.55s;
}

/* 데이터 도착 → 오버레이 페이드아웃 */
.kiri-consulting-section.is-data-ready .kiri-glass-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.55s;
}

.kiri-glass-text {
    margin: 0;
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.02em;
    line-height: 1.5;
    text-align: center;
}

/* 로딩 스피너 — 옅은 세이지 톤 */
.kiri-glass-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(109, 152, 134, 0.18);
    border-top-color: #6D9886;
    border-radius: 50%;
    animation: kiriSpinnerRotate 0.9s linear infinite;
}

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

/* 우측 상단 은은한 글로우 (상단 컬러 띠 아님) */
.kiri-consulting-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(109, 152, 134, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── 노트 스테이지 ─────────────────────────────── */
.kiri-note-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
}

/* 상단 브랜드 + 인디케이터 */
.kiri-note-masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.kiri-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.kiri-brand-name {
    margin: 0;
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.kiri-brand-role {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: #8B9A9A;
    letter-spacing: 0.06em;
}

.kiri-note-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.kiri-note-progress-count {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 0.85rem;
    color: #8B9A9A;
    letter-spacing: 0.1em;
}

.kiri-note-dots {
    display: flex;
    gap: 7px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.kiri-note-dots li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(109, 152, 134, 0.22);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.kiri-note-dots li:hover {
    background: rgba(109, 152, 134, 0.45);
}

.kiri-note-dots li.is-active {
    background: #6D9886;
    transform: scale(1.35);
}

/* ── 노트 덱 (12장 절대위치로 겹침) ─────────────── */
.kiri-note-deck {
    position: relative;
    flex: 1;
    min-height: 440px;
}

.kiri-note {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.55s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.kiri-note.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 챕터 라벨 (상단 컬러 스트라이프 아님 — 텍스트 기반 구분) */
.kiri-note-chapter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6D9886;
}

.kiri-note-chapter-num {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-weight: 600;
}

.kiri-note-chapter-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(109, 152, 134, 0.5);
}

.kiri-note-chapter-title {
    color: #8B9A9A;
    letter-spacing: 0.08em;
}

.kiri-note-title {
    margin: 0 0 22px;
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.kiri-note-body {
    font-size: 0.98rem;
    line-height: 1.9;
    color: #4A5568;
    flex: 1;
}

.kiri-note-body-split {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 28px;
    align-items: start;
}

.kiri-note-body-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kiri-note-lede {
    margin: 0 0 18px;
    font-size: 1.08rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.75;
}

.kiri-note-paragraph {
    margin: 0 0 14px;
}

.kiri-note-paragraph:last-child {
    margin-bottom: 0;
}

.kiri-note-paragraph strong,
.kiri-note-lede strong {
    color: #446A58;
    font-weight: 600;
}

.kiri-note-paragraph em,
.kiri-note-lede em {
    font-style: italic;
    color: #446A58;
}

.kiri-note-quote {
    margin: 0;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2c3e50;
}

.kiri-note-quote em {
    font-style: italic;
    color: #446A58;
}

/* 리스트 (블릿 대신 대시) */
.kiri-note-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.kiri-note-list li {
    position: relative;
    padding: 6px 0 6px 22px;
}

.kiri-note-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #6D9886;
    font-weight: 400;
}

.kiri-note-list li em {
    font-style: italic;
    color: #446A58;
}

/* ── 칩 ─────────────────────────────── */
.kiri-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(109, 152, 134, 0.1);
    color: #446A58;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.6;
}

.kiri-chip-accent {
    background: rgba(109, 152, 134, 0.2);
    color: #2c3e50;
    font-weight: 600;
}

.kiri-chip-muted {
    background: rgba(139, 154, 154, 0.14);
    color: #8B9A9A;
}

/* ── 등급 카드 (Chapter 02) ─────────────── */
.kiri-grade-card {
    margin: 0;
    padding: 24px 22px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(167, 196, 181, 0.25), rgba(109, 152, 134, 0.08));
    border: 1px solid rgba(109, 152, 134, 0.2);
    text-align: center;
}

.kiri-grade-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: #6D9886;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.kiri-grade-value {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 3.4rem;
    font-weight: 700;
    color: #446A58;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kiri-grade-score {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 10px;
}

.kiri-grade-score span {
    color: #8B9A9A;
    font-weight: 400;
}

/* ── 통계 바 (Chapter 03) ─────────────── */
.kiri-note-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-radius: 14px;
    background: rgba(184, 212, 200, 0.3);
    border: 1px solid rgba(184, 212, 200, 0.35);
    overflow: hidden;
}

.kiri-note-stats li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 14px;
    background: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.kiri-stat-label {
    font-size: 0.76rem;
    color: #8B9A9A;
    letter-spacing: 0.04em;
}

.kiri-stat-value {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #446A58;
    letter-spacing: -0.01em;
}

/* ── 제안 리스트 (Chapter 08) ─────────────── */
.kiri-note-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kiri-note-suggestions li {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(184, 212, 200, 0.32);
}

.kiri-suggestion-index {
    flex-shrink: 0;
    min-width: 32px;
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #6D9886;
    letter-spacing: 0.02em;
}

.kiri-suggestion-text {
    flex: 1;
}

.kiri-suggestion-head {
    margin: 0 0 4px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.kiri-suggestion-body {
    margin: 0;
    font-size: 0.92rem;
    color: #576574;
    line-height: 1.65;
}

/* ── 태그 그룹 (Chapter 09) ─────────────── */
.kiri-tag-group {
    margin: 0 0 20px;
}

.kiri-tag-group:last-of-type {
    margin-bottom: 14px;
}

.kiri-tag-group-label {
    margin: 0 0 10px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: #8B9A9A;
}

.kiri-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── 타이밍 카드 (Chapter 10) ─────────────── */
.kiri-timing-card {
    margin: 0;
    padding: 22px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(184, 212, 200, 0.32);
    text-align: center;
}

.kiri-timing-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: #6D9886;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.kiri-timing-value {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: #446A58;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

/* peak_hour === '—' 일 때 강조 해제 — 일반 텍스트 톤 */
.kiri-timing-value.is-empty-dash {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 400;
    color: #9aabab;
    letter-spacing: 0;
}

.kiri-timing-note {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: #576574;
    line-height: 1.55;
}

/* ── 편지 (Chapter 11) ─────────────── */
.kiri-note-letter .kiri-note-title {
    color: #2c3e50;
}

.kiri-letter {
    margin: 0;
    padding: 22px 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1.02rem;
    line-height: 2;
    color: #2c3e50;
    font-style: normal;
}

.kiri-letter p {
    margin: 0 0 14px;
}

.kiri-letter p:last-child {
    margin-bottom: 0;
}

.kiri-letter em {
    font-style: italic;
    color: #446A58;
    font-weight: 500;
}

/* ── 서명 ─────────────── */
.kiri-note-signature {
    margin-top: 20px;
    padding-top: 0;
    text-align: right;
}

.kiri-note-sign {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 0.95rem;
    color: #6D9886;
    letter-spacing: 0.02em;
}

/* ── 사인아웃 (Chapter 12) ─────────────── */
.kiri-note-signoff {
    text-align: center;
    justify-content: center;
}

.kiri-note-signoff .kiri-note-chapter,
.kiri-note-signoff .kiri-note-title,
.kiri-note-signoff .kiri-note-body {
    text-align: center;
}

.kiri-note-signoff .kiri-note-chapter {
    justify-content: center;
}

.kiri-signoff-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

/* ── 하단 컨트롤 힌트 ─────────────── */
.kiri-note-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    font-size: 0.82rem;
    color: #8B9A9A;
    letter-spacing: 0.04em;
    min-height: 20px;
}

.kiri-note-hint-prev,
.kiri-note-hint-next {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.kiri-note-hint-prev.is-disabled,
.kiri-note-hint-next.is-disabled {
    opacity: 0;
    visibility: hidden;
}

/* ── 반응형 ─────────────── */
@media (max-width: 768px) {
    .kiri-consulting-section {
        padding: 36px 22px 28px;
    }

    .kiri-glass-text {
        font-size: 1.5rem;
    }

    .kiri-note-masthead {
        margin-bottom: 22px;
    }

    .kiri-note-title {
        font-size: 1.4rem;
        margin-bottom: 18px;
    }

    .kiri-note-lede {
        font-size: 1rem;
    }

    .kiri-note-body {
        font-size: 0.92rem;
        line-height: 1.8;
    }

    .kiri-note-body-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kiri-grade-value {
        font-size: 2.6rem;
    }

    .kiri-note-stats {
        grid-template-columns: 1fr;
    }

    .kiri-note-stats li {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .kiri-timing-value {
        font-size: 1.4rem;
    }

    .kiri-note-deck {
        min-height: 520px;
    }
}

/* ====================================
   키리 노트 마지막 장 · 인라인 "리포트 저장" 버튼
   - .kiri-signoff-actions 안에 배치 (마지막 장 활성화 시에만 노출)
   - 편지 봉투를 살짝 여는 느낌의 둥근 사각 카드
   - 상단 컬러 스트라이프·accent bar 없음
   ==================================== */
.kiri-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 14px 20px;
    border: 1px solid rgba(109, 152, 134, 0.28);
    border-radius: 14px;

    background: linear-gradient(170deg, #FDFBF6 0%, #F3EEDE 100%);
    color: #2F4A3C;
    font-family: 'Noto Serif KR', 'Nanum Myeongjo', serif;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    cursor: pointer;

    box-shadow:
        0 10px 22px rgba(68, 106, 88, 0.12),
        0 3px 8px rgba(68, 106, 88, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(68, 106, 88, 0.05);

    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        border-color 0.25s ease;

    position: relative;
    overflow: hidden;
}



.kiri-report-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(68, 106, 88, 0.42);
    box-shadow:
        0 16px 30px rgba(68, 106, 88, 0.18),
        0 5px 12px rgba(68, 106, 88, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(68, 106, 88, 0.06);
    transition: all 0.3s ease-in-out;
}

.kiri-report-btn:active {
    transform: scale(0.98);
    box-shadow:
        0 8px 18px rgba(68, 106, 88, 0.14),
        0 2px 6px rgba(68, 106, 88, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.kiri-report-btn:focus-visible {
    outline: 2px solid rgba(109, 152, 134, 0.55);
    outline-offset: 3px;
}

.kiri-report-btn-envelope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    color: #446A58;
    flex-shrink: 0;
}

.kiri-report-btn-envelope svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: 50% 100%;
}

/* 호버 시 봉투 상단이 살짝 열리는 느낌 */
.kiri-report-btn:hover .kiri-report-btn-envelope svg {
    transform: translateY(-1px) rotate(-2deg);
}

.kiri-report-btn-text {
    line-height: 1;
    color: #2F4A3C;
}

@media (max-width: 768px) {
    .kiri-report-btn {
        padding: 12px 20px 12px 16px;
        font-size: 0.92rem;
        gap: 10px;
    }

    .kiri-report-btn-envelope {
        width: 28px;
        height: 22px;
    }
}

/* 넓은 화면(줌 아웃, 울트라와이드 등)에서 인사이트 차트 세로를 가로에 비례하여 키움 */
@media (min-aspect-ratio: 5/2) {
    .analytics-chart-section #like-correlation-scatter-container.unified-chart-card {
        min-height: min(42vw, 850px);
        height: min(42vw, 850px);
    }
    .analytics-chart-section .chart-card-full {
        min-height: min(32vw, 650px);
    }
    .analytics-chart-container {
        min-height: min(22vw, 450px);
        max-height: min(34vw, 700px);
    }
    .tag-treemap-canvas-wrapper {
        height: min(32vw, 650px);
    }
    .chart-card.compare-chart-card .chart-canvas-wrapper,
    .chart-card.compare-chart-card .chart-canvas-wrapper canvas {
        max-height: min(28vw, 550px) !important;
    }
    .chart-card.unified-chart-card .chart-canvas-wrapper,
    .chart-card.unified-chart-card .chart-canvas-wrapper canvas {
        max-height: min(26vw, 500px) !important;
    }
    .chart-card.compare-chart-card {
        height: min(32vw, 650px);
        min-height: min(32vw, 650px);
    }
    #analytics-content .content-section.modern-section {
        min-height: min(68vw, calc(100vh - 160px));
    }
}

/* =================================================
 * KIRI의 한마디 콜아웃 — PPT 뷰 (analytics.html) 전용
 * PDF 뷰(report.html)는 기존 .report-callout 을 그대로 재사용.
 * 본문 단락 끝에 들어가 시각적으로 구분되는 처방 박스.
 * ================================================= */
.kiri-tip-callout {
    margin: 18px 0 0;
    padding: 14px 18px 16px;
    border-top: 2px solid #446A58;
    border-bottom: 1px solid rgba(68, 106, 88, 0.18);
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kiri-tip-callout-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    color: #446A58;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.kiri-tip-callout-text {
    font-family: 'Noto Serif KR', Georgia, serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #2C3E50;
    font-weight: 400;
    margin: 0;
}

/* ===== [모션 시스템] 보기 전환 토글 — 선택 팝 ===== */
.artwork-total-view-toggle .view-toggle-btn.active {
    animation: auraBtnPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}