#posts {
  --post_content_code_text_color: #999;
  --post_content_code_background_color: #f7f7f7;

  --post_content_more_text_color: var(--text_color_highlight);
  --post_content_password_text_color: var(--text_color_highlight);

  --post_content_card_parent_background_color: var(--background_color_container);
  --post_content_card_background_color: var(--block_background_color);

  --post_content_card_splitline_color: var(--splitline_color);

  --post_content_card_button_text_color: var(--text_color_highlight);
  --post_content_card_button_background_color: var(--button_background_color);

  --post_content_card_text_color_secondary: var(--text_color_secondary);

  --post_content_card_font_size_secondary: var(--font_size_short);

  --post_content_card_line_height_primary: var(--line_height_tall);
  --post_content_card_line_height_secondary: var(--line_height_short);
}
:root.darkmode #posts {
  --post_content_code_background_color: #363636;
}

#posts {
  --inherit_post_avatar_offset: 50px;

  --post_content_width_size_100pct: calc(100% - var(--inherit_post_avatar_offset));
  --post_content_width_size_90pct: calc(100% / 5 * 4.5);
  --post_content_width_size_66pct: calc(100% / 3 * 2);
  --post_content_width_size_50pct: calc(100% / 2 * 1);

  --post_content_media_top_spacing: 8px;
  --post_content_externallink_top_spacing: 8px;

  --post_content_card_border_radius: 4px;

  --post_content_gallery_item_spacing: 4px;

  --post_content_audio_cover_size_max: 84px;
  --post_content_audio_cover_size_min: 60px;
  --post_content_audio_spacing: 8px;

  --post_content_password_form_input_base_offset: 6px;
  --post_content_password_form_transition_param: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* post-content */

section.post-content strong {
  font-weight: bold;
}

section.post-content em {
  font-style: italic;
}

section.post-content del {
  text-decoration-line: line-through;
}

section.post-content pre,
section.post-content code {
  font-family: 'Source Code Pro', 'Courier New', monospace;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}

section.post-content code {
  margin: 0 3px;
  padding: 0 2px;
  border-radius: 3px;
  color: var(--post_content_code_text_color);
  background-color: var(--post_content_code_background_color);
}

section.post-content pre > code {
  margin: 0;
  padding: 0;
  border-radius: 0;
  font-size: 0.85714286em;
  line-height: 1.5em;
  background-color: transparent;
}

/* post-content more-area */

span.more-area.complete > span.more-ellipsis,
span.more-area:not(.complete) > span.more-content,
span.more-area.complete > span.more-btn.more,
span.more-area:not(.complete) > span.more-btn.less {
  display: none;
}

span.more-area > span.more-btn {
  color: var(--post_content_more_text_color);
  -webkit-user-select: none; /* Safari */
  user-select: none;
  cursor: pointer;
}

/* post-content-card */

*.post-content-card {
  display: block;
  box-sizing: border-box;
  width: var(--post_content_width_size_66pct);
  background-color: var(--post_content_card_background_color);
}

:root.imgradius *.post-content-card {
  border-radius: var(--post_content_card_border_radius);
}

*.post-content-card::after {
  display: block;
  clear: both;
  content: '';
}

/* post-content-gallery */

div.post-content-gallery {
  box-sizing: border-box;
  margin-top: var(--post_content_media_top_spacing);
}

div.post-content-gallery.grid-videojs {
  display: block;
  width: var(--post_content_width_size_90pct);
}

div.post-content-gallery.grid-1,
div.post-content-gallery.grid-1.horizontal {
  display: block;
  width: var(--post_content_width_size_66pct);
}

div.post-content-gallery.grid-1.vertical,
div.post-content-gallery.grid-1.square {
  display: block;
  width: var(--post_content_width_size_50pct);
}

div.post-content-gallery.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto;
  gap: var(--post_content_gallery_item_spacing);
  width: var(--post_content_width_size_66pct);
}

div.post-content-gallery.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: var(--post_content_gallery_item_spacing);
  width: var(--post_content_width_size_100pct);
}

