/* SoraKai · фильтр глав и двойной диапазон года
   Цвет ползунка: фиолетово-голубой (в стиле SoraKai).
   Дополняет catalog-v2.css, не меняет главную страницу. */
.catalog-v2-year-fieldset,
.catalog-v2-chapters-fieldset { margin-top: 4px; }

.catalog-v2-year-filter {
  --year-from: 0%;
  --year-to: 100%;
  padding: 9px 3px 4px;
  border-radius: 10px;
  background: linear-gradient(145deg, #101725, #0e1421);
  border: 1px solid #242e45;
}
.catalog-v2-year-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 7px;
}
.catalog-v2-year-values output {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 38px;
  height: 22px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #5636a4;
  border: 1px solid #875be5;
  box-shadow: 0 0 12px #7c4dff24;
  color: #efffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.catalog-v2-year-values output:last-child {
  background: #264b9f;
  border-color: #477ef4;
  box-shadow: 0 0 12px #4f8fff24;
}
.catalog-v2-year-slider {
  position: relative;
  height: 30px;
  margin: 0 7px;
}
.catalog-v2-year-rail,
.catalog-v2-year-fill {
  position: absolute;
  height: 8px;
  top: 11px;
  border-radius: 99px;
  pointer-events: none;
}
.catalog-v2-year-rail { left: 0; right: 0; background: #292b45; }
.catalog-v2-year-fill {
  left: var(--year-from);
  right: calc(100% - var(--year-to));
  background: linear-gradient(90deg, #8753fa 0%, #6f65fa 50%, #489afa 100%);
  box-shadow: 0 0 12px #805dff52;
}
.catalog-v2-year-slider input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 30px;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  pointer-events: none;
  cursor: pointer;
}
.catalog-v2-year-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
}
.catalog-v2-year-slider input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
}
.catalog-v2-year-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 19px;
  margin-top: -5.5px;
  border-radius: 4px;
  background: #eee8ff;
  border: 1px solid #c9b7ff;
  box-shadow: 0 0 0 1px #956dff70, 0 1px 5px #000a;
  pointer-events: auto;
  cursor: grab;
}
.catalog-v2-year-slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 19px;
  border-radius: 4px;
  background: #eee8ff;
  border: 1px solid #c9b7ff;
  box-shadow: 0 0 0 1px #956dff70, 0 1px 5px #000a;
  pointer-events: auto;
  cursor: grab;
}
.catalog-v2-year-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #c995ff;
  outline-offset: 3px;
}
.catalog-v2-year-slider input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid #c995ff;
  outline-offset: 3px;
}
.catalog-v2-year-slider input[type="range"]:disabled { opacity: .4; cursor: not-allowed; }
.catalog-v2-year-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  border-top: 1px solid #34304c;
  margin: 3px 7px 1px;
  padding-top: 8px;
  position: relative;
}
.catalog-v2-year-ticks::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, #9295ba 0 1px, transparent 1px 19px);
  opacity: .55;
}
.catalog-v2-year-ticks span {
  color: #a39ebd;
  font-size: 9px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.catalog-v2-year-ticks span:first-child { text-align: left; }
.catalog-v2-year-ticks span:last-child { text-align: right; }

.catalog-v2-chapter-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.catalog-v2-chapter-inputs input {
  width: 100%;
  min-width: 0;
  height: 37px;
  border-radius: 10px;
  border: 1px solid #303a50;
  background: #1e2431;
  color: #f1f4ff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0 12px;
  outline: none;
  -moz-appearance: textfield;
}
.catalog-v2-chapter-inputs input::-webkit-outer-spin-button,
.catalog-v2-chapter-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.catalog-v2-chapter-inputs input::placeholder { color: #8390a8; }
.catalog-v2-chapter-inputs input:focus {
  border-color: #915cf1;
  box-shadow: 0 0 0 2px #7843e12e;
}
.catalog-v2-chapter-presets {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.catalog-v2-chapter-presets button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 27px;
  min-width: 38px;
  padding: 0 9px;
  border: 1px solid #343b49;
  border-radius: 99px;
  color: #d5dbe9;
  background: #171d29;
  font-size: 11px;
  font-weight: 800;
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.catalog-v2-chapter-presets button:hover,
.catalog-v2-chapter-presets button.is-active {
  color: #fff;
  background: #392254;
  border-color: #b271ee;
}
.catalog-v2-chapter-presets button:focus-visible {
  outline: 2px solid #b271ee;
  outline-offset: 2px;
}
@media (max-width: 790px) {
  .catalog-v2-year-filter { max-width: 420px; }
  .catalog-v2-chapter-inputs { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-v2-chapter-presets button { transition: none; }
}
