/* 帖子详情页：与首页背景、顶栏协调 */

/* 本页无汉堡/用户按钮，覆盖导航栏里「居中 absolute logo + 三列 grid」，避免与链接重叠 */
.post-page {
  overflow-x: clip;
}

.post-page .brand {
  pointer-events: auto;
  position: static;
  transform: none;
  left: auto;
  max-width: min(56%, 220px);
  flex: 0 1 auto;
}

.post-page .brand a {
  display: flex;
  align-items: center;
}

.post-page .site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  min-height: 48px;
}

.post-page .site-header__inner .post-top-nav {
  margin-left: auto;
  order: unset;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.post-top-nav {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .post-page .site-header__inner {
    display: flex;
    grid-template-columns: unset;
  }

  .post-page .brand {
    grid-column: unset;
    justify-self: unset;
    max-width: 240px;
  }
}

.post-detail {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  box-sizing: border-box;
}

/* 固定顶栏占位（须在 padding 简写之后单独写 top，避免被覆盖） */
.post-page .post-detail {
  padding-top: max(calc(32px + 56px), calc(32px + env(safe-area-inset-top, 0px) + 48px));
}

.post-detail__article {
  background: rgba(28, 28, 32, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px 24px 36px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  max-width: 100%;
  overflow-x: clip;
}

.post-detail__cover {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.2);
  max-width: 100%;
}

.post-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail__title {
  font-family: var(--font-apple, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.96);
  margin: 0 0 12px;
}

.post-detail__meta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-detail__body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-detail__body p {
  margin: 0 0 1em;
}

.post-detail__body p:last-child {
  margin-bottom: 0;
}

.post-detail__body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 1.5em 0 0.65em;
}

.post-detail__body h2:first-child {
  margin-top: 0;
}

.post-detail__figure {
  margin: 1.25em 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.post-detail__figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.post-detail__caption {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  padding: 10px 12px 12px;
  margin: 0;
}

.post-page-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 28px 20px max(40px, env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.48);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-page-footer p {
  margin: 0;
}

.post-top-nav a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  padding: 6px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.post-top-nav a:hover {
  color: #fff;
}

.post-top-nav span[aria-current="page"] {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  padding: 6px 2px;
}

@media (max-width: 767.98px) {
  .post-page .site-header {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }

  .post-page .brand {
    max-width: min(50%, 180px);
  }

  .post-top-nav {
    font-size: 0.8125rem;
    gap: 8px 10px;
  }

  .post-page .post-detail {
    padding-top: max(calc(24px + 52px), calc(12px + env(safe-area-inset-top, 0px) + 44px));
  }

  .post-detail {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: 48px;
  }

  .post-detail__article {
    padding: 20px 16px 28px;
    border-radius: 12px;
  }

  .post-detail__title {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .post-detail {
    padding-left: 24px;
    padding-right: 24px;
  }

  .post-detail__article {
    padding: 32px 36px 40px;
  }
}
