/* 小觉数字人 Demo · 手机端适配 + 访客界面净化 */

html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* 隐藏调试入口：设置 / 摄像头（访客不需要） */
#settingsBtn, #cameraBtn, #cameraContainer {
  display: none !important;
}

/* 顶部连接状态弱化 */
.connection-status-top {
  opacity: 0.55;
  font-size: 12px;
}

/* 手机竖屏布局 */
@media (max-width: 768px) {
  .chat-container {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .chat-stream {
    max-height: 32vh !important;
    font-size: 15px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .chat-stream .message-bubble {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .chat-ipt {
    width: 100% !important;
    box-sizing: border-box;
  }
  .chat-ipt input {
    font-size: 16px !important; /* 防 iOS 聚焦自动放大 */
    min-height: 44px;
  }
  .control-bar {
    position: fixed;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 0;
    width: 100vw;
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 9999;
  }
  .control-btn {
    min-width: 64px;
    min-height: 52px;
    font-size: 15px;
  }
  #recordBtn {
    min-width: 160px;
    min-height: 56px;
  }
  #live2d-stage {
    width: 100vw !important;
  }
}

/* 所有按钮可点区域 ≥44px */
.control-btn, button {
  min-height: 44px;
}

/* Live2D 画布全屏但不挡按钮（演示不需要拖拽模型） */
#live2d-stage {
  pointer-events: none !important;
}
.chat-container {
  position: relative;
  z-index: 999;
}
@media (min-width: 769px) {
  .control-bar { position: relative; z-index: 999; }
}

/* 报告卡片 */
.xj-report-card {
  margin: 10px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  color: #292524;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.xj-report-card .xj-report-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}
.xj-report-card .xj-report-countdown {
  color: #78716c;
  font-size: 13px;
}
.xj-report-card .xj-report-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 28px;
  min-height: 44px;
  border-radius: 999px;
  background: #b45309;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

/* 首屏开始对话 overlay（iOS 音频手势要求） */
#xjStartOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(20, 16, 14, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#xjStartOverlay .xj-start-box {
  text-align: center;
  color: #fff;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  max-width: 82vw;
}
#xjStartOverlay .xj-start-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
#xjStartOverlay .xj-start-desc {
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.9;
  margin-bottom: 20px;
}
#xjStartOverlay .xj-start-btn {
  min-height: 52px;
  min-width: 200px;
  padding: 12px 36px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: #b45309;
  border: none;
  border-radius: 999px;
}
#xjStartOverlay .xj-start-tip {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.65;
}

/* 提前结束·看案例报告 浮动按钮（右上角，连接状态徽章下方） */
.xj-sample-btn {
  position: fixed;
  top: 64px;
  right: 12px;
  z-index: 9999;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: rgba(180, 83, 9, 0.92);
  border: none;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  min-height: 36px;
}
.xj-sample-btn:active {
  transform: scale(0.96);
}
@media (min-width: 769px) {
  .xj-sample-btn { top: 72px; right: 20px; }
}
