html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0e1620;
  color: #e8eef5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Start overlay ──────────────────────────────────────────────────── */
.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0e1620;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 400ms ease;
}
.start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.start-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.start-card img {
  filter: drop-shadow(0 0 30px rgba(246, 196, 83, 0.3));
  animation: breathe 3s ease-in-out infinite;
}
.start-text {
  font-size: 1.3rem;
  color: #f6c453;
  margin: 0;
  animation: pulse-text 2s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* ── Main stage ─────────────────────────────────────────────────────── */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
}
.bubo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
#bubo {
  width: 300px;
  height: 300px;
  animation: breathe 3s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
  transition: filter 300ms ease;
}
#bubo.thinking {
  animation: breathe 3s ease-in-out infinite, think-glow 1.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1.00); }
  50%      { transform: scale(1.03); }
}
@keyframes think-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(246, 196, 83, 0.0)); }
  50%      { filter: drop-shadow(0 0 24px rgba(246, 196, 83, 0.5)); }
}

/* ── Mouth flap ─────────────────────────────────────────────────────── */
#bubo .mouth-open { opacity: 0; }
#bubo.speaking .mouth-open {
  animation: mouth-flap 400ms infinite;
}
@keyframes mouth-flap {
  0%, 49%   { opacity: 0; }
  50%, 100% { opacity: 1; }
}

/* ── Word card ──────────────────────────────────────────────────────── */
.word-card {
  margin: 0;
  width: 180px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 500ms ease, transform 500ms ease;
  pointer-events: none;
}
.word-card.visible {
  opacity: 1;
  transform: scale(1);
}
.word-card img {
  width: 160px;
  height: 160px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}
.word-card figcaption {
  font-size: 1.1rem;
  color: #f6c453;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

/* ── Text elements ──────────────────────────────────────────────────── */
.title {
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  opacity: 0.7;
  margin: 0;
}
.lesson-info {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0;
}
.status {
  min-height: 1.4em;
  opacity: 0.75;
  margin: 0;
}
.transcript {
  max-width: 36ch;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  min-height: 1.4em;
  color: rgba(255,255,255,0.5);
}
.reply {
  max-width: 36ch;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.4;
  margin: 0;
  min-height: 1.4em;
  color: #f6c453;
}
