body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Spinner */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Drop zone */
#drop-zone {
  transition: all 0.2s ease;
}

#drop-zone.drag-over {
  border-color: #3b82f6;
  background-color: #eff6ff;
  transform: scale(1.01);
}

/* Prevent horizontal overflow on mobile */
html, body {
  overflow-x: hidden;
}

section, header, footer {
  overflow-x: hidden;
}

/* Hero before/after images: large on mobile, capped on desktop */
.hero-before {
  width: 90%;
}
.hero-after {
  width: 75%;
}
@media (min-width: 640px) {
  .hero-before {
    width: 200px;
  }
  .hero-after {
    width: 160px;
  }
}

/* FAQ details animation */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Smooth transitions for right panel states */
#right-empty, #right-loading, #right-result, #right-error, #right-success {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Carousel — triplet layout (transform-based) */
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.35s ease-out;
  will-change: transform;
}
.carousel-slide {
  width: 100%;
  flex-shrink: 0;
}
.carousel-area {
  padding-left: 4px;
  padding-right: 4px;
}
.carousel-photo-orig {
  width: 105px;
  height: 136px;
}
.carousel-photo-result {
  width: 125px;
  height: 162px;
}
.carousel-label {
  width: 125px;
}
.carousel-branch {
  width: 85%;
  max-width: 300px;
}
.carousel-nav {
  top: 68px;
  transform: translateY(-50%);
}
@media (min-width: 640px) {
  .carousel-area {
    padding-left: 40px;
    padding-right: 40px;
  }
  .carousel-photo-orig {
    width: 170px;
    height: 220px;
  }
  .carousel-photo-result {
    width: 170px;
    height: 220px;
  }
  .carousel-label {
    width: 170px;
  }
  .carousel-nav {
    top: 110px;
  }
}
.carousel-dot:hover {
  opacity: 0.8;
}

/* Legal modals */
.modal-body {
  max-height: 85vh;
}
