span.medlistbox {
  display: block;
  /*overflow: hidden;*/
  user-select: none;
  /*padding: 10px 0;*/
}

span.medlistbox > span.img {
  position: relative;
  display: none;
}

span.medlistbox > span.img > img {
  display: block;
}

span.medlistbox > span.img > span.navbtn {
  position: absolute;
  display: block;
  top: 10px;
  right: 10px;
  padding: 4px;
  font-family: var(--font-mono);
  border-radius: 3px;
  background: #f5f5f5;
  overflow: hidden;
  cursor: default;
}

span.medlistbox > span.img > span.navbtn > span.btnx {
  display: inline;
  float: left;
  width: 42px;
  height: 24px;
font-size: 14px;
  line-height: 24px;
  color: #666;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

span.medlistbox > span.img > span.navbtn > span.btnx.no {
  color: #999;
  cursor: default;
}

span.medlistbox > span.img > span.navbtn > span.sep {
  display: inline;
  float: left;
  width: 0;
  height: 22px;
  margin: 1px 4px;
  border-right: 1px solid #d9d9d9;
}

/* 列表容器基础样式 - 无play时使用grid */
span.medlistbox > span.list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: min(100%, 333px);
  padding: 5px 0 0;
}

span.medlistbox > span.list > span {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 5px;
  background-color: #f5f5f5;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: zoom-in;
  position: relative;
}

/* ========== 单张图片特殊布局 - 仿相框效果 ========== */
/* 当只有一张图片且没有play类时 */
span.medlistbox:not(.play) > span.list.len1 {
  display: block;
  width: 100%;
  max-width: 70%;  /* 最大宽度70% */
  padding: 5px;
  background: #fff;
  box-shadow: 0px 0 20px 0px rgba(0,0,0,0.1);  /* 使用rgba替代var */
  position: relative;
  border-radius: 0;  /* 保持直角 */
}

/* 添加胶带效果 - 仿照.one-p:after */
span.medlistbox:not(.play) > span.list.len1::after {
    content: "";
    width: 6vmin;
    height: 2vmin;
    position: absolute;
    background-color: var(--tape-gray);
    background: linear-gradient(90deg,rgba(255, 252, 237, 0.67) 0%, rgba(219, 216, 190, 0.72) 56%, rgba(219, 216, 190, 0.29) 100%);
    border-right: 1px dotted var(--tape-edge-gray);
    border-left: 1px dotted var(--tape-edge-gray);
    transform: rotate(45deg);
    right: -2vmin;
    top: 0;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* 单张图片容器的样式 */
span.medlistbox:not(.play) > span.list.len1 > span {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;  /* 21:9 宽屏比例 */
  background-size: cover;
  background-position: center;
  cursor: zoom-in;  /* 放大镜光标 */
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.2s ease;
}



/* 不同图片数量的布局 */
/* 4张图片时使用4列 */
span.medlistbox > span.list.len4 {
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 440px);
}

/* 5张图片时使用特殊布局 - 第一张占2列 */
span.medlistbox > span.list.len5 {
  grid-template-columns: 2fr 1fr 1fr;
  width: min(100%, 410px);
}

span.medlistbox > span.list.len5 > span:first-child {
  grid-area: 1 / 1 / 3 / 2;
}

/* 7张图片时使用特殊布局 - 第一张占2列 */
span.medlistbox > span.list.len7 {
  grid-template-columns: 2fr 1fr 1fr 1fr;
  width: min(100%, 510px);
}

span.medlistbox > span.list.len7 > span:first-child {
  grid-area: 1 / 1 / 3 / 2;
}

/* 8张图片时使用4列 */
span.medlistbox > span.list.len8 {
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 440px);
}

/* 2张图片时使用2列 */
span.medlistbox > span.list.len2 {
  grid-template-columns: repeat(2, 1fr);
  width: min(100%, 220px);
}

/* 6张图片时使用3x2布局 */
span.medlistbox > span.list.len6 {
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 333px);
}

/* 3张图片时使用3列 */
span.medlistbox > span.list.len3 {
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 333px);
}

/* 清除浮动相关样式 - 只在无play时应用 */
span.medlistbox > span.row3 > span:nth-child(3n+1),
span.medlistbox > span.row4 > span:nth-child(4n+1) {
  clear: none; /* 在grid布局中不需要clear */
}

/*span.medlistbox > video {
  display: block;
  background: #f5f5f5 url(../img/ico.video.svg) 7px 5px no-repeat;
}*/
span.list > span.video-thumb::after {
  position: absolute;
  display: block;
  right: 5px;
  top: 5px;
  width: 20px;
  height: 16px;
  background: rgba(255,255,255,.8) url(../img/ico.video.svg) 50% 50% no-repeat;
  content: '';
}
/* ========== 有play类时 - 保持原有功能样式 ========== */
span.medlistbox.play {
  overflow: hidden;
}

span.medlistbox.play > span.img {
  display: block;
}

