/* ==========================================================================
   SPLIT SLIDER — a hairline divider with a small handle. --split (0…1) set from JS.
   ========================================================================== */

.split {
  --split: 0.5;
  position: absolute; inset: 0; z-index: 10;
  pointer-events: none;
}

/* The draggable strip that follows the line */
.split__rail {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 52px; margin-left: -26px;
  transform: translate3d(calc(var(--split) * 100vw), 0, 0);
  display: grid; place-items: center;
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
  will-change: transform;
}

.split__line {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; margin-left: -0.5px;
  background: linear-gradient(to bottom, transparent, rgba(244, 242, 238, 0.85) 12%, rgba(244, 242, 238, 0.85) 88%, transparent);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
}

.split__handle {
  position: relative;
  width: 30px; height: 54px;
  border-radius: 99px;
  display: grid; place-items: center;
  color: var(--ink);
  transition: transform 0.35s var(--spring), border-color 0.3s;
}
.split__handle svg { width: 16px; height: 16px; }
.split.is-dragging .split__handle { transform: scale(1.08); border-color: var(--hairline-strong); }

/* Corner labels: HUMAN on the left, the animal on the right */
.split__tag {
  position: absolute;
  top: calc(var(--safe-top) + 70px);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.split__tag.glass { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.split__tag::after {                      /* hairline under each label */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--hairline);
}
.split__tag-icon { width: 16px; height: 16px; display: block; }
.split__tag--human { left: var(--gutter); color: var(--ink-dim); }
.split__tag--human .split__tag-icon { display: none; }
.split__tag--animal { right: var(--gutter); pointer-events: auto; cursor: pointer; }
.split__tag--animal::before {             /* the animal's colour mark */
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  order: -1;
}
.split__tag--animal .split__tag-icon { display: none; }
.split__tag-info { width: 13px; height: 13px; display: block; opacity: 0.6; }
.split__tag.is-hidden { opacity: 0; transform: translateY(-6px); }

/* First-time hint until the line is used */
.split__hint {
  position: absolute;
  top: calc(50% + 40px); left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  transition: opacity 0.4s;
}
.split.is-used .split__hint { opacity: 0; }
.split:not(.is-used) .split__handle { animation: nudge 3s var(--ease-in-out) infinite; }
@keyframes nudge { 0%, 100% { translate: 0; } 30% { translate: -6px; } 60% { translate: 6px; } }
