/* 请柬左下：祝福气泡 + 特效按钮 */
.invite-live {
  position: fixed;
  left: max(0.7rem, env(safe-area-inset-left));
  bottom: max(0.7rem, env(safe-area-inset-bottom));
  z-index: 55;
  width: min(calc(100vw - 4.8rem), 19.5rem);
  display: grid;
  gap: 0.35rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
}

body.is-opened .invite-live {
  opacity: 1;
  visibility: visible;
}

body.is-doors-opening .invite-live {
  opacity: 0;
  visibility: hidden;
}

.live-ticker {
  --live-row: 1.72rem;
  --live-count: 3;
  height: calc(var(--live-row) * var(--live-count));
  overflow: hidden;
  pointer-events: auto;
}

.live-bubbles {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  transform: translateY(0);
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.live-bubbles.is-rolling {
  transform: translateY(calc(-1 * var(--live-row)));
}

.live-bubbles > li {
  box-sizing: border-box;
  flex: 0 0 var(--live-row);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.1rem 0;
}

.live-bubble {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 1.52rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 214, 168, 0.2);
  background: rgba(42, 34, 22, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f6f0e4;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.live-bubble.is-now {
  background: rgba(42, 34, 22, 0.4);
  border-color: rgba(212, 181, 106, 0.38);
}

.live-copy {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  gap: 0.22rem;
}

.live-name {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e8d6a8;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(20, 16, 10, 0.4);
}

.live-name::after {
  content: "：";
  font-weight: 400;
}

.live-text {
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.2;
  color: #f6f0e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(20, 16, 10, 0.4);
}

.live-fx {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  pointer-events: auto;
}

.live-fx-btn {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  height: 1.85rem;
  padding: 0 0.35rem 0 0.22rem;
  border: 1px solid rgba(212, 181, 106, 0.28);
  border-radius: 999px;
  background: rgba(42, 34, 22, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f6f0e4;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
}

.live-fx-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.live-fx-btn:active {
  transform: scale(0.96);
}

.live-fx-stage {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  overflow: hidden;
}

.live-fx-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.live-fx-shot svg,
.live-fx-shot canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (min-width: 768px) {
  .invite-live {
    width: 20.5rem;
  }
}
