#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;
}

/* videojs圆角 */
.video-js {
    border-radius: 3px !important;
    overflow: hidden;
}
/* videojs全屏模式下去除圆角 */
.video-js.vjs-fullscreen {
    border-radius: 0 !important;
}
.video-js.vjs-fullscreen .vjs-tech {
    border-radius: 0 !important;
}
.video-js .vjs-poster {
    background-size: cover !important;
}
/* ========== 苹果风格播放按钮（替换 Video.js 默认样式） ========== */

/* 基础样式：圆角矩形 + 半透明背景 + 白色三角形 */
.video-js .vjs-big-play-button {
    font-size: 3em;               /* 控制整体大小 */
    line-height: 1.5em;
    height: 1.63332em;
    width: 3em;
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0;
    cursor: pointer;
    opacity: 1;

    /* 去掉默认边框和背景 */
    border: none !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border-radius: 0.375em;       /* 约 12px / 3em = 0.375em，圆角适中 */

    /* 阴影 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* 过渡：统一 0.2s 快速响应 */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.320, 1.275),
                filter 0.2s ease,
                opacity 0.2s ease,
                background 0.2s ease;

    /* 隐藏默认的播放图标（Unicode ▶） */
    color: transparent !important;
    text-indent: -9999px;         /* 备用隐藏 */
}

/* 使用伪元素 ::before 绘制白色三角形 */
.video-js .vjs-big-play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 53%;                    /* 微调水平居中（三角形视觉重心偏左） */
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.65em 0 0.65em 1.2em;  /* 三角形尺寸，可根据比例调整 */
    border-color: transparent transparent transparent #ffffff;
    pointer-events: none;         /* 允许点击穿透到按钮 */
}

/* 居中定位（保留 Video.js 的 vjs-big-play-centered 类支持） */
.vjs-big-play-centered .vjs-big-play-button {
    top: 50%;
    left: 50%;
    margin-top: -0.81666em;
    margin-left: -1.5em;
}

/* 悬停效果：放大 + 变亮 */
.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
    transform: scale(1.08);
    filter: brightness(1.15);
    background: rgba(0, 0, 0, 0.25) !important; /* 悬停时背景更浅 */
    border-color: transparent !important;
    transition: all 0.2s ease;    /* 覆盖默认的 0s */
}

/* 点击效果：缩小 + 变淡 */
.video-js .vjs-big-play-button:active {
    transform: scale(0.92);
    opacity: 0.78;
}

/* 当播放器开始播放或禁用控件时隐藏按钮（保留原有逻辑） */
.vjs-controls-disabled .vjs-big-play-button,
.vjs-error .vjs-big-play-button,
.vjs-has-started .vjs-big-play-button,
.vjs-using-native-controls .vjs-big-play-button {
    display: none;
}