/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-09-06 17:19:05
 * Fingerprint: aadec520d901c075
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-08-31 17:36:30
 * Fingerprint: 897f796e1b7f0d91
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

/*
 * Theme: theme-Serenity
 * Author: Serenity
 * Build: 2026-07-05 00:01:15
 * Fingerprint: 1a93cc3686d739b8
 * Copyright (c) 2026 Serenity. All rights reserved.
 */

.hero-avatar-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hero-weather-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  --weather-accent: var(--weather-color, var(--color-accent));
  --weather-icon-color: var(--weather-color, var(--color-accent));
}

.weather-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.weather-item::after {
  content: '\00B7';
  margin-left: var(--space-2);
  color: var(--weather-accent);
  opacity: 0.6;
}

.weather-item:last-child::after {
  display: none;
}

.weather-text {
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  cursor: default;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
  position: relative;
  line-height: 1.4;
  padding: 2px 4px;
  margin: -2px -4px;
  /* 默认镂空效果 */
  color: transparent;
  -webkit-text-stroke: 1.5px var(--weather-accent);
  transition: all var(--duration-normal);
}

/* 检测是否是渐变，如果是则使用背景裁剪实现 */
.weather-text[data-gradient="true"] {
  background: var(--weather-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* line-height、padding、margin 继承自基础 .weather-text */
}

.weather-text i[class^="qi-"] {
  font-size: 1.3em;
  color: var(--weather-icon-color);
  -webkit-text-stroke: 0;
  font-style: normal;
}

.weather-item:hover .weather-text {
  color: var(--weather-accent);
  -webkit-text-fill-color: var(--weather-accent);
}

@media (max-width: 768px) {
  .hero-weather-bar {
    gap: var(--space-2);
    margin-top: var(--space-3);
  }
  
  .weather-text {
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 2px 3px;
    margin: -2px -3px;
  }
}

.feed-zone {
  padding: var(--space-10) 0 var(--space-12);
}

.feed-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 1024px) {
  .feed-layout {
    grid-template-columns: 1fr 1fr;
  }
  
  .feed-layout-single {
    grid-template-columns: 1fr;
  }
}

.feed-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.block-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  padding-left: var(--space-4);
}

.block-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--color-accent), var(--color-accent-secondary));
  border-radius: 2px;
}

.block-more {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  margin-left: auto;
}

.block-stats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-4);
}

.block-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-left: var(--space-3);
}

.stat-item {
  font-size: 12px;
  color: var(--color-text-muted);
}

.stat-divider {
  font-size: 12px;
  color: var(--color-text-muted);
}

.block-more:hover {
  color: var(--color-accent);
  background: rgba(var(--color-accent-rgb, 245, 150, 170), 0.1);
}

.article-wrapper {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
  height: 420px;
}

.article-watermark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.08;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.article-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  overflow-y: auto;
  padding-right: var(--space-2);
  position: relative;
  z-index: 1;
}

.article-feed::-webkit-scrollbar {
  width: 4px;
}

.article-feed::-webkit-scrollbar-track {
  background: var(--color-bg-soft);
  border-radius: 2px;
}

.article-feed::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 2px;
  opacity: 0.5;
}

.article-row {
  transition: all var(--duration-fast);
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: var(--space-3);
  position: relative;
}

.article-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-row:hover {
  transform: translateX(4px);
}

/* 序号样式 - 镂空效果 */
.article-index {
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--color-accent);
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  transition: all var(--duration-normal);
  opacity: 0.5;
}

.article-row:hover .article-index {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
  opacity: 1;
}

.article-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  overflow: hidden;
}

.article-cover {
  width: 80px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal);
}

.article-row:hover .article-cover img {
  transform: scale(1.08);
}

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

.article-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--duration-fast);
}

.article-row:hover .article-name {
  color: var(--color-accent);
}

/* 置顶文章 */
.article-row-pinned {
  border-bottom-style: solid;
  border-bottom-color: rgba(var(--color-accent-rgb, 245, 150, 170), 0.15);
}

.article-pin {
  position: absolute;
  top: -2px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  z-index: 10;
  transition: all var(--duration-fast);
}

.article-pin svg {
  width: 18px;
  height: 18px;
}

.article-row:hover .article-pin {
  transform: scale(1.15) rotate(-10deg);
}

