/* CSS Variables - Based on Template */
:root {
    /* Colors */
    --bg-cream: #F8F7F2;
    --bg-dark: #121212;
    --bg-card-white: #FFFFFF;
    --bg-card-purple: #B5A8E0;

    --text-black: #000000;
    --text-dark-gray: #333333;
    --text-gray: #666666;
    --text-light-gray: #999999;
    --text-white: #FFFFFF;

    --accent-purple: #B5A8E0;
    --accent-purple-deep: #6B5BB5;
    --bg-purple-soft: #EDEAF8;
    --accent-green: #10b981;
    --accent-red: #ef4444;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;

    /* Typography */
    --font-main: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* 启用流畅缩放 */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== LAYOUT - 3 COLUMNS ========== */
body {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    height: 100vh;
    overflow: hidden;
    /* 确保页面能够平滑缩放 */
    min-width: 1024px;
    width: 100%;
}

/* Left Column - Date Navigation (25%) */
.left-column {
    background: var(--bg-cream);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    height: 100vh;
    overflow-y: auto;
    min-width: 0;
    max-width: 100%;
    position: sticky;
    top: 0;
}

/* 确保左侧栏标题始终完整显示 */
.left-column .nav-header {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

.left-column .nav-title {
    flex: 1 1 auto;
    min-width: 60px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* Middle Column - News Content (50%) */
.middle-column {
    background: var(--bg-cream);
    height: 100vh;
    overflow-y: auto;
}

/* Right Column - Sidebar (25%) */
.right-column {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: var(--spacing-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    height: 100vh;
}

/* ========== LEFT COLUMN - DATE NAVIGATION ========== */
.date-navigation {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: var(--bg-cream);
    z-index: 10;
    gap: 4px;
    min-width: 0;
}

.nav-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-black);
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    overflow: visible;
    white-space: nowrap;
    line-height: 1.2;
    padding: 0 4px;
}

/* 按钮可以灵活缩小 */
.nav-toggle-btn,
.nav-home,
.nav-back,
.nav-menu {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    min-width: 24px;
    max-width: 100px;
    overflow: hidden;
    padding: 4px;
}

.nav-toggle-btn {
    max-width: 80px;
}

/* 按钮内容自适应 */
.nav-toggle-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    display: inline-block;
}

.nav-toggle-btn svg,
.nav-home svg {
    flex-shrink: 1;
    max-width: 22px;
    max-height: 22px;
}

.nav-header > div {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.nav-back,
.nav-menu {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-black);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.nav-home {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-purple);
    border: 1px solid var(--accent-purple);
    color: var(--text-black);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 32px;
}

.nav-home svg {
    flex-shrink: 0;
    display: block;
}

.nav-home:hover {
    background: linear-gradient(135deg, #B5A8E0 0%, #9B8ED4 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(181, 168, 224, 0.4);
}

.nav-toggle-btn {
    height: 36px;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg-card-purple);
    border: 1px solid var(--accent-purple);
    color: var(--text-black);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    flex-shrink: 1;
    min-width: 36px;
    max-width: 100px;
}

.nav-toggle-btn svg,
.nav-home svg {
    flex-shrink: 0;
    display: block;
    width: 22px;
    height: 22px;
}

.nav-toggle-btn:hover {
    background: linear-gradient(135deg, #B5A8E0 0%, #9B8ED4 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(181, 168, 224, 0.4);
}

.nav-back:hover,
.nav-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

.date-list {
    padding: var(--spacing-md);
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
    opacity: 1;
    transform: translateX(0);
}

.date-list.view-hidden {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.category-list {
    padding: var(--spacing-md);
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
    opacity: 1;
    transform: translateX(0);
}

.category-list.view-hidden {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

/* 分类视图中的子分类项样式 */
#categoryListView .date-row[data-category] {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 4px;
    position: relative;
}

#categoryListView .date-row[data-category]:hover {
    background: rgba(0,0,0,0.04);
    transform: translateX(4px);
}

#categoryListView .date-row[data-category].active {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#categoryListView .date-row[data-category].active .date-weekday,
#categoryListView .date-row[data-category].active .date-count {
    color: #fff;
}

#categoryListView .date-row[data-category] .date-number {
    display: none;
}

#categoryListView .date-row[data-category] .date-weekday {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

#categoryListView .date-row[data-category] .date-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(0,0,0,0.06);
    border-radius: 12px;
    min-width: 40px;
    text-align: center;
}

#categoryListView .date-row[data-category].active .date-count {
    background: rgba(255,255,255,0.2);
}

/* 分类指示器 */
#categoryListView .date-row[data-category]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: currentColor;
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

#categoryListView .date-row[data-category].active::before {
    height: 20px;
}

/* 全部新闻项保持原样 */
#categoryListView .date-row[data-category="all"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: var(--spacing-md);
    flex-wrap: nowrap;
    min-height: 48px;
    transition: all 0.3s ease;
}

#categoryListView .date-row[data-category="all"] .date-number {
    display: flex;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

#categoryListView .date-row[data-category="all"] .date-weekday {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

#categoryListView .date-row[data-category="all"] .date-count {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* 小屏幕时缩小"全部新闻"按钮 */
@media (max-width: 1200px) {
    #categoryListView .date-row[data-category="all"] {
        gap: 6px;
        padding: 8px 10px;
        min-height: 40px;
    }

    #categoryListView .date-row[data-category="all"] .date-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    #categoryListView .date-row[data-category="all"] .date-weekday {
        font-size: 0.8rem;
    }

    #categoryListView .date-row[data-category="all"] .date-count {
        font-size: 0.7rem;
        padding: 3px 8px;
        min-width: 32px;
    }

    /* 调整赞助商部分 */
    .ad-banner {
        padding: 36px 22px;
        min-height: 180px;
    }

    .ad-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
    }

    .ad-content {
        padding: 16px 0 0 0;
    }

    .ad-title {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-sm);
    }

    .ad-description {
        font-size: 0.875rem;
        margin-bottom: var(--spacing-md);
        word-wrap: break-word;
    }

    .ad-button {
        padding: 9px 18px;
        font-size: 0.85rem;
        min-width: 75px;
    }
}

@media (max-width: 768px) {
    #categoryListView .date-row[data-category="all"] {
        gap: 4px;
        padding: 6px 8px;
        min-height: 36px;
    }

    #categoryListView .date-row[data-category="all"] .date-number {
        width: 24px;
        height: 24px;
        font-size: 0.625rem;
    }

    #categoryListView .date-row[data-category="all"] .date-weekday {
        font-size: 0.75rem;
    }

    #categoryListView .date-row[data-category="all"] .date-count {
        font-size: 0.65rem;
        padding: 2px 6px;
        min-width: 28px;
    }

    /* 调整赞助商部分 */
    .ad-banner {
        padding: 32px 20px;
        min-height: 170px;
    }

    .ad-badge {
        top: 9px;
        right: 9px;
        padding: 4px 8px;
    }

    .ad-content {
        padding: 14px 0 0 0;
    }

    .ad-title {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-sm);
    }

    .ad-description {
        font-size: 0.8125rem;
        margin-bottom: var(--spacing-md);
        word-wrap: break-word;
    }

    .ad-button {
        padding: 8px 16px;
        font-size: 0.8rem;
        min-width: 70px;
    }
}

