/* Floating entrance to the four-cat game (home and the maintenance page).
   A shop cat peeks over the pill; it steps aside while the page's own game button is on screen. */
.cat-game-float {
  position: fixed;
  z-index: 100;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px 0 62px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  color: var(--leaf-deep);
  font: 17px/1 var(--font-display);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color 0.2s var(--ease-out), transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out), visibility 0.3s;
}
.cat-game-float:hover { background: var(--hill-soft); }
.cat-game-float:active { transform: translateY(2px); }
.cat-game-float__cat {
  position: absolute;
  left: 6px;
  bottom: 0;
  width: 52px;
  height: 64px;
  background: no-repeat var(--cat-pos) / var(--cat-size) var(--cat-art);
  /* Real fur above the pill; the body fades out at both sides and follows the pill's rounded end. */
  clip-path: inset(-8px 0 0 0 round 0 0 0 22px);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 16%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 16%, #000 78%, transparent);
  filter: drop-shadow(0 3px 4px rgba(47, 58, 18, 0.18));
  transition: transform 0.3s var(--ease-out);
  animation: cat-game-peek 0.6s var(--ease-out) 0.8s both;
}
.cat-game-float:hover .cat-game-float__cat { transform: translateY(-3px); }
.cat-game-float[data-cat="mantou"] { --cat-art: url("../games/cat-blocks/assets/everyday/mantou.webp"); --cat-size: 100px; --cat-pos: -36px -10px; }
.cat-game-float[data-cat="jiadan"] { --cat-art: url("../games/cat-blocks/assets/everyday/jiadan.webp"); --cat-size: 118px; --cat-pos: -33px -6px; }
.cat-game-float[data-cat="shandian"] { --cat-art: url("../games/cat-blocks/assets/everyday/shandian.webp"); --cat-size: 118px; --cat-pos: -30px -5px; }
.cat-game-float[data-cat="abai"] { --cat-art: url("../games/cat-blocks/assets/everyday/abai.webp"); --cat-size: 114px; --cat-pos: -29px -7px; }
@keyframes cat-game-peek { from { transform: translateY(22px); } }
body.door-on .cat-game-float { display: none; }
@media (min-width: 900px) {
  .cat-game-float { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-game-float, .cat-game-float__cat { transition: none; animation: none; }
}

/* Maintenance page: bottom right, since its day/night control sits at the top. */
.cat-game-float--right {
  left: auto;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 16px);
}
@media (min-width: 900px) {
  .cat-game-float--right { bottom: 20px; }
}
.cat-game-float[data-near] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
