:root {
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --secondary: #64748b;
  --accent: #f59e0b;
  --success: #10b981;
  --bg-body: #f3f4f6;
  --border: #e5e7eb;
  --text-main: #1f2937;
  --header-height: 60px;
  --sidebar-width: 280px;
  --bg-card: #ffffff;
  --bg-subtle: #f9fafb;
  --heatmap-0: #ebedf0;
  --heatmap-1: #9be9a8;
  --heatmap-2: #40c463;
  --heatmap-3: #30a14e;
  --heatmap-4: #216e39;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg-body); color: var(--text-main); overflow: hidden; }

/* --- Header --- */
header {
  height: var(--header-height); background: white; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); z-index: 50; flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #111827; }
.brand i { color: var(--primary); }

.mobile-menu-btn { display: none; font-size: 20px; color: var(--text-main); background: none; border: none; padding: 5px; }

.header-actions { display: flex; gap: 8px; }
.header-btn {
  background: white; border: 1px solid var(--border); padding: 6px 10px; border-radius: 6px;
  font-size: 12px; color: var(--secondary); cursor: pointer; display: flex; align-items: center; gap: 4px;
}

/* --- Layout --- */
.layout { display: flex; flex: 1; overflow: hidden; position: relative; }

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width); background: white; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; z-index: 40;
  transition: transform 0.3s ease;
}

