/* Global Viewport Guard (消除页面级滚动条，SPA 沉浸式视口) */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden !important;
    background-color: #0f172a;
}

/* Vue 3 Anti-FOUC & Cloak Guard (确保初次渲染期间绝不闪烁未编译模板与抽屉) */
#app[v-cloak], #app[v-cloak] *, [v-cloak]#app, .v-cloak-hidden {
    display: none !important;
}

/* Custom Scrollbars */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Line clamp helpers if Tailwind plugin not loaded via CDN */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Graph Container */
#echarts-graph {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* ========================================================
   高品质排版中英文字体栈与阅读主题
   ======================================================== */
.font-reading-sans {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;
    letter-spacing: 0.015em;
}

.font-reading-serif {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "STSong", Georgia, Cambria, serif;
    letter-spacing: 0.025em;
}

/* 阅读底色主题与正文高对比度自适应 */
.reading-theme-dark {
    background-color: #0b0f19;
    color: #e2e8f0;
}
.reading-theme-dark .article-title-heading {
    color: #f8fafc;
}
.reading-theme-dark .article-prose {
    color: #cbd5e1 !important;
}
.reading-theme-dark .article-prose,
.reading-theme-dark .article-prose *:not(pre):not(code):not(a):not(button):not(svg):not(path) {
    color: #cbd5e1 !important;
}
.reading-theme-dark .article-prose h1,
.reading-theme-dark .article-prose h2,
.reading-theme-dark .article-prose h3,
.reading-theme-dark .article-prose h4 {
    color: #f8fafc !important;
}
.reading-theme-dark .article-prose strong,
.reading-theme-dark .article-prose b {
    color: #ffffff !important;
    font-weight: 700;
}
.reading-theme-dark .article-prose section,
.reading-theme-dark .article-prose div:not([class*="bg-"]):not([class*="border-"]),
.reading-theme-dark .article-prose p,
.reading-theme-dark .article-prose span {
    background-color: transparent !important;
}

.reading-theme-sepia {
    background-color: #1a1714;
    color: #e7e5e4;
}
.reading-theme-sepia .article-title-heading {
    color: #fafaf9;
}
.reading-theme-sepia .article-prose {
    color: #d6d3d1 !important;
}
.reading-theme-sepia .article-prose,
.reading-theme-sepia .article-prose *:not(pre):not(code):not(a):not(button):not(svg):not(path) {
    color: #d6d3d1 !important;
}
.reading-theme-sepia .article-prose h1,
.reading-theme-sepia .article-prose h2,
.reading-theme-sepia .article-prose h3 {
    color: #fef3c7 !important;
}
.reading-theme-sepia .article-prose strong,
.reading-theme-sepia .article-prose b {
    color: #fffbeb !important;
    font-weight: 700;
}
.reading-theme-sepia .article-prose section,
.reading-theme-sepia .article-prose div:not([class*="bg-"]):not([class*="border-"]),
.reading-theme-sepia .article-prose p,
.reading-theme-sepia .article-prose span {
    background-color: transparent !important;
}
.reading-theme-sepia .article-prose blockquote {
    background: rgba(217, 119, 6, 0.08) !important;
    border-left-color: #d97706 !important;
    color: #fde68a !important;
}
.reading-theme-sepia .article-prose h2 {
    border-left-color: #d97706 !important;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.12) 0%, transparent 100%) !important;
    color: #fef3c7 !important;
}

.reading-theme-eyecare {
    background-color: #0c1813;
    color: #d1fae5;
}
.reading-theme-eyecare .article-title-heading {
    color: #ecfdf5;
}
.reading-theme-eyecare .article-prose {
    color: #a7f3d0 !important;
}
.reading-theme-eyecare .article-prose,
.reading-theme-eyecare .article-prose *:not(pre):not(code):not(a):not(button):not(svg):not(path) {
    color: #a7f3d0 !important;
}
.reading-theme-eyecare .article-prose h1,
.reading-theme-eyecare .article-prose h2,
.reading-theme-eyecare .article-prose h3 {
    color: #ecfdf5 !important;
}
.reading-theme-eyecare .article-prose strong,
.reading-theme-eyecare .article-prose b {
    color: #f0fdf4 !important;
    font-weight: 700;
}
.reading-theme-eyecare .article-prose section,
.reading-theme-eyecare .article-prose div:not([class*="bg-"]):not([class*="border-"]),
.reading-theme-eyecare .article-prose p,
.reading-theme-eyecare .article-prose span {
    background-color: transparent !important;
}
.reading-theme-eyecare .article-prose blockquote {
    background: rgba(16, 185, 129, 0.08) !important;
    border-left-color: #10b981 !important;
    color: #a7f3d0 !important;
}
.reading-theme-eyecare .article-prose h2 {
    border-left-color: #10b981 !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, transparent 100%) !important;
    color: #ecfdf5 !important;
}

