* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #fff7ea;
  color: #33302a;
  overscroll-behavior: none;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100dvh;
  padding: 12px 12px calc(20px + env(safe-area-inset-bottom));
  gap: 10px;
}

#stage {
  flex: 1 1 auto;
  width: 100%;
  max-width: 560px;
  min-height: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffe9bd 0%, #fff3da 100%);
  overflow: hidden;
  position: relative;
}

#avatar-3d, #avatar-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#avatar-2d {
  width: 100%;
  height: 100%;
  display: block;
}

#status {
  font-size: 1.15rem;
  min-height: 1.5em;
  text-align: center;
}

#talk-btn {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: none;
  background: #ffb703;
  color: #4a3200;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 6px 0 #e09f00, 0 10px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#talk-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #e09f00; }

#talk-btn.live {
  background: #fb7185;
  color: #fff;
  box-shadow: 0 6px 0 #d6336c, 0 10px 18px rgba(0, 0, 0, 0.18);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

#test-results {
  font-size: 0.7rem;
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
