/* Кофейная гуща и игральные карты — превью */

.fo-preview {
  border: 1px solid rgba(15, 122, 130, .12);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 246, 252, .94));
  box-shadow: 0 18px 46px rgba(18, 88, 96, .08);
  padding: clamp(20px, 4vw, 32px);
  display: grid;
  place-items: center;
  min-height: 220px;
}

.fo-preview-coffee {
  width: min(280px, 72vw);
  margin-inline: auto;
}

.fo-coffee-scene {
  position: relative;
  width: min(280px, 72vw);
  margin-inline: auto;
  text-align: center;
}

.fo-coffee-cup {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 16px 36px rgba(58, 40, 24, .16);
}

.fo-coffee-symbol {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 34%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: sepia(.35) brightness(1.05) contrast(.95);
  opacity: .92;
  pointer-events: none;
}

.fo-coffee-caption {
  margin: 14px 0 0;
  font-family: Georgia, serif;
  font-size: .95rem;
  font-weight: 700;
  color: #6b5a48;
}

.fo-coffee-scene--idle .fo-coffee-cup {
  opacity: .78;
  filter: saturate(.85);
}

.fo-coffee-scene:not(.fo-coffee-scene--idle) {
  animation: foCoffeeReveal .5s ease both;
}

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

.fo-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 22px);
  width: min(540px, 100%);
  margin-inline: auto;
}

.fo-card-slot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fo-card-slot figcaption {
  font-size: .78rem;
  font-weight: 800;
  color: #607679;
  text-align: center;
  line-height: 1.25;
}

.fo-playing-card-img,
.fo-playing-card-svg {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(38, 30, 82, .16);
  transition: transform .25s ease, box-shadow .25s ease;
}

.fo-cards-grid--idle .fo-playing-card-img--back {
  opacity: .9;
}

.fo-cards-grid--result .fo-card-slot {
  animation: foCardFlip .5s ease both;
}

.fo-cards-grid--result .fo-card-slot:nth-child(1) { animation-delay: .05s; }
.fo-cards-grid--result .fo-card-slot:nth-child(2) { animation-delay: .15s; }
.fo-cards-grid--result .fo-card-slot:nth-child(3) { animation-delay: .25s; }

@keyframes foCardFlip {
  from {
    opacity: 0;
    transform: perspective(600px) rotateY(-14deg) translateY(10px);
  }
  to {
    opacity: 1;
    transform: perspective(600px) rotateY(0) translateY(0);
  }
}

.fo-cards-grid--result .fo-card-slot:hover .fo-playing-card-img,
.fo-cards-grid--result .fo-card-slot:hover .fo-playing-card-svg {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(71, 53, 199, .22);
}

.fo-result-copy {
  margin-top: 4px;
}

@media (max-width: 560px) {
  .fo-cards-grid {
    grid-template-columns: 1fr;
    max-width: 190px;
  }

  .fo-preview {
    min-height: 180px;
  }
}