.comparison-gallery {
  --gallery-accent: #ffc96e;
  --gallery-bg: #080a0b;
  --gallery-panel: #0e1112;
  --gallery-line: rgba(255, 201, 110, .16);
  min-width: 0;
  color: #f7f7f4;
  background: var(--gallery-bg);
}

.comparison-gallery button {
  color: inherit;
  font: inherit;
}

.comparison-gallery__header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--gallery-line);
  color: rgba(255, 255, 255, .56);
  background: var(--gallery-panel);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.comparison-gallery__count {
  color: var(--gallery-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.comparison-gallery__preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #050708;
  cursor: zoom-in;
  isolation: isolate;
}

.comparison-gallery__preview::before,
.comparison-gallery__preview::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.comparison-gallery__preview::before {
  box-shadow: inset 0 0 0 1px rgba(255, 201, 110, .08);
}

.comparison-gallery__preview::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 30%, transparent 58%, rgba(0, 0, 0, .58));
}

.comparison-gallery__layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}

.comparison-gallery__layer--before {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.comparison-gallery__layer--after {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.comparison-gallery__layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1), filter .35s ease;
}

.comparison-gallery__layer--before img {
  filter: saturate(.76) brightness(.82);
}

.comparison-gallery__layer--after img {
  filter: saturate(.95) brightness(.94);
}

.comparison-gallery__preview:hover .comparison-gallery__layer img {
  transform: scale(1.018);
}

.comparison-gallery__preview:hover .comparison-gallery__layer--before img {
  filter: saturate(.84) brightness(.88);
}

.comparison-gallery__preview:hover .comparison-gallery__layer--after img {
  filter: saturate(1) brightness(1);
}

.comparison-gallery__preview:focus-visible,
.comparison-lightbox button:focus-visible {
  outline: 2px solid var(--gallery-accent);
  outline-offset: -2px;
}

.comparison-gallery__label {
  position: absolute;
  z-index: 5;
  top: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 8, 9, .78);
  font-size: .53rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.comparison-gallery__label--before { left: 14px; }
.comparison-gallery__label--after { right: 14px; border-color: rgba(255, 201, 110, .46); color: var(--gallery-accent); }

.comparison-gallery__divider {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 0 24px rgba(255, 201, 110, .52);
  pointer-events: none;
}

.comparison-gallery__divider i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 201, 110, .75);
  border-radius: 50%;
  background: rgba(8, 10, 11, .92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38), 0 0 20px rgba(255, 201, 110, .16);
}

.comparison-gallery__divider i::before,
.comparison-gallery__divider i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--gallery-accent);
  border-left: 1px solid var(--gallery-accent);
}

.comparison-gallery__divider i::before {
  left: 10px;
  transform: translateY(-50%) rotate(-45deg);
}

.comparison-gallery__divider i::after {
  right: 10px;
  transform: translateY(-50%) rotate(135deg);
}

.comparison-gallery__open-cue {
  position: absolute;
  z-index: 5;
  right: 14px;
  bottom: 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 201, 110, .42);
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 9, 10, .84);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.comparison-gallery__open-cue i {
  position: relative;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--gallery-accent);
  border-right: 1px solid var(--gallery-accent);
}

.comparison-gallery__open-cue i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 3px;
  width: 10px;
  height: 1px;
  transform: rotate(-45deg);
  transform-origin: right center;
  background: var(--gallery-accent);
}

.comparison-gallery__preview:hover .comparison-gallery__open-cue {
  color: #11100e;
  border-color: var(--gallery-accent);
  background: var(--gallery-accent);
}

.comparison-gallery__preview:hover .comparison-gallery__open-cue i {
  border-color: #11100e;
}

.comparison-gallery__preview:hover .comparison-gallery__open-cue i::after {
  background: #11100e;
}

.comparison-gallery__caption {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 15px;
  border-top: 1px solid var(--gallery-line);
  background: var(--gallery-panel);
}

.comparison-gallery__caption > span {
  color: rgba(255, 255, 255, .8);
  font-size: .7rem;
  font-weight: 650;
}

.comparison-gallery__caption small {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .38);
  font-size: .57rem;
}

body.has-comparison-lightbox {
  overflow: hidden;
}

