* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif; }
body {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE7D2 50%, #FFD8E2 100%);
  overflow: hidden;
  color: #3a2e2a;
}

.app {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
  gap: 16px;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.7s 0.5s ease;
}
.app.ready { opacity: 1; }

/* ---------- 欢迎仪式 overlay ---------- */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 30% 20%, #FFF8E7 0%, #FFE7D2 40%, #FFD8E2 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity 1s 0.5s ease, visibility 1s 0.5s;
  overflow: hidden;
}
.welcome-overlay.done { opacity: 0; visibility: hidden; pointer-events: none; }

.welcome-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,180,130,0.35) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,210,180,0.4) 0%, transparent 50%);
  animation: bgDrift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bgDrift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(20px, -20px) scale(1.05); }
}

.welcome-content {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px;
  transition: opacity 0.6s ease;
}
.welcome-content.dim .orb-stage-big,
.welcome-content.dim .zzz-wrap,
.welcome-content.dim .vol-meter { opacity: 0.05; pointer-events: none; transition: opacity 0.6s; }
.welcome-content.dim .welcome-text,
.welcome-content.dim .welcome-progress { position: relative; z-index: 7; }
.welcome-content.dim .welcome-text h1 { color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.welcome-content.dim .welcome-text p { color: #ffe0c0; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.orb-stage-big {
  width: 480px; height: 480px;
  display: flex; align-items: center; justify-content: center;
}
.orb-stage-big svg {
  width: 100%; height: 100%;
  cursor: pointer;
}

.welcome-text { text-align: center; min-height: 90px; }
.welcome-text h1 {
  font-size: 44px;
  color: #c2674a;
  text-shadow: 0 2px 0 rgba(255,255,255,0.6);
  animation: fadeUp 0.5s ease;
}
.welcome-text p {
  font-size: 20px;
  color: #8a5a3a;
  margin-top: 8px;
  animation: fadeUp 0.5s 0.1s backwards ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.welcome-progress { display: flex; gap: 8px; }
.welcome-progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(194, 103, 74, 0.25);
  transition: background 0.3s, transform 0.3s;
}
.welcome-progress .dot.active { background: #FF8A65; transform: scale(1.3); }
.welcome-progress .dot.done { background: rgba(194,103,74,0.6); }

.tap-hint {
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  font-size: 18px; color: #c2674a; font-weight: 600;
  animation: tapBob 1s ease-in-out infinite;
  pointer-events: none;
}
.tap-hint[hidden] { display: none; }
@keyframes tapBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

.skip-btn {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,0.6);
  border: none; padding: 8px 16px; border-radius: 999px;
  color: #8a5a3a; font-size: 13px; font-weight: 600;
  cursor: pointer; z-index: 10;
}
.skip-btn:hover { background: white; }

/* zzz 漂浮 */
.zzz-wrap {
  position: absolute;
  top: 80px; right: 50%; margin-right: -240px;
  display: flex; gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.zzz-wrap.show { opacity: 1; }
.zz {
  font-size: 28px; color: #b07050; font-weight: 700;
  animation: zzFloat 2.4s ease-in-out infinite;
  animation-delay: var(--d);
  opacity: 0;
}
@keyframes zzFloat {
  0% { opacity: 0; transform: translate(0, 10px) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(20px, -40px) scale(1.3) rotate(15deg); }
}

/* 音量条 */
.vol-meter {
  width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: 10px;
  animation: fadeUp 0.5s ease;
}
.vol-bar {
  position: relative;
  width: 100%; height: 28px;
  background: rgba(255,255,255,0.6);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
}
.vol-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #6FCF97, #FFD166 50%, #FF8A65 80%, #FF5252);
  transition: width 0.08s linear;
  border-radius: 999px;
}
.vol-threshold {
  position: absolute; top: -4px; bottom: -4px; left: 70%;
  width: 3px; background: #c2674a; border-radius: 2px;
}
.vol-threshold::after {
  content: '叫醒它！'; position: absolute;
  top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: #c2674a; white-space: nowrap; font-weight: 700;
}
.vol-hint { font-size: 16px; color: #8a5a3a; font-weight: 600; }

/* 暗角 (vignette) */
.vignette {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.vignette:not([hidden]) { opacity: 1; }
.vignette-mask {
  position: absolute;
  top: 50%; left: 50%;
  width: 360px; height: 360px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px rgba(20, 10, 5, 0.88);
  transition: width 0.8s, height 0.8s;
}
.vignette.opening .vignette-mask { animation: eyeOpen 0.8s ease; }
@keyframes eyeOpen {
  from { width: 0; height: 0; }
  to { width: 360px; height: 360px; }
}

/* 摄像头圆圈 */
.cam-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: 340px; height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: #000;
  overflow: hidden;
  z-index: 6;
  cursor: pointer;
  box-shadow: 0 0 80px rgba(255, 200, 150, 0.5), inset 0 0 0 4px rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  animation: camIn 0.6s ease;
}
@keyframes camIn { from { transform: scale(0.4); opacity: 0; } }
.cam-circle video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); /* 镜像 */
}
.cam-overlay { position: absolute; inset: 0; pointer-events: none; }
.cam-prompt {
  position: absolute;
  text-align: center;
  color: white;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  padding: 12px;
}
.cam-prompt[hidden] { display: none; }
.countdown {
  position: absolute;
  font-size: 120px;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: cdPulse 1s ease-in-out infinite;
}
.countdown[hidden] { display: none; }
@keyframes cdPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.flash {
  position: absolute; inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
}
.flash.fire { animation: flashGo 0.5s ease; }
@keyframes flashGo {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 0; }
}

