/* 侧边栏移到左侧（桌面端）；移动端保持纵向堆叠不受影响 */
#content-inner.layout > #aside-content {
  -webkit-box-ordinal-group: 1 !important;
  -moz-box-ordinal-group: 1 !important;
  -ms-flex-order: 1 !important;
  -webkit-order: 1 !important;
  order: 1 !important;
}
#content-inner.layout > #recent-posts {
  -webkit-box-ordinal-group: 2 !important;
  -moz-box-ordinal-group: 2 !important;
  -ms-flex-order: 2 !important;
  -webkit-order: 2 !important;
  order: 2 !important;
}
@media screen and (max-width: 1200px) {
  #content-inner.layout > #aside-content,
  #content-inner.layout > #recent-posts {
    -webkit-box-ordinal-group: 1 !important;
    -moz-box-ordinal-group: 1 !important;
    -ms-flex-order: 1 !important;
    -webkit-order: 1 !important;
    order: 1 !important;
  }
}

/* ========== 侧边栏与博文列表顶部对齐（recent-posts 里第一个子元素可能是 tabs 栏，用 :first-child 通杀） ========== */
#content-inner.layout > #aside-content > .card-widget:first-child,
#content-inner.layout > #recent-posts > :first-child {
  margin-top: 0 !important;
}

/* ========== 最新留言：两行式（头像+昵称/日期一行，摘要另起一行；关键排版由 JS 内联样式写死） ========== */
#card-newest-comments .aside-list-item.ma-msg { display: block; padding: 10px 2px; animation: ma-msg-in .45s ease; }
#card-newest-comments .aside-list-item.ma-msg + .aside-list-item.ma-msg {
  border-top: 1px solid rgba(120, 120, 120, .12);
}
@keyframes ma-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ========== 手机端（≤768px）：页脚单列居中 ========== */
@media screen and (max-width: 768px) {
  .ma-footer-inner { grid-template-columns: 1fr; gap: 18px; padding: 22px 16px 4px; text-align: center; }
}
/* Telegram 图标补丁 (2026-10-17)：anzhiyu 图标库缺 anzhiyu-icon-telegram，用白色 SVG 补上 */
.anzhiyu-icon-telegram {
  display: inline-block !important;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M21.9 4.6l-3.1 14.7c-.2 1-.8 1.2-1.7.8l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8L18.2 7c.4-.3-.1-.5-.6-.2L6.9 13.2 2.2 11.7c-1-.3-1-1 .2-1.5l18.4-7.1c.8-.3 1.5.2 1.1 1.5z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}
.anzhiyu-icon-telegram::before {
  content: none !important;
}
/* ===== Telegram 社交按钮补丁 v2（2026-10-18）：与 Github/Email 按钮视觉统一 ===== */
#aside-content a[href*="t.me"],
.card-info-social-icons a[href*="t.me"] {
  background-color: #26282e !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23D8DCE3'%3E%3Cpath d='M21.9 4.6l-3.1 14.7c-.2 1-.8 1.2-1.7.8l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8L18.2 7c.4-.3-.1-.5-.6-.2L6.9 13.2 2.2 11.7c-1-.3-1-1 .2-1.5l18.4-7.1c.8-.3 1.5.2 1.1 1.5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 55% 55% !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  color: transparent !important;
}
#aside-content a[href*="t.me"] i,
#aside-content a[href*="t.me"] span,
.card-info-social-icons a[href*="t.me"] i,
.card-info-social-icons a[href*="t.me"] span {
  display: none !important;
}
#aside-content a[href*="t.me"]::before,
.card-info-social-icons a[href*="t.me"]::before {
  content: none !important;
}

/* ===== v3 补强（2026-10-18）：v2 导致按钮塌成 0 尺寸，强制固定尺寸 ===== */
#aside-content a[href*="t.me"],
.card-info-social-icons a[href*="t.me"] {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
