* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg-start: #07101f;
  --bg-end: #0e1a33;
  --text-main: #eef4ff;
  --text-soft: #9eb1d8;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.08);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(62, 96, 255, 0.22), transparent 26%),
    radial-gradient(circle at bottom right, rgba(89, 217, 255, 0.14), transparent 25%),
    linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text-main);
}


.app-stage {
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 40px;
  overflow-x: auto;
  overflow-y: hidden;
}

.phone-grid {
  width: max-content;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}
.phone-frame {
  position: relative;
  height: 760px;
  padding: 14px;
  border-radius: 42px;
  background: linear-gradient(180deg, #131722 0%, #05070c 100%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 136px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: #020306;
  z-index: 3;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 32px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 54px 18px 22px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

.avatar-app .phone-screen {
  background:
    radial-gradient(circle at top, rgba(95, 236, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #0d2732 0%, #09161e 100%);
}

/* 用户视频面板（数字人右侧）：绿色系区分 */
.uservideo-app .phone-screen {
  background:
    radial-gradient(circle at top, rgba(110, 236, 183, 0.16), transparent 30%),
    linear-gradient(180deg, #0c2b25 0%, #081511 100%);
}

.incoming-call-screen {
  background:
    radial-gradient(circle at top, rgba(82, 233, 255, 0.22), transparent 28%),
    radial-gradient(circle at center, rgba(92, 112, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #0b2731 0%, #08131d 100%) !important;
}

.user-app .phone-screen {
  background:
    radial-gradient(circle at top, rgba(44, 202, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #0d1f3f 0%, #09142a 100%);
}

.agent-app .phone-screen {
  background:
    radial-gradient(circle at top, rgba(102, 112, 255, 0.22), transparent 30%),
    linear-gradient(180deg, #161439 0%, #0c1025 100%);
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(244, 248, 255, 0.9);
}

.status-icons {
  display: inline-flex;
  gap: 10px;
}


.media-player {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.video-player {
  min-height: 228px;
  object-fit: cover;
}

.media-placeholder {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(96, 214, 255, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.incoming-call-wrap {
  position: relative;
  min-height: calc(100% - 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 10px 8px;
  z-index: 2;
}

.connecting-call-screen .incoming-call-wrap {
  justify-content: flex-end;
  padding-bottom: 20px;
}

.incoming-video-preview {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(98, 220, 255, 0.26), transparent 24%),
    radial-gradient(circle at 48% 28%, rgba(90, 110, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(2, 16, 24, 0.1) 0%, rgba(4, 10, 16, 0.28) 44%, rgba(4, 9, 14, 0.92) 100%);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.incoming-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 18, 28, 0.12) 0%, rgba(8, 18, 28, 0.6) 62%, rgba(8, 18, 28, 0.94) 100%);
  backdrop-filter: blur(16px) saturate(1.1);
}

/* 配置了真实封面图（videoStream poster/src 或兜底 venus.png）时：取消背景
   模糊并减轻遮罩浓度，让背景图像清晰可辨（仅保留底部压暗保证按钮可读） */
.incoming-video-preview.has-cover .incoming-video-overlay {
  backdrop-filter: none;
  background:
    linear-gradient(180deg, rgba(8, 18, 28, 0) 0%, rgba(8, 18, 28, 0.18) 55%, rgba(8, 18, 28, 0.62) 100%);
}

.incoming-video-preview.has-cover .incoming-video-glow {
  opacity: 0.28;
}

.incoming-video-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.75;
}

.incoming-video-glow.glow-a {
  width: 220px;
  height: 220px;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(84, 228, 255, 0.3);
}

.incoming-video-glow.glow-b {
  width: 320px;
  height: 320px;
  bottom: 140px;
  right: -40px;
  background: rgba(86, 102, 255, 0.16);
}

.incoming-call-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7ecff;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.self-preview-card {
  position: absolute;
  top: 68px;
  right: 16px;
  z-index: 3;
  width: 88px;
  height: 124px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
}

.self-preview-camera {
  width: 100%;
  height: 88px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 40% 30%, rgba(103, 221, 255, 0.32), transparent 35%),
    linear-gradient(180deg, rgba(71, 98, 255, 0.45), rgba(19, 31, 50, 0.72));
}

.self-preview-label {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: #e5efff;
}

.incoming-avatar-ring {
  position: relative;
  z-index: 2;
  width: 156px;
  height: 156px;
  margin-top: 28px;
  padding: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(87, 226, 255, 0.36), rgba(98, 109, 255, 0.2));
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.03),
    0 18px 48px rgba(0, 0, 0, 0.24);
}

.connecting-ring {
  margin-top: 34px;
}

.incoming-avatar-ripple {
  position: absolute;
  top: 118px;
  left: 50%;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(123, 226, 255, 0.18);
  background: rgba(123, 226, 255, 0.06);
  animation: call-ripple 2.6s ease-out infinite;
}

.incoming-avatar-ripple.ripple-2 {
  animation-delay: 1.1s;
}

.incoming-avatar-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(92, 113, 255, 0.95), rgba(71, 219, 255, 0.82));
}

.incoming-call-name {
  margin-top: 24px;
  font-size: 26px;
  font-weight: 700;
}

.incoming-call-status {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #9cd9ff;
}

.incoming-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63f3b1;
  box-shadow: 0 0 12px rgba(99, 243, 177, 0.75);
  animation: call-pulse 1.4s ease-in-out infinite;
}

.incoming-call-desc {
  margin-top: 16px;
  max-width: 240px;
  font-size: 14px;
  line-height: 1.7;
  color: #d8e8ff;
}

.incoming-preview-card {
  width: 100%;
  margin-top: 28px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.incoming-preview-title {
  font-size: 16px;
  font-weight: 700;
}


.incoming-preview-subtitle {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.incoming-preview-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #cfe0ff;
  line-height: 1.6;
}

.incoming-call-actions {
  width: 100%;
  margin-top: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
}

.connecting-actions {
  width: 100%;
  margin-top: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.call-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
}

.call-action-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.call-action-label {
  font-size: 13px;
  font-weight: 700;
  color: #eef5ff;
}

.call-action.decline .call-action-icon {
  background: linear-gradient(135deg, rgba(255, 103, 103, 0.98), rgba(255, 138, 138, 0.82));
}

.call-action.accept .call-action-icon {
  background: linear-gradient(135deg, rgba(63, 213, 145, 0.98), rgba(105, 233, 178, 0.84));
}

.call-action.accept .call-action-icon {
  transform: rotate(-8deg);
}

.call-action.neutral .call-action-icon {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes call-ripple {
  0% {
    transform: translateX(-50%) scale(0.92);
    opacity: 0.7;
  }

  70% {
    transform: translateX(-50%) scale(1.38);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) scale(1.38);
    opacity: 0;
  }
}

@keyframes call-pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.78;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.media-placeholder-title {
  font-size: 16px;
  font-weight: 700;
}

.media-placeholder-desc {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.wave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  height: 40px;
}

.wave-bars span {
  width: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(96, 214, 255, 0.95), rgba(75, 120, 255, 0.78));
}

.wave-bars span:nth-child(1) {
  height: 18px;
}

.wave-bars span:nth-child(2) {
  height: 32px;
}

.wave-bars span:nth-child(3) {
  height: 24px;
}

.wave-bars span:nth-child(4) {
  height: 36px;
}

.wave-bars span:nth-child(5) {
  height: 20px;
}

.card-label {
  font-size: 12px;
  color: var(--text-soft);
}

.card-value {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
}

.card-desc {
  margin-top: 8px;
  color: #bfd0ef;
  font-size: 12px;
  line-height: 1.6;
}

.flow-tile {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
}

.flow-line {
  position: absolute;
  left: 30px;
  top: 48px;
  bottom: -16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.flow-tile:last-child .flow-line {
  display: none;
}

.flow-index {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.flow-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.flow-title {
  font-size: 14px;
  font-weight: 700;
}

.flow-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e2ff;
}

.flow-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #edf4ff;
}

.flow-detail {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
}

.status-completed .flow-index,
.status-completed .flow-badge {
  background: rgba(66, 211, 146, 0.18);
  color: #caffea;
}

.status-active .flow-index,
.status-active .flow-badge {
  background: rgba(104, 111, 255, 0.24);
  color: #e4e8ff;
}

.status-pending .flow-index,
.status-pending .flow-badge {
  background: rgba(255, 200, 87, 0.16);
  color: #ffe6a3;
}

.message-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 92%;
}

.message-row.role-admin {
  margin-left: auto;
  align-items: flex-end;
}

.message-meta {
  display: inline-flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-soft);
}

.message-bubble {
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
}

.role-admin .message-bubble {
  background: linear-gradient(135deg, rgba(89, 113, 255, 0.95), rgba(51, 207, 255, 0.76));
  color: white;
  border-bottom-right-radius: 8px;
}

.role-agent .message-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #edf4ff;
  border-bottom-left-radius: 8px;
}

.role-system .message-bubble {
  background: rgba(255, 200, 87, 0.14);
  color: #ffe6a5;
  border-bottom-left-radius: 8px;
}

.role-user .message-bubble {
  background: rgba(66, 211, 146, 0.16);
  color: #d9fff0;
  border-bottom-left-radius: 8px;
}

.profile-chip-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.profile-chip {
  padding: 14px;
  border-radius: 18px;
}

.profile-chip-key {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
}

.profile-chip-value {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: #f1f6ff;
}

/* ── 数字人实时数据流 ─────────────────────────────────────────── */
.dh-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dh-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dh-badge.live,
.dh-badge.ok {
  color: #8ff0c2;
  background: rgba(63, 213, 145, 0.14);
  border-color: rgba(63, 213, 145, 0.4);
}

.dh-badge.error {
  color: #ffb3b3;
  background: rgba(255, 103, 103, 0.14);
  border-color: rgba(255, 103, 103, 0.4);
}

.dh-badge.muted {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.06);
}

.dh-error-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 103, 103, 0.12);
  border: 1px solid rgba(255, 103, 103, 0.35);
  color: #ffd9d9;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  word-break: break-word;
}