.article-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.article-views {
  font-size: 12px;
  color: #888;
  font-style: italic;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 0.15em;
}

.stream-wrapper {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  height: 420px;
  overflow: hidden;
  position: relative;
}

.stream-watermark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.08;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.stream-feed {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-8);
  position: relative;
  z-index: 1;
}

.stream-feed::-webkit-scrollbar {
  width: 4px;
}

.stream-feed::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 2px;
}

.stream-feed::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 2px;
  opacity: 0.5;
}

.stream-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  padding-left: var(--space-4);
  min-width: 0;
}

.stream-row:not(:last-child) {
  border-bottom: 1px dashed var(--color-border);
}

.stream-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--color-accent),
    var(--color-accent-secondary)
  );
}

.stream-row:first-child::before {
  top: 50%;
  border-radius: 1px 1px 0 0;
}

.stream-row:last-child::before {
  bottom: 50%;
  border-radius: 0 0 1px 1px;
}

.stream-marker {
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  border: 2px solid var(--color-accent);
  z-index: 1;
  transition: all var(--duration-fast);
}

.stream-row:hover .stream-marker {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(var(--color-accent-rgb, 245, 150, 170), 0.2);
}

.stream-body {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  font-size: 13px;
  line-height: 1.7;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.stream-time {
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-left: var(--space-3);
}

.stream-verb {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.stream-object {
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--duration-fast);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.stream-object.stream-moment {
  display: inline-block;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.stream-object.stream-moment * {
  display: inline;
  margin: 0;
  padding: 0;
}

.stream-object::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--duration-fast);
}

.stream-object:hover {
  color: var(--color-accent);
}

.stream-object:hover::after {
  transform: scaleX(1);
}

.stream-actor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--color-bg-mute);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.stream-actor img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.memo-zone {
  margin-top: var(--space-10);
}

.memo-zone .block-head {
  justify-content: flex-start;
  margin-bottom: var(--space-4);
}

.memo-nav {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
  flex-shrink: 0;
}

.memo-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-bg-soft);
  color: var(--color-text-secondary);
  font-size: 14px;
  transition: all var(--duration-fast);
  border: 1px solid var(--color-border);
}