/* 微信与文章排版舒适阅读器 (Article Prose) */
.article-prose {
    font-size: 16px;
    line-height: 1.88;
    color: #cbd5e1;
    word-break: break-word;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.article-prose p {
    margin-bottom: 1.4rem;
    text-align: justify;
    text-justify: inter-ideograph;
    letter-spacing: inherit;
}

.article-prose h1, .article-prose h2, .article-prose h3, .article-prose h4 {
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.4;
}

.article-prose h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 2.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-prose h2 {
    font-size: 1.3rem;
    border-left: 4px solid #6366f1;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, transparent 100%);
    padding: 0.4rem 0.8rem;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-prose h3 {
    font-size: 1.15rem;
    margin-top: 1.6rem;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
}

.article-prose h4 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.article-prose blockquote {
    border-left: 4px solid #818cf8;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.85rem 1.2rem;
    margin: 1.4rem 0;
    border-radius: 0 0.6rem 0.6rem 0;
    color: #cbd5e1;
    font-style: italic;
}

.article-prose blockquote p:last-child {
    margin-bottom: 0;
}

.article-prose ul {
    list-style-type: disc;
    padding-left: 1.6rem;
    margin-bottom: 1.25rem;
}

.article-prose ol {
    list-style-type: decimal;
    padding-left: 1.6rem;
    margin-bottom: 1.25rem;
}

.article-prose li {
    margin-bottom: 0.45rem;
    line-height: 1.75;
}

.article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.article-prose pre, .article-prose code {
    background: #090d16;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.article-prose pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-prose code {
    padding: 0.15rem 0.4rem;
    color: #f472b6;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.article-prose pre code {
    border: none;
    padding: 0;
    background: transparent;
    color: #e2e8f0;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
    font-size: 0.9em;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-prose th, .article-prose td {
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-prose th {
    background: rgba(30, 41, 59, 0.9);
    font-weight: 600;
    color: #f1f5f9;
}

.article-prose tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35);
}

/* 闪卡记忆翻转动效与阴影 */
.flashcard-shadow {
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.15), 0 0 20px rgba(0, 0, 0, 0.6);
}

/* ========================================================
   在线阅读器样式 (EPUB & PDF Reader Styles)
   ======================================================== */
.theme-dark {
    background-color: #0b0f19;
    color: #e2e8f0;
}
.theme-sepia {
    background-color: #f7eed8;
    color: #3f3120;
}
.theme-light {
    background-color: #ffffff;
    color: #1e293b;
}

/* ========================================================
   在线阅读器样式 (EPUB & PDF Reader Styles)
   ======================================================== */
.theme-dark {
    background-color: #0b0f19;
    color: #e2e8f0;
}
/* ========================================================
   沉浸式电子书阅读器（EPUB & PDF）高级排版与主题
   ======================================================== */
.theme-dark {
    background-color: #0b0f19 !important;
    color: #cbd5e1 !important;
}
.theme-dark .epub-chapter-meta {
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}
.theme-dark .epub-content h1, .theme-dark .epub-content h2, .theme-dark .epub-content h3 {
    color: #f8fafc;
}
.theme-dark .epub-nav-card {
    background-color: #131b2e;
    border-color: #1e293b;
    color: #e2e8f0;
}
.theme-dark .epub-nav-card:hover {
    border-color: #6366f1;
    background-color: #1a253e;
}

.theme-sepia {
    background-color: #fbf0d9 !important;
    color: #2c2214 !important;
}
.theme-sepia .epub-chapter-meta {
    border-color: rgba(120, 53, 15, 0.2);
    color: #854d0e;
}
.theme-sepia .epub-content h1, .theme-sepia .epub-content h2, .theme-sepia .epub-content h3 {
    color: #1c1307;
}
.theme-sepia .epub-content p {
    color: #2c2214;
}
.theme-sepia .epub-content blockquote {
    border-left-color: #d97706;
    background: rgba(217, 119, 6, 0.08);
    color: #78350f;
}
.theme-sepia .epub-nav-card {
    background-color: #f2e3c4;
    border-color: #e2d1ae;
    color: #3b2813;
}
.theme-sepia .epub-nav-card:hover {
    border-color: #b45309;
    background-color: #ebd7b2;
}

.theme-eyecare {
    background-color: #dff0e2 !important;
    color: #143522 !important;
}
.theme-eyecare .epub-chapter-meta {
    border-color: rgba(22, 101, 52, 0.2);
    color: #166534;
}
.theme-eyecare .epub-content h1, .theme-eyecare .epub-content h2, .theme-eyecare .epub-content h3 {
    color: #0d2818;
}
.theme-eyecare .epub-content p {
    color: #143522;
}
.theme-eyecare .epub-content blockquote {
    border-left-color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    color: #14532d;
}
.theme-eyecare .epub-nav-card {
    background-color: #d2e8d6;
    border-color: #bfe0c5;
    color: #123821;
}
.theme-eyecare .epub-nav-card:hover {
    border-color: #16a34a;
    background-color: #c5e2cb;
}

.theme-light {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}
.theme-light .epub-chapter-meta {
    border-color: #e2e8f0;
    color: #64748b;
}
.theme-light .epub-content h1, .theme-light .epub-content h2, .theme-light .epub-content h3 {
    color: #0f172a;
}
.theme-light .epub-content p {
    color: #1e293b;
}
.theme-light .epub-content blockquote {
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    color: #475569;
}
.theme-light .epub-nav-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}
.theme-light .epub-nav-card:hover {
    border-color: #6366f1;
    background-color: #f1f5f9;
}