.sidebar-header { padding: 15px; border-bottom: 1px solid var(--border); background: #f9fafb; }
.input-stack { display: flex; flex-direction: column; gap: 10px; }

.modern-input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.header-btn.disabled { opacity: 0.6; filter: grayscale(20%); }
.btn-primary { width: 100%; background: var(--primary); color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-primary:hover { opacity: 0.9; }

/* 折叠面板 */
.accordion { border-bottom: 1px solid var(--border); }
.accordion-header {
  padding: 12px 15px; background: white; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--secondary);
}
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: #fff; }
.accordion.open .accordion-content { max-height: 60vh; overflow-y: auto; }

.list-item {
  padding: 12px 15px; border-bottom: 1px solid #f3f4f6; font-size: 13px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.list-item:active, .list-item:hover { background: var(--primary-light); }
.list-item.active { background: var(--primary-light); border-left: 3px solid var(--primary); color: var(--primary); font-weight: 600; }

.list-item .delete-btn {
  opacity: 0; transition: opacity 0.2s; padding: 2px 8px; font-size: 10px;
  background: #ef4444; color: white; border: none; border-radius: 4px; cursor: pointer; margin-left: 8px;
}
.list-item:hover .delete-btn { opacity: 0.7; }
.list-item .delete-btn:hover { opacity: 1 !important; }

/* --- Main Content --- */
.main-content {
  flex: 1; display: flex; flex-direction: column; overflow-y: auto; scroll-behavior: smooth;
  background: var(--bg-body); position: relative; -webkit-overflow-scrolling: touch;
}
.content-wrapper { max-width: 900px; margin: 0 auto; width: 100%; padding: 20px; box-sizing: border-box; flex: 1; }

#welcomeState { text-align: center; padding: 60px 20px; }
#welcomeState .features-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; text-align: left; }
#welcomeState .feature-card { background: white; padding: 20px; border-radius: 8px; border: 1px solid var(--border); }
#welcomeState .feature-card h4 { margin: 0 0 10px 0; }
#welcomeState .feature-card p { font-size: 12px; color: #666; margin: 0; }

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

/* --- Prose (样式修复：表格) --- */
.prose { line-height: 1.8; color: #374151; font-size: var(--reader-font-size, 16px); word-wrap: break-word; }
.prose h1 { border-bottom: 3px solid var(--primary); padding-bottom: 15px; margin-bottom: 25px; font-size: 24px; color: #111827; }
.prose h2 { margin-top: 35px; font-size: 20px; color: #1e293b; border-left: 4px solid var(--primary); padding-left: 12px; background: linear-gradient(90deg, #f8fafc, transparent); padding-top: 5px; padding-bottom: 5px; border-radius: 0 4px 4px 0; }
.prose h3 { margin-top: 25px; font-size: 17px; color: #334155; font-weight: 700; border-bottom: 1px dashed #e2e8f0; padding-bottom: 5px; }

/* ⚡️ 表格样式终极修复 ⚡️ */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  /* 核心修复：强制换行，避免撑破 */
  table-layout: fixed; 
  word-wrap: break-word;
  white-space: normal; 
}
.prose th { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  color: white; 
  padding: 12px; 
  text-align: left; 
  white-space: normal; /* 允许表头换行 */
}
.prose td { 
  border: 1px solid #e2e8f0; 
  padding: 12px; 
  vertical-align: top;
  white-space: normal; /* 允许内容换行 */
  word-break: break-word;
}
.prose tr:nth-child(even) { background: #f8f9fa; }

/* 精细阅读表格列宽优化 - 使用更兼容的方式 */
.prose .chapter-overview-table th:first-child,
.prose .chapter-overview-table td:first-child {
  width: 15%;
  text-align: center;
  font-weight: bold;
}
.prose .chapter-overview-table th:nth-child(2),
.prose .chapter-overview-table td:nth-child(2) {
  width: 85%;
}

.prose .golden-quotes-table th:first-child,
.prose .golden-quotes-table td:first-child {
  width: 8%;
  text-align: center;
  font-weight: bold;
}
.prose .golden-quotes-table th:nth-child(2),
.prose .golden-quotes-table td:nth-child(2) {
  width: 32%;
}
.prose .golden-quotes-table th:nth-child(3),
.prose .golden-quotes-table td:nth-child(3) {
  width: 60%;
}

/* 列表与引用 */
.prose blockquote { border-left: 4px solid var(--accent); background: #fffbeb; padding: 15px; margin: 15px 0; border-radius: 4px; color: #92400e; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose input[type="checkbox"] { margin-right: 10px; transform: scale(1.2); accent-color: var(--primary); cursor: pointer; }

/* Mermaid */
.mermaid { background: white; padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px; margin: 20px 0; text-align: center; overflow-x: auto; }

/* 交互区 */
.interactive-zone { margin-top: 40px; padding-top: 30px; border-top: 1px dashed #cbd5e1; }
.card-box { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
.socratic-theme { border-top: 4px solid #10b981; }
.deep-theme { border-top: 4px solid var(--primary); }

.chat-box { max-height: 250px; overflow-y: auto; background: #f9fafb; border-radius: 8px; padding: 12px; margin: 12px 0; }
.msg { padding: 8px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 8px; max-width: 90%; }
.msg.ai { background: white; border: 1px solid #e2e8f0; align-self: flex-start; }
.msg.user { background: var(--primary-light); color: var(--primary); margin-left: auto; text-align: right; }

.input-row { display: flex; gap: 8px; }
.btn-send { background: var(--primary); color: white; border: none; padding: 0 15px; border-radius: 6px; font-size: 13px; white-space: nowrap; cursor: pointer; }

@media (max-width: 768px) {
  .sidebar { position: absolute; top: 0; left: 0; bottom: 0; width: 85%; transform: translateX(-100%); box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
  .sidebar.active { transform: translateX(0); }
  .mobile-menu-btn { display: block; }
  .header-actions span { display: none; }
  .content-wrapper { padding: 15px; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 30; display: none; opacity: 0; transition: opacity 0.3s; }
  .sidebar-overlay.active { display: block; opacity: 1; }
}

/* Admin Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal { background: white; width: 100%; max-width: 400px; border-radius: 12px; padding: 25px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

/* ===== 护眼模式 (sepia) ===== */
html[data-theme="sepia"] {
  --bg-card: #fbf5e6;
  --bg-subtle: #f4ecd8;
  --primary: #8b5a2b;
  --primary-light: #ece0c8;
  --secondary: #7c6853;
  --bg-body: #f4ecd8;
  --border: #e0d3b4;
  --text-main: #433422;
  --heatmap-0: #e8e0d0;
  --heatmap-1: #c6dba0;
  --heatmap-2: #8dba56;
  --heatmap-3: #5d9028;
  --heatmap-4: #3a6e14;
}
html[data-theme="sepia"] body { background: var(--bg-body); color: var(--text-main); }
html[data-theme="sepia"] header,
html[data-theme="sepia"] .sidebar,
html[data-theme="sepia"] .modal,
html[data-theme="sepia"] .card-box,
html[data-theme="sepia"] .accordion-header,
html[data-theme="sepia"] .accordion.open .accordion-content { background: #fbf5e6; color: var(--text-main); }
html[data-theme="sepia"] .sidebar-header { background: #f0e6ce; }
html[data-theme="sepia"] .header-btn,
html[data-theme="sepia"] .modern-input,
html[data-theme="sepia"] .chat-box { background: #f4ecd8; color: var(--text-main); border-color: var(--border); }
html[data-theme="sepia"] .brand, html[data-theme="sepia"] .brand span { color: #382c1e; }
html[data-theme="sepia"] .list-item { border-color: #e5dac0; }
html[data-theme="sepia"] .list-item:hover { background: #ece0c8; }
html[data-theme="sepia"] .list-item.active { background: #e5dac0; }
html[data-theme="sepia"] .main-content { background: var(--bg-body); }
html[data-theme="sepia"] .prose { color: #433422; }
html[data-theme="sepia"] .prose h1 { color: #2d2215; }
html[data-theme="sepia"] .prose h2 { color: #382c1e; background: linear-gradient(90deg,#ece0c8,transparent); }
html[data-theme="sepia"] .prose h3 { color: #433422; border-color: #e0d3b4; }
html[data-theme="sepia"] .prose table { background: #fbf5e6; box-shadow: none; }
html[data-theme="sepia"] .prose th { background: #ebdcc0; color: #382c1e; }
html[data-theme="sepia"] .prose td { border-color: #e0d3b4; color: #433422; }
html[data-theme="sepia"] .prose tr:nth-child(even) { background: #f6efe0; }
html[data-theme="sepia"] .prose blockquote { background: #eae0c8; color: #4a3820; border-left: 4px solid #8b5a2b; }
html[data-theme="sepia"] .prose pre, html[data-theme="sepia"] .prose code { background: #ebdcc0; color: #2d2215; }
html[data-theme="sepia"] .mermaid { background: #fbf5e6; border-color: #e0d3b4; }
html[data-theme="sepia"] .msg.ai { background: #fbf5e6; border-color: #e0d3b4; color: var(--text-main); }
html[data-theme="sepia"] #welcomeState .feature-card { background: #fbf5e6; }
html[data-theme="sepia"] #welcomeState h2 { color: #2d2215; }
html[data-theme="sepia"] .dr-hl { background: #eed7a1; color: #3c2d18; }
html[data-theme="sepia"] #searchResults { background: #fbf5e6; }
html[data-theme="sepia"] #fcQuestion { background: #ebdcc0; color: #382c1e; }
html[data-theme="sepia"] #fcAnswer { background: #e3ebd3; border-color: #bed5a3; color: #254619; }
html[data-theme="sepia"] .source-pane { background: #fbf5e6; color: #433422; }
html[data-theme="sepia"] .src-hit { background-color: #ecd28f !important; }
html[data-theme="sepia"] #askAiCard, html[data-theme="sepia"] .recap-card { background: #fbf5e6; color: var(--text-main); border-color: var(--border); }

/* ===== 暗黑模式 ===== */
html[data-theme="dark"] {
  --bg-card: #1e293b;
  --bg-subtle: #172033;
  --primary-light: #312e81;
  --secondary: #94a3b8;
  --bg-body: #0f172a;
  --border: #334155;
  --text-main: #e2e8f0;
  --heatmap-0: #1e293b;
  --heatmap-1: #0e4429;
  --heatmap-2: #006d32;
  --heatmap-3: #26a641;
  --heatmap-4: #39d353;
}
html[data-theme="dark"] body { background: var(--bg-body); color: var(--text-main); }
html[data-theme="dark"] header,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .card-box,
html[data-theme="dark"] .accordion-header,
html[data-theme="dark"] .accordion.open .accordion-content { background: #1e293b; }
html[data-theme="dark"] .sidebar-header { background: #172033; }
html[data-theme="dark"] .header-btn,
html[data-theme="dark"] .modern-input,
html[data-theme="dark"] .chat-box { background: #0f172a; color: var(--text-main); border-color: var(--border); }
html[data-theme="dark"] .brand, html[data-theme="dark"] .brand span { color: #f1f5f9; }
html[data-theme="dark"] .list-item { border-color: #273449; }
html[data-theme="dark"] .main-content { background: var(--bg-body); }
html[data-theme="dark"] .prose { color: #cbd5e1; }
html[data-theme="dark"] .prose h1 { color: #f1f5f9; }
html[data-theme="dark"] .prose h2 { color: #e2e8f0; background: linear-gradient(90deg,#1e293b,transparent); }
html[data-theme="dark"] .prose h3 { color: #cbd5e1; border-color: #334155; }
html[data-theme="dark"] .prose table { background: #0f172a; box-shadow: none; }
html[data-theme="dark"] .prose th { background: #1e1b4b; color: #e2e8f0; }
html[data-theme="dark"] .prose td { border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .prose tr:nth-child(even) { background: #172033; }
html[data-theme="dark"] .prose blockquote { background: #3b2f0b; color: #fde68a; }
html[data-theme="dark"] .mermaid { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .msg.ai { background: #1e293b; border-color: #334155; color: var(--text-main); }
html[data-theme="dark"] #welcomeState .feature-card { background: #1e293b; }
html[data-theme="dark"] #welcomeState h2 { color: #f1f5f9; }

/* 全局搜索结果 */
.search-result { padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12px; }
.search-result:hover { background: var(--primary-light); }
.search-result .sr-title { font-weight: 600; color: var(--primary); margin-bottom: 3px; }
.search-result .sr-snippet { color: var(--secondary); line-height: 1.5; }
.search-result mark { background: #fde68a; color: inherit; padding: 0 2px; border-radius: 2px; }
/* 划词高亮 */
.dr-hl { background: #fef08a; border-radius: 2px; padding: 0 1px; cursor: help; }
.dr-hl[data-note]:not([data-note=""]) { border-bottom: 2px dotted #b45309; }
html[data-theme="dark"] .dr-hl { background: #854d0e; color: #fde68a; }
html[data-theme="dark"] #searchResults { background: #1e293b; }
html[data-theme="dark"] #fcQuestion { background: #312e81; color: #e2e8f0; }
html[data-theme="dark"] #fcAnswer { background: #052e16; border-color: #14532d; color: #d1fae5; }

/* D8: 原文与对照视图 */
.reader-container {
  display: block;
  width: 100%;
}

.source-pane {
  background: var(--bg-card, #ffffff);
  border-radius: 8px;
  line-height: 1.8;
  font-size: var(--reader-font-size, 16px);
}

.source-pane p {
  margin-bottom: 1em;
  padding: 2px 4px;
}

html[data-theme="dark"] .source-pane {
  background: var(--bg-card, #1e293b);
  color: #cbd5e1;
}

/* 对照模式 - 桌面端左右两栏、各自滚动 */
@media (min-width: 769px) {
  .reader-container.compare-mode {
    display: flex;
    gap: 20px;
    align-items: stretch;
  }
  .reader-container.compare-mode #outputArea,
  .reader-container.compare-mode #sourcePane {
    flex: 1;
    min-width: 0;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
  }
}

/* 对照模式 - 移动端上下排列，原文栏可滚动 */
@media (max-width: 768px) {
  .reader-container.compare-mode {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .reader-container.compare-mode #sourcePane {
    max-height: 45vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    box-sizing: border-box;
  }
}

/* 原文高亮命中动效 */
.src-hit {
  background-color: #fef08a !important;
  transition: background-color 3s ease;
  border-radius: 4px;
}
html[data-theme="dark"] .src-hit {
  background-color: #854d0e !important;
}

/* 引用核对徽标 */
.quote-badge {
  font-size: 13px;
  user-select: none;
}
.quote-badge.ok:hover {
  transform: scale(1.15);
}

/* 朗读高亮与控制浮条 (T3) */
.tts-reading {
  background-color: #fef08a !important;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}
html[data-theme="sepia"] .tts-reading {
  background-color: #ecd28f !important;
  color: #433422;
}
html[data-theme="dark"] .tts-reading {
  background-color: #854d0e !important;
  color: #fef08a;
}

.tts-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 95;
}
html[data-theme="sepia"] .tts-bar {
  background: #fbf5e6;
  border-color: #e0d3b4;
  color: #433422;
}
html[data-theme="dark"] .tts-bar {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

/* 骨架屏与生成状态 (T4) */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 0;
}
.skeleton-line {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
html[data-theme="sepia"] .skeleton-line {
  background: linear-gradient(90deg, #e0d3b4 25%, #ece0c8 50%, #e0d3b4 75%);
  background-size: 200% 100%;
}
html[data-theme="dark"] .skeleton-line {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

.gen-status {
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
html[data-theme="sepia"] .gen-status {
  background: #ece0c8;
  color: #8b5a2b;
}
html[data-theme="dark"] .gen-status {
  background: #1e1b4b;
  color: #a5b4fc;
}

/* 跨时空对比卡片：旧缓存里写死了浅黄底色，暗色/护眼主题下覆盖掉 */
html[data-theme="dark"] .card-box[style*="fefce8"] { background: #2a2410 !important; border-color: #854d0e !important; }
html[data-theme="dark"] .card-box[style*="fefce8"] h3 { color: #fde68a !important; }
html[data-theme="dark"] .card-box[style*="fefce8"] div { color: #e2e8f0; }
html[data-theme="sepia"] .card-box[style*="fefce8"] { background: #f7ecd0 !important; border-color: #d9c48f !important; }

/* ===== 阶段 4C 样式适配 (v13.0) ===== */
/* 思维导图 Markmap */
#mindmapSvgContainer svg {
  width: 100%;
  height: 70vh;
  min-height: 450px;
  background: var(--bg-card, #ffffff);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-sizing: border-box;
}
#mindmapSvgContainer svg .markmap-foreign {
  color: var(--text-main, #1f2937);
  cursor: pointer;
  user-select: none;
}
#mindmapSvgContainer svg .markmap-foreign:hover {
  opacity: 0.8;
  text-decoration: underline;
}
#mindmapSvgContainer svg .markmap-link {
  stroke: var(--border-focus, #94a3b8);
}
html[data-theme="dark"] #mindmapSvgContainer svg {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] #mindmapSvgContainer svg .markmap-foreign {
  color: #f1f5f9;
}
html[data-theme="dark"] #mindmapSvgContainer svg .markmap-link {
  stroke: #475569;
}
html[data-theme="sepia"] #mindmapSvgContainer svg {
  background: #fbf7ee;
  border-color: #e2d7ba;
}
html[data-theme="sepia"] #mindmapSvgContainer svg .markmap-foreign {
  color: #3d3527;
}
html[data-theme="sepia"] #mindmapSvgContainer svg .markmap-link {
  stroke: #c4b595;
}

/* 跨书关联卡片 */
.related-books-card {
  margin-top: 20px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
html[data-theme="dark"] .related-books-card {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="sepia"] .related-books-card {
  background: #f7ecd0;
  border-color: #d9c48f;
}

/* 双人播客对话稿卡片与气泡 */
.podcast-card {
  margin-top: 20px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.podcast-dialogue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.podcast-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  transition: all 0.2s ease;
  word-break: break-word;
}
.podcast-bubble-xs {
  align-self: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-bottom-left-radius: 2px;
}
.podcast-bubble-ad {
  align-self: flex-end;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
  border-bottom-right-radius: 2px;
}
.podcast-bubble.tts-reading {
  outline: 2px solid var(--primary, #2563eb);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}
html[data-theme="dark"] .podcast-card {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .podcast-bubble-xs {
  background: #172554;
  border-color: #1e40af;
  color: #bfdbfe;
}
html[data-theme="dark"] .podcast-bubble-ad {
  background: #064e3b;
  border-color: #047857;
  color: #a7f3d0;
}
html[data-theme="sepia"] .podcast-card {
  background: #fbf7ee;
  border-color: #e2d7ba;
}
html[data-theme="sepia"] .podcast-bubble-xs {
  background: #e8ecf4;
  border-color: #cbd5e1;
  color: #1e293b;
}
html[data-theme="sepia"] .podcast-bubble-ad {
  background: #f0ebd9;
  border-color: #d1c5a5;
  color: #433422;
}
