
:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --card: rgba(25, 28, 36, .82);
  --line: rgba(255,255,255,.1);
  --text: #f5f6f8;
  --muted: #a9afbb;
  --accent: #e7d9b7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(113,126,168,.18), transparent 32%),
    radial-gradient(circle at 80% 30%, rgba(211,174,111,.12), transparent 34%),
    var(--bg);
  color: var(--text);
}
.app { width: min(920px, 100%); margin: 0 auto; padding: 22px 16px 22px; }
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: center;
  padding: 12px 0 20px;
}
.avatar-wrap { position: relative; display: grid; place-items: center; }
.halo {
  width: 198px; height: 198px; border-radius: 50%;
  position: absolute;
  background: radial-gradient(circle, rgba(231,217,183,.22), transparent 66%);
  animation: breathe 4.5s ease-in-out infinite;
}
.avatar-card {
  position: relative; overflow: hidden;
  width: 180px; height: 180px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24);
  background: #171a21;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; display:block; }
.mouth {
  position: absolute; left: 50%; bottom: 41px;
  width: 26px; height: 4px; transform: translateX(-50%);
  border-radius: 0 0 20px 20px;
  background: rgba(18,12,12,.72); opacity: 0;
}
.avatar-wrap.talking .mouth {
  opacity: .85;
  animation: talk .14s ease-in-out infinite alternate;
}
.status {
  position: relative; margin-top: 12px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--muted); background: rgba(10,12,16,.7);
}
.eyebrow { letter-spacing: .18em; font-size: 12px; color: var(--accent); }
h1 { font-size: clamp(44px, 8vw, 76px); line-height: .95; margin: 8px 0 14px; }
.identity p { max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #d9dde6; font-size: 13px; }

.voice-panel {
  border: 1px solid var(--line); background: var(--card);
  backdrop-filter: blur(14px); border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  padding-top: 18px;
}
.voice-orb {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: min(310px, calc(100% - 32px)); aspect-ratio: 1.8 / 1;
  margin: 0 auto 14px; border-radius: 28px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: white; cursor: pointer; gap: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.voice-orb.active {
  border-color: rgba(231,217,183,.55);
  box-shadow: 0 0 0 6px rgba(231,217,183,.08), inset 0 1px 0 rgba(255,255,255,.08);
}
.voice-orb.listening { animation: pulse 1.2s ease-in-out infinite; }
.voice-orb #voiceIcon { font-size: 32px; }
.voice-orb strong { font-size: 16px; }
.voice-orb small { color: var(--muted); font-size: 11px; }

.live-transcript {
  min-height: 48px;
  margin: 0 18px 8px; padding: 10px 12px;
  border-radius: 14px; background: rgba(0,0,0,.18);
  color: #f0f1f4; font-size: 14px; line-height: 1.45;
}
.muted { color: #707783; }

.conversation {
  max-height: 42vh; min-height: 180px;
  overflow-y: auto; padding: 14px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 86%; padding: 11px 14px; border-radius: 16px;
  line-height: 1.48; white-space: pre-wrap;
}
.bubble.user {
  align-self: flex-end; background: #f1eee7; color: #1b1c20;
  border-bottom-right-radius: 5px;
}
.bubble.assistant {
  align-self: flex-start; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.07); border-bottom-left-radius: 5px;
}
.fallback { border-top: 1px solid var(--line); }
.fallback summary {
  cursor: pointer; padding: 11px 16px; color: var(--muted); font-size: 13px;
}
.composer {
  display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 0 13px 13px;
}
.composer input {
  min-width: 0; border: 1px solid var(--line); outline: none;
  background: #11141a; color: var(--text); border-radius: 14px;
  padding: 12px 14px; font-size: 16px;
}
.send {
  border: 0; cursor: pointer; border-radius: 14px;
  padding: 0 18px; background: var(--accent); color: #17130d; font-weight: 700;
}
.controls {
  display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding: 11px 15px 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
footer { text-align:center; color: #737985; padding: 15px 0 0; font-size: 11px; }

@keyframes talk { from { height: 4px; width: 25px; } to { height: 17px; width: 18px; } }
@keyframes breathe { 0%,100% { transform: scale(.98); opacity:.65; } 50% { transform: scale(1.05); opacity:1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }

@media (max-width: 680px) {
  .app { padding-top: 8px; }
  .hero { grid-template-columns: 1fr; gap: 4px; text-align:center; }
  .identity p { margin-left:auto; margin-right:auto; }
  .chips { justify-content:center; }
  .avatar-card { width: 144px; height: 144px; }
  .halo { width: 166px; height: 166px; }
  .conversation { max-height: 36vh; }
  .bubble { max-width: 93%; }
  .voice-orb { aspect-ratio: 2.2 / 1; }
}