/* 字体栈切换支持 */
.font-reading-sans {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif !important;
    letter-spacing: 0.015em;
}

.font-reading-serif {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "STSong", Georgia, Cambria, serif !important;
    letter-spacing: 0.025em;
}

.font-reading-kaiti {
    font-family: "KaiTi", "STKaiti", "楷体", "楷体_GB2312", "Noto Serif SC", serif !important;
    letter-spacing: 0.03em;
}

.reader-no-indent p {
    text-indent: 0 !important;
}

.epub-content {
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.02em;
}
.epub-content p {
    margin-bottom: 1.4rem;
    text-indent: 2em;
    text-align: justify;
    text-justify: inter-ideograph;
}
.epub-content h1, .epub-content h2, .epub-content h3, .epub-content h4 {
    font-weight: 700;
    margin-top: 2.2rem;
    margin-bottom: 1.1rem;
    text-indent: 0;
    line-height: 1.4;
}

.epub-content img {
    max-width: 92%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.epub-content blockquote {
    border-left: 4px solid #6366f1;
    padding: 0.8rem 1.25rem;
    margin: 1.5rem 0;
    opacity: 0.95;
    font-style: italic;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* PDF 渲染画布居中阴影与纸质感微阴影 */
#pdf-render-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    transition: transform 0.2s ease;
}

/* 阅读器底部悬浮 Dock */
.reader-bottom-dock {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ======================================================== */
/* AI 顶级学习方法研学专案 Markdown 渲染排版 */
/* ======================================================== */
.study-guide-markdown {
    color: #e2e8f0;
    line-height: 1.9;
    font-size: 15px;
    letter-spacing: 0.015em;
    word-break: break-word;
    overflow-wrap: break-word;
}

.study-guide-markdown h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f8fafc;
    margin-top: 1.8rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.study-guide-markdown h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #a5b4fc;
    margin-top: 1.8rem;
    margin-bottom: 0.9rem;
    border-left: 4px solid #6366f1;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, transparent 100%);
    padding: 0.35rem 0.75rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.study-guide-markdown h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: #c7d2fe;
    margin-top: 1.4rem;
    margin-bottom: 0.65rem;
}

.study-guide-markdown h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e7ff;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.study-guide-markdown p {
    margin-bottom: 1.2rem;
    text-align: justify;
    text-justify: inter-ideograph;
    line-height: 1.9;
}

.study-guide-markdown ul, .study-guide-markdown ol {
    margin-bottom: 1.25rem;
    padding-left: 1.6rem;
}

.study-guide-markdown ul {
    list-style-type: disc;
}

.study-guide-markdown ol {
    list-style-type: decimal;
}

.study-guide-markdown li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.study-guide-markdown blockquote {
    border-left: 4px solid #818cf8;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.9rem 1.25rem;
    border-radius: 0 0.6rem 0.6rem 0;
    margin: 1.4rem 0;
    color: #cbd5e1;
    font-style: italic;
}

.study-guide-markdown blockquote p:last-child {
    margin-bottom: 0;
}

.study-guide-markdown hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    margin: 2rem 0;
}

.study-guide-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.6rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.study-guide-markdown th {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.study-guide-markdown td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    line-height: 1.7;
}

.study-guide-markdown tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35);
}

.study-guide-markdown code {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.18rem 0.45rem;
    border-radius: 0.3rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #f472b6;
}