.memo-nav-btn:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.memo-swiper {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.memo-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

/* 弱网/脚本未就绪时，保证横向布局不塌成单列 */
.memo-swiper:not(.swiper-initialized) .swiper-wrapper {
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.memo-swiper:not(.swiper-initialized) .swiper-wrapper::-webkit-scrollbar {
  display: none;
}

.memo-swiper .swiper-slide {
  flex: 0 0 auto;
  width: auto;
}

.memo-card {
  padding: var(--space-6);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

/* 图片卡片样式 */
.memo-card.photo-card {
  padding: 0;
  height: 140px;
  width: clamp(140px, 18vw, 260px);
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.memo-card.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.photo-img {
  display: block;
  height: 100%;
  width: 100%;
  max-width: none;
  min-width: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.memo-card.photo-card:hover .photo-img {
  transform: scale(1.08);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.memo-card.photo-card:hover .photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

.photo-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.photo-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* 右下角分组标签 */
.photo-group-tag {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: #fff;
  font-weight: 500;
  transition: all 0.3s ease;
  z-index: 2;
}

.memo-card.photo-card:hover .photo-group-tag {
  background: var(--color-accent);
  transform: scale(1.05);
}

/* 右上角时间 */
.photo-time {
  position: absolute;
  right: var(--space-3);
  top: var(--space-3);
  padding: 2px var(--space-2);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
}

/* 底部图片名称 */
.photo-name {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  max-width: 60%;
  padding: 2px var(--space-2);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.memo-card-watermark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.08;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.memo-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  position: relative;
  z-index: 1;
}

.memo-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
}

.memo-like-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.memo-like-btn:hover {
  background: var(--color-bg-soft);
  color: var(--color-accent);
}

.memo-like-btn.liked {
  color: var(--color-accent);
}

.memo-like-btn.liked .memo-heart {
  animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.memo-like-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.memo-heart {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.memo-like-count {
  font-size: 0.875rem;
}

.life-zone {
  margin-top: var(--space-10);
}

.life-zone .block-head {
  margin-bottom: var(--space-4);
}

.life-swiper {
  overflow: hidden;
}

.life-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.life-swiper:not(.swiper-initialized) .swiper-wrapper {
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.life-swiper:not(.swiper-initialized) .swiper-wrapper::-webkit-scrollbar {
  display: none;
}

/* 生活回想的静态网格（2026-09-23 定稿）
   站长最终要求：「不要滚动效果、就放 5 张、静态展示」⇒ 拿掉 Swiper，
   改成一排 5 个等宽格子。
   · 只显示前 5 个：取数是「置顶优先 → 最新跟上」且多取了几条备用，
     这里用 nth-child 截断。比在模板里算「还差几张」稳得多
     （置顶里可能有没图的、会在 th:if 被滤掉，数量不好预判）。
   · ⚠ th:block 渲染后不输出标签 ⇒ .life-card 是 .life-grid 的直接子元素，
     nth-child 计数不会被中间层影响。
   · 高度不写死，由 .life-card 的 aspect-ratio 撑（原先靠 swiper-slide 的固定宽高）。
   上面那几条 .life-swiper 规则现在是死代码（DOM 里已无 .life-swiper），
   留着是为了以后想换回轮播时不至于丢样式。 */
.life-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.life-grid > .life-card:nth-child(n + 6) {
  display: none;
}

.life-card {
  width: 100%;
  /* 静态网格里靠比例撑高度（原先高度由 .swiper-slide 的固定宽高给） */
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: block;
}

.life-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.life-card:hover img {
  transform: scale(1.08);
}

.life-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-3);
}

.life-overlay::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  mask-image: linear-gradient(to top, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 100%);
  z-index: 0;
}

.life-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.life-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-date {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

/* 生活回想视频样式 */
.life-card .life-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.life-card:hover .life-video {
  transform: scale(1.08);
}

.life-card .video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  z-index: 3;
  transition: all 0.3s ease;
}

.life-card:hover .video-play-icon {
  background: rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%) scale(1.1);
}

/* 置顶卡片（2026-09-23）
   .life-card-pinned 只作**语义标记**，不加任何视觉修饰 ——
   站长明确说「置顶两个字就不要在图片上展示啦」。
   置顶的表达只靠**排序**（带 pinTag 标签的瞬间被排到最前，见 index.html）。
   这个 class 保留着，以后想加角标/描边时直接挂样式即可。 */

/* 生活回想空态（2026-09-23）
   模板里 .life-empty 一直存在，靠 :has 判断轮播里到底有没有 .life-card：
   有卡 → 藏文案；一张卡都没有（近 30 条瞬间全不带图）→ 才显示。
   老浏览器不支持 :has 时第一条规则生效，文案恒隐藏，不会溢出到页面上。 */
.life-empty {
  display: none;
  margin-top: var(--space-3);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  background: var(--color-bg-soft, rgba(127, 127, 127, 0.08));
  border-radius: var(--radius-md);
}

.life-zone:not(:has(.life-card)) .life-empty {
  display: block;
}

.hero-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.hero-background-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: filter 0.3s ease, opacity 0.3s ease;
  /* GPU 加速：一次性合成提示，不用常驻 will-change 长期占用合成内存 */
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 图片加载完成后的淡入效果 */
.hero-background-img.loaded {
  opacity: 1;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
  pointer-events: none;
}

[data-theme="light"] .hero-background::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
}

/* ── 多图轮播壁纸（主题设置：首页内容 → 背景壁纸设置 → 多图轮播） ──
   过渡时长由 JS 写在容器的 --bg-carousel-transition 上。

   ⚠ 层叠隔离说明（别删）：
   主题原有的 `.hero-background-img.loaded{opacity:1}` 特异性是 (0,2,0)，
   会盖掉轮播图默认的 opacity:0，导致所有图同时可见、最后一张叠在最上面。
   所以轮播容器一律用 `.hero-bg-carousel .hero-bg-slide` (0,2,0) 起步写规则，
   并用 `opacity:0 !important` / `opacity:1 !important` 把显隐权彻底收回来。 */
.hero-bg-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  /* 独立的层叠上下文：内部 z-index 不会漏到蒙版 / 正文之上 */
  isolation: isolate;
}

.hero-bg-carousel .hero-bg-slide {
  position: absolute;
  inset: 0;
  opacity: 0 !important;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--bg-carousel-transition, 1200ms) ease-in-out;
}

.hero-bg-carousel .hero-bg-slide.is-active {
  opacity: 1 !important;
  /* 当前这张永远压在其余之上，避免任何情况下被盖住 */
  z-index: 1;
}

/* 缩放推进 */
.hero-bg-carousel[data-effect="zoom"] .hero-bg-slide {
  transform: scale(1.08) translateZ(0);
  transition: opacity var(--bg-carousel-transition, 1200ms) ease-in-out,
              transform var(--bg-carousel-transition, 1200ms) ease-in-out;
}
.hero-bg-carousel[data-effect="zoom"] .hero-bg-slide.is-active {
  transform: scale(1) translateZ(0);
}

/* 左右滑动 */
.hero-bg-carousel[data-effect="slide"] .hero-bg-slide {
  transform: translateX(8%) translateZ(0);
  transition: opacity var(--bg-carousel-transition, 1200ms) ease-in-out,
              transform var(--bg-carousel-transition, 1200ms) ease-in-out;
}
.hero-bg-carousel[data-effect="slide"] .hero-bg-slide.is-active {
  transform: translateX(0) translateZ(0);
}

/* 模糊切换 */
.hero-bg-carousel[data-effect="blur"] .hero-bg-slide {
  filter: blur(14px);
  transition: opacity var(--bg-carousel-transition, 1200ms) ease-in-out,
              filter var(--bg-carousel-transition, 1200ms) ease-in-out;
}
.hero-bg-carousel[data-effect="blur"] .hero-bg-slide.is-active {
  filter: blur(0);
}

/* 直接切换，无动效 */
.hero-bg-carousel[data-effect="none"] .hero-bg-slide {
  transition: none;
}

/* ========================================
   首页背景蒙版（主题设置：背景壁纸设置 → 白色蒙版）
   压在壁纸之上、正文之下，用于降低图片对比度、提升文字可读性
   ======================================== */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--hero-overlay-color, #ffffff);
  opacity: var(--hero-overlay-opacity, 0.3);
  transition: opacity var(--duration-normal);
}

