.compare-player {
  --mode-offset: 0%;
  --picture-offset: 0%;
  --picture-inset: 0%;
  --picture-radius: 0px;
  --player-ease: cubic-bezier(.25, .78, .24, 1);
  min-width: 0;
}
.compare-player[data-view="raw"] {
  --mode-offset: 100%;
  --picture-offset: 25%;
  --picture-inset: 25%;
  --picture-radius: 13px;
}
.compare-player[data-view="edited"] {
  --mode-offset: 200%;
  --picture-offset: -25%;
  --picture-inset: 25%;
  --picture-radius: 13px;
}
.compare-player [hidden] { display: none; }
.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-bottom: 9px;
}
.compare-player-title { font-size: .9375rem; font-weight: 720; letter-spacing: -.015em; }
.compare-views {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid #e3e6da;
  border-radius: 999px;
  background: #eeefe7;
}
.compare-views::before {
  position: absolute;
  z-index: -1;
  inset: 3px auto 3px 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px #20221f20;
  content: "";
  transform: translateX(var(--mode-offset));
  transition: transform .26s var(--player-ease);
}
.compare-views button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4f574b;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
  transition: color .18s var(--player-ease), background-color .18s var(--player-ease);
}
.compare-views button:hover { color: var(--ink); }
.compare-views button:active { background: #20221f12; }
.compare-views button[aria-pressed="true"] { color: var(--ink); }

.compare-surface {
  overflow: hidden;
  border: 1px solid #353934;
  border-radius: 23px;
  background: #1c201a;
  color: var(--paper);
  box-shadow: 0 13px 36px #20221f1c, 0 2px 5px #20221f16;
}
.compare-viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1024 / 910;
  background: #191c18;
}
.compare-picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 var(--picture-inset) round var(--picture-radius));
  transition: clip-path .26s var(--player-ease);
}
.compare-picture video, .compare-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateX(var(--picture-offset));
  transition: transform .26s var(--player-ease);
}
.compare-picture video { display: block; object-fit: contain; }
.compare-labels { pointer-events: none; }
.compare-labels span {
  position: absolute;
  top: clamp(7px, 2vw, 13px);
  max-width: calc(50% - 10px);
  padding: 5px 8px;
  border: 1px solid #ffffff28;
  border-radius: 9px;
  background: #171a15e6;
  color: #fff;
  font-size: clamp(.63rem, 1.55vw, .75rem);
  font-weight: 680;
  line-height: 1.22;
}
.compare-label-raw { left: clamp(6px, 2vw, 13px); }
.compare-label-edited { right: clamp(6px, 2vw, 13px); }
@supports (backdrop-filter: blur(10px)) {
  .compare-labels span {
    background: #171a15bc;
    backdrop-filter: blur(10px);
  }
}
.compare-player[data-view="raw"] .compare-label-edited,
.compare-player[data-view="edited"] .compare-label-raw { visibility: hidden; }
.compare-player[data-view="both"] .compare-picture::after {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: #e5e9de3d;
  content: "";
  pointer-events: none;
}

.compare-overlay, .compare-play, .compare-sound {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  transition: transform .18s var(--player-ease), background-color .18s var(--player-ease);
}
.compare-overlay {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  border: 1px solid #ffffff43;
  background: #151811d9;
  color: #fff;
  box-shadow: 0 4px 15px #11130f55;
  transform: translate(-50%, -50%);
}
.compare-overlay:hover { background: #343b2e; }
.compare-overlay:active { transform: translate(-50%, -50%) scale(.94); }
.compare-overlay svg { width: 26px; height: 26px; }
.compare-controls {
  padding: 5px 9px;
  border-top: 1px solid #ffffff20;
  background: #262a24;
}
.compare-transport { display: flex; align-items: center; gap: 9px; }
.compare-play, .compare-sound {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f7f8f4;
}
.compare-play { background: #ffffff15; }
.compare-sound { background: transparent; }
.compare-play:hover, .compare-sound:hover { background: #ffffff25; }
.compare-play:active, .compare-sound:active { transform: scale(.93); }
.compare-play svg, .compare-sound svg { width: 18px; height: 18px; }
.compare-play svg { fill: currentColor; }
.compare-sound[aria-pressed="false"] .compare-sound-on,
.compare-sound[aria-pressed="true"] .compare-sound-off { display: none; }
.compare-player button:disabled { opacity: .6; }

.compare-transport input {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 32px;
  height: 44px;
  margin: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lime);
  accent-color: var(--lime);
  cursor: pointer;
}
.compare-transport input::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--lime) 0 var(--played, 0%), #686e63 var(--played, 0%) 100%);
}
.compare-transport input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: #fff;
}
.compare-transport input::-moz-range-track { height: 5px; border-radius: 6px; background: #686e63; }
.compare-transport input::-moz-range-progress { height: 5px; border-radius: 6px; background: var(--lime); }
.compare-transport input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.compare-time { color: #f2f3ef; font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.compare-feedback { margin: 0 6px 6px; color: #edf1e5; font-size: .8125rem; }
.compare-surface :is(button, input):focus-visible { outline: 2px solid var(--lime); outline-offset: 0; }

.compare-guide { margin-top: 14px; }
.compare-guide h3 { margin-bottom: 7px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.compare-chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compare-chapters button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  width: 100%;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f2f3ed;
  color: var(--ink);
  font-size: .75rem;
  font-weight: 660;
  line-height: 1.2;
  transition: background-color .18s var(--player-ease), border-color .18s var(--player-ease);
}
.compare-chapters button:not(:disabled):hover { background: #e9edde; }
.compare-chapters button[aria-current="step"], .compare-chapters button:not(:disabled):active {
  border-color: #aebe79;
  background: #e9f2cf;
}
.compare-chapter-time { color: #46583a; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.compare-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 480px) {
  .compare-header { display: grid; gap: 7px; }
  .compare-views button { padding-inline: 7px; }
  .compare-surface { border-radius: 17px; }
  .compare-transport { gap: 6px; }
  .compare-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .compare-player *, .compare-player *::before { transition: none; }
  .compare-play:active, .compare-sound:active { transform: none; }
  .compare-overlay:active { transform: translate(-50%, -50%); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .compare-labels span { background: #171a15; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .compare-views button[aria-pressed="true"], .compare-chapters button[aria-current="step"] {
    border: 1px solid SelectedItem;
    color: SelectedItem;
  }
  .compare-transport input { appearance: auto; -webkit-appearance: auto; }
}