.study-guide-markdown pre {
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.1rem;
    border-radius: 0.6rem;
    overflow-x: auto;
    margin: 1.4rem 0;
}

.study-guide-markdown pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: #e2e8f0;
}

/* ======================================================== */
/* 思维导图通用样式 (Mind Map Canvas & Controls) */
/* ======================================================== */
/* ======================================================== */
/* 章节目录大纲 (TOC Tree & Hierarchy) 美化增强样式 */
/* ======================================================== */
.toc-tree-container {
    position: relative;
}

.toc-tree-item {
    position: relative;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-tree-item:hover {
    transform: translateX(2px);
}

.toc-badge-part {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #e9d5ff;
}

.toc-badge-chapter {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.toc-badge-special {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fde68a;
}

.toc-tree-branch {
    position: relative;
}
.toc-tree-branch::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: rgba(71, 85, 105, 0.6);
}

/* ======================================================== */
/* 移动端 (Mobile UI/UE/UX) 原生化体验与触控增强规范 */
/* ======================================================== */
:root {
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px);
}

/* 安全区适配类 */
.pt-safe {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
}
.pb-safe {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.bottom-nav-safe {
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}

/* 移动端平滑滑入滑出动效 */
@keyframes slideUpDrawer {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUpDrawer 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-fade-in {
    animation: fadeInBackdrop 0.2s ease-out forwards;
}

@keyframes slideLeftDrawer {
    from {
        transform: translateX(-100%);
        opacity: 0.8;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-left {
    animation: slideLeftDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 移动端消除点击高亮蓝框与提升触控响应 */
* {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 767px) {
    body, html {
        touch-action: manipulation;
        overscroll-behavior-y: contain;
    }

    /* 移动端滚动容器惯性滚动 */
    .overflow-y-auto, .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* 针对小屏幕设备隐藏滚动条但保留平滑滚动 */
    .scrollbar-thin::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }
    .scrollbar-thin::-webkit-scrollbar-thumb {
        background: rgba(100, 116, 139, 0.4);
        border-radius: 9999px;
    }

    /* 移动端卡片触控微反馈 */
    .active-scale {
        transition: transform 0.12s ease;
    }
    .active-scale:active {
        transform: scale(0.96);
    }

    /* 移动端沉浸式触感与视觉反馈 */
    .mobile-tab-pill {
        position: relative;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .mobile-tab-pill.active {
        background: rgba(99, 102, 241, 0.15);
        color: #818cf8;
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
    }
    
    /* 移动端手势指示条 */
    .mobile-sheet-handle {
        width: 36px;
        height: 4px;
        background: rgba(148, 163, 184, 0.4);
        border-radius: 9999px;
        margin: 0 auto 0.75rem auto;
        cursor: pointer;
        transition: background 0.15s ease;
    }
    .mobile-sheet-handle:active {
        background: rgba(148, 163, 184, 0.7);
    }

    /* 移动端阅读器沉浸浮动栏 */
    .mobile-reader-floating-bar {
        background: rgba(15, 23, 42, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(51, 65, 85, 0.8);
        box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8);
    }
}

/* ========================================================
   听书与听文章全能随身听 (Audio Reader & TTS UI Enhancement)
   ======================================================== */

/* 正在朗读段落/分句卡拉OK高亮与边缘律动 */
.audio-karaoke-active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.04) 100%) !important;
    border-left: 4px solid #10b981 !important;
    padding-left: 0.85rem !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.15) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 播放核心按钮呼吸光晕 */
@keyframes audioPlayPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.4), 0 0 30px rgba(16, 185, 129, 0.15);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.65), 0 0 45px rgba(16, 185, 129, 0.3);
        transform: scale(1.02);
    }
}
.audio-play-glow {
    animation: audioPlayPulse 2.4s ease-in-out infinite;
}