.hero {
  min-height: calc(100vh - var(--header-height));
  height: calc(100vh - var(--header-height));
  max-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-5);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .hero-profile {
    flex-direction: row;
    text-align: left;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    gap: var(--space-8);
    transform: translate(-100px, 30px);
  }
  
  .hero-avatar {
    margin-left: 0 !important;
  }
  
  .hero-info {
    margin-right: 0 !important;
  }
}

/* ===== 关闭头像框显示：内容居中 ===== */
.hero-profile.hero-no-avatar {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 兜底：即便模板未移除节点，也强制隐藏头像 */
.hero-profile.hero-no-avatar .hero-avatar {
  display: none !important;
}

.hero-profile.hero-no-avatar .hero-avatar-wrapper {
  align-items: center;
}

/* 头像框隐藏且天气条也未开启时，避免空容器占位 */
.hero-profile.hero-no-avatar .hero-avatar-wrapper:empty,
.hero-profile.hero-no-avatar .hero-avatar-wrapper:not(:has(.hero-weather-bar)) {
  display: none;
}

.hero-profile.hero-no-avatar .hero-info {
  align-items: center;
  text-align: center;
  margin: 0 !important;
  max-width: 760px;
  /* 定宽，别退回「收缩到内容宽」：否则打字机改字宽时会带着下方文字一起左右移动 */
  width: 100%;
}

@media (min-width: 768px) {
  .hero-profile.hero-no-avatar {
    flex-direction: column;
    justify-content: center;
    transform: translate(0, 30px);
  }

  .hero-profile.hero-no-avatar .hero-info {
    align-items: center;
    text-align: center;
    margin-right: 0 !important;
  }

  .hero-profile.hero-no-avatar .hero-avatar {
    margin-left: 0 !important;
  }
}

.hero-avatar {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 
    0 0 0 4px rgba(255, 255, 255, 0.5),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--avatar-glow, var(--color-accent)), var(--avatar-glow, var(--color-accent-secondary)));
  opacity: 0.3;
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.5; }
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: 560px;
}

