/* 右下角悬浮小咸：躺平 → 悬停惊醒 → 点击弹窗播放 /promo/；点 × 本次登录期间不再出现（inc/template-xiaoxian.php） */
.xy-xx { position: fixed; right: 16px; bottom: 16px; z-index: 1035; display: flex; flex-direction: column;
  align-items: flex-end; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; }
.xy-xx[hidden], .xy-xx-modal[hidden] { display: none !important; }

.xy-xx-bubble { position: relative; margin: 0 6px 6px 0; padding: 8px 32px 8px 13px; background: #fff; color: #202020;
  border: 1.5px solid #202020; border-radius: 15px; font-size: 13px; line-height: 1.3; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); cursor: pointer; transform-origin: 80% 100%;
  transition: opacity .25s, transform .25s; }
.xy-xx-bubble::after { content: ""; position: absolute; right: 44px; bottom: -7px; width: 11px; height: 11px;
  background: #fff; border-right: 1.5px solid #202020; border-bottom: 1.5px solid #202020; transform: rotate(45deg); }
.xy-xx-bubble b { color: #ff9317; font-weight: 700; margin-right: 4px; }
.xy-xx:not(.is-bubble) .xy-xx-bubble { opacity: 0; transform: scale(.85) translateY(6px); pointer-events: none; }
.xy-xx-close { position: absolute; right: 6px; top: 50%; width: 20px; height: 20px; margin-top: -10px; padding: 0;
  border: 0; border-radius: 50%; background: #f0f0f0; color: #777; font-size: 14px; line-height: 20px; cursor: pointer; }
.xy-xx-close:hover { background: #202020; color: #fff; }

.xy-xx-body { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.xy-xx-body img { display: block; filter: drop-shadow(0 6px 10px rgba(60,40,20,.18)); }
.xy-xx-lie { width: 160px; animation: xyXxBreath 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.xy-xx-wake { height: 140px; display: none !important; }
.xy-xx.is-awake .xy-xx-lie { display: none; }
.xy-xx.is-awake .xy-xx-wake { display: block !important; animation: xyXxPop .35s cubic-bezier(.3,1.6,.5,1); }
.xy-xx-zz { position: absolute; left: 22px; top: -4px; color: #9a948b; font: 700 14px/1 system-ui, sans-serif;
  animation: xyXxZz 2.6s ease-in-out infinite; pointer-events: none; }
.xy-xx.is-awake .xy-xx-zz { display: none; }

@keyframes xyXxBreath { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.025); } }
@keyframes xyXxPop { 0% { transform: translateY(14px) scale(.9); } 100% { transform: none; } }
@keyframes xyXxZz { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; }
  100% { opacity: 0; transform: translate(12px, -18px); } }

/* 播放窗 */
.xy-xx-modal { position: fixed; inset: 0; z-index: 1060; display: grid; place-items: center; padding: 16px;
  background: rgba(20,20,20,.68); animation: xyXxFade .2s; }
.xy-xx-frame { position: relative; height: min(92vh, 900px); aspect-ratio: 9 / 16; max-width: calc(100vw - 32px); }
.xy-xx-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 14px; background: #1c1b1a; }
.xy-xx-x { position: absolute; top: -12px; right: -12px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: #202020; font-size: 22px; line-height: 36px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
@keyframes xyXxFade { from { opacity: 0; } }

/* 手机 / 平板：主题底部有 60px 菜单栏 */
@media (max-width: 1024px) {
  .xy-xx { right: 8px; bottom: 70px; }
  .xy-xx-lie { width: 116px; }
  .xy-xx-wake { height: 104px; }
  .xy-xx-bubble { font-size: 12px; padding: 7px 30px 7px 11px; }
  .xy-xx-modal { padding: 0; }
  .xy-xx-frame { height: 100%; max-height: 100dvh; max-width: 100vw; }
  .xy-xx-frame iframe { border-radius: 0; }
  .xy-xx-x { top: 10px; right: 10px; }
}

/* 暗色模式：气泡跟着变 */
.dark-open .xy-xx-bubble, .dark-open .xy-xx-bubble::after { background: #262c3a; color: #e8eaed; border-color: #ff9317; }
.dark-open .xy-xx-close { background: #343b4d; color: #b8bec9; }