div.post-content-gallery > figure.gallery-thumbnail {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%; /* padding-top hack */
  cursor: zoom-in;
}

div.post-content-gallery.grid-1 > figure.gallery-thumbnail.aspectratio {
  aspect-ratio: var(--aspectratio);
  height: auto;
  padding-top: 0;
}

div.post-content-gallery > figure.gallery-thumbnail > img.thumbnail-image {
  position: absolute;
  left: 0;
  top: 0;
}

:root.imgradius div.post-content-gallery > figure.gallery-thumbnail > img.thumbnail-image {
  border-radius: var(--post_content_card_border_radius);
}

/* post-content-video */

figure.post-content-video {
  display: block;
  box-sizing: border-box;
  height: auto;
  margin-top: var(--post_content_media_top_spacing) !important;
  background-color: var(--post_content_card_background_color);
}

figure.post-content-video.aspectratio {
  aspect-ratio: var(--aspectratio);
}

figure.post-content-video.horizontal {
  width: var(--post_content_width_size_100pct);
}

figure.post-content-video.vertical,
figure.post-content-video.square {
  width: var(--post_content_width_size_50pct);
}

:root.imgradius figure.post-content-video,
:root.imgradius figure.post-content-video > video.play-vedio {
  border-radius: var(--post_content_card_border_radius);
}

/* post-content-audio */

figure.post-content-audio {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  width: var(--post_content_width_size_66pct);
  height: auto;
  margin-top: var(--post_content_media_top_spacing) !important;
  overflow: hidden; /* fix background-image overflow from browser width issues */
}

figure.post-content-audio::before {
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, transparent, var(--post_content_card_parent_background_color));
  -webkit-backdrop-filter: blur(100px);
  backdrop-filter: blur(100px);
  content: '';
}

:root.imgradius figure.post-content-audio::before {
  background-image: linear-gradient(to right, transparent, var(--post_content_card_background_color));
}

figure.post-content-audio::after {
  position: absolute;
  z-index: -2;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--post_content_card_background_color) var(--background_image) 0 50% no-repeat;
  background-size: cover;
  opacity: 0.3;
  content: '';
}

:root.imgradius figure.post-content-audio::before,
:root.imgradius figure.post-content-audio::after {
  border-radius: var(--post_content_card_border_radius);
}

:root.imgradius.safari figure.post-content-audio::before,
:root.imgradius.safari figure.post-content-audio::after {
  height: calc(100% - (1px * 2));
  border: 1px solid var(--post_content_card_parent_background_color);
  border-left: 0 none;
  border-right: 0 none;
}

figure.post-content-audio > div.audio-meta {
  position: relative;
  width: calc(100% - (30px + (var(--post_content_audio_spacing) * 2)));
  height: auto;
}

@media screen and (max-width: 375px) {
  figure.post-content-audio > div.audio-meta {
    width: 100%;
  }
}

figure.post-content-audio > div.audio-meta > span.meta-image {
  display: block;
  aspect-ratio: 1 / 1;
  width: clamp(var(--post_content_audio_cover_size_min), 30%, var(--post_content_audio_cover_size_max));
  height: auto;
}

:root.imgradius.safari figure.post-content-audio > div.audio-meta > span.meta-image {
  border: 1px solid var(--post_content_card_parent_background_color);
  border-left: 0 none;
  border-right: 0 none;
}

:root.imgradius figure.post-content-audio > div.audio-meta > span.meta-image > img.cover {
  border-radius: var(--post_content_card_border_radius) 0 0 var(--post_content_card_border_radius);
  opacity: 0.9;
}

figure.post-content-audio > div.audio-meta > span.meta-text {
  position: absolute;
  top: 50%;
  left: clamp(var(--post_content_audio_cover_size_min), 30%, var(--post_content_audio_cover_size_max));
  transform: translateY(-50%);
  display: block;
  width: calc(100% - clamp(var(--post_content_audio_cover_size_min), 30%, var(--post_content_audio_cover_size_max)) - var(--post_content_audio_spacing));
  height: auto;
  margin-left: var(--post_content_audio_spacing);
}