/* 错误横幅内的复位按钮（短视频模式接听建立期出错时出现）：挂断当前连接，
   dh-client 复位 active 后等待页的接听入口恢复可用 */
.dh-error-retry {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 103, 103, 0.22);
  color: #ffe4e4;
  font-size: 13px;
  cursor: pointer;
}

.dh-media-card {
  position: relative;
}

.dh-live-video {
  background: #02070d;
  object-fit: contain;
}

/* 嵌入视频：桌面嵌入模式为右下角画中画；手机模式改作数字人下方整幅（见 mode-mobile 覆盖） */
.dh-embed-view {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 38%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  background: #05070c;
  z-index: 4;
}

/* 用户画面未就绪提示：画中画缺失时说明原因（与画中画互斥，占左下角） */
.dh-self-view-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: 60%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(6, 12, 20, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e7f0f7;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  z-index: 4;
  backdrop-filter: blur(6px);
}

/* 通话中：整个手机屏幕即数字人视频流 */
.dh-call-fullscreen {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #02070d;
  overflow: hidden;
}

.dh-call-fullscreen .media-player,
.dh-call-fullscreen .media-placeholder {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  border-radius: 0;
}

.dh-call-fullscreen .video-player {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.dh-call-fullscreen .dh-live-tag {
  top: 18px;
  left: 18px;
  z-index: 5;
}

.dh-call-fullscreen .dh-error-banner,
.dh-call-fullscreen .dh-notice-banner {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 52px;
  margin-top: 0;
  z-index: 5;
  background: rgba(8, 15, 28, 0.86);
}

.dh-call-fullscreen .dh-notice-banner {
  top: auto;
  bottom: 84px;
}

.dh-hangup-fab {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 61, 61, 0.92);
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.dh-notice-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 196, 84, 0.1);
  border: 1px solid rgba(255, 196, 84, 0.32);
  color: #ffe7bf;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  word-break: break-word;
}

