/* 引文字体：朱雀仿宋（zeoseven id 7）。@import 必须在所有规则之前 */
@import url("https://fontsapi.zeoseven.com/7/main/result.css");

/* 边框/分隔线统一改成青色（浅色 #color-border / 深色 #color-border-dark）。
   原浅色为紫 #663399、深色为刺眼亮蓝 #0066ff */
:root {
  --color-border: #56b6c2;
  --color-border-dark: #56b6c2;
}

/* 正文字体放大：Archie 默认 15px 为英文设计，中文偏小 */
.post-content .body {
  font-size: 1.15rem;   /* ≈ 17px */
  line-height: 1.9;
}

/* 修复松散列表：列表项之间有空行时，Hugo 会把内容包进 <p> 块级元素，
   而 Archie 的项目符号是 li::before 伪造的行内星号，块级 <p> 会另起一行，
   导致星号单独占一行、文字掉到下一行。让首段回到行内即可对齐。 */
.post-content .body li > p:first-child {
  display: inline;
}

/* 默认引文：悬挂开引号。只靠字形、缩进和朱雀仿宋区分声部，
   保持 Archie 的轻量感；同时显式清掉主题自带的左边框。 */
.post-content .body blockquote {
  position: relative;
  margin: 1.7em 0.2em 1.7em 2.1em;
  padding: 0;
  border: 0;
  border-inline-start: 0;
  color: inherit;
  font-style: normal;
}

.post-content .body blockquote::before {
  content: "“";
  position: absolute;
  top: -0.32em;
  left: -0.82em;
  color: #56b6c2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.65em;
  line-height: 1;
}

/* 引文字体（朱雀仿宋）。注意：Archie 的 `p { font-family }` 会命中 blockquote
   里层的 <p>，必须显式覆盖 blockquote 下的 p，否则字体不生效。 */
.post-content .body blockquote,
.post-content .body blockquote p {
  font-family: "Zhuque Fangsong (technical preview)", serif;
}

.post-content .body blockquote > :first-child {
  margin-top: 0;
}

.post-content .body blockquote > :last-child {
  margin-bottom: 0;
}

/* 长篇摘录：通过 {{< excerpt >}} 手动调用。
   上下细线和极淡中性底色模拟夹入正文的书页，亮暗模式均成立。 */
.post-content .body .excerpt {
  margin: 1.8em 0;
}