span.medlistbox.play > span.list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: 100%;
  max-width: none;
  margin: 5px 0 10px;
  padding: 0;
}

span.medlistbox.play > span.list > span {
  width: 60px;
  height: 60px;
  aspect-ratio: auto;
  float: none;
  margin: 0;
  cursor: pointer;
}

span.medlistbox.play > span.list > span.cur {
  filter: grayscale(1);
  cursor: default;
  position: relative;
}

span.medlistbox.play > span.list > span.cur::after {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(247,247,247,.85);
  content: '';
  position: absolute;
  top: 0;
  left: 0;
}

/* 全文页特定样式 */
#full > article > section > .medlistbox img,
#full > article > section > .medlistbox video {
  max-width: 100%;
  height: auto;
max-height: none;  /* 重置 max-height */
    object-fit: initial;  /* 重置 object-fit */
}

#full > article > section > span.medlistbox.play {
  /*width: var(--mw);*/
  margin: 0 -20px 0 -20px;
  background: #f7f7f7;
}

#full > article > section > span.medlistbox.play > span.img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  transition: width,height .2s linear;
  cursor: pointer;
  cursor: zoom-out;
}

#full > article > section > span.medlistbox.play > span.img > .media-container > img {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
}

#full > article > section > span.medlistbox.play > span.img.len1 > span.navbtn {
  display: none;
}

#full > article > section > span.medlistbox.play > span.list.len1 {
  display: none;
}

#full > article > section > span.medlistbox.play > span.list > span {
  width: 60px;
  height: 60px;
  margin: 0 5px 0 0;
}

#full > article > section > span.medlistbox.play > span.list > span:last-child {
  margin: 0;
}

#full > article > section > span.medlistbox.play > span.row3 > span:nth-child(3n+1),
#full > article > section > span.medlistbox.play > span.row4 > span:nth-child(4n+1) {
  clear: none;
}

#full > article > section > span.medlistbox > video {
  margin: 5px 0 0;
  border-radius: 3px;
}

/* ========== 移动端滚动样式 - 仅在play时生效 ========== */
@media screen and (max-width: 680px) {
  #full > article > section > span.medlistbox.play {
    width: 100vw;
    margin: 0 -30px 0 -15px;
  }
  
  span.medlistbox.play > span.list {
    display: block;
    height: 70px;
    overflow-x: auto;
    overflow-y: hidden;
    user-select: none;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    padding: 5px 15px;
    box-sizing: border-box;
    position: relative;
  }
  
  span.medlistbox.play > span.list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  
  span.medlistbox.play > span.list > span {
    display: inline-block !important;
    float: none !important;
    width: 60px;
    height: 60px;
    margin: 0 8px 0 0 !important;
    vertical-align: middle;
    flex: none;
  }
  
  span.medlistbox.play > span.list > span:last-child {
    margin-right: 0 !important;
  }
    span.medlistbox:not(.play) > span.list.len1 {
    max-width: 80%;  /* 移动端稍大一些 */
  }
}

/* 超小屏幕优化 */
/*@media screen and (max-width: 480px) {
  span.medlistbox.play > span.list {
    height: 65px;
    padding: 5px 10px;
  }
  
  span.medlistbox.play > span.list > span {
    width: 55px;
    height: 55px;
    margin-right: 6px !important;
  }
}*/

/* 响应式调整 - 无play时的网格布局 */
/*@media screen and (max-width: 768px) {
  span.medlistbox:not(.play) > span.list {
    width: 100% !important;
    max-width: 100%;
  }
}*/
/* 添加骨架屏动画 */
/*@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.media-fade-in {
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-fade-in.loaded {
    opacity: 1;
}*/

/* 媒体容器样式 */
.media-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 加载失败占位 */
.error-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #999;
    font-size: 14px;
}
/* 展开收回 */

section .comment-content-true {
    position: relative;
    max-height: unset;
    overflow: hidden;
    transition: max-height .3s ease;
    min-height: 24px;
}

section .comment-content-true.collapsible {
    max-height: 140px;
}

section .comment-content-true.collapsible.expanded {
    max-height: none;
}

section .comment-content-true.collapsible:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom,rgba(250,251,251,0),rgba(250,251,251,.9));
    pointer-events: none;
}
/*拉伸铺满容器
.comment-content-true {
    display: block;
}
.expand-comment-btn.show {
    display: block;
}
.expand-comment-btn {
    display: none;
    margin-top: 5px;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    padding: 3px 0;
    border-radius: 5px;
    background-color: rgba(0,0,0,.03);
    transition: all .2s ease;
    margin: 10px 0;
}*/
.expand-comment-btn {
    display: inline-block;
    font-weight: 900;
    text-transform: uppercase;
    color:  var(--bgray2);
    font-size: 10px;
    text-decoration: none;
    background:var(--gray2);
    line-height: 20px;
    padding: 0 9px;
    margin: 0 0 5px;
    border-radius: 8px;
}
.expand-comment-btn:hover {
    background-color: rgba(0,0,0,.05);
    color: #444;
}
