/* ============================================================
   Minima 主题样式（极简黑白版）
   设计语言：纯白底 / 纯黑底、黑灰阶文字、细灰线分隔，
             无彩色强调、无动效、无多余装饰，靠留白与字重分层。
   ============================================================ */

html:root {
  --paper: #ffffff;
  --card: #f6f6f6;
  --ink: #1a1a1a;
  --ink-2: #555555;
  --ink-3: #9a9a9a;
  --hair: rgba(0, 0, 0, 0.10);
  --seal: #1a1a1a;
  --seal-soft: #6b6b6b;
  --on-ink: #ffffff;
  --surface-2: #f2f2f2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hi: 0 2px 12px rgba(0, 0, 0, 0.08);
  --serif: 'Playfair Display', Georgia, 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'STSong', SimSun, serif;
  --sans: 'Source Sans 3', 'Source Sans Pro', 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html[data-theme='dark'] {
  --paper: #000000;
  --card: #0f0f0f;
  --ink: #f2f2f2;
  --ink-2: #a8a8a8;
  --ink-3: #777777;
  --hair: rgba(255, 255, 255, 0.14);
  --seal: #ffffff;
  --seal-soft: #999999;
  --on-ink: #000000;
  --surface-2: #161616;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-hi: 0 2px 16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

html {
  scroll-behavior: auto;
  overflow-x: hidden;
}

/* 主题隔离层：本文件仅前台布局引入。用双元素选择器（特异性 0,0,2）压过全局
   基础样式 main.css 对裸元素 html/body/a/main 的默认值，避免后台基础色
   （#f8fafc 底、蓝链接、固定版心）污染前台主题；后台不加载本文件，故不受影响。 */
html body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html body a {
  color: inherit;
  text-decoration: none;
}

html body main {
  max-width: none;
  margin: 0;
  padding: 0;
  /* sticky footer：main 撑满根列容器剩余高度，内容不足一屏时把 footer 压到视口底部 */
  flex: 1 0 auto;
}

/* 根元素底色同步，避免内容不足一屏时露出 main.css 的浅色 html 背景（深色留白根因） */
html:root {
  background: var(--paper);
}
html[data-theme='dark'] {
  background: var(--paper);
}

a, button, [role='button'] {
  touch-action: manipulation;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  text-decoration: none;
  border-radius: 6px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 10px;
}

a {
  color: inherit;
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 3px;
}

::selection {
  background: rgba(0, 0, 0, 0.12);
}
html[data-theme='dark'] ::selection {
  background: rgba(255, 255, 255, 0.22);
}

/* ---- 站头：极简纯白/纯黑，无下划横线、无玻璃模糊 ---- */
.site-head {
  max-width: none;
  width: 100%;
  position: relative;
  padding: calc(1.5rem + env(safe-area-inset-top)) calc(26px + env(safe-area-inset-right)) calc(3.4rem + env(safe-area-inset-bottom)) calc(26px + env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: var(--paper);
}

.site-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 主题内置流云 wordmark（默认品牌，图中已含 Minimalism 字样）：浅色底显墨色版 */
.site-name .wordmark {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.site-name .wordmark-dark { display: none; }
/* 深色底切换为暖白版，纯 CSS 跟随 data-theme，无需 JS */
html[data-theme='dark'] .site-name .wordmark-light { display: none; }
html[data-theme='dark'] .site-name .wordmark-dark { display: block; }

/* 自定义网站 Logo（网站设置上传，单张，不随主题切换） */
.site-name .logo-img {
  height: 28px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 560px) {
  .site-name .wordmark { height: 23px; }
  .site-name .logo-img { height: 24px; }
}

.site-name .brand-word {
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  white-space: nowrap;
}

.site-name:focus-visible {
  outline: 1px solid var(--seal);
  outline-offset: 7px;
  border-radius: 2px;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  margin-right: calc(50% - 540px + 26px);
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

/* 站头搜索入口已按要求下线（保留 /search 功能与模板，仅不在导航栏显示） */
.head-search,
.head-search-toggle,
.head-search-mobile {
  display: none;
}

/* 页脚右侧：签名 + RSS 紧挨成一组，保持签名原居右位置 */
.site-foot .foot-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 页脚 RSS 链接 */
.site-foot .feed-link {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-decoration: none;
  border: 1px solid var(--hair);
  border-radius: 99px;
  padding: 2px 9px;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-decoration: none;
  padding: 0.3rem 0.45rem;
}

.site-nav a.router-link-active {
  color: var(--ink);
  background: transparent;
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.9em;
  user-select: none;
}

.mode-toggle button {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 0;
  transition: color 0.4s;
  position: relative;
}

.mode-toggle button.on {
  color: var(--ink);
}

.mode-toggle button.on::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.45em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--seal);
}

.mode-toggle .sep {
  color: var(--hair);
  font-size: 0.8rem;
}

.theme-toggle {
  font-family: var(--serif);
  background: none;
  border: 1px solid var(--hair);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 1;
  /* 祥云铜钱：浅色主题用墨色 */
  color: #1a1a1a;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 祥云铜钱：深色主题用暖白 */
html[data-theme='dark'] .theme-toggle {
  color: #f0ece3;
}

.site-foot {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.6rem 26px calc(4.2rem + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  border-top: 1px solid var(--hair);
}

/* 页脚版权署名链接（无 hover，保持极简） */
.site-foot .powered-by {
  color: var(--ink-3);
  text-decoration: none;
}

/* ---- 首页 · 素（两栏：主内容流 + 右侧小工具） ---- */
.m-su {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 26px 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 3.5rem;
  align-items: start;
}

.m-su-main {
  min-width: 0;
}

.m-su-side {
  min-width: 0;
  position: sticky;
  top: 1.5rem;
  padding-bottom: 2rem;
}

.widget-box {
  margin-bottom: 2.2rem;
}

.widget-box:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  padding-bottom: 0.7rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--hair);
}

.wd-list {
  list-style: none;
  padding-left: 0; /* 消除浏览器默认 40px 缩进，列表与 widget 标题左对齐 */
  margin: 0;
}

.wd-list li {
  display: flex;
  gap: 0.8rem;
  padding: 0.5rem 0;
  align-items: baseline;
  border-radius: 6px;
}

.wd-list a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

/* 分类归档（首页侧栏） */
.wd-cats .wd-list li {
  display: block;
  padding: 0.18rem 0;
}
.wd-cats .wd-list a.wd-cat {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-2);
  padding: 0.12rem 0.6rem;
  border-radius: 99px;
  flex: none;
}
.wd-cats .wd-list a.wd-cat.on {
  color: var(--seal);
  background: var(--hair);
  font-weight: 600;
}

.wd-list .wd-d {
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.wd-list li.wd-citem {
  display: flex;
  gap: 0.75rem;
  padding: 0.42rem 0;
  align-items: flex-start;
  border-radius: 6px;
}

.wd-cav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  margin-top: 1px;
}

html[data-theme='dark'] .wd-cav {
  background: var(--surface-2);
}

.wd-cbody {
  flex: 1;
  min-width: 0;
}

.wd-chead {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.wd-chead .who {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-chead .who::after {
  content: '·';
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 0.45rem;
}

.wd-chead .wt {
  font-size: 0.82rem;
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.wd-ctx {
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.55;
  margin-top: 0.18rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.wd-list li.wd-ritem {
  display: block;
  padding: 0.5rem 0.55rem;
  margin: 0 -0.55rem;
  border-radius: 6px;
}

.wd-rt {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-rm {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 0.16rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.wd-empty {
  font-size: 0.85rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  padding: 0.4rem 0;
}

@media (max-width: 900px) {
  .m-su {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }
  .m-su-side {
    position: static;
  }
}

.opening {
  margin-bottom: 3.5rem;
}

.opening.no-excerpt {
  margin-bottom: 2.2rem;
}

.opening.no-excerpt .m {
  margin-bottom: 0.5rem;
}

.opening.no-excerpt .more {
  margin-top: 0.5rem;
}

.opening .lab {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--seal);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.55rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.opening h1 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.opening h1 a {
  text-decoration: none;
}

.opening .m {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
}

.opening .ex {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opening .more {
  display: table;
  margin-left: auto;
  margin-right: 0;
  margin-top: 1.4rem;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.2em;
}

.month {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink-3);
  margin: 2.6rem 0 1.1rem;
  font-weight: 500;
}

.su-entry {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.2rem 1rem;
  margin: 0 -1rem;
  border-radius: 12px;
  text-decoration: none;
  align-items: baseline;
  border: 1px solid transparent;
}

.su-entry .d {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.su-entry h2 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.4rem;
  line-height: 1.5;
  text-wrap: balance;
  font-family: var(--serif);
}

/* 标题末尾祥云铜钱：默认透明且占位（不跳动），hover 整篇文章时以铜色淡入。
   这是用户指定的唯一 hover 反馈；铜色呼应 Logo 铜点。 */
.title-coin {
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.32em;
  color: #a35d2c;
  opacity: 0;
  transition: opacity 0.18s ease;
  flex: none;
}
html[data-theme='dark'] .title-coin {
  color: #c0824f;
}
.opening:hover .title-coin,
.su-entry:hover .title-coin,
.opening h1 a:hover ~ .title-coin,
.su-entry h2:hover .title-coin {
  opacity: 1;
}

.su-entry .ex {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.m-su .su-entry .ex {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.su-entry .row {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  display: flex;
  align-items: baseline;
  gap: 1em;
  min-width: 0;
}

.su-entry .row .cat {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-3);
  font-weight: 400;
}

/* ---- 首页 · 影（卡片墙，仅含有图文章） ---- */
.m-ying {
  display: none;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 26px 2rem;
}

.home-ying .m-ying {
  display: block;
}

.home-ying .m-su {
  display: none;
}

/* 首帧防闪现：SSR 渲染前由 head 内联脚本设置 data-home-mode，CSS 立即切到对应模式 */
html[data-home-mode='ying'] .m-ying {
  display: block;
}

html[data-home-mode='ying'] .m-su {
  display: none;
}

/* 全站 footer 贴底：内容不满一屏时 footer 贴到视口底部，消除底部大面积留白（素/影/内容页/归档页同源问题一并修复） */
body,
#__nuxt,
#__nuxt > div {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#__nuxt,
#__nuxt > div {
  flex: 1 0 auto;
}

/* Nuxt 页面内容包装层：参与纵向弹性，把 footer 推到底部 */
#__nuxt > div > div {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%; /* 防止 flex 子项在 margin:0 auto（如 .list-wrap）下宽度塌缩为 fit-content */
}

/* 影模式首页卡片流：弹性吸收剩余空间 */
html[data-home-mode='ying'] .m-ying {
  flex: 1 0 auto;
}

.wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1.6rem;
  row-gap: 2.8rem;
}

/* 极简摄影志：无卡片盒、无描边、无阴影、直角，图上文下，靠留白与字重分层 */
.w-card {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: none;
}

.w-card .w-ph {
  overflow: hidden;
  background: var(--surface-2);
}

.w-card .w-ph img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.w-card .w-info {
  padding: 0.95rem 0 0;
}

.w-card .w-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.w-card .w-d {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.w-card .w-cat {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.w-card h2 {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.55;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}

/* 首篇：跨两列，图上文下，16:9 大图 + 衬线大标题 + 摘要 */
.w-card.lead {
  grid-column: span 2;
  flex-direction: column;
}

.w-card.lead .w-ph {
  flex: none;
  min-width: 0;
}

.w-card.lead .w-ph img {
  aspect-ratio: 16/9;
  height: auto;
  min-height: 0;
}

.w-card.lead .w-info {
  flex: none;
  padding: 1.2rem 0 0;
  display: block;
}

.w-card.lead h2 {
  font-size: 1.5rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

.w-card.lead .w-ex {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-2);
  margin-top: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.w-card.tall .w-ph img {
  aspect-ratio: 3/4;
}

.wall-empty {
  padding: 4rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.wall-switch {
  display: inline-block;
  margin-top: 1.1rem;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 2em;
  padding: 0.8em 1.8em;
  cursor: pointer;
}

/* ---- 分页 ---- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.6rem;
  padding: 0 0.9rem;
}

.pager a,
.pager span {
  font-size: 12.5px;
  letter-spacing: 0.15em;
  color: var(--ink-2);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.pager span {
  color: var(--ink-3);
}

/* 分页：仅保留左右文字翻页 + 中间轻量页码指示（1 / N），不展示数字按钮组 */
.pager .pager-hint {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.ying-pager {
  max-width: 1080px;
  margin: 2.4rem auto 0;
  padding: 0 26px;
  align-items: center;
}

.empty {
  padding: 3.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

/* 非博客方案首页空态：商城/工作室/企业站等方案在主题框架下尚未配置默认模板时的占位 */
.tpl-empty {
  max-width: 680px;
  margin: 0 auto;
  padding: 7rem 24px;
  text-align: center;
}
.tpl-empty-title {
  font-size: 1.02rem;
  letter-spacing: 0.35em;
  color: var(--ink-2);
  margin: 0 0 1.1rem;
}
.tpl-empty-desc {
  font-size: 0.85rem;
  line-height: 1.95;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0;
}

/* ---- 文章页 ---- */
.art-head {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.9rem 24px 0;
}

.crumb {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 0.8rem;
  text-align: right;
}

.crumb a {
  color: inherit;
  text-decoration: none;
}

.crumb a.cat {
  color: var(--seal);
}

.art-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}

.art-head .meta {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  padding-bottom: 0;
}

.art-head .meta a {
  color: inherit;
  text-decoration: none;
}

.post-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.2rem 24px 3.4rem;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--ink);
  word-break: break-word;
}

/* 首元素不再叠加自身 margin（段落/标题/图片均贴齐正文顶部） */
.post-content > :first-child {
  margin-top: 0;
}

html[data-theme='dark'] .post-content {
  color: #a8a8a8;
}

.post-content p {
  margin-bottom: 1.35em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 2.8em 0 1.1em;
  color: var(--ink);
}

.post-content h2 {
  font-size: 1.45rem;
}

.post-content h3 {
  font-size: 1.2rem;
}

.post-content a {
  color: var(--seal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: color-mix(in srgb, var(--seal) 30%, transparent);
  text-decoration-skip-ink: auto;
}

.post-content blockquote {
  font-family: var(--serif);
  color: var(--ink-2);
  margin: 2.4em 0;
  font-size: 1.05rem;
  line-height: 2;
  border-left: 3px solid var(--seal);
  padding: 0.5rem 0 0.5rem 1.3rem;
  background: var(--card);
  border-radius: 0 10px 10px 0;
}

.post-content blockquote p {
  margin: 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.8em;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 2;
}

.post-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.5em;
  border-radius: 4px;
}

html[data-theme='dark'] .post-content code {
  background: rgba(255, 255, 255, 0.1);
}

.post-content pre {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 1.2em 1.4em;
  overflow-x: auto;
  margin-bottom: 1.8em;
}

html[data-theme='dark'] .post-content pre {
  background: rgba(255, 255, 255, 0.06);
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.8em;
}

.post-content th,
.post-content td {
  border-bottom: 1px solid var(--hair);
  padding: 0.7em 0.6em;
  text-align: left;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--hair);
  margin: 2.6em auto;
}

.post-content figure.ph-block {
  margin: 2.2em 0;
}

.post-content figure.ph-block + figure.ph-block {
  margin-top: 2.8em;
}

.post-content > figure.ph-block:first-child {
  margin-top: 0;
}

.post-content figure.ph-block .frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-content figure.ph-block img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.post-content figure.ph-block figcaption {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ---- 评论 ---- */
.comments {
  max-width: 820px;
  margin: 3rem auto 0;
  padding: 2.2rem 24px 3rem;
  /* 锚点定位：避开吸顶站头，定位到评论区顶部时留出视觉余量 */
  scroll-margin-top: 92px;
}

.comments-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}

.comments-title em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 0.8em;
}

/* 评论区单栏：评论列表在上、发布表单在下（全宽版心内），不再左右分栏 */
.comments-grid {
  display: block;
}
.comments-list {
  min-width: 0;
  /* 纯列表：去卡片背景，条目以细分割线分隔，视觉更轻 */
}
@media (max-width: 860px) {
  .comment-form {
    order: 2;
  }
}

.c-msg {
  border-radius: 8px;
  padding: 0.9em 1.2em;
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
  letter-spacing: 0.05em;
  /* 素白风格：消息提示不带底色，仅以文字色区分状态 */
  background: transparent;
}

.c-msg.ok {
  color: var(--ink-2);
}

.c-msg.err {
  color: #b3261e;
}
html[data-theme='dark'] .c-msg.err {
  color: #ff8a80;
}

.comment-list {
  list-style: none;
}

/* ---- 评论条目（极简留白）：无边框无背景无分隔线，条目间靠留白分隔 ---- */
.comment {
  padding: 1.25rem 0;
  /* 锚点定位：从侧栏「最新评论」跳入时避开吸顶站头 */
  scroll-margin-top: 92px;
}
.comment + .comment {
  border-top: none;
}

/* 评论锚点到达标记：无背景色，仅以左侧强调线提示（由 JS 短暂挂载后移除） */
.comment.hl-flash {
  background: transparent;
  border-left: 2px solid var(--seal);
  padding-left: 1rem;
}
html[data-theme='dark'] .comment.hl-flash {
  background: transparent;
}

/* 头像行：头像 + 主内容并排，小圆角方头像不抢正文 */
.c-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.c-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  margin-top: 0.1rem;
}

.comment.is-pending {
  opacity: 0.6;
}

.c-main {
  min-width: 0;
}

/* 元信息行：作者在前，时间弱化在后，回复靠右；基线对齐保证小字号不飘 */
.c-head {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  flex-wrap: wrap;
}

.c-author {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.c-author a {
  color: inherit;
  text-decoration: none;
}

.c-head time {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* 评论归属地插件：国旗 + 城市（弱化于作者之后） */
.c-geo {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.c-geo .c-flag {
  font-size: 1.05em;
  line-height: 1;
}
/* 评论归属地：仅文本展示（地图入口已按隐私要求移除） */

.c-pending {
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 99px;
  padding: 0.15em 0.7em;
  letter-spacing: 0.08em;
}
html[data-theme='dark'] .c-pending {
  background: rgba(255, 255, 255, 0.1);
}

/* 回复：纯文字链接，靠右 */
.c-reply-btn {
  font-size: 12px;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.12em;
  padding: 0;
  margin-left: auto;
}

.c-body {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  line-height: 1.95;
  color: var(--ink-2);
}

.c-body p {
  margin-bottom: 0.6em;
}
.c-body p:last-child {
  margin-bottom: 0;
}

/* 回复层级：纯缩进 + 小一号字，深度靠排版表达 */
.c-children {
  list-style: none;
  padding-left: 1.4rem;
  margin-top: 0.9rem;
}
.c-children .c-body {
  font-size: 0.87rem;
}

.comment-empty {
  padding: 1.8rem 0;
  font-size: 0.9rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* 正文分页（超长文章） */
.content-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  max-width: 820px;
  margin: 1.6rem auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.content-pager button {
  font: 400 13px/1 var(--sans);
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 0.55em 1.3em;
  cursor: pointer;
}
.content-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 评论加载更多 */
.load-more-btn {
  display: block;
  margin: 1.1rem auto 0.4rem;
  font: 400 12.5px/1 var(--sans);
  letter-spacing: 0.12em;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 99px;
  padding: 0.7em 2em;
  cursor: pointer;
}
.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-form {
  margin-top: 1.6rem;
  /* 无底色、无外框、无圆角：只保留下方 textarea / input 各自的输入框，容器不形成卡片 */
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
.comment-form .form-row + .form-row {
  margin-top: 0;
}

.comment-form .form-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

/* 上下结构：内容区在上、评论者信息区在下（无分隔线，仅留白） */
.comment-form .info-zone {
  padding-top: 1rem;
  margin-top: 0.2rem;
}

.reply-hint {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.reply-hint a {
  color: var(--seal);
  margin-left: 1em;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.form-row input {
  flex: 1;
  min-width: 140px;
}

.comment-form input,
.comment-form textarea {
  font: 400 0.9rem/1.7 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 0.72em 1em;
  transition: border-color 0.25s, box-shadow 0.25s;
  width: 100%;
}

.comment-form input:focus-visible,
.comment-form textarea:focus-visible {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
  outline: none;
}
html[data-theme='dark'] .comment-form input:focus-visible,
html[data-theme='dark'] .comment-form textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.comment-form textarea {
  margin-bottom: 0;
  resize: vertical;
  min-height: 110px;
}

.comment-form button {
  display: block;
  margin-left: auto;
  font: 500 12.5px/1 var(--sans);
  letter-spacing: 0.14em;
  color: #1a1a1a;
  background: #e8e8e8;
  border: 1px solid #e8e8e8;
  border-radius: 99px;
  padding: 0.85em 2em;
  cursor: pointer;
}
html[data-theme='dark'] .comment-form button {
  color: #f2f2f2;
  background: #2c2c2c;
  border-color: #2c2c2c;
}

.comment-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---- 响应式 ---- */
@media (max-width: 1100px) {
  .head-right {
    margin-right: 26px;
  }
}

@media (max-width: 900px) {
  .wall {
    grid-template-columns: 1fr 1fr;
  }
  .w-card.lead {
    grid-column: span 2;
    flex-direction: column;
  }
  .w-card.lead .w-ph img {
    aspect-ratio: 16/9;
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 560px) {
  .wall {
    grid-template-columns: 1fr;
  }
  .w-card.lead {
    grid-column: span 1;
  }
  .site-head {
    padding-top: 1.2rem;
    padding-bottom: 2rem;
  }
  .art-head {
    padding: 0.9rem 26px 0; /* 与 .post-content 移动端 26px 水平内边距对齐，顶部节奏同桌面收紧 */
  }
  .head-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 8px;
    margin-right: 0;
    min-width: 0;
  }
  .site-head {
    gap: 10px;
  }
  .site-nav {
    flex: 0 0 100%;
    gap: 0 10px;
    min-width: 0;
  }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 14px;
    letter-spacing: 0.08em;
  }
  .mode-toggle {
    gap: 0;
  }
  .mode-toggle button {
    min-width: 44px;
    min-height: 44px;
  }
  .mode-toggle button.on::after {
    bottom: 3px;
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
    position: relative;
    border-color: transparent;
    background: transparent;
    flex-shrink: 0;
    font-size: 21px;
  }
  .theme-toggle::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid var(--hair);
    border-radius: 50%;
    pointer-events: none;
  }
  .m-su .su-entry .ex {
    -webkit-line-clamp: 2;
  }
  .su-entry {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 1rem;
  }
  /* 移动端正文容器补水平内边距，避免文字贴边 */
  .post-content {
    padding: 1.3rem 26px 3.4rem;
  }
  /* 移动端评论区与正文同左缘（26px），与标题区一致 */
  .comments {
    padding: 2.2rem 26px 0;
  }
}

/* ==================== Minima v1.2.0 补齐 ==================== */

/* ---- 阅读进度条 / 返回顶部 / 目录（文章页 Phase4） ---- */
.reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--ink);
  z-index: 98;
  opacity: 0.8;
  pointer-events: none;
}
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--ink-3);
  font-size: 17px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  z-index: 97;
  display: flex;
  align-items: center;
  justify-content: center;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
}
/* 登录且前台编辑插件开启时，右下角被前台编辑悬浮台（评论管理/写文章）占据，
   返回顶部按钮左移避让，避免与浮动按钮重叠；无悬浮台时仍贴右下角 */
body:has(.fab-dock) .to-top {
  right: 80px;
}
.toc {
  position: fixed;
  top: 120px;
  right: max(26px, calc((100vw - 1220px) / 2));
  width: 172px;
  max-height: 56vh;
  overflow: auto;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  font-size: 12px;
}
.toc-title {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  padding-bottom: 0.7rem;
  margin: 0 10px 0.5rem;
  border-bottom: 1px solid var(--hair);
}
.toc a {
  color: var(--ink-3);
  text-decoration: none;
  padding: 3px 10px;
  border-left: 1px solid var(--hair);
  line-height: 1.55;
}
.toc a.on {
  color: var(--seal);
  border-left-color: var(--seal);
}
.toc a.h3 {
  padding-left: 22px;
  font-size: 12px;
}
@media (max-width: 1180px) {
  .toc {
    display: none !important;
  }
}
mark {
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
  padding: 0 0.15em;
  border-radius: 3px;
}
html[data-theme='dark'] mark {
  background: rgba(255, 255, 255, 0.18);
}

/* ---- 渐入（rise）：极简版无入场动效，直接可见 ---- */
.rise {
  opacity: 1;
  transform: none;
}
.rise.in {
  opacity: 1;
  transform: none;
}

/* ---- 列表 / 归档通用 ---- */
.list-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 3rem;
}
.list-head {
  padding: 1.2rem 0.9rem 2.4rem;
}
.list-head h1 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}
.list-head .sub {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}
/* 归档：年份 / 月份两级折叠（默认展开，点击标题收起） */
.arch-year {
  margin: 2.4rem 0 0;
}
.arch-year > summary,
.arch-month > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  user-select: none;
}
/* 触控热区：移动端折叠标题满足 44px 最小点击高度 */
@media (max-width: 900px) {
  .arch-year > summary,
  .arch-month > summary {
    min-height: 44px;
    align-items: center;
  }
}
.arch-year > summary {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  padding: 0.9rem 0.9rem;
  border-bottom: 1px solid var(--hair);
}
.arch-month > summary {
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--ink-2);
  padding: 0.85rem 0.9rem 0.3rem;
}
.arch-year > summary em,
.arch-month > summary em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-left: auto;
}
.arch-year > summary::before,
.arch-month > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink-3);
  flex-shrink: 0;
  transition: transform 0.3s;
  margin-top: 2px;
}
.arch-year:not([open]) > summary::before,
.arch-month:not([open]) > summary::before {
  transform: rotate(-90deg);
}
/* 归档文章列表：标题更细更小、行距更紧凑（仅归档页，不影响首页） */
.arch-month .su-entry {
  align-items: baseline;
}
.arch-month .su-entry h2 {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 0;
}
.arch-month .su-entry .d {
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ============================================================
   极简黑白：全站关闭动态效果（过渡 / 关键帧 / 平滑滚动）。
   状态切换（hover、展开、显隐）保留即时反馈，不做位移与渐变。
   注：仅作用于加载本主题样式的前台页面，不影响后台。
   ============================================================ */
html {
  scroll-behavior: auto;
}
*,
*::before,
*::after {
  transition: none !important;
  animation: none !important;
}