/* 黑胶唱片沟槽与旋转光晕 */
.vinyl-disc {
    background: radial-gradient(circle, #334155 0%, #1e293b 30%, #0f172a 60%, #020617 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), inset 0 0 0 6px rgba(0, 0, 0, 0.6), 0 12px 30px -5px rgba(0, 0, 0, 0.8);
}

/* 声波频谱均衡器动态高度变化 */
@keyframes eqBar1 { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@keyframes eqBar2 { 0%, 100% { height: 16px; } 50% { height: 6px; } }
@keyframes eqBar3 { 0%, 100% { height: 8px; } 50% { height: 22px; } }
@keyframes eqBar4 { 0%, 100% { height: 19px; } 50% { height: 5px; } }

.eq-bar-1 { animation: eqBar1 0.7s ease-in-out infinite; }
.eq-bar-2 { animation: eqBar2 0.95s ease-in-out infinite 0.15s; }
.eq-bar-3 { animation: eqBar3 0.8s ease-in-out infinite 0.3s; }
.eq-bar-4 { animation: eqBar4 1.1s ease-in-out infinite 0.1s; }

/* 朗读进度条个性化滑块 */
.audio-range-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #1e293b;
    outline: none;
    border-radius: 9999px;
    height: 6px;
    transition: height 0.15s ease;
}
.audio-range-slider:hover {
    height: 8px;
}
.audio-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.audio-range-slider::-webkit-slider-thumb:hover,
.audio-range-slider::-webkit-slider-thumb:active {
    transform: scale(1.25);
    background: #34d399;
}

/* ========================================================
   在线阅读按钮：定高与自适应文字宽度规范
   ======================================================== */
.btn-reader-online {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.btn-reader-card {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

/* ========================================================
   5.1 双流同屏对照、视网膜浮空 HUD 与极客心流样式规范
   ======================================================== */
.dual-stream-divider {
    width: 3px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.4) 0%, rgba(147, 51, 234, 0.4) 50%, rgba(99, 102, 241, 0.4) 100%);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
    cursor: col-resize;
    position: relative;
    z-index: 10;
}

.scholar-hud-floating {
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.85), 0 0 20px rgba(99, 102, 241, 0.3);
    animation: hud-appear 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hud-appear {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.command-palette-backdrop {
    animation: palette-fade-in 0.15s ease-out;
}

@keyframes palette-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vim-toast-badge {
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #f8fafc;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(99, 102, 241, 0.3);
    animation: vim-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes vim-pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ========================================================
   5.2 跨专著隐式共鸣天线 & 动态概念冲突仲裁场样式规范
   ======================================================== */
.animate-slide-left {
    animation: slideLeftDrawer 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideLeftDrawer {
    from {
        transform: translateX(100%);
        opacity: 0.7;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 辩证裁决 Markdown 格式美化 */
.arbitration-markdown-rendered h1,
.arbitration-markdown-rendered h2,
.arbitration-markdown-rendered h3 {
    color: #f8fafc;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.arbitration-markdown-rendered h2 {
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    padding-bottom: 0.35rem;
    color: #fbbf24;
}

.arbitration-markdown-rendered h3 {
    color: #a78bfa;
}

.arbitration-markdown-rendered p {
    margin-bottom: 0.85rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.arbitration-markdown-rendered blockquote {
    border-left: 3px solid #f59e0b;
    padding-left: 0.85rem;
    margin: 0.8rem 0;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 0 0.5rem 0.5rem 0;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.arbitration-markdown-rendered table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.75rem;
}

.arbitration-markdown-rendered th,
.arbitration-markdown-rendered td {
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.arbitration-markdown-rendered th {
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    font-weight: 600;
}

.arbitration-markdown-rendered tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.4);
}

.arbitration-markdown-rendered ul, 
.arbitration-markdown-rendered ol {
    padding-left: 1.2rem;
    margin-bottom: 0.8rem;
    color: #cbd5e1;
}

.arbitration-markdown-rendered li {
    margin-bottom: 0.3rem;
    line-height: 1.6;
}

/* ========================================================
   5.3 深度批注系统 (Marginalia 2.0) 与研学资产批阅批准工作台样式
   ======================================================== */
.marginalia-highlight {
    cursor: pointer;
    border-radius: 3px;
    padding: 1px 2px;
    margin: 0 1px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.marginalia-highlight:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.marginalia-highlight.active-focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

/* 视网膜选区极速浮标动画 */
@keyframes popInActionPill {
    0% {
        transform: translate(-50%, -90%) scale(0.92);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 1;
    }
}

.animate-pop {
    animation: popInActionPill 0.16s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 边白卡片流视差平滑吸附 */
.marginalia-gutter-sidebar {
    will-change: width, transform;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.marginalia-gutter-sidebar::-webkit-scrollbar {
    width: 4px;
}

.marginalia-gutter-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 2px;
}

/* 典藏认证金标流光动效 */
@keyframes goldenGlow {
    0%, 100% {
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.8);
    }
}

.golden-curated-card {
    animation: goldenGlow 3s ease-in-out infinite;
}

/* ========================================================
   5.4 视听同频微光波纹跟随 (Karaoke 2.0) 与 原位挖空自测 (Cloze Active Recall)
   ======================================================== */

/* 1. 视听同频微光波纹 */
@keyframes karaokeWaveGlow {
    0% {
        background-color: rgba(16, 185, 129, 0.28);
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
    }
    100% {
        background-color: rgba(99, 102, 241, 0.28);
        box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
    }
}

.karaoke-micro-wave {
    border-radius: 4px;
    padding: 1px 4px;
    margin: 0 1px;
    color: #ffffff !important;
    font-weight: 600;
    animation: karaokeWaveGlow 2.2s ease-in-out infinite alternate;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 2px solid #10b981;
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* 2. 原位挖空遮挡自测模式 (Cloze Active Recall) */
.cloze-hidden {
    background-color: #1e293b !important;
    color: transparent !important;
    border-radius: 4px;
    padding: 1px 6px;
    user-select: none;
    cursor: pointer;
    border-bottom: 2px dashed #f59e0b !important;
    position: relative;
    display: inline-block;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cloze-hidden::after {
    content: "🙈 点击自测";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e1;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.cloze-hidden:hover {
    background-color: #334155 !important;
    border-bottom-color: #fbbf24 !important;
    transform: scale(1.02);
}

.cloze-revealed {
    background-color: rgba(16, 185, 129, 0.25) !important;
    color: inherit !important;
    border-radius: 4px;
    padding: 1px 4px;
    border-bottom: 2px solid #10b981 !important;
    animation: popInActionPill 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ========================================================
   6.0 / Phase 6.1: 边白物理吸附、微流态自适应排版与证据链沙盘
   ======================================================== */

/* 边白物理吸附与避让排版 (REQ-604) */
.marginalia-gutter-physics-container {
    position: relative;
    min-height: 100%;
}

.marginalia-card-physics {
    transform: translateY(var(--card-top, 0px));
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.marginalia-card-physics:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.7) !important;
    transform: translateY(var(--card-top, 0px)) scale(1.015);
}

/* 认知负荷感知与微流态自适应排版 (REQ-605) */
.paragraph-fluid-cognitive-high {
    transition: line-height 0.35s ease, letter-spacing 0.35s ease, padding 0.35s ease, background-color 0.35s ease;
    border-radius: 6px;
}

.paragraph-fluid-cognitive-l3 {
    line-height: 2.10em !important;
    letter-spacing: 0.025em;
    margin-bottom: 1.5em !important;
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    padding-left: 0.85rem !important;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.paragraph-fluid-cognitive-l4 {
    line-height: 2.25em !important;
    letter-spacing: 0.035em;
    margin-bottom: 1.8em !important;
    border-left: 3px solid rgba(245, 158, 11, 0.7);
    padding-left: 0.85rem !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
}

/* 核心逻辑衔接词呼吸显像 */
.cognitive-logic-accent {
    font-weight: 700;
    color: #38bdf8 !important;
    border-bottom: 1.5px dashed rgba(56, 189, 248, 0.6);
    padding-bottom: 1px;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
    transition: all 0.2s ease;
}

.cognitive-logic-accent:hover {
    color: #0284c7 !important;
    background-color: rgba(56, 189, 248, 0.15);
    border-radius: 3px;
}

/* 证据探针失真度仪表盘与沙盘滑块 */
.causal-slider-track {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #1e293b;
    outline: none;
    transition: background 0.2s;
}

.causal-slider-track::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f59e0b;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.causal-slider-track::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: #fbbf24;
}

/* 相变崩溃警报脉冲 */
@keyframes phaseCollapsePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(244, 63, 94, 0);
    }
}

.phase-collapse-alert-pulse {
    animation: phaseCollapsePulse 1.8s infinite;
}

/* ========================================================
   6.0 / Phase 6.2 & 6.3: 假说涌现星云与先哲研学圆桌
   ======================================================== */

/* 假说涌现星云卡片 */
.hypothesis-nebula-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hypothesis-nebula-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5) !important;
}

.hypothesis-card-selected {
    border-color: rgba(168, 85, 247, 0.8) !important;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.3) 0%, rgba(30, 27, 75, 0.4) 100%) !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

/* 先哲研学圆桌在席学者脉冲光环 */
@keyframes scholarPulseHalo {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
        border-color: #f59e0b;
    }
    50% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
        border-color: #fbbf24;
    }
}

.colloquium-scholar-speaking {
    animation: scholarPulseHalo 1.8s infinite;
    transform: scale(1.05);
}

/* 白板导图概念气泡微动效 */
.colloquium-mindmap-pill {
    animation: popInActionPill 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ========================================================
   PC Web 模式全局弹窗最大化增强系统 (Universal Modal Maximizer)
   ======================================================== */
@media (min-width: 768px) {
    /* 最大化时的遮罩层样式 */
    .modal-backdrop-maximized {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        z-index: 1050 !important;
    }

    /* 最大化时的弹窗主体容器样式 */
    .modal-container-maximized {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        transition: width 0.15s cubic-bezier(0.16, 1, 0.3, 1), height 0.15s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.15s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* 内部滚动区域自适应填满全屏高度 */
    .modal-container-maximized .modal-body-scroll,
    .modal-container-maximized > .flex-1,
    .modal-container-maximized [class*="overflow-y-auto"],
    .modal-container-maximized [class*="max-h-"] {
        max-height: none !important;
        flex: 1 1 0% !important;
    }

    /* 最大化切换按钮样式 */
    .modal-maximize-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 1.85rem;
        height: 1.85rem;
        margin-right: 0.375rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(71, 85, 105, 0.45);
        background-color: rgba(30, 41, 59, 0.65);
        color: #94a3b8;
        cursor: pointer;
        user-select: none;
        transition: all 0.15s ease;
        flex-shrink: 0;
    }

    .modal-maximize-btn:hover {
        background-color: rgba(51, 65, 85, 0.95);
        color: #ffffff;
        border-color: rgba(148, 163, 184, 0.6);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    }

    .modal-maximize-btn:active {
        transform: scale(0.92);
    }

    .modal-header-maximizable {
        cursor: default;
        user-select: none;
    }
}

/* 移动端 (< 768px) 隐藏最大化按钮，保持原生移动端交互与样式 */
@media (max-width: 767px) {
    .modal-maximize-btn {
        display: none !important;
    }
}

/* ========================================================
   OmniFlow Phase 1: 禅意全屏画布、流光心流细线与无感闪念捕获
   ======================================================== */

/* 1. 禅意全屏画布 (Zen Fullscreen Canvas) */
.reader-zen-mode .zen-reader-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
    z-index: 45 !important;
    pointer-events: none;
}

.reader-zen-mode .zen-reader-header.zen-header-revealed {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.reader-zen-mode.zen-cursor-idle {
    cursor: none !important;
}

.reader-zen-mode.zen-cursor-idle .zen-floating-hud,
.reader-zen-mode.zen-cursor-idle .reader-bottom-dock,
.reader-zen-mode.zen-cursor-idle .mobile-reader-floating-bar {
    opacity: 0.12 !important;
    transition: opacity 0.6s ease;
}

.zen-floating-hud {
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

/* 禅意模式下让正文四周压暗聚焦，突出中心黄金版心 */
.reader-zen-mode #epub-viewport-container.theme-dark,
.reader-zen-mode #pdf-viewport-container.theme-dark {
    background: radial-gradient(circle at center, #0f172a 0%, #020617 85%) !important;
}

/* 2. 顶端流光心流细线 (Subtle Flow Breathing Horizon) */
.flow-horizon-track {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 90;
    background: rgba(15, 23, 42, 0.45);
    transition: height 0.2s ease;
    cursor: pointer;
}

.flow-horizon-track:hover {
    height: 5px;
}

.flow-horizon-progress {
    height: 100%;
    transition: width 1s linear, background 1.2s ease;
    border-top-right-radius: 9999px;
    border-bottom-right-radius: 9999px;
    position: relative;
}

.flow-horizon-progress.flow-phase-ignition {
    background: linear-gradient(90deg, #6366f1, #818cf8, #a78bfa);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.55);
}

@keyframes flowHorizonBreath {
    0%, 100% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 16px rgba(6, 182, 212, 0.85);
        filter: brightness(1.18);
    }
}

.flow-horizon-progress.flow-phase-steady {
    background: linear-gradient(90deg, #10b981, #06b6d4, #38bdf8);
    animation: flowHorizonBreath 4s ease-in-out infinite;
}

@keyframes flowSoftLandingPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.9);
    }
}

.flow-horizon-progress.flow-phase-soft-landing {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #fcd34d);
    animation: flowSoftLandingPulse 3s ease-in-out infinite;
}

/* 3. 原位无感闪念捕获微条与突触火花动效 (In-Situ Flash Capture & Synapse Spark) */
.flash-capture-bar {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.35), 0 0 24px rgba(79, 70, 229, 0.2);
}

@keyframes synapseSparkFloat {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.85);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1.04);
    }
    80% {
        opacity: 1;
        transform: translateY(-6px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-22px) scale(0.92);
    }
}