@media (min-width: 768px) {
  .hero-info {
    align-items: flex-start;
  }
}

.hero-name {
  /* xhj 定制：原来是 clamp(3rem, 8vw, 5rem)，在 1024~1300px 的窗口下
     最长那句（15 汉字 × 80px = 1200px）会超出视口被裁掉。
     改成 6vw 后 ≥1366px 的观感不变，窄屏才自动缩一档。 */
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.2;
  padding-right: 0.15em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* xhj 定制（2.1.62）：首页 hero 标语压在壁纸上，深色壁纸时近黑字直接消失。
     方案 B：固定近黑填充 + 白色光晕，深浅背景都清晰；!important 覆盖内联的
     -webkit-text-fill-color:transparent，保证光晕一定渲染。 */
  -webkit-text-fill-color: #14161a !important;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.85), 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .hero-name {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 打字机名字：默认隐藏，等 main.js 的 initTypewriter 接管时加 .is-ready 再显示。
   不这样做的话，模板里的兜底文案会在首帧先显示一下（脚本要等 ~500ms 才开始打字），
   看到的就是"先闪一个旧名字，然后才开始轮播"。 */
.typewriter-text {
  visibility: hidden;
}

.typewriter-text.is-ready {
  visibility: visible;
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 0.15em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
  animation: blink 1s step-end infinite;
  position: relative;
  top: 0.05em;
  border-radius: 2px;
}

[data-theme="light"] .typewriter-cursor {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--color-text-secondary);
  max-width: 450px;
}

[data-theme="light"] .hero-tagline {
  color: rgba(30, 30, 30, 0.8);
}

.hero-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-accent);
  padding: var(--space-2) var(--space-4);
  background: rgba(245, 150, 170, 0.1);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
}

[data-theme="light"] .hero-role {
  background: rgba(51, 166, 184, 0.1);
}

.hero-bio {
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  white-space: pre-line;
  color: rgba(255, 255, 255, 0.85);
  margin-top: var(--space-1);
  max-width: 480px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-theme="light"] .hero-bio {
  color: rgba(20, 20, 20, 0.85);
  text-shadow: none;
  font-weight: 500;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

/* 自定义颜色：覆盖亮色/暗色主题默认样式，颜色固定不随主题切换 */
.hero-bio-custom,
[data-theme="light"] .hero-bio-custom {
  text-shadow: none;
  text-decoration-color: transparent;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  transition: all var(--duration-fast);
}

[data-theme="light"] .social-link {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--color-text);
}

.social-link:hover {
  color: #fff;
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link .iconify,
.social-link svg.iconify {
  width: 20px;
  height: 20px;
  color: inherit;
}

.sponsor-link {
  position: relative;
  cursor: pointer;
}

.sponsor-qrcode {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 100;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.sponsor-qrcode::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-accent);
}

.sponsor-link:hover .sponsor-qrcode {
  opacity: 1;
  visibility: visible;
}

.sponsor-qrcode-img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: var(--radius-md);
  padding: 4px;
}

.sponsor-qrcode-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sponsor-qrcode-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: white;
}

.sponsor-qrcode-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0;
}

.sponsor-qrcode-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.4;
}

.compass-zone {
  padding: var(--space-12) 0;
}

.hero-compass {
  margin-top: 0;
  text-align: center;
}

.compass-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.compass-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.compass-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  max-width: 900px;
  margin: 0 auto;
}

.compass-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all var(--duration-normal);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 160px;
}

/* 卡片底部装饰线 */
.compass-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary, var(--color-accent)));
  transition: all var(--duration-normal);
  transform: translateX(-50%);
}

.compass-item:hover {
  color: var(--color-text);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.compass-item:hover::after {
  width: 60%;
}

.compass-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: all var(--duration-normal);
}

/* 自定义 icon class 图标 */
.compass-item .nav-custom-icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  transition: all var(--duration-normal);
}

/* 图标悬停动效 */
.compass-item:hover svg,
.compass-item:hover .nav-custom-icon {
  transform: scale(1.15) rotate(-5deg);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 150, 170, 0.3);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 20px rgba(51, 166, 184, 0.3);
}

