.cats-heading > p.cats-intro {
  color: #aeb3bd;
  max-width: 500px;
  margin: 0;
  font-size: 19px;
  line-height: 1.7;
}

.cats-heading > p.cats-profile-hint {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  max-width: none;
  margin: 0 0 4px;
  padding: 9px 13px;
  border: 1px solid #7ad7ff40;
  border-radius: 999px;
  color: var(--cyan);
  background: #7ad7ff0a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font: 9px/1.4 monospace;
}

.cats-profile-hint span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #7ad7ff66;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.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-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  align-items: start;
  gap: 0;
  transition: grid-template-columns 0.35s ease, gap 0.35s ease;
}

.cat-stage .cat-space {
  width: 100%;
}

.cat-profile-slot {
  min-width: 0;
  height: 720px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.35s;
}

.cat-stage.is-profile-open {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.cat-stage.is-profile-open .cat-profile-slot {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.12s, 0s;
}

.cat-profile-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  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;
}

.cat-profile-gallery {
  position: relative;
  flex: 0 0 260px;
  min-height: 0;
  overflow: hidden;
  background: #05070d;
}

.cat-profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
  outline: none;
}

.cat-profile-image:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -4px;
}

body.cat-image-lightbox-open {
  overflow: hidden;
}

.cat-image-lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background: #02040aee;
  backdrop-filter: blur(14px);
}

.cat-image-lightbox-dismiss {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 28px 90px #000;
  cursor: zoom-out;
  outline: none;
}

.cat-image-lightbox-dismiss:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

.cat-image-lightbox-image {
  display: block;
  width: auto;
  max-width: min(92vw, 1600px);
  height: auto;
  max-height: 88vh;
  border-radius: 16px;
  object-fit: contain;
}

.cat-image-lightbox-hint {
  position: fixed;
  bottom: 18px;
  left: 50%;
  padding: 7px 11px;
  border: 1px solid #ffffff24;
  border-radius: 999px;
  color: #d9e5eb;
  background: #05070dcc;
  letter-spacing: 0.08em;
  pointer-events: none;
  transform: translateX(-50%);
  font: 9px/1 monospace;
}

.cat-gallery-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  border: 1px solid #ffffff2b;
  border-radius: 12px;
  color: #fff;
  background: #05070dcc;
  box-shadow: 0 8px 24px #00000066;
  cursor: pointer;
  transform: translateY(-50%);
  font: 28px/1 sans-serif;
}

.cat-gallery-button:hover,
.cat-gallery-button:focus-visible {
  border-color: #7ad7ff99;
  background: #14202de6;
}

.cat-gallery-previous {
  left: 12px;
}

.cat-gallery-next {
  right: 12px;
}

.cat-gallery-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 8px;
  border: 1px solid #ffffff24;
  border-radius: 999px;
  color: #d9e5eb;
  background: #05070dcc;
  letter-spacing: 0.08em;
  font: 9px/1 monospace;
}

.cat-profile-copy {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 20px;
}

.cat-profile-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  padding-right: 36px;
}

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

.cat-profile-language {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff08;
}

.cat-language-button {
  min-width: 30px;
  padding: 5px 7px;
  border: 0;
  border-radius: 999px;
  color: #8d96a3;
  background: transparent;
  cursor: pointer;
  letter-spacing: 0.08em;
  font: 9px/1 monospace;
}

.cat-language-button:hover,
.cat-language-button:focus-visible {
  color: #fff;
  background: #7ad7ff14;
}

.cat-language-button[aria-pressed="true"] {
  color: #061018;
  background: var(--cyan);
}

.cat-profile-copy h2 {
  flex: none;
  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-description {
  flex: 1;
  min-height: 0;
  padding-right: 6px;
  overflow-y: auto;
  scrollbar-color: #7ad7ff66 transparent;
  scrollbar-width: thin;
}

.cat-profile-description p + p {
  margin-top: 12px;
}

.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: 900px) {
  .cat-profile-slot {
    height: 660px;
  }

  .cat-profile-gallery {
    flex-basis: 230px;
  }
}

@media (max-width: 860px) {
  .cats-heading > p.cats-profile-hint {
    justify-self: start;
  }

  .cat-stage,
  .cat-stage.is-profile-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 0;
    gap: 0;
    transition: grid-template-rows 0.35s ease, gap 0.35s ease;
  }

  .cat-profile-slot {
    width: 100%;
  }

  .cat-stage.is-profile-open {
    grid-template-rows: auto 660px;
    gap: 16px;
  }
}

@media (max-width: 620px) {
  .cats-heading > p.cats-intro {
    font-size: 16px;
  }

  .cat-profile-slot {
    height: 575px;
  }

  .cat-stage.is-profile-open {
    grid-template-rows: auto 575px;
  }

  .cat-profile-panel {
    border-radius: 14px;
  }

  .cat-profile-gallery {
    flex-basis: 190px;
  }

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

  .cat-profile-header {
    gap: 8px;
    padding-right: 30px;
  }

  .cat-profile-kicker {
    font-size: 8px;
  }

  .cat-language-button {
    min-width: 28px;
    padding: 5px 6px;
    font-size: 8px;
  }

  .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-stage,
  .cat-profile-slot,
  .cat-profile-panel {
    transition: none;
  }
}
