/* Miku fufu 桌面玩偶 —— 仅在页面左右留白里出现，不遮挡正文。 */

.fufu {
  position: fixed;
  bottom: 26px;
  z-index: 46;
  pointer-events: none;
  contain: layout style;
}

.fufu[hidden] { display: none; }

.fufu.is-live { z-index: 65; }

.fufu-shadow {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 74%;
  height: 15px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(58, 38, 34, .30), rgba(58, 38, 34, 0) 72%);
}

[data-theme="dark"] .fufu-shadow {
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 72%);
}

.fufu-body {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  transform-origin: 50% 100%;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.fufu.is-live .fufu-body { cursor: grabbing; }

.fufu-body:focus-visible {
  outline: 2px solid var(--accent, #D97757);
  outline-offset: 3px;
  border-radius: 14px;
}

.fufu-body img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

.fufu-body img.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .fufu-body, .fufu-shadow { will-change: auto; }
}
