/* 全站统一顶栏：首页与所有子页面共用，改这里即全站生效 */
.gnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(16px, 4vw, 56px);
  background: rgba(5, 6, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(224, 216, 244, 0.08);
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
.gnav a { text-decoration: none; }
.gnav-brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 17px; font-weight: 500; letter-spacing: 0.08em; color: #f4eef9;
}
.gnav-brand em { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 17px; font-style: italic; letter-spacing: 0.02em; color: rgba(224, 216, 244, 0.66); }
.gnav-links { display: flex; gap: 28px; font-size: 14px; }
.gnav-links a { position: relative; color: rgba(224, 216, 244, 0.66); transition: color 0.3s; }
.gnav-links a:hover, .gnav-links a.cta, .gnav-links a.is-active { color: #f4eef9; }
.gnav-links a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--thread, #ff8a7a);
}

/* 首页：离开首屏后才浮现 */
.gnav--float {
  position: fixed; left: 0; right: 0;
  opacity: 0; transform: translateY(-100%); pointer-events: none;
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.gnav--float.show { opacity: 1; transform: none; pointer-events: auto; }

/* 手机：导航横向可滑，右侧渐隐提示还有更多 */
@media (max-width: 720px) {
  .gnav { gap: 14px; padding: 12px 0 12px 16px; }
  .gnav-brand { flex: none; font-size: 16px; }
  .gnav-brand em { display: none; }
  .gnav-links {
    flex: 1; min-width: 0; gap: 18px; padding: 6px 16px 6px 4px; font-size: 13.5px; white-space: nowrap;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 28px), transparent);
  }
  .gnav-links::-webkit-scrollbar { display: none; }
  .gnav-links a.is-active::after { bottom: -4px; }
}
