.inreal-ytfs {
  width: 100%;
}

.inreal-ytfs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.inreal-ytfs__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.inreal-ytfs__nav {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.inreal-ytfs__btn {
  width: 42px;
  height: 42px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.inreal-ytfs__btn:hover {
  transform: translateY(-1px);
  background: #f6f6f6;
}

.inreal-ytfs__track-wrap {
  overflow: hidden;
}

.inreal-ytfs__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(33.333% - 16px);
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.inreal-ytfs__track::-webkit-scrollbar {
  display: none;
}

.inreal-ytfs__card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.inreal-ytfs__thumb,
.inreal-ytfs__thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
}

.inreal-ytfs__thumb img,
.inreal-ytfs__thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inreal-ytfs__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 22px;
}

.inreal-ytfs__content {
  padding: 16px;
}

.inreal-ytfs__video-title,
.inreal-ytfs__video-title-btn {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 8px;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.inreal-ytfs__video-title:hover,
.inreal-ytfs__video-title-btn:hover {
  text-decoration: underline;
}

.inreal-ytfs__date {
  font-size: 14px;
  opacity: .7;
}

.inreal-ytfs-error {
  padding: 12px 14px;
  border: 1px solid #e2b5b5;
  background: #fff3f3;
  border-radius: 10px;
}

.inreal-ytfs__modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.inreal-ytfs__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
}

.inreal-ytfs__dialog {
  position: relative;
  width: min(1100px, calc(100vw - 32px));
  margin: 40px auto;
  z-index: 2;
}

.inreal-ytfs__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  z-index: 3;
}

.inreal-ytfs__iframe-wrap {
  position: relative;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.inreal-ytfs__iframe-wrap::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.inreal-ytfs__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.inreal-ytfs-modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .inreal-ytfs__track {
    grid-auto-columns: calc(50% - 12px);
    gap: 18px;
  }

  .inreal-ytfs__title {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  .inreal-ytfs__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .inreal-ytfs__track {
    grid-auto-columns: 85%;
    gap: 14px;
  }

  .inreal-ytfs__title {
    font-size: 22px;
  }

  .inreal-ytfs__dialog {
    width: calc(100vw - 20px);
    margin: 55px auto 20px;
  }

  .inreal-ytfs__close {
    top: -10px;
    right: -2px;
  }
}
