.qqrs,
.qqrs * {
  box-sizing: border-box;
}

.qqrs {
  --qqrs-card-w: 250px;
  --qqrs-card-h: 430px;
  --qqrs-gap: 260px;
  --qqrs-stage-h: 580px;
  --qqrs-tablet-stage-h: 500px;
  --qqrs-mobile-stage-h: 340px;
  --qqrs-title-bg: rgba(211, 201, 191, .6);
  --qqrs-title-color: #2f2b26;
  position: relative;
  overflow: hidden;
  background: transparent;
  color: #fff;
  padding: 8px 0 20px;
  border-radius: 0;
}

.qqrs__inner {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  position: relative;
}

.qqrs__header {
  text-align: center;
  margin-bottom: 28px;
}

.qqrs__title {
  margin: 0;
  display: inline-block;
  padding: 6px 14px;
  background: var(--qqrs-title-bg);
  color: var(--qqrs-title-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.5vw, 48px);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1;
}

.qqrs__viewport {
  position: relative;
  min-height: var(--qqrs-stage-h);
}

.qqrs__stage {
  position: relative;
  height: var(--qqrs-stage-h);
  overflow: hidden;
}

.qqrs__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.qqrs-card {
  --offset-x: 0px;
  --offset-y: 0px;
  --scale: 1;
  --opacity: 1;
  --z: 1;
  position: absolute;
  top: calc(var(--qqrs-stage-h) * 0.17);
  left: 50%;
  width: var(--qqrs-card-w);
  height: var(--qqrs-card-h);
  border: 0;
  padding: 0;
  margin-left: calc(var(--qqrs-card-w) / -2);
  transform: translate3d(var(--offset-x), var(--offset-y), 0) scale(var(--scale));
  transform-origin: center center;
  opacity: var(--opacity);
  z-index: var(--z);
  transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .32s ease, filter .32s ease;
  cursor: pointer;
  outline: none;
}

.qqrs-card.is-active {
  filter: none;
}

.qqrs-card:not(.is-active) {
  filter: saturate(.92);
}

.qqrs-card[aria-hidden="true"] {
  pointer-events: none;
}

.qqrs-card__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

.qqrs-card__media img,
.qqrs-card__media video,
.qqrs-card__placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.qqrs-card__placeholder {
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}

.qqrs-card__overlay {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  pointer-events: none;
}

.qqrs-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  padding: 0 16px;
  z-index: 2;
}

.qqrs-card__name {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.qqrs-card__check {
  opacity: .9;
  font-size: 13px;
}

.qqrs-stars {
  display: inline-block;
  letter-spacing: 2px;
  font-size: 18px;
  line-height: 1;
  color: #fff;
}

.qqrs-card__rating {
  margin-top: 6px;
}

.qqrs-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(255,255,255,.65);
  font-size: 22px;
  line-height: 1;
  z-index: 2;
}

.qqrs__nav {
  position: absolute;
  top: calc(var(--qqrs-stage-h) * 0.54);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  color: #222;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 80;
  box-shadow: 0 8px 25px rgba(0,0,0,.18);
}

.qqrs__nav[disabled] {
  opacity: .4;
  cursor: not-allowed;
}

.qqrs__nav span {
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

.qqrs__nav-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.qqrs__nav--prev { left: 8px; }
.qqrs__nav--next { right: 8px; }

.qqrs-modal[hidden] {
  display: none;
}

.qqrs-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.qqrs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.qqrs-modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  background: #f2f0ed;
  color: #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}

.qqrs-modal__close {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 0;
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
}

.qqrs-modal__media {
  position: relative;
  min-height: 620px;
  background: #ddd;
}

.qqrs-modal__media img,
.qqrs-modal__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.qqrs-modal__content {
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  min-width: 0;
}

.qqrs-modal__topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.qqrs-modal__name {
  font-size: 31px;
  line-height: 1.1;
  font-weight: 600;
}

.qqrs-modal__sub {
  margin-top: 8px;
  font-size: 14px;
  color: #5b5b5b;
}

.qqrs-modal__date {
  flex: 0 0 auto;
  font-size: 14px;
  color: #6b6b6b;
  padding-top: 4px;
}

.qqrs-modal__rating {
  margin-top: 16px;
  font-size: 26px;
  color: #d89b2a;
  letter-spacing: 3px;
}

.qqrs-modal__text {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.62;
  overflow: auto;
  min-height: 120px;
  flex: 1 1 auto;
  padding-right: 4px;
}

.qqrs-modal__text p {
  margin: 0;
}

.qqrs-modal__text p + p {
  margin-top: 14px;
}

.qqrs-modal__product {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,.1);
}