.month-group {
    margin-bottom: var(--spacing-xl);
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-radius: var(--radius-md);
}

.month-header:hover {
    background: rgba(0, 0, 0, 0.05);
}

.month-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-black);
}

.month-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.month-count {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.month-chevron {
    transition: transform 0.3s ease;
    color: var(--text-gray);
}

.month-group.collapsed .month-chevron {
    transform: rotate(-90deg);
}

.date-rows {
    display: flex;
    flex-direction: column;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.month-group.collapsed .date-rows {
    max-height: 0;
    opacity: 0;
}

.date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--bg-card-white);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-row:hover {
    background: var(--bg-card-purple);
    transform: translateX(4px);
}

.date-row.active {
    background: var(--text-black);
    color: var(--text-white);
}

.date-row.active .date-weekday,
.date-row.active .date-count {
    color: rgba(255, 255, 255, 0.7);
}

.date-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-black);
}

.date-row.active .date-number {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.date-weekday {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-gray);
    text-align: center;
}

.date-count {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ========== MIDDLE COLUMN - NEWS CONTENT ========== */
.main-content {
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.date-header {
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.date-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-black);
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

.date-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.article-count {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

.weekday {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* News Articles */
.news-articles {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.news-loading-state {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text-gray);
}

.news-loading-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--text-black);
    border-radius: 50%;
    animation: newsLoadingSpin 0.8s linear infinite;
}

.news-loading-text {
    font-size: 0.9rem;
    font-weight: 500;
}

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

.news-card {
    position: relative;
    background: var(--bg-card-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.news-card:hover {
    border-color: rgba(181, 168, 224, 0.45);
    box-shadow: 0 6px 20px -10px rgba(70, 56, 120, 0.25);
    transform: translateY(-1px);
}

.news-card.highlight {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0% {
        border-color: rgba(181, 168, 224, 0.55);
        box-shadow: 0 0 0 0 rgba(181, 168, 224, 0);
    }
    30% {
        border-color: rgba(181, 168, 224, 0.9);
        box-shadow: 0 0 0 8px rgba(181, 168, 224, 0.4);
        transform: scale(1.01);
    }
    100% {
        border-color: rgba(0, 0, 0, 0.06);
        box-shadow: 0 0 0 0 rgba(181, 168, 224, 0);
    }
}


.news-tags {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.news-tags .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark-gray);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease;
}

.news-tags .tag:hover {
    transform: translateY(-1px);
}

.news-tags .dot {
    display: none; /* 隐藏点分隔符，因为现在只有一个标签 */
}

.news-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Source link icon appended to the title */
.news-title-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    color: var(--text-light-gray);
    vertical-align: middle;
    transition: color 0.15s ease, transform 0.15s ease;
}

.news-title-link:hover {
    color: #7C6FCB;
    transform: translateY(-1px);
}

.news-description {
    font-size: 0.9375rem;
    color: var(--text-dark-gray);
    line-height: 1.8;
    margin-bottom: 0;
}

/* 支持分段显示的优化 */
.news-description br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

/* 新闻配图：小尺寸缩略图，不占满整张卡片 */
.news-image-wrap {
    margin-top: var(--spacing-md);
}

.news-image {
    display: block;
    max-width: 280px;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md, 10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* .news-meta / .time retained for the legacy category-view renderer */
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.time {
    font-size: 0.875rem;
    color: var(--text-gray);
    white-space: nowrap;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--accent-purple);
    color: var(--text-black);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.read-more:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.4);
    background: #B5A8E0;
    text-decoration: none;
}

.read-more:visited {
    color: var(--text-black);
    text-decoration: none;
}

/* ========== RIGHT COLUMN - SIDEBAR ========== */

/* Search Section */
.search-section {
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.search-icon {
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 0.875rem;
    font-family: var(--font-main);
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.search-result-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--spacing-xs);
}

.search-result-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Panel Section */
.panel-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: 4px;
}

/* 播客列表区域 - 独立滚动 */
.panel-section.podcast-section {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

/* 移动端播客区域默认隐藏 */
.mobile-podcast-section {
    display: none;
}

.panel-section.podcast-section .section-title {
    flex-shrink: 0;
}

.panel-section.podcast-section .podcast-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: 350px;
}

/* 播客列表滚动条样式 */
.podcast-list::-webkit-scrollbar {
    width: 6px;
}

.podcast-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 4px 0;
}

.podcast-list::-webkit-scrollbar-thumb {
    background: rgba(181, 168, 224, 0.6);
    border-radius: 3px;
}

.podcast-list::-webkit-scrollbar-thumb:hover {
    background: rgba(181, 168, 224, 0.8);
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Podcast List */
.podcast-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    /* 滚动样式由 .podcast-section 控制 */
}

.podcast-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.podcast-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.podcast-cover-small {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    overflow: hidden;
    background: transparent;
    display: block;
    padding: 0;
    margin: 0;
    line-height: 0;
    clip-path: inset(1px 2px 2px 1px round 8px);
}

.podcast-cover-small img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    object-position: center;
    display: block;
    padding: 0;
    margin: -2px -3px -3px -2px;
    border: none;
    box-shadow: none;
    filter: none;
}

.podcast-cover-small svg {
    width: 24px;
    height: 24px;
    display: block;
    color: #B5A8E0;
}

.podcast-info {
    flex: 1;
    min-width: 0;
}

.podcast-episode {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 2px;
}

.podcast-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

/* 标题内部容器 */
.podcast-title-inner {
    display: inline-block;
    white-space: nowrap;
}

/* 滚动状态 - 保持overflow: hidden，让文本在内部滚动 */
.podcast-title.scrolling {
    overflow: hidden !important;
    text-overflow: clip !important;
}

.podcast-title.scrolling .podcast-title-inner {
    animation: scrollLeftOnce var(--animation-duration, 10s) linear forwards;
    animation-delay: 0.1s;
}

@keyframes scrollLeftOnce {
    0% {
        transform: translateX(0);
    }
    1% {
        transform: translateX(0); /* 延迟0.1秒开始移动 */
    }
    100% {
        /* 使用JavaScript动态计算的滚动距离，确保显示完整标题 */
        transform: translateX(var(--scroll-distance, -100%));
    }
}

.podcast-plays,
.podcast-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: none; /* 隐藏播放量和日期 */
}

.podcast-play-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-purple);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.podcast-play-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* System Alert */

/* Advertisement Banner */
.ad-banner {
    background: linear-gradient(135deg, rgba(181, 168, 224, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(181, 168, 224, 0.3);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    background: rgba(181, 168, 224, 0.2);
    border-radius: 4px;
    z-index: 2;
    transition: all 0.3s ease;
}

.ad-content {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 20px 0 0 0;
    transition: all 0.3s ease;
}

.ad-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    word-wrap: break-word;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.ad-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--spacing-lg);
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: normal;
    transition: all 0.3s ease;
    font-weight: 400;
}