/* 拍完照的高光时刻：放大照片 */
.reveal-shot {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  z-index: 8;
  animation: revealIn 0.5s ease;
}
@keyframes revealIn { from { opacity: 0; transform: scale(0.85); } }
.reveal-shot img {
  width: 78%; height: 78%; object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 4px white, 0 8px 30px rgba(0,0,0,0.35);
  transform: scaleX(-1);
}
.reveal-shot .reveal-cap {
  position: absolute; bottom: 16px;
  color: white; font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 999px;
}

/* 拉钩双手提示 */
.hand-prompt {
  position: absolute;
  left: 50%; bottom: calc(50% - 280px);
  transform: translateX(-50%);
  z-index: 9;
  pointer-events: none;
  animation: fadeUp 0.6s ease;
}
.hand-pair {
  display: flex; align-items: center; gap: 18px;
  background: rgba(255,255,255,0.92);
  padding: 14px 22px; border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.hand-side {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
}
.hand-side small { font-size: 11px; color: #8a4a2a; font-weight: 600; }
.hand-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: #FFE7D2; overflow: hidden;
}
.hand-avatar.mai-avatar {
  background: radial-gradient(circle at 30% 30%, #FFE3B0, #FFB57A 60%, #E07A4A);
  color: transparent;
}
.hand-avatar img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.hand-emoji {
  font-size: 36px;
  animation: handBob 1.6s ease-in-out infinite;
  margin-top: -4px;
}
.hand-emoji.flip { transform: scaleX(-1); animation-delay: 0.3s; }
@keyframes handBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hand-emoji.flip {
  animation: handBobFlip 1.6s 0.3s ease-in-out infinite;
}
@keyframes handBobFlip {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-6px); }
}
.hand-heart {
  font-size: 28px;
  animation: heartPulse 1.4s ease-in-out infinite;
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* 复合 dock：摄像头 + 麦克风，可拖拽 */
.media-dock {
  position: fixed;
  z-index: 40;
  width: 144px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 4px 8px 8px;
  box-shadow: 0 8px 24px rgba(120, 60, 30, 0.18);
  display: flex; flex-direction: column; gap: 6px;
  user-select: none;
  animation: dockIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}
@keyframes dockIn { from { transform: translateY(-12px); opacity: 0; } }
.dock-handle {
  height: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
}
.dock-handle:active { cursor: grabbing; }
.dock-handle span {
  width: 28px; height: 4px;
  background: rgba(0,0,0,0.18);
  border-radius: 2px;
}
.dock-cam {
  position: relative;
  width: 100%; aspect-ratio: 4/3;
  border-radius: 12px; overflow: hidden;
  background: #1a1410;
  cursor: pointer;
  transition: transform 0.15s;
}
.dock-cam:hover { transform: scale(1.02); }
.dock-video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1);
}
.dock-cam-off {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  font-size: 28px; color: rgba(255,255,255,0.5);
  background: linear-gradient(135deg, #4a3a30, #2a2018);
}
.dock-cam.off .dock-video { display: none; }
.dock-cam.off .dock-cam-off { display: flex; }
.dock-badge {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF5252;
  box-shadow: 0 0 0 0 rgba(255,82,82,0.6);
  animation: liveDot 1.4s infinite;
}
.dock-cam.off .dock-badge { display: none; }
@keyframes liveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,82,82,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,82,82,0); }
}

