.reader-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding: 16px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
}
.reader-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { color: var(--text-muted); font-size: 13px; font-weight: 800; }
.date-input, .status-select {
  height: 38px; border: 1px solid var(--border); border-radius: 999px; padding: 0 12px;
  outline: none; background: #fff; color: var(--text-main); font-weight: 700;
}
.reader-actions { display: flex; gap: 10px; }

.date-shortcuts { display: flex; gap: 5px; }
.date-shortcut-btn {
  height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text-sub); font-size: 12px; font-weight: 800;
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.date-shortcut-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.date-shortcut-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-group-spaced { margin-left: 20px; }

/* ── 三栏布局 ── */
.reader-layout {
  display: grid;
  grid-template-columns: 200px var(--article-list-width, 240px) 6px minmax(0, 1fr);
  height: calc(100vh - 280px);
  min-height: 420px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.col-resizer {
  cursor: col-resize;
  background: var(--border);
  width: 6px;
  transition: background 0.15s;
  user-select: none;
}
.col-resizer:hover, .col-resizer.dragging { background: var(--primary); }

/* 第一栏：分类 */
.category-col {
  border-right: 1px solid var(--border);
  background: #f7f7f9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.cat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.cat-header-title { font-size: 11px; font-weight: 900; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.cat-filter-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; border-radius: 7px; background: transparent;
  color: var(--text-muted); cursor: pointer; transition: 0.15s; padding: 0;
}
.cat-filter-btn:hover { background: var(--primary-soft); color: var(--primary); }
.cat-filter-btn .icon { width: 18px; height: 18px; }
.cat-filter-indicator {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); border: 1.5px solid #f7f7f9;
  font-size: 0;
}
.category-list {
  flex: 1;
  padding: 4px 12px 12px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-list::-webkit-scrollbar { width: 0; height: 0; display: none; }
.cat-item {
  height: 36px; padding: 0 10px; border-radius: 8px; display: flex;
  align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800;
  color: var(--text-sub); cursor: pointer; transition: 0.15s; border: none;
  background: transparent; width: 100%; text-align: left;
}
.cat-item:hover { background: var(--primary-soft); color: var(--primary); }
.cat-item.active { background: var(--primary-soft); color: var(--primary); }
.cat-count { font-size: 11px; color: var(--text-muted); background: var(--surface-dim); padding: 2px 7px; border-radius: 999px; font-weight: 800; flex-shrink: 0; }
.cat-unread-count { color: var(--primary); background: var(--primary-soft); }

.cat-group { margin-bottom: 2px; }
.cat-parent { font-size: 13px; }
.cat-parent-label { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; overflow: hidden; }
.cat-parent-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-arrow { font-size: 10px; flex-shrink: 0; color: var(--text-muted); }
.cat-parent.active .cat-arrow { color: var(--primary); }

.cat-children { padding-left: 8px; }
.cat-child { height: 30px; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 0 8px; }
.cat-child-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* 源筛选面板 */
.sf-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.35); align-items: center; justify-content: center;
}
.sf-overlay.open { display: flex; }
.sf-panel {
  position: relative;
  background: #fff; border-radius: var(--radius-xl); box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  width: 440px; max-width: calc(100vw - 32px); max-height: 70vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.sf-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px 8px; border-bottom: none; flex-shrink: 0;
}
.sf-panel-head-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sf-panel-title { font-size: 15px; font-weight: 900; color: var(--text-main); line-height: 1.3; }
.sf-panel-hint {
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.sf-panel-toolbar {
  display: flex;
  align-items: center;
  padding: 4px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sf-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: none; border-radius: 7px; background: transparent;
  color: var(--text-muted); cursor: pointer; padding: 0;
  flex-shrink: 0;
  margin-top: 0;
}
.sf-close-btn:hover { background: var(--surface-dim); }
.sf-close-btn .icon { width: 18px; height: 18px; }
.sf-panel-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.sf-group { margin-bottom: 10px; }
.sf-group-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 4px; padding: 2px 0;
}
.sf-cat-cb {
  width: 15px; height: 15px; accent-color: var(--primary);
  flex-shrink: 0; cursor: pointer; margin: 0;
}
.sf-group-title {
  display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
  margin: 0; padding: 6px 4px;
  border: none; border-radius: 7px; background: transparent;
  font-size: 12px; font-weight: 800; color: var(--text-muted);
  letter-spacing: 0.04em; cursor: pointer; text-align: left;
}
.sf-group-title:hover { background: var(--surface-dim); color: var(--text-main); }
.sf-group-arrow {
  width: 1em; flex-shrink: 0; font-size: 11px; line-height: 1;
}
.sf-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-group-count {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  color: var(--text-muted); opacity: 0.85;
}
.sf-group-body { padding-left: 2px; }
.sf-group.collapsed .sf-group-body { display: none; }
.sf-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-sub);
  transition: 0.12s; flex: 1; min-width: 0;
}
.sf-row-wrap {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  flex-wrap: wrap;
}
.sf-unsub-btn {
  flex-shrink: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sf-unsub-btn:hover {
  color: var(--red, #dc2626);
  background: #fef2f2;
  border-color: #fecaca;
}
.sf-row:hover { background: var(--primary-soft); color: var(--primary); }
.sf-row input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.sf-panel-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.sf-unsub-confirm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2;
  border-radius: inherit;
}
.sf-unsub-confirm.hidden { display: none; }
.sf-unsub-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  min-width: 260px;
  max-width: 90%;
}
.sf-unsub-text { font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.sf-unsub-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 第二栏：文章列表（标题+简要） */
.article-list-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #fbfbfc;
}
.article-list-meta {
  flex-shrink: 0;
  padding: 8px 12px 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.article-list {
  background: #fbfbfc;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.article-load-more {
  flex-shrink: 0;
  margin: 0 10px 10px;
  width: calc(100% - 20px);
  font-size: 13px;
}
.article-list::-webkit-scrollbar { width: 0; height: 0; display: none; }
.article-item {
  padding: 12px 10px; border-radius: var(--radius-md); cursor: pointer;
  margin-bottom: 4px; transition: 0.15s; border-left: 3px solid transparent;
}
.article-item:hover { background: #f0f0f5; }
.article-item.active { background: #fff; box-shadow: var(--shadow-sm); border-left-color: var(--primary); }
.article-item.unread { border-left-color: var(--primary); background: rgba(255,243,224,0.45); }
.article-item.read { opacity: 0.7; }
.article-item-title {
  font-weight: 800; line-height: 1.4; font-size: 13px; color: var(--text-main);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-item.read .article-item-title { color: var(--text-muted); font-weight: 700; }
.article-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.article-stars-delta { color: var(--primary); font-weight: 700; }
.article-stars-badge { font-size: 12px; color: var(--text-sub); }

/* 第三栏：正文 */
.article-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  min-height: 0;
  min-width: 0;
}
.article-content-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px; font-weight: 700; flex-direction: column; gap: 10px;
}
.article-content-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.article-content-header h3 { font-size: 19px; font-weight: 900; letter-spacing: -0.03em; margin: 0 0 8px; line-height: 1.45; }
.article-header-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.article-header-meta a { color: var(--primary); text-decoration: none; font-weight: 800; }
.article-translate-btn { font-size: 12px; padding: 4px 10px; }
.article-show-original-btn { font-size: 12px; padding: 4px 10px; }
.article-auto-translate { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; user-select: none; }
.article-auto-translate input { accent-color: var(--primary); }

/* GitHub README 渲染 */
.github-readme-body { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.github-readme-body h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.github-readme-markdown { font-size: 14px; line-height: 1.65; color: var(--text-sub); overflow-x: auto; }
.github-readme-markdown img { max-width: min(100%, 750px); width: auto; height: auto; border-radius: 8px; margin: 8px auto; display: block; }
.github-readme-markdown pre,
.github-readme-markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.github-readme-markdown pre { background: var(--surface-2, #f3f4f6); padding: 12px; border-radius: 8px; overflow-x: auto; }
.github-readme-markdown h1, .github-readme-markdown h2, .github-readme-markdown h3 { margin: 16px 0 8px; font-weight: 800; }
.github-readme-markdown p { margin: 8px 0; }
.github-readme-markdown a { color: var(--primary); }
.github-repo-meta { margin-bottom: 12px; }
.article-back { display: none; }
.article-body {
  padding: 20px 24px; overflow-y: auto; flex: 1;
  line-height: 1.9; font-size: 15px; color: var(--text-sub);
  min-width: 0;
  overflow-wrap: anywhere;
}
.article-body img {
  max-width: min(100%, 750px);
  width: auto;
  height: auto;
  margin: 8px auto;
  display: block;
  border-radius: var(--radius-sm);
}
.article-body-text img,
.article-body-text .article-inline-media,
.article-body img.article-inline-media {
  display: block;
  max-width: min(100%, 750px);
  width: auto;
  height: auto;
  margin: 12px auto;
  border-radius: var(--radius-sm);
  background: var(--surface-hover, #f4f4f5);
}
.article-body-text video.article-inline-media,
.article-body-text audio.article-inline-media {
  display: block;
  max-width: min(100%, 750px);
  width: 100%;
  height: auto;
  margin: 12px auto;
}
.article-body video {
  max-width: min(100%, 750px);
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 8px auto;
  display: block;
}
.article-body audio { max-width: min(100%, 750px); width: 100%; margin: 8px auto; display: block; }
.article-body p { margin-bottom: 12px; }
.article-body h1, .article-body h2, .article-body h3 { margin-top: 16px; margin-bottom: 8px; color: var(--text-main); }

/* 公众号 / Markdown 代码块 */
.article-body pre,
.article-body .code-snippet__fix {
  margin: 16px 0;
  border-radius: 8px;
  overflow-x: auto;
  background: #f6f8fa;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}
.article-body .code-snippet__fix {
  display: flex;
  align-items: stretch;
  border: 1px solid #e8e8e8;
  background: #fafafa;
}
.article-body .code-snippet__line-index {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  min-width: 2.5em;
  flex-shrink: 0;
  background: #f0f0f0;
  border-right: 1px solid #e8e8e8;
  counter-reset: wewe-line;
}
.article-body .code-snippet__line-index li {
  display: block;
  height: 1.65em;
  line-height: 1.65;
  padding: 0 10px 0 6px;
  text-align: right;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #999;
}
.article-body .code-snippet__line-index li::before {
  counter-increment: wewe-line;
  content: counter(wewe-line);
}
.article-body pre.code-snippet__js,
.article-body .code-snippet__fix > pre {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  background: #fafafa;
  border: none;
  border-radius: 0;
  overflow-x: auto;
}
.article-body pre.code-snippet__js code,
.article-body .code-snippet__fix pre code,
.article-body pre > code.hljs {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #24292e;
  background: transparent;
  padding: 0;
  margin: 0;
}
.article-body .code-snippet__attr { color: #6f42c1; }
.article-body .code-snippet__string { color: #032f62; }
.article-body .hljs-comment { color: #6a737d; }
.article-body :not(pre) > code {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 2px 5px;
  border-radius: 4px;
  word-break: break-word;
}
.article-body pre,
.article-body pre code,
.article-body .code-snippet__fix,
.article-body .code-snippet__fix * {
  overflow-wrap: normal;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  max-width: 750px;
  margin: 0 auto 16px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-embed-wrap .video-fallback-hint {
  margin: 8px 0 0;
  padding: 0 4px;
  font-size: 12px;
  text-align: right;
}
.video-embed-wrap .video-fallback-hint a { color: var(--text-muted); }
.attachment-client-hint {
  color: var(--text-muted);
  cursor: default;
}
.article-body-text { margin-top: 8px; max-width: 100%; overflow-wrap: anywhere; }
.hn-body-fallback {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fff8e8;
  border: 1px solid #f0d9a8;
  font-size: 13px;
  line-height: 1.55;
}
.hn-body-fallback a { font-weight: 700; }

/* 附件区域 */
.article-attachments {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border);
}
.article-attachments-title {
  font-size: 12px; font-weight: 800; color: var(--text-muted); margin-bottom: 10px;
}
.attachment-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 6px; margin: 0 8px 8px 0;
  font-size: 13px; transition: 0.12s; background: #fff;
}
.attachment-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.attachment-link {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  color: var(--text-main); font-weight: 700; font-size: 13px;
}
.attachment-icon { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.attachment-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item.attachment-image { display: block; padding: 0; border: none; background: transparent; margin-bottom: 12px; }
.attachment-item.attachment-image img {
  max-width: min(100%, 750px);
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: var(--radius-sm);
}
.attachment-item.attachment-audio,
.attachment-item.attachment-video { display: block; padding: 8px 0; border: none; background: transparent; max-width: 750px; margin: 0 auto; }
.attachment-item.attachment-audio audio,
.attachment-item.attachment-video video {
  max-width: min(100%, 750px);
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  outline: none;
  display: block;
}
.attachment-item.attachment-audio .attachment-name,
.attachment-item.attachment-video .attachment-name {
  margin-top: 4px; font-size: 12px; color: var(--text-muted); display: block;
}

/* 下载到本地 - 订阅源 */
.dl-sources-section { margin-bottom: 18px; }
.dl-sources-section .panel { margin-bottom: 0; }
.dl-source-form {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; background: #fbfbfc; border-bottom: 1px solid var(--border);
}
.dl-source-form .form-group { flex: 1; min-width: 160px; margin-bottom: 0; }
.dl-source-form .form-group input {
  height: 36px; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px;
  outline: none; background: #fff; color: var(--text-main); font-weight: 700; width: 100%;
}
.dl-source-form .primary-btn { height: 36px; white-space: nowrap; }
.dl-source-list { padding: 10px 16px 16px; max-height: 320px; overflow-y: auto; }
.dl-source-group { margin-bottom: 14px; }
.dl-source-group:last-child { margin-bottom: 0; }
.dl-source-group-title {
  font-size: 11px; font-weight: 900; color: var(--text-muted); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 6px; padding-left: 2px;
}
.dl-source-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; transition: 0.12s;
}
.dl-source-row:hover { background: #f7f7f9; }
.dl-source-toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0;
}
.dl-source-toggle input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}
.dl-source-name {
  font-size: 13px; font-weight: 700; color: var(--text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-source-delete {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: none; border-radius: 6px; background: transparent;
  color: var(--text-muted); cursor: pointer; padding: 0; opacity: 0; transition: 0.15s;
}
.dl-source-row:hover .dl-source-delete { opacity: 1; }
.dl-source-delete:hover { background: rgba(239,68,68,0.1); color: var(--red); }
.dl-source-delete .icon { width: 16px; height: 16px; }

.onboarding-empty { padding: 24px 12px; text-align: center; }
.onboarding-empty .empty-hint { font-size: 13px; color: var(--text-muted); margin: 8px 0 16px; }
.empty-actions { display: flex; justify-content: center; gap: 8px; }
.catalog-modal-content {
  max-width: 720px;
  width: min(92vw, 720px);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
.catalog-modal-content .modal-header,
.catalog-modal-content .modal-footer {
  padding-left: 24px;
  padding-right: 24px;
}
.catalog-modal-body {
  padding: 16px 24px 20px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
}
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.catalog-category-select {
  min-width: 160px;
  max-width: 260px;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}
.catalog-category-select:focus {
  outline: none;
  border-color: var(--primary, #ea7a00);
}
.catalog-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.catalog-select-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary, #ea7a00);
}
.catalog-cat-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}
.catalog-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  overflow: auto;
  max-height: min(52vh, 420px);
  padding: 2px 2px 6px;
  min-height: 120px;
}
.catalog-source-grid > .empty-state {
  grid-column: 1 / -1;
  padding: 28px 12px;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.catalog-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.catalog-card.is-checked {
  border-color: var(--primary, #ea7a00);
  background: #fff7ed;
}
.catalog-card.is-subscribed {
  opacity: 0.7;
  cursor: default;
}
.catalog-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.catalog-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary, #ea7a00);
}
.catalog-card-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-sub, #334155);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-card-meta {
  padding-left: 24px;
  font-size: 11px;
  color: var(--text-muted);
}
.catalog-card-meta.subscribed {
  color: var(--primary, #ea7a00);
  font-weight: 700;
}
.catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}
.catalog-count { font-size: 13px; color: var(--text-muted); }
.catalog-actions { display: flex; gap: 8px; }

@media (max-width: 560px) {
  .catalog-source-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .catalog-modal-body,
  .catalog-modal-content .modal-header,
  .catalog-footer { padding-left: 16px; padding-right: 16px; }
}


@media (max-width: 1280px) {
  .reader-layout { grid-template-columns: 180px var(--article-list-width, 200px) 6px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .reader-layout { grid-template-columns: 160px 1fr; }
  .col-resizer, .article-content { display: none; }
}
@media (max-width: 640px) {
  .reader-layout { grid-template-columns: 1fr; }
  .category-col { border-right: none; border-bottom: 1px solid var(--border); }
  .reader-toolbar { flex-wrap: wrap; }
  .page-banner-title { font-size: 26px; }
}
