/* Chooser modal */
  #modalChooser {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .68);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
  }

  #modalChooser .modal {
  position: relative;
  width: min(920px, 95vw);
  max-height: 90vh;          /* 🔹 limit overall height */
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  overflow-y: auto;          /* 🔹 scroll inside if content is taller */
}


  .chooser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 10px;
  }

  .chooser-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    cursor: pointer;
    transition: .15s;
  }

  .chooser-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, .10);
  }

  .chooser-card img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    background: #f8f9fc;
    padding: 6px;
    border-radius: 12px;
  }

  .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
  }

  .modal-actions button {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
  }

  /* Fullscreen overlay hosting the tribute iframe */
  #tributeOverlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .80);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11000;
  }

  #tributeOverlay .frame {
    width: min(1000px, 96vw);
    height: min(680px, 92vh);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 120px rgba(2, 6, 23, .4);
  }

  #tributeFrame {
    position: absolute;
    inset: 0;
    border: 0;
    width: 100%;
    height: 100%;
  }

  .chooser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* Desktop: 3 columns */
  gap: 14px;
  margin-top: 10px;
}
/* Reduce space between icon → title → subtitle */
.chooser-card h5 {
  margin: 4px 0 0 0 !important;   /* reduce top + bottom space */
}

.chooser-card p {
  margin: 2px 0 0 0 !important;   /* reduce top space */
}

/* Reduce internal gap between elements inside each card */
.chooser-card {
  gap: 6px !important;   /* was ~10px */
  padding-bottom: 10px;  /* slightly tighter */
}


/* ============================
   TABLET (max 768px)
   ============================ */
@media (max-width: 768px) {

  #modalChooser .modal {
    width: 94vw;
    max-height: 92vh;
    padding: 12px;
    border-radius: 14px;
    overflow-y: auto;
  }

  .chooser-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .chooser-card {
    padding: 12px;
    gap: 6px;
  }

  .chooser-card img {
    width: 95px;
    height: 95px;
    padding: 4px;
  }

  .chooser-card h5 {
    font-size: 1rem;
  }

  .chooser-card p {
    font-size: 0.85rem;
  }
}


/* ============================
   MOBILE (max 480px)
   ============================ */
@media (max-width: 480px) {

  #modalChooser .modal {
    width: 96vw;
    max-height: 90vh;
    padding: 10px;
    border-radius: 12px;
    overflow-y: auto;
  }

  .chooser-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .chooser-card {
    padding: 8px;
    gap: 4px;
  }

  .chooser-card img {
    width: 80px;
    height: 80px;
    padding: 3px;
  }

  .chooser-card h5 {
    font-size: 0.9rem;
  }

  .chooser-card p {
    font-size: 0.78rem;
  }
}