.ad-button {
    background: var(--accent-purple);
    color: var(--text-black);
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 80px;
    white-space: nowrap;
    display: inline-block;
}

.ad-button:hover {
    background: #9B8ED4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.4);
    transition: all 0.2s ease;
}

/* Social Media Links */
.social-section {
    margin-top: auto;
    margin-bottom: 0;
}

.social-section .section-title {
    margin-bottom: 4px;
}

.social-links {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.4);
}

.social-link img {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    mix-blend-mode: multiply;
    padding: 0;
}

/* Podcast Note */
.podcast-note {
    margin-top: 0;
    padding: var(--spacing-xs);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ========== SCROLLBAR ========== */
.left-column::-webkit-scrollbar,
.middle-column::-webkit-scrollbar {
    width: 6px;
}

.left-column::-webkit-scrollbar-track,
.middle-column::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

.left-column::-webkit-scrollbar-thumb,
.middle-column::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.left-column::-webkit-scrollbar-thumb:hover,
.middle-column::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ========== RESPONSIVE ========== */

/* 超大屏幕优化 (1920px+) */
@media (min-width: 1920px) {
    body {
        grid-template-columns: 320px 1fr 360px;
    }

    .main-content {
        max-width: 1600px;
    }

    .ai-modal-container {
        max-width: 1200px;
    }

    .nav-title {
        font-size: 1.3125rem;
        min-width: 110px;
    }

    .date-title {
        font-size: 2.75rem;
    }

    .news-title {
        font-size: 1.875rem;
    }

    .news-description {
        font-size: 1.125rem;
    }
}

/* 大屏幕优化 (1600px - 1920px) */
@media (max-width: 1920px) {
    .nav-title {
        font-size: 1.0625rem;
    }
}

/* 中等屏幕优化 (1400px - 1600px) */
@media (max-width: 1600px) {
    body {
        grid-template-columns: 260px 1fr 300px;
    }

    .nav-title {
        font-size: 1rem;
        padding: 0 2px;
    }

    .nav-toggle-btn,
    .nav-home {
        min-width: 30px;
        padding: 0 8px;
    }

    .date-title {
        font-size: 1.75rem;
    }

    .nav-title {
        font-size: 1rem;
        padding: 0 2px;
    }

    .nav-toggle-btn,
    .nav-home {
        min-width: 30px;
        padding: 0 8px;
    }
}

/* 小屏幕优化 (1200px - 1400px) */
@media (max-width: 1400px) {
    body {
        grid-template-columns: 240px 1fr 280px;
    }

    .date-title {
        font-size: 1.875rem;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .news-description {
        font-size: 1rem;
    }

    .nav-title {
        font-size: 0.9375rem;
        padding: 0 2px;
    }

    .nav-toggle-btn span {
        font-size: 0.6875rem;
    }
}

/* 平板横屏 (1024px - 1200px) */
@media (max-width: 1200px) {
    body {
        grid-template-columns: 220px 1fr 260px;
    }

    .main-content {
        max-width: 1000px;
    }

    .date-title {
        font-size: 1.75rem;
    }

    .news-title {
        font-size: 1.4375rem;
    }

    .news-description {
        font-size: 0.9375rem;
    }

    .nav-title {
        font-size: 0.875rem;
        padding: 0 1px;
    }

    .nav-header {
        padding: var(--spacing-md);
        gap: 2px;
    }

    .nav-toggle-btn,
    .nav-home {
        min-width: 28px;
    }

    .nav-toggle-btn span {
        display: none;
    }
}

/* 平板竖屏 (900px - 1024px) */
@media (max-width: 768px) {
    body {
        grid-template-columns: 200px 1fr 260px;
    }

    .main-content {
        max-width: 100%;
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    .date-title {
        font-size: 1.625rem;
    }

    .news-title {
        font-size: 1.3125rem;
    }

    .news-description {
        font-size: 0.875rem;
    }

    .ai-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .nav-title {
        font-size: 0.8125rem;
        padding: 0 1px;
    }

    .nav-header {
        padding: var(--spacing-sm);
        gap: 2px;
    }

    .nav-toggle-btn,
    .nav-home {
        min-width: 26px;
    }

    .nav-toggle-btn span {
        display: none;
    }
}

/* Mobile layout boundary */
@media (max-width: 768px) {
    body {
        grid-template-columns: 180px 1fr 240px;
    }

    .date-title {
        font-size: 1.375rem;
    }

    .news-title {
        font-size: 1.125rem;
    }

    .nav-title {
        font-size: 1rem;
        min-width: 70px;
    }

    .nav-header {
        padding: var(--spacing-md);
        gap: var(--spacing-xs);
    }

    .nav-toggle-btn {
        min-width: 34px;
        max-width: 80px;
    }

    .nav-home {
        min-width: 34px;
    }

    .nav-toggle-btn span {
        display: none;
    }

    /* 确保播客区域在较小屏幕也能正常显示 */
    .podcast-section {
        max-height: 350px;
    }

    .podcast-list {
        max-height: 300px;
    }

    /* 调整赞助商部分 */
    .ad-banner {
        padding: 28px 18px;
        min-height: 160px;
    }

    .ad-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 0.6875rem;
    }

    .ad-content {
        padding: 12px 0 0 0;
    }

    .ad-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    .ad-description {
        font-size: 0.75rem;
        margin-bottom: var(--spacing-sm);
        line-height: 1.3;
        word-wrap: break-word;
    }

    .ad-button {
        padding: 7px 14px;
        font-size: 0.75rem;
        min-width: 65px;
    }
}

/* 手机竖屏 (最大768px) */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }

    .left-column {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .left-column.open {
        transform: translateX(0);
    }

    .right-column {
        display: none;
    }

    /* 移动端赞助商样式（如果需要显示） */
    .mobile-podcast-section .ad-banner {
        padding: 32px 20px;
        min-height: 180px;
    }

    .mobile-podcast-section .ad-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
    }

    .mobile-podcast-section .ad-content {
        padding: 16px 0 0 0;
    }

    .mobile-podcast-section .ad-title {
        font-size: 1.25rem;
        margin-bottom: var(--spacing-sm);
        font-weight: 700;
    }

    .mobile-podcast-section .ad-description {
        font-size: 0.9375rem;
        margin-bottom: var(--spacing-md);
        word-wrap: break-word;
    }

    .mobile-podcast-section .ad-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        font-weight: 600;
        min-width: 80px;
    }

    /* 移动端显示播客区域 */
    .mobile-podcast-section {
        display: block !important;
        margin-top: var(--spacing-xl);
        padding: var(--spacing-lg);
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius-lg);
    }

    /* 移动端播客区域样式 */
    .mobile-podcast-section .panel-section {
        max-height: none;
    }

    .mobile-podcast-section .podcast-list {
        max-height: 400px;
    }

    .mobile-podcast-section .section-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }

    .middle-column {
        padding: var(--spacing-lg);
    }

    /* 移动端播客区域样式 */
    .mobile-podcast-section .podcast-section {
        max-height: none;
    }

    .mobile-podcast-section .podcast-list {
        max-height: 400px;
    }

    .main-content {
        padding: var(--spacing-lg);
    }

    .date-title {
        font-size: 1.5rem;
    }

    .news-title {
        font-size: 1.25rem;
    }

    .news-description {
        font-size: 0.9375rem;
    }

    /* 在移动端，左侧栏标题需要特别处理 */
    .left-column .nav-title {
        font-size: 1rem;
        min-width: 80px;
    }

    .left-column .nav-toggle-btn {
        min-width: 36px;
    }

    .left-column .nav-home {
        min-width: 36px;
    }
}