.synapse-spark-toast {
    animation: synapseSparkFloat 2.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================
   OmniFlow Phase 2: 行级视界聚光灯与 DDA 原位调谐系统
   ======================================================== */

/* 1. 行级/段落级视界聚光灯 (Line/Paragraph Spotlight Mode) */
#epub-viewport-container.spotlight-reading-active .epub-content > p,
#epub-viewport-container.spotlight-reading-active .epub-content > li,
#epub-viewport-container.spotlight-reading-active .epub-content > blockquote,
#epub-viewport-container.spotlight-reading-active .epub-content > h1,
#epub-viewport-container.spotlight-reading-active .epub-content > h2,
#epub-viewport-container.spotlight-reading-active .epub-content > h3,
#epub-viewport-container.spotlight-reading-active .epub-content > h4,
#epub-viewport-container.spotlight-reading-active .epub-content > pre,
#epub-viewport-container.spotlight-reading-active .epub-content > ul,
#epub-viewport-container.spotlight-reading-active .epub-content > ol {
    opacity: 0.28;
    filter: blur(0.25px);
    transition: opacity 0.26s ease, filter 0.26s ease, background-color 0.26s ease, border-color 0.26s ease, padding-left 0.26s ease;
}

#epub-viewport-container.spotlight-reading-active .epub-content .spotlight-active-block {
    opacity: 1 !important;
    filter: none !important;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.02) 100%);
    border-left: 3px solid rgba(129, 140, 248, 0.85);
    padding-left: 14px;
    border-radius: 0 10px 10px 0;
}

