/* Post channel — single DOM tree, PC + H5 via media queries */

.post-static {
  --post-bg: #0f0f0f;
  --post-surface: rgba(255, 255, 255, 0.05);
  --post-border: rgba(255, 255, 255, 0.1);
  --post-text: #fff;
  --post-muted: rgba(255, 255, 255, 0.55);
  --post-accent: #ecd227;
  --post-ink: #0d0d0d;
  --post-placeholder: #464646;
  --post-font: "PingFang SC", "Noto Sans SC", sans-serif;
  --cf-accent: var(--post-accent);
  --cf-ink: var(--post-ink);
  --cf-muted: var(--post-muted);
  --cf-text: var(--post-text);
  width: 100%;
  box-sizing: border-box;
  background: var(--post-bg);
  color: var(--post-text);
  font-family: var(--post-font);
}

.post-static *,
.post-static *::before,
.post-static *::after {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Shell ========== */
.post-view {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.post-inner {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.post-crumb {
  color: var(--post-muted);
  font-weight: 400;
}

.post-crumb__current {
  color: var(--post-muted);
}

.post-title {
  margin: 0;
  color: var(--post-text);
  font-weight: 600;
}

.post-list-alert {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 80, 80, 0.12);
  color: #ff8a8a;
  font-size: 14px;
  line-height: 20px;
}


/* ========== Badge ========== */
.post-badge {
  position: absolute;
  z-index: 1;
  display: block;
  object-fit: contain;
  pointer-events: none;
  box-sizing: border-box;
}

.post-hot-badge {
  position: absolute;
  z-index: 2;
  display: block;
  object-fit: contain;
  pointer-events: none;
  box-sizing: border-box;
}

/* ========== Cards ========== */
.post-grid {
  display: grid;
  width: 100%;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  color: inherit;
  overflow: hidden;
  background: var(--post-placeholder);
  min-width: 0;
}

.post-card__media {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--post-placeholder);
}

.post-card__cover-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.post-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.post-card__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card__meta .post-card__tag {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.post-card__meta .post-card__tag:hover {
  color: var(--post-accent, #ecd227);
  border: 0;
  background: transparent;
}

.post-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  color: inherit;
  text-decoration: none;
}

.post-card--ad .post-card__body,
.post-card--ad .post-badge {
  display: none;
}

/* ========== Visibility ========== */
@media (max-width: 768px) {
  .post-only-pc,
  .post-rank-only-pc {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .post-only-h5,
  .post-rank-only-h5 {
    display: none !important;
  }
}

/* ==========================================================================
   H5
   ========================================================================== */
@media (max-width: 768px) {
  .post-view {
    align-items: stretch;
    padding: 12px 16px 32px;
  }

  .post-inner {
    gap: 18px;
  }

  .post-crumb {
    font-size: 12px;
    line-height: 18px;
  }

  .post-title {
    font-size: 16px;
    line-height: 22px;
  }

  

  

  

  /* Tabs / Tags: 单行裁切 + 展开收起，禁止横向滚动；H5 展开按钮仅图标 */
  

  

  

  

  

  

  

  

  

  

  /* H5 展开：与未展开标签间距一致（8px） */
  

  

  

  

  

  

  

  

  

  

  

  /* 瀑布流：矮卡（含广告）下方空间由后续内容上移填补 */
  .post-grid {
    display: block;
    columns: 2;
    column-gap: 7px;
  }

  .post-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin: 0 0 12px;
    background: transparent;
    overflow: visible;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
  }

  .post-card__media {
    height: 0;
    padding-bottom: 49.404762%; /* 83 / 168 */
    border-radius: 9px;
  }

  .post-card__body {
    gap: 2px;
  }

  .post-card__title {
    order: 1;
    font-size: 12px;
    line-height: 18px;
    color: var(--post-text);
    -webkit-line-clamp: 2;
  }

  .post-card__meta {
    order: 2;
    font-size: 12px;
    line-height: 18px;
    color: var(--post-muted);
    text-shadow: none;
  }

  .post-badge,
  .post-hot-badge {
    left: 6px;
    top: 6px;
    width: 26px;
    height: 14px;
  }

  /* 广告卡高度 = 封面高度，无多余空白 */
  .post-card--ad {
    height: fit-content;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }

  .post-card--ad .post-card__media {
    height: 0;
    padding-bottom: 49.404762%; /* 83 / 168 */
    border-radius: 9px;
    background: var(--post-placeholder);
  }
}

/* ==========================================================================
   PC
   ========================================================================== */
@media (min-width: 769px) {
  .post-view {
    padding: 36px 200px 60px;
  }

  .post-inner {
    max-width: 1520px;
    gap: 36px;
  }

  .post-crumb {
    font-size: 18px;
    line-height: 24px;
  }

  .post-title {
    font-size: 24px;
    line-height: 32px;
  }

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  /* PC 展开：与未展开标签间距一致（12px） */
  

  

  

  

  /* 2-col overlay cards */
  .post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .post-card {
    border-radius: 20px;
    color: #fff;
    /* Safari/Grid: 不用 aspect-ratio 撑高 */
    height: 0;
    padding-bottom: 49.2%; /* 369 / 750 */
  }

  .post-card__media {
    position: absolute;
    inset: 0;
    height: auto;
    padding-bottom: 0;
  }

  .post-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    gap: 12px;
  }

  .post-card__meta {
    order: 0;
    padding: 0 24px;
    font-size: 16px;
    line-height: 22px;
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  }

  .post-card__title {
    order: 0;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    font-size: 18px;
    line-height: 24px;
    -webkit-line-clamp: 2;
  }

  .post-badge,
  .post-hot-badge {
    left: 30px;
    top: 30px;
    width: 66px;
    height: 40px;
  }
}

@media (min-width: 769px) and (max-width: 1600px) {
  .post-view {
    padding-left: 48px;
    padding-right: 48px;
  }
}
