/* ─── Relationships Domain — Custom Mechanic Styles ─── */
/* Design spec: KLIP Relationships Domain Interaction Design Specification */

:root {
  --rel-primary: #C45BAA;
  --rel-dark: #A03D8A;
  --rel-accent: #F8D7EF;
  --rel-warm: #E991D4;
  --rel-cool: #B0BEC5;
  --rel-text: #37474F;
  --rel-text-muted: #90A4AE;
  --rel-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rel-emotional: 400ms ease-out;
}

/* Wrapper */
.rel-mech {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md, 16px);
  padding: var(--space-sm, 8px) 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Scene container */
.rel-scene {
  width: 100%;
  border-radius: var(--radius-lg, 16px);
  background: var(--bg-card, #F5F5F5);
  border: 1.5px solid var(--border, #E0E0E0);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(196, 91, 170, 0.08);
  touch-action: none;
}
.rel-scene svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Slider (native range input) */
.rel-slider-wrap {
  width: 100%;
  padding: 0 var(--space-sm, 8px);
}
.rel-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  background: linear-gradient(90deg, var(--rel-cool), var(--rel-accent), var(--rel-warm), var(--rel-primary));
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.rel-slider:focus-visible {
  box-shadow: 0 0 0 3px var(--rel-primary);
}
.rel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rel-primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(196, 91, 170, 0.3);
  cursor: grab;
  transition: transform 0.15s var(--rel-snap);
}
.rel-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.12);
}
.rel-slider::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rel-primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(196, 91, 170, 0.3);
  cursor: grab;
}
.rel-slider::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.12);
}

/* Label Chips */
.rel-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 0 4px;
  width: 100%;
}
.rel-chip {
  font-size: 11px;
  font-weight: 400;
  color: var(--rel-text-muted);
  padding: 3px 8px;
  border-radius: 16px;
  background: transparent;
  transition: all 0.25s ease-out;
  white-space: nowrap;
  line-height: 1.3;
}
.rel-chip.active {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--rel-primary);
  box-shadow: 0 1px 6px rgba(196, 91, 170, 0.25);
}

/* Continue button */
.rel-continue {
  width: 100%;
  margin-top: var(--space-md, 16px);
}

/* Hint text */
.rel-hint {
  font-size: 13px;
  color: var(--rel-text-muted);
  text-align: center;
  margin-top: 4px;
  opacity: 0.65;
  transition: opacity 0.3s;
  letter-spacing: 0.02em;
}

/* ─── Scene-specific backgrounds ─── */
.rel-weather .rel-scene {
  background: #37474F;
}
.rel-lanterns .rel-scene {
  background: #0D1B2A;
}
.rel-threads .rel-scene {
  background: #FAFAFA;
}
.rel-mirror .rel-scene {
  background: #F5F5F5;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rel-mech *,
  .rel-mech svg *,
  .rel-scene * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .rel-slider::-webkit-slider-thumb {
    transition-duration: 0.01ms !important;
  }
}

/* Focus ring for keyboard navigation */
.rel-slider:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--rel-primary);
  outline-offset: 3px;
}