/* 小屏手机 (最大480px) */
@media (max-width: 480px) {
    .main-content {
        padding: var(--spacing-md);
    }

    .date-title {
        font-size: 1.25rem;
    }

    .news-title {
        font-size: 1.125rem;
    }

    .news-card {
        padding: var(--spacing-md);
    }

    .news-description {
        font-size: 0.875rem;
    }

    .nav-header {
        padding: var(--spacing-xs);
        gap: 2px;
    }

    .nav-title {
        font-size: 0.75rem;
        padding: 0 1px;
    }

    .nav-toggle-btn,
    .nav-home {
        width: 28px;
        height: 28px;
        padding: 0;
        min-width: 24px;
    }

    .nav-toggle-btn span {
        display: none;
    }

    .date-row {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* 极小屏幕 (最大360px) */
@media (max-width: 360px) {
    .date-title {
        font-size: 1.125rem;
    }

    .news-title {
        font-size: 1rem;
    }

    .article-count,
    .weekday {
        font-size: 0.75rem;
    }

    .nav-title {
        font-size: 0.6875rem;
        padding: 0 1px;
    }

    .nav-header {
        padding: 2px 4px;
    }

    .nav-toggle-btn,
    .nav-home {
        width: 26px;
        height: 26px;
        min-width: 22px;
    }
}

/* Loading Animation - 已禁用，页面立即显示 */
body {
    opacity: 1;
}

/* 播客项目在极小屏幕下的优化 */
@media (max-width: 400px) {
    .podcast-item {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm);
    }

    .podcast-cover-small {
        width: 32px;
        height: 32px;
    }

    .podcast-cover-small img {
        width: 36px;
        height: 36px;
    }

    .podcast-title {
        font-size: 0.75rem;
    }

    .podcast-play-btn {
        width: 28px;
        height: 28px;
    }
}

/* ========== AI ENTRY POINT ========== */

/* Date Header Layout */
.date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: var(--spacing-lg);
}

.date-header-left {
    flex: 1;
    min-width: 220px;
}

/* AI Entry Button */
.ai-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-card-purple);
    color: var(--text-black);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 2px;
}

.ai-entry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.4);
}

.ai-entry-btn svg {
    flex-shrink: 0;
}

/* Unified Filter Search Tool */
.content-filter-tool {
    width: min(560px, 52%);
    min-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: flex-start;
}

.filter-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.filter-search-icon {
    color: var(--text-gray);
    flex-shrink: 0;
}

.filter-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-black);
    font-family: var(--font-main);
    font-size: 0.9375rem;
}

.filter-search-input::placeholder {
    color: var(--text-light-gray);
}

.filter-clear-btn {
    border: none;
    background: transparent;
    color: var(--text-gray);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.filter-clear-btn:hover {
    color: var(--text-black);
    background: rgba(0, 0, 0, 0.05);
}

.filter-chip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-company-row {
    max-height: 78px;
    overflow: hidden;
}

.filter-chip {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark-gray);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-family: var(--font-main);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filter-chip span {
    color: var(--text-gray);
    font-size: 0.75rem;
    margin-left: 3px;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--bg-card-purple);
    border-color: rgba(126, 109, 190, 0.55);
    color: var(--text-black);
}

.filter-chip[data-topic].active,
.active-filter-chip.filter-topic-chip {
    background: rgba(181, 168, 224, 0.78);
    border-color: rgba(126, 109, 190, 0.58);
    color: var(--text-black);
}

.filter-chip[data-company].active,
.active-filter-chip.filter-company-chip {
    background: rgba(184, 213, 244, 0.82);
    border-color: rgba(84, 132, 190, 0.42);
    color: var(--text-black);
}

.filter-chip.active span {
    color: var(--text-black);
}

.company-chip {
    background: rgba(248, 247, 242, 0.88);
}

.active-filter-row {
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--text-gray);
    font-size: 0.75rem;
}

.active-filter-chip {
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-black);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-family: var(--font-main);
    font-size: 0.75rem;
    cursor: pointer;
}

.filter-empty-note {
    color: var(--text-gray);
    font-size: 0.8125rem;
}

.news-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-gray);
    text-align: center;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-lg);
}

.news-empty-state h2 {
    color: var(--text-black);
    font-size: 1.25rem;
}

/* Topic tag: colored text + dot, no pill (mirrors tmp .topic-tag) */
.news-tags .topic-tag {
    background: transparent;
    padding: 0;
    color: var(--topic-color, #999);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.news-tags .topic-tag .t-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    background: var(--topic-color, #999);
    vertical-align: middle;
}

/* Company tag: soft beige pill (mirrors tmp .co-tag) */
.news-tags .company-tag {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-gray);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.71875rem;
    font-weight: 500;
    box-shadow: none;
}

/* AI Entry Modal */
.ai-entry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.ai-entry-modal.active {
    display: block;
}

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

.ai-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none; /* 默认隐藏 */
}

.ai-modal-overlay.active {
    display: block; /* 只有active时才显示 */
}

.ai-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    background: var(--bg-card-white);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-black);
}

.ai-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.ai-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-black);
}

.ai-modal-content {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

/* AI Categories */
.ai-category {
    margin-bottom: var(--spacing-2xl);
}

.ai-category:last-child {
    margin-bottom: 0;
}

.ai-category-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: var(--spacing-lg);
}

.ai-category-title svg {
    color: var(--accent-purple);
    flex-shrink: 0;
}

/* AI Links Grid */
.ai-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

/* AI模态框的自适应优化 */
@media (max-width: 1400px) {
    .ai-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

.ai-link-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-lg);
    background: var(--bg-cream);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ai-link-item:hover {
    background: var(--bg-card-purple);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.3);
}

.ai-link-item:hover .ai-link-name {
    color: var(--text-white);
}

.ai-link-item:hover .ai-link-desc {
    color: rgba(255, 255, 255, 0.9);
}

.ai-link-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.ai-link-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-black);
    transition: color 0.2s ease;
}

.ai-link-desc {
    font-size: 0.75rem;
    color: var(--text-gray);
    transition: color 0.2s ease;
}

/* Modal Scrollbar */
.ai-modal-content::-webkit-scrollbar {
    width: 6px;
}

.ai-modal-content::-webkit-scrollbar-track {
    background: var(--bg-cream);
    border-radius: 3px;
}

