/* Sprunky · 全部角色图鉴 */

.collection-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 20px;
}

.collection-head h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.5px;
}

.collection-sub {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 24px;
}

.filter {
  padding: 10px 18px;
  border: 3px solid rgba(46, 37, 71, 0.16);
  border-radius: 999px;
  background: var(--card);
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

.filter:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 37, 71, 0.4);
}

.filter.is-active {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transform: translateY(-2px);
}

.filter span {
  margin-left: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 20px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 18px;
  text-align: center;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.gallery-card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 14px 0 rgba(46, 37, 71, 0.12);
}

.gallery-card:active {
  transform: translateY(-1px);
}

.gallery-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 148px;
  width: 100%;
}

.gallery-art .char-img {
  height: 148px;
  width: auto;
  max-width: 100%;
}

.gallery-name {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}

.gallery-cn {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.role-tag {
  margin-top: 8px;
  padding: 3px 10px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.role-tag.beats {
  background: #fff0dd;
  border-color: #ffd8a8;
  color: #c96a10;
}

.role-tag.effects {
  background: #e7f5ff;
  border-color: #a5d8ff;
  color: #1864ab;
}

.role-tag.melodies {
  background: #f3f0ff;
  border-color: #d0bfff;
  color: #6741d9;
}

.role-tag.vocals {
  background: #ffeff7;
  border-color: #fcc2d7;
  color: #c2255c;
}

.gallery-desc {
  margin: 9px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* 弹窗 */
.gallery-dialog {
  width: min(480px, calc(100vw - 40px));
}

.gallery-dialog .gallery-art {
  height: 170px;
  margin-bottom: 4px;
}

.gallery-dialog .gallery-art .char-img {
  height: 170px;
}

.gallery-dialog .modal-quote {
  margin-bottom: 10px;
}

.gallery-note {
  margin: 0;
  padding: 12px 14px;
  border: 2px dashed rgba(46, 37, 71, 0.22);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .gallery-card {
    padding: 12px 10px 14px;
    border-radius: 22px;
  }

  .gallery-art,
  .gallery-art .char-img {
    height: 116px;
  }

  .gallery-name {
    font-size: 16px;
  }

  .gallery-desc {
    font-size: 11.5px;
  }
}
