/* 编年史共用：背景、动画、组件 */
@keyframes chr-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes chr-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes chr-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes chr-pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.05); }
}

@keyframes chr-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.chr-page {
    --chr-accent: #9d4edd;
    --chr-glass: rgba(18, 12, 28, 0.72);
    --chr-border: rgba(200, 180, 255, 0.12);
    --chr-site-header: 50px;
    position: relative;
    max-width: var(--frame-center-width, 1280px);
    margin: 0 auto;
    padding: calc(var(--chr-site-header) + 20px) 24px 100px;
    color: var(--font-one-color, #e8e4f0);
    min-height: 60vh;
    z-index: 1;
}

.chr-page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 15% -10%, rgba(157, 78, 221, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(90, 24, 154, 0.15) 0%, transparent 45%),
        linear-gradient(180deg, #0a0612 0%, #120a18 40%, #0d0814 100%);
}

.chr-page-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.35;
}

.chr-breadcrumb {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 24px;
    animation: chr-fade-up 0.5s ease both;
}

.chr-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.chr-breadcrumb a:hover {
    color: var(--chr-accent);
}

.chr-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 24px rgba(157, 78, 221, 0.35);
}

.chr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--chr-border);
    color: #fff;
    cursor: pointer;
    background: var(--chr-glass);
    backdrop-filter: blur(12px);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.chr-btn:hover {
    transform: translateY(-2px);
    border-color: var(--chr-accent);
    color: #fff;
}

.chr-btn-primary {
    background: linear-gradient(135deg, var(--chr-accent), color-mix(in srgb, var(--chr-accent) 60%, #1a0a2e));
    border-color: transparent;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--chr-accent) 40%, transparent);
}

.chr-btn-primary:hover {
    box-shadow: 0 8px 32px color-mix(in srgb, var(--chr-accent) 55%, transparent);
}

.chr-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--chr-accent);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.chr-badge-muted {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
}

.chr-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chr-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes chr-card-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chr-card-in {
    animation: chr-card-in 0.45s ease both;
}

.chr-glass-panel {
    background: var(--chr-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--chr-border);
    border-radius: 16px;
}

.chr-select {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: 1px solid var(--chr-border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    min-width: 160px;
}

/* 本站风格滚动条（编年史紫色主题） */
.chr-scroll,
.chr-chapter-nav,
.chr-story-aside,
.chr-ency-tabs {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--chr-accent) 55%, #2c1f1e) rgba(30, 18, 36, 0.85);
}

.chr-scroll::-webkit-scrollbar,
.chr-chapter-nav::-webkit-scrollbar,
.chr-story-aside::-webkit-scrollbar,
.chr-ency-tabs::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.chr-scroll::-webkit-scrollbar-track,
.chr-chapter-nav::-webkit-scrollbar-track,
.chr-story-aside::-webkit-scrollbar-track,
.chr-ency-tabs::-webkit-scrollbar-track {
    background: rgba(30, 18, 36, 0.85);
    border-radius: 3px;
}

.chr-scroll::-webkit-scrollbar-thumb,
.chr-chapter-nav::-webkit-scrollbar-thumb,
.chr-story-aside::-webkit-scrollbar-thumb,
.chr-ency-tabs::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--chr-accent) 50%, #2c1f1e);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chr-scroll::-webkit-scrollbar-thumb:hover,
.chr-chapter-nav::-webkit-scrollbar-thumb:hover,
.chr-story-aside::-webkit-scrollbar-thumb:hover,
.chr-ency-tabs::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--chr-accent) 70%, #2c1f1e);
}

.chr-scroll::-webkit-scrollbar-corner,
.chr-chapter-nav::-webkit-scrollbar-corner,
.chr-story-aside::-webkit-scrollbar-corner,
.chr-ency-tabs::-webkit-scrollbar-corner {
    background: transparent;
}

/* 覆盖 public.css 全局 button 样式 */
.chr-page button.chr-ency-tab,
.chr-page button.chr-cg-card {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    height: auto !important;
    line-height: inherit !important;
    font-weight: 500 !important;
    white-space: nowrap;
    font-family: inherit;
}

.chr-page button.chr-modal-close {
    background: none !important;
    border: none !important;
    height: auto !important;
    padding: 0 !important;
    color: #fff !important;
}

/* 全站至暗之夜顶栏/页脚等见 statics/css/theme-midnight.css（html.dmj-theme-midnight） */