.dh-live-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 61, 61, 0.88);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dh-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: dh-live-blink 1.2s ease-in-out infinite;
}

/* LIVE 标签内拼接的在线人数（短视频界面左上角） */
.dh-live-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.92;
  padding-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

/* 用户视频面板角标（绿色，区别于数字人的红色 LIVE） */
.uv-tag {
  background: rgba(46, 204, 113, 0.9);
}

@keyframes dh-live-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

.dh-audio-live {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at center, rgba(96, 214, 255, 0.12), transparent 45%),
    rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(63, 213, 145, 0.4);
}

.wave-bars.live span {
  animation: dh-wave 1s ease-in-out infinite;
}

.wave-bars.live span:nth-child(2) {
  animation-delay: 0.12s;
}

.wave-bars.live span:nth-child(3) {
  animation-delay: 0.24s;
}

.wave-bars.live span:nth-child(4) {
  animation-delay: 0.36s;
}

.wave-bars.live span:nth-child(5) {
  animation-delay: 0.48s;
}

@keyframes dh-wave {
  0%,
  100% {
    transform: scaleY(0.5);
  }

  50% {
    transform: scaleY(1.25);
  }
}

.dh-chat-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.dh-chat-input input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.dh-chat-input input:focus {
  border-color: rgba(96, 214, 255, 0.55);
}

.dh-chat-input input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dh-chat-send {
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(94, 113, 255, 0.96), rgba(56, 213, 255, 0.82));
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dh-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dh-call-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding-bottom: 6px;
}

.dh-call-actions .call-action .call-action-icon {
  width: 58px;
  height: 58px;
  font-size: 24px;
}

