/* ========== Single Post ========== */
.entry-header {
  margin-bottom: 24px;
}

/* 标题 — 对齐 zibll: 22px, bold, line-height 1.4 */
.entry-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.4;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.875rem;
  color: var(--color-ink-4);
}

.entry-meta a {
  color: var(--color-ink-3);
}

.entry-meta a:hover {
  color: var(--color-primary);
}

.entry-thumb {
  margin: 0 0 28px;
  border-radius: var(--radius-btn);
  overflow: hidden;
}

/* 内容区 — 对齐 zibll: 16px, line-height 2 */
.entry-content {
  font-size: 16px;
  line-height: 2;
  color: var(--color-ink);
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-height: 90px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p {
  margin: 0 0 1.5em;
}

.entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 20px 0 10px;
}

.entry-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 10px;
}

.entry-content blockquote {
  margin: 0 0 20px;
  padding: 15px 20px;
  border-left: 4px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
  background: var(--muted-border-color, rgba(0, 0, 0, 0.03));
  border-radius: 0;
  color: var(--muted-color, #777);
}

.entry-content img {
  margin: 0 auto;
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== 图片灯箱 ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.lightbox-caption {
  max-width: min(96vw, 1200px);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0.92;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close i {
  pointer-events: none;
}

.entry-content iframe,
.entry-content .wp-block-embed iframe,
.entry-content video {
  max-width: 100%;
  height: auto;
}

.entry-content .wp-block-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 1.5em 0;
}

/* 行内代码 — 对齐 zibll: 粉色文字 + 粉色背景 */
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: #ff3c98;
  background: rgba(253, 153, 153, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin: 0 0 1.5em;
}

.entry-content ul li::marker {
  color: var(--color-primary);
}

.entry-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags a {
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--muted-bg-color, #eee);
  border: 1px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
  font-size: 13px;
  color: var(--muted-color, #777);
}

.post-tags a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.related-posts {
  margin-top: 48px;
}

.related-posts__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--key-color, #333);
}

.related-posts__title::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 3px;
  background: var(--theme-color, #f04494);
  border-radius: 5px;
  vertical-align: middle;
  margin-right: 8px;
}

.related-posts__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--main-border-color, rgba(50, 50, 50, 0.06));
  transition: 0.15s;
}

.related-card:last-child {
  border-bottom: none;
}

.related-card a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--key-color, #333);
  text-decoration: none;
  width: 100%;
}

.related-card:hover a {
  color: var(--focus-color, #f04494);
}

.related-card__thumb {
  width: 96px;
  min-width: 96px;
  height: 64px;
  border-radius: var(--main-radius, 8px);
  overflow: hidden;
  flex-shrink: 0;
}

.related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-card:hover .related-card__thumb img {
  transform: scale(1.05);
}

.related-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 浠ｇ爜鍧?GitHub 椋庢牸 ========== */
.code-block {
  border-radius: var(--radius-code);
  border: 1px solid var(--color-line);
  overflow: hidden;
  margin: 1.5em 0;
  background: var(--surface-3);
}

.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--color-line);
  font-size: 12px;
  color: var(--color-ink-3);
}

.code-block__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-line);
  background: var(--surface-page);
  cursor: pointer;
  font-size: 12px;
  color: var(--color-ink-3);
}

.code-block__copy:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.code-block__body {
  overflow-x: auto;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .code-block__body {
    font-size: 12px;
    padding: 12px 14px;
  }
}

.entry-content pre.wp-block-code,
.entry-content pre:not(.wp-block-preformatted) {
  border-radius: var(--radius-code);
  border: 1px solid var(--color-line);
  background: var(--surface-3);
  padding: 0;
  overflow: hidden;
}

.entry-content pre code {
  display: block;
  padding: 16px 20px;
  overflow-x: auto;
  background: transparent;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Syntax highlight utilities (plugin or wrapped markup) */
.gh-keyword {
  color: #cf222e;
}

html.dark .gh-keyword,
html.dark .gh-keyword {
  color: #ff7b72;
}

.gh-string {
  color: #0a3069;
}

html.dark .gh-string,
html.dark .gh-string {
  color: #a5d6ff;
}

.gh-comment {
  color: #6e7781;
  font-style: italic;
}

html.dark .gh-comment,
html.dark .gh-comment {
  color: #8b949e;
}

.gh-function {
  color: #8250df;
}

html.dark .gh-function,
html.dark .gh-function {
  color: #d2a8ff;
}

.gh-var {
  color: #0550ae;
}

html.dark .gh-var,
html.dark .gh-var {
  color: #79c0ff;
}

.gh-op {
  color: #24292f;
}

html.dark .gh-op,
html.dark .gh-op {
  color: #c9d1d9;
}

/* ========== Post Navigation ========== */
.post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .post-nav-links {
    gap: 16px;
    margin-top: 40px;
  }
}

