/* 중앙하이츠 홈 — 공지 팝업 오버레이 */
.richell-home-popup {
  position: fixed;
  inset: 0;
  z-index: 999999999;
  display: none;
  width: 100%;
  height: 100%;
}

.richell-home-popup.is-visible,
.richell-home-popup.show {
  display: block !important;
  animation: richell-home-popup-enter 0.8s both;
}

@keyframes richell-home-popup-enter {
  from { top: -100vh; }
  to { top: 0; }
}

.richell-home-popup .rh-popup {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.richell-home-popup .rh-pop-content {
  position: relative;
  z-index: 99999999;
  width: 90%;
  max-width: 1720px;
  margin: 0 auto;
  text-align: center;
}

.richell-home-popup .rh-pop-content > ul.pc {
  display: flex;
  position: relative;
  width: 100%;
  margin: 0 auto;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.richell-home-popup .rh-pop-content li,
.richell-home-popup-item {
  position: relative;
  flex: 0 0 380px;
  width: 380px;
  max-width: 380px;
  text-align: center;
}

.richell-home-popup .rh-pop-content li img,
.richell-home-popup-item img {
  width: 100%;
  height: auto;
  display: block;
}

.richell-home-popup .rh-pop-content li a,
.richell-home-popup-item a {
  width: 100%;
  display: block;
}

.richell-home-popup-close {
  display: block;
  margin-bottom: 20px;
  color: #fff;
  text-align: center;
  font-size: 16px;
}

.richell-home-popup-item-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 5;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.richell-home-popup-item-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

.richell-home-popup .rh-black-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: 99999998;
  background-color: #000;
  opacity: 0.7;
  cursor: default;
}

.richell-home-popup .check {
  display: block;
  width: 100%;
  margin-top: 12px;
}

.richell-home-popup .check label {
  margin-left: 5px;
  font-size: 14px;
  line-height: 1;
}

/* 모바일 스와이프 */
.richell-home-popup .swiper-pop {
  overflow: visible;
  width: 100%;
  margin: 0 auto;
}

.richell-home-popup .swiper-pop.mo {
  display: none;
}

.richell-home-popup .swiper-pop .swiper-slide {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.richell-home-popup .swiper-pop .swiper-slide img {
  width: 100%;
}

.richell-home-popup .swiper-pop .richell-home-popup-item-close {
  top: 0.5rem;
  right: 0.5rem;
}

.richell-home-popup .rh-pop-arrow {
  position: relative;
  float: right;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  width: 90px;
  height: 32px;
  margin: 12px 0 0;
  padding: 0 2px;
  border-radius: 50px;
  background-color: #fff;
}

.richell-home-popup .rh-pop-arrow .swiper-pagination-fraction {
  position: static;
  width: 50px;
  height: 32px;
  line-height: 32px;
  color: #000;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.richell-home-popup .rh-pop-arrow .swiper-pagination-current,
.richell-home-popup .rh-pop-arrow .swiper-pagination-total {
  padding: 0 3px;
}

.richell-home-popup .rh-pop-arrow .swiper-button-prev-pop,
.richell-home-popup .rh-pop-arrow .swiper-button-next-pop {
  position: relative;
  top: 0;
  width: 25px;
  height: 100%;
  margin: 0;
  padding: 0;
  outline: none;
}

.richell-home-popup .rh-pop-arrow .swiper-button-prev-pop {
  left: 0;
}

.richell-home-popup .rh-pop-arrow .swiper-button-next-pop {
  right: 0;
}

.richell-home-popup .rh-pop-arrow .swiper-button-prev-pop > div,
.richell-home-popup .rh-pop-arrow .swiper-button-next-pop > div {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 6px;
  height: 6px;
}

.richell-home-popup .rh-pop-arrow .swiper-button-prev-pop > div {
  left: 8px;
  right: 0;
  border-left: 1px solid #000;
  border-bottom: 1px solid #000;
  transform: rotate(45deg);
  transform-origin: center;
}

.richell-home-popup .rh-pop-arrow .swiper-button-next-pop > div {
  left: 0;
  right: 8px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  transform: rotate(-45deg);
  transform-origin: center;
}

@media (max-width: 767px) {
  .richell-home-popup .rh-pop-content > ul.pc {
    display: none;
  }

  .richell-home-popup .swiper-pop.mo {
    display: block;
  }

  .richell-home-popup-close {
    margin-bottom: 12px;
  }

  .richell-home-popup .rh-popup {
    box-sizing: border-box;
    padding: 0 1rem;
  }

  .richell-home-popup .rh-pop-content {
    width: 92%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .richell-home-popup .swiper-pop .swiper-slide.richell-home-popup-item,
  .richell-home-popup .swiper-pop .richell-home-popup-item {
    flex: none;
    width: 100% !important;
    max-width: 100%;
  }

  .richell-home-popup .swiper-pop .swiper-slide {
    align-items: center;
  }

  .richell-home-popup .rh-pop-arrow {
    float: none;
    clear: both;
    margin: 12px auto 0;
    z-index: 1;
  }

  .richell-home-popup .check {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    transform: none;
    position: relative;
    z-index: 1;
  }
}

/* 홈 레이어 영상 (인트로 후 · 팝업 전) */
.richell-home-video {
  position: fixed;
  inset: 0;
  z-index: 999999998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.richell-home-video.is-visible,
.richell-home-video.show {
  display: flex !important;
}

.richell-home-video-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: default;
}

.richell-home-video-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1080px);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: richell-home-video-enter 0.5s ease both;
}

@keyframes richell-home-video-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* PC: 딤·패널을 더 길게 서서히 페이드인 */
@media (hover: hover) and (min-width: 768px) {
  .richell-home-video.is-visible,
  .richell-home-video.show {
    animation: richell-home-video-overlay-enter 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .richell-home-video-dim {
    opacity: 0;
    animation: richell-home-video-dim-enter 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .richell-home-video-panel {
    animation: richell-home-video-enter-pc 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
  }

  .richell-home-video-close {
    opacity: 0;
    animation: richell-home-video-close-enter 0.7s ease 0.55s both;
  }

  @keyframes richell-home-video-overlay-enter {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes richell-home-video-dim-enter {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes richell-home-video-enter-pc {
    from {
      opacity: 0;
      transform: translateY(22px) scale(0.978);
      filter: blur(2px);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }

  @keyframes richell-home-video-close-enter {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

.richell-home-video-close {
  align-self: flex-end;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.2rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1;
}

.richell-home-video-close:hover,
.richell-home-video-close:focus {
  opacity: 0.75;
  outline: none;
}

.richell-home-video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  pointer-events: auto; /* 호버로 시크바 표시 */
}

.richell-home-video-frame > #richell-home-video-player,
.richell-home-video-frame iframe {
  position: absolute;
  /* 상단 제목·채널 / 하단 워터마크를 프레임 밖으로 크롭 (공식 숨김 옵션 없음) */
  top: -18%;
  left: -4%;
  width: 108%;
  height: 136%;
  border: 0;
  pointer-events: none; /* 유튜브 UI 클릭 차단 · 커스텀 재생 버튼 사용 */
}

.richell-home-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.richell-home-video-play[hidden] {
  display: none !important;
}

.richell-home-video-play-icon {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-style: solid;
  border-width: 0.7rem 0 0.7rem 1.15rem;
  border-color: transparent transparent transparent #fff;
  transform: translateX(0.12rem);
}

.richell-home-video-play:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.richell-home-video-seek {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1.35rem 0.9rem 0.75rem;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.88) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.richell-home-video-panel:hover .richell-home-video-seek,
.richell-home-video-panel.is-seek-active .richell-home-video-seek,
.richell-home-video-seek.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.richell-home-video-seek-time {
  flex: 0 0 auto;
  min-width: 2.4em;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}

.richell-home-video-seek-time.is-duration {
  text-align: right;
}

.richell-home-video-seek-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  width: 100%;
  height: 4px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  cursor: pointer;
}

.richell-home-video-seek-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.richell-home-video-seek-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.richell-home-video-seek-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.richell-home-video-seek-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

@media (hover: none) {
  /* 터치 기기: 시크바 숨김 */
  .richell-home-video-seek,
  .richell-home-video-panel:hover .richell-home-video-seek,
  .richell-home-video-panel.is-seek-active .richell-home-video-seek,
  .richell-home-video-seek.is-visible {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media all and (max-width: 767px) {
  .richell-home-video-panel {
    width: min(94vw, 640px);
  }

  .richell-home-video-close {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .richell-home-video-frame > #richell-home-video-player,
  .richell-home-video-frame iframe {
    /* 모바일: 상·하단 채널명/워터마크가 더 잘 잘리도록 크롭 강화 */
    top: -30%;
    left: -10%;
    width: 120%;
    height: 160%;
  }

  .richell-home-video-play {
    width: 3.75rem;
    height: 3.75rem;
  }

  .richell-home-video-play-icon {
    border-width: 0.62rem 0 0.62rem 1.02rem;
  }

  .richell-home-video-seek {
    padding: 1.1rem 0.7rem 0.65rem;
    gap: 0.4rem;
  }

  .richell-home-video-seek-time {
    font-size: 0.66rem;
    min-width: 2.1em;
  }
}

/* 팝업 클릭 메시지 */
.richell-home-popup-hit {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.richell-home-popup-hit img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.richell-popup-message-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.richell-popup-message-modal.is-open {
  display: flex;
}

.richell-popup-message-modal__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.richell-popup-message-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 1.6rem 1.4rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  color: #222;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  text-align: center;
  box-sizing: border-box;
}

.richell-popup-message-modal__title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #11284e;
}

.richell-popup-message-modal__text {
  margin: 0 0 1.35rem;
  font-size: 0.98rem;
  line-height: 1.55;
  letter-spacing: -0.02em;
  white-space: pre-wrap;
  word-break: keep-all;
  color: #333;
}

.richell-popup-message-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  min-height: 2.7rem;
  padding: 0.65rem 1.4rem;
  border: 0;
  border-radius: 6px;
  background: #11284e;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.richell-popup-message-modal__btn:hover {
  background: #0d1f3d;
}