.post-content .body .excerpt__body {
  margin: 0;
  padding: 1.2em 1.45em 1.15em 2em;
  border: 0;
  border-top: 1px solid rgba(128, 128, 128, 0.28);
  border-bottom: 1px solid rgba(128, 128, 128, 0.28);
  background: rgba(128, 128, 128, 0.06);
  color: var(--color-text-meta, #999);
}

.post-content .body .excerpt__body::before {
  top: -0.16em;
  left: 0.2em;
  font-size: 2.15em;
}

.post-content .body .excerpt__source {
  margin-top: 0.55em;
  padding-inline: 0.35em;
  color: var(--color-text-meta, #999);
  font-size: 0.82em;
  line-height: 1.6;
  text-align: end;
}

/* --- 脚注：页下注 ---
   行内编号保持轻巧；文末注释以青色细线、两位数悬挂编号和较小字号
   构成独立声部。全部使用主题无关颜色，兼容 Archie 的手动暗色切换。 */
.post-content .body sup[id^="fnref:"] {
  line-height: 0;
}

.post-content .body a.footnote-ref {
  margin-inline: 0.08em;
  padding: 0;
  border-bottom: 0;
  color: #56b6c2;
  font-family: "Roboto Mono", monospace;
  font-size: 0.78em;
  font-weight: 500;
  text-decoration: none;
}

.post-content .body a.footnote-ref:hover,
.post-content .body a.footnote-ref:focus {
  background: transparent;
  color: #56b6c2;
  border-bottom: 1px solid currentColor;
}

.post-content .body .footnotes {
  position: relative;
  margin-top: 2.6em;
  padding-top: 0.85em;
  border-top: 1px solid #56b6c2;
  color: inherit;
  font-size: 0.82em;
  line-height: 1.75;
}

.post-content .body .footnotes::before {
  content: "注释";
  display: block;
  margin-bottom: 0.95em;
  color: #56b6c2;
  font-family: "Roboto Mono", sans-serif;
  font-size: 0.78em;
  letter-spacing: 0.16em;
}

.post-content .body .footnotes hr {
  display: none;
}

.post-content .body .footnotes ol {
  margin: 0;
  padding: 0;
  counter-reset: footnote-item;
  list-style: none;
}

.post-content .body .footnotes li {
  position: relative;
  margin: 0 0 0.8em;
  padding-inline-start: 2.8em;
  counter-increment: footnote-item;
}

.post-content .body .footnotes li::before {
  content: counter(footnote-item, decimal-leading-zero);
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  color: #56b6c2;
  font-family: "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.post-content .body .footnotes li p {
  margin: 0;
}

.post-content .body .footnotes li p + p {
  margin-top: 0.5em;
}

.post-content .body .footnote-backref {
  display: inline-block;
  margin-inline-start: 0.25em;
  padding: 0;
  border-bottom: 0;
  color: #56b6c2;
  font-family: "Roboto Mono", monospace;
  text-decoration: none;
}

.post-content .body .footnote-backref:hover,
.post-content .body .footnote-backref:focus {
  background: transparent;
  color: #56b6c2;
  border-bottom: 1px solid currentColor;
}

/* 移动端目录：标题之后的原生折叠区，默认收起；桌面端仍使用 Archie
   的右侧粘性目录。透明底与细线减少首屏占用，不再呈现为大卡片。 */
.toc-mobile {
  display: none;
}

@media screen and (max-width: 59.99em) {
  .toc-desktop {
    display: none;
  }

  .post-content .toc-mobile {
    display: block;
    max-width: none;
    max-inline-size: none;
    margin: 1.35rem 0 1.7rem;
    padding: 0.65rem 0;
    border: 0;
    border-top: 1px solid #56b6c2;
    border-bottom: 1px solid rgba(128, 128, 128, 0.28);
    border-radius: 0;
    background: transparent;
    color: inherit;
    overflow: visible;
  }

  .toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    color: inherit;
    font-weight: 600;
    list-style: none;
  }

  .toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .toc-mobile summary::after {
    content: "+";
    color: #56b6c2;
    font-family: "Roboto Mono", monospace;
    font-weight: 400;
  }

  .toc-mobile[open] summary::after {
    content: "−";
  }

  .toc-mobile nav {
    margin-top: 0.65rem;
    padding-top: 0.6rem;
    border-top: 1px dotted rgba(128, 128, 128, 0.35);
  }

  .toc-mobile ul {
    margin-block: 0.3rem;
    padding-inline-start: 1.35rem;
  }

  .toc-mobile li {
    margin-block: 0.3rem;
  }

  .toc-mobile a {
    border-bottom-width: 1px;
  }
}

/* --- 音乐卡片（music-card 短代码）---
   意象：专辑封面是「唱片套」，一张黑胶从右侧探出一角，悬停时滑出并缓缓旋转，
   胶芯标签用站点青色。配色全部用主题无关的中性值（黑胶本身就是黑的），
   亮/暗模式都成立：Archie 暗色靠切换整张 dark.css，没有可供钩住的 class/属性 */
.music-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 20px auto;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  background: rgba(128, 128, 128, 0.06);
  max-width: 480px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.music-card:hover {
  border-color: rgba(86, 182, 194, 0.55);
}

/* 唱片区：为黑胶探出的部分预留 26px 宽度 */
.music-card-disc {
  position: relative;
  width: 106px;   /* 80(封面) + 26(黑胶探出) */
  height: 80px;
  flex-shrink: 0;
}

/* 封面 = 唱片套，压在黑胶上层 */
.music-card-cover,
.music-card-cover-empty {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.35);
}

