#live2d-typecho,
#live2d-widget {
  pointer-events: none;
}

#live2d-widget canvas {
  pointer-events: auto;
}

#live2d-typecho {
  position: fixed;
  z-index: 100000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.live2d-typecho-dialog {
  position: absolute;
  left: 4px;
  top: -34px;
  max-width: 180px;
  padding: 7px 10px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
}

.live2d-typecho-dialog.is-visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.live2d-typecho-controls {
  position: absolute;
  left: 8px;
  top: 34%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

#live2d-typecho.is-hovered .live2d-typecho-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#live2d-typecho.live2d-typecho-right .live2d-typecho-controls {
  left: 8px;
  right: auto;
}

.live2d-typecho-button,
.live2d-typecho-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.live2d-typecho-button:hover,
.live2d-typecho-launcher:hover {
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.live2d-typecho-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.live2d-typecho-launcher {
  position: fixed;
  left: 0;
  bottom: 104px;
  display: none;
  width: 32px;
  height: 70px;
  color: #475569;
  font-size: 10px;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: rgba(255, 255, 255, 0.94);
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

#live2d-typecho.live2d-typecho-right .live2d-typecho-launcher {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 14px 0 0 14px;
}

#live2d-typecho.is-closed {
  width: 0 !important;
  height: 0 !important;
}

#live2d-typecho.is-closed .live2d-typecho-dialog,
#live2d-typecho.is-closed .live2d-typecho-controls {
  display: none;
}

#live2d-typecho.is-closed .live2d-typecho-launcher {
  display: inline-flex;
}

@media (max-width: 768px) {
  .live2d-typecho-dialog {
    top: -34px;
    max-width: 150px;
    padding: 6px 9px;
  }

  .live2d-typecho-controls {
    right: 6px;
    gap: 6px;
  }

  .live2d-typecho-button {
    width: 28px;
    height: 28px;
  }
}
