.ending {
  --glass-width: 64%;
  isolation: isolate;
  background: #30382b;
}

.ending-backdrop,
.ending-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ending-backdrop {
  z-index: 0;
  background: url("ending-light.png") center center / cover no-repeat;
}

.ending-glass {
  z-index: 1;
  right: auto;
  width: var(--glass-width);
  background: rgba(20, 29, 23, .31);
  -webkit-backdrop-filter: blur(19px) saturate(.75);
  backdrop-filter: blur(19px) saturate(.75);
  box-shadow: none;
}

.ending > .section-index,
.ending-inner,
.glass-control,
.ending footer {
  position: relative;
  z-index: 3;
}

.ending-inner {
  width: min(56vw, 760px);
  max-width: none;
  margin: 12vh 0 5vh 2vw;
}

.ending-question {
  font-size: clamp(3.3rem, 5.4vw, 6.8rem);
}

.glass-boundary {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--glass-width);
  width: 22px;
  transform: translateX(-50%);
  cursor: ew-resize;
  touch-action: none;
}

.glass-control {
  width: min(46vw, 480px);
  margin: 0 0 10vh 2vw;
}

.glass-control label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
  color: #eef2e6;
  font: 600 11px/1.4 'DM Sans', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.glass-control label span {
  color: #cbd5bd;
  font-weight: 400;
  letter-spacing: .07em;
}

.glass-control input {
  display: block;
  width: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.glass-control input::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(241, 246, 224, .6);
}

.glass-control input::-moz-range-track {
  height: 2px;
  background: rgba(241, 246, 224, .6);
}

.glass-control input::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -8px;
  border: 1px solid #f1f5e4;
  border-radius: 50%;
  background: #d2dec1;
}

.glass-control input::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 1px solid #f1f5e4;
  border-radius: 50%;
  background: #d2dec1;
}

.glass-control input:focus-visible {
  outline: 2px solid #f1f5e4;
  outline-offset: 9px;
}

.ending footer {
  background: rgba(17, 26, 21, .2);
}

@media (max-width: 900px) {
  .ending-inner { width: min(58vw, 600px); }
  .ending-question { font-size: clamp(2.5rem, 5.3vw, 5rem); }
}

@media (max-width: 650px) {
  .ending { --glass-width: 86%; }
  .ending-backdrop { background-position: 64% center; }
  .ending-inner { width: 76vw; margin: 100px 0 60px; }
  .ending-question { font-size: clamp(2.9rem, 10.2vw, 5.2rem); }
  .glass-control { width: 78vw; margin: 0 0 100px; }
  .glass-control label { display: block; }
  .glass-control label span { display: block; margin-top: 5px; }
}