.ai-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.ai-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .date-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .ai-entry-btn {
        width: 100%;
        justify-content: center;
    }

    .content-filter-tool {
        width: 100%;
        min-width: 0;
    }

    .filter-chip-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .filter-chip {
        flex: 0 0 auto;
    }

    .filter-company-row {
        max-height: none;
    }

    .ai-modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .ai-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-sm);
    }

    .ai-modal-title {
        font-size: 1.25rem;
    }

    .ai-category-title {
        font-size: 1rem;
    }
}

/* ========== FLOATING SETTINGS BALL ========== */

.floating-ball {
    position: fixed;
    right: 40px;
    bottom: 40px;
    width: 56px;
    height: 56px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(181, 168, 224, 0.5), 0 0 40px rgba(181, 168, 224, 0.3);
    animation: float 3s ease-in-out infinite;
}

.floating-ball-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.floating-ball:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(181, 168, 224, 0.7), 0 0 60px rgba(181, 168, 224, 0.4);
    animation: none;
}

.floating-ball:active {
    cursor: pointer;
    transform: scale(0.95);
}

.floating-ball:active {
    cursor: grabbing;
}

.floating-ball.dragging {
    cursor: grabbing;
    transition: none;
    animation: none;
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    bottom: 120px;
    right: 40px;
    width: 380px;
    height: 580px;
    max-height: calc(100vh - 160px);
    background: var(--bg-card-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.25);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.chat-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(135deg, #B5A8E0 0%, #9B8ED4 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    color: white;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chat-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-left h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chat-header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.chat-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    background: var(--bg-cream);
}

.message {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    animation: messageIn 0.3s ease;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    max-width: 280px;
}

.message-content p {
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.6;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.bot-message .message-content {
    background: var(--bg-card-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-quick-replies {
    padding: var(--spacing-lg);
    background: var(--bg-card-white);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.quick-reply-btn {
    padding: var(--spacing-md) var(--spacing-sm);
    background: var(--bg-card-purple);
    border: 1px solid var(--accent-purple);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-family: var(--font-main);
    color: var(--text-black);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-align: center;
}

.quick-reply-btn:hover {
    background: linear-gradient(135deg, #B5A8E0 0%, #9B8ED4 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.4);
}

.quick-reply-btn:active {
    transform: translateY(0);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--bg-card-purple);
    color: var(--text-black);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--spacing-md);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .floating-ball {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

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

    .chat-panel {
        bottom: 80px;
        right: 20px;
        left: 20px;
        width: auto;
        height: calc(100vh - 120px);
    }

    .message-content {
        max-width: none;
    }

    .chat-quick-replies {
        grid-template-columns: 1fr;
    }

    .quick-reply-btn {
        padding: var(--spacing-md);
        flex-direction: row;
        justify-content: center;
    }

    /* AI Modal Mobile Optimization */
    .ai-modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .ai-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--spacing-sm);
    }

    .ai-link-item {
        padding: var(--spacing-md);
    }

    .ai-link-icon {
        font-size: 1.75rem;
    }

    .ai-link-name {
        font-size: 0.8125rem;
    }

    .ai-link-desc {
        font-size: 0.6875rem;
    }

    .ai-modal-title {
        font-size: 1.25rem;
    }

    .ai-category-title {
        font-size: 1rem;
    }
}

/* ========== AI MODAL ENHANCEMENTS ========== */

/* AI Modal Animation Enhancements */
.ai-link-item {
    position: relative;
    overflow: hidden;
}

.ai-link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ai-link-item:hover::before {
    left: 100%;
}

/* Category Title Hover Effect */
.ai-category-title {
    position: relative;
    transition: all 0.2s ease;
}

.ai-category-title:hover {
    color: var(--accent-purple);
}

/* AI Link Icon Animation */
.ai-link-icon {
    transition: transform 0.3s ease;
}

.ai-link-item:hover .ai-link-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Modal Container Entrance Animation */
.ai-modal-container {
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    0% {
        transform: translate(-50%, -45%) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Staggered Animation for Link Items */
.ai-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.ai-link-item {
    animation: fadeInUp 0.4s ease backwards;
}

.ai-link-item:nth-child(1) { animation-delay: 0.05s; }
.ai-link-item:nth-child(2) { animation-delay: 0.1s; }
.ai-link-item:nth-child(3) { animation-delay: 0.15s; }
.ai-link-item:nth-child(4) { animation-delay: 0.2s; }
.ai-link-item:nth-child(5) { animation-delay: 0.25s; }
.ai-link-item:nth-child(6) { animation-delay: 0.3s; }

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

/* Modal Overlay Pulse Effect */
.ai-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    animation: overlayFadeIn 0.3s ease;
}

.ai-modal-overlay.active {
    display: block;
}

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

/* External Link Indicator */
.ai-link-item[target="_blank"]::after {
    content: '↗';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.75rem;
    color: var(--text-light-gray);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ai-link-item[target="_blank"]:hover::after {
    opacity: 1;
}

/* ==========================================================================
   NEWS V2 — full-width top search bar + slim date bar + reference styling
   All rules scoped under body.news-v2 so other pages (e.g. category page)
   that share this stylesheet are unaffected.
   ========================================================================== */

/* --- Layout: scrolling document split into stacked sections --- */
body.news-v2 {
    display: block;
    grid-template-columns: none;
    grid-template-rows: none;
    height: auto;
    min-width: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg-cream);
}

.news-v2 .page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-3xl) var(--spacing-3xl);
}

.news-v2 .page-section {
    padding-top: var(--spacing-2xl);
}

/* Shared small section heading */
.news-v2 .section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
}

.news-v2 .section-head-bar {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--accent-purple);
}

.news-v2 .section-head-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-black);
    letter-spacing: 0.02em;
}