.btn-secondary {
  background: var(--color-bg-soft);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-mute);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.hero-scroll {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: 12px;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll .scroll-arrow {
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
}

.hero-scroll svg {
  width: 32px;
  height: 32px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.hero-stats {
  position: absolute;
  left: 30px;
  bottom: 30px;
  display: flex;
  gap: var(--space-3);
  z-index: 10;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-md);
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
}

.stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}


@media (max-width: 768px) {
  /* xhj 定制（2.1.69）：手机版首屏与桌面同款 —— hero 占满整个首屏，文字块垂直水平居中。
     旧「顶部照片带」方案（--hero-band-h + translateY(35px) 补偿）已整体删除：
     它让文字挤在屏幕上方一条带里，而全屏欢迎屏(welcome-overlay)淡出后露出的
     是居中画面，两者落差看起来就是「文字跳上去了」。现在欢迎屏淡出 →
     hero 文字正好居中于整屏，无缝衔接；上滑后才出现「近期笔记」等内容区。 */
  .hero {
    min-height: calc(100vh - var(--header-height));
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) var(--space-4) var(--space-5);
  }

  /* xhj 定制（手机版 · 2.1.68 修正）：背景图铺满整屏（与桌面统一，position:fixed + z-index:-1）。
     刚进站显示清晰首图，上滑时由 initHeroBackground 统一做「blur + 淡出」渐变，
     露出 body 的浅色底（var(--color-bg)），内容区文字显示在浅底上 —— 与桌面端行为一致。
     ⚠ 不再用「半透明白毛玻璃透图」方案（2.1.63~2.1.67 的错误方向，导致刚进站内容区就被
     毛玻璃盖住、下滑到底又露出未覆盖的底图）。 */
  .hero-background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  /* 多图轮播：容器铺满整屏背景 */
  .hero-bg-carousel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* 文案块定宽：.hero-info 原本「收缩到内容宽」，打字机每改一次字宽，
     整块宽度跟着变，下方 tagline / bio 会左右移动。定宽 100% 消除抖动。 */
  .hero-profile,
  .hero-profile.hero-no-avatar {
    width: 100%;
    max-width: 100%;
  }

  .hero-info,
  .hero-profile.hero-no-avatar .hero-info {
    width: 100%;
    max-width: 100%;
  }
  
  .theme-decor {
    display: none !important;
  }
  
  .hero-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-4);
  }
  
  .hero-profile {
    flex-direction: column;
    text-align: center;
    gap: 0;
    /* 基础样式有 48px 下边距，会把它自己顶高、把文字挤到图片上半部分，这里清掉 */
    margin-bottom: 0;
  }
  
  .hero-info {
    align-items: center;
    margin: 0;
  }
  
  .hero-name {
    font-size: 1.75rem;
    margin-bottom: var(--space-2);
    /* ⚠ 别改回 nowrap：data-text 里最长的一句有 15 个汉字，
       2rem 时要 480px 宽，远超手机可用宽度，会被 .hero 的 overflow:hidden 裁掉，
       表现就是「打字机文字显示不全」。允许换行 + 预留两行高度，
       既完整可见，打字过程中下方文字也不会上下跳。 */
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    min-height: 2.4em;
    /* 上面预留了两行高度（防止打字时下方文字上下跳），但单行的那几句会贴在
       预留盒子的上半部分、看着偏高。加一点上内边距把单行/双行的偏差摊平：
       单行约高 0.3em、双行约低 0.3em，都在 8px 内，肉眼看就是居中。 */
    padding-top: 0.6em;
  }
  
  .hero-tagline {
    font-size: 1rem;
    margin-bottom: var(--space-3);
  }
  
  .hero-bio {
    font-size: 14px;
    max-width: 100%;
    text-align: center;
    line-height: 1.8;
    /* 块尾的下边距会把「可见文字」整体顶高，居中就不准了，清掉 */
    margin-bottom: 0;
  }
  
  .hero-social {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    /* 同上：空的 hero-social 也会贡献上边距（本站没有社交链接），清掉 */
    margin-top: 0;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .social-link svg {
    width: 20px;
    height: 20px;
  }
  
  .social-link .iconify,
  .social-link svg.iconify {
    width: 20px;
    height: 20px;
  }
  
  /* 首屏不再占满一屏，向下箭头会正好压在风向标上，索性不显示 */
  .hero-scroll {
    display: none;
  }
  
  .compass-zone {
    /* xhj 定制（需求2）：手机版隐藏风向标，桌面端不受影响 */
    display: none !important;
    padding: var(--space-6) 0;
  }
  
  .compass-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-1);
  }
  
  .compass-subtitle {
    font-size: 11px;
    margin-bottom: var(--space-3);
  }
  
  .compass-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
  }
  
  .compass-item {
    padding: var(--space-2) var(--space-3);
    font-size: 13px;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
  }
  
  .compass-item svg {
    width: 14px;
    height: 14px;
  }
  
  .compass-item .nav-custom-icon {
    font-size: 14px;
    width: 14px;
    height: 14px;
  }
  
  .feed-zone {
    padding: var(--space-6) 0;
  }
  
  .life-zone {
    margin-top: var(--space-5);
  }

  /* ≤768：一排 5 张太窄，改 3 列（5 张 → 3 + 2） */
  .life-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .life-title {
    font-size: 11px;
  }

  .life-desc {
    font-size: 9px;
  }

  .life-date {
    font-size: 8px;
    padding: 1px 4px;
    top: 4px;
    right: 4px;
  }

  .life-overlay {
    padding: var(--space-2);
  }
  
  .feed-layout {
    grid-template-columns: 1fr !important;
    gap: var(--space-5);
  }
  
  .article-cover {
    display: none;
  }
  
  .article-index {
    display: none;
  }
  
  .article-link {
    padding-left: 0;
    gap: 0;
  }
  
  .article-detail {
    padding-left: 0;
    flex: 1;
  }
  
  .block-head {
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
  }
  
  .block-label {
    font-size: 0.95rem;
  }
  
  .block-subtitle {
    font-size: 10px;
  }
  
  .block-stats {
    font-size: 10px;
  }
  
  .block-more {
    font-size: 11px;
  }
  
  .memo-zone {
    margin-top: var(--space-5);
  }
  
  .memo-card {
    min-width: 240px;
    padding: var(--space-3);
  }
  
  .memo-card.photo-card {
    height: 100px;
    width: 180px;
    min-width: 180px;
  }

  .photo-img {
    max-width: none;
    min-width: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .photo-time {
    font-size: 0.55rem;
    padding: 1px var(--space-1);
    right: var(--space-2);
    top: var(--space-2);
  }
  
  .photo-name {
    font-size: 0.6rem;
    left: var(--space-2);
    bottom: var(--space-2);
    padding: 1px var(--space-1);
  }
  
  .photo-group-tag {
    font-size: 0.6rem;
    right: var(--space-2);
    bottom: var(--space-2);
    padding: var(--space-1) var(--space-2);
  }
  
  .memo-text {
    font-size: 13px;
    line-height: 1.5;
  }
  
  .memo-date {
    font-size: 11px;
  }
  
  .memo-like-btn {
    font-size: 11px;
  }
  
  .memo-heart {
    width: 14px;
    height: 14px;
  }
  
  .memo-nav {
    gap: var(--space-1);
  }
  
  .memo-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
  
  .article-wrapper,
  .stream-wrapper {
    padding: var(--space-2);
    height: 300px;
    border-radius: var(--radius-md);
  }

  .article-feed {
    gap: var(--space-1);
  }

  .article-row {
    padding: var(--space-1) 0;
    padding-bottom: var(--space-1);
  }

  .article-name {
    font-size: 12px;
    margin-bottom: 0;
  }

  .article-desc {
    font-size: 10px;
  }

  .article-views {
    font-size: 9px;
  }

  .stream-feed {
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  }

  .stream-row {
    padding: var(--space-1) 0;
    padding-left: 16px;
  }

  .stream-marker {
    width: 8px;
    height: 8px;
    left: -3px;
  }

  .stream-body {
    font-size: 11px;
  }

  .stream-verb {
    font-size: 11px;
  }

  .stream-object {
    font-size: 11px;
  }

  .stream-actor {
    font-size: 11px;
  }

  .stream-actor img {
    width: 14px;
    height: 14px;
  }

  .stream-time {
    font-size: 9px;
  }

  .article-watermark,
  .stream-watermark {
    font-size: 60px;
    opacity: 0.015;
  }
}

