/* yanyu-id-card-v23：身份卡收口版 */

/* 身份卡表面隐藏门中身份/擅长，只点开后看完整资料 */
.member-card.yanyu-id-card .yanyu-id-meta {
  display: none !important;
}

.member-card.yanyu-id-card {
  min-height: 0 !important;
  padding: 13px 14px 14px !important;
}

.yanyu-card-summary {
  min-height: 38px !important;
  margin-top: 6px !important;
  -webkit-line-clamp: 2;
}

.yanyu-card-summary::before {
  content: "简介" !important;
}

.member-card.yanyu-id-card .profile-btn {
  margin-top: 10px !important;
  padding: 10px 14px !important;
}

/* 玩家主页弹窗本体可滚动，避免顶部关闭按钮被滚没 */
.profile-modal {
  overflow-y: auto !important;
}

/* 强制保留一个固定关闭主页按钮 */
.yanyu-profile-floating-close {
  position: fixed;
  top: 22px;
  right: max(24px, calc((100vw - 1040px) / 2 + 22px));
  z-index: 999998;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(126, 42, 34, 0.28);
  border-radius: 999px;
  cursor: pointer;
  color: #fffaf2;
  background: linear-gradient(135deg, rgba(42, 30, 25, 0.96), rgba(126, 35, 30, 0.94));
  box-shadow: 0 12px 34px rgba(0,0,0,0.30);
  font-size: 25px;
  line-height: 1;
}

.yanyu-profile-floating-close:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(28, 21, 18, 0.98), rgba(156, 42, 35, 0.98));
}

/* 留言区独立滚动 */
.profile-modal .profile-wall {
  max-height: 430px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.profile-modal .profile-wall .wall-form {
  flex: 0 0 auto !important;
}

.profile-modal #wall-list,
.profile-modal .wall-list {
  flex: 1 1 auto !important;
  max-height: 270px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding-right: 8px;
}

.profile-modal #wall-list::-webkit-scrollbar,
.profile-modal .wall-list::-webkit-scrollbar {
  width: 8px;
}

.profile-modal #wall-list::-webkit-scrollbar-track,
.profile-modal .wall-list::-webkit-scrollbar-track {
  background: rgba(80, 55, 42, 0.08);
  border-radius: 999px;
}

.profile-modal #wall-list::-webkit-scrollbar-thumb,
.profile-modal .wall-list::-webkit-scrollbar-thumb {
  background: rgba(132, 39, 32, 0.34);
  border-radius: 999px;
}

/* 相册图片 */
.profile-modal #modal-gallery img,
.profile-modal .modal-gallery img {
  cursor: zoom-in !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.profile-modal #modal-gallery img:hover,
.profile-modal .modal-gallery img:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 14px 30px rgba(30,20,15,.22);
  filter: brightness(1.03);
}

.profile-modal #modal-gallery::after,
.profile-modal .modal-gallery::after {
  content: "点击图片可放大，左右切换连续查看";
  display: block;
  width: 100%;
  margin-top: 8px;
  color: rgba(90, 58, 44, 0.58);
  font-size: 13px;
}

/* 新版相册预览层：盖在主页弹窗之上 */
.profile-modal .yanyu-gallery-v23-preview {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(8, 7, 7, 0.88);
  backdrop-filter: blur(6px);
}

.profile-modal .yanyu-gallery-v23-preview.is-open {
  display: flex;
}

.yanyu-gallery-v23-inner {
  position: relative;
  max-width: min(94vw, 1280px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yanyu-gallery-v23-img {
  display: block;
  max-width: 94vw;
  max-height: 86vh;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,.54);
  user-select: none;
}

.yanyu-gallery-v23-close,
.yanyu-gallery-v23-prev,
.yanyu-gallery-v23-next {
  position: absolute;
  border: 0;
  cursor: pointer;
  color: #fffaf2;
  background: rgba(28,22,20,.94);
  box-shadow: 0 10px 30px rgba(0,0,0,.32);
}

.yanyu-gallery-v23-close {
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

.yanyu-gallery-v23-prev,
.yanyu-gallery-v23-next {
  top: 50%;
  width: 48px;
  height: 66px;
  transform: translateY(-50%);
  border-radius: 16px;
  font-size: 36px;
  line-height: 1;
}

.yanyu-gallery-v23-prev {
  left: -66px;
}

.yanyu-gallery-v23-next {
  right: -66px;
}

.yanyu-gallery-v23-close:hover,
.yanyu-gallery-v23-prev:hover,
.yanyu-gallery-v23-next:hover {
  background: rgba(126, 36, 30, .98);
}

.yanyu-gallery-v23-count {
  position: absolute;
  left: 50%;
  bottom: -36px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.86);
  font-size: 13px;
  white-space: nowrap;
}

.yanyu-gallery-v23-help {
  position: absolute;
  right: 0;
  bottom: -36px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .yanyu-profile-floating-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }

  .profile-modal .profile-wall {
    max-height: 360px !important;
  }

  .profile-modal #wall-list,
  .profile-modal .wall-list {
    max-height: 220px !important;
  }

  .profile-modal .yanyu-gallery-v23-preview {
    padding: 16px;
  }

  .yanyu-gallery-v23-img {
    max-width: 94vw;
    max-height: 76vh;
    border-radius: 12px;
  }

  .yanyu-gallery-v23-close {
    top: -10px;
    right: -6px;
    width: 40px;
    height: 40px;
  }

  .yanyu-gallery-v23-prev,
  .yanyu-gallery-v23-next {
    top: auto;
    bottom: -56px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    transform: none;
  }

  .yanyu-gallery-v23-prev {
    left: 18%;
  }

  .yanyu-gallery-v23-next {
    right: 18%;
  }

  .yanyu-gallery-v23-count {
    bottom: -42px;
  }

  .yanyu-gallery-v23-help {
    display: none;
  }
}