.music-card-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(128, 128, 128, 0.2);
  color: var(--color-text-meta, #999);
}

/* 黑胶：沟纹用重复径向渐变，胶芯标签用站点青色 */
.music-card-vinyl {
  position: absolute;
  top: 3px;
  left: 0;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  transform: translateX(18px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  background:
    repeating-radial-gradient(circle,
      rgba(255, 255, 255, 0.055) 0 1px,
      transparent 1px 3px),
    radial-gradient(circle,
      #111214 0 7%,          /* 中心孔 */
      #56b6c2 7% 26%,        /* 胶芯标签：站点青 */
      #3d8992 26% 27.5%,     /* 标签边缘压深一圈 */
      #17181a 27.5% 98%,     /* 胶面 */
      rgba(0, 0, 0, 0.5) 100%);
}

/* 高光扇面：让旋转肉眼可见 */
.music-card-vinyl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 320deg,
    transparent 0deg 20deg,
    rgba(255, 255, 255, 0.07) 55deg,
    transparent 90deg 200deg,
    rgba(255, 255, 255, 0.045) 235deg,
    transparent 270deg 360deg);
}

.music-card:hover .music-card-vinyl {
  transform: translateX(32px);
}

.music-card:hover .music-card-vinyl::after {
  animation: music-vinyl-spin 4s linear infinite;
}

@keyframes music-vinyl-spin {
  to { transform: rotate(360deg); }
}

.music-card-body {
  flex: 1;
  min-width: 0;
}

/* 标题最多两行，不再单行截断长歌名 */
.music-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.music-card-meta {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--color-text-meta, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 9px;
}

.music-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 平台图标：默认中性灰描边保持安静，悬停/聚焦才亮出品牌色 */
.music-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.4);
  color: var(--color-text-meta, #8f8f8f);
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.music-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.music-link:focus-visible {
  outline: 2px solid #56b6c2;
  outline-offset: 2px;
}

.music-link-netease:hover    { background: #e02020; border-color: #e02020; color: #fff; }
.music-link-qq:hover         { background: #31c27c; border-color: #31c27c; color: #fff; }
.music-link-spotify:hover    { background: #1db954; border-color: #1db954; color: #fff; }
.music-link-apple:hover      { background: #fc3c44; border-color: #fc3c44; color: #fff; }
.music-link-youtube:hover    { background: #f00;    border-color: #f00;    color: #fff; }
.music-link-bilibili:hover   { background: #00aeec; border-color: #00aeec; color: #fff; }
.music-link-soundcloud:hover { background: #f50;    border-color: #f50;    color: #fff; }
.music-link-bandcamp:hover   { background: #408294; border-color: #408294; color: #fff; }
.music-link-url:hover        { background: #56b6c2; border-color: #56b6c2; color: #fff; }

@media (max-width: 480px) {
  .post-content .body blockquote {
    margin-inline-start: 1.55em;
  }
  .post-content .body blockquote::before {
    left: -0.7em;
    font-size: 2.35em;
  }
  .post-content .body .excerpt {
    margin-inline: 0;
  }
  .post-content .body .excerpt__body {
    padding: 1.05em 1em 1em 1.55em;
  }
  .post-content .body .excerpt__body::before {
    left: 0.14em;
    font-size: 2em;
  }
  .music-card {
    max-width: 100%;
    gap: 12px;
    padding: 12px;
  }
  .music-card-disc {
    width: 80px;   /* 60 + 20 */
    height: 60px;
  }
  .music-card-cover,
  .music-card-cover-empty {
    width: 60px;
    height: 60px;
  }
  .music-card-vinyl {
    top: 2px;
    width: 56px;
    height: 56px;
    transform: translateX(14px);
  }
  .music-card:hover .music-card-vinyl {
    transform: translateX(24px);
  }
  .music-card-title {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-card,
  .music-card-vinyl,
  .music-link {
    transition: none;
  }
  .music-card:hover .music-card-vinyl::after {
    animation: none;
  }
}