@media screen and (max-width: 375px) {
  figure.post-content-audio > div.audio-meta > span.meta-text {
    left: auto;
    right: 0;
    width: calc(100% - var(--post_content_audio_cover_size_min) - (var(--post_content_audio_spacing) * 2));
    margin-left: 0;
    margin-right: var(--post_content_audio_spacing);
  }
}

figure.post-content-audio > div.audio-meta > span.meta-text > span.title {
  display: block;
  width: 100%;
  height: var(--post_content_card_line_height_primary);
  line-height: var(--post_content_card_line_height_primary);
  opacity: 0.9;
}

figure.post-content-audio > div.audio-meta > span.meta-text > span.artist {
  display: block;
  width: 100%;
  height: var(--post_content_card_line_height_secondary);
  margin-top: 2px;
  font-size: var(--post_content_card_font_size_secondary);
  line-height: var(--post_content_card_line_height_secondary);
  opacity: 0.6;
}

@media screen and (min-width: 500px) and (max-width: 600px) {
  figure.post-content-audio > div.audio-meta > span.meta-text > span.artist {
    margin-top: -1px;
  }
}

@media screen and (min-width: 375px) and (max-width: 500px) {
  figure.post-content-audio > div.audio-meta > span.meta-text > span.artist {
    margin-top: -4px;
  }
}

@media screen and (max-width: 375px) {
  figure.post-content-audio > div.audio-meta > span.meta-text > span.artist {
    display: none;
  }
}

figure.post-content-audio > div.audio-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  margin: 0 var(--post_content_audio_spacing);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  cursor: pointer;
}

figure.post-content-audio > div.audio-btn {
  background-image: url(../img/post.content.audio.play.light.svg);
}
:root.darkmode figure.post-content-audio > div.audio-btn {
  background-image: url(../img/post.content.audio.play.dark.svg);
}

figure.post-content-audio > div.audio-btn.play {
  background-image: url(../img/post.content.audio.prepare.light.svg);
}
:root.darkmode figure.post-content-audio > div.audio-btn.play {
  background-image: url(../img/post.content.audio.prepare.dark.svg);
}

figure.post-content-audio > div.audio-btn.play.canplay {
  background-image: url(../img/post.content.audio.pause.light.svg);
}
:root.darkmode figure.post-content-audio > div.audio-btn.play.canplay {
  background-image: url(../img/post.content.audio.pause.dark.svg);
}

@media screen and (max-width: 375px) {
  figure.post-content-audio > div.audio-btn {
    left: 0;
    margin: 0 calc((var(--post_content_audio_cover_size_min) - 30px) / 2);
    background-image: url(../img/post.content.audio.play.dark.svg);
  }
  figure.post-content-audio > div.audio-btn.play {
    background-image: url(../img/post.content.audio.prepare.dark.svg);
  }
  figure.post-content-audio > div.audio-btn.play.canplay {
    background-image: url(../img/post.content.audio.pause.dark.svg);
  }
}

/* post-content-card content-password-form */

form.content-password-form {
  padding: calc(var(--post_content_password_form_input_base_offset) * 2);
  border: 1px solid var(--post_content_card_parent_background_color);
  background-image: repeating-linear-gradient(135deg, var(--post_content_card_splitline_color) 0, var(--post_content_card_splitline_color) 15px, transparent 0, transparent 30px);
  transition: background-position-x var(--post_content_password_form_transition_param);
}
form.content-password-form:focus-within {
  border-color: var(--post_content_card_button_text_color);
  background-position-x: -20px;
  caret-color: var(--post_content_card_button_text_color);
}

form.content-password-form > div.input {
  position: relative;
}

form.content-password-form > div.input > input {
  display: block;
  width: 100%;
  height: var(--post_content_card_line_height_secondary);
  padding: var(--post_content_card_line_height_primary) 0 var(--post_content_password_form_input_base_offset);
  color: var(--post_content_password_text_color);
  font-weight: bold;
  line-height: var(--post_content_card_line_height_secondary);
  font-family: "Rounded Mplus 1c", sans-serif;
  letter-spacing: 3px;
}