.news-v2 .section-head-sub {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* 新闻搜索 heading: title + quick 类型 bar + advanced toggle */
.news-v2 .section-search .section-head {
    flex-wrap: nowrap;
}

/* segmented quick 类型 filter bar (next to heading) */
.news-v2 .topic-quick-bar {
    display: none;
    align-items: center;
    gap: 2px;
    margin-left: var(--spacing-md);
    padding: 4px;
    background: var(--bg-card-white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.news-v2 .topic-quick-bar::-webkit-scrollbar {
    display: none;
}

.news-v2 .quick-chip {
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.news-v2 .quick-chip:hover {
    color: var(--text-black);
}

.news-v2 .quick-chip.active {
    background: var(--bg-card-purple);
    color: var(--text-black);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* advanced filter toggle (search icon button) */
.news-v2 .section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 9px;
    background: var(--bg-card-white);
    color: var(--accent-purple);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-v2 .section-toggle:hover {
    background: var(--bg-card-purple);
    color: var(--text-black);
}

/* expanded state: highlight the search icon */
.news-v2 .section-search:not(.collapsed) .section-toggle {
    background: var(--accent-purple);
    border-color: rgba(126, 109, 190, 0.55);
    color: var(--text-black);
}

/* collapsed: hide the advanced filter panel */
.news-v2 .section-search.collapsed .section-body {
    display: none;
}

/* labelled filter rows in the advanced panel */
.news-v2 .filter-group {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.news-v2 .filter-group-label {
    flex: 0 0 48px;
    padding-top: 7px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-gray);
    letter-spacing: 0.04em;
}

.news-v2 .filter-group .filter-chip-row {
    flex: 1;
    min-width: 0;
}

/* hide the results block entirely when no filter/keyword is active */
.news-v2 .search-results-area.is-idle {
    display: none;
}

/* total matches summary in the active-filter row */
.news-v2 .active-filter-total {
    margin-left: auto;
    color: var(--text-gray);
    font-weight: 600;
}

/* ===================================================================
   Left timeline refinement (news-v2 date view only)
   - vertical spine with the day-number circle as each node
   - flat rows: fill only on hover / active (on-brand lavender)
   - the match count becomes a pill that reacts to search
   =================================================================== */

/* Vertical spine running through the day-number nodes */
.news-v2 .daily-grid #dateListView .date-rows {
    position: relative;
}

.news-v2 .daily-grid #dateListView .date-rows::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 1px;
}

/* Flatten the rows: transparent by default, fill only on state */
.news-v2 .daily-grid #dateListView .date-row {
    position: relative;
    z-index: 0;
    background: transparent;
    gap: clamp(6px, 1vw, var(--spacing-md));
    padding: var(--spacing-sm) clamp(var(--spacing-sm), 1vw, var(--spacing-md));
    margin-bottom: 2px;
    transition: background 0.2s ease, color 0.2s ease;
}

.news-v2 .daily-grid #dateListView .date-row:hover {
    background: var(--bg-purple-soft);
    transform: none; /* keep nodes aligned on the spine */
}

/* Selected date: brand lavender block + deep-purple accent bar */
.news-v2 .daily-grid #dateListView .date-row.active {
    background: var(--bg-card-purple);
    color: var(--text-black);
}

.news-v2 .daily-grid #dateListView .date-row.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent-purple-deep);
}

/* Day number = the node sitting on the spine */
.news-v2 .daily-grid #dateListView .date-number {
    position: relative;
    z-index: 1;
    flex: 0 0 clamp(28px, 2.5vw, 32px);
    width: clamp(28px, 2.5vw, 32px);
    height: clamp(28px, 2.5vw, 32px);
    border-radius: 50%;
    background: var(--bg-card-white);
    border: 2px solid rgba(0, 0, 0, 0.14);
    color: var(--text-black);
    transition: all 0.2s ease;
}

.news-v2 .daily-grid #dateListView .date-row:hover .date-number {
    border-color: var(--accent-purple);
}

.news-v2 .daily-grid #dateListView .date-row.active .date-number {
    background: var(--accent-purple-deep);
    border-color: var(--accent-purple-deep);
    color: var(--text-white);
}

/* Weekday: muted secondary label, left-aligned after the node */
.news-v2 .daily-grid #dateListView .date-weekday {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    margin-left: var(--spacing-xs);
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-v2 .daily-grid #dateListView .date-row.active .date-weekday {
    color: var(--text-black);
}

/* Count becomes a pill; it is the hero signal while searching */
.news-v2 .daily-grid #dateListView .date-count {
    flex: 0 0 auto;
    min-width: 24px;
    padding: 2px clamp(6px, 0.8vw, 8px);
    border-radius: 999px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-gray);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

/* dates with matches for the active search → highlighted pill */
.news-v2 .daily-grid #dateListView .date-row.has-match .date-count {
    background: var(--bg-purple-soft);
    color: var(--accent-purple-deep);
    font-weight: 700;
}

/* dates with no matches → keep the date legible, only mute the row */
.news-v2 .daily-grid #dateListView .date-row.no-match .date-count {
    color: var(--text-light-gray);
}

.news-v2 .daily-grid #dateListView .date-row.no-match .date-weekday {
    color: var(--text-light-gray);
}

.news-v2 .daily-grid #dateListView .date-row.no-match .date-number {
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-light-gray);
}

/* selected date pill stays readable on the lavender block */
.news-v2 .daily-grid #dateListView .date-row.active .date-count {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text-black);
}

/* Sticky month header so the current month stays visible while scrolling */
.news-v2 .daily-grid .left-column .month-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-card-white);
}

/* --- Top navigation bar (mirrors brand.html), sticky --- */
.news-v2 .top-nav {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-lg) var(--spacing-3xl);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 50;
}

.news-v2 .nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-black);
    text-decoration: none;
}

.news-v2 .nav-logo img {
    border-radius: var(--radius-md);
}

.news-v2 .nav-brand {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.news-v2 .nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.news-v2 .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.news-v2 .nav-link:hover {
    color: var(--text-black);
}

.news-v2 .enter-news-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--accent-purple);
    color: var(--text-black);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-main);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.news-v2 .enter-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(181, 168, 224, 0.3);
}

.news-v2 .enter-news-btn svg {
    transition: transform 0.2s ease;
}

.news-v2 .enter-news-btn:hover svg {
    transform: translateX(2px);
}

/* --- Section 1: 新闻搜索 --- */
.news-v2 .content-filter-tool {
    width: 100%;
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #FBF9F3 0%, #F6F4EE 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.news-v2 .search-results-area {
    margin-top: var(--spacing-lg);
}

.news-v2 .search-results-area.is-idle #search-articles {
    display: none;
}

.news-v2 #search-articles {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.news-v2 .result-hint {
    color: var(--text-gray);
}

.news-v2 .filter-search-row {
    height: 46px;
    padding: 0 14px;
    background: var(--bg-card-white);
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-v2 .filter-search-row:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(181, 168, 224, 0.28);
}

.news-v2 .filter-search-input {
    font-size: 0.95rem;
}

/* topic colour dot on chips */
.news-v2 .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-v2 .filter-chip .c-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* active-filter row: dashed separator like the reference */
.news-v2 .active-filter-row:not(:empty) {
    padding-top: 11px;
    border-top: 1px dashed rgba(0, 0, 0, 0.14);
}

.news-v2 .active-filter-chip {
    background: var(--bg-card-purple);
    color: var(--text-black);
    font-weight: 600;
}

.news-v2 .filter-chip[data-topic].active,
.news-v2 .active-filter-chip.filter-topic-chip {
    background: rgba(181, 168, 224, 0.78);
    border-color: rgba(126, 109, 190, 0.58);
    color: var(--text-black);
}

.news-v2 .filter-chip[data-company].active,
.news-v2 .active-filter-chip.filter-company-chip {
    background: rgba(184, 213, 244, 0.82);
    border-color: rgba(84, 132, 190, 0.42);
    color: var(--text-black);
}

/* --- Section 2: 每日新闻 — timeline + content --- */
.news-v2 .daily-grid {
    display: grid;
    grid-template-columns: clamp(184px, 18vw, 260px) minmax(0, 1fr);
    gap: clamp(var(--spacing-md), 2vw, var(--spacing-2xl));
    align-items: start;
    margin-top: var(--spacing-lg);
}

