.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: backdrop-in 0.25s ease;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-panel {
  display: flex;
  gap: 100px;
  align-items: center;
  max-width: 960px;
  width: 100%;
  animation: panel-rise 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes panel-rise {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-card-large {
  flex-shrink: 0;
  transform: scale(1.38);
  transform-origin: center center;
}

.modal-card-large .hand-slot {
  transform: none !important;
}

.modal-card-large .hand-slot {
  pointer-events: none;
}

.modal-card-large .shimmer-layer {
  opacity: 0.6;
  animation: foil-shimmer 2.5s ease infinite;
}

.modal-details {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.modal-card-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
  line-height: 1.2;
  margin-bottom: 4px;
}

.modal-card-type {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: rgba(201,168,76,0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.modal-section {
  margin-bottom: 14px;
}

.modal-section-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.modal-section-text {
  font-size: 0.92rem;
  color: #c8b870;
  line-height: 1.65;
}

.tag-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.skill-tag {
  display: inline-block;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold-bright);
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 3px;
}

.modal-close-button {
  margin-top: 20px;
  background: transparent;
  border: 1.5px solid rgba(201,168,76,0.45);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  padding: 8px 22px;
  border-radius: 4px;
  letter-spacing: 0.12em;
  transition: all 0.2s;
}

.modal-close-button:hover {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

@media (max-width: 768px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 16px 12px;
    overflow-y: auto;
  }

  .modal-panel {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 100%;
  }

  .modal-card-large {
    transform: scale(1.05);
    margin-top: 0;
  }

  .modal-card-name {
    font-size: 1.2rem;
    text-align: center;
  }

  .modal-card-type {
    text-align: center;
  }

  .modal-details {
    width: 100%;
    padding-top: 0;
  }

  .modal-close-button {
    width: 100%;
    padding: 12px;
  }
}