.comparison-lightbox {
  --gallery-accent: #ffc96e;
  width: min(94vw, 1440px);
  height: min(92vh, 900px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 201, 110, .3);
  border-radius: 8px;
  color: #fff;
  background: #080a0b;
  box-shadow: 0 36px 120px rgba(0, 0, 0, .76);
  animation: comparison-lightbox-in .2s cubic-bezier(.22, 1, .36, 1);
}

.comparison-lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.comparison-lightbox::backdrop {
  background: rgba(1, 3, 4, .92);
}

.comparison-lightbox__bar {
  min-height: 104px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 12px 15px 18px;
  border-bottom: 1px solid rgba(255, 201, 110, .16);
  background: #0e1112;
}

.comparison-lightbox__story {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.comparison-lightbox__story small {
  color: var(--gallery-accent);
  font-size: .54rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.comparison-lightbox__story strong {
  color: #fff;
  font-size: clamp(1rem, 1.7vw, 1.42rem);
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.comparison-lightbox__story p {
  max-width: 920px;
  margin: 0;
  color: rgba(255, 255, 255, .48);
  font-size: .68rem;
  line-height: 1.55;
}

.comparison-lightbox__close,
.comparison-lightbox__nav button {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.comparison-lightbox__close:hover,
.comparison-lightbox__nav button:hover {
  border-color: rgba(255, 201, 110, .62);
  background: rgba(255, 201, 110, .09);
}

.comparison-lightbox__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
}

.comparison-lightbox__visuals {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: auto;
  background: #030405;
}

.comparison-lightbox__panel {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: #050708;
}

.comparison-lightbox__panel img {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.comparison-lightbox__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .055);
  pointer-events: none;
}

.comparison-lightbox__label {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 8, 9, .84);
  font-size: .53rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.comparison-lightbox__panel--after .comparison-lightbox__label {
  border-color: rgba(255, 201, 110, .5);
  color: var(--gallery-accent);
}

.comparison-lightbox__nav {
  min-height: 64px;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 201, 110, .14);
  background: #0e1112;
}

.comparison-lightbox__nav button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1rem;
}

.comparison-lightbox__nav button:last-child {
  justify-self: end;
}

.comparison-lightbox__counter {
  color: rgba(255, 255, 255, .5);
  font-size: .62rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .09em;
  text-align: center;
}

@keyframes comparison-lightbox-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .comparison-gallery__caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .comparison-lightbox {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .comparison-lightbox__bar {
    min-height: 112px;
    padding: 13px 11px 13px 14px;
  }

  .comparison-lightbox__visuals {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .comparison-lightbox__panel {
    height: auto;
    min-height: 0;
  }

  .comparison-lightbox__panel img {
    max-height: none;
  }
}

@media (max-width: 430px) {
  .comparison-gallery__header { min-height: 44px; padding-inline: 13px; }
  .comparison-gallery__preview { aspect-ratio: 16 / 10; }
  .comparison-gallery__label { top: 10px; min-height: 24px; padding-inline: 8px; font-size: .48rem; }
  .comparison-gallery__label--before { left: 10px; }
  .comparison-gallery__label--after { right: 10px; }
  .comparison-gallery__divider i { width: 32px; height: 32px; }
  .comparison-gallery__divider i::before { left: 8px; }
  .comparison-gallery__divider i::after { right: 8px; }
  .comparison-gallery__open-cue { right: 10px; bottom: 10px; min-height: 31px; padding-inline: 10px; }
  .comparison-gallery__caption { min-height: 64px; padding: 10px 12px; }
  .comparison-gallery__caption > span { font-size: .64rem; }
  .comparison-gallery__caption small { font-size: .52rem; }
  .comparison-lightbox__story { gap: 4px; }
  .comparison-lightbox__story strong { font-size: .98rem; }
  .comparison-lightbox__story p { font-size: .61rem; line-height: 1.45; }
  .comparison-lightbox__label { top: 9px; left: 9px; min-height: 24px; padding-inline: 8px; font-size: .48rem; }
  .comparison-lightbox { height: min(100dvh, 650px); }
  .comparison-lightbox__visuals { align-content: start; }
}

@media (prefers-reduced-motion: reduce) {
  .comparison-gallery__layer img,
  .comparison-gallery__open-cue,
  .comparison-lightbox,
  .comparison-lightbox button {
    animation: none;
    transition: none;
  }
}