.news-v2 .daily-grid .left-column {
    position: sticky;
    top: 84px;
    min-width: 0;
    height: auto;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    background: var(--bg-card-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
}

.news-v2 .daily-grid .middle-column {
    min-width: 0;
    height: auto;
    overflow: visible;
    background: transparent;
}

.news-v2 .daily-grid .main-content {
    padding: 0;
    max-width: none;
    margin: 0;
    gap: var(--spacing-lg);
}

/* --- Slim date bar at the top of the content column --- */
.news-v2 .date-header {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding-bottom: var(--spacing-md);
}

.news-v2 .date-title {
    margin-bottom: 0;
    font-size: 1.875rem;
}

.news-v2 .date-meta {
    gap: var(--spacing-sm);
}

/* --- Result count line (search section) --- */
.news-v2 .result-line {
    margin: 0 2px var(--spacing-md);
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.news-v2 .result-line:empty {
    display: none;
}

.news-v2 .result-line b {
    color: var(--text-black);
    font-weight: 600;
}

.news-v2 .result-line .rl-q {
    color: #6356b6;
}

/* --- Card topic dot --- */
.news-v2 .news-tags .topic-tag .t-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.news-v2 .mobile-week-timeline {
    display: none;
}

@media (min-width: 769px) and (max-width: 1100px) {
    .news-v2 .page-main {
        padding-right: var(--spacing-xl);
        padding-left: var(--spacing-xl);
    }

    /* Match about-us heading scale on tablet */
    .news-v2 .section-head-title {
        font-size: 1.05rem;
    }

    .news-v2 .daily-grid {
        grid-template-columns: clamp(160px, 17vw, 200px) minmax(0, 1fr);
        gap: var(--spacing-lg);
    }

    .news-v2 .daily-grid #dateListView .date-rows::before {
        left: 23px;
    }

    .news-v2 .daily-grid #dateListView .date-weekday {
        font-size: 0.8125rem;
    }

    .news-v2 .daily-grid #dateListView .date-count {
        min-width: 20px;
        font-size: 0.75rem;
    }
}

