/* Spell card presentation */

.spell-card-face {
  grid-template-rows: auto 1fr auto auto;
}

.spell-card-face .spell-art {
  width: 62%;
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(54, 39, 24, .2);
  border-radius: 50%;
  color: rgba(255, 255, 255, .94);
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  font-weight: 1000;
  box-shadow: inset 0 0 16px rgba(255, 255, 255, .18), 0 4px 10px rgba(0, 0, 0, .18);
  background: radial-gradient(circle at 40% 35%, #f3ead9, #8b8175 58%, #403b36);
}

.spell-card-effect {
  min-height: 2.5em;
  padding: 3px 4px 1px;
  overflow: hidden;
  color: rgba(42, 28, 16, .78);
  font-size: .39rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}

.hand-card.spell-ready {
  cursor: pointer;
}

.hand-card.spell-selected {
  z-index: 60 !important;
  border-color: #fff0a8 !important;
  box-shadow: 0 0 0 4px rgba(255, 224, 112, .25), 0 17px 34px rgba(0, 0, 0, .45) !important;
  transform: translateY(-15px) scale(1.06) !important;
}

.field-card.spell-target,
.hero-badge.spell-target {
  cursor: pointer !important;
  border-color: #fff0a8 !important;
  box-shadow: 0 0 0 4px rgba(255, 224, 112, .24), 0 7px 18px rgba(0, 0, 0, .34) !important;
  animation: spellTargetPulse 1s ease-in-out infinite;
}

.field-card.damage-immune {
  border-color: #e9ca87 !important;
  box-shadow: 0 0 0 3px rgba(233, 202, 135, .2), 0 7px 16px rgba(0, 0, 0, .29);
}

.field-card.damage-immune::after {
  content: "HARDEN";
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  padding: 3px 5px;
  border-radius: 999px;
  background: #8a673b;
  color: #fff5df;
  font-size: .4rem;
  font-weight: 1000;
  letter-spacing: .04em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.card-detail-preview .spell-card-effect {
  min-height: 3.4em;
  padding: 7px 7px 3px;
  font-size: .62rem;
  line-height: 1.4;
}

.card-detail-stat[hidden] {
  display: none !important;
}

@keyframes spellTargetPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

@media (max-width: 600px) {
  .spell-card-effect {
    font-size: .34rem;
  }

  .card-detail-preview .spell-card-effect {
    font-size: .52rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-card.spell-target,
  .hero-badge.spell-target {
    animation: none;
  }
}
