/* 原右下角解说条：由 #live2dPlayPauseBtn 替代，保留 DOM 供 index.js 绑定与程序 click */
#audioPlayer.audio-player--moved-to-guide {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 仅人物画布 + 控制键：无切换条，单一固定模型 */
#live2d-guide-root {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 380px;
  height: 500px;
  z-index: 900;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
  /* 避免与全景合成时产生合成闪烁 */
  isolation: isolate;
}

/* 男/女模型切换时渐入渐出（由 commentary-live2d-bridge 切换 is-model-switching） */
#live2d-guide-root:not(.is-hidden) {
  opacity: 1;
  transition: opacity 0.28s ease;
}
#live2d-guide-root.is-model-switching:not(.is-hidden) {
  opacity: 0;
  pointer-events: none;
}

.live2d-canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  pointer-events: auto;
}

#live2d-guide-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent !important;
  /* 父级 pointer-events:none 时仍允许在角色区域接收点击（与 SDK 命中测试一致） */
  pointer-events: auto;
  touch-action: none;
}

@media (max-width: 500px), (max-height: 500px) {
  #live2d-guide-root {
    width: 200px;
    height: 270px;
    right: 0;
    bottom: 0;
  }
  .live2d-canvas-wrap {
    min-height: 200px;
  }
}

#live2d-guide-root.is-hidden {
  visibility: hidden;
  opacity: 0;
  /* 无过渡，避免显示/隐藏时闪动 */
  transition: none;
}

/* 人物尚未就绪：轻量占位 */
#live2d-guide-root.is-loading {
  min-height: 120px;
  border-radius: 8px;
  background: linear-gradient(125deg, rgba(42, 52, 70, 0.22), rgba(12, 18, 32, 0.12));
}

/* 控制区在人物左侧空白处：暂停键 + 镜头轮切键（竖排） */
.live2d-control-dock {
  position: absolute;
  top: auto;
  left: 10px;
  right: auto;
  bottom: 42%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.22s ease, transform 0.22s ease, left 0.28s ease, bottom 0.28s ease;
}

#live2d-guide-root[data-shot="chest"] .live2d-control-dock {
  left: 8px;
  bottom: 46%;
}

#live2d-guide-root[data-shot="bust"] .live2d-control-dock {
  left: 10px;
  bottom: 40%;
}

#live2d-guide-root[data-shot="full"] .live2d-control-dock {
  left: 36%;
  bottom: 48%;
}

@media (max-width: 500px), (max-height: 500px) {
  .live2d-control-dock {
    left: 6px;
    bottom: 38%;
  }
  #live2d-guide-root[data-shot="full"] .live2d-control-dock {
    left: 28%;
    bottom: 42%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .live2d-canvas-wrap:hover .live2d-control-dock {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .live2d-control-dock {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.live2d-shot-cycle {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.live2d-shot-cycle:hover {
  background: rgba(0, 0, 0, 0.68);
}

.live2d-shot-cycle-icon {
  display: block;
}

.live2d-outfit-cycle {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  transition: background 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.live2d-outfit-cycle:hover:not(:disabled):not(.is-disabled) {
  background: rgba(0, 0, 0, 0.68);
}

.live2d-outfit-cycle.is-disabled,
.live2d-outfit-cycle:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.live2d-outfit-cycle-icon {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  #live2d-guide-root:not(.is-hidden) {
    transition-duration: 0.1s;
  }
  .live2d-control-dock {
    transition: opacity 0.12s ease;
  }
}

.live2d-play-pause {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.live2d-play-pause:hover:not(:disabled):not(.is-disabled) {
  background: rgba(0, 0, 0, 0.68);
}

.live2d-play-pause.is-disabled,
.live2d-play-pause:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.live2d-play-pause .pause-icon {
  display: none;
}
.live2d-play-pause.playing .play-icon {
  display: none;
}
.live2d-play-pause.playing .pause-icon {
  display: inline;
}
