.credits-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--header-block-size) + 1.25rem) 1.15rem 3rem;
  color: #2c241c;
}

.credits-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  background: #e7f7ff;
  box-shadow: 0 8px 22px rgba(40, 20, 80, 0.12);
}

.credits-intro-icon {
  flex: 0 0 auto;
}

.credits-intro h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #24324a;
}

.credits-intro p,
.credits-note,
.credits-balance-line {
  margin: 0.35rem 0 0;
  color: #3d4a5c;
  line-height: 1.45;
}

.credits-balance-line strong {
  font-size: 1.05rem;
}

.credits-status:not(:empty) {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
}

.credits-tiers-stack {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.credits-tier-col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
  border-radius: 22px;
  background: #fff;
  border: 3px solid transparent;
  box-shadow: 0 10px 24px rgba(40, 20, 80, 0.12);
}

.credits-tier-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.credits-tier-trainers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.credits-tier-pink {
  border-color: #e25b8a;
}

.credits-tier-blue {
  border-color: #3d6fd4;
}

.credits-tier-gold {
  border-color: #c4921a;
}

.credits-tier-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.credits-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}

.credits-tier-pink .credits-step {
  background: #e25b8a;
}

.credits-tier-blue .credits-step {
  background: #3d6fd4;
}

.credits-tier-gold .credits-step {
  background: #c4921a;
}

.credits-tier-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.credits-tier-pink .credits-tier-head h2 {
  color: #c43b78;
}

.credits-tier-blue .credits-tier-head h2 {
  color: #2f62c4;
}

.credits-tier-gold .credits-tier-head h2 {
  color: #9a6b12;
}

.credits-tier-head p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #5c6577;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.credits-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 100%;
  padding: 0.9rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(40, 20, 80, 0.12);
}

.credits-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.credits-card-copy {
  min-width: 0;
}

.credits-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.credits-card .credits-price {
  margin: 0.2rem 0 0;
  font-weight: 700;
  color: #3d4a5c;
}

.credits-art {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 4.25rem;
  width: 4.25rem;
  height: 4.25rem;
}

.credits-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.credits-card button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: #1e9d55;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.credits-card button:hover:not(:disabled) {
  background: #17864a;
}

.credits-card button:disabled {
  opacity: 0.72;
  cursor: default;
}

.credits-card button:focus-visible,
.trainer-card:focus-within {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.trainer-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 1rem;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(40, 20, 80, 0.12);
  overflow: hidden;
}

.trainer-identity {
  text-align: center;
}

.trainer-pink {
  background: #ffe8f2;
}

.trainer-blue {
  background: #e7f3ff;
}

.trainer-gold {
  background: #fff4dc;
}

.trainer-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(40, 20, 80, 0.16);
}

.trainer-gold .trainer-photo {
  object-position: center 12%;
}

.trainer-identity h3 {
  margin: 0.55rem 0 0;
  font-size: 1rem;
}

.trainer-level {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  font-weight: 700;
}

.trainer-pink .trainer-level {
  color: #c43b78;
}

.trainer-blue .trainer-level {
  color: #2f62c4;
}

.trainer-gold .trainer-level {
  color: #9a6b12;
}

.trainer-headline {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}

.trainer-copy ul {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.trainer-copy li {
  position: relative;
  margin-top: 0.35rem;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

.trainer-copy li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.trainer-pink li::before {
  color: #e25b8a;
}

.trainer-blue li::before {
  color: #3d7ee8;
}

.trainer-gold li::before {
  color: #c4921a;
}

.credits-explain,
.credits-history {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(40, 20, 80, 0.12);
}

.credits-explain h2,
.credits-history h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.credits-explain ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #3d4a5c;
  line-height: 1.5;
}

.credits-history article {
  margin-top: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid #eadfce;
}

.credits-history article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.credits-history p {
  margin: 0.15rem 0;
}

@media (min-width: 981px) {
  .credits-page {
    padding: calc(var(--header-block-size) + 0.35rem) 0.85rem 0.45rem;
  }

  .credits-status:not(:empty) {
    margin: 0 0 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
  }

  .credits-tiers-stack {
    margin-top: 0.35rem;
    gap: 0.4rem;
  }

  .credits-tier-col {
    padding: 0.6rem;
    border-radius: 14px;
    gap: 0.4rem;
  }

  .credits-tier-body {
    gap: 0.45rem;
  }

  .credits-tier-head {
    gap: 0.45rem;
    align-items: center;
  }

  .credits-step {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.8rem;
  }

  .credits-tier-head h2 {
    font-size: 0.92rem;
  }

  .credits-tier-head p {
    font-size: 0.74rem;
  }

  .credits-grid {
    gap: 0.45rem;
  }

  .credits-card {
    gap: 0.4rem;
    padding: 0.45rem 0.55rem 0.5rem;
    border-radius: 12px;
  }

  .credits-card strong {
    font-size: 0.92rem;
  }

  .credits-card .credits-price {
    margin-top: 0.05rem;
    font-size: 0.85rem;
  }

  .credits-art {
    flex-basis: 3.15rem;
    width: 3.15rem;
    height: 3.15rem;
  }

  .credits-card button {
    padding: 0.38rem 0.6rem;
    border-radius: 8px;
    font-size: 0.88rem;
  }

  .trainer-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.4rem 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
  }

  .trainer-photo {
    width: 64px;
    height: 64px;
  }

  .trainer-identity h3 {
    margin-top: 0.25rem;
    font-size: 0.82rem;
  }

  .trainer-level {
    margin-top: 0.15rem;
    font-size: 0.68rem;
  }

  .trainer-headline {
    font-size: 0.78rem;
  }

  .trainer-copy ul {
    margin-top: 0.25rem;
  }

  .trainer-copy li {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    line-height: 1.25;
  }
}

@media (max-width: 980px) {
  .credits-tier-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .credits-intro {
    align-items: flex-start;
  }

  .credits-grid {
    grid-template-columns: 1fr;
  }

  .trainer-card {
    grid-template-columns: 1fr;
  }

  .trainer-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* A trainer without a picture shows their initials in its place. */
.trainer-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.6rem;
  background: #f3e6d6;
  color: #5c3014;
}