#epub-viewport-container.theme-light.spotlight-reading-active .epub-content .spotlight-active-block,
#epub-viewport-container.theme-sepia.spotlight-reading-active .epub-content .spotlight-active-block,
#epub-viewport-container.theme-eyecare.spotlight-reading-active .epub-content .spotlight-active-block {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.07) 0%, rgba(99, 102, 241, 0.01) 100%);
    border-left-color: #6366f1;
}

/* 2. 高负荷认知段落自动呼吸留白 (DDA Micro-Fluid Breathing) */
.dda-breathing-block {
    line-height: 2.18 !important;
    letter-spacing: 0.025em !important;
    padding-top: 4px;
    padding-bottom: 4px;
    transition: line-height 0.35s ease, letter-spacing 0.35s ease;
}

/* 3. DDA 原位无模态提示胶囊与调谐卡片 (In-Situ DDA Nudge & Card) */
.dda-nudge-pill {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.65), 0 0 18px rgba(99, 102, 241, 0.25);
}

.dda-insitu-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(148, 163, 184, 0.16);
}

/* ========================================================
   OmniFlow Phase 3: 神经声景均衡律动、突触电脉冲光弧与软着陆反馈
   ======================================================== */

@keyframes ambientEqualizerPulse {
    0%, 100% {
        transform: scaleY(0.38);
        opacity: 0.72;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.ambient-eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
}

.ambient-eq-bar {
    width: 2.5px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, #34d399, #22d3ee);
    transform-origin: bottom center;
    animation: ambientEqualizerPulse 0.9s ease-in-out infinite;
}

.ambient-eq-bar:nth-child(2) {
    animation-delay: 0.18s;
}

.ambient-eq-bar:nth-child(3) {
    animation-delay: 0.36s;
}

.ambient-eq-bar:nth-child(4) {
    animation-delay: 0.54s;
}

@keyframes synapseRingExpand {
    0% {
        transform: scale(0.35);
        opacity: 0.92;
    }
    70% {
        transform: scale(1.85);
        opacity: 0.45;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes synapseBeamArc {
    0% {
        stroke-dashoffset: 320;
        opacity: 0.95;
    }
    55% {
        stroke-dashoffset: 0;
        opacity: 0.9;
    }
    100% {
        stroke-dashoffset: -160;
        opacity: 0;
    }
}

.synapse-pulse-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1020;
    overflow: hidden;
}

.synapse-pulse-ring {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    border: 2px solid rgba(56, 189, 248, 0.85);
    box-shadow: 0 0 24px rgba(129, 140, 248, 0.65), inset 0 0 12px rgba(34, 211, 238, 0.45);
    animation: synapseRingExpand 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.synapse-pulse-beam {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: synapseBeamArc 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.flow-soft-landing-pill {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px -6px rgba(217, 119, 6, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.flow-debrief-waveform {
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 60%), rgba(2, 6, 23, 0.85);
}

/* ======================================================== */
/* OmniBook 8.0-R1: 止血清雷与认知减负 UI/UE 组件样式       */
/* ======================================================== */
.omni-toast-stack {
    position: fixed;
    top: 1.15rem;
    right: 1.15rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 2rem));
}

.omni-toast-item {
    pointer-events: auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.memory-whisper-bar {
    height: 36px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.88), rgba(49, 46, 129, 0.72), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid rgba(129, 140, 248, 0.28);
}

.selection-pill-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    z-index: 1010;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(148, 163, 184, 0.18);
}