.dock-mic {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 138, 101, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.dock-mic:hover { background: rgba(255, 138, 101, 0.28); }
.dock-mic.off { background: rgba(0,0,0,0.06); }
.dock-mic.off:hover { background: rgba(0,0,0,0.1); }
.dock-mic-icon { font-size: 16px; }
.dock-mic.off .dock-mic-icon { opacity: 0.4; filter: grayscale(1); }
.dock-mic-bar {
  flex: 1; height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.dock-mic-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #6FCF97, #FFD166 50%, #FF8A65);
  transition: width 0.06s linear;
  border-radius: 4px;
}
.dock-mic.off .dock-mic-fill { background: rgba(0,0,0,0.1); }

/* Orb 在 FLIP 过程中的过渡 */
.orb-svg.flying {
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.25, 1);
  transform-origin: 0 0;
  z-index: 200;
  position: relative;
}

/* ---------- 左侧 IP ---------- */
.ip-panel {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(255, 180, 130, 0.25);
}
.ip-stage {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orb-svg {
  width: 280px;
  height: 280px;
  cursor: pointer;
  filter: drop-shadow(0 16px 28px rgba(180, 100, 50, 0.25));
}
.state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  max-width: 280px;
}
.state-row button {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.15s, background 0.2s;
}
.state-row button:hover { transform: translateY(-2px) scale(1.1); background: white; }
.state-row button.active { background: #FF8A65; }

.ip-bubble {
  position: absolute;
  top: 4%;
  right: -8px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  max-width: 220px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.ip-bubble.show { opacity: 1; transform: translateY(0); }
.ip-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 28px;
  width: 16px; height: 16px;
  background: #fff;
  transform: rotate(45deg);
}
.ip-name {
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #8a5a3a;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gear {
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.7);
  cursor: pointer; font-size: 13px;
}
.gear:hover { background: white; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(40,20,10,0.45);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(640px, 92vw);
  max-height: 88vh;
  background: white;
  border-radius: 24px;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  overflow: hidden;
}
.modal-head {
  padding: 18px 22px;
  display: flex; align-items: center;
  border-bottom: 1px solid #f0e0d0;
}
.modal-head h3 { flex: 1; color: #8a4a2a; font-size: 18px; }
.modal-head .x {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: #f5e8de; cursor: pointer; font-size: 20px; color: #8a4a2a;
}
.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.modal-body label {
  font-weight: 600; font-size: 13px; color: #8a4a2a;
  margin-top: 8px;
}
.modal-body .hint { font-weight: 400; color: #b07050; font-size: 11px; }
.modal-body input, .modal-body select, .modal-body textarea {
  border: 1.5px solid #f0d8c0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus {
  border-color: #FFB07A;
}
.modal-body textarea { resize: vertical; min-height: 200px; line-height: 1.6; }
.modal-body .row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.modal-body button {
  border: none; border-radius: 999px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.modal-body button.primary { background: linear-gradient(135deg, #FFB07A, #FF8A65); color: white; }
.modal-body button.ghost { background: #f5e8de; color: #8a4a2a; }
.modal-body .status { font-size: 13px; color: #8a4a2a; margin-top: 8px; min-height: 18px; }
.modal-body .status.err { color: #c0392b; }
.modal-body .status.ok { color: #2a8c5a; }

/* ---------- 右侧 stage ---------- */
.stage {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 8px 32px rgba(180, 130, 100, 0.18);
}
#stageCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene {
  position: absolute;
  inset: 0;
  padding: 72px 32px 32px;
  overflow: auto;
}

/* topbar */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  gap: 8px;
  padding: 16px;
  z-index: 10;
}
.spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.15s, background 0.2s;
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn.active { background: #FF9D7A; color: white; }
.icon-btn.pill {
  width: auto;
  padding: 0 16px 0 14px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #c2674a;
  background: linear-gradient(135deg, #FFF4E0, #FFE0CC);
}
.icon-btn.pill span { font-size: 14px; }
.icon-btn.pill:hover { background: linear-gradient(135deg, #FFB07A, #FF8A65); color: white; }

/* ---------- 场景内通用 ---------- */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 24px;
}
.welcome h1 {
  font-size: 42px;
  color: #c2674a;
  text-shadow: 0 2px 0 rgba(255,255,255,0.6);
}
.welcome p { font-size: 18px; color: #7a5340; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.cta {
  padding: 16px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB07A, #FF8A65);
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 138, 101, 0.45);
  transition: transform 0.15s;
}
.cta:hover { transform: translateY(-3px); }
.cta.ghost {
  background: rgba(255,255,255,0.9);
  color: #c2674a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* 游戏卡片 */
.section-title {
  font-size: 22px;
  margin-bottom: 16px;
  color: #8a4a2a;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.game-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 2px solid transparent;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: #FFB07A;
  box-shadow: 0 10px 22px rgba(255, 138, 101, 0.25);
}
.game-card .emoji { font-size: 44px; }
.game-card .title { font-weight: 700; color: #5a3a1a; }
.game-card .desc { font-size: 13px; color: #8a7060; }
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #FFE7D2;
  color: #c2674a;
  margin-top: 4px;
  align-self: flex-start;
}

/* welcome 大 chip */
.welcome-chips {
  display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; justify-content: center;
}
.big-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  width: 160px; padding: 22px 18px;
  border: none; border-radius: 24px;
  background: white;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.18s, box-shadow 0.2s;
  border: 2px solid transparent;
}
.big-chip:hover {
  transform: translateY(-4px);
  border-color: #FFB07A;
  box-shadow: 0 12px 28px rgba(255, 138, 101, 0.25);
}
.big-chip span { font-size: 40px; }
.big-chip b { font-size: 17px; color: #5a3a1a; }
.big-chip i { font-size: 12px; color: #a07060; font-style: normal; }
.hint-row { font-size: 12px; color: #a07060; margin-top: 12px; }

/* chat 头部 */
.chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 12px; border-bottom: 1px solid rgba(255,176,122,0.25);
  margin-bottom: 8px;
}
.chat-title { flex: 1; font-weight: 700; font-size: 16px; color: #8a4a2a; }
.back-btn {
  border: none; background: rgba(255,255,255,0.7);
  color: #c2674a; padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; font-weight: 600;
}
.back-btn:hover { background: white; }

/* 聊天/游戏内 */
.chat-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
}
.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.4;
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.msg.ai { background: white; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: #FFB07A; color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: #b07050; animation: typingDot 1.2s ease-in-out infinite; }
.msg.err { background: #fde2e0; color: #a8392b; }
@keyframes typingDot { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.quick-replies { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: white;
  border: 1.5px solid #FFB07A;
  color: #c2674a;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.chip:hover { background: #FFE7D2; }
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: white;
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.input-row input {
  flex: 1; border: none; outline: none; font-size: 16px; background: transparent;
}
.input-row button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: #FF8A65; color: white; cursor: pointer; font-size: 18px;
}

/* 玩具推荐 */
.toy-flow { display: flex; flex-direction: column; gap: 20px; }
.toy-step { background: rgba(255,255,255,0.6); border-radius: 18px; padding: 14px 18px; }
.step-label { font-weight: 700; color: #8a4a2a; margin-bottom: 10px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip.on { background: linear-gradient(135deg, #FFB07A, #FF8A65); color: white; border-color: transparent; }
.toy-result { margin-top: 6px; }
.toy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; margin-top: 10px; }
.toy-card {
  background: white; border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.toy-card:hover { transform: translateY(-3px); }
.toy-emoji { font-size: 40px; }
.toy-name { font-weight: 700; color: #5a3a1a; font-size: 16px; }
.toy-age { font-size: 12px; color: #b07050; }
.toy-why { font-size: 13px; color: #6a5040; line-height: 1.5; }
.toy-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.empty { color: #aa7a60; font-size: 14px; padding: 12px; text-align: center; }

/* 摄像头 */
.cam-pip {
  position: absolute;
  top: 72px; right: 16px;
  width: 160px; height: 120px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  display: none;
}
.cam-pip.show { display: block; }
.cam-pip video { width: 100%; height: 100%; object-fit: cover; }

/* 麦克脉冲 */
.icon-btn.listening { background: #FF6B6B; color: white; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255,107,107,0); }
}