/* --- Responsive: stack on mobile --- */
@media (max-width: 768px) {
    .news-v2 .page-main {
        max-width: none;
        width: 100%;
        min-width: 0;
        padding: 0 0 var(--spacing-2xl);
    }

    .news-v2 .page-section {
        width: 100%;
        max-width: 100vw;
        min-width: 0;
        overflow-x: visible;
        padding-top: var(--spacing-lg);
    }

    .news-v2 .top-nav {
        padding: var(--spacing-md);
    }

    .news-v2 .nav-logo,
    .news-v2 .nav-links,
    .news-v2 .enter-news-btn,
    .news-v2 .nav-link {
        min-width: 0;
    }

    .news-v2 .nav-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: var(--spacing-sm);
    }

    .news-v2 .enter-news-btn,
    .news-v2 .nav-link {
        min-height: 44px;
        align-items: center;
    }

    .news-v2 .section-head {
        padding: 0;
        margin-bottom: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .news-v2 .section-head-bar {
        margin-left: var(--spacing-md);
    }

    .news-v2 .section-head-title {
        font-size: 1rem;
    }

    .news-v2 .topic-quick-bar {
        order: 3;
        flex: 0 0 100vw;
        width: 100vw;
        margin-left: 0;
        flex-wrap: wrap;
        overflow-x: hidden;
        justify-content: flex-start;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .news-v2 .quick-chip {
        flex: 1 1 auto;
        min-width: min(112px, calc((100vw - 24px) / 3));
        white-space: normal;
        text-align: center;
        line-height: 1.2;
        padding: 7px 8px;
    }

    .news-v2 .section-toggle {
        width: 32px;
        height: 32px;
        margin-right: var(--spacing-md);
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .news-v2 .section-toggle:hover,
    .news-v2 .section-search:not(.collapsed) .section-toggle {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        color: var(--text-black);
    }

    .news-v2 .section-toggle svg {
        width: 17px;
        height: 17px;
    }

    .news-v2 .section-body {
        padding: 0;
    }

    .news-v2 .content-filter-tool {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        padding: var(--spacing-md);
    }

    .news-v2 .filter-search-row {
        min-height: 48px;
        height: auto;
        max-width: 100%;
        min-width: 0;
    }

    .news-v2 .filter-search-input {
        font-size: 0.8125rem;
        min-width: 0;
        text-overflow: ellipsis;
    }

    .news-v2 .filter-clear-btn {
        flex: 0 0 auto;
        width: 28px;
        height: 28px;
        padding: 0;
    }

    .news-v2 .filter-clear-btn svg {
        width: 14px;
        height: 14px;
    }

    .news-v2 .filter-group-label {
        flex-basis: 36px;
        font-size: 0.6875rem;
        padding-top: 6px;
    }

    .news-v2 .filter-chip-row {
        flex-wrap: wrap;
        overflow-x: hidden;
        scrollbar-width: auto;
        padding-bottom: 0;
    }

    .news-v2 .filter-chip,
    .news-v2 .active-filter-chip {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        max-width: 100%;
        justify-content: flex-start;
        white-space: normal;
        text-align: left;
        font-size: 0.6875rem;
        line-height: 1.25;
        padding: 5px 8px;
        gap: 4px;
    }

    .news-v2 .filter-chip span {
        font-size: 0.625rem;
    }

    .news-v2 .filter-chip .c-dot {
        width: 5px;
        height: 5px;
    }

    .news-v2 .filter-chip[data-topic].active,
    .news-v2 .active-filter-chip.filter-topic-chip {
        background: rgba(181, 168, 224, 0.78);
        border-color: rgba(126, 109, 190, 0.58);
        color: var(--text-black);
    }

    .news-v2 .filter-chip[data-company].active,
    .news-v2 .active-filter-chip.filter-company-chip {
        background: rgba(184, 213, 244, 0.82);
        border-color: rgba(84, 132, 190, 0.42);
        color: var(--text-black);
    }

    .news-v2 .mobile-week-timeline {
        position: sticky;
        top: calc(48px + env(safe-area-inset-top));
        z-index: 40;
        display: grid;
        grid-template-columns: 30px 26px auto minmax(0, 1fr) 26px;
        align-items: stretch;
        gap: 3px;
        width: 100%;
        max-width: 100vw;
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-sm) 4px;
        background: rgba(255, 255, 255, 0.78);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(8px);
    }

    .news-v2 .mobile-calendar-btn,
    .news-v2 .mobile-week-nav,
    .news-v2 .mobile-calendar-month-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: var(--text-black);
        cursor: pointer;
        font-family: var(--font-main);
        transition: background 0.18s ease, border-color 0.18s ease;
    }

    .news-v2 .mobile-calendar-btn,
    .news-v2 .mobile-week-nav {
        min-width: 0;
        min-height: 34px;
        border-radius: var(--radius-sm);
    }

    .news-v2 .mobile-calendar-btn {
        color: var(--accent-purple-deep);
        border: 0;
    }

    .news-v2 .mobile-calendar-btn svg,
    .news-v2 .mobile-week-nav svg {
        width: 13px;
        height: 13px;
    }

    .news-v2 .mobile-calendar-btn svg {
        width: 15px;
        height: 15px;
        stroke: var(--accent-purple-deep);
    }

    .news-v2 .mobile-calendar-btn:hover,
    .news-v2 .mobile-week-nav:hover,
    .news-v2 .mobile-calendar-month-btn:hover {
        background: transparent;
        border-color: transparent;
        color: var(--accent-purple-deep);
    }

    .news-v2 .mobile-calendar-btn:hover,
    .news-v2 .mobile-calendar-btn[aria-expanded="true"] {
        color: var(--accent-purple-deep);
    }

    .news-v2 .mobile-week-month {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px 0 2px;
        font-family: var(--font-main);
        font-size: 0.6875rem;
        font-weight: 700;
        line-height: 1;
        color: var(--accent-purple-deep);
        white-space: nowrap;
    }

    .news-v2 .mobile-week-days {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 2px;
        min-width: 0;
        overflow: hidden;
    }

    .news-v2 .mobile-day-btn {
        min-width: 0;
        min-height: 38px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        padding: 3px 1px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: var(--radius-sm);
        background: var(--bg-card-white);
        color: var(--text-dark-gray);
        font-family: var(--font-main);
        cursor: pointer;
        overflow: hidden;
    }

    .news-v2 .mobile-day-btn[disabled] {
        opacity: 0.42;
        cursor: default;
    }

    .news-v2 .mobile-day-btn.active {
        background: var(--bg-card-purple);
        border-color: rgba(126, 109, 190, 0.4);
        color: var(--text-black);
    }

    /* Filter active: dates with matching articles are highlighted, dates with none are muted */
    .news-v2 .mobile-day-btn.has-match:not(.active) {
        border-color: rgba(126, 109, 190, 0.45);
        color: var(--accent-purple-deep);
    }

    .news-v2 .mobile-day-btn.no-match:not(.active) {
        opacity: 0.4;
        background: transparent;
    }

    .news-v2 .mobile-day-weekday {
        max-width: 100%;
        font-size: clamp(0.5rem, 2.2vw, 0.625rem);
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .news-v2 .mobile-day-number {
        max-width: 100%;
        font-size: clamp(0.75rem, 3.6vw, 0.9375rem);
        font-weight: 700;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .news-v2 .mobile-calendar-popover {
        position: absolute;
        top: calc(100% + 8px);
        left: var(--spacing-sm);
        z-index: 60;
        width: min(360px, calc(100vw - 16px));
        padding: var(--spacing-md);
        background: var(--bg-card-white);
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: var(--radius-lg);
        box-shadow: 0 16px 40px rgba(18, 18, 18, 0.16);
    }

    .news-v2 .mobile-calendar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .news-v2 .mobile-calendar-title {
        font-weight: 700;
        color: var(--text-black);
    }

    .news-v2 .mobile-calendar-month-btn {
        width: 36px;
        height: 36px;
        border-radius: var(--radius-md);
    }

    .news-v2 .mobile-calendar-weekdays,
    .news-v2 .mobile-calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }

    .news-v2 .mobile-calendar-weekdays {
        margin-bottom: var(--spacing-xs);
        color: var(--text-gray);
        font-size: 0.75rem;
        text-align: center;
    }

    .news-v2 .mobile-calendar-day {
        min-width: 0;
        min-height: 36px;
        border: 1px solid transparent;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--text-dark-gray);
        font-family: var(--font-main);
        cursor: pointer;
    }

    .news-v2 .mobile-calendar-day[disabled] {
        color: var(--text-light-gray);
        opacity: 0.45;
        cursor: default;
    }

    .news-v2 .mobile-calendar-day.active {
        background: var(--bg-card-purple);
        border-color: rgba(126, 109, 190, 0.38);
        color: var(--text-black);
        font-weight: 700;
    }

    /* Filter active: dates with matching articles are highlighted, dates with none are muted */
    .news-v2 .mobile-calendar-day.has-match:not(.active) {
        border-color: rgba(126, 109, 190, 0.45);
        color: var(--accent-purple-deep);
        font-weight: 700;
    }

    .news-v2 .mobile-calendar-day.no-match:not(.active) {
        opacity: 0.4;
    }

    .news-v2 .daily-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        width: 100%;
        min-width: 0;
    }

    .news-v2 .daily-grid .left-column {
        display: none;
    }

    .news-v2 .daily-grid .middle-column,
    .news-v2 .daily-grid .main-content,
    .news-v2 .news-articles {
        width: 100%;
        min-width: 0;
    }

    .news-v2 .date-header {
        padding: 0 var(--spacing-md) var(--spacing-md);
        border-bottom: 0;
    }

    .news-v2 .date-header-left {
        min-width: 0;
    }

    .news-v2 .news-articles {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .news-v2 .news-card,
    .news-v2 .news-empty-state,
    .news-v2 .news-loading-state {
        width: 100%;
        min-width: 0;
        border-radius: var(--radius-lg);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .news-v2 .news-tags {
        flex-wrap: wrap;
        min-width: 0;
    }

    .news-v2 .news-title,
    .news-v2 .news-description,
    .news-v2 .news-tags .tag {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .news-v2 .news-title-link {
        flex: 0 0 auto;
    }
}

@media (max-width: 420px) {
    .news-v2 .mobile-week-timeline {
        grid-template-columns: 26px 22px auto minmax(0, 1fr) 22px;
        gap: 2px;
        padding-right: 2px;
        padding-left: 2px;
    }

    .news-v2 .mobile-week-month {
        padding: 0 3px 0 1px;
        font-size: 0.625rem;
    }

    .news-v2 .mobile-calendar-btn,
    .news-v2 .mobile-week-nav {
        min-height: 32px;
    }

    .news-v2 .mobile-calendar-btn svg,
    .news-v2 .mobile-week-nav svg {
        width: 11px;
        height: 11px;
    }

    .news-v2 .mobile-week-days {
        gap: 1px;
    }

    .news-v2 .mobile-day-btn {
        min-height: 36px;
        padding-right: 0;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .news-v2 .page-main {
        padding: 0 0 var(--spacing-2xl);
    }

    .news-v2 .top-nav {
        padding: var(--spacing-md) var(--spacing-lg);
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .news-v2 .nav-links {
        gap: var(--spacing-md);
    }

    .news-v2 .date-title {
        font-size: 1.5rem;
    }
}

/* Non-desktop: freeze the section heading + 类型 filter + search toggle under the
   sticky nav. The 类型 quick bar height varies, so the exact `top` values for the
   heading and the week timeline below it are refined at runtime (see news.html). */
@media (max-width: 1024px) {
    .news-v2 .section-search .section-head {
        position: sticky;
        top: 48px;
        z-index: 41;
        background: var(--bg-cream);
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
        margin-bottom: 0;
    }
}

/* ========== PAGE LOAD FADE-IN (gradual content reveal) ========== */
/* Mirrors the about-us page load fade: the whole content area eases in       */
/* together on load. `.js` is set synchronously in <head> so the start state  */
/* (opacity 0) applies before first paint — no flash. Without JS, or when the */
/* user prefers reduced motion, content shows immediately at full opacity.     */
@media (prefers-reduced-motion: no-preference) {
    html.js .page-reveal {
        animation: pageFadeIn 0.6s ease-in both;
    }
}

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