/* 说说（碎碎念）前台样式 —— 纯 CSS，无内联。
   配色复用 Lumen 模板的 :root 主题变量（--bg-card / --text-primary / --border-color /
   --color-primary 等），故站点开启 [data-theme="dark"] 时说说会自动转入深色，无需单独逻辑。
   凡变量未定义（如切换其它模板）时均有浅色兜底值。 */

/* 说说独立页由插件整体接管渲染（自带页头），隐藏页面模板输出的 <h1> 页面标题，避免重复 */
.article-page-card:has(.mt-wrap) .article-header { display: none; }
.article-page-card:has(.mt-wrap) .article-content { padding-top: 6px; }

/* Lumen 模板对 .article-content p 有「首行缩进 2em」规则，说说容器内全部取消，保证左对齐 */
.mt-wrap p { text-indent: 0; }

.mt-wrap { max-width: 760px; margin: 0 auto; }

/* Hero 页头（左对齐、紧凑间距） */
.mt-hero { text-align: left; margin: 2px 0 14px; }
.mt-kicker { font-size: 12px; letter-spacing: 3px; color: var(--text-muted, #9aa3b2); text-transform: uppercase; margin: 0 0 2px; }
.mt-title {
  font-size: 26px; margin: 0 0 3px; font-weight: 800; line-height: 1.3;
  background: linear-gradient(120deg, var(--color-primary, #4a7c6e), var(--color-accent, #6ba896));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mt-desc { font-size: 13.5px; color: var(--text-secondary, #8b93a3); margin: 0; }

/* 工具栏：绿点 + 共 N 条 · 标语 | 第 X / Y 页 */
.mt-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--border-color, #e6e9ef); background: var(--bg-secondary, #f7f9fc);
  border-radius: 10px; padding: 8px 14px; margin-bottom: 14px;
  font-size: 13px; color: var(--text-secondary, #6b7280);
}
.mt-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-success, #35c07e); margin-right: 7px; vertical-align: 0;
}
.mt-stat { color: var(--text-primary, #1f2329); font-weight: 500; }
.mt-bar-right { color: var(--text-muted, #9aa3b2); }

/* ===== 时间线 ===== */
.mt-moments.layout-timeline { position: relative; padding-left: 30px; }
.mt-moments.layout-timeline::before {
  content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px;
  background: var(--border-color, #eef1f6);
}
.mt-node { position: relative; margin: 0 0 18px; }
.mt-moments.layout-timeline .mt-node::before {
  content: ""; position: absolute; left: -19px; top: 22px; z-index: 1;
  transform: translateX(-50%); /* 以圆心对齐轴线（轴线中心在 .mt-moments 左起 11px） */
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg-card, #fff); border: 3px solid var(--color-primary, #4a7c6e);
  /* 用与卡片容器同色的光环「挖空」轴线，使节点浮在轴上 */
  box-shadow: 0 0 0 4px var(--bg-card, #fff);
}
.mt-moments.layout-timeline .mt-node.is-top::before { border-color: var(--color-warning, #f0a020); }

/* 瀑布流（多列） */
.mt-moments.layout-masonry { column-gap: 14px; }
.mt-moments.mt-cols-1 { column-count: 1; }
.mt-moments.mt-cols-2 { column-count: 2; }
.mt-moments.mt-cols-3 { column-count: 3; }
.mt-moments.layout-masonry .mt-node { break-inside: avoid; margin-bottom: 14px; }
@media (max-width: 760px) { .mt-moments.layout-masonry { column-count: 1 !important; } }

/* ===== 卡片 ===== */
.mt-card {
  background: var(--bg-card, #fff); border: 1px solid var(--border-color, #eef1f6);
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(20, 30, 60, .06));
  transition: box-shadow .2s ease, transform .2s ease;
}
.mt-card:hover { box-shadow: var(--shadow-md, 0 6px 18px rgba(20, 30, 60, .10)); transform: translateY(-1px); }

/* 头部行：昵称/时间 + 置顶/公开胶囊 */
.mt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mt-who { display: flex; flex-direction: column; min-width: 0; }
.mt-name { font-weight: 700; font-size: 15px; color: var(--text-primary, #1f2329); line-height: 1.3; }
.mt-time { font-size: 12.5px; color: var(--text-muted, #9aa3b2); }
.mt-flag { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.mt-pill { font-size: 11px; border-radius: 20px; padding: 2px 9px; font-weight: 600; white-space: nowrap; }
.mt-pill.top { background: #fff1dd; color: #c47d10; }
.mt-pill.pub { background: #e8f0ff; color: #3a6fd8; }

/* 正文 */
.mt-body { font-size: 15.5px; line-height: 1.8; color: var(--text-primary, #1f2329); word-break: break-word; }
.mt-body p { margin: 0 0 8px; }
.mt-body p:last-child { margin-bottom: 0; }
.mt-body ul, .mt-body ol { margin: 6px 0; padding-left: 22px; }
.mt-body li { margin: 3px 0; }
.mt-body strong { font-weight: 700; }
.mt-body a { color: var(--color-primary, #4a7c6e); text-decoration: none; word-break: break-all; }
.mt-body a:hover { text-decoration: underline; }
.mt-body del { color: var(--text-muted, #9aa3b2); }
.mt-body code {
  background: var(--code-bg, #f2f4f8); border-radius: 4px; padding: 1px 6px;
  font-family: var(--font-mono, Consolas, "SFMono-Regular", monospace); font-size: 13px;
  color: var(--color-warning, #c2410c);
}
.mt-pre {
  background: #0f1419; border-radius: 8px; padding: 12px 14px; overflow: auto;
  margin: 8px 0; position: relative;
}
.mt-pre code { background: none; color: #c9d4e5; padding: 0; font-size: 13px; line-height: 1.6; }
.mt-pre .mt-copy {
  position: absolute; top: 6px; right: 8px; font-size: 11px; color: #9fb3d1;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px; padding: 2px 8px; cursor: pointer;
}

/* 图片网格 */
.mt-imgs { display: grid; gap: 5px; margin: 8px 0 4px; }
/* 单图：不搞正方形占位框，按原始比例缩放（限高 300px），居中、无灰底 */
.mt-imgs-1 { grid-template-columns: 1fr; }
.mt-imgs-1 .mt-img { width: fit-content; max-width: 100%; margin: 0 auto; background: transparent; }
.mt-imgs-1 .mt-img img {
  width: auto; height: auto; max-width: 100%; max-height: 300px;
  aspect-ratio: auto; object-fit: contain; border-radius: 8px;
}
.mt-imgs-2 { grid-template-columns: repeat(2, 1fr); }
.mt-imgs-3, .mt-imgs-n { grid-template-columns: repeat(3, 1fr); }
.mt-img { display: block; overflow: hidden; border-radius: 8px; background: var(--bg-secondary, #f2f4f8); }
.mt-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; aspect-ratio: 1 / 1; }

/* 签到条（天气/位置/设备/心情） */
.mt-sign { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.mt-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-secondary, #f2f4f8); color: var(--text-secondary, #5b6573);
  border-radius: 20px; padding: 4px 11px; font-size: 12.5px; line-height: 1.4;
}

/* 互动栏（占位：展示真实计数，点击交互 P2 再接） */
.mt-actions {
  display: flex; gap: 18px; margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border-color, #eef1f6);
  color: var(--text-muted, #9aa3b2); font-size: 13px;
}
.mt-actions span { display: inline-flex; align-items: center; gap: 5px; cursor: default; }
.mt-actions i { font-style: normal; }

/* 分页 */
.mt-pager {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-secondary, #6b7280); padding-top: 6px;
}
.mt-pager-btn {
  border: 1px solid var(--border-color, #d9dee7); border-radius: 8px; padding: 4px 12px;
  color: var(--color-primary, #4a7c6e); text-decoration: none; cursor: pointer;
}
.mt-pager-btn.disabled { color: var(--text-muted, #c0c6d0); border-color: var(--border-color, #eef1f6); cursor: default; }

.mt-empty { text-align: center; color: var(--text-muted, #9aa3b2); padding: 40px 0; }

/* ===== 深色适配（站点 [data-theme="dark"] 已重定义大部分变量，这里仅补变量覆盖不到的细节） ===== */
[data-theme="dark"] .mt-pill.top { background: #3a2e16; color: #f0b860; }
[data-theme="dark"] .mt-pill.pub { background: #1c2c4d; color: #7fa8ef; }
[data-theme="dark"] .mt-card:hover { box-shadow: var(--shadow-md, 0 6px 18px rgba(0, 0, 0, .4)); }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .mt-moments.layout-timeline { padding-left: 22px; }
  .mt-moments.layout-timeline::before { left: 7px; }
  .mt-moments.layout-timeline .mt-node::before { left: -14px; top: 20px; width: 11px; height: 11px; }
  .mt-sign { gap: 6px; }
  .mt-chip { padding: 3px 9px; font-size: 12px; }
  .mt-wrap { padding: 0 2px; }
}