@media (max-width: 480px) {
  .compass-item {
    padding: var(--space-1) var(--space-2);
    font-size: 12px;
  }
  
  .hero-avatar {
    width: 100px;
    height: 100px;
  }
  
  .hero-name {
    font-size: 1.55rem;
  }
  
  .hero-tagline {
    font-size: 0.95rem;
  }
  
  .hero-bio {
    font-size: 13px;
  }
  
  .social-link {
    width: 28px;
    height: 28px;
  }
  
  .social-link svg {
    width: 14px;
    height: 14px;
  }
  
  .social-link .iconify,
  .social-link svg.iconify {
    width: 14px;
    height: 14px;
  }
  
  .memo-card {
    min-width: 160px;
    padding: var(--space-2);
  }

  .memo-card.photo-card {
    height: 85px;
    min-width: 0;
  }
  
  .memo-text {
    font-size: 11px;
    line-height: 1.6;
  }
  
  .memo-info {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
  }
  
  .memo-date {
    font-size: 10px;
  }
  
  .memo-like-btn {
    padding: var(--space-1) var(--space-2);
    gap: var(--space-1);
    font-size: 11px;
  }
  
  .memo-heart {
    width: 14px;
    height: 14px;
  }
  
  /* ≤480：2 列（5 张 → 2 + 2 + 1） */
  .life-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  
  .life-date {
    font-size: 7px;
    padding: 1px 3px;
    top: 3px;
    right: 3px;
  }
  
  .life-title {
    font-size: 10px;
  }
  
  .life-desc {
    font-size: 8px;
  }
  
  .block-label {
    font-size: 1rem;
  }
  
  .article-name {
    font-size: 13px;
  }
  
  .article-desc {
    font-size: 11px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .theme-decor {
    right: 50px;
  }
  
  .theme-decor img {
    height: calc(100vh - 200px);
  }
  
  .hero-avatar {
    width: 180px;
    height: 180px;
  }
  
  .compass-grid {
    /* flex 布局自动换行，无需指定列数 */
  }
  
  .article-cover {
    width: 80px;
    height: 60px;
  }
  
  .article-cover img {
    width: 80px;
    height: 60px;
  }

}

/* ========================================
   首页随想碎片灯箱
   ======================================== */
.memo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.memo-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.memo-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.memo-lightbox.active .memo-lightbox-img {
  transform: scale(1);
}

.memo-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}

