/* Spielzeug-Finder · custom polish on top of Tailwind */

html { scroll-behavior: smooth; }

body {
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

/* Step transitions */
.step-enter {
  opacity: 0;
  transform: translateY(8px);
}
.step-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 280ms ease-out, transform 280ms ease-out;
}

/* Selection chip */
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #e6e0d2;
  background: #ffffff;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}
.choice:hover {
  border-color: #cdb98f;
  background: #fdfaf3;
}
.choice:focus-visible {
  outline: none;
  border-color: #32373c;
  box-shadow: 0 0 0 3px rgba(50,55,60,0.15);
}
.choice .icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.choice .label {
  font-weight: 600;
  color: #32373c;
  line-height: 1.2;
}
.choice .sub {
  margin-top: 0.15rem;
  font-size: 0.825rem;
  color: rgba(50,55,60,0.65);
  line-height: 1.35;
}
.choice .check {
  margin-left: auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1.5px solid #d8d2c2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: background 160ms ease, border-color 160ms ease;
}
.choice[aria-pressed="true"] {
  border-color: #32373c;
  background: #fbf7f0;
  box-shadow: 0 1px 2px rgba(50,55,60,0.05), 0 6px 20px -10px rgba(50,55,60,0.20);
}
.choice[aria-pressed="true"] .check {
  background: #32373c;
  border-color: #32373c;
}
.choice[aria-pressed="true"] .check::after {
  content: "";
  width: 0.6rem;
  height: 0.35rem;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Result card */
.result-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e6e0d2;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(50,55,60,0.30);
}
.result-card .photo {
  aspect-ratio: 4/3;
  background: #f1ede4;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.result-card .photo.has-img .tile-letter { display: none; }
.result-card .photo.is-fallback { background-size: cover; }
.result-card .photo.is-fallback .tile-letter { display: block; }
.result-card .photo .tile-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  pointer-events: none;
}
.result-card .badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid #e6e0d2;
  font-size: 0.7rem;
  font-weight: 600;
  color: #32373c;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
}
.result-card .score {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(50,55,60,0.92);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
}

/* Why tooltip */
.why-wrap { position: relative; display: inline-block; }
.why-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(50,55,60,0.65);
  background: transparent;
  border: none;
  padding: 0;
  cursor: help;
  border-bottom: 1px dashed rgba(50,55,60,0.25);
}
.why-trigger:hover { color: #32373c; border-bottom-color: #32373c; }
.why-pop {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 0.5rem);
  left: 0;
  width: 18rem;
  max-width: 85vw;
  background: #32373c;
  color: white;
  font-size: 0.78rem;
  line-height: 1.45;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 12px 32px -10px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.why-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 1rem;
  border: 6px solid transparent;
  border-top-color: #32373c;
}
.why-wrap.is-open .why-pop { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Tag chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: #f1ede4;
  color: rgba(50,55,60,0.75);
}

/* Toast for copy */
.toast {
  position: fixed;
  z-index: 40;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #32373c;
  color: white;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .choice { padding: 0.85rem 0.9rem; }
  .choice .icon { width: 2rem; height: 2rem; font-size: 1.1rem; }
  .why-pop { width: 16rem; }
}