@media (max-width: 900px) {
  .phone-frame {
    height: 720px;
  }
}

/* ── 手机模式（/venus）──────────────────────────────────────────────────────
   仅保留数字人视频通话：铺满手机视口（含安全区适配） */
body.mode-mobile .app-stage {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  align-items: stretch;
  overflow: hidden;
}

body.mode-mobile .phone-grid {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: 1fr;
  gap: 0;
}

body.mode-mobile .phone-frame {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: #02070d;
}

body.mode-mobile .phone-frame::after {
  display: none;
}

body.mode-mobile .phone-notch {
  display: none;
}

body.mode-mobile .phone-screen {
  border-radius: 0;
  padding: 0;
  overflow-y: auto;
}

/* 真机自带系统状态栏，隐藏模拟状态栏，改用安全区留白 */
body.mode-mobile .phone-statusbar {
  display: none;
}

body.mode-mobile .incoming-call-wrap {
  min-height: 100%;
  padding:
    max(28px, env(safe-area-inset-top))
    16px
    max(28px, env(safe-area-inset-bottom));
}

body.mode-mobile .incoming-call-screen .self-preview-card {
  top: max(20px, env(safe-area-inset-top));
}

/* 来电装饰动画锚定在桌面布局的固定坐标，小屏会错位，直接隐藏 */
body.mode-mobile .incoming-avatar-ripple {
  display: none;
}

/* 小屏收紧来电界面间距，避免内容溢出 */
body.mode-mobile .incoming-avatar-ring {
  width: 124px;
  height: 124px;
  margin-top: 20px;
}

body.mode-mobile .incoming-avatar-core {
  font-size: 34px;
}

body.mode-mobile .incoming-call-name {
  margin-top: 16px;
  font-size: 22px;
}

body.mode-mobile .incoming-call-desc {
  margin-top: 12px;
}

body.mode-mobile .incoming-preview-card {
  margin-top: 18px;
  padding: 14px;
}

body.mode-mobile .incoming-call-actions,
body.mode-mobile .connecting-actions {
  margin-top: 22px;
}

/* 挂断按钮避开底部安全区（Home 指示条） */
body.mode-mobile .dh-hangup-fab {
  bottom: calc(26px + env(safe-area-inset-bottom));
}

/* 手机模式通话布局：数字人整屏铺满（短视频 feed 视图的舞台与信息层见 feed.css） */
body.mode-mobile .dh-call-fullscreen {
  height: 100%;
  position: relative;
}

/* 用户画面未就绪提示避开底部安全区（Home 指示条） */
body.mode-mobile .dh-self-view-hint {
  bottom: calc(16px + env(safe-area-inset-bottom));
}

/* 通话中的错误/提示横幅避开顶部与底部安全区 */
body.mode-mobile .dh-call-fullscreen .dh-error-banner {
  top: calc(52px + env(safe-area-inset-top));
}

body.mode-mobile .dh-call-fullscreen .dh-notice-banner {
  bottom: calc(84px + env(safe-area-inset-bottom));
}


/* ── 内测门禁（beta-gate.js 全屏遮罩）───────────────────────────────────── */
/* 邮箱领码 → 排队 → 输入/展示内测码；验证通过后淡出，遮罩期间阻断应用交互 */
.beta-gate-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity 0.35s ease;
}

.beta-gate-root.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.beta-gate-card {
  width: min(92vw, 400px);
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px 26px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 30, 58, 0.96), rgba(12, 19, 40, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.beta-gate-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.beta-gate-subtitle {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 18px;
  word-break: break-all;
}

.beta-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}

.beta-gate-input {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.beta-gate-input:focus {
  border-color: rgba(94, 113, 255, 0.9);
}

.beta-gate-input::placeholder {
  color: rgba(158, 177, 216, 0.6);
}

.beta-gate-button {
  height: 46px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(94, 113, 255, 0.96), rgba(56, 213, 255, 0.82));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.beta-gate-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.beta-gate-message {
  min-height: 20px;
  margin: 6px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
}

.beta-gate-message.is-error {
  color: #ff9d9d;
}

/* 排队：第 N 位 */
.beta-gate-queue-position {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 6px;
}

.beta-gate-queue-num {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #7f95ff, #4bd8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.beta-gate-queue-label {
  font-size: 16px;
  color: var(--text-soft);
}

.beta-gate-queued-email {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 4px;
  word-break: break-all;
}

.beta-gate-waiting {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 8px 0 10px;
  animation: beta-gate-breathe 2.2s ease-in-out infinite;
}

@keyframes beta-gate-breathe {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.beta-gate-footnote {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(158, 177, 216, 0.65);
}