.memo-lightbox-close:hover {
  color: #fff;
}

/* ========================================
   首页背景 Hue 色调遮罩
   ======================================== */
.hero-bg-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: var(--color-accent);
  transition: opacity var(--duration-normal);
}

/* 当 html 拥有 data-hue-active 属性时显示遮罩 */
html[data-hue-active="true"] .hero-bg-tint {
  opacity: 0.3;
  mix-blend-mode: overlay;
}

/* 暗色模式下的色调遮罩 */
html[data-theme="dark"] .hero-bg-tint {
  opacity: 0.25;
}

/* 亮色模式下的色调遮罩 */
html[data-theme="light"] .hero-bg-tint {
  opacity: 0.15;
}

/* （2.1.67 清理：原此处有一段 .index-page .feed-zone/.compass-zone/.memo-zone/.life-zone
   { background:var(--color-bg); border-radius…; margin…; max-width… } 的规则，
   因 .index-page 是死前缀（html/body 从未输出过该类）而从未生效，已删除。
   zone 的真实布局样式在上方各自的 .feed-zone/.memo-zone/.life-zone 规则里。 */

/* （2.1.68 清理：原此处还有一段「移动端内容区半透明白毛玻璃 + backdrop-filter + .main z-index:1」
   的规则块，属 2.1.63~2.1.67 的错误方向 —— 刚进站内容区就被毛玻璃盖住、下滑到底又露出
   未覆盖的底图。已删除。手机版现在与桌面端同款：背景图滚动 blur+淡出，内容区压在浅色底上。 */

/* ========================================
   手机版提示行（仅首页）：内容区之下、页脚之上
   HTML 在 index.html 末尾 .mobile-home-tip
   ======================================== */
.mobile-home-tip {
  display: none;
}

@media (max-width: 768px) {
  .mobile-home-tip {
    display: block;
    background: #fff;
    color: #333;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    padding: 13px 16px;
    margin-top: var(--space-4);
  }
}


