.cat-toggle {
  border-color: #8b5a00;
  color: #8b5a00;
}

.cat-toggle.is-on {
  background: #fff4d8;
}

.cat-cameo {
  position: absolute;
  left: 680px;
  top: 430px;
  z-index: 7;
  display: none;
  width: 210px;
  margin: 0;
  padding: 8px;
  border: 2px solid #111;
  background: #fffdf7;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.18);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.cat-cameo.is-visible {
  display: block;
}

.cat-cameo.is-dragging {
  cursor: grabbing;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

.cat-cameo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 190px;
  object-fit: cover;
  border: 2px solid #111;
  pointer-events: none;
}

.cat-cameo figcaption {
  margin-top: 6px;
  text-align: center;
  font-weight: 800;
  pointer-events: none;
}

.cat-bubble {
  position: absolute;
  left: -26px;
  bottom: calc(100% + 12px);
  width: 238px;
  padding: 10px 12px;
  border: 2px solid #111;
  background: #fffdf7;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.cat-bubble::before {
  content: "";
  position: absolute;
  left: 58px;
  bottom: -14px;
  border-width: 12px 10px 0;
  border-style: solid;
  border-color: #111 transparent transparent;
}

.cat-bubble::after {
  content: "";
  position: absolute;
  left: 60px;
  bottom: -10px;
  border-width: 10px 8px 0;
  border-style: solid;
  border-color: #fffdf7 transparent transparent;
}

.cat-bubble p {
  margin: 0 0 4px;
  font-weight: 800;
}

.cat-bubble p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .cat-cameo {
    left: 54%;
    top: 420px;
  }
}

@media (max-width: 900px) {
  .cat-cameo {
    position: fixed;
    left: auto;
    top: min(50dvh, calc(100dvh - 210px));
    right: 12px;
    bottom: auto;
    width: min(142px, calc(100vw - 24px));
    padding: 6px;
    z-index: 30;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
  }

  .cat-cameo img {
    max-height: 108px;
  }

  .cat-cameo figcaption {
    margin-top: 4px;
    font-size: 13px;
  }

  .cat-bubble {
    left: auto;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(238px, calc(100vw - 24px));
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.38;
  }

  .cat-bubble::before {
    left: auto;
    right: 44px;
  }

  .cat-bubble::after {
    left: auto;
    right: 46px;
  }

  .cat-cameo.is-near-left .cat-bubble {
    left: 0;
    right: auto;
  }

  .cat-cameo.is-near-left .cat-bubble::before {
    left: 44px;
    right: auto;
  }

  .cat-cameo.is-near-left .cat-bubble::after {
    left: 46px;
    right: auto;
  }

  .cat-cameo.is-near-right .cat-bubble {
    left: auto;
    right: 0;
  }
}