.post-nav-links a {
  display: block;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--surface-2);
  transition: border-color 0.2s;
}

.post-nav-links a:hover {
  border-color: var(--color-primary);
}

.post-nav-links .nav-subtitle {
  display: block;
  font-size: 12px;
  color: var(--color-ink-4);
  margin-bottom: 4px;
}

.post-nav-links .nav-title {
  font-weight: 700;
  color: var(--color-ink);
}

.post-navigation,
.navigation.post-navigation {
  margin-top: 40px;
}

.post-navigation .nav-links,
.navigation.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .post-navigation .nav-links,
  .navigation.post-navigation .nav-links {
    gap: 16px;
  }
}

.post-navigation a,
.navigation.post-navigation a {
  display: block;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--surface-2);
  transition: border-color 0.2s;
}

.post-navigation a:hover,
.navigation.post-navigation a:hover {
  border-color: var(--color-primary);
}


/* ===== Utility card classes (unified in card-primitives.css) ===== */
.mt-3 {
    margin-top: 16px;
}

/* ============================================================
 * v4.3 cover, author bar, actions, author card, nav, and related posts
 * The cover stays inside the content column with a fixed aspect ratio box.
 * ============================================================ */

/* ===== Cover (in-column ratio box) ===== */
.single-cover {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 16px;
    padding-bottom: var(--single-cover-scale, 35%);
}

.single-cover > .fit-cover,
.single-cover > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-cover__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 30%,
        rgba(0, 0, 0, 0.6) 100%
    );
    pointer-events: none;
}

.single-cover__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: #fff;
    border-radius: 0 0 8px 8px;
}

.single-cover__title {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.single-cover__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    opacity: 0.85;
}

.single-cover__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ===== 闈㈠寘灞?===== */
.post-breadcrumbs {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--color-ink-4, var(--color-ink-4));
}

/* ===== Article Card ===== */
.article-card {
    margin-bottom: 16px;
}

.article-card__header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-line);
}

.article-card__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    margin: 0;
    line-height: 1.35;
    color: var(--color-ink);
}

/* ===== Author Bar (inside article card) ===== */
.article-author-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.article-author-bar__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.article-author-bar__info {
    flex: 1;
    min-width: 0;
}

.article-author-bar__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-ink);
}

.article-author-bar__name:hover {
    color: var(--color-primary);
}

.article-author-bar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--color-ink-4, var(--color-ink-4));
    margin-top: 2px;
}

.article-author-bar__meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.article-author-bar__line {
    height: 1px;
    background: var(--color-line);
    margin-bottom: 20px;
}

/* ===== Content Footer ===== */
.article-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--color-line);
}

.article-copyright {
    font-size: 13px;
    color: var(--color-ink-4, var(--color-ink-4));
    margin-bottom: 16px;
}

.article-end-separator {
    text-align: center;
    margin: 16px 0;
    position: relative;
}

.article-end-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-line);
}

.article-end-separator span {
    position: relative;
    display: inline-block;
    padding: 0 14px;
    background: var(--surface-page);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-ink-4, var(--color-ink-4));
    letter-spacing: 2px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

/* ===== Action Buttons Card ===== */
.post-actions-card {
    position: relative;
    text-align: center;
    margin-bottom: 16px;
}

.post-actions-card__hint {
    font-size: 13px;
    color: var(--color-ink-4, var(--color-ink-4));
    margin-bottom: 12px;
}

.post-actions-card__buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3em 1em;
    border-radius: 50px;
    border: none;
    background: rgba(136, 136, 136, 0.1);
    color: #888;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

.action-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.action-btn.is-active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-soft, rgba(136, 171, 218, 0.08));
}

.action-btn i { font-size: 1.2em; }
.action-btn__count { font-weight: 600; }
.action-btn__label { font-size: 13px; }

/* ===== 分享下拉面板 ===== */

/* 确保父容器作为定位参考 */
.share-dropdown {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    z-index: 100;
    /* 默认隐藏 — 最高优先级确保不被覆盖 */
    display: none !important;
}

.share-dropdown[aria-hidden="false"] {
    display: block !important;
    animation: shareDropdownIn 0.2s ease-out forwards;
}

