/* ===== Pokémon-style landmark cards ===== */
.book__section-title {
  margin: 22px 18px 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.book__section-desc {
  margin: 0 18px 12px;
  font-size: 0.82rem;
  color: var(--stone);
}

.book-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0 16px 8px;
}

@media (min-width: 380px) {
  .book-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.pk-card {
  --card-accent: #c4a035;
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(145deg, #f7e7a0, #c4a035 45%, #8a7020);
  box-shadow: 0 12px 28px rgba(20, 24, 31, 0.18);
  transition: transform 0.2s ease;
}

.pk-card.is-compact:active {
  transform: scale(0.98);
}

.pk-card.is-locked {
  filter: grayscale(0.85);
  opacity: 0.72;
}

.pk-card__inner {
  background: linear-gradient(180deg, #fffdf6, #f3efe4);
  border-radius: 12px;
  padding: 10px 10px 8px;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.pk-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.pk-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #1a1814;
}

.pk-card__hp {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--card-accent);
}

.pk-card__art {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #dfe6ee;
  border: 2px solid #1a1814;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.pk-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pk-card__unknown {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: rgba(20, 24, 31, 0.25);
  background: repeating-linear-gradient(
    -45deg,
    #e8edf2,
    #e8edf2 8px,
    #d5dde6 8px,
    #d5dde6 16px
  );
}

.pk-card__type {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(15, 20, 28, 0.75);
  color: #fff;
}

.pk-card__sub {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2a3140;
}

.pk-card__jamos {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.pk-card__chip {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--card-accent);
  color: #1a1508;
}

.pk-card__flavor {
  margin-top: 8px;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #5a6170;
  min-height: 2.8em;
}

.pk-card__foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(20, 24, 31, 0.08);
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  font-weight: 700;
  color: #8a7020;
}

/* Reveal modal */
.card-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}

.card-modal.is-show {
  opacity: 1;
  visibility: visible;
}

.card-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(8px);
}

.card-modal__stage {
  position: relative;
  z-index: 2;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card-modal__banner {
  color: #ffe566;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  animation: bannerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bannerPop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-modal__flip {
  width: 100%;
  perspective: 1200px;
  min-height: 440px;
  position: relative;
}

.card-modal__face {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-modal__back {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  min-height: 420px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 40%),
    linear-gradient(145deg, #1c2838, #0f141c 55%, #2a3a28);
  border: 4px solid #c4a035;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transform: rotateY(0deg);
}

.card-modal__back::before {
  content: "한글여행";
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #e8c85a;
  letter-spacing: 0.08em;
}

.card-modal__front {
  position: relative;
  transform: rotateY(180deg);
}

.card-modal__flip.is-flipped .card-modal__back {
  transform: rotateY(180deg);
}

.card-modal__flip.is-flipped .card-modal__front {
  transform: rotateY(360deg);
}

.card-modal__front .pk-card {
  animation: cardGlow 1.2s ease-in-out infinite alternate;
}

@keyframes cardGlow {
  from {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(232, 200, 90, 0.2);
  }
  to {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 28px 4px rgba(232, 200, 90, 0.35);
  }
}

.card-modal__btn {
  min-width: 200px;
}