form.content-password-form > div.input > input::placeholder {
  color: transparent;
}

form.content-password-form > div.input > label {
  position: absolute;
  left: 0;
  top: calc(var(--post_content_card_line_height_secondary) + ((var(--post_content_card_line_height_primary) - var(--post_content_card_line_height_secondary)) / 2));
  display: block;
  width: 100%;
  height: var(--post_content_card_line_height_secondary);
  line-height: var(--post_content_card_line_height_secondary);
  transform-origin: 0 0;
  transition: transform var(--post_content_password_form_transition_param);
  pointer-events: none;
}

form.content-password-form > div.input > input:focus ~ label,
form.content-password-form > div.input > input:not(:placeholder-shown) ~ label {
  transform: scale(0.857) translate(0, calc(var(--post_content_card_line_height_primary) * -1));
  color: var(--post_content_card_text_color_secondary);
}

form.content-password-form > div.input > hr {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--post_content_card_button_text_color);
  transform: scaleX(0);
  opacity: 0;
  transition: transform var(--post_content_password_form_transition_param), opacity var(--post_content_password_form_transition_param);
}

form.content-password-form > div.input > input:focus ~ hr,
form.content-password-form > div.input > input:not(:placeholder-shown) ~ hr {
  transform: scaleX(1);
  opacity: 1;
}

form.content-password-form > div.submit {
  float: right;
  margin: calc(var(--post_content_password_form_input_base_offset) * 2) 0 0;
}

form.content-password-form > div.submit > input {
  display: block;
  height: var(--post_content_card_line_height_primary);
  padding: calc(var(--post_content_password_form_input_base_offset) * 1) calc(var(--post_content_password_form_input_base_offset) * 2);
  color: var(--post_content_card_button_text_color);
  font-weight: 500;
  line-height: var(--post_content_card_line_height_primary);
  background-color: var(--post_content_card_button_background_color);
}

:root.imgradius form.content-password-form > div.submit > input {
  border-radius: var(--post_content_card_border_radius);
}

/* post-content-externallink */

div.post-content-externallink {
  width: 100%;
  height: var(--post_content_card_line_height_primary);
  margin-top: var(--post_content_externallink_top_spacing);
  color: var(--post_content_card_button_text_color);
  font-weight: 500;
  line-height: var(--post_content_card_line_height_primary);
}

div.post-content-externallink::before {
  display: inline;
  float: left;
  width: 18px;
  height: calc(var(--post_content_card_line_height_primary) - 2px);
  margin: 0 0 2px;
  background-position: 0 50%;
  background-repeat: no-repeat;
  content: '';
}

div.post-content-externallink::before {
  background-image: url(../img/post.content.externallink.light.svg);
}
:root.darkmode div.post-content-externallink::before {
  background-image: url(../img/post.content.externallink.dark.svg);
}

div.post-content-externallink > *.elt {
  cursor: pointer;
}
/* ==========================================================================
   自定义CSS
   ========================================================================== */
/* ========== 播放器通用样式优化 ========== */

/* 1. 播放器基础外框与圆角 */
.video-js {
    border-radius: 3px !important;
    overflow: hidden;
}

/* 全屏模式下清除圆角 */
.video-js.vjs-fullscreen,
.video-js.vjs-fullscreen .vjs-tech {
    border-radius: 0 !important;
}

/* 2. 海报/封面图片与视频实体填充规则 */
.video-js .vjs-poster {
    background-size: cover !important;
    z-index: 1 !important;
    <!--pointer-events: auto !important; /* 允许点击封面图直接触发现发播放 */-->
}

.video-js .vjs-tech,
.vjs-poster img {
    object-fit: cover !important; /* 保证封面图和视频实体不拉伸 */
    pointer-events: auto !important;
}