@keyframes shareDropdownIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.share-dropdown__grid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-page);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg, 8px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.1));
}

.share-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-btn, 6px);
    background: transparent;
    color: var(--color-ink-2, var(--color-ink-3));
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    white-space: nowrap;
}

.share-item:hover {
    transform: translateY(-2px);
}

.share-item i {
    font-size: 18px;
}

.share-item[data-platform="qq"]:hover { background: #e8f4fd; color: #12b7f5; }
.share-item[data-platform="weibo"]:hover { background: #fceae9; color: #ff6a00; }
.share-item[data-platform="twitter"]:hover { background: #f0f0f0; color: #000; }
.share-item[data-platform="wechat"]:hover { background: #e6f7ec; color: #07c160; }
.share-item[data-platform="copy"]:hover { background: #f0f2f5; color: #555; }

/* 微信二维码浮层 */
#share-qrcode-box {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 14px;
    background: var(--surface-page);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg, 8px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.12));
    text-align: center;
    z-index: 101;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#share-qrcode-box.is-visible {
    pointer-events: auto;
    opacity: 1;
}

#share-qrcode-image {
    width: 140px;
    height: 140px;
    display: block;
}

/* 暗色模式 */
.theme-dark .share-dropdown__grid,
html.dark .share-dropdown__grid {
    background: var(--surface-1);
    border-color: var(--color-line);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.theme-dark #share-qrcode-box,
html.dark #share-qrcode-box {
    background: var(--surface-1);
    border-color: var(--color-line);
}

.theme-dark .share-item,
html.dark .share-item {
    color: var(--color-ink-2, #aaa);
}

.theme-dark .share-item[data-platform="qq"]:hover { background: rgba(18,183,245,0.12); color: #12b7f5; }
.theme-dark .share-item[data-platform="weibo"]:hover { background: rgba(255,106,0,0.12); color: #ff6a00; }
.theme-dark .share-item[data-platform="twitter"]:hover { background: rgba(255,255,255,0.08); color: #fff; }
.theme-dark .share-item[data-platform="wechat"]:hover { background: rgba(7,193,96,0.12); color: #07c160; }
.theme-dark .share-item[data-platform="copy"]:hover { background: rgba(255,255,255,0.06); color: #ccc; }

/* ===== Author Card — 对齐 zibll 卡片容器 ===== */
.author-box {
    margin-bottom: 16px;
    padding: 15px;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px);
    box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
}

.author-box__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--color-primary-soft, rgba(136, 171, 218, 0.2));
}

.author-box__info {
    flex: 1;
    min-width: 0;
}

.author-box__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-ink);
    display: block;
    margin-bottom: 4px;
}

.author-box__name:hover { color: var(--color-primary); }

.author-box__bio {
    font-size: 13px;
    color: var(--color-ink-3, var(--color-ink-4));
    line-height: 1.5;
    margin: 0 0 6px;
}

.author-box__stats {
    font-size: 12px;
    color: var(--color-ink-4, var(--color-ink-4));
}

.author-box__stats strong {
    color: var(--color-ink);
    margin-right: 2px;
}

.author-box__posts {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--color-line);
}

.author-box__posts-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-ink-3, var(--color-ink-4));
    margin: 0 0 8px;
}

.author-box__posts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.author-box__posts li { padding: 3px 0; }

.author-box__posts a {
    font-size: 13px;
    color: var(--color-ink);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-box__posts a:hover { color: var(--color-primary); }
.author-box__posts a::before { content: '\2022'; color: var(--color-primary); }

/* ===== Previous / Next Navigation ===== */
.post-nav-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.post-nav-box__item {
    display: block;
    padding: 15px;
    text-decoration: none;
    transition: color 0.15s ease;
    color: var(--key-color, #333);
}

.post-nav-box__item:hover {
    color: var(--focus-color, #f04494);
    text-decoration: none;
}

.post-nav-box__item--next { text-align: right; }

.post-nav-box__label {
    display: block;
    font-size: 12px;
    color: var(--color-ink-4, var(--color-ink-4));
    margin-bottom: 4px;
}

.post-nav-box__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--key-color, #333);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Related Posts — 对齐 zibll 卡片容器 ===== */
.related-box {
    margin-bottom: 16px;
    overflow: hidden;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px);
    box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
}

.related-box__header { padding-bottom: 0; }

.related-box__title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-box__title i { color: var(--color-primary); font-size: 13px; }

.related-box__list {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-box__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-line);
    text-decoration: none;
    color: inherit;
}

.related-box__item:last-child { border-bottom: none; }
.related-box__item:hover { color: var(--color-primary); }

.related-box__thumb {
    width: 96px;
    min-width: 96px;
    height: 64px;
    border-radius: var(--main-radius, 8px);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--muted-bg-color, #eee);
}

.related-box__thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-box__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-ink-4); font-size: 14px;
}

