.mascot-menu {
  width: 100%;
}

.mascot-menu-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-right: 74px;
}

.mascot-menu-heading h2 {
  margin: 0 0 6px;
}

.mascot-menu-heading .modal-intro {
  margin: 0;
  /* Break the Japanese note between phrases on a narrow phone. */
  word-break: auto-phrase;
}

.mascot-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mascot-bulk .button {
  min-height: 36px;
  padding: 7px 12px;
  white-space: nowrap;
}

.mascot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}

.mascot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 148px;
  padding: 13px 9px;
  border: 1px solid #a7b68f38;
  border-radius: 12px;
  background: #adbd9910;
  color: #e2e6d2;
  cursor: pointer;
  text-align: center;
}

.mascot-card:hover:not(:disabled) {
  background: #adbd9920;
}

.mascot-card[aria-pressed='true'] {
  border-color: #e6b66e;
  background: #e0b07022;
  box-shadow: inset 0 0 0 1px #e6b66e66;
}

.mascot-card:focus-visible,
.mascot-card.gamepad-focus {
  outline: 3px solid #efd18c !important;
  outline-offset: -3px !important;
  box-shadow: none !important;
}

.mascot-card:disabled {
  opacity: 0.52;
  cursor: default;
}

.mascot-picture {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--mascot-color);
  color: #141b18;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.mascot-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mascot-picture.mascot-photo {
  width: 112px;
  height: 94px;
  border-radius: 0;
  background: transparent;
}
.mascot-photo img {
  object-fit: contain;
  transform: scale(1.3);
}

[data-starting-mascot-picker] {
  min-width: 0;
}
.starting-mascot {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}
.starting-mascot legend {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--cream);
}
.starting-mascot legend small {
  color: #b8ba9d;
  font-size: 12px;
}
.starting-mascot-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 2px;
}
.starting-mascot .mascot-card {
  min-height: 140px;
  padding: 8px 4px;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.starting-mascot .mascot-picture {
  width: 112px;
  max-width: 100%;
  height: 94px;
}
.starting-mascot-choice {
  margin: 6px 0 0;
  color: #d6c79a;
  font-size: 12px;
}

.mascot-setup-card {
  width: min(1040px, 100%);
  max-height: calc(var(--screen-height, 100dvh) - 48px);
}
#starting-mascot-form {
  overflow: hidden;
}
.mascot-setup-card > [data-starting-mascot-picker] {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}
.mascot-setup-card .setup-heading {
  flex-shrink: 0;
}
.mascot-setup-card .starting-mascot legend span {
  display: none;
}
.mascot-setup-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 12px 0 0;
  background: #0a120ef5;
}
.mascot-setup-actions .button {
  min-height: 48px;
}
@media (max-width: 640px) {
  .starting-mascot-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .starting-mascot .mascot-card {
    min-height: 114px;
    font-size: 12px;
  }
  .starting-mascot .mascot-picture {
    width: 92px;
    height: 76px;
  }
}
@media (max-width: 360px) {
  .starting-mascot-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mascot-card strong {
  font-size: 12px;
  line-height: 1.3;
}

.mascot-card-status {
  color: #aab99e;
  font-size: 10px;
  line-height: 1.4;
}

.mascot-card[aria-pressed='true'] .mascot-card-status {
  color: #f2cd92;
}

@media (max-width: 680px) {
  .mascot-menu-heading {
    flex-direction: column;
    padding-right: 68px;
  }
  .mascot-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