.qqrs-product {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.qqrs-product__thumb {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.06);
}

.qqrs-product__thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.qqrs-product__body {
  min-width: 0;
}

.qqrs-product__name {
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.qqrs-product__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #e5e2dd;
  color: #222;
  text-decoration: none;
  font-weight: 600;
  min-width: 130px;
}

.qqrs-product__btn:hover {
  background: #ddd8d2;
}

.qqrs-empty {
  padding: 24px;
  background: #faf7f3;
  border: 1px solid #ece7e1;
}

body.qqrs-modal-open {
  overflow: hidden !important;
}

@media (max-width: 1024px) {
  .qqrs {
    --qqrs-card-w: 220px;
    --qqrs-card-h: 390px;
    --qqrs-gap: 210px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .qqrs__viewport,
  .qqrs__stage {
    min-height: var(--qqrs-tablet-stage-h);
    height: var(--qqrs-tablet-stage-h);
  }

  .qqrs-card {
    top: calc(var(--qqrs-tablet-stage-h) * 0.17);
  }

  .qqrs__nav {
    top: calc(var(--qqrs-tablet-stage-h) * 0.54);
  }

  .qqrs-modal__dialog {
    width: min(980px, calc(100vw - 24px));
    grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr);
  }

  .qqrs-modal__media,
  .qqrs-modal__content {
    min-height: 560px;
  }

  .qqrs-modal__name {
    font-size: 25px;
  }
}

@media (max-width: 767px) {
  .qqrs {
    --qqrs-card-w: 170px;
    --qqrs-card-h: 285px;
    --qqrs-gap: 130px;
    padding-top: 0;
    padding-bottom: 14px;
  }

  .qqrs__header {
    margin-bottom: 18px;
  }

  .qqrs__title {
    font-size: 26px;
  }

  .qqrs__viewport,
  .qqrs__stage {
    min-height: var(--qqrs-mobile-stage-h);
    height: var(--qqrs-mobile-stage-h);
  }

  .qqrs-card {
    top: calc(var(--qqrs-mobile-stage-h) * 0.14);
  }

  .qqrs-card__meta {
    bottom: 12px;
    padding: 0 8px;
  }

  .qqrs-card__name {
    font-size: 12px;
  }

  .qqrs-stars {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .qqrs__nav {
    top: calc(var(--qqrs-mobile-stage-h) * 0.53);
    width: 42px;
    height: 42px;
  }

  .qqrs__nav span {
    font-size: 22px;
  }

  .qqrs__nav-icon {
    width: 16px;
    height: 16px;
  }

  .qqrs__nav--prev { left: 0; }
  .qqrs__nav--next { right: 0; }

  .qqrs-modal__dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .qqrs-modal__media {
    min-height: 320px;
    height: 320px;
  }

  .qqrs-modal__content {
    min-height: unset;
    padding: 16px;
  }

  .qqrs-modal__name {
    font-size: 22px;
  }

  .qqrs-modal__text {
    font-size: 15px;
    min-height: 0;
  }

  .qqrs-product {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .qqrs-product__thumb {
    width: 64px;
    height: 64px;
  }

  .qqrs-product__btn {
    min-width: 0;
    width: 100%;
  }
}
