/* Characters stay in the page layout so they never cover navigation or stories. */
.page-title.with-character {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 340px);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
}
.with-character .page-title-copy > p:last-child {
  max-width: 580px;
  color: #62516f;
}
.animated-friend {
  width: 100%;
  max-width: 340px;
  margin: 0;
  justify-self: center;
}
.animated-friend-media {
  position: relative;
  width: 100%;
  height: clamp(260px, 29vw, 355px);
  isolation: isolate;
}
.animated-friend-media > img,
.animated-friend-media > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  pointer-events: none;
}
.animated-friend [hidden] { display: none !important; }
.animated-friend figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  color: #6d467f;
  font-size: 13px;
}
.animated-friend-name { font-weight: 700; }
.animated-friend-toggle {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d6c7e4;
  border-radius: 24px;
  background: #fffaf2;
  color: #52336b;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.animated-friend-toggle:hover { background: #eee1fa; }
.animated-friend-toggle:focus-visible {
  outline: 3px solid #7542aa;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .page-title.with-character { grid-template-columns: 1fr; gap: 16px; }
  .animated-friend { max-width: 290px; }
  .animated-friend-media { height: 260px; }
}
@media print {
  .animated-friend-toggle,
  .animated-friend video,
  .animated-friend-animation { display: none !important; }
  .animated-friend .animated-friend-poster { display: block !important; }
}