/* 3. 彻底禁用中间大播放按钮（防止在移动端/文章列表预览时意外浮现） */
.video-js .vjs-big-play-button,
.vjs-big-play-centered .vjs-big-play-button {
    display: none !important;
}

/* 4. 控制栏防遮挡层级补丁（确保左下角播放按钮处于最高响应层级） */
.video-js .vjs-control-bar {
    z-index: 10 !important;
    pointer-events: auto !important;
    display: flex !important;
}

/* ==========================================================================
   修正原生主题方屏、横屏视频显示效果
   ========================================================================== */
/* ========== 1. 方屏模式 (.square) ========== */
figure.post-content-video.square {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
}

figure.post-content-video.square video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* 等比裁剪为正方形 */
}

/* ========== 2. 横屏模式 (.horizontal) ========== */
figure.post-content-video.horizontal {
  width: var(--post_content_width_size_66pct) !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
}

figure.post-content-video.horizontal video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* 自动裁剪填满 16:9 横屏框 */
}

/* ========== 3. 通用原生全屏修复（合并方屏与横屏） ========== */
video:fullscreen,
figure.post-content-video video:fullscreen {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* 全屏下按视频原始宽高比展示，不裁剪 */
}

/* ==========================================================================
   朋友圈分享卡片 (无冗余精简版：PC 90% / 移动端 90% + 标题精准垂直居中)
   ========================================================================== */

/* 1. 卡片外层容器 */
figure.post-content-audio.post-content-share-card {
  cursor: pointer;
  width: 90% !important;
  position: relative !important;
  user-select: none;
  transition: opacity 0.2s ease;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

figure.post-content-audio.post-content-share-card:active {
  opacity: 0.85;
}

/* 2. 点击穿透蒙层 */
figure.post-content-audio.post-content-share-card > a.card-link-wrapper {
  position: absolute;
  inset: 0;                               /* top:0; left:0; width:100%; height:100%; 的现代简写 */
  z-index: 5;
}

/* 3. audio-meta 内容容器 */
figure.post-content-audio.post-content-share-card > div.audio-meta {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;          /* 垂直居中核心 */
  box-sizing: border-box !important;
}

/* 4. 封面图容器及图片 */
figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;               /* 防止被压缩 */
  margin: 0 !important;
  
  width: var(--post_content_audio_cover_size_min, 48px) !important;
  height: var(--post_content_audio_cover_size_min, 48px) !important;
  aspect-ratio: 1 / 1 !important;
  
  overflow: hidden !important;
  border-radius: var(--post_content_card_border_radius, 4px) !important;
  -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
}

figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-image > img.cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 5. 文本容器 (清除原主题绝对定位) */
figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-text {
  position: static !important;             /* 强制回归标准 Flex 流 */
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  
  flex: 1 1 auto !important;               /* 自动吸收剩余空间 */
  min-width: 0 !important;                 /* 允许长文本省略 */
  width: auto !important;
  
  margin: 0 8px !important;                /* 精准左右边距 (左贴封面 8px) */
  padding: 0 !important;
  
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* 6. 标题文本 (简化联合选择器) */
figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-text > span {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;                 /* 最多显示 2 行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal !important;
  word-break: break-word !important;
  
  font-size: var(--post_content_card_font_size_secondary, 14px) !important;
  line-height: 1.4 !important;
  
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  opacity: 0.88;
}

/* 7. PC 端 (769px+) 响应式覆盖 */
@media screen and (min-width: 769px) {
  figure.post-content-audio.post-content-share-card {
    width: var(--post_content_width_size_66pct) !important;;                /* PC 端保持 66% */
  }

  figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-image {
    width: clamp(var(--post_content_audio_cover_size_min, 42px), 30%, var(--post_content_audio_cover_size_max, 80px)) !important;
    height: clamp(var(--post_content_audio_cover_size_min, 42px), 30%, var(--post_content_audio_cover_size_max, 80px)) !important;
  }

  figure.post-content-audio.post-content-share-card > div.audio-meta > span.meta-text {
    margin-left: 12px !important;          /* PC 端间距稍拉开至 12px */
  }
}