.related-box__item-title {
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Comment Card Spacing ===== */
.comments-card { margin-bottom: 16px; }

/* ===== Content Height Clamp ===== */
.entry-content.limit-height {
    position: relative;
    overflow: hidden;
}

.entry-content.limit-height::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--surface-page));
    pointer-events: none;
}

.entry-content.limit-height.is-expanded::after { display: none; }

.content-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    border: none;
    background: var(--surface-page);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-top: 1px solid var(--color-line);
}

.content-expand-btn:hover { background: var(--color-primary-soft, rgba(136, 171, 218, 0.06)); }
.content-expand-btn.is-expanded i { transform: rotate(180deg); }

/* ===== Mobile ===== */
@media (max-width: 767px) {
    .single-cover { padding-bottom: 55%; }
    .single-cover__content { padding: 14px; }
    .single-cover__title { font-size: 1rem; }
    .post-nav-box { grid-template-columns: 1fr; }
    .post-actions-card__buttons { gap: 8px; }
    .action-btn { padding: 8px 14px; font-size: 13px; }
}

/* ===== 鏆楄壊妯″紡 ===== */
.theme-dark .article-end-separator span,
html.dark .article-end-separator span {
    background: var(--surface-1);
}

/* ============================================================
 * Phase 7 single/article controls
 * ============================================================ */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 55%, #fff));
    box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 24%, transparent);
}

.author-info-bar.article-author-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.author-info-bar.article-author-bar .author-info-bar__avatar img,
.author-info-bar.article-author-bar .author-info-bar__avatar .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info-bar.article-author-bar .author-info-bar__body {
    min-width: 0;
    flex: 1;
}

.author-info-bar.article-author-bar .author-info-bar__name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-ink);
    font-weight: 600;
    font-size: 15px;
}

.author-info-bar.article-author-bar .author-info-bar__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 4px;
    color: var(--color-ink-4);
    font-size: 12px;
}

.author-info-bar.article-author-bar .author-info-bar__bio {
    margin: 8px 0 0;
    color: var(--color-ink-3);
    font-size: 13px;
    line-height: 1.6;
}

.action-btn--ghost {
    background: var(--surface-2);
}

.toc-widget {
    position: sticky;
    top: 88px;
    padding: 18px 18px 14px;
    margin-bottom: 16px;
}

.toc-widget .widget-title {
    margin-bottom: 10px;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.toc-list li {
    min-width: 0;
}

.toc-list a {
    display: block;
    color: var(--color-ink-3);
    font-size: 13px;
    line-height: 1.55;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toc-list a:hover,
.toc-list a.is-active {
    color: var(--color-primary);
}

.toc-list .toc-h3 a {
    padding-left: 12px;
}

.toc-list .toc-h4 a {
    padding-left: 24px;
}

.toc-float-btn {
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 41;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.toc-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 79;
    display: none;
    background: rgba(15, 23, 42, 0.36);
}

.toc-drawer-overlay.is-open {
    display: block;
}

.toc-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 340px);
    padding: 18px 18px 28px;
    background: var(--surface-page);
    border-left: 1px solid var(--color-line);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.toc-drawer.is-open {
    transform: translateX(0);
}

.toc-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.toc-drawer__head h3 {
    margin: 0;
    font-size: 16px;
}

.toc-drawer__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--color-ink-3);
}

.resource-mobile-fab {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 42;
    width: 52px;
    height: 52px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.resource-mobile-download-bar {
    display: none;
    margin-bottom: 16px;
}

.resource-related {
    margin-bottom: 16px;
}

.resource-related__header {
    margin-bottom: 14px;
}

.resource-related__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.resource-related__grid {
    margin-top: 0;
}

@media (max-width: 991px) {
    .toc-widget {
        display: none;
    }

    .toc-float-btn {
        display: inline-flex;
    }

    .resource-mobile-download-bar {
        display: block;
    }

    .resource-mobile-fab {
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    .author-info-bar.article-author-bar {
        gap: 10px;
        margin-bottom: 16px;
    }

    .author-info-bar.article-author-bar .author-info-bar__sub {
        gap: 6px 8px;
    }
}
