:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2329;
  --sub: #8a9099;
  --line: #ececf0;
  --brand: #ff5a5f;       /* 主色：内容站常用暖色，可改 */
  --brand-2: #ff8a5b;
  --radius: 14px;
  --maxw: 720px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.topbar .sitename { font-size: 18px; font-weight: 700; letter-spacing: .5px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 12px; }

/* 分类导航 */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.cats .cat {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 20px; background: #fff;
  color: var(--sub); text-decoration: none; font-size: 13px; border: 1px solid var(--line);
}
.cats .cat.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 信息流卡片 */
.feed { display: grid; gap: 12px; }
.card {
  display: flex; gap: 12px; background: var(--card); border-radius: var(--radius);
  padding: 12px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); transition: transform .15s ease;
}
.card:active { transform: scale(.99); }
.thumb {
  position: relative; flex: 0 0 110px; width: 110px; height: 82px;
  border-radius: 10px; overflow: hidden; background: #eee;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.video-ph { background: linear-gradient(135deg,#3a3f47,#222); }
.vbadge {
  position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; padding: 2px 6px; border-radius: 6px;
}
.card-body { flex: 1; min-width: 0; }
.card-body h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.4; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.summary { margin: 0 0 8px; color: var(--sub); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--sub); }
.tag { background: #fff0f0; color: var(--brand); padding: 1px 8px; border-radius: 10px; }

.empty { text-align: center; color: var(--sub); padding: 40px 0; }

/* 分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px 0; color: var(--sub); }
.pager a { color: var(--brand); text-decoration: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; }

/* 文章详情 */
.detail { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.detail .cover img, .video-wrap img, .video-wrap video, .ext-video {
  width: 100%; border-radius: 10px; display: block; background: #000;
}
.video-wrap { margin-bottom: 12px; }
.ext-video { height: 220px; border: 0; }
.detail .title { font-size: 21px; line-height: 1.4; margin: 12px 0 8px; }
.detail .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--sub); margin-bottom: 14px; }
.content { font-size: 16px; line-height: 1.8; word-break: break-word; }
.content img { max-width: 100%; border-radius: 10px; }
.content p { margin: 0 0 14px; }
.back { display: inline-block; margin: 16px 0; color: var(--brand); text-decoration: none; }

/* Quill 正文排版（编辑/采集文章的对齐、缩进、代码、引用） */
.content .ql-align-center { text-align: center; }
.content .ql-align-right  { text-align: right; }
.content .ql-align-justify { text-align: justify; }
.content .ql-indent-1 { padding-left: 2em; }
.content .ql-indent-2 { padding-left: 4em; }
.content .ql-indent-3 { padding-left: 6em; }
.content .ql-syntax, .content pre.ql-syntax {
  background: #23241f; color: #f8f8f2; padding: 12px 14px; border-radius: 8px;
  overflow: auto; font-size: 13px; line-height: 1.5;
}
.content blockquote {
  margin: 1em 0; padding: 6px 14px; border-left: 4px solid var(--line);
  background: #fafafa; color: var(--sub); border-radius: 0 8px 8px 0;
}
.content h1, .content h2, .content h3 { line-height: 1.4; margin: 1em 0 .5em; }
.content a { color: var(--brand); }

/* 定位状态条 */
.geo-status {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  text-align: center; font-size: 12px; color: #fff; background: rgba(0,0,0,.55);
  padding: 6px 10px; backdrop-filter: blur(4px);
}

/* 授权弹窗 */
.consent {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.consent[hidden] { display: none; }
.consent-box { background: #fff; border-radius: 16px; max-width: 340px; width: 100%; padding: 22px 20px; }
.consent-box h3 { margin: 0 0 10px; font-size: 17px; }
.consent-box p { margin: 0 0 18px; font-size: 14px; color: var(--sub); line-height: 1.6; }
.consent-actions { display: flex; gap: 12px; }
.consent-actions button {
  flex: 1; padding: 11px 0; border-radius: 24px; font-size: 15px; border: 1px solid var(--line); background: #fff; color: var(--text);
}
.consent-actions button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
