.space-cat {
  cursor: pointer;
  outline: none;
}

.space-cat::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.space-cat:hover::after,
.space-cat:focus-visible::after,
.space-cat[aria-expanded="true"]::after {
  border-color: #7ad7ff66;
  background: #7ad7ff0a;
  box-shadow: 0 0 30px #7ad7ff1a;
}

.space-cat[aria-expanded="true"] {
  z-index: 20;
}

.cat-profile-panel {
  position: absolute;
  z-index: 30;
  width: 270px;
  overflow: hidden;
  border: 1px solid #7ad7ff4d;
  border-radius: 18px;
  background: #0a0c13f2;
  box-shadow: 0 24px 70px #00000099, 0 0 50px #7ad7ff14;
  backdrop-filter: blur(18px);
  pointer-events: auto;
  will-change: transform;
}

.cat-profile-panel > img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  object-position: center 35%;
}

.cat-profile-copy {
  position: relative;
  padding: 20px;
}

.cat-profile-copy > span {
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font: 9px/1 monospace;
}

.cat-profile-copy h2 {
  margin: 9px 0 10px;
  color: var(--ink);
  letter-spacing: -0.035em;
  font-size: 24px;
}

.cat-profile-copy p {
  margin: 0;
  color: #9ea5b1;
  font-size: 12px;
  line-height: 1.6;
}

.cat-profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #b9c0ca;
  background: #ffffff08;
  cursor: pointer;
  font: 16px/1 sans-serif;
}

.cat-profile-close:hover,
.cat-profile-close:focus-visible {
  color: #fff;
  border-color: #7ad7ff66;
  background: #7ad7ff14;
}

@media (max-width: 620px) {
  .cat-profile-panel {
    width: 210px;
    border-radius: 14px;
  }

  .cat-profile-panel > img {
    height: 112px;
  }

  .cat-profile-copy {
    padding: 15px;
  }

  .cat-profile-copy h2 {
    margin-top: 7px;
    font-size: 19px;
  }

  .cat-profile-copy p {
    font-size: 10px;
  }

  .cat-profile-close {
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-profile-panel {
    transition: none;
  }
}